Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Sidebands of fundamental frequency during PWM generation

Status
Not open for further replies.
Low frequency sidebands are not expectable in PWM. You get +/- 50 Hz sidebands of the pwm carrier and it's multiples, as expectable for any AM process.

I agree that the sidebands may be caused by an incorrectly implemented sine table, Measurement artefacts (aliasing of oscilloscope sampling rate with pmw carrier) are another possible cause, as previously discussed. But they can be excluded if the 5 Hz modulation stays the same with different oscilloscope settings.

Presumed the modulation is real, we have to go into the code details. No sense of general considerations.
 

I expect sidebands at 50+/-4 Hz not +/-5 Hz as reported. I hope the measurements are accurate and reliable.
 

Low frequency sidebands are not expectable in PWM. You get +/- 50 Hz sidebands of the pwm carrier and it's multiples, as expectable for any AM process.

I agree that the sidebands may be caused by an incorrectly implemented sine table, Measurement artefacts (aliasing of oscilloscope sampling rate with pmw carrier) are another possible cause, as previously discussed. But they can be excluded if the 5 Hz modulation stays the same with different oscilloscope settings.

Presumed the modulation is real, we have to go into the code details. No sense of general considerations.

I don't think it's an issue of measurement because varying the time division on the oscilloscope shows that the signal generated is not a pure 50Hz. That led me to further investigate on what's going on and ultimately led me to use the FFT to see what other frequency components are getting generated. Also another oscilloscope showed that the output signal is wiggling too.

As for the sin table used, I have the points generated from matlab using the following statement:

Code:
Freq = 50;   % frequency of fundamental
t = 0:199;   % t is a 200 element array containing s.t t(1) = 0, t(2) = 1 ... t(200) = 199;
generated_sin = sin(2*pi*Freq*t*100E-6)  % generated_sin is a 200 element array containing a sin wave of 50Hz. The points on the sin wave are separated by 100us

plotting generated_sin by the command plot(t, generated_sin) indeed shows that generated_sin contains only a single frequency which is 50Hz

I will post the code shortly.

- - - Updated - - -

I expect sidebands at 50+/-4 Hz not +/-5 Hz as reported. I hope the measurements are accurate and reliable.

Yes it is around 4Hz. How were you able to know that?
 

Post #9 waveform shows a 4.1 Hz modulation, and as far as I understand you have verified that it's a real amplitude modulation not a measurement artifact.

So you have to find out how it's generated in your PWM method. Of course this shouldn't happen (and doesn't happen in state-of-the-art implementations).
 

So you have to find out how it's generated in your PWM method. Of course this shouldn't happen (and doesn't happen in state-of-the-art implementations).

Exactly! I don't see a problem neither in the way things are implemented on the MCU nor in the reference table used. I just can't track where it is coming from.
 

Re: Unidentified low frequency components around 50Hz in a dc-ac inverter

I have an infinite while loop running along with a timer that overflows/underflows every 50us. The unipolar PWM switching functionality is ran every 50us and is handled within the timer's function by updating 2 compare registers. Complementary outputs along with the deadtime feature are used.

Have you tested with different deadtime settings if it has any effect to sidebands?
 

Yes it is around 4Hz. How were you able to know that?

Just a simple suggestion: can you change in the code t=0:399 % just double the number of points

And run the same code exactly as before and let us see the change...
 
Re: Unidentified low frequency components around 50Hz in a dc-ac inverter

Have you tested with different deadtime settings if it has any effect to sidebands?

Yes I have, didn't affect them.

- - - Updated - - -

Just a simple suggestion: can you change in the code t=0:399 % just double the number of points

And run the same code exactly as before and let us see the change...

Good idea. I'll try it and come back with the results.
 

Changing the code to t=0:399 didn't change anything.

However I made 2 new findings. The first is that when I try to modulate X=sin(2*pi*50*100e-6*t) where t 0->199 I get a pure sin wave after my RC filter with no additional frequency components. However when I take a reduced amplitude of the sine wave (amplitude < 1), for example amplitude = 0.5 (results in X/2) things start to mess up and other components start to appear! Why can that happen?! (My initial code was using sin wave with amplitude < 1 and that's why the problem showed up)

I also tried changing the prescaler of the timer and reduced it from 168MHz to 8 MHz (21 times). The same thing happened when I used X and X/2 as my modulated sin waves however when X/2 additional low frequency components appeared on different frequency compared to when timer was running @ 168Mhz. Can this tell us something?
 
Last edited:

Changing the code to t=0:399 didn't change anything.

I also tried changing the prescaler of the timer and reduced it from 168MHz to 8 MHz (21 times). The same thing happened when I used X and X/2 as my modulated sin waves however when X/2 additional low frequency components appeared on different frequency compared to when timer was running @ 168Mhz. Can this tell us something?

I originally thought that you have taken one extra point in the look up table and when you are putting one wave next to another, they are not fitting nicely and producing sidebands. I was obviously wrong.

Now your present observation suggests that it has to do something about the timer frequency is not an exact divisible of 50Hz. But far more puzzling is the amplitude.
 

Is the reference clock an exact multiple of 50Hz? Bearing in
mind that a (say) 1.000MHz clock implies that you "throw
away" accuracy better than 1kHz and could easily get a
sampling artifact showing up - not to mention phase noise
on any cheesy self-excited XTAL oscillator embedded in a
uC with busy I/Os and noisy supply.

Suppose you fed it a clean reference, like ideally one that
is slaved to / derived from the measurement equipment
(like SpecAn ref 10MHz output)?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top