12-02-2010 10:46 AM
I am trying to get the amplitude of a signal from a carrier wave using the Fast Fourier Transform in LabVIEW.
This is actually intended to monitor noisy signals on a customer system but in order to prove out the method I am using a sine wave, see attached VI.
I can't figure out why the difference in the FFT size can have such a huge effect on the output frequency amplitude signal.
I reviewd the following for reference:http://zone.ni.com/devzone/cda/tut/p/id/4278
Does anyone know why my signal varies so much?
Rgds,
Sean
12-02-2010 11:53 AM
Sean,
It is called spectral leakage. When you change the size of the FFT you change the location of the frequency bins. If the signal frequency was exactly at the center of one of the bins in each case, the amplitude would not change. In the RR-Q amplitude graph show the Plot Legend and then change Common Plots to one which shows a dot at each data point. Spread out the peak and watch what happens when you change the FFT Size. High amplitude plots will have one point near the peak and the others will be close to the baseline. Lower amplitude plots will have two or more points near the peak.
Another issue is that changing the size also changes the DC offset of the data being analyzed. This is because you will have different fractions of a cycle at the edges of the data set.
Fourier transform theory assumes the signal is continuous over infinite time. Any real sampled data system violates both continuity and infinite duration. Thus things differ from the ideal.
Lynn
12-03-2010 04:32 AM
Hi Lynn,
Thanks for the advice. I decided to try and use an FFT vi with a window setting, see attached.
Unfortunately they seem to output in Vrms rather than in V. I then tried the express VI 'spectral measurements' using the Hann windowing method and it worked fine.
However, I'd be interested to know if there is a VI which just gives the Fast Fourier Transform but also allows a windowing technique to be implemented. Does anyone know if this can be done?
07-25-2011 07:16 AM
For controlling the window type with same block, you can use the "Baseband" and "Zoom" Spectral analysis vi's which are included in "Sound and Vibration" blocks.