Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

9.

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

9.2 PWM encoding


Analogue PWM encoding
A signal voltage can be PWM-encoded quite easily in the analogue domain
using a comparator (Figure 9. 1) – by comparing it with a sawtooth voltage as
shown.

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).

EE301 GB09 Page 3 EE301 GB09 Page 4


Digital PWM encoding Example
Digital microprocessors can produce PWM-encoded signals very flexibly – How could a microprocessor encode a PWM signal whose average value is
the shape of the desired power voltage is virtually unlimited. 3.05V? The switching frequency is 10 kHz, and the clock frequency is
500kHz.
VPWM
+ Solution
0-5V
- Assume the amplitude of the PWM signal is 5V. Then the duty ratio must be
Vav 3.05
D= = = 0.61
Vmax 5
Figure 9.3 A digital microprocessor can produce a programmable 0-5V PWM signal

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.

EE301 GB09 Page 5 EE301 GB09 Page 6

Tswitch 100 × 10 −6
N= = = 50
Tclock 2 × 10 −6

and the number of tics to set high, to achieve duty ratio D, is

n = N×D

Examples
To achieve D = 1 (VAV=5V), set n = 50×1 = 50.

To get D=0.2 (VAV=1V), set n = 50×0.2 = 10.

To get D=0.602 (VAV=3.01V) set n = 50 × 0.61 = 30.5 (???)

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.

EE301 GB09 Page 7 EE301 GB09 Page 8


So the answer: the microprocessor can’t PWM-encode 3.05V! The closest 9.3. PWM direct converter
it can do is 3V (n=30) or 3.1V (n=31).
PWM direct conversion is a way of producing a time-varying power supply
So the higher the clock speed, the better the accuracy of the PWM voltage from D.C using PWM. Figure 9.5 shows a popular switching circuit
signal. called a totem pole, which can drive heavy loads.
+5V
+VDD
Notes
R
• Consider a rapidly-switching PWM signal, modulated with a slowly Q2
changing input signal. The running average of the PWM signal tends to Filter
take on the value of the slowly changing input, provided that Q1 vout iout (Heavy)
vPWM
the PWM switching frequency is much greater than the signal R
frequency! Q3 C vout (filtered)
RL
• Also in the modulated signal there will be a lot of high frequency noise,
with especially strong components at the switching frequency and its
harmonics.

• Aggressive filtering is usually needed to remove those components and


Figure 9.5 MOSFET Totem pole, with output low-pass filter
recover the original signal.

EE301 GB09 Page 9 EE301 GB09 Page 10

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

where D is the duty ratio of the PWM signal.

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

EE301 GB09 Page 11 EE301 GB09 Page 12


The corresponding uncertainty in the output voltage is given by

Vout ( nominal ) − Vout ( actual ) Vin D − Vin D '


voltage error = =
Vout ( nominal ) Vin D
D'
= 1−
D

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

EE301 GB09 Page 13 EE301 GB09 Page 14

Of course, increasing the sampling time or measuring time by a factor of k


shrinks the maximum representable frequency 1/Tswitch by a factor k. So
there’s the trade-off:

a longer switching time means (and lower switching frequency)

• more accurate rendering of the PWM signal (good)


but

• lower maximum signal frequency (bad)

In the next lecture:


• Choosing the switching frequency – worked example

• PWM and the buck converter

END OF LECTURE
EE301 GB09 Page 15

You might also like