LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FFT

I am currently trying to get an FFT of vibrations data recorded from an accelerometer. I am pretty lost at the moment. My code is attached.

 

I have also attached what the waveform graph looks like when I run the FFT. I am looking for a normal frequency spectrum of the readings.

Download All
0 Kudos
Message 1 of 7
(3,949 Views)

Hi jhealey,

 

I am pretty lost at the moment.

I see… 😄

 

You set up to read analog inputs with a sample rate of 300 Hz, then you read 1000 samples/channel (so you wait ~3s for new data).

Then you apply a highpass filter on your signal, but you set a sample rate of just 4Hz!? And you don't set any frequency limits for this highpass!?

What kind of filtering do you expect here?

After that you apply a FFT (with this ExpressVI) on your filtered signal, but you forgot to include any timing information with the signal! Did you notice the coercion dot at the data input of the FFT expressVI? It's there for a reason - and with consequences!

 

I have also attached what the waveform graph looks like when I run the FFT. I am looking for a normal frequency spectrum of the readings.

Instead of attaching images of bad results you should attach your measurement data and tell us the expected result!

What is a "normal" frequency spectrum?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(3,941 Views)

Hi GerdW,

 

 I have attached a google image of what I would like to see. I rewrote my code to get some cleaner results from your suggestions. One problem I seem to be having at the moment is that my data is not very clean and seems to be rewriting continuously over the same data. Would this be a timing issue?

 

Attached is my new code and a screenshot of what my data seems to be doing. 

 

I have looked at all of the examples and have played with them quite a bit to see if they would work for my application, none seem to be working very well though.

 

Unfortunately my novice understanding of LabVIEW stems from being introduced to the program less than 2 months ago, so please bear with my ignorance to some simpler tasks.

 

Thanks,

jhealey

0 Kudos
Message 3 of 7
(3,878 Views)

Hi jhealey,

 

seems to be rewriting continuously over the same data. Would this be a timing issue?

What exactly is "rewritten continuously over the same data"?

You have some chart, which maintain a history of the shown data. And you collect the data in array, which are analyzed (in a weird way) at the end of the VI…

 

 I have attached a google image of what I would like to see.

Do you mean the downscaled image? The one where I cannot recognize anything?

 

one seem to be working very well though.

Your highpass filters are set to a samplerate of 3Hz, but the ULx function is set to 300 S/s. Which results do you expect for those filters?

You still don't set any high/low limts for those filters…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(3,858 Views)

When I say rewritten over continuously, I mean that one set of data is written, then another over top of that data and so on and so forth.

When you say that the code is written weird, what do you propose as an alternative?

 

Basically the FFT I would like would be a regular FFT spectrum of amplitude vs frequency.

 

i have filled in constants for my filters to get data that I would like.

 

-jhealey

0 Kudos
Message 5 of 7
(3,847 Views)

Hi jhealey,

 

When you say that the code is written weird

A lot of Rube-Goldberg…

 

I would like would be a regular FFT spectrum of amplitude vs frequency.

You already get this result in your image above!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 7
(3,841 Views)

Hi jhealey,

 

i have filled in constants for my filters to get data that I would like.

Usually you use parameters suited for your DAQ settings and the filter characteristics you want to achieve!

But choosing parameters to "get data I like" sounds "not reasonable"… 😄

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 7
(3,812 Views)