How to extract values of Kp, Ki, Kd and D of a PID transfer functio

16 ビュー (過去 30 日間)
Baldav Baldav
Baldav Baldav 2017 年 11 月 5 日
コメント済み: N/A 2023 年 1 月 19 日
Hi, I have a transfer function of PID controller, I need to add it to simulink to calculate the anti-windup and other parameters, but I do not find kp, ki and kd. the transfer function is show in the picture, simplifying it:
(29.24) + (15.51/s) - (840.334/(s+35)
Thanks

採用された回答

Birdman
Birdman 2017 年 11 月 6 日
s=tf('s');
PID=(29.24)+(15.51/s)-(840.334/(s+35))
syms Kp Kd Ki N
NPID_num=[Kp+N*Kd Kp*N+Ki N*Ki];
NPID_den=[1 N 0];
eqn1=PID.Numerator{1}(1)==NPID_num(1);
eqn2=PID.Numerator{1}(2)==NPID_num(2);
eqn3=PID.Numerator{1}(3)==NPID_num(3);
eqn4=PID.Denominator{1}(2)==NPID_den(2);
solx=vpasolve([eqn1 eqn2 eqn3 eqn4]);
Kp=subs(Kp,solx.Kp)
Kd=subs(Kd,solx.Kd)
Ki=subs(Ki,solx.Ki)
N=subs(N,solx.N)
What I did is a simple equation solving. I defined the unknown parameters as symbolic and then obtain the numerical values with the vpasolve function. Note that at the end, the symbolic controller parameters are replaced with their numerical values. After that, in the PID Controller block in Simulink, write Kp, Ki, Kd and N to the parameters repsectively. Hope this helps.
  2 件のコメント
Baldav Baldav
Baldav Baldav 2017 年 11 月 6 日
It work, Thanks
N/A
N/A 2023 年 1 月 19 日
I tried and compare it to pidTuner and get different results. Not sure what I can trust in this case.
pidTuner(PID,'PID')

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

その他の回答 (1 件)

Issah Olamilekan Nasirullahi
Issah Olamilekan Nasirullahi 2022 年 4 月 8 日
Design and discuss P, PD, PI and PID controllers to improve the closed-loop system response. If it is possible, design the P, PD, PI and PID controller to achieve fast rise time, minimal overshoot, and zero steady-state error. Plot and compare the step responses in Matlab. 0.5/S^2 + 0.5S +2.

カテゴリ

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