6 Pulse Width Modulation PWM: 6.1 Spectral Analysis of PWM Signal
6 Pulse Width Modulation PWM: 6.1 Spectral Analysis of PWM Signal
Definition PWM, or Pulse width modulation is the process by which the amplitude of a signal
is represented (modulated) by the width (duty cycle) of a square periodic signal.
PWM signal can be broken down into an average DC (Aav ) signal plus a zero average square
wave:
• The duty cycle D is the proportion of the switching period where the signal is on or high.
0% ≤ D ≤ 100% (or 0 ≤ D ≤ 1 )
• The amplitude A
pD (t)
- T2D TD
2
T 2−D
2 T T 2+D
2 2T
19
EE453 Lecture 06: Pulse-Width Modulation Fall 2014
Where Z Z T D/2
1 1
Aav = pD (t) dt = A dt = A.D
T T T −T D/2
The Average DC component Aav is directly controlled by the Duty cycle D of the PWM wave
pD (t)
Aav = A.D
Since the wave is an even function ck = 0
Z Z T D/2
1 1 A
bk = pD (t) cos(kωs t) cos(kωs t) = A cos(kωs t) dt = sin(kπD) = ADsinc(kπD)
T T T −T D/2 2πk
+∞
X
pD (t) = A.D + A.D sinc(kπD) cos(kωs t)
k=1
This confirm that a PWM signal consists of a DC term Aav = A.D and higher order cosine waves
whose sum is the zero-average square wave.
This analysis can also be taken using Fourier transform. We have already computed the spec-
trum of pulse wave in the sampling section.
∞
X sin(kωs τ )
Pτ (jω) = A 2 δ(j(ω − kωs ))
k
k=−∞
Where τ = DT /2
∞
X
PD (jω) = A 2Dπsinc(kπD)δ(j(ω − kωs ))
k=−∞
Notice the expected 2π factor difference between the Fourier series and Fourier Transform.
20
EE453 Lecture 06: Pulse-Width Modulation Fall 2014
Digital controller
Compared to DACs, PWM is cheaper and thus available in most basic microcontroller, But unlike
the DAC which directly generates the desired constant analog value Aav , A PWM module encodes
this value in as the average of square PWM wave.
21
EE453 Lecture 06: Pulse-Width Modulation Fall 2014
Solution 1 : Increase the switching frequency ωs of the PWM signal so hat the first harmonic at
ωs is located beyond the bandwidth ωB of the plant (ωs >> ωB ) ⇒ the harmonics will be naturally
attenuated by the plant.
Using this approach the PWM generated by the Digital controller is amplified and fed directly
to the plant:
Solution 2 : Use a low-pass filter to eliminate the harmonics of the PWM signals (ωc < ωs )
before the plant⇒ This is a new type of DAC called PWM DAC.
6.4 PWM-DAC
This is one on the simplest DACs to construct, It simply consists of a PWM wave followed by a
Low-pass filter G(s).
The output consists of a DC wave with small amount of ripple. this latter is due to the non-ideal
nature of the low-pass filter which does not completely attenuate the first harmonics at ωs
Bandwidth The bandwidth of this DAC is limited by the bandwidth of the filter ωc which in
turns is limited by the switching frequency ωs .
Thus in general it is desirable to increase ωs as much as possible, however this may lead to
other problems (like increasing power loss in PWM amplifiers such as class D amplifier)
PWM-DAC resolution The uncertainty or error in this dac output is the combination of
22