I am working on a 140W class D amplifier for my subwoofer. I am familiar with its topology but have few questions.

The music source is a radio that ouputs 200mV peak-to-peak signal containing all frequencies (there arent seperate outputs for subwoofers and other speakers).

I have it currently set up like this:

source->op-amp preamplifier->ADC->microcontroller PWM signal out->H-bridge + LPF

1) Since this is an amplifier only for a subwoofer it only plays on frequencies from 20-200Hz. Do I need a LP/Bandpass filter:

  • Before the preamplifier
  • After the preamplifier
  • Or should I design LPF for H-bridge with cut-off frequency at 200Hz
  • Something else?

2) Microcontroller PWM signal will have a frequency from 30-50kHz. How should I go about designg LPF for H-bridge considering the speaker will play only frequencies to 200Hz?

  • \$\begingroup\$ Build the LP filter into the preamp? \$\endgroup\$ – Majenko Dec 21 '14 at 21:48
  • \$\begingroup\$ Don't say your sampling frequency, but do it in software? \$\endgroup\$ – Matt Young Dec 21 '14 at 22:14

The two LPF stages you mention in your question - the 200 Hz crossover, and the output filter after the H bridge - serve different purposes, which should be distinguished from each other, you should avoid the temptation to 'compound' these into 1 by just making an output LPF with a cutoff frequency of 200 Hz. Let me explain why:

The 200 Hz low pass crossover filter serves the purpose of removing higher frequency audio content which your woofer cannot reproduce from your signal, and when used in combination with mid-high speakers with a corresponding high pass crossover filter, provides controlled transition between the frequency regions covered by the woofer and the mid-high speakers. The old-fashioned solution is a passive crossover, which sits in between the amplification stage and the loudspeaker and is made using large, high-power filter components, and in order to work properly the crossover needs to be incorporated in conjunction with a Zobel network - a further set of components which aim to compensate the frequency-dependent reactive part of the impedance and make the speaker appear as if it is a resistive load to the passive crossover - this is important for a controlled filter response, as a passive filter is loaded by the impedance attached to it which affects its response. The easy modern solution common in systems such as active speakers is an active crossover somewhere in the small-signal stage (prior to the amplification). As mentioned in the comment by @Majenko, a good option is to build this low-pass into the preamp, it can also come just after depending on your preamp circuit. I would not recommend having the low pass before the preamp, as for a good signal-to-noise ratio it is typically better to gain then attenuate, not the other way round, and also as a well-behaved audio input circuit has a high input impedance (e.g. 10 kOhm) which is flat within the audio band - something that a preamp circuit can provide but that a passive low pass on the input would not. You may also want to have a high pass here to block DC and very low frequencies.

The output filter after the H bridge, on the other side, serves the purpose of removing the switching frequency and all the PWM content, leaving just the desired signal. There is no choice other than to make an output filter passive - it has to appear after the switching stage, which means large filter components must be used, and it means that the filter is prone to the same loading problems as mentioned above for the passive crossovers. This is one common issue in Class D amplifier design - different loads cause different responses in the output filter, the unloaded filter has a sharp resonant peak which drops when the load impedance decreases, eventually reaching a point if the load impedance is very low when the transition between the filter passband and roll-off is so gradual that the frequency response in the desired range is affected - this is remedied in several architectures which use negative feedback after the output filter.

The load-dependence of the output filter is not such a problem if you ensure that the filter cutoff frequency is significantly higher than the highest frequency in the signal you are reproducing - this way, the filter won't affect the frequency response in your range of interest very much. So here is one immediate reason not to use your output filter as the crossover - otherwise, your PWM output will be reproducing higher frequency content in your signal which you will attempt to filter away with your output filter, which won't result in a controlled filter response - not only this, but you should not allow your PWM stage to output any signal at or near the filter resonance frequency, as at resonance the output filter (especially when unloaded) will present a very low impedance to the H bridge, and will draw high currents - potentially either blowing up your amp or engaging your overcurrent protection circuitry, if this is present.

Don't forget that the output filter cutoff frequency must also be significantly lower than the switching frequency to be effective. A general guideline to start you off is have the cutoff frequency about 10x (or more) lower than the switching frequency, (giving 20 dB attenuation at the switching frequency), and about 2x (or more) higher than the highest frequency in your signal. Applying this confines your output filter cutoff frequency to somewhere between 400 Hz - 3 kHz, which is plenty of room for play, quite a bit less confining than the typcal full-range audio Class D application. I would suggest you try to go for lower rather than higher within this little window, or as low as is practical given any restrictions on component size / price you have. This is because you don't need to go too much higher than 2x the maximum signal frequency for the load dependence to be negligible (provided that the characteristic impedance of your LC filer is not too high compared to the load), whereas the more attenuation you get at the switching frequency the better.

Hope this helps!


You need an antialiasing filter in front of your ADC. The filter gets more complex depending on how close to half the sampling frequency you get. For example, if you are sampling at 10kHz or 44kHz, the filter for a bandwidth of 200Hz is easy. If you're sampling at 500Hz it will not be so easy. This can be an active filter, but it must be an analog filter. Once the signal is digitized it's too late to prevent aliasing.

You would normally also have a passive LPF on the output of the H-bridge, otherwise you'd be transmitting a lot of EMI all over the place. A high PWM frequency means the filter can be simpler and use less expensive and bulky parts. It's preferable to keep the PWM frequency above the audible range so the inductors etc. don't 'sing' at the carrier frequency, so maybe 25-50kHz.

  • \$\begingroup\$ ADC sampling frequency will be around 44kHz. I am also thinking of using the same frequency for PWM output. Is this correct? Antialiasing filter at this frequency can be a simple LPF, right? Whe you said 25-50kHz, you meant to design a LPF with cut off frequency at 25-50kHz? Thanks for your feedback! \$\endgroup\$ – Golaž Dec 21 '14 at 22:53
  • 1
    \$\begingroup\$ The low pass filters can be considerably less than the sample/PWM frequency. The antialiasing filter has to attenuate all the content above 22kHz so it's negligible and not affect the 200Hz too much. Not too demanding. \$\endgroup\$ – Spehro Pefhany Dec 21 '14 at 23:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.