DSP 101
M5 · L3
Module 5 — The Discrete Fourier Transform
Frequency Resolution
and Windowing

Why finite observation windows cause spectral leakage, and how window functions trade resolution for leakage suppression.

1 / 9
DSP 101
M5 · L3
The Core Problem
Finite Windows
Truncate Signals

Recording N samples is equivalent to multiplying by a rectangular window. In the frequency domain this is convolution — even a pure tone gets smeared across many bins.

Windowed Signal
x_w[n] = x[n] \cdot w[n]
2 / 9
DSP 101
M5 · L3
Spectral Leakage
Energy Spreads
Across Bins

The rectangular window's frequency response (Dirichlet kernel) has sidelobes at −13 dB. When a sinusoid falls between bins, these sidelobes spread its energy into neighboring bins.

No Leakage When
fsignal = k · fs/N — coherent sampling aligns the tone exactly with a bin.
3 / 9
DSP 101
M5 · L3
The Fix
Window Functions

Taper the signal smoothly to zero at both ends before computing the DFT. Lower sidelobes at the cost of a wider main lobe.

−13 dB
Rectangular
−31 dB
Hann
−58 dB
Blackman
4 / 9
DSP 101
M5 · L3
Most Common Window
The Hann Window

A raised-cosine taper — smoothly reaches zero at both ends, eliminating the abrupt cut-off that causes the rect window's severe sidelobes.

Hann Window
w[n] = 0.5\!\left(1 - \cos\!\tfrac{2\pi n}{N-1}\right)
5 / 9
DSP 101
M5 · L3
The Fundamental Trade-off
Resolution vs
Leakage

You cannot minimize both simultaneously. Better sidelobe suppression comes with a wider main lobe — meaning you need the tones to be further apart to distinguish them.

Effective Resolution
Δfeff = α · fs/N   (α ≈ 1 rect, ≈ 2 Hann, ≈ 3 Blackman)
6 / 9
DSP 101
M5 · L3
Practical Workflow
Choosing a Window
  • Rect — coherent sampling only (tones aligned to bins)
  • Hann — general-purpose default; good balance
  • Blackman — detecting weak signals next to strong ones
  • Kaiser(β) — tune the trade-off continuously
  • More data = better resolution; zero-padding only smooths the plot
  • Divide by Σw[n] to correct amplitude after windowing
7 / 9
DSP 101
Knowledge Check

Check what stuck

Four questions from this lesson. Answer to see why — the explanation appears whether you were right or wrong. Nothing is scored or saved.

Question 1 of 0
Score 0/0

8 / 9
DSP 101
M5 · L3
Key Takeaways
What You Learned
  • Finite observation → implicit rect window → convolution with Dirichlet kernel in frequency
  • Spectral leakage: energy from one tone spreads into adjacent bins
  • Coherent sampling (f = k·f_s/N) eliminates leakage
  • Window functions taper to zero — trade wider main lobe for lower sidelobes
  • Hann (−31 dB) is the standard default; Blackman (−58 dB) for high dynamic range
  • Effective resolution Δfeff = α·f_s/N where α ≥ 1 depends on window
  • More data improves resolution; zero-padding only makes the plot look smoother
Read full article →
9 / 9
1 / 8 muted