You are on page 1of 27

University of Khartoum

Faculty of Engineering
Chemical Engineering Department

Lecture (2)
PID Controller Tuning
2 References

 Thomas E. Marlin, Process Control – Designing Processes and Control


Systems for Dynamics Performance, 2nd Edition, McGraw Hill, 2000.
 J.M. Coulson & J.F. Richardson, Chemical Engineering volume 3, 3rd Edition
Butterworth Heinemann,1994.
 Parbir K. Sarkar, Process Dynamics and Control, PHI Learning Private Limited,
2014.
3 DEFINING THE TUNING PROBLEM

 The entire control problem must be completely defined before the tuning
constants can be determined and control performance evaluated.
Naturally, the physical process is a key element of the system that must be
defined.
 the form of the PID controller used here is:
1 𝑡 𝑑𝐶𝑉(𝑡)
𝑀𝑉 𝑡 = 𝐾𝑐 𝐸 𝑡 + න 𝐸 𝑡 ′ 𝑑𝑡 ′ − 𝑇𝑑 +𝐼
𝑇𝐼 0 𝑑𝑡
 Next, carefully defining control performance by specifying several goals to
be balanced concurrently. This definition provides a comprehensive
specification of control performance that is flexible enough to represent
most situations. The three goals are the following:
1) Controlled-variable performance: The well-tuned controller should provide
satisfactory performance for one or more measures of the behavior of the
controlled variable, e.g. minimize the integral of absolute value of the error:

𝐼𝐴𝐸 = න 𝑆𝑃 𝑡 − 𝐶𝑉(𝑡) 𝑑𝑡
0
4

2) Model error: Linear dynamic models always have errors, because the plant is
nonlinear and its operation changes. Since the tuning will be based on these
models, the tuning procedure should account for the errors, so that acceptable
control performance is provided as the process dynamics change. The changes
are defined as ± percentage changes from the base-case or nominal model
parameters. The ability of a control system to provide good performance when
the plant dynamics change is often termed robustness.
3) Manipulated-variable behavior: We shall choose the common goal of
preventing "excessive" variation in the manipulated variable by defining limits on
its allowed variation.
 To evaluate the control performance, the goals and the scenario(s) under
5 which the controller operates need to be defined. These definitions are
summarized in table below:
6 DETERMINING GOOD TUNING
CONSTANT VALUES
 The "best" tuning constants are those values that satisfy the control
performance goals.
 the optimum tuning gives the minimum IAE, for the selected plant (with
variations in model parameters), when the manipulated variable observes
specified bounds on its dynamic behavior.
 The dynamic response of the control system with a complex process model
including dead time cannot be determined analytically, but it can be
evaluated using a numerical solution of the process and controller
equations. The dynamic equations are solved from the initial steady state to
the time at which the system attains steady state after the input change.
 The result is a set of tuning (𝐾𝑐 , 𝑇𝐼 , 𝑇𝑑 ) that gives the best performance for a
specific plant, model uncertainty, and control performance definition.
7 Introduction
 Many procedures exist for estimating optimum settings for controllers. One
of the usual bases employed is that the response of the controlled variable
to a change in load or set point should have a decay ratio of 1/4.
 There is no direct mathematical justification for this but it is a compromise
between a rapid initial response and a short response time.
 The response time (settling time or line-out time) is the time required for
the absolute value of the system response
to come within a small specified amount
of the final value of the response (±5%).
8 On line Trial and Error Tuning Method

 Dynamic testing on the given process is performed by executing the


following stepwise procedure to find the optimum controller parameter
values:
Step 1. Eliminate integral and derivative action by setting 𝑇𝐼 to its maximum
value and 𝑇𝑑 to its minimum value.
Step 2. Set 𝐾𝑐 at a low value (say 𝐾𝑐 = 0.2 to 0.5), put the controller on
automatic and apply a small step in load or set point (observe the response of
the controlled variable).
Step 3. Increase the 𝐾𝑐 by small increments, and each increment is followed
by a small set point or load change, until sustained oscillation with constant
amplitude (continuous cycling) of the measured variable is observed.
9

Step 4. Reduce 𝐾𝑐 by a factor of 2.


Step 5. Decrease 𝑇𝐼 in small increments, and each increment is followed by a
small setpoint or load change, until a sustained oscillation with a constant
amplitude (continuous cycling) of the measured variable is observed. Set 𝑇𝐼
equal to three times of this value.
Step 6. Increase 𝑇𝑑 in small increments, and each increment is followed by a
small set point or load change, until a sustained oscillation with a constant
amplitude (continuous cycling) of the measured variable is observed. Set 𝑇𝑑
equal to one third of this value.
 The value of 𝐾𝑐 , that results in continuous cycling, is termed as the ultimate
gain and is denoted by 𝐾𝑈 .
10 Ziegler–Nichol’s Method:
The Ultimate Sensitivity Method:
 If the frequency response characteristics of the control system are known
then it is possible to estimate values of controller parameters which will give
specified gain and phase margins. However, this necessitates trial and error
procedures. The semi-empirical method of Ziegler and Nichols is more easily
applied.
 Ziegler and Nichol method, presented the controller setting formulae for (P),
(PI), and (PID) controllers based on continuous cycling experiment carried
on the close loop process. The sustained oscillatory condition is to be
obtained by the way as described above after having the controller turned
to manual with only the proportional mode remaining active. Their
objective function was that the tuned close loop system would produce an
under damped oscillatory response in the disturbed condition, with quarter
decay ratio(DR = 0.25) character.
11

 All the components in the control loop, excepting the controller, is plotted
and the cross-over frequency determined. If the amplitude ratio at 𝜔𝑐 is
(𝐴𝑅)𝑐 then, the gain of a proportional controller which would cause the
system to be on the verge of instability will be:
1
𝐾𝑢 =
(𝐴𝑅)𝑐
 The ultimate period is defined as that period of sustained cycling which
would occur if a proportional controller of gain 𝐾𝑢 were used, thus:
2𝜋
𝑃𝑢 =
𝜔𝑐
12
 Using the values of 𝐾𝑢 and 𝑃𝑢 , Ziegler and Nichol recommended the
following controller parameter setting formulae:

 The Ziegler-Nichols settings are derived from 𝐾𝑢 , and 𝑃𝑢 , on the basis of gain
and phase margins of 2 and 30°, respectively, for proportional control
alone. The addition of integral action introduces more phase lag at all
frequencies, and hence a lower value of proportional gain 𝐾𝑐 is required to
maintain the same phase margin. Adding derivative action introduces
phase lead and thus a greater value of 𝐾𝑐 can be tolerated.
13 Example: The three-tank mixing process

 Calculate controller tuning constants for the three-tank mixing process by


using the Ziegler-Nichols closed-loop method. The transfer function for this
process has already been developed:
0.039
𝐺𝑝 𝑠 = 𝐺𝑐 𝑠 = 𝐾𝑐 = 1
5𝑠+1 3
∠𝐺 𝑗𝜔 = 3 tan−1 (−5𝜔)
3
1
𝐺(𝑗𝜔) = 0.039
1 + 52 𝜔 2
 Use trial-and-error procedure to determine
The critical frequency:
14

 From the results in the table, the ultimate gain and period can be
2𝜋 1
determined to be 𝑃𝑢 = 𝜔 = 17.9 𝑚𝑖𝑛 and 𝐾𝑢 = (𝐴𝑅) = 208. The tuning
𝑐 𝑐
constants for P,PI, and PID controllers according to the Ziegler-Nichols
correlations are:
15 Process Reaction Curve Method:
The Cohen-Coon Procedure:
 The controller is placed on manual control (i.e. effectively removing it from
the control loop) and the response of the measured variable to a small step
change in the manipulated variable is recorded as shown in figure (a). This
response is called the process reaction curve.
 A tangent is drawn to this curve at the point of inflexion figure (b). The
16 intercept of this tangent on the abscissa is termed the (𝜏𝑎𝑑 ) apparent dead
time of the system. The gradient of the tangent is given by:
𝐾𝑟
𝑚=
𝜏𝑎
Where: 𝐾𝑟 the steady state gain of the response and
𝜏𝑎 is the apparent time constant
 The relevant controller settings are given in table below:
17

 The Cohen-Coon settings are based on the assumption that the open-loop
system behaves in the same manner as the transfer function:
𝐾𝑟 exp(−𝜏𝑎𝑑 𝑠)
𝐺 𝑠 =
1 + 𝜏𝑎𝑑 𝑠
 Cohen and Coon determined the relationships in table above so as to give
responses having large decay ratios, minimum offset and minimum area
under the closed-loop response curve.
University of Khartoum
Faculty of Engineering
Chemical Engineering Department

18

Stability Analysis and Controller Tuning


19 THE CONCEPT OF STABILITY

 A system is stable if all output variables are bounded when all input
variables are bounded.
 A variable is bounded when it does not increase in magnitude to ±00 as
time increases. Typical bounded inputs are step changes and sine waves;
an example of an unbounded input is a ramp function.
 a chemical reactor would be stable according to the definition if a step
increase of 1°C in its inlet temperature led to a new steady-state outlet
temperature that was 100°C higher. Thus, systems that are very sensitive
can be stable as long as they attain a steady state after a step change.
20 STABILITY OF LINEAR SYSTEMS:
 The response of the non-self-regulating level process in figure below to a
step change in the inlet flow is to be determined for a case with
proportional-only control.
 The linear models for the process and the controller are:
𝑑𝐿
𝐴 = 𝐹𝑖𝑛 − 𝐹𝑜𝑢𝑡
𝑑𝑡
𝐹𝑜𝑢𝑡 = 𝐾𝑐 𝑆𝑃 − 𝐿 + 𝐹𝑜𝑢𝑡 𝑠
𝑚3
 Change in flow 20 ℎ

 Expressing variables in deviation form,


equating the set point and initial steady
state (i.e., 𝐿′ = 𝐿 − 𝐿𝑠 = 𝐿 − 𝑆𝑃), and
combining into one equation gives:
𝑑𝐿′
𝐴 = 𝐹𝑖𝑛 ′ + 𝐾𝑐 𝐿′
𝑑𝑡
21  By taking the Laplace transform and rearranging, the transfer function for
this system can be derived as:
𝐿(𝑠) − 1Τ𝐾𝑐
=
𝐹𝑖𝑛 ′ (𝑠) 𝐴
−𝐾𝑐 𝑠 + 1
 Since the system is simple, the following analytical solution to the equations
can be derived for a step change in the inlet flow, 𝐹𝑖𝑛 ′ 𝑠 = Δ𝐹𝑖𝑛 Τ𝑠.
Δ𝐹𝑖𝑛
𝐿′ = (1 − 𝑒 −𝑡Τ𝜏 )
−𝐾𝑐
 the controller gain affects the time constant of the feedback system.
increasing the magnitude of the controller gain, which gives negative
feedback control (which in this case is 𝐾𝑐 < 0), decreases the time constant
as well as reducing the steady-state offset.
 Applying the final value theorem, the ultimate value of the level after a
step change in the inlet flow is:
Δ𝐹𝑖𝑛 Τ−𝐾𝑐 𝑠 Δ𝐹𝑖𝑛
lim 𝐿(𝑡) = lim 𝑠𝐿(𝑠) = lim 𝑠 =
𝑡→∞ 𝑠→0 𝑠→0 𝐴 −𝐾𝑐
𝑠 + 1
−𝐾𝑐
22 Stability Analysis Of Linear And
Linearized Systems:
 Essentially all chemical processes are nonlinear. Since no general stability
analysis of nonlinear systems is available, the local stability of the linearized
approximation about a steady state is evaluated.
 To develop a general stability analysis for linearized systems, the following
nth-order linear dynamic model with a forcing function f(t) is considered.
𝑑𝑛 𝑌 𝑑 𝑛−1 𝑌 𝑑𝑌
+ 𝑎1 𝑛−1 + ⋯ + 𝑎𝑛−1 + 𝑎𝑛 𝑌 = 𝑓 𝑡 = 0
𝑑𝑡 𝑛 𝑑𝑡 𝑑𝑡
 The Laplace transform of the equation, with all initial conditions equal to
zero, is:
𝑠 𝑛 + 𝑎𝑛−1 𝑠 𝑛−1 + ⋯ + 𝑎1 𝑠1 + 𝑎0 𝑌 𝑠 = 0
23
 the solution to this equation is of the form:

𝑌 𝑡 = 𝐴𝑖 𝑒 𝛼𝑖𝑡 + ⋯ + 𝐵1 + 𝐵2 𝑡 + ⋯ 𝑒 𝛼𝑝 𝑡 + ⋯ + 𝐶1 cos 𝜔𝑡 + 𝐶2 sin 𝜔𝑡 𝑒 𝛼𝑞 𝑡 + ⋯

 where 𝛼𝑖 = the ith real distinct root of the characteristic polynomial


𝛼𝑝 = repeated real root of the characteristic polynomial.
𝛼𝑞 = real part of complex root of the characteristic polynomial.
A, B,C = constants depending on the initial conditions.
 The stability of the linearized system is entirely determined by the values of
the exponents (the α′ s). When all of the exponents have negative real
parts, the solution cannot increase in an unlimited fashion as time increases.
 A system with one or more zero real parts is bounded input-bounded
output unstable.
24 EXAMPLE

 Determine the stability of the variable T(t) from the following model.

𝑑2𝑇 𝑑𝑌
− 1.23 − 1.38𝑇 = 0
𝑑𝑡 2 𝑑𝑡
𝑠 2 − 1.23 𝑠 − 1.38 𝑇 𝑠 = 0
𝑠 2 − 1.23 𝑠 − 1.38 = 0

𝑠 = −0.71 𝑠 = 1.94 ← unstable.


25 STABILITY ANALYSIS OF CONTROL
SYSTEMS:
 The analysis method for linear systems can be tailored to feedback control
systems by considering the models in transfer function form.
 The resulting methods will be useful in :
1) Determining the stability of control designs,
2) Selecting tuning constant values,
3) Gaining insight into how process characteristics influence tuning constants and
control performance.
 A general transfer functions for a feedback loop:
Disturbance response:
𝐶𝑉(𝑠) 𝐺𝑑 (𝑠)
=
𝐷(𝑠) 1 + 𝐺𝑝 (𝑠)𝐺𝑣 (𝑠)𝐺𝑐 (𝑠)𝐺𝑠 (𝑠)
 Assume that the transfer function can be expressed as a polynomial in s as
follows:
26 1 + 𝐺𝑝 (𝑠)𝐺𝑣 (𝑠)𝐺𝑐 (𝑠)𝐺𝑠 (𝑠) 𝐶𝑉(𝑠) = 𝐺𝑑 (𝑠)𝐷(𝑠)
𝑠 𝑛 + 𝑎𝑛−1 𝑠 𝑛−1 + ⋯ 𝐶𝑉 𝑠 = 𝑠 − 𝛽1 𝑠 − 𝛽2 … 𝑠 − 𝛽𝑚 𝐷(𝑠)
 The right-hand side (the numerator of the original transfer function) represents
the forcing function, which is always bounded because physical input variables
cannot take unbounded values, and assuming that the disturbance transfer
function, 𝐺𝑑 (𝑠), is stable.
 The essential information on stability is in the left-hand side of equation (10.17),
called the characteristic polynomial, which is the denominator of the closed-
loop transfer function. Setting the characteristic polynomial to zero produces
the characteristic equation.
 Continuing the stability analysis, the solution to the homogeneous solution is
evaluated to determine stability. For the transfer function, the exponents can be
determined by the solution of the following equation:
𝑠 𝑛 + 𝑎𝑛−1 𝑠 𝑛−1 + ⋯ = 0
 A linearized closed-loop control system is locally stable at the steady-state point
if all roots of the characteristic equation have negative real parts. If one or more
roots with positive or zero real parts exist, the system is locally unstable.
 the roots of the characteristic equation are also referred to as the poles of the
closed-loop transfer function,
Example: The three-tank mixing process
27

 The stability of the three-tank mixing process is to be evaluated under feedback


control with a proportional-only controller.
1
𝐶𝑉(𝑠) 𝐺𝑑 (𝑠) 5𝑠 + 1 3
= =
𝐷(𝑠) 1 + 𝐺𝑝 (𝑠)𝐺𝑣 (𝑠)𝐺𝑐 (𝑠)𝐺𝑠 (𝑠) 1 + 𝐾 0.039
𝑐 3
5𝑠 + 1

 Characteristic equation:
125 𝑠 3 + 75 𝑠 2 + 15 𝑠 + (1 + 0.039𝐾𝑐 ) = 0

You might also like