SS Notes
Complete guide to IIR filter design — Butterworth, Chebyshev, and elliptic designs, bilinear transform, stability, and implementation in cascade biquad form.
Introduction
IIR (Infinite Impulse Response) filters use feedback — the output depends not only on current and past inputs but also on past outputs. This feedback creates resonances and allows IIR filters to achieve very sharp frequency selectivity with far fewer coefficients than FIR filters. A simple 4th-order IIR filter (10 coefficients total) can achieve frequency selectivity that would require a 100+ tap FIR filter. This efficiency makes IIR filters the choice whenever computational resources are limited and linear phase is not critical.
For B.Tech students, IIR filters connect the analog filter design theory (Butterworth, Chebyshev, Bessel) to digital implementation through the bilinear transform. It is where classical analog circuit theory meets modern digital processing.
Difference Equation and Transfer Function
The general IIR filter difference equation is:
$$y[n] = \sum_{k=0}^{M} b_k x[n-k] - \sum_{k=1}^{N} a_k y[n-k]$$
The transfer function is:
$$H(z) = \frac{\sum_{k=0}^{M} b_k z^{-k}}{1 + \sum_{k=1}^{N} a_k z^{-k}} = \frac{B(z)}{A(z)}$$
The denominator $A(z)$ introduces poles — the filter's impulse response is an infinite sum of decaying (or growing) exponentials. Stability requires all poles of $A(z)$ to lie inside the unit circle: $|p_i| < 1$ for all poles.
Classical Analog Filter Prototypes
IIR filter design typically starts with an analog prototype and converts to digital form.
Butterworth (Maximally Flat)
The Butterworth filter has the flattest possible passband response. The squared magnitude of an $N$th-order Butterworth lowpass:
$$|H_a(j\Omega)|^2 = \frac{1}{1 + (\Omega/\Omega_c)^{2N}}$$
Properties:
- Passband is maximally flat (first $2N-1$ derivatives are zero at $\Omega = 0$)
- Monotonic magnitude response (no ripples anywhere)
- Roll-off: $-20N$ dB/decade in the stopband
- Pole locations: equally spaced on a circle in the left half s-plane
Chebyshev Type I (Equiripple Passband)
Allows ripple in the passband for sharper transition:
$$|H_a(j\Omega)|^2 = \frac{1}{1 + \epsilon^2 T_N^2(\Omega/\Omega_c)}$$
where $T_N$ is the $N$th-order Chebyshev polynomial and $\epsilon$ controls passband ripple ($\delta_p = 1/\sqrt{1+\epsilon^2}$).
For the same filter order $N$, Chebyshev has a sharper transition band than Butterworth, at the cost of passband ripple.
Chebyshev Type II (Equiripple Stopband)
Flat passband, equiripple stopband. Used when passband flatness is important but better stopband rejection than Butterworth is needed.
Elliptic (Cauer) Filter
Equiripple in BOTH passband and stopband:
$$|H_a(j\Omega)|^2 = \frac{1}{1 + \epsilon^2 R_N^2(\Omega/\Omega_c)}$$
where $R_N$ is a rational Chebyshev function. The elliptic filter achieves the sharpest possible transition for a given order — it is optimal in the minimax sense. The trade-off: ripple in both bands.
Comparison for order $N = 5$, same specifications:
- Butterworth: widest transition band
- Chebyshev I: medium transition, passband ripple
- Elliptic: narrowest transition, ripple in both bands
The Bilinear Transform
The bilinear transform converts an analog filter $H_a(s)$ to a digital filter $H(z)$:
$$s = \frac{2}{T} \cdot \frac{1 - z^{-1}}{1 + z^{-1}}$$
where $T$ is the sampling period. This maps:
- The entire left half s-plane → inside the unit circle (stable analog → stable digital)
- The $j\Omega$ axis → the unit circle (analog frequencies → digital frequencies)
- $s = 0$ → $z = 1$ (DC maps to DC)
- $s = \infty$ → $z = -1$ ($\Omega = \infty$ maps to $\omega = \pi$)
Frequency Warping
The mapping between analog and digital frequencies is nonlinear:
$$\Omega = \frac{2}{T}\tan\left(\frac{\omega}{2}\right)$$
This means: if you want the digital filter to have its cutoff at $\omega_c$, you must design the analog prototype with cutoff at:
$$\Omega_c = \frac{2}{T}\tan\left(\frac{\omega_c}{2}\right)$$
This "pre-warping" step is essential. Without it, the digital filter's critical frequencies will be in the wrong positions.
Complete IIR Design Procedure
- Specify digital filter requirements: passband frequency $\omega_p$, stopband frequency $\omega_s$, passband ripple $\delta_p$, stopband attenuation $\delta_s$
- Pre-warp frequencies: $\Omega_p = (2/T)\tan(\omega_p/2)$, $\Omega_s = (2/T)\tan(\omega_s/2)$
- Determine filter order: Use order formulas for the chosen prototype (Butterworth, Chebyshev, etc.)
- Design analog prototype: Find $H_a(s)$ that meets the pre-warped specifications
- Apply bilinear transform: Substitute $s = (2/T)(1-z^{-1})/(1+z^{-1})$ into $H_a(s)$
- Factor into second-order sections: Implement as cascade biquads
Stability Considerations
An IIR filter is stable if and only if all poles are inside the unit circle: $|p_i| < 1$.
In practice, stability can be compromised by:
- Coefficient quantization: When filter coefficients are rounded to fixed-point representation, poles may shift outside the unit circle
- Limit cycles: In fixed-point arithmetic, small oscillations can persist indefinitely due to rounding in the feedback loop
Cascade biquad implementation minimizes these issues because second-order sections have well-separated poles that are less sensitive to quantization.
Cascade Biquad Implementation
Factor the transfer function into second-order sections:
$$H(z) = K \prod_{i=1}^{L} \frac{b_{0i} + b_{1i}z^{-1} + b_{2i}z^{-2}}{1 + a_{1i}z^{-1} + a_{2i}z^{-2}}$$
Each section is a "biquad" (biquadratic filter) with at most 2 poles and 2 zeros. Implementation per section:
$$y_i[n] = b_{0i} x_i[n] + b_{1i} x_i[n-1] + b_{2i} x_i[n-2] - a_{1i} y_i[n-1] - a_{2i} y_i[n-2]$$
This requires only 5 multiplications and 4 additions per section — extremely efficient.
Worked Example
Design a 2nd-order Butterworth lowpass with cutoff at $\omega_c = 0.3\pi$ ($f_s = 1$).
Step 1: Pre-warp: $\Omega_c = 2\tan(0.3\pi/2) = 2\tan(0.4712) = 2 \times 0.5095 = 1.019$
Step 2: 2nd-order Butterworth analog prototype with $\Omega_c = 1$ (normalize first): $$H_a(s) = \frac{1}{s^2 + \sqrt{2}s + 1}$$
Step 3: Scale to actual cutoff: replace $s$ with $s/\Omega_c$: $$H_a(s) = \frac{\Omega_c^2}{s^2 + \sqrt{2}\Omega_c s + \Omega_c^2}$$
Step 4: Apply bilinear transform $s = 2(1-z^{-1})/(1+z^{-1})$ and simplify to get $H(z)$ in the form $\frac{b_0 + b_1z^{-1} + b_2z^{-2}}{1 + a_1z^{-1} + a_2z^{-2}}$.
IIR vs FIR: When to Choose IIR
Choose IIR when:
- Sharp frequency selectivity is needed with minimal computation
- Linear phase is NOT required
- Real-time processing with limited memory/computation
- Mimicking classical analog filter responses
Choose FIR when:
- Linear phase is required (audio, data communications)
- Stability must be guaranteed without analysis
- Fixed-point implementation with no limit cycle concerns
- Arbitrary magnitude response shapes
Key Takeaways
- IIR filters use feedback, achieving sharp selectivity with few coefficients but risking instability
- Classical designs: Butterworth (flat), Chebyshev (equiripple), Elliptic (sharpest transition)
- The bilinear transform maps analog prototypes to digital filters with frequency pre-warping
- All poles must be inside the unit circle for stability — verified by checking $|p_i| < 1$
- Cascade biquad sections minimize coefficient sensitivity and numerical issues
- IIR filters cannot achieve linear phase — use FIR if phase preservation is critical
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for IIR Filters.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this Signals & Systems topic.
Search Terms
signal-systems, signals & systems, signal, systems, digital, processing, basics, iir
Related Signals & Systems Topics