Hello everyone!

Thanks for you read! My project use the biquad funtion,and i generate the coeffs using the matlab!

1,I use fdatool, design a filter!

2,exprot the coeffs

In my mind the [b0, b1, b2] = 0.7133126985410756*[1, 0, -1] , [a0, a1, a2] = [1, -1.9962346947976051, 0.99625876838666028 ]

and the other also like this!

3,I read the help of the biquad

then i give the[ -0.7133126985410756*,0,0.7133126985410756,0.99625876838666028,-1.9962346947976051] to [B2,B1,B0,A2,A1]]

4,But the result is not right,

so i want anyone could pointe out the mistakes ,and give me some advise!

thanks!

jack!

Hi Jack,

I think one approach could be to write a MATLAB script to check whether the filter coefficients you generated are actually providing you the desired results in the MATLAB. Once you are sure that it works in MATLAB, it would be easier to use the same procedure with the "biquad" function on ADSP-21489.

For example, the attached script "iir.m" generates an input which is a combination of two sine waves (1KHz+8KHz, sampling rate=48 KHz). It then generates the filter coefficients for a butterworth low pass filter with fc=2.4 KHz (0.1*48/2) and convert the coefficients to cascaded biquad format. It then filters the signal out in a loop with one biquad per iteration.

The left figure below shows the input and the right figure shows the filtered output signal (contains only 1KHz component).

Hope this helps.

Thanks,

Mitesh