Overview
Class D amplifiers use pulse-width modulation (PWM) switching to drive speakers with high efficiency. A side effect of this topology is that the output stage can pass residual high-frequency switching noise to the speaker — audible as a high-pitched whine or squeal. This article explains how to identify the source of the noise using an oscilloscope, calculate the correct output filter capacitor to attenuate it, and verify the fix.
Why Class D Amplifiers Produce Output Noise
Class D amplifiers work by switching output transistors on and off at a high carrier frequency — typically in the range of 20 kHz to several hundred kHz — and using a low-pass filter on the output to reconstruct the audio waveform. The output filter (typically an LC network consisting of inductors/chokes and capacitors) is designed to attenuate the switching frequency and its harmonics before they reach the speaker.
However, in some conditions the factory output filter may be insufficient:
- Operating voltage beyond design spec — Amplifiers designed for 200–270V DC input may exhibit increased switching noise artifacts when run at significantly higher voltages (e.g., 400V), stressing filter components beyond their intended operating point.
- Component tolerances — Factory filter values are chosen for typical operating conditions. Edge cases may require additional filtering.
- Parasitic resonances — At high voltages, parasitic inductance and capacitance in PCB traces can create resonant conditions that allow sub-harmonic noise to pass through the output filter. The result is a spurious AC signal superimposed on the speaker output — audible as a whine, squeal, or buzz at a frequency well within the audible range (typically 1 kHz–20 kHz).
Step 1: Identify the Noise Frequency with an Oscilloscope
Before calculating a fix, you need to characterize the noise signal at the amplifier's speaker output terminals. Connect an oscilloscope across the speaker output leads (with no audio signal playing).
Look for two types of signals:
| Signal | Typical Frequency | Audibility |
|---|---|---|
| PWM carrier / switching frequency | 20 kHz – 1 MHz+ | Generally inaudible |
| Sub-harmonic ripple / parasitic oscillation | 5 kHz – 15 kHz | Audible — this is the target |
Record the following values from the oscilloscope for the audible noise component:
- Frequency (f) — e.g., 8,740 Hz
- Peak-to-peak voltage (V_pp) — e.g., 9 V p-p
- RMS voltage (V_rms) — e.g., 2.1 V RMS
- Speaker load impedance (R) — e.g., 2 Ω
Example: In a 400V high-voltage build running Stetsom-style amplifiers, oscilloscope measurement revealed a 8.74 kHz spurious signal at 5.5 V peak / 2.1 V RMS on a 2 Ω load — clearly audible through the subwoofers.
Step 2: Calculate the Required Filter Capacitor
To attenuate the noise, a capacitor is placed directly across the speaker output terminals. The capacitor presents a low impedance path to the high-frequency noise, shunting it away from the speaker, while passing the audio-frequency signal with minimal effect.
Calculate the Noise Current
Using the speaker load impedance and the noise voltage:
I = V_rms / R
Because we are working with AC (not DC), use half the RMS voltage as a conservative working value:
I_working = (V_rms / 2) / R
Example:
I_working = (2.4 V / 2) / 2 Ω = 0.6 A
Calculate the Required Capacitance
Use the following formula relating capacitance, frequency, current, and voltage:
C = I / (2π × f × V_pp)
Where:
- C = capacitance in Farads
- I = noise current (A)
- f = noise frequency (Hz)
- V_pp = peak-to-peak noise voltage (V) Example:
C = 0.6 / (2π × 8,740 × 9)
C ≈ 1.2 × 10⁻⁶ F
C ≈ 4 µF (rounding up conservatively)
Design note: It is intentional to be conservative — use the minimum capacitance that eliminates the audible noise. An oversized capacitor will begin to attenuate audio-frequency content, rolling off the high end of the music signal. Start at the calculated value and increase only if needed.
Step 3: Select the Correct Capacitor
Capacitance Value
Use the calculated value from Step 2. If a single capacitor of that value is not available, multiple capacitors can be connected in parallel — their capacitances add directly.
Example: Four 1 µF capacitors in parallel = 4 µF total.
Voltage Rating
The capacitor voltage rating must exceed the peak output voltage of the amplifier at full power, with margin. For high-voltage amplifier builds:
- Standard 12V car audio builds: 50–100V rated capacitors are typically sufficient.
- High-voltage builds (200V–400V bus): Use capacitors rated at or above the bus voltage (e.g., 400V-rated film capacitors).
Capacitor Type
Use film capacitors (polyester, polypropylene) rather than electrolytic capacitors for this application:
- Film capacitors are non-polarized — safe to use across an AC-swinging speaker output.
- They have low equivalent series resistance (ESR) at high frequencies, making them effective at shunting HF noise.
- They are available in high voltage ratings suitable for high-voltage builds. Electrolytic capacitors are polarized and must not be used directly across a speaker output.
Step 4: Install and Verify
Installation
Connect the capacitor(s) directly across the amplifier's speaker output terminals — positive speaker terminal to one lead, negative speaker terminal to the other. For film capacitors, polarity does not matter.
If building a multi-capacitor array:
- Connect capacitors in parallel (all positives together, all negatives together).
- Secure with appropriate insulation — electronic-grade silicone and liquid electrical tape work well for a temporary or semi-permanent installation.
- Ensure the assembly cannot contact other conductors or move under vibration.
Verification
With the capacitor installed:
- Oscilloscope check — Reconnect the oscilloscope to the speaker output. The spurious noise waveform should be significantly reduced or eliminated.
- Listening check — Power on the amplifier with no audio signal. The audible whine should be gone or inaudible.
- Music playback — Play audio through the system and verify that the high-frequency content of music is not noticeably affected. If the sound seems dull or rolled off, the capacitance value may be too large — reduce it.
Important Considerations
This Is a Supplemental Fix, Not a Replacement for Proper Design
Class D amplifiers include output filters from the factory for exactly this reason. If the factory filter is insufficient for your operating conditions, the root cause is typically that the amplifier is being operated outside its design envelope (e.g., higher bus voltage, higher power levels, or different load impedances than intended). Adding an external output capacitor is a practical workaround, but the correct long-term solution is an amplifier designed for the actual operating conditions.
Do Not Use Electrolytic Capacitors Across Speaker Outputs
Electrolytic capacitors are polarized. The speaker output of a Class D amplifier swings both positive and negative relative to ground. Using a polarized capacitor here will result in capacitor failure and potential damage to the amplifier.
High-Voltage Builds Require High-Voltage Rated Components
If your amplifier is running from a high-voltage bus (200V+), standard low-voltage capacitors are not safe for this application. Always use capacitors with a voltage rating that exceeds the peak output swing of the amplifier.