DSP 101
M9 · L2
Module 9 — Spectral Analysis
Periodogram & Welch's Method
From the noisy periodogram to a reliable PSD estimate — how averaging transforms spectral analysis.
1 / 9
DSP 101
M9 · L2
The Core Problem
Periodogram's Fatal Flaw
The periodogram (|DFT|²/N) is simple but fundamentally broken — its variance does not decrease with more data.
Periodogram
\hat{S}(\omega) = \frac{1}{N}\left|\sum_{n=0}^{N-1} x[n]\, e^{-j\omega n}\right|^2
Key fact
Var[Ŝ(ω)] ≈ S²(ω) regardless of N. Collecting 10× more data doesn't help — each bin still has one noisy estimate
2 / 9
DSP 101
M9 · L2
Statistical Properties
Bias vs. Variance
Every estimator is judged by bias (systematic error) and variance (random fluctuation). The periodogram fails on variance.
✓
Bias → 0
✗
Variance constant
✗
Inconsistent
- Asymptotically unbiased (bias shrinks with N)
- Variance ≈ S²(ω) — does NOT decrease with N
- Inconsistent estimator — never converges to truth
- Solution: average multiple independent estimates
3 / 9
DSP 101
M9 · L2
First Solution (1948)
Bartlett's Method
Split data into K non-overlapping segments of length M. Compute periodogram of each, then average — variance drops by K.
Bartlett's Estimator
\hat{S}_B(\omega) = \frac{1}{K}\sum_{i=0}^{K-1} \frac{1}{M}\left|\sum_{n=0}^{M-1} x_i[n]\, e^{-j\omega n}\right|^2
The trade-off
Shorter M → more segments → lower variance, but frequency resolution Δf = f_s/M worsens
4 / 9
DSP 101
M9 · L2
The Industry Standard (1967)
Welch's Improvements
Welch extended Bartlett with two additions that are now universal: overlapping segments and window functions.
- Overlap: segments share data (typically 50%) → more segments → lower variance without extra data
- Window: taper each segment with Hann/Hamming → eliminates spectral leakage from abrupt segment edges
- Result: smoother, more reliable PSD estimates
- Used in: MATLAB pwelch(), scipy.signal.welch()
5 / 9
DSP 101
M9 · L2
Design Choices
Tuning Welch's Parameters
Three knobs control the estimator — each trades resolution against variance:
- Segment length M: larger M → finer Δf but fewer segments (higher variance)
- Overlap %: more overlap → more segments → lower variance (diminishing returns past 75%)
- Window: Hann is general purpose; Kaiser gives adjustable sidelobe control
- Rule of thumb: Hann + 50% overlap for most applications
- No free lunch: total data fixes resolution × variance product
6 / 9
DSP 101
M9 · L2
In Practice
Where Welch Matters
- Noise floor measurement: thermal noise, phase noise characterization
- Vibration monitoring: rotating machinery resonance peaks
- EEG / biomedical: brain band power (delta, theta, alpha, beta)
- Audio analysis: room acoustics, speaker frequency response
- Communications: channel power spectral density, interference mapping
- Speech processing: spectral envelope estimation for codecs
7 / 9
DSP 101
M9 · L2
Key Takeaways
What You Learned
- Periodogram: unbiased but high-variance — variance ≈ S²(ω) regardless of N
- Bartlett: average K non-overlapping periodograms → variance ÷ K
- Welch: add overlap + window → more segments, less leakage
- Hann + 50% overlap is the most common practical choice
- Resolution and variance trade off — more data helps, but the trade-off remains
- pwelch() and scipy.signal.welch() implement Welch by default
9 / 9
1 / 8
muted