# Definitions of Discrete Power Spectrum and Discrete Power Spectral Density

I have been reading lots of posts about the scaling factors in PSD, and related topics on this forum. My understanding of the topic has been greatly improved. Thankyou all. I just need a little more to drive the concepts home.

My main question now is about the definition of power spectrum. First of all, what is its meaning? My intuitive understanding is that power spectrum gives the power of a signal at a particular frequency (signal power being analogous to real power, provided the signal can be assumed as a Voltage signal passed through a 1 ohm resistor, or other mechanically equivalent definition). The power of a signal is its amplitude squared (divided by 2 if we want average power and not peak power). Am I correct in this?

Amplitude of a particular frequency component in a (N Periodic assumed) signal is given by $$\frac{DFT}{N}$$ where N is signal length (no of samples). Because of finite no of samples, we have amplitudes at finite no of frequencies, and these amplitudes we get from $$\frac{DFT}{N}$$ are not the "exact" amplitude of the signal at that frequency, but a combination (kind of average, but not exactly the mathematical average. This is due to the difference of summing vs integration) of the amplitudes of all frequencies in one bin width (so like a representative amplitude at the bin centre). The DFT value is the one sided DFT, so the correction factor of 2 for negative frequencies is included in it.

Now from my intuitive understanding of signal power, the power spectrum of the signal (signal power in that freq bin) should then be $$(\frac{DFT}{N})^2$$. Then, if I add up the power spectrum of all the bins, I should get the total signal power. If power spectrum is defined in this way, then my logic carries me to power spectral density. Because, in my understanding, PSD is that function which when integrated across the frequency band of interest, gives the signal power in that band. So if I have power spectrum in each freq bin, then to get power spectral density, I divide by the bin width which is $$\frac{f_s}{N}$$ where fs is sampling frequency. So I will have PSD as $$\frac{DFT^2}{Nf_s}$$ which is the definition that I see mostly, and is implemented in MATLAB.

From answers here and here, the definition of power spectrum is as I expected. My question is, in many places eg. here, I also see power spectrum as defined by $$\frac{DFT^2}{N}$$ instead of $$(\frac{DFT}{N})^2$$. Also here, the power spectral density is given as $$\frac{DFT^2}{N}$$ without the fs. This formulation is used by many posts to show the equivalence to the fourier transform of the autocorrelation function. Why is there so many differences ? If I use the $$\frac{DFT^2}{N}$$ formula, I would not be able to recover the actual power in a signal right ? Also, why did the fs disappear ? Is it because N goes to infinity, so dividing by a positive fs doesn't matter in the limit?

Also, one more question : From the posts, I saw that PSD is really a tool for random signals, and not for signals containing certain frequencies you are looking for. For that, the power spectrum is better. Why is this so ? What does PSD do better for characterising random signals compared to taking the power spectrum of the same signal ?

• Dan’s answer is, as usual, on point. this answer might also give you some insights!
– Jdip
Feb 26 at 17:22
• Thanks a lot! So does that mean, PSD is used for broadband signals to better compare different measurements of the same signal with different no of samples ? as in the PSDs the level remains the same, while in power spectrum, the levels are different Feb 26 at 18:31
• Sure in a sense yes: the power spectrum measures the distribution of power vs frequency components, so its scaling preserves the correct power spectrum peak heights, while the PSD measures the distribution of power vs unit frequency, so its scaling preserves broadband power.
– Jdip
Feb 26 at 20:49
• Thanks! But Is it the main reason we use PSD though ?..or am I missing a greater point.. Feb 26 at 21:16
• As far as my personal experience, yes.
– Jdip
Feb 26 at 21:19

The power spectrum is useful for discrete tones, but for random signals as well as many other "almost" deterministic signals (such as modulated waveforms with random or pseudo-random data) the power spectral density is quite useful. Ultimately in all cases the spectrum is given with clarity on what "resolution bandwidth" was used for the measurement (as would be the case with using test equipment that measures spectrum: a spectrum analyzer). With that the units of the vertical axis are in power (or often in dB units as dBm, power relative to a mW in dB), and given the resolution bandwidth we know that each unit shown is the power in that bandwidth. We can then easily normalize that to dBm/Hz if we want a true power spectral density.

The instantaneous power of the signal is amplitude squared. For a sinusoid specifically, the average power would be amplitude squared divided by two, with the two being a natural result of the average of the squares for the instantaneous power going up and down versus time in that case. That said, it should now be clear how to get the power over any time interval as simply the average of the instantaneous power.

The power spectral density is the Fourier Transform of the Autocorrelation Function, so this results in the relationship and scaling as detailed in the linked posts. Any differences are due to what units are actually used.

What may help with "proper scaling" is to consider a simple example of a real sinusoid and it's Fourier Transform. The sinusoid is decomposed into exponential components as given with Euler's formula:

$$\cos(\omega t) = \frac{1}{2}e^{j\omega t} + \frac{1}{2}e^{-j\omega t}$$

It is much clearer, in my opinion, to realize that the Fourier Transform equally decomposes arbitrary signals into exponential components (discrete components in the case of the Fourier Series expansion and the Discrete Fourier Transform; DFT, or as a continuum in the case of the Fourier Transform and Discrete Time Fourier Transform; DTFT). Avoid the pitfall of thinking that the Fourier Transform decomposes waveforms into sinusoidal components as this thinking is restricted to real only waveforms so much less useful.

That said, the Fourier Transform will be just the coefficients of the $$e^{j\omega t}$$ terms, since those are the basis functions for the transform (the FT shows us all the components of $$e^{j\omega t}$$ for all $$\omega$$ that are in our time domain waveform). The DFT when given as follows is a correlation to each of these components:

$$X(k) = \sum_{n=0}^{N-1}x[n]e^{-j k\omega_o n }$$

The result will "grow" by $$N$$ in the summation as given, and thus we need to divide the result by $$N$$ if we want the answer to be in the same units as the FT above. (So if we had 1000 samples of a sinusoid that had a frequency that aligned with a bin, the DFT would have two non-zero values each at 500 corresponding to the expected FT, we normalize by dividing by $$N$$ and we get the expected 1/2. The total power would be the sum of squares, or $$(1/2)^2+(1/2)^2 = 0.5$$. Everything adds up. So the process as seen here is to divide by N first so that each bin is consistent with the actual time domain magnitudes in the time domain units used (as a coefficient of exponentials, not sinusoids!), and then sum square those values to get the total power. Each squared bin as $$(X[k]/N)^2$$ thus represents the total power over the resolution bandwidth of that bin, and a plot of that would be the power spectrum (where the resolution bandwidth should be given). If we continued to normalize the power in each bin by the resolution bandwidth of each bin, we would get the power spectral density. For the unwindowed DFT with no zero-padding, the relationship between resolution bandwidth and number of bins $$N$$ is $$1/N$$ where $$1$$ is the normalized frequency in units of cycles/sample (thus $$1 = f_s$$ where $$f_s$$ is the sampling rate. Thus for cases of a power spectral density we would normalize by that resolution bandwidth to get power per unit frequency resulting in $$(X[k])^2/N$$.

For real signals, the resulting DFT is complex conjugate symmetric, so we can use the first half of the DFT and then power sum each bin with its conjugate symmetric equivalent (half the power is in the positive frequency bin and the other half is in the negative frequency bin). Thus the power of each individual bin would be $$2(X[k]/N)^2$$. The resolution bandwidth of each positive only bin in this case is still $$1/N$$ (in units of cycles/sample, or $$f_s/N$$ in Hz), so the power spectral density for this case would be $$2(X[k])^2/N$$. It should also be specifically stated that the spectrum shown is "two-sided" meaning it includes the power in the positive and negative frequencies. As there are plots (phase noise is one example) where only one side is shown but also the power from the other sideband was not added- this is a "one-sided" power spectral density.

For specular tones that do not occupy any bandwidth, it would not make sense to plot a power spectral density but instead a power spectrum. This is the reason spurs do not show up accurately on phase noise plots where the power spectrum has been normalized by the resolution bandwidth of the instrument. When looking for spurs (specular tones) we plot the power spectrum. When looking at phase noise or other broad band waveforms where the power is spread out over frequency, we plot the power spectral density. In either case the plot needs to be clearly specified what we are looking at.

• Thankyou for your answer. I understand this method gives the correct average power when DFT is defined as shown. So after DFT we get a number which is scaled by the number of samples. Then we divide by N to get the coefficient of the exponentials. If we double that, we will get the amplitude of the sinusoid (right ?) Then for power we square these coefficients of exponentials. So shouldn't each squared bin be $(\frac{X(k)}{N})^2$? Why would it be $\frac{X(k)^2}{N}$? as written in the last paragraph? Feb 26 at 11:59
• I feel stupid cos I don't get it still :( . After taking DFT, a particular bin will have a magnitude of NA/2 . I get that. So that means $X(k) = \frac{NA}{2}$ right ? then we divide by N and multiply by 2 on each side, so we get $\frac{2X(k)}{N} = A$ Then for power we square and divide by 2 again on both sides so we get $\frac{2X(k)^2}{N^2} = \frac{A^2}{2}$. Where am I screwing up the maths.. Feb 26 at 16:04
• @S_holmes No you're right! I am the one that feels stupid. I updated my answer, please let me know if I cleared up both our misplaced feelings of stupidity. Feb 26 at 16:41
• Thankyou for being patient :). Okay so finally I get it. From the second last para, you also cleared up my question of missing "fs" in power spectral density formula used in other posts. So if I understand correctly, that is just a difference in units of "cycles/sample" and "Hz" right ? If it were Hz, then fs should be present, right ? Feb 26 at 17:09
• Also, I am still not sure what extra thing Power spectral density does for broadband signals, compared to power spectrum. Isn't it the same information? What advantages does PSD have over normal power spectrum ? In some places I read that normal power spectrum depends on no of samples (N), because we get integrated power in a bin, and the bin width depends on N. So then by dividing by N, we make multiple measurements which may have had different N values more comparable. Is it really the only reason? Everywhere I look its mostly PSD and not power spectrum.. Feb 26 at 17:15