Tuning
Tuning
1 Introduction
It is critical that process control loops be well tuned for proper operation. The most
common controls are for flow, pressure, liquid level, and temperature.
This document is written for both the process and instrument engineer. It is
recommended that they both be involved in the controller tuning process. This
includes:
• Deciding how the various controls should be tuned (e.g., speed of response
vs. manipulated variable movement).
2 Closed-Loop Characteristics
Generally stated, the purpose of first level regulatory control is to maintain a
process measurement at or near setpoint, without excessive manipulated variable
action. In addition, the controller must return the measurement to setpoint after a
disturbance occurs and remain stable after a setpoint change is introduced.
For most process control applications, the range of desirable control responses falls
between a response characterized by quarter amplitude dampening and a response
characterized by an overdamped response. A quarter amplitude response, shown in
Figure l, is a response in which the amplitude of each successive cycle is 1/2 the
amplitude of the previous cycle (or 1/4 the amplitude of the previous half cycle).
Figure 1 Quarter Dampening Response
Tuning controls for an overdamped response is more "robust" than tuning for the
damped quarter amplitude response. By robustness we mean the ability to control
well in spite of changes in the operating point or operating conditions. The process
gain often changes with operating point. Aggressive tuning can cause the control to
become more oscillatory or even go unstable when the process gain increases at
new setpoint.
3. PID Algorithm
There are several PID algorithms. The two most common are the Parallel and Series
(or interacting) forms.
Parallel Form:
1 𝑑𝑒 𝑑𝑒
𝑚 = 𝐾% &𝑒 + ,𝑒 + 𝑇/ 0
𝑇+ 𝑑𝑡 𝑑𝑡
Where:
𝑚 = manipulated variable (controller output)
𝐾% = controller gain
𝑒 = error (setpoint – process value)
𝑇2 = integral time
𝑇3 = derivative time
One important variation uses derivative action on the process value (measurement)
rather than the error. This prevents derivative kick in response to setpoint changes.
It is highly recommended you use this form when using derivative action.
The effect of integral and derivative action depends on the PID algorithm. Thus, it is
important to know which PID algorithm you are using if you are going to use
derivative. The Honeywell Experion system only has the parallel PID form available.
The TDC3000 has both forms. Control Equation B uses derivative action on the
process value. If no derivative action is used, the tuning parameters may be used
interchangeably.
In some systems, proportional band (PB) is used instead of controller gain (Kc). The
two are related by:
100
𝐾% =
𝑃𝐵
In basic controllers, Kc (or PB) are limited to positive values. The sign of the
controller gain is determined by a direct/reverse acting indicator. Reverse action
normally means that an increase in controller output causes an increase in the
controlled variable.
In the standard equation, the integral term has units of time, typically minutes or
seconds. It can also be expressed as "per repeat" (e.g., minutes per repeat). The "per
repeat" is derived from the standard form where the integral time represents the
time required to repeat the proportional action. Some systems use a multiplier
instead of a divisor for integral action. For this case the units are often repeats per
minute or repeats per second.
The PID tuning parameters also depend on whether the calculation is performed in
engineering units or in scaled arithmetic. In most basic control systems, scaled
arithmetic is used. For the standard and interactive forms, only the controller gain
is affected.
[𝐶𝑉 𝑅𝑎𝑛𝑔𝑒]
𝐾% = 𝐾%78
[𝑀𝑉 𝑅𝑎𝑛𝑔𝑒}
Where:
Consider the case of a PID in standard form. If the required gain in engineering units
is 0.5 Mlb/hr / Deg F, and the transmitter limits are:
CV@0% = 50 Deg F
CV@100% = 150 Deg F
MV@0% = 20 Mlb/hr
MV@100% = 40 Mlb/hr,
4. Controller Execution
Most control systems are digital-based. Compared with the continuous controller,
the digital controller has an extra parameter, the controller execution period , which
depends on the scanning rate of the measurement. This puts an important
constraint on the execution of the controller: it should execute no more frequently
that the scanning interval of the measurement. That is, the controller should execute
only when new information is available.
The proper execution period of the controller depends on process dynamics. The
slower the process dynamics, the slower the controller can execute and still provide
acceptable control. Modern control systems usually execute in the milli-seconds
and execution frequency is not of concern.
5. Tuning Techniques
Tuning is not an exact science. A necessary part of the tuning process involves trial
and error parameter adjustments. Although there are various methods for
determining controller settings from process tests, these techniques usually provide
only initial settings. Normally, there is additional testing and readjustment required
to properly tune a controller.
One of the best tuning methods is IMC (Internal Model Control) or Controller
Synthesis. This method first assumes the desired final response and then back
calculates a controller form to achieve this.
This method predicts that integral control is best for fast dynamic loops such as
liquid flows. This is why we usually us PI control with the gain between 0.1 to 0.3
and the integral time between 0.1 and 0.3 minutes (essentially integral control) for
flow loops.
We define the closed loop time constant (λ) as the desired response by the
controller. For a first order with deadtime process, the response would be a delay of
the deadtime, then a first order response to the setpoint with a time constant λ. The
method is sometimes referred to as lambda tuning.
One way to do this is to step the manipulated variable and observe the process
response (Figure 3).
The figure shows the response to a step change in the Manipulated Variable (ΔMV).
There is a delay before the Controlled Variable (CV) starts to move. This is the
deadtime (θ). The time it takes the process to reach 63% of its final value is the
Time Constant (τ). The process gain in engineering units is given by:
∆𝐶𝑉
𝐾CDE =
ΔMV
Where:
Most control systems use percent of range for control functions (scaled gain). To
convert the process gain to the scaled gain use:
[𝑀𝑉 𝑅𝑎𝑛𝑔𝑒]
𝐾C = 𝐾C78
[𝐶𝑉 𝑅𝑎𝑛𝑔𝑒}
Where:
The process time constant is the time for the process to reach 0.63% of is final value.
The deadtime is the delay in response in the controlled variable before it starts to
move as shown in figure 3.
If we use a first-order Padé approximation for dead time, the calculated controller to
achieve our desired response is the series (interactive) form of the PID. We then
calculate the tuning parameters with:
τ
𝐾% =
𝐾C (𝜆 + θ)
τ2 = 𝜏
𝜃
𝜏3 =
2
The tuning parameters are calculated directly from the process for our desired
response, a delay and first order response. Thus, we really only have one tuning
constant, lambda (λ). If we want tight control, we set λ low. If we want a
overdamped response we set λ high. If we want the MV to jump to its steady state
value and with no overshoot, we set lambda equal to the process time constant.
For no overshoot:
𝜆
=1
𝜏
For more aggressive control:
𝜆
<1
𝜏
𝜆
>1
𝜏
Example:
We will use the process model given in Figure 3. Since this curve is for a unit step
(ΔMV = 1.0), we can see that ΔCV = 5.0. We can calculate the process gain in
engineering units:
STU W.Y
𝐾%78 = SVU
= Z.Y = 5.0
∆𝐶𝑉 5.0
𝐾CDE = = = 5.0
ΔMV 1.0
[50 − 100]
𝐾C = 5.0 = 1.0
[450 − 200]
We can also see from the figure that the process dynamics are:
Deadtime: θ = 2.0
Process time constant: τ = 5.0
τ2 = 𝜏 = 5.0
𝜃 2
𝜏3 = = = 1.0
2 2
On many control loops derivative action is not warranted. On other loops, especially
those with noisy measurements, derivative action can actually degrade
performance.
Until now, our discussion has been limited to non-integrating process - processes
that reach a steady state after a step change in the manipulated variable. This is not
the case for an integrating process such as a liquid level, controlled by manipulating
inlet or outlet flow. In the case of a level, when a step change in flow is made, the
level response is that of a ramp. For these responses a different techneque must be
used. This is also true with processes with long time constants. These act more like
integrators in the time scale we desire for control. In both cases we use the
maximum slope of the response curve rather than the steady state gain:
Where:
Kc = Controller Gain
M = Maximum slope of process response curve
λ = Closed Loop Time Constant
θ = Deadtime
τ2 = 4(𝜆 + θ)
𝜏3 = 𝜏_
τ3
𝐾%` = 𝐾% &1 + 0
τ2
τ3
τ`2 = τ2 &1 + 0
τ2
τ3
τ`3 = τ
1 + τ3
2
Were:
𝐾% = Controller gain for series form
𝐾%` = Controller gain for parallel form
τ2 = Integral time for series form
τ`2 = Integral time for parallel form
τ3 = Derivative time for series form
τ`3 = Derivative time for parallel form
7. Tuning App
The author has developed an Mac OS app (PIDLab) to perform the tuning
calculations and simulate the results:
https://itunes.apple.com/us/app/pidtune/id1045174726?ls=1&mt=8
The app gives similar results as the equations given here. They are more
complicated and not as applicable for hand calculation.
The first step is to enter the scaling information. Enter the upper and lower range
limits for both the CV and MV.
Enter Process
Gain in
Engineering Units
Once all the information has been entered, the app will automatically perform all
calculations.
Calculated Scaled
Gain
In the PID Tuning section, select the control algorithm Type (Parallel or Series) and
mode (PID or PI).
Tuning aggression is changed by move ing the Ƭ / λ (Tau to Lamda) slider. Moving
to the left makes the tuning more aggressive. Moving to the Right makes it less so.
The app shows the simulated controller and process results from a step in setpoint
each time the slider is moved.
PID Form Selector