Go Back   Home > Forums > >

Multi-Way Conventional loudspeakers with crossovers

Reverse freq/gain/qfactor from biquad coefficients
Reverse freq/gain/qfactor from biquad coefficients
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
Old 22nd January 2021, 10:02 AM   #1
lutkeveld is offline lutkeveld  Netherlands
diyAudio Member
 
Join Date: May 2013
Location: Twente
Default Reverse freq/gain/qfactor from biquad coefficients

For a DSP board I am working on a way to not only upload settings, but also download them from the board.

I could in theory send extra data along, but since the board already gets the a0/a1/a2/b0/b1/b2 coefficients, it would be nice to reverse engineer the filter type, frequency and qfactor from that.

For the conversion from filter specs to coefficients I use the RBJ cookbook formulas. Is there some way to reverse these formulas or would that be mathematically impossible?
  Reply With Quote
Old 22nd January 2021, 10:19 AM   #2
AllenB is offline AllenB  Australia
diyAudio Moderator
 
AllenB's Avatar
 
Join Date: Oct 2008
Reverse freq/gain/qfactor from biquad coefficients
Have you seen whether VituixCad does this?
  Reply With Quote
Old 22nd January 2021, 10:34 AM   #3
lutkeveld is offline lutkeveld  Netherlands
diyAudio Member
 
Join Date: May 2013
Location: Twente
I cannot really find such a function in VituixCad unfortunately....
  Reply With Quote
Old 22nd January 2021, 01:56 PM   #4
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
This is pretty straightforward but tedious. All of the filter types:
gain stage
first order HP
first order LP
first order AP
first order shelving filter
second order HP
second order LP
second order AP
second order shelving filter
biquadratic filter
notch filter

have closed forms, times an overall gain factor (possibly just unity gain). First you look at the order of the denominator. This will tell you the order of the filter. Next, you look at which numerator coefficients are zero. This will tell you if it is a HP, LP, etc. Then you look for the s and constant terms to get e.g. Q and Wo. It's a lot of bookkeeping, but it is possible to do it.

If you are not familiar with transfer functions, start there. Keep in mind that there are analog form (e.g. in s) TFs and digital form (z^-1) TFs and you will be working with coefficients from the latter.

Honestly if this is just for your own project, it would be much simpler just to upload the values instead of writing code to extract them from the transfer functions. If you have to work with transfer functions above second order you must first factor the higher order numerator and denominator polynomials into first and second order filter forms and then extract the parameters. Good luck coding that!
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins
  Reply to this post

Reply


Reverse freq/gain/qfactor from biquad coefficientsHide this!Advertise here!
Thread Tools

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
help formula for biquad coefficients make sakthivel159 Digital Line Level 3 31st January 2016 12:44 PM
Rydel's triode model coefficients John Branson Tubes / Valves 2 4th May 2014 09:14 PM
advanced biquad programming: how to set gain for each biquad? CharlieLaub miniDSP 2 18th November 2011 03:35 PM
TAS3103 filter coefficients yulquen Digital Source 2 19th January 2006 11:54 AM
FIR filters: how to get the filter coefficients? 4real Digital Source 13 27th August 2005 09:08 AM


New To Site? Need Help?

All times are GMT. The time now is 09:26 AM.


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