DSPRelated.com
Forums

FIR and IIR?

Started by Dhaval_DSP February 25, 2011
What I know is FIR system can only be non-recursive and IIR system can only
be recursive discrete system.

But I just read from one DSP book that FIR can also be recursive and IIR
can also be non-recursive discrete system.

Can anybody help me to understand this using an example?

Dhaval
Here's an example of a recursive FIR implementation:

http://cnx.org/content/m11918/latest/

To see the case of an non-recursive IIR filter, take a look at FIR least squares inverse filters.

A specific example, let g(n) = d(n) - a*d(n), for |a| < 1 (so it is minimum phase and the inverse is both causal and stable). Taking this approach, it can be shown that the FIR least squares inverse filter unit sample response approaches the true inverse (which is an IIR filter) as N->inf, N being the number of taps[1]. I'm not sure if this is what the aforementioned book was referring to, but I hope it helps!

[1] Statistical Digital Signal Processing and Modeling (Monson H. Hayes 1996) pp169-172

Bryan
On Fri, 25 Feb 2011 10:09:26 -0600, Dhaval_DSP wrote:

> What I know is FIR system can only be non-recursive and IIR system can > only be recursive discrete system. > > But I just read from one DSP book that FIR can also be recursive and IIR > can also be non-recursive discrete system. > > Can anybody help me to understand this using an example?
It helps to understand the abbreviations: FIR stands for "Finite Impulse Response", IIR stands for "Infinite Impulse Response". You can _achieve_ a finite impulse response in a system with feedback, if you get all your numbers right. I'm not sure what your book is thinking, but you can't achieve an infinite impulse response structure non-recursively unless you have an infinite number of taps -- perhaps that's what they meant. -- http://www.wescottdesign.com
Tim,

    Under what conditions can a IIR be approximated by a non-linear
    phase FIR? Do all pratically realizable stable IIR's have their
    non-linear phase FIR as counterpart?

    If I feed and impulse to IIR and truncate it's impulse response
    using half-windowing, could I implement those IIR's as FIR's?
    Not sure which window to use though? Any suggestions? Maybe dolph-
    chebwin?

Regards
Bharat
On 02/25/2011 11:09 AM, Dhaval_DSP wrote:
> What I know is FIR system can only be non-recursive and IIR system can only be recursive discrete system. > > But I just read from one DSP book that FIR can also be recursive and IIR can also be non-recursive discrete system. > > Can anybody help me to understand this using an example? > > Dhaval
Hi Dhaval, The increasingly popular CIC (cascaded integrator comb) filter is a perfect example of a filter that has a finite impulse response but is implemented recursively. It is a simple boxcar averager. At least in the CIC case, this property comes from the identity 1 + z + z^2 + ... + z^n = (1 - z^(n+1)) / (1 - z) [complexvariables, section 7, exercise 18] You may want to check out Rick Lyons latest book (3rd edition) [lyonsthird]---he has more information on CIC filters than I've seen in any one text book. --Randy @BOOK{complexvariables, title = "{Complex Variables and Applications}", author = "{Ruel~V.~Churchill, James~Ward~Brown}", publisher = "McGraw-Hill", edition = "fifth", year = "1990"} @BOOK{lyonsthird, title = "{Understanding Digital Signal Processing}", edition = "third", author = "{Richard~G.~Lyons}", publisher = "Prentice Hall", year = "2011"} -- Randy Yates Digital Signal Labs 919-577-9882 http://www.digitalsignallabs.com yates@digitalsignallabs.com
On Sat, 26 Feb 2011 11:21:24 -0600, bharat pathak wrote:

> Tim, > > Under what conditions can a IIR be approximated by a non-linear > phase FIR? Do all pratically realizable stable IIR's have their > non-linear phase FIR as counterpart? > > If I feed and impulse to IIR and truncate it's impulse response > using half-windowing, could I implement those IIR's as FIR's? Not > sure which window to use though? Any suggestions? Maybe dolph- > chebwin? > > Regards > Bharat
I'm not sure what you mean by "half-window" -- just window the t > 0 part? If that's what you mean, then yes, you could _approximate_ any stable IIR with an FIR, and could approximate it ever better with ever- longer FIR filters. -- http://www.wescottdesign.com
Thanks Tim,

Bharat
Tim Wescott <tim@seemywebsite.com> wrote:
(snip)

>> Can anybody help me to understand this using an example?
> It helps to understand the abbreviations: FIR stands for "Finite Impulse > Response", IIR stands for "Infinite Impulse Response". You can _achieve_ > a finite impulse response in a system with feedback, if you get all your > numbers right. I'm not sure what your book is thinking, but you can't > achieve an infinite impulse response structure non-recursively unless you > have an infinite number of taps -- perhaps that's what they meant.
Yes, but most IIR aren't actually infinite with quantized data. They usually go to zero (after rounding) at some point, unless they go to an oscillating state. So, if they actually are finite, then it should be possible to replace one with a (likely long) FIR. The convenience of IIR is that you get a long tail to the impulse response with a small number of taps. -- glen
On Sun, 27 Feb 2011 09:12:34 +0000, glen herrmannsfeldt wrote:

> Tim Wescott <tim@seemywebsite.com> wrote: (snip) > >>> Can anybody help me to understand this using an example? > >> It helps to understand the abbreviations: FIR stands for "Finite >> Impulse Response", IIR stands for "Infinite Impulse Response". You can >> _achieve_ a finite impulse response in a system with feedback, if you >> get all your numbers right. I'm not sure what your book is thinking, >> but you can't achieve an infinite impulse response structure >> non-recursively unless you have an infinite number of taps -- perhaps >> that's what they meant. > > Yes, but most IIR aren't actually infinite with quantized data. They > usually go to zero (after rounding) at some point, unless they go to an > oscillating state.
This brings up a really interesting issue. If you have an IIR that has an input that's a mix of an intended signal and random noise, and if that random noise is of sufficiently high magnitude to randomize the least significant bits of your filter states, then the filter will act like it does not suffer from quantization noise, meaning that _in the expected value_, the response will, indeed, bet infinite. Yet in the real world, that can't be for any individual input sample, because a collection of a finite number of state variables, each of which can only take on a finite number of values, simply can't carry information about an infinite number of past values. I'm sure this conundrum is solvable if you feed it into the "math-o- shredder" correctly, but I'm not sure how.
> So, if they actually are finite, then it should be > possible to replace one with a (likely long) FIR.
See above. _Certainly_ for anything that has an impulse response that is absolute integrable you'll be able to come up with an arbitrarily close approximation.
> The convenience of IIR is that you get a long tail to the impulse > response with a small number of taps.
That's a good time domain way of looking at it. In the frequency domain I'd word that as the IIR often gives you the best bang for the buck in terms of filtering effectiveness vs. filter cost. For a control system I'd point out that you almost always want your compensator to be minimum phase, and that an IIR filter is a very low- complexity way to make a minimum phase filter. -- http://www.wescottdesign.com
Tim Wescott <tim@seemywebsite.com> wrote:
(snip, I wrote)

>> Yes, but most IIR aren't actually infinite with quantized data. They >> usually go to zero (after rounding) at some point, unless they go to an >> oscillating state.
> This brings up a really interesting issue. If you have an IIR that has > an input that's a mix of an intended signal and random noise, and if that > random noise is of sufficiently high magnitude to randomize the least > significant bits of your filter states, then the filter will act like it > does not suffer from quantization noise, meaning that _in the expected > value_, the response will, indeed, bet infinite.
Hmmm. OK, say we put in an actual impulse (in addition to the noise). Now, when the output (from the impulse) is enough below the output noise, then you can't really say that you still see it.
> Yet in the real world, that can't be for any individual input sample, > because a collection of a finite number of state variables, each of which > can only take on a finite number of values, simply can't carry > information about an infinite number of past values.
Also, the available state can only be in bits that are changing. -- glen