LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FFT and discrete values

Hi

Is there an example that shows me how I ccan get the frequency of discrete data points?
I already tried the LV6.1 example vi's but the frequency is not the right one. (I can evaluate the frequency which should be at about 200Hz. The data amount is about 2100 points).
0 Kudos
Message 1 of 7
(3,264 Views)
Can you post a VI with your data saved as default into an array control? If your data contains periodic components, LV 6.1 can find them.
0 Kudos
Message 2 of 7
(3,264 Views)
Hi,
what do you mean by frequency?

If you mean the frequebcy of some harmonic components of your sugnal then you have to use FFT vis to analyze the spectrum and identify harmonics.

If you mean the frequency with which some signal appears in your pattern (for example the frequency of appearing of some short pulses like this
___|__|____|_|_|___|__) then the problem is more complicated. In this case you have to use Peak Detector.vi to identify peaks and calculate the number of them in the pattern. Then you have to analyze somehow the time moments in which they appear.
For example the average frequency of peak appearing will be equal to F=N/T, where N - number of peaks registered, T - time of registration.

Good luck.

Oleg Chutko.
0 Kudos
Message 3 of 7
(3,264 Views)
Thanks for your help. Here's the vi with the data array. The first column is the time stamp (ms) and the second is the data.
Yves
0 Kudos
Message 4 of 7
(3,264 Views)
The array element has its default set, but the array is empty. I've accidentally done this a few times -- it happens if you right-click on the element itself. Make sure you right-click on the array index area and select Data Operations>>Make Current Value Default. Close the VI and re-open to test.
0 Kudos
Message 5 of 7
(3,264 Views)
Sorry. I didn't paid attention. Now everything should be okay.
0 Kudos
Message 6 of 7
(3,264 Views)
I've attached a VI that extracts the 2nd column from your data, patches in dt (important and missing from your data set) to form a LV Waveform, and computes the Power Spectrum. You will have to enter a different value for dt which is the reciprocal of the sample rate of your data. This will affect the frequency axis of the FFT Power Spectrum, and we can go from there to compute significant components.

The first column from the data set looked like index values, not real time values so I didn't use them.
0 Kudos
Message 7 of 7
(3,264 Views)