My roots don't match example roots when solving routh criterion

3 ビュー (過去 30 日間)
Jhryssa
Jhryssa 2024 年 9 月 24 日
回答済み: Sam Chak 2024 年 9 月 25 日
I can't seem to figure out how to output similar roots as my teacher's. I've written the same code as he did (modified to match my problem).
The left is what I've started to input and the right is the example he gave us. When I also run my teachers code I get similar outputs to the one on the left. How do I get me roots to match his roots? This is a Routh Stability Criterion Problem with an unknown variable

採用された回答

Torsten
Torsten 2024 年 9 月 25 日
移動済み: Torsten 2024 年 9 月 25 日
syms K s
p = s^3+9*s^2+12*s+15+3*K;
solve(p,s,'MaxDegree',3)
var2 = vpa(ans);
var = subs(var2,K,-1)

その他の回答 (1 件)

Sam Chak
Sam Chak 2024 年 9 月 25 日
From Part (a), you should have obtained the stable range of K: . Part (b) instructs you to verify the stability result by substituting the midpoint value of the stable range, and you should expect that the real parts of all roots are negative.
a = -5; % lower bound of stable range
b = 31; % upper bound of stable range
Kmid= (a + b)/2 % mindpoint of that range
Kmid = 13
syms K s
p3 = s^3 + 9*s^2 + 12*s + 15 + 3*K
solve(p3, s, 'MaxDegree', 3)
sol = vpa(ans);
%% Test
var = subs(sol, K, a) % the real-valued root must be zero
var = subs(sol, K, b) % the real part of the complex-valued roots must be zero
var = subs(sol, K, Kmid) % the real parts of all roots must be negative

カテゴリ

Help Center および File ExchangeStability Analysis についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by