Reply by Jerry Avins January 4, 20052005-01-04
Eugene wrote:

  ...

> what is biquads? I haven't found this word in dictionary.
Short for "bi-quadratic". Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by January 4, 20052005-01-04
johnbesel@web.de (Eugene) wrote:

>Hello > >I can produce with mathlab the coefficients for IIR Filter >Bandpassfilter. I can export it as h-file. So I get real64_T >NUM[MWSPT][3] and real64_T DEN[MWSPT_NSEC][3] arrays > >my question is: with the function from DSPLIB iir32(DATA *x,LDATA >*h,DATA *r,LDATA **dbuffer ...) should I filter the input. I can't >understand what should I take as "h" and "dbuffer". >Can I use the coef. from Mathlab, or it's something else? > >what is biquads? I haven't found this word in dictionary. > >I thank all of you for your help.
Biquad is a common method of implementing IIR filters ... so that the filter is a combination of second order blocks. The equation for the 2nd order biquad is like this: y(n) = b0 * x(n) + b1 * x(n-1) + b2 * x(n-2) - ao * y(n-1) - a1 * y(n-2) You put these together to get the final order of the filter, i.e. for 8th order filter, you need 4 biquads ... one after the other. Do a websearch on Biquad IIR filter, if you desire to know more .. since there will be a lot of information. I believe that Matlab can give you the coefficients in second order, or biquad, form. After it gives these to you in floating point format, you need to change them to integer form. I have added my posting on this topic from a while ago at the end of this message. Once you have the coefficients in integer form, I believe that is your "h". The "dbuffer" is the array for holding the IIR biquad "states", which are the older values for x and y. Robert www.gldsp.com ************************** integerizing IIR coefficients ************ Find the largest coefficient. Determine the 'smallest' power of two value that will make it less than one after divide. Divide all the coefficients by this value. Multiply the resulting values by " 1 shifted left by the number of bits that will represent the coefficients". Round these values to the nearest integer, and store in your program. Use these stored values to perform the multiplication of the filter, and then shift the final result the same number of locations to the right, as you did to the left in earlier stages. This is your result. ( modify address for return mail ) www.numbersusa.com www.americanpatrol.com
Reply by Eugene January 4, 20052005-01-04
Hello 

I can produce with mathlab the coefficients for IIR Filter
Bandpassfilter. I can export it as h-file. So I get real64_T
NUM[MWSPT][3] and real64_T DEN[MWSPT_NSEC][3] arrays

my question is: with the function from DSPLIB iir32(DATA *x,LDATA
*h,DATA *r,LDATA **dbuffer ...) should I filter the input. I can't
understand what should I take as "h" and "dbuffer".
Can I use the coef. from Mathlab, or it's something else?

what is biquads? I haven't found this word in dictionary.

I thank all of you for your help.