Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %For vibration analysis of signal without any trial mass.
- filename = '2400RPM.xlsx';
- sheet = 1;
- xlRange = 'C40:C516039';
- x = xlsread(filename,sheet,xlRange);
- T=1/100000;
- L=length(x);
- Fs=1/T;
- t=(0:L-1)*T;
- Y = fft(x);
- mag1 = abs(Y/L);
- mag = mag1(1:L/2+1);
- mag(2:end-1) = 2*mag(2:end-1);
- ph1 = rad2deg(Y/L);
- ph = ph1(1:L/2+1);
- ph(2:end-1) = 2*ph(2:end-1);
- f=Fs*(0:(L/2))/L;
- %PLOTTING RESULTS
- %--------------------------------------
- subplot(2,2,[1,2])
- plot(t,x);
- title('Vibration Signal: 2400RPM');
- xlabel('Time (seconds)');
- ylabel('Amplitude (voltage)');
- subplot(2,2,3)
- plot(f,mag);
- title('Magnituge Plot');
- xlabel('Frequency (Hz)');
- ylabel('Amplitude');
- subplot(2,2,4)
- plot(f,ph);
- title('Phase Plot');
- xlabel('Frequency (Hz)');
- ylabel('Phase (degree)');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement