2
\$\begingroup\$

I'm new here, I have some fairly basic doubt. I am creating a PWM signal in MatLab by comparing a sine wave (50Hz) and a triangular wave (2kHz) .... So what is the PWM frequency will output?

After getting the PWM signal filters I want to get a sinusoid, using an LC filter, but do not know what the frequency of cut should I use?

Thanks for help

asked Feb 2, 2016 at 16:15
\$\endgroup\$
3
  • 1
    \$\begingroup\$ "Comparing" is too broad. What are the exact operations you're performing? \$\endgroup\$ Commented Feb 2, 2016 at 16:17
  • \$\begingroup\$ I simply compare a triangular wave(2khz) with 1 of amplitude , with sinusoidal wave (50Hz) with 1 of amplitude, and generate pwm \$\endgroup\$ Commented Feb 2, 2016 at 16:31
  • \$\begingroup\$ Yes, you already said that. \$\endgroup\$ Commented Feb 2, 2016 at 16:33

2 Answers 2

1
\$\begingroup\$

So what is the PWM frequency will output?

If your triangle wave is 2 kHz then the output PWM frequency is 2 kHz: -

enter image description here

After getting the PWM signal filters I want to get a sinusoid, using an LC filter, but do not know what the frequency of cut should I use?

Well an LC low pass filter has a cut-off frequency defined by: -

F = \$\dfrac{1}{2\pi\sqrt{LC}}\$

But, it's also a series resonant circuit so if you run either your 50 Hz or 2 kHz anywhere near that resonant point you are going to get rather large currents and, as has been mentioned in a comment a good starting point is the geometric mean i.e. 316 Hz. If you felt that the output ripple voltage (2kHz ripple) superimposed on the 50 Hz was too high you could lower the filter frequency towards 100 Hz but I'd probably use a simulator to see what the likely impact of this is. Alternatively I'd consider rasing the 2 kHz to maybe 10 kHz or higher.

answered Feb 2, 2016 at 17:54
\$\endgroup\$
3
  • \$\begingroup\$ i will test this tips , that you told me , and report you the result :) thanks \$\endgroup\$ Commented Feb 2, 2016 at 22:19
  • \$\begingroup\$ I test Fc=316 Hz and I got somo good result but th amplitude of the wave after filtered decreased slightly. So after this I change de frequency of triangular to 10Khz , and made the same process , sqrt(10Khz*50Hz) = 707 Hz , so this is my starting point Fc, but in this case the result isn't good, can help me to find why please? \$\endgroup\$ Commented Feb 3, 2016 at 17:58
  • \$\begingroup\$ Let me know what values of L, C and max load current. \$\endgroup\$ Commented Feb 3, 2016 at 18:46
0
\$\begingroup\$

Your pass band must extend to at least 50Hz.

Your stopband should be fully attenuating to your specification (you do have an unwanted signals specification, don't you?) by 1950Hz.

Where between those two limits you define to be the cutoff frequency of the filter (usually the -3dB point) depends on what order of filter you want to use, whether you want any excess bandwidth above 50Hz, and what your unwanted signal specification is. Some would advocate the geometric mean of Fpass and Fstop. It's a frequency that's between the two, so it has that going for it. It may not be the best to meet both your passband and stopband specifications, but it doesn't hurt to start there and see what you get.

I would choose a passband of a little more than 50Hz, and increase the filter order in a filter design program until the unwanted signals are suppressed to your specification (1%? 0.1%? 10%?). As the filter order changes, the ratio of useable passband to 'cutoff' frequency will change. As the passband is meaningful to your application, and the 'cutoff' frequency isn't, it's better to design with a passband, than with a cutoff frequency.

answered Feb 2, 2016 at 16:24
\$\endgroup\$
5
  • \$\begingroup\$ So I use this equation , Fc= 1/(2*PISQRT(LC)) , and use 50 Hz to Fc? \$\endgroup\$ Commented Feb 2, 2016 at 16:30
  • \$\begingroup\$ The geometric mean \$\sqrt{f_1f_2}\$ is usually a good first approximation of a corner frequency. \$\endgroup\$ Commented Feb 2, 2016 at 16:40
  • \$\begingroup\$ No, get a filter design program, design a filter, get a circuit simulator, and simulate it to see whether it give you what you want. The formula you have quoted is for LC resonance, not for the cutoff or passband frequency of any type of filter. \$\endgroup\$ Commented Feb 2, 2016 at 16:43
  • \$\begingroup\$ @user44635 Resonance is the corner frequency of an LC filter. \$\endgroup\$ Commented Feb 2, 2016 at 16:50
  • \$\begingroup\$ @MattYoung I test Fc=316 Hz and I got somo good result but th amplitude of the wave after filtered decreased slightly. So after this I change de frequency of triangular to 10Khz , and made the same process , sqrt(10Khz*50Hz) = 707 Hz , so this is my starting point Fc, but in this case the result isn't good, can help me to find why please? \$\endgroup\$ Commented Feb 3, 2016 at 17:57

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.