LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use an FFT with decimal I32

Hi Altenbach

 

Works great have swapped over to your code now, thank you so much for your help.

In regards to the FFT I would like to create an array of  125 samples from Decimal 2 on your circuit and then display it on an FFT and other components latter on (I spent all yesterday trying to achieve this but to no avail) I would really appreciate it if you could show me how to do this, once again thanks for all your help.

 

Best Regards

David

0 Kudos
Message 21 of 31
(1,257 Views)

Hi David,

 

as said several times before: you need to collect your data samples in an array!

 

I nice and easy way is using Point-By-Point functions:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 22 of 31
(1,252 Views)

Hi GerdW

 

Great that's saved a lot of time thanks for all your help

 

Best Regards

David

0 Kudos
Message 23 of 31
(1,242 Views)

@GerdW wrote:

 

as said several times before: you need to collect your data samples in an array!

I nice and easy way is using Point-By-Point functions:


I have mentioned before that even easier would be the use of FFT ptbypt, It manages the collection and transform at once. Just set the sample length to 125.

 

 

Why 125? Is that number somehow related to your fundamental signal frequencies to get an integer number of periods? If not, you probably want to use the Windowed FFT PtByPt VI to avoid artifacts and spectral leakage by selecting a suitable windowing function.

 

 

How familiar are you with signal processing theory?

 

0 Kudos
Message 24 of 31
(1,237 Views)

Hi Altenbach

 

The reason for the 125 samples is that it is  the sample rate of the accelerometer I can not change this it also sets the low pass corner filter on the IC 31.25 Hz

 

I have tried the FFT ptbypt and that works as well but looking ahead I want to try the wavelets and other signal processing  as well and I think I need to convert the array into a waveform (Brown wire) to connect  them is this correct and if so could you please show me how to do this?

 

As for signal processing theory not much.

 

Thanks again for your help 

David

 

 

0 Kudos
Message 25 of 31
(1,222 Views)

@DPJones wrote:

 

The reason for the 125 samples is that it is  the sample rate of the accelerometer 

 ....

I have tried the FFT ptbypt and that works as well but looking ahead I want to try the wavelets and other signal processing ...

...

As for signal processing theory not much.

 


 

OK, so you want to operate on 1s worth of history data.

 

Instead of telling us what function you want to use, tell us what information you want to get out of the signal.

 

For example to look at the frequency distribution over time, you could just take the magnitude spectrum and chart it on an intensity graph to create a spectrogram.

 

There is even STFT Spectrogram PtByPt VI and similar functions. There is a rich collection of other ptbypt tools, even for wavelets (example).

 

(To create a brown waveform wire, you just need to build a waveform by adding timing information, but I don't see why you would want to do that)

 

 

0 Kudos
Message 26 of 31
(1,213 Views)

Hi Altenbach

 

In terms of signal processing I would like to be able to take the output from the FFT and look at the bins of interest only I think you use the array some how could you please point me in the right direction.

 

The information I am after:   I am trying to recreate an old project by Volvo who could detect a heartbeat in the car when the car was stationary, I understand they used an accelerator and clever analysis ( FFT's and wavelets where mentioned)  can you also point me in the right direction.

 

Thanks again for all your help

David

0 Kudos
Message 27 of 31
(1,207 Views)

Do you mean a human heartbeat, e.g. of the driver?

 

You are basically talking about vibration analysis. If the car is in idle, the fundamental engine frequency is ~700rpm (~ 12Hz, depending on the car, of course)  and there are quite a few other harmonics, e.g. the cam shaft is at half that frequency, so you have all these frequencies that are more than 5-6 Hz. A human heartbeat at rest is slightly above 1Hz (probably with some known higher harmonics that define the non-sinusoidal shape), i.e. in a different frequency range and it should be detectable by proper frequency analysis even if it is many orders of magnitude weaker than the engine vibrations unless there are also car vibrations in that range, e.g. some resonances of a fender or door panel, who knows?

Of course there are many technical limitations, for example to detect such a weak component, you need a sensor with very good resolution (e.g. 24bit) to see these small signals without overflowing the detector by the much larger vibrations of the engine. It is also safe to say that 1s worth of data is NOT sufficient to detect something around 1Hz.

 

This is all not really my field of expertise and if it were that simple, NI would have no reason to produce specialized tools for sound and vibration analysis.

 

So overcoming the LabVIEW programming problems is just the tip of the iceberg. You need to solve the instrumental, technical, and theoretical problems. Do you have a good set of test data already?

0 Kudos
Message 28 of 31
(1,199 Views)

Hi Altenbach

 

No the original design was from Volvo and was used to detect someone hiding in the back off the car while stationary. Also this was 20 years ago.

 

I dont have any sample data at this point but as soon as I do I could send you some if you want?

 

Also can you help me with my FFT I want to take out bins (frequencies I am not interested in) Does this go to an array and then manipulated?

 

Best Regards

David

 

 

0 Kudos
Message 29 of 31
(1,194 Views)

You can get bins by using "array subset" on the fft transform. You probably want to get the magnitude data because phase is irrelevant. There is a ptbypt for that too.

0 Kudos
Message 30 of 31
(1,191 Views)