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;

답변 (3개)

Rick Rosson
Rick Rosson 2015년 11월 5일

0 개 추천

mx = abs(K)/nfft;

댓글 수: 1

Melvin Koshy
Melvin Koshy 2015년 11월 5일
편집: Melvin Koshy 2015년 11월 5일
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)

댓글을 달려면 로그인하십시오.

Rick Rosson
Rick Rosson 2015년 11월 5일
편집: Rick Rosson 2015년 11월 5일

0 개 추천

Then, in your code, try both Option 1 and Option 2, and compare the results. What does the comparison show?

댓글 수: 1

Melvin Koshy
Melvin Koshy 2015년 11월 5일
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?

댓글을 달려면 로그인하십시오.

Rick Rosson
Rick Rosson 2015년 11월 5일
편집: Rick Rosson 2015년 11월 5일

0 개 추천

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;

카테고리

도움말 센터File Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

태그

질문:

2015년 11월 5일

편집:

2015년 11월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by