Reading
Stories Mode

What is an IIR Filter?

~13 min read Lesson 1 of Module 8

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:

IIR Difference Equation
y[n] = \sum_{k=0}^{M} b_k\, x[n-k] - \sum_{k=1}^{N} a_k\, y[n-k]
y[n] is the output, x[n−k] are current and past inputs (b_k coefficients), and y[n−k] are past outputs (a_k feedback coefficients). The filter has M+1 feedforward taps and N feedback taps.

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:

IIR Transfer Function
H(z) = \frac{B(z)}{A(z)} = \frac{\sum_{k=0}^{M} b_k\, z^{-k}}{1 + \sum_{k=1}^{N} a_k\, z^{-k}}
The numerator polynomial B(z) creates zeros; the denominator polynomial A(z) creates poles. A filter of order N has N poles and up to M zeros.

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:

The Stability Condition

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 filter

This 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.

When it matters
Phase-Sensitive Signals
ECG/EEG waveforms, digital data eye diagrams, pulse-radar returns — any signal where waveform shape encodes information will be distorted by nonlinear phase. Use FIR instead.
When it doesn't
Magnitude-Only Applications
Audio tone controls, noise reduction, telephone band-limiting, power-line interference rejection — applications where only the spectral content matters tolerate nonlinear phase well.

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:

Audio
Tone Controls & EQ
Bass, midrange, and treble controls in amplifiers and digital mixing desks are biquad (second-order) IIR sections. Low computational cost, adjustable in real time.
Communications
Channel Filtering
Receive-path channel filters in GSM and DECT handsets use low-order IIR designs to reject adjacent channels efficiently on battery-powered hardware.
Control
PID & Loop Filters
Digital PID controllers and phase-locked loop filters are implemented as first- or second-order IIR sections — the recursive structure naturally implements integration.
Instrumentation
Anti-Aliasing & DC Removal
Simple first-order IIR filters (the "leaky integrator") provide DC blocking and single-pole anti-aliasing for ADC front-ends with minimal silicon area.
Key Takeaways
  • 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.
Previous Linear Phase Property Module Overview Next Butterworth, Chebyshev & Elliptic