IIR Filter Funktion with DSP5416
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
IIR Filter Funktion with DSP5416

 
Post new topic   Reply to topic    CASTalk.com Forum Index -> DSP
Author Message
Eugene
Guest





Posted: Tue Jan 04, 2005 8:55 pm    Post subject: IIR Filter Funktion with DSP5416 Reply with quote

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.
Back to top
Guest






Posted: Wed Jan 05, 2005 5:41 am    Post subject: Re: IIR Filter Funktion with DSP5416 Reply with quote

johnbesel@web.de (Eugene) wrote:

Quote:
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
Back to top
Jerry Avins
Guest





Posted: Wed Jan 05, 2005 7:48 am    Post subject: Re: IIR Filter Funktion with DSP5416 Reply with quote

Eugene wrote:

...

Quote:
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.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
Back to top
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> DSP All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB