On Sat, 07 Jul 2007 15:02:48 -0500, Moodz wrote:
> Hi,
>
> I am trying to implement a low pass IIR filter with data range of +1 & -1.
>
> The filter coefficients I get from Matlab are greater than 1. So, I need to
>
> scale down all coefficients, that makes a(1) coefficient not equal to 1 and
>
> makes the time difference equation to be:
>
> y(m)= 1/a(1) * [b(1)*x(m) + b(2)*x(m-1) + ... + b(nb)*x(nb-1)
> -a(2)*y(m-1)-....-a(na)*y(na-1) ]
>
> This multiplication of 1/a(1) is a number greater than 1, that I can not
>
> allow in the system. How can I get around this problem? I need to keep all
>
> data within +1 & -1 format and I am using Q15 binary format for
>
> implementation of the filter.
> It might sound a stupid question but any help is appreciated.
>
First, be sure to split your filter into a cascaded set of 1st-order and
resonant 2nd-order filters -- the effects of rounding and coefficient
errors is pretty bad as you go beyond a 2nd-order filter.
If you do this, you'll find that none of your denominator coefficients
approaches 2. At this point you can take Jerry's suggestion of
calculating x(n)/2 and doubling it, or John's suggestion of doing the MAC
twice on one coefficient. You could also consider coding it to work with
1 + a(n). Each of these has their advantages and drawbacks, so you'll
want to look hard at the correct result.
--
Tim Wescott
Control systems and communications consulting
http://www.wescottdesign.com
Need to learn how to apply control theory in your embedded system?
"Applied Control Theory for Embedded Systems" by Tim Wescott
Elsevier/Newnes,
http://www.wescottdesign.com/actfes/actfes.html