Buildings.Obsolete.Controls.OBC.CDL.Continuous
Package with obsolete models of the Control Description Language
Information
Package that contains obsolete components that were part of the OpenBuildingControl (OBC) package Buildings.Controls.OBC.CDL.Continuous.
Extends from Modelica.Icons.Package (Icon for standard packages).
Package Content
Name | Description |
---|---|
Add | Output the sum of the two inputs |
AddParameter | Output the sum of an input plus a parameter |
ChangeSign | Change sign of the input |
Derivative | Block that approximates the derivative of the input |
Feedback | Output difference between commanded and feedback input |
GreaterEqual | Output y is true, if input u1 is greater or equal than input u2 |
GreaterEqualThreshold | Output y is true, if input u is greater or equal than threshold |
HysteresisWithHold | Hysteresis block that optionally allows to specify a hold time |
LessEqual | Output y is true, if input u1 is less or equal than input u2 |
LessEqualThreshold | Output y is true, if input u is less or equal than threshold |
LimPID | P, PI, PD, and PID controller with limited output, anti-windup compensation and setpoint weighting |
NumberOfRequests | Outputs the number of signals that are above/below a certain threshold |
Validation | Collection of validation models |
Buildings.Obsolete.Controls.OBC.CDL.Continuous.Add
Output the sum of the two inputs
Information
Block that outputs y
as the weighted sum of the
two input signals u1
and u2
,
y = k1*u1 + k2*u2;
where k1
and k2
are parameters.
Extends from Modelica.Icons.ObsoleteModel (Icon for classes that are obsolete and will be removed in later versions).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Real | k1 | +1 | Gain for input u1 |
Real | k2 | +1 | Gain for input u2 |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u1 | Connector of Real input signal 1 |
input RealInput | u2 | Connector of Real input signal 2 |
output RealOutput | y | Connector of Real output signal |
Modelica definition
Buildings.Obsolete.Controls.OBC.CDL.Continuous.AddParameter
Output the sum of an input plus a parameter
Information
Block that outputs y = k u + p
,
where k
and p
are
parameters and u
is an input.
Extends from Modelica.Icons.ObsoleteModel (Icon for classes that are obsolete and will be removed in later versions).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Real | p | Value to be added | |
Real | k | Gain of input |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u | Connector of Real input signal |
output RealOutput | y | Connector of Real output signal |
Modelica definition
Buildings.Obsolete.Controls.OBC.CDL.Continuous.ChangeSign
Change sign of the input
Information
Block that outputs y = -u
,
where u
is an input.
Extends from Modelica.Icons.ObsoleteModel (Icon for classes that are obsolete and will be removed in later versions).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u | Connector of Real input signal |
output RealOutput | y | Connector of Real output signal |
Modelica definition
Buildings.Obsolete.Controls.OBC.CDL.Continuous.Derivative
Block that approximates the derivative of the input
Information
This blocks defines the transfer function between the
input u
and the output y
as approximated derivative:
k * s y = ------------ * u T * s + 1
If k=0
, the block reduces to y=0
.
Extends from Modelica.Icons.ObsoleteModel (Icon for classes that are obsolete and will be removed in later versions).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Real | k | 1 | Gains [1] |
Time | T | 0.01 | Time constant (T>0 required) [s] |
Initialization | |||
Real | x_start | 0 | Initial or guess value of state |
Real | y_start | 0 | Initial value of output (= state) |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u | Connector of Real input signal |
output RealOutput | y | Connector of Real output signal |
Modelica definition
Buildings.Obsolete.Controls.OBC.CDL.Continuous.Feedback
Output difference between commanded and feedback input
Information
Block that outputs y = u1 - u2
,
where
u1
and u2
are inputs.
Extends from Modelica.Icons.ObsoleteModel (Icon for classes that are obsolete and will be removed in later versions).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u1 | Connector of Real input signal 1 |
input RealInput | u2 | Connector of Real input signal 2 |
output RealOutput | y | Connector of Real output signal |
Modelica definition
Buildings.Obsolete.Controls.OBC.CDL.Continuous.GreaterEqual
Output y is true, if input u1 is greater or equal than input u2
Information
Block that outputs true
if Real the input u1
is greater than or equal to the Real input u2
.
Otherwise the output is false
.
Extends from Modelica.Icons.ObsoleteModel (Icon for classes that are obsolete and will be removed in later versions).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u1 | Connector of first Real input signal |
input RealInput | u2 | Connector of second Real input signal |
output BooleanOutput | y | Connector of Boolean output signal |
Modelica definition
Buildings.Obsolete.Controls.OBC.CDL.Continuous.GreaterEqualThreshold
Output y is true, if input u is greater or equal than threshold
Information
Block that outputs true
if the Real input is greater than or equal to
the parameter threshold
.
Otherwise the output is false
.
Extends from Modelica.Icons.ObsoleteModel (Icon for classes that are obsolete and will be removed in later versions).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Real | threshold | 0 | Threshold for comparison |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u | Connector of Real input signal |
output BooleanOutput | y | Connector of Boolean output signal |
Modelica definition
Buildings.Obsolete.Controls.OBC.CDL.Continuous.HysteresisWithHold
Hysteresis block that optionally allows to specify a hold time
Information
Model for a hysteresis block that optionally allows to specify a hold time. During the hold time, the output is not allowed to switch.
When the input u
becomes greater than uHigh
, the
output y
becomes true
and remains true
for at least trueHoldDuration
seconds, after which time it is allowed
to switch immediately.
When the input u
becomes less than uLow
, the output
y
becomes false
and remains false
for
at least falseHoldDuration
seconds, after which time it is allowed
to switch immediately.
This model for example could be used to disable an economizer, and not re-enable it for 10 minutes, and vice versa. Using hysteresis can avoid the distraction from the input noise.
Extends from Modelica.Icons.ObsoleteModel (Icon for classes that are obsolete and will be removed in later versions).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Real | uLow | if y=true and u<uLow, switch to y=false | |
Real | uHigh | if y=false and u>uHigh, switch to y=true | |
Time | trueHoldDuration | true hold duration [s] | |
Time | falseHoldDuration | trueHoldDuration | false hold duration [s] |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u | Real input signal |
output BooleanOutput | y | Boolean output signal |
Modelica definition
Buildings.Obsolete.Controls.OBC.CDL.Continuous.LessEqual
Output y is true, if input u1 is less or equal than input u2
Information
Block that outputs true
if the Real input u1
is less than or equal to the Real input u2
.
Otherwise the output is false
.
Extends from Modelica.Icons.ObsoleteModel (Icon for classes that are obsolete and will be removed in later versions).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u1 | Connector of first Real input signal |
input RealInput | u2 | Connector of second Real input signal |
output BooleanOutput | y | Connector of Boolean output signal |
Modelica definition
Buildings.Obsolete.Controls.OBC.CDL.Continuous.LessEqualThreshold
Output y is true, if input u is less or equal than threshold
Information
Block that outputs true
if the Real input is less than or equal to
the parameter threshold
.
Otherwise the output is false
.
Extends from Modelica.Icons.ObsoleteModel (Icon for classes that are obsolete and will be removed in later versions).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Real | threshold | 0 | Threshold for comparison |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u | Connector of Real input signal |
output BooleanOutput | y | Connector of Boolean output signal |
Modelica definition
Buildings.Obsolete.Controls.OBC.CDL.Continuous.LimPID
P, PI, PD, and PID controller with limited output, anti-windup compensation and setpoint weighting
Information
PID controller in the standard form
y = k ( e(t) + 1 ⁄ Ti ∫ e(s) ds + Td de(t)⁄dt ),
where y is the control signal, e(t) = us - um is the control error, with us being the set point and um being the measured quantity, k is the gain, Ti is the time constant of the integral term and Td is the time constant of the derivative term.
Note that the units of k are the inverse of the units of the control error, while the units of Ti and Td are seconds.
For detailed treatment of integrator anti-windup, set-point weights and output limitation, see Modelica.Blocks.Continuous.LimPID.
Options
This controller can be configured as follows.P, PI, PD, or PID action
Through the parameter controllerType
, the controller can be configured
as P, PI, PD or PID controller. The default configuration is PI.
Direct or reverse acting
Through the parameter reverseActing
, the controller can be configured to
be reverse or direct acting.
The above standard form is reverse acting, which is the default configuration.
For a reverse acting controller, for a constant set point,
an increase in measurement signal u_m
decreases the control output signal y
(Montgomery and McDowall, 2008).
Thus,
-
for a heating coil with a two-way valve, leave
reverseActing = true
, but -
for a cooling coil with a two-way valve, set
reverseActing = false
.
Reset of the controller output
The controller can be configured to enable an input port that allows resetting the controller output. The controller output can be reset as follows:
-
If
reset = Buildings.Types.Reset.Disabled
, which is the default, then the controller output is never reset. -
If
reset = Buildings.Types.Reset.Parameter
, then a boolean input signaltrigger
is enabled. Whenever the value of this input changes fromfalse
totrue
, the controller output is reset by settingy
to the value of the parametery_reset
. -
If
reset = Buildings.Types.Reset.Input
, then a boolean input signaltrigger
and a real input signaly_reset_in
are enabled. Whenever the value oftrigger
changes fromfalse
totrue
, the controller output is reset by setting the value ofy
toy_reset_in
.
Note that this controller implements an integrator anti-windup. Therefore,
for most applications, keeping the default setting of
reset = Buildings.Types.Reset.Disabled
is sufficient.
However, if the controller is used in conjuction with equipment that is being
switched on, better control performance may be achieved by resetting the controller
output when the equipment is switched on.
This is in particular the case in situations
where the equipment control input should continuously increase as the equipment is
switched on, such as a light dimmer that may slowly increase the luminance, or
a variable speed drive of a motor that should continuously increase the speed.
References
R. Montgomery and R. McDowall (2008). "Fundamentals of HVAC Control Systems." American Society of Heating Refrigerating and Air-Conditioning Engineers Inc. Atlanta, GA.
Extends from Modelica.Icons.ObsoleteModel (Icon for classes that are obsolete and will be removed in later versions).
Parameters
Type | Name | Default | Description |
---|---|---|---|
SimpleController | controllerType | Buildings.Controls.OBC.CDL.T... | Type of controller |
Real | k | 1 | Gain of controller |
Time | Ti | 0.5 | Time constant of integrator block [s] |
Time | Td | 0.1 | Time constant of derivative block [s] |
Real | yMax | 1 | Upper limit of output |
Real | yMin | 0 | Lower limit of output |
Real | wp | 1 | Set-point weight for Proportional block (0..1) |
Real | wd | 0 | Set-point weight for Derivative block (0..1) |
Real | Ni | 0.9 | Ni*Ti is time constant of anti-windup compensation |
Real | Nd | 10 | The higher Nd, the more ideal the derivative block |
Boolean | reverseActing | true | Set to true for reverse acting, or false for direct acting control action |
Initialization | |||
Real | xi_start | 0 | Initial value of integrator state |
Real | yd_start | 0 | Initial value of derivative output |
Integrator reset | |||
Reset | reset | Buildings.Obsolete.Controls.... | Type of controller output reset |
Real | y_reset | xi_start | Value to which the controller output is reset if the boolean trigger has a rising edge, used if reset == CDL.Types.Reset.Parameter |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u_s | Connector of setpoint input signal |
input RealInput | u_m | Connector of measurement input signal |
output RealOutput | y | Connector of actuator output signal |
input RealInput | y_reset_in | Input signal for state to which integrator is reset, enabled if reset = CDL.Types.Reset.Input |
input BooleanInput | trigger | Resets the controller output when trigger becomes true |
Modelica definition
Buildings.Obsolete.Controls.OBC.CDL.Continuous.NumberOfRequests
Outputs the number of signals that are above/below a certain threshold
Information
Block that outputs the number of inputs that exceed a threshold.
The parameter kind
is used to determine the kind of the
inequality. The table below shows the allowed settings.
Value of parameter kind |
Output signal incremented by 1 for each i ∈ {1, ..., nin} if |
---|---|
0 | u[i] > t |
1 | u[i] ≥ t |
2 | u[i] ≤ t |
3 | u[i] < threShold |
This model may be used to check how many rooms exceed a temperature threshold.
Extends from Modelica.Icons.ObsoleteModel (Icon for classes that are obsolete and will be removed in later versions).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Integer | nin | Number of inputs | |
Real | t | 0 | Threshold |
Integer | kind | Set to 0 for u>threShold, to 1 for >=, to 2 for <= or to 3 for < |
Connectors
Type | Name | Description |
---|---|---|
output IntegerOutput | y | Number of input signals that violate the threshold |
input RealInput | u[nin] | Input signals |