DSP 101
M8 · L4
Module 8 — IIR Filter Design
FIR vs. IIR — Trade-offs
Two filter families, one goal — but vastly different structures, efficiencies, and properties. Learn when to choose each.
1 / 9
DSP 101
M8 · L4
The Core Difference
Feedforward vs. Feedback
FIR sums weighted inputs only — no poles, no feedback. IIR adds weighted past outputs — recursive, with poles.
FIR
y[n] = \sum_{k=0}^{M} b_k\, x[n-k]
IIR
y[n] = \sum_{k=0}^{M} b_k\, x[n-k] - \sum_{k=1}^{N} a_k\, y[n-k]
2 / 9
DSP 101
M8 · L4
Efficiency Gap
Same Specs, 10× Fewer Coefficients
For a sharp lowpass filter with 0.1π transition band and 40 dB stopband:
60–80
FIR Taps
5th
IIR Elliptic Order
10×
Efficiency Ratio
Bottom line
Poles let IIR do in 5th order what FIR needs 60 taps to achieve
3 / 9
DSP 101
M8 · L4
Phase Behavior
Linear Phase — FIR Only
Symmetric FIR coefficients guarantee linear phase — every frequency is delayed equally and waveform shape is preserved. IIR group delay varies across the passband.
- Audio equalization: transient shapes must be preserved → FIR
- ECG / biomedical waveforms: diagnostic shapes matter → FIR
- Speech intelligibility, RF control loops: phase distortion tolerable → IIR
- Offline processing: filtfilt() gives zero phase from IIR at 2× cost
4 / 9
DSP 101
M8 · L4
Stability & Quantization
FIR Is Always Stable
No poles → FIR filters cannot go unstable under any quantization. IIR poles can migrate outside the unit circle when coefficients are rounded in fixed-point arithmetic.
- Solution: implement IIR as cascaded biquad sections (SOS)
- Each biquad controls only one pair of poles — far less sensitive to rounding
- Limit cycles (oscillations with zero input) are manageable in biquad form
- Floating-point IIR is largely immune to quantization instability
5 / 9
DSP 101
M8 · L4
Computational Cost
MACs Per Sample
Both types perform multiply-accumulate operations, but at very different scales. For a sharp lowpass response:
- FIR (50 taps): 50 MACs/sample
- IIR Elliptic (5th order): ~10 MACs/sample
- Long FIR with overlap-add: O(N log N) via FFT blocks
- IIR biquad chains: fixed small cost regardless of sharpness
Key insight
IIR wins on sample-by-sample real-time cost; FFT-FIR wins on very long filters in batch mode
6 / 9
DSP 101
M8 · L4
Decision Guide
When to Choose Which
- FIR: linear phase required — audio, ECG, coherent comms
- FIR: fixed-point and stability-critical embedded systems
- IIR: computationally constrained MCU or battery-powered device
- IIR: mimicking analog circuit (tone controls, crossovers)
- IIR: very sharp transition with minimal memory/power
- Either: audio crossovers — fidelity vs. efficiency trade-off
7 / 9
DSP 101
M8 · L4
Key Takeaways
What You Learned
- FIR: feedforward, unconditionally stable, exact linear phase possible
- IIR: recursive (poles), 10× more efficient, but nonlinear phase
- IIR instability under quantization — use cascaded biquads (SOS)
- Real-time linear phase → FIR; offline zero-phase → filtfilt()
- Match the filter type to your application's phase, stability, and resource constraints
9 / 9
1 / 8
muted