Saturday 23 April 2016

psd - Power spectral density vs. FFT bin magnitude


What's the difference between these? Both are measurements of some form of signal power, but surely there's some difference between the power they are measuring?



Answer



The fast Fourier transform ($\textrm{FFT}$) algorithms are fast algorithms for computing the discrete Fourier transform ($\textrm{DFT}$). This is achieved by successive decomposition of the $N$-point $\textrm{DFT}$ into smaller-block $\textrm{DFT}$, and taking advantage of periodicity and symmetry.


Now, the $N$-point $\textrm{DFT}$ of a sequence $\{x[0], x[1],\cdots, x[N-1]\}$ is: \begin{equation} X(f_k) = \displaystyle \sum_{n = 0}^{N - 1} x[n]\exp\left(-j2\pi f_kn\right) \tag{1} \end{equation} For $f_k = k/N$ and $k = 0, 1, \cdots, N - 1$. And the $\textrm{FFT}$ magnitude at bin $k$ is the $\textrm{DFT}$magnitude at bin $k$. For a given $N$ that is:


\begin{equation} \left|X(f_k)\right| = \left|X\left(\frac{k}{N}\right)\right| = \left|X(k)\right| = \displaystyle \left|\sum_{n = 0}^{N - 1} x[n]\exp\left(-j2\pi nk/N\right)\right| \tag{2} \end{equation}


You talk about power spectral estimation when the signals being analyzed are characterized as random processes. With random fluctuations in such signals, statistical characteristics and average characteristics are normally adopted. For a wide sense stationary $(\textrm{WSS})$ discrete random process, the PSD is defined as:


\begin{equation} P(f) = \displaystyle \sum_{m = -\infty}^{\infty} r_{xx}[m]\exp\left(-j2\pi fm\right) \tag{3} \end{equation}


For reasons you can find in this answer, you see that the squared magnitude of the signal's $\textrm{DFT}$ is taken as the estimate of the PSD in most practical situations. One form, among other variations/methods, is:


\begin{equation} P(f_k) = \frac{1}{N} \displaystyle \left| \sum_{n = 0}^{N - 1} x[n]\exp\left(-j2\pi f_kn\right) \right|^2 \tag{4} \end{equation}




What's the difference between these?



Comparing $(2)$ and $(4)$, you have:


\begin{equation} P(f_k) = \frac{1}{N} \left| X(f_k)\right|^2 \end{equation}


From the bin number $k$ to frequency in $\textrm{Hz}$, $F = \frac{F_s}{N}k$


For more reading on PSD estimation check this question, that question, and this question.


EDIT:


The power spectral density, $\textrm{PSD}$, describes how the power of your signal is distributed over frequency whilst the $\textrm{DFT}$ shows the spectral content of your signal, the amplitude and phase of harmonics in your signal. You pick one or the other depending on what you want to observe/analyze. And no they're not the same as you can see from the equations above and links given. Their spectra are generally not the same. One is estimated as the squared magnitude of the other.


No comments:

Post a Comment

readings - Appending 内 to a company name is read ない or うち?

For example, if I say マイクロソフト内のパートナーシップは強いです, is the 内 here read as うち or ない? Answer 「内」 in the form: 「Proper Noun + 内」 is always read 「ない...