Pulse width modulation and average-value control
Pulse width modulation (PWM) controls an average value with a digital rectangular waveform. A lamp dimming example illustrates the principle: rapid switching between on and off states produces a brightness that depends on the fraction of time the output remains high. The load or a filter averages the waveform over the time scale appropriate for the circuit.
In PWM, information is encoded in the width (or duration) of successive pulses. The high level and frequency remain fixed for a given operating mode, while the duration of the high state follows the control signal. PWM belongs to the family of .
How PWM is generated
A simple and common PWM generator compares two signals:
- The Modulating signal: The value to be represented, such as an analog voice sample or a target motor speed.
- The Carrier signal: A waveform with a fixed frequency and known shape, usually a sawtooth or triangle wave.
These two signals are fed into a device called a . The comparator output forms the PWM signal:
- When the instantaneous value of the modulating signal is greater than the carrier value, the comparator output is HIGH ('1').
- When the modulating signal is less than the carrier value, the comparator output is LOW ('0').
The result is a series of rectangular pulses. With a fixed carrier and a control signal inside its range, a higher modulating value produces a longer high state and a wider pulse, while a lower value produces a shorter pulse.
Duty cycle
The parameter used to describe a PWM signal is its duty cycle. It is the ratio of the high-state time to the signal period , usually expressed as a percentage.
- A 0% Duty Cycle means the signal is always off.
- A 100% Duty Cycle means the signal is always on.
- A 50% Duty Cycle means the output is high for half the period and low for the other half. For levels of 0 V and with ideal averaging, the average voltage is .
Varying the duty cycle from 0% to 100% changes the average value. For an ideal output switching between 0 V and , , where is the duty cycle. Average power also depends on the load, filter, and switch parameters.
Applications of PWM
PWM carries sample values and commonly controls power and average value in switching circuits. Circuit efficiency comes from keeping the transistor in the on or off state for most of the cycle and passing through the intermediate region briefly during switching.
1. Power control and regulation
PWM is widely used to control power supplied to electrical devices. A switching transistor operates in the ON state with a small voltage drop and resistance, or in the OFF state with current close to zero. Conduction loss can be described by , and instantaneous power by . Switching and conduction losses, together with losses in parasitic elements, depend on frequency and load.
Common examples include:
- Motor Speed Control: The average voltage influences DC motor speed in consumer electronics and industrial robotics.
- LED Dimming: With a fixed LED current, the fraction of time conducting influences brightness in homes, cars, and displays.
- Power Converters: Switch control and energy-storage elements form the basis of switch-mode power supplies such as phone chargers.
2. Telecommunications
PWM can also carry data. In this use, each sample of an analog signal is assigned a pulse width, and the receiver measures that width with a known period and scale. Reconstructing the sample requires synchronization, suitable linearity, and filtering when the result is an analog signal.