Reducing EMI from Class D Amps - Page 1
Forum section: electronics / projects

author: gnuarm
author_rank: Super Contributor
timestamp: March 07, 2021, 09:10:05 pm
content: I'm designing a class D audio amp and the output filter seems to be a bit tricky. I've no experience with this. I picked ferrites that have high resistance at 100 MHz (~1k ohms) and am looking at adding caps to add to the roll off. But the interaction between the cap and the inductance of the ferrite is problematic giving a resonance around 1 MHz depending on exact values. Smaller values of capacitance eliminate the peak, but the corner frequency moves upward quickly.The amp switching rate is around 250 kHz (depending on exactly where I set it). I know the speaker will just integrate the impulses. I am concerned with EMC issues. If the output filter doesn't begin to attenuate until over 1 MHz, it seems like there will be a bunch of noise in that band between the switching rate and the filter reaching an effective attenuation.Is this not a problem because these wavelengths don't radiate as effectively? The entire design will be in metal enclosure but with large openings, a five inch circle (12.5 cm) including the speaker. My understanding is the enclosure will leak frequencies that can physically fit the openings, so 1-10 MHz is too large to get out through a 5 inch opening. Or is that not an accurate view of the matter?The speaker is modeled as a 1 uH inductor with 50 ohms in series. I might have details on the actual speaker model next week.

author: nctnico
author_rank: Super Contributor
timestamp: March 07, 2021, 09:29:23 pm
content: In the past I have used a common mode filter on the output of a class D amplifier after an (IIRC LC) filter to turn the pulses into a signal. Ferrite beads are likely not going to help because they are too small; you'll need inductors capable of carrying some amount of current.

author: gnuarm
author_rank: Super Contributor
timestamp: March 07, 2021, 11:46:24 pm
content: Not following you. The ferrite beads I've picked are more than adequate for the current. With a switching rate of 250 kHz the actual speaker signal does not need to be integrated by a low pass filter. The speaker will handle that by responding to the average of the impulses. I'm just trying to prevent sharp edges from causing emissions. This rate is only half of what the 7.5 V switcher is running at. I'm not excited by the noise it generates either, but it's not on my board so not my problem.

author: srb1954
author_rank: Super Contributor
timestamp: March 08, 2021, 12:20:02 am
content: Quote from: gnuarm on March 07, 2021, 09:10:05 pmGenerally in designing an LC filter you end up with the impedances of the filter components being around the same order of magnitude as the load impedance at the filter cut-off frequency. Using a higher inductance and a lower capacitance you will tend to get a higher Q resonant circuit that isn't damped down so much by the load impedance. You could try using smaller value inductors and larger capacitors to tame the resonant peak. The best way would be to model the filter in SPICE so you can easily optimise the parameters. You can obtain SPICE suitable models for small inductors and ferrite beads fairly easily these days.The important thing to consider when evaluating EMC filtering is required is not so much the switching rate of the class-D amp but the edge rate of the signals coming out of the chip. For a high-speed switcher you might expect those times to be in the range of a few tens on nanoseconds which implies significant harmonic content out to more than 20MHz.Do you have a spec for the rise and fall times of these signals or have you made measurements on these times? Either way you will need to incorporate those figures into the SPICE simulation to accurately determine the effectiveness of the EMC filtering.

author: gnuarm
author_rank: Super Contributor
timestamp: March 08, 2021, 02:38:27 am
content: Quote from: srb1954 on March 08, 2021, 12:20:02 amYes, that's what I'm doing, simulating. I have no hardware as yet. I've tried increasing the capacitance which leads to the resonance peak. Lower capacitance gets rid of it. Isn't that reversed from what you are saying?Actually, I've changed to viewing the simulation differentially rather than single ended and the resonance peak is not so abrupt and not so large. Overall this is looking pretty good.QuoteYes, I'm aware of the significance of edge rate... but, the higher harmonics are filtered fairly well. So the details of edge rate are not so significant. Actually, the simulation uses an AC voltage source which is plotting the frequency response of the filter and load rather than modeling the full circuit including the driver. The harmonics are not going to be higher amplitude than the fundamental. At least I've never seen that in an analysis. Anyway, I've done a transient analysis and FFT'd the speaker current. Looks pretty good, -20 dB per decade which is what is expected using a 1 uF cap on each speaker leg to ground. The other response may have been with a differential cap, not sure.QuoteWhile you are right in that measuring the harmonic content source has to be factored in to know the frequency content of the signal in the speaker, the filter response is from the filter alone. The harmonics are lower than the fundamental for a square wave. In any regard the transient analysis uses 10 ns edges, so realistic. What I'm unclear about is what dB means when measuring current. Not sure what it means with a voltage probe either, I mean what the reference is. I'm sure somewhere in the bazillion pages of docs it says something somewhere.I don't have a simulation model for this driver, but I have asked if they can provide one. I saw in their forum that someone expressed an interest in an unencrypted model. Six months later he asked again and they had it. Maybe they will actually communicate with me on this rather than my having to ping them every day. lolOn Semi seems to do a good job of having simulation models and making them easy enough to find. I wish everyone was like that. They have models for internal use, but don't release them because they reveal confidential info. Still, I'm really just trying to consider the filter for now.

author: penfold
author_rank: Frequent Contributor
timestamp: March 08, 2021, 03:26:36 am
content: Will the body of the speaker be metallic and earthed to the chassis? If so, the capacitance of the voice-coil to the body could form a nasty common mode current path. Some estimation of that capacitance could give a nice analytical basis on selecting a value of common mode filter/choke

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 08, 2021, 05:08:21 am
content: Hmm let's see, what's the question? EMC? Ah, yes.And what is the first thing we consider, when investigating EMC?The system!We can discuss vague generalities, but without a circuit, layout and mechanical assembly -- there's really not much we can talk about.Regarding ferrite beads:They're rated for the current, sure. That's a thermal ratingonly. Says nothing about saturation -- a typical 1kΩ 1206 saturates (-30% impedance) by perhaps 50mA. Unless this is a cell phone speaker, I'm guessing that's not going to be sufficient.Regarding filters:Same thing as ever, design for required cutoff frequency and characteristic impedance. Mind the source and load impedances. In this case, the source will be very low (practically zero), and the load will be strongly inductive (at relevant frequencies). We need to provide our own termination, i.e., an R+C or R||L somewhere, most likely.Regarding filtering, and DM/CM:Switching noise from an H-bridge type class D amp (if this is even the type being looked at!?) should be predominantly DM, but some CM residual remains, particularly at very high frequencies (i.e. mismatch in edge timing and slope). We might treat each individually, or both at once. Mind, the impedances are very different: DM has the speaker as load, CM has its capacitance to ground (or surroundings, if the basket, enclosure, etc. is not grounded). So, if we aren't using normal mode filters (i.e., an LC from each amp pin, to output, to ground), we must design according to that (i.e., perhaps using DM or NM chokes from the amp, then a C || (R+C) between the outputs, then a nice lossy CMC from the outputs to the speaker).We can choose a filter with a cutoff above Fsw, but mind that all the reactive power handled by that filter, includes whatever harmonics and sidebands land on top of the transition band. So, if we have a 250kHz amp, the second harmonic at 500kHz (contingent on input signal -- manifests as DSB-SC I think??*) or the third at 750kHz (always present) would be poor choices for a cutoff frequency. Likely we would want to go to some MHz, and choose a relatively high Zo so as to draw less circulating current from the amplifier. (The higher Zo won't have much effect on the fundamental or load, as the inductor facing the amp will be relatively small in reactance, at those frequencies, as compared with R_L.) This allows us to knock down the highest trash (10s, 100s MHz), which helps for radiated, and we shouldn't have to worry about conducted if the route is shielded or enclosed, or at least not routed to arbitrary external wiring blocks.*I forget if the sidebands are double wide as well?Tim

author: gnuarm
author_rank: Super Contributor
timestamp: March 08, 2021, 08:26:02 am
content: Quote from: T3sl4co1l on March 08, 2021, 05:08:21 amTo be clear of what you are saying, a ferrite bead that is rated for 2 amps is going to saturate at some mA of current??? If that is so, what exactly is the current rating? The current it can handle without catching fire?QuoteSorry, not following you on that. Are you saying it needs to have other components added to the LC and speaker?QuoteI'm not sure how a full bridge is used for a typical class D amp, this device uses each half bridge separately as controlled by the mode pin. When Mode is high the P output will be pulsed high while the N output is held low I believe. They don't state this explicitly, but they do indicate the Mode control flips the polarity with just one output changing level. So the zero level would have no pulsing rather than using the full bridge with 50/50 duty cycle pulsing in each direction.QuoteThanks

author: srb1954
author_rank: Super Contributor
timestamp: March 08, 2021, 08:51:25 am
content: Quote from: gnuarm on March 08, 2021, 02:38:27 amIf you are investigating EMC you definitely have to consider the higher harmonics, even those of a relatively low frequency fundamental signal. While the harmonics may be lower amplitude than the fundamental the radiation of the harmonics becomes enormously greater at the higher frequencies, more than countering the lower amplitude of the harmonic components in the original signal.In my experience measuring EMC for microprocessor systems I would typically find that harmonics at 10 to 50 times the fundamental clock signals were the most prominent emissions and the most difficult to deal with.

author: jonpaul
author_rank: Super Contributor
timestamp: March 08, 2021, 09:21:03 am
content: gnuarm Bravo for your Class D design.EMI is hard to accurately simulate.Production Class D require EMI filters on the output to reduce conducted and radiated EMI by the speaker wires, voice coil, etc.A metal enclosure can serve as a shield only if it has no gaps or holes, a Faraday shield.Since hard switching implies very face edges, one philosophy is to choose a switching topology such as resonant mode of soft switching that does not have sharp transitions.PCB layout, choice of capacitors and inductors and diver speed have effects on the EMI.Ferrite beads are generally an open magnetic circuit with large airgap, so saturati9on is normally not an issue.Finally the regulatory and bands are from 150 kHz or 500 kHz and up, depending on the country and type of equipment.Hope this is of use,Bon Courage!Jon

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 08, 2021, 09:27:31 am
content: Quote from: gnuarm on March 08, 2021, 08:26:02 amYes, like I said, thermal rating. Again, best I can give is vague general advice -- if you have a particular part in mind, we can look it up (if it gives characteristics at all, or compare similar parts that do). Maybe it's a few hundred mA, maybe you had one of those multi-hole chokes in mind (that actually perform pretty well under bias), I have no idea.QuoteMost likely. If the ferrite bead holds out, then maybe its internal resistance will do. With inductors proper, they are needed.Some combination of L || R, or L + (L||R), or R+C, or C || (R+C), for the series and shunt elements respectively, is typically what's done.It is impossible to filter without a well defined resistance somewhere. As I noted, the circuit is most likely shorted at one port (essentially Rds(on) of the amp) and open at the other (high inductance), you can't build a filter to that (but you are welcome to see what happens in SPICE if you try!).QuoteThat sounds really disgusting for an audio amp...Tim

author: gnuarm
author_rank: Super Contributor
timestamp: March 08, 2021, 09:28:07 am
content: Between the harmonics being lower and the filter response the harmonics get down to -67 dB relative to the first at 50x the frequency. The FFT is funny. There is a baseline with the harmonics sticking up. This baseline looks like white noise through the filter wherever that comes from, possibly the AC setting in the signal generators??? Anyway, the baseline seems to fall off at -20 dB per decade and the peaks fall at -40 dB per decade. At some point the peaks are below the baseline. This is an FFT of the speaker current, not an AC response curve. The two are rather different.I don't understand how LTspice is doing some of this.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 08, 2021, 09:29:54 am
content: Can you please just show a schematic already, part numbers, anything? My un-subtle hints have clearly not done any good.Tim

author: gnuarm
author_rank: Super Contributor
timestamp: March 08, 2021, 09:41:59 am
content: Quote from: T3sl4co1l on March 08, 2021, 09:27:31 amBLM41PG102SN1Lhttps://www.murata.com/en-us/products/productdetail?partno=BLM41PG102SN1%23Yeah, I still don't get what "thermal rating" means. If it gets too warm what happens? If it is saturated before reaching that point there's no point in specifying a "thermal" rating.I was following some info on the Murata site and they talk about a line of devices just for class D amps. I didn't see where they were any different really.QuoteI thought with ferrite beads the idea was at higher frequencies it becomes primarily resistive dissipating the energy rather than storing it? That's why I picked a part with a pretty high 100 MHz resistance/impedance.QuoteYeah, you've lost me. Where are these two ports, on the filter?QuoteHow are class D amps supposed to work? Does the PWM reverse direction always rather than simply running unipolar until the signal polarity changes?The waveform being produced is square waves of variable amplitudes and frequencies. Square waves sound like a woodwind. For some reason that is preferred for these tones.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 08, 2021, 10:22:56 am
content: Quote from: gnuarm on March 08, 2021, 09:41:59 amAh yep, no bias characteristic on their SimSurfing thing. The next closest one I see with, is Laird HZ1806K102R-10, which shows a fairly sharp peak in impedance just past 100MHz, and the first three curves are right on top of each other which is encouraging (0, 100 and 250mA), and the next one after that (500mA) is, pretty close to -30% at 100MHz. So that's not bad, for a low power amp at least.Mind, an equivalent inductor would be much smaller, say 1uH at 500mA, can get one of those in 0805 I think, maybe even smaller still? The damping components have to be factored in of course. Eh, using 0402s with it, might get a smaller overall footprint, just barely? Anyway, depends on the network, how much filtering is required and all that.Yeah, thermal -- lots of things are rated that way. It's the AND/OR dichotomy. Legally speaking, a "reasonable person wouldn't expect to think" that so-and-so was inclusive-AND. Well, whether or not that actually happens to be the case... such is the nature of existence in America, the Land of the Asterisk* (and most other places on Earth, so it would seem).*Freedom not included, some charges may apply, etc etc.Type 2 dielectric ceramic capacitors are the same way, capacitance is measured at zero bias, voltage rating is just that, a rating.Inductors too, though they usually give Isat -- but that number could be whatever, it just happens to be convenient when it lands near Imax.QuoteYes, that is correct. Hence, I said "maybe".Whether that's the right resistance, or whether the inductive reactance at lower frequencies, or capacitive reactance at high frequencies (notice how the impedance falls quickly above 200MHz!), causes problems, no idea. Again--can't solve for a network without knowing everything in and around the network.QuoteThe left side and the right side? RS and RL in these,https://rf-tools.com/lc-filter/QuoteWell, you can find many introductions and tutorials with a quick search -- the two most common methods are either straight PWM, or sigma-delta.PWM is taking an input value, comparing it against a high frequency triangle wave, and outputting the comparison. After filtering out the switching waveform, the original input is recovered.Sigma-delta (or DS, I always forget which one is which) is taking a fixed clock rate (sample rate if you will), and depending on an error signal, outputting a 1 or 0 for that period. The error signal, in turn, is the integral of the input minus the output -- hence the integrator's output dithers above and below the threshold for a 0/1 output, averaging the correct value over a long enough period of time, much as PWM does, but with a more arbitrary pulse density sort of modulation, and edges always clock-aligned. (PWM can be clock-aligned if digitally synthesized, or the above analog process is continuous-time.)Both can be modified by current mode control (regulating output current into the filter inductance, to linearize the modulator and to get fast and intrinsic current limiting/protection), voltage feedback (regulating output voltage, to much the same end, and just as a linear audio amp does), and other tricks (e.g., spread spectrum to even out EMI; also, noise shaping for the S-D to increase useful bandwidth).Note that neither of these methods is unique to binary 0/1 switching. We can use any number system that is consistent with overall requirements. A tri-level inverter could output +V, 0 or -V depending on the state of two comparators. Even more generally, we could use an ADC, then output simply the exact voltage closest to the measurement, using a huge array of power supplies. The advantage is, the less inverter ripple we generate, the less we have to filter off -- saving on switching and filtering losses.The approach you described (using an H-bridge to return to zero sometimes, or switch to +/-V other times), is probably not going to be found in general audio (how fast does the +/- decision have to be made -- how much crossover distortion is that going to make?), but it does in fact find use in "true sine wave" mains inverters, where the waveform is highly predictable and consistent (and slow, for that matter), and modest amounts of distortion are acceptable.QuoteCool, but what does that have to do with the choice of amp?Tim

author: Zero999
author_rank: Super Contributor
timestamp: March 08, 2021, 10:23:25 am
content: The thermal rating of the inductor/ferrite, is the point at which it overheats, due to I2R losses. It's normally given as the maximum current rating, on the data sheet, but is lower than the point at which it saturates and the AC impedance/inductance falls. It's a similar principle to the maximum voltage rating of some ceramic capacitors, at which point the dielectric has already saturated and the capacitance a fraction, of that at much lower voltages.Presumably this class D amplifier uses a full bridge, i.e. four switching transistors, per channel, rather than a half? If so, that's good as it avoids the need for a bipolar power supply, or large electrolytic capacitors.How long are the speaker cables? Are they a twisted pair? Is there a screen? Keeping the cables as short as possible and using screened twisted pairs will help a lot to avoid EMC issues.

author: Wolfram
author_rank: Frequent Contributor
timestamp: March 08, 2021, 12:02:19 pm
content: As far as I understand, you plan on feeding the raw 250 kHz PWM signal to the speaker, with some edge rate filtering to reduce EMI. Even if the speaker won't produce much sound at this frequency, there could still be significant voice-coil heating. I've set fire to tweeters by doing exactly this in the past. Depending on the switching voltage amplitude, the modulation scheme and speaker impedance at Fsw, it might work or it might not, at least it needs to be checked carefully.

author: Zero999
author_rank: Super Contributor
timestamp: March 08, 2021, 12:07:09 pm
content: Quote from: Wolfram on March 08, 2021, 12:02:19 pmGenerally the inductance of the voice coil limits the current to a safe level.Are you sure the tweeters you burned were not piezoelectric? That would certainly explain it, as piezo speakers are capacitaive, thus have a lower impedance, at higher frequencies.

author: Wolfram
author_rank: Frequent Contributor
timestamp: March 08, 2021, 12:16:46 pm
content: Quote from: Zero999 on March 08, 2021, 12:07:09 pmThis was a common electrodynamic paper cone tweater, and it caught me by surprise. I just measured a random speaker of roughly the same size, and |Z| was roughly three times Rdc at 250 kHz, with Rac being about twice Rdc (due to eddy current losses in the voice coil and magnet most likely) and the rest being inductance.If connected to a half-bridge amplifier that outputs a 50 % square wave of the full DC bus amplitude at no signal, the voice coil would dissipate significant power. There are full-bridge amplifiers with control schemes where the carrier is suppressed on the output near 0 amplitude (so-called filterless class-D amplifiers), this would certainly help here.

author: nctnico
author_rank: Super Contributor
timestamp: March 08, 2021, 05:06:51 pm
content: I've found this old appnote from Harris which I used 20+ years ago when I designed a class-D amplifier using the HIP4080. It has a large section on output filtering and impedance matching.

author: gnuarm
author_rank: Super Contributor
timestamp: March 08, 2021, 06:57:59 pm
content: The speaker is in the same cabinet as the circuit board. The wires will be about 8 inches and can be whatever form I specify. I was thinking twisted pair, but I wonder if it should be a shielded twisted pair. The cabinet has two large holes in it, one big enough to insert your fist.

author: Zero999
author_rank: Super Contributor
timestamp: March 09, 2021, 01:18:18 pm
content: Quote from: gnuarm on March 08, 2021, 06:57:59 pmUnless this is going to have to pass some tough EMC standard, such as military, I wouldn't worry too much about EMI from the output side, with such short cables. Use a twisted pair and ferrite beads on the output. Presumably the power supply and inputs will be external, i.e. mains and a cable going to a signal source? If so, putting ferrite beads on the input and power supply cables wouldn't hurt either.

author: SilverSolder
author_rank: Super Contributor
timestamp: March 09, 2021, 02:38:08 pm
content: Quote from: nctnico on March 08, 2021, 05:06:51 pmGreat app note.I knew that Class D is not fantastic at higher frequencies, but I never realized that Class D amps can have less THD than Class AB at low frequencies (due to crossover distortion in Class AB). So, for a subwoofer amp, it seems Class D is almost a no-brainer.

author: gnuarm
author_rank: Super Contributor
timestamp: March 10, 2021, 08:16:47 pm
content: I just saw an LT app note on using a switching voltage regulator as a class D driver and they used DC blocking caps to connect the speaker to a virtual ground. Only they used two caps between power and ground. It took me a bit but finally I realized this was to provide a virtual ground that did not "pop" at power on.Not bad!https://www.analog.com/media/en/technical-documentation/data-sheets/3623fa.pdfPage 25