Azzera filtri
Azzera filtri

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?

7 visualizzazioni (ultimi 30 giorni)
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 Commento
Ganavi Mg
Ganavi Mg il 6 Feb 2018
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).

Accedi per commentare.

Risposta accettata

Wayne King
Wayne King il 2 Ott 2013
Modificato: Wayne King il 2 Ott 2013
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.

Più risposte (0)

Community

Più risposte nel  Power Electronics Control

Community Treasure Hunt

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

Start Hunting!

Translated by