You are on page 1of 4

EE453 Lecture 06: Pulse-Width Modulation Fall 2014

6 Pulse Width Modulation PWM


Many Digital systems (Microcontrollers, DSP,...) include facility to generate PWM output instead
of analog output via DACs.

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:

a PWM wave has the following parameters:

• the switching frequency f or period (T )

• 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

6.1 Spectral analysis of PWM signal


In order to confirm the previous claim, we shall examine the PWM signal from the spectral per-
spective(spectral coefficient (FS), spectrum (FT))
PWM signal analysis can be simplified by judiciously placing the time origin so that the signal
becomes an even mathematical function:
The PWM signal pD (t) has period T , amplitude A ans duty cycle D is shown below:

pD (t)

- T2D TD
2
T 2−D
2 T T 2+D
2 2T

19
EE453 Lecture 06: Pulse-Width Modulation Fall 2014

Since the signal is periodic it can be represented by the Fourier series:


+∞
X
pD (t) = Aav + 2 bk cos(kωs t) + ck sin(kωs t)
k=1

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

6.2 PWM signal generation


a PWM signal can be generated by a variety of means, the simplest uses a comparator, a modulating
wave and a carrier wave

6.3 Interfacing the PWM output with the Actuator


Consider the case where a PWM signal is used as the control signal from the controller to the drive
the Plant. just like DACs signals, PWM signals cannot be used directly to drive the Actuator,
instead, a PWM amplifier is used to drive, this could be either a voltage-to-voltage or trans-
conduction PWM amplifier. For example
• In a speed control system via a DC motor actuator, A voltage-voltage amplifier(class D, like
H-bridges) can be used to increase-decrease the Armature voltage and hence the speed.

• In a position/torque control system via DC motor actuator, a trans-conductance PWM am-


plifier can be used to increase/decrease the armature current and hence the torque.

pD (t) KpD (t)


CP U PWM module PWM amplifier P lant

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

Problem What about higher order harmonics in the square wave?

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:

criterion PWM control DAC(linear) control


resolution ωs >> ωB Better: (does not depend on ωB )
bandwidth Limited by ωs Limited by the setting time
Cost Better (PWM is cheap) More expensive
Amplification Better(uses efficient D class) uses less efficient linear amplifiers

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

resolution of PWM module + Magnitude of the ripple

6.5 standalone DACs vs PWM-DACs


criterion PWM-DAC Standalone DAC
resolution suffers from ripple uncertainty Better: (no ripple uncertainty)
bandwidth suffers from ωc limit Better: (no ωc limit)
Cost Better (just PWM and a filter) More expensive (more with higher # bits)

22

You might also like