LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how do i get the power/amplitude spectrum from an array?

Hello, Community,

I have time-series data entered into a 2D array.  I'd like to analyze the power/amplitude spectra of the array data.  but, if i hook up the array directly into the power spectra function, it is not reading the frequency correctly, instead it yield a low frquency any ideas? 

please see attached bmp files for reference.

thank you for clarifying,

ck
Download All
0 Kudos
Message 1 of 5
(2,641 Views)
You say that you have a 2D array but the power spectrum function only accepts a 1D array so my guess is that you've stripped up the timing information. The power spectrum function has no idea what the timing is because there is no input for dt. If you use the FFT Power Sprectrum function which uses a waveform data type as the input, your frequencies would probably be correct. You can add the timing information, though, to your graph by determining dt from the 2D array and then wiring that information into the graph. Turn on Contect Help and move your cursor over the graph on the diagram. At the bottom of the help screen, you will see a Bundle function. Add the Bundle function, wire the output of the power spectrum, the delta x and x0 to it and then wire the output to the graph.

Message Edited by Dennis Knutson on 03-28-200607:39 AM

Message Edited by Dennis Knutson on 03-28-200607:39 AM

0 Kudos
Message 2 of 5
(2,637 Views)
it may sound really easy...will you please include an example?

i couldn't find the function you specify.

thanks,

ck
0 Kudos
Message 3 of 5
(2,618 Views)
The FFT Power Spectrum function is on the Analyze>Waveform Measurements palette. You also have a nice handle tool called "Search" that is on the top of your Functions palette. There is a least one shipping example. Open the Example Finder and grom the search tab enter "power". The example called Power Spectrum Measurement is the one you should look at. Also, in order to use this function, you will have to convert your 2D array into a waveform datatype. If you are getting data from a DAQ board, then you should have the option to get data in this format. Otherwise, you can use the technique that I showed above. You just have to calculate dt from your existing array.
0 Kudos
Message 4 of 5
(2,608 Views)
hello, dennis,

i am not sure how to do this---"you will have to convert your 2D array into a waveform datatype".

do i connect the 2d array to waveform graph directly?
do i create a property node(history data) of the waveform graph to FFT power spectrum?

by the way, as a side question, will you please also tell me how i can extract the DATA from a waveform?  for instance, waveform chart can track 10 array elements...is there a way i can manipulate the data?

please clarify.  thank you dennis.  your assistance is much appreciated.

ck
0 Kudos
Message 5 of 5
(2,598 Views)