Section 8. Loop Tuning
Section 8. Loop Tuning
Section 8. Loop Tuning
Loop Tuning
Section 8
Loop Tuning
8.1 Introduction
In order secure all the economic benefits that can accrue as a result of implementing advanced
control, all the loops within the plant should, ideally, perform optimally. This, however, is not
economically feasible. As a result, every effort should be concentrated on key control loops
that directly affect product-measured qualities such as:
¾ yield;
¾ purity;
¾ cost to produce; and
¾ up time (reliability).
By now, it should be apparent that the field equipment must perform to certain minimum
requirements.
“No amount of advanced control that relies on the use of poor field instrumentation can be
expected to yield worthwhile benefits. Think of control as a hierarchy: everything must work
well at the lower levels for the higher levels above to work.”
M.J. Oglesby (ICI Engineering Technology)
If you are not meeting these requirements, any attempts to optimise your loop by ‘twiddling’
with the knobs on your controller are likely to be a complete waste of time.
Inasmuch that process PID controllers vary considerably from manufacturer to manufacture,
so to do the processes on which they are to perform. As a result, loop tuning is often referred
to as an 'art form'. And so it was – until John G. Ziegler and Nathaniel B. Nichols delivered
their controversial paper in December 1941 at the annual meeting of the ASME.
The result was, the now famous "’Ziegler-Nichols’ methods of tuning controllers – methods
that have withstood the test of time and work just as well now as many of the later more
sophisticated optimising forms on the great majority of process applications.
That is not to say that the Ziegler Nicholls method is the only, or even the best, method. A
fairly comprehensive list of the different methods available is listed below which tabulates 75
different methods!
Why so many? Well, much depends on the type of process itself, and what we are trying to
achieve. To start with there are vast differences in the requirements for a typical flow loop
and those on a surge level tank (Table 8.1).
We then need to decide: are we trying to optimise on process disturbances or are we trying to
optimise on setpoint changes? Are we trying to minimise overshoot or, indeed, even
eliminate overshoot altogether (start-up on a pressure vessel)? And just how do we determine
performance?
No system can respond instantly to disturbances and changes in the setpoint. Consequently,
before we can assess how well a particular control scheme is likely to work, we must first
determine a set of performance criteria.
Assuming that the closed loop response is essentially a second order system, any one of the
responses shown in a Figure 8.1 could be used.
Setpoint change
Unstable:
Increasing
oscillation
Figure 8.1. Possible closed loop responses of
a second order system, to a step input change
Continuous in the setpoint.
oscillation (r = 0)
Under damped
(r > 0 < 1)
Critically damped
(r = 1)
Over damped
(r > 1)
Theoretically, of course, the time taken for the system to settle completely after a change in
setpoint is infinite. However, in practice a ‘tolerance limit’ is defined which can be expressed
as a percentage of the setpoint change. A typical value of the tolerance limit is 5% and once
the plant is within this band it is considered to have achieved the setpoint.
One of the most commonly used performance criteria is what is termed ‘Quarter Amplitude
Damping’ (QAD) in which each cycle peak is one quarter of the amplitude of the previous
peak (Figure 8.2).
Although, for many applications, this is an adequate and easily achievable response, it is not
necessarily either a desirable response or even an optimal response.
Firstly, they claim, it’s not safe enough – it doesn’t allow enough gain margin for process dynamic changes. This
could result in instability.
Secondly, as shown below, a quarter wave response consists of approximately 4 cycles. This means that the
valve has to reverse eight times every time there is a control error change.
Is this really desirable? Do you really want to work your valves so hard?
Thirdly, what happens if there is excessive deadband + hysterisis? On each reversal of the valve the controller
output has to ramp through the hysteresis band under the command of the controller's integrator. This slows
down the control, and increases variance. On slow processes such as temperature it can literally take hours
before the process finally settles out. This means that on many loops, QAD tuning results in much worse control
variance than even critical damping, where no valve reversals at all are made on a control error change.
At first glance it might be assumed that we want the process to follow a setpoint change as
fast as possible. In other words, the basic aim is to keep the error signal to a minimum. Thus,
in the response shown in Figure 8.3 (a) the shaded area is the integral of the error and could
be used as an index of performance: the smaller the area, the better the response.
So, if we plotted the integral value on the same timescale, we'd end up with a curve that
attains a maximum value after all the oscillations have died down (Figure 8.3 (b)).
Process
Setpoint variable
+
+ + +
− − − −
Time
(b)
Well, not really! Bearing in mind that the error signal is varying between a negative and a
positive value, we'd actually end up with an integral value that would also vary sinusoidally.
In order to overcome this problem we would thus have to take the integral value of the
absolute error – usually referred to as the Integrated Absolute Error (IAE).*
∞
Where: IAE = ∫ e (t ) dt
0
Please note that this performance criterion, and the ones that follow, merely defines a mathematical model
chosen for optimisation and which is used primarily for academic purposes, together with process
simulations, in the study of control algorithms. This has nothing to do with the integral action associated
with the controller.
However if, as occurs with a P only controller, the PV never attains the same value as the
setpoint, there is a standing offset (Figure 8.4 (a)) and the area under the curve (and thus the
integral value) will not converge to a final value but will increase, with time, without limit
(Figure 8.4 (b)).
Process
Set point variable
Proportional
offset
Increasing
area of the
but will increase without limit.
error signal
Time
(b)
It must also be appreciated that merely reducing the integral is not necessarily the solution
that we’re looking for either. For example, in the response shown in Figure 8.5, the integral
(the shaded area) is definitely smaller. Unfortunately the peaks are also considerably larger.
Process
variable
This may be overcome by taking the integral of the square of the error – known as the Integral
of the Square Error (ISE).
∞ 2
Where: ISE = ∫ [e (t )] dt
0
Now, large errors will contribute more and there will be a larger a penalty for a large
overshoot. Conversely small errors contribute less and there is thus a smaller penalty for
small persisting oscillations.
Although this solution minimises overshoot, it is at the expense of long settling time, and is
not directly related to economic performance.
Errors that are likely to occur later in time, rather than normal transients, can make use of
time-dependant functions such as the Integral of the Time-Weighted Absolute Error (ITAE)
or Integral of the Time Squared Error (ITSE)
∞
Where: ITAE = ∫ e (t ) ∗ t dt
0
∞ 2
and: ITSE = ∫ [e (t )] ∗t dt
0
Both these solutions emphasize the minimisation of error duration and are suitable for batch
operation or large set point changes. On the negative side there is the potential for
considerable overshoot. In addition they are quite removed from direct economic
performance.
Before we embark on the actual process of tuning we need to appreciate that it involves
introducing some form of upset to the loop involved. We need, therefore, to be particularly
careful to ensure that we do not make things worse or even cause a shutdown. It is wise,
therefore, to take heed of some of the pre-test ‘back-stops’, proposed by David St. Clair and
Greg McMillan, that we need to put in place before we start tuning.
¾ You should have some idea of what you’re trying to do and what you can expect to do.
¾ You should have some idea of how fast and how far the process is going to react to
changes in the manipulated variable
¾ You should know and agree on how much change you will allow in the process and in the
manipulated variable.
¾ You should know and agree on who is going to make the actual adjustments to the
controller settings
o You should also be confident that they know how to do it physically
o You should also be confident that they are not likely to become confused if
something has to be done in a hurry
¾ You should know and agree on who is going to switch between manual and automatic
¾ You should know and agree on who is going to make the setpoint changes
¾ You should have knowledge of the safety interlocks and any other safety concerns for the
process
¾ You should pick a time to tune such that you will be available for a reasonable time
afterwards should problems arise
¾ You should record the existing settings and the controller output in the event you want to
return to them either in a hurry or simply to the system as you found it.
¾ You should make sure the changes are communicated to all operating person.
¾ If a log book is kept for this purpose, use it.
We obviously don't have the space, the time, or the patience to cover all 75 tuning methods.
So, we will examine some of the more traditional methods that have stood the test of time.
These include those proposed by Ziegler-Nicholls, Cohen-Coon, and Pessen. We’ll also look
at Lambda tuning.
The basic procedure is simple: use Proportional Control as the principal method; add Integral
Control to remove offset; and then add Derivate Control (if necessary) to remove the
destabilising effect of Integral Control.
We stated earlier that the tuning process involves introducing some form of upset to the loop
involved.
In many regards the open loop reaction method is the most obvious solution. We introduce a
step change to the Process Demand (PD) and observe the Process Variable (PV). By
observing the process reaction we can immediately obtain information regarding the dynamics
of the process itself. This makes this method very useful for troubleshooting since we usually
have some idea as to what the response should look like. Consequently, if it doesn’t match up
to what we had expected, it gives us some clues as to the nature of the problem.
Critically, we can judge straight away if the process is self-regulating. Further, we can also
determine the process gain (KP) and the two critical time constants involved: the deadtime (θ)
and the response time (τ).
Armed with information regarding the dynamics of the process, we are now in a position to
adjust the controller parameters (Proportional, Integral and Derivative) to produce a ‘best-fit’
tuning solution.
60.0
Percentage
55.0
∆PD
∆PV
50.0
45.0
0.0 10.0 20.0 30.0 40.0 50.0 60.0 70.0 80.0 90.0 100.0
Time (seconds)
Figure 8.6. Open loop reaction showing the change in PV as a result of a step-change in
the process demand (PD).
The first thing to note is that this is a classical first order response plus dead-time (FOPDT).
The second point to note is that it is a self-regulating process in which the PV has evened out
to a new steady state value as a result of a step change applied to the process demand (PD).
We can also now calculate the process gain (Kp) which, as we saw earlier, is given by:
∆ PV
KP =
∆ PD
Examination shows that the change in output (∆PD) is:
Our next task is to determine the deadtime (θ). In this case it is very easy to determine and, as
shown in Figure 8.7, is 10 seconds.
65.0
60.0
Percentage
55.0
∆PD
∆PV
50.0
45.0
0.0 10.0 20.0 30.0 40.0 50.0 60.0 70.0 80.0 90.0 100.0
θ Time (seconds)
60.0
Percentage
55.0
∆PD
∆PV
63.2%
50.0
45.0
0.0 10.0 20.0 30.0 40.0 50.0 60.0 70.0 80.0 90.0 100.0
θ τ Time (seconds)
Figure 8.8. The response time (τ) is defined by the time required for the variable to reach
63.2% of its final value.
and the response time (τ) (the time taken to reach this value from the end of the dead time
period) is:
We now have the three values necessary to calculate our tuning parameters:
KP = 1.6
θ = 10 s
τ = 20.2 s
It is now only necessary to apply these parameters to the relevant formula as detailed in Table
8.3.
P control τ τ ⎛ θ ⎞
Gain (KC) ⎜⎜1+ ⎟⎟
KP θ KP θ ⎝ 3 τ ⎠
PI control 0.9 τ 0 .9 τ ⎛ θ ⎞
Gain (KC) ⎜⎜1+ ⎟⎟
KP θ KP θ ⎝ 11 τ ⎠
⎛ τ + 0 .1 θ ⎞
Integral time (TI) 3.33 θ 3.33 θ ⎜⎜ ⎟⎟
⎝ τ + 2 .2 θ ⎠
PID control 1.2 τ 1.33 τ ⎛ 3θ ⎞
Gain (KC) ⎜⎜1+ ⎟⎟
KP θ KP θ ⎝ 16 τ ⎠
⎛ τ + 0 .2 θ ⎞
Integral time (TI) 2.0 θ 2.5 θ ⎜⎜ ⎟⎟
⎝ τ + 0 .6 θ ⎠
⎛ τ ⎞
Derivative time (TD) 0.5 θ 0.37 θ ⎜⎜ ⎟⎟
⎝ τ + 0 .2 θ ⎠
Tuning method
1. Put the controller into MANUAL mode.
2. Make a small step change to the PD value.
The size of the step change will depend quite a lot of all local plant conditions. A large
change (10% or even greater) is desirable in order to clearly distinguish the change in PV
from measurement noise or other disturbances. However, in order to avoid detrimental
upsets to the process, the change should be as small as possible (less than 5%).
3. Record the response of the process (Figure 8.8).
4. Calculate P, I and D according to Table 8.3 above.
Lambda tuning
Lambda tuning is particularly effective for tuning relatively fast loops that are dead-time
dominant. Lambda tuning also helps to minimise interactions and suppress oscillations.
Lambda tuning provides an over-damped response that is extremely desirable for processes
operating at some critical limit. In the simplest sense, it attempts to achieve a non-oscillatory
closed-loop response having a predetermined time constant designated Lambda (λ). In effect,
therefore, we are trying to force the closed-loop response to conform to that shown in Figure
8.9 in which lambda (λ) is equal to the open-loop response time (τ).
Percentage
∆SP ∆PV
63.2%
θ λ Time (seconds)
Figure 8.9. Closed-loop response in which the closed-loop time constant (λ) is
modelled to equal the open-loop response time (τ).
The choice of the closed-loop time constant (λ) is determined by the degree of confidence in
the process model parameters KP, θ and τ. Typically it would vary from 1τ to 4τ.
λ=τ
This will provide a relatively fast response to set point changes. If λ < τ the controller is
likely to be overly aggressive.
Where there is a low degree of confidence use a value:
λ = 2τ to 4τ.
Having decided on the value for λ, the tuning relations may be calculated as follows:
τ
KC =
K P (λ + θ )
and:
θ2
TI = τ +
(λ + θ )
The above calculations are taken from H.L. Wade. It should be noted that there are several
variations in the methods used in determining the time constants and the formulae. For
example, instead of the open loop response time (τ) being taken as the time taken to reach
63.2% of the final value, it is often calculated as the time taken to reach 98% of the final value
and is referred to as (T98). This would obviously modify the tuning calculations accordingly.
Lambda tuning is widely used in the pulp and paper industry where a strong connection exists
between paper uniformity and upstream control loop interactions. Unlike Ziegler Nicholls,
Lambda tuning allows users to set the speed of response for each individual loop. Thus,
higher priority control loops can be tuned faster and lower priority loops can be tuned slower.
This freedom to select the response speed of individual loops helps reduce unwanted loop
interactions that are detrimental to the overall process performance. A simple example of this
is a cascaded control loop where the inner loop should be tuned five to 10 times faster than
the outer control loop.
Approximate FOPDT
In reality, few processes will exhibit the true FOPDT response illustrated in Figures 5.6 to 8.
Rather, because most processes comprise a series of lags, they will take on the S-curve
response in which there is no clear demarcation between where the deadtime (θ) ends and the
response time (τ) starts (Figure 8.10).
θ τ
line indicating the previous steady state value of the PV. This point also marks the starting
point from which the response time (τ) may be calculated (63.2% of the PV).
Tangent to point of
steepest rise
100%
of PV
63.2%
of PV
θ τ
∆PD
Figure 8.11. The ‘apparent’ deadtime (θ) is calculated from the point at which a step was
applied to the PD, and the point at which the tangent crosses the horizontal line indicating
the previous steady state value of the PV. This point also marks the starting point from
which the response time (τ) may be calculated (63.2% of the PV).
It is not always easy to precisely determine the steepest part of the curve and hence the point
at which the tangent crosses the line may not be exact. In such cases, where some uncertainty
exists, is it better to round the figures are up or down?
Here it is useful to examine the Ziegler Nicholls formulae given in Table 8.3 and repeated
below:
1.2 τ
Gain (KC) =
KP θ
Clearly, if you under-estimate the deadtime (θ)you are estimating that the process is easier to
control than it really is. This results in a higher calculated value for the gain (KC) and a
smaller calculated value for the integral time (TI) – both tending to produce oscillation and
subsequent instability in the control loop. It follows that over-estimating the deadtime will
move the calculated values towards a lower gain and longer integral time – both tending
towards better stability.
A similar argument can be applied when estimating the value of the response time (τ) where,
if you estimate the time constant too long, you are estimating that the
process is easier to control than it really is. This over-estimation results in a higher calculated
value for the gain (KC) – again tending towards instability
.
Consequently, if there is any uncertainty in estimating the process parameters, the basic rules
are:
Integrating processes
In the tuning methodologies given so far, it has been assumed that the processes are self-
regulating – with the PV value starting from some point of equilibrium and steadying out at a
new stable value.
In some cases, however, the process may not reach a new steady-state value. Such integrating
processes are typical of level-control loops. A pseudo-integrating process can also exist in, for
example, a temperature loop in which the new equilibrium value is well above the normal
operational region.
In either case, it is no longer possible to determine the gain graphically. However, there is
nonetheless, sufficient information to allow us to determine the controller tuning values. This
is shown in Figure 8.12 in which a tangent is drawn to the point of steepest rise and extended
below the initial equilibrium value to intersect the vertical line representing the step function
change in the PD.
Tangent to point of
steepest rise
∆PD
θ = apparent deadtime
Simply, the closed loop continuous cycling method requires you to find a critical value of K
(called the ultimate gain KU) that will produce continuous oscillations – neither increasing nor
decreasing (Figure 8.13). At this point, we know that the phase shift through the process is
180° and that the total loop gain is 1.
Continuous constant
amplitude oscillation Figure 8.13. With a gain
(KU) that produces
continuous oscillations –
A neither increasing nor
SP decreasing –. the phase
shift through the process
is 180° and that the total
loop gain is 1.
PU
It now follows that in a system employing proportional action only, if the ultimate gain were
halved then each successive cycle of the oscillation would be half of the previous one and the
result is Quarter Amplitude Damping (QAD) (Figure 8.14).
Quarter
amplitude Figure 8.14.
damping If the ultimate gain is
halved, each successive
A cycle would be half of the
previous one and the
SP 1/4A
result is Quarter
Amplitude Damping.
Tuning method
1. Put controller in P control only – do not use I or D control. This would entail setting
TI to a maximum (or turning integral action off). If integral action is expressed in
Repeats/minute then it needs to be set to zero.
2. Set TD to zero.
3. If necessary set control to ERR = (SP - PV)
4. Set the controller to Automatic
5. Make a small step-change to the SP
6. Increase the value of K until continuous equal-amplitude cycling occurs
Note: A large amplitude is not required, and, in fact, need only be large enough to
distinguish the oscillation from the measurement noises band.
Table 8.4. Calculation of P, I and D settings according to the closed loop continuous
cycling method (Ziegler-Nichols).
There are several advantages of this method over the reaction curve method.
¾ Whilst the deadtime (θ) and the response time (τ) can often only be approximated, the
period can be measured very precisely. This means that the quality of the tuning
parameters is much higher.
¾ The loop stays in Auto – thus making it safer for difficult and very fast loops.
¾ The test includes the effects of valve hysterisis and dead-band as well as system non-
linearities that are dependent on direction and rate of change.
¾ The test also includes the dynamics and special features of different controller algorithms.
Despite these advantages there are several reasons why it is difficult to implement the closed
loop test:
Tuning method
1. Put controller in P control only – again do not use I or D control
2. If necessary set control to ERR = (SP - PV)
3. Set the controller to Automatic
4. Make a small step-change to the SP
5. Increase the value of K until you obtain a quarter amplitude damped response.
6. Record the value of the gain (KQU) that produced this response as well as the period
(PQU).
Had the gain been increased to a level where continuous equal-amplitude cycling occurs it
would have been noticeably larger than the recorded value (KQU) by a fixed factor –
approximately 1.67.
The ultimate gain (KU) that would have given rise to equal amplitude cycling may thus be
estimated as:
In a similar manner had a continuous equal-amplitude cycling occurred the recorded ultimate
period (PU) would be shorter than that actually measured by a factor of approximately 1.1.
These estimated values, may now be applied and directly to the formula given in Table 8.4.
The formulae, according to Pessen, still make use of the closed loop continuous cycling or
damped oscillation methods according to Ziegler-Nichols but, as shown in Table 8.5, have
been adapted to cater for different response requirements.
Pessen 1, for example is used where no overshoot (even for start-up) is permitted. Typically
this might be tank level or a pressure vessel. And Pessen 2 is used where a slight amount of
overshoot is permitted.
TI PU PU PU
2 3 2
TD PU PU PU
8 2 3
Flow loops are a special case. Since they are inherently stable, it is not possible to carry out
the closed loop cycling method because a continuous oscillation cannot be sustained. On the
other hand, because the reaction of most flow loops is so rapid, use of the open loop reaction
method is barely useful because there is virtually no dead time.
Fortunately, flow loops are pretty consistent in their dynamics and, assuming a process gain
of around about 1, it is possible to apply the following default values:
KC = 0.8
TI = 0.1 minutes
Note: The above assumptions can only be made on the basis of having previously ascertained
that the final control element is not subject to excessive deadband, hysterisis or stick-slip and
that the transmitter is correctly spanned and that the process variable noise is minimal.
In listing the top 20 mistakes made in the field of process instrumentation, Greg McMillan
and Stan Weiner, two of the world’s great authorities in the field, put ‘tight control of level in
a surge tank’ at number 5.
As they point out, the purpose of the surge tank volume is to absorb changes in flow and for
the level to roll with the punches. Keeping the level within a few per cent of set point passes
them on and defeats the purpose of the tank. Indeed, most oscillations in a process can be
traced back to an over zealous person tuning a level controller to an excessively tight set of
low and high level alarm limits. This is a pity. Tight control is not easy to accomplish and
requires that the control loop should be engineered rather than just tuned.
However, level is rarely a factor in quality control and the storage capacity of the vessel is a
mostly used to absorb upsets. This is called averaging level control and is a fairly easily
implemented.
First decide how much the level may vary. In a surge tank this may be 60 to 80%. Next,
determine the following parameters:
Then calculate:
These rules are adequate for the vast majority of level loops. The formula for the integral
time, TI assumes linear components throughout and no lags except the integrating process
itself. The point is to use gain to keep the level within limits and enough integral action to
satisfy performance needs.
8m
100 m3
4m
But here’s another thought. If control to a set point is not required and a proportional offset
can be tolerated, then it is possible to dispense with integral action altogether and use only
proportional control.
With the manual reset set to 50%, the controller gain should thus be set to:
100
KC =
2 * ∆Lmax
where ∆Lmax is the maximum allowable deviation from setpoint as a percentage of full-scale.
100
KC = = 10
2 *5
With this arrangement, if a controller output of 50% is required, the level will be at setpoint