I want to understand the difference between the following two methods to calculate the PSD:
1. Using periodogram; First finding auto correlation of a sequence and then taking FT of the auto correlation.
2. Calculating the Fourier Transform of a signal directly and then squaring it to get the power corresponding to the frequency bins.
Why go in for method (1) which involves auto-correlation and then the Fourier Transform when method (2) ought to give the same result with the need for auto-correlation.
My take on the question: Calculating auto-correlation brings out the global frequency variations of the signal so the PSD here would give a pronounced peak(s) for global variations whereas the square of FT of signal method does not do this.
However, in the event that what I said is true, then the 2 methods do not provide the exact same info and in that case both of them should not be called PSD of the signal.
No products are associated with this question.
The PSD is the Fourier transform of the autocorrelation. But right out of the box, you can only estimate the autocorrelation sequence.
If you use the biased estimate of the autocorrelation, you can easily show that is proportional to the squared-magnitude of the DFT of the original sequence. You can see that basic equivalence here.
Fs = 1000; t = 0:0.001:1-0.001; x = cos(2*pi*100*t)+randn(size(t)); xc = xcorr(x,'biased'); xcft = fft(xc); xdft = fft(x); pxx = 1/length(x).*abs(xdft).^2; subplot(211) plot(abs(xcft)) subplot(212) plot(pxx)
There are some caveats. For example, you notice that I had to use the absolute value of the autocorrelation. I should not have had to do that because the Fourier transform of the autocorrelation should be real-valued. But I can't trick MATLAB into knowing that I'm giving it an even sequence (symmetric with respect to 0 lag).
I think you're not correct to say that they do not provide the same information, they are in fact mathematically equivalent -- the periodogram and the Fourier transform of the biased autocorrelation sequence estimate. But you have to keep in mind the difference between what you can write down on paper and how to have to implement it in a computational tool like MATLAB, R, Python, etc.
I had a feeling that what you(^) said may not work with more complicated signals. But it does, as I tried it with PCG signals(heart sounds).
So, I still want to know why do we use the periodogram method to estimate PSD at all. Why not just take the FT and square it.
Is it because if we take auto-correlation, the signal is amiable to windowing and then calculating the average FT. This allows the variance, bias to reduce(generally).
Is this the motivation or rather explanation for the existence of Bartlett and Welch method for calculating the PSD.
The periodogram is proportional to the magnitude-squared DFT. The scaling factors that make it not equal to the magnitude-squared DFT are precisely the factors that come from the derivation of the periodogram from the biased autocorrelation sequence and therefore are exactly what is needed to make the periodogram a PSD estimate.
The reason for using a modified periodogram (with a single window) is to mitigate a known problem called leakage that comes from the use of a rectangular window.
The Welch overlapped segment averaging method, which is very different from a modified periodogram, is to combat another (different) known problem with the periodogram and that is that the periodogram is not a consistent estimate of the true PSD. The variance of the periodogram does not go to zero even in the limit of an infinite sample size.
It should be noted that computer implementations of the autocorrelation sequence estimate like xcorr() typically use fft() under the hood, so my example above was in some sense "not fair", but the result would be the same if even if you wrote a routine that computed the autocorrelation sequence wholly in the time domain.
Umm... let me rephrase my previous question. I think it was not very clear:
Why bother with the periodogram route to find the PSD at all? Why not simply use the FT of the signal and square it. We get the same information either ways.
The periodogram route seems circuitous since we first take the auto-correlation and then the FT to arrive at the PSD.
I dont get why we need to do this at all when the more obvious(and simple) method of squaring the FT of the original signal exists. Am i missing some key point here?
The extra complication of the periodogram route to find the PSD has been developed over a long period of time and many different people have contributed to it. Why go through the trouble? There is obviously something I am missing. And I just cant seem to figure out what it is.
Can you pleas help me out @[Wayne King]. I would really appreciate it.Thanks:)
Play games and win prizes!Learn more