Use of symbolix toolbox to derive PI controller Kp,Ki

3 次查看(过去 30 天)
I'd like try to use Symbolic toolbox to derive closed loop transfer function of control system:
to help design PI controller as of standard 2nd order system compring charasterictic polynomial with that of a standard second order
to get out:
Please advice how to achive it with Symbolic toolbox?

采纳的回答

Star Strider
Star Strider 2025-1-17
You can get there, however you have to force iit —
syms K_P K_I L R s xi omega_0 real
G_PI = (K_P*s + K_I) / s
G_PI = 
G_RL = 1 / (L*s + R)
G_RL = 
FB = G_PI * G_RL / (1 + G_PI * G_RL)
FB = 
FB = simplify(FB, 500)
FB = 
[FBn,FBd] = numden(FB)
FBn = 
FBd = 
LHS = FBd
LHS = 
RHS = s^2 + 2*xi*omega_0*s + omega_0^2
RHS = 
[LHSc,Lsv] = coeffs(LHS,s)
LHSc = 
Lsv = 
LHSc(1)
ans = 
L
LHSc = LHSc / LHSc(1)
LHSc = 
[RHSc,Rsv] = coeffs(RHS,s)
RHSc = 
Rsv = 
K_Psln = isolate(LHSc(2) == RHSc(2), K_P)
K_Psln = 
K_Isln = isolate(LHSc(3) == RHSc(3), K_I)
K_Isln = 
.
  2 个评论
Jack Daniels
Jack Daniels 2025-1-17
Looks great! I gonna try it:)
BTW you have nice formatted output - do you use a Live editor or other way to have nicely formatted output?
Star Strider
Star Strider 2025-1-17
Thank you!
I believe the online version (here) uses its version of the Live Editor. (I don’t usually use the Live Editor in my own projects, although sometimes it’s preferable.)
You can get LaTeX formatted results of any symbolic expression using the latex function, however you then have to use a LaTeX interpreter (for example using the text function with Interpreter='LaTeX') to view it correctly.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

产品


版本

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by