Calculation of Phase margin
68 ビュー (過去 30 日間)
古いコメントを表示
Please, I would like to ask a control system toolbox expert a question. Solving an exercise in which we are asked to calculate the value of the gain k which causes a transfer function G (s) = k / [s (s ^ 2 + s + 4)] to have a phase margin of 50°. The analytical calculation by hand gave me the following answer:
gain plot crossing frequency : wcf = 1.491 rad/s
The desired gain k = 3.4585
fase plot crossing frequency : wcg = 2 rad/s
Gain margin : GM=1.2634 dB
Instead the Matlab script to calculate the phase margin with this data k, gives an answer that is not the answer I expected and I can't understand why Matlab makes a different choice.
__________________________________________
% Problem_B_7_26_Modern_Control_Engineering_Katsuhiko_Ogata
clear all
clc
fprintf(' \n')
fprintf('--------------------- \n')
w=1.4910;
k=sqrt((w^4)+(w^2)*((4-w^2)^2));
fprintf('Desired gain : k=%g° \n',k)
fprintf('--------------------- \n')
fprintf('Open loop transfer function \n')
s=tf('s');
G=zpk((k)/(s*(s^2+s+4)))
fprintf('--------------------- \n')
fprintf('Figure 1 : Bode diagram \n')
figure(1)
margin(G)
grid on
fprintf('--------------------- \n')
[GM,PM,wcg,wcf]=margin(G);
fprintf('Phase margin: \t\t\t\t PM=%g° \n',PM)
fprintf('Gain margine: \t\t\t\t GM=%g dB \n',db(GM))
fprintf('Gain crossing frequency : \t %scf=%g rad/s \n',char(969),wcf)
fprintf('Phase crossing frequency : \t %scg=%g rad/s \n',char(969),wcg)
fprintf('--------------------- \n')
0 件のコメント
採用された回答
Paul
2022 年 5 月 22 日
編集済み: Paul
2022 年 5 月 23 日
Hi T, it's a tricky problem becase of the shape of the gain curve around the phase cross over frequency.
w=1.4910;
k=sqrt((w^4)+(w^2)*((4-w^2)^2));
s = tf('s');
G=zpk((k)/(s*(s^2+s+4)));
Let's check the stability margins of G
allmargin(G)
Sure enough, we see a 50 deg phase margin at the expected frequency of 1.491 (I don't know why it shows two gain margins at the same frequency, that seems odd to say the least). However, we see that there are two additional gain crossovers and so two additional phase margins. I think that margin() returns only the minimum of the gain/phase margins
[GM,PM,wcg,wcf]=margin(G);
PM
The Bode plot reveals reveals the three gain crossovers at 1.3487, 1.491, and 1.7198 rad/sec
bode(G,linspace(1.2,1.8,1000)),grid
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!