bode関数のmag,phase出力に関して
8 views (last 30 days)
Show older comments
[mag,pha]=bode(sys,bodeopt)
上記実行時、bodeoptとして位相のラップを有効(±180°)にしても、 出力されるphaはラップされておりません。出力時にラップを有効にする方法が ございましたら、ご教授頂きたく、宜しくお願いいたします。
0 Comments
Accepted Answer
Yoko
on 18 Apr 2017
bode 関数のオプションなどでラップを有効にしたデータを、出力で得ることはできないようでした。 freqresp 関数で複素周波数応答を出し、angle 関数で位相を出すことで、ラップを有効にした時と同じような結果が得られるかと思います。
sys = tf(1,[2 3 5 1]);
[H,w] = freqresp(sys); % 複素周波数応答
H = squeeze(H);
mag = abs(H);
phase = angle(H)/pi*180;
% ボード線図をプロット
subplot(2,1,1)
semilogx(w,20*log10(mag))
subplot(2,1,2)
semilogx(w,phase)
0 Comments
More Answers (0)
See Also
Categories
Find more on Control System Toolbox 入門 in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!