# What, mathematically, is the power spectrum of a signal?

Given a signal $$f(t)$$ defined on $$t\in(-\infty,\infty),$$ what is the precise definition of the power spectrum of $$f$$, i.e., what is the mathematical operation that takes $$f$$ to the output of an ideal spectrometer applied to $$f$$?

Wikipedia defines the energy spectral density as

$$S(\omega)=|\hat{f}(\omega)|^2,$$

where $$\hat{f}$$ is the Fourier transform of $$f$$. But this cannot be what a spectrometer outputs, for at least two reasons:

1. The Fourier transform (and hence $$S$$) are defined on negative frequencies, while spectrometers only output values at positive frequencies.
2. The Fourier transform does not change over time, while the output of a spectrometer certainly changes over time.

I am guessing there must be characteristic timescales involved in the workings of the spectrometer, which must be taken into account.

Please note that I am looking for the mathematical description of how spectrometers generate an output from a given input, not the physical workings of the spectrometer.

• What a spectrum analyzer does can typically be described as a periodogram, see en.m.wikipedia.org/wiki/Periodogram. Note that there are different methods of doing this, e.g., by using different windowing functions. I would expect that the manual has some information on how the spectrum is actually obtained. The details can be important, for example if you do statistical analysis of the resulting spectrum. – sebhofer Jun 19 at 14:14

1. The Fourier transform (and hence $$S$$) are defined on negative frequencies, while spectrometers only output values at positive frequencies.

For any real-valued signal, $$f(\omega) = f(-\omega)^*$$, which implies that the negative frequencies don't carry any information not already in the positive frequencies. Therefore, whether you say the domain is all frequencies or only positive frequencies is just a detail, with no real implications. (The power spectral density $$S(\omega)$$ typically only includes positive frequencies, but whether a factor of $$2$$ appears in the definition to compensate for the lack of negative frequencies is convention dependent. If you're unsure, consult the user manual for your spectrometer.)

1. The Fourier transform does not change over time, while the output of a spectrometer certainly changes over time.

Roughly speaking, a spectrum analyzer looks at the output over a finite time window $$\tau$$ (which you can set by pushing appropriate buttons, see your user manual), and calculates the Fourier transform of that finite time series.

A "true" power spectral density (i.e. what the mathematicians use) is defined by taking an ensemble average, or equivalently by integrating over an infinite time. A spectrum analyzer produces an estimate of this power spectral density by integrating over only a finite time. This introduces statistical fluctuations into each bin, and also smears all features over a frequency width $$\Delta \omega \sim 1 / \tau$$ by the uncertainty principle.

Of course, in reality every specific instrument has other limitations, which can only be understood with physics. Frankly, it seems to me that your quest to understand physical phenomena while forbidding mention of the "physical workings" of any object involved is deeply misguided and will make everything unnecessarily difficult.

• Nice answer, there's just one point of confusion I still have. For a Gaussian signal $f(t)=\exp[(t-t_0)^2/\tau^2]$, the "mathematician's" spectrum, the Fourier transform, will just be a static Gaussian. Whereas any real spectrometer will measure nothing except near $t=t_0$. So it doesn't seem reasonable to say that real spectrometers "approach" the Fourier transform, even in the limit that their characteristic timescales become very small. – WillG Jun 19 at 1:28
• I was only trying to avoid mention the workings of the spectrometer because some concepts in physics become more clear when stated in precise mathematical language. – WillG Jun 19 at 1:30
• @WillG The power spectral density is defined for a stationary stochastic process, one which is doing the same kind of thing at all times. A single Gaussian pulse isn't such a process, while, e.g. white noise is. – knzhou Jun 19 at 1:32
• @WillG Of course, if you have a one-time pulse, then a large window that doesn't capture the pulse will never be a good approximation of the pulse. But for a stationary process, a larger window will give you a better idea of the long run behavior. – knzhou Jun 19 at 1:33