PID Trial Error Lecture
PID Trial Error Lecture
1 Controller Tuning
To implement continuous control we should assemble a control loop which consists of the pro-
cess/object, controller, sensors and actuators.
• Loop architecture: signals, parameters, sampling time, database management, rules, software
tools;
Control loop should be designed for a specific project, to implement control a controller should be
tuned.
NB! Tuning of the SISO control is a basic knowledge in automation. Simply experimenting
with P, I, and D parameter values is tedious at best and dangerous at worst! Do not do it if you
have no understanding of what each type of control action is useful for, and the limitations of each
control action.
K.Vassiljeva 1 2015
Lecture 8 ISS0065 Control Instrumentation
6. Simulate the loop, make sure it works with SV change, different loads and disturbances.
• given process,
• according to requirements.
Sad Statistics
Well-tuned controller saves energy and materials, increases quality of the product.
2015 2 K.Vassiljeva
ISS0065 Control Instrumentation Lecture 8
3. Autotuning.
• Step response
• Frequency response
How are rules and equations obtained? A lot of tests and simulations have been done with dif-
ferent objects and controllers (P, PI, PID), thus closed system properties were found out. Rules and
equations are derived from the obtained data, which associates the controller parameters (Kp , Ti , Td )
with test or model parameters (K, T, τ ) and system properties. Those equations are approximate
and can be applied to parameters with a limited range.
2 Trial-and-Error Tuning
Trial-and-error tuning is used to determine the PID controller parameters by studying the dynamic
behavior of the process output. It is very important to understand the effects of the behavior of the
process output for the successful tuning. The PID controller shows the following dynamic behavior
for the step setpoint change [7].
Usually majority of the controllers are still tuned by traditional trial-and-error procedures. The
performance of the control loop is assessed from the response to change in one of the inputs. It
could be set point change or load (disturbance) change.
The following sequence must be observed when setting up the controller parameters.
2. Increase controller gain Kc until desired performance is attained (ignore the offset).
3. Adjust the integral time Ti to eliminate the offset. Stated performance objective should be
maintained.
K.Vassiljeva 3 2015
Lecture 8 ISS0065 Control Instrumentation
4. Adjust the derivative time τd to give as large stability margin as possible (least degree of
oscillations).
Case 2 If process output shows an overdamped response (see figure 1b), then value of the propor-
tional gain Kc should be increased.
process output
process output
1.0 1.0
0 5 10 15 t 0 5 10 15 t
Case 4 If the process output oscillates and output stays under the SP longer than above SP for
a positive setpoint change (see figure 2b), then integral time Ti value should be decreased
(integral action is too weak).
2015 4 K.Vassiljeva
ISS0065 Control Instrumentation Lecture 8
process output
process output
1.0 1.0
0 5 10 15 t 0 5 10 15 t
1.0
0 5 10 15 t
So, the operator can tune the PID controller using trial-and-error technique by adjusting the
Kc , Ti , and Td parameters on order to avoid the above mentioned dynamic behaviors.
3 Open-Loop Methods
The open-loop tuning methods execute the process test with the controller on manual. The test
data consist of the response in the process variable to a known change in the controller output.
The most common problem in applying an open - loop tuning method is that the process test is
not executed properly.
K.Vassiljeva 5 2015
Lecture 8 ISS0065 Control Instrumentation
necessarily provide the best ISE or IAE tuning but does provide stable tuning that is a reasonable
compromise among the various objectives.
Because of their simplicity and because they provides adequate tuning for most loops, the
Ziegler-Nichols methods (1942) are still widely used.
step
+
controller valve process
-
measurement
After making the step-change in output signal with the controller in manual mode, the process
variable trend is closely analyzed for two salient features: the reaction lag and the reaction rate.
Reaction lag is the amount of time delay between the output step-change and the first indication of
process variable change. Reaction rate is the maximum rate at which the process variable changes
following the output step-change (the maximum time-derivative of the process variable).
OUT Δu
y
PV
L
A t
Substitute the values of the reaction lag and reaction rate into the tuning equations in Table 1.
2015 6 K.Vassiljeva
ISS0065 Control Instrumentation Lecture 8
controller Kc Ti Td
∆u
P - -
A
∆u
PI 0.9 3.33L -
A
∆u
PID-series 1.2 2.0L 0.5L
A
1.5
PID-parallel 2.5L 0.4L
A
Some comments
• Easy to use;
• Some processes do not permit step response tests or it gives a little information about the
process, the step input applied should be small enough for the response to stay within the
bounds of linearity;
• Tuning criterion is a speed-oriented, aggressive, strongly oscillating process, not robust pro-
cess, sensitive to changes;
• Reaction on disturbances.
This method [3, 5, 6] was a basis for developing of the following methods.
3.2 Cohen-Coon
Method is similar to the Ziegler-Nichols reaction rate method in that it makes use of the FOPDT
model to develop the tuning parameters. The Cohen-Coon method will result in a slightly higher
gain than the Ziegler-Nichols method. For most loops it will provide tuning closer to quarter wave
decay and with a lower ISE index than the Ziegler-Nichols open loop method [5]. More precise
equations with a grater delay τ .
K.Vassiljeva 7 2015
Lecture 8 ISS0065 Control Instrumentation
controller Kc · Kp Ti /τ Td /τ
T 1τ
P 1+ - -
τ 3T
T 9 1 τ 30 + 3(τ /T )
PI + -
τ 10 12 T 9 + 20(τ /T )
T 4 1τ 32 + 6τ /T 4
PID +
τ 3 4T 13 + 8(τ /T ) 11 + 2τ /T
2015 8 K.Vassiljeva
ISS0065 Control Instrumentation Lecture 8
controller Kc · Kp Ti Td
P 1.411τ /T −0.917 - -
4 Closed-loop Methods
Closed-loop refers to the operation of a control system with the controller in “automatic” mode,
where the flow of the information represents a continuous (“closed”) feedback loop. If the total
amount of signal amplification provided by the instruments is too much, the feedback loop will
self-oscillate. While oscillation is almost always considered undesirable in a control system, it may
be used as an exploratory test of process dynamics [3].
+
controller process
-
K.Vassiljeva 9 2015
Lecture 8 ISS0065 Control Instrumentation
y(t)
A u(t)
t
Pu
1. With all reset and derivative action removed from the controller, adjust the controller gain
until the loop cycles continuously. Note the value of the controller gain (the ultimate gain
Ku ) and the period of the cycle (the ultimate period Pu ).
2. Substitute the values of the ultimate gain and the ultimate period into the tuning equations
in Table 6 to compute values for the controller tuning coefficients that give a response with a
quarter decay ratio.
controller Kc Ti Td
P Kc = 0.5Ku - -
PI Kc = 0.45Ku Ti = Pu /1.2 -
Care should be taken to protect the system from external disturbances whilst the tests are being
carried out so as not to distort the results.
2015 10 K.Vassiljeva
ISS0065 Control Instrumentation Lecture 8
An important caveat with any tuning procedure based on ultimate gain is the potential to cause
trouble in a process while experimentally determining the ultimate gain. The problem with this
is, one never knows for certain when ultimate gain is achieved until this critical value has been
exceeded, as evidenced by ever-growing oscillations. Thus, for many loops, the severity of such a
test is unacceptable [3].
The nature of the Zeigler and Nichols formulae needs some explanation. First published in
1941, they are used extensively in industry and have stood the test of time. The formulae are
empirical, although they do have a rational theoretical explanation. They predict settings that are
optimum on the basis of a decay ratio of 1/4. However, because the formulae are empirical, they
do not predict the optimum settings precisely, and further tuning of a trial and error nature may
be required [4].
u(t)
+u0
A
t
-u0
Pu y(t)
It is sufficient to consider the first harmonic component of the input only. The input and the
output then have opposite phase, which means that the frequency of the oscillation is the ultimate
frequency. If u0 is the relay amplitude, the first harmonic of the square wave has amplitude
Uh1 = 4u0 /π. Let a be the amplitude of the oscillation in the process output.
aπ
Ku = (1)
4u0
Notice that the relay experiment is easily automated. Since the amplitude of the oscillation is
proportional to the relay output, it is easy to control it by adjusting the relay output. It is basis
for many autotuning algorithms [1].
K.Vassiljeva 11 2015
Lecture 8 ISS0065 Control Instrumentation
controller Kc Ti Td
P Kc = 0.45/Ku - -
PI Kc = 0.67/Ku Ti = Pu -
PID Kc = 0.67/Ku Ti = Pu Td = Pu /6
The above mentioned methods for tuning used the following information:
2015 12 K.Vassiljeva
ISS0065 Control Instrumentation Lecture 8
where λ is a tuning parameter. The time constants of the open- and closed-loop systems are the
same when λ = 1. The closed-loop system responds faster than the open-loop system if λ < 1. It
is slower when λ > 1 [1].
controller Kc Ti Td
T
PI Kc · Kp = Ti = T -
λ+τ
T
PID-series Kc · Kp = Ti = T1 Td = T2
λ+τ
T1 + T2 T1 T2
PID-parallel Kc · Kp = Ti = T1 + T2 Td =
λ+τ T1 + T2
The Lambda method is not constrained to yield a PI or PID equation for the controller. But
for the simple models typically used for controller tuning, the control equation from the design
procedure turns out to be
For these models, the design procedure yields the tuning equations in Table 8. The value for λ is
usually within the following range: τ < λ < T [6].
The IMC equations can be used to obtain the tuning equations in Table 9 for an integrating
process. For an integrating process, the closed-loop time constant λ affects the controller gain, the
reset time, and the derivative time (except for the series PID) [6].
K.Vassiljeva 13 2015
Lecture 8 ISS0065 Control Instrumentation
To tune a loop, one can still start with λ = τ , and then increase λ until the desired performance
is obtained. But as λ is changed, all tuning coefficients must be recomputed.
IMC controller works well for tracking the set value, but works poorly for disturbance rejection.
Closed-loop system time constant λ can be chosen:
λ > 0.8τ ; λ > 0.1T - limits;
2τ (agressive)< λ < 2(T + τ ) (robust) - recommended.
controller process Kc Ti Td
Kp e−τ ·s T
PI Kc · Kp = min[T, c(λ + τ )] -
1+T ·s λ+τ
Kp e−τ ·s T
PID Kc · Kp = c(λ + τ ) T
(1 + T · s)s λ+τ
Kp e−τ ·s T
PID Kc · Kp = min[T1 , c(λ + τ )] T2
(1 + T1 · s)(1 + T2 · s) λ+τ
Originally, Skogestad defined the factor c = 4. This gives good set-point tracking. To ob-
tain faster disturbance compensation c should be decreased, bad point of such reduction is grater
overshoot in the set-point during the step response.
2015 14 K.Vassiljeva
ISS0065 Control Instrumentation Lecture 8
5.4 Autotuning
In the 1960s, with applying the computers to process control a developing of automatic tuning
began. Considerable effort was directed to this technology but with little concrete results. It was
not until the 1990s that automatic tuning became a common feature in commercial control products.
But despite that, most controllers are tuned by the traditional trial-and-error approach, the
reasons being:
• Automatic tuners only work in those loops that you can tune. There are untunable loops,
and in those loops, bad tuning is not the problem but indicator.
• As compared with an automatic tuner, anyone skilled in tuning can tune a PI controller in a
comparable time and obtain comparable results.
• The simple (not computer based) tuning methods will not consistently and effectively tune
PID controllers.
As for automatic tuning, it is certainly good to have this technology available, but in reality, its
effect on the practice of process control has been minimal.
Tuning PID controllers in slow-temperature loops where tuning assistance would be of great
value. The regression methods are capable of tuning such loops, provided a quality test can be
performed on the process. But once the decision is made to invest the time and effort to conduct
a process test, two options are now possible:
1. Apply regression techniques to the data and derive a SOPDT model. Using model parameters
calculate the tuning parameters for a PID controller.
2. Use the test data as the basis for developing a model predictive controller (MPC) for the loop.
If option 2 is selected, a test other than a step response may be conducted, but the overall effort
is about the same [6].
K.Vassiljeva 15 2015
Lecture 8 ISS0065 Control Instrumentation
2015 16 K.Vassiljeva
Bibliography
[1] Åström, K. and Hägglund, T. PID Controllers: Theory, Design, and Tuning, ISA: The Instru-
mentation, Systems, and Automation Society; 2 Sub edition, 1995.
[2] Myke King, Process Control: a Practical Approach, John Wiley & Sons, Inc., UK, 2011.
[4] Jonathan Love, Process Automation Handbook: A Guide to Theory and Practice. Springer-
Verlag London Limited, 2007.
[5] John A. Shaw, The PID Control Algorithm How it works, how to tune it, and how to use it,
Process Control Solutions, 2nd Edition, 2006.
[6] Cecil L. Smith, Practical process control: tuning and troubleshooting, John Wiley & Sons, Inc.,
Hoboken, New Jersey, 2009.
[7] Su Whan Sung, and Jietae Lee, and In-Beum Lee, Process Identification and PID control, John
Wiley & Sons (Asia) Pte Ltd, Singapore, 2009.
17