0% found this document useful (0 votes)
4 views

Tuning

This document provides guidelines for tuning PID controllers, emphasizing the importance of proper tuning for effective process control in various applications such as flow, pressure, and temperature. It discusses closed-loop characteristics, PID algorithms, tuning techniques, and the impact of different tuning parameters on system performance. Additionally, it introduces a Mac OS app, PIDLab, designed to assist in tuning calculations and simulations.

Uploaded by

Mohamed Bedear
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Tuning

This document provides guidelines for tuning PID controllers, emphasizing the importance of proper tuning for effective process control in various applications such as flow, pressure, and temperature. It discusses closed-loop characteristics, PID algorithms, tuning techniques, and the impact of different tuning parameters on system performance. Additionally, it introduces a Mac OS app, PIDLab, designed to assist in tuning calculations and simulations.

Uploaded by

Mohamed Bedear
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

PID Controller Tuning Guidelines

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.

In the following document, guidelines are presented which describe what is


acceptable. Also described are situations where the controller tuning should be set
for fast response, slow response, and where tuning should be based on disturbance
rejection rather than setpoint changes.

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).

• Evaluating control responses and deciding upon final tuning parameter


selection. The tuning of the first level controls is an important step in
preparing for the commissioning of the advanced controls. As a result, the
tuning of these controls must be completed before commissioning the
advanced controls.

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

Figure 2 Overdamped Response

In an overdamped response, shown in Figure 2, the control variable approaches the


setpoint sluggishly, with a speed of response equal or slower than the open loop
response.

The quarter amplitude response represents aggressive tuning which causes


significant movement of the manipulated variable. This is contrasted with the
overdamped response, which results in minimum movement of the manipulated
variable. Minimizing the movement in the manipulated variable is particularly
important when the manipulated variable interacts with other process variables.

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
𝑇+ 𝑑𝑡 𝑑𝑡

Series (Interacting) Form:


1 𝑑𝑒
𝑚 = &𝐾% (𝑒 + , 𝑒𝑑𝑡0 &1 + 𝑇3 0
𝑇2 𝑑𝑡

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.

Proportional action can also be on either error or measurement. Proportional on


error gives proportional kick. The decision on whether to use the error or
measurement for proportional action is based on whether a quick setpoint response
is required.

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.

The conversion equation, for the standard form, between a gain in


engineering units and one in scaled units is:

[𝐶𝑉 𝑅𝑎𝑛𝑔𝑒]
𝐾% = 𝐾%78
[𝑀𝑉 𝑅𝑎𝑛𝑔𝑒}

Where:

𝐾% = Controller Gain, Scaled

𝐾%78 = Controller Gain in Engineering Units


[CV Range] = Range of controlled variable (measurement)
[MV Range] = Range of manipulated variable (controller output)
Example:

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,

then the correct value of Kc is


Kc = 0.5 * [150 - 50]/[40 - 20] = 2.5.

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.

To use the method we need to estimate the process parameters:

Kp, Process Gain


Τ, Process Time Constant
Θ, Deadtime

One way to do this is to step the manipulated variable and observe the process
response (Figure 3).

Figure 3 First Order with Deadtime Response to a Step Change

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:

𝐾CDE = Process Gain in Engineering Units


∆𝐶𝑉 = Change in Controlled Variable (measurement) once the process
lines out.
∆𝑀𝑉 = Change in Manipulated Variable (the step)

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:

𝐾C = Process Gain, Scaled


𝐾CDE = Process Gain in Engineering Units
[MV Range] = Range of the MV (typically transmitter range)
[CV Range] = Range of the CV (typically transmitter range)

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
𝜏

For more sluggish control:

𝜆
>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

Lets assume that the MV is flow with scaling:


MV @ 0% = 50.0
MV @ 100% = 100.0

The CV is temperature with scaling:


CV @ 0% = 200.0
CV @ 100% = 450.0

The process gain in engineering units is:

∆𝐶𝑉 5.0
𝐾CDE = = = 5.0
ΔMV 1.0

The scaled process gain is:


[𝑀𝑉 𝑅𝑎𝑛𝑔𝑒]
𝐾C = 𝐾C78
[𝐶𝑉 𝑅𝑎𝑛𝑔𝑒}

[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

Lets assume we want λ/τ = 1 or λ = τ . We can now calculate the tuning


parameters.:
τ 5
𝐾% = = = 0.714
𝐾C (𝜆 + θ) 1(5 + 2)

τ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:

Figure 4 Integrating process with deadtime


Figure 5 Max Slope for a long time constant process

We can calculate the controller gain using:


1
𝐾% =
𝑚(𝜆 + θ)

Where:
Kc = Controller Gain
M = Maximum slope of process response curve
λ = Closed Loop Time Constant
θ = Deadtime

The integral and derivative times are:

τ2 = 4(𝜆 + θ)
𝜏3 = 𝜏_

6. Parallel PID Algorithm Tuning Parameters


The tuning parameters calculated in Section 5 are for the series PID form. To
calculate tuning for the Parallel form use:

τ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

It generates tuning parameters for:


• Parallel PID
• Series PID
• PI
• First Order with Deadtime
• Second Order with Deadtime
• Integrator or Sluggish Process

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 upper and Enter upper and


lower range for lower range for
CV MV
Enter the process information. Select Process
Type

Enter Time Constant

Enter Process
Gain in
Engineering Units

Enter Dead Time

Once all the information has been entered, the app will automatically perform all
calculations.

Calculated Scaled
Gain

Dead Time / Time


Constant Ratio

In the PID Tuning section, select the control algorithm Type (Parallel or Series) and
mode (PID or PI).

The response to set point change can be shown in % of scale or EU (Engineering


Units).

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

PID Form Selector

Controller Gain (Can set


manually to see affect)

Controller Integral Time

Controller Derivative Time

Size of Set Point Change


Plot in % Range or EU

Tuning Aggression Slider.


Move to Left for more
aggression
Plot for Ƭ / λ set to 1.0

Set Point Change (Green)


Plot for Ƭ / λ set to 0.05 (overly aggressive)

You might also like