Pulse-width modulation
Pulse-width modulation, also known as pulse-duration modulation or pulse-length modulation, is any method of representing a signal as a rectangular wave with a varying duty cycle.
PWM is useful for controlling the average power or amplitude delivered by an electrical signal. The average value of voltage fed to the load is controlled by switching the supply between 0 and 100% at a rate faster than it takes the load to change significantly. The longer the switch is on, the higher the total power supplied to the load. Along with maximum power point tracking, it is one of the primary methods of controlling 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. The goal of PWM is to control a load; however, the PWM switching frequency must be selected carefully in order to smoothly do so.
The PWM switching frequency can vary greatly depending on load and application. For example, switching only has to be done several times a minute in an electric stove; 100 or 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. Choosing a switching frequency that is too high for the application may cause premature failure of mechanical control components, despite getting smooth control of the load. Selecting a switching frequency that is too low for the application causes oscillations in the load. 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.
In electronics, many modern microcontrollers integrate PWM controllers exposed to external pins as peripheral devices under firmware control. These are commonly used for direct current motor control in robotics, switched-mode power supply regulation, and other applications.
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
The Corliss steam engine was patented in 1849. It used pulse-width modulation to control the intake valve of a steam engine cylinder. A centrifugal governor was used to provide automatic feedback.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 and adjustment method was yet to be found. This mechanism also needed to be able to drive motors for fans, pumps and robotic servomechanisms, and needed to be compact enough to interface with lamp dimmers. PWM emerged as a solution for this complex problem.
PWM telecommunications systems were invented just prior to the start of World War II, but at that time time-division multiplexing was already in use and there were only experimental PWM systems. This changed with the introduction of the cavity magnetron in 1940, which could produce pulses of microwave frequency energy but could not vary its frequency or precisely control its amplitude. A PWM encoder was used to trigger a magnetron in the British Army's Wireless Set Number 10, which provided long-distance telephone relay, up to.
By 1946, the Philips, N. V. company had designed an optical scanning system for variable area film soundtrack which used PWM while it was scanning the optical audio track transversely with a thin light beam. The electronics then evaluated the threshold between exposed and unexposed parts of the audio track. The proposed system was to reduce noise when playing a film soundtrack.
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
Periodic pulse wave
If we consider a periodic pulse wave with period, low value, a high value and a constant 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.
However, by varying the duty cycle, the following more advanced pulse-width modulated waves allow variation of the average value of the waveform.
Intersective method PWM
The intersective method is a simple way to generate a PWM output signal with fixed period and varying duty cycle is by using a comparator to switch the PWM output state when the input waveform intersects with a sawtooth or a triangle waveform.Depending on the type of sawtooth or triangle waveform, intersective PWM signals can be aligned in three ways:
- Leading edge modulation uses a reverse sawtooth wave to generate the PWM. The PWM's leading edge is held at the leading edge of the window and the trailing edge is modulated.
- Trailing edge modulation uses a normal sawtooth wave to generate the PWM. The PWM's trailing edge is fixed and the leading edge is modulated.
- Centered pulses uses a triangle waveform to generate the PWM. The pulse center is fixed in the center of the time window and both edges of the pulse are moved to compress or expand the width.
Time proportioning
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.
Spectrum
The resulting spectra are similar. Each contains a DC component, a base sideband containing the modulating signal, and phase modulated carriers at each harmonic of the frequency of the pulse. The amplitudes of the harmonic groups are restricted by a envelope and extend to infinity. 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 communication systems. By limiting the bandwidth of the PWM kernel, aliasing effects can be avoided.On the contrary, delta modulation and delta-sigma modulation are random processes that produces a continuous spectrum without distinct harmonics. While intersective PWM uses a fixed period but a varying duty cycle, the period of delta and delta-sigma modulated PWMs varies in addition to their duty cycle.