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

Controls

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)
130 views

Controls

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/ 249

SimSci ®

®
DYNSIM 5.3.2
Controls

December 2016
All terms mentionedin this documentation that are known to be trademarks or service marks have
been appropriately capitalized. Schneider Electric Software, LLC. cannot attest to the accuracy
of this information. Use of a term in this documentation should not be regarded as affecting the
validity of any trademark or service mark.

ActiveFactory, ArchestrA, ARPM, AssayCentral, Autonomous, Avantis, Avantis.PRO,


Connoisseur, CrudeManager, CrudeSuite, DATACON, DATAPREP, DT Analyst, DYNSIM,
DYNSIM Power, Esscor, EYESIM, Factelligence, FactorySuite, FactorySuite A², Foxboro,
Foxboro Evo, FSIM Plus, HEXTRAN, Hot Links, I/A Series, IMPACT, IMServ, InBatch,
InControl, Industrial Portal, IndustrialSQL Server, InFusion, INPLANT, InSQL, IntelaTrac,
InTouch, IPact, Invensys, Logic Validator, MBM, NETOPT, PIPEPHASE, PRO/II,
PROVISION, QI Analyst, ROMeo, SCADAlarm, SIM4ME, SimCentral, SimSci, SimSci-Esscor,
Skelta, Skelta BPM.NET, Skelta Sharepoint, Skelta Sharepoint Accelerator, Spiral Software,
SuiteVoyager, TACITE, Tactical Batch, The Simulator, TRISIM Plus, VISUAL FLARE,
VISUAL FLOW, VISUAL FLOW SUITE, VISUAL NETWORK, Visual Solutions,
VOYAGER, WindowMaker, WindowViewer, Wonderware, Wonderware InTouch, and ZI ZHI
are trademarks of Schneider Electric SE, its subsidiaries and affiliated companies.
© 2016 by Schneider Electric Software, LLC. All rights reserved.
No part of this documentation shall be reproduced, stored in a retrieval system, or transmitted by
any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior
written permission of Schneider Electric Software, LLC. No liability is assumed with respect to
the use of the information contained herein.
Although precaution has been taken in the preparation of this documentation, Schneider Electric
Software, LLC assumes no responsibility for errors or omissions. The information in this
documentation is subject to change without notice and does not represent a commitment on the
part of Schneider Electric Software, LLC. The software described in this documentation is
furnished under a license agreement. This software may be used or copied only in accordance
with the terms of such license agreement.
ArchestrA, Avantis, DYNSIM, EYESIM, Foxboro, Foxboro Evo, I/A Series, InBatch, InduSoft,
IntelaTrac, InTouch, PIPEPHASE, PRO/II, PROVISION, ROMeo, Schneider Electric, SIM4ME,
SimCentral, SimSci, Skelta, SmartGlance, Spiral Software, VISUAL FLARE, WindowMaker,
WindowViewer, and Wonderware are trademarks of Schneider Electric SE, its subsidiaries, and
affiliated companies. An extensive listing of Schneider Electric Software, LLC trademarks can
be found at: http://software.schneider-electric.com/legal/trademarks/. All other brands may be
trademarks of their respective owners.
Schneider Electric Software, LLC
26561 Rancho Parkway South
Lake Forest, CA 92630 U.S.A.
(949) 727-3200
http://software.schneider-electric.com/
Contents

Table of Contents

Introduction.................................................................................... 1
Overview .......................................................................................................... 1
Summary of Models ......................................................................................... 1
Model Hierarchy ............................................................................................... 3
Controls Fundamentals ................................................................ 4
Summary ......................................................................................................... 4
Analog Model Operation Mode ........................................................................ 4
Analog Model Tracking .................................................................................... 4
Typical Analog Control Loop ............................................................................ 7
Digital Model Operation Mode ....................................................................... 10
Controls Examples ...................................................................... 11
Analog Tracking Example .............................................................................. 11
Analog Tracking Example Alternate .............................................................. 14
Three Element Drum Level Control Loop Example ....................................... 17
And................................................................................................ 21
Introduction .................................................................................................... 21
Fundamentals ................................................................................................ 21
Examples ....................................................................................................... 21
Example 1 ...................................................................................................... 21
Example1 Alternate ....................................................................................... 22
Data Entry Window Usage............................................................................. 23
Parameter Table – And.................................................................................. 24
FAQ ............................................................................................................... 25
Anti-Surge Controller .................................................................. 26
Introduction .................................................................................................... 26
Fundamentals ................................................................................................ 26
Surge Controller Algorithm ............................................................................ 39
Examples ....................................................................................................... 42
Data Entry Window Usage............................................................................. 51
XY Plot ........................................................................................................... 61
Parameter Table - ASC ................................................................................. 63
Calc ............................................................................................... 79
Introduction .................................................................................................... 79
Fundamentals ................................................................................................ 79
Examples ....................................................................................................... 80
Example 1 ...................................................................................................... 80
Data Entry Window Usage............................................................................. 81
Parameter Table - Calc ................................................................................. 83
FAQ ............................................................................................................... 87
Cntr ............................................................................................... 88
Introduction .................................................................................................... 88
Fundamentals ................................................................................................ 88
Examples ....................................................................................................... 89
Example 1 ...................................................................................................... 89
Data Entry Window Usage............................................................................. 90
Contents

Parameter Table - Cntr .................................................................................. 92


Dual Input Dual Output Switch (DSwitch) ................................. 94
Introduction .................................................................................................... 94
Fundamentals ................................................................................................ 94
Examples ....................................................................................................... 95
Example 1 ...................................................................................................... 95
Data Entry Window Usage............................................................................. 96
Parameter Table - DSwitch............................................................................ 96
FAQ ............................................................................................................. 101
FctGen ........................................................................................ 102
Introduction .................................................................................................. 102
Fundamentals .............................................................................................. 102
Example ....................................................................................................... 103
Example 1 .................................................................................................... 103
Example 2 .................................................................................................... 104
Bad Example ............................................................................................... 105
Data Entry Window Usage........................................................................... 106
Parameter Table - FctGen ........................................................................... 108
FAQ ............................................................................................................. 112
Latch ........................................................................................... 113
Introduction .................................................................................................. 113
Fundamentals .............................................................................................. 113
Examples ..................................................................................................... 113
Example 1 .................................................................................................... 113
Data Entry Window ...................................................................................... 114
Connections Tab.......................................................................................... 114
Parameter Table .......................................................................................... 115
FAQ ............................................................................................................. 116
LeadLag ...................................................................................... 117
Introduction .................................................................................................. 117
Fundamentals .............................................................................................. 117
Examples ..................................................................................................... 117
Example 1 .................................................................................................... 117
Example 2 .................................................................................................... 118
Data Entry Window Usage........................................................................... 119
Parameter Table - LeadLag ......................................................................... 121
Logic ........................................................................................... 125
Introduction .................................................................................................. 125
Fundamentals .............................................................................................. 125
Examples ..................................................................................................... 125
Example 1 .................................................................................................... 125
Example2 ..................................................................................................... 126
Data Entry Window Usage........................................................................... 127
Parameter Table - Logic .............................................................................. 127
FAQ ............................................................................................................. 128
Master ......................................................................................... 129
Introduction .................................................................................................. 129
Fundamentals .............................................................................................. 129
Examples ..................................................................................................... 129
Example 1 .................................................................................................... 129
Contents

Data Entry Window Usage........................................................................... 131


Parameter Table - Master ............................................................................ 132
Or ................................................................................................ 135
Introduction .................................................................................................. 135
Fundamentals .............................................................................................. 135
Examples ..................................................................................................... 136
Example1 Alternate ..................................................................................... 136
Data Entry Window Usage........................................................................... 137
Parameter Table – Or .................................................................................. 137
Inputs ........................................................................................................... 137
FAQ ............................................................................................................. 139
PID .............................................................................................. 140
Introduction .................................................................................................. 140
Fundamentals .............................................................................................. 140
Examples ..................................................................................................... 145
Data Entry Window Usage........................................................................... 149
Parameter Table - PID ................................................................................. 155
FAQ ............................................................................................................. 166
PulsePosn .................................................................................. 167
Introduction .................................................................................................. 167
Fundamentals .............................................................................................. 167
Example ....................................................................................................... 168
Example 1 .................................................................................................... 168
Example 2 .................................................................................................... 169
Example 3 .................................................................................................... 170
Data Entry Window Usage........................................................................... 172
Parameter Table - PulsePosn ..................................................................... 174
RLimit ......................................................................................... 179
Introduction .................................................................................................. 179
Fundamentals .............................................................................................. 179
Example ....................................................................................................... 181
Data Entry Window Usage........................................................................... 184
Parameter Table - RLimit ............................................................................ 186
Select .......................................................................................... 192
Introduction .................................................................................................. 192
Fundamentals .............................................................................................. 192
Examples ..................................................................................................... 193
Data Entry Window Usage........................................................................... 194
Parameter Table - Select ............................................................................. 195
Sum ............................................................................................. 199
Introduction .................................................................................................. 199
Fundamentals .............................................................................................. 199
Examples ..................................................................................................... 199
Data Entry Window ...................................................................................... 200
Parameter Table .......................................................................................... 201
SurgeCon ................................................................................... 205
Introduction .................................................................................................. 205
Fundamentals .............................................................................................. 205
Contents

Examples ..................................................................................................... 209


Data Entry Window Usage........................................................................... 212
Parameter Table - SurgeCon ...................................................................... 215
Switch ......................................................................................... 222
Introduction .................................................................................................. 222
Fundamentals .............................................................................................. 222
Example ....................................................................................................... 223
Data Entry Window Usage........................................................................... 225
Parameter Table - Switch ............................................................................ 226
FAQ ............................................................................................................. 230
Timer ........................................................................................... 231
Introduction .................................................................................................. 231
Fundamentals .............................................................................................. 231
Pulse Timer (Type 1) ................................................................................... 231
Extended Pulse Timer (Type 2) ................................................................... 232
On Delay Timer (Type 3) ............................................................................. 232
Stored On Delay Timer (Type 4) .................................................................. 233
Off Delay Timer (Type 5) ............................................................................. 233
Inverse Timer (Type 6) ................................................................................ 234
EXAMPLES ................................................................................................. 234
Data Entry Window Usage........................................................................... 236
Parameter Table - Timer ............................................................................. 237
FAQ ............................................................................................................. 239
XferAnaBase .............................................................................. 240
Discussion ................................................................................................... 240
Parameter Table - XferAnaBase ................................................................. 240
Introduction

Introduction

Overview
The object classes in the Controls library are used primarily for two different purposes. They
can be combined together to provide transfer function capabilities, to build a tieback simulation,
or they can be integrated into process simulation to provide a functional control system.

The object classes within this library are categorized as one of three types: analog, digital, or
special. The analog type object classes implement a common implicit tracking or optional
explicit tracking scheme and may be linked together to form the primary control loop algorithms.
The digital type object classes may be used for digital control logic. The special type object
classes are intended to address specific issues that may not fall into either of the analog or digital
model categories.

Analog type models:


Calc, FctGen, LeadLag, Master, PID, PulsePosn, RLimit, Select, Sum, SurgeCon, Switch

Digital type models:


And, Latch, Logic, Or, Timer

Special type models:


Cntr

Summary of Models

Object Typical Uses See Also See Also


Class Object Class Library
And Sets digital output to true if all digital inputs are Logic Controls
true.
Calc Sets the analog output to the result of the equation Logic Controls
solver calculation. MiscEqtn Utilities
Cntr Used for count up or count down binary signals.
FctGen Sets the analog output based on linear interpolation
table lookup function.
Latch Provides a simple digital latch algorithm.
LeadLag Provides lead and lag influence on an analog input.
Logic Provides an array of equations intended for use in Calc Controls
solving digital logic. MiscEqtn Utilities

Master Used as a controller for multiple outputs.

Or Sets the digital output to true if any digital inputs Logic Controls
are true.
PID Provides proportional, integral, and/or derivative SurgeCon Controls
control.

Controls 1
Introduction

Provides increment and decrement pulses to


PulsePosn
attempt to position a valve to the lift of the gained
and biased input.
RLimit Sets the output to the rate limited input.
Select Provides for the selection of the highest, lowest,
median or average of any number of points.
Sum Sets output to the summation of any number of
gained and biased inputs.
SurgeCon PID controller that provides compressor surge PID Controls
control protection. CompressorPID Base Equipment
Switch Value of analog output can be switched between
two analog inputs.
Timer Sets the digital output based on the value of the
Start, Reset, and time expired inputs.

Base Models
These are not for stand-alone use. Use a derived model instead.

Object Typical Uses See Also See Also


Class Object Class Library
XferAna Base model for all analog transfer function models.
Base

Controls 2
Introduction

Model Hierarchy

ModelObject
|_____________ And
|_____________ Cntr
|_____________ Latch
|_____________ Logic
|_____________ Master
|_____________ Or
|_____________ Timer
|_____________ XferAnaBase
|_____________ Calc
|_____________ FctGen
|_____________ LeadLag
|_____________ PID
|_____________ PulsePosn
|_____________ Rlimit
|_____________ Select
|_____________ Sum
|_____________ Surge
|_____________ Switch

Controls 3
Controls Fundamentals

Controls Fundamentals

Summary
The object classes in the Controls library contain many common parameters, functionality, and
concepts. The following discussion addresses these common attributes. In many cases, common
features exist between models of the same type. The special type models may not necessarily
follow any common scheme. When using the special type object classes, you should refer to the
specific object class definition for operation.

Analog Model Operation Mode


Each analog object class will have a MA parameter, which specifies auto or manual mode, and a
SDCS parameter, which allows for a DCS override mode. Three modes of operation are
available with any of the analog type object classes.

DCS Override SDCS = 1


Mode based on MA SDCS = 0
Auto MA = 1
Manual MA = 0

In Auto (SDCS=0, MA=1), the object class algorithm will function in its normal algorithm
operation. The MANSET (manual setpoint) parameter will be set to the value of the output,
unless it is connected to a specific model point.

In Manual (SDCS=0, MA=0), the output of the model will be set to the value of the MANSET
parameter after it has been clipped between the LO_OUT and HI_OUT values. Tracking output
flags and values will be set appropriately. See the Analog Model Tracking for more information.

In Override (SDCS=1, MA=0 or 1), the output will neither be set nor clipped by the model. This
mode is used to disable the model when the model operation is being performed by the DCS.
Although the setting of the model output will be disabled, the model will still set the tracking
output flags and values as if the model was operating in the Manual mode. See the Analog
Model Tracking for more information. When the model is in Override mode, the MANSET
parameter will be set to the clipped value of the output, unless it is connected to a specific model
point.

Analog Model Tracking


An implicit tracking scheme is implemented throughout all of the analog type models. The
implicit tracking may be disabled and explicit tracking can be implemented, if desired, for each
object. The following is a summary of the model parameters that are used in the tracking
scheme.

Parameter Brief Description


Trk_<input parameter name> Analog value for previous object to track for each input
parameter of this object. For example, the PID model
has a TRK_SP parameter, which is the value desired
for the setpoint input parameter when the object is in
tracking.

Controls 4
Controls Fundamentals

TrkFlag_<input parameter name> Integer flag used to determine requested track mode for
previous object for each input parameter of this object.
For example, the PID model has a TRKFLAG_SP,
which is the integer signal to the previous object
describing the mode of tracking requested.
BIT 1 = Track to Trk
BIT 2 = Raise inhibit (track if out >= Trk)
BIT 3 = Lower inhibit (track if out <= Trk)
Trk Analog value for this object to track. This parameter is
an input from the next object in the loop. In implicit
tracking operation, this parameter is automatically set
by the next object in the loop.
TrkFlag Integer flag used to determine tracking mode for this
object. This parameter is an input from the next object
in the control loop. In implicit tracking operation, this
parameter is automatically set by the next object in the
loop.
BIT 1 = Track to Trk
BIT 2 = Raise inhibit (track if out >= Trk)
BIT 3 = Lower inhibit (track if out <= Trk)
TrkDisable Disables any or all modes of tracking.
BIT 1 = Disable Track to Trk
BIT 2 = Disable Raise inhibit (track if out >= Trk)
BIT 3 = Disable Lower inhibit (track if out <= Trk)
Note that this flag only disables this object from
performing tracking, but it will still set its Trk<input
parameter name> and TrkFlag<input parameter name>
for all inputs.
TrkImplicit When this flag is set to 1 (default value), implicit
tracking will be implemented. To disable implicit
tracking, set the parameter to 0.

Tracking can be implemented by either implicit or manual connections.

Implicit Tracking
The Trk and TrkFlag of the previous object in the control loop will be automatically set for
each of this object's input parameters. The previous object in the loop for each input
parameter will be determined by parsing the string of each of the input parameters
assignment. (This will be done as a pre-processor function each time the configuration file is
read. The pointers to the previous object in the loop will be saved). This will alleviate the
requirement for a connection of tracking flags between objects. The Trk_<input parameter
name> and TrkFlag_<input parameter name> will always be set, even in implicit tracking
mode, however they will not be used unless the user explicitly connects them to some other
object's parameters.

Explicit Tracking
The Trk_<input parameter name> and TrkFlag_<input parameter name> will always be set
by the model tracking algorithm, and these may be manually connected to any other object
Trk and TrkFlag by the user in the input file. This will only be necessary if the implicit

Controls 5
Controls Fundamentals

tracking is not appropriate for the specific application, and therefore the TrkImplicit
parameter should be set to 0 when manual tracking is implemented (default value is equal to
1).

Bits Example
Bits are used in the tracking flags so that more than one mode may be signaled with a single
parameter. For example, you may wish to disable both the raise inhibit and lower inhibit
tracking but leave the normal tracking operational. To do this, you would set TrkDisable
equal to 6, which is the integer value of the second and third bits set to 1.

To use bits, add the integer value of the bit for each feature that you want to enable.
Bits have the following values:

Bit Integer Value


1 1
2 2
3 4

For example, to enable bits 1 only, the integer value is 1. For bits 1 and 2, the integer value is 3.
For bits 1, 2 and 3, the integer value is 7.

Each analog model will always calculate the Trk_<input parameter name> tracking value for all
inputs, regardless of the value of any tracking flags or disable flags. The TrkFlag_<input
parameter name> for every input parameter will be set according to the following rules.

• Any time the TrkFlag is set, all appropriate TrkFlag_<input parameter


name> flags will be set accordingly (with input parameter gains used to
determine possible reversing of raise and lower inhibit).
• Any time the object is placed in Manual or Override mode, all
TrkFlag_<input parameter name> flags will be set for normal tracking.
• Model-specific reasons.

Although the proceeding is a summary, each model description should be referred to for a
detailed description of tracking operation for that model.

Controls 6
Controls Fundamentals

Typical Analog Control Loop


A typical analog control loop configuration involves connecting the outputs of certain objects to
the inputs of others. The following example illustrates a typical analog control loop.

Typical Analog Control Loop

With the DYNSIM® Controls implicit tracking scheme, the tracking connections are made
automatically behind the scenes. The following schematic shows the same configuration as the
previous schematic, but with all tracking connections, that are made automatically, explicitly
shown for clarity. Note that the Trk parameter is the analog value to track and the TrkFlag
parameter is the digital signal indicating the tracking status.

Controls 7
Controls Fundamentals

Typical Analog Control Loop Illustrating Automatic Tracking

There may be certain control loop configurations where you desire to disable implicit tracking.
The following schematic indicates such an instance, where the output of a control object is used
as the input to two other control objects. It is desired to only track one control object, but not the
other. The TrkImplicit parameter to set to 0 (the default is 1 which enables the auto-connection
of the tracking parameters).

Note that an object can track only one downstream object – it can not track two downstream
objects simultaneously. If an object is connected to two downstream objects, the last
downstream object initialized will be tracked by the upstream object. It is not possible for the

Controls 8
Controls Fundamentals

user to configure the initialization order; therefore, the user can disable tracking using the
TrkImplicit flag.

Typical Analog Control Loop with Implicit Tracking Disabled

Note that disabling implicit tracking, as in the previous example, only disables the auto
connection of parameters, not the actual operation of tracking. In the previous example the
SWITCH object is still tracking, it is just not receiving a tracking signal from the RLimit object.
If you wish to disable tracking entirely for a certain control object, use the TrkDisable parameter,
which will cause all tracking inputs, regardless of how they are connected, to be ignored.

Controls 9
Controls Fundamentals

Digital Model Operation Mode

Each digital model has two modes of operation: Auto or Manual.

Auto MA = 1 and SDCS = 0


Manual MA = 0 or SDCS = 1

In Auto (MA=1 and SDCS = 0), the model algorithm will function in its normal algorithm
operation.

In Manual (SDCS = 1 or MA = 0), the output of the model will not be set by the algorithm. It
will be limited to be either 0 or 1, which are the only two valid outputs from any digital model.
In Manual mode, the output will be either set by some other source or remain at its current value.

Controls 10
Controls Examples

Controls Examples

Analog Tracking Example


The following is an example of the “Typical Analog Control Loop with Implicit Tracking
Disabled” above. This control system uses two PID blocks and a pulse positioner to control a
valve. One PID setpoint is driven by a RLIMIT block. This example uses Implicit Tracking.

RLIMIT: RLIMIT2
Ramp user input
Parameter Assignment UOM Description
RATE 0.2 Output rate limit
IN Input

Controls 11
Controls Examples

This is set by the user


HI_OUT 10 Output high limit
LO_OUT 0 Output low limit

PID: PID1
Controller for user demand
Parameter Assignment UOM Description
SP RLIMIT2.OUT Set point
PV MOVI1.POS Process variable
K_PV 10 Process variable gain
KI 0.1 Integral gain
KP 0.025 Proportional gain

PID: PID2
Unused controller

SWITCH: SWITCH1
Switch between user PID and unused PID
Parameter Assignment UOM Description
IN1 PID1.OUT Input 1
IN2 PID2.OUT Input 2
HI_OUT 1 Output high limit
LO_OUT 0 Output low limit
TOGGLE 0 Toggle switch
(0 = Input 1)

PULSEPOSN: PULSEPOSN1
Valve positioner
Parameter Assignment UOM Description
CYCLETIME 5 Pulse calculation cycle time
FWDTIME 1 sec Forward pulse time
REVTIME 1 sec Reverse pulse time
IN SWITCH1.OUT Input
MEAS MOVI1.POS Measured valve position
HI_OUT 1 Output high limit
LO_OUT 0 Output low limit

MOVI: MOVI1
Valve
Parameter Assignment UOM Description
TIMECL 30 sec Time to close
TIMEOP 30 sec Time to open
CL PULSEPOSN1.DEC Close command
OP PULSEPOSN1.INC Open command

RLIMIT: RLIMIT9
Ramp block with implicit tracking disabled so that it will not set the tracking of SWITCH1
Parameter Assignment UOM Description

Controls 12
Controls Examples

RATE 0.2 Output rate limit


IN SWITCH1.OUT Input
HI_OUT 1 Output high limit
LO_OUT 0 Output low limit
TRKIMPLICIT 0 Track implicit flag
0=Disable implicit tracking for this block

Controls 13
Controls Examples

Analog Tracking Example Alternate


The following is an alternate example of the “Typical Analog Control Loop with Implicit
Tracking Disabled” above. This example shows how to manually configure tracking to
reproduce Implicit Tracking for the user input rate limit block.

RLIMIT: RLIMIT2_1
Ramp user input block with manually configured to track the downstream block, PID1_1
Parameter Assignment UOM Description
RATE 0.2 Output rate limit
IN Input
This is set by the user
HI_OUT 10 in Output high limit

Controls 14
Controls Examples

LO_OUT 0 in Output low limit


TRK EQUATION Track input value
Equation: PID1_1.PV * PID1_1.K_PV
TRKFLAG EQUATION Track input flag
Equation: If(PID1_1.MA, 0, 1)

PID: PID1_1
Controller for user demand with implicit tracking disabled. This block will not internally set the
tracking values of its upstream block, RLIMIT2_1.
Parameter Assignment UOM Description
SP RLIMIT2_1.OUT Set point
PV MOVI1_1.POS Process variable
K_PV 10 Process variable gain
KI 0.1 Integral gain
KP 0.025 Proportional gain
TRKIMPLICIT 0 Implicit Tracking
0=Disable implicit tracking for this block

PID: PID2_1
Unused controller

SWITCH: SWITCH1_1
Switch between user PID and unused PID
Parameter Assignment UOM Description
IN1 PID1_1.OUT Input 1
IN2 PID2_1.OUT Input 2
HI_OUT 1 Output high limit
LO_OUT 0 Output low limit
TOGGLE 0 Toggle switch
(0 = Input 1)

PULSEPOSN: PULSEPOSN1_1
Valve positioner
Parameter Assignment UO Description
M
CYCLETIME 5 Pulse calculation cycle time
FWDTIME 1 sec Forward pulse time
REVTIME 1 sec Reverse pulse time
IN SWITCH1_1.OUT Input
MEAS MOVI1_1.POS Measured valve position
HI_OUT 1 Output high limit
LO_OUT 0 Output low limit

MOVI: MOVI1_1
Valve
Parameter Assignment UOM Description
TIMECL 30 sec Time to close
TIMEOP 30 sec Time to open

Controls 15
Controls Examples

CL PULSEPOSN1_1.DEC sec Close command


OP PULSEPOSN1_1.INC Open command

RLIMIT: RLIMIT9_1
Ramp block with implicit tracking disabled so that it will not set the tracking of SWITCH1_1
Parameter Assignment UOM Description
RATE 0.2 Output rate limit
IN SWITCH1_1.OUT Input
HI_OUT 1 Output high limit
LO_OUT 0 Output low limit
TRKIMPLICIT 0 Track implicit flag
0=Disable implicit tracking for this block

Controls 16
Controls Examples

Three Element Drum Level Control Loop Example


The following example is a three level drum level controller.

POINTS
Point Class & Type Name Description
DYNAMIC_FLOAT LBD Measured Boiler Drum Level
DYNAMIC_FLOAT LBDSP Boiler Drum Level Setpoint
DYNAMIC_FLOAT WECI Measured Feedwater Flow Rate
DYNAMIC_FLOAT F_TURBINE Measured Turbine Steam Flow Rate
DYNAMIC_FLOAT F_BLOWDOWN Measured Boiler Drum Blowdown Flow Rate
DYNAMIC_FLOAT F_DESUP Measured Desuperheater S[ray Flow Rate
DYNAMIC_FLOAT PDELSP FW Control Valve Pressure Drop Setpoint
DYNAMIC_FLOAT CFNTD Boiler Feed Pump Turbine Speed Demand
STATIC_FLOAT SDCS DCS Override Flag

RLIMIT: C1DL_3SP
Rate limit on 3-element drum level setpoint
Parameter Assignment UOM Description
RATE 0.067 20 inches in 5 minutes
IN LBDSP in Measured from centerline

Controls 17
Controls Examples

HI_OUT 10 in
LO_OUT -10 in

SUM: C1DL_B16
Total steam flow out of drum
Parameter Assignment UOM Description
IN[0] F_TURBINE HP Turbine steam flow
IN[1] F_BLOWDOWN Blowdown flow
IN[2] F_DESUP Desuperheater spray flow
K_IN[0] 3600 lb/s to lb/hr
K_IN[1] 3600 lb/s to lb/hr
K_IN[2] -3600 Subtracting spray flow, lb/s to lb/hr
HI_OUT 3000 lb/hr
LO_OUT 0 lb/hr

PID: C1DL_B20
Drum level/three element control
Parameter Assignment UOM Description
SP C1DL_3SP.OUT
PV LBD
KP 42.1
KI 0.0023
HI_OUT 1500 lb/hr
LO_OUT 0 lb/hr
B_OUT C1DL_B16.OUT lb/hr Steam flow

PID: C1DL_B21
Feedwater-steam flow/three element control
Parameter Assignment UOM Description
SP C1DL_B20.OUT lb/hr
PV WECI lb/s
K_PV 3600 lb/s to lb/hr
KP 0.01
KI 0.055
HI_OUT 100 %
LO_OUT 0 %

RLIMIT: C1DL_1SP
Rate limit on 1 element drum level setpoint
Parameter Assignment UOM Description
RATE 0.067 20 inches in 5 minutes
IN LBDSP in Measured from centerline
HI_OUT 10 in
LO_OUT -10 in

PID: C1DL_B22
Single element control
Parameter Assignment UOM Description

Controls 18
Controls Examples

SP C1DL_1SP.OUT
PV LBD in Drum level
KP 0.67
KI 0.0037
HI_OUT 100 %
LO_OUT 0 %

SWITCH: C1DL_SWITCH
Select one or three element control
Parameter Assignment UOM Description
IN1 C1DL_B22.OUT
IN2 C1DL_B21.OUT
K_IN1 0.01 Convert from (0-100) to (0-1)
K_IN2 0.01 Convert from (0-100) to (0-1)
HI_OUT 1
LO_OUT 0
TOGGLE 1 Initialize to 3 element control
SDCS SDCS

LEADLAG: C1DL_B34
Feed valve delta P feed-forward
Parameter Assignment UOM Description
IN C1DL_SWITCH.
OUT
K_IN 100
KLEAD 20
KLAG 30
HI_OUT 500 rpm
LO_OUT -500 rpm
TRKIMPLICIT 0

PID: C1DL_B35
Feedwater valve differential pressure control
Parameter Assignment UOM Description
SP PDELSP
PV CVFW.PD Pressure drop across CVFW
KP 8.375
KI 0.00833
HI_OUT 5000 rpm
LO_OUT 3325 rpm
B_OUT C1DL_B34.OUT rpm

RLIMIT: C1DL_B36
Feed turbine speed demand
Parameter Assignment UOM Description
RATE 15.0
IN C1DL_B35.OUT
HI_OUT 5000 rpm

Controls 19
Controls Examples

LO_OUT 3325 rpm


OUT CFNTD
SDCS SDCS

VALVEC: CVFW
Feedwater control valve (only the connection to the Switch block is shown)
Parameter Assignment UOM Description
OP C1DL_SWITCH.
OUT

Controls 20
And

And

Introduction
AND extends ModelObject

The digital AND object class sets the digital output to be true if all digital inputs are true.
Inversion of the output or any input is allowed. The AND model adheres to the standard Digital
model conventions.

Fundamentals
The AND algorithm can be represented with the following equation:

Inputs
Out = (1 − Inv _ Out ) * ∏ [(1 − Inv _ Inp[i ]) * Inp[i ] + Inv _ Inp[i ] * (1 − Inp[i ])]
i =0

where:
Inp – Input array
Inv_Inp – Inverse Input array
Out – Output before Inv_Out is applied
Inv_Out – Invert the output flag

Inverting the Input


Using Inv_Inp any input can be inverted. Any inversion of input will be performed before the
AND algorithm is performed. An inversion means that the value will be treated as 0 if it is 1 or 1
if it is 0.

Inverting the Output


Using Inv_Out, any output can be inverted. Any inversion of the output will be performed after
the AND algorithm is performed. An inversion means that the value will be treated as 0 if it is 1
or 1 if it is 0. By setting Inv_Out to 0, no inversion will be performed, by setting Inv_Out to 1,
an inversion will be performed on the Out parameter.

Examples

Example 1

The following example shows an AND block with three input signal. The third input signal is
inverted.

Controls 21
And

DYNAMIC_FLOAT: Signal1

DYNAMIC_BOOLEAN: Signal2

DYNAMIC_INT: Signal3

AND: AND1
Example AND block with three inputs, one inverted
Parameter Assignment UOM Description
INP 3 size Array of inputs
INP[0] Signal1
INP[1] Signal2
INP[2] Signal3
INV_INP 3 size Array of invert inputs
INP[0]
INP[1]
INP[2] 1 this input is inverted

Example1 Alternate

The following example shows an alternate method to specify and AND block with three input
signal. The third input signal is inverted.

AND: AND1
Example AND block with three inputs, one inverted
Parameter Assignment UOM Description
INP 3 size Array of inputs
INP[0] Signal1
INP[1] Signal2
INP[2] EQUATION Equation: !Signal3

Controls 22
And

Data Entry Window Usage


Connections Tab

Inputs
Array of inputs corresponds to the Inp parameter. The number of inputs whose digital inputs
should be used directly by the object is specified here.

Array of invert inputs corresponds to the Inv_Inp parameter. The number of inputs whose
digital inputs should be inverted and used by the object is specified here.

Invert output flag corresponds to the Inv_Out parameter. If the inverse of the digital output is
required, this field is set to 1.

Controls 23
And

Parameter Table – And


Inputs
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Inp Array of inputs Yes User No KI 0
defined
Inv_Inp Array of invert Yes Inp No KI 0
inputs
Inv_Out Invert output flag Yes No KI 0

Outputs
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Out Output No Yes DI 0

Status
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
MA Auto/Manual Yes No SI 1
switch
0 – Manual
1 – Automatic
SDCS DCS override Yes No SI 0
switch
0 – Execute
1 – Override

Legend:
Dfl Cls Default parameter model:
KB - Static Boolean SB - State Boolean DB - Dynamic Boolean
KI - Static Integer SI - State Integer DI - Dynamic Integer
KF - Static Float SF - State Float DF - Dynamic Float
KD - Static Double SD - State Double DD - Dynamic Double

Dft Val A value here indicates the parameter’s default value. If the parameter is static and no
value is indicated, then it (parameter value) is optional unless otherwise specified.
Eq Ok An equation can be attached to the parameter if the corresponding value is Yes.
Arr Siz A value here indicates the size of the array. No value indicates that the parameter is
not a vector.
UOM Internal units of measure

Controls 24
And

FAQ

Q. How do I invert an input?

A. Use the Inv_Inp parameter. Set this parameter true to invert the associated Inp parameter. If
Inv_Inp[2] is true then the value of Inp[2] is inverted before the value of Out is calculated.

Q. How do I invert the output?

A. Use the Inv_Out parameter. When this parameter is true, it inverts the Out parameter.

Controls 25
Anti-Surge Controller

Anti-Surge Controller

Introduction

The Anti-Surge Controller (ASC) is a PID controller that can protect a centrifugal compressor
from surge. It calculates a dimensionless surge control line from the compressor curve of the
attached compressor. It has a PID controller, which uses the error in Set Point (SP), calculated
from the surge control line margin, and Process Value (PV), which is the proximity to surge, to
take the necessary control action. It can be tripped by an external trip signal.

ASC extends XferAnaBase

For information on Control Fundamentals, refer to Control Fundamentals in this manual and for
information on Compressor Model, refer to Base Equipment Manual.

Fundamentals

Reduced Curve

The ASC uses a dimensionless method of calculation to model the compressor and capacity
control. The ASC controls the minimum flow at the surge control line, which allows a user-
specified margin before the compressor hits the surge limit line.

SLL = Surge Limit Line


Reduced
head SCL = Surge Control Line

hr

qr2 (surge) qr2 (OP) qr 2

Reduced flow

The instance name of the Compressor is assigned to the parameter OCompressor to indicate
where the ASC gets the operation specific data.

The compressor curve is expressed in dimensionless form by using a reduced curve. The
reduced curve uses the reduced flow squared (qr2) versus the reduced head (hr), instead of
volumetric flow versus polytropic head.

Controls 26
Anti-Surge Controller

The ASC uses one of two methods of calculation: Default or Custom. The Default method uses
raw data from the compressor curve to calculate the parameters needed for the controller. The
Custom method uses plant-specific tuning constants and curves to calculate the parameters for
the controller. Refer to the Custom Method section of this document for differences between the
calculation methods.

Default Method

For the Default calculation, the reduced curve is calculated by entering the volumetric
flowrate, suction density, and inlet and outlet pressures and temperatures from the
2
compressor surge curve datasheet. q r ,s and hr are calculated for each of these points to
form the reduced surge limit line using the following equations.

∆p venturi , suction ∆p venturi , Disch arg e p d Ts


q r ,s = =
2
(1)
ps p s 2 Td

where:
2
qr ,s = Reduced flow squared
∆pventuri , suction = Differential pressure across venturi meter on suction side
∆pventuri , Disch arg e = Differential pressure across venture meter on discharge side
ps = Suction pressure
pd = Discharge pressure
Ts = Suction Temperature
Td = Discharge Temperature

The ∆pventuri , suction can be calculated with suction or discharge conditions. ∆p venturi , suction is
calculated for each surge curve data point input by the user. ∆pventuri , suction is calculated
using the following equation.

2
 
∆p venturi , suction (surge) = DPref ⋅  In ⋅ RmassIn  ⋅  Rmass Re f  (2)
 Q ⋅ Rmass Re 
f   RmassIn 
 ref

where:
In = Input parameter reference to volumetric flow (m3/sec)
Qref = Reference volumetric flow rate (m3/sec) at DPref
DPref = Reference pressure drop (kPa) at 100% differential pressure.
RmassRef = Reference mass density (kg/m3) at 100% differential pressure.
RmassIn = Mass density of surge curve suction conditions

Controls 27
Anti-Surge Controller

The reduced head will be calculated using pd and ps transmitters.

σ
RC − 1
hr =
σ (3)

where:
RC = pd / ps (Pressure ratio)
σ = Exponent of polytropic compression

Exponent of polytropic compression ( σ ) can be calculated from pressure and temperature


measurements. The relationship between pressure and temperature for polytropic compression is:

T 
log d 
σ=  Ts 
P 
log d 
 Ps  (4)

Calculating σ improves accuracy when gas composition varies and compressor efficiency
changes.

From the reduced curve, the Surge Control Line (SCL) will be expressed as a percentage of the
Surge Limit Line (SLL). The margin used to form the SCL can be user-specified. The margin is
the percentage away from the surge limit line. The default value is 0.1, which means the surge
control line is 10% away from the surge limit line.

The set point of the controller can be calculated in two different ways. The first is in
actual flow terms. This means the SCLMargin is the percentage away from the surge limit
line in actual volumetric flow. In this case, the set point of the controller is calculated
from the following equation. The set point is squared to convert to reduced flow squared
terms.

Controls 28
Anti-Surge Controller

2
 1 
SP =   (5)
 1 + SCLM arg in 

where:

SCLMargin – User specified margin away from surge limit line (fraction)

The second way to calculate the set point is in reduced flow terms. This means the
SCLMargin is the percentage away from the surge limit line in reduced flow squared
terms. In this case, the set point of the controller is calculated using the following
equation. The equation is not squared as it is already in reduced flow squared terms.

SP = 1 − SCLM arg in (6)

where:

SCLMargin – User specified margin away from surge limit line (fraction)

Proximity to surge (SS) is calculated suction flow reduced (qr2). The proximity to surge is
the process variable (PV) of the PID controller.

SS is defined as follows:
2
q r , s ( surge)
PV = S S = 2
q r , s (OP) (7)
where:
qr,s2(surge) = Reduced flow squared at the SLL for input hr
qr,s2(OP) = Reduced flow squared at operating point

qr ,s (OP) is calculated from the compressor suction pressure and ∆p venturi , suction (OP).
2

∆p venturi (OP) can be input directly with a flowDP transmitter or miscellaneous equation.
It can also be input as a volumetric flow. If it is input as a volumetric flow, it will be
converted using the venturi meter constants using equation (2). If the venturi meter type is
Discharge, ∆p venturi (OP) or the volumetric flow input must be in terms of compressor
discharge conditions. The ASC will convert ∆p venturi (OP) to suction conditions.

2
qr ,s (surge) is interpolated from the dimensionless surge limit line at the hr calculated from the
operating point conditions.

Controls 29
Anti-Surge Controller

Recycle Trip Response

As the operating point of the compressor moves towards the SCL during a disturbance, the ASC
uses a PID controller to open the anti-surge valve based on proportional and integral action. The
ASC will try to control the flow to the SCL. If the operating point overshoots the SCL by a
specified amount, the controller will take an open loop response. The point at which this occurs
is called the Recycle Trip Line (RTL).
SLL = Surge Limit Line
SCL-2 = Open Loop Line (RTL)
Pressure ratio, RC
SCL = Surge Control Line

Reduced flow squared, qr2

If the operating point hits the RTL, the compressor is too close to surge and the controller is
moving too slowly to catch the disturbance. In this case, the valve will be popped open by an
open loop response in order to move the operating point back towards the SCL. Once the
operating point is to the safe side of the RTL, the open loop function will be ramped out and the
PID controller will stabilize the operating point on the SCL.

Output to
Valve

Total Response

PI Control Response

Open-Loop Response

Time

The recycle trip response will occur when the process variable is greater than the recycle trip line
setpoint. The recycle trip line set point is a function of the user-defined recycle trip line margin.
Similar to the set point of the PID controller, the setpoint of the recycle trip action can be

Controls 30
Anti-Surge Controller

calculated in two different ways. The first is in actual flow terms. The following equation
represents the recycle trip set point. The RTLMargin is the percentage away from the surge limit
line in actual volumetric flow. The set point is squared to convert to reduce flow squared terms.

2
 1 
SP =   (8)
 1 + RTLM arg in 
where:

RTLMargin – User specified margin away from surge limit line (fraction)

The second way to calculate the set point is in reduced flow terms. The RTLMargin is the
percentage away from the surge limit line in reduced flow squared terms. The set point is
calculated using the following equation. The equation is not squared as it is already in reduced
flow squared terms.

SP = 1 − RTLM arg in (9)


where:

RTLMargin – User specified margin away from surge limit line (fraction)

The recycle trip step size is a function of the proximity to surge (SS). The recycle trip
response step size calculation is as follows.

dS S
CR RT = Td RT × + Min RT (10)
dt
where:
CRRT = Recycle Trip Step Size [%/sec]
TdRT = Recycle Trip derivative gain [%]
dSS/dt = derivative of SS with respect to time [1/sec]
MinRT = minimum Recycle Trip step size [%/sec]

The recycle trip derivative gain and minimum recycle trip step size will be tunable by the
user.

If one recycle trip step size does not give enough response to bring the operating point
back to the surge control line, multiple steps are needed. During a time delay of C2, the
controller checks if the operating point is on the safe side of the recycle trip line. If it is,
there is an exponential decay of recycle trip response. The time delay and damping time
can be user-specified. If the operating point is not on the safe side of the recycle trip line
after the time delay C2, another step is added to the trip response.

Controls 31
Anti-Surge Controller

Output to Valve
Multiple step response
100%

Total Response

PI Control Response

Open-Loop Response
0%

Time
C2 C2 C2

Controls 32
Anti-Surge Controller

Custom Method
The reduced curve is input by the user as f 1 ( ) , Y Coordinate Characterizer. This
reduced curve is the basic reduced curve, as there are coefficients and other characterizer
curves that affect the reduced curve.
Proximity to Surge
The Custom Method will calculate the proximity to surge using one of the following
equations. This is the process variable of the controller. The equation used will depend
on the mode chosen.
Mode 42 - Reduced Head/(Reduced Flow in Suction)2 with X Coordinate and General
Characterizers
K ⋅ f1 [hr ⋅ f 3 ( N )] ⋅ f 5 ( Z ) ⋅ Ps
SS = (11)
∆Pventuri , suction (OP)

where:

∆p venturi , suction (OP) = Flow Measurement

f1 ( ) = Y Coordinate Characterizer

f3 ( ) = X Coordinate Characterizer

f5 ( ) = General Characterizer

hr = Reduced Head Calculated from Equation (2)

K = Surge Limit Line Coefficient

N = Normalized Rotational Speed

Ps = Suction Pressure

Mode 43 - Reduced Head/(Reduced Flow in Suction)2 with X Coordinate and General


Characterizers, for flow measured in discharge
Ps ⋅ Td
2

K ⋅ f 1 [hr ⋅ f 3 ( N )] ⋅ f 5 ( Z ) ⋅
Pd ⋅ Ts
SS = (12)
∆Pventuri ,disch arg e (OP)

where:

∆p venturi ,disch arg e (OP) = Flow Measurement

f1 ( ) = Y Coordinate Characterizer

f3 ( ) = X Coordinate Characterizer

Controls 33
Anti-Surge Controller

f5 ( ) = General Characterizer

hr = Reduced Head Calculated from Equation (2)

K = Surge Limit Line Coefficient

N = Normalized Rotational Speed

Ps = Suction Pressure

Pd = Discharge Pressure

Td = Discharge Temperature

Ts = Suction Temperature

Mode 65 - Reduced Head/(Reduced Flow = ∆Po/Ps) with General Characterizer


2

K ⋅ f1 [hr ⋅ f 3 (0)] ⋅ f 5 ( Z ) ⋅ Ps
SS = (13)
∆Pventuri , suction (OP)

where:

∆p venturi , suction (OP) = Flow Measurement

f1 ( ) = Y Coordinate Characterizer

f3 ( ) = X Coordinate Characterizer

f5 ( ) = General Characterizer

hr = Reduced Head Calculated from Equation (2)

K = Surge Limit Line Coefficient

Ps = Suction Pressure

Mode 66 - Reduced Head/(Reduced Flow = ∆Po/Pd) 2 with X Coordinate and General


Characterizers, for flow measured in discharge
K ⋅ f1 [hr ⋅ f 3 (0)] ⋅ f 5 ( Z ) ⋅ Pd
SS = (14)
∆Pventuri , suction (OP)

where:

Controls 34
Anti-Surge Controller

∆p venturi , suction (OP) = Flow Measurement

f1 ( ) = Y Coordinate Characterizer

f3 ( ) = X Coordinate Characterizer

f5 ( ) = General Characterizer

hr = Reduced Head Calculated from Equation (2)

K = Surge Limit Line Coefficient

Pd = Discharge Pressure

The characterizers and coefficient K are supplied by the plant controller configuration data. All
other parameters are obtained from the user or process data.

Controls 35
Anti-Surge Controller

For the Custom Method, the surge control line and recycle trip line margin are calculated
using the following equations. The surge control line margin is used to calculate the
setpoint of the controller using equation (6).

SCLM arg in = (b1 + CRSO + CR D ) ⋅ f 4 (Z ) (15)

where:

b1 = Initial Surge Control Bias

CRSO = Safety On Response

CR D = Derivative Response

f 4 (Z ) = Control Line Characterizer

The bias and control line characterizer are supplied by the plant controller configuration
data. The Safety On Response and Derivative Response are calculated from equation
(17) and (18).

The recycle trip margin is calculated as follows. The recycle trip margin is used to
calculate the recycle trip setpoint using equation (9).

RTM arg in = −(RT − b1 − CRSO ) ⋅ f 4 (Z ) (16)

where:

b1 = Initial Surge Control Bias

CRSO = Safety On Response

RT = Recycle Trip Line Distance

f 4 (Z ) = Control Line Characterizer

The bias, recycle trip line distance, and control line characterizer are supplied by the
plant controller configuration data. The Safety On Response is calculated from equation
(17).

The safety on response will limit the number of surges that occur by adding a bias to the
surge control line and recycle trip line margin every time a surge occurs. A surge counter
will keep track of the number of times the compressor surges. The safety on response is

Controls 36
Anti-Surge Controller

calculated as:
n
CRSO = ∑ b2,i (17)
i =1

where:

n = Cumulative surge count

b2,i = Value of Safety On Incremental Bias when surge is detected

The bias is supplied by the plant controller configuration data.

The derivative response varies the surge control margin as a function of the speed at
which the operating point is approaching the surge limit. The value CR D is only used if
it is larger than the value from the previous scan. Otherwise it will be ramped down at
the General Ramp Rate G. If the operating point is to the left of the surge limit line,
CR D will be held constant. The derivative response is calculated as:

 dS 
CR D = b3 ⋅ Td 0 ⋅  S − r3  (18)
 dt 
where:

b3 = Maximum Derivative Response

Td 0 = CR D time constant

dSS/dt = derivative of SS with respect to time [1/sec]

Controls 37
Anti-Surge Controller

r3 = CR D Dead-Zone Bias [1/sec]

The maximum derivative response, time constant, and bias are supplied by the plant
controller configuration data.

The Custom Method introduces new features to the PI controller. A dead zone is added
to ignore minor disturbances in the system. The error of the PI loop is calculated by
adding or subtracting the dead zone bias from the deviation. The error is calculated from
the following equation.

e = 0.512 ⋅ (DEV ± r1 ) (19)

where:

DEV = Deviation

r1 = Dead zone bias

The dead zone bias is supplied by the plant controller configuration data.

The Custom Method uses proportional band constant PB and reset rate Kr to calculate
the proportional gain and integral gain respectively. These constants come from the plant
controller configuration data.

100
Kp = (20)
PB
where:

PB = Proportional band

100 Kr
Ki = ⋅ (21)
PB 60
where:

Kr = Reset rate

Recycle Trip Response


For the Custom Method, the recycle trip step size will differ slightly from the Default
Method. The revised equation will be as follows.

 dS 
CR RT = C1 ⋅  Td1 × S − C 0 ⋅ dev RT  (22)
 dt 
where:

Controls 38
Anti-Surge Controller

CRRT = Recycle Trip Step Size [%/sec]


Td1 = Recycle Trip time constant
dSS/dt = derivative of SS with respect to time [1/sec]
C1 = Maximum Recycle Trip step size
C0 = Recycle Trip Gain
devRT = Recycle Trip deviation

C1 , C 0 , and Td1 are constants supplied by the plant controller configuration data. devRT is
calculated as follows.

dev RT = 1 +(RT − b1 − CRSO ) ⋅ f 4 (Z ) − S S (23)

where:

RT = Recycle Trip Line Distance

b1 = Initial Surge Control Bias

CRSO = Safety On Response

f 4 (Z ) = Control Line Characterizer

The recycle trip line distance, bias, and characterizer will be supplied by the plant
controller configuration data.

Surge Controller Algorithm

The ASC has a built in PID controller.

Please refer to the PID model section for documentation on the PID algorithm.

Auto Mode

In Auto mode, the PID algorithm sets the output. The PID controller uses the error obtained from
the surge control line margin, and the proximity to surge, to control the surge flow. The PID
controller output and recycle trip step size is added as the overall output to the anti-surge valve.

Controls 39
Anti-Surge Controller

PI Control Recycle Trip Action

To anti-surge valve

The surge controller can also be tripped manually or based on any user defined trip logic. The
output of the trip logic is given as an input to the parameter ExternalTrip. The external trip gets
preference over the low flow trip.

Surge Output = Max( PID Output + RTOutput , Trip Output )

When multiple compressors are in series, loop decoupling is modeled between the multiple
antisurge controllers. This will be a bias added in addition to the PID and RT Output.

VSDS

M Section 1 Section 2

UIC Serial UIC


Serial PIC
1 network 2 network 1

For example, if section 2 goes into surge, UIC-2 will start to open to control the flow. This will
cause section 1 to surge. To avoid this, a bias is added to the upstream ASC (UIC-1) that is a
percentage of the output of the downstream ASC (UIC-2) output. This will help anticipate the
disturbance to prevent section 1 from going into surge. The output with the bias is:

Surge Output = Max( PID Output + RTOutput + Bias, Trip Output )

Bias = OASC.Output * LoopGain

OASC is the name of the downstream ASC object. In the example above, this would be UIC-2.
The bias calculation will use the output of the downstream ASC object specified, and multiple it
by the gain. LoopGain is a constant that is user tunable.

Choke Limit

When the flow rate of the compressor is very high and the flow cannot be increased any further,
the flow is choked. The point in which this occurs is called the choke or stonewall point. The

Controls 40
Anti-Surge Controller

ASC will calculate the choke limit at the compressor flow rate and will force the anti-surge valve
shut in Auto mode if it is beyond this point.

The stonewall curve points are input by the user. The choke limit will be interpolated from the
curve at the compressor flow rate.

Manual Mode

In Manual mode, the user sets the PID output by adjusting the manual output slider. There are
two different ways in which the surge controller behaves in manual mode.

When the manual mode type is Allow_Trip

SurgeOutput = ManualOutput Not tripped


SurgeOutput = TripOutput Tripped

When the manual mode type is Trip_Override

Surge Output = ManualOutput

The manual mode type can be selected using the MANTYPE parameter.

Controller Modes

The ASC model provides three different modes (Auto, Manual and DCS override) for control.
The figure below shows the operate panel for the ASC with different modes.

Controls 41
Anti-Surge Controller

DCS Override Mode

In DCS override mode, the PID output will be set to DCS output. The DCS control can be
implemented by cross-referencing of parameters. For details on cross-referencing refer to the
DSS User Guide.

Examples

The following example shows the configuration of an ASC. An ASC is used to prevent the
compressor from going into surge when the downstream header pressure increases due to a
malfunction in the downstream valve.

The ASC uses conditions obtained from the compressor K1, therefore the compressor object
OCompressor is set to COMP1. At steady state the compressor flow is 0.5 m3/sec for a head of
92 kJ/kg, surge flow is 0.1 m3/sec. It is desired that the ASC takes action as the flow goes below
0.4 m3/sec, so the surge margin is set to 0.75. The controller action should be fast and the flow
is expected not to go below 0.25 m3/sec, hence the proportional gain (Kp) and integral gain (Ki)
are set to a value of 1. The compressor is expected to trip below 0.25 m3/sec. The ASC should
give a step size when the flow goes below 0.3 m3/sec, so the recycle trip margin is set to 0.67.

Note: Put the ASC in manual when starting up the model. Switch to auto after reaching steady
state.

Controls 42
Anti-Surge Controller

Select the following components from the Components and Thermodynamics Library: Nitrogen
(N2), Oxygen (O2), Hydrogen (H2), Carbon Monoxide (CO), Carbon Dioxide (CO2), Hydrogen
Sulfide (H2S), Water (H2O), Methane, Ethane, Ethylene, Propane, Propylene (Propene),
IsoButane (IButane), n-Butane (Butane), 1-Butene (1Butene), IsoPentane (IPentane), n-Pentane
(Pentane), Trans-2-Pentene (T2Penten).

SOURCE: SRC1
Parameter Assignment UOM Description
E 2.1336 m Elevation
OProdStream[0] S1 Source product stream connecting to the
valve V1
Spec PT Boundary condition specification.
Pb 149.59 kPa Boundary pressure
Tb 303.59 K Boundary temperature
FREE_WA
INTERNALPHASE Phases for internal flash
TER
MB[N2] 0.0137 kg-mol Boundary Composition
MB[O2] 0.0012 kg-mol Boundary Composition
MB[H2] 0.0169 kg-mol Boundary Composition
MB[CO] 1.814E-6 kg-mol Boundary Composition
MB[CO2] 0.0012 kg-mol Boundary Composition
MB[H2S] 0.0017 kg-mol Boundary Composition
MB[H2O] 0.0017 kg-mol Boundary Composition
MB[METHANE] 0.0493 kg-mol Boundary Composition
MB[ETHANE] 0.0190 kg-mol Boundary Composition
MB[ETHYLENE] 0.0224 kg-mol Boundary Composition
MB[PROPANE] 0.0244 kg-mol Boundary Composition
MB[PROPENE] 0.0867 kg-mol Boundary Composition
MB[IBUTANE] 0.0522 kg-mol Boundary Composition
MB[BUTANE] 0.0125 kg-mol Boundary Composition
MB[1BUTENE] 0.0674 kg-mol Boundary Composition
MB[IPENTANE] 0.0215 kg-mol Boundary Composition
MB[PENTANE] 0.0028 kg-mol Boundary Composition

Controls 43
Anti-Surge Controller

MB[T2PENTEN] 0.0282 kg-mol Boundary Composition

STREAM: S1
Parameter Assignment UOM Description
SPECIALPROP 1 Special properties
SPECIALPROP[0] QVSTD Special properties

VALVE: V1
Parameter Assignment UOM Description
OFeedStream S1 Valve V1 feed stream connecting from
source SRC1
OProdStream S2 Valve V1 product stream connecting to
Header H1
Cv 20000 Cv Valve Cv
KJR 0 Frac Reverse flow conductance
Op PID1.OUT fraction Valve open command
INTERNALPHASE VLE Phases for internal flash

PID: PID1
Parameter Assignment UOM Description
HI_IN 31.463 m3/sec High limit to input
LO_IN 0 m3/sec Low limit to input
VOLUMER
PIDTYPE Type of PID
ATE
PV S1.QVSTD m3/sec Process Variable
SP 20 m3/sec Set point

HEADER: H1
Parameter Assignment UOM Description
OFeedStream[0] S2 Header feed stream coming from valve
V1
OFeedStream[1] S9 Header feed stream coming from valve
ASV
OProdStream[0] S3 Header product stream connecting to
valve V2
Vol 81.553 m3 Header Volume
DynamicsOptionCompressibl Header dynamics options
e
INTERNALPHASE FREE_WA Phases for internal flash
TER

VALVE: V2
Parameter Assignment UOM Description
OFeedStream S3 Valve V2 feed stream connecting from

Controls 44
Anti-Surge Controller

header H1
OProdStream S4 Valve V2 product stream connecting to
compressor K1
Cv 20000 Cv Valve Cv
KJR 0 Frac Reverse flow conductance
Op 1 fraction Valve open command
INTERNALPHASE VLE Phases for internal flash

COMPRESSOR: K1
Parameter Assignment UOM Description
OFeedStream S4 Compressor feed stream connecting from
valve V2
OProdStream S5 Compressor product stream connecting to
valve V3
CALCMETHOD SIMPLE_A Calculation Method
DIABATIC
MWREF 43.528 Reference molecular weight
TREF 313.15 K Reference temperature
PREF 251.325 kPa Reference pressure
QSCALE 0.00027778 m3/sec Scale factor for volumetric flow curve
DHSCALE 1.05 kJ/kg Scale factor for head curve
USEDEFAULTCUR 0 Use default curve
VE
IGVREF 1 Reference IGV
IGVREF1 1 Reference IGV
IGVREF2 1 Reference IGV
IGVREF3 1 Reference IGV
SPEEDREF 4765 Rpm Shaft reference speed
SPEEDREF1 5003 Rpm Shaft reference speed
SPEEDREF2 4289 Rpm Shaft reference speed
SPEEDREF3 4408 Rpm Shaft reference speed
DHDATA 5 Performance curve head data
DHDATA[0] 117.56 Performance curve head data
DHDATA[1] 133.74 Performance curve head data
DHDATA[2] 150.95 Performance curve head data
DHDATA[3] 156.13 Performance curve head data
DHDATA[4] 156.34 Performance curve head data
DHDATA1 3 Performance curve head data
DHDATA1[0] 122.38 Performance curve head data
DHDATA1[1] 161.78 Performance curve head data
DHDATA1[2] 168.69 Performance curve head data
DHDATA2 4 Performance curve head data
DHDATA2[0] 101.76 Performance curve head data
DHDATA2[1] 118.36 Performance curve head data

Controls 45
Anti-Surge Controller

DHDATA2[2] 124.44 Performance curve head data


DHDATA2[3] 125.66 Performance curve head data
DHDATA3 6 Performance curve head data
DHDATA3[0] 106.15 Performance curve head data
DHDATA3[1] 114.02 Performance curve head data
DHDATA3[2] 124.3 Performance curve head data
DHDATA3[3] 128.51 Performance curve head data
DHDATA3[4] 132.78 Performance curve head data
DHDATA3[5] 133.54 Performance curve head data
ETADATA 5 Efficiency data
ETADATA[0] 0.725 Efficiency data
ETADATA[1] 0.778 Efficiency data
ETADATA[2] 0.795 Efficiency data
ETADATA[3] 0.78 Efficiency data
ETADATA[4] 0.778 Efficiency data
ETADATA1 3 Efficiency data
ETADATA1[0] 0.696 Efficiency data
ETADATA1[1] 0.791 Efficiency data
ETADATA1[2] 0.786 Efficiency data
ETADATA2 4 Efficiency data
ETADATA2[0] 0.749 Efficiency data
ETADATA2[1] 0.795 Efficiency data
ETADATA2[2] 0.785 Efficiency data
ETADATA2[3] 0.773 Efficiency data
ETADATA3 6 Efficiency data
ETADATA3[0] 0.747 Efficiency data
ETADATA3[1] 0.776 Efficiency data
ETADATA3[2] 0.797 Efficiency data
ETADATA3[3] 0.796 Efficiency data
ETADATA3[4] 0.779 Efficiency data
ETADATA3[5] 0.767 Efficiency data
QDATA 5 Volumetric flow data
QDATA[0] 76758.0 Volumetric flow data
QDATA[1] 75388.0 Volumetric flow data
QDATA[2] 68534.0 Volumetric flow data
QDATA[3] 61681.0 Volumetric flow data
QDATA[4] 60996.0 Volumetric flow data
QDATA1 3 Volumetric flow data
QDATA1[0] 84194.0 Volumetric flow data
QDATA1[1] 79157.0 Volumetric flow data
QDATA1[2] 74120.0 Volumetric flow data
QDATA2 4 Volumetric flow data
QDATA2[0] 60447.0 Volumetric flow data

Controls 46
Anti-Surge Controller

QDATA2[1] 55513.0 Volumetric flow data


QDATA2[2] 49345.0 Volumetric flow data
QDATA2[3] 46261.0 Volumetric flow data
QDATA3 6 Volumetric flow data
QDATA3[0] 64674.0 Volumetric flow data
QDATA3[1] 63406.0 Volumetric flow data
QDATA3[2] 60000.0 Volumetric flow data
QDATA3[3] 57066.0 Volumetric flow data
QDATA3[4] 50725.0 Volumetric flow data
QDATA3[5] 47555.0 Volumetric flow data
SPEED PC_SUCTIO rpm Shaft speed
N.OUT*5003
INTERNALPHASE FREE_WAT Phases for internal flash
ER

PID: PC_SUCTION
Parameter Assignment UOM Description
ACTION PV_SP Controller action
HI_IN 170.27 kPa High limit to input
LO_IN 101.32 kPa Low limit to input
PIDTYPE PRESSURE Type of PID
PROP_GAI
N_AND_R
TUNETYPE Type of tuning parameters
ESET_RAT
E
PV H1.P kPa Process Variable
SP 144.76 kPa Set point

STREAM: S5
Parameter Assignment UOM Description
SPECIALPROP 1 Special properties
SPECIALPROP[0] QVSTD Special properties

VALVE: V3
Parameter Assignment UOM Description
OFeedStream S5 Valve V3 feed stream connecting from
compressor K1
OProdStream S6 Valve V3 product stream connecting to
header H2
Cv 3500 Cv Valve Cv
KJR 0 Frac Reverse flow conductance
Op 1 fraction Valve open command
INTERNALPHASE VLE Phases for internal flash

Controls 47
Anti-Surge Controller

HEADER: H2
Parameter Assignment UOM Description
OFeedStream[0] S6 Header feed stream connecting from
valve V3
OProdStream[0] S7 Header product stream connecting to
valve V4
OProdStream[1] S8 Header feed stream connecting from
Valve ASV
Vol 200 m3 Header volume
INTERNALPHASE FREE_WA Phases for internal flash
TER

ASC: ASC1
Parameter Assignment UOM Description
CALCTYPE DEFAULT Calculation method
OCompressor K1 Instance name of the compressor
SPTYPE Reduced Setpoint type
SCLMargin 0.2 frac Surge control line margin
RTLMargin 0.1 frac Recycle trip line margin
Dampingtime 120 Sec Trip damping time
Kp 0.35 Proportional gain of the controller
Ki 0.01 Integral gain of the controller
METERTYPE Discharge Meter type
DPRef 197.85 kPa Reference differential pressure of
compressor flow venturi meter
Qref 19.911 m3/sec Reference volumetric flowrate of
compressor flow venturi meter at DPref
RMASSREF 13.98 kg/m3 Reference mass density of compressor
flow venturi meter at DPref
FLOWTYPE Volumetric Volumetric flow type
QVOL_OP S5.QVSTD
TS 303.43 K Design suction temperature
PS 137 kPa Design suction pressure
RMASSIN 8.0092 m3/sec Design suction mass density
SURGEDATA 9 size Surge curve volumetric flowrate
SURGEDATA[0] 4.9 m3/sec Surge curve volumetric flowrate
SURGEDATA[1] 24.5 m3/sec Surge curve volumetric flowrate
SURGEDATA[2] 28.75 m3/sec Surge curve volumetric flowrate
SURGEDATA[3] 36.3 m3/sec Surge curve volumetric flowrate
SURGEDATA[4] 37.9 m3/sec Surge curve volumetric flowrate
SURGEDATA[5] 43.8 m3/sec Surge curve volumetric flowrate
SURGEDATA[6] 46.5 m3/sec Surge curve volumetric flowrate
SURGEDATA[7] 48.9 m3/sec Surge curve volumetric flowrate
PDDATA 9 size Surge curve discharge pressure

Controls 48
Anti-Surge Controller

PDDATA[0] 187.0 kPa Surge curve discharge pressure


PDDATA[1] 318.0 kPa Surge curve discharge pressure
PDDATA[2] 330.0 kPa Surge curve discharge pressure
PDDATA[3] 340.0 kPa Surge curve discharge pressure
PDDATA[4] 348.0 kPa Surge curve discharge pressure
PDDATA[5] 483.0 kPa Surge curve discharge pressure
PDDATA[6] 550.0 kPa Surge curve discharge pressure
PDDATA[7] 600.0 kPa Surge curve discharge pressure
TDDATA 9 size Surge curve discharge temperature
TDDATA[0] 310.0 K Surge curve discharge temperature
TDDATA[1] 375.0 K Surge curve discharge temperature
TDDATA[2] 390.0 K Surge curve discharge temperature
TDDATA[3] 500.0 K Surge curve discharge temperature
TDDATA[4] 551.0 K Surge curve discharge temperature
TDDATA[5] 640.0 K Surge curve discharge temperature
TDDATA[6] 708.0 K Surge curve discharge temperature
TDDATA[7] 800.0 K Surge curve discharge temperature
QCHOKEDATA 4 size Stonewall curve volumetric flowrate
QCHOKEDATA[0] 21.3 m3/sec Stonewall curve volumetric flowrate
QCHOKEDATA[1] 23.4 m3/sec Stonewall curve volumetric flowrate
QCHOKEDATA[2] 16.8 m3/sec Stonewall curve volumetric flowrate
QCHOKEDATA[3] 17.9 m3/sec Stonewall curve volumetric flowrate
DHCHOKEDATA 4 size Stonewall curve polytropic head
DHCHOKEDATA[ 123.4 kJ/kg Stonewall curve polytropic head
0]
DHCHOKEDATA[ 128.5 kJ/kg Stonewall curve polytropic head
1]
DHCHOKEDATA[ 106.8 kJ/kg Stonewall curve polytropic head
2]
DHCHOKEDATA[ 111.5 kJ/kg Stonewall curve polytropic head
3]

VALVE: ASV
Parameter Assignment UOM Description
OFeedStream S8 Valve ASV feed stream connecting from
Header H2
OProdStream S9 Valve ASV product stream connecting to
Header H1
Cv 1300 Valve Cv
KJR 0 Frac Reverse flow conductance
Op LIM01(2*A Surge controller output signal given to
SC1.OUT) the Open command of the valve
CUSTRIM MODLIN CustomTrim Type

Controls 49
Anti-Surge Controller

INTERNALPHASE VLE Phases for internal flash

VALVE: V4
Parameter Assignment UOM Description
OFeedStream S7 Valve V4 feed stream connecting from
Header H2
OProdStream S10 Valve V4 product stream connecting to
sink SNK1
Cv 3500 Cv Valve Cv
KJR 0 Frac Reverse flow conductance
Op 1 fraction Valve open command
INTERNALPHASE VLE Phases for internal flash

SINK: SNK1
Parameter Assignment UOM Description
OfeedStream[0] S10 Valve V2 product stream connecting to
sink
Pb 807.23 kPa Sink
E 5.7912 m Elevation

Controls 50
Anti-Surge Controller

Data Entry Window Usage


Configuration Dialog

Calculation Type corresponds to the Cal cType parameter. For the Default calculation, the
reduced curve is calculated by entering the volumetric flowrate, suction density, and inlet and
outlet pressures and temperatures from the compressor surge curve datasheet. The Custom
calculation is used when the user has the parameters and curves from the plants’ anti-surge
controller. Each calculation type will display a different Basic and Curve Data tab.

Basic Tab

Controls 51
Anti-Surge Controller

Compressor Object
The Compressor object corresponds to the OCompressor parameter. The compressor object’s
name specifies the object where the operating volumetric flowrate and inlet and outlet
temperatures and pressures are obtained.

The following parameters correspond to the Default method of calculation.

Setpoint Type
Setpoint type corresponds to the SPType parameter. This determines if the surge control
line margin and recycle trip margin are in terms of actual flow or reduced flow.

Surge Control Line Margin


Surge control line margin corresponds to the SCLMargin parameter. The surge control
line margin is the percentage the surge control line is away from the surge limit line on
the compressor curve. A value of 0.1 would mean that the surge control line is 10% from
the surge limit line. You may have to specify this value to achieve desired results.

Recycle Trip Line Margin


Recycle trip line margin corresponds to the RTLMargin parameter. The recycle trip
line margin is the percentage the recycle trip line is away from the surge limit line on the
compressor curve. A value of 0.05 would mean that the recycle trip line is 5% from the
surge limit line. You may have to specify this value to achieve desired results.

Tuning Constants
Proportional gain corresponds to the Kp parameter. This parameter is initialized to
include proportional term in the controller output calculations. A higher proportional
gain might result in instability.

Integral gain corresponds to the Ki parameter. This parameter is initialized to include


integral term in the controller output calculations. A higher integral gain might result in
oscillatory behavior.

Derivative gain corresponds to the Kd parameter. This parameter should be initialized to


include derivative term in the controller output calculations.

Derivative time corresponds to the Td parameter. This parameter should be initialized to


include derivative term in the controller output calculations.

Recycle Trip
Trip delay time corresponds to the TimeDead parameter. The surge controller output
will be held at the recycle trip step size CRRT for this time if the flowrate drops below
the recycle trip line. If the flowrate is still below the recycle trip line after this time,
another step size is added to the output. The default value is 3 sec.

Damping time corresponds to the TimeDecay parameter. The ASC recycle trip output
decays to 1% in this time. The default value is 15 seconds, which can be used in most
cases.

Controls 52
Anti-Surge Controller

Recycle trip derivative gain corresponds to the TDRT parameter. This is the gain added
to the recycle trip step size for the derivative of the proximity to surge with respect to
time.

Minimum recycle trip step size corresponds to the MINRT parameter. This parameter is
the minimum recycle trip step size for the recycle trip step size (CRRT) parameter.

The following parameters correspond to the Custom method of calculation.

Controller Mode
Controller Mode corresponds to the ModeType parameter. There are four controller
modes that determine how the proximity to surge is calculated. FA42, FA43, FA65, and
FA66.

Controls 53
Anti-Surge Controller

Normalized Rotational Speed (N)


Normalized Rotational Speed corresponds to the N parameter. This is used for modes
FA42 and FA43. The X coordinate characterizer F3 depends on the rotational speed.

Surge Control Constants


Initial Surge Control Bias corresponds to the A_B1 parameter. This is used to calculate
the surge control line and recycle trip line margin.

Dead Zone Bias corresponds to the A_R1 parameter. The error of the controller ignores
deviation that is within the dead zone bias.

General Ramp Rate corresponds to the A_G parameter. This ramp rate is the rate at
which the derivative response ramps down when the derivative response is decreasing.

Surge Limit Line Coefficient corresponds to the A_K parameter. This parameter is a
constant that is multiplied to the proximity to surge for all four modes.

Derivative Response Constants


Maximum Derivative Response corresponds to the A_B3 parameter. This is the
maximum value of the derivative response.

CRd Dead Zone Bias corresponds to the A_R3 parameter. The derivative response will
be ignored when the deviation is within the dead zone bias.

CRd Time Constant corresponds to the A_TD0 parameter. This is the time constant for
the derivative response calculation.

Safety On Response
Safety On Line Distance corresponds to the A_SO parameter. This is the distance
between the surge limit line and the safety on line.

Safety On Line Interval corresponds to the A_A5 parameter. The safety on counter is
incremented at this interval for as long as the safety on deviation is negative.

Safety On Incremental Bias corresponds to the A_B2 parameter. This is the value of the
bias added to the surge control line margin when a surge is detected.

Recycle Trip Constants


Recycle Trip Gain corresponds to the A_C0 parameter. This is the recycle trip gain used
in the recycle trip step size calculation.

Maximum Recycle Trip Step Size corresponds to the A_C1 parameter. This is the
maximum recycle trip step size allowed.

Recycle Trip Time Constant corresponds to the A_Td1 parameter. This is the recycle
trip time constant used in the recycle trip step size calculation.

Recycle Trip Line Distance corresponds to the A_RT parameter. This is used in the
calculation of the distance between the surge limit line and the recycle trip line.

Controls 54
Anti-Surge Controller

Damping time corresponds to the TimeDecay parameter. The ASC recycle trip output
decays to 1% in this time. The default value is 15 seconds, which can be used in most
cases.

Trip delay constant corresponds to the TimeDead parameter. The surge controller
output will be held at the recycle trip step size CRRT for this time if the flowrate drops
below the recycle trip line. If the flowrate is still below the recycle trip line after this
time, another step size is added to the output. The default value is 3 seconds.

PID Constants
Proportional Band corresponds to the A_PB1 parameter. This is used to calculate the
proportional response for the PID controller.

Reset Rate corresponds to the A_KR1 parameter. This is used to calculate the integral
response for the PID controller.

Operating Data Tab

Compressor Data
Suction Pressure corresponds to the PS_OP parameter. This is the suction pressure of the
compressor. If specified, this value directly overrides the value taken from the compressor object.

Discharge Pressure corresponds to the PD_OP parameter. This is the discharge pressure of the
compressor. If specified, this value directly overrides the value taken from the compressor object.

Suction Temperature corresponds to the TS_OP parameter. This is the suction temperature of the
compressor. If specified, this value directly overrides the value taken from the compressor object.

Controls 55
Anti-Surge Controller

Discharge Temperature corresponds to the TD_OP parameter. This is the discharge temperature
of the compressor. If specified, this value directly overrides the value taken from the compressor
object.

Venturi Meter Tab

Venturi Meter

Venturi meter type corresponds to the MeterType parameter. This is the location of the venturi
meter used for the reduced curve calculation.

Reference DP corresponds to the DPRef parameter. This is the reference differential pressure at
100% differential pressure of the venturi meter. This can be found on the venturi meter
manufacturer’s data sheet.

Reference volumetric flowrate corresponds to the QRef parameter. This is the reference
volumetric flowrate at 100% differential pressure of the venturi meter. This can be found on the
venturi meter manufacturer’s data sheet.

Reference mass density corresponds to the RmassRef parameter. This is the reference mass
density at 100% differential pressure of the venturi meter.

Flow DP

Flow Specifications corresponds to the FlowType parameter. This specifies whether the
compressor flow is in terms of flowDP or volumetric flow.

Controls 56
Anti-Surge Controller

If FlowType is FlowDP, Compressor Flow DP corresponds to the FlowDP parameter. This is the
∆p venturi (OP) value used for the qr,s2(OP) calculation. This can be connected to a flowDP
transmitter object output or a miscellaneous equation. This should be in terms of the same
venturi meter used for the surge calculations.

If FlowType is Volumetric, Compressor Flowrate corresponds to the Qvol_OP parameter. This


is the volumetric flowrate of the compressor. This is translated to terms of FlowDP using the
venturi meter constants. This should be in terms of the same venturi meter used for the surge
calculations.

Curves Tab

This tab changes based on the method of calculation.

The Curves tab for the Default method of calculation contains the following.

Surge Curve

Suction temperature corresponds to the TS parameter. This is the reference suction temperature
of the compressor curve.

Suction pressure corresponds to the PS parameter. This is the reference suction pressure of the
compressor curve.

Suction density corresponds to the RmassIn parameter. This is the reference suction mass
density of the surge curve on the manufacturer data.

Controls 57
Anti-Surge Controller

Surge Curve Data

Flowrate corresponds to the SurgeData parameter. This is an array of surge curve volumetric
flow rates from the compressor curve at different speeds.

Pressure corresponds to the PDData parameter. This is an array of the surge curve discharge
pressure at the corresponding volumetric flow rate.

Temperature corresponds to the TDData parameter. This is an array of the surge curve discharge
temperature at the corresponding volumetric flow rate. This may require estimation if it is not
provided on the compressor curve.

Stonewall Curve Data

Flowrate corresponds to the QChokeData parameter. This is an array of stonewall curve


volumetric flow rates from the compressor curve at different speeds.

Head corresponds to the DHChokeData parameter. This is an array of the stonewall curve
polytropic head at the corresponding volumetric flow rate.

Controls 58
Anti-Surge Controller

The Curves tab for the Custom method of calculation contains the following.

F1(X) Data
X corresponds to the F1_X parameter. This is the x value for the Y Coordinate Characterizer
Curve F1(X) curve from the controller specification data.

F(X) corresponds to the F1_Y parameter. This is the y value for the Y Coordinate Characterizer
Curve F1(X) curve from the controller specification data.

F3(X) Data
X corresponds to the F3_X parameter. This is the x value for the X Coordinate Characterizer
Curve F3(X) curve from the controller specification data.

Controls 59
Anti-Surge Controller

F(X) corresponds to the F3_Y parameter. This is the y value for the X Coordinate Characterizer
Curve F3(X) curve from the controller specification data.

F4(X) Data
X corresponds to the F4_X parameter. This is the x value for the Control Line Characterizer
Curve F4(X) curve from the controller specification data.

F(X) corresponds to the F4_Y parameter. This is the y value for the Control Line Characterizer
Curve F4(X) curve from the controller specification data.

F5(X) Data
X corresponds to the F5_X parameter. This is the x value for the General Characterizer Curve
F5(X) curve from the controller specification data.

F(X) corresponds to the F5_Y parameter. This is the y value for the General Characterizer Curve
F5(X) curve from the controller specification data.

Connections Tab

The Connections Tab is used to set gain and bias for SP, PV and output. It is also used to set the
gain for loop decoupling when there are multiple ASCs in series.

Process Variables
Process variable gain corresponds to the K_PV parameter. The default value can be left in place
if the gain should not affect the user set PV.

Controls 60
Anti-Surge Controller

Process variable bias corresponds to the B_PV parameter. The default value can be left in place
if the bias should not affect the user set PV.

Set Point
Set point gain corresponds to K_SP parameter. The default value can be left in place if the gain
should not affect the user set SP.

Set point bias corresponds to B_SP parameter. The default value can be left in place if the bias
should not affect the user set SP.

Output
Bias on output corresponds to B_Out parameter. The default value can be left in place if the bias
should not affect the output.

Loop Decoupling
Downstream ASC object corresponds to OASC parameter. An ASC object name can be
specified to add a bias to the output of the controller for loop decoupling.

Loop decoupling gain corresponds to LoopGain parameter. This is the gain for the bias added to
the output of the controller. A value of 0.1 means that the bias added to the ASC output will be
10% of the output of the connected ASC.

XY Plot

A predefined ASC XY plot is available in the XY plot object. The ASC XY plot is the surge
limit line, surge control line, and recycle trip line in reduced form. The plot is in terms of reduced
head versus reduced flow squared. The operating point and history are shown on the reduced
curves to see how close the compressor is to surge. Refer to the Dynamic Simulation Suite User
Guide for more information about the XY plots.

Controls 61
Anti-Surge Controller

Controls 62
Anti-Surge Controller

Parameter Table - ASC


Auto, Manual and Override Control
Parameter Dft Eq Array
Description UOM Dft Val
Name Cls Ok Size
AutSW Auto override switch KI 0 Yes
When set to 1, the
system is set to auto
mode (MA = 1). Default
value is 0
MA Auto Manual Switch KI AUTO Yes
0 – Manual
1 – Automatic
ManSW Manual override switch KI 0 Yes
When set to 1, the
system is set to manual
mode (MA = 0). Has
preference over auto
override switch (AutSw).
Default value is 0.
SDCS DCS override switch KI EXECU Yes
0 – Execute TE
1 – Override

Calculated Values
Parameter Dft Eq Array
Description UOM Dft Val
Name Cls Ok Size
CRRT Recycle Trip Step Size %/sec DF 0 No
Step size when recycle
trip active
HR Reduced Head DF 0 No
Dimensionless head
based on inlet and outlet
temperature and
pressure of compressor
PV Process Variable DF 0 No
Proximity to surge.
QRS2_Surge/QRS2_OP
QRS2_OP Reduced Flow Squared DF 0 No
Operating Point
Dimensionless
volumetric flow rate of
operating point
QRS2_SUR Reduced Flow Squared DF 0 No
GE Surge
Dimensionless
volumetric flow rate at
surge
RTL Recycle Trip LineSet DF 0 No

Controls 63
Anti-Surge Controller

point
Recycle trip line
setpoint.
A value of 1 is the surge
limit line,
a value less than 1 is to
the right of
the surge limit line and
a value greater
than 1 is to the left of
the surge limit line.
SP Set point DF 0 No
Proximity to surge (1-
SCLMargin)2

Configuration and Tuning


Parameter Dft Eq Array
Description UOM Dft Val
Name Cls Ok Size
CALCTYPE Calculation type KI DEFAU No
This parameter allows LT
the user to
choose the calculation
type.
Default will use surge
curve data
from the compressor
curve to calculate
the reduced curve.
Custom will allow the
user to input tuning
parameters and use
detailed calculations
based on the type
of anti-surge controller
chosen. Custom is
only recommended for
those with the specified
tuning parameters
available.
DAMPINGT Damping time sec KF 15 No
IME Time during which the
recycle trip output will
decay to 1%
FLOWTYP Flow type KI FLOWD No
E This parameter allows P
the user to
input the compressor
flow rate as
a FlowDP or volumetric

Controls 64
Anti-Surge Controller

flowrate.
This value must be at
the same
location as the venturi
meter constants.
If a SUCTION venturi
meter is chosen,
this value must be in the
suction flow,
otherwise if
DISCHARGE venturi
meter is
chosen, this value must
be in discharge flow.
KD Derivative Gain KF Yes
If this parameter is not
initialized, the
derivative part of the
algorithm will not be
added to the output
KI Integral Gain 1/sec KF 0.1 Yes
If this parameter is not
initialized, the integral
part of the algorithm
will not be added to the
output.
KP Proportional Gain KF 0.1 Yes
If this parameter is not
initialized, the
proportional part of the
algorithm will not be
added to the output
KR1 DEV Reset Rate KF 0.1 Yes
Dev Reset Rate PID:A
Kr1
LOOPGAIN Loop decoupling gain KF 0.1 No
This parameter is used
if the OASC parameter
is initialized. Bias gain
for loop decoupling.
MANTYPE Manual mode type KI ALLOW No
This parameter _TRIP
determines the behavior
of the controller in
manual mode.
Allow_Trip allows the
output to be set
manually but the trip
output can still override

Controls 65
Anti-Surge Controller

it
With Trip_Override the
output always follows
the Manset, use this
option for tuning and
testing the surge
controller, as this turns
off the surge protection
METERTYP Venturi Meter Type KI SUCTIO No
E This parameter N
determines if the
venturi meter is located
in the suction or
discharge line of the
compressor.
SUCTION: The venturi
meter is located in
the suction line of the
compressor.
DISCHARGE: The
venturi meter is located
in the discharge line of
the compressor
MINRT Minimum Recycle Trip %/sec KF No
Step Size
Minimum step size when
recycle trip active
MODETYP Mode Type KI FA42 No
E This parameter allows
the user to
choose the anti-surge
controller mode.
The differnet modes are
fA42, fA43, fA65,
and fA66. This is used
for the custom
calculation type. If the
mode is not known
the user should use the
default calculation
type.
PB1 DEV Proportional Band KF 0.1 Yes
Dev Proportional Band
PID:A PB1
SPTYPE SP mode type KI ACTUA No
This parameter L
determines the set point
calculation for the PID
controller.

Controls 66
Anti-Surge Controller

Actual means the


SCLMargin parameter
is the percentage away
from the surge limit line
in actual flow terms.
Reduced means the
SCLMargin parameter
is the percentage away
from the surge limit line
in reduced flow terms.
TD Derivative Time sec KF Yes
If this parameter is not
initialized, the
proportional part of the
algorithm will not be
added to the output
TDRT Recycle Trip Derivative KF 5 No
Gain
Gain for derivative of
proximity to surge
added to recycle trip
step size
TIMEDELA Delay time sec KF 3 No
Y Time before recycle trip
takes another step size if
flow still below recycle
trip line

Curves
Parameter Dft Eq Array
Description UOM Dft Val
Name Cls Ok Size
DHCHOKE Head kg- KD 0.0001 No User
DATA Stonewall curve head at m/kg Define
corresponding d
QCHOKEDATA
volumetric flowrate
PDDATA Discharge Pressure kPa KD 0.0001 No User
Discharge pressure of Define
surge limit line at d
corresponding
SURGEDATA
volumetric flowrate
QCHOKED Stonewall Curve m3/sec KD 0.0001 No User
ATA Volumetric Flowrate Define
Stonewall curve d
volumetric flowrate at
each speed
SURGEDA Surge Curve Volumetric m3/sec KD 0.0001 No User
TA Flowrate Define

Controls 67
Anti-Surge Controller

Surge curve volumetric d


flow rate at each speed
TDDATA Discharge Temperature K KD 0.0001 No User
Discharge temperature Define
of surge limit line at d
corresponding
SURGEDATA
volumetric flowrate

Custom Calculated Values


Parameter Dft Eq Array
Description UOM Dft Val
Name Cls Ok Size
CRd Derivative Response DF 0 No
Derivative Response
for surge control
line margin Custom
calculation.
CRso Safety On Response DF 0 No
Safety on response for
surge control
line margin Custom
calculation.

Custom Curves
Parameter Dft Eq Array
Description UOM Dft Val
Name Cls Ok Size
F1_X Y Coordinate KD 0.0001 No User
Characterizer Define
X value for Y d
Coordinate
Characterizer for
Custom
Calculation.
F1_Y Y Coordinate KD 0.0001 No User
Characterizer Define
F(x) value for Y d
Coordinate
Characterizer for
Custom
Calculation.
F3_X X Coordinate KD 0.0001 No User
Characterizer Define
X value for X d
Coordinate
Characterizer for
Custom
Calculation.
F3_Y X Coordinate KD 0.0001 No User
Characterizer Define

Controls 68
Anti-Surge Controller

F(x) value for X d


Coordinate
Characterizer for
Custom
Calculation.
F4_X Control Line KD 0.0001 No User
Characterizer Define
X value for Control Line d
Characterizer for
Custom
Calculation.
F4_Y Control Line KD 0.0001 No User
Characterizer Define
F(x) value for Control d
Line Characterizer for
Custom
Calculation.
F5_X General Characterizer KD 0.0001 No User
X value for General Define
Characterizer for d
Custom
Calculation.
F5_Y General Characterizer KD 0.0001 No User
F(x) value for General Define
Characterizer for d
Custom
Calculation.

Custom Inputs
Parameter Dft Eq Array
Description UOM Dft Val
Name Cls Ok Size
A5 Safety On Repeat KD 0 Yes
Interval
Safety On Repeat
Interval Spec:A A5
B1 Initial Surge Control KD 0 Yes
Bias
Initial Surge Control
Bias Spec:A b1
B2 Safety On Incremental KD 0 Yes
Bias
Safety On Incremental
Bias Spec:A b2
B3 Maximum Derivative KD 0 Yes
Response
Maximum Derivative
Response Spec:A b3
C0 Recycle Trip Gain KD 0 Yes
Recycle Trip Gain

Controls 69
Anti-Surge Controller

Spec:A C0
C1 Maximum Recycle Trip KD 0 Yes
Step Size
Maximum Recycle Trip
Step Size Spec:A C1
F4_XVAR Alternative X Variable KD 0 Yes
for F4 Characterizer
By default, the F4
characterizer will use
the calculated flowDP
as the argument.
It is possible that the
F4 characterizer will
use a signal variable. If
this is the case,
specify the parameter
or value to be used.
Mode:A FC 1
F5_XVAR Alternative X Variable KD 0 Yes
for F5 Characterizer
By default, the F5
characterizer will use
the polytropic head
exponent as the
argument.
It is possible that the
F5 characterizer will
be a function of a
process variable.
Specify the parameter
or value to be used.
Mode:A SS 9
G General Ramp Rate KD 0 Yes
General Ramp Rate
PID:A G
K Surge Limit Line KD 0 Yes
Coefficient
Surge Limit Line
Coefficient Spec:A K
N Rotational Speed KD 0 Yes
Normalized Rotational
Speed
R1 Dev Dead Zone Bias KD 0 Yes
Dev Dead Zone Bias
PID:A r1
F3 CRd Dead Zone Bias KD 0 Yes
CRd Dead Zone Bias
PID:A r3
RT Recycle Trip Line KD 0 Yes

Controls 70
Anti-Surge Controller

Distance
Recycle Trip Line
Distance Spec:A RT
SO Safety On Line KD 0 Yes
Distance
Safety On Line
Distance Spec:A SO
SURGERES Safety On Response KD 0 Yes
ET Reset Input
Set this flag to true
to reset the surge count
signal.
TD0 CRd Time Constant KD 0 Yes
CRd Time Constant
PID:A Td0
TD1 Recycle Trip Time KD 0 Yes
Constant
Recycle Trip Time
Constant Td1

Inputs
Parameter Dft Eq Array
Description UOM Dft Val
Name Cls Ok Size
B_Out Bias on output DF 0 Yes
Actual Out = Out +
B_Out
B_PV Bias on process m3/sec KF 0 Yes
variable
Actual PV = PV *
K_PV +B_PV
B_SP Bias on set point m3/sec KF 0 Yes
Actual SP = SP * K_SP
+B_SP
DPRef Reference Differential kPa KF Yes
Pressure
100% differential
pressure for suction
flow venturi meter.
Used in surge reduced
curve qrs2 calculation.
FlowDP Compressor Suction kPa KF Yes
Flow DP
User defined suction
flow differential
pressure. Used in
qrs2(OP) calculation.
Gap_Hi Gap high KF 0 Yes
Value of error gap on
positive side

Controls 71
Anti-Surge Controller

Gap_Lo Gap low KF 0 Yes


Value of error gap on
negative side
Gap_Slope Gap slope KF 0 Yes
Value of error gap
slope
K_PV Gain on process KF 1 Yes
variable
Actual PV = PV *
K_PV +B_PV
K_SP Gain on set point KF 1 Yes
Actual SP = SP * K_SP
+B_SP
OASC ASC object No
The ASC object
downstream of this
ASC when multiple
compressors are in
series
OCompressor Compressor object No
The compressor object
from which the scaled
compressor curve
information is obtained
is specified here
PD_OP Compressor Discharge kPa KF Yes
Pressure
Operating point
discharge pressure.
If this parameter is
specified, it will
take precedence over
the operating
conditions
retrieved from the
compressor object.
PS Suction Pressure kPa KF Yes
Reference suction
pressure from
compressor curve data
PS_OP Compressor Suction kPa KF Yes
Pressure
Operating point suction
pressure.
If this parameter is
specified, it will
take precedence over
the operating
conditions

Controls 72
Anti-Surge Controller

retrieved from the


compressor object.
QRef Reference Volumetric m3/sec KF Yes
Flowrate
Volumetric flow rate at
100% differential
pressure for suction
flow venturi meter.
Used in surge reduced
curve qrs2 calculation.
Qvol_OP Compressor m3/sec KF Yes
Volumetric Flowrate
Operating point
voluemtric flowrate.
If this parameter is
specified, it will
take precedence over
the operating
conditions
retrieved from the
compressor object.
RmassIn Mass Density In kg/m3 KF Yes
Surge Curve suction
mass density. This is
used to convert the
surge curve
volumetric flowrate to
reduced flow squared.
This value should be at
suction conditions.
RmassRef Reference Mass kg/m3 KF Yes
Density
Mass density reference
for venturi meter. This
is used to convert the
surge curve volumetric
flowrate to reduced
flow squared.
RTLMargin Recycle Trip Line KF 0.05
Margin
Margin from Surge
Limit Line (SLL)
that represents Recycle
Trip Line (RTL)
0 - Surge Line
0.05 - 5% from Surge
Line
SCLMargin Surge Control Line KF 0.1
Margin

Controls 73
Anti-Surge Controller

Margin from Surge


Limit Line (SLL)
that represents Surge
Control Line (SCL)
0 - Surge Line
0.1 - 10% from Surge
Line
TD_OP Compressor Discharge K KF Yes
Temperature
Operating point
discharge temperature.
If this parameter is
specified, it will
take precedence over
the operating
conditions
retrieved from the
compressor object.
TripExtern External trip DI 0 Yes
External trip signal
from a user configured
trip logic. This has
prefererance over the
PID and RT output
TS Suction Temperature K KF Yes
Reference suction
temperature from
compressor curve data
TS_OP Compressor Suction K KF Yes
Temperature
Operating point suction
temperature.
If this parameter is
specified, it will
take precedence over
the operating
conditions
retrieved from the
compressor object.

Internal Use Only


Parameter Dft Eq Array
Description UOM Dft Val
Name Cls Ok Size
Deriv Saved derivative DF 0 No
values
dDeriv Derivative of SF 0 No
derivative values
dIntegral Derivative of integral DF 0 No
values

Controls 74
Anti-Surge Controller

Integral Saved integral values SF 0 No


PrevCRd Previous value of SF 0 No
derivative response
CRd
PrevError Previous value of error SF 0 No
PrevSurgePro Previous value of SF 0 No
x proximity to surge
SORAccum Safety On Response sec KF 0 No
Accumulated Time
Surge Count Internal surge count KF 0 No
state
TripTime Trip time timer sec KF 0 No

Manual Set point


Parameter Dft Eq Array
Description UOM Dft Val
Name Cls Ok Size
ManRate Maximum rate to 1/sec KF Yes
move output when in
manual mode
If this parameter is not
initialized the output
rate of change will not
be limited.
ManSet Manual set point SF 0 Yes
Value to set the output
to when in manual
mode

Output Value Limiting


Parameter Dft Eq Array
Description UOM Dft Val
Name Cls Ok Size
AltOut Alternate output KF No
Each element in the
array will be set to out
unless the SDCS flag is
set to 1
Hi_Out High limit on output KF 1 Yes
If not specified, the
output will not be
limited by high limit
Lo_Out Low limit on output KF 0 Yes
If not specified, the
output will not be
limited by low limit

Outputs

Controls 75
Anti-Surge Controller

Parameter Dft Eq Array


Description UOM Dft Val
Name Cls Ok Size
HiLim High limit flag DI 0 No
Flag to indicate high
limit has reached
0 - High limit not
reached
1- High limit reached
LoLim Low limit flag DI 0 No
Flag to indicate low
limit has reached
0 - Low limit not
reached
1- Low limit reached
Out Output DF 0 No
Maximum of PID and
RT output and trip
output
PIDOut PID output DF 0 No
Output of PID controller
PVMod PV including process DF 0 No
gain and bias
RTOut Recycle Trip Output DF 0 No
Output of recycle trip
step size
SurgeProx Surge proximity DF 0 No
Proximity to surge is <
1 when not in surge, =1
at surge and >1 when to
the left of the surge line
TripOut Trip output SF 0 No
Trip output is 0 when
trip not tripped and 1
when tripped

Reduced Curve
Parameter Dft Eq Array
Description UOM Dft Val
Name Cls Ok Size
HRDATA Reduced head data KD No NSUR
The user entered surge GE
curve data is used to
calculate the reduced
head for the reduced
curve. This array is the
reduced head
points of the curve.
NSURGE Number of surge curve KI 1 Yes
points
Number of surge curve

Controls 76
Anti-Surge Controller

points included (0,0)


QRS2DATA Reduced flow squared KD 0 Yes NSUR
data GE
The user entered surge
curve data is used to
calculate the reduced
flow squared for the
reduced curve. This
array is the reduced
flow squared points of
the curve.

Tracking
Parameter Dft Eq Array
Description UOM Dft Val
Name Cls Ok Size
TrkFlag_ Flag for manual set DF 0 No
Manset point tracking
TrkFlag_SP Flag for set point DF 0 No
tracking
Trk_Manset Value to track the DF 0 No
manual set point to
Trk_SP Value to track the set DF 0 No
point to

Tracking Values and Flags


Parameter Dft Eq Array
Description UOM Dft Val
Name Cls Ok Size
Trk Track input value DF 0 Yes
The value to which the
output will be set when
in tracking mode.
TrkDisable Track disable KI 0 Yes
Disables any or all
modes of tracking
BIT 1 = Disable Track
(Integer value 1)
BIT 2 = Disable Raise
Inhibit (Integer value 2)
BIT 3 = Disable Lower
Inhibit (Integer value 4)
TrkFlag Track input flag DI 0 Yes
Integer flag used to
determine tracking
mode. This parameter is
an input from the next
block in the control
loop.
BIT 1 = Track TRK
(Integer value 1)

Controls 77
Anti-Surge Controller

BIT 2 = Raise Inhibit


(track if Out >=
Trk)(Integer value 2)
BIT 3 = Lower Inhibit
(track if Out <=
Trk)(Integer value 4)

Legend:

Dfl Cls Default parameter


model: SB - State Boolean DB - Dynamic Boolean
KB - Static Boolean SI - State Integer DI - Dynamic Integer
KI - Static Integer SF - State Float DF - Dynamic Float
KF - Static Float SD - State Double DD - Dynamic Double
KD - Static Double

Dft Val A value here indicates the parameter’s default value. If the parameter is static
and no value is indicated, then the parameter value is optional unless otherwise
specified.
Eq Ok An equation can be attached to the parameter if the corresponding value is Yes.
Arr Siz A value here indicates the size of the array. No value indicates that the
parameter is not a vector.
UOM Internal units of measure

Controls 78
Calc

Calc

Introduction
Calc extends XferAnaBase

The Calc (Calculation) object class allows for the user to introduce any number of custom
calculations in a control system that uses analog tracking.

Fundamentals
The Calc object sets the output parameter, Out, to the result of any set of custom equation
calculation. There must be one equation for the Out parameter. Calc supports an optional input
equations set to perform more complicated calculations with the CalcIn vector parameter. Calc
supports tracking if the user specifies an appropriate custom tracking equation set that provides a
reverse of the input equation set using the Trk_In parameter and the CalcOut parameter vector.
The custom equations are solved in the following order.

1. Solve CalcIn equations


2. Solve Out equation
3. Solve CalcOut equations
4. Solve Trk_In equation

where: CalcIn - Array of input equations


Out - Output
CalcOut - Array of tracking equations
Trk_In - Input tracking

The Calc has an input parameter, In. However, this parameter is not used unless it is part of a
custom Out or CalcIn equation. There is also an input bias, B_In, which also has an effect if it is
used as part of an equation.

The standard analog model tracking scheme will work with the Calc model, however it is the
responsibility of the user to provide the reverse calculation in the Trk_In equation. A negative
value for the K_In parameter is used to determine if the Raise Inhibit and Lower Inhibit flags
should be reversed. The object connected to the In parameter will be tracked if implicit tracking
is used.

Calc is very similar to the MiscEqtn, in the Utilities Library, and Logic model. However, Calc
uses standard analog model conventions such as In and Out parameters and supports tracking,
which makes it suitable for control applications. Please refer to the Dynamic Simulation Suite
User Guide for a summary of DYNSIM equations and functions. Please refer to the MiscEqtn
documentation in the Utilities manual and the Logic documentation in this manual.

Controls 79
Calc

Examples

Example 1

The following example shows a CALC block in a control chain. The CALC block requires the
user to configure its output, the Out parameter. The CALC block does not implement implicit
tracking like other analog control objects and requires the user to configure tracking. The
example shows how to configure the CALC block so that the RLIMIT block upstream will track
it.

CALC: CALC1
Example Calc block with tracking
Parameter Assignment UOM Description
IN RLIMIT1.OUT Input
OUT CALC1.IN Output
TRK_IN CALC1.IN Value to track input to
The IN parameter will track
CALC1.IN

Controls 80
Calc

Data Entry Window Usage


Basic

The Input calculations correspond to the CALCIN parameter. These calculations are to be
performed before the OUT calculations.

The Output calculations correspond to the CALCOUT parameter. These calculations are to be
performed after OUT is calculated but before TRK_IN is calculated.

Controls 81
Calc

Connections

Input
Input parameter reference corresponds to the IN parameter. This should be initialized with the
input parameter.

Input gain corresponds to the K_IN parameter. The default value can be left in place if a gain on
the input value is not required. The input bias is not used in the calc model calculations unless it
is included in the user's custom equations. It is only provided as a convenient parameter for this
purpose.

Input bias corresponds to the B_IN parameter. The default value can be left in place if a bias on
the input value is not required. This value is only used to determine a reversal of a raise inhibit or
lower inhibit signal, therefore the only reasonable settings are 1.0 or -1.0.

Output
High limit of output corresponds to the HI_OUT parameter. The default value can be left in
place if the output should not be limited on the higher end.

Low limit of output corresponds to the LO_OUT parameter. The default value can be left in
place if the output should not be limited on the lower end.

Controls 82
Calc

Parameter Table - Calc


Inputs
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
In Input Yes No DF 0
The Input
parameter is not
used in the Calc
model
calculations
unless it is
included in the
user’s CalcIn or
Out equations.
K_In Input gain Yes No KF 1
This value is only
used to determine
a reversal of a
raise inhibit or
lower inhibit
signal, therefore
the only
reasonable
settings are 1.0 or
-1.0.
B_In Input bias Yes No KF 0
The input bias is
not used in the
Calc model
calculations
unless it is
included in the
user’s CalcIn or
Out equations. It
is only provided
as a convenient
parameter for this
purpose.

Outputs
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
CalcIn Input calculations Yes User No DF
These optional Define
custom equations d
are to be
performed before
the Out is

Controls 83
Calc

calculated.
Out Output Yes No DF 0
User should
provide custom
equation here
CalcOut Output Yes User No DF
calculations Define
These optional d
custom equations
are to be
performed after
the Out is
calculated, but
before Trk_In is
calculated
HiLim Flag to indicate hi No Yes DI 0
limit reached
LoLim Flag to indicate lo No Yes DI 0
limit reached

Tracking
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Trk_In Value to track Yes No DF 0
input
The user may
provide an
optional custom
equation that
represents the inv
of the Out
equation for
tracking
TrkFlag_ Flag for input No No DI 0
In tracking
Trk_ManS Value to track No No DF 0
et manset to
TrkFlag_ Flag for manset No No DI 0
ManSet tracking

Auto, Manual and Override Control


Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
MA Auto/Manual Yes No SI 1
switch
0 = Manual
1 = Auto
SDCS DCS override Yes No SI 0
switch 0 =

Controls 84
Calc

Execute
1 = Override
AutSW Auto override Yes No DI 0
switch
When set to 1,
this value will
force the MA
parameter to 1
ManSW Manual override Yes No DI 0
switch
When set to 1,
this value will
force the MA
parameter to 0

Manual Setpoint
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
ManSet Value to set output Yes No SF 0
when in manual
ManRate Maximum rate to Yes No KF
move output when
in manual
If this parameter is
not initialized, the
output rate of
change will not be
limited

Output Value Limiting


Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Lo_Out Low limit of output Yes No KF
If not specified, the
output will not be
limited by a low
limit
Hi_Out Hi limit of output Yes No KF
If not specified, the
output will not be
limited by a high
limit
AltOut Alternate outputs No No DF
Each element in this
array will be set to
the value of Out,
unless the SDCS
flag is set to 1

Controls 85
Calc

Tracking Values and Flags


Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Trk Track input value Yes No DF 0
The value to which
the output will be
set when in
tracking mode. This
value will be set
automatically by
the next block in
the control loop
when implicit
tracking is
implemented in that
block
TrkFlag Track input flag Yes No DI 0
Integer flag used to
determine tracking
mode. This
parameter is an
input from the next
block in the control
loop. In implicit
tracking operation,
this parameter is
automatically set
by the next block in
the loop.
BIT 1 = Track TRK
(Integer value 1)
BIT 2 = Raise
Inhibit (track if Out
>= Trk)(Integer
value 2)
BIT 3 = Lower
Inhibit (track if Out
<= Trk)(Integer
value 4)
TrkDisable Track disable flag Yes No KI 0
Disables any or all
modes of tracking
BIT 1 = Disable
Track (Integer
value 1)
BIT 2 = Disable
Raise Inhibit
(Integer value 2)
BIT 3 = Disable

Controls 86
Calc

Lower Inhibit
(Integer value 4)
TrkImplicit Track implicit flag Yes No KI 1
When this value is
set to 1, implicit
tracking will be
implemented. To
disable implicit
tracking set the
parameter to 0.

Legend:

Dfl Cls Default parameter model:


KB - Static Boolean SB - State Boolean DB - Dynamic Boolean
KI - Static Integer SI - State Integer DI - Dynamic Integer
KF - Static Float SF - State Float DF - Dynamic Float
KD - Static Double SD - State Double DD - Dynamic Double

Dft Val A value here indicates the parameter’s default value. If the parameter is static and no
value is indicated, then it (parameter value) is optional unless otherwise specified.
Eq Ok An equation can be attached to the parameter if the corresponding value is Yes.
Arr Siz A value here indicates the size of the array. No value indicates that the parameter is
not a vector.
UOM Internal units of measure

FAQ

Q. I need to calculate intermediate values before I calculate Out. How do I do that?

A. Use the CalcIn array to calculate any number of intermediate values prior to calculatin the
Out parameter.

Controls 87
Cntr

Cntr

Introduction
Cntr extends ModelObject

The Cntr (Counter) object class model has count up and count down binary signals, as well as
count up and count down rates (expressed as bits per second). The output of the model has a
gain and bias and is clamped between max and min limits.

The Cntr object can be used to count the occurance of specific events.

Fundamentals

Manual mode allows the user to set any output.

Count = IF (CntDn, (Count - Period ⋅ DnRate ), IF (CntUp, (Count + Period ⋅ UpRate ),Count ) )

where:
CntUp - Count up signal
CntDn - Count down signal
DnRate - Count down rate (1/sec)
UpRate - Count up rate (1/sec)
Count - Internal counter
Period - Integration time step

Note if both CntUp and CntDn are received simultaneously, CntDn takes precedence.
This model is currently defaulted to a signed 12-bit counter, with the counter range given as -
0.05 to +0.07.
  0.12 ⋅ Count   
Out = LIMV  K_Out ⋅  − 0.05  + B_Out  ,Lo_Out,Hi_Out 
  2047   
where:
Out - 12-bit counter output
B_Out - Output bias
Hi_Out - High limit on output
Lo_Out - Low limit on output

Controls 88
Cntr

Examples

Example 1

The following example show a CNTR block. When the START point is true and the RESET
point is false, the counter will count up at the rate of 4 units per second. When the START point
is true and the RESET is true, the counter will count down to zero in one time step.

DYNAMIC_BOOLEAN: START

DYNAMIC_BOOLEAN: RESET

CNTR: CNTR1
Example Counter
Parameter Assignment UOM Description
CNTUP START Count up signal
K_OUT 1 Output gain
UPRATE EQUATION Count up rate
Equation: IF(RESET, -
CNTR1.COUNT/CNTR1.PERIOD,
1/CNTR1.PERIOD)

Controls 89
Cntr

Data Entry Window Usage


Connections Tab

Count Up
Count up signal parameter reference corresponds to the CntUp parameter. This should be a
parameter reference to the parameter providing the count up pulse.

Count up rate corresponds to the UpRate parameter. The count up rate for the signal in bits per
second is specified here.

Count Down
Count down signal parameter reference corresponds to the CntDn parameter. This should be
initialized with the signal input if count down of the binary signal is required.

Count down rate corresponds to the DnRate parameter. The count down rate for the signal in
bits per second is specified here.

Controls 90
Cntr

Output calculations
Output gain corresponds to the K_Out parameter. The default value can be left in place if a gain
on the output value is not required.

Output bias corresponds to the B_Out parameter. The default value can be left in place if a bias
on the output value is not required.

Maximum clamping value corresponds to the Hi_Out parameter. Set the upper limit for the
output value.

Minimum clamping value corresponds to the Lo_Out parameter. Set the lower limit for the
output value.

Controls 91
Cntr

Parameter Table - Cntr


Inputs
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
CntUp Count Up signal Yes No KI 0
CntDn Count Down Yes No KI 0
signal
UpRate Count Up rate 1/sec Yes No KF 0
DnRate Count Down 1/sec Yes No KF 0
rate
K_Out Output Gain Yes No KF 1
B_Out Output Bias Yes No KF 0
Hi_Out Maximum Yes No KF 9999
clamping value
Lo_Out Minimum Yes No KF -9999
clamping value

Outputs
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Out Output No Yes SF 0
Implemented as
a 12-bit counter
that varies from
–0.05 to +0.07

Status
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
MA Auto/Manual Status Yes No SI 1
0 – Manual
1 – Automatic
Count Internal counter No No SF 0
state

Tracking
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Track Track value Yes No KF 0
Trk_Enl Track enable Yes No KI 0

Legend:

Dfl Cls Default parameter model:


KB - Static Boolean SB - State Boolean DB - Dynamic Boolean
KI - Static Integer SI - State Integer DI - Dynamic Integer

Controls 92
Cntr

KF - Static Float SF - State Float DF - Dynamic Float


KD - Static Double SD - State Double DD - Dynamic Double

Dft Val A value here indicates the parameter’s default value. If the parameter is static and no
value is indicated, then it (parameter value) is optional unless otherwise specified.
Eq Ok An equation can be attached to the parameter if the corresponding value is Yes.
Arr Siz A value here indicates the size of the array. No value indicates that the parameter is
not a vector.
UOM Internal units of measure

Controls 93
DSwitch

Dual Input Dual Output Switch (DSwitch)

Introduction
DSwitch extends XferAnaBase

The DSwitch object class allows the value of two analog outputs to be switched between two
analog inputs.

Fundamentals

The Dual Input Dual Output Switch (DSwitch) model allows toggling between two states.
• In the first state (Toggle = 0), the first output follows the first input and the second
output follows the second input.
• In the second state (Toggle = 1), the first output follows the second input and the second
output follows the first input.

To configure the face plate, create a dynamic integer point called OPSCHEME and set value 3.
The dual input/dual output switch will function with only one of the inputs connected.

Out1 = LIMV[ IF[ !Toggle, (K_In1*In1+B_In1), (K_In2*In2+B_In2)], Lo_Out1, Hi_Out1]


Out2 = LIMV[ IF[ Toggle, (K_In1*In1+B_In1), (K_In2*In2+B_In2)], Lo_Out2, Hi_Out2]

where: In1 – First Input


In2 – Second Input
K_In1 – First Input gain
K_In2 – Second Input gain
B_In1 – First Input bias
B_In2 – Second Input bias
Toggle – Switch variable
Hi_Out1 – High Limit of Output 1
Hi_Out2 – High Limit of Output 2
Lo_Out1 – Low Limit of Output 1
Lo_Out2 – Low Limit of Output 2

Note that the parameters KTime1to1, KTime1to2, KTime2to1, and KTime2to2 are under
development and should not be used.

Controls 94
DSwitch

Examples

Example 1

The following example shows a DSWITCH block where combination of input with the output
can be switched by changing the values of Toggle to 1 or 2.

DYNAMIC_FLOAT: SETPOINT1

DYNAMIC_FLOAT: SETPOINT2

DYNAMIC_INT: CHOOSE

DSWITCH: DSWITCH1
Example DSwitch
Parameter Name Assignment UOM Description
IN1 SETPOINT1 Input1
IN2 SETPOINT2 Input2
TOGGLE CHOOSE Toggle

Controls 95
DSwitch

Data Entry Window Usage

There is no data entry window for this object.

Parameter Table - DSwitch


Inputs
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
In1 Input 1 Yes DF 0
K_In1 Input 1 gain Yes KF 1
B_In1 Input 1 bias Yes KF 0
In2 Input 2 Yes KF 0
K_In2 Input 2 gain Yes KF 1
B_In2 Input 2 bias Yes 0
Toggle Toggle Switch Yes SI 0
2 = (State 1) -
Input1 goes to
Output1, Input2
goes to Output2
1 = (State 2) -
Input1 goes to
Output2, Input2
goes to Output1
KTime1to1 Time Constant for Yes KF
xfer from 1 to 1
If this parameter
is not initialized,
then transfer is
instanteous. DO
NOT USE.
KTime1to2 Time Constant for Yes KF
xfer from 1 to 1
If this parameter
is not initialized,
then transfer is
instanteous. DO
NOT USE.
KTime2to1 Time Constant for Yes KF
xfer from 1 to 1
If this parameter
is not initialized,
then transfer is
instanteous. DO
NOT USE.
KTime2to2 Time Constant for Yes KF
xfer from 2 to 1
If this parameter

Controls 96
DSwitch

is not initialized,
then transfer is
instanteous. DO
NOT USE.
State1Text Text of a State1 No
used in faceplate
State2Text Text of a State1 No
used in faceplate

Outputs
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Out1 Output No DF 0
Out2 Output No DF 0
HiLimOut1 Flag to indicate hi No DI 0
limit reached for
OUT1
HiLimOut2 Flag to indicate hi No DI 0
limit reached for
OUT2
LoLimOut1 Flag to indicate lo No DI 0
limit reached for
OUT1
LoLimOut1 Flag to indicate lo No DI 0
limit reached
OUT2
LoLimOut2 Flag to indicate lo No DI 0
limit reached

Internal Use Only


Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Toggle Old Previous Toggle No No SI 0
Switch
Initxfer Value of output at No No SF 0
start of transfer
Timexfer Time since start of No No SF 1.E6
transfer
The output is set
to the selected
input when this
parameter is >=
the time constant
(KTime1 or
KTime2)

Auto, Manual and Override Control


Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val

Controls 97
DSwitch

MA Auto/Manual Yes No SI 1
switch
0 – Manual
1 – Automatic
SDCS DCS override Yes No SI 0
switch
0 – Execute
1 – Override
AutSW Auto override Yes No DI 0
switch
When set to 1, this
value will force the
MA parameter to 1
ManSW Manual override Yes No DI 0
switch
When set to 1, this
value will force the
MA parameter to 0

Manual Setpoint
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
ManSet1 Value to set Yes DF 0
output1 when in
manual
ManSet2 Value to set Yes DF 0
output2 when in
manual
ManRate Maximum rate to Yes KF 0
move output when
in manual
If this parameter is
not initialized, the
output rate of
change will not be
limited

Output Value Limiting


Parameter Description UO Eqt Array Sort Dft Dft
Name M OK Size Out Cls Val
Lo_Out1 Low limit of Yes KF 0
output
If not specified,
the output1 will
not be limited by a
low limit
Lo_Out2 Low limit of Yes KF 0
output

Controls 98
DSwitch

If not specified,
the output2 will
not be limited by a
low limit
Hi_Out1 Hi limit of output Yes KF 0
If not specified,
the output1 will
not be limited by a
high limit
Hi_Out2 Hi limit of output Yes KF 0
If not specified,
the outpu2t will
not be limited by a
high limit
AltOut Alternate outputs No DF
Each element in
this array will be
set to the value of
Out, unless the
SDCS flag is set to
1

Tracking Values and Flags


Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Trk Track input value Yes No DF 0
The value to which
the output will be set
when in tracking
mode. This value will
be set automatically
by the next block in
the control loop when
implicit tracking is
implemented in that
block
TrkFlag Track input flag Yes No DI 0
Integer flag used to
determine tracking
mode. This
parameter is an input
from the next block in
the control loop. In
implicit tracking
operation, this
parameter is
automatically set by
the next block in the
loop.

Controls 99
DSwitch

BIT 1 = Track TRK


(Integer value 1)
BIT 2 = Raise Inhibit
(track if Out >=
Trk)(Integer value 2)
BIT 3 = Lower
Inhibit (track if Out
<= Trk)(Integer
value 4)
TrkDisable Track disable flag Yes No KI 0
Disables any or all
modes of tracking
BIT 1 = Disable
Track (Integer value
1)
BIT 2 = Disable
Raise Inhibit (Integer
value 2)
BIT 3 = Disable
Lower Inhibit
(Integer value 4)
TrkImplicit Track implicit flag Yes No KI 1
When this value is set
to 1, implicit tracking
will be implemented.
To disable implicit
tracking set the
parameter to 0

Legend:

Dfl Cls Default parameter model:


KB - Static Boolean SB - State Boolean DB - Dynamic Boolean
KI - Static Integer SI - State Integer DI - Dynamic Integer
KF - Static Float SF - State Float DF - Dynamic Float
KD - Static Double SD - State Double DD - Dynamic Double

Dft Val A value here indicates the parameter’s default value. If the parameter is static and no
value is indicated, then it (parameter value) is optional unless otherwise specified.
Eq Ok An equation can be attached to the parameter if the corresponding value is Yes.
Arr Siz A value here indicates the size of the array. No value indicates that the parameter is
not a vector.
UOM Internal units of measure

Controls 100
DSwitch

FAQ

Q. Why should I not use the KTime1to1, KTime1to2, KTime2to1, and KTime2to2
parameters?

A. These parameters are not properly implemented and will produce unexpected transient
outputs if initialized.

Q. Why should I not use Altout parameter?

A. This parameter is not implemented.

Controls 101
FctGen

FctGen

Introduction
FctGen extends XferAnaBase

The FctGen (Function Generator) object class sets the output based on a linear interpolation table
lookup function of the gained and biased input. The FctGen model adheres to the standard
Analog model conventions.

Fundamentals
The Out parameter is set based on the following relationship:

Out = CINTRP1( K_In * In + B_In, Table[0])

where: K_In - Input gain


In - Input
B_In - Input bias
Table[0] - First element of table

Please refer to the Dynamic Simulation Suite User Guide on how to configure a standalone static
float vector. The Dynamic Simulation Suite User Guide also defines how to use the CINTRP1
function where the equation utility is defined.

If Table is not specified, FctGen simply solves the following equation

Out = K_In * In + B_In

If the user defined Table allows for exactly one input for each output, a Trk_In value will be
automatically calculated based on Table, otherwise it is required that the user define TrackTable
to determine the value of Trk_In.

Invertable Table
The following table is a good table. It has exactly one input for each output. FctGen will
automatically create a track value by inverting the table.

Non-Invertable Table

Controls 102
FctGen

The following table is a bad table. It has more than one input for each output. FctGen will not
automatically create a track value by inverting the table. The user must define TrackTable in
order to determine the value of Trk_In.

The user must either modify Table or specify theTrackTable, see Example 2.

Example

Example 1

The following example shows an FCTGEN block that models shaft vibration vs shaft speed.

DYNAMIC_FLOAT: SPEED

STATIC_FLOAT: KVIBRATION

Controls 103
FctGen

FCTGEN: FCTGEN1
Example function generator
Parameter Assignment UOM Description
IN SPEED Input
TABLE KVIBRATION[0] Function generator table

Example 2

The following example shows an FCTGEN block downstream of an RLIMIT block. The
function generator uses a table that is not invertable. This example shows how to specify
TrackTable parameter so that internal tracking functions.

STATIC_FLOAT: BAD_TABLE

This table is not invertable because this output has two inputs.

STATIC_FLOAT: INV_TABLE

Controls 104
FctGen

FCTGEN: FCTGEN3
Example function generator with non-invertable Table and with TrackTable
Parameter Assignment UOM Description
IN RLIMIT7.OUT Input
TABLE BAD_TABLE[0] Function generator table
TRACKTABLE INV_TABLE[0] Override inverse tracking table

Bad Example

The following example shows the above example without the TrackTable specified. The
FCTGEN block will not be able to calculate Trk_In parameter. This is the result.

FCTGEN: FCTGEN3
Example function generator with non-invertable Table and without TrackTable
Parameter Assignment UOM Description
IN RLIMIT7.OUT Input
TABLE BAD_TABLE[0] Function generator table
TRACKTABLE Override inverse tracking table

Controls 105
FctGen

Data Entry Window Usage


Basic Tab

Interpolation Data
Table corresponds to the user Table parameter. The default value can be left in place if user
defined Table is not required.

Controls 106
FctGen

Connections Tab

Input
Input parameter reference corresponds to the in parameter. This should be initialized with the
input parameter.

Input gain corresponds to the K_In parameter. The default value can be left in place if a gain on
the input value is not required.

Input bias corresponds to the B_In parameter. The default value can be left in place if a bias on
the input value is not required.

Output
High limit of output corresponds to the Hi_Out parameter. The default value can be left in place
if the output should not be limited on the higher end.

Low limit of output corresponds to the Lo_Out parameter. The default value can be left in place
if the output should not be limited on the lower end.

Controls 107
FctGen

Parameter Table - FctGen


Inputs
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
In Input Yes No DF 0
K_In Input gain Yes No KF 1
B_In Input bias Yes No KF 0
Table Function No No KF 0
generator
Table cintrp1
table of Out as a
function of the
gained and
biased In

Outputs
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Out Output No Yes DF 0
HiLim Flag to indicate No Yes DI 0
hi limit reached
LoLim Flag to indicate No Yes DI 0
lo limit reached

Tracking
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
TrackTable Override inverse No No KF
tracking table
If not defined, the
Trk_In value will
be based on the
reverse solution of
Table if possible
Trk_In Value to track No No DF 0
input
TrkFlag_In Flag for input No No DI 0
tracking
Trk_ Value to track No No DF 0
ManSet manset
TrkFlag_ Flag for manset No No DI 0
ManSet tracking

Auto, Manual and Override Control


Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
MA Auto/Manual Yes No SI 1
switch

Controls 108
FctGen

0 – Manual
1 – Automatic
SDCS DCS override Yes No SI 0
switch
0 – Execute
1 – Override
AutSW Auto override Yes No DI 0
switch
When set to 1, this
value will force
the MA parameter
to 1
ManSW Manual override Yes No DI 0
switch
When set to 1, this
value will force
the MA parameter
to 0

Manual Setpoint
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
ManSet Value to set Yes No SF 0
output when in
manual
ManRate Maximum rate to Yes No KF
move output when
in manual
If this parameter
is not initialized,
the output rate of
change will not be
limited

Output Value Limiting


Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Lo_Out Low limit of Yes No KF
output
If not specified,
the output will not
be limited by a
low limit
Hi_Out Hi limit of output Yes No KF
If not specified,
the output will not
be limited by a
high limit
AltOut Alternate outputs No No DF

Controls 109
FctGen

Each element in
this array will be
set to the value of
Out, unless the
SDCS flag is set to
1

Tracking Values and Flags


Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Trk Track input value Yes No DF 0
The value to
which the output
will be set when in
tracking mode.
This value will be
set automatically
by the next block
in the control loop
when implicit
tracking is
implemented in
that block
TrkFlag Track input flag Yes No DI 0
Integer flag used
to determine
tracking mode.
This parameter is
an input from the
next block in the
control loop. In
implicit tracking
operation, this
parameter is
automatically set
by the next block
in the loop.
BIT 1 = Track
TRK (Integer
value 1)
BIT 2 = Raise
Inhibit (track if
Out >=
Trk)(Integer value
2)
BIT 3 = Lower
Inhibit (track if
Out <=
Trk)(Integer value

Controls 110
FctGen

4)
TrkDisable Track disable flag Yes No KI 0
Disables any or
all modes of
tracking
BIT 1 = Disable
Track (Integer
value 1)
BIT 2 = Disable
Raise Inhibit
(Integer value 2)
BIT 3 = Disable
Lower Inhibit
(Integer value 4)
TrkImplicit Track implicit flag Yes No KI 1
When this value is
set to 1, implicit
tracking will be
implemented. To
disable implicit
tracking set the
parameter to 0

Legend:

Dfl Cls Default parameter model:


KB - Static Boolean SB - State Boolean DB - Dynamic Boolean
KI - Static Integer SI - State Integer DI - Dynamic Integer
KF - Static Float SF - State Float DF - Dynamic Float
KD - Static Double SD - State Double DD - Dynamic Double

Dft Val A value here indicates the parameter’s default value. If the parameter is static and no
value is indicated, then it (parameter value) is optional unless otherwise specified.
Eq Ok An equation can be attached to the parameter if the corresponding value is Yes.
Arr Siz A value here indicates the size of the array. No value indicates that the parameter is
not a vector.
UOM Internal units of measure

Controls 111
FctGen

FAQ

Q. How do I configure the Table parameter?

A. First, create a Static_Float point. To do so


1. Edit the point.
2. Enable the “Function Table” Checkbox.
3. Click the “Add Element” button to add an empty ordered pairs to the table.
4. Enter data and save.
Second, enter the point name in the Table assignment of the FCTGEN. The point name must
be followed by “[0]”. See Examples.

Controls 112
Latch

Latch

Introduction
Latch extends Model Object

The digital Latch object class provides a simple latch algorithm. The Set, Reset, and Out signals
may be inverted. The Latch model adheres to the standard Digital model conventions.

The Latch is a memory device.

Fundamentals

Latch executes the following equation when the SetDom is false (Reset is dominant):

Out = IF( Reset, 0, IF( Set, 1, Out) )

where:
Reset - Reset signal
Set - Set signal
Out - Output

Latch executes the following equation when the SetDom is true (Set is dominant):

Out = IF( Set, 1, IF( Reset, 0, Out) )

Note that if neither Set nor Reset is true, then the value of Out will remain unchanged.

Examples

Example 1

The following example shows a LATCH block that represents a low steam temperature trip
circuit. When the SteamTemp is greater than 775 F, then the trip circuit arms. When either the
Boiler trips or the Turbine trips, then the circuit disarms.

LATCH: LOWTEMPTRIPARMED
Example Latch
Parameter Assignment UOM Description
RESET EQUATION Input RESET signal
Equation: IF(BoilerTrip | TurbineTrip, 1, 0)
SET EQUATION Input SET signal
Equation: IF(SteamTemp > 775, 1, 0)
SET_DOM 0 Priority of Set/Reset

Controls 113
Latch

0 = Reset Priority
1 = Set Priority

Data Entry Window


Connections Tab

The Connections Tab is used for specifying the priority of set or reset signal, input parameters
for set and reset signals.

Priority of Set/Reset
Priority of Set/Reset corresponds to the Set_Dom parameter. If Reset_Priority is selected, then
Reset signal takes priority over Set signal. If Set_Priority is selected, then Set signal takes
priority over Reset signal.

Input
Set signal parameter gain corresponds to the Set parameter. This should be initialized with the
input parameter.

Invert the Set signal corresponds to the Inv_Set parameter. Check the box if the inverse of the
Set signal should be used.

Controls 114
Latch

Set signal parameter gain corresponds to the Set parameter. This should be initialized with the
input parameter.

Invert the Reset signal corresponds to the Inv_Reset parameter. Check the box if the inverse of
the Reset signal should be used.

Invert the output signal


Invert the output signal corresponds to the Inv_Out parameter. Check the box if the inverse of
the output is required.

Parameter Table
Inputs
Paramete Description UOM Eqt Array Sort Dft Dft
r Name OK Size Out Cls Val
Set Input SET signal Yes No KI 0
Inv_Set Invert the input Yes No KI 0
SET signal.
0 – Do not invert
1 – Invert
Reset Input RESET Yes No KI 0
signal
Inv_Reset Invert the input Yes No KI 0
RESET signal.
0 – Do not invert
1 – Invert
Inv_Out Invert the output Yes No KI 0
signal
0 – Do not invert
1 – Invert
Latch Internal latch state No No SI 0
Set_Dom Priority of Yes No KI 0
Set/Reset
0 – Reset priority
1 – Set priority

Outputs
Paramete Description UOM Eqt Array Sort Dft Dft
r Name OK Size Out Cls Val
Out Output signal No Yes SI 0
OutR Output 'Reset' No Yes SI 1
signal (1-Out)
For 2 output
latches only

Status
Paramete Description UO Eqt Array Sort Dft Dft
r Name M OK Size Out Cls Val

Controls 115
Latch

MA Auto/Manual switch Yes No SI 1


0 – Manual
1 – Automatic
SDCS DCS override switch Yes No SI 0
0 – Execute
1 – Override

Legend:

Dfl Cls Default parameter model:


KB - Static Boolean SB - State Boolean DB - Dynamic Boolean
KI - Static Integer SI - State Integer DI - Dynamic Integer
KF - Static Float SF - State Float DF - Dynamic Float
KD - Static Double SD - State Double DD - Dynamic Double

Dft Val A value here indicates the parameter’s default value. If the parameter is static and no
value is indicated, then it (parameter value) is optional unless otherwise specified.
Eq Ok An equation can be attached to the parameter if the corresponding value is Yes.
Arr Siz A value here indicates the size of the array. No value indicates that the parameter is
not a vector.
UOM Internal units of measure

FAQ

Q. How do I invert the output?

A. There are two methods. First, use the OutR parameter (which is already the invert of Out).
Second, use the Inv_Out parameter. Set this parameter true to invert Out parameter.

Controls 116
LeadLag

LeadLag

Introduction
LeadLag extends XferAnaBase

The LeadLag object class provides lead and lag influence on an analog input. The LeadLag
object class adheres to the standard Analog model conventions.

This block is generally used to represent the actual time delay behavior of a parameter. Like the
external metal temperature with respect to core temperature.

Fundamentals
The LeadLag algorithm can be summarized by the following equations:

d
Integral =
(K_In ⋅ In + B_In ) − Out
dt KLag

 
⋅ (K_In ⋅ In + B_In ),Lo_Out,Hi_Out 
KLead
Out = LIMV  Integral +
 KLag 
where: K_In – Input gain
B_In – Input bias
KLag – Lag constant
KLead – Lead constant
Lo_Out – Low limit of output
Hi_Out – High limit of output
Out – Output
Integral – Internal integral

Lag
If KLead is set to 0, the algorithm reduces to a first order lag. If KLead is set to a value of 1 or
greater, then it will accelerate the first order lag.

Lead
If the KLag parameter is not defined, then the output is the gained and biased input multiplied by
the value of KLead.

Examples

Example 1

The following example shows the LeadLag object configured as a Lag. The LeadLag object
models a metal temp in contact with a hot fluid.

Controls 117
LeadLag

NSHEADER: HOTHDR

LEADLAG: METALTEMP
Example LeadLag block modeling metal temp
Parameter Assignment UOM Description
IN HOTHDR.T Input
KLAG 300 sec Lag Constant

Example 2

The following example shows the LeadLag object configured with both Lead and Lag. The
larger the value of KLead, the more rapidly the output follows the input.

DYNAMIC_FLOAT: INPUT

LEADLAG: LEADLAG1
Example LeadLag block modeling metal temp
Parameter Assignment UOM Description
IN INPUT Input
KLAG 10 sec Lag Constant
KLEAD 1 Lead Constant

LEADLAG: LEADLAG2
Example LeadLag block modeling metal temp

Controls 118
LeadLag

Parameter Assignment UOM Description


IN INPUT Input
KLAG 10 sec Lag Constant
KLEAD 5 Lead Constant

Data Entry Window Usage


Basic Tab

Configuration and Tuning


Lead constant corresponds to KLead parameter. If the default value, 0, is used, the algorithm
reduces to a first order lag.

Lag constant corresponds to KLag parameter. If KLag is not initialized, the gained and biased
input is multiplied by KLead.

Controls 119
LeadLag

Connections Tab

Input
Input parameter reference corresponds to the In parameter. This should be initialized with the
signal input parameter.

Input gain corresponds to the K_In parameter. The default value can be left in place if a gain on
the input value is not required.

Input bias corresponds to the B_In parameter. The default value can be left in place if a bias on
the input value is not required.

Output calculations
High limit of output corresponds to the Hi_Out parameter. Set the upper limit for the output
value, if the upper limit should be limited.

Low limit of output corresponds to the Lo_Out parameter. Set the lower limit for the output
value, if the lower limit should be limited.

Controls 120
LeadLag

Parameter Table - LeadLag


Configuration and Tuning
Paramete Description UOM Eqt Array Sort Dft Dft
r Name OK Size Out Cls Val
KLead Lead constant Yes No KF 0
KLag Lag constant Sec Yes No KF

Inputs
Paramete Description UOM Eqt Array Sort Dft Dft
r Name OK Size Out Cls Val
In Input Yes No DF 0
K_In Input gain Yes No KF 1
B_In Input bias Yes No KF 0

Outputs
Paramete Description UOM Eqt Array Sort Dft Dft
r Name OK Size Out Cls Val
Out Output No Yes DF 0
HiLim Flag to indicate hi No Yes DI 0
limit reached
LoLim Flag to indicate lo No Yes DI 0
limit reached

Tracking
Paramete Description UOM Eqt Array Sort Dft Dft
r Name OK Size Out Cls Val
Trk_In Value to track No No DF 0
input
TrkFlag_ Flag for input No No DI 0
In tracking
Trk_ Value to track No No DF 0
ManSet manset
TrkFlag_ Flag for manset No No DI 0
ManSet tracking

Internal Use Only


Paramete Description UOM Eqt Array Sort Dft Dft
r Name OK Size Out Cls Val
Integral Saved integral value No No SF 0
dIntegral Derivative of No Yes DF 0
integral value

Controls 121
LeadLag

Auto, Manual and Override Control


Paramete Description UOM Eqt Array Sort Dft Dft
r Name OK Size Out Cls Val
MA Auto/Manual Yes No SI 1
switch
0 = Manual
1 = Auto
SDCS DCS override Yes No SI 0
switch
0 = Execute
1 = Override
AutSW Auto override Yes No DI 0
switch
When set to 1, this
value will force
the
MA parameter to
1
ManSW Manual override Yes No DI 0
switch
When set to 1, this
value will force
the
MA parameter to
0

Manual Setpoint
Paramete Description UOM Eqt Array Sort Dft Dft
r Name OK Size Out Cls Val
ManSet Value to set Yes No SF 0
output when in
manual
ManRate Maximum rate to Yes No KF
move output when
in manual
If this parameter
is not initialized,
the output rate of
change will not be
limited

Output Value Limiting


Paramete Description UOM Eqt Array Sort Dft Dft
r Name OK Size Out Cls Val
Lo_Out Low limit of Yes No KF
output
If not specified, the
output will not be
limited by a low

Controls 122
LeadLag

limit
Hi_Out Hi limit of output Yes No KF
If not specified, the
output will not be
limited by a high
limit
AltOut Alternate outputs No No DF
Each element in
this array will be
set to the value of
Out, unless the
SDCS flag is set to
1

Tracking Values and Flags


Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Trk Track input value Yes No DF 0
The value to which
the output will be
set when in
tracking mode. This
value will be set
automatically by
the next block in the
control loop when
implicit tracking is
implemented in that
block
TrkFlag Track input flag Yes No DI 0
Integer flag used to
determine tracking
mode.
This parameter is
an input from the
next block in the
control loop. In
implicit tracking
operation, this
parameter is
automatically set by
the next block in the
loop.
BIT 1 = Track TRK
(Integer value 1)
BIT 2 = Raise
Inhibit (track if Out
>= Trk)(Integer
value 2)

Controls 123
LeadLag

BIT 3 = Lower
Inhibit (track if Out
<= Trk)(Integer
value 4)
TrkDisable Track disable flag Yes No KI 0
Disables any or all
modes of tracking
BIT 1 = Disable
Track (Integer
value 1)
BIT 2 = Disable
Raise Inhibit
(Integer value 2)
BIT 3 = Disable
Lower Inhibit
(Integer value 4)
TrkImplicit Track implicit flag Yes No KI 1
When this value is
set to 1, implicit
tracking will be
implemented. To
disable implicit
tracking set the
parameter to 0

Legend:

Dfl Cls Default parameter model:


KB - Static Boolean SB - State Boolean DB - Dynamic Boolean
KI - Static Integer SI - State Integer DI - Dynamic Integer
KF - Static Float SF - State Float DF - Dynamic Float
KD - Static Double SD - State Double DD - Dynamic Double

Dft Val A value here indicates the parameter’s default value. If the parameter is static and no
value is indicated, then it (parameter value) is optional unless otherwise specified.
Eq Ok An equation can be attached to the parameter if the corresponding value is Yes.
Arr Siz A value here indicates the size of the array. No value indicates that the parameter is
not a vector.
UOM Internal units of measure

Controls 124
Logic

Logic

Introduction
Logic extends ModelObject

The Logic object class provides an array of custom equations intended for use in solving digital
logic. This model combined with the capability of the equation solver provides a more efficient
means of performing digital logic than the use of individual AND / OR objects.

Fundamentals
Logic is very similar to the MiscEqtn and Calc models. The difference between Logic and
MiscEqtn is that the Logic output is a vector of integers while MiscEqtn’s output is a vector of
floats. Calc can be used for analog calculations and provides a method to perform custom
tracking calculations. Please refer to the Utilities manual for more information on the MiscEqtn
model, and the Calc model in this document for more information on the Calc model.

Please see the Dynamic Simulation Suite User Guide for a list of supported equation operations.

Examples

Example 1

The following example shows a LOGIC block that performs the following calculation:

LOGIC: EXAMPLE
Example logic block
Parameter Assignment UOM Description
OUT[0] EQUATION
Equation: (B2.OUT & !B3.OUT)

Controls 125
Logic

OUT[1] EQUATION Start signal


Equation: (B1.OUT & !EXAMPLE.OUT[0])
OUT[2] EQUATION Stop signal
Equation: (EXAMPLE.OUT[0] |
ANOTHERBLOCK.OUT)

Example2

The following example illustrates the difference in output between a LOGIC block and a
MISCEQTN block, given the same input:

LOGIC: LOGIC1
Parameter Assignment UOM Description
OUT[0] EQUATION
Equation: 1.1

MISCEQTN: MISCEQTN1
Parameter Assignment UOM Description
OUT[0] EQUATION
Equation: 1.1

Controls 126
Logic

Data Entry Window Usage


Basic Tab

An Equation is attached to the OUT vector. This field only accepts equations. The result of the
equation will be assigned to the OUT vector. The result of the equation must be either 0 (false)
or 1 (true). This field is required.

Parameter Assignment is attached to the OUT vector. This is an optional entry. The results of
the equation will also be assigned to any other model parameter or standalone point specified
here.

Parameter Table - Logic


Outputs
Parameter Description UO Eqt Array Sort Pnt Pnt
Name M OK Size Out Dft Dft
Cls Val
Out Parameter by which to Yes No DI
attach equation

Legend:

Dfl Cls Default parameter model:


KB - Static Boolean SB - State Boolean DB - Dynamic Boolean
KI - Static Integer SI - State Integer DI - Dynamic Integer
KF - Static Float SF - State Float DF - Dynamic Float
KD - Static Double SD - State Double DD - Dynamic Double

Dft Val A value here indicates the parameter’s default value. If the parameter is static and no
value is indicated, then it (parameter value) is optional unless otherwise specified.

Controls 127
Logic

Eq Ok An equation can be attached to the parameter if the corresponding value is Yes.


Arr Siz A value here indicates the size of the array. No value indicates that the parameter is
not a vector.
UOM Internal units of measure

FAQ

Q. Can I use Logic block instead of MiscEqtn block?

A: No. Although input equations may be the same for both Logic and MiscEqtn blocks, the
outputs of the Logic block are integers and the outputs of the MiscEqtn block are floats.

Controls 128
Master

Master

Introduction
Master extends ModelObject

The Master (controller for multiple outputs) objects sets any number of outputs values of the
gained and biased input. The Master model adheres to the standard Analog model conventions.

Common applications include:


• Splitting fuel demand among multiple pulverizer controllers
• Splitting air demand among multiple fan controllers
• Splitting water demand among multiple pump controllers

Fundamentals
All outputs are set to the gained and biased input, if in auto, and not tracking. If some, but not
all, outputs are in manual or tracking, then the remaining outputs will be set such that the average
of all the outputs is equal to the gained and biased input. If all outputs are in manual or tracking,
the input will be tracked to the average of all outputs.

Auto Manual Auto

∑ Out = {(K_In ⋅ In + B_In) ⋅ NOut − ∑ Out − ∑ B _ Out} / NAuto

where: In – Input
K_in – Input gain
B_In – Input bias
Out – Output array
NOut – Number of outputs
B_Out – Output bias
NAuto – Number of outputs in auto

Examples

Example 1

The following example shows an MASTER block as part of a fuel control system. The master
signal splits the FUELMSTR demand between four pulverizers. Each pulverizer is represented
by a SUM block. The SUM block functions as an M/A station and allows for biasing. As can be
seen in the diagram below, two pulv M/A stations are in manual and the user has set their outputs
to 0.2 and 0.3 respectively. The MASTER block has adjusted the outputs to the two pulv M/A
stations in auto so that the average of all outputs equals the input.

Controls 129
Master

PID: FUELMSTR

MASTER: MASTER1
Example MASTER block supplying four SUM blocks
Parameter Assignment UOM Description
MA 4 size Auto/Manual switch
MA[0] PULV1.MA
MA[1] PULV2.MA
MA[2] PULV3.MA
MA[3] PULV4.MA
NOUT 4 Number of outputs
IN FUELMSTR.OUT Input
MANSET 3 size Value to set output when in manual
MANSET[0] PULV1.MANSET
MANSET[1] PULV2.MANSET
MANSET[2] PULV3.MANSET
MANSET[3] PULV4.MANSET

SUM: PULV1
Example SUM block acting as a M/A station (similar for PULV2, PULV3, PULV4)
Parameter Assignment UOM Description
IN 1 size Input
IN[0] MASTER1.OUT[0]
HI_OUT 1.0 Output high limit
LO_OUT 0.0 Output low limit
TRKDISABLE 1 Track disable flag
1 = Disable tracking
TRKIMPLICIT 0 Track implicit flag
0 = Disable implicit tracking
Note that for the other SUM blocks:
PULV2.IN[0] = MASTER1.OUT[1]
PULV3.IN[0] = MASTER1.OUT[2]
PULV4.IN[0] = MASTER1.OUT[3]

MISCEQTN: MSTR_AVG

Controls 130
Master

Example MISCEQTN block calculates the average of the MASTER1 outputs


Parameter Assignment UOM Description
OUT 1 size Calculated output
OUT[0] EQUATION Equation: (MASTER1.OUT[0] +
MASTER1.OUT[1] + MASTER1.OUT[2] +
MASTER1.OUT[3])/4

Data Entry Window Usage


Connections Tab

Input
Input parameter reference corresponds to the In parameter. The input value is specified here.

Input gain corresponds to the K_In parameter. The default value can be left in place if a gain on
the input value is not required.

Input bias corresponds to the B_In parameter. The default value can be left in place if a bias on
the input value is not required.

Output
Number of outputs entry corresponds to the NOut parameter. Specify the total number of
outputs.

Controls 131
Master

Outputs Tab

Outputs

Output bias corresponds to the B_Out parameter.

Output high limit corresponds to the Hi_Out parameter.

Output low limit corresponds to the Lo_Out parameter.

Parameter Table - Master


Configuration and Status
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
NOut Number of outputs No No KI 0
MA Auto/Manual Yes NOut No SI 1
switch
0 – Manual
1 – Automatic
SDCS DCS override Yes NOut No SI 0
switch
0 – Execute
1 – Override
AutSW Auto override Yes NOut No DI 0
switch
ManSW Manual override Yes NOut No DI 0

Controls 132
Master

switch
LastDcs DCS override No NOut SI 0
switch last value

Inputs
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
In Input Yes No DF 0
K_In Input gain Yes No KF 1
B_In Input bias Yes No KF 0
B_Out Bias on Output Yes NOut No KF 0
Lo_Out Low limit of Yes NOut No KF 0
output
Hi_Out Hi limit of output Yes NOut No KF 1
ManSet Value to set Yes NOut No DF 0
output when in
manual
ManRate Maximum rate to Yes No KF
move output when
in manual
BalRate Output balancing Yes No KF 0.1
rate
Specifies the rate
at which outputs
will balance
against each
other, but does not
rate limit the
average of all
outputs

Outputs
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Out Output No NOut Yes DF 0
PrevOut Previous output No NOut DF 0
HiLim Flag to indicate hi No NOut Yes DI 0
limit reached
LoLim Flag to indicate lo No NOut Yes DI 0
limit reached

Tracking
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Trk Track input value Yes NOut No DF 0
TrkFlag Track input flag Yes NOut No DI 0
TrkDisable Track disable flag Yes No KI 0
TrkImplicit Track implicit flag Yes No KI 1

Controls 133
Master

Trk_In Value to track No No DF 0


input to
This is set
internally.
TrkFlag_In Flag for input No No DI 0
tracking
Trk_ Value to track No NOut No DF 0
ManSet manset to
This is set
internally.
TrkFlag_ Flag for manset No NOut No DI 0
ManSet tracking

Legend:

Dfl Cls Default parameter model:


KB - Static Boolean SB - State Boolean DB - Dynamic Boolean
KI - Static Integer SI - State Integer DI - Dynamic Integer
KF - Static Float SF - State Float DF - Dynamic Float
KD - Static Double SD - State Double DD - Dynamic Double

Dft Val A value here indicates the parameter’s default value. If the parameter is static and no
value is indicated, then it (parameter value) is optional unless otherwise specified.
Eq Ok An equation can be attached to the parameter if the corresponding value is Yes.
Arr Siz A value here indicates the size of the array. No value indicates that the parameter is
not a vector.
UOM Internal units of measure

Controls 134
Or

Or

Introduction
OR extends ModelObject

The digital OR object class sets the digital output to be set true if any digital inputs are true.
Inversion of the output or any input is allowed. The OR model adheres to the standard Digital
model conventions.

Fundamentals

The OR algorithm can be represented with the following equation:

 Inputs 
Out = (1 − Inv _ Out ) * LIM 01 ∑ (1 − Inv_Inp[i ]) ⋅ Inp[i ]
 i =0 

where:
Inp – Input array
Inv_Inp – Inverse Input array
Out – Output before Inv_Out is applied
Inv_Out – Invert the output flag

All inputs, as well as the output may be inverted using Inv_Inp or Inv_Out. Any inverting of
inputs will be performed before the Or algorithm is performed, and inverting of the output will
be performed after the Or algorithm is performed. An inversion means that the value will be
treated as 0 if it is 1, or 1 if it is 0. By setting Inv_Inp or Inv_Out to 0, no inversion will be
performed, by setting Inv_Inp or Inv_Out to 1, an inversion will be performed on the appropriate
parameter.

Inverting the Input


Using Inv_Inp any input can be inverted. Any inversion of input will be performed before the
OR algorithm is performed. An inversion means that the value will be treated as 0 if it is 1 or 1
if it is 0.

Inverting the Output


Using Inv_Out, any output can be inverted. Any inversion of the output will be performed after
the OR algorithm is performed. An inversion means that the value will be treated as 0 if it is 1 or
1 if it is 0. By setting Inv_Out to 0, no inversion will be performed, by setting Inv_Out to 1, an
inversion will be performed on the Out parameter.

Controls 135
Or

Examples

The following example shows an OR block with three input signal. The third input signal is
inverted.

DYNAMIC_FLOAT: Signal1

DYNAMIC_BOOLEAN: Signal2

DYNAMIC_INT: Signal3

OR: OR1
Example OR block with three inputs, one inverted
Parameter Assignment UOM Description
INP 3 size Array of inputs
INP[0] Signal1
INP[1] Signal2
INP[2] Signal3
INV_INP 3 size Array of invert inputs
INP[0]
INP[1]
INP[2] 1 this input is inverted

Example1 Alternate

The following example shows an alternate method to specify and OR block with three input
signal. The third input signal is inverted.

OR: OR1
Example OR block with three inputs, one inverted
Parameter Assignment UOM Description
INP 3 size Array of inputs
INP[0] Signal1
INP[1] Signal2
INP[2] EQUATION Equation: !Signal3

Controls 136
Or

Data Entry Window Usage

Connections Tab

Inputs
Inputs correspond to the Inp parameter. The number of inputs whose digital inputs should be
used directly by the object is specified here.

Invert Signal corresponds to the Inv_Inp parameter. The number of inputs whose digital inputs
should be inverted and used by the object is specified here.

Invert the Output Signal corresponds to the Inv_Out parameter. If the inverse of the digital
output is required, this field is used.

Parameter Table – Or
Inputs
Paramete Description UOM Eqt Array Sort Dft Dft
r Name OK Size Out Cls Val
Inp Array of inputs Yes User No KI 0
defined
Inv_Inp Array of invert Yes Inp No KI 0
inputs
If this parameter is
1, the

Controls 137
Or

corresponding
Input will be
reversed
Inv_Out Invert output flag Yes No KI 0

Outputs
Paramete Description UOM Eqt Array Sort Dft Dft
r Name OK Size Out Cls Val
Out Output No Yes DI 0

Status
Paramete Description UOM Eqt Array Sort Dft Dft
r Name OK Size Out Cls Val
MA Auto/Manual Yes No SI 1
switch
0 – Manual
1 – Automatic
SDCS DCS override Yes No SI 0
switch
0 – Execute
1 – Override

Legend:
Dfl Cls Default parameter model:
KB - Static Boolean SB - State Boolean DB - Dynamic Boolean
KI - Static Integer SI - State Integer DI - Dynamic Integer
KF - Static Float SF - State Float DF - Dynamic Float
KD - Static Double SD - State Double DD - Dynamic Double

Dft Val A value here indicates the parameter’s default value. If the parameter is static and no
value is indicated, then it (parameter value) is optional unless otherwise specified.
Eq Ok An equation can be attached to the parameter if the corresponding value is Yes.
Arr Siz A value here indicates the size of the array. No value indicates that the parameter is
not a vector.
UOM Internal units of measure

Controls 138
Or

FAQ

Q. How do I invert an input?

A. Use the Inv_Inp parameter. Set this parameter true to invert the associated Inp parameter. If
Inv_Inp[2] is true then the value of Inp[2] is inverted before the value of Out is calculated.

Q. How do I invert the output?

A. Use the Inv_Out parameter. When this parameter is true, the internally calculated value is
inverted before it is assigned to the Out parameter.

Controls 139
PID

PID

Introduction
PID extends XferAnaBase

The PID (Proportional-Integral-Derivative) object class provides Proportional and/or Integral


and/or Derivative control. The user may choose any combination of PID by initializing the
appropriate controller gains. The PID model adheres to the standard Analog model conventions.

Fundamentals

PID Algorithm

The PID model is very flexible and supports most of the theoretical algorithms found in the
literature. User can configure any vendor specific algorithm by selecting right values for
appropriate parameters.

Types of PID Algorithm


The PID model supports four types of algorithm:
1. Legacy
2. Ideal
3. Series
4. Parallel

Legacy
This is the legacy controller algorithm in DYNSIM. Please see Calculation for Default type of
PID algorithm to know more about this type.

Ideal
de(t ) 1 de(t )
Out = Kp[e(t ) + Ki ∫ e(t )dt +Td ] (Or) Out = Kp[e(t ) + ∫ e(t )dt +Td ]
dt Ti dt

Series (also called Interactive controller)


d 1 d
Out = Kp[e(t ) + Ki ∫ e(t )dt ][1 +Td ] (Or) Out = Kp[e(t ) + ∫ e(t )dt ][1 +Td ]
dt Ti dt

Parallel (also called Non-interactive controller)


de(t ) 1 de(t )
Out = Kp ∗ e(t ) + Ki ∫ e(t )dt +Td (Or) Out = Kp ∗ e(t ) + ∫ e(t )dt +Td
dt Ti dt

Tuning parameters for above algorithms:

PID type Proportional Integral Derivative


Legacy Kp Ki Kd and Td
Ideal, Series or Kp or PB Ki or Ti Td

Controls 140
PID

Parallel

Proportional band can be expressed in terms of Kp as follows:

100%
PB =
Kp

Forms of PID algorithm

The PID algorithms except for Legacy can be implemented either in Position or Velocity forms:

1. Position Form
The position form of the PID algorithm calculates the full value of the output every
calculation cycle and adds that to the value of the output when the controller was turned on.
For example, the position form for an Ideal PID algorithm will look like this:
1 de(t )
c(t ) = c(0) + Kp[e(t ) +
Ti ∫ e(t )dt +Td
dt
]

2. Velocity Form
The velocity form of the PID algorithm calculates the change required to the current
controller output and adds that to the current output to calculate a new value of the output.
For example, the velocity form for an Ideal PID algorithm will look like this:

c(t ) = c(t − ∆t ) + ∆c(t )


 ∆t  e(t ) − 2e(t − ∆t ) + e(t − 2∆t )  
∆c(t ) = Kp e(t ) − e(t − ∆t ) + e(t ) + Td   
 Ti  ∆t 

Error calculation

The proportional and derivative parts of PID algorithm except for Legacy can be calculated in
one of the following two ways:

1. Calculation based on Error from Set Point (PV and SP)


The error is calculated as the deviation of the process variable from the set point:

Error =
(SP ∗ K _ SP + B _ SP ) − (PV ∗ K _ PV + B _ PV )
Hi _ In − Lo _ In

2. Calculation based on PV (PV Only)


The Proportional and Derivative terms often result in a kick in the controller output during
set point change if Error from Set Point is used for calculation. To avoid this alternate
approach is used where the difference in the process variable from the current and the last
sampling time is taken (PrevPV-PV).

Controls 141
PID

Error = (PrevPV – PV) / (Hi_In – Lo_In)

Calculation Sequence

After calculation of the equivalent tuning constants for each action and the error terms, the PID
algorithm follows one of the following three calculation paths based on the type and form of the
PID algorithm selected:

Calculation for Default (Legacy) type of PID Algorithm

Error = Action ∗
(SP ∗ K _ SP + B _ SP) − ( PV ∗ K _ PV + B _ PV )
Hi _ In − Lo _ In

Proportional = Kp * Error

d
Integral = Kp ∗ Ki ∗ Error
dt

d ( PV ∗ K _ PV + B _ PV ) − Deriv
Deriv =
dt Td
Period +
Kd

Derivative = Kp ∗ Kd ∗ (( PV ∗ K _ PV + B _ PV ) − Deriv)

Out = Proportional + Integral + Derivative + B_Out

Out = LIMV(Out, Lo_Out, Hi_Out)

Calculation for position form (Parallel algorithm)

( SP ∗ K _ SP + B _ SP) − ( PV ∗ K _ PV + B _ PV )
Error =
Hi _ In − Lo _ In

Proportional = Kp * Error (if Error basd on PV & SP)

Proportional = Kp * K_PV * (PrevPV – PV)


(Hi_In – Lo_In) (if Error basd on PV only)

d
Integral = Ki ∗ Error
dt

Derivative = Td * (Error – PrevError)

Controls 142
PID

Period (if Error based on PV & SP)

Derivative = Td * K_PV * (PrevPV – PV)


(Hi_In – Lo_In)*Period (if Error based on PV only)

Out = Action*(Proportional + Integral + Derivative) + B_Out

Out = LIMV(Out, Lo_Out, Hi_Out)

Calculation for velocity form (Parallel algorithm)

( SP ∗ K _ SP + B _ SP) − ( PV ∗ K _ PV + B _ PV )
Error =
Hi _ In − Lo _ In

Proportional = Kp * (Error – PrevError1) (if Error basd on PV & SP)

Proportional = Kp * K_PV * (PrevPV – PV)


(Hi_In – Lo_In) (if Error basd on PV only)

Integral = Ki * Period * Error

Derivative = Td*(Error – 2*PrevError1 + PrevError2)


Period (if Error based on PV & SP)

Derivative = -Td*K_PV*(PV – 2*PrevPV1 + PrevPV2)


(Hi_In – Lo_In) * Period (if Error based on PV only)

Out = PrevOut + Action*(Proportional + Integral + Derivative) + B_Out

Out = LIMV(Out, Lo_Out, Hi_Out)

where: Action = Action of PID controller


B_Out = Output bias (in units of PV)
B_PV = Process variable bias (in units of PV)
B_SP = Set point bias (in units of PV)
Hi_In = High limit on input (in units of PV)
Hi_Out = High limit on output (in units of PV)
K_PV = Process variable gain
K_SP = Set point gain
Kd = Derivative gain
Ki = Integral gain or Integral reset rate(1/sec)
Kp = Proportional gain
Lo_Out = Low limit on output
Lo_In = Low limit on input
Period = Integration time step (sec)

Controls 143
PID

PV = Process variable (in units of parameter reference)


SP = Set point (in units of PV)
Td = Derivative time (sec)
Ti = Integral reset time (sec)
Deriv = Internal value
Error = Internal value
PrevError1 = Error from the previous time step
PrevError2 = Error from two time step back
PrevPV1 = PV from the previous time step
PrevPV2 = PV from two time step back
PrevOut = Output without bias from previous time step

Controller Modes

The PID model provides three different modes for control, they are Auto, Manual and DCS
override. The figure below shows the operate panel for PID controller with different PID modes.

Auto Mode

In the Auto mode, the PID algorithm sets the output based on the equations defined in the PID
Algorithm section. The user can select either Local or Remote for set point. If Local is chosen,
then set point can be set locally in the controller. If Remote is chosen, the set point can be set by
the remote controller or by any other model in the Controls library provided there is a remote
connection defined.

When the controller is in auto with remote set point then set point will be calculated as follows:

Controls 144
PID

SP = Lo_In + Master_Out * (Hi_In – Lo_In) (if Hi_In & Lo_In defined)

SP = Master_Out (if Hi_In & Lo_In defined)

where:
SP - Set point (in units of PV)
Hi_In - High limit on input (in units of PV)
Lo_In - Low limit on input (in units of PV)
Master_Out - Output of master controller

Manual Mode
In Manual mode, the user sets the PID output by adjusting the manual output slider.

DCS Override Mode

In DCS override mode, the PID output will be set to DCS output. The DCS control can be
implemented by cross-referencing of parameters. For details on cross-referencing refer to Users
Guide.

Tracking

If there is a cascade connection defined between two PID controllers then there is an implicit
tracking when the slave controller is in either auto with local set point or manual mode. Tracking
helps in bump less transfer while switching from one mode to another mode.

Slave in auto with local set-point mode


In this mode, the output of master controller will track set-point of the slave controller. The set
point of the master controller will track its process variable when SPTrkFlag is set to true.

Slave in manual mode


In this mode, the set point of slave controller will track its process variable when SPTrkFlag is
set to true. The output of master controller in turn tracks the set point of the slave controller. The
set point of master controller will track its process variable when SPTrkFlag is set to true.

Examples

Example 1
The following example shows the configuration of a flow controller using models from the Base
Equipment Library. Saturated steam at 300 kPa pressure is fed to a unit at 100 kPa. It is desired
to maintain the flow at 5 kg/sec using a flow controller.

Controls 145
PID

The variable being controlled is the mass flow, so the PID Type selected is "Mass flow rate".
The valve exit stream mass flow (S2.W) is referenced to the PV of the controller by using a
connector. Flow controllers are usually fast acting.

The flow controllers are reverse acting, so the action is set to SP-PV. The controller should be
set in AUTO mode for control action to take place. The maximum instrument range which
transmits the process variable to PID is 0 to 10 kg/sec. Hence these values are set using the low
(Lo_In) and high (Hi_In) input ranges. The output of the PID goes to the valve actuator, so the
(PID1.Out) output parameter is referenced to the vale open command (Op).

In this example, we desired faster performance than the default flow controller tuning constants
such that the set point will be reached in 30 sec and overshoot will be less than 20% for unit step
change. The proportional gain (Kp) and integral gain (Ki) are set to a value of 0.5. Since the
desired flow is 5 kg/sec, the set point is set at this value in the PID operating panel.

SOURCE: SRC1
Parameter Assignment UOM Description
OProdStream[0] S1 Source product stream to the valve XV1
Mb[H20] 1 kg-mol Boundary composition
Spec PVF Boundary condition specification
Pb 300 kPa Boundary pressure
VFb 1 fraction Boundary vapor fraction

VALVE: XV1
Parameter Assignment UOM Description
OFeedStream S1 Valve feed stream from source SRC1
OProdStream S2 Valve product stream to sink SNK1
Cv 99.014364 Cv Valve Cv
Op FC1.OUT fraction Flow controller output connecting to
valve open parameter
FlashFlag 1 Flag to calculate exit stream properties

PID: FC1
Example PID as flow controller
Parameter Assignment UOM Description

Controls 146
PID

Stream S2 mass rate assigned to PV of


PV S2.W kg/sec
PID controller
SP 5 kg/sec Set point of the flow controller
Kp 0.5 Controller proportional gain
Ki 0.5 Controller integral gain
Hi_In 10 kg/sec High limit on controller input
Lo_In 0 kg/sec Low limit on controller input
Hi_Out 1 fraction High limit on controller output
Lo_Out 0 fraction Low limit on controller output

SINK: SNK1
Parameter Assignment UOM Description
OFeedStream[0] S2 Sink feed stream from valve XV1
Pb 100 kPa Boundary pressure

Example 2

The following example shows the configuration of a Cascade controller used to control the
reboiler temperature of a column. (Please refer to the G2_Deethanizer example in the
Application Briefs manual for more process details). The following figure shows the bottom
section of the G2 Deethanizer Column (C101). The reboiler temperature (D102.FLASH.T) is
controlled by manipulating the steam flow rate (S12.W).

In this example, we implemented a cascade controller configuration to allow local flow control
of the steam to the Utility Exchanger (E102). Reboiler temperature controller (TC101) is the
master (remote) controller and steam flow controller (FC102) is the slave (local) controller. The
master controller provides the remote set point (FC102.RSP = TC101.Out) to the slave
controller. The remote set point (FC102.RSP) is referenced to reboiler temperature controller
output (TC101.Out) via the connector. The instrument range (Lo_In and Hi_In) for the primary
controller (FC102) is set as 0.0 kg/sec and 2.0 kg/sec respectively. The output (TC101.Out) from
the primary controller is limited between 0 (Lo_Out) and 1 (Hi_Out).

Controls 147
PID

PID: FC102
Example PID as flow controller
Parameter Assignment UOM Description
ACTION SP_PV Controller action
ALGTYPE PARALLEL Type of PID algorithm
HI_IN 2.0 kg/sec High limit on input
KI 0.01 1/sec Integral gain
KP 0.1 Proportional gain
LO_IN 0.0 kg/sec Low limit on input
PIDTYPE MASSRATE Type of PID
PV S12.W kg/sec Process variable
RSP TC101.OUT Remote set point

PID: TC101
Example PID as temperature controller
Parameter Assignment UOM Description
ACTION SP_PV Controller action
ALGTYPE PARALLEL Type of PID algorithm
HI_IN 500 K High limit on input
KI 0.1 1/sec Integral gain
KP 0.09 Proportional gain
TD 39 sec Derivative time
LO_IN 0.0 K Low limit on input
TEMPERAT
PIDTYPE Type of PID
URE
D102.FLASH.
PV K Process variable
T
SP 386 K Remote set point

Controls 148
PID

Data Entry Window Usage

Configuration Tab

PID Type corresponds to the PIDType parameter. It is used for the selection of process variable
type to be controlled and sets the units of PV, SP and other parameters accordingly. Use Other
(default) if the process variable type is not in the list.

Controls 149
PID

Basic Tab

Instrument Range
Low range of input corresponds to the Lo_In parameter. If this parameter is not initialized,
range will not be used.

High range of input corresponds to the Hi_In parameter. If this parameter is not initialized,
range will not be used.

Controller Action
Action of controller corresponds to the Action parameter. In process industries, PV-SP is
considered direct acting and SP-PV is considered reverse acting. Power industry convention is
the opposite where SP-PV is direct acting while PV-SP is reverse. The user may have to set the
action for right behavior of the controller.

Tuning Tab

Controls 150
PID

Tuning Constants
Tuning constant form corresponds to TuneType parameter.

When using Legacy controller, use Legacy_paramters (Kp, Ki, Kd and Td).

When using Ideal, Series or Parallel algorithms, use either Prop_gain_and reset_rate (Kp, Ki,
Td) or Prop_gain_and reset_time (Kp, Ti, Td) or Prop_band_and reset_rate (PB, Ki, Td) or
Prop_band_and reset_time (PB, Ti, Td) TuneType paramter

Proportional gain corresponds to the Kp parameter. This parameter should be initialized to


include proportional term in the controller output calculations. Higher proportional gain might
result in instability. The user can also specify PB instead of Kp. If both Kp and PB are
initialized then PB will be used.

Integral gain (integral reset rate) corresponds to the Ki parameter. This parameter should be
initialized to include integral term in the controller output calculations. Higher integral gain
might result in oscillatory behavior. The user can also specify Integral reset time (Ti) instead of
Ki. If both Ti and Ki are initialized then Ti will be used.

Derivative gain corresponds to the Kd parameter. This parameter should be initialized to include
derivative term in the Legacy controller output calculations.

Derivative time corresponds to the Td parameter. This parameter should be initialized to include
derivative term in the controller output calculations.

Controls 151
PID

Connections Tab

Process variable
Process variable reference parameter corresponds to the PV parameter. The dynamic/state
variable to be controlled should be specified here.

Process variable gain corresponds to the K_PV parameter. The default value can be left in place
if the gain should not affect the user set PV.

Process variable bias corresponds to the B_PV parameter. The default value can be left in place
if the bias should not affect the user set PV.

Set Point
The set point reference parameter corresponds to the SP parameter. Parameter value for Set
Point can be entered using PID panel. If used as a slave controller, the output of the master/PID
object is specified here.

Controls 152
PID

Remote set point connection corresponds to RSP parameter. This parameter should be set in the
slave controller for establishing cascade connection between two PID controllers.

Set point gain corresponds to K_SP parameter. The default value can be left in place if the gain
should not affect the user set SP

Set point bias corresponds to B_SP parameter. The default value can be left in place if the bias
should not affect the user set SP.

Output
Bias on output corresponds to B_Out parameter. The default value can be left in place if the
bias should not affect the output.

High limit of output corresponds to the Hi_Out parameter. The user may have to change this
value based on the actuator control signal input range. The default value can be left in place for
most of the cases.

Low limit of output corresponds to the Lo_Out parameter. The user may have to change this
value based on the actuator control signal input range. The default value can be left in place for
most of the cases.

Controls 153
PID

Algorithms Tab

PID algorithm corresponds to the AlgType parameter. The PID algorithm type can be Ideal,
Series or Parallel.

PID form corresponds to the FormType parameter. The form of PID can be Position or
Velocity.

Type of error for proportional action corresponds to the PropAction parameter. Type of error
for derivative action corresponds to the DerivAction parameter. User can select either PV and
SP or PV only for PropAction and DerivAction.

Controls 154
PID

Parameter Table - PID


Configuration and Tuning
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
PIDType Type of PID No No KI OTHER
Selection of PID
type is based on the
variable being
controlled. Used for
units display
purpose only.
0 – Other
1 – Temperature
2 – Temperature
Difference
3 – Pressure
4 – Pressure
Difference
5 – Tray Level
6 – Level
7 – Mole Rate
8 – Mass Rate
9 – Volume Rate
10 – Fraction
11 – Mole Fraction
12 – Speed
13 – VapVolRate
AlgType Type of PID No No KI IDEAL
Algorithm
The PID Algorithm
could be LEGACY,
IDEAL, SERIES or
PARALLEL.
0 – Legacy
1 – Ideal
2 – Series
3 – Parallel
FormType Form of PID No No KI VELOCI
Algorithm TY
The Form for PID
algorithm could be
either POSITION or
VELOCITY.
0 – Position
1 – Velocity
TuneType Type of Tuning No No LEGACY
parameters PARAME
TERS
The type of tuning
parameter could be:

Controls 155
PID

0 – Legacy
1 – Prop Gain and
Reset Rate
2 – Prop Band and
Reset Rate
3 – Prop Gain and
Reset Time
4 – Prop Band and
Reset Time
Action Controller Action Yes No KI SP-PV
In process
industries, PV-SP is
considered direct
acting and SP-PV is
considered reverse
acting. Power
industry convention
is the opposite
where SP-PV is
direct acting while
PV-SP is reverse.
0 – Direct
1 – Reverse
PropActOn Mode of error for No No KI PV
the proportional ONLY
term
The proportional
term can act either
on the error from
the Set Point (PV
and SP) or on the
error based on PV
(PV only).
0 – PV and SP
1 – PV only
DerivActOn Mode of error for No No KI PV
the derivative term ONLY
The derivative term
can act either on the
error from the Set
Point (PV and SP)
or on the error
based on PV (PV
only).
0 – PV and SP
1 – PV only
Kp Proportional gain Yes No KF
If this parameter is
not initialized the

Controls 156
PID

proportional part of
the algorithm will
not be added to the
output
PB Proportional Band Yes No KF
If both Kp and PB
are initialized then
PB will be used.
Ki Integral gain sec Yes No KF
In case of Legacy
PID algorithm, if
this parameter is not
initialized the
integral part of the
algorithm will not
be added to the
output
Ti Integral Reset time Yes No KF
In case of Ideal,
Series or parallel
PID algorithm, if
both Ki and Ti are
initialized then Ti
will be used.
Kd Derivative gain Yes No KF
If this parameter is
not initialized the
derivative part of
the algorithm will
not be added to the
output for Legacy
controller.
Td Derivative time sec Yes No KF
In case of Legacy
algorithm, if this
parameter is not
initialized the
derivative part of
the algorithm will
not be added to the
output
Power Power UOM Flag No No KB 0
UOMFlag Set to 1 when using
Power Library
models.
Set to 0 when using
DYNSIM Base
equipment
models.

Controls 157
PID

Hi_In High range on input Yes No KFI


Limits the high
value of input. If not
initialized range will
not be used
Lo_In Low range on input Yes No KF
Limits the low value
of input. If not
initialized range will
not be used
Gap_Hi Value of error gap Yes No KF 0
on positive side
Gap_Hi provides a
dead band from zero
to Gap_Hi. Gap_Hi
should be entered in
fraction of error.
Default is zero
for no gap control.
A typical value
might be 0.1
Gap_Lo Value of error gap Yes No KF 0
on negative side
Gap_Lo provides a
dead band from zero
to Gap_Lo. Gap_Lo
should be entered in
fraction of error.
Default is zero
for no gap control.
A typical value
might be -0.1.
Gap_Slope Value of error gap Yes No KF 0
slope
Use of this
parameter is not
recommended.

Controls 158
PID

Inputs
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
B_Out Bias on output Yes No DF 0
The bias is
applied to the
OUT before
hi and lo limit
clipping. Actual
Out = Out +
B_Out.
SP Set point Yes No DF 0
RSP Remote set point No No
This parameter
establishes
cascade
connection
between two PID
controllers and
other control
library model.
RSP is a
normalized signal
(Master PID
output) that is
used to scale the
instrument range
(Hi_In - Lo_In)
to create remote
setpoint for the
Slave PID
K_SP Gain on set point Yes No KF 1
Actual SP = SP *
K_SP +B_SP
B_SP Bias on set point Yes No KF 0
Actual SP = SP *
K_SP +B_SP
PV Process Variable Yes No DF 0
K_PV Gain on process Yes No KF 1
variable
Actual PV = PV *
K_PV +B_PV
B_PV Bias on process Yes No KF 0
variable
Actual PV = PV *
K_PV +B_PV
PVHIALA Process Variable Yes
RM high Alarm limit
PVLOALA Process Variable Yes

Controls 159
PID

RM low Alarm limit


SLAVECO Slave controller
NTROLLE name
R Name of the slave
controller used in
faceplate.
Slave name is
used to let master
controller know
that the mode of
slave controller in

Outputs
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Out Output No Yes DF 0
HiLim Flag to indicate Hi No Yes DI 0
limit reached
LoLim Flag to indicate No Yes DI 0
Lo limit reached
PVMod PV incliding Yes DF 0
process gain and
bias
SPMod SP including set Yes DF 0
gain and bias
PVHIALA Process Variable Yes
RMACT high Alarm active
PVLOALA Process Variable Yes
RMACT low Alarm active

Tracking
Paramete Description UO Eqt Array Sort Dft Dft
r Name M OK Size Out Cls Val
Trk_SP Value to track No No DF 0
setpoint to
Analog value for
previous object
to track for each
input
parameter of this
object.
TRK_SP is the value
desired for the
setpoint input
parameter when
the object is in
tracking.
TrkFlag_ Flag for setpoint No No DI 0
SP tracking

Controls 160
PID

Integer flag used to


determine SP
tracking
mode. This
parameter is an input
to
the previous block in
the control loop.
In implicit tracking
operation, this
parameter will set
TRKFLAG parameter
of the previous block
in the loop.
BIT 1 = Track to
TRK (Integer value 1)
BIT 2 = Raise Inhibit
-(track if Out >=
Trk)(Integer value 2)
BIT 3 = Lower
Inhibit
-(track if Out <=
Trk)(Integer value 4)
Trk_ Value to track manset No No DF 0
ManSet to
Trk_Manset is the
value to
track manset, to
avoid bumpless
transfer when PID is
switched
from Manual to Auto
mode.
TrkFlag_ Flag for manset No No DI 0
ManSet tracking
Integer flag used to
determine manset
tracking mode.
BIT 1 = Track to
TRK (Integer value 1)
BIT 2 = Raise Inhibit
-(track if Out >=
Trk)(Integer value 2)
BIT 3 = Lower
Inhibit
-(track if Out <=
Trk)(Integer value 4)

Internal Use Only

Controls 161
PID

Parameter Description UOM Eqt Array Sort Dft Dft


Name OK Size Out Cls Val
Integral Saved integral value No No SF 0
dIntegral Derivative of No Yes DF 0
integral value
Deriv Saved derivative No No SF 0
value
dDeriv Derivative of No Yes DF 0
derivative value
PrevPV1 Process variable No No SF 0
from previous time
step
PrevPV2 Process variable No No SF 0
two time steps back
PrevError1 Error from previous No No SF 0
time step
PrevError2 Error two time steps No No SF 0
back
PrevOut Output without bias No No SF 0
from previous time
step
SPINC Saves faceplate No
setpoint increment
SP_HILIM Set point high limit No
These parameters
are only used for
special faceplate
scaling.
They do not
influence PID
output
calculations.
SP_LOLIM Set point low limit No
These parameters
are only used for
special faceplate
scaling.
They do not
influence PID
output
calculations.

Controls 162
PID

Auto, Manual and Override Control


Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
MA Auto Manual Yes No SI 1
Switch
0 = Manual
1 = Auto
SDCS DCS override Yes No SI 0
switch
0 = Execute
1 = Override
AutSW Auto override Yes No DI 0
switch
When set to 1, the
system is set to
auto mode (MA =
1). Default value is
0
ManSW Manual override Yes No DI 0
switch
When set to 1, the
system is set to
manual mode (MA
= 0). Has
preference over
auto override
switch (AutSw).
Default value is 0.
LR Local Remote Yes No SI 0
Switch
0 = Local
1 = Remote
When set to 1, the
set point will be set
by the remote PID
controller as
defined in RSP
parameter. Else
locally defined set
point will be used.

Controls 163
PID

Manual Setpoint
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
ManSet Manual set point Yes No SF 0
Value to set the
output to when in
manual mode
ManRate Maximum rate to Yes No KF
move output
when in manual
mode
If this parameter
is not initialized
the output rate of
change will not
be limited.

Output Value Limiting


Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Lo_Out Low limit of Yes No KF
output
If not specified,
the output will
not be limited by
a low limit
Hi_Out Hi limit of output Yes No KF
If not specified,
the output will
not be limited by
a high limit
AltOut Alternate outputs No No DF
Each element in
this array will be
set to the value of
Out, unless the
SDCS flag is set
to 1

Controls 164
PID

Tracking Values and Flags


Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
SPTrkFlag Flag for SP tracking No No KB 0
PV in manual mode
Set to 1, when SP
tracking PV in manual
mode. Set to 0, when
SP not tracking PV in
manual mode.
Trk Track input value Yes No DF 0
The value to which the
output will be set
when in tracking
mode. This value will
be set automatically
by the next block in
the control loop when
implicit tracking is
implemented in that
block
TrkFlag Track input flag Yes No DI 0
Integer flag used to
determine tracking
mode.
This parameter is an
input from the next
block in the control
loop. In implicit
tracking operation,
this parameter is
automatically set by
the next block in the
loop.
BIT 1 = Track TRK
(Integer value 1)
BIT 2 = Raise Inhibit
(track if Out >=
Trk)(Integer value 2)
BIT 3 = Lower Inhibit
(track if Out <=
Trk)(Integer value 4)
TrkDisable Track disable flag Yes No KI 0
Disables any or all
modes of tracking
BIT 1 = Disable Track
(Integer value 1)
BIT 2 = Disable Raise
Inhibit (Integer value

Controls 165
PID

2)
BIT 3 = Disable
Lower Inhibit (Integer
value 4)
TrkImplicit Track implicit flag Yes No KI 1
When this value is set
to 1, implicit tracking
will be implemented.
To disable implicit
tracking set the
parameter to 0.

Legend:

Dfl Cls Default parameter model:


KB - Static Boolean SB - State Boolean DB - Dynamic Boolean
KI - Static Integer SI - State Integer DI - Dynamic Integer
KF - Static Float SF - State Float DF - Dynamic Float
KD - Static Double SD - State Double DD - Dynamic Double

Dft Val A value here indicates the parameter’s default value. If the parameter is static and no
value is indicated, then it (parameter value) is optional unless otherwise specified.
Eq Ok An equation can be attached to the parameter if the corresponding value is Yes.
Arr Siz A value here indicates the size of the array. No value indicates that the parameter is
not a vector.
UOM Internal units of measure

FAQ

Q. How do I configure the controller to enable a bumpless transfer from MAN to AUTO
mode?

A. Set the SPTRKFLAG parameter to true. This causes the SP to track the PV when the
controller is in MAN mode.

Controls 166
PulsePosn

PulsePosn

Introduction
PulsePosn extends XferAnaBase

The PulsePosn (Pulse Positioner) object class provides increment and decrement pulses to
position a valve to the value of the gained and biased input. The PulsePosn model adheres to the
standard Analog model conventions.

The Out parameter is set to the gained and biased input. The Inc and Dec parameters are pulsed
to cause the Meas to equal the Out.

Fundamentals
The PulsePosn block calculates an output (the gained and biased input) and then creates a series
of pulses to drive a valve to that position, within a deadband.

The PulsePosn operates on a cycle. The period of each cycle is set by the parameter CycleTime.
At the beginning of the cycle, the PulsePosn calculates its output (Out). During the cycle, the
PulsePosn calculates its pulse duration (Pulse). It also calculates increase (Inc) and/or decrease
(Dec) signals as needed. At the beginning of the next cycle, the output is recalculated.

Output
If the block is Auto and not Tracking, then the output is calculated as follows:

Out = K_In * In + B_In

where: In = Input
K_In = Input Gain
B_In = Input Bias
Out = Desired valve position (normalized)

Pulse
The pulse duration is calculated as follows:

If (Out > Meas + Deadband)


Pulse = (Out – Meas) * FwdTime
Else If (Out < Meas – Deadband)
Pulse = (Meas – Out) * RevTime
Else
Pulse = 0.0
EndIf

where: Pulse = Pulse duration required to move valve (sec)


Meas = Measured valve input
FwdTime = Forward pulse time (sec)

Controls 167
PulsePosn

RevTime = Reverse pulse time (sec)


Deadband = Deadband (sec)

The Pulse duration is rounded to the nearest 10 msec. If the Pulse duration is less than PulseMin,
the pulse will not occur.

Increase/Decrease Signals
If Pulse is greater than the object Period, the increase/decrease signals will be distributed over
many timesteps. If Pulse is less than the object Period, the increase/decrease signals will be
scaled for one timestep.

Important
The PulsePosn object cannot move the valve faster than the specified valve stroke time. The
FwdTime and RevTime parameters act as gains on the Pulse duration calculation. If the
FwdTime and RevTime parameter values are small compared to the valve stroke time, then the
valve will take longer to reach its destination.

Example

Example 1
The following example shows a Pulse Positioner that positions a valve.

The Pulse Positioner receives an input of 0.75 at time 18:20 and initiates an Inc pulse to open the
valve. The plot of valve position vs time follows an S-shaped trajectory, as shown below. Note
that the Pulse Positioner parameters FwdTime and RevTime are 10 seconds but the Valve
parameters TimeOp and TimeCl are 30 seconds.

The green plot shows the actual increase signal. It is constant during the duration of the valve
travel because the FwdTime and RevTime parameters are quite large.

Controls 168
PulsePosn

PULSEPOSN: PULSEPOSN1
Example pulse positioner
Parameter Assignment UOM Description
IN SWITCH1.OUT Input
MEAS MOVI1.POS Measured valve position
HI_OUT 1.0 Output high limit
LO_OUT 0.0 Output low limit
CYCLETIME 1.0 sec Pulse calculation cycle time
FWDTIME 10.0 sec Forward pulse time
REVTIME 10.0 sec Reverse pulse time

MOVI: MOVI1
Parameter Assignment UOM Description
TIMECL 30 sec Time to close
TIMEOP 30 sec Time to open
CL PULSEPOSN1.DEC Close command
OP PULSEPOSN1.INC Open command

Example 2
The following example shows an alternate Pulse Positioner that positions a valve. It is the Pulse
Positioner from Example 1 with much smaller FwdTime and RevTime parameter values.

The Pulse Positioner receives an input of 0.75 at time 29:00 and initiates an Inc pulse to open the
valve. The plot of valve position vs time follows a first-order lag trajectory, as shown below.
Note that the Pulse Positioner parameters FwdTime and RevTime are only 1 second but the
Valve parameters TimeOp and TimeCl are 30 seconds.

Controls 169
PulsePosn

The green plot shows the actual increase signal. It is not constant and it decays in magnitude.
Note that the valve takes 2.5 minutes to open to 75% even though the valve stroke time is 30
seconds.

PULSEPOSN: PULSEPOSN1
Alternate example pulse positioner
Parameter Assignment UOM Description
IN SWITCH1.OUT Input
MEAS MOVI1.POS Measured valve position
HI_OUT 1.0 Output high limit
LO_OUT 0.0 Output low limit
CYCLETIME 1.0 sec Pulse calculation cycle time
FWDTIME 1.0 sec Forward pulse time
REVTIME 1.0 sec Reverse pulse time

MOVI: MOVI1
Parameter Assignment UOM Description
TIMECL 30 sec Time to close
TIMEOP 30 sec Time to open
CL PULSEPOSN1.DEC Close command
OP PULSEPOSN1.INC Open command

Example 3
The following example shows an alternate Pulse Positioner that positions a valve. It is the Pulse
Positioner from Example 2 with much larger CycleTime parameter value.

The Pulse Positioner receives an input of 0.75 at time 50:00 and initiates an Inc pulse to open the
valve. The plot of valve position vs time follows a first-order lag trajectory, as shown below.

Controls 170
PulsePosn

Note that the Pulse Positioner parameters FwdTime and RevTime are only 1 second but the
Valve parameters TimeOp and TimeCl are 30 seconds. The CycleTime is set to 5 seconds.

The green plot does not show the actual increase signal. It is not constant and it decays in
magnitude but changes too rapidly for the trend. Note that the valve takes 10.0 minutes to open
to 75% even though the valve stroke time is 30 seconds.

PULSEPOSN: PULSEPOSN1
Alternate example pulse positioner
Parameter Assignment UOM Description
IN SWITCH1.OUT Input
MEAS MOVI1.POS Measured valve position
HI_OUT 1.0 Output high limit
LO_OUT 0.0 Output low limit
CYCLETIME 5.0 sec Pulse calculation cycle time
FWDTIME 1.0 sec Forward pulse time
REVTIME 1.0 sec Reverse pulse time

MOVI: MOVI1
Parameter Assignment UOM Description
TIMECL 30 sec Time to close
TIMEOP 30 sec Time to open
CL PULSEPOSN1.DEC Close command
OP PULSEPOSN1.INC Open command

Controls 171
PulsePosn

Data Entry Window Usage

Basic Tab

Pulse
Pulse calculation cycle time corresponds to the CycleTime parameter. This is the cycle time
required between recalculation of the pulse amplitude.

Dead band corresponds to the DeadBand parameter. It is the dead band that will be allowed
between the measured value and the output before a pulse will be calculated.

Forward pulse time corresponds to the FwdTime parameter. It is the gain on increase pulse
calculation; this specifies the total time a pulse will be held if a full range error is encountered
between the measured valve position and the output.

Reverse pulse time corresponds to the RevTime parameter. It is the gain on increase pulse
calculation; this specifies the total time a pulse will be held if a full range error is encountered
between the measured valve position and the output.

Minimum pulse time corresponds to the PulseMin parameter. This specifies the minimum pulse
time calculated in order to actually produce a pulse.

Controls 172
PulsePosn

Connections Tab

Input
Input parameter reference corresponds to the In parameter. The input parameter should be
specified here.

Input gain corresponds to the K_In parameter. The default value can be left in place if the gain
should not affect the input.

Input bias corresponds to the B_In parameter. The default value can be left in place if the bias
should not affect the input.

Controls 173
PulsePosn

Valve Position
Measured valve position parameter reference corresponds to the Meas parameter. The valve
position should be specified here.

Measured gain corresponds to the K_Meas parameter. The default value can be left in place if
the gain should not affect the valve position.

Measured bias corresponds to the B_Meas parameter. The default value can be left in place if
the bias should not affect the valve position.

Output calculations
High limit of output corresponds to the Hi_Out parameter. Set the upper limit for the output
value, if the upper limit should be limited.

Low limit of output corresponds to the Lo_Out parameter. Set the lower limit for the output
value, if the lower limit should be limited.

Parameter Table - PulsePosn


Inputs
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
In Input Yes No DF 0
K_In Input gain Yes No KF 1
B_In Input bias Yes No KF 0
Meas Measured valve Yes No DF 0
position
K_Meas Measured gain Yes No KF 1
B_Meas Measured bias Yes No KF 0
CycleTime Pulse calculation cycle Yes No KF 1
time
Cycle time required
between recalculation
of the pulse amplitude
DeadBand Dead band Yes No KF 0.001
Deadband allowed
between the Meas and
Out before a pulse will
be calculated
FwdTime Forward pulse time Yes No KF 10
Gain on increase
pulse calculation. This
specifies the total time
a pulse will be held if
a full range error is
encountered between
the Meas and Out
RevTime Reverse pulse time Yes No KF 10
Gain on decrease

Controls 174
PulsePosn

pulse calculation. This


specifies the total time
a pulse will be held if
a full range error is
encountered between
the Meas and Out
PulseMin Minimum pulse time Yes No KF 0.001
This specifies the
minimum pulse time
calculated in order to
actually produce a
pulse

Outputs
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Out Output No Yes DF 0
Inc Increase pulse No Yes DF 0
Dec Decrease pulse No Yes DF 0
HiLim Flag to indicate hi No Yes DI 0
limit reached
LoLim Flag to indicate lo No Yes DI 0
limit reached

Tracking
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Trk_In Value to track input No No DF 0
TrkFlag_ Flag for input tracking No No DI 0
In
Trk_ Value to track manset No No DF 0
ManSet to
TrkFlag_ Flag for manset No No DI 0
ManSet tracking

Internal Use Only


Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
CycTimeElp Elapsed cycle time No No SF 0
Pulse Pulse value No Yes DF 0

Auto, Manual and Override Control


Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
MA Auto/Manual switch Yes No SI 1
0 – Manual

Controls 175
PulsePosn

1 – Automatic
SDCS DCS override switch 0 Yes No SI 0
– Execute
1 – Override
AutSW Auto override switch Yes No DI 0
When set to 1, this
value will force the
MA parameter to 1
ManSW Manual override Yes No DI 0
switch
When set to 1, this
value will force the
MA parameter to 0

Manual Setpoint
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
ManSet Value to set output Yes No SF 0
when in manual
ManRate Maximum rate to Yes No KF
move output when in
manual
If this parameter is not
initialized, the output
rate of change will not
be limited

Output Value Limiting


Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Lo_Out Low limit of output Yes No KF
If not specified, the
output will not be
limited by a low limit
Hi_Out Hi limit of output Yes No KF
If not specified, the
output will not be
limited by a high limit
AltOut Alternate outputs No No DF
Each element in this
array will be set to the
value of Out, unless
the SDCS flag is set to
1

Controls 176
PulsePosn

Tracking Values and Flags


Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Trk Track input value Yes No DF 0
The value to which the
output will be set
when in tracking
mode. This value will
be set automatically
by the next block in
the control loop when
implicit tracking is
implemented in that
block
TrkFlag Track input flag Yes No DI 0
Integer flag used to
determine tracking
mode.
This parameter is an
input from the next
block in the control
loop. In implicit
tracking operation,
this parameter is
automatically set by
the next block in the
loop.
BIT 1 = Track TRK
(Integer value 1)
BIT 2 = Raise Inhibit
(track if Out >=
Trk)(Integer value 2)
BIT 3 = Lower Inhibit
(track if Out <=
Trk)(Integer value 4)
TrkDisable Track disable flag Yes No KI 0
Disables any or all
modes of tracking
BIT 1 = Disable Track
(Integer value 1)
BIT 2 = Disable Raise
Inhibit (Integer value
2)
BIT 3 = Disable
Lower Inhibit (Integer
value 4)
TrkImplicit Track implicit flag Yes No KI 1
When this value is set

Controls 177
PulsePosn

to 1, implicit tracking
will be implemented.
To disable implicit
tracking set the
parameter to 0

Legend:

Dfl Cls Default parameter model:


KB - Static Boolean SB - State Boolean DB - Dynamic Boolean
KI - Static Integer SI - State Integer DI - Dynamic Integer
KF - Static Float SF - State Float DF - Dynamic Float
KD - Static Double SD - State Double DD - Dynamic Double

Dft Val A value here indicates the parameter’s default value. If the parameter is static and no
value is indicated, then it (parameter value) is optional unless otherwise specified.
Eq Ok An equation can be attached to the parameter if the corresponding value is Yes.
Arr Siz A value here indicates the size of the array. No value indicates that the parameter is
not a vector.
UOM Internal units of measure

Controls 178
Rlimit

RLimit

Introduction
Rlimit extends XferAnaBase

The RLimit (Rate Limit) object class calculates a rate limited output from a gained and biased
input. The rate limiting calculation can be either linear or first order lag. The RLimit object also
provides any number of high and low digital alarms. The RLimit model adheres to the standard
Analog model conventions.

Fundamentals

Rate Limited Output


The RLimit (Rate Limit) object class calculates a rate limited output from a gained and biased
input. The rate limiting calculation can be either rate type linear or first order lag. The
maximum local rate for each rate type can be specified with many different parameters. The
target output is as follows:

In_loc = In * K_In + B_In

where: In_loc = Gained and Biased Input


In = Input
K_In = Input gain
B_In = Input bias

Both the rate type of ramp and the rate can be specified independently for increasing and
decreasing directions.

Rate Type
The rate type can be either linear or first order lag. The rate type can set independently for
increasing and decreasing directions. The rate type can be set by many parameters and the
following table shows the hierarchy. The Requirements column indicates when the rate type is
set by the associated parameter.

Precedence Parameter Parameter Requirements


(1 = highest) (when (when
increasing) decreasing)
1 RType RType RType != NONE or -1
2 IncRType DecRType parameter specified

Rate Type Linear


If the rate type is linear, the change in output is given by:

Out = MIN (In _ loc − Out , Rate _ loc * Period )


d
dt

Controls 179
Rlimit

where: Out = Output


Rate_loc = Maximum local rate (1/sec)

The maximum local rate (Rate_loc) can be set by many parameters, depending on whether the
output is increasing or decreasing. The following table shows the hierarchy. The Requirements
column indicates when the maximum local rate is set by the associated parameter.

Precedence Parameter Parameter Requirements


(1 = highest) (when (when
increasing) decreasing)
1 Rate Rate Rate specified and
RType != NONE or -1
2 IncRate DecRate parameter specified

If none of the above parameters is specified then Out = In_loc.

Rate Type First Order


If the rate type is first order, the change in output is given by:

d In − Out
Out = MIN ( In − Out , ∗ Period )
dt Rate _ loc

where: Rate_loc = Maximum local rate (sec)

The maximum local rate (Rate_loc) can be set by many parameters, depending on whether the
output is increasing or decreasing. The following table shows the hierarchy. The Requirements
column indicates when the maximum local rate is set by the associated parameter.

Precedence Parameter Parameter Requirements


(1 = highest) (when (when
increasing) decreasing)
1 Lag Lag Lag specified and
RType != NONE or -1
2 Rate Rate Rate specified and
RType != NONE or -1
3 IncLag DecLag parameter specified

4 IncRate DecRate parameter specified

If none of the above parameters is specified then Out = In_loc.

Digital Alarms
The RLimit (Rate Limit) object class also calculates any number high, low, and equal alarms.
The digital alarms are set after the output has been limited between Hi_Out and Lo_Out, if they
are specified.

Controls 180
Rlimit

Digital High Alarms


The digital high alarms are set as follows:
HiLimit[i] is true when Out >= HiValue[i] , otherwise false

Digital Low Alarms


The digital low alarms are set as follows:
LoLimit[j] is true when Out <= LoValue[j] , otherwise false

Digital Equal Alarms


The digital equal alarms are set as follows:
EqLimit[k] is true when Out − EqValue[k ] < 10 −6 , otherwise false

Example

Example 1

The following example shows a linear rate limit block with identical increase and decrease rates.

RLIMIT: RL_LINEAR
Example linear rate limit block with identical increase/decrease rates
Parameter Assignment UOM Description
RTYPE 0 Type of ramp
(0 = LINEAR)
RATE 0.1 1/sec Output rate limit
The larger the value the faster the
output will move

Example 1 Alternate

The following alternate example shows a linear rate limit block with an increase rate 10 times as
big as the decrease rate. Note that the RATE parameter must not be specified.

RLIMIT: RL_LINEAR_ALT
Example linear rate limit block with unique increase/decrease rates
Parameter Assignment UOM Description
RTYPE 0 Type of ramp
(0 = LINEAR)
DECRATE 0.1 1/sec Output rate limit while decreasing
INCRATE 1.0 1/sec Output rate limit while
increasingOutput rate limit
RATE 1/sec Output rate limit

Controls 181
Rlimit

Example 2

The following example shows a first order rate limit block with identical increase and decrease
rates.

RLIMIT: RL_FOLAG
Example first order rate limit block with identical increase/decrease rates
Parameter Assignment UOM Description
RTYPE 1 Type of ramp
(1 = FIRST ORDER LAG)
LAG 0.1 sec Output rate limit
The larger the value the slower the
output will move

Example 2 Alternate

The following alternate example shows a first order rate limit block with an increase rate 10
times as big as the decrease rate. Note that the LAG parameter must not be specified.

RLIMIT: RL_FOLAG_ALT
Example first order rate limit block with unique increase/decrease rates
Parameter Assignment UOM Description
RTYPE -1 Type of ramp
(-1 = NONE)
DECLAG 1 sec Output rate limit while decreasing
INCLAG 1 sec Output rate limit while
increasingOutput rate limit
DECRTYPE 1 Type of ramp
(1 = FIRST ORDER LAG)
INCRTYPE 1 Type of ramp
(1 = FIRST ORDER LAG)
LAG sec Output rate limit

Example 3

The following example shows a rate limit block that uses both linear and first order lag, each
with a fast and slow rate.

LATCH: SR_FASTRATE
This latch indicates fast ramp rate when true

LATCH: SR_RYPE
This latch indicates first order ramp when true

Controls 182
Rlimit

RLIMIT: RLIMIT8
Example linear rate limit block with identical increase/decrease rates
Parameter Assignment UOM Description
RTYPE SR_TYPE.OUT Type of ramp
LAG EQUATION sec Output rate limit
Equation: If(SR_FASTRATE.OUT, 1, 10)
RATE EQUATION 1/sec Output rate limit
Equation: If(SR_FASTRATE.OUT, 10, 1)

Example 4

The following example shows a rate limit block used to calculate digital alarms on tank level.
Note that whe both HiLimit[2] and LoLimit[0] are true, the tank level is within the normal range,
as calculated by TANK_LVL_NORMAL.

DYNAMIC_FLOAT: TANK_LVL

RLIMIT: TANK_LVL_ALARMS
Example rate limit block used to create digital alarms on tank level
Parameter Assignment UOM Description
IN TANK_LVL Input
HIVALUE 3 size Value to set high limit at
HIVALUE[0] 20 Hi-Hi level
HIVALUE[1] 18 Hi level
HIVALUE[2] 8 Low limit of normal level range
LOVALUE 3 size Value to set low limit at
LOVALUE[0] 12 High limit of normal level range
LOVALUE[1] 2 Lo level
LOVALUE[2] 1 Lo-Lo level
HI_OUT 22 Output high limit
LO_OUT 0 Output low limit

RLIMIT: TANK_LVL_NORMAL
Tank level normal range
Parameter Assignment UOM Description
INP 2 size Array of inputs
INP[0] TANK_LVL_NORMAL.HILIMIT[2]
INP[1] TANK_LVL_NORMAL.LOLIMIT[0]

Controls 183
Rlimit

Data Entry Window Usage


Basic Tab

Both Increasing and Decreasing


Type of ramp corresponds to the RType parameter. Select Linear or First_Order ramp. If this
parameter is specified, it will override the type of ramp while increasing or decreasing.

Rate limit on output corresponds to the Rate parameter. The units of rate are output units/second
if the ramp is linear or seconds if the ramp is a first order lag. If this is specified, rate limit on
output while increasing and while decreasing will be overridden.

While Increasing
Type of ramp corresponds to the IncRType parameter. Select Linear or First_Order ramp. This
specifies the type of ramp when the ramp is increasing. This parameter is not used if RType is
specified.

Rate limit on output corresponds to the IncRate parameter. Specify the limit on the rate when
the ramp is increasing.

While Decreasing
Type of ramp corresponds to the DecRType parameter. Select Linear or First_Order ramp. This
specifies the type of ramp when the ramp is decreasing. This parameter is not used if RType is
specified.

Controls 184
Rlimit

Rate limit on output corresponds to the DecRate parameter. Specify the limit on the rate when
the ramp is decreasing.

Connections Tab

Input
Input parameter reference corresponds to the In parameter. The input parameter should be
specified here.

Input gain corresponds to the K_In parameter. The default value can be left in place if the gain
should not affect the input.

Input bias corresponds to the B_In parameter. The default value can be left in place if the bias
should not affect the input.

Output
High limit of output corresponds to the Hi_Out parameter. Set the upper limit for the output
value, if the upper limit should be limited.

Low limit of output corresponds to the Lo_Out parameter. Set the lower limit for the output
value, if the lower limit should be limited.

Controls 185
Rlimit

Parameter Table - RLimit


Configuration
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
RType Type of Ramp Yes No KI LINE
AR
Options are
-1 = None
0 = Linear
1 = First order
lag
If this parameter
is specified, it
will
always override
that of
INCRTYPE
or DECRTYPE
Rate Rate limit on 1/sec Yes No KF
output (Linear
The units of Rate )
are Out
units/second if sec
the ramp is (First
linear, or Order)
seconds if the
ramp is a first
order lag. If this
parameter is
specified its
value will
override that of
either IncRate or
DecRate
IncRType Type of Ramp Yes No KI NONE
-1 = None
0 = Linear
1 = First order
lag
IncRate Rate limit on 1/sec Yes No KF
output while
increasing
DecRType Type of Ramp Yes No KI NONE
-1 = None
0 = Linear
1 = First order
lag
DecRate Rate limit on 1/sec Yes No KF

Controls 186
Rlimit

output while
decreasing
Lag First order lag on sec Yes KF
output
If this parameter
is specified its
value will
override that of
either INCLAG
or DECLAG
IncLag Output lag limit sec Yes KF
while increasing
DecLag Output lag limit sec Yes KF
while decreasing

Inputs
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
HiValue Value to set hi Yes User No KF
limit at defined
Array of any
number of hi
values to set a
corresponding
HiLimit alarm
when the output
>= HiValue
LoValue Value to set lo Yes User No KF
limit at defined
Array of any
number of lo
values to set a
corresponding
LoLimit alarm
when the output
<= LoValue
EqValue Value to set eq Yes User No KF
limit at defined
Array of any
number of eq
values to set a
corresponding
EqLimit alarm
when the output
== EqValue
In Input Yes No DF 0
K_In Input gain Yes No KF 1
B_In Input bias Yes No KF 0

Controls 187
Rlimit

Outputs
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Out Output No Yes SF 0
HiLim Flag to indicate hi No Yes DI 0
limit reached
LoLim Flag to indicate lo No Yes DI 0
limit reached
HiLimit Hi limit flag No HiValu Yes DI 0
e
LoLimit Lo limit flag No LoValu Yes DI 0
e
EqLimit Eq limit flag No EqValu Yes DI 0
e

Tracking
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Trk_In Value to track No No DF 0
input to
TrkFlag_ Flag for input No No DI 0
tracking
In
Trk_ Value to track No No DF 0
manset to
ManSet
TrkFlag_M Flag for manset No No DI 0
anSet tracking

Auto, Manual and Override Control


Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
MA Auto/Manual Yes No SI 1
switch
0 – Manual
1 – Automatic
SDCS DCS override Yes No SI 0
switch
0 – Execute
1 – Override
AutSW Auto override Yes No DI 0
switch
When set to 1, this
value will force
the
MA parameter to
1
ManSW Manual override Yes No DI 0

Controls 188
Rlimit

switch
When set to 1, this
value will force
the
MA parameter to
0

Manual Setpoint
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
ManSet Value to set Yes No SF 0
output when in
manual
ManRate Maximum rate to 1/sec Yes No KF
move output when
in manual
If this parameter
is not initialized,
the output rate of
change will not be
limited

Output Value Limiting


Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Lo_Out Low limit of Yes No KF
output
If not specified,
the output will not
be limited by a
low limit
Hi_Out Hi limit of output Yes No KF
If not specified,
the output will not
be limited by a
high limit
AltOut Alternate outputs No No DF
Each element in
this array will be
set to the value of
Out, unless the
SDCS flag is set to
1

Tracking Values and Flags


Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Trk Track input value Yes No DF 0
The value to which the

Controls 189
Rlimit

output will be set when in


tracking mode. This value
will be set automatically by
the next block in the control
loop when implicit tracking
is implemented in that block
TrkFlag Track input flag Yes No DI 0
Integer flag used to
determine tracking mode.
This parameter is an input
from the next block in the
control loop. In implicit
tracking operation, this
parameter is automatically
set by the next block in the
loop.
BIT 1 = Track TRK (Integer
value 1)
BIT 2 = Raise Inhibit (track
if Out >= Trk)(Integer value
2)
BIT 3 = Lower Inhibit (track
if Out <= Trk)(Integer value
4)
TrkDisable Track disable flag Yes No KI 0
Disables any or all modes of
tracking
BIT 1 = Disable Track
(Integer value 1)
BIT 2 = Disable Raise
Inhibit (Integer value 2)
BIT 3 = Disable Lower
Inhibit (Integer value 4)
TrkImplicit Track implicit flag Yes No KI 1
When this value is set to 1,
implicit tracking will be
implemented. To disable
implicit tracking set the
parameter to 0

Legend:

Dfl Cls Default parameter model:


KB - Static Boolean SB - State Boolean DB - Dynamic Boolean
KI - Static Integer SI - State Integer DI - Dynamic Integer
KF - Static Float SF - State Float DF - Dynamic Float
KD - Static Double SD - State Double DD - Dynamic Double

Controls 190
Rlimit

Dft Val A value here indicates the parameter’s default value. If the parameter is static and no
value is indicated, then it (parameter value) is optional unless otherwise specified.
Eq Ok An equation can be attached to the parameter if the corresponding value is Yes.
Arr Siz A value here indicates the size of the array. No value indicates that the parameter is
not a vector.
UOM Internal units of measure

Controls 191
Select

Select

Introduction
Select extends XferAnaBase

The Select (multiple input select) object class provides for the selection of the highest, lowest,
median or average of any number of inputs. The Select model adheres to the standard Analog
model conventions.

Fundamentals

The Select (multiple input select) object class provides for the selection of the highest, lowest,
median or average of any number of inputs.

Selection Type
The parameter Type determines how the selection is made:

Type Selection Type


0 Highest
1 Lowest
2 Median (note that if there are an even number of inputs, the
output will be the average of the two middle values)
3 Average

The parameter Out is set based on the selected input parameter (after gain and bias), or the
average of all input parameters (after gain and bias). The index of the selected input is reported
to the user by the parameter Selected for the Type = 0, 1, 2. If an average is calculated (for either
Type = 2 or 3), then the parameter Selected is zero. This applies for the parameter SelectMa
equal to 1.

Override Selection
It is possible to force the selection of a single input. Set the SelectMa parameter to 0, and set the
Selected parameter to the index of the In parameter desired to force. The Out parameter will then
be set to the selected parameter.

Tracking
Tracking of all inputs is provided when the model is in manual, or receiving a track request from
another object. No tracking of the unselected inputs is provided, when the Select model is
functioning in a normal auto mode.

The Trk_In and TrkFlag_In parameter arrays will be automatically sized to the size of the In
array.

Controls 192
Select

Examples

Example 1

The following example shows a Select block that calculates an average of all inputs.

SELECT: SELECT1
Example of select block calculating an average
Parameter Assignment UOM Description
IN 3 size
IN[0] 10 Input
IN[1] 12 Input
IN[2] 18 Input
TYPE 3 Type of selection
(3 = Average)

Example 1 Alternate

The following example shows the above Select block with the option to override the selection
process. When the point OVERRIDE is true, the Select block will output the value of IN[1],
which is 12. When the point OVERRIDE is false, the Select block will output the average the
inputs, which is 12.667.

DYNAMIC_BOOL: OVERRIDE
When true the Select1_Alt block will override. When false the Select1_Alt block will function
normally.

SELECT: SELECT1_ALT
Example of select block calculating an average with the option to override the selection
Parameter Assignment UOM Description
IN 3 size Input
IN[0] 10
IN[1] 12
IN[2] 18
SELECTMA EQUATION Auto/Manual switch on selection
Equation: ! OVERRIDE
TYPE 3 Type of selection
(3 = Average)
SELECT 1 Index of input selected
Select In[1] when SelectMA = 0

Controls 193
Select

Data Entry Window Usage


Connections Tab

Type of selection
Type of selection corresponds to the Type parameter. Select Average, Highest, Lowest, or
Median.

Inputs
Input parameter reference corresponds to the In parameter. The input value is specified here.
Gain corresponds to the K_In parameter. The gain on the input value can be specified here.
Bias corresponds to the B_In parameter. The bias on the input value can be specified here.

Output
High limit of output corresponds to the Hi_Out parameter. Set the upper limit for the output
value, if the upper limit should be limited.

Low limit of output corresponds to the Lo_Out parameter. Set the lower limit for the output
value, if the lower limit should be limited.

Controls 194
Select

Parameter Table - Select


Configuration and Inputs
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Type Type of selection Yes No KI 3
0 – Highest
1 – Lowest
2 – Median
3 – Average
In Input Yes No DF
K_In Input gain Yes In No KF
B_In Input bias Yes In No KF
SelectMA Auto/Manual switch Yes No DI 1
on selection

Outputs
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Out Output No Yes DF 0.0
HiLim Flag to indicate hi No Yes DI 0
limit reached
LoLim Flag to indicate lo No Yes DI 0
limit reached
Selected Index of input No Yes DI 0
selected
Indication of which
input is selected.
This parameter is
set to 0 when in
average selection
mode. When the
SelectMA parameter
is 0, this parameter
may be set
externally,
otherwise it will be
determined by the
Select block
algorithm

Tracking
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Trk_In Value to track input No In No DF 0
TrkFlag_ Flag for input No In No DI 0
In tracking
Trk_ Value to track No No DF 0

Controls 195
Select

ManSet manset
TrkFlag_M Flag for manset No No DI 0
anSet tracking

Auto, Manual and Override Control


Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
MA Auto/Manual switch Yes No SI 1
0 – Manual
1 – Automatic
SDCS DCS override switch Yes No SI 0
0 – Execute
1 – Override
AutSW Auto override Yes No DI 0
switch
When set to 1, this
value will force the
MA parameter to 1
ManSW Manual override Yes No DI 0
switch
When set to 1, this
value will force the
MA parameter to 0

Manual Setpoint
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
ManSet Value to set output Yes No SF 0
when in manual
ManRate Maximum rate to Yes No KF
move output when
in manual
If this parameter is
not initialized, the
output rate of
change will not be
limited

Output Value Limiting


Parameter Description UOM Eqt Array Sort Pnt Pnt
Name OK Size Out Dft Dft
Cls Val
Lo_Out Low limit of output Yes No KF
If not specified, the
output will not be
limited by a low
limit
Hi_Out Hi limit of output Yes No KF
If not specified, the

Controls 196
Select

output will not be


limited by a high
limit
AltOut Alternate outputs No No DF
Each element in this
array will be set to
the value of Out,
unless the SDCS
flag is set to 1

Tracking Values and Flags


Parameter Description UOM Eqt Array Sort Pnt Pnt
Name OK Size Out Dft Dft
Cls Val
Trk Track input value Yes No DF 0
The value to which
the output will be set
when in tracking
mode. This value
will be set
automatically by the
next block in the
control loop when
implicit tracking is
implemented in that
block
TrkFlag Track input flag Yes No DI 0
Integer flag used to
determine tracking
mode.
This parameter is an
input from the next
block in the control
loop. In implicit
tracking operation,
this parameter is
automatically set by
the next block in the
loop.
BIT 1 = Track TRK
(Integer value 1)
BIT 2 = Raise
Inhibit (track if Out
>= Trk)(Integer
value 2)
BIT 3 = Lower
Inhibit (track if Out
<= Trk)(Integer
value 4)

Controls 197
Select

TrkDisable Track disable flag Yes No KI 0


Disables any or all
modes of tracking
BIT 1 = Disable
Track (Integer value
1)
BIT 2 = Disable
Raise Inhibit
(Integer value 2)
BIT 3 = Disable
Lower Inhibit
(Integer value 4)
TrkImplicit Track implicit flag Yes No KI 1
When this value is
set to 1, implicit
tracking will be
implemented. To
disable implicit
tracking set the
parameter to 0

Legend:

Dfl Cls Default parameter model:


KB - Static Boolean SB - State Boolean DB - Dynamic Boolean
KI - Static Integer SI - State Integer DI - Dynamic Integer
KF - Static Float SF - State Float DF - Dynamic Float
KD - Static Double SD - State Double DD - Dynamic Double

Dft Val A value here indicates the parameter’s default value. If the parameter is static and no
value is indicated, then it (parameter value) is optional unless otherwise specified.
Eq Ok An equation can be attached to the parameter if the corresponding value is Yes.
Arr Siz A value here indicates the size of the array. No value indicates that the parameter is
not a vector.
UOM Internal units of measure

Controls 198
Sum

Sum

Introduction
Sum extends XferAnaBase

The Sum object class sets the output to the summation of any number of gained and biased
inputs.

The Sum object class adheres to the standard Analog model conventions.

Fundamentals

The Sum object class calculates sum of gained and biased inputs and then limits the output as
follows:

Inputs
Out = LIMV [ ∑i =0
(K_In[i] * In[i] + B_In[i]), Lo_Out, Hi_Out]

where: K_In = Input gain array

B_In = Input bias array

In = Input array
Lo_Out = Low limit of output

Hi_Out = High limit of output

Out = Output

Tracking
Only the first In parameter (index 0) is tracked when the object is in manual or receiving a
tracking request from another object.

Examples

Example 1

The following example shows a Sum block. The block performs the following calculation:

Out = 3.0+4.0+4.7+8.1+9.0 = 28.8

Controls 199
Sum

SUM: SUM1
Example Sum block
Parameter Assignment UOM Description
IN 5 size Input
IN[0] 3.0
IN[1] 4.0
IN[2] 4.7
IN[3] 8.1
IN[4] 9.0

Data Entry Window


Connections Tab

Inputs

Input parameter reference corresponds to the In parameter. The input value is specified here.
Gain corresponds to the K_In parameter. The gain on the input value can be specified here.
Input bias corresponds to the B_In parameter. The bias on the input value can be specified here.

Output
High limit of output corresponds to the Hi_Out parameter. Set the upper limit for the output
value, if the upper limit should not be limited to 1.

Controls 200
Sum

Low limit of output corresponds to the Lo_Out parameter. Set the lower limit for the output
value, if the lower limit should not be limited to zero.

Parameter Table
Inputs
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
In Input Yes User No DF
defined
K_In Input gain Yes In No KF
B_In Input bias Yes In No KF

Outputs
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Out Output No Yes DF 0
HiLim Flag to indicate No Yes DI 0
hi limit reached
LoLim Flag to indicate No Yes DI 0
lo limit reached

Tracking
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Trk_In Value to track No No DF 0
input to
TrkFlag_ Flag for input No No DI 0
In tracking
Trk_ Value to track No No DF 0
ManSet manset to
TrkFlag_ Flag for manset No No DI 0
ManSet tracking

Auto, Manual and Override Control


Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
MA Auto/Manual Yes No SI 1
switch
0 – Manual
1 – Automatic
SDCS DCS override Yes No SI 0
switch
0 – Execute
1 – Override
AutSW Auto override Yes No DI 0
switch
When set to 1,
this value will

Controls 201
Sum

force the MA
parameter to 1
ManSW Manual override Yes No DI 0
switch
When set to 1,
this value will
force the MA
parameter to 0

Manual Setpoint
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
ManSet Value to set Yes No SF 0
output when in
manual
ManRate Maximum rate Yes No KF
to move output
when in manual
If this parameter
is not initialized,
the output rate
of change will
not be limited

Output Value Limiting


Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Lo_Out Low limit of Yes No KF
output
If not specified,
the output will
not be limited by
a low limit
Hi_Out Hi limit of output Yes No KF
If not specified,
the output will
not be limited by
a high limit
AltOut Alternate outputs No No DF
Each element in
this array will be
set to the value of
Out, unless the
SDCS flag is set
to 1

Tracking Values and Flags


Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val

Controls 202
Sum

Trk Track input value Yes No DF 0


The value to
which the output
will be set when
in tracking mode.
This value will be
set automatically
by the next block
in the control
loop when
implicit tracking
is implemented in
that block
TrkFlag Track input flag Yes No DI 0
Integer flag used
to determine
tracking mode.
This parameter is
an input from the
next block in the
control loop. In
implicit tracking
operation, this
parameter is
automatically set
by the next block
in the loop.
BIT 1 = Track
TRK (Integer
value 1)
BIT 2 = Raise
Inhibit (track if
Out >=
Trk)(Integer
value 2)
BIT 3 = Lower
Inhibit (track if
Out <=
Trk)(Integer
value 4)
TrkDisable Track disable Yes No KI 0
flag
Disables any or
all modes of
tracking
BIT 1 = Disable
Track (Integer
value 1)
BIT 2 = Disable

Controls 203
Sum

Raise Inhibit
(Integer value 2)
BIT 3 = Disable
Lower Inhibit
(Integer value 4)
TrkImplicit Track implicit Yes No KI 1
flag
When this value
is set to 1,
implicit tracking
will be
implemented. To
disable implicit
tracking set the
parameter to 0

Legend:

Dfl Cls Default parameter model:


KB - Static Boolean SB - State Boolean DB - Dynamic Boolean
KI - Static Integer SI - State Integer DI - Dynamic Integer
KF - Static Float SF - State Float DF - Dynamic Float
KD - Static Double SD - State Double DD - Dynamic Double

Dft Val A value here indicates the parameter’s default value. If the parameter is static and no
value is indicated, then it (parameter value) is optional unless otherwise specified.
Eq Ok An equation can be attached to the parameter if the corresponding value is Yes.
Arr Siz A value here indicates the size of the array. No value indicates that the parameter is
not a vector.
UOM Internal units of measure

Controls 204
SurgeCon

SurgeCon

Introduction
SurgeCon extends XferAnaBase

The Surge Controller is a PID controller that can protect a centrifugal compressor from surge. It
gets the surge control line and process variable (PV) from the compressor curve of the attached
compressor. It has a PID controller, which uses the error in Set Point (SP) obtained from the
surge control line and Process Value (PV) to take the necessary control action. It has low flow
trip and low flow alarm to protect the compressor from entering surge operation. It can also be
tripped by an external trip signal.

Please refer to the Base Equipment reference manual for documentation on the Compressor
model.

Fundamentals

Surge Control Line

The Surge Controller gets the surge control line and process variable (compressor volumetric
flow) from an attached compressor model. The instance name of the Compressor is assigned to
the parameter OCompressor to let the Surge Controller know from where it has to get the
operation specific data.

The surge control line is a line parallel to the actual surge line with intercept equal to the surge
offset at zero head. The proximity of the operating point to surge is defined in terms of Surge
Proximity. It takes the value less than 1 if the operating point is no in surge region, 1 when on
the surge line and greater than 1 when in the surge region.

SurgeLineFlow
SurgeProximity =
CompressorExitFlow

Controls 205
SurgeCon

Surge Controller Algorithm

The Surge controller has a built in PID controller.

Please refer to the PID model section in this manual for documentation on the PID algorithm.

Auto Mode

In the Auto mode, the PID algorithm sets the output. The PID controller uses the error obtained
from the Surge control line and the volumetric flow obtained from the compressor characteristic
curve, to control the surge flow. The surge controller output is the maximum of trip output and
the PID controller output.

Surge Output = Max( PID Output , Trip Output )

Manual Mode

In Manual mode, the user sets the PID output by adjusting the manual output slider. There are
two different ways in which the surge controller behaves in manual mode.

When the manual mode type is Allow_Trip

SurgeOutput = ManualOutput Not tripped


SurgeOutput = TripOutput Tripped

When the manual mode type is Trip_Override

Surge Output = ManualOutput

Controls 206
SurgeCon

The manual mode type can be selected using the MANTYPE parameter.

Low Flow Trip and External Trip

The trip fraction (TripFrac) is defined as a fraction of surge offset. Specifying the trip fraction
sets the trip flow at zero head. The trip line passes through this point and is parallel to the surge
line. If TripFrac is 1, then the control line and the trip line overlap. If TripFrac is 0, the trip line
and the surge line overlap. When the operating point goes to the left of the trip line, the surge
controller trips and the trip output goes to 100%. It will be held at this value for a time period
equal to the TimeDead even if the operating point goes into the normal operating zone. Once the
TimeDead is elapsed, the controller output reaches PID output value by a first order lag, based on
the TimeDecay.

The surge controller can also be tripped manually or based on any user defined trip logic. The
output of the trip logic is given as an input to the parameter ExternalTrip. The external trip gets
preference over the low flow trip.

Controller Modes

The SurgeCon model provides three different modes for control; they are Auto, Manual and DCS
override modes. The figure below shows the operate panel for Surge controller with different
modes.

Controls 207
SurgeCon

Auto

The SurgeCon algorithm controls the output as described in the Surge Controller Algorithm
section.

Manual

The SurgeCon algorithm controls the output as described in the Surge Controller Algorithm
section.

DCS Override Mode

In DCS override mode, the PID output will be set to DCS output. The DCS control can be
implemented by cross-referencing of parameters. For details on cross-referencing refer to Users
Guide.

Low Flow Alarm

The low flow alarm (AlarmFlow) is the threshold value of the compressor exit flow below which
the surge controller gives an alarm. It is indicated by the parameter LowFlowStatus, whose
output goes from 0 to 1 under these conditions.

Controls 208
SurgeCon

Examples

The following example shows the configuration of a surge controller. A surge controller is used
to prevent the compressor from going into surge when the downstream header pressure increases
due to a malfunction in the downstream valve.

The surge controller PV and SP are obtained from the compressor COMP1, therefore the
compressor object OCompressor is set to COMP1. At steady state the compressor flow is 0.5
m3/sec for a head of 92 kJ/kg, surge flow is 0.1 m3/sec. It is desired that the surge controller
takes action as the flow goes below 0.4 m3/sec, so the surge offset is set to 0.3 m3/sec. The
controller action should be fast and the flow is expected not to go below 0.25 m3/sec, hence the
proportional gain (Kp) and integral gain (Ki) are set to a value of 1. The compressor is expected
to trip below 0.25 m3/sec. The trip flow at zero head is 0.15 m3/sec, which is 50% of the surge-
offset flow, therefore the trip fraction is 0.5. The surge controller should give alarm when the
flow goes below 0.3 m3/sec, so the alarm flow is set to this value.

SOURCE: SO1
Parameter Assignment UOM Description
OProdStream[0] S1 Source product stream connecting to the
valve V1
Mb[Air] 1 kg-mol Boundary composition
Spec PT Boundary condition specification.
Pb 150 kPa Boundary pressure
Tb 300 fraction Boundary temperature

Controls 209
SurgeCon

VALVE: V1
Parameter Assignment UOM Description
OFeedStream S1 Valve V1 feed stream connecting from
source SO1
OProdStream S2 Valve V1 product stream connecting to
Header H3
Cv 100 Cv Valve Cv
Op 1 fraction Valve open command

HEADER: H3
Parameter AssignmentUOM Description
OFeedStream[0] S2 Header feed stream coming from valve V1
OFeedStream[1] S8 Header feed stream connecting from Valve
SPLBK
OProdStream[0] S3 Header product stream connecting to
compressor COMP1
Vol 10 m3 Header Volume
SolutionOption Iterated Header solution option
DynamicsOption Compressible Header dynamics options

COMPRESSOR: COMP1
Parameter Assignment UOM Description
OFeedStream S3 Compressor feed stream connecting from
header H3
OProdStream S4 Compressor product stream connecting to
Header H2
UseDefaultCurve 1 Flag to use default curve
QScale 0.5 m3/sec Flow scaling factor
DHScale 92 kJ/kg Head scaling factor
SpeedRef 3600 rpm Compressor reference speed
Speed 3600 rpm Compressor reference speed

HEADER: H2
Parameter Assignment UOM Description
OFeedStream[0] S4 Header feed stream connecting from
compressor COMP1
OProdStream[0] S5 Header product stream connecting to valve
V2
OProdStream[1] S7 Header feed stream connecting from Valve
SPLBK
Vol 10 m3 Header volume
SolutionOption Iterated Header solution option
DynamicsOption Compressible Header dynamics options

Controls 210
SurgeCon

SURGECON: SC1
Parameter Assignment UOM Description
OCompressor COMP1 Instance name of the compressor is assigned
to this parameter.
SurgeOffset 0.3 m3/sec Surge offset value which determines the surge
control line
Kp 1 Proportional gain of the controller
Ki 1 Integral gain of the controller
AlarmFlow 0.3 m3/sec Alarm flow
TripFrac 0.5 fraction Fraction of surge offset which determines the
trip line

VALVE: SPLBK
Parameter Assignment UOM Description
OFeedStream S7 Valve SPLBK feed stream connecting from
Header H2
OProdStream S8 Valve SPLBK product stream connecting to
Header H3
Cv 100 Valve Cv
Op SC1.OUT Surge controller output signal given to the
Open command of the valve

VALVE: V2
Parameter Assignmen UOM Description
t
OFeedStream S5 Valve V2 feed stream connecting from Header
H2
OProdStream S6 Valve V2 product stream connecting to sink
SNK1
Cv 100 Cv Valve Cv
Op 1 fraction Valve open command

SINK: SNK1
Parameter Assignment UOM Description
OfeedStream[0] S6 Valve V2 product stream connecting to sink
Pb 250 kPa Sink

Controls 211
SurgeCon

Data Entry Window Usage


Basic Tab

Compressor Object
Compressor object corresponds to the OCompressor parameter. The compressor object name
from which the information like surge control line, trip line, set point, process value is obtained
is specified here.

Surge offset flow


Surge offset flow corresponds to the SurgeOffset parameter. The surge control line passes
though this point at zero head. The default value is 0 m3/sec, at which the surge line and surge
control line, will overlap. The user may have to specify this value for desired results.

Controls 212
SurgeCon

Tuning Constants
Proportional gain corresponds to the Kp parameter. This parameter should be initialized to
include proportional term in the controller output calculations. Higher proportional gain might
result in instability.
Integral gain corresponds to the Ki parameter. This parameter should be initialized to include
integral term in the controller output calculations. Higher integral gain might result in oscillatory
behavior.

Derivative gain corresponds to the Kd parameter. This parameter should be initialized to include
derivative term in the controller output calculations.

Derivative time corresponds to the Td parameter. This parameter should be initialized to include
derivative term in the controller output calculations.

Trip
Trip dead time corresponds to the TimeDead parameter. The surge controller output will be
held at 100% for this time, once the controller trips. The default value is 2, which can be used in
most cases.

Trip decay time corresponds to the TimeDecay parameter. The surge controller output decays to
1% in this time. The default value is 30, which can be used in most cases.

Alarm flow corresponds to the AlarmFlow parameter. If the compressor flow is less than this
value, the surge controller gives a low flow alarm. The default value is 0, which corresponds to
zero flow in the compressor. The user may have to set this value for correct behavior.

Fraction of offset corresponds the TripFrac parameter. The default value is 1, the trip and surge
lines overlap for this value. The surge control and the trip lines will overlap when this value is
set to 0. The trip line is generally close to the surge line, so use a value greater than 0.5. The
user may have to set this value for desired trip behavior.

Controls 213
SurgeCon

Connections Tab

The Connections Tab is used to set gain and bias for SP, PV and output.

Process Variables
Process variable gain corresponds to the K_PV parameter. The default value can be left in place
if the gain should not affect the user set PV.

Process variable bias corresponds to the B_PV parameter. The default value can be left in place
if the bias should not affect the user set PV

Set Point
Set point gain corresponds to K_SP parameter. The default value can be left in place if the gain
should not affect the user set SP

Set point bias corresponds to B_SP parameter. The default value can be left in place if the bias
should not affect the user set SP

Output
Bias on output corresponds to B_Out parameter. The default value can be left in place if the bias
should not affect the output.

Controls 214
SurgeCon

Parameter Table - SurgeCon


Configuration and Tuning
Parameter Dft Eq Array
Description UOM Dft Val
Name Cls Ok Size
Action Controller Action KI SP-PV No
PV-SP is direct acting
and SP-PV is reverse
acting.
0 – Direct
1 – Reverse
Kp Proportional Gain KI Yes
If this parameter is not
initialized, the
proportional part of the
algorithm will not be
added to the output
Ki Integral Gain KI Yes
If this parameter is not
initialized, the integral
part of the algorithm
will not be added to the
output.
Kd Derivative Gain KI Yes
If this parameter is not
initialized, the
derivative part of the
algorithm will not be
added to the output
Td Derivative Time KI Yes
If this parameter is not
initialized, the
proportional part of the
algorithm will not be
added to the output
TimeDead Trip dead time KF 2 No
Time during which the
trip output will be held
at 100% by the trip logic
TimeDecay Trip time decay KF 30 No
Time during which the
trip output will decay to
1%
ManType Manual mode type KI ALLOW No
This parameter _TRIP
determines the behavior
of the controller in
manual mode.
Allow_Trip allows the

Controls 215
SurgeCon

output to be set
manually but the trip
output can still override
it
With Trip_Override the
output always follows
the Manset, use this
option for tuning and
testing the surge
controller, as this turns
off the surge protection

Inputs
Parameter Dft Eq Array
Description UOM Dft Val
Name Cls Ok Size
OCompressor Compressor object No
The compressor object
from which the scaled
compressor curve
information is obtained
is specified here
SurgeOffset Surge offset flow m3/sec KF 0 No
Flow at zero head
through which the
control line passes.
Control line is parallel
to the Surge line
TripFrac Fraction of offset fraction KF 1 No
Fraction of the
SurgeOffset through
which the Trip line
passes at zero head.
The trip output is set to
1 when the operating
point goes beyond this
line. Usually close to
Surge line.
AlarmFlow Low flow alarm m3/sec KF 0 No
When the flow in the
compressor goes below
this value, the
LowAlarmStatus will
be set to 1

Controls 216
SurgeCon

TripExtern External trip DI 0 Ye


External trip signal s
from a user
configured trip logic
This has prefererance
over the Low flow
Trip
SP Set point m3/sec DF 0 Ye
The surge controller s
reads the set point
from the Control line.
K_SP Gain on set point KF 1 Ye
Actual SP = SP * s
K_SP +B_SP
B_SP Bias on set point m3/sec KF 0 Ye
Actual SP = SP * s
K_SP +B_SP
PV Process Variable m3/sec DF 0 Ye
The surge controller s
directly reads the
process variable
value from the scaled
compressor curve
K_PV Gain on process KF 1 Ye
variable s
Actual PV = PV *
K_PV +B_PV
B_PV Bias on process m3/sec KF 0 Ye
variable s
Actual PV = PV *
K_PV +B_PV
B_Out Bias on output DF 0 Ye
Actual Out = Out + s
B_Out
Gap_Hi Gap high KF 0 Ye
Value of error gap on s
positive side
Gap_Lo Gap low KF 0 Ye
Value of error gap on s
negative side
Gap_Slope Gap slope KF 0 Ye
Value of error gap s
slope

Controls 217
SurgeCon

Auto, Manual and Override Control


Parameter Dft Eq Array
Description UOM Dft Val
Name Cls Ok Size
MA Auto Manual Switch KI AUTO Yes
0 – Manual
1 – Automatic
SDCS DCS override switch KI EXECUTE Yes
0 – Execute
1 – Override
AutSW Auto override switch KI 0 Yes
When set to 1, the
system is set to auto
mode (MA = 1).
Default value is 0
ManSW Manual override switch KI 0 Yes
When set to 1, the
system is set to manual
mode (MA = 0). Has
preference over auto
override switch
(AutSw). Default value
is 0.

Manual Set point


Parameter UO Dft Eq Array
Description Dft Val
Name M Cls Ok Size
ManRate Maximum rate to move 1/sec KF Yes
output when in manual
mode
If this parameter is not
initialized the output
rate of change will not
be limited.
ManSet Manual set point KF 0 Yes
Value to set the output
to when in manual mode

Controls 218
SurgeCon

Output Value Limiting


Parameter Dft Dft Eq Array
Description UOM
Name Cls Val Ok Size
Lo_Out Low limit on output KF 0 Yes
If not specified, the output
will not be limited by low
limit
Hi_Out High limit on output KF 1 Yes
If not specified, the output
will not be limited by high
limit
AltOut Alternate output KF No
Each element in the array
will be set to out unless the
SDCS flag is set to 1

Outputs
Parameter Dft Dft Eq Array
Description UOM
Name Cls Val Ok Size
SurgeProx Surge proximity DF 0 No
Proximity to surge is < 1
when not in surge, =1 at
surge and >1 when to the
left of the surge line
PIDOut PID output DF 0 No
Output of PID controller
TripOut Trip output DF 0 No
Trip output is 0 when trip
not tripped and 1 when
tripped
Out Output DF 0 No
Maximum of PID output
and trip output
TripStat Trip status DI 0 No
0 - Not tripped
1 - Tripped
AlarmStat Low flow status DI 0 No
0- No alarm
1- Alarm
HiLim High limit flag DI DI 0 No
Flag to indicate high limit
has reached
0 - High limit not reached
1- High limit reached
LoLim Low limit flag DI DI 0 No
Flag to indicate low limit
has reached
0 - Low limit not reached
1- Low limit reached

Controls 219
SurgeCon

Internal Use Only


Parameter UO Dft Dft Eq Array
Description
Name M Cls Val Ok Size
Integral Saved integral values SF 0 No
dIntegral Derivative of integral values SF 0 No
Deriv Saved derivative values SF 0 No
dDeriv Derivative of derivative values SF 0 No
PrevError Previous value of error SF 0 No
PrevPV Previous value of PV SF 0 No

Tracking
Parameter UO Dft Dft Eq Array
Description
Name M Cls Val Ok Size
Trk_SP Value to track the set point to DF 0 No
TrkFlag_SP Flag for set point tracking DF 0 No
Trk_Manset Value to track the manual set DF 0 No
point to
TrkFlag_ Flag for manual set point DF 0 No
Manset tracking

Tracking Values and Flags


Parameter Dft Dft Eq Array
Description UOM
Name Cls Val Ok Size
Trk Track input value DF 0 Yes
The value to which the output
will be set when in tracking
mode. This value will be set
automatically by the next
block in the control loop when
implicit tracking is
implemented in that block
TrkFlag Track input flag DI 0 Yes
Integer flag used to determine
tracking mode. This
parameter is an input from
the next block in the control
loop. In implicit tracking
operation, this parameter is
set automatically by the next
block in the loop.
BIT 1 = Track TRK (Integer
value 1)
BIT 2 = Raise Inhibit (track if
Out >= Trk)(Integer value 2)
BIT 3 = Lower Inhibit (track
if Out <= Trk)(Integer value
4)
TrkDisable Track implicit KI 0 Yes

Controls 220
SurgeCon

Disables any or all modes of


tracking
BIT 1 = Disable Track
(Integer value 1)
BIT 2 = Disable Raise Inhibit
(Integer value 2)
BIT 3 = Disable Lower
Inhibit (Integer value 4)
TrkImplicit Track disable KI 1 Yes
Track implicit flag When this
value is set to 1, implicit
tracking will be implemented.
To disable implicit tracking
set the parameter to 2

Legend:

Dfl Cls Default parameter


model: SB - State Boolean DB - Dynamic Boolean
KB - Static Boolean SI - State Integer DI - Dynamic Integer
KI - Static Integer SF - State Float DF - Dynamic Float
KF - Static Float SD - State Double DD - Dynamic Double
KD - Static Double

Dft Val A value here indicates the parameter’s default value. If the parameter is static
and no value is indicated, then it (parameter value) is optional unless otherwise
specified.
Eq Ok An equation can be attached to the parameter if the corresponding value is Yes.
Arr Siz A value here indicates the size of the array. No value indicates that the
parameter is not a vector.
UOM Internal units of measure

Controls 221
Switch

Switch

Introduction
Switch extends XferAnaBase

The Switch object class allows the value of the analog output to be switched between 2 analog
inputs.

This object can be used to switch the valve demand between two controllers.

The Switch model adheres to the standard Analog model conventions.

Fundamentals

The output of the Switch object class is given by the following:

Out = LIMV [(1-Toggle)*(K_In1*In1 + B_In1) +


Toggle*(K_In2*In2 + B_In2), Lo_Out, Hi_Out]

where: In1 = First Input


In2 = Second Input
K_In1 = First Input gain
K_In2 = Second Input gain
B_In1 = First Input bias
B_In2 = Second Input bias
Toggle = Input toggle (0 for In1 and 1 for In2)
Lo_Out = Low limit of output
Hi_Out = High limit of output

Transition
By default, the switch object will switch instantly between inputs. The switch object can be
configured to ramp the transition from In1 to In2 using Ktime2 parameter, and from In2 to In1
using the Ktime1 parameter. In this case the equation above is lagged by Ktime1 or Ktime2
depending on the direction of the transfer.

The input not selected will be tracked. Both inputs will be tracked when in manual or override
mode.

Controls 222
Switch

Example

Example 1
The following switch example toggles instantly between two values.

DYNAMIC_BOOL: HI_SPD
When true the Switch1 block will output the second input (or the larger value). When false the
Switch1 block will output the first input (or the smaller value).

DYNAMIC_BOOL: HI_SPD
When true the Switch1 block will output the second input (or the larger value). When false the
Switch1 block will output the first input (or the smaller value).

SWITCH: SWITCH3
Example Switch that toggle instantly
Parameter Assignment UOM Description
IN1 5.0 Input 1
IN2 10.0 Input 2
TOGGLE HI_SPD Toggle switch

Example 1 Alternate
The following switch example ramps between two values. The transfer rate from 1 to 2 is 5
times slower than the transfer rate from 2 to 1.

Controls 223
Switch

DYNAMIC_BOOL: HI_SPD
When true the Switch1 block will output the second input (or the larger value). When false the
Switch1 block will output the first input (or the smaller value).

SWITCH: SWITCH3_ALT
Example Switch that ramps
Parameter Assignment UOM Description
IN1 5.0 Input 1
IN2 10.0 Input 2
KTIME1 1 sec Time constant for xfer from 2 to 1
KTIME2 5 sec Time constant for xfer from 1 to 2
TOGGLE HI_SPD Toggle switch

Controls 224
Switch

Data Entry Window Usage


Connections Tab

Input 1
Input parameter reference 1 corresponds to the In1 parameter. Specify the input parameter for
the first parameter.

Gain on input 1 corresponds to the K_In1 parameter. The default value can be left in place if a
gain on the first input value is not required.

Bias on input 1 corresponds to the B_In1 parameter. The default value can be left in place if a
bias on the first input value is not required.

Input 2
Input parameter reference 2 corresponds to the In2 parameter. Specify the input parameter for
the second parameter.

Controls 225
Switch

Gain on input 2 corresponds to the K_In2 parameter. The default value can be left in place if a
gain on the second input value is not required.

Bias on input 2 corresponds to the B_In2 parameter. The default value can be left in place if a
bias on the second input value is not required.

Output
High limit of output corresponds to the Hi_Out parameter. Set the upper limit for the output
value, if the upper limit should be limited.

Low limit of output corresponds to the Lo_Out parameter. Set the lower limit for the output
value, if the lower limit should be limited.

Parameter Table - Switch


Inputs
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
In1 Input 1 Yes No KF 0
K_In1 Gain on input 1 Yes No KF 1
B_In1 Bias on input 1 Yes No KF 0
In2 Input 2 Yes No KF 0
K_In2 Gain on input 2 Yes No KF 1
B_In2 Bias on input 2 Yes No KF 0
Toggle Toggle Switch Yes No SI 0
0 = Select In1
1 = Select In2
KTime1 Time Constant sec Yes No KF
for xfer from 2 to
1
If this parameter
is not initialized,
then transfer is
instantaneous
KTime2 Time Constant sec Yes No KF
for xfer from 1 to
2
If this parameter
is not initialized,
then transfer is
instantaneous

Outputs
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Out Output No Yes DF 0
HiLim Flag to indicate No Yes DI 0
hi limit reached

Controls 226
Switch

LoLim Flag to indicate No Yes DI 0


lo limit reached

Tracking
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Trk_In1 Value to track No No DF 0
Inp1
TrkFlag_ Flag for Inp1 No No DI 0
In1 tracking
Trk_In2 Value to track No No DF 0
Inp2
TrkFlag_ Flag for Inp2 No No DI 0
In2 tracking
Trk_ Value to track No No DF 0
ManSet manset
TrkFlag_ Flag for manset No No DI 0
ManSet tracking

Internal Use Only


Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
ToggleOld Previous Toggle No No SI 0
Switch
Initxfer Value of output No No SF 0
at start of transfer
Timexfer Time since start sec No No SF 99999
of transfer 9
The output is set
to the selected
input when this
parameter is >=
the time constant
(KTime1 or
KTime2)

Auto, Manual and Override Control


Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
MA Auto/Manual Yes No SI 1
switch
0 – Manual
1 – Automatic
SDCS DCS override Yes No SI 0
switch
0 – Execute
1 – Override
AutSW Auto override Yes No DI 0
switch

Controls 227
Switch

When set to 1, this


value will force
the MA parameter
to 1
ManSW Manual override Yes No DI 0
switch
When set to 1, this
value will force
the MA parameter
to 0

Manual Setpoint
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
ManSet Value to set Yes No SF 0
output when in
manual
ManRate Maximum rate to Yes No KF
move output
when in manual
If this parameter
is not initialized,
the output rate of
change will not
be limited

Output Value Limiting


Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Lo_Out Low limit of Yes No KF
output
If not specified,
the output will
not be limited by
a low limit
Hi_Out Hi limit of output Yes No KF
If not specified,
the output will
not be limited by
a high limit
AltOut Alternate outputs No User No DF
Each element in Define
this array will be d
set to the value of
Out, unless the
SDCS flag is set
to 1

Tracking Values and Flags

Controls 228
Switch

Parameter Description UOM Eqt Array Sort Dft Dft


Name OK Size Out Cls Val
Trk Track input value Yes No DF 0
The value to which
the output will be set
when in tracking
mode. This value will
be set automatically
by the next block in
the control loop when
implicit tracking is
implemented in that
block
TrkFlag Track input flag Yes No DI 0
Integer flag used to
determine tracking
mode. This
parameter is an input
from the next block in
the control loop. In
implicit tracking
operation, this
parameter is
automatically set by
the next block in the
loop.
BIT 1 = Track TRK
(Integer value 1)
BIT 2 = Raise Inhibit
(track if Out >=
Trk)(Integer value 2)
BIT 3 = Lower
Inhibit (track if Out
<= Trk)(Integer
value 4)
TrkDisable Track disable flag Yes No KI 0
Disables any or all
modes of tracking
BIT 1 = Disable
Track (Integer value
1)
BIT 2 = Disable
Raise Inhibit (Integer
value 2)
BIT 3 = Disable
Lower Inhibit
(Integer value 4)
TrkImplicit Track implicit flag Yes No KI 1
When this value is set

Controls 229
Switch

to 1, implicit tracking
will be implemented.
To disable implicit
tracking set the
parameter to 0

Legend:

Dfl Cls Default parameter model:


KB - Static Boolean SB - State Boolean DB - Dynamic Boolean
KI - Static Integer SI - State Integer DI - Dynamic Integer
KF - Static Float SF - State Float DF - Dynamic Float
KD - Static Double SD - State Double DD - Dynamic Double

Dft Val A value here indicates the parameter’s default value. If the parameter is static and no
value is indicated, then it (parameter value) is optional unless otherwise specified.
Eq Ok An equation can be attached to the parameter if the corresponding value is Yes.
Arr Siz A value here indicates the size of the array. No value indicates that the parameter is
not a vector.
UOM Internal units of measure

FAQ

Q. How do I configure the switch output to ramp from one input to the other input?

A. Use the KTime1 parameter to control the output ramping from In2 to In1. Use the KTime2
parameter to control the output ramping from In1 to In2.

Q. How do I configure the Toggle parameter from the Data Entry Window?

A. You can not. Use Object Editor Viewer to configure the Toggle parameter.

Controls 230
Timer

Timer

Introduction
Timer extends ModelObject

The Timer object class allows for a variety of different timing functions. There are six different
types of timers available:

1. Pulse Timer
2. Extended Pulse Timer
3. On Delay Timer
4. Stored On Delay Timer
5. Off Delay Timer
6. Inverse Timer

The Timer object class adheres to the standard Digital model conventions.

Fundamentals

The digital Timer object class allows the output to be set true based on the value of the Start and
Reset inputs as well as the time expired. There are six different types of timers available.

Pulse Timer (Type 1)

The OUT is true while the START is true. The duration of the OUT true will not exceed the
PRESET.

Typical uses
• Create a pulse from a maintained signal (one shot)

Controls 231
Timer

Extended Pulse Timer (Type 2)

The OUT is true for the duration of the PRESET when the START is true (regardless of the
duration of the START).

Typical uses
• Create a start pulse from start pushbutton input

On Delay Timer (Type 3)

The OUT is true after START has been true for the duration of PRESET.

Typical uses
• Create an auto start pulse after a permissive has been met for a specific time.

Controls 232
Timer

Stored On Delay Timer (Type 4)

The OUT is true after a delay of PRESET from when START is true.

Typical uses

Off Delay Timer (Type 5)

The OUT is true when START is true. The OUT remains true for PRESET after START is
false.

Typical uses

Controls 233
Timer

Inverse Timer (Type 6)

The TABLE “cintrp1” array contains the analog trip value (in the same units as the IN
parameter) in the X column, and the time to trip if at that value in the Y column. The first X
value in the table (stored in TABLE[2]) array location specifies the minimum value required by
the input in order for the timer to accumulate time. The algorithm for the timer accumulation is
as follows:

When the input has exceeded a certain threshold for a specific time, the OUT is true.

If ( TIMING ) Then
ACCUM = ACCUM + PERIOD / cintrp1( IN, TABLE )
EndIF

Typical uses
• Create a trip pulse when the measured value has exceeded an allowable limit for a
certain time such as a motor overcurrent trip

EXAMPLES

Example 1

The following example shows a Pulse timer. The configuration of the Extended Pulse, On
Delay, Stored On Delay, and Off Delay Timers are similar.

DYNAMIC_INT: START_PB
This point is linked to a start pushbutton

Controls 234
Timer

DYNAMIC_INT: RESET_PB
This point is linked to a reset pushbutton

TIMER: TIMER1
Example pulse timer
Parameter Assignment UOM Description
PRESET 1.0 sec Preset Time
TYPE 1 Type of Timer
(1 = PULSE)
RESET RESET_PB Reset Input
START START_PB Start Input

Example 2

The following example shows an Inverse timer that times motor overcurrent. The static float
point K_MTR_OC contains the table of currents and times. If the motor current is 10 amps for a
total of 60 seconds, then the timer will trip the motor. If the motor current is 30 amps for a total
of 30 seconds, then the timer will trip the motor. Note that the motor only shows the connection
from the timer.

This example is for illustrative purposes. The MOTOR class has its own internal overcurrent
trip. See the MOTOR class in the ElecGrid library documentation.

MOTOR: MTR
Motor
Parameter Assignment UOM Description
TRIPEXT TIMER6.OUT External Trip

STATIC_FLOAT: K_MTR_OC
Table of motor current (amps) vs trip time (sec)

TIMER: TIMER6
Example inverse timer
Parameter Assignment UOM Description
TYPE 6 Type of Timer
(6 = INVERSE)
IN MTR.I Analog
START MTR.POS Start Input

Controls 235
Timer

Data Entry Window Usage

Configurations and Connections Tab

Configuration
Type of timer corresponds to the Type parameter. Select Pulse, Extended Pulse, On Delay,
Stored On Delay, Off Delay, Off Delay or Inverse.

Preset time corresponds to the Preset parameter. Specify the preset time for the timer. This is
not applicable for Inverse timer.

Pointer to cintrp table corresponds to the Table parameter. This should point to the first element
of a cintrp 1 table used to determine trip level vs time for an inverse timer. This is disabled for
Inverse timer.

Connections
Start input signal corresponds to the Start parameter. Specify the start signal.

Invert start input signal corresponds to the Inv_Start parameter. Select the check box if the start
signal has to be inverted.

Reset input signal corresponds to the Reset parameter. Specify the reset signal.

Controls 236
Timer

Invert reset input signal corresponds to the Inv_Reset parameter. Select the check box if the
reset signal has to be inverted.

Analog input parameter reference corresponds to the In parameter. Specify the analog input
parameter.

Invert output signal


Invert output signal corresponds to the Inv_Out parameter. Select the check box if the output
signal is required.

Parameter Table - Timer


Configuration and Status
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Type Type of timer Yes No KI 3
1 – PULSE
2 – EXTENDED
PULSE
3 – ON DELAY
4 – STORED ON
DELAY
5 – OFF DELAY
6 – INVERSE
MA Auto/Manual switch Yes No SI 1
0 – Manual
1 – Automatic
SDCS DCS override switch Yes No SI 0
0 – Execute
1 – Override
Preset Preset time Yes No KF 0
Timer output turns
true only when the
accumulated time
exceeds the preset
time. This parameter
is not applicable for
timer type
INVERSE.
Table Pointer to cintrp No No KF 0
table
This should point to
the first element of a
cintrp1 table used to
determine trip level
vs. time for an
INVERSE timer.

Controls 237
Timer

Inputs
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Start Start input Yes No KI 0
The time
accumulation starts
after the start signal
changes state from
false to true.
Inv_Start Invert option for Yes No KI 0
start input
Set this flag to true
to invert the start
signal.
Reset Reset input Yes No KI 0
Set this flag to true
to rest the input
signal.
Inv_Reset Invert option for Yes No KI 0
reset input
Set this flag to true
to invert the reset
signal.
In Analog input Yes No DF 0
parameter reference
This is applicable
for timer type
INVERSE. The trip
timings for
corresponding value
of analog input are
to be provided in the
interpolation table
reference.
Inv_Out Invert the output Yes No KI 0
signal
Set this flag to to
true to invert the
output signal.

Outputs
Parameter Description UOM Eqt Array Sort Dft Dft
Name OK Size Out Cls Val
Out Output signal No Yes DI 0

Internal Use Only


Parameter Description UOM Eqt Arra Sort Dft Dft
Name OK y Out Cls Val
Size

Controls 238
Timer

PrevStart Previous No No DI 0
conditioned start
value
Saved value of
conditioned start
value during last
time step.
Timing Timing status No No SI 0
1 - Timing in
progress
Accum Accumulated time No No SF 0
This parameter
shows the time
accumulated by the
timer.

Legend:

Dfl Cls Default parameter model:


KB - Static Boolean SB - State Boolean DB - Dynamic Boolean
KI - Static Integer SI - State Integer DI - Dynamic Integer
KF - Static Float SF - State Float DF - Dynamic Float
KD - Static Double SD - State Double DD - Dynamic Double

Dft Val A value here indicates the parameter’s default value. If the parameter is static and no
value is indicated, then it (parameter value) is optional unless otherwise specified.
Eq Ok An equation can be attached to the parameter if the corresponding value is Yes.
Arr Siz A value here indicates the size of the array. No value indicates that the parameter is
not a vector.
UOM Internal units of measure

FAQ

Q. Why are there no examples for Extended Pulse, On Delay, Stored On Delay, and Off
Delay Timers?

A. The configuration of those timers is identical to the Pulse timer shown in Example 1.

Controls 239
XferAnaBase

XferAnaBase

Discussion
XferAnaBase extends ModelObject

This base model provides common functionality for all Analog transfer function models. This
functionality includes Auto, Manual and Override modes, as well as output limiting and tracking
parameters.

Parameter Table - XferAnaBase


Auto, Manual and Override Control
Name Description UOM Eqt Array Sort Dft Dft
OK Size Out Cls Val
MA Auto/Manual switch Yes No SI 1
0 – Manual
1 – Automatic
SDCS DCS override switch Yes No SI 0
0 – Execute
1 – Override
AutSW Auto override Yes No DI 0
switch
When set to 1, this
value will force the
MA parameter to 1
ManSW Manual override Yes No DI 0
switch
When set to 1, this
value will force the
MA parameter to 0

Manual Setpoint
Name Description UOM Eqt Array Sort Dft Dft
OK Size Out Cls Val
ManSet Value to set output Yes No SF 0
when in manual
ManRate Maximum rate to Yes No KF
move output when
in manual
If this parameter is
not initialized, the
output rate of
change will not be
limited

Output Value Limiting

Controls 240
XferAnaBase

Name Description UOM Eqt Array Sort Dft Dft


OK Size Out Cls Val
Lo_Out Low limit of output Yes No KF
If not specified, the
output will not be
limited by a low limit
Hi_Out Hi limit of output Yes No KF
If not specified, the
output will not be
limited by a high limit
AltOut Alternate outputs No No DF
Each element in this
array will be set to
the value of Out,
unless the SDCS flag
is set to 1

Tracking Values and Flags


Name Description UOM Eqt Array Sort Dft Dft
OK Size Out Cls Val
Trk Track input value Yes No DF 0
The value to which
the output will be set
when in tracking
mode. This value
will be set
automatically by the
next block in the
control loop when
implicit tracking is
implemented in that
block
TrkFlag Track input flag Yes No DI 0
Integer flag used to
determine tracking
mode.
This parameter is an
input from the next
block in the control
loop. In implicit
tracking operation,
this parameter is
automatically set by
the next block in the
loop.
BIT 1 = Track TRK
(Integer value 1)
BIT 2 = Raise
Inhibit (track if Out

Controls 241
XferAnaBase

>= Trk)(Integer
value 2)
BIT 3 = Lower
Inhibit (track if Out
<= Trk)(Integer
value 4)
TrkDisable Track disable flag Yes No KI 0
Disables any or all
modes of tracking
BIT 1 = Disable
Track (Integer value
1)
BIT 2 = Disable
Raise Inhibit
(Integer value 2)
BIT 3 = Disable
Lower Inhibit
(Integer value 4)
TrkImplicit Track implicit flag Yes No KI 1
When this value is
set to 1, implicit
tracking will be
implemented. To
disable implicit
tracking set the
parameter to 0

Legend:

Dfl Cls Default parameter model:


KB - Static Boolean SB - State Boolean DB - Dynamic Boolean
KI - Static Integer SI - State Integer DI - Dynamic Integer
KF - Static Float SF - State Float DF - Dynamic Float
KD - Static Double SD - State Double DD - Dynamic Double

Dft Val A value here indicates the parameter’s default value. If the parameter is static and no
value is indicated, then it (parameter value) is optional unless otherwise specified.
Eq Ok An equation can be attached to the parameter if the corresponding value is Yes.
Arr Siz A value here indicates the size of the array. No value indicates that the parameter is
not a vector.
UOM Internal units of measure

Controls 242
Invensys Systems, Inc.
26561 Rancho Parkway South
Lake Forest, CA 92630
United States of America
http://iom.invensys.com

Global Customer Support


Inside U.S.: 1-866-746-6477
Outside U.S.: 1-508-549-2424 or contact your
local Invensys Representative.
Email: [email protected]
Website: http://support.ips.invensys.com

You might also like