Practical Loop Training Module 1 Introduction
Practical Loop Training Module 1 Introduction
MIPAC PTY LTD (ACN 097 111 772 ABN 66 097 111 772) Quality Certified to ISO 9001
GPO Box 2438 Brisbane Qld 4000 Level 1, 369 Ann St Brisbane Qld 4000 Australia
Telephone: + 61 7 3212 5600 Fax: + 61 7 3212 5699 Email: [email protected]
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
Table of Contents
Process Control Introduction ....................................................................................................... 3
Feedback and Feedforward Control ............................................................................................ 6
Proportional-Integral-Derivative Controller Structure ................................................................ 7
PCS7 PID Blocks ........................................................................................................................... 9
Typical PID Algorithm with External Reset ............................................................................... 11
Process Types ............................................................................................................................. 17
Advanced Regulatory Process Control Techniques ................................................................ 21
Reference Books and Papers ..................................................................................................... 24
Terminology for Controller Tuning ............................................................................................ 24
References................................................................................................................................... 28
Practical ....................................................................................................................................... 29
Page: 2
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
The process control hierarchy is shown in Figure 1. This course is focused on the Loop Control
level and in particular control tuning methods which can be successfully applied to a range of
processes found in minerals processing. Some advanced regulatory techniques which may be
regarded as optimising controls will be introduced and discussed in regard to appropriate control
strategies for particular process examples.
Page: 3
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
Shown above is a diagram for a simple control loop. The example shown is a flotation bank level
controller. This is a feedback control loop because the controller acts after the level signal has
changed. A feed forward controller would use the feed flow rate (load variable) to adjust the tailing
valve before the level changed. With feed forward, it is possible to achieve “perfect” control provided
an accurate process model is available. As important as feedforward control is, it will only be
discussed briefly during this course.
These days, the level controller is often located in a PLC (programmable logic controller) or a DCS
(distributed control system), though can also be located in a single loop controller located in the field.
Typically, field signals are transmitted as 4-20mA (e.g. 4mA = 0% valve opening, 20mA = 100%
valve opening). In the old days, it was more common to transmit data using pneumatic lines with
pressures ranging from 3-15psi. In this case 3psi would mean valve closed and 15psi would open
the valve.
The function of the above controller is to maintain the level at setpoint by adjusting the position of
the tailing valve. If there were no outside disturbances, the valve could be set to the correct position
Page: 4
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
and never changed. For real processes, such as flotation, there are many disturbances that effect
the level. The most common is the feed flow rate. If the feed flow increases, then the bank level will
rise and the controller must open the valve to return the level back to setpoint. The disturbance
variable (i.e. feed flow) is often referred to as the load or load variable, because the function of the
controller is to adjust the manipulated variable (i.e. discharge valve position) to “balance the load”.
Listed below are the five essential control loop elements
1. Sensing Element
2. Transmitter
3. Controller
4. Final Control Element
5. Process
Only when all five elements are performing at their best will the control system meet expectations.
Page: 5
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
The diagrams below illustrate the concepts of feedback and feedforward control. Feedback control
is reactive, while feedforward is pro-active. The second diagram shows that feedforward control is
usually implemented with feedback control (often called feedback trim), but it is possible to have
pure feedforward.
As mentioned above, feedforward can provide superior control to feedback, provided an accurate
process model is available. The human operator in the second diagram would have some type of
“process model” in his head.
Page: 6
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
The proportional+integral+derivative controller (PID) is the most commonly used feedback controller
in the process industries. PID controllers have been in use since the 1940’s are the most common
form of closed loop control available in DCS and PLC control systems. Despite the introduction of
alternative control techniques the PID controller maintains its dominance. This course will focus only
on PID control.
It is very important to realise that there are many different styles of PID controllers, some requiring
different tuning procedures.
The independent form of the equation is shown in Figure 3 in this form the gains for each of the three
terms act independently.
𝑑𝐸
Independent - 𝑂𝑢𝑡 = 𝐾𝑃 + 𝐾𝐼 ∫ 𝐸𝑑𝑡 + 𝐾𝐷 𝑑𝑡
Proportional
Gain Manipulated
Setpoint (SP)
+ E + Variable (MV)
n KP n
+
- +
KIf
Integral
Process Variable
(PV) KD𝑑𝑡𝑑
Derivative
Figure 3 PID Independent Form
Page: 7
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
1 𝑑𝐸
Dependent - 𝑂𝑢𝑡 = 𝐺 [𝐸 + 𝐼 ∫ 𝐸𝑑𝑡 + 𝐷 𝑑𝑡 ]
Proportional
Setpoint (SP) Gain Manipulated
+ E Variable (MV)
+
n G n
+
- +
1
f
𝐼
Integral
Process Variable (PV)
𝑑
𝐷
𝑑𝑡
Derivative
Figure 4 PID Dependent Form
The dependent form shown Figure 4 is more commonly used and will be used throughout this
course. Tuning parameters require adjustment if the independent form of the PID is used. The
gains can be converted from dependent to independent by use of the following equations:
𝐾𝑃 = 𝐺
𝐺
𝐾𝐼 = 𝐼
𝐾𝐷 = 𝐺 × 𝐷
Either form of the PID will result in equivalent performance as long as the appropriate gains are
chosen.
Page: 8
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
PCS7 has three PID algorithms available the PIDConS, PIDConL and PIDConR ( External Reset)
blocks. Both are dependant form.
1 𝑇𝐷 𝑠
PIDConL (PIDConS) MV = 𝐺𝑎𝑖𝑛 (𝐸 + 𝑇 𝑠 𝐸 + 𝑇𝐷 𝐸)
𝐼 𝑆+1
𝐷𝑖𝑓𝑓𝐺𝑎𝑖𝑛
Parameters
Proportional Gain
Integral TI (sec)
Derivative Td (sec)
𝑇𝐷 𝑠 1
PIDConR MV = 𝐺𝑎𝑖𝑛 (𝐸 + 𝑇𝐷 𝐸) + 𝐸𝑥𝑡𝑅𝑒𝑠𝑒𝑡 (1+ 𝑇 𝑠)
𝑆+1 𝑖
𝐷𝑖𝑓𝑓𝐺𝑎𝑖𝑛
Parameter
Proportional Gain
Integral TI (sec)
Derivative Td (sec)
Page: 9
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
With most control systems there are a number of parameters which define the functionality of a
PID function block. Some of these parameters for the PCS PIDConL and PIDConR are shown in
Figure 7.
Page: 10
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
Bias
Proportional
Setpoint (SP) Gain Manipulated
+ E Variable (MV)
+
n G n
- +
𝑑
𝐷 I
𝑑𝑡
Derivative Integral
Process Variable
(PV)
Figure 8 shows the structure of an external reset interacting PID controller. The external reset PID
controller has distinct advantages in control loops with dead time and for override control
applications. This is a common type of PID controller in many DCS control systems such as the
PCS7 PIDconR and will be used in the exercises course.
The controller has the following features:
Integral action is achieved with a positive feedback loop
Derivative control is applied to the Process Variable not on the error (to avoid derivative “spiking”
on setpoint changes)
The integral loop can be broken for proportional only control with a fixed bias
Page: 11
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
In addition to the PID settings, there is also the bias or manual reset parameter. Therefore, there are
4 important tuning parameters: proportional gain, integral time, derivative lead time1, and bias. Some
controllers include additional parameters, the most common being:
Derivative filter or lag time (to limit the magnitude of the derivative control action)
The bias parameter is used for proportional only control applications such as sump level control
(averaging-level control).
Proportional control is achieved by multiplying the error (setpoint – Process Variable) by the
proportional gain. Some controllers use proportional band rather than proportional gain. The
relationship between the two is:
G = 100 / PB
Where:
G = proportional gain
PB = proportional band
Proportional band is expressed in units of %. Notice the inverse relationship between G and PB.
Make sure you known which proportional parameter your controller uses!
The response of a direct acting P only controller to a step change in Process Variable is shown
below. (NB: G = 1 in this example)
1
Sometimes called derivative time, lead time or derivative gain.
Page: 12
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
A reverse acting controller would change the manipulated variable in the opposite direction.
Controller action is either set by changing the sign of G (+ or -), or by setting a switch during controller
setup.
The direction of control (direct or reverse) must be opposite to the direction of the process. For
example, a valve which causes a decrease in the Process Variable when the valve position is
increased is classified as reverse acting and, therefore, a direct acting controller must be used. This
implies that the controller output (valve position) increases when the process variable is above the
set point so that the PV is decreased (and vice-versa).
With the addition of integral action, we now have a PI controller. This is the most commonly used
feedback controller in process industries. There is a good reason for this, as PI control is also the
most robust. The response of a PI controller to a step change in process variable is shown below.
Integral time is often referred to as reset or repeat time and is the time required to repeat the
proportional action (see response of PI controller). The units of the integral tuning parameter can be
calibrated as time per repeat or reset (minutes or seconds depending on the controllers), or, less
commonly, its inverse (repeats or resets per time).
For example:
An integral time of 10 seconds per repeat is the same as 0.1 repeats per second.
Page: 13
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
Once again, you must know which way your controller is configured.2 In this course, integral time will
be represented by time (seconds) per repeat (i.e. time in seconds to repeat the proportional action).
An integral controller will continue to adjust its output while an error exists between the setpoint and
the Process Variable. If your controller uses time per repeat, then increasing the integral time to its
largest value will effectively turn-off the integral action (strictly speaking integral action is still present
but very small). With a repeats per time controller, setting the integral parameter as small as possible
will achieve the same thing. It is desirable to have a controller where integral action can be
completely removed via a switch setting.
To demonstrate derivative action, a ramp change is more illustrative than a step. The response of a
PD controller3 to a ramp change in the process variable is shown below:
Derivative action makes the controller output lead the proportional component, hence its common
name (derivative lead time). In the above response, the PD controller output is where the P controller
output would be but ahead of time. The derivative lead time is, therefore, the time in the future where
the P controller would be equal to the current valve of the PD controller. Other common names for
the derivative tuning parameter are rate, lead time and derivative gain. It is most commonly calibrated
in units of seconds or minutes.
As mentioned previously, some controllers have 2 tuning parameters to provide derivative action:
derivative lead time (D) and derivative filter time (If). Derivative filter time is also referred to as
derivative lag time.
2
The difference between repeats per time versus time per repeat seems to confuse many
3
PD controller are seldom used in practise, one exception is temperature control in batch
processes and some very fast acting level control applications
Page: 14
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
For most controllers, the derivative filter time If is set automatically to around D/104. The major benefit
from derivative filtering is that it limits the magnitude of the derivative component (i.e. with If = D/10,
the derivative “spike” from a step change will be limited to 10 times the height of the step). In simple
terms, derivative spiking from measurement noise and sharp changes in the measurement will be
dampened.
The controller used in this course will not have If available as an independent tuning
parameter. If will be automatically adjusted to D/. Where is termed the “derivative limit”
and can be adjusted along with the other tuning parameters. It is recommended that be set
to 10.
The most common way to turn off derivative control is to set the derivative lead time to zero (D = 0)
or, in the case of some controllers, a switch setting is provided.
4
Some controllers use D/5, while in some cases no derivative filtering at all is provided.
Page: 15
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
The response of the PID controller to both ramp and step changes in the process variable are shown
below. Notice the derivative “spike” produced for the step change in process variable. This is a typical
response from a PID controller to noisy or fast changing signals and it is the main reason why
derivative action is not used much in mineral processing applications.
Derivative control should not be used much in mineral processing (with the exception of pH control)
because it tends to amplify the noise common in the process measurements. High volume, slow
acting processing such as pH control (i.e. large leaching vessels) can benefit from the addition of
derivative control action.
Page: 16
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
Process Types
Processes are generally classified by their open loop (no control action) response to a step input.
The classifications are self-regulating and non-regulating or integrating processes and runaway
processes. Since runaway processes, which exhibit an ever increasing rate with no stable state
are extremely rare in minerals processing they will not be covered in this course. Figure 9 shows a
typical self-regulating response where the red trend is a unit step process input and the green trace
is the process response. The identifying parameter is that the process response reaches a steady
state after a period of time. Figure 10 shows a typical non-regulating (Integrating) response where
the red trend is a unit step process input and the green trace is the process response. The
identifying parameter is that the process response increases at a constant ramp.
Page: 17
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
Identification of the process type is an essential step in deciding an appropriate control strategy
and tuning methodology.
Gp = pv%/mv%
63.2% pv
mv
td
𝐺𝑝 𝑒 −𝑡𝑑𝑠
𝐺(𝑠) =
𝜏𝑠 + 1
Where:
Process Gain = 𝐺𝑝
Dead Time = 𝑡𝑑
Time Constant =𝜏
In reality all processes will contain multiple orders due to the complexities of the process and the
included responses of actuators and measurement devices which all for part of the process from
the perspective of the controller. Multiple order system S domain equations are shown below.
𝐺𝑝
𝐺(𝑠) =
(𝜏1 𝑠 + 1)(𝜏2 𝑠 + 1)
Page: 18
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
𝐺𝑝
𝐺(𝑠) =
(𝜏1 𝑠 + 1)(𝜏2 𝑠 + 1)(𝜏3 𝑠 + 1)
Figure 12 shows the responses to a unit step for a first order system with = 5 (Green) a second
order system with 1 = 5, 2 = 10 (Red), and a third order system with 1 = 5, 2 = 10, 3 = 15,
(Cyan). The systems shown do not contain any dead time but the introduction of multiple orders
adds an apparent dead time delaying the system response. For most PID loop tuning applications
all process responses are treated as a first order system with dead time and the parameters used
to define the self-regulating process response are dead time, time constant and process gain.
Page: 19
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
∆%𝑝𝑣 PV
𝑟𝑖 =
∆%𝑚𝑣 × ∆𝑡
MV
pv
mv
t
td
𝑟𝑖 𝑒 −𝑡𝑑𝑠
𝐺(𝑠) =
𝑠
Where:
Integration rate = 𝑟𝑖
Dead Time = 𝑡𝑑
Page: 20
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
Cascade Control
Cascade control is the use of two feedback controllers, one an inner loop (secondary or
slave loop), and one an outer loop (Primary or master loop). The output of the primary loop
is the set point of the secondary loop. The secondary loop must be a faster acting control
than the primary loop.
Ratio Control
Ratio control is the use of a ratio controller to control two flows at a fixed ratio. The ratio set
point may be set by a Primary controller in a Cascade configuration. The ratio control will
ensure that the two flows are maintained in a fixed ratio.
Override Control
Override control is used where two or more controllers control the same device or
secondary control loop. The controller with the highest (or Lowest) demand will override
the other loops and assume control. Care must be taken with configuration of override
control to ensure the loops not in control properly track the controlled output.
Linearisation
Linearisation is used where non-linear process measurement or output devices are present
in a control loop. The linearization attempts to present the controller with a linear input or
output characteristic.
Page: 21
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
Filtering
Process measurements which contain noise at a high frequency which cannot be controlled
by the controller should have filtering applied. Only the minimum of filtering should be used
as the filter directly affects the process response seen by the controller.
Page: 22
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
Page: 23
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
Page: 24
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
Lag If, , Tf Seconds or A block which reaches approximately 63% First-order Lag
Lag Block minutes of its final output after time. Capacity
Filter Used for process modelling and noise Filter
filtering (see below) First-order Filter
Low-pass Filter
Deadtime d, Td, D Seconds or A block which exactly reproduces its input Transport Delay
Deadtime Block minutes after a time delay. Delay
Used for process modelling (see below) Lag
Page: 25
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
Setpoint r, sp, sv Same as The value to which the process Set variable
measurement variable is to be controlled
Page: 26
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
Page: 27
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
References
1. Shinskey, F. G., Process Control Systems – Application Design and Tuning, McGraw-Hill,
New York, 1996.
Page: 28
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
Practical
Learning Objectives
Exercises
Page: 29
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
Important Note: It is very important that the file browser is left at this location. The exercises
will not function correctly if Scilab is not based from this directory.
4. Right click on the required model (1-1_PID_Exercise.sce) and click Execute in
Scilab to execute the model’s graphic user interface (GUI).
5. The following pop-up may appear, if so tick the do not show tick box and Click Yes.
Page: 30
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
Page: 31
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
4. To zoom in on a trend, click Zoom Area . Note the curser bars can be used to
measure trend and time values.
Zooming can also be achieved by scrolling the mouse wheel.
The zoom area can be changed mode left clicking & dragging on the graph.
5. To get coordinates of a point on the trend, click Toggle Datatip Mode and then
click on a point on one of the trend lines.
When Toggle Datatip Mode is selected, these can be removed by right clicking
on a placed datatip point.
6. Graphic screen can be saved to file for later comparison by screen capture (with
Shutter for example) or with various File Export options on the graphic trend
window.
7. To stop, click Start/Stop, then close the trend window.
Important Note: To avoid crashing Scilab, the best method when restarting a trend, is to
always press the Start / Stop button & then close all trend windows. Ensure Scilab has
finished loading all of these commands before re-starting the trend. If you try to rush, it is
likely to crash.
8. To open the XCos block, click the XCos Block button.
Note: Exercise 1-1 isn’t the best to view the XCos block – it is dissimilar to the
other blocks and is a bit confusing. If you wish to view & understand the Xcos
blocks, start with Exercise 2-1.
Important Note: The simulation running speed is related to the processing speed of the
computer that is running it. If it runs too quickly or to slowly, the run speed can be modified
by:
Opening the .xcos simulation file in XCos
Click Simulation -> Setup
Change the value in the field Real Time Scaling
o A smaller value will speed up the simulation (if the processor can handle it)
o A larger value will slow down the simulation
This change will only apply to that specific model.
Page: 32
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
Page: 33
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
The following are typical commands used within function blocks in these modules:
FROM - Input from block variable.
Page: 34
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
Offline Variables:
Variable Description Default
Name Value
Gain Gain of Proportional controller. 1.0
Integral Integral action of the controller (seconds / repeat) 10000
10000 = Disabled. (Disabled)
Derivative Derivative action of the controller (seconds lead). 0.0
PV Input Selects 1 of 3 options for user input for the process variable:
Selector 1 = Step Input 1
2 = Ramp Input (Step)
3 = Slider input on the GUI.
Action Selects the direction of control action. 1
(Direct)
Noise Simulates noise in the level measurement. 0
Minimum (no noise) = 0. Maximum = 10. (No noise)
1.2.1 Proportional Only Control Exercise - Reproduce the Responses for a P Only Controller
1. Start the simulation and observe the response. Compare this to the training module
manual. (Reference: Section 1 – Typical PID Algorithm External Reset)
2. Change Gain from 1 to 2, run the simulation and observe the response.
3. Repeat Step 3 for Gain of 4.
4. How has the response changed?
1.2.2 Proportional + Integral Control Exercise – Reproduce the Responses for a PI Controller
5. Change the Gain back to 1.
6. Change Integral to 100, run the simulation and observe the response.
7. Repeat Step 2 for Integral of 50 & then 200.
Page: 35
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
Extra Question:
24. Why is Derivative Control based on ERROR a bad idea?
Page: 36
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
Date: Notes:
Page: 37
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
Date: Notes:
Page: 38
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
Date: Notes:
Page: 39
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction
Date: Notes:
Page: 40