Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

How to split high-order IIR to multiple biquads?

DSP related issues, mathematics, processing and techniques

Re: How to split high-order IIR to multiple biquads?

Postby MyCo » Mon Aug 18, 2014 10:15 pm

I've played with it a bit in my filter construction kit. I don't get what it does, the code isn't readable for me.
It looks like it finds the right poles, but somehow doesn't recover the zeros (maybe because they are on the imag. axis). It's also a bit instable. I fixed some bugs causing infinite loops already...
Attachments
Filter Construction Kit 9 (MyCo).fsm
(145.5 KiB) Downloaded 1234 times
User avatar
MyCo
 
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany

Re: How to split high-order IIR to multiple biquads?

Postby KG_is_back » Mon Aug 18, 2014 11:02 pm

Sorry, I can't open the schematic, so unfortunately I can't help you.

Mine uses Bairstow's method.
It is a method that finds u,v coefficients of a quadratic polynomial x^2+u*x+v that divides a given polynomial evenly (without remainer). Both B and A coefficients of a filter are a polynomial and in case of biquadratic filter they happen to be quadratic equations (as the name suggests), so what a Bairstow's method actually does in this particular case, if you use it on both A and B coefficients of your nth order filter you effectively 'extract' a biquad filter from it. Then you divide A by A of the biquad and B by B and you decrease the order of the filter (and it's polynomial) by 2 (because quadratic polynomial is of 2nd order and so is the biquad filter). You may repeat that several times until you are left with either a linear or quadratic polynome which represent the final biquad or bilinear filter. Notice that that is also the only one that has b0 coefficient different from 1.
I've found the Bairstow's method on wikipedia when I was searching for a method that can find roots of a polynomial without need of complex math. BM was the obvious winner, because it also finds the roots in pairs which is very convenient for extracting the biquads. Actually I didn't even used the full Bairstow's method because I didn't needed the roots - just the quadratic equation (so instead of additional step I actually needed to do one step less to get the biquad...lucky meee :mrgreen: ).

BTW ruby is so cool... I wish I had looked into it sooner... :oops:
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: How to split high-order IIR to multiple biquads?

Postby KG_is_back » Tue Aug 26, 2014 5:11 pm

A new version that supports double precision input (via string array) and prevents some errors, that were previously unchecked. Now you must enter B and A coefficients as separate inputs and A coefficients must contain a0 (which is usually =1) coefficient (it is normalized internally). B and A arrays may be of different size (missing values in the smaller array are assumed to be 0) but at least one of them must have at least 4 values (so the filter is order 3 or higher).

EDIT: small update: Now the input may be of order lower than 3 (4values) and the schematic will simply pass it on as biquad (even if the input is actually bilinear or simple gain)
Attachments
IIR to biquad.fsm
(13.3 KiB) Downloaded 1255 times
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Previous

Return to DSP

Who is online

Users browsing this forum: No registered users and 31 guests