Power Spectral Density (PSD) describes how the power of a signal is distributed across frequency, expressed as power per unit frequency (e.g., V²/Hz or W/Hz). It is a widely used tool for characterizing noise, vibration, and other stochastic or continuous signals in both analog and digital domains, though other representations may be more appropriate depending on the analysis goal.
In practice
In embedded signal processing, the PSD is most commonly estimated from sampled data using the Discrete Fourier Transform (DFT) or FFT. A raw periodogram -- the squared magnitude of the FFT normalized by frequency resolution and window power correction -- gives a basic PSD estimate, but it is noisy. Welch's method, which averages periodograms from overlapping windowed segments, is a widely used practical approach for reducing variance. The Matlab function `pwelch` implements this directly, and the blog post "Use Matlab Function pwelch to Find Power Spectral Density -- or Do It Yourself" walks through both the built-in and manual approaches.
Correct normalization is one of the most common sources of confusion. Two conventions exist for real-valued signals: a one-sided PSD (defined for 0 to Fs/2, with the energy of the negative-frequency bins folded in) and a two-sided PSD (defined from -Fs/2 to Fs/2), though the exact frequency ranges and bin handling depend on whether the signal is real or complex and on the FFT or plotting convention used. When integrating a one-sided PSD over its frequency range, the result should equal the mean power of the signal. Getting this wrong by a factor of 2, or mishandling the DC and Nyquist bins, is a frequent mistake. The blog post "A Simplified Matlab Function for Power Spectral Density" addresses the normalization steps explicitly.
On resource-constrained MCUs, full Welch averaging may be too expensive. A common compromise is to use a single windowed FFT frame, accept the higher variance, or average magnitude-squared spectra over time in a running fashion without storing all segments at once. Fixed-point implementations on DSP cores (e.g., ARM Cortex-M4/M7 with CMSIS-DSP, or dedicated DSP chips like the TMS320 family) must account for scaling at each FFT butterfly stage to avoid overflow, which further complicates normalization.
The PSD is closely related to the autocorrelation function via the Wiener-Khinchin theorem: the PSD is the Fourier transform of the autocorrelation function (or autocorrelation sequence in the discrete-time case). This relationship is more than theoretical -- it explains why windowing in the time domain shapes the spectral leakage seen in a PSD estimate, a point illustrated in "Demonstrating the Periodic Spectrum of a Sampled Signal Using the DFT." Adding a power marker to a PSD plot to read off the integrated power in a band (as described in "Add a Power Marker to a Power Spectral Density (PSD) Plot") is a practical technique for quantifying noise in a specific frequency range, such as isolating mains hum or a switching regulator ripple component.
Discussed on DSPRelated
Frequently asked
What is the difference between a PSD and a plain FFT magnitude spectrum?
An
FFT magnitude spectrum shows the amplitude of each frequency bin and depends on the FFT length and
sample rate in ways that make comparison across different setups difficult. A PSD normalizes the squared magnitude by the frequency resolution (bin width, equal to Fs/N) and by any window correction factor, so the result has consistent units of power per hertz and is independent of FFT length. This makes PSD values meaningful across different measurements and systems.
What units does a PSD have, and how do I get total power back from it?
The units depend on the input signal: for a voltage signal they are typically V²/Hz, for a current signal A²/Hz, and so on. The mean-square value of the signal is recovered by integrating the PSD over frequency. For a voltage signal, for example, this gives mean-square voltage; converting to power requires knowing the load or normalization context. For a one-sided PSD, integrate from 0 to
Fs/2; for a two-sided PSD, integrate from -Fs/2 to Fs/2. In discrete form this means summing the PSD values and multiplying by the frequency bin width (Fs/N).
Why does my PSD estimate look so noisy, and how do I smooth it?
A single
periodogram (one
FFT frame) remains noisy even with long records -- the key issue is that variance does not decrease simply by lengthening the single frame. The standard fix is Welch's method: divide the signal into overlapping segments (typically 50% overlap), apply a
window function (Hann is common) to each segment, compute the periodogram of each, and average them. More segments give a smoother estimate at the cost of frequency resolution. The blog post 'Use Matlab Function pwelch to Find Power Spectral Density -- or Do It Yourself' demonstrates this trade-off concretely.
What is the difference between a one-sided and a two-sided PSD?
For a real-valued signal, the spectrum is conjugate-symmetric, so the negative-frequency half carries no additional information. A two-sided PSD covers -
Fs/2 to Fs/2 with the full power split across both halves. A one-sided PSD covers 0 to Fs/2 and doubles the values of all bins except DC and
Nyquist to conserve total power. Most engineering tools default to the one-sided form. If you mix conventions -- for instance, integrating a two-sided PSD only from 0 to Fs/2 -- you will underestimate power by a factor of 2.
How does windowing affect a PSD estimate?
Applying a time-domain window (Hann, Hamming,
Blackman, etc.) before the
FFT reduces spectral leakage caused by the implicit rectangular truncation of the signal. Each window shape trades off main-lobe width (frequency resolution) against side-lobe level (leakage rejection). After windowing, the PSD normalization must include a correction for the window's power, typically dividing by the sum of the squared window coefficients multiplied by the
sample rate. Failing to apply this correction causes the PSD amplitude to be too low by a window-dependent factor.
Differentiators vs similar concepts
PSD is often confused with the energy spectral density (ESD) and with the plain
FFT magnitude or power spectrum. ESD is appropriate for finite-energy, non-periodic signals (e.g., a single pulse) and has units of energy per hertz (such as V²·s/Hz in a voltage context, though the precise units depend on the signal quantity and physical interpretation); PSD (units: V²/Hz) is appropriate for finite-power, ongoing or stationary signals such as noise. The term "power spectrum" is used loosely in practice: it sometimes means the two-sided PSD, sometimes the one-sided PSD, and sometimes just the squared FFT magnitude without proper normalization -- this last usage is a common source of ambiguity rather than a settled convention. The blog post "The Power Spectrum" addresses this ambiguity. When precision matters, specify whether the quantity is normalized per hertz (density) or is an un-normalized bin power, and whether it is one-sided or two-sided.