FIR filter design
Introduit| English | Sens |
|---|---|
| FIR | réponse impulsionnelle finie (RIF) |
| phase/feɪz/ | phase |
| Hamming window | fenêtre de Hamming |
The filter you can prove things about
- The FIR 有限脉冲响应 filter is always stable, because it has no feedback.
- With symmetric taps its phase is exactly linear, so it delays every frequency equally and keeps the waveform's shape.
An FIR filter is stable whatever its tap values.
Difficulté 1/5 · 100 pièces + un petit bonus lors de la première réussite aujourd'hui
Its impulse response is a finite list, so the sum of |h[n]| is always finite.
Window the ideal
- The ideal low-pass has an endless sinc as its impulse response. Cut it to $N$ taps by multiplying by a window $w[n]$.
- The window's own spectrum decides the result: its main lobe sets the transition width; its sidelobes set the stopband.
Match each feature of the window's spectrum to what it sets in the filter.
Difficulté 2/5 · 140 pièces + un petit bonus lors de la première réussite aujourd'hui
The window method is a lookup. Choose the window for depth, then N for width.
The window table
- Peak sidelobes: rectangular $-13$ dB, Hann $-31$ dB, Hamming window 海明窗 $-43$ dB, Blackman $-58$ dB.
- For Hamming, the transition width is about $3.3 f_{s}/N$. Pick the window for the stopband, then $N$ for the transition.
A filter needs at least 50 dB of stopband attenuation. Which window works?
Difficulté 1/5 · 100 pièces + un petit bonus lors de la première réussite aujourd'hui
Only Blackman's sidelobes sit below −50 dB. Its main lobe is wider, so it needs more taps for the same transition.
Linear phase
- Symmetric taps, $h[n] = h[N-1-n]$, give exactly linear phase 相位.
- Every frequency is delayed by the same $(N-1)/2$ samples, the group delay.

A symmetric FIR has 51 taps. What is its delay, in samples?
Difficulté 2/5 · 140 pièces + un petit bonus lors de la première réussite aujourd'hui
$(51 - 1)/2 = 25$ samples, the same for every frequency.
Worked example: size the filter
- At $f_{s} = 1$ kHz, a 100 Hz cutoff with a 50 Hz transition: $N = 3.3 \times 1000/50 = 66$. Take 67, odd and symmetric.
- The delay is $(67 - 1)/2 = 33$ samples, 33 ms. With only 31 taps the transition widens to 106 Hz.
A Hamming FIR at f_s = 8 kHz needs a 400 Hz transition. Using N ≈ 3.3 f_s / Δf, how many taps is that before rounding to odd?
Difficulté 2/5 · 140 pièces + un petit bonus lors de la première réussite aujourd'hui
$3.3 \times 8000/400 = 66$, so take 67 taps for a Type I filter.
That 67-tap filter runs at 8 kHz. What is its delay, in ms? Give 3 decimal places.
Difficulté 2/5 · 140 pièces + un petit bonus lors de la première réussite aujourd'hui
33 samples at 8 kHz is $33/8000 = 4.125$ ms.
Worked example: verify the promise
- Compute the response of the 67 taps and measure it. The stopband should reach $-43$ dB or lower.
- If it reads $-37$ dB, the window or $N$ is wrong. Only the measurement catches that.
A Hamming design measures a stopband of only −37 dB. What does that tell you?
Difficulté 1/5 · 100 pièces + un petit bonus lors de la première réussite aujourd'hui
A correct Hamming design reaches −43 dB. A shallower stopband points to a design error that only measurement reveals.
Three common slips
- Designing without measuring. Every FIR should ship with its measured response.
- An even $N$ when an odd, symmetric (Type I) filter was intended.
- Forgetting the delay. 33 ms matters inside a control loop.
Recap
- Window the ideal sinc: the sidelobes set the stopband, $3.3 f_{s}/N$ the transition.
- Symmetric taps give linear phase with delay $(N-1)/2$.
- Measure the response against every specification.