0% found this document useful (0 votes)
24 views26 pages

Lec 14 Tuning PID Controllers

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views26 pages

Lec 14 Tuning PID Controllers

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

MT 323: Automatic Control (1)

MT 421: Automatic Control in


Mechanical Systems
Instructor. Gamal Abdelnasser

Lecture14 Tuning PID Controllers

Dr. Shuaiby Mohamed


Zeigler-Nichol’s First Method
(Step Response Method)
 This method applies if the response to a step input exhibits an S-shaped curve.
 Such step-response curves may be generated experimentally or from a dynamic
simulation of the plant.
Zeigler-Nichol’s First Method (Cont.)
(Step Response Method)
 This method applies if the response to a step input exhibits an S-shaped curve.
 Such step-response curves may be generated experimentally or from a dynamic
simulation of the plant.
Table-1
Zeigler-Nichol’s Second Method
(Frequency Response Method)
 In the second method, we first set 𝑇𝑖 = ∞ and 𝑇𝑑 = 0.
 Using the proportional control action only, increase Kp from 0 to a critical
value Kcr at which the output first exhibits sustained oscillations.

 If the output does not exhibit sustained oscillations for whatever value Kp
may take, then this method does not apply.
Zeigler-Nichol’s Second Method (Cont.)
(Frequency Response Method)

 Thus, the critical gain Kcr and the


corresponding period Pcr are determined.

Table-2
Tuning map for PID controllers

CL Response Rise Time Overshoot Settling Time S-S Error

Kp Decrease Increase Small Change Decrease

Ki Decrease Increase Increase Eliminate

Kd Small Change Decrease Decrease Small Change


Example

• For this system, the first method of Ziegler-Nichols does not apply but we
can apply the second method.

• Because the plant has an integrator, i.e. one of the poles lie at 𝑠 = 0, which
means that the plant dynamics will have oscillatory behavior.
Design Procedure for the second method of Ziegler-Nichols:

1. Find the critical gain 𝐾cr and the corresponding oscillatory


period 𝑃cr

2. Compute the parameters of the PID controllers from the


table of Ziegler-Nichols

3. Make fine tuning to improve the response


Step 1: Find 𝐾𝑐𝑟 and 𝑃𝑐𝑟

We can find 𝐾cr and 𝑃cr by different methods:

1. Analytical method (e.g., Routh criterion)

2. From simulation
Finding 𝐾𝑐𝑟 and 𝑃𝑐𝑟 using Routh criterion
 When PID controller is reduced to P-
controller, we obtain the closed-loop
transfer function as follows:

 The value of 𝐾𝑝 that makes the system marginally stable so that sustained
oscillation occurs can be obtained by use of Routh’s stability criterion.

 The characteristic equation for the closed-loop system is


Finding 𝐾𝑐𝑟 and 𝑃𝑐𝑟 using Routh criterion (Cont.)
• The characteristic equation

Then, the Routh array becomes as follows:

We find that sustained oscillation will occur if


𝐾𝑝 = 30 Thus, the critical gain is 𝐾cr = 30.
Finding 𝐾𝑐𝑟 and 𝑃𝑐𝑟 using Routh criterion (Cont.)
 The characteristic equation

the critical gain is 𝐾cr = 30.

 With 𝐾𝑝 set equal to 𝐾cr = 30, the characteristic equation becomes

 To find the frequency of the sustained oscillation, we substitute 𝑠 = 𝑗𝜔 into


this characteristic equation as follows:
Finding 𝐾𝑐𝑟 and 𝑃𝑐𝑟 using Routh criterion (Cont.)
 The critical gain is 𝐾cr = 30.

we substitute 𝑠 = 𝑗𝜔 into the characteristic equation:

 We find the frequency of the sustained oscillation to be 𝜔 = √5 Hence, the


period of sustained oscillation is
Step 1: Find 𝐾𝑐𝑟 and 𝑃𝑐𝑟

We can find 𝐾cr and 𝑃cr by different methods:

1. Analytical method (e.g., Routh criterion)

2. From simulation
Finding 𝐾𝑐𝑟 and 𝑃𝑐𝑟 from simulation

 Alternatively, The value of 𝐾𝑝 that makes the system marginally stable so that
sustained oscillation occurs can be obtained from simulation.

 We simply increase the value of 𝐾𝑝 until we get sustained oscillation. Then, we


directly measure from the plot the critical period of oscillation.
Finding 𝐾𝑐𝑟 and 𝑃𝑐𝑟 from simulation (Cont.)

s = tf('s');
Gp = 1/(s*(s+1)*(s+5)); % plant model
Gc = 30; % P-controller to find Kcr and Pcr from simulation
H = 1; % unity feedback system
TF = feedback(Gp*Gc, H);
step(TF)
title('Unit-Step Response')
Finding 𝐾𝑐𝑟 and 𝑃𝑐𝑟 from simulation (Cont.)
Design Procedure for the second method of Ziegler-Nichols:

 Find the critical gain 𝐾cr and the corresponding oscillatory


period 𝑃cr

2. Compute the parameters of the PID controllers from the


table of Ziegler-Nichols

3. Make fine tuning to improve the response


Step 2: Compute the parameters of PID controller
The critical gain is 𝐾cr = 30.

The period of sustained oscillation is

From the table of Ziegler-Nichols for the second method, we obtain the gains of
the PID cotroller as follows
Step 2: Compute the parameters of PID controller (Cont.)

The transfer function of the PID controller is thus


Step 2: Compute the parameters of PID controller (Cont.)

The PID controller has a pole at the origin and double zero at 𝑠 =– 1.4235.
% ---------- Unit-step response ----------
s = tf('s');
Gp = 1/(s*(s+1)*(s+5)); % plant model
Gc = 18*(1 + 1/(1.405*s) + 0.35124*s); % PID controller
H = 1; % unity feedback system
TF = feedback(Gp*Gc, H);
step(TF)
title('Unit-Step Response')
Step 2: Compute the parameters of PID controller (Cont.)

• The maximum overshoot in the unit-


step response is approximately
62%.The amount of maximum
overshoot is excessive. It can be
reduced by fine tuning the controller
parameters.
Design Procedure for the second method of Ziegler-Nichols:

 Find the critical gain 𝐾cr and the corresponding oscillatory


period 𝑃cr

Compute the parameters of the PID controllers from the table


of Ziegler-Nichols

3. Make fine tuning to improve the response


Step 3: Fine tuning

These values are approximately twice the


values suggested by the second method of
the Ziegler–Nichols tuning rule.
Project (10 marks)
 Pick a simple phyical system.
 Derive the mathematical model.
 Time domain analysis
 Design an appropriate controller for this system, for example: PI or PD or PID.
 Validate your design on simulation.
 Implement the controller on the hardware.
Any questions or
Comments?!

End of Lecture 14

You might also like