LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FFT Spectrum & Averaging

I have twenty five sets of data I need to run through an FFT and then
average the results.
I see the FFT Spectrum (Mag-Phase) vi in the Waveform Measurements section
will do this for me.

Lets say each set of data has 1024 samples. I can build a wave form out of
this data,
but how do I feed the individual waveforms to this vi?

I see I can specify the number of averages, but how do I specify how long
each
waveform is and do I get an output only after feeding in all of my sets of
data.

I am post-processing this data from a text file, this is not real-time.

Any help is appreciated and let me know if my question is as clear as mud.

Thanks,

Mike Gann
0 Kudos
Message 1 of 6
(4,815 Views)
Mike,

You will need to do this in a For Loop. Just put your data into a 2D array, and then put the FFT and other processing inside the for loop (you don't even have to wire the "N" of the for loop (number of iterations to run) as the loop will know by the index of the 2D loop.

The output will be an array of FFTs, a 2D array.
0 Kudos
Message 2 of 6
(4,815 Views)
This is a good way to get your data into the FFT processing VI, but the output is redundant. Just use the last output of the FFT VI to get your averaged result--the previous results are intermediate averages of the first 24 data sets. Set your "averaging parameters" to RMS Averaging, Linear weighting, and 25 averages.

Play with the Power Spectrum Example.vi (Help>>Find Examples...) to get a feel for how the averaging modes work.
0 Kudos
Message 4 of 6
(4,815 Views)
You can try this.
Replace the 'building 25 sets of 1024 pt' by your 2D array (with your 25
sets of data)



[Attachment FFT.vi, see below]
0 Kudos
Message 3 of 6
(4,815 Views)
You should use Linear for the weighting mode (not exponential) if you want all 25 FFTs to be weighted equally. Exponential weighting will weight the most recently processed data most heavily, and is useful for continuous applications where you want the output to be responsive to changes in the signal.
0 Kudos
Message 5 of 6
(4,815 Views)
Thanks everyone for the pointers. I will try these and will probably have
more questions.

Thanks,

Mike.


"Mike" wrote in message
news:afqiu905sg@enews4.newsguy.com...
>
> I have twenty five sets of data I need to run through an FFT and then
> average the results.
> I see the FFT Spectrum (Mag-Phase) vi in the Waveform Measurements section
> will do this for me.
>
> Lets say each set of data has 1024 samples. I can build a wave form out of
> this data,
> but how do I feed the individual waveforms to this vi?
>
> I see I can specify the number of averages, but how do I specify how long
> each
> waveform is and do I get an output only after feeding in all of my sets of
> data.
>
> I am post-processing this data from a text file, this is not real-t
ime.
>
> Any help is appreciated and let me know if my question is as clear as mud.
>
> Thanks,
>
> Mike Gann
>
>
>
>
>
>
>
>
0 Kudos
Message 6 of 6
(4,815 Views)