Controls
Controls
®
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.
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
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.
Summary of Models
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
Base Models
These are not for stand-alone use. Use a derived model instead.
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.
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.
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.
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:
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.
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
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
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.
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
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
RLIMIT: RLIMIT2
Ramp user input
Parameter Assignment UOM Description
RATE 0.2 Output rate limit
IN Input
Controls 11
Controls Examples
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
Controls 13
Controls Examples
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
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
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
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
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
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
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
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
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.
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.
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.
hr
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.
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
σ
RC − 1
hr =
σ (3)
where:
RC = pd / ps (Pressure ratio)
σ = Exponent of polytropic compression
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.
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
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
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.
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:
f1 ( ) = Y Coordinate Characterizer
f3 ( ) = X Coordinate Characterizer
f5 ( ) = General Characterizer
Ps = Suction Pressure
K ⋅ f 1 [hr ⋅ f 3 ( N )] ⋅ f 5 ( Z ) ⋅
Pd ⋅ Ts
SS = (12)
∆Pventuri ,disch arg e (OP)
where:
f1 ( ) = Y Coordinate Characterizer
f3 ( ) = X Coordinate Characterizer
Controls 33
Anti-Surge Controller
f5 ( ) = General Characterizer
Ps = Suction Pressure
Pd = Discharge Pressure
Td = Discharge Temperature
Ts = Suction Temperature
K ⋅ f1 [hr ⋅ f 3 (0)] ⋅ f 5 ( Z ) ⋅ Ps
SS = (13)
∆Pventuri , suction (OP)
where:
f1 ( ) = Y Coordinate Characterizer
f3 ( ) = X Coordinate Characterizer
f5 ( ) = General Characterizer
Ps = Suction Pressure
where:
Controls 34
Anti-Surge Controller
f1 ( ) = Y Coordinate Characterizer
f3 ( ) = X Coordinate Characterizer
f5 ( ) = General Characterizer
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).
where:
CR D = Derivative Response
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).
where:
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:
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:
Td 0 = CR D time constant
Controls 37
Anti-Surge Controller
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.
where:
DEV = Deviation
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
dS
CR RT = C1 ⋅ Td1 × S − C 0 ⋅ dev RT (22)
dt
where:
Controls 38
Anti-Surge Controller
C1 , C 0 , and Td1 are constants supplied by the plant controller configuration data. devRT is
calculated as follows.
where:
The recycle trip line distance, bias, and characterizer will be supplied by the plant
controller configuration data.
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
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.
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
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:
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.
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
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
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
Controls 46
Anti-Surge Controller
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
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
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
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.
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.
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.
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.
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
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.
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.
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.
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
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.
Curves Tab
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
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.
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
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
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
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
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
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
Controls 72
Anti-Surge Controller
Controls 73
Anti-Surge Controller
Controls 74
Anti-Surge Controller
Outputs
Controls 75
Anti-Surge Controller
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
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
Controls 77
Anti-Surge Controller
Legend:
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.
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
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
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
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
Controls 85
Calc
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:
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
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
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
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
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:
Controls 92
Cntr
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
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.
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
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
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
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
Controls 99
DSwitch
Legend:
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.
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:
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 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
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
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
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
Controls 109
FctGen
Each element in
this array will be
set to the value of
Out, unless the
SDCS flag is set to
1
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:
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
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.
Fundamentals
Latch executes the following equation when the SetDom is false (Reset is dominant):
where:
Reset - Reset signal
Set - Set signal
Out - Output
Latch executes the following equation when the SetDom is true (Set is dominant):
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
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.
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
Legend:
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
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
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
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
Controls 121
LeadLag
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
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
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:
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
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
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.
Legend:
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
FAQ
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.
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.
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
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
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
Legend:
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
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.
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
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
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.
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
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.
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
Controls 140
PID
Parallel
100%
PB =
Kp
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:
Error calculation
The proportional and derivative parts of PID algorithm except for Legacy can be calculated in
one of the following two ways:
Error =
(SP ∗ K _ SP + B _ SP ) − (PV ∗ K _ PV + B _ PV )
Hi _ In − Lo _ In
Controls 141
PID
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:
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)
( SP ∗ K _ SP + B _ SP) − ( PV ∗ K _ PV + B _ PV )
Error =
Hi _ In − Lo _ In
d
Integral = Ki ∗ Error
dt
Controls 142
PID
( SP ∗ K _ SP + B _ SP) − ( PV ∗ K _ PV + B _ PV )
Error =
Hi _ In − Lo _ In
Controls 143
PID
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
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.
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.
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
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
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
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
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
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
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
Controls 161
PID
Controls 162
PID
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.
Controls 164
PID
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:
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:
where: In = Input
K_In = Input Gain
B_In = Input Bias
Out = Desired valve position (normalized)
Pulse
The pulse duration is calculated as follows:
Controls 167
PulsePosn
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
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.
Controls 174
PulsePosn
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
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
Controls 176
PulsePosn
Controls 177
PulsePosn
to 1, implicit tracking
will be implemented.
To disable implicit
tracking set the
parameter to 0
Legend:
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
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.
Controls 179
Rlimit
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.
d In − Out
Out = MIN ( In − Out , ∗ Period )
dt Rate _ loc
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.
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
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
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
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
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
Controls 189
Rlimit
Legend:
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:
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
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
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
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
Controls 196
Select
Controls 197
Select
Legend:
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]
In = Input array
Lo_Out = Low 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:
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
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
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
Controls 202
Sum
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:
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
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
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.
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.
Controls 206
SurgeCon
The manual mode type can be selected using the MANTYPE parameter.
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.
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.
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
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.
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
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
Controls 217
SurgeCon
Controls 218
SurgeCon
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
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
Controls 220
SurgeCon
Legend:
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.
Fundamentals
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
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.
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
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
Controls 227
Switch
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
Controls 228
Switch
Controls 229
Switch
to 1, implicit tracking
will be implemented.
To disable implicit
tracking set the
parameter to 0
Legend:
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.
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
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
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
The OUT is true after a delay of PRESET from when START is true.
Typical uses
•
The OUT is true when START is true. The OUT remains true for PRESET after START is
false.
Typical uses
•
Controls 233
Timer
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
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.
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
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:
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.
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
Controls 240
XferAnaBase
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:
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