How to find kp, ki, kd values from transfer function
86 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Design of PID Controller
1 commentaire
Rahul agarwal
le 29 Juin 2016
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".
Réponses (1)
Sam Chak
le 15 Sep 2023
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1484011/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1484016/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1484021/image.png)
% transfer function of compensator
Gc1 = tf([7 5 3], [2 0])
% minimal realization
Gc1m = minreal(Gc1)
% extract PID gains from transfer function Gc1m
[n, d] = tfdata(Gc1m, 'v');
kd = n(1)
kp = n(2)
ki = n(3)
% PID controller
Gc2 = pid(kp, ki, kd)
% check if Gc2m = Gc1m
Gc2m = tf(Gc2)
0 commentaires
Voir également
Catégories
En savoir plus sur PID Controller Tuning dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!