Extract natural frequencies from acceleration data by FFT

26 views (last 30 days)
Hi all,
I have problems when calculating frequencies from sample data by FFT in Matlab. The data file shows acceleration in cm/s^2. Sampling frequency is 200 Hz. The file can be downloaded here: http://ifile.it/pqdvhwx. Can you please share a Matlab code for this?

Answers (2)

Bjorn Gustavsson
Bjorn Gustavsson on 29 Jul 2011
At the matlab command line prompt type: help spectrogram
  2 Comments
Bjorn Gustavsson
Bjorn Gustavsson on 29 Jul 2011
Ok, but it would only take you about 30 s to test wouldn't it? I happen to have used that very function to find natural frequencies for sampled signals - as far as I understan this is the first stab-function to use for this purpose - especially if one expects that the dominating frequencies varies.

Sign in to comment.


medo_sk
medo_sk on 29 Jul 2011
Here is the code done so far. I do not know how to proceed.
% Signal.mat is imported as variable CH1
g=981; %gravity acceleration [cm/s^2]
Fs=200; %Sampling frequency
dt=1/Fs; %Sample time
L=length(CH1); %Length of signal
t=(0:L-1)*dt; %Time vector
CORR=(CH1(:,1)-mean(CH1(:,1)))/g; %Shift of signal to zero value
%Plot Original signal
subplot(311), plot(CH1);
title('Original Signal');
xlabel('Samples');
ylabel('Acceleration [cm/s^2]');
%Plot Original signal in Time Domain
subplot(312), plot(t,CH1);
title('Original signal in Time Domain');
xlabel('Time [s]');
ylabel('Acceleration [cm/s^2]');
%Plot Corrected signal in Time Domain
subplot(313), plot(t,CORR);
title('Corrected signal in Time Domain');
xlabel('Time [s]');
ylabel('Acceleration [cm/s^2]');
n=get(gca,'ytick');
set(gca,'yticklabel',sprintf('%.7f |',n'));
  4 Comments
medo_sk
medo_sk on 29 Jul 2011
Thanks Arnaud for your tips.
If I use the example file and adapt it to my data I do not get reasonable results. I am expecting something different from what is calculated by Y = fft(y,NFFT)/L.
Arnaud Miege
Arnaud Miege on 1 Aug 2011
Thanks for formatting your answer, much appreciated!! Can you post the code you are using to compute the FFT of your data?

Sign in to comment.

Categories

Find more on Get Started with Signal Processing Toolbox in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!