Professional Documents
Culture Documents
In This Lecture:: Analogue PWM Encoding
In This Lecture:: Analogue PWM Encoding
1 Introduction
Lecture 9
• An inverter takes a D.C. voltage as input and produces time-varying
PWM Inverters 1 output voltage, e.g. a sinusoid. Inverters are commonly used to power
variable-speed A.C. machines etc.
In this lecture:
• Pulse width modulation (PWM) is a simple, powerful technique used in
9.1. Introduction many inverters. PWM is employed in a wide variety of applications,
ranging from measurement and communications to power control and
9.2. PWM encoding conversion.
• Analogue
• Digital • PWM-based power supplies can produce a power voltage of any
• Example desired wave shape.
9.3. PWM direct converter • A signal voltage with the desired wave shape is applied to a PWM
9.4. A MOSFET totem pole generator (e.g. slow sine wave, ramp etc.)
• Choosing the switching frequency
• The PWM generator outputs a PWM voltage (e.g. 0-5V)
(effectively a square-wave voltage) whose duty ratio is
proportional to the signal voltage.
• The PWM voltage is used to open and close a power
semiconductor switch (a power MOSFET, for example), forming a
PWM-based power supply.
EE301 GB09 Page 1 EE301 GB09 Page 2
Figure 9. 2 The amplitude of vPWM is fixed, but its duty ratio is proportional to vin
Hard low-pass filtering of this signal can recover its average value, which
happens to be a good approximation to vin.
Figure 9. 1vin is PWM -encoded by comparing it with a sawtooth voltage
The output vPWM has uniform amplitude, VCC, but its duty ratio D depends on
the instantaneous value of vin (Figure 9. 2).
A microprocessor (e.g. a P.C. with a serial port) can produce voltages that So the microprocessor produces a square wave at some frequency, which is
are either 0 or +VCC (normally 5V), in a highly programmable way. high for 61% of its period and low for 39%.
To PWM-encode a particular signal, a microprocessor repeatedly sets its At a switching frequency of 1 kHz, the switching period is T=100µs.
output port high for ton, then low for toff. The microprocessor’s accuracy is
The microprocessor, however, can set its output port only once at every tick
limited, however, by its clock frequency, in a way shortly explained.
of its on-board clock; consequently, the duration of each PWM pulse is
some integer number of clock tics, n.
Tswitch 100 × 10 −6
N= = = 50
Tclock 2 × 10 −6
n = N×D
Examples
To achieve D = 1 (VAV=5V), set n = 50×1 = 50.
But the microprocessor can only set an integer number of clock tics high –
either 30 tics or 31. Therefore, the error in the PWM signal (and therefore in
vAV) corresponds to a maximum of ±1/2 a tic. In this case,
Figure 9.4 Digital PWM: the pulse duration is an integer number of clock tics
1 1 V
How many clock tics produce a PWM signal whose D=0.61 (VAV=3.05 V)? ∆n = ± ⇔ ∆D = ± ⇔ ∆V AV = ± MAX
2 2N 2N
The clock frequency is 500 kHz, so the duration of a clock tick is 2 µs. The
number of clock tics, therefore, that make up one single PWM period is So here, ±1/2 a tic corresponds to ±5/(2×50) = 0.05V, or 1% error.
The totem pole of Figure 9.5 inverts: a high input produces a low output, and Choosing the switching frequency – super-pulses
vice versa:
In general, a PWM-encoded voltage has a harmonic at the signal frequency,
1. vPWM high: Q1 on,Q3 on, Q2 off, so vout low. and many higher harmonics at multiples of the switching frequency. As it’s
easier to low-pass filter harmonics that are far apart,
2. vPWM low: Q1 off, Q3 off, Q2 on, so vout high.
the switching frequency should be much higher than the signal
This could easily be fixed by inverting vPWM beforehand. So applying a PWM frequency – at least ten times higher.
signal like that of Figure 9. 2, for example, produces a sinusoidal power
voltage than can drive a heavy load. Recall: the nominal mean output voltage is
An RC stage is needed to low-pass filter the resulting PWM power signal, t ON
extracting the low-frequency component of the signal (e.g. the sine-wave). Vout(nominal) = Vin = Vin D
Tswitch
Recall that edge jitter and discretization error in the timing, ∆t, is virtually
unavoidable, and produces an extra error in the output voltage. For one
period:
t ON ± ∆t
Vout ( actual ) = Vin = Vin D'
Tswitch m ∆t
One way to minimize the error this incurs is to take clump together k pulses
into a super-pulse. This super-pulse has a much longer switching period
kTswitch: instead of Tswitch. This reduces the corresponding uncertainty in the
output voltage by k.
Figure 9 6 Taking k pulses together into a single super-pulse reduces the error due to ∆t,
but also reduces the maximum achievable frequency
END OF LECTURE
EE301 GB09 Page 15