# Design 2nd order sections IIR filter for high orders (more than 500)

I am currently building a Reverb that needs to fit on a DSP. I am using the model proposed in this link https://ccrma.stanford.edu/~jos/pasp/Freeverb.html.

It involved to create some Feedback Comb-Filters with high orders (more than 1000). For that I use a 2nd-order section IIR filter (IIRSOS) integrated in my DSP. I am using the Matlab function "tf2sos" that takes numerator and denominator of the Transfer Function (TF) of the desire filter and create a matrix of Second Order Section (SOS) coefficient. With this coefficients, I can make what I want.

Problem : for high filter orders (arround order 200) the "tf2sos" function appears to be totally unstable. However the Matlab object called dsp.IIRFilter that use also 2nd-order section IIR seems to handle it :

Impulse response for order = 200 : Impulse response for order = 1500 : On the 2nd picture you can see that the filter with the tf2sos coefficients is going totally wrong. Does someone knows how I can get a functional coefficient matrix for orders like 1500 ?

Thank you.

• Hello. I'm not sure it makes sens to decompose this filter structure in to biquads, it is rather over complicating things. If you take the difference equation of the filter you'll see it's actually very simple to implement directly in code. and will use significantly less calculations than implementing it as biquads. Aug 23, 2018 at 8:22
• Hello kippertoffee, make a single filter to design this is impossible because more the order is high more the filter is unstable. I use this kind of filter to avoid this problem, but the main problem is why the transaltion of the transfer function become unstable.
– remi
Aug 23, 2018 at 8:59
• The transfer function must look like something with this coefficient : numerator = [1 -0.9]; denominator = [1 zeros(1, 1000) -0.7];
– remi
Aug 23, 2018 at 9:04
• I get that is the general theory, but surely if you just have one feedback coefficient, if that coefficient is < +/-1 then the filter cannot become unstable. Aug 23, 2018 at 10:08
• @remi I agree with kippertoffee: You're taking something extremely easy – single tap IIRs (that's what a FBCF is) – and converting it to something with many different taps. That doesn't sound clever – your FBCF is stable unless it's not. Aug 23, 2018 at 12:35