How Class D Amplifiers Use Pulses to Reproduce Audio
In this article
Class D amplifiers, also known as switching amplifiers, achieve high efficiency by using pulse-width modulation (PWM) to represent the audio signal. Instead of continuously varying the output like traditional analog amplifiers, they rapidly switch between fully on and fully off states, creating a train of pulses. This guide explains the step-by-step process of how these pulses are generated, amplified, and filtered to recreate the original audio.
What You'll Need
- A basic understanding of electrical waveforms (sine waves, square waves).
- Familiarity with the concept of duty cycle (the percentage of time a signal is high).
- No special tools or equipment are required; this is a conceptual guide.
Step-by-Step
- Start with the analog audio input. The audio signal (e.g., from a music player) is a low-power, continuously varying voltage that represents sound pressure over time. It is a complex waveform with both positive and negative excursions.
- Generate a high-frequency carrier wave. A local oscillator creates a fixed-frequency waveform, typically a triangle wave or sawtooth wave, ranging from 100 kHz to several megahertz. This is much higher than the audio frequency range (20 Hz–20 kHz). The carrier wave is what the audio signal will be compared against.
- Compare the audio signal with the carrier wave. The audio signal and the carrier wave are fed into a comparator (an operational amplifier without feedback). The comparator outputs a high voltage when the audio signal is greater than the carrier wave, and a low voltage when it is less. This produces a square wave whose duty cycle is proportional to the instantaneous amplitude of the audio signal.
- Result: PWM signal. The output of the comparator is a pulse-width modulated (PWM) signal. When the audio signal is positive, the pulses are wide (high duty cycle); when negative, the pulses are narrow (low duty cycle). At zero crossing, the duty cycle is exactly 50%.
- Amplify the PWM signal. The low-power PWM signal is used to drive a pair of output transistors (typically MOSFETs) that operate as switches. They are either fully on or fully off, never in the linear region. This is the key to high efficiency: switching transistors dissipate very little power compared to linear amplifiers. The amplified PWM signal is now a high-voltage, high-current version of the same pulse train.
- Filter the amplified PWM signal. The output stage is followed by a low-pass filter, usually an LC (inductor-capacitor) network. This filter removes the high-frequency carrier component and passes only the audio frequencies. The average of the PWM pulses over time closely approximates the original audio waveform.
- Output to the speaker. The filtered signal is a high-power replica of the original audio input, now capable of driving a speaker. The speaker cone moves according to the voltage variations, producing sound.
Common Mistakes
- Confusing PWM with PDM: Class D amplifiers can use pulse-width modulation (varying pulse width at a fixed rate) or pulse-density modulation (varying pulse density at a fixed width). Both are used, but PWM is more common in audio.
- Thinking the output is a square wave: The output at the speaker terminals is a filtered analog signal, not a square wave. The square wave exists only inside the amplifier before the filter.
- Assuming the carrier frequency is audible: The carrier is typically above 100 kHz, far beyond human hearing (20 kHz). It is removed by the filter, so it does not affect sound quality.
- Overlooking the need for a dead time: In real amplifiers, a small delay (dead time) is inserted between turning off one transistor and turning on the other to prevent both from conducting simultaneously, which would cause a short circuit and damage the output stage.
Tips
- Efficiency vs. fidelity: Class D amplifiers can achieve 80–90% efficiency, but the filtering and switching introduce slight distortion. High-quality designs use feedback to correct this.
- Use a proper LC filter: The inductor and capacitor values must be chosen to match the speaker impedance and carrier frequency. A poorly designed filter can cause ringing or instability.
- Consider the power supply: Class D amplifiers often use a switching power supply to keep the whole system compact and efficient.
- Look for integrated solutions: Many modern Class D amplifier chips include the comparator, driver, and feedback circuitry in one package, simplifying design.
Troubleshooting
- No sound output: Check the power supply voltage and ensure the input signal is present. Verify the carrier oscillator is running (you can probe the comparator output with an oscilloscope). Check the output filter for broken connections.
- Distorted sound: If the output is clipped, the input signal may be too strong or the power supply voltage too low. If the distortion is only at high frequencies, the filter cutoff may be too low. If it is at low frequencies, the filter may be too small.
- Excessive heat in the output transistors: This usually indicates the transistors are not fully switching (e.g., due to insufficient gate drive) or there is a short circuit. Check the dead time and gate resistors.
- High-frequency whine or noise: This could be due to an inadequate filter or poor PCB layout. Ensure the ground plane is solid and keep the output filter close to the transistors.
- Amplifier oscillates or is unstable: This often occurs with improper feedback compensation or when the output filter interacts with the speaker load. Add a Zobel network (resistor-capacitor in series) across the output.
Frequently Asked Questions
Why are Class D amplifiers called "digital"?
They are often called digital because the output transistors operate in a switching (on/off) mode, which resembles digital logic. However, the input is analog and the PWM process is analog in nature, so they are more accurately described as switching amplifiers.
What is the typical efficiency of a Class D amplifier?
Ideal efficiency is 100%, but practical designs achieve 80–90% at full output. At lower volumes, efficiency drops but remains much higher than Class A (around 20–30%) or Class AB (around 50–60%).
Do Class D amplifiers sound worse than Class A or AB?
Early designs had audible distortion, but modern Class D amplifiers with feedback and high-quality components can match or exceed the sound quality of linear amplifiers. The main advantage is size and efficiency, making them ideal for portable and car audio.
Can a Class D amplifier work without an output filter?
Some designs use a technique called "filterless" operation, where the speaker itself acts as the low-pass filter due to its inductance. This is common in small battery-powered devices, but it requires careful PCB layout and a short speaker wire to avoid EMI.
What is the difference between Class D and Class T?
Class T is a trademarked name for a specific type of Class D amplifier that uses a proprietary modulation technique. It is still fundamentally a switching amplifier, but the control algorithm is optimized for better fidelity.
Why do Class D amplifiers need a dead time?
Dead time prevents both output transistors from being on at the same time during switching transitions. If both are on, a direct short circuit from the power supply to ground occurs, causing excessive current and potentially destroying the transistors.