I want FFT plot of a motor data mat-file. It is of 10kHz frequency but I'm not getting the peaks of the plot at 50 Hz frequency. What corrections are needed? And how to write comments for the FFT plots drawn between frequency vs amplitude?

조회 수: 11 (최근 30일)
load t10k50sno.mat;
>> n = 1000;
>> ts =0.0001;
>> ws = 2*pi/ts;
>> f = fft(t10k50sno.Y(1).Data(1:1000));
>> fc=fftshift(f)*ts;
>> w = ws*(-n/2:(n/2)-1)/n;
>> plot(w,abs(fc))
>> xlabel('frequency');
>> ylabel('amplitude');
>> title('fast fourier transform of healthy motor at no-load condition');
  댓글 수: 1
Ganavi Mg
Ganavi Mg 2018년 2월 6일
Hi Even I want fft plot of ppg data mat file. In your code specially in this line-f = fft(t10k50sno.Y(1).Data(1:1000));how you had choosen Y(1).

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

채택된 답변

Wayne King
Wayne King 2013년 10월 2일
편집: Wayne King 2013년 10월 2일
Without your data it is difficult to say exactly, but your frequency vector is in radians/second, not cycles/second, so could you just not be looking for a peak at the correct frequency.
In radians/second, you should be getting peaks at (2*pi*50) radians/second (approx 314)
If you want you can just modify your example a little bit to see if that is the issue. Since I don't have your data, I have to make up a signal here.
n = 1000;
ts =0.0001;
ws = 2*pi/ts;
t = 0:ts:0.1-ts;
x = cos(2*pi*1000*t)+randn(size(t));
f = fft(x);
fc=fftshift(f)*ts;
w = ws*(-n/2:(n/2)-1)/n;
plot(w,abs(fc))
xlabel('frequency');
ylabel('amplitude');
The above plot is in radians/second. Now to convert to Hz.
n = 1000;
ts =0.0001;
ws = 2*pi/ts;
t = 0:ts:0.1-ts;
x = cos(2*pi*1000*t)+randn(size(t));
f = fft(x);
fc=fftshift(f)*ts;
w = ws*(-n/2:(n/2)-1)/n;
plot(w./(2*pi),abs(fc))
xlabel('frequency');
ylabel('amplitude');
You see in the preceding plot, the line components are at 1000 Hz as expected.

추가 답변 (0개)

커뮤니티

더 많은 답변 보기:  Power Electronics Community

카테고리

Help CenterFile Exchange에서 Spectral Measurements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by