DSPRelated.com
Forums

Power Spectrum from Autocorrelation vs. FFT

Started by Navraj July 24, 2007
dbd wrote:
> 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. >> >> ... >> >> Paul > > The '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. >
Thanks for the clarification. Paul
On Jul 24, 10:39 pm, Jerry Avins <j...@ieee.org> wrote:
> Randy Yates wrote: > > Randy Yates <ya...@ieee.org> writes: > > >> Navraj <helluvanengin...@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, sometim=
es
> >>>> 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 den=
sity,
> >>>> 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 =3D joules/sec. Hz =3D 1/s. Thus > > >> Watts/Hz =3D joules/sec * 1/(1/sec) > >> - joules > > > Sorry, that should be > > > Watts/Hz =3D joules/sec * 1/(1/sec) > > =3D 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. > =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=
=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF= =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF The analogy you present is certainly valid, but is it not a mind bender itself? Simple natural phenomena are often mind benders...are they not?
Navraj wrote:
> On Jul 24, 10:39 pm, Jerry Avins <j...@ieee.org> wrote: >> Randy Yates wrote: >>> Randy Yates <ya...@ieee.org> writes: >>>> Navraj <helluvanengin...@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 > > The analogy you present is certainly valid, but is it not a mind > bender itself? Simple natural phenomena are often mind benders...are > they not?
It seems reasonable to me that when something is characterized by weight per unit length* a piece of zero length has zero weight. That doesn't contort my mind at all. You can easily make a ball stand still -- that is, have zero velocity -- in midair. All you need to do is throw it straight up. Eventually, it falls back. It isn't moving either way in the instant between going up and going down. Nor does that bend my mind. Jerry _________________________ * Steel rails and beams are specified (in the U.S.) in pounds per foot. A WF 36 300 beam is wide flange, weighs 300 lbs/ft, and is nominally 36" deep. -- Engineering is the art of making what you want from things you can get. &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;
On Jul 26, 5:39 pm, Jerry Avins <j...@ieee.org> wrote:
> Navraj wrote: > > The analogy you present is certainly valid, but is it not a mind > > bender itself? Simple natural phenomena are often mind benders...are > > they not? > > It seems reasonable to me that when something is characterized by > weight per unit length* a piece of zero length has zero weight.
The concept of zero itself as part of the real number system is mind bending enough for it to be a fairly recent invention in terms of human history. IIRC, Zeno's paradox wasn't mathematically refuted well until after the time of Newton when calculus and set theory were put on more formal ground. In terms of reality, I'd also ask how would you measure zero length, given quantum uncertainty, and zero weight/mass given that even a vacuum is though to have non-zero energy potential.
Ron N. wrote:
> On Jul 26, 5:39 pm, Jerry Avins <j...@ieee.org> wrote: >> Navraj wrote: >>> The analogy you present is certainly valid, but is it not a mind >>> bender itself? Simple natural phenomena are often mind benders...are >>> they not? >> It seems reasonable to me that when something is characterized by >> weight per unit length* a piece of zero length has zero weight. > > The concept of zero itself as part of the real number system > is mind bending enough for it to be a fairly recent invention > in terms of human history. IIRC, Zeno's paradox wasn't > mathematically refuted well until after the time of Newton > when calculus and set theory were put on more formal ground. > > In terms of reality, I'd also ask how would you measure zero > length, given quantum uncertainty, and zero weight/mass given > that even a vacuum is though to have non-zero energy potential.
Zeno propounded several paradoxes. None of them seemed deep to me even before I learned calculus. (One can sum a decreasing geometric series without calculus, but even that isn't necessary to see the joke.) The paradox most commonly cited in my experience is Achilles inability to catch the hare because he would first need to close half the gap, then half of the remaining gap, ad infinitum. That is pure verbal legerdemain. Not being able to enumerate all the intervals isn't at all the same as not being able to traverse them. The only part of the paradoxes I don't understand is people finding them paradoxical. Jerry P.S. I couldn't catch a hare anyhow. With me, the gap would open, not close. -- Blaise Pascal: Men never do evil so completely and cheerfully as when they do it from religious conviction. &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;
On 24 Jul, 22:34, 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.
As far as I am concerned, "Power Spectrum Density" is the precise term while "Power Spectrum" is a simplification for everyday use.
> 2) Suppose you are given a random sampled data sequence x[n], and you > have to find its power spectrum.
First, you can't find a power spectrum density (PSD) of an infinite random process. The best you can do is to find an *estimate* for the PSD.
> - Can we find the spectrum by taking the FFT of x[n] and squaring its > magnitude?
That's one (poor) estimator for the PSD.One of many.
> - Can we find the spectrum by taking the FFT of autocorrelation of > x[n]?
That's a better estimator for the PSD.
> - If yes for both, what's the point of autocorrelation in finding the > power spectrum?
Assuming that you start out with an ergodic random process of infinite duration, the true autocorrelation r'xx[k] of the sequence x[n] is defined as (the apostroph in r'xx means "true") N 1 r'xx[k] = lim sum ----- x[n]x[n+k] [1] N-> inf n=-N (2N-1) and the true PSD S'(w) is defined as inf S'(w) = sum r'xx[k] exp(-jwk) [2] k = -inf Note that the summations in both [1] and [2] are taken between infinite limits. In practice, you don't have infinite amounts of data. The *estimates* rxx[k] and S(w) (no apostrophes here) for r'xx[k] and S'(w) become N 1 rxx[k] = sum ----- x[n]x[n+k] [3] n=-N (2N-1) and the true PSD S'(w) is defined as N S(w) = sum rxx[k] exp(-jwk) [4] k = -N This corresponds to introducing a rectangular window function W'_N(n) in [1] above, where the apostroph denotes that the window function is of length (2N-1) and centered on n = 0: W'_N(n) = 1, -N < n < N [5] 0, otherwise N 1 rxx[k] = lim sum ----- W_N(n) x[n]x[n+k] [6] N-> inf n=-N (2N-1) Compare that with taking the DFT first and then squaring. In that case, you compute the DFT of an N-length frame from the infinite data sequence x[n]> This corresponds to using a window function W_N(n) of half the length of W'_N(n) W_N(n) = 1, 0<= n < N 0, otherwise N X(w) = lim sum W_N(n) x[n] exp(-jwn) N->inf n=0 In this case, the estimate of S(w) involves the window function W_N(n), of half the length of W'_N(n), which is used *twice*. As you know, multiplication with window functions in time corresponds to convolution in frequency, which means that the two estimates will have different resolution properties in frequency domain. Rune
 On 24 Jul, 22:34, 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.

The difference between power spectrum and power spectral density is
much to do about the content of the input samples and little to do
about how the power calculation is performed.These labels are also
relevant to power calculation from narrowband wavelets with
nonuniformly spaced basis functions.

If the input is a set of samples from a continuous distribution, the
power output values can be correctly interpreted as estimates of the
power spectral density.

If the input is a set of samples from the sum of a small set of pure
discrete tones, the power output values can be correctly interpreted
as estimates of the power spectrum.

The problem is that we often have input sample sets that include
complicated combinations of these and other types of signals (like
transients). The correct label is data dependent, dependent both on
characteristics of the inputs and on which value in the output, or
calculated from the output, you are trying to interpret and label.

In classical passive narrow-band sonar systems it is common practice
to use algorithms that estimate that portion of the power values that
is due to the power spectral density and use those values to normalize
the power values. The normalized values are then thresholded for
display to the operator. The threshold values are set to select a
trade-off between probability of detection and the probability of
false alarm for tones in the acoustic environment. The same power data
is used to estimate both the background and the discretes.

B&K has delivered instruments for the processing of many kinds of data
for decades. They have long distributed documentation for those who
want to talk about what the instrumentation does rather than what we
can dream of (and might prefer) doing in theoretical realms:

http://www.bksv.com/pdf/bv0031.pdf   see page 29.

It's amazing that this information has survived net rot. It's been
available since well into the last century!

Dale B. Dalrymple
http://dbdimages.com