FFT plot of velocity

7 visualizaciones (últimos 30 días)
Melvin Koshy
Melvin Koshy el 5 de Nov. de 2015
Editada: Rick Rosson el 5 de Nov. de 2015
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;

Respuestas (3)

Rick Rosson
Rick Rosson el 5 de Nov. de 2015
mx = abs(K)/nfft;
  1 comentario
Melvin Koshy
Melvin Koshy el 5 de Nov. de 2015
Editada: Melvin Koshy el 5 de Nov. de 2015
Could you please elaborate on the reply? Should I make the line in the program as mx = abs(K)/nfft At present what is the unit in the y-axis of FFT plot. What if I change the program line to mx = abs(K)/nfft Do you mean to say that if I change it to mx = abs(K)/nfft I can believe that the units on Y-axis of FFT is mm/s. Please clarify. I have made the change in program line. And now I get the value in the order of 10^(-3)

Iniciar sesión para comentar.


Rick Rosson
Rick Rosson el 5 de Nov. de 2015
Editada: Rick Rosson el 5 de Nov. de 2015
Then, in your code, try both Option 1 and Option 2, and compare the results. What does the comparison show?
  1 comentario
Melvin Koshy
Melvin Koshy el 5 de Nov. de 2015
The maximum value on the y-axis the plot when i use mx = abs(K) is 20 and when i use mx = abs(K)/nfft the magnituede is 0.018. Could you please clarify further?

Iniciar sesión para comentar.


Rick Rosson
Rick Rosson el 5 de Nov. de 2015
Editada: Rick Rosson el 5 de Nov. de 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;

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by