Buildings.Controls.OBC.CDL.Routing.Validation
Collection of models that validate the routing blocks of the CDL
Information
This package contains models that validate the blocks in Buildings.Controls.OBC.CDL.Routing.
The examples plot various outputs, which have been verified against analytical solutions. These model outputs are stored as reference data to allow continuous validation whenever models in the library change.
Package Content
Name | Description |
---|---|
BooleanExtractSignal | Validation model for extracting boolean signals |
BooleanExtractor | Validation model for the boolean extractor block |
BooleanScalarReplicator | Validation model for the BooleanScalarReplicator block |
BooleanVectorFilter | Validation model for the BooleanVectorFilter block |
BooleanVectorReplicator | Validation model for the BooleanVectorReplicator block |
IntegerExtractSignal | Validation model for extracting integer signals |
IntegerExtractor | Validation model for the integer extractor block |
IntegerScalarReplicator | Validation model for the IntegerScalarReplicator block |
IntegerVectorFilter | Validation model for the IntegerVectorFilter block |
IntegerVectorReplicator | Validation model for the IntegerVectorReplicator block |
RealExtractSignal | Validation model for the extract signal block |
RealExtractor | Validation model for the extractor block |
RealScalarReplicator | Validation model for the RealScalarReplicator block |
RealVectorFilter | Validation model for the RealVectorFilter block |
RealVectorReplicator | Validation model for the RealVectorReplicator block |
Buildings.Controls.OBC.CDL.Routing.Validation.BooleanExtractSignal
Validation model for extracting boolean signals
Information
Validation test for the block Buildings.Controls.OBC.CDL.Routing.BooleanExtractSignal.
The instance extBooSig
has the input vector with dimension of 4 and
the extracting vector is [3, 2, 4]
. Thus the output vectors is [u[3], u[2], u[4]]
.
The instance extBooSig1
has the input vector with dimension of 4 and
the extracting vector is [3, 2, 4, 1, 1]
. Thus the output vectors is [u[3], u[2], u[4], u[1], u[1]]
.
Note that when the extracting vector extract
has any element with the value that
is out of range [1, nin]
, e.g. [1, 4]
for instance in extBooSig
.
It will issue error and the model will not translate.
Modelica definition
Buildings.Controls.OBC.CDL.Routing.Validation.BooleanExtractor
Validation model for the boolean extractor block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Routing.BooleanExtractor.
The instances extIndBoo
, extIndBoo1
, extIndBoo2
,
extIndBoo3
, and extIndBoo4
have the same input vector with
dimension of 4. However, they have different extract index and thus different output.
-
The instance
extIndBoo
has the extract index of2
. The output isu[2]
. -
The instance
extIndBoo1
has the extract index of6
. Thus it is out of upper range[1, 4]
and it outputsu[4]
. It also issues a warning to indicate that the extract index is out of range. -
The instance
extIndBoo2
has the extract index of0
. Thus it is out of lower range[1, 4]
and it outputsu[1]
. It also issues a warning to indicate that the extract index is out of range. -
The instance
extIndBoo3
has the extract index changing from2
to-1
. Thus it first outputsu[2]
, and then changes tou[1]
. At the moment when the extract index becomes out of range, it issues a warning. -
The instance
extIndBoo4
has the extract index changing from0
to3
. Thus it first outputsu[1]
, and then changes tou[3]
. It issues a warning at the start of the simulation.
Modelica definition
Buildings.Controls.OBC.CDL.Routing.Validation.BooleanScalarReplicator
Validation model for the BooleanScalarReplicator block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Routing.BooleanScalarReplicator.
Modelica definition
Buildings.Controls.OBC.CDL.Routing.Validation.BooleanVectorFilter
Validation model for the BooleanVectorFilter block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Routing.BooleanVectorFilter.
Modelica definition
Buildings.Controls.OBC.CDL.Routing.Validation.BooleanVectorReplicator
Validation model for the BooleanVectorReplicator block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Routing.BooleanVectorReplicator.
Modelica definition
Buildings.Controls.OBC.CDL.Routing.Validation.IntegerExtractSignal
Validation model for extracting integer signals
Information
Validation test for the block Buildings.Controls.OBC.CDL.Routing.IntegerExtractSignal.
The instance extIntSig
has the input vector with dimension of 4 and
the extracting vector is [3, 2, 4]
. Thus the output vectors is [u[3], u[2], u[4]]
.
The instance extIntSig1
has the input vector with dimension of 4 and
the extracting vector is [3, 2, 4, 2, 3]
.
Thus the output vectors is [u[3], u[2], u[4], u[2], u[3]]
.
Note that when the extracting vector extract
has any element with the value that
is out of range [1, nin]
, e.g. [1, 4]
for instance in extIntSig
.
It will issue error and the model will not translate.
Modelica definition
Buildings.Controls.OBC.CDL.Routing.Validation.IntegerExtractor
Validation model for the integer extractor block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Routing.IntegerExtractor.
The instances extIndInt
, extIndInt1
, extIndInt2
,
extIndInt3
, and extIndInt4
have the same input vector with
dimension of 4. However, they have different extract index and thus different output.
-
The instance
extIndInt
has the extract index of2
. The output isu[2]
. -
The instance
extIndInt1
has the extract index of6
. Thus it is out of upper range[1, 4]
and it outputsu[4]
. It also issues a warning to indicate that the extract index is out of range. -
The instance
extIndInt2
has the extract index of0
. Thus it is out of lower range[1, 4]
and it outputsu[1]
. It also issues a warning to indicate that the extract index is out of range. -
The instance
extIndInt3
has the extract index changing from2
to-1
. Thus it first outputsu[2]
, and then changes tou[1]
. At the moment when the extract index becomes out of range, it issues a warning. -
The instance
extIndInt4
has the extract index changing from0
to3
. Thus it first outputsu[1]
, and then changes tou[3]
. It issues a warning at the start of the simulation.
Modelica definition
Buildings.Controls.OBC.CDL.Routing.Validation.IntegerScalarReplicator
Validation model for the IntegerScalarReplicator block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Routing.IntegerScalarReplicator.
Modelica definition
Buildings.Controls.OBC.CDL.Routing.Validation.IntegerVectorFilter
Validation model for the IntegerVectorFilter block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Routing.IntegerVectorFilter.
Modelica definition
Buildings.Controls.OBC.CDL.Routing.Validation.IntegerVectorReplicator
Validation model for the IntegerVectorReplicator block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Routing.IntegerVectorReplicator.
Modelica definition
Buildings.Controls.OBC.CDL.Routing.Validation.RealExtractSignal
Validation model for the extract signal block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Routing.RealExtractSignal.
The instance extSig
has the input vector with dimension of 4 and
the extracting vector is [1, 2, 5]
.
Thus the output vectors is [u[1], u[2], u[5]]
.
The instance extSig1
has the input vector with dimension of 4 and
the extracting vector is [1, 2, 5, 3, 4, 2]
. Thus the output vectors is [u[1], u[2], u[5], u[3], u[4], u[2]]
.
Note that when the extracting vector extract
has any element with the value that
is out of range [1, nin]
, e.g. [1, 4]
for instance in extSig
.
It will issue error and the model will not translate.
Modelica definition
Buildings.Controls.OBC.CDL.Routing.Validation.RealExtractor
Validation model for the extractor block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Routing.RealExtractor.
The instances extIndSig
, extIndSig1
, extIndSig2
,
extIndSig3
, and extIndSig4
have the same input vector with
dimension of 5. However, they have different extract index and thus different output.
-
The instance
extIndSig
has the extract index of2
. The output isu[2]
. -
The instance
extIndSig1
has the extract index of6
. Thus it is out of upper range[1, 5]
and it outputsu[5]
. It also issues a warning to indicate that the extract index is out of range. -
The instance
extIndSig2
has the extract index of0
. Thus it is out of lower range[1, 5]
and it outputsu[1]
. It also issues a warning to indicate that the extract index is out of range. -
The instance
extIndSig3
has the extract index changing from2
to-1
. Thus it first outputsu[2]
, and then changes tou[1]
. At the moment when the extract index becomes out of range, it issues a warning. -
The instance
extIndSig4
has the extract index changing from0
to3
. Thus it first outputsu[1]
, and then changes tou[3]
. It issues a warning at the start of the simulation.
Modelica definition
Buildings.Controls.OBC.CDL.Routing.Validation.RealScalarReplicator
Validation model for the RealScalarReplicator block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator.
Modelica definition
Buildings.Controls.OBC.CDL.Routing.Validation.RealVectorFilter
Validation model for the RealVectorFilter block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Routing.RealVectorFilter.
Modelica definition
Buildings.Controls.OBC.CDL.Routing.Validation.RealVectorReplicator
Validation model for the RealVectorReplicator block
Information
Validation test for the block Buildings.Controls.OBC.CDL.Routing.RealVectorReplicator.