Power spectral density and white noise
لم يُترجم بعد؛ يُعرض باللغة الإنجليزية
عن هذا الدرس
You cannot predict the next sample of noise, but you can predict where its power sits in frequency. Follow a noise record sampled at 1 MHz: measure its power, take periodograms, average 64 of them until a flat line appears, and meet white noise, the area rule, the Wiener–Khinchin link to autocorrelation, and how a filter colours noise. It builds on the Maths lessons on random variables and the normal distribution and on the previous lesson, Autocorrelation; the white-noise level N0/2 defined here is what the matched filter and the noise module use for SNR.
Noise you cannot predict
A noise source feeds a converter that takes 1 million samples a second. Each sample is random: x[0] = 0.68 mV, x[1] = −0.36 mV, x[2] = −1.32 mV. Knowing one tells you nothing about the next.
fs = 1 MHz -> Ts = 1 µs between samples x[n]: Gaussian, mean 0, σ = 1 mV x[0] = 0.68 mV x[1] = −0.36 mV x[2] = −1.32 mV no formula gives the next value. we can still describe its AVERAGE behaviour (see Maths: random variables, normal distribution)
اقرأ الدرس خطوة بخطوة
Noise you cannot predict
A noise source feeds a converter that takes 1 million samples a second. Each sample is random: x[0] = 0.68 mV, x[1] = −0.36 mV, x[2] = −1.32 mV. Knowing one tells you nothing about the next.
fs = 1 MHz -> Ts = 1 µs between samples x[n]: Gaussian, mean 0, σ = 1 mV x[0] = 0.68 mV x[1] = −0.36 mV x[2] = −1.32 mV no formula gives the next value. we can still describe its AVERAGE behaviour (see Maths: random variables, normal distribution)Power: the average of x²
Square every sample and average: that is the power. For these 64 samples the mean of x² is 1.05 mV². The true value is the variance, σ² = 1 mV². Power, not the values, is what we can predict.
power P = E[x²] (mean square, into 1 Ω) mean of x² over 64 samples = 1.05 mV² mean of x² over 4096 samples = 0.99 mV² true value: σ² = 1 mV² the dashed lines mark ±σ = ±1 mV: about 68% of samples fall between themOne periodogram: a jumpy guess
Where in frequency does that power sit? Take the DFT of the 64 samples and square each bin: |X[k]|²·Ts/N. This periodogram swings from 0.06 to 4.3 µV²/Hz. One look at noise is noisy.
periodogram Î[k] = |X[k]|² · Ts / N N = 64, Ts = 1 µs bins every fs/N = 15.625 kHz units: mV² · µs = µV²/Hz (power per hertz) this one: 0.06 .. 4.3 µV²/Hz spread (std / mean) = 88% more samples in ONE DFT does not help: the bins get finer, not calmerAverage many periodograms
Cut the record into segments, take a periodogram of each, and average them bin by bin (Bartlett's method). The bumps shrink like 1/√K: after K = 64 segments the spread drops from 88% to 13%.
Ŝ_K[k] = (1/K) Σ Î_r[k], r = 1 .. K K doubles: 1, 2, 4, 8, 16, 32, 64 spread ≈ 1/√K (independent segments) K = 1 -> 88% K = 64 -> 13% (1/√64 = 12.5%) record: 64 × 64 = 4096 samplesFlat means white
The average settles on a flat line: every frequency holds the same power per hertz. Noise like this is called white, after white light. Its power spectral density is S(f) = σ²·Ts = 1 µV²/Hz.
white noise: S(f) = constant S(f) = σ² · Ts = σ² / fs = 1 mV² / 1 MHz = 1 µV²/Hz for −500 kHz < f < 500 kHz average of the 64-segment estimate: 0.99 µV²/Hz PSD = power spectral densityThe area is the power
A density is spread over a width. Multiply 1 µV²/Hz by the 1 MHz band from −500 to +500 kHz: 1,000,000 µV² = 1 mV². The area under the PSD is the total power, σ².
P = ∫ S(f) df over −fs/2 .. fs/2 = 1 µV²/Hz × 1 000 000 Hz = 1 000 000 µV² = 1 mV² = σ² power in any band = area over that band e.g. 0 .. 100 kHz (both signs): 1 × 200 000 = 0.2 mV²PSD = transform of autocorrelation
The autocorrelation R[m] of white noise is one spike: R[0] = σ², and every other lag is near 0 (here at most 0.02). The Fourier transform of a spike is flat. That link, PSD = transform of R, is the Wiener–Khinchin theorem.
R[m] = E[x[n]·x[n+m]] (previous lesson) measured over 4096 samples: R[0] = 0.99 mV² R[1] = 0.01 mV² |R[m]| ≤ 0.02 for m ≠ 0 white: R[m] = σ² δ[m] Wiener–Khinchin: S(f) = Ts · Σ R[m] e^(−j2πf·m·Ts) = Ts · σ² (flat)A filter colours the noise
Send the noise through a 4-point moving average. Neighbours now share samples, so R[1] = 0.19 mV², and the PSD becomes |H(f)|²·S(f): high frequencies drop, with zeros at ±250 kHz. Power falls to 0.25 mV²: the area.
y[n] = (x[n] + x[n−1] + x[n−2] + x[n−3]) / 4 S_y(f) = |H(f)|² · S_x(f) |H(f)| = |sin(4πf/fs) / (4·sin(πf/fs))| zeros at ±250 kHz and ±500 kHz R_y[m] = σ²(4 − |m|)/16: 0.25, 0.19, 0.13, 0.06 power: σ² · Σh² = 0.25 mV² (measured 0.25) not white any more: coloured noisePSD in Python
In Python with numpy: draw 64 segments of 64 samples with σ = 1 mV (written in volts), FFT each row, square, average down the columns and divide by N·fs. S comes out near 1e−12 V²/Hz = 1 µV²/Hz.
import numpy as np rng = np.random.default_rng() x = rng.normal(0, 1e-3, (64, 64)) X = np.fft.fft(x, axis=1) S = (abs(X)**2).mean(0) / (64*1e6) >>> S.mean() # varies from run to run 1.0e-12 (about) scipy.signal.welch(x, fs) does the same job, with a Hann window, 50% overlap, and a one-sided result (positive f, doubled) (Python 3 with numpy)Real white noise: N0/2
Warm resistors make real white noise. At 290 K its available power density is kT = 4.00×10⁻²¹ W/Hz, or −174.0 dBm/Hz. Links write white noise as N0/2 per hertz, two-sided. The matched filter uses it for SNR.
thermal (Johnson–Nyquist) noise: open-circuit voltage PSD = 4kTR V²/Hz 1 kΩ at 290 K: 4.00 nV/√Hz available power: kT per hertz k = 1.380649×10⁻²³ J/K, T = 290 K kT = 4.00×10⁻²¹ W/Hz = −174.0 dBm/Hz communications: S(f) = N0/2, both signs of f -> SNR of the matched filter (next module)
أسئلة سريعة: 5
اختر إجابة واحدة لكل سؤال. يمكنك تغيير اختياراتك قبل التحقق منها.
01White noise with σ = 2 mV is sampled at fs = 1 MHz. What is its two-sided PSD?
S(f) = σ²·Ts = (2 mV)² × 1 µs = 4 mV²·µs = 4 µV²/Hz, flat from −500 to +500 kHz. Check: 4 µV²/Hz × 1 MHz = 4 mV² = σ².
02One 64-point periodogram of noise looks very jumpy. What makes the estimate calmer?
A longer DFT only gives finer bins that are just as jumpy. Averaging K independent periodograms shrinks the spread like 1/√K (Bartlett's method); scipy.signal.welch does this with overlap and a window.
03A noise signal's autocorrelation is R[0] = σ² and R[m] = 0 for every other lag m. Its PSD is:
By the Wiener–Khinchin theorem the PSD is the Fourier transform of R[m], and the transform of a single spike is a constant. That is white noise.
04White noise of power 1 mV² goes through the 4-point moving average h = [¼, ¼, ¼, ¼]. What is the output power?
S_y = |H|²·S_x, and its area is σ²·Σh² = 1 × 4 × (1/4)² = 0.25 mV². The filter removes most of the high-frequency power.
05At 290 K, kT ≈ 4.00×10⁻²¹ W/Hz. How is this usually written in dBm/Hz?
4.00×10⁻²¹ W = 4.00×10⁻¹⁸ mW, and 10·log10(4.00×10⁻¹⁸) = −174.0 dBm. In −204 the power is still in watts (dBW), not milliwatts.
المسرد
- Power (of a random signal)
- The mean square value E[x²]. For zero-mean noise it equals the variance σ². Here measured as if the voltage drove 1 Ω.
- Power spectral density (PSD)
- Power per hertz, S(f). The area under it over a band is the power in that band; over all frequencies it is the total power.
- Periodogram
- A single-segment PSD estimate: |X[k]|²·Ts/N from an N-point DFT. Its spread does not fall when N grows.
- Bartlett's method
- Split the record into K segments, take each periodogram and average them bin by bin; the spread shrinks like 1/√K.
- White noise
- Noise whose samples are uncorrelated, so R[m] = σ²δ[m] and the PSD is flat. Named after white light.
- Wiener–Khinchin theorem
- The PSD of a wide-sense-stationary signal is the Fourier transform of its autocorrelation.
- Coloured noise
- Noise whose PSD is not flat, for example white noise after a filter: S_y(f) = |H(f)|²·S_x(f).
- N0/2
- The two-sided PSD of white noise in communications, in W/Hz. For thermal noise N0 = kT, about −174 dBm/Hz at 290 K.
الملاحظات والمصادر
- The noise is a seeded pseudo-random Gaussian record (σ = 1 mV, fs = 1 MHz, 64 segments of 64 samples), so every value in the figure is computed from this model and repeats exactly. A fresh run of the Python code gives different samples but the same averages.
- Power here means mean square value, as if the voltage drove 1 Ω: mV² for power and µV²/Hz for density (1 mV²·µs = 1 µV²/Hz). The plotted PSD is two-sided: it covers −500 to +500 kHz, so its area is the whole power.
- The periodograms use no window and no overlap (Bartlett's method). For white noise this estimate has the right mean at every bin; its spread falls like 1/√K only because the segments are independent.
- A. V. Oppenheim, A. S. Willsky, S. H. Nawab, Signals and Systems, 2nd ed., Pearson
- A. V. Oppenheim, R. W. Schafer, J. R. Buck, Discrete-Time Signal Processing, 2nd ed. (course text on MIT OCW 6.341: periodogram averaging, random signals)
- MIT OpenCourseWare 6.011 Introduction to Communication, Control, and Signal Processing (Oppenheim, Verghese): random processes, power spectra
- MIT OpenCourseWare 6.450 Principles of Digital Communications I (Gallager, Zheng)
- MIT OpenCourseWare 6.02 Introduction to EECS II: Digital Communication Systems
- MIT OpenCourseWare 6.341 Discrete-Time Signal Processing (A. V. Oppenheim)
- White noise (Wikipedia): uncorrelated zero-mean samples, flat PSD, named after white light
- Periodogram (Wikipedia): its variance does not fall as more samples are used
- Bartlett's method (Wikipedia): averaging periodograms of K segments
- Wiener–Khinchin theorem (Wikipedia): the PSD is the Fourier transform of the autocorrelation
- Johnson–Nyquist noise (Wikipedia): thermal noise PSD 4kTR, about −174 dBm per hertz
- NIST CODATA: Boltzmann constant k = 1.380 649 × 10⁻²³ J/K (exact)
- NumPy documentation: numpy.fft.fft
- NumPy documentation: numpy.random.Generator.normal (scale is the standard deviation)
- SciPy documentation: scipy.signal.welch (Hann window, 50% overlap, V²/Hz, one-sided by default)
اختبار يتاح بعد الخطوة الأخيرة.