LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Confused about Power Spectral Density output amplitudes

I have a situation where I have accelerometer data and am being asked to compare it to a published power spectral density curve (from DO-160D).  Seemed like a simple task at first - take the data and feed it into LabVIEW's built-in vi for calculating PSD: "FFT Power Spectrum and PSD.vi".  However, I'm getting confused by the output.  My problem is that the amplitudes of my output are not consistent -- they vary significantly depending on how much data I put into the PSD vi.

 

For example, if I feed 30 seconds of data into the VI, I get one curve.  If I double the source data and feed 60 seconds of data into the VI, I get a similar curve except that my peak magnitudes increase by a factor of 2.  I've attached a simple example VI that illustrates my problem.  Run it with 30 seconds of data, and the peak is 60 g^2/Hz.  Run it with 60 and the peak doubles to 120 g^2/Hz.

 

It seems I can get any answer I want, simply by adjusting how much source data I feed into the function.  This can't be right.  Surely I must be missing something fundamental here.

 

Any help or suggestions would be greatly appreciated.

0 Kudos
Message 1 of 4
(4,661 Views)

Hi dougm,

 

Have you looked at the LabVIEW Help document for the FFT Power Spectrum and PSD VI?  It gives a detailed breakdown of the various configuration options, as well as explanations of how the parameters are calculated.  I've linked to the document below for you to reference.

 

FFT Power Spectrum and PSD VI Help: https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/vi-lib/measure/maspectr-llb/fft-power-spec...

 

Thanks,

 

Myriam D.

Applications Engineer

National Instruments

0 Kudos
Message 2 of 4
(4,613 Views)

Hi dougm,

 

There is another way to facilitate the understanding by clicking into the FFT Power Spectrum and PSD.vi.

Something like:

PSD.PNG

You can see that the difference between PS & PSD is dividing by df.

When you increase your sample number, you decrease the df at the same time.

As a result, the PSD will increase while df decreasing.

 

0 Kudos
Message 3 of 4
(4,596 Views)

Yep, I've read through the help but unfortunately it doesn't address my question.

William - thanks for the suggestion.  The division by df is consistent with the descriptions of PSD I've read online. 

 

I guess my question is more confusion about the theory behind the PSD calculation.  The problem that I see is that when I choose a longer timespan (meaning more datapoints) for my PSD analysis -- this causes df to get smaller, which causes the PSD output amplitudes to get bigger.  So the output seems completely arbitrary.  So based on that, it's not clear how to make a valid comparison between two different PSD analyses.

 

0 Kudos
Message 4 of 4
(4,573 Views)