FIR Filter vs. IIR Filter: Key Differences Explained
Advertisement
This article highlights the key differences between FIR (Finite Impulse Response) and IIR (Infinite Impulse Response) filters, two fundamental types of digital filters used in signal processing.
FIR Filter Explained
FIR filters use only current and past input digital samples to determine the current output sample value. They don’t rely on past output samples.
A simple FIR filter equation looks like this:
y(n) = h(0)x(n) + h(1)x(n-1) + h(2)x(n-2) + h(3)x(n-3) + h(4)x(n-4)
IIR Filter Explained
IIR filters, on the other hand, use the current input sample, past input samples, and past output samples to calculate the current output sample value.
A simple IIR filter equation is:
y(n) = b(0)x(n) + b(1)x(n-1) + b(2)x(n-2) + b(3)x(n-3) + a(1)y(n-1) + a(2)y(n-2) + a(3)y(n-3)
Key Differences Summarized
Here’s a breakdown of the core differences:
-
Transfer Function: FIR filters have a transfer function with only zeros, while IIR filters have both zeros and poles.
-
Memory: FIR filters generally require more memory than IIR filters.
-
Phase Response: FIR filters are preferred when a linear phase response is crucial.
-
Recursion: FIR filters are non-recursive (no feedback), whereas IIR filters are recursive (employ feedback).
-
Stability: FIR filters are inherently stable because they don’t use feedback. IIR filters can be unstable due to their recursive nature.
-
Power Consumption: FIR filters typically consume less power compared to IIR filters, which often require more power due to the increased complexity of the design and more coefficients.
-
Analog Equivalent: IIR filters have analog equivalents, while FIR filters do not.
-
Efficiency: FIR filters are generally less efficient than IIR filters.
-
Applications:
- FIR filters are commonly used for anti-aliasing, low-pass filtering, and baseband filtering.
- IIR filters find applications in notch (band-stop) and band-pass filtering.
-
Filter Order: FIR filters often need a higher order than IIR filters to achieve the same performance.
-
Delay: FIR filters introduce more delay than IIR filters.
-
Sensitivity: FIR filters exhibit lower sensitivity compared to IIR filters. (This can be considered a disadvantage of FIR filters.)
MATLAB Functions/Tools for FIR and IIR Filter Design
MATLAB provides a suite of tools and functions for designing and analyzing both FIR and IIR filters:
fir1
function: Used to obtain FIR filter coefficients.filter(chn, X)
function: Filters a baseband data vectorX
using the filter coefficients inchn
.FDATOOL
: A filter design and analysis tool.FIRRCOS
function: Designs a raised cosine FIR filter.butter
,bessel
,cheby1
,cheby2
,ellip
: These are IIR filter design functions for various filter types (Butterworth, Bessel, Chebyshev Type I & II, and Elliptic).