AnsweredAssumed Answered

Problem with coeff_iirdf1_fr16()

Question asked by zyy on Mar 20, 2012
Latest reply on Apr 5, 2012 by zyy

Hello, All:

         I am designing a butterworth filter for Blackfin DSP bf532. I got coefficients using Matlab filter design tool----FDATool,

       

SOS =

    1.0000   -2.0000    1.0000    1.0000   -1.9579    0.9618
    1.0000   -2.0000    1.0000    1.0000   -1.8991    0.9029
    1.0000   -1.0000         0    1.0000   -0.9388         0

G =

    0.9799
    0.9505
    0.9694
    1.0000

After [b,a]=sos2tf(SOS,prod(G)), I got B-Coefficient (b) and C-Coefficient(c) ,

b = 0.9029   -4.5145    9.0290   -9.0290    4.5145   -0.9029

a = 1.0000   -4.7958    9.2038   -8.8355    4.2427   -0.8152

The problem is that how can I get coeff[] with DSP runtime library function

void coeff_iirdf1_fr16 (const float acoeff[ ],

                               const float bcoeff[ ],

                               fract16 coeff[ ], int nstages);

the size of the acoeffs vector is 2*nstages and the size of the bcoeffs vector is (2*nstages) + 1. Why there is one more element of bcoeffs than that of acoeffs? 

Is there anyone has the same question or who can help me?   Thanks a lot!

Outcomes