MATLAB: Need help with FFT analysis after free vibrational analyis on a beam

fftfree vibrational analysissignal processing

Hello, I recently performed a free vibrational analysis and these are the results https://drive.google.com/file/d/0B2F1liITq1icMlk1U05sMjktVWM/view?usp=sharing
When I perform the FFT analysis on it I get results far different than the calculated natural frequency (5.1Hz). I believe there is a mistake in my signal sampling. Can anyone help me with this? Thank you.
Code used for FFT analysis:
Fs=20;
T=1/Fs;
L=20;
ctdata=load('Sravs3.dat');
t=ctdata(:,1);
y=ctdata(:,2);
%plot(Fs*t(1:50),y(1:200))
title('signal in time domain')
xlabel('time (ms)')
ylabel('X{t}')
NFFT=2^nextpow2(L);
Y=fft(y,NFFT);
f=Fs/2*linspace(0,1,NFFT/2);
figure
stem(f,2*abs(Y(1:NFFT/2)))
title('Single-sided Amplitude Spectrum of y(t)')
xlabel('Frequency(Hz)')
ylabel('|Y(f)|')

Best Answer

Without your 'Sravs3.dat' file, I cannot be certain what the problem is. However, I always define ‘Fs’, ‘T’, and ‘L’ from the data themselves:
ctdata=load('Sravs3.dat');
t = ctdata(:,1);
y = ctdata(:,2);
L = length(t);
T = mean(diff(t));
Fs = 1/T;
See if those changes produce the result you want. (This assumes a constant sampling interval, ‘T’ in your original data.)
Related Question