How to solve Routh Hurwitz with constant K
293 ビュー (過去 30 日間)
古いコメントを表示
I am attempting to solve for system stab1ility for the equation: s^4+19*s^3+111*s^2+189*s+K*s+5*K=0
The constant K is throwing me off. I have an idea how to solve this with one variable "s" but need help on how to insert the K as a constant in matlab. thank you in advanced
3 件のコメント
採用された回答
Julius
2018 年 12 月 10 日
編集済み: Julius
2020 年 11 月 1 日
Hi, maybe a bit late, but anyway here is my solution using Matlab and Routh criterion for evaluation of K for stability (root locus does it perfectly in a graphical way by showing critical value of K if locus crosses jw axis or whatever)
syms Kp s
G = (5*s + 2)/(s*(s^2 + 3*s + 2)) % plant TF
Gc = (Kp*(s + 3))/(s + 5) % controller TF
chareq = 1+G*Gc==0
cheq = expand(simplify(chareq))
% haven't figure out how to extract char equation from symbolic, but you can simply copy coefs
% or adapt to you existing char.eq.
%% Update in 2020 - have figured out how to extract coefficients out of char eq
[n, d] = numden(cheq)
cheq = n == 0
cheq = collect(n,s) == 0
R = coeffs(n,s)
%% Now coefficients can be accessed from the vector R and put into Rouht Table
% RT = [R(1,5) R(1,3) R(1,1);
% R(1,4) R(1,2) 0]
% Routh table first two rows from coefs of char.eq. (from cheq)
RT = [1 17+5*Kp 6*Kp;
8 10+17*Kp 0];
% the rest of the table
b1 = (RT(2,1)*RT(1,2)-RT(1,1)*RT(2,2))/RT(2,1);
b2 = (RT(2,1)*RT(1,3)-RT(1,1)*RT(2,3))/RT(2,1);
b3 = 0;
c1 = (b1*RT(2,2)-RT(2,1)*b2)/b1;
c2 = (b1*RT(2,3)-RT(2,1)*b3)/b1;
c3 = 0;
d1 = (c1*b2-b1*c2)/c1;
d2 = (c1*b3-b1*c3)/c1;
d3 = 0;
% full Routh table
RT = [1 17+5*Kp 6*Kp;
8 10+17*Kp 0;
simplify(b1) b2 b3;
simplify(c1) c2 c3;
simplify(d1) d2 d3]
% coeficient Kp values for stability to satisfy condition when b1=0, c1=0 and d1=0
K1 = vpasolve(b1, Kp)
K2 = vpasolve(c1, Kp)
K3 = vpasolve(d1, Kp)
Haven't checked for limitations and what if there is row of zeros or zero in 1st column.
10 件のコメント
fatima mouffok
2022 年 3 月 11 日
chareq = 1+G*Gc==0 remove ==0
chreq = 1+G*Gc like that it's gonna work!!
その他の回答 (1 件)
J. Carlos Aguado
2018 年 4 月 9 日
I assume that the origin of this K is a proportional controller. Therefore, the simplest way (according to MatLab implementations, not to mathematical simplicity) to study its effect on stability is to use the root locus of the plant. MatLab will draw it for you and give you the gain value that marks the frontier with instability
参考
カテゴリ
Help Center および File Exchange で Stability Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!