
Home  Forums  Rules  Articles  The diyAudio Store  Gallery  Blogs  Register  Donations  FAQ  Calendar  Search  Today's Posts  Mark Forums Read  Search 
Class D Switching Power Amplifiers and Power D/A conversion 

Please consider donating to help us continue to serve you.
Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving 

Thread Tools  Search this Thread 
17th February 2015, 01:54 AM  #1 
diyAudio Member

Some rambling calculation on TPA3116/8 filters.
Just banged out some quick Matlab/Octave code for calculating/analyzing output filters.
TI suggests 10uH/680nF for the output filter on the TPA. This gives a corner frequency of 61033Hz. Into a 4 ohm resistive load, Q = 0.522, amplitude response is (freq/dB pairs) 10000 16000 18000 20000 22000 400000 0.19418 0.49194 0.61973 0.76113 0.91564 32.82832 Into an 8 ohm resistive load, Q=1.043, amplitude response is: 10000 16000 18000 20000 22000 400000 0.12466 0.31311 0.39267 0.47952 0.57277 32.55150 Looks like it works for both, but isn't optimized for either. Dips at 4 ohms, peaks at 8 ohms. TI seems to think 32dB @ 400KHz (lowest AMx setting) is OK so let's try to maintain that attenuation for EMI reasons. Optimizing for 4 ohms... First lets set the Q to 0.707 at 4 ohms while keeping the 10uH inductor. This gives a Butterworth response with no peaking. Into 4 ohms, Q=0.707 when C=1.25uF. Nearest C is 1.2uF, using that cap gives Fc=45944Hz, Q=0.692, and the following amplitude response: 10000 16000 18000 20000 22000 400000 0.026809 0.106454 0.155068 0.218920 0.300658 37.50840 Lets try a 1.5uF cap for fun. Q=0.7746, Fc=41094Hz, and the amplitude response is this. There's a very slight inband peak. 10000 16000 18000 20000 22000 0.071075 0.121330 0.119509 0.100384 0.058547 39.45872 In both cases we've got a better inband frequency response than stock, and more attenuation at the 400+ KHz switching frequency... I don't see any reason not use 1.2uF/1.5uF instead of 0.68uF into 4 ohm speakers. For the sake of completeness, 1uF gives Q=0.63246, Fc=50329 and: 10000 16000 18000 20000 22000 400000 0.091524 0.256116 0.335508 0.429272 0.538647 36.044916 Next lets optimize for 8 ohms... Now lets set the Q to 0.707 at 8 ohms with the 10uH inductor still. This gives C=0.312uF, nearest C is 0.33uF, using that cap gives Fc=87612Hz, Q=0.727 and the following response: 10000 16000 18000 20000 22000 400000 5.2669e003 1.0544e002 1.1721e002 1.2227e002 1.1793e002 2.6368e+001 Or a stupidly flat passband, but 26dB rolloff at 400KHz. Going up a C to 0.39uF gives Q=0.78994, F=80591 and the following response. Better attenuation (slightly) at the switching frequency but more peaking. I don't like it. 10000 16000 18000 20000 22000 400000 0.025621 0.061722 0.075956 0.090770 0.105785 27.767517 So let's switch to a 15uH inductor for 8 ohms and rerun some numbers... C=0.47uF gives Q=0.70805, Fc=59941 and the following response: 10000 16000 18000 20000 22000 400000 2.7204e003 2.0354e002 3.3106e002 5.0955e002 7.5044e002 3.2975e+001 .. So a very slight rolloff (0.075dB @ 22K), and we're back at 32dB attenuation at 400KHz. 15uH definitely works better than 10uH here. Going up to C=0.56uF gives Q=0.77287, Fc=54914 and a slight bit of peaking: 10000 16000 18000 20000 22000 400000 0.042365 0.089776 0.103149 0.112777 0.116844 34.469975 In the opposite direction, C=0.39uF gives Q=0.64498, Fc=65802 and: 10000 16000 18000 20000 22000 400000 0.042612 0.117278 0.152834 0.194657 0.243363 31.403063 Moving up to 22uH with our 8 ohm load.. C=0.68uF gives Q=0.70324, Fc=41149 and some droop: 10000 16000 18000 20000 22000 400000 0.020757 0.112296 0.173828 0.257235 0.366349 39.509726 C=0.82uF gives Q=0.77225, Fc=37472 and a nice inband peak, with tons of stopband attenuation. This is really nice. 10000 16000 18000 20000 22000 400000 0.078636 0.112983 0.093620 0.047638 0.032111 41.122326 Overall it looks like 15uH/0.47uF or 22uH/0.82uF is the way to go for 8 ohms. Now someone asked me to make a Wiener card do a 16 ohm load. Lets try that. I'll assume at the very least we'll need a 22uH inductor... With C=0.15uF, Q=0.66058 and Fc=87612 10000 16000 18000 20000 22000 400000 0.017205 0.046823 0.060778 0.077114 0.096068 26.450067 With C=0.18uF, Q=0.72363, Fc=79978 10000 16000 18000 20000 22000 400000 5.0710e003 8.7439e003 8.7256e003 7.5413e003 4.8043e003 2.7955e+001 With C=0.22uF, Q=0.8 and Fc=72343. Still a half decent passband. 10000 16000 18000 20000 22000 400000 0.034859 0.083344 0.102176 0.121535 0.140832 29.648615 C=0.27uF, Q=0.88626, Fc=65302. Getting kinda peaky now 10000 16000 18000 20000 22000 400000 0.072234 0.177427 0.220261 0.265861 0.313372 31.403510 And trying the 33uH inductor with our 16 ohm load: C=0.22uF, Q=0.65320, F=59068 10000 16000 18000 20000 22000 400000 0.046110 0.130925 0.172609 0.222439 0.281354 33.262809 C=0.27uF, Q=0.72363, F=53319 10000 16000 18000 20000 22000 400000 8.4259e003 8.9591e005 1.1710e002 3.0703e002 5.8730e002 3.5002e+001 C=0.33uF, Q=0.80000, F=48229 10000 16000 18000 20000 22000 400000 0.074291 0.159401 0.184252 0.202982 0.212434 36.723365 ... maintaining EMI performance, looks like 33uH wins here. Last edited by gmarsh; 17th February 2015 at 02:32 AM. 
17th February 2015, 06:13 AM  #2 
diyAudio Member
Join Date: Mar 2007

Does this mean that we specify the ohm of our speakers in the Weiner group buy ?

17th February 2015, 08:05 AM  #3 
diyAudio Member
Join Date: Jan 2010

I do not doubt these calculations give optimal filters theoretically.
One assumption of these calculations is the speaker having constant impedance over the hole frequency band. This may not be true at higher frequencies, specially when using single wideband speakers. And it is certainly not true at the resonant frequency of the filter, so some snubbering for damping could be essential. All in all I want to say that the TI application might be a 4~8 Ohm compromise, but it is not that bad in practical terms. 
17th February 2015, 12:33 PM  #4 
diyAudio Member

I don't disagree that a speaker can be a more complex load than a resistor, and can affect the filter's performance... knowing that information you can design a better filter I'd imagine. The code I threw together to do this can handle complex load impedance, got any candidate speaker electrical models I can experiment with to see how much the variation ends up being?
Someone asked me about 6 ohm loading in the wiener GB thread, here's the calculations for that: For a 6 ohm load, C=0.68uF, L=10uH: Q=0.78230, Fc=61033, response: 10000 16000 18000 20000 22000 400000 0.039724 0.089649 0.106704 0.122320 0.135303 32.624980 For a 6 ohm load, C=0.56uF, L=10uH: Q=0.70993, Fc=67255, response: 10000 16000 18000 20000 22000 400000 5.9859e004 9.9980e003 1.7310e002 2.7777e002 4.2143e002 3.0975e+001 6 ohm load, C=0.82uF, L=15uH: Q=0.70143, Fc=45380, response: 10000 16000 18000 20000 22000 400000 0.017065 0.083853 0.127820 0.187185 0.264837 37.810233 6 ohm load, C=1uF, L=15uH: Q=0.77460, Fc=41094, response: 10000 16000 18000 20000 22000 400000 0.071075 0.121330 0.119509 0.100384 0.058547 39.516599 
18th February 2015, 09:05 PM  #5  
diyAudio Member
Join Date: Jan 2011
Location: Kamloops, BC

Quote:
http://www.creativesound.ca/pdf/A10AP.pdf Actually, what about two of those speakers, in parallel? 

18th February 2015, 09:47 PM  #6 
diyAudio Member
Join Date: May 2005
Location: Californication

How much is a Butter worth?
post yer model schematics, parasitics , and any other assumptions used. I couldn't find hardly any info on the inductors DS, losses vs Freq or SRF. any consideration on 3rd order elliptical w/1st stop band notch at Fsample edit> pass band ripple shouldn't be a killer on real speaker systems consult 'Handbook of Filter Synthesis A.I.Zverev 1967600'
__________________
like four million tons of hydrogen exploding on the sun like the whisper of the termites building castles in the dust Last edited by infinia; 18th February 2015 at 10:05 PM. 
19th February 2015, 12:01 AM  #7 
diyAudio Member

Here's a leaned out version of what I'm using, with plotting/filter calculation/nearest part hunting/etc yanked out.
zload below can be pretty easily expanded to a more complex load. rload = 2; % half of actual load in BTL c = 1.5e6; l = 10e6; rl = 9e3; fplot = 50000; %f = linspace(fplot/1000,fplot,1000); f = [10000 16000 18000 20000 22000 400000]; % calc filter characteristics wo = 1./sqrt(l.*c); q = wo*rload*c; % q doesn't include Rload (figure out later) fo = wo/(2*pi); zload = rload; zc = j./(2*pi*f*c); zl = j*2*pi*f*l + rl; zrc = 1./(1./zc + 1./zload); resp = zrc ./ (zrc + zl); logresp = 20*log10(abs(resp)); disp(logresp); Last edited by gmarsh; 19th February 2015 at 12:03 AM. 
5th March 2015, 04:35 AM  #8 
diyAudio Member

So here's the latest bit of code I've been using for evaluating filters with speakers attached. I've got a more elaborate copy done up which does the full electrical model of a speaker.
One big conclusion I'm drawing from this: USE A ZOBEL. Try running this code with the "rz" value changed from 8.2 to 8.2e6, which takes the zobel out of circuit for all purposes. With 8.2, voltage gain of the filter never goes above 1. With 8.2e6, there's a +20dB spike around 71KHz  if your amp puts this frequency out for whatever reason, the output filter will magnify the voltage and possibly even burn up the output caps on the amp. I'm using Octave, this should work in Matlab also. % TPA response plotter % march 2015, gmarsh % output filter (1D14A150M) rl = 16e3; l = 15e6; c = 0.47e6; % speaker (Alpair 10M) % motional part of electrical model left out here, as it's largely insignificant here re = 7.2; le = 71.379e6; % speaker zobel network rz = 8.2; cz = 1e6; % == boring math below == % make plotting vector % replace 0hz with 1Hz to avoid divide by zero fplot = 100000; f = linspace(fplot/1000,fplot,1000); w = f*2*pi; % calculate speaker impedance zspeaker = re + j*w*le; zzobel = rz + 1./(j*w*cz); zload = 1./(1./zspeaker + 1./zzobel); % divide speaker load by two (since this is a BTL amplifier) zload = zload ./ 2; zc = 1./(j*w*c); zshunt = 1./(1./zload + 1./zc); zl = rl + j*w*l; response = zshunt./(zshunt + zl); % plot result subplot(2,1,1); semilogx(f,20*log10(abs(response))); ylabel('dB'); title('Electrical response'); grid on; subplot(2,1,2); semilogx(f,abs(zload*2)); ylabel('ohms'); title('Amp load'); grid on; 
22nd April 2015, 04:53 AM  #9 
diyAudio Member

Mr. Wizard,
What's the right zobel for this driver assuming default 6ohm Ti config? FS 121 Hz RE 6 ohms Qms 3.22 Qts .656 Qes .828 Xmax 2.5 mm L (1k) .75 mH Rms .328 kg/second Vas 1.81 Liters Mms 1.66 grams Cms 1.244 mm/newt Bl 2.9 TeslaM SPL 87.3 db Area 32 sq cm 
22nd April 2015, 05:02 PM  #10 
diyAudio Member


Thread Tools  Search this Thread 


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Case for TPA3116  ivmilicevic  Class D  14  27th October 2014 05:56 PM 
Calculation of HorbachKeele FIR filters  usul27  PC Based  1  4th October 2011 08:26 PM 
WMTW Workinprogress pics and rambling cause I'm bored  tresch  MultiWay  0  23rd June 2009 10:16 AM 
Rambling on about cables and perception  Conrad Hoffman  Everything Else  2  8th April 2007 02:11 AM 
One (rambling) thing leads to another.....  Z33  Solid State  0  19th May 2006 08:36 PM 
New To Site?  Need Help? 