How to find kp, ki, kd values from transfer function

176 ビュー (過去 30 日間)
CHINTALA SUSILA
CHINTALA SUSILA 2016 年 6 月 29 日
回答済み: Sam Chak 2023 年 9 月 15 日
Design of PID Controller
  1 件のコメント
Rahul agarwal
Rahul agarwal 2016 年 6 月 29 日
It's very generic question, you can go to any basic control design book and find out how to choose Gains values with trail and error method, if you are using Control System Toolbox, Matlab supplies "pidtool" which automatically choose optimal PID gains which makes the trial and error process unnecessary . You can access the tuning algorithm directly using "pidtune" or through a nice graphical user interface using "pidtool".

サインインしてコメントする。

回答 (1 件)

Sam Chak
Sam Chak 2023 年 9 月 15 日
The question (in the title) about finding PID gain values {, , } from an unspecified transfer function is not exactly clear. Giving OP the benefit of the doubt, it can be literally interpreted as extracting PID gain values from the transfer function of a compensator so that OP can design the PID controller using the 'pid()' command in the MATLAB Control System Toolbox.
% transfer function of compensator
Gc1 = tf([7 5 3], [2 0])
Gc1 = 7 s^2 + 5 s + 3 --------------- 2 s Continuous-time transfer function.
% minimal realization
Gc1m = minreal(Gc1)
Gc1m = 3.5 s^2 + 2.5 s + 1.5 --------------------- s Continuous-time transfer function.
% extract PID gains from transfer function Gc1m
[n, d] = tfdata(Gc1m, 'v');
kd = n(1)
kd = 3.5000
kp = n(2)
kp = 2.5000
ki = n(3)
ki = 1.5000
% PID controller
Gc2 = pid(kp, ki, kd)
Gc2 = 1 Kp + Ki * --- + Kd * s s with Kp = 2.5, Ki = 1.5, Kd = 3.5 Continuous-time PID controller in parallel form.
% check if Gc2m = Gc1m
Gc2m = tf(Gc2)
Gc2m = 3.5 s^2 + 2.5 s + 1.5 --------------------- s Continuous-time transfer function.

カテゴリ

Help Center および File ExchangePID Controller Tuning についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by