Root Locus from equation?

조회 수: 5 (최근 30일)
Ali Almakhmari
Ali Almakhmari 2023년 11월 4일
답변: Paul 2024년 11월 15일
I have this equation:
syms s u
eqn = 1472.*s.^4 - 99.2.*s.^3 -256.*s.^2.*u.^2 + 1393.*s.^2 + 2.4.*s.*u.^2 - 25.*s -24.*u.^2 + 150 == 0;
where u is speed, and s are the eigenvalues of the systems. I want to plot the root locus (real vs imaginary part of the eigenvalues) as a function of the speed but I am not sure where to start because the root locus command in MATLAB doesnt take something like this.

채택된 답변

Star Strider
Star Strider 2023년 11월 4일
It might if you aske it to and give it a causal system it can work with —
s = tf('s');
eqn = @(u) 1 / (1472*s^4 - 99.2*s^3 -256*s^2*u.^2 + 1393*s^2 + 2.4*s*u^2 - 25*s -24*u^2 + 150)
eqn = function_handle with value:
@(u)1/(1472*s^4-99.2*s^3-256*s^2*u.^2+1393*s^2+2.4*s*u^2-25*s-24*u^2+150)
u = 1;
figure
rlocus(eqn(u))
grid
u = 10;
figure
rlocus(eqn(u))
grid
The original ‘eqn’ would only work for fimplicit, for example —
eqn = @(s,u) 1472.*s.^4 - 99.2.*s.^3 -256.*s.^2.*u.^2 + 1393.*s.^2 + 2.4.*s.*u.^2 - 25.*s -24.*u.^2 + 150;
figure
fimplicit(eqn, [[-1 1]*10 [-1 1]*10])
grid
I would not consider that to be a root locus plot, however that is likely the only way to work with it as originally stated.
.

추가 답변 (1개)

Paul
Paul 2024년 11월 15일
In order to use rlocus, we need to get the characteristic equation in a form of 1 + u^2*N(s)/D(s) = 0.
Start with the equation
syms s u
eqn = 1472.*s.^4 - 99.2.*s.^3 -256.*s.^2.*u.^2 + 1393.*s.^2 + 2.4.*s.*u.^2 - 25.*s -24.*u.^2 + 150 == 0;
Sub in u2 = u^2
syms u2
eqn2 = subs(eqn,u^2,u2)
Find the coefficients of u2 and 1
[C,T] = coeffs(lhs(eqn2),u2,'All')
Now eqn can be expressed as 1 + u2*N(s)/D(s) = 0, where
N(s) = C(1);
D(s) = C(2);
Convert to numeric
N = sym2poly(N(s));
D = sym2poly(D(s));
and plot the root locus. Here, the root locus "gain" is u^2
figure
rlocus(tf(N,D))
We can verify by first having rlocus return the roots of the eqn for each value of u^2
[r,u2] = rlocus(tf(N,D));
and then verify that eqn is satisfied for the first (or second/third/fourth) root returned for the values of u^2.
figure
plot(abs(double(subs(lhs(eqn),[s,u^2],{r(1,:).',u2.'}))))

카테고리

Help CenterFile Exchange에서 Classical Control Design에 대해 자세히 알아보기

태그

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by