How to find the value of PID using ziggler 2 method
2 views (last 30 days)
Show older comments
Hi, i have a tf below
G1 =
350 s + 20000
------------------------------------------------------
70000 s^4 + 192500 s^3 + 3.7e07 s^2 + 5.25e07 s + 3e09
how do i find the Kp, Ki, Kd using the ziggler 2 method, i've tried by PID but i couldn't find anything.
2 Comments
Answers (1)
Sam Chak
on 20 Aug 2022
Hi @Raka Adhwa
Unsure if you are still interested in the problem. But if the model is available, then the analysis can be performed to learn and design the PID compensator in a more meaningful way.
s = tf('s');
Gp = (350*s + 20000)/(70000*s^4 + 192500*s^3 + 3.7e07*s^2 + 5.25e07*s + 3e09);
Gp = minreal(Gp)
steady_state_Gp = 20000/(3e09)
step(Gp)

From the Denominator of the Plant 

it is clear that
is a Type-0 system. Thus, introducing an Integral action
will make
becoming a Type-1 system and from the closed-loop system transfer function


the steady-state error will be 0 because
.
.The closed-loop system characteristic polynomial is
.We want to select an appropriate value for the Integral gain
so that the closed-loop system behaves like the desired 5th-order system with the following Characteristic Polynomial:
% Desired 5th-order Characteristic Polynomial
cp5 = conv([1 2 1], [1 3 3 1])
Comparing with 4th term from the desired 5th-order Characteristic Polynomial and solve for
:
fun = @Kigain1;
x0 = [5000, 5];
x = fsolve(fun, x0)
Gc = x(1)/s;
Gcl = minreal(feedback(Gc*Gp, 1))
step(Gcl)
Zero steady-state error for a unit step input is expected, but the settling time at 300 s is probably too long. So, we use the 3rd term from the desired 5th-order Characteristic Polynomial and solve for
:
fun = @Kigain2;
x0 = [70000, 7];
x = fsolve(fun, x0)
Gc = x(1)/s;
Gcl = minreal(feedback(Gc*Gp, 1))
step(Gcl)
The settling time is significantly shorter, and we know that high value of
in the range of
should be selected. We can test multiple values for
and use the for loops to run repetitive computations:
should be selected. We can test multiple values for Ki = 6e4:1.5e4:12e4 % generate evenly-spaced multiple values for Ki
t = 0:0.01:20;
for j = 1:5
Gc = Ki(j)/s; % integral compensator
Gcl = minreal(feedback(Gc*Gp, 1)); % closed-loop system, Gcl
[y(:, j), t] = step(Gcl, t); % generate data for step response
info(j) = stepinfo(Gcl); % performance of the step response
end
plot(t, y), grid on, xlabel('t, [sec]'), ylabel('Response')
title('Plot of Step Response Curves')
legend(strcat('K_i = ', num2str(Ki')), 'location', 'Best')
One can evaluate the performance in terms of Rise time, Settling time, and Percentage overshoot to decide on the
range and selection. For example, the performance of the closed-loop system #5 (green curve) can be obtained:
info(5)
--------------------------------------------
Functions that are used to initially determine the value for
:
function F = Kigain1(x)
F(1) = 750 - 10*x(2)^3;
F(2) = 0.2857*x(1) - x(2)^5;
end
function F = Kigain2(x)
F(1) = 528.6 - 10*x(2)^2;
F(2) = 0.2857*x(1) - x(2)^5;
end
0 Comments
See Also
Categories
Find more on PID Controller Tuning in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


