I have two questions: 1) Is there a difference b/w the terms 'power spectrum' and 'power spectral density'? They both seem to indicate power vs. frequency. 2) Suppose you are given a random sampled data sequence x[n], and you have to find its power spectrum. - Can we find the spectrum by taking the FFT of x[n] and squaring its magnitude? - Can we find the spectrum by taking the FFT of autocorrelation of x[n]? - If yes for both, what's the point of autocorrelation in finding the power spectrum?

# Power Spectrum from Autocorrelation vs. FFT

Started by ●July 24, 2007

Reply by ●July 24, 20072007-07-24

>I have two questions: > >1) Is there a difference b/w the terms 'power spectrum' and 'power >spectral density'? They both seem to indicate power vs. frequency. >Although in many situations people use them interchangeably, sometimes they do mean different things. Power spectrum indicates power vs. frequency while power spectral density indicates power density vs. frequency. If it is power vs. frequency, whatever you read from the spectrum is the power at that frequency while if it is frequency density, theoretically you need to integrate the power density within the neighborhood of that frequency to obtain the power.>2) Suppose you are given a random sampled data sequence x[n], and you >have to find its power spectrum. > >- Can we find the spectrum by taking the FFT of x[n] and squaring its >magnitude? >- Can we find the spectrum by taking the FFT of autocorrelation of >x[n]? >- If yes for both, what's the point of autocorrelation in finding the >power spectrum? > >There is a subtle difference between the two and if I remember correctly when the number of samples are large they are approximately the same. I do know that Kay's book (Modern Spectral Estimation, 1988) has the details. hth,

Reply by ●July 24, 20072007-07-24

Navraj wrote:> I have two questions: > > 1) Is there a difference b/w the terms 'power spectrum' and 'power > spectral density'? They both seem to indicate power vs. frequency. >In my experience they are the same thing, but there may well be some subtle difference of interpretation that I'm not aware of.> 2) Suppose you are given a random sampled data sequence x[n], and you > have to find its power spectrum. > > - Can we find the spectrum by taking the FFT of x[n] and squaring its > magnitude?That's the normal way of getting an _estimate_ of the power spectrum.> - Can we find the spectrum by taking the FFT of autocorrelation of > x[n]?This would give the same result as above, but would be rather pointless, unless you happen to be getting the autocorrelation for free somehow.> - If yes for both, what's the point of autocorrelation in finding the > power spectrum? >It's usually the other way around - a common way of calculating autocorrelation is to take the inverse FFT of the power spectrum. Paul

Reply by ●July 24, 20072007-07-24

> >1) Is there a difference b/w the terms 'power spectrum' and 'power > >spectral density'? They both seem to indicate power vs. frequency. > > Although in many situations people use them interchangeably, sometimes > they do mean different things. Power spectrum indicates power vs. > frequency while power spectral density indicates power density vs. > frequency. If it is power vs. frequency, whatever you read from the > spectrum is the power at that frequency while if it is frequency density, > theoretically you need to integrate the power density within the > neighborhood of that frequency to obtain the power.That's the only difference I thought might exist, but something doesn't make sense when one talks about power density vs. frequency. Power density would have units of Watts/Hz, right? If so, when we pick a point, that would be the Power/Hz at that frequency - how do you interpret that? Power at a frequency makes sense, but power/Hz at a frequency does not, atleast to me.

Reply by ●July 24, 20072007-07-24

On Jul 24, 1:53 pm, Paul Russell <pruss...@sonic.net> wrote:> Navraj wrote: > > I have two questions: > > > 1) Is there a difference b/w the terms 'power spectrum' and 'power > > spectral density'? They both seem to indicate power vs. frequency. > > In my experience they are the same thing, but there may well be some > subtle difference of interpretation that I'm not aware of. > > ... > > PaulThe 'power spectrum' interprets the DFT output as the magnitude squared of a discrete component in the bin by calculating the square of the complex modulus. The 'power spectral density' interprets the DFT output as the magnitude squared per Hertz of a continuous distribution and so requires scaling (dividing) the square of the complex modulus by the frequency difference between bin centers. See "Signal and Units" on page 29 of the B&K Technical Review at: http://www.bksv.com/pdf/bv0031.pdf for details. Transient signals are another case. Dale B. Dalrymple http://dbdimages.com

Reply by ●July 24, 20072007-07-24

On Jul 24, 3:34 pm, Navraj <helluvanengin...@gmail.com> wrote:> I have two questions: > > 1) Is there a difference b/w the terms 'power spectrum' and 'power > spectral density'? They both seem to indicate power vs. frequency. >Not that I know of.> 2) Suppose you are given a random sampled data sequence x[n], and you > have to find its power spectrum. > > - Can we find the spectrum by taking the FFT of x[n] and squaring its > magnitude?Well, it's a potentially poor estimate of it.> - Can we find the spectrum by taking the FFT of autocorrelation of > x[n]?Yes.> - If yes for both, what's the point of autocorrelation in finding the > power spectrum?The point is that the PSD is defined as the *Expectation* of the magnitude of X(f), in the Fourier domain. Expectation means averaging. So method 1 does no averaging, it just takes one snapshot. Hence it's a one-shot estimate, and probably a poor one in most cases.

Reply by ●July 24, 20072007-07-24

Navraj <helluvanengineer@gmail.com> writes:>> >1) Is there a difference b/w the terms 'power spectrum' and 'power >> >spectral density'? They both seem to indicate power vs. frequency. >> >> Although in many situations people use them interchangeably, sometimes >> they do mean different things. Power spectrum indicates power vs. >> frequency while power spectral density indicates power density vs. >> frequency. If it is power vs. frequency, whatever you read from the >> spectrum is the power at that frequency while if it is frequency density, >> theoretically you need to integrate the power density within the >> neighborhood of that frequency to obtain the power. > > That's the only difference I thought might exist, but something > doesn't make sense when one talks about power density vs. frequency. > Power density would have units of Watts/Hz, right? If so, when we pick > a point, that would be the Power/Hz at that frequency - how do you > interpret that? Power at a frequency makes sense, but power/Hz at a > frequency does not, atleast to me.Navraj, Good questions! Here's the way I think of the units of Watts/Hz: I simply break them down. Watts = joules/sec. Hz = 1/s. Thus Watts/Hz = joules/sec * 1/(1/sec) - joules Thus the Watts/Hz at a frequency is the amount of energy at that frequency. -- % Randy Yates % "How's life on earth? %% Fuquay-Varina, NC % ... What is it worth?" %%% 919-577-9882 % 'Mission (A World Record)', %%%% <yates@ieee.org> % *A New World Record*, ELO http://home.earthlink.net/~yatescr

Reply by ●July 24, 20072007-07-24

Randy Yates <yates@ieee.org> writes:> Navraj <helluvanengineer@gmail.com> writes: > >>> >1) Is there a difference b/w the terms 'power spectrum' and 'power >>> >spectral density'? They both seem to indicate power vs. frequency. >>> >>> Although in many situations people use them interchangeably, sometimes >>> they do mean different things. Power spectrum indicates power vs. >>> frequency while power spectral density indicates power density vs. >>> frequency. If it is power vs. frequency, whatever you read from the >>> spectrum is the power at that frequency while if it is frequency density, >>> theoretically you need to integrate the power density within the >>> neighborhood of that frequency to obtain the power. >> >> That's the only difference I thought might exist, but something >> doesn't make sense when one talks about power density vs. frequency. >> Power density would have units of Watts/Hz, right? If so, when we pick >> a point, that would be the Power/Hz at that frequency - how do you >> interpret that? Power at a frequency makes sense, but power/Hz at a >> frequency does not, atleast to me. > > Navraj, > > Good questions! > > Here's the way I think of the units of Watts/Hz: I simply break > them down. Watts = joules/sec. Hz = 1/s. Thus > > Watts/Hz = joules/sec * 1/(1/sec) > - joulesSorry, that should be Watts/Hz = joules/sec * 1/(1/sec) = joules.> Thus the Watts/Hz at a frequency is the amount of energy at > that frequency.Let me expand this a little. If the signal is sinusoidal at frequency f_c, then it has infinite energy at f_c but finite power, and the PSD of such a signal will contain a Dirac delta function \delta(f-f_c). Just like for any PSD, integration over a band gives you the power in that band. If you integrate the PSD of such a signal around f_c, you get a finite value representing the power (A^2/2) in the sinusoid. On the other hand, if the signal is random, in the sense that it has no deterministic components, then the PSD will be finite at all values of frequency, meaning that there is finite energy BUT NO POWER at any one frequency. However, and here's the mind-bender, if you integrate the PSD of a such a random signal over some bandwidth, you get some non-zero amount of power in that bandwidth. It's just that there's no power at any ONE frequency. -- % Randy Yates % "Ticket to the moon, flight leaves here today %% Fuquay-Varina, NC % from Satellite 2" %%% 919-577-9882 % 'Ticket To The Moon' %%%% <yates@ieee.org> % *Time*, Electric Light Orchestra http://home.earthlink.net/~yatescr

Reply by ●July 24, 20072007-07-24

Navraj wrote:> ... Power at a frequency makes sense, but power/Hz at a > frequency does not, at least to me.How do you characterize noise, then? Jerry -- Engineering is the art of making what you want from things you can get. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

Reply by ●July 25, 20072007-07-25

Randy Yates wrote:> Randy Yates <yates@ieee.org> writes: > >> Navraj <helluvanengineer@gmail.com> writes: >> >>>>> 1) Is there a difference b/w the terms 'power spectrum' and 'power >>>>> spectral density'? They both seem to indicate power vs. frequency. >>>> Although in many situations people use them interchangeably, sometimes >>>> they do mean different things. Power spectrum indicates power vs. >>>> frequency while power spectral density indicates power density vs. >>>> frequency. If it is power vs. frequency, whatever you read from the >>>> spectrum is the power at that frequency while if it is frequency density, >>>> theoretically you need to integrate the power density within the >>>> neighborhood of that frequency to obtain the power. >>> That's the only difference I thought might exist, but something >>> doesn't make sense when one talks about power density vs. frequency. >>> Power density would have units of Watts/Hz, right? If so, when we pick >>> a point, that would be the Power/Hz at that frequency - how do you >>> interpret that? Power at a frequency makes sense, but power/Hz at a >>> frequency does not, atleast to me. >> Navraj, >> >> Good questions! >> >> Here's the way I think of the units of Watts/Hz: I simply break >> them down. Watts = joules/sec. Hz = 1/s. Thus >> >> Watts/Hz = joules/sec * 1/(1/sec) >> - joules > > Sorry, that should be > > Watts/Hz = joules/sec * 1/(1/sec) > = joules. > >> Thus the Watts/Hz at a frequency is the amount of energy at >> that frequency. > > Let me expand this a little. > > If the signal is sinusoidal at frequency f_c, then it has infinite > energy at f_c but finite power, and the PSD of such a signal will > contain a Dirac delta function \delta(f-f_c). Just like for any PSD, > integration over a band gives you the power in that band. If you > integrate the PSD of such a signal around f_c, you get a finite value > representing the power (A^2/2) in the sinusoid. > > On the other hand, if the signal is random, in the sense that it has > no deterministic components, then the PSD will be finite at all values > of frequency, meaning that there is finite energy BUT NO POWER > at any one frequency. > > However, and here's the mind-bender, if you integrate the PSD of a > such a random signal over some bandwidth, you get some non-zero amount > of power in that bandwidth. It's just that there's no power at any ONE > frequency.That doesn't bend my mind. A bar of known cross section and density has no mass at any coordinate along its length, yet it has finite weight. If you integrate the density over some length, it has a non-zero weight. The analogy seems complete to me. jerry -- Engineering is the art of making what you want from things you can get. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯