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
Buildings.Controls.OBC.CDL.Routing.Validation.BooleanScalarReplicator BooleanScalarReplicator Validation model for the BooleanScalarReplicator block
Buildings.Controls.OBC.CDL.Routing.Validation.BooleanVectorFilter BooleanVectorFilter Validation model for the BooleanVectorFilter block
Buildings.Controls.OBC.CDL.Routing.Validation.BooleanVectorReplicator BooleanVectorReplicator Validation model for the BooleanVectorReplicator block
Buildings.Controls.OBC.CDL.Routing.Validation.IntegerScalarReplicator IntegerScalarReplicator Validation model for the IntegerScalarReplicator block
Buildings.Controls.OBC.CDL.Routing.Validation.IntegerVectorFilter IntegerVectorFilter Validation model for the IntegerVectorFilter block
Buildings.Controls.OBC.CDL.Routing.Validation.IntegerVectorReplicator IntegerVectorReplicator Validation model for the IntegerVectorReplicator block
Buildings.Controls.OBC.CDL.Routing.Validation.RealExtractSignal RealExtractSignal Validation model for the extract signal block
Buildings.Controls.OBC.CDL.Routing.Validation.RealExtractor RealExtractor Validation model for the extractor block
Buildings.Controls.OBC.CDL.Routing.Validation.RealScalarReplicator RealScalarReplicator Validation model for the RealScalarReplicator block
Buildings.Controls.OBC.CDL.Routing.Validation.RealVectorFilter RealVectorFilter Validation model for the RealVectorFilter block
Buildings.Controls.OBC.CDL.Routing.Validation.RealVectorReplicator RealVectorReplicator Validation model for the RealVectorReplicator block

Buildings.Controls.OBC.CDL.Routing.Validation.BooleanScalarReplicator Buildings.Controls.OBC.CDL.Routing.Validation.BooleanScalarReplicator

Validation model for the BooleanScalarReplicator block

Buildings.Controls.OBC.CDL.Routing.Validation.BooleanScalarReplicator

Information

Validation test for the block Buildings.Controls.OBC.CDL.Routing.BooleanScalarReplicator.

Modelica definition

model BooleanScalarReplicator "Validation model for the BooleanScalarReplicator block" Buildings.Controls.OBC.CDL.Routing.BooleanScalarReplicator booRep( nout=3) "Block that outputs the array replicating input value"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul( period=0.2) "Block that outputs boolean pulse"; equation connect(booPul.y,booRep.u); end BooleanScalarReplicator;

Buildings.Controls.OBC.CDL.Routing.Validation.BooleanVectorFilter Buildings.Controls.OBC.CDL.Routing.Validation.BooleanVectorFilter

Validation model for the BooleanVectorFilter block

Buildings.Controls.OBC.CDL.Routing.Validation.BooleanVectorFilter

Information

Validation test for the block Buildings.Controls.OBC.CDL.Routing.BooleanVectorFilter.

Modelica definition

model BooleanVectorFilter "Validation model for the BooleanVectorFilter block" Buildings.Controls.OBC.CDL.Routing.BooleanVectorFilter booFil(nin=3, nout=2, msk={true,false,true}) "Block that filter the input vector"; Logical.Sources.Constant booInp[3](k={true,true,false}) "Boolean inputs"; equation connect(booInp.y, booFil.u); end BooleanVectorFilter;

Buildings.Controls.OBC.CDL.Routing.Validation.BooleanVectorReplicator Buildings.Controls.OBC.CDL.Routing.Validation.BooleanVectorReplicator

Validation model for the BooleanVectorReplicator block

Buildings.Controls.OBC.CDL.Routing.Validation.BooleanVectorReplicator

Information

Validation test for the block Buildings.Controls.OBC.CDL.Routing.BooleanVectorReplicator.

Modelica definition

model BooleanVectorReplicator "Validation model for the BooleanVectorReplicator block" Buildings.Controls.OBC.CDL.Routing.BooleanVectorReplicator booRep(nin=2, nout=3) "Block that outputs the vector replicating input value"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul[2](period=fill(0.2,2)) "Block that outputs boolean pulse"; equation connect(booPul.y, booRep.u); end BooleanVectorReplicator;

Buildings.Controls.OBC.CDL.Routing.Validation.IntegerScalarReplicator Buildings.Controls.OBC.CDL.Routing.Validation.IntegerScalarReplicator

Validation model for the IntegerScalarReplicator block

Buildings.Controls.OBC.CDL.Routing.Validation.IntegerScalarReplicator

Information

Validation test for the block Buildings.Controls.OBC.CDL.Routing.IntegerScalarReplicator.

Modelica definition

model IntegerScalarReplicator "Validation model for the IntegerScalarReplicator block" Buildings.Controls.OBC.CDL.Routing.IntegerScalarReplicator intRep( nout=3) "Block that outputs the array replicating input value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ram( height=5, duration=1, offset=-2) "Block that outputs ramp signal"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt "Convert Real input to Integer output"; equation connect(ram.y,reaToInt.u); connect(reaToInt.y,intRep.u); end IntegerScalarReplicator;

Buildings.Controls.OBC.CDL.Routing.Validation.IntegerVectorFilter Buildings.Controls.OBC.CDL.Routing.Validation.IntegerVectorFilter

Validation model for the IntegerVectorFilter block

Buildings.Controls.OBC.CDL.Routing.Validation.IntegerVectorFilter

Information

Validation test for the block Buildings.Controls.OBC.CDL.Routing.IntegerVectorFilter.

Modelica definition

model IntegerVectorFilter "Validation model for the IntegerVectorFilter block" Buildings.Controls.OBC.CDL.Routing.IntegerVectorFilter intFil(nin=3, nout=2, msk={true,false,true}) "Block that filter the input vector"; Integers.Sources.Constant IntInp[3](k={1,2,3}) "Integer inputs"; equation connect(IntInp.y, intFil.u); end IntegerVectorFilter;

Buildings.Controls.OBC.CDL.Routing.Validation.IntegerVectorReplicator Buildings.Controls.OBC.CDL.Routing.Validation.IntegerVectorReplicator

Validation model for the IntegerVectorReplicator block

Buildings.Controls.OBC.CDL.Routing.Validation.IntegerVectorReplicator

Information

Validation test for the block Buildings.Controls.OBC.CDL.Routing.IntegerVectorReplicator.

Modelica definition

model IntegerVectorReplicator "Validation model for the IntegerVectorReplicator block" Buildings.Controls.OBC.CDL.Routing.IntegerVectorReplicator intRep(nin=2, nout=3) "Block that outputs the vector replicating input value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ram[2]( height=fill(5,2), duration=fill(1,2), offset=fill(-2,2)) "Block that outputs ramp signal"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt[2] "Convert Real input to Integer output"; equation connect(ram.y,reaToInt.u); connect(reaToInt.y,intRep.u); end IntegerVectorReplicator;

Buildings.Controls.OBC.CDL.Routing.Validation.RealExtractSignal Buildings.Controls.OBC.CDL.Routing.Validation.RealExtractSignal

Validation model for the extract signal block

Buildings.Controls.OBC.CDL.Routing.Validation.RealExtractSignal

Information

Validation test for the block Buildings.Controls.OBC.CDL.Routing.RealExtractSignal.

Modelica definition

model RealExtractSignal "Validation model for the extract signal block" Buildings.Controls.OBC.CDL.Routing.RealExtractSignal extSig( nin=5, nout=3, extract={1,2,5}) "Block that extracts signals from an input signal vector"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ram( height=5, duration=1, offset=-2) "Block that outputs ramp signal"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ram1( duration=1, height=4, offset=-1) "Block that outputs ramp signal"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ram2( duration=1, height=3, offset=-2) "Block that outputs ramp signal"; Buildings.Controls.OBC.CDL.Continuous.Sources.Pulse pul( amplitude=0.5, period=0.2) "Generate pulse signal of type Real"; Buildings.Controls.OBC.CDL.Continuous.Sources.Pulse pul1( period=0.2, amplitude=1.5, offset=-0.2) "Generate pulse signal of type Real"; equation connect(ram.y,extSig.u[1]); connect(pul.y,extSig.u[2]); connect(pul1.y,extSig.u[3]); connect(ram1.y,extSig.u[4]); connect(ram2.y,extSig.u[5]); end RealExtractSignal;

Buildings.Controls.OBC.CDL.Routing.Validation.RealExtractor Buildings.Controls.OBC.CDL.Routing.Validation.RealExtractor

Validation model for the extractor block

Buildings.Controls.OBC.CDL.Routing.Validation.RealExtractor

Information

Validation test for the block Buildings.Controls.OBC.CDL.Routing.RealExtractor.

Modelica definition

model RealExtractor "Validation model for the extractor block" Buildings.Controls.OBC.CDL.Routing.RealExtractor extIndSig( nin=5) "Block that extracts signal from an input signal vector"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ram( height=5, duration=1, offset=-2) "Block that outputs ramp signal"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ram1( duration=1, height=4, offset=-1) "Block that outputs ramp signal"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ram2( duration=1, height=3, offset=-2) "Block that outputs ramp signal"; Buildings.Controls.OBC.CDL.Continuous.Sources.Pulse pul( amplitude=0.5, period=0.2) "Generate pulse signal of type Real"; Buildings.Controls.OBC.CDL.Continuous.Sources.Pulse pul1( period=0.2, amplitude=1.5, offset=-0.2) "Generate pulse signal of type Real"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt( k=2) "Index to extract input signal"; Buildings.Controls.OBC.CDL.Routing.RealExtractor extIndSig1( nin=5) "Block that extracts signal from an input signal vector"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt1( k=6) "Index to extract input signal"; equation connect(ram.y,extIndSig.u[1]); connect(pul.y,extIndSig.u[2]); connect(pul1.y,extIndSig.u[3]); connect(ram1.y,extIndSig.u[4]); connect(ram2.y,extIndSig.u[5]); connect(conInt.y,extIndSig.index); connect(conInt1.y,extIndSig1.index); connect(ram.y,extIndSig1.u[1]); connect(pul.y,extIndSig1.u[2]); connect(pul1.y,extIndSig1.u[3]); connect(ram1.y,extIndSig1.u[4]); connect(ram2.y,extIndSig1.u[5]); end RealExtractor;

Buildings.Controls.OBC.CDL.Routing.Validation.RealScalarReplicator Buildings.Controls.OBC.CDL.Routing.Validation.RealScalarReplicator

Validation model for the RealScalarReplicator block

Buildings.Controls.OBC.CDL.Routing.Validation.RealScalarReplicator

Information

Validation test for the block Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator.

Modelica definition

model RealScalarReplicator "Validation model for the RealScalarReplicator block" Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator reaRep( nout=3) "Block that outputs the array replicating input value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ram( height=5, duration=1, offset=-2) "Block that outputs ramp signal"; equation connect(ram.y,reaRep.u); end RealScalarReplicator;

Buildings.Controls.OBC.CDL.Routing.Validation.RealVectorFilter Buildings.Controls.OBC.CDL.Routing.Validation.RealVectorFilter

Validation model for the RealVectorFilter block

Buildings.Controls.OBC.CDL.Routing.Validation.RealVectorFilter

Information

Validation test for the block Buildings.Controls.OBC.CDL.Routing.RealVectorFilter.

Modelica definition

model RealVectorFilter "Validation model for the RealVectorFilter block" Buildings.Controls.OBC.CDL.Routing.RealVectorFilter reaFil(nin=3, nout=2, msk={true,false,true}) "Block that filter the input vector"; Continuous.Sources.Constant ReaInp[3](k={1,2,3}) "Real inputs"; equation connect(ReaInp.y, reaFil.u); end RealVectorFilter;

Buildings.Controls.OBC.CDL.Routing.Validation.RealVectorReplicator Buildings.Controls.OBC.CDL.Routing.Validation.RealVectorReplicator

Validation model for the RealVectorReplicator block

Buildings.Controls.OBC.CDL.Routing.Validation.RealVectorReplicator

Information

Validation test for the block Buildings.Controls.OBC.CDL.Routing.RealVectorReplicator.

Modelica definition

model RealVectorReplicator "Validation model for the RealVectorReplicator block" Buildings.Controls.OBC.CDL.Routing.RealVectorReplicator reaRep(nin=2, nout=3) "Block that outputs the vector replicating input value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ram[2]( height=fill(5,2), duration=fill(1,2), offset=fill(-2,2)) "Block that outputs ramp signal"; equation connect(ram.y,reaRep.u); end RealVectorReplicator;