How to get best spectral plot

12 ビュー (過去 30 日間)
Andreas Askvik
Andreas Askvik 2017 年 11 月 21 日
コメント済み: Birdman 2017 年 11 月 24 日
Hi, I want to get a plot from the frequency domain from the stator current in a induction motor model. The current is illustrated in figure
I want it in the same "format" as this
but I can't seem to get close, this is my best attempt using pwelch
does anyone have a comment on how to proceed? Thanks in advance.

採用された回答

Birdman
Birdman 2017 年 11 月 21 日
How did you set your pwelch's options? If you set them correctly, then you should obtain a very accurate plot. For instance:
h1=spectrum.welch;
set(h1,'Windowname','Hann');
Fs=1000;
set(h1,'OverlapPercent',66.7);
set(h1,'SegmentLength',512);
The lines above make the necessary settings for your pwelch function.
myPsd=psd(h1,X(:,1)-mean(X(:,1)),'Fs',Fs)
semilogx(myPsd.Frequencies,myPsd.Data);grid on
Imagine that your data is X, if you run the two lines above, then you should obtain the same result in a better way.
Please enter OverlapPercent and SegmentLength carefully, according to your data. Hope this helps.
  6 件のコメント
Andreas Askvik
Andreas Askvik 2017 年 11 月 24 日
I get this plot
Birdman
Birdman 2017 年 11 月 24 日
Use this:
myPsd=psd(h1,X(:,1)-mean(X(:,1)),'Fs',Fs)
semilogx(myPsd.Frequencies,myPsd.Data);grid on
set(gca,'XLim',[0.01 100])

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMotor Drives についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by