LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding FFT peak measurements

I have a data set that represents fluctuations in position and the units are mm. The data set is attached here as FFT-test-Data.txt. There are 1024 samples in this set and they were acquired every 0.75s. The data has 2 columns; the time in seconds and the fluctuations in mm. From what I have read about LabView FFT's, here is what I can say about the data: dt=0.75s fs = 1.333 (samples per second) N=1024 (number of samples) frequency points=N/2=512 df=fs/N=1.333/1024 = 0.0013 The vi I used to get the peak FFT is attached too. I have used 2 different options so I can compare the results. The FFT data is the same but there is a difference in the frequency resolution. I get 0.000977 with the express vi. I get 0.000732 from df in Amplitude and Phase output. What range of frequency should I get with this data set? I also read that in there is a scaling that is needed for: peak amplitude=|FFT(X)|/N Has this scaling been already done in the vis or I am supposed to divide (or multiply) the result of the express vi by N to get my Fourier amplitude? I appreciate any help I can get. I have LabVIEW 7.1 Thanks, Magreen.
Download All
0 Kudos
Message 1 of 2
(4,240 Views)
Magreen,

Let's start with "What range of frequency should I get with this data set?"  You have defined, by nature of your sampling rate fs = 1.33...Hz, that the power in your signal should be band-limited (close to zero) above 0.66...Hz.  Try Wiki'ing Nyquist for more information.  You can ensure the signal complies to this rule by applying a low-pass filter before the FFT.  A power-spectrum will be accurate for data band-limited to 0.66...Hz.

Now for "
Has this scaling been already done in the vis or I am supposed to divide (or multiply) the result of the express vi by N to get my Fourier amplitude?"  I have two suggestions.

  1. Take a look at an example that ships with LabVIEW.  LabVIEW >> Help >> Find Examples... >> Analyzing and Processing Signals >> FFT and Frequency Analysis >> Basic Spectral Measurements.VI.  The Spectral Measurements Express VI in your code is configured much the same as the one in the example.  Add some controls to the Amplitude, Phase and Offset input nodes of the Simulate Signal Express VI.  You may gain some insight by oberving how changes to Simulate Signal's parameters affect the Spectral Measurements output.
  2. Every Express VI is made from VIs and sub-VIs.  You can view the underlying code of the Express VI by right-clicking the Express VI and selecting Open Font Panel from the context menu.  LabVIEW will ask, "Do you want to convert this Express VI to a standard subVI?"  Click Convert.  This operation cannot be undone, because the settings from the Express VI's configuration screen are hard-coded when the Express VI is converted into a standard subVI.
I hope this points you in the right direction.
0 Kudos
Message 2 of 2
(4,207 Views)