DSPRelated.com
Forums

IIR filter coefficient conversion from float to Q15

Started by megha daga May 18, 2006
hi everyone
I am working on IIR filter designing. I am gonna use the function iircas51. I am designing the filter using matlab and I have a question regarding converion of filter coefficients from float to Q15 (as expected in DSP).
I saw there was a previous thread on that, but couldnt get the whole answer to my question. From matlab I am getting coefficient values greater than 1. Sometimes they are greater than 2 too.
I know I can get fixed point coefficients from matlab directly, but I dont have that specific toolbox.
Can someone kindly suggest me how to convert these float values to Q15 format.
Kindly reply.
Thanking You
Megha daga

---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1ยข/min.
Determine the biggest power of 2 that can divide all the coefficients to
make then < 1.0. Then divide all the coefficients by that value, and
multiply the resulting value ( which is now < 1.0 ) by 32678, which is 2 ^
15. These will then be your coefficients to use in the MAC operation.
Before you take the final result from the accumulator, shift it left by the
factor you used to divide the coefficients.

Robert

www.greatlakessignalprocessing.com

_____

From: c... [mailto:c...] On Behalf Of megha
daga
Sent: Wednesday, May 17, 2006 6:56 PM
To: c54group; c...; c...
Subject: [c6x] IIR filter coefficient conversion from float to Q15
hi everyone
I am working on IIR filter designing. I am gonna use the function iircas51.
I am designing the filter using matlab and I have a question regarding
converion of filter coefficients from float to Q15 (as expected in DSP).
I saw there was a previous thread on that, but couldnt get the whole answer
to my question. From matlab I am getting coefficient values greater than 1.
Sometimes they are greater than 2 too.
I know I can get fixed point coefficients from matlab directly, but I dont
have that specific toolbox.
Can someone kindly suggest me how to convert these float values to Q15
format.
Kindly reply.
Thanking You
Megha daga

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.6.1/344 - Release Date: 5/19/2006