ENG5027 Chap.8 FIR Design by Windowing
FIR Design by Windowing
FIR Design by Windowing derives filter coefficients from the response you want. The inverse Fourier transform of an ideal frequency response gives its impulse response; for an ideal lowpass this is a sinc that is symmetric, infinitely long and non-causal.
The lecture's five-step recipe turns it into a usable filter: define the ideal response, take the inverse transform, mirror it for negative indices, shift it into positive time so that it becomes causal, and truncate or window it to a finite length. Truncation alone is equivalent to a rectangular window, which produces ripple at the band edges and limits the stopband.
The worked design is a bandstop that removes 45 to 55 Hz at a 500 Hz sampling rate with 401 coefficients. Integrating over the two passbands gives a closed form for every tap except the centre, which follows from L'Hôpital's rule as one minus the stop fraction of the band. Without a window this design rings and reaches only about minus 25 decibels in the stopband.
Multiplying the coefficients by a window improves it: the triangular Bartlett window removes the ringing, the Hann window gives very little ripple and about minus 56 decibels with a wider transition, the Hamming window gives virtually no passband ripple, and the Blackman window gives the best stopband with the widest transition.
Passband ripple, stopband rejection and transition width are the three criteria for choosing among them.
What this chapter covers
- 01
Inverse Fourier transform of an ideal response
- 02
The sinc impulse response of a lowpass
- 03
The five-step windowing recipe
- 04
Bandstop coefficients and the centre tap
- 05
Truncation as a rectangular window
- 06
Bartlett, Hann, Hamming and Blackman windows
- 07
Ripple, rejection and transition width
Worked example · free
Centre taps of a windowed lowpass
- 1The cut-off in radians is ωc = 2π × 0.15 = 0.9425, and the centre tap is ωc/π = 0.30.
- 2For n ≠ 0, h(n) = sin(ωc n)/(πn): h(±1) = sin(0.9425)/π = 0.2575.
- 1h(±2) = sin(1.885)/(2π) = 0.1514.
- 2The Hamming weight at n = 2 is 0.54 + 0.46 cos(0.3142) = 0.9775, so the windowed tap is 0.1480.
Key terms
- Ideal lowpass
- A filter specification with unity gain below the cut-off and zero gain above it.
- Passband ripple
- The variation of gain inside the passband caused by truncating the ideal response.
- Stopband rejection
- The attenuation a filter achieves in its stopband, usually quoted in decibels.
- Transition width
- The frequency span over which the response moves from passband to stopband.
FIR Design by Windowing FAQ
Why is the ideal impulse response non-causal?
The inverse transform of a brick-wall response is a sinc extending in both directions, so it has non-zero values before time zero. Truncating it and shifting it forward makes it causal at the price of a delay.
Which window should I choose?
It depends on the application. Blackman gives the deepest stopband but the widest transition, Hamming keeps the passband flattest, and Hann offers a balance, so the choice follows whether rejection or a sharp edge matters more.
Does a longer filter fix the ripple?
A longer filter narrows the transition band, but with a rectangular window the size of the ripple next to the edge stays about the same. Reducing the ripple needs a smoother window, not only more taps.
Exam move
Work through the recipe end to end at least twice. Derive the ideal lowpass coefficients from the inverse transform, then do the bandstop integral yourself and find the centre tap with the limit. Evaluate a few taps numerically for the lecture's 45 to 55 Hz example, then for a new specification of your own, and check that the centre tap equals one minus the fraction of the band that is stopped.
Sketch each window over the same length and write one sentence on its effect, using the three criteria. Then explain, in a short paragraph, why truncation causes ripple and why a taper reduces it.
Exam parts often ask for a design and a justification, so practise stating the window choice in terms of the application, for example deep mains rejection on an ECG against a sharp edge for audio, and close with the delay of the resulting causal filter.
Working through FIR Design by Windowing in ENG5027? Sia is AskSia’s AI Electrical Engineering tutor — ask any ENG5027 FIR Design by Windowing question and get a clear, step-by-step explanation grounded in how ENG5027 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.