PID Controller Design, Tuning,
and Troubleshooting
Chapter 12
Dr. Yousef Alsunni
1
Introduction
Consider a simple closed-loop system that consists of a first-order-plus-time-delay (FOPTD)
model and a PI controller. The Figure below show the disturbance responses for nine
combinations of the controller gain 𝐾 and integral time 𝜏 .
The Figure demonstrates that controller
settings can be adjusted to achieve the
desired closed-loop system performance,
a procedure referred to as controller
tuning. Controller 1 produces an unstable
response, while Controller 5 arguably
provides the best response.
This chapter considers PID controllers
based on transfer function models and
transient response criteria.
Dr. Yousef Alsunni
2
Performance Criteria for Closed-Loop Systems
We would like the closed-loop system to satisfy the following performance criteria:
• The closed-loop system must be stable
• The effects of disturbances are minimized
• Rapid, smooth responses to set-point changes are obtained
• Offset is eliminated
• Excessive control action is avoided
• The control system is robust (insensitive to changes in process conditions and to inaccuracies
in the process mode)
In typical control applications, it is not possible to achieve all of these goals simultaneously,
because they involve inherent conflicts and tradeoffs.
Dr. Yousef Alsunni
3
Performance Criteria for Closed-Loop Systems
PID controller settings can be determined by a number of alternative techniques:
1. Direct Synthesis (DS) method
2. Internal Model Control (IMC) method
3. Controller tuning relations
4. Frequency response techniques
5. Computer simulation
6. On-line tuning after the control system is installed
Dr. Yousef Alsunni
4
Model-Based Design Methods: Direct Synthesis Method
In the Direct Synthesis (DS) method, the feedback controller design is based on a process model
and a desired closed-loop transfer function. The closed-loop transfer function for set-point
changes is:
For simplicity, let 𝐺 ≜ 𝐺 𝐺 𝐺 and assume that 𝐺 = 𝐾 :
Rearranging and solving for 𝐺 gives an expression
for the ideal feedback controller:
Dr. Yousef Alsunni
5
Model-Based Design Methods: Direct Synthesis Method
The above equation cannot be used for controller design, because the closed-loop transfer
function 𝑌/𝑌 is not known a priori. Also, it is useful to distinguish between the actual process 𝐺
and the model, 𝐺 , that provides an approximation of the process behavior.
A practical design equation can be derived by replacing the unknown 𝐺 by 𝐺 , and 𝑌/𝑌 by a
desired closed-loop transfer function, 𝑌⁄𝑌 :
Dr. Yousef Alsunni
6
Model-Based Design Methods: Direct Synthesis Method
Desired Closed-Loop Transfer Function
Ideally, we would like to have 𝑌⁄𝑌 = 1 so that the controlled variable tracks set-point
changes instantaneously without any error. However, this ideal situation, called perfect control,
cannot be achieved by feedback control because the controller does not respond until 𝑒 ≠ 0. For
processes without time delays, the first-order model is a more reasonable choice:
𝜏 is the desired closed-loop time constant. “Subscript c does not stand for controller”
⇒
The presence of 1/𝜏 𝑠 term provides integral control action which eliminates offset.
Dr. Yousef Alsunni
7
Model-Based Design Methods: Direct Synthesis Method
If the process transfer function contains a known time delay 𝜃, a reasonable choice for the
desired closed-loop transfer function is:
Next, we show that the design equation above can be used to derive PID controllers for simple
process models. The derivation is based on approximating the time-delay term in the
denominator with a truncated Taylor series expansion, 𝑒 ≈ 1 − 𝜃𝑠 .
⇒
It is not necessary to approximate the time-delay term in the numerator, because it is canceled
by the identical term in 𝐺 .
Dr. Yousef Alsunni
8
Model-Based Design Methods: Direct Synthesis Method
⇒
Next, we derive controllers for two important process models.
First-Order-Plus-Time-Delay (FOPTD) Model
∵ ⇒𝐺 =𝐾 1+ with:
Second-Order-Plus-Time-Delay (SOPTD) Model
∵ ⇒𝐺 =𝐾 1+ +𝜏 𝑠
with:
Note that, for both cases, 𝐾 inversely proportional to 𝜏 and 𝜃. Does this make sense? Why?
Dr. Yousef Alsunni
9
Example
Use the DS design method to calculate PID controller settings for the process:
2𝑒
𝐺=
(10𝑠 + 1)(5𝑠 + 1)
Consider three values of the desired closed-loop time constant: 𝜏 = 1, 3, and 10. Repeat the evaluation
for two cases:
a) The process model is perfect (𝐺 = 𝐺)
b) The model gain is assumed incorrectly to be 𝐾 = 0.9 instead of the actual value, 𝐾 = 2
This is SOPTD model with 𝜃 = 1, 𝐾 = 2 & 0.9 𝜏 = 10, & 𝜏 = 5, 𝜏 = 1, 3, & 10. Substitute these values
in the following equations to calculate the PID controller parameters:
1
𝐾
The results are summarized in the Table.
Dr. Yousef Alsunni
10
Example
The Figures below were plotted to compare the closed-loop responses for the three values of 𝜏 . A unit
step change in set point occurs at 𝑡 = 0 while a disturbance change occurs at 𝑡 = 80.
𝐾=𝐾=2 𝐾 = 0.9 ≠ 𝐾
𝑌 𝐺𝐺
=
𝑌 1+𝐺 𝐺
𝑌 𝐺
=
𝐷 1+𝐺 𝐺
Note that in this closed-loop, the disturbance
transfer function, 𝑮𝒅 , is assumed to be the
same as 𝑮
Dr. Yousef Alsunni
11
Model-Based Design Methods: Internal Model Control (IMC)
Internal Model Control (IMC) is a more comprehensive model-based design method. It has the
advantage that it allows model uncertainty and tradeoffs between performance and robustness
to be considered in a more systematic fashion.
The IMC method is based on the simplified block diagram shown in the Figure below. The
following closed-loop relation for IMC can be derived using the block diagram algebra:
Dr. Yousef Alsunni
12
Model-Based Design Methods: Internal Model Control (IMC)
It can be shown that the block diagrams of the IMC method and standard feedback control are
equivalent if controllers 𝐺 and 𝐺 ∗ satisfy the relation:
Conventional feedback control
Internal model control
Dr. Yousef Alsunni
13
Model-Based Design Methods: Internal Model Control (IMC)
The IMC controller is designed in two steps:
Step 1: The process model is factored as:
where 𝐺 contains any time delays and right-half plane zeros. In addition, 𝐺 is required to have
a steady-state gain equal to one in order to ensure that the two factors are unique.
Step 2: The IMC controller is specified as:
where 𝑓 is a low-pass filter with a steady-state gain of one. It typically has the form:
𝜏 is the desired closed loop time constant. Parameter 𝑟 is a small positive integer. The usual
choice is 𝑟 = 1 “first order transfer function that relates 𝑌 to 𝑌 ”.
Dr. Yousef Alsunni
14
Example
Use the IMC design method to design two controllers for a FOPTD model. Assume that 𝑟 = 1 for the low-
pass filter (𝑓), and consider two approximations for the time-delay term:
(a) 1/1 Padé approximation
(b) First-order Taylor series approximation
(a) For 1/1 Padé approximation:
∵ ⇒ ⇒
∵𝑓= ⇒ ⇒
Dr. Yousef Alsunni
15
Example
∵ ∴ Rearrange into the PID controller, 𝐺 = 𝐾 1+ +𝜏 𝑠 :
(b) For first-order Taylor series approximation, 𝑒 ≅ 1 − 𝜃𝑠:
Follow the same procedure to get 𝐺 , you will end up with a PI controller with the parameters:
Hence, the type of controller that is designed depends on the time-delay approximation.
Dr. Yousef Alsunni
16
Model-Based Design Methods: Internal Model Control (IMC)
Remark
Recall the equations:
and
Rearrange the above equation:
1
𝑓
𝐺 1 𝐺 𝑓
𝐺 = =
1 𝐺 1−𝐺 𝑓
1− 𝑓𝐺 𝐺
𝐺
Compare with the equation obtained from the DS method:
Hence, the IMC is identical to the DS for which 𝐺 = 𝐺 and 𝑌⁄𝑌 = 𝐺 𝑓.
Dr. Yousef Alsunni
17
Selection of 𝜏
The choice of design parameter 𝜏 is a key decision in both the DS and IMC design methods.
There are many published guidelines for specifying 𝜏 based on theoretical analysis and/or
practical experience. The Table below provides representative recommendations for an FOPTD
model, based on both research and industrial perspectives.
Remember that, as 𝝉𝒄 decreases, 𝑲𝒄 increases,
and more aggressive control is required.
Dr. Yousef Alsunni
18
Controller Tuning Relations
We have seen that model-based design methods such as DS and IMC produced PI or PID
controllers for certain classes of process models. Analytical expressions for PID controller settings
have been developed from other perspectives as well. These expressions are referred to as
controller tuning relations, or just tuning relations.
IMC Tuning Relations
Different IMC tuning relations can be derived depending on the type of low-pass filter 𝑓 and
time-delay approximation that are selected. The Table in the next slide presents the PID
controller tuning relations for the parallel form. The series form can be obtained from the
relations:
Dr. Yousef Alsunni
19
IMC Tuning Relations
Dr. Yousef Alsunni
20
Example
A process model for a liquid storage system is given by:
Use IMC tuning relations to calculate the PI and PID controller settings for 𝐾 = 0.2 and 𝜏 = 8, & 15.
This process model marches the entries M, and N in the Table.
Use M for PI control and N for PID control. 𝐾 and 𝜏 are given. From the process model 𝜃 = 7.4.
Dr. Yousef Alsunni
21
Example PI control
for 𝜏 = 15 the overshoot is smaller for the set-point change,
while the maximum deviation is larger after the disturbance.
The PID controller provides a better disturbance response
than the PI controller with a smaller maximum deviation. In
addition, the PID controller has a very short settling time for
𝜏 = 8, which gives it the best performance of the four
controllers considered.
PID control
Dr. Yousef Alsunni
22
Lag-Dominant Models (𝜃 ⁄𝜏 ≪ 1)
First- or second-order models with relatively small time delays are referred to as lag-dominant
models. For theses models, the IMC and DS methods provide satisfactory set-point responses,
but very slow disturbance responses, because the value of 𝜏 is very large. Fortunately, this
problem can be solved in two different ways:
1. Approximate the lag-dominant model by an integrator-plus-time-delay model.
Approximate the FOPTD with the model:
where 𝐾 ∗ ≜ 𝐾 ∕ 𝜏. Then the IMC tuning relations can be applied.
Dr. Yousef Alsunni
23
Lag-Dominant Models (𝜃 ⁄𝜏 ≪ 1)
2. Skogestad IMC (SIMC) Method.
Skogestad (2003) proposed modifying the IMC tuning relations by limiting the value of 𝜏 :
For PID control and an FOPTD model, Grimholt and Skogestad (2013) suggested using 𝜏 from the
above equation, 𝜏 = 𝜃/3, 𝜏 = 0.5, and 𝐾 = (1/𝐾)(𝜏 + 𝜃/2)/(𝜏 + 𝜃/2).
Dr. Yousef Alsunni
24
Example
Consider a FOPTD model:
This model is lag-dominant because 𝜃/𝜏 = 0.01. Specify three PI controllers using the following methods:
a) IMC (𝜏 = 1)
b) IMC (𝜏 = 2) and the integrator approximation method
c) IMC (𝜏 = 1) and SIMC
a) 𝜏 = 1, 𝜃 = 1, 𝜏 = 100, and 𝐾 = 100 ⇒ Use entry G in the Table:
b) 𝜏 = 2, 𝜃 = 1, and 𝐾 = 100/100 ⇒ Use entry M in the Table:
c) 𝜏 = 1, 𝜃 = 1, 𝜏 = 100, and 𝐾 = 100 ⇒ Use entry G in the Table, but change 𝜏 :
Dr. Yousef Alsunni
25
Example set-point responses
The values are summarized in the following Table:
disturbance responses
The controller responses are shown in the Figures. the IMC
controller provides an excellent set-point response. The two
special controllers provide significantly improved disturbance
rejection with much smaller settling times
Dr. Yousef Alsunni
26
On-Line Controller Tuning
The control systems for modern industrial plants typically include thousands of individual control
loops. During control system design, preliminary controller settings are specified based on
process knowledge, control objectives, and prior experience. After a controller is installed, the
preliminary settings often prove to be satisfactory. But for critical control loops, the preliminary
settings may have to be adjusted in order to achieve satisfactory control. This on-site adjustment
is referred to by a variety of names: on-line tuning, field tuning, or controller tuning. In this
chapter, we present three important methods for on-line controller tuning:
1. Continuous Cycling Method
2. Relay Auto-Tuning
3. Step Test Method
Dr. Yousef Alsunni
27
On-Line Controller Tuning: Continuous Cycling Method
The Ziegler and Nichols (Z-N) continuous cycling method is based on the following trial and error
procedure:
Step 1: After the process has reached steady state, introduce P control by eliminating the integral
and derivative modes (i.e., set 𝜏 = 0 and 𝜏 = ∞).
Step 2: Introduce a small, set-point change so that the controlled variable moves away from the
set point. Gradually increase 𝐾 (in absolute value) in small increments until continuous cycling
occurs. The term continuous cycling refers to a sustained oscillation with a constant amplitude.
The value of 𝐾 that produces continuous cycling is defined to be the ultimate gain, 𝐾 . The
period of this sustained oscillation is the ultimate period, 𝑃 .
Then, the controller settings can be calculated using the following Table.
Note that for P control, 𝑲𝒄 is one-half of the stability limit, 𝑲𝒄𝒖 .
When integral action is added, 𝑲𝒄 is further reduced to
𝟎. 𝟒𝟓𝑲𝒄𝒖 . The stabilizing effect of derivative action allows 𝑲𝒄 to
be increased to 𝟎. 𝟔𝑲𝒄𝒖 for PID control.
Dr. Yousef Alsunni
28
On-Line Controller Tuning: Continuous Cycling Method
Note:
For 𝐾 < 𝐾 , the closed loop response 𝑦(𝑡) is
usually overdamped or slightly oscillatory (a).
When 𝐾 = 𝐾 , continuous cycling occurs (b). For
𝐾 > 𝐾 closed-loop system is unstable and will
theoretically have an unbounded response (c). But
in practice, controller saturation prevents the
response from becoming unbounded and produces
continuous cycling instead (d). If Figure (d) were
used to determine 𝐾 both the estimated value of
𝐾 and the calculated value of 𝐾 would be too
large. Hence, chose the minimum value that cause
the continuous cycling.
Dr. Yousef Alsunni
29
On-Line Controller Tuning: Continuous Cycling Method
Some disadvantages of the continuous cycling method:
• The trial-and-error determination of 𝐾 and 𝑃 can be quite time consuming if the process
dynamics are slow
• For many applications, continuous cycling is objectionable because the process is pushed to a
stability limit. Consequently, if external disturbances or process changes occur during the test,
unstable operation or a hazardous situation could result
Remark:
Apply the Z-N settings for the parallel form and then convert them to series form, if necessary.
Dr. Yousef Alsunni
30
Calculation of FOPTD Model Parameters from and
Model parameters for simple transfer functions can be calculated from 𝐾 and 𝑃 . For example,
consider the FOPTD model. If time delay 𝜃 is known or can be estimated, then 𝐾 and 𝜏 can be
calculated from the equations:
Then, the model-based design methods can be used to calculate PID controller settings.
Dr. Yousef Alsunni
31
On-Line Controller Tuning: Relay Auto-Tuning
This method was developed as an alternative to the continuous cycling method. In relay auto-
tuning method, a simple experimental test is used to determine 𝐾 and 𝑃 . For this test, the
feedback controller is temporarily replaced by an on–off controller (or relay). Hence, the
controlled variable would exhibit a sustained oscillation. 𝐾 and 𝑃 can be obtained from the
Figure and the equation below.
where 𝑑 is the relay amplitude (set by the user)
and 𝑎 is the measured amplitude of the process
oscillation.
Dr. Yousef Alsunni
32
On-Line Controller Tuning: Relay Auto-Tuning
The relay auto-tuning method has several important advantages compared to the continuous
cycling method:
• Only a single experimental test is required
• The amplitude of the process output "𝑎" can be restricted by adjusting relay amplitude "𝑑"
• The process is not forced to a stability limit
• The experimental test is easily automated
However, for slow processes, it may not be feasible to subject the process to the two to four
cycles of oscillation required to complete the test.
Dr. Yousef Alsunni
33
On-Line Controller Tuning: Step Test Method
Ziegler and Nichols proposed a second on-line tuning technique based on a single step test. The
experimental procedure is quite simple. After the process has reached steady state (at least
approximately), the controller is placed in the manual mode. Then, a small step change in the
controller output is introduced. The controller settings are based on the process reaction curve,
the open-loop step response. Consequently, this on-line tuning technique is referred to as the
step test method or the process reaction curve method.
Dr. Yousef Alsunni
34
On-Line Controller Tuning: Step Test Method
Two types of process reaction curves are shown 𝑲𝒆 𝜽𝒔
𝒔
in the Figure for step changes occurring at 𝑡 = 0:
Both step responses are characterized by two
parameters: 𝑆, and 𝜃.
The transfer function model can be obtained
from the step response by using the parameter
estimation methods. Then, any of the model
based tuning relations can be employed to 𝑲𝒆 𝜽𝒔
𝝉𝒔 𝟏
calculate the controller parameters.
Dr. Yousef Alsunni
35
On-Line Controller Tuning: Step Test Method
The main advantage of the step test method is that only a single experimental test is necessary.
However, the method does have some disadvantages:
• The experimental test is performed under open loop conditions. Thus, if a significant
disturbance occurs during the test, no corrective action is taken.
• For a nonlinear process, the test results can be sensitive to the magnitude and direction of the
step change.
Dr. Yousef Alsunni
36
Example
For a feedback control system, the controller was initially in the manual mode, and then its output was
suddenly changed from 30% to 43%. The resulting process reaction curve is shown below. Thus, after the
step change occurred at 𝑡 = 0, the measured exit composition changed from 35% to 55%. Determine an
appropriate process model for 𝐺 ≜ 𝐺 𝐺 𝐺 𝐺 .
the feedback loop has
been opened between
the controller and the
current-to-pressure (I/P)
transducer
FOPTD model can be developed from the process reaction curve.
We need to find the parameters for the model 𝐺 =
Dr. Yousef Alsunni
37
Example
Remember that the tangent line passes through the points 𝑥̅ + 𝐾𝑀
𝜃, = 0 & 𝜃 + 𝜏, = 1 or 𝜃, 𝑥̅ & 𝜃 + 𝜏, 𝑥̅ + 𝐾𝑀 𝑥̅
From the plot; 𝜃 = 1.07 𝑚𝑖𝑛
In addition; 𝜃 + 𝜏 = 7.00 𝑚𝑖𝑛 ⇒ 𝜏 = 7.00 − 1.07 = 5.93 𝑚𝑖𝑛
𝜃 𝜏+𝜃
𝐾= = = 1.54
. . Use a tuning relation for FOPTD to get the controller parameter. For example,
⇒𝐺= = use row “G” in the IMC Table to calculate PI controller setting
.
Dr. Yousef Alsunni
38
Guidelines For Common Control Loops
General guidelines for selection of controller type and controller settings are available for
common process variables. The general guidelines presented below are useful but they should
be used with caution, because exceptions do occur.
Flow Rate
• Flow and pressure control loops are characterized by fast responses (on the order of seconds),
with essentially no time delay.
• PI control is generally used with intermediate values of the controller gain.
• The presence of recurring high-frequency noise discourages the use of derivative action,
because it amplifies the noise.
Dr. Yousef Alsunni
39
Guidelines For Common Control Loops
Liquid Level
• Standard P or PI controllers are widely used for level control.
• Integral control action is often used but can be omitted if small offsets can be tolerated.
• Derivative action is not normally used because the level measurements are often noisy.
Gas Pressure
• PI controllers are normally used with only a small amount of integral control action.
• Usually the pressure vessel is not large, leading to relatively small residence times and time
constants.
• Derivative action is normally not needed because the process response times are usually quite
small.
Dr. Yousef Alsunni
40
Guidelines For Common Control Loops
Temperature
• General guidelines for temperature control loops are difficult to state because of the wide
variety of processes and equipment involving heat transfer and their different time scales.
• PID controllers are commonly employed to provide quicker responses than can be obtained
with PI controllers.
Composition
• Composition control loops generally have characteristics similar to temperature loops but with
certain differences:
o Measurement (instrument) noise is a more significant problem
o The time delay associated with the analyzer and its sampling system may be a significant
factor
• These two factors can limit the effectiveness of derivative action.
Dr. Yousef Alsunni
41
Troubleshooting Control Loops
• Serious control problems can result from a failure of any single component.
• Even if all the individual components are functioning properly, there is no guarantee that the
overall system will perform properly
• If a control loop is not performing satisfactorily, then troubleshooting is necessary to identify
the source of the problem
• Based on experience in the chemical industry, it has been observed that a control loop that
once operated satisfactorily can become either unstable or sluggish for a variety of reasons
that include:
o Changing process conditions
o Plugged line in a pressure or differential pressure transmitter
o Fouled heat exchangers
• Finally, controller re-tuning may be necessary if the control loop exhibits undesirable
oscillations or excessively sluggish responses
Dr. Yousef Alsunni
42
Troubleshooting Control Loops
• The starting point for troubleshooting is to obtain enough background information to clearly
define the problem. Many questions need to be answered:
What is the process being controlled?
What is the controlled variable?
What are the control objectives?
Are closed-loop response data available?
Is the controller in the manual or automatic mode? Is it reverse or direct acting?
If the process is cycling, what is the cycling frequency?
What control algorithm is used? What are the controller settings?
Is the process open-loop stable?
What additional documentation is available, such as control loop summary sheets, piping
and instrumentation diagrams, etc.?
Dr. Yousef Alsunni
43