Go Back   Home > Forums > >
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

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

How to calculate SPL with filters in Excel
How to calculate SPL with filters in Excel
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
Reply
 
Thread Tools Search this Thread
Old 25th September 2017, 04:10 PM   #1
Windforce85 is offline Windforce85  Poland
diyAudio Member
 
Join Date: Nov 2014
Default 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!
  Reply With Quote
Old 26th September 2017, 12:44 AM   #2
Ron E is offline Ron E  United States
diyAudio Member
 
Ron E's Avatar
 
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
  Reply With Quote
Old 26th September 2017, 12:29 PM   #3
Windforce85 is offline Windforce85  Poland
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.
  Reply With Quote
Old 26th September 2017, 02:09 PM   #4
djoffe is offline djoffe  United States
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
File Type: png 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
  Reply With Quote
Old 26th September 2017, 02:35 PM   #5
AndrewT is offline AndrewT  Scotland
R.I.P.
 
Join Date: Jul 2004
Location: Scottish Borders
Quote:
Originally Posted by Windforce85 View Post
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.
  Reply With Quote
Old 26th September 2017, 05:19 PM   #6
Windforce85 is offline Windforce85  Poland
diyAudio Member
 
Join Date: Nov 2014
Quote:
Originally Posted by djoffe View Post
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?
  Reply With Quote
Old 26th September 2017, 06:07 PM   #7
aczern is offline aczern
diyAudio Member
 
Join Date: May 2008
Do you know this book?

Click the image to open in full size.
  Reply With Quote
Old 26th September 2017, 06:11 PM   #8
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
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
  Reply With Quote
Old 26th September 2017, 09:07 PM   #9
Windforce85 is offline Windforce85  Poland
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 09:10 PM.
  Reply With Quote
Old 26th September 2017, 09:08 PM   #10
djoffe is offline djoffe  United States
diyAudio Member
 
Join Date: Oct 2008
Quote:
Originally Posted by Windforce85 View Post
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
File Type: png 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
  Reply With Quote

Reply


How to calculate SPL with filters in ExcelHide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to calculate series notch filters merlin el mago Multi-Way 41 14th March 2014 12:47 PM
anyone know how to calculate this?? kendt Construction Tips 2 7th January 2014 09:04 PM
Calculate SPL exuviae Subwoofers 3 5th July 2006 08:51 AM
help ! how to calculate?????????? bogdan_borko Solid State 3 18th January 2006 11:15 PM
EMI ac line filters & RFI ac line filters. Are they one and the same? KevinLee Parts 1 8th January 2003 01:18 AM


New To Site? Need Help?

All times are GMT. The time now is 07:37 AM.


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 14.29%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Copyright ©1999-2018 diyAudio
Wiki