Tuning Methods of
PID Controller
Dr. Yeffry Handoko Putra, S.T., M.T
yeffry@unikom.ac.id
Tuning Methods of PID Controller 1
Session Outlines & Objectives
Outlines
Tuning methods of PID controller:
• Ziegler-Nichols Open-loop
• Coon-Cohen Open-loop
• Ziegler-Nichols Closed-loop
• Lambda Tuning
• Visual Loop Tuning
• Autotuning
Objectives
Know the meaning of controller tuning
Be able to use several PID tuning methods and choose
the right tuning methods for specific process control
application
Tuning Methods of PID Controller 2
1
Introduction (1)
Controller tuning
A systematic-adjusting procedure of the controller
parameters to obtain a desired performance of the control
system
PID control tuning
It is a matter of selecting the right mix of P, I, and D action
to achieve a desired performance
Tuning Methods of PID Controller 3
Introduction (2)
Performance criteria for closed-loop systems
Stable
Minimal effect of disturbance
Rapid, smooth response to set point change
No offset
No excessive control action
Robust to plant-model mismatch
Trade-offs in control problems
Set point tracking vs. disturbance rejection
Robustness vs. performance
Tuning Methods of PID Controller 4
2
Introduction (3)
How do we know when it’s tuned?
The process didn’t blow up ☺
The process measurements stay close enough to the
setpoint
Boss says OK, and you can go home
You buy a new controller which has different PID
algorithm
Tuning Methods of PID Controller 5
Introduction (4)
The Problem
We have the knowledge about the effect of each PID
modes to closed-loop response
But, from what values of P, I and D modes we would pick
to start to tune?
The Solutions
If you have tuned the process before, use slightly
different values of the old PID controller parameter
If the results are still not satisfy you, use a PID controller
tuning method that we will learn just in a moment that is
most suit to your process control application. Keep watch
on …
Tuning Methods of PID Controller 6
3
Introduction (5)
General Tuning Procedure
• Before tuning, FAMILIARIZE with the OPERATION RISK
• Get help with experienced operators, explain your work to
him and tell him that NO PERMISSION IS REQUIRED if
their intervention is NECESSARY to save the loop if things
go wrong
Tuning Methods of PID Controller 7
Introduction (6)
Precaution:
All kinds of tuning method should be used for
initial setting and fine tuning should be done!!!
Tuning Methods of PID Controller 8
4
Cohen--Coon Open-
Cohen Open-loop Tuning Method (1)
Proposed in 1953 by G. H. Cohen
and G. A. Coon1
CO
Main principles:
• The process output is affected not only
by the dynamics of the main process but
also by the dynamics of the measuring
sensor and final control element time
• They observed that the response of most
processing unit to an input change had a PV
sigmoidal shape
time
1) G. H. Cohen and G. A. Coon, Theoretical Consideration of Retarded Control, Trans. ASME,Vol. 75, pp. 827, 1953.
Tuning Methods of PID Controller 9
Cohen--Coon Open-
Cohen Open-loop Tuning Method (2)
Main principles: (contd.)
• The sigmoidal shape can be adequately approximated by the response
of a first order system with dead time
A
CO PVm K e - Td s
Gfpm = ~ ,
CO τs + 1
where
time B
K = A
B Actual response
PVm
τ = B , S is the slope of the
Approximate S sigmoidal response at
response
S the point of inflection
Td = time elapsed until the
Td time system responded
Tuning Methods of PID Controller 10
5
Cohen--Coon Open-
Cohen Open-loop Tuning Method (3)
Once the value of process parameter are obtained, the
PID parameter can be calculated from the following table
Controller P Im D
1 τ Td
P only 1+ - -
K Td 3τ
1 τ Td 30 + 3Td /τ
PI 0.9 + Td -
K Td 12τ 9 + 20Td /τ
1 τ 4 Td 32 + 6Td /τ 4
PID + Td Td
K Td 3 4τ 13 + 8Td /τ 11 + 2Td /τ
Tuning Methods of PID Controller 11
Ziegler-Nichols
Ziegler-
Open--loop Tuning Method (1)
Open
Proposed in 1942 by J. G. Ziegler and N. B. Nichols of Taylor
Instruments (now part of ABB instrumentation in Rochester,
N.Y.) 2
It is done in manual mode
It is a way of relating the process parameters (i.e. delay time,
process gain and time constant) to the controller parameters
(i.e. controller gain and reset time)
It has been developed for use on delay-followed-by-first-
order-lag processes
2) J. G. Ziegler and N. B. Nichols, Optimum Setting for Automatic Controllers, Trans. ASME,Vol. 64, pp. 759-768, 1942.
Tuning Methods of PID Controller 12
6
Ziegler-Nichols
Ziegler-
Open--loop Tuning Method (2)
Open
The Procedure
1. Put the control system in MANUAL (without feedback)
2. Adjust the controlled system manually to the desired
operating point (start-up control loop)
3. Apply manually a STEP change of the controller output
(CO) (usually 5 – 10 % or depending of your process gain)
4. Wait until the process variable (PV) is settled at steady-
state condition
Tuning Methods of PID Controller 13
Ziegler-Nichols
Ziegler-
Open--loop Tuning Method (3)
Open
5. Determine process parameter (delay time, process gain
and time constant) from the graphics
P
CO OUTPUT LEVEL
TEMPERATURE
Line drawn through
point of inflection
PV
R
L
TD
TIME
FIGURE 6: PROCESS REACTION CURVE - SIMPLE
Tuning Methods of PID Controller 14
7
Ziegler-Nichols
Ziegler-
Open--loop Tuning Method (4)
Open
6. Once the value of process parameter are obtained, the PID
parameter can be calculated from the following table
Controller P Im D
1 τ
P only - -
K Td
PI
0.9 τ -
0.33 Td
K Td
1.2 τ
PID 2 Td 0.5 Td
K Td
Tuning Methods of PID Controller 15
Ziegler-Nichols
Ziegler-
Closed--loop Tuning Method (1)
Closed
Proposed in 1942 by J. G. Ziegler and N. B. Nichols of Taylor
Instruments (now part of ABB instrumentation in Rochester,
N.Y.)
Also known as continuous cycling or ultimate gain methods
It has been developed for use on delay-followed-by-first-
order-lag processes
It has been refined for other specific process control objectives
Tuning Methods of PID Controller 16
8
Ziegler-Nichols
Ziegler-
Closed--loop Tuning Method (2)
Closed
The Procedure
1. At the controller, select proportional-only (P-ONLY) control, i.e. set P to
the lowest value (PB to the highest value) and Im to infinity (Ir to zero)
and D to zero (smallest possible influence of the controller)
2. Adjust the controlled system manually to the desired operating point
(start-up control loop)
3. Set the manipulated variable of the controller to the manually adjusted
value (reset bias b) and switch to automatic operating mode
4. Continue to gradually increase P (decrease PB) until the controlled
variable encounters harmonic oscillation. If possible, small step changes
in the setpoint should be made during the P adjustment to cause the
control loop to oscillate
5. Take down the adjusted P value as critical proportional-action coefficient
Pcrit
Tuning Methods of PID Controller 17
Ziegler-Nichols
Ziegler-
Closed--loop Tuning Method (3)
Closed
The Procedure (contd.)
6. Determine the time span for one full oscillation amplitude as tcrit, if
necessary by taking the time of several oscillations and calculating their
average
Tuning Methods of PID Controller 18
9
Ziegler-Nichols
Ziegler-
Closed--loop Tuning Method (4)
Closed
The Procedure (contd.)
7. Once the value for Pcrit and τcrit are obtained, the PID parameter can be
calculated from the following table
Controller P Im D
P only 0.5 Pcrit - -
PI 0.45 Pcrit 0.833 τcrit -
PID 0.6 Pcrit 0.5 τcrit 0.125 τcrit
Tuning Methods of PID Controller 19
Ziegler-Nichols
Ziegler-
Closed--loop Tuning Method (5)
Closed
Modified Ziegler-Nichols setting
Controller P Im D
PID original 0.6 Pcrit 0.5 τcrit 0.125 τcrit
PID some overshoot 0.33 Pcrit 0.5 τcrit 0.33 τcrit
PID no overshoot 0.2 Pcrit 0.3 τcrit 0.5 τcrit
Tuning Methods of PID Controller 20
10
Ziegler-Nichols
Ziegler-
Closed--loop Tuning Method (6)
Closed
Examples
4e-3.5s Pc = 0.95
Gp(s) =
7s+1 τc = 12
Controller P Im D
PID original 0.57 6.0 1.5
PID some overshoot 0.31 6.0 0.4
PID no overshoot 0.19 6.0 4.0
Tuning Methods of PID Controller 21
Ziegler-Nichols
Ziegler-
Closed--loop Tuning Method (6)
Closed
Advantages of continuous cycling method
No a priori information on process required
Applicable to all stable processes
Only a single experimental test is needed
It does not require trial and error
The controller settings are easily calculated
Tuning Methods of PID Controller 22
11
Ziegler-Nichols
Ziegler-
Closed--loop Tuning Method (7)
Closed
Disadvantages of continuous cycling method
Time consuming
Loss of product quality and productivity during the tests
Continuous cycling may cause the violation of process
limitation and safety hazards
Not applicable to open-loop unstable process
First-order and second-order process without time delay
will not oscillate even with very large controller gain
Motivates Relay Feedback Method (Åström and Hagglund, 1984)
Tuning Methods of PID Controller 23
Lambda Tuning (1)
Developed for achieving smooth setpoint response or
load change
Guarantees stability, robustness and no overshoot
Very popular in pulp & paper industry
Two basic steps of lambda (λ) tuning:
• Process model identification
• Lambda tuning
1st order process with dead time
Integrating process (i.e. level control)
Tuning Methods of PID Controller 24
12
Lambda Tuning (2)
1st Order Process with Dead Time
Procedure:
Manually, bump the CO then observe the PVm
The estimated process parameters:
∆u
∆y
• Process gain: Gp =
∆u
0.283∆y
• Process time constant: τp = 1.5(T2 – T1)
0.632∆y
• Process dead time: Τd = T2 – τp
T1 T2
time
Tuning Methods of PID Controller 25
Lambda Tuning (3)
1st Order Process with Dead Time (contd.)
Lambda Tuning:
Choose the desired closed-loop time constant, λ (typically
2 to 3 times the process constant) sluggish response!
PID tuning parameters:
2τp + τd
• Proportional gain: P=
2Gp(λ + τd)
τd
• Integral action: Tm = τp +
2
τp τd
• Derivative action: D=
2 τp + τd
Tuning Methods of PID Controller 26
13
Lambda Tuning (4)
Lambda Tuning’s Rule of Thumb:
• Integral time should no be smaller than the process time
constant
• Level control oscillating? Remove nearly all integral action
• Poll time should be less than one-tenth the process time
constant
• Filter time constant should be less than one fifth the process
time constant
• Closed-loop time constant is usually greater than the
process time constant
Tuning Methods of PID Controller 27
Visual Loop Tuning (1)
Problems
The loop is unstable (or
apparently so) How to improve the
The loop is sluggish in performance of a loop
response to upsets or by using NO algebra?
setpoint changes
PVm
SP SP SP
PVm PVm
Apparently unstable response “Good” response? Sluggish response
Tuning Methods of PID Controller 28
14
Visual Loop Tuning (2)
Apparent Instability
The loop oscillates PVm
SP
• Because of excessive feedback, or
• Of being perturbed periodically by
another process
Procedure:
• Put the loop in manual (if it is safe to do so)
• In manual mode, the process appears to settle down poorly tuned
Tuning problems:
• Is the oscillation caused by too much or too little gain/integral/ derivative
or their combinations?
Tuning Methods of PID Controller 29
Visual Loop Tuning (3)
Apparent Instability (contd.)
Tuning procedure:
• Self-regulating Processes
If the value of Im (min/repeat) is less than half of the oscillation period τ
First, Increase the value of Im
If the value of Im (min/repeat) is longer than the oscillation period, it is safe to decrease the gain
(P)
τ
SP SP
PVm PVm
Apparently unstable response Increasing the value of Lowering the gain (P)
Im (min/repeat)
• Non Self-regulating Processes
Use the longest value of Im (min/repeat) as much as possible or completely remove the
integral action. If the problem persists, then lowering the gain (P)
Tuning Methods of PID Controller 30
15
Visual Loop Tuning (4)
Sluggish Response
Common causes:
• The loop usually has no derivative action SP
• The value of Im (min/repeat) is long
PVm
relative to the process response time
• The value of gain is too low
Tuning Methods of PID Controller 31
Visual Loop Tuning (5)
Sluggish Response (contd.)
Tuning procedure:
1. Adjusting Gain
Set the Im as longest as possible and set D to zero.
Place the controller in manual mode, then step out the CO at a reasonable
value
Immediately put the controller back in auto mode. Watch the process
response to know what the controller action does
Repeat the process until we get one cycle of process output swinging
PVm PVm PVm
Swinging more than one cycle Swinging less than one cycle Swinging in one cycle
Too much gain Too little gain Reasonable gain achieved
lowering the gain increasing the gain
Tuning Methods of PID Controller 32
16
Visual Loop Tuning (6)
Sluggish Response (contd.)
Tuning procedure:
2. Adjusting Integral Action
Place the controller in manual mode, shorten the value of Im, then step out
the CO at a reasonable value
Immediately put the controller back in auto mode. Watch the process
response to know what the controller action does
Repeat the process until we get the PVm ramps back to setpoint about half
as fast as it moved away from setpoint form the CO step
PVm original PVm PVm original
SP SP
SP PVm
Response with reasonable gain To little Im Reasonable Im
(swinging in one cycle) (swinging at setpoint)
Tuning Methods of PID Controller 33
Visual Loop Tuning (7)
Tuning map for gain (P) and reset effect (Im)
No reset Increasing reset Fast reset
(small repeat/min) (integral) action (more repeat/min)
(large min/repeat) (less min/repeat)
Low gain (P)
(wide PB)
Increasing proportional
action
High gain (P)
(narrow PB)
Tuning Methods of PID Controller 34
17
Visual Loop Tuning (8)
The Effect of Adding Derivative
a) Best tuning
achieved with b) Too little derivative
proportional and
integral modes only
c) Derivative added
gain increased d) Too much derivative
integral action faster
Tuning Methods of PID Controller 35
What is Autotuning?
Autotuning (also known as self-tuning) is a feature
supplied by many controller, PLC and DCS vendors that
allows the controller to “tune itself”
It minimize the task of a control engineer in manually
tuning the loops
Tuning Methods of PID Controller 36
18
Why Autotuning?
The process is nonlinear or operated under widely varying
conditions
Need various combination of tuning parameters for different operating
condition can be also accomplished by using operator’s log
The process characteristic change rapidly
Frequent manual changing of the tuning parameters can not be expected
to be able to produce satisfactory results
The end user doesn’t have the knowledge or experience
for successful manual tuning
Tuning Methods of PID Controller 37
Autotuning Categories
A variety of autotuning techniques found on the market:
Scheduled tuning
On-demand tuning
On-line tuning
Tuning Methods of PID Controller 38
19
Scheduled Tuning (1)
Merely, an automation of the “operator’s log” concept
• The users have to provide the correct value either by means of a table
look-up or a user-written program
Tuning parameters are changed automatically as
operating points change
No assessing and modifying of the controller
performances by determining improved tuning parameters
Tuning Methods of PID Controller 39
Scheduled Tuning (2)
From
table look-up or
user-written program
Gain Reset Deriv.
SP
Σ PID Process
PVm
Region Boundaries Gain Reset Deriv.
1 0 – 30% P1 I1 D1
2 30 – 70% P2 I2 D2
3 70 – 100% P3 I3 D3
Example: Fisher DPR900TM Single-loop Controller
Tuning Methods of PID Controller 40
20
On
On--demand Tuning (1)
It is simply an automation of the open- or closed-loop
testing method
• Open-loop tuning methods:
Ziegler-Nichols (most common)
Lambda tuning
…
• Closed-loop tuning method:
Relay Feedback autotuning motivated by Ziegler-Nichols closed-loop tuning
method
User presses a ‘tune’ button to start the tuning procedures
which carry out automatically
The tentative tuning values are display for confirmation. If
confirmed, they are inserted into the control algorithm
Tuning Methods of PID Controller 41
On
On--demand Tuning (2)
Relay Feedback Autotuning Method
Setpoint +
PID Process
_
Relay with
Dead zone
a
Process
Output
2d
Controller
Output
Tuning Methods of PID Controller 42
21
On
On--demand Tuning (3)
Relay Feedback Autotuning Method (contd.)
The Procedure
Forces the system to oscillate by a relay controller
Require a single closed-loop experiment to find the ultimate
frequency information
No a priori information on process is required
Switch relay feedback controller for tuning
Find Pcrit and calculate τcrit according to the formula
4d
τcrit = π a
User specified parameter: d
• Decide “d” in order not to perturb the system too much
Mostly use Ziegler-Nichols tuning rules for PID tuning parameters
Tuning Methods of PID Controller 43
On
On--line Tuning (1)
The tuning parameters are determined by an auxiliary
program that automatically evaluates the closed-loop
behavior and calculates and modifies the tuning
parameters whenever necessary
Methods:
• Pattern recognition
• Others use a more formal mathematical procedure
Tuning Methods of PID Controller 44
22
On
On--line Tuning (2)
Pattern Recognition Approach
Example: The Foxboro EXACTTM (Expert Adaptive
Controller Tuner)
• It observers the pattern of the response, then invokes a set of rules for
determining new tuning parameters that will drive the pattern closer to a
desired response pattern
• The technique:
Does not require artificial load upsets – instead it utilizes the normal process
disturbances that occur; and
Does not attempt to impose an arbitrary mathematical model on the process
Tuning Methods of PID Controller 45
On
On--line Tuning (3)
The Foxboro EXACTTM
Autotuning activated P1
P3
P2
T New
parameter
Control loop is using existing tuning parameters calculated
Tuning Methods of PID Controller 46
23
Session Summary
Manual tuning of PID controller can be conducted in
various ways by means of some plant test
There simply is no way to analytically tune a controller if
we do not know the type of algorithm and the units
Autotuning simplifies the tuning procedure of PID
controller
Tuning Methods of PID Controller 47
24