← Labs 14

Class-D Amplifier You Can Hear

Power electronics

A comparator turns the audio and a triangle carrier into a two-level PWM wave, a half-bridge switches it, and a Butterworth LCLC filter with fc=1/(2πLC)f_c=1/(2\pi\sqrt{LC}) recovers the audio. The filter gain at the audio and carrier frequencies is computed live, and Listen plays the actual signal, so the carrier whine is audible when the filter fails to remove it.

live circuit · mode=full audible carrier whine
Class-D Amplifier You Can Hear11 components and 12 connections.AUDaudioTRIcarrierCMPPWMgswbridgeBRIDGEbridgeLFLVOvoCFCSPKspeakerGNDS0 VRTNreturnGND0 V
Class-D Amplifier You Can Hear

Drag a value tag to change that part. Click a wire to clip a probe on.

Probes
Listen · plays sound

The carrier is slowed into earshot; real amplifiers switch at hundreds of kilohertz.

causal signal trace paused

Compare audio with the carrier The comparator outputs high while the audio exceeds the triangle carrier, so the duty cycle follows the audio.

step 1 / 4 Compare audio with the carrier

Notebook · 11 parts · 12 wires · natural-sampling PWM + 2nd-order LC filter

recommended lab 17 of 18

Place an LC cutoff between the audio band and the PWM carrier.

Builds on: Closed-Loop Buck Converter

predict · then test

You double the filter capacitance CC. What happens to the carrier residual at the speaker?

Commit before the explanation appears. This is a prediction, not a quiz score.

governing model
∣H(f)∣=1(1−r2)2+2r2,  r=ffc  ⋅  fc=12πLC|H(f)| = \dfrac{1}{\sqrt{(1 - r^2)^2 + 2r^2}},\; r = \dfrac{f}{f_c} \;\cdot\; f_c = \dfrac{1}{2\pi\sqrt{LC}}
structural inventory
  • audio + triangle carrier
  • PWM comparator
  • half-bridge switch
  • LCLC filter + speaker
boundaries
  • audio 100 Hz100\ \mathrm{Hz}–2 kHz2\ \mathrm{kHz}
  • carrier 44–20 kHz20\ \mathrm{kHz} (slowed into earshot)
  • fc:0.5f_c: 0.5–50 kHz50\ \mathrm{kHz}
diagnosis challenge Fault identity withheld: infer it from the changed outputs first.