LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FFTW on LabView

Sorry for the late reply again, its just that I was working on the code and still nothing. By the looks of it, the guy is basically applying a normall Window of some type, i.e. the Hanning Window (which is similar to the Cosine squared weighting)

I also tested your labView code that does the cosine squared weighting, but again no dramatic changes were seen. They only appeared on the 3rd and 4th decimal place.

I just can't see how he managed to pull this off.

And one more thing, there is no need to actually apply any window function on my data before I send them to FFT since ALL the collection data that I have goes into the FFT anyway, i.e. out of the data that I collect I don't say that I only want that small section of it and count the rest as zeros, hence no windowing is needed, and for this project this will allways be the case since all of the data is valuable to me.

Message Edited by Q<UL on 02-06-2007 04:35 PM.

Message Edited by Q<UL on 02-06-2007 04:37 PM

0 Kudos
Message 21 of 23
(1,280 Views)
The purpose of windowing is to reduce the effects of calculating the FT on an finite length sample. The Fourier transform is defined mathematically over an infinite lengthht signal (from t = -infinity to t = +infinity). Since you probably did not start recording your data at -infinity and almost certainly cannot wait until plus infinity for your results, you are dealing with a truncated signal. Mathematically this is the same as multiplying the infinite signal by an unit amplitude pulse (or rectangular window) lasting from t = 0 to t = T, where T is the duration of your data set. In the frequency domain the effect of this multiplication is the convolution of the transform of the infinite signal (your desired result) with the transform of the pulse. The transform of the pulse has a sin(x)/x shape. The various windows modify the shape of the rectangular pulse to something "smoother" which has the effect of producing a less prominent modification of the transform of the infinite signal. However all windows modify it in some way. What you need to do is to pick the window which has the least annoying effect on your results.

To do the comparison between the algorithms you must use identical windowing in both cases, else the FFT process receives different data.

That leads to a thought: Can you get the Python script to write to a file the data it presents to the Fourier transform code? This is the windowed data. You could then feed it to the LV FFT function for comparison. You would not need to know the exact windowing function used by the FFTW code.

Lynn
0 Kudos
Message 22 of 23
(1,264 Views)
Beckman,

Could you point me in the correct direction on writing this code interface? I've taken some C in high school and so I understand the problem with the custom datatype structs. I'm just not sure of how to go about solving the problem.

Paul Webster
0 Kudos
Message 23 of 23
(1,203 Views)