Beruflich Dokumente
Kultur Dokumente
In this lecture:
9.1. 9.2. Introduction PWM encoding Analogue Digital Example PWM direct converter A MOSFET totem pole Choosing the switching frequency
9.1 Introduction
An inverter takes a D.C. voltage as input and produces time-varying output voltage, e.g. a sinusoid. Inverters are commonly used to power variable-speed A.C. machines etc. Pulse width modulation (PWM) is a simple, powerful technique used in many inverters. PWM is employed in a wide variety of applications, ranging from measurement and communications to power control and conversion. PWM-based power supplies can produce a power voltage of any desired wave shape. A signal voltage with the desired wave shape is applied to a PWM generator (e.g. slow sine wave, ramp etc.) 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.3. 9.4.
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).
Example
How could a microprocessor encode a PWM signal whose average value is 3.05V? The switching frequency is 10 kHz, and the clock frequency is 500kHz.
Solution
Assume the amplitude of the PWM signal is 5V. Then the duty ratio must be
D= Vav 3.05 = = 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 are either 0 or +VCC (normally 5V), in a highly programmable way. To PWM-encode a particular signal, a microprocessor repeatedly sets its output port high for ton, then low for toff. The microprocessors accuracy is limited, however, by its clock frequency, in a way shortly explained.
So the microprocessor produces a square wave at some frequency, which is high for 61% of its period and low for 39%. At a switching frequency of 1 kHz, the switching period is T=100s. The microprocessor, however, can set its output port only once at every tick of its on-board clock; consequently, the duration of each PWM pulse is some integer number of clock tics, n.
N=
Examples To achieve D = 1 (VAV=5V), set n = 501 = 50. To get D=0.2 (VAV=1V), set n = 500.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,
n = V 1 1 D = V AV = MAX 2 2N 2N
Figure 9.4 Digital PWM: the pulse duration is an integer number of clock tics
How many clock tics produce a PWM signal whose D=0.61 (VAV=3.05 V)? 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
EE301 GB09 Page 7
So the answer: the microprocessor cant PWM-encode 3.05V! The closest it can do is 3V (n=30) or 3.1V (n=31). So the higher the clock speed, the better the accuracy of the PWM signal.
Notes
R
Consider a rapidly-switching PWM signal, modulated with a slowly changing input signal. The running average of the PWM signal tends to take on the value of the slowly changing input, provided that
vPWM
Q1
the PWM switching frequency is much greater than the signal frequency!
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 recover the original signal.
EE301 GB09 Page 9
The totem pole of Figure 9.5 inverts: a high input produces a low output, and vice versa: 1. vPWM high: Q1 on,Q3 on, Q2 off, so vout low. 2. vPWM low: Q1 off, Q3 off, Q2 on, so vout high. This could easily be fixed by inverting vPWM beforehand. So applying a PWM signal like that of Figure 9. 2, for example, produces a sinusoidal power voltage than can drive a heavy load. An RC stage is needed to low-pass filter the resulting PWM power signal, extracting the low-frequency component of the signal (e.g. the sine-wave).
Vout(nominal) = Vin
t ON = 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:
Vout ( actual ) = Vin t ON t = Vin D' Tswitch m t
EE301 GB09 Page 12
= 1
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
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 theres 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)
END OF LECTURE
EE301 GB09 Page 15