The Other Half of Digital Filtering
Module 7 introduced FIR filters — simple, stable, and linear phase. But look at any analog filter you admire: a Butterworth low-pass, a Chebyshev bandpass, an elliptic notch. These elegant designs all share one structural feature that FIR filters lack: feedback. Their outputs loop back into future calculations, creating what are called IIR — Infinite Impulse Response — filters. Understanding IIR is the key to translating the rich world of classical analog filter design directly into the digital domain.
IIR filters are everywhere in practice: telephone networks, audio equalisers, control systems, biomedical devices. They achieve very sharp frequency selectivity with far fewer coefficients than an equivalent FIR design — making them indispensable when computational resources or memory are limited.
The Defining Idea: Feedback
Unlike an FIR filter, which uses only past inputs, an IIR filter also uses past outputs. Each new output sample depends on a weighted combination of current and past inputs and past output values. This recursive structure gives the filter its "infinite impulse response": a single impulse at the input can, in principle, ring forever in the output.
The general IIR difference equation is:
The b coefficients shape the zeros of the transfer function; the a coefficients create the poles. Both sets together determine the frequency response. This two-sided structure is what makes IIR filters so powerful — and what makes them potentially unstable.
The Transfer Function
Taking the Z-transform of the difference equation and solving for H(z) = Y(z)/X(z) gives the rational transfer function:
The poles of H(z) — the roots of A(z) — are the heart of IIR filter design. Their locations in the z-plane determine the filter's frequency selectivity and phase response. Placing poles near the unit circle (but inside it) creates a sharp peak in the magnitude response at the corresponding frequency.
Stability: The Critical Constraint
The price of feedback is the possibility of instability. Recall BIBO stability: for a stable filter, every bounded input must produce a bounded output. The necessary and sufficient condition for an IIR filter to be BIBO stable is:
An IIR filter is BIBO stable if and only if all poles of H(z) lie strictly inside the unit circle — that is, |z_pole| < 1 for every pole. A pole on or outside the unit circle causes unbounded growth in the output.
|pole| < 1 for all poles ⟺ BIBO stable IIR filterThis is not automatic. A carelessly designed IIR filter, or one whose coefficients are rounded by fixed-point arithmetic, can have poles that drift onto or outside the unit circle. Stability must be verified explicitly during design and monitored in implementation.
Efficiency: Fewer Coefficients, Sharper Transitions
The greatest practical advantage of IIR filters is efficiency. Because feedback introduces resonance, an IIR filter can achieve the same transition-band sharpness as an FIR filter with dramatically fewer coefficients. A classic comparison:
| Specification | FIR Taps Needed | IIR Order Needed | Speed-up Factor |
|---|---|---|---|
| Mild roll-off (−40 dB/decade) | 21 | 2 | ~10× |
| Moderate low-pass (−60 dB stop) | 63 | 5 | ~12× |
| Sharp bandpass (−80 dB stop) | 255 | 10 | ~25× |
| Elliptic notch (very sharp) | 1023 | 6 | ~170× |
For embedded DSP systems with tight memory and compute budgets — think hearing aids, modems, or real-time control loops — this efficiency advantage is decisive.
The Phase Trade-off
The power of IIR filters comes with a significant trade-off: nonlinear phase. Because the denominator of H(z) introduces frequency-dependent phase shifts from its poles, the group delay of an IIR filter is generally not constant across frequency. Different frequency components of a signal are delayed by different amounts, distorting the waveform shape passing through the filter.
For offline (non-real-time) processing, the zero-phase filtering technique (filtering forward then backward, e.g., MATLAB's filtfilt) eliminates phase distortion entirely — but it requires access to the entire signal and doubles the effective filter order.
IIR Filters in Practice
IIR filters are the first choice whenever computational economy matters and phase linearity is not required:
- An IIR filter uses past outputs as well as past inputs — the feedback loop is what makes it "infinite impulse response."
- The difference equation is y[n] = Σ b_k·x[n−k] − Σ a_k·y[n−k]; the a_k coefficients create poles in the transfer function.
- The transfer function H(z) = B(z)/A(z) is rational; its poles determine frequency selectivity and stability.
- BIBO stability requires all poles to lie strictly inside the unit circle — this must be verified explicitly and maintained in fixed-point implementations.
- IIR filters achieve the same sharpness as FIR with dramatically fewer coefficients, making them far more efficient computationally.
- The trade-off is nonlinear phase: different frequencies are delayed by different amounts, distorting waveform shape. Zero-phase filtering (forward–backward) can eliminate this offline.
- IIR filters are preferred for audio tone controls, channel filtering, PID controllers, and any application where efficiency matters and phase linearity is not critical.