MATLAB: How to determine modes of vibration using FFT

fftvibration analysis

After conducting an impact test on a window pane in a sound booth, I now have velocity and time raw data in excel. I am trying to determine modes of vibration of the pane using FFT analysis but am unsure of the code to use.
Can anyone suggest a way for me to approach the code to solve my problem?
Thanks very much!

Best Answer

I would do something like this:
filename = 'soundbooth_rawdata.xlsx';
[D,S] = xlsread(filename);
t = D(:,1);
s = D(:,2);
Ts = mean(diff(t)); % Sampling Interval
L = numel(t);
Fs = 1/Ts; % Sampling Frequency
Fn = Fs/2; % Nyquist Frequency
FTs = fft(s - mean(s))/L;
Fv = linspace(0, 1, fix(L/2)+1)*Fn; % Frequency Vector
Iv = 1:numel(Fv); % Index Vector
[Pks,Locs] = findpeaks(abs(FTs(Iv))*2, 'MinPeakHeight',1.7E-05, 'MinPeakDist',333);
figure
plot(Fv, abs(FTs(Iv))*2)
hold on
plot(Fv(Locs), Pks, '+r')
hold off
grid
The 'MinPeakHeight' and 'MinPeakDist' arguments to findpeaks (link) can be anything you want them to be. I chose these to illustrate the approach, and to produce a useful plot. There are many others you can use as well. The peak amplitudes are in the ‘Pks’ vector, and the frequencies as ‘Fv(Locs)’ in this code.
This should get you started.