FIR and IIR filters are essential tools in digital signal processing. FIR filters offer stability and linear phase response but require more coefficients. IIR filters are computationally efficient but can be unstable and introduce phase distortion.
Filter design techniques vary for FIR and IIR filters. FIR methods include windowing, frequency sampling, and optimization. IIR techniques involve impulse invariance, bilinear transformation, and pole-zero placement. Each approach has unique trade-offs in complexity, stability, and performance.
FIR and IIR Filter Design Techniques
FIR vs IIR filter characteristics
- FIR (Finite Impulse Response) filters
- Non-recursive filters only use current and past input values to calculate output
- Guaranteed to be stable since output does not depend on past output values
- Can achieve linear phase response important for minimizing phase distortion (audio processing)
- Require higher filter orders to achieve sharp cutoff frequencies (more coefficients and computational complexity)
- IIR (Infinite Impulse Response) filters
- Recursive filters use current and past input values, as well as past output values to calculate output
- May become unstable if poles are located outside the unit circle in the z-plane (oscillations or divergence)
- Cannot achieve linear phase response due to their recursive nature (introduces phase distortion)
- Require lower filter orders for sharp cutoff frequencies compared to FIR filters (more computationally efficient)
FIR filter design methods
- Windowing method
- Multiplies the ideal impulse response by a window function (Hamming, Hanning, Blackman, Kaiser)
- Adjusts trade-off between transition band width and stopband attenuation based on window choice
- Simple to implement but limited control over frequency response characteristics
- Frequency sampling method
- Specifies desired frequency response at equally spaced frequency points
- Computes filter coefficients using the inverse discrete Fourier transform (IDFT)
- Allows for arbitrary frequency response specifications (multi-band filters)
- Optimized methods
- Minimizes error between desired and actual frequency response using optimization techniques
- Least squares minimizes sum of squared errors
- Chebyshev approximation minimizes maximum error (equiripple design)
- Remez exchange algorithm iteratively optimizes Chebyshev approximation
- Provides better control over frequency response compared to windowing and frequency sampling
IIR filter design techniques
- Impulse invariance method
- Obtains IIR filter coefficients by sampling the impulse response of an analog filter
- Preserves shape of analog frequency response but suffers from aliasing due to mapping to discrete-time
- Suitable for designing simple lowpass and highpass filters
- Bilinear transformation method
- Maps analog filter transfer function to digital domain using bilinear transform: $s = \frac{2}{T} \frac{z-1}{z+1}$
- Provides one-to-one mapping between analog and digital frequency domains
- Introduces frequency warping which can be compensated by pre-warping analog frequency specifications
- Pole-zero placement method
- Designs IIR filter by directly specifying pole and zero locations in the z-plane
- Allows complete control over filter's frequency response
- Requires knowledge of relationship between pole-zero locations and frequency response (stability, resonance)
Trade-offs of FIR vs IIR filters
- Complexity
- FIR filters require higher orders than IIR for similar frequency response (more coefficients, memory, computation)
- IIR filters more computationally efficient due to recursive nature (fewer coefficients, less memory)
- Stability
- FIR filters always stable because they have no feedback (no poles)
- IIR filters may be unstable if poles located outside unit circle in z-plane (oscillations, divergence)
- Phase response
- FIR filters can have linear phase important for minimizing phase distortion (audio, data communications)
- IIR filters cannot have linear phase due to recursive nature (introduces phase distortion)
- Group delay
- FIR filters with linear phase have constant group delay (all frequencies delayed by same amount)
- IIR filters have frequency-dependent group delay which can cause dispersion in time domain (smearing, echoes)