Pulse-width modulation (PWM) is a method of controlling the average power delivered to an electrical load by varying the width of rectangular voltage pulses while maintaining a constant pulse frequency. The duty cycle, expressed as a percentage, represents the proportion of each period during which the signal is high (on) versus low (off). By adjusting the duty cycle, PWM regulates the effective voltage and current applied to the load without changing the amplitude of the supply voltage.
Principle of operation
- A periodic waveform with a fixed frequency f is generated.
- The signal alternates between two levels, typically 0 V (low) and a fixed supply voltage Vₛ (high).
- The duration of the high state within each period T = 1/f is called the pulse width (τ).
- The duty cycle D is defined as D = τ / T = (ON time) / (period) × 100 %.
- The average voltage V_avg delivered to the load equals D × Vₛ.
Common implementations
- Analog (555 timer, op‑amp comparators) – Uses a reference voltage and a timing capacitor to produce a PWM signal.
- Digital (microcontroller timers) – Embedded processors configure hardware timers or use software loops to generate PWM with precise frequency and resolution.
- Switch‑mode power supplies – High‑frequency PWM drives power transistors (MOSFETs, IGBTs) to regulate output voltage or current.
- Audio and communication – PWM can encode audio signals (class‑D amplifiers) or data by varying pulse width.
Typical applications
- Motor speed control – Varying duty cycle adjusts the torque and speed of DC and brushless motors.
- LED dimming – PWM changes the perceived brightness without altering color temperature.
- Power regulation – Converters such as buck, boost, and buck‑boost use PWM to maintain a desired output voltage.
- Signal generation – Generates variable‑frequency waveforms for testing and instrumentation.
Advantages
- High efficiency, as the switching devices spend most of the time either fully on (low conduction loss) or fully off (low switching loss).
- Simple hardware implementation, especially with modern microcontrollers.
- Fine granularity of control; resolution can be increased by raising the timer’s bit depth.
Limitations
- Generates electromagnetic interference (EMI) due to fast edge transitions; requires filtering or shielding in sensitive applications.
- Output contains harmonics at the switching frequency and its multiples, which may necessitate inductive or capacitive filtering to obtain a smooth DC output.
- The achievable frequency is constrained by the switching speed of the power transistors and the timing resolution of the control circuit.
Mathematical representation
For a PWM signal of amplitude Vₛ, period T, and duty cycle D:
$$ V_{\text{avg}} = \frac{1}{T}\int_{0}^{T} v(t),dt = D \cdot V_{s} $$
The fundamental component of the Fourier series of the PWM waveform is at the switching frequency f, with amplitude proportional to D. Harmonic amplitudes decrease with increasing harmonic order, governed by the sinc function of the pulse width.
Historical note
The technique originated in the early development of pulse-code modulation for communication systems and was later adapted for power electronics in the 1960s–1970s, where it became central to the design of efficient variable‑frequency drives and switching regulators.