University of Glasgow · FACULTY OF ELECTRICAL ENGINEERING

ENG5027 Chap.8 FIR Design by Windowing

- one subject, every graph, every model, every mark
7 Chapters3-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 8 of 13 · ENG5027

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.

In this chapter

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

Q [6 marks]. Design a lowpass with cut-off 0.15 cycles per sample by the windowing method. Give the centre tap and the taps at n = ±1 and ±2, then apply a Hamming weight of 0.54 + 0.46 cos(2πn/M) with M = 40 to the tap at n = 2. Our weighting of the parts is a study aid and not a published assessment scheme.
The ideal lowpass coefficients for cut-off 0.1 cycles per sample: the centre tap is 0.2 and the tails keep oscillating, so any finite filter must cut them off.The ideal lowpass coefficients for cut-off 0.1 cycles per sample: the centre tap is 0.2 and the tails keep oscillating, so any finite filter must cut them off.-12-6061200.10.2tap index n (centred)h(n)ideal lowpass, cut-off 0.1truncation cuts the tails
The ideal lowpass coefficients for cut-off 0.1 cycles per sample: the centre tap is 0.2 and the tails keep oscillating, so any finite filter must cut them off.
  • 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.
The centre tap is 0.30, the taps at ±1 are 0.2575 and at ±2 are 0.1514, and after the Hamming weight the tap at n = 2 becomes 0.1480.
Sia tip — Compute the centre tap from the limit, ωc/π for a lowpass, before using the sinc formula, which divides by zero at n = 0.
Glossary

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.
FAQ

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.

Study strategy

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.

A+Everything unlocked
Unlocks this Bible + all 26 of your subjects at University of Glasgow, plus 1,000+ more Bibles across the AskSia library.
Sia - your ENG5027 tutor, unlimited, worked the way the exam marks it
The full 3-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works