This article summaries spectral analysis.

Power Spectral Density

TODO: (theoretical preparation to Spectral Density Estimation.)

Spectral Density Estimation

Spectral density estimation is estimating the power spectral density of a random signal from a time-series sample. The intensity of a frequency spectrum is often plot on a logarithmic scale, typically base-10 (decibel), reflecting the dynamic range (ratio of power spectral density) of spectral components.

Figure: A voice waveform over time and its broad power spectrum.

Spectral analysis involves a trade-off between resolving comparable strength components with similar frequencies and resolving disparate strength components with dissimilar frequencies. The following explains the cause and trade-off strategy in detail.


Sampling: the reduction of a continuous signal to a discrete signal, typically equal-spaced in time.

  • Sample rate: frequency of time series \( f_s \).
  • DFT sample frequency: sample rate divided by the number of DFT bins (typically equal to the sample length/count; preferably integer powers of 2).
  • Nyquist frequency (folding frequency): half sample rate; DFT spectrum folds and repeats its segment between zero and the Nyquist frequency.

Aliasing (effect of sampling on the frequency spectrum): periodic repetition of the entire spectrum.

Figure: continuous Fourier transform, Fourier transform of periodic summation, discrete time Fourier transform (DTFT), and discrete Fourier transform (DFT). Notice that sampling always introduces periodic spectral repetition.


Window function: a function of finite support that gets multiplied with a waveform before estimating its spectral density (on a finite time interval).

Spectral leakage (effects of windowing on the frequency spectrum): Windowing causes the true spectrum S(f) to be convoluted with the Fourier transform of the window function F{w}.

  • Equivalent noise bandwidth (ENBW): width of the lobes (rectangular shapes) the DTFT redistributed into.
  • Noise floor: power spectrum of the window function averaged over time, forming the base of a frequency spectrum, height (compared to the physical noise floor) proportional to ENBW.
  • Scalloping loss: the reduced power spectral density when a spectral component is not a multiple of the DFT sample frequency, with maximum loss equal to the power spectrum of the window function at half ENBW (compared to value at zero).

Choice of window function for spectral density estimation:

  1. rectangular window has the smallest spectral leakage but wide noise floor(?), good for analyzing a transient signal, harmonic content/distortion;
  2. high dynamic range (wideband applications)
Figure: Comparison of window functions.