Hello, I have a confusion regarding Fourier transform of a time signal and the PSD. By definition, power spectral density (PSD) is the Fourier transform of the autocorrelation function. Suppose my time-domain signal is a voltage signal. I sample this at the correct rate, and taking the Fourier transform gives me the maginitudes of of various frequency components present in the signal (within the context of sampling rate). Taking the modulus squared of this quantity will give me power/Hz. On the other hand, literature says, taking the Fourier transform of the autocorrelation function (rather than the direct transform as discussed earlier) gives the PSD. And confusingly gives the units as power/Hz. I am confused as what is the difference between these two? if both have units of power/Hz, why/when should I do one over the other? Does power/Hz is same as V^2/Hz? Thank you.
PSD vs. Fourier transform
Started by ●March 1, 2009
Reply by ●March 1, 20092009-03-01
On Mar 1, 10:24�am, "m26k9" <maduranga.liyan...@gmail.com> wrote:> Hello, > > I have a confusion regarding Fourier transform of a time signal and the > PSD. > By definition, power spectral density (PSD) is the Fourier transform of > the autocorrelation function. > > Suppose my time-domain signal is a voltage signal. > I sample this at the correct rate, and taking the Fourier transform gives > me the maginitudes of of various frequency components present in the signal > (within the context of sampling rate). Taking the modulus squared of this > quantity will give me power/Hz. > > On the other hand, literature says, taking the Fourier transform of the > autocorrelation function (rather than the direct transform as discussed > earlier) gives the PSD. And confusingly gives the units as power/Hz. > > I am confused as what is the difference between these two? if both have > units of power/Hz, why/when should I do one over the other? > > Does power/Hz is same as V^2/Hz? > > Thank you.You get the same result either way. Yes, Power/hz is the same as V^2/ Hz. But what is the best way to compute the auto-correlation? Yes, you could do it the slow way, where you multiply the signal by the shifted (actually, circular shifted ...) version of itself, and add up all the products for each shift amount. Or you could do it the FFT way, which is much faster; 1) take the FFT of the signal 2) add the complex conjugate, thus cancelling the imaginary component 3) Take the inverse FFT So now you have the auto-correlation, and you want it's FFT; but clearly, we could have just stopped at step 2 rather than go through the process of inverse FFT followed by FFT! So just use the FFT method, and if you need to approximate the linear autocorrelation instead of the circular autocorrelation, add a suitable number of zeros to the end of your data record (to increase it's length by at least 2X). Bob Adams
Reply by ●March 1, 20092009-03-01
m26k9 wrote:> Hello, > > I have a confusion regarding Fourier transform of a time signal and the > PSD. > By definition, power spectral density (PSD) is the Fourier transform of > the autocorrelation function. > > Suppose my time-domain signal is a voltage signal. > I sample this at the correct rate, and taking the Fourier transform gives > me the maginitudes of of various frequency components present in the signal > (within the context of sampling rate). Taking the modulus squared of this > quantity will give me power/Hz. > > On the other hand, literature says, taking the Fourier transform of the > autocorrelation function (rather than the direct transform as discussed > earlier) gives the PSD. And confusingly gives the units as power/Hz. > > I am confused as what is the difference between these two? if both have > units of power/Hz, why/when should I do one over the other?One difference is that the Fourier transform of a signal may not exist, for instance, a stochastic (i.e. random) process doesn't have a Fourier transform, but it will have an autocorrelation function. Therefore, the PSD will exist even if you can't compute the Fourier transform of the signal itself. -- Oli
Reply by ●March 1, 20092009-03-01
On Mar 2, 5:10�am, Oli Charlesworth <ca...@olifilth.co.uk> wrote:> m26k9 wrote: > > Hello, > > > I have a confusion regarding Fourier transform of a time signal and the > > PSD. > > By definition, power spectral density (PSD) is the Fourier transform of > > the autocorrelation function. > > > Suppose my time-domain signal is a voltage signal. > > I sample this at the correct rate, and taking the Fourier transform gives > > me the maginitudes of of various frequency components present in the signal > > (within the context of sampling rate). Taking the modulus squared of this > > quantity will give me power/Hz. > > > On the other hand, literature says, taking the Fourier transform of the > > autocorrelation function (rather than the direct transform as discussed > > earlier) gives the PSD. And confusingly gives the units as power/Hz. > > > I am confused as what is the difference between these two? if both have > > units of power/Hz, why/when should I do one over the other? > > One difference is that the Fourier transform of a signal may not exist, > for instance, a stochastic (i.e. random) process doesn't have a Fourier > transform, but it will have an autocorrelation function. �Therefore, the > PSD will exist even if you can't compute the Fourier transform of the > signal itself. > > -- > OliYou can still compute the periodogram (PSD) of a random signal (say speech) using the FFT directly of course and not via the autocorrelation. Hardy
Reply by ●March 1, 20092009-03-01
HardySpicer <gyansorova@gmail.com> wrote:> Oli Charlesworth <ca...@olifilth.co.uk> wrote:>> One difference is that the Fourier transform of a signal may not exist, >> for instance, a stochastic (i.e. random) process doesn't have a Fourier >> transform, but it will have an autocorrelation function. �Therefore, the >> PSD will exist even if you can't compute the Fourier transform of the >> signal itself.>You can still compute the periodogram (PSD) of a random signal (say >speech) using the FFT directly of course >and not via the autocorrelation.I would say in general you cannot use a DFT/FFT to computer the entire PSD. Maybe you can compute some points on it, and maybe you could smooth it to get something that looks like a PSD. Steve
Reply by ●March 1, 20092009-03-01
On 1 Mar, 19:05, HardySpicer <gyansor...@gmail.com> wrote:> On Mar 2, 5:10�am, Oli Charlesworth <ca...@olifilth.co.uk> wrote: > > > > > > > m26k9 wrote: > > > Hello, > > > > I have a confusion regarding Fourier transform of a time signal and the > > > PSD. > > > By definition, power spectral density (PSD) is the Fourier transform of > > > the autocorrelation function. > > > > Suppose my time-domain signal is a voltage signal. > > > I sample this at the correct rate, and taking the Fourier transform gives > > > me the maginitudes of of various frequency components present in the signal > > > (within the context of sampling rate). Taking the modulus squared of this > > > quantity will give me power/Hz. > > > > On the other hand, literature says, taking the Fourier transform of the > > > autocorrelation function (rather than the direct transform as discussed > > > earlier) gives the PSD. And confusingly gives the units as power/Hz. > > > > I am confused as what is the difference between these two? if both have > > > units of power/Hz, why/when should I do one over the other? > > > One difference is that the Fourier transform of a signal may not exist, > > for instance, a stochastic (i.e. random) process doesn't have a Fourier > > transform, but it will have an autocorrelation function. �Therefore, the > > PSD will exist even if you can't compute the Fourier transform of the > > signal itself. > > > -- > > Oli > > You can still compute the periodogram (PSD) of a random signal (say > speech) using the FFT directly of course > and not via the autocorrelation.How would you do this if you want to use some window function? Rune
Reply by ●March 1, 20092009-03-01
On 2009-03-01 12:03:04 -0400, Robert Adams <robert.adams@analog.com> said:> On Mar 1, 10:24�am, "m26k9" <maduranga.liyan...@gmail.com> wrote: >> Hello, >> >> I have a confusion regarding Fourier transform of a time signal and the >> PSD. >> By definition, power spectral density (PSD) is the Fourier transform of >> the autocorrelation function. >> >> Suppose my time-domain signal is a voltage signal. >> I sample this at the correct rate, and taking the Fourier transform gives >> me the maginitudes of of various frequency components present in the sign > al >> (within the context of sampling rate). Taking the modulus squared of this >> quantity will give me power/Hz. >> >> On the other hand, literature says, taking the Fourier transform of the >> autocorrelation function (rather than the direct transform as discussed >> earlier) gives the PSD. And confusingly gives the units as power/Hz. >> >> I am confused as what is the difference between these two? if both have >> units of power/Hz, why/when should I do one over the other? >> >> Does power/Hz is same as V^2/Hz? >> >> Thank you. > > You get the same result either way. Yes, Power/hz is the same as V^2/ > Hz. > > But what is the best way to compute the auto-correlation? Yes, you > could do it the slow way, where you multiply the signal by the shifted > (actually, circular shifted ...) version of itself, and add up all the > products for each shift amount. > > Or you could do it the FFT way, which is much faster; > > > 1) take the FFT of the signal > 2) add the complex conjugate, thus cancelling the imaginary componentThat should be multiply by the complex conjugate to get a magnitude squared which is real. Adding the complex conjugate just yields twice the real part.> 3) Take the inverse FFTTo get a cyclic autocovariance. It is only what you want if there is adequate zero padding.> So now you have the auto-correlation, and you want it's FFT; but > clearly, we could have just stopped at step 2 rather than go through > the process of inverse FFT followed by FFT! > > So just use the FFT method, and if you need to approximate the linear > autocorrelation instead of the circular autocorrelation, add a > suitable number of zeros to the end of your data record (to increase > it's length by at least 2X). > > > Bob AdamsThe magnitude squared of the Fourier transform is usually called the periodigram which is an estimator of the power spectral density. It suffers from not being a consistent estimator as it does not tend to a limit with increasing sample size as the individual values are exponentially distributed. The usual indirect PSD estimator truncates the autocovariance, which leads to a spectral window of some width, so has lower sampling variability and with minor assumptions is a consistent estimator. The confusion is over which are population parameters and which are estimators. As well there are differing formulae for alternate computational methods that are mathematically equivalent. (I.e. In exact arithmetic they are the same but have different computing costs.) There are also issues over when periodic effects arise. All this results from using some simple cases as introduction and then skipping some very tedious issues related to dealing with practical cases.
Reply by ●March 1, 20092009-03-01
On Mar 1, 2:19�pm, Gordon Sande <g.sa...@worldnet.att.net> wrote:> On 2009-03-01 12:03:04 -0400, Robert Adams <robert.ad...@analog.com> said: > > > > > > > On Mar 1, 10:24�am, "m26k9" <maduranga.liyan...@gmail.com> wrote: > >> Hello, > > >> I have a confusion regarding Fourier transform of a time signal and the > >> PSD. > >> By definition, power spectral density (PSD) is the Fourier transform of > >> the autocorrelation function. > > >> Suppose my time-domain signal is a voltage signal. > >> I sample this at the correct rate, and taking the Fourier transform gives > >> me the maginitudes of of various frequency components present in the sign > > al > >> (within the context of sampling rate). Taking the modulus squared of this > >> quantity will give me power/Hz. > > >> On the other hand, literature says, taking the Fourier transform of the > >> autocorrelation function (rather than the direct transform as discussed > >> earlier) gives the PSD. And confusingly gives the units as power/Hz. > > >> I am confused as what is the difference between these two? if both have > >> units of power/Hz, why/when should I do one over the other? > > >> Does power/Hz is same as V^2/Hz? > > >> Thank you. > > > You get the same result either way. Yes, Power/hz is the same as V^2/ > > Hz. > > > But what is the best way to compute the auto-correlation? Yes, you > > could do it the slow way, where you multiply the signal by the shifted > > (actually, circular shifted ...) version of itself, and add up all the > > products for each shift amount. > > > Or you could do it the FFT way, which is much faster; > > > 1) take the FFT of the signal > > 2) add the complex conjugate, thus cancelling the imaginary component > > That should be multiply by the complex conjugate to get a magnitude squared > which is real. Adding the complex conjugate just yields twice the real part. > > > 3) Take the inverse FFT > > To get a cyclic autocovariance. It is only what you want if there is > adequate zero padding. > > > So now you have the auto-correlation, and you want it's FFT; but > > clearly, we could have just stopped at step 2 rather than go through > > the process of inverse FFT followed by FFT! > > > So just use the FFT method, and if you need to approximate the linear > > autocorrelation instead of the circular autocorrelation, add a > > suitable number of zeros to the end of your data record (to increase > > it's length by at least 2X). > > > Bob Adams > > The magnitude squared of the Fourier transform is usually called the > periodigram which is an estimator of the power spectral density. It > suffers from not being a consistent estimator as it does not tend to > a limit with increasing sample size as the individual values are > exponentially distributed. The usual indirect PSD estimator truncates > the autocovariance, which leads to a spectral window of some width, > so has lower sampling variability and with minor assumptions is a > consistent estimator. > > The confusion is over which are population parameters and which are > estimators. As well there are differing formulae for alternate computational > methods that are mathematically equivalent. (I.e. In exact arithmetic they > are the same but have different computing costs.) There are also issues over > when periodic effects arise. All this results from using some simple > cases as introduction and then skipping some very tedious issues related > to dealing with practical cases.- Hide quoted text - > > - Show quoted text -Yes, I meant multiply, not add! Bob
Reply by ●March 1, 20092009-03-01
On Mar 1, 11:03�am, Robert Adams <robert.ad...@analog.com> wrote:> On Mar 1, 10:24�am, "m26k9" <maduranga.liyan...@gmail.com> wrote: > > > > > Hello, > > > I have a confusion regarding Fourier transform of a time signal and the > > PSD. > > By definition, power spectral density (PSD) is the Fourier transform of > > the autocorrelation function. > > > Suppose my time-domain signal is a voltage signal. > > I sample this at the correct rate, and taking the Fourier transform gives > > me the maginitudes of of various frequency components present in the signal > > (within the context of sampling rate). Taking the modulus squared of this > > quantity will give me power/Hz. > > > On the other hand, literature says, taking the Fourier transform of the > > autocorrelation function (rather than the direct transform as discussed > > earlier) gives the PSD. And confusingly gives the units as power/Hz. > > > I am confused as what is the difference between these two? if both have > > units of power/Hz, why/when should I do one over the other? > > > Does power/Hz is same as V^2/Hz? > > > Thank you. > > You get the same result either way. Yes, Power/hz is the same as V^2/ > Hz. > > But what is the best way to compute the auto-correlation? Yes, you > could do it the slow way, where you multiply the signal by the shifted > (actually, circular shifted ...) version of itself, and add up all the > products for each shift amount. > > Or you could do it the FFT way, which is much faster; > > 1) take the FFT of the signal > 2) add the complex conjugate, thus cancelling the imaginary component > 3) Take the inverse FFT > > So now you have the auto-correlation, and you want it's FFT; but > clearly, we could have just stopped at step 2 rather than go through > the process of inverse FFT followed by FFT! > > So just use the FFT method, and if you need to approximate the linear > autocorrelation instead of the circular autocorrelation, add a > suitable number of zeros to the end of your data record (to increase > it's length by at least 2X). > > Bob AdamsThe PSD of a stochastic process is the mean of the magnitude square, in the frequency domain. If you take a stochastic process/signal, observe a chunk of it, and take the Fourier transform (FFT is really for periodic, discrete-time signals), then you get the Fourier transform of one outcome of that process. Think of it as a random variable: you need to "average over many outcomes" to get a decent estimate of its PSD in general, just as you need a lot of samples to be able to estimate the autocorrelation. The beauty of this science is that under some conditions, these properties form transform pairs, so you can go back and forth between time and frequency. Julius
Reply by ●March 1, 20092009-03-01
On Mar 1, 11:08 am, Rune Allnor <all...@tele.ntnu.no> wrote:> On 1 Mar, 19:05, HardySpicer <gyansor...@gmail.com> wrote: > > > > > On Mar 2, 5:10 am, Oli Charlesworth <ca...@olifilth.co.uk> wrote: > > > > m26k9 wrote: > > > > Hello, > > > > > I have a confusion regarding Fourier transform of a time signal and the > > > > PSD. > > > > By definition, power spectral density (PSD) is the Fourier transform of > > > > the autocorrelation function. > > > > > Suppose my time-domain signal is a voltage signal. > > > > I sample this at the correct rate, and taking the Fourier transform gives > > > > me the maginitudes of of various frequency components present in the signal > > > > (within the context of sampling rate). Taking the modulus squared of this > > > > quantity will give me power/Hz. > > > > > On the other hand, literature says, taking the Fourier transform of the > > > > autocorrelation function (rather than the direct transform as discussed > > > > earlier) gives the PSD. And confusingly gives the units as power/Hz. > > > > > I am confused as what is the difference between these two? if both have > > > > units of power/Hz, why/when should I do one over the other? > > > > One difference is that the Fourier transform of a signal may not exist, > > > for instance, a stochastic (i.e. random) process doesn't have a Fourier > > > transform, but it will have an autocorrelation function. Therefore, the > > > PSD will exist even if you can't compute the Fourier transform of the > > > signal itself. > > > > -- > > > Oli.> .> > You can still compute the periodogram (PSD) of a random signal (say .> > speech) using the FFT directly of course .> > and not via the autocorrelation. .> .> How would you do this if you want to use some window function? .> .> Rune How could you do this without using some window function? Dale B. Dalrymple