Buildings.Controls.OBC.CDL.Routing
Package with blocks that combine and extract signals
Information
This package contains blocks to combine and extract signals.
Package Content
Name | Description |
---|---|
BooleanExtractSignal | Extract signals from a boolean input signal vector |
BooleanExtractor | Extract scalar signal out of boolean signal vector dependent on integer input index |
BooleanScalarReplicator | Boolean signal replicator |
BooleanVectorFilter | Filter a boolean vector based on a boolean mask |
BooleanVectorReplicator | Boolean vector signal replicator |
IntegerExtractSignal | Extract signals from an integer input signal vector |
IntegerExtractor | Extract scalar signal out of integer signal vector dependent on integer input index |
IntegerScalarReplicator | Integer signal replicator |
IntegerVectorFilter | Filter an integer vector based on a boolean mask |
IntegerVectorReplicator | Integer vector signal replicator |
RealExtractSignal | Extract signals from an input signal vector |
RealExtractor | Extract scalar signal out of signal vector dependent on Integer input index |
RealScalarReplicator | Real signal replicator |
RealVectorFilter | Filter a real vector of based on a boolean mask |
RealVectorReplicator | Real vector signal replicator |
Validation | Collection of models that validate the routing blocks of the CDL |
Buildings.Controls.OBC.CDL.Routing.BooleanExtractSignal
Extract signals from a boolean input signal vector
Information
Extract signals from the vector-valued boolean input signal and transfer them to the vector-valued boolean output signal.
The extraction scheme is specified by the integer vector extract
.
This vector specifies which input signals are taken and in which
order they are transferred to the output vector. Note that the
dimension of extract
has to match the number of outputs and the elements
of extract
has to be in the range of [1, nin]
.
Additionally, the dimensions of the input connector signals and
the output connector signals have to be explicitly defined via the
parameters nin
and nout
.
Example
The specification
nin = 7 "Number of inputs"; nout = 4 "Number of outputs"; extract[nout] = {6,3,3,2} "Extracting vector";
extracts four output signals (nout=4
)
from the seven elements of the
input vector (nin=7
):
y[1, 2, 3, 4] = u[6, 3, 3, 2];
Parameters
Type | Name | Default | Description |
---|---|---|---|
Integer | nin | 1 | Number of inputs |
Integer | nout | 1 | Number of outputs |
Integer | extract[nout] | 1:nout | Extracting vector |
Connectors
Type | Name | Description |
---|---|---|
input BooleanInput | u[nin] | Boolean input signals |
output BooleanOutput | y[nout] | Boolean signals extracted from the input vector with the extraction scheme specified by the integer vector |
Modelica definition
Buildings.Controls.OBC.CDL.Routing.BooleanExtractor
Extract scalar signal out of boolean signal vector dependent on integer input index
Information
Block that returns
y = u[index];
where u
is a vector-valued Boolean
input signal and
index
is an Integer
input signal. When the index
is out of range,
-
then
y = u[nin]
ifindex > nin
, and -
y = u[1]
ifindex < 1
.
Parameters
Type | Name | Default | Description |
---|---|---|---|
Integer | nin | 1 | Number of inputs |
Connectors
Type | Name | Description |
---|---|---|
input IntegerInput | index | Index of input vector element to be extracted out |
input BooleanInput | u[nin] | Boolean input signals |
output BooleanOutput | y | Boolean signal extracted from input vector, u[index] |
Modelica definition
Buildings.Controls.OBC.CDL.Routing.BooleanScalarReplicator
Boolean signal replicator
Information
This block replicates the Boolean input signal to an array of nout
identical Boolean output signals.
Parameters
Type | Name | Default | Description |
---|---|---|---|
Integer | nout | 1 | Number of outputs |
Connectors
Type | Name | Description |
---|---|---|
input BooleanInput | u | Connector of Boolean input signal |
output BooleanOutput | y[nout] | Connector of Boolean output signals |
Modelica definition
Buildings.Controls.OBC.CDL.Routing.BooleanVectorFilter
Filter a boolean vector based on a boolean mask
Information
This block filters a Boolean vector of size nin
to
a vector of size nout
given a Boolean mask
msk
.
If an entry in msk
is true
, then the value
of this input will be sent to the output y
, otherwise it
will be discarded.
The parameter msk
must have exactly nout
entries
set to true
, otherwise an error message is issued.
Parameters
Type | Name | Default | Description |
---|---|---|---|
Integer | nin | Size of input vector | |
Integer | nout | Size of output vector | |
Boolean | msk[nin] | fill(true, nin) | Array mask |
Connectors
Type | Name | Description |
---|---|---|
input BooleanInput | u[nin] | Connector of Boolean input signal |
output BooleanOutput | y[nout] | Connector of Boolean output signals |
Modelica definition
Buildings.Controls.OBC.CDL.Routing.BooleanVectorReplicator
Boolean vector signal replicator
Information
This block replicates a Boolean vector input signal of size nin
,
to a matrix with nout
rows and nin
columns,
where each row is duplicating the input vector.
Parameters
Type | Name | Default | Description |
---|---|---|---|
Integer | nin | 1 | Size of input vector |
Integer | nout | 1 | Number of row in output |
Connectors
Type | Name | Description |
---|---|---|
input BooleanInput | u[nin] | Connector of Boolean vector input signal |
output BooleanOutput | y[nout, nin] | Connector of Boolean matrix output signals |
Modelica definition
Buildings.Controls.OBC.CDL.Routing.IntegerExtractSignal
Extract signals from an integer input signal vector
Information
Extract signals from the vector-valued integer input signal and transfer them to the vector-valued integer output signal.
The extraction scheme is specified by the integer vector extract
.
This vector specifies which input signals are taken and in which
order they are transferred to the output vector. Note that the
dimension of extract
has to match the number of outputs and
the elements of extract
has to be in the range of [1, nin]
.
Additionally, the dimensions of the input connector signals and
the output connector signals have to be explicitly defined via the
parameters nin
and nout
.
Example
The specification
nin = 7 "Number of inputs"; nout = 4 "Number of outputs"; extract[nout] = {6,3,3,2} "Extracting vector";
extracts four output signals (nout=4
)
from the seven elements of the
input vector (nin=7
):
y[1, 2, 3, 4] = u[6, 3, 3, 2];
Parameters
Type | Name | Default | Description |
---|---|---|---|
Integer | nin | 1 | Number of inputs |
Integer | nout | 1 | Number of outputs |
Integer | extract[nout] | 1:nout | Extracting vector |
Connectors
Type | Name | Description |
---|---|---|
input IntegerInput | u[nin] | Integer input signals |
output IntegerOutput | y[nout] | Integer signals extracted from the input vector with the extraction scheme specified by the integer vector |
Modelica definition
Buildings.Controls.OBC.CDL.Routing.IntegerExtractor
Extract scalar signal out of integer signal vector dependent on integer input index
Information
Block that returns
y = u[index];
where u
is a vector-valued Integer
input signal and
index
is an Integer
input signal. When the index
is out of range,
-
then
y = u[nin]
ifindex > nin
, and -
y = u[1]
ifindex < 1
.
Parameters
Type | Name | Default | Description |
---|---|---|---|
Integer | nin | 1 | Number of inputs |
Connectors
Type | Name | Description |
---|---|---|
input IntegerInput | index | Index of input vector element to be extracted out |
input IntegerInput | u[nin] | Integer input signals |
output IntegerOutput | y | Integer signal extracted from input vector, u[index] |
Modelica definition
Buildings.Controls.OBC.CDL.Routing.IntegerScalarReplicator
Integer signal replicator
Information
This block replicates the Integer input signal to an array of nout
identical Integer output signals.
Parameters
Type | Name | Default | Description |
---|---|---|---|
Integer | nout | 1 | Number of outputs |
Connectors
Type | Name | Description |
---|---|---|
input IntegerInput | u | Connector of Integer input signal |
output IntegerOutput | y[nout] | Connector of Integer output signals |
Modelica definition
Buildings.Controls.OBC.CDL.Routing.IntegerVectorFilter
Filter an integer vector based on a boolean mask
Information
This block filters a Integer vector of size nin
to
a vector of size nout
given a Boolean mask
msk
.
If an entry in msk
is true
, then the value
of this input will be sent to the output y
, otherwise it
will be discarded.
The parameter msk
must have exactly nout
entries
set to true
, otherwise an error message is issued.
Parameters
Type | Name | Default | Description |
---|---|---|---|
Integer | nin | Size of input vector | |
Integer | nout | Size of output vector | |
Boolean | msk[nin] | fill(true, nin) | Array mask |
Connectors
Type | Name | Description |
---|---|---|
input IntegerInput | u[nin] | Connector of Integer input signal |
output IntegerOutput | y[nout] | Connector of Integer output signals |
Modelica definition
Buildings.Controls.OBC.CDL.Routing.IntegerVectorReplicator
Integer vector signal replicator
Information
This block replicates an Integer vector input signal of size nin
,
to a matrix with nout
rows and nin
columns,
where each row is duplicating the input vector.
Parameters
Type | Name | Default | Description |
---|---|---|---|
Integer | nin | 1 | Size of input vector |
Integer | nout | 1 | Number of row in output |
Connectors
Type | Name | Description |
---|---|---|
input IntegerInput | u[nin] | Connector of Integer vector input signal |
output IntegerOutput | y[nout, nin] | Connector of Integer matrix output signals |
Modelica definition
Buildings.Controls.OBC.CDL.Routing.RealExtractSignal
Extract signals from an input signal vector
Information
Extract signals from the input connector and transfer them to the output connector.
The extracting scheme is given by the integer vector extract
.
This vector specifies which input signals are taken and in which
order they are transferred to the output vector. Note that the
dimension of extract
has to match the number of outputs.
Additionally, the dimensions of the input connector signals and
the output connector signals have to be explicitly defined via the
parameters nin
and nout
.
Example
The specification
nin = 7 "Number of inputs"; nout = 4 "Number of outputs"; extract[nout] = {6,3,3,2} "Extracting vector";
extracts four output signals (nout=4
)
from the seven elements of the
input vector (nin=7
):
output no. 1 is set equal to input no. 6 output no. 2 is set equal to input no. 3 output no. 3 is set equal to input no. 3 output no. 4 is set equal to input no. 2
Parameters
Type | Name | Default | Description |
---|---|---|---|
Integer | nin | 1 | Number of inputs |
Integer | nout | 1 | Number of outputs |
Integer | extract[nout] | 1:nout | Extracting vector |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u[nin] | Connector of Real input signal |
output RealOutput | y[nout] | Connector of Real output signal |
Modelica definition
Buildings.Controls.OBC.CDL.Routing.RealExtractor
Extract scalar signal out of signal vector dependent on Integer input index
Information
Block that extracts a scalar output signal out the
vector of input signals dependent on the Integer
value of the input index
:
y = u [ index ] ;
where index is an additional Integer input signal.
Parameters
Type | Name | Default | Description |
---|---|---|---|
Boolean | allowOutOfRange | false | Index may be out of range |
Integer | nin | 1 | Number of inputs |
Real | outOfRangeValue | 1e10 | Output signal if index is out of range |
Connectors
Type | Name | Description |
---|---|---|
input IntegerInput | index | Index of input vector element to be extracted out |
input RealInput | u[nin] | Connector of Real input signals |
output RealOutput | y | Connector of Real output signal |
Modelica definition
Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator
Real signal replicator
Information
This block replicates the Real input signal to an array of nout
identical Real output signals.
Parameters
Type | Name | Default | Description |
---|---|---|---|
Integer | nout | 1 | Number of outputs |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u | Connector of Real input signal |
output RealOutput | y[nout] | Connector of Real output signal |
Modelica definition
Buildings.Controls.OBC.CDL.Routing.RealVectorFilter
Filter a real vector of based on a boolean mask
Information
This block filters a Real vector of size nin
to
a vector of size nout
given a boolean mask
msk
.
If an entry in msk
is true
, then the value
of this input will be sent to the output y
, otherwise it
will be discarded.
The parameter msk
must have exactly nout
entries
set to true
, otherwise an error message is issued.
Parameters
Type | Name | Default | Description |
---|---|---|---|
Integer | nin | Size of input vector | |
Integer | nout | Size of output vector | |
Boolean | msk[nin] | fill(true, nin) | Array mask |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u[nin] | Connector of Real input signal |
output RealOutput | y[nout] | Connector of Real output signals |
Modelica definition
Buildings.Controls.OBC.CDL.Routing.RealVectorReplicator
Real vector signal replicator
Information
This block replicates an Real vector input signal of size nin
,
to a matrix with nout
rows and nin
columns,
where each row is duplicating the input vector.
Parameters
Type | Name | Default | Description |
---|---|---|---|
Integer | nin | 1 | Size of input vector |
Integer | nout | 1 | Number of row in output |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u[nin] | Connector of Real vector input signal |
output RealOutput | y[nout, nin] | Connector of Real matrix output signals |