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

Practical Loop Training Module 1 Introduction

This document provides an introduction to practical loop tuning training. It discusses [1] the basic elements of a feedback control loop including the sensor, transmitter, controller, final control element and process. [2] It describes the differences between feedback and feedforward control, with feedforward providing better control when an accurate process model is available. [3] It outlines the proportional-integral-derivative (PID) controller structure, which is the most commonly used feedback controller in process industries. The independent and dependent forms of the PID algorithm are presented.

Uploaded by

Kolyo Roydev
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Practical Loop Training Module 1 Introduction

This document provides an introduction to practical loop tuning training. It discusses [1] the basic elements of a feedback control loop including the sensor, transmitter, controller, final control element and process. [2] It describes the differences between feedback and feedforward control, with feedforward providing better control when an accurate process model is available. [3] It outlines the proportional-integral-derivative (PID) controller structure, which is the most commonly used feedback controller in process industries. The independent and dependent forms of the PID algorithm are presented.

Uploaded by

Kolyo Roydev
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Practical Loop-Tuning Training

Module One - An 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

Process Control 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.

Figure 1 Process Control Hierarchy

Page: 3
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction

What is a Control Loop?

Figure 2 Simple Control Loop

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

Feedback and Feedforward Control

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

Proportional-Integral-Derivative Controller Structure

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 PID Blocks

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)

Figure 5 PIDConL Tuning Parameters and Units

𝑇𝐷 𝑠 1
 PIDConR MV = 𝐺𝑎𝑖𝑛 (𝐸 + 𝑇𝐷 𝐸) + 𝐸𝑥𝑡𝑅𝑒𝑠𝑒𝑡 (1+ 𝑇 𝑠)
𝑆+1 𝑖
𝐷𝑖𝑓𝑓𝐺𝑎𝑖𝑛

Parameter

Proportional Gain

Integral TI (sec)

Derivative Td (sec)

Figure 6 PIDConR Tuning Parameters and Units

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.

Parameter Description Default

PropSel 1 = Activate P component 1

IntSel 1 = I component activated 1

DiffToFbk 1 = D component is placed in 1


the feedback
PropFacSP Applying the P component to
the feedback [0..1].
0 = P component fully in
feedback
DiffGain Gain of differentiator [1..10] 5.0
DiffGain = TD /(delay time of
D component)
NormPV Process value range (PV) for 100.0, 0.0
standardizing the proportional
gain (GAIN)
STRUCT
● High: REAL
● Low: REAL
NormMV Manipulated variable range 100.0, 0.0
(MV) for standardizing the
proportional gain (GAIN)
STRUCT
● High: REAL
● Low: REA
Figure 7 Useful PIDConL parameters

Page: 10
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction

Typical PID Algorithm with External Reset

Bias

Proportional
Setpoint (SP) Gain Manipulated
+ E Variable (MV)
+
n G n

- +

𝑑
𝐷 I
𝑑𝑡
Derivative Integral

Process Variable
(PV)

Figure 8 External Reset PID

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

 Proportional gain (not proportional band) is used

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:

 Proportional gain scaling factor

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

Figure 9 Self Regulating Process Response.

Figure 10 Non-regulating (Integrating) Process Response

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

Figure 11 Process Parameters for First Order Process


Figure 11 shows the open loop response of a first order process with dead time. A first order
system is defined by the following S domain equation:

𝐺𝑝 𝑒 −𝑡𝑑𝑠
𝐺(𝑠) =
𝜏𝑠 + 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.

Figure 12 Multi Order System Responses

Page: 19
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction

∆%𝑝𝑣 PV
𝑟𝑖 =
∆%𝑚𝑣 × ∆𝑡

MV
pv
mv
t
td

Figure 13 Integrating Process Response


Figure 13 shows the open loop response of an integrating process with dead time. The s domain
equation of an integrating process defined in the following equation:

𝑟𝑖 𝑒 −𝑡𝑑𝑠
𝐺(𝑠) =
𝑠
Where:

Integration rate = 𝑟𝑖

Dead Time = 𝑡𝑑

Page: 20
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction

Advanced Regulatory Process Control Techniques


The following sections list the regulatory control techniques which will be encountered in
subsequent sections. Examples of these techniques are shown in Figure 14 and Figure 15.

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.

Feed Forward Control


Feed forward control is the use of a measured disturbance or load variation which has a
predictable effect on a process variable. The variation is fed forward direct to the controller
output to form a predictive control. The feedback control will account for any mismatch in
the feed forward process model.

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.

Split Range Control


Split range control is used where a single controller is controlling multiple final control
elements.

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.

Figure 14 Advanced Regulatory Techniques Examples

Page: 22
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction

Figure 15 Advanced Regulatory Techniques Examples

Page: 23
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction

Reference Books and Papers


The references section contains a number of texts and articles which I have found very useful over
the years. I would, without reservation, recommend the first three books to any engineer or technician
who is interested in doing practical process control work. The 4th reference is an original paper
published by Ziegler and Nichols whose contribution to practical controller tuning methods cannot
be overstated. Those who have a sense of history should read this paper.

Terminology for Controller Tuning


The are many terms and names in controller tuning which many people who are new or unfamiliar
to the field find very confusing. Indeed I would put my neck out and say that this complicated
terminology is one of the main barriers to teaching process control skills.
The table below (see next page) attempts to list and explain the common terms. The list is far from
complete, but it does form a starting point for understanding the common terminology used in loop-
tuning circles. Reference 3 also has a excellent list of terminology.

Page: 24
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction

Common Common Units Description Aliases


Name Symbols
Proportional G, Kc, P, PB %output/%input Proportional tuning constant Proportional Band (G = 100 /
Gain PB)

Integral Time I, Ti, Seconds or Integral tuning constant Reset time


minutes (usually defined as time per repeat of Repeat time
proportional action) Auto Bias

Derivative Time D, Td, I Seconds or Derivative tuning constant Rate


minutes (usually defined as time by which Lead
proportional action is lead)

Bias %output Manual bias used in place of integral Manual reset


action

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

Common Common Units Description Aliases


Name Symbols
Lead/Lag 1, 2 Seconds or This block is a combination of a lead and
Lead/Lag Block where: minutes lag (you can’t have a pure lead)
1 = lead time Used for process modelling and for
2 = lag time feedforward control applications (see
below). Can be made to overshoot,
undershoot or reverse direction of a step
input depending on the relative values of
1 and 2.

Process pv, y, c, cv Usually Process variable which is controlled to Process output


Variable engineering units setpoint (sometimes called controller Output
(eg m3/sec, input) Controller input
tonnes/hour) Controlled variable
Input
Measurement

Manipulated m, mv, u, cv %output Variable which is adjusted to control Controller output


Variable the process variable to setpoint Controlled variable
(sometimes called controller output) Output
Command signal
Process input

Setpoint r, sp, sv Same as The value to which the process Set variable
measurement variable is to be controlled

Error e Setpoint minus Process Variable Control error

Disturbance q A plant variable which effects the Load


Variable Process Variable (E.G. feed flow into a Process Load
flotation bank) Wild variable

Controller Mode Describes the operating state of the Mode


controller (I.E. automatic, manual,
cascade) – see below

Automatic Controller mode where the output is Auto


being adjusted by the controller to Aut
keep the Process Variable at setpoint Closed-loop

Closed-loop Same as automatic

Manual Controller mode which allows the Man


operator adjusts the controller output Open-loop

Page: 26
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction

Common Common Units Description Aliases


Name Symbols
Open-loop Same as manual

Cascade Controller is in automatic and its Cas


setpoint be being adjusted by another Casc
controller

Undershoot When the Process Variable continues


below the setpoint following a setpoint
or load change

Overshoot When the Process Variable continues


above the setpoint following a setpoint
change or load change

Clamped A variable such as the controller output


which has been driven to the limit.
Typically there are upper and lower
limits on the controller output.

Dead Band Same as Usually a range above and below the


measurement or setpoint where the controller action is
% of range of reduced or set to zero
measurement

Self-regulating A process which will reach steady state Open-loop stable


without any control

Non-self- A process which requires a feedback Open-loop unstable


regulating controller to reach steady state

Steady State A condition where a process is not Equilibrium


changing with time

Characteriser A block which applies a function to its Output characteriser


input signal to produce an output signal.
Sometimes used on the output of a
controller to linearise a valve (see
below for example)

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.

2. Lipták, B. G., Instrument Engineers Handbook 3rd Edition – Process Control,Chilton,1995.


3. St. Clair, D. W., Controller Tuning and Control Loop Performance, Straight-Line Control
Company inc, 1996.
4. Ziegler, J. G., and Nichols, N. B., “Optimum Settings for Automatic Controllers,” Trans
ASME, November 1942
5. Rockwell Automation, Using the PIDE Instruction, White Paper
6. Jacques F. Smuts, Process Control for Practitioners, OptiControls, 2012

Page: 28
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction

Practical
Learning Objectives

1.1 Scilab Familiarisation Exercise


- How to open Scilab and set the environment directory.
- Overview of GUI layout, Xcos layout & common functions.

1.2 PID Exercises


- 1.2.1 - Proportional Only Control Exercise
o Demonstrate the response the Manipulated Variable (MV) in a P only controller.

- 1.2.2 - Proportional + Integral Control Exercise


o Demonstrate the response the Manipulated Variable (MV) in a PI controller.

- 1.2.3 - Proportional + Derivative Control Exercise


o Demonstrate the response of the Manipulated Variable (MV) in a PD controller.

- 1.2.4 - Proportional + Derivative + Integral Control Exercise


o Demonstrate the response the Manipulated Variable (MV) in a PID controller.
o Demonstrate the difference in the response of the Manipulated Variable for a direct
acting & reverse acting controller.

- 1.2.5 – Noise Effects


o Demonstrate the different effects of noise on each P, I & D components.

Exercises

1.1 Scilab Familiarisation Exercise


 If Scilab is installed on the PC you are using run the scilab-5.5.1 shortcut.
 If Scilab is not installed, Scilab can be run from the provided training USB stick.
Navigate to the ”Scilab” directory and run shortcut “WScilex.exe – Shortcut” -
this will open a Scilab Console window.
1. If the File Browser does not open, open it by clicking on the Console & clicking
Applications | File Browser.

2. Click to Select a directory

Page: 29
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction

3. Navigate to the _Exercises directory on the USB device.

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.

The following GUI should open:

Page: 30
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction

Page: 31
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction

1. To run the model, click the Start / Stop button.


2. Adjust the Set Point input slider and note the response on the graphic window.
3. To stop the simulation click Start / Stop button.

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.

 To return to original size click Original Size

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.

GOTO - Output to block variable.

Superblock Function - This is basically just a convenient container for more


block functions.

Function IN - Function Input.

Function OUT - Function output.

CMScope – Creates graphical trends of inputs.

MUX – Converts inputs into a vector input.

Constant – Used as an input from specified constant.

Gain Block – Output = Input * specified gain.

Saturation – Output = Input with maximum and minimum limits applied.

Sum Function – Output = Sum of inputs. Can specify + or -.

Dynamic Index Selector – Allows one from a number of different input


streams to be selected.

Integrator – Integrates input.

Continuous Transfer Function – First order transfer function.

Continuous Fix Delay – Adds dead time.

User Defined Function – Function is based on user defined input.


These are used to take real time inputs from the GUI.

Page: 34
MIPAC Pty Ltd Practical Loop Tuning Training
Module 1
Introduction

1.2 PID Exercises

Execute the following file in Scilab - 1-1_PID_Exercise.sce

Real Time Variables:


Variable Description Default
Name Value
Set Point (SP) The controller’s set point.
In this exercise, this does not represent any specific process 50
variable.
Process The controller’s process variable.
Variable (PV) In this exercise, this does not represent any specific process 50
variable.

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

8. How has the response changed?

1.2.3 Proportional + Derivative Control Exercise


9. Change Integral back to 10000.
10. Change PV Input Selector to 2 (Ramp Input).
11. Change Derivative from 0 to 20, run the simulation and observe the response.
12. Repeat Step 3 for Derivative of 10 & then 30.
13. How has the response changed?

1.2.4 Proportional + Integral + Derivative Control Exercise


14. Set the following parameters:
 Gain = 1
 Integral = 100
 Derivative = 10
15. Change PV Input Selector to 1 (Step Input).
16. How has the response changed?
17. Try reverse acting by setting Action to 2 (Reverse).
18. How has the response changed?
19. Return Action to 1 and set the Gain to -1.
20. How has the response changed?

1.2.5 Noise Effects


21. Change Noise from 0 to 2.
22. Repeat exercises 1.2.1 to 1.2.4.
23. What was the outcome in each exercise?

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

You might also like