MATLAB Answers

Tuning PI, PD, PID controller

9 views (last 30 days)
Dragana Krstevska
Dragana Krstevska on 15 May 2020
Hi guys,
I'm using pidtune and pidtool for tuning the controllers, but even if I put all three constants (Kd, Ki, Kp) it tunes the controller as if it's a p controller. Will post the code bellow, also the return message as a pic. Please help <3.
Kp=290;
Ki=500;
Kd=46;
num1=[Kd Kp Ki];
den1=[1 0];
W=tf(num1,den1);
num2=[1];
den2=[1 10 20];
G=tf(num2,den2);
A=series(W,G);
sys=feedback(A,1);
t=0:0.01:2;
y=step(sys,t);
plot(t,y);
grid on;
pidtune(G,'pi')
pidtool(G,'pid');

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!