ENع
→PSD and white noise
الدرس 51 · Multirate and random signals

Power spectral density and white noise

لم يُترجم بعد؛ يُعرض باللغة الإنجليزية

18 دقيقة10 خطوات5 أسئلةAdvanced
عن هذا الدرس

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.

ستتعلّم

حدّد ما تشعر بأنك أتقنته. هذا التقييم الذاتي لا يؤثر في درجة الدرس.

شكل 51 · تفاعلي
01 / 10

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)
جارٍ تحميل الرسم…
أو ← →
اقرأ الدرس خطوة بخطوة
  1. 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)
  2. 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 them
  3. One 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 calmer
  4. Average 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 samples
  5. Flat 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 density
  6. The 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²
  7. 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)
  8. 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 noise
  9. PSD 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)
  10. 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)

اختبار يتاح بعد الخطوة الأخيرة.