LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Live FFT result on waveform

Hi

I need to do a FFT on the waveform below, It is monitoring the vibration of a capacitance plate from a board (FDC2214 EVM, protocol attached below).

 

 

Attached is the wave form at rest after a vibration

 

 

I cannot get the fft vi to give any sort of usable result. And I cant get the write to measurement file vi to record the data even when using a queue loop. If I could get the write to meas vi to write when the vibration happens ( ie the vibration triggers the write for a set number of samples or a set time) I can use excel to do the calculations. Ideally it would be best to get the fft vi to work but I suspect that the fft vi is not the best vi to use on a live wave form with intermittent vibrations.

 

The data output is in the form of a 1D array of double 64bit. The sampling freq is 830 hz

 

Any help greatly appreciated

 

regards

Richard

Vi attached without the fft or write vi included

0 Kudos
Message 1 of 14
(5,515 Views)

Hi Richard,

 

do you really expect anything useful when applying a FFT on data in the range of 1.5e-299 with an amplitude of 2e-301???

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 14
(5,444 Views)

Hi,

 

Any FFT (not just LabVIEW's) requires a good sample to make any kind of accurate estimation. My advice is to split your base time waveform into several smaller samples. Make sure to take enough samples at a time to avoid degrading the waveform, but not so much that you continuously capture that unwanted "bad" data. If you still require help, just let me know. I think I have a sample FFT VI somewhere, I just have to dig it up.

0 Kudos
Message 3 of 14
(5,428 Views)

Also, I just realized the units your waveform is at. You may want to run that through a quick op amp or something before feeding it into LabVIEW. Those units are really REALLY small. I'm not sure how a FFT will react to something so miniscule.

0 Kudos
Message 4 of 14
(5,418 Views)

Hi Guys

 

Thanks for the replies appreciate the help. The data on the graph is the value given after the type cast. I will get the raw data and graphs to you which are in the e-11 range. The problem is that the FFT does not return any data from the wave form. I think it is the way I am manipulating the data.

 

The data is exported via the visa as a string of hex at a sample rate of 830 samples per second. I feel I have gotten all mixed up with the data as I need to convert this string into a 2d array so I can get a useable waveform signal to get an FFT image.

 

I have used the raw data and fed into excel and have usable results just need to try and replicate it in labview.

 

Will post up the data as soon as I can

 

regards

Richard

0 Kudos
Message 5 of 14
(5,402 Views)

The data comes in as a string as shown below

4C30 0100 112A 01E7 85FD 01F1 EC83 01FB 1C4A 01F7 6C03 3C00 0000 0000 0000 003C

The data required is in red and has been taken out of the string and displayed as Raw Channel 1 in the vi.

The data is correct as the calculations for frequency and capacitance match the measured results.

I cannot get a wave form with a time line so I can get the FFT results when the sensor is activated.

 

The sample rate is 830 samples per second. Any suggestions on how to do this greatly appreciated.

I can only get the data to present without a time line only getting the amplitude as shown in the attachment

 

Download All
0 Kudos
Message 6 of 14
(5,390 Views)

You can't do an FFT on an array of only 2 data points.

 

You need to build up an array from multiple consecutive readings, the built that into your waveform with the correct dT between your readings and do the FFT on that.

0 Kudos
Message 7 of 14
(5,383 Views)

Thanks Ravens Fan for the reply.

 

That is the bit I have been struggling with. I do not know how to do that. Everything I have tried has resulted in consecutive readings but without the dt.

0 Kudos
Message 8 of 14
(5,375 Views)

Hi Loopy,

 

to create an array you need a shift register and a BuildArray function - this is explained in the very first beginner tutorials…

 

Everything I have tried has resulted…

What have you tried? When you would attach your tries we could tell you what exactly went wrong!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 14
(5,370 Views)

It seems that you can read the datastream , however I request the decoding 🙂

The document just tell 4 bytes aka 32 bit   ... often a linear scaled representation with gain and offset... 

collect your data in an array, number of point needed  is a question of needed frequency resolution and samplerate. collect one second of data and you have a 1Hz resolution.... 

 

Since you collect it value by value have a look at the Signal processing/Point by point/ Spectral vis 🙂    (reading the help and looking at the Help/Find examples  helps :D)

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 10 of 14
(5,363 Views)