How to find kp ki values by having pm and gcf in matlab ?

5 次查看(过去 30 天)
transfer function

回答(1 个)

Sam Chak
Sam Chak 2023-5-6
I guess you are not looking for the analytical formulas for and because you asked in this forum.
So, when the phase margin and the gain crossover frequency are given, you can try numerically designing something like the following example. For more info, look up the documentation of the commands used in this example.
If you find the example helpful, please consider accepting ✔ and voting 👍 on the answer. Thanks a bunch! 🙏
G = tf(1, [1 2 1]) % plant transfer function
G = 1 ------------- s^2 + 2 s + 1 Continuous-time transfer function.
wc = 1; % desired gain crossover frequency (rad/s)
opts = pidtuneOptions('PhaseMargin', 45, 'DesignFocus', 'reference-tracking'); % tuning options
C = pidtune(G, 'PI', wc, opts) % tuning algorithm
C = 1 Kp + Ki * --- s with Kp = 1.41, Ki = 1.41 Continuous-time PI controller in parallel form.
Gcl = feedback(C*G, 1) % closed-loop TF
Gcl = 1.414 s + 1.414 ----------------------------- s^3 + 2 s^2 + 2.414 s + 1.414 Continuous-time transfer function.
margin(C*G) % check if the requirements are met
step(Gcl) % step response

类别

Help CenterFile Exchange 中查找有关 Classical Control Design 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by