Skip to main content

Hanning window low-pass FIR design

Short answer

Hanning window with M=81 (Δω=0.1π, 8π/M main lobe), α=40, cutoff ωc=0.3π. Filter: h(n)=0.5[1−cos(πn/40)]·sin(0.3π(n−40))/(π(n−40)), symmetric, h(40)=0.3.

Use Hanning window method to design a digital low-pass FIR filter with pass-band edge frequency ωp = 0.25π, stop-band edge frequency ωs = 0.35π where main lobe width of Hanning window is 8π/M, M is the filter length.

Specifications

ωp = 0.25π, ωs = 0.35π. Transition width Δω = 0.1π. The Hanning window has main-lobe width 8π/M, which is taken as the transition width.

Length and cut-off

M ≥ 8π/Δω = 8π/0.1π = 80. Choose M = 81 (odd, Type-I linear phase), α = (M−1)/2 = 40.

ωc = (ωp + ωs)/2 = (0.25π + 0.35π)/2 = 0.3π

Ideal impulse response

h_d(n) = sin(0.3π(n − 40)) / (π(n − 40)), n ≠ 40; h_d(40) = ωc/π = 0.3

Hanning window

w(n) = 0.5 [1 − cos(2πn/(M−1))] = 0.5 [1 − cos(2πn/80)], 0 ≤ n ≤ 80

Filter

h(n) = h_d(n) · w(n) = 0.5[1 − cos(πn/40)] · sin(0.3π(n−40)) / (π(n−40))

Some values (symmetric, h(n) = h(80 − n)):

nh_d(n)w(n)h(n)
00.00000.00000.0000
1−0.00660.0015−0.00001
2−0.00800.0062−0.00005
3−0.00270.0138−0.00004
40.00520.02450.00013
50.00910.03810.00035
100.00000.14640.0000
200.00000.50000.0000
300.00000.85360.0000
35−0.06370.9619−0.0612
380.15140.99380.1504
390.25750.99850.2571
400.30001.00000.3000

The full set is h(n) for n = 0 … 80, with H(z) = Σ h(n)z⁻ⁿ and linear phase −40ω. (Rounding of values in the table is to 4–5 decimals.)

Check

The numerical frequency response gives a stop-band peak of −43.9 dB (Hanning gives about 44 dB) and a pass-band ripple under 0.7 %, with the transition lying inside 0.25π to 0.35π.

Answer: Hanning window, M = 81, ωc = 0.3π, h(n) = h_d(n)·w(n) with h(40) = 0.3.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Digital Signal Analysis and Processing chapter 5 questions →