Pulse-width modulation
Pulse-width modulation, or pulse-duration modulation, is a method of reducing the average power delivered by an electrical signal, by effectively chopping it up into discrete parts. The average value of voltage fed to the load is controlled by turning the switch between supply and load on and off at a fast rate. The longer the switch is on compared to the off periods, the higher the total power supplied to the load. Along with maximum power point tracking, it is one of the primary methods of reducing the output of solar panels to that which can be utilized by a battery. PWM is particularly suited for running inertial loads such as motors, which are not as easily affected by this discrete switching, because their inertia causes them to react slowly. The PWM switching frequency has to be high enough not to affect the load, which is to say that the resultant waveform perceived by the load must be as smooth as possible.
The rate at which the power supply must switch can vary greatly depending on load and application. For example, switching has to be done several times a minute in an electric stove; 120 Hz in a lamp dimmer; between a few kilohertz and tens of kHz for a motor drive; and well into the tens or hundreds of kHz in audio amplifiers and computer power supplies. The main advantage of PWM is that power loss in the switching devices is very low. When a switch is off there is practically no current, and when it is on and power is being transferred to the load, there is almost no voltage drop across the switch. Power loss, being the product of voltage and current, is thus in both cases close to zero. PWM also works well with digital controls, which, because of their on/off nature, can easily set the needed duty cycle. PWM has also been used in certain communication systems where its duty cycle has been used to convey information over a communications channel.
Duty cycle
The term duty cycle describes the proportion of 'on' time to the regular interval or 'period' of time; a low duty cycle corresponds to low power, because the power is off for most of the time. Duty cycle is expressed in percent, 100% being fully on. When a digital signal is on half of the time and off the other half of the time, the digital signal has a duty cycle of 50% and resembles a "square" wave. When a digital signal spends more time in the on state than the off state, it has a duty cycle of >50%. When a digital signal spends more time in the off state than the on state, it has a duty cycle of <50%. Here is a pictorial that illustrates these three scenarios:History
Some machines require partial or variable power. In the past, control was implemented by use of a rheostat connected in series with the motor to adjust the amount of current flowing through the motor. It was an inefficient scheme, as this also wasted power as heat in the resistor element of the rheostat, but tolerable because the total power was low. While the rheostat was one of several methods of controlling power, a low cost and efficient power switching/adjustment method was yet to be found. This mechanism also needed to be able to drive motors for fans, pumps and robotic servos, and needed to be compact enough to interface with lamp dimmers. PWM emerged as a solution for this complex problem.One early application of PWM was in the Sinclair X10, a 10 W audio amplifier available in kit form in the 1960s. At around the same time PWM started to be used in AC motor control.
Of note, for about a century, some variable-speed electric motors have had decent efficiency, but they were somewhat more complex than constant-speed motors, and sometimes required bulky external electrical apparatus, such as a bank of variable power resistors or rotating converters such as the Ward Leonard drive.
Principle
Pulse-width modulation uses a rectangular pulse wave whose pulse width is modulated resulting in the variation of the average value of the waveform. If we consider a pulse waveform, with period, low value, a high value and a duty cycle D, the average value of the waveform is given by:As is a pulse wave, its value is for and for. The above expression then becomes:
This latter expression can be fairly simplified in many cases where as. From this, the average value of the signal is directly dependent on the duty cycle D.
The simplest way to generate a PWM signal is the intersective method, which requires only a sawtooth or a triangle waveform and a comparator. When the value of the reference signal is more than the modulation waveform, the PWM signal is in the high state, otherwise it is in the low state.
Delta
In the use of delta modulation for PWM control, the output signal is integrated, and the result is compared with limits, which correspond to a Reference signal offset by a constant. Every time the integral of the output signal reaches one of the limits, the PWM signal changes state. Figure 3Delta-sigma
In delta-sigma modulation as a PWM control method, the output signal is subtracted from a reference signal to form an error signal. This error is integrated, and when the integral of the error exceeds the limits, the output changes state. Figure 4Space vector modulation
Space vector modulation is a PWM control algorithm for multi-phase AC generation, in which the reference signal is sampled regularly; after each sample, non-zero active switching vectors adjacent to the reference vector and one or more of the zero switching vectors are selected for the appropriate fraction of the sampling period in order to synthesize the reference signal as the average of the used vectors.Direct torque control (DTC)
Direct torque control is a method used to control AC motors. It is closely related with the delta modulation. Motor torque and magnetic flux are estimated and these are controlled to stay within their hysteresis bands by turning on a new combination of the device's semiconductor switches each time either signal tries to deviate out of its band.Time proportioning
Many digital circuits can generate PWM signals. They normally use a counter that increments periodically and is reset at the end of every period of the PWM. When the counter value is more than the reference value, the PWM output changes state from high to low. This technique is referred to as time proportioning, particularly as time-proportioning control – which proportion of a fixed cycle time is spent in the high state.The incremented and periodically reset counter is the discrete version of the intersecting method's sawtooth. The analog comparator of the intersecting method becomes a simple integer comparison between the current counter value and the digital reference value. The duty cycle can only be varied in discrete steps, as a function of the counter resolution. However, a high-resolution counter can provide quite satisfactory performance.
Types
Three types of pulse-width modulation are possible:- The pulse center may be fixed in the center of the time window and both edges of the pulse moved to compress or expand the width.
- The lead edge can be held at the lead edge of the window and the tail edge modulated.
- The tail edge can be fixed and the lead edge modulated.
Spectrum
The infinite bandwidth is caused by the nonlinear operation of the pulse-width modulator. In consequence, a digital PWM suffers from aliasing distortion that significantly reduce its applicability for modern communications system. By limiting the bandwidth of the PWM kernel, aliasing effects can be avoided.
On the contrary, the delta modulation is a random process that produces continuous spectrum without distinct harmonics.
PWM sampling theorem
The process of PWM conversion is non-linear and it is generally supposed that low pass filter signal recovery is imperfect for PWM. The PWM sampling theorem shows that PWM conversion can be perfect. The theorem states that "Any bandlimited baseband signal within ±0.637 can be represented by a pulsewidth modulation waveform with unit amplitude. The number of pulses in the waveform is equal to the number of Nyquist samples and the peak constraint is independent of whether the waveform is two-level or three-level."• Nyquist-Shannon Sampling Theorem:
“If you have a signal that is perfectly band limited to a bandwidth of f0 then you can collect all the
information there is in that signal by sampling it at discrete times, as long as your sample
rate is greater than 2f0.”
Applications
Servos
PWM is used to control servomechanisms; see servo control.Telecommunications
In telecommunications, PWM is a form of signal modulation where the widths of the pulses correspond to specific data values encoded at one end and decoded at the other.Pulses of various lengths will be sent at regular intervals.
_ _ _ _ _ _ _ _
| | | | | | | | | | | | | | | |
Clock | | | | | | | | | | | | | | | |
__| |____| |____| |____| |____| |____| |____| |____| |____
_ __ ____ ____ _
PWM signal | | | | | | | | | |
| | | | | | | | | |
_________| |____| |___| |________| |_| |___________
Data 0 1 2 4 0 4 1 0
The inclusion of a clock signal is not necessary, as the leading edge of the data signal can be used as the clock if a small offset is added to each data value in order to avoid a data value with a zero length pulse.
_ __ ___ _____ _ _____ __ _
| | | | | | | | | | | | | | | |
PWM signal | | | | | | | | | | | | | | | |
__| |____| |___| |__| |_| |____| |_| |___| |_____
Data 0 1 2 4 0 4 1 0
Power delivery
PWM can be used to control the amount of power delivered to a load without incurring the losses that would result from linear power delivery by resistive means. Drawbacks to this technique are that the power drawn by the load is not constant but rather discontinuous, and energy delivered to the load is not continuous either. However, the load may be inductive, and with a sufficiently high frequency and when necessary using additional passive electronic filters, the pulse train can be smoothed and average analog waveform recovered. Power flow into the load can be continuous. Power flow from the supply is not constant and will require energy storage on the supply side in most cases.High frequency PWM power control systems are easily realisable with semiconductor switches. As explained above, almost no power is dissipated by the switch in either on or off state. However, during the transitions between on and off states, both voltage and current are nonzero and thus power is dissipated in the switches. By quickly changing the state between fully on and fully off, the power dissipation in the switches can be quite low compared to the power being delivered to the load.
Modern semiconductor switches such as MOSFETs or insulated-gate bipolar transistors are well suited components for high-efficiency controllers. Frequency converters used to control AC motors may have efficiencies exceeding 98%. Switching power supplies have lower efficiency due to low output voltage levels but still more than 70–80% efficiency can be achieved.
Variable-speed computer fan controllers usually use PWM, as it is far more efficient when compared to a potentiometer or rheostat.
Light dimmers for home use employ a specific type of PWM control. Home-use light dimmers typically include electronic circuitry which suppresses current flow during defined portions of each cycle of the AC line voltage. Adjusting the brightness of light emitted by a light source is then merely a matter of setting at what voltage in the AC half-cycle the dimmer begins to provide electric current to the light source. In this case the PWM duty cycle is the ratio of the conduction time to the duration of the half AC cycle defined by the frequency of the AC line voltage.
These rather simple types of dimmers can be effectively used with inert light sources such as incandescent lamps, for example, for which the additional modulation in supplied electrical energy which is caused by the dimmer causes only negligible additional fluctuations in the emitted light. Some other types of light sources such as light-emitting diodes, however, turn on and off extremely rapidly and would perceivably flicker if supplied with low frequency drive voltages. Perceivable flicker effects from such rapid response light sources can be reduced by increasing the PWM frequency. If the light fluctuations are sufficiently rapid, the human visual system can no longer resolve them and the eye perceives the time average intensity without flicker.
In electric cookers, continuously variable power is applied to the heating elements such as the hob or the grill using a device known as a simmerstat. This consists of a thermal oscillator running at approximately two cycles per minute and the mechanism varies the duty cycle according to the knob setting. The thermal time constant of the heating elements is several minutes, so that the temperature fluctuations are too small to matter in practice.
Voltage regulation
PWM is also used in efficient voltage regulators. By switching voltage to the load with the appropriate duty cycle, the output will approximate a voltage at the desired level. The switching noise is usually filtered with an inductor and a capacitor.One method measures the output voltage. When it is lower than the desired voltage, it turns on the switch. When the output voltage is above the desired voltage, it turns off the switch.
Audio effects and amplification
Varying the duty cycle of a pulse waveform in a synthesis instrument creates useful timbral variations. Some synthesizers have a duty-cycle trimmer for their square-wave outputs, and that trimmer can be set by ear; the 50% point was distinctive, because even-numbered harmonics essentially disappear at 50%. Pulse waves, usually 50%, 25%, and 12.5%, make up the soundtracks of classic video games. The term PWM as used in sound synthesis refers to the ratio between the high and low level being secondarily modulated with a low frequency oscillator. This gives a sound effect similar to chorus or slightly detuned oscillators played together.A new class of audio amplifiers based on the PWM principle is becoming popular. Called class-D amplifiers, they produce a PWM equivalent of the analog input signal which is fed to the loudspeaker via a suitable filter network to block the carrier and recover the original audio. These amplifiers are characterized by very good efficiency figures and compact size/light weight for large power outputs. For a few decades, industrial and military PWM amplifiers have been in common use, often for driving servo motors. Field-gradient coils in MRI machines are driven by relatively high-power PWM amplifiers.
Historically, a crude form of PWM has been used to play back PCM digital sound on the PC speaker, which is driven by only two voltage levels, typically 0 V and 5 V. By carefully timing the duration of the pulses, and by relying on the speaker's physical filtering properties it was possible to obtain an approximate playback of mono PCM samples, although at a very low quality, and with greatly varying results between implementations.
In more recent times, the Direct Stream Digital sound encoding method was introduced, which uses a generalized form of pulse-width modulation called pulse density modulation, at a high enough sampling rate to cover the whole acoustic frequencies range with sufficient fidelity. This method is used in the SACD format, and reproduction of the encoded audio signal is essentially similar to the method used in class-D amplifiers.