# What is the difference between PSD and squared magnitude of frequency spectrum?

The power spectrum of a signal can be calculated by taking the magnitude squared of its Fourier transform. Being an audio person, the signal of interest for me would be a time series.

How does this representation differ from a PSD (power spectral density), and importantly, in what practical situations should one use a PSD instead of the power spectrum described above?

The power spectral density describes the density of power in a stationary random process $$X(t)$$ per unit of frequency. By the Wiener-Khinchin theorem, it can be calculated as follows for a wide-sense stationary random process:

$$S_{xx}(f) = \int_{-\infty}^{\infty} r_{xx}(\tau) e^{-j2\pi f \tau} d\tau$$

where $$r_{xx}(\tau)$$ is the autocorrelation function of the process $$X(t)$$:

$$r_{xx}(\tau) = \mathbb{E}\left(X(t)X(t - \tau)\right)$$

This is only valid for a wide-sense stationary process because its autocorrelation function is only a function of the time lag $$\tau$$ and not the absolute time $$t$$; stated differently, this means that its second-order statistics don't change as a function of time.

With that said, if you have a sufficiently-detailed and accurate statistical model for your signal, then you can calculate its power spectral density using the relationship above. As an example, this can be used to calculate the power spectral density of communications signals, given the statistics of the information symbols carried by the signal and any pulse shaping employed during transmission.

In most practical situations, this level of information is not available, however, and one must resort to estimating a given signal's power spectral density. One very straightforward approach is to take the squared magnitude of its Fourier transform (or, perhaps, the squared magnitude of several short-time Fourier transforms and average them) as the estimate of the PSD. However, assuming that the signal you're observing contains some stochastic component (which is often the case), this is again just an estimate of what the true underlying PSD is based upon a single realization (i.e. a single observation) of the random process. Whether the power spectrum that you calculate bears any meaningful resemblance to the actual PSD of the process is situation-dependent.

As this previous post notes, there are many methods for PSD estimation; which is most suitable depends upon the character of the random process, any a priori information that you might have, and what features of the signal you're most interested in.

• I agree but would like to point out that any exploratory measure of real-world noise/signal is just an estimate. Accepting that we need to formulate "good enough"; a criterion. Then we can get off the noise train and accept an estimate that meets the "noise figure" of the application. Accept some failures in life, and you can have some wins. Apr 24, 2018 at 20:26