In statistical signal processing and physics, the spectral density, power spectral density (PSD), or energy spectral density (ESD), is a positive real function of a frequency variable associated with a stationary stochastic process, or a deterministic function of time, which has dimensions of power per Hz, or energy per Hz. It is often called simply the spectrum of the signal. Intuitively, the spectral density captures the frequency content of a stochastic process and helps identify periodicities.
Contents 
In physics, the signal is usually a wave, such as an electromagnetic wave, random vibration, or an acoustic wave. The spectral density of the wave, when multiplied by an appropriate factor, will give the power carried by the wave, per unit frequency, known as the power spectral density (PSD) of the signal. Power spectral density is commonly expressed in watts per hertz (W/Hz)^{[1]} or dBm/Hz.
For voltage signals, it is customary to use units of V^{2}Hz^{−1} for PSD, and V^{2}sHz^{−1} for ESD^{[2]} or dBμV/Hz.
For random vibration analysis, units of g^{2}Hz^{−1} are sometimes used for acceleration spectral density.^{[3]}
Although it is not necessary to assign physical dimensions to the signal or its argument, in the following discussion the terms used will assume that the signal varies in time.
The energy spectral density describes how the energy (or variance) of a signal or a time series is distributed with frequency. If f(t) is a finiteenergy (square integrable) signal, the spectral density Φ(ω) of the signal is the square of the magnitude of the continuous Fourier transform of the signal (here energy is taken as the integral of the square of a signal, which is the same as physical energy if the signal is a voltage applied to a 1ohm load, or the current).
where ω is the angular frequency (2π times the ordinary frequency) and F(ω) is the continuous Fourier transform of f(t), and F ^{*} (ω) is its complex conjugate.
If the signal is discrete with values f_{n}, over an infinite number of elements, we still have an energy spectral density:
where F(ω) is the discretetime Fourier transform of f_{n}.
If the number of defined values is finite, the sequence does not have an energy spectral density per se, but the sequence can be treated as periodic, using a discrete Fourier transform to make a discrete spectrum, or it can be extended with zeros and a spectral density can be computed as in the infinitesequence case.
The continuous and discrete spectral densities are often denoted with the same symbols, as above, though their dimensions and units differ; the continuous case has a timesquared factor that the discrete case does not have. They can be made to have equal dimensions and units by measuring time in units of sample intervals or by scaling the discrete case to the desired time units.
As is always the case, the multiplicative factor of 1 / 2π is not absolute, but rather depends on the particular normalizing constants used in the definition of the various Fourier transforms.
The above definitions of energy spectral density require that the Fourier transforms of the signals exist, that is, that the signals are squareintegrable or squaresummable. An often more useful alternative is the power spectral density (PSD), which describes how the power of a signal or time series is distributed with frequency. Here power can be the actual physical power, or more often, for convenience with abstract signals, can be defined as the squared value of the signal, that is, as the actual power if the signal was a voltage applied to a 1ohm load (i.e. the current). This instantaneous power (the mean or expected value of which is the average power) is then given by
Since a signal with nonzero average power is not square integrable, the Fourier transforms do not exist in this case. Fortunately, the Wiener–Khinchin theorem provides a simple alternative. The PSD is the Fourier transform of the autocorrelation function, R(τ), of the signal if the signal can be treated as a widesense stationary random process.^{[4]}
This results in the formula,
The ensemble average of the average periodogram when the averaging time interval T→∞ can be proved (Brown & Hwang^{[5]}) to approach the Power Spectral Density (PSD):
The power of the signal in a given frequency band can be calculated by integrating over positive and negative frequencies,
The power spectral density of a signal exists if and only if the signal is a widesense stationary process. If the signal is not stationary, then the autocorrelation function must be a function of two variables, so no PSD exists, but similar techniques may be used to estimate a timevarying spectral density.
The power spectrum G(f) is defined as^{[6]}
"Just as the Power Spectral Density (PSD) is the Fourier transform of the autocovariance function we may define the Cross Spectral Density (CSD) as the Fourier transform of the crosscovariance function."^{[7]}
The goal of spectral density estimation is to estimate the spectral density of a random signal from a sequence of time samples. Depending on what is known about the signal, estimation techniques can involve parametric or nonparametric approaches, and may be based on timedomain or frequencydomain analysis. For example, a common parametric technique involves fitting the observations to an autoregressive model. A common nonparametric technique is the periodogram.
The spectral density is usually estimated using Fourier transform methods, but other techniques such as Welch's method and the maximum entropy method can also be used.
The concept and use of the power spectrum of a signal is fundamental in electronic engineering, especially in electronic communication systems (radio & microwave communications, radars, and related systems). Much effort has been made and millions of dollars spent on developing and producing electronic instruments called "spectrum analyzers" for aiding electronics engineers, technologists, and technicians in observing and measuring the power spectrum of electronic signals. The cost of a spectrum analyzer varies according to its bandwidth and its accuracy.
The spectrum analyzer measures essentially the magnitude of the shorttime Fourier transform (STFT) of an input signal. If the signal being analyzed is stationary, the STFT is a good smoothed estimate of its power spectral density.
See Coherence (signal processing) for use of the crossspectral density.
