S7 · Lesson 31 · Power spectrum estimation
The power spectral density of random signals, the periodogram and why it doesn't improve with length, averaging by Bartlett and Welch, confidence intervals and units
Noise has a spectrum too, its power spectral density, and measuring it is one of the most common jobs in signal processing: the noise floor of a receiver, the vibration spectrum of a machine, the phase noise of an oscillator. The obvious estimate, the squared magnitude of one long FFT, has a surprising flaw. However long the record, each bin of it fluctuates by 100% of its own value, so the plot looks like grass. Averaging the spectra of many shorter segments tames the fluctuation, at the cost of resolution, and that trade between variance and resolution is the whole art of spectrum estimation.
- A histogram of single-bin power estimates for white noise of PSD 1, each the average of K independent periodograms (dashed: the theoretical density, a gamma distribution).
- With K = 1 the estimate is exponentially distributed: its standard deviation equals its mean, so individual readings range over more than 10 dB.
- Averaging K segments narrows the spread to of the mean. Eight segments bring it to 35%.
Predict
A periodogram of white noise from a 1,024-sample record is too noisy. What happens if the record is made 16 times longer and one 16,384-point FFT is taken?
They stay at 100%. A longer FFT gives more, narrower bins, each still an exponentially distributed estimate whose standard deviation equals its mean. The extra data is spent on resolution. Splitting the long record into 16 segments of 1,024 and averaging their periodograms keeps the original resolution and cuts the fluctuation to = 25%.
Name it
The power spectral density
For a wide-sense stationary signal with autocorrelation , the PSD is its DTFT, (Wiener–Khinchin), and the average power is . White noise of variance σ² has a flat PSD; in physical units the one-sided density is per hertz.
The periodogram
for the windowed segment v = wx, with . It's asymptotically unbiased, but its variance doesn't fall with N: for white noise each bin is exponential, standard deviation equal to the mean.
Averaging
- Bartlett: K non-overlapping segments, average their periodograms; variance falls by K, standard deviation by , while resolution worsens by K for a fixed record.
- Welch: windowed segments overlapping by 50%; a record that gives K plain segments gives about 2K − 1 overlapped ones, nearly independent with a Hann window, so the variance falls further at the same resolution.
- Confidence: an average of K independent periodograms is with 2K degrees of freedom. For K = 8, the true PSD lies between 0.555 and 2.32 times the estimate with 95% confidence, −2.6 to +3.6 dB.
Units
A bin's power (in V² per bin) becomes a density by dividing by its noise bandwidth, ENBW × hertz (lesson 29): .
Worked example
A record of 65,536 samples at 48 kHz is analyzed with 4096-point Hann segments, Bartlett style. How many segments, what spread and what resolution?
Show the solution
- Segments.
- Spread.
- Resolution. For Hann:
- With overlap. With 50% overlap (Welch) there would be 31 segments and a spread near 18%, for the same resolution.
Answer 16 segments, a standard deviation of 25% of the mean, and 23.4 Hz resolution.
Worked example
A 4096-point Hann FFT at 48 kHz shows a noise floor of −100 dB (V² per bin). What's the noise density?
Show the solution
- Bin noise bandwidth.
- Density. or about 2.4 µV/√Hz.
- Why the bin width matters. Quoting a "noise floor" without stating the bin width means nothing, since a longer FFT would show a lower floor for the same noise.
Answer −112.4 dB re 1 V²/Hz, about 2.4 µV/√Hz.
Worked example
The 65 536-sample record at 48 kHz is analyzed by Welch's method with 4096-point Hann segments overlapping by half. How many segments, and what spread?
Show the solution
- Segments. Half-overlapping segments start every 2048 samples, so fit.
- Spread if independent. against 25% for 16 Bartlett segments.
- Correlation. Overlapped Hann segments are slightly correlated, so the real figure is a little worse, but still better than Bartlett at the same 23.4 Hz resolution.
Answer 31 segments, with a spread a little worse than 18% of the mean.
Check
A Bartlett estimate averages 10 independent periodograms of white noise. What's its standard deviation, as a percentage of its mean?
Check
How many independent segments must be averaged for the estimate's standard deviation to be 10% of its mean?
Check
A 16384-sample record at 48 kHz is split into 4 Hann-windowed segments. What frequency resolution results?
Write units the way you normally would: 1.5 Hz, 1500 mHz and 0.0015 kHz are the same answer.
Check
An 8192-point FFT at 96 kHz with a window of ENBW 1.36 shows −90 dB per bin. What's the power spectral density, in dB per hertz?
Check
White noise of variance 1 V² is sampled at 8 kHz. What's its one-sided PSD in V²/Hz?
Check
A Welch estimate uses 1024-sample segments overlapping by 50% over 32768 samples. How many segments fit?
Check
A record of 65536 samples at 48 kHz is analyzed by Welch's method with 512-point Hann segments overlapping by half.
(a)
How many segments fit?
(b)
What resolution does each segment give?
Write units the way you normally would: 1.5 Hz, 1500 mHz and 0.0015 kHz are the same answer.
Check
White noise of variance v is sampled at s and its PSD estimated by averaging K independent periodograms.
Step 1
What is its one-sided PSD?
Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.
Step 2
What standard deviation does the estimate have?
Step 3
What is that as a fraction of the mean?
Explain why
Why doesn't a longer FFT make a periodogram of noise smoother?
Each bin of a periodogram measures the noise power in a band one bin wide, using the data available. Making the FFT longer narrows every bin in proportion, so each bin covers less bandwidth and still sees, in effect, only about two independent random numbers, the real and imaginary parts of its DFT value. The estimate in each bin therefore keeps the same relative randomness, an exponential distribution with standard deviation equal to its mean. The extra data has been spent on resolving finer frequency detail, not on averaging. To reduce the fluctuation, the data must instead be used for averaging, by splitting it into segments or smoothing across neighboring bins, which gives up resolution in exchange.
Practice
Keep practicing
10 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.