07-18-2016 12:19 PM
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.
07-18-2016 12:36 PM
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?
07-20-2016 08:13 AM
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
07-20-2016 11:13 AM
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…
07-20-2016 11:54 AM
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
07-20-2016 01:09 PM
07-21-2016 01:35 AM
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"… 😄