Hello all,

I am attempting to implement an iir filter, y[n]-0.25y[n-2]= x[n]+x[n-2], using the iir function in the filter.h file. I am getting nulls at the correct frequencies and see the correct trend of the filter, however the gain all other frequencies is significantly far from what I simulate/calculate it to be. I have tried other irr filters equations and get the same issue with gain... Does anyone have advice or can see an error in my implementation.

Thanks for any help,

John

The attachment is the c file for processing the block of code.

Hi John,

The details about the implementation of the IIR filer is given in Pg. No 590 of the VDSP++ Run Time Library Manual of SHARC Processors . The link for the same is given here.

http://www.analog.com/static/imported-files/software_manuals/50_21k_rtl_mn_rev_1.5.pdf

The function assumes that the value of B0is 1.0, and so the B1and B2 coefficients should be scaled accordingly. Also the function also assumes that the value of the A0 coefficient is 1.0, and the A1and A2 coefficients should be normalized .

There is an example given along with it which can be used for reference.

Regards,

Mahesh