Filter Design Techniques
🎯 Learning Objectives
By the end of this topic, you should be able to:
- Understand the principles of FIR and IIR filter design.
- Apply windowing techniques to design FIR filters.
- Transform analog filter designs to digital using bilinear transform.
- Generate and visualize filter frequency responses using Python.
Introduction
Filter design is the process of determining the coefficients of a digital filter so that it meets specific performance criteria.
Two major categories exist:
- FIR (Finite Impulse Response) Filter Design
- IIR (Infinite Impulse Response) Filter Design
Each has unique design methods, advantages, and limitations.
FIR Filter Design Using Windowing
FIR filters are non-recursive and inherently stable. Their impulse response has a finite number of non-zero samples.
Ideal Filter
An ideal low-pass filter has the frequency response:
The corresponding impulse response is given by the inverse DTFT:
where ( M ) is the filter length.
Windowing
Direct truncation causes Gibbs phenomenon (ripples in the frequency response).
To reduce ripples, we multiply by a window function ( w[n] ):
Common windows:
- Rectangular: Simple truncation
- Hamming: Smooth edges, lower ripple
- Hanning: Similar to Hamming, slightly different coefficients
- Blackman: High attenuation in stopband

Python Example: FIR Window Design
Press Run Code: Output will appear here.
IIR Filter Design
IIR filters are recursive and can achieve sharper frequency responses with fewer coefficients.
However, stability must be carefully ensured.
Analog-to-Digital Transformation
We often start with an analog prototype filter and convert it to digital:
- Impulse Invariance: Matches the impulse response of analog filter to digital
- Bilinear Transform: Maps the s-plane to the z-plane, prevents aliasing
Example: Butterworth Low-pass Filter
Analog prototype:
where ( n ) = filter order, ( \omega_c ) = cutoff frequency.
Bilinear transform to digital, then compute coefficients ( b, a ) for:
Python Example: IIR Filter Design
Press Run Code: Output will appear here.
🎨 Interactive Filter Design Demo
FIR Window Comparison with Phase
Time Domain
Magnitude Response (Single-Sided FFT)
Phase Response (Single-Sided FFT)
Key Takeaways:
- FIR filters are always stable and can use windowing methods for design.
- IIR filters are recursive, more efficient but require careful stability analysis.
- Bilinear transform and impulse invariance convert analog filters to digital.
- Python
scipy.signalprovides easy functions for designing and visualizing filters.
🧠 Quick Quiz
Test your understanding of filter design techniques:
1) Which method reduces the Gibbs phenomenon in FIR filters?
2) Which IIR design method maps the s-plane to the z-plane?
3) Which filter type is inherently stable?
4) What is a key advantage of IIR filters over FIR filters?
5) In FIR windowing, what does the window function control?