How to calculate SPL with filters in Excel
 User Name Stay logged in? Password
 Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read Search

 Software Tools SPICE, PCB CAD, speaker design and measurement software, calculators

 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
 25th September 2017, 03:10 PM #1 Windforce85   diyAudio Member   Join Date: Nov 2014 How to calculate SPL with filters in Excel Hi there, Maybe this is stupid question but I have never been good in math. I made xls spreadsheet where I can calculate SPL, excursion, impedance and power of driver in sealed boxes in function of frequency. I am struggled becouse I also would like to calculate transfer function of various filters in Excel and to plot its influence on SPL curves. Unfortunately I cannot find clear and easy to implement set of formulae to calculate it in function of frequency giving Q, f and n of the filters. Do you know good source of such formulae? Thanks! What I need to do (this is only an example): filter: Butterworth order: 2 corner freq: 10 Hz freq. raw SPL filtered SPL 10 Hz 60 dB 55 dB 11 Hz 62 dB 53 dB 12 Hz 64 dB 51 dB 13 Hz 66 dB 49 dB Thanks!
 25th September 2017, 11:44 PM #2 Ron E   diyAudio Member     Join Date: Jun 2002 Location: USA, MN 2nd order transfer functions HP H(s)=s^2/(s^2+s*wo/Q+wo^2) LP H(s)=wo^2/(s^2+s*wo/Q+wo^2) wo=filter cutoff s=complex frequency Q is Q Butterworth Q is 0.707 Linkwitz Riley 0.5 Bessel 0.577 __________________ Our species needs, and deserves, a citizenry with minds wide awake and a basic understanding of how the world works. --Carl Sagan Armaments, universal debt, and planned obsolescence--those are the three pillars of Western prosperity. —Aldous Huxley
 26th September 2017, 11:29 AM #3 Windforce85   diyAudio Member   Join Date: Nov 2014 Thanks, But still I quite don't know how to interpret "complex frequency" term. If I substitute 's' with sound frequency in cycles per second (Hz) I am still getting wrong results from this formulae.
djoffe
diyAudio Member

Join Date: Oct 2008
This guy talks about doing complex number calculations in Excel:

Complex Numbers in Excel | EngineerExcel

If you don't want to go through all that, you could use these formulas (see enclosed picture).
Attached Images
 FilterCalculations.png (21.3 KB, 101 views)
__________________
www.akitika.com Featuring the GT-102 Power Amp and PR-101 Preamp kits
www.updatemydynaco.com Featuring upgrades for classic Dynaco Solid State Equipment

AndrewT
R.I.P.

Join Date: Jul 2004
Location: Scottish Borders
Quote:
 Originally Posted by Windforce85 Do you know good source of such formulae? Thanks!
your results Raw vs Filtered show the SPL going down as frequency increases.
This seems to be a low pass filter.

Surely your 10Hz filter should be a high pass.
__________________
regards Andrew T.

Windforce85
diyAudio Member

Join Date: Nov 2014
Quote:
 Originally Posted by djoffe This guy talks about doing complex number calculations in Excel: Complex Numbers in Excel | EngineerExcel If you don't want to go through all that, you could use these formulas (see enclosed picture).
Hi, this works nice, thanks! However it is still only 2nd order. Are there a formulae which involves filter order into calculations? For example when designing odd order Butterworth slopes?

 26th September 2017, 05:07 PM #7 aczern diyAudio Member   Join Date: May 2008 Do you know this book?
 26th September 2017, 05:11 PM #8 CharlieLaub   diyAudio Member   Join Date: Mar 2007 Location: California I became very skilled at Excel filter calculations when I wrote my "Active Crossover Designer" Excel tools. See my web page: the Active Crossover Designer web page You need to be able to calculate the filer response using complex numbers. The complex number includes an amplitude and phase component. At the end you back out the scalar quantities magnitude and phase from the complex number and convert magnitude to SPL and phase to degrees. Excel has a set of built in complex number functions that are very complete, but a bit clumsy to work with. My ACD spreadsheets do not include any hidden sheets and all formulas can be looked at. You are welcome to use them as a resource on how to do filter calcs in Excel, and then create your own version or feel free to use ACD. __________________ Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins
 26th September 2017, 08:07 PM #9 Windforce85   diyAudio Member   Join Date: Nov 2014 Great Thanks Charlie! Your formulas and overal level of Excel operations inside are well beyond my level of understanding and imagination. I've got few inspirations from you for troubleshooting and handling of my simple formulas. I don't know how you've made log-scaled x axis but there it is (I wasn't able to do it on my own) so I've borrowed your graph layout to my spreadsheet if you don't mind. To everyone. I am working on one tool which can help user to design his own magnetic circuit and voice coil inside of driver. It can approximate magnetic flux density inside the gap from given neo magnet ring (or slug) dimensions. User can enter gap dimensions and VC parameters like wire gauge, number of layers, conductor type and shape, VC height etc. Then every parameter can be calculated like BI, Re, geometric Xmax, Qes etc... Then, such a driver with spec'ed by the user cone and motor properities can be simulated in sealed box and compared with production driver's database. It is still much work to be done... Last edited by Windforce85; 26th September 2017 at 08:10 PM.
djoffe
diyAudio Member

Join Date: Oct 2008
Quote:
 Originally Posted by Windforce85 Hi, this works nice, thanks! However it is still only 2nd order. Are there a formulae which involves filter order into calculations? For example when designing odd order Butterworth slopes?
If you have the filters in factored form, that is, a cascade of 2nd order and first order sections, then you can just add the dB's provided by each section.

For a single order lowpass filter and highpass filter, we have as you see in the attached picture, where f3 is the 3 dB corner frequency. Of course, if you're looking for a general approach, Charlie's way may be the one for you.
Attached Images
 FirstOrderFilters.png (20.3 KB, 85 views)
__________________
www.akitika.com Featuring the GT-102 Power Amp and PR-101 Preamp kits
www.updatemydynaco.com Featuring upgrades for classic Dynaco Solid State Equipment

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Site     Site Announcements     Forum Problems Amplifiers     Solid State     Pass Labs     Tubes / Valves     Chip Amps     Class D     Power Supplies     Headphone Systems Source & Line     Analogue Source     Analog Line Level     Digital Source     Digital Line Level     PC Based Loudspeakers     Multi-Way     Full Range     Subwoofers     Planars & Exotics Live Sound     PA Systems     Instruments and Amps Design & Build     Parts     Equipment & Tools     Construction Tips     Software Tools General Interest     Car Audio     diyAudio.com Articles     Music     Everything Else Member Areas     Introductions     The Lounge     Clubs & Events     In Memoriam The Moving Image Commercial Sector     Swap Meet     Group Buys     The diyAudio Store     Vendor Forums         Vendor's Bazaar         Sonic Craft         Apex Jr         Audio Sector         Acoustic Fun         Chipamp         DIY HiFi Supply         Elekit         Elektor         Mains Cables R Us         Parts Connexion         Planet 10 hifi         Quanghao Audio Design         Siliconray Online Electronics Store         Tubelab     Manufacturers         AKSA         Audio Poutine         Musicaltech         Holton Precision Audio         CSS         Dx Classic Amplifiers         exaDevices         Feastrex         GedLee         Head 'n' HiFi - Walter         Heatsink USA         miniDSP         SITO Audio         Twin Audio         Twisted Pear         Wild Burro Audio

 Similar Threads Thread Thread Starter Forum Replies Last Post merlin el mago Multi-Way 41 14th March 2014 11:47 AM kendt Construction Tips 2 7th January 2014 08:04 PM exuviae Subwoofers 3 5th July 2006 07:51 AM bogdan_borko Solid State 3 18th January 2006 10:15 PM KevinLee Parts 1 8th January 2003 12:18 AM

 New To Site? Need Help?

All times are GMT. The time now is 08:35 AM.