FFT plot of velocity
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a plot of velocity (mm/s) against time for 15 sec. I want to observe the same in frequency domain. I have done the following code in MATLAB also for the same.
Whether the FFT results also have mm/s as the unit? If I want to get the result in terms of mm/s, what should I do?
How can I get the one-third octave band plots from the FFT above?
Am I approaching this correctly?
[v,T,vT]=xlsread('vib.xls');
t=v(:,1);
y=v(:,2);
fs=750;
t=0:1/fs:(length(y)-1)/fs;
figure(1);
plot(t,y);
title('PLOT OF VELOCITY');
ylabel('Velocity Amplitude');
xlabel('Time (in seconds)');
grid on;
nfft = length(y);
K = fft(y,nfft);
K = K(1:nfft/2);
mx = abs(K);
f = (0:nfft/2-1)*fs/nfft;
figure(2);
plot(f,mx);
grid on;
0 Kommentare
Antworten (3)
Rick Rosson
am 5 Nov. 2015
Bearbeitet: Rick Rosson
am 5 Nov. 2015
Then, in your code, try both Option 1 and Option 2, and compare the results. What does the comparison show?
Rick Rosson
am 5 Nov. 2015
Bearbeitet: Rick Rosson
am 5 Nov. 2015
Please try the following experiment:
Fs = 48000;
dt = 1/Fs;
t = (0:dt:0.25-dt)';
A = 5;
x = A*ones(size(t));
N = size(x,1);
df = Fs/N;
f = -Fs/2:df:Fs/2-df;
X = fftshift(fft(x));
figure;
plot(t,x);
grid on;
xlabel('Time (in seconds)');
ylabel('Velocity (in mm/sec)');
title('Time Domain');
figure;
ax(1) = subplot(2,1,1);
plot(f/1000,abs(X)/N);
grid on;
xlabel('Frequency (in kilohertz)');
ylabel('Amplitude (in mm/sec)');
title('Amplitude Spectrum');
ax(2) = subplot(2,1,2);
plot(f/1000,abs(X)/Fs);
grid on;
xlabel('Frequency (in kilohertz)');
ylabel('Amplitude Density (in mm/sec per hertz)');
title('Amplitude Spectral Density');
linkaxes(ax,'x');
zoom xon;
Now try a second experiment:
Fc = 5000;
A = 12;
y = A*cos(2*pi*Fc*t);
Y = fftshift(fft(y));
figure;
plot(t,y);
grid on;
xlabel('Time (in seconds)');
ylabel('Velocity (in mm/sec)');
title('Time Domain');
figure;
ax(1) = subplot(2,1,1);
plot(f/1000,abs(Y)/N);
grid on;
xlabel('Frequency (in kilohertz)');
ylabel('Amplitude (in mm/sec)');
title('Amplitude Spectrum');
ax(2) = subplot(2,1,2);
plot(f/1000,abs(Y)/Fs);
grid on;
xlabel('Frequency (in kilohertz)');
ylabel('Amplitude Density (in mm/sec per hertz)');
title('Amplitude Spectral Density');
linkaxes(ax,'x');
zoom xon;
0 Kommentare
Siehe auch
Kategorien
Mehr zu Discrete Fourier and Cosine Transforms finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!