---
title: "Hanning window low-pass FIR design"
subject: "Digital Signal Analysis and Processing"
chapter: 5
key: "semester_7/digital_signal_analysis_and_processing:fir-hanning-window-design"
source: https://www.bctengineer.com/q/semester_7/digital_signal_analysis_and_processing/fir-hanning-window-design
site: BCT Engineering
---

# Hanning window low-pass FIR design

Digital Signal Analysis and Processing · Chapter 5: FIR Filter Design

- Asked in: 2070 Asar, 9 marks
- Video: [FIR Filter Design NUMERICAL Problem (Low Pass) with HANNING Window | DSP](https://www.youtube.com/watch?v=enfwk_HcCDQ) — EC Academy
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/digital_signal_analysis_and_processing/fir-hanning-window-design
- Whole chapter: https://www.bctengineer.com/md/semester_7/digital_signal_analysis_and_processing/chapter-5

## Question

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.

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

## Answer

#### 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)):

| n | h_d(n) | w(n) | h(n) |
|---|---|---|---|
| 0 | 0.0000 | 0.0000 | 0.0000 |
| 1 | −0.0066 | 0.0015 | −0.00001 |
| 2 | −0.0080 | 0.0062 | −0.00005 |
| 3 | −0.0027 | 0.0138 | −0.00004 |
| 4 | 0.0052 | 0.0245 | 0.00013 |
| 5 | 0.0091 | 0.0381 | 0.00035 |
| 10 | 0.0000 | 0.1464 | 0.0000 |
| 20 | 0.0000 | 0.5000 | 0.0000 |
| 30 | 0.0000 | 0.8536 | 0.0000 |
| 35 | −0.0637 | 0.9619 | −0.0612 |
| 38 | 0.1514 | 0.9938 | 0.1504 |
| 39 | 0.2575 | 0.9985 | 0.2571 |
| 40 | 0.3000 | 1.0000 | 0.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.**

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What length is needed for transition 0.1pi with Hanning?
   A. M = 81
   B. M = 41
   C. M = 80 (even)
   D. M = 161
   Answer: A. M >= 8pi/0.1pi = 80; choose the odd value 81 so alpha = 40. (Key point: Filter length)

2. What is the cut-off?
   A. 0.25pi
   B. 0.35pi
   C. 0.1pi
   D. 0.3pi
   Answer: D. wc = (0.25pi + 0.35pi)/2 = 0.3pi. (Key point: Cut-off)

3. What is the Hanning window for M = 81?
   A. 0.5[1 - cos(2pi n/80)]
   B. 0.54 - 0.46 cos(2pi n/80)
   C. 1 for all n
   D. 0.5[1 + cos(2pi n/80)]
   Answer: A. Hanning is 0.5[1 - cos(2pi n/(M-1))], with M-1 = 80. (Key point: Hanning window formula)

4. What is h(40)?
   A. 0.3
   B. 0.15
   C. 0.6
   D. 0.25
   Answer: A. h_d(40) = wc/pi = 0.3 and w(40) = 1. (Key point: Centre tap)

## Related in Digital Signal Analysis and Processing

- [Low-pass FIR window design, αs = 40 dB](https://www.bctengineer.com/question.md?key=semester_7%2Fdigital_signal_analysis_and_processing%3Afir-lowpass-window-0-3-0-5-40) — Digital Signal Analysis and Processing, chapter 5, asked 2×
- [Low-pass FIR window design, αs = 41 dB](https://www.bctengineer.com/question.md?key=semester_7%2Fdigital_signal_analysis_and_processing%3Afir-lowpass-window-0-2-0-5-41) — Digital Signal Analysis and Processing, chapter 5
- [Kaiser low-pass FIR, passband 0.9π, stop 0.14π](https://www.bctengineer.com/question.md?key=semester_7%2Fdigital_signal_analysis_and_processing%3Akaiser-lowpass-0-9-0-14) — Digital Signal Analysis and Processing, chapter 5, asked 2×
- [Kaiser low-pass FIR, 0.19π and 0.21π](https://www.bctengineer.com/question.md?key=semester_7%2Fdigital_signal_analysis_and_processing%3Akaiser-lowpass-0-19-0-21) — Digital Signal Analysis and Processing, chapter 5, asked 2×
- [Rectangular window in FIR design; Gibbs oscillations](https://www.bctengineer.com/question.md?key=semester_7%2Fdigital_signal_analysis_and_processing%3Arectangular-window-gibbs) — Digital Signal Analysis and Processing, chapter 5, asked 2×
- [Describe FIR design by window method](https://www.bctengineer.com/question.md?key=semester_7%2Fdigital_signal_analysis_and_processing%3Awindow-method-describe) — Digital Signal Analysis and Processing, chapter 5, asked 2×

## Related in other subjects

- [Low pass to band stop transformation](https://www.bctengineer.com/question.md?key=semester_5%2Ffilter_design%3Alowpass-to-bandstop-transformation) — Filter Design, chapter 3, asked 10×
- [Band stop filter (2000 rad/s, 400 rad/s) from 3rd order](https://www.bctengineer.com/question.md?key=semester_5%2Ffilter_design%3Abandstop-2000-400-third-order) — Filter Design, chapter 3, asked 4×
- [How transformation reduces design steps; band stop design](https://www.bctengineer.com/question.md?key=semester_5%2Ffilter_design%3Abandstop-design-steps-reduction) — Filter Design, chapter 3
- [Low pass to band pass transformation](https://www.bctengineer.com/question.md?key=semester_5%2Ffilter_design%3Alowpass-to-bandpass-transformation) — Filter Design, chapter 3, asked 10×
