2個のSimulinkモデルでlinmodを使用し2個のボード線図を描きたい
Afficher commentaires plus anciens
mathworksにある公式回答(複数の入力を持つシステムをlinmodで線形化しても1つ目の入力に対する伝達関数しか得られません。任意の入力に対する伝達関数を得るにはどうすれば良いですか? - MATLAB Answers - MATLAB Central (mathworks.com))を参考にするべきなのですが,
途中でつまずいてしまったため質問をします.
複数個のモデル,例えば
1 20
G1(s) = ----------- ,G2(s) = --------------------
s + 1 s^2 + 11s +10
のモデルをsimulinkのtransfer Fncを使用し作成することを考えます(sample.png).
この時コードを上記公式回答を参考に,
[a,b,c,d] = linmod('simulinkファイル名(拡張子なし)');
[num1,den1] = ss2tf(a,b,c,d,1)
[num2,den2] = ss2tf(a,b,c,d,2)
Gs1 = tf(num1,den1)
Gs2 = tf(num2,den2)
bode(Gs1)
hold on
bode(Gs2)
としてみたのですが,tfの使用で行またはベクトルでなければならないとエラーが出ます.
単体でボード線図を書くときは
1
G(s) = -----------
s + 1
[num,den] = linmod('simulinkファイル名(拡張子なし)');
Gs = tf(num,den);
bode(Gs)
でボード線図を表示させることは可能なのですが,入手出力が2個でもボード線図を書きたいです.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Simulink dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!