Vibration Analysis by using Fast Fourier Transform

74 views (last 30 days)
Hi! I have approx 65k data taken by accelerometer within 10 minutes and i need to transform it in frequency domain by FFT and also had Ax,Ay,Az,Gx,Gy,Gz columns. that's confusing can I implement fft to every single column and add them over each other while plotting with "hold on"? I mean plotting the transform for column of Ax then hold on and plotting and implementing same code for column of Ay then hold on and plotting etc. Can you help me about how I should start? Thanks in advance

Accepted Answer

dpb
dpb on 29 Jul 2017
>> help fft
fft Discrete Fourier transform.
fft(X) is the discrete Fourier transform (DFT) of vector X. For
matrices, the fft operation is applied to each column. ...
You don't need to do anything but put all the components into a single array
A=[Ax,Ay,Az,Gx,Gy,Gz]; % presuming they're all column vectors
F=fft(A); % fft each by column
See
doc fft % for example of how to compute the PSD and scale frequency, magnitude.
  9 Comments
dpb
dpb on 5 Aug 2017
Attach an m-file with the data for the particular sensor you're having so much trouble with...I'll try to find time to take a look at it and see what gives...
Enez Furkan Cihan
Enez Furkan Cihan on 5 Aug 2017
Edited: Enez Furkan Cihan on 5 Aug 2017
Thank you so much for everything! I have succeeded and got figure as dB and I have already wanted it. In excel file, among approx 65k data, there were some NaNs and slipped lines. Actually, never thought I would examine 65k data but I did. That's why it didn't work. As a result, I got that whatever it's long or short data, always control it. Special thanks to you for your incredible attention.

Sign in to comment.

More Answers (2)

Bjorn Gustavsson
Bjorn Gustavsson on 28 Jul 2017
Yes, go ahead and fft individual columns, for plotting it seems most likely you would plot the absolute of the fft, or possibly the log of the absolute:
ftAx = fft(Ax);
plot(log10(abs(ftAx)),'b')
hold on
ftAy = fft(Ay);
plot(log10(Ax),'r')
You should also make sure that you have a regular sampling intervals.
Finally you might be interested in the fftshift function and mathworks documentation about what frequency-scale you get.
HTH

Robert Hughes
Robert Hughes on 5 Aug 2017
I have seen data like yours. Ax Ay Az are accelerations in 3 orthogonal axes. Gx Gy Gz are gyro outputs. They must be handled differently to be useful. There may be a "transformation" needed to get data to represent actual physical motion. The data is most likely is in "counts" and would need to be converted into useful engineering units. You can do an fft of each column and that's what you have--6 ffts in counts.
  1 Comment
dpb
dpb on 5 Aug 2017
While true perhaps he's operating on A/D counts, that really only makes any difference in scaling to engineering/absolute units; the FFT would be same to a scale factor so that isn't the root problem.

Sign in to comment.

Categories

Find more on Vibration Analysis in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!