Switching Amplifier (Class D) Basics
Just today I read on an internet forum a post by a "hot" new manufacturer of class D amplifiers saying that "the only way to solve the interference problem is to put the amplifier in a completely sealed metal enclosure". Apparently they were trying to excuse the fact that their product renders any nearby tuners useless. This begs the question: why didn't they do so then? Answer: because it doesn't help. Of all the electromagnetic emissions produced by switching power amplifiers and supplies, hardly any are radiated directly off the circuit board. Let's get this straight. The wavelength of FM-band signals is 3 meters. Switching amplifiers are notably more compact than that. In order to be capable of radiating appreciably in the FM band, it'll need a little help, and this comes in the form of attached cables.
Enclosing a source of interference without taking further measures against high frequencies getting out of the box through the front door is a complete waste of effort.
Assessing how a device will behave in terms of this interference called "conducted emissions" involves little more than looking at the signal present on the wires attached to it. For qualitative assessment, an oscilloscope goes a long way.
In a switching audio amplifier, the output signal is a low-pass filtered version of the high-powered PWM voltage produced by a switching power stage. The bottom 20kHz of the signal spectrum is the audio signal. The high-frequency portion usually starts at a few 100kHz and consists of the switching frequency along with its harmonics and sidebands. These high-frequency components are a necessary by-product of trying to amplify a continuously variable signal using only two voltages. They need to be removed afterwards because it's only the audio we are interested in. A switching audio amplifier invariably ends in a passive LC filter intended to do just that.
Unfortunately, there's no filter that can totally block parts of the spectrum. Only attenuation is possible. So, the output signal is necessarily accompanied by some remnants of the unwanted high-frequency content of the PWM signal. These remnants are called the residual.
Practical coils and capacitors such as those used in the output filter have an annoying property. Coils have an internal winding capacitance, which appears in parallel with the coil, and capacitors exhibit a series inductance.
For lowish frequencies (say below 10MHz for practical component values and sizes), the coil's rated inductance and the capacitor's rated capacitance proper dominate the equation, and in this frequency range the measured response of the filter tracks the theoretical response very closely. At frequencies well above this range, however, the coil's parallel capacitance will become dominant and further up the capacitor's series inductance will take over too. But wait a minute! This means that at high frequencies the filter becomes a CL high pass filter! Indeed, some not-so-well-designed class D output filters have virtually no attenuation in the 100MHz range.
A look at the output signal clearly shows this. Oscilloscope pictures from typical class D amplifiers (see below) shows a near-sine wave, which is the attenuated fundamental of the switching frequency, with short bursts of HF near the zero crossings. These bursts occur when the power stage switches from one state to the other. This happens rapidly, and the high frequencies generated by this process aren't attenuated very well. Because of this, it makes sense to look at the problem in terms of low and high frequencies separately.
The most common class D output filter is a second order filter. A cut-off frequency of around 30kHz should suffice to cover the audio range with a comfortable margin, but one finds many implementations where it is set at 80kHz or higher. This is done because near the cut-off frequency, the filter response becomes extremely sensitive to the load impedance and you don't want that happening inside the audio band. The problem is readily solved using feedback error control. Many designers opt to forgo this solution either because they lack the math skills to design a feedback loop closing around the filter or because they hold an ideological grudge against any form of feedback (one is tempted to believe the latter follows on from the former). Digitally controlled switching amplifiers (e.g. TI, Pulsus, Apogee, S-Master etc.) are devoid of error control as a matter of course.
(Another reason why digitally controlled open loop amplifiers are so common is that many manufacturers believe the consumer public doesn't care one yip about performance. When performance is truly not an issue, these amplifiers are the cheapest way of getting a recognisable signal into a loudspeaker)
A very obvious consequence of this policy is that the switching frequency gets attenuated commensurately less. A 12dB/oct filter cutting off at 35kHz will provide 40dB of attenuation at the typical switching frequency of 350kHz, but if the filter is set to 80kHz, there's less than 26dB of attenuation. The 350kHz fundamental will appear over 5 times larger in such a design.
The next harmonic of the switching frequency is the 3rd. In a square-wave signal, the 3rd harmonic is already 9.5dB down from the fundamental and the filter will further attenuate it another 19dB so after the filter, it's 28.5dB down from the fundamental. In an ideal world, the oscilloscope graph of the switching residual looks very nearly like a sine wave.
To quote some practical numbers, a 100W/8ohm amplifier with a switching rate of 350kHz and a 2nd order filter cutting off at 35kHz produces a residual of 360mV RMS. The same amplifier with its filter set to cut off at 80kHz produces 1.9Vrms worth of residual. This usually triggers the same three questions.
Question 1: Will it damage my tweeters?
Although this talk is about EMI, this is the first thing people ask when they see the residual on a scope, so I might just as well answer it:
No. We'll follow the above example from the worst case example quoted above: 350kHz and 1.9Vrms. At this frequency an 8-ohm tweeter has an impedance more like 30 ohms, most of which inductive. 1.9V into 30 ohms translates into 63mA RMS. Dissipation happens only in the resistive part of the impedance. For an 8 ohm tweeter this is around 6 ohms, so 6ohms*(63mA)^2=24 milliwatts. This is not enough to fry a fly, let alone a tweeter.
Question 2: Will it cause audible intermodulation artifacts?
Answer: No and no. No, because feeding a loudspeaker frequencies above its acoustic range produces immeasurably low intermodulation artefacts. The diaphragm has to move in order for non-linear effects to play out. No, because you need two to tango, and the only signals around for the carrier to intermodulate with are its sidebands. It follows that any intermodulation effects would coincide with the harmonic distortion components caused by normal distortion mechanisms, which are sure to dominate over any hypothetical speaker-bound carrier demodulation.
Question 3: Will it radiate from my speaker cables?
Answer: Depends. Cables make good antennae inasmuch as their length is comparable to a quarter of the wavelength of the RF signal. A 350kHz carrier has a wavelength of 857 meters (2800ft.). A 5 meter speaker cable will not make an efficient antenna at this frequency. What this means is you're not going to get the FCC on your doorstep to complain about illicit transmissions in the AM band. This does not guarantee your own AM reception won't be compromised, but the neighbours' is OK.
Switching Amplifier (Class D) Basics - page 2
Amplifier Topologies and Low-Frequency EMI Performance
So, although it seems that the effects of the attenuated switching fundamental aren't very severe, different amplifier topologies behave differently with regards to it.
In a half-bridge amplifier, one speaker wire is tied to ground, the other carries the signal. As far as its operation as a transmitting antenna is concerned, the whole speaker cable carries a voltage equal to half the amplifier output voltage. When you measure the field strength at a distance much greater than the distance between the two conductors, the cable looks like a single conductor carrying the voltage averaged between the two conductors. Since one is grounded, that gives us half the signal voltage. We call the voltage measured across the conductors the "differential mode voltage". The average of the two conductor voltages is called the "common mode voltage". The speaker sees the differential mode signal, the other sees the common mode signal.
In products combining this type of amplifier with an AM tuner, compatibility is insured by changing the switching frequency so it doesn't interfere with the station listened to.
In a typical full-bridge design, the load is tied between two switching amplifiers switching in tandem, but in opposite phase. The two outputs are exact mirror images. For the same output power, the power supply voltage is halved, but of course the load sees "twice half the voltage" for the same net outcome. As far as the speaker is concerned, there is no change. As far as the transmission of RF is concerned though, the situation is markedly different. Since the two conductors carry exact mirror-image signals, the common mode voltage is zero. Ideally, the switching frequency should not radiate off the speaker cables in this manner. Certainly at frequencies as low as 350kHz, this is pretty much the case.
Class "BD" or three-level modulation is a full bridge scheme whereby the two amplifiers have separate PWM signals with the audio signal modulated in opposite phase while the carriers themselves are in phase. With no audio applied, the two speaker terminals carry the same signal and the voltage measured across them is zero, regardless of the filter cut-off frequency. When audio is applied, a differential residual does appear, but it is halved in amplitude and doubled in frequency compared to a normal 2-level design. In principle this permits significant savings in the output filter. Manufacturers like TI take the idea as far as to omit the output filter altogether. Unfortunately this has the full switching waveform riding on the two speaker wires, so this is not an option unless the amplifier and the speaker are in one box. Typically though (for various reasons), the amplifier is equipped with two separate LC filters, one for each side. The speaker sees very little residual (none at all when there is no signal) but the common mode voltage is as large as in the half bridge case.
Another variation is that used by Apogee in their DDX chips. While most amps run their power stages at 50% duty cycle when no audio is present, a DDX amplifier is a full bridge amplifier that keeps both power stages running close to 0% duty cycle. The differential mode cancellation follows similarly to class BD, but additionally the common mode residual is significantly reduced as well. Practical realisation has required some compromising with the concept in order to mitigate distortion problems that would result from a direct implementation of the basic idea.
Editors Note: Price point and the pervasive attitude that the public does not care play a real role here. One designer from a chip house noted that many audio manufacturers only real concern was price point, not performance.
All other work aimed at reducing the residual has been concentrated on the output filter. Indeed, if fiddling with the modulation scheme always results in added complexity, performance loss or both, the only other station to work on is the output filter itself. The obvious thing to do is to change the output filter to a 4th order circuit. While this does render the residual all but negligible, its frequency response becomes even more sensitive to the attached load. One method, once again, is to design a control loop that includes the entire output filter. This is not trivial, but feasible it is. Another train of thought is to set the cut-off frequency even higher up, but to introduce a zero (adding a capacitor in parallel to the second coil) at the switching frequency. This requires operating the amplifier at a precisely fixed switching frequency, a choice which significantly reduces the amount of loop gain available for error correction.
So far we've seen that the fundamental of the switching residual (the bit that looks like a sine wave) normally encountered in class D amplifiers are not an issue as far as the speaker is concerned. We've also seen that its EMI effects are mild on account of the speaker cables being short compared to the wavelength and that several workarounds are available if compatibility with nearby AM receivers is important. From now on however, things will become positively ugly. Having discussed how different styles of amplifiers behave with respect to the fundamental (and possibly the first few harmonics) of the switching frequency, it is time to turn to the higher frequencies.
Amplifier Implementation and High-Frequency EMI Performance
At these frequencies, there are no mathematical tricks to minimise the problem. The designer has to insure as little as possible high-frequency energy is generated and as much as possible is stopped leaving the amplifier. Only diligent work on the hardware will do.
I noted earlier that output filters don't do much at 100MHz. That is to say, the output coil has turned itself into a capacitor and the output capacitor has become inductive. The only way around is to reduce these parasitic components. It turns out to be more fun, though, to discuss the ways some manufacturers manage to actually increase them.
Toroidal inductors : Toroids are said to have no stray field, because each winding's stray field is cancelled by that of all the other aggregated windings. That's fine as long as the windings are evenly distributed along the circumference. The need for getting wires to and from it makes a gap necessary, as does the mounting clip. There goes the nice theory. Also, the winding also forms one large parasitic winding along with the toroidal choke. Fancy that, sending the output current from the switching power stage around a 1" loop? I thought not. Note the latter problem is mitigated by laying the toroidal inductor flat on the PCB with ground plane underneath it.
But I'm digressing. We were talking about parasitic parallel capacitance. The toroidal core, although said to be resistive, is fairly conductive, and helps to capacitively couple all windings together. If there were means to ground it, the core would actually be a bonus, but there isn't, so it isn't.
If you see toroids in the output filter, shudder. If it's mounted upright, shudder once more.
Wire wound inductors with multiple layers of windings . A space-efficient way of winding a ferrite core is to layer windings on top of each other. First, you wind n/2 turns going from left to right, and then you proceed back from right to left with the remaining n/2. The first and last windings of the coil end up on top of each other and are free to couple capacitively.
Large "audiophile" axial capacitors: . Some of these are sold as "low inductance" or even "non-inductive", but be not fooled. Apart from ye ole polystyrene caps, all film caps have schoopered (metal-sprayed) end contacts, shorting out all windings. Their inductance is dictated only by size. Some figures: a standard 0.2" pitch MKT: 5nH. A 1.5"x0.6" round axial cap: 20nH. Just putting one of these in an output filter increases conducted emissions by a minimum of 12dB compared to a humble MKT. If you see a large axially mounted cap in the output filter: groan in despair.
Kinked leads : Resin dipped capacitors sometimes have kinked leads to prevent the resin from cracking while mounting. This spaces the capacitor up to 1/8" off the board. The area between the circuit traces and the capacitor body constitutes a loop and hence a significant inductance.
Plastic encased film caps : The condenser element is usually a lot smaller than the plastic pot. It's placed upside down in the pot, which is then filled up with epoxy resin. The result is identical to the kinked leads case. There are exceptions though, but not many designers open their capacitors to see what they look like on the inside.
Even with the best filter components, there are several more ways to burn the pudding.
Ringing : The voltage on the power stage should stabilise immediately after each switching edge. Ringing corresponds to an enormous boost in emissions that even the best output filter can't block. When left unchecked, the parasitic circuit elements present in all power components will produce up to 50% overshoot and ringing that can last up to a microsecond. As luck will have it, this ringing is usually smack in the middle of the FM band. Getting a nice, clean ringing-free square wave requires detailed attention to gate control, circuit layout and damping. Too many designers think that a high-speed H-bridge driver and four MOSFETs is all one needs to build an amplifier. It's all you need to build a radio transmitter, so much is certain. If you see a gate driver capable of running a 10kW UPS, chuckle.
Connectors Everywhere : A switching amplifier has large, very high frequency currents flowing through the ground plane. The inductance of the ground plane at these frequencies allows fairly large voltage differences to appear as measured from one end of the board to the other. If both ends spout wires, you get a nice dipole with a voltage source in the middle. If you see a circuit board with connectors on either end: duck!
Bits of Copper Plane Everywhere : A singularly grisly sight is a circuit board with separate bits of copper plane floating around. Clearly the designer has been grappling with an array of low-frequency and high-frequency problems without understanding either. A good circuit layout can be recognised as having one contiguous ground plane covering the whole board, with no breaks, slots or traces through it (short jumps of less than ½"are usually permissible) and with all cables emanating from one compact area or one edge of the circuit board. If you see a circuit board with the ground plane seemingly blown to smithereens: contact service for a repair.
Star grounding : Star grounding is a common method to prevent common-impedance cross talk in circuits that use ground as the signal reference. This trick works well up to a few 100Hz, and is generally not well understood. Every now and then, an amplifier pops up that has its output filter laid out in "star" style, because the designer learned at school there's something good (teacher hums approvingly) about star schemes. Utterly wrong of course… at the kind of frequencies present, the connections going to and from the star ground represent impedances higher than those of the components they connect.
The following scope images illustrate the point.
Amplifier A is an amplifier rated as 160W/8ohm. The circuit boards have Upright Toroids, Resin-Potted Filter Caps, Connectors Everywhere and Bits of Copper Plane Everywhere. Amplifier B is an amplifier rated as 400W/4ohm. The circuit board has one ground plane, resin-dipped caps with straight leads and a tape-wound ferrite inductor.
Image 1: Amplifier A, Differential Mode. 500us/div, 200mV/div.
Image 2: Amplifier A, Common Mode. 500us/div, 1V/div.
The amplifier is a full bridge. Note that the switching fundamental cancels neatly from the common mode output, the high frequencies do not. This is because it is impossible to match all parasitic circuit elements acting at this frequency. The surprising bit is that the common mode RFI is several factors larger than the differential mode RFI, although the output filter has grounded caps. This is caused by the "connectors everywhere" problem. The common mode RFI corresponds to the voltage developed across the "ground plane" of the board.
Even when the amplifier had nothing but the mains cable attached, my lab radio went totally dead. It's located 15ft away from my test bench.
Image 3: Amplifier B, Differential Mode. 500us/div, 200mV/div.
Only two small "blips" are visible, with no resonances. Amplifiers similar to this one are used inside "all-included" 6-channel home theatre sets with built in FM/AM tuner without further shielding. The FM antenna supplied with the set is a 2.5ft piece of wire that usually dangles off the back of the box parallel to the speaker wires. During AM reception, the frequency-shift trick is used.
This amplifier is single-ended, so the common mode plot looks precisely the same as the differential-mode plot, only halved in amplitude.
Next time you hear someone claim you need to put a switching amplifier in a metal box to keep it from radiating: change channels.
Article Addendum on Radiated Emissions 03/08/06
To say that class D amplifiers can't radiate directly from the circuit board is a slight oversimplification. Unfortunate choices of switching components and drive circuits can lead to spectral output into the GHz range, which will readily emit from the smallest of circuit boards. Once this happens, the only solution is shielding in combination with filtering on all incoming and outgoing wires. In some types of equipment such measures are unavoidable but a well-designed class D amplifier should not fall into this category.