Maker Pro
Maker Pro

Understanding signals in PWM

JonnyDriller

Apr 6, 2020
9
Joined
Apr 6, 2020
Messages
9
Guys I've been researching SPWM for several hours. I know it's a technique used to convert DC to AC. I know how it works using the little square waves in graph B to produce an average Sine wave.
Now it's these saw tooth signals that are confusing me.
Either they're another way to display the square waves
Or
More likely if I understand correctly it's some method used to correct harmonics in the output?
fig2-2k13-2366-2373.gif
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
12,765
Joined
Nov 17, 2011
Messages
12,765
More likely if I understand correctly it's some method used to correct harmonics in the output?
Definitely not. PWM creates harmonics, it does not reduce them.
Where is the image from? Where that image comes from you should find an accompanying text that explains the graphs. I suppose that the image shows the result of low pass filtering the different pulsed of triangular waveforms. The low pass filter is what removes the harmonics, leaving the fundamental sine wave.
 

Audioguru

Sep 24, 2016
3,650
Joined
Sep 24, 2016
Messages
3,650
Your signals are not Pulse Width Modulation because all your pulses have the same width. Instead it is Pulse Position Modulation but as shown in the datasheet of an LM555.
 

JonnyDriller

Apr 6, 2020
9
Joined
Apr 6, 2020
Messages
9
Thanks guys I get the principal of how this works. This diagram I got from google images. See to my understanding you should do the square wave pulses. And out should come the sinusodial wave. But every diagram I look at has these saw tooth images as well. What is their purpose? Is it just another way to display the square waves
 

Audioguru

Sep 24, 2016
3,650
Joined
Sep 24, 2016
Messages
3,650
A PWM sinewave is made by using a comparator with a triangle wave as the high frequency carrier frequency and a pure sinewave as the modulation frequency. Then the output of the comparator has pulses with widths according to the comparison.

PWM has square waves only when the modulation is 50%. The pulses are rectangular with equal amplitude but the widths of the pulses vary according to the modulation.
 

Nanren888

Nov 8, 2015
623
Joined
Nov 8, 2015
Messages
623
Not really an expert at this S-version PWM, but one thing the pulse width modulator must do is decide when to turn on and when to turn off, or when should be high and when should be low.
Usually pulses have a fixed frequency and one controlls the width, the time the pulse spends high and low.
Each pulse, being fixed height corresponds to energy proportional to its width,, each delivering a packet of energy, proportional to the width of that pulse.

So this is linear with width,
The sides oof a triangle, or one-sided sawtooth, are linear with time.
So if we draw the sinusoid that we want and draw also a trinagle wave, or one-sided sawtoth, where the width, period of the saw tooth is the same as the maximum pulse width, the time the sawtooth is above the sinusoid tells us when it would be too high. The time below the sine tells us when is is lower than needed.
That is the time that triangle signal the crosses to above the sine signal is the time to switch the drive, pulse off.
.
I'll try to post the figure in the document posted by bertus. :)
Capture.PNG
upload_2020-4-7_6-38-56.png
Or if you prefer from
https://electronics.stackexchange.com/questions/214902/pwm-frequency-and-lc-filter
upload_2020-4-7_6-40-16.png

Obviously, the resultant is only sinusoidal in some average sense. As basically a series of squange pulses, there are a lot of harmonics. Smoothing can follow, or be done as part of the load.
Moving the pulses round, or subtly changing their position can change the harmonic content. Sometime harmonic content is important.
 
Last edited:

JonnyDriller

Apr 6, 2020
9
Joined
Apr 6, 2020
Messages
9
Thanks guys... I need to study some of these terminologies you have up here. I'm studying another module atm so I might return to this later. Ty
 
Top