Buildings.Controls.OBC.CDL.Routing

Package with blocks that combine and extract signals

Information

This package contains blocks to combine and extract signals.

Extends from Modelica.Icons.Package (Icon for standard packages).

Package Content

Name Description
Buildings.Controls.OBC.CDL.Routing.BooleanReplicator BooleanReplicator Boolean signal replicator
Buildings.Controls.OBC.CDL.Routing.ExtractSignal ExtractSignal Extract signals from an input signal vector
Buildings.Controls.OBC.CDL.Routing.IntegerReplicator IntegerReplicator Integer signal replicator
Buildings.Controls.OBC.CDL.Routing.RealReplicator RealReplicator Real signal replicator
Buildings.Controls.OBC.CDL.Routing.Validation Validation Collection of models that validate the routing blocks of the CDL

Buildings.Controls.OBC.CDL.Routing.BooleanReplicator Buildings.Controls.OBC.CDL.Routing.BooleanReplicator

Boolean signal replicator

Buildings.Controls.OBC.CDL.Routing.BooleanReplicator

Information

This block replicates the Boolean input signal to an array of nout identical Boolean output signals.

Parameters

TypeNameDefaultDescription
Integernout1Number of outputs

Connectors

TypeNameDescription
input BooleanInputuConnector of Boolean input signal
output BooleanOutputy[nout]Connector of Boolean output signals

Modelica definition

block BooleanReplicator "Boolean signal replicator" parameter Integer nout=1 "Number of outputs"; Interfaces.BooleanInput u "Connector of Boolean input signal"; Interfaces.BooleanOutput y[nout] "Connector of Boolean output signals"; equation y = fill(u, nout); end BooleanReplicator;

Buildings.Controls.OBC.CDL.Routing.ExtractSignal Buildings.Controls.OBC.CDL.Routing.ExtractSignal

Extract signals from an input signal vector

Buildings.Controls.OBC.CDL.Routing.ExtractSignal

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:

     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

TypeNameDefaultDescription
Integernin1Number of inputs
Integernout1Number of outputs
Integerextract[nout]1:noutExtracting vector

Connectors

TypeNameDescription
input RealInputu[nin]Connector of Real input signal
output RealOutputy[nout]Connector of Real output signal

Modelica definition

block ExtractSignal "Extract signals from an input signal vector" parameter Integer nin=1 "Number of inputs"; parameter Integer nout=1 "Number of outputs"; parameter Integer extract[nout]=1:nout "Extracting vector"; Interfaces.RealInput u[nin] "Connector of Real input signal"; Interfaces.RealOutput y[nout] "Connector of Real output signal"; equation for i in 1:nout loop y[i] = u[extract[i]]; end for; end ExtractSignal;

Buildings.Controls.OBC.CDL.Routing.IntegerReplicator Buildings.Controls.OBC.CDL.Routing.IntegerReplicator

Integer signal replicator

Buildings.Controls.OBC.CDL.Routing.IntegerReplicator

Information

This block replicates the Integer input signal to an array of nout identical Integer output signals.

Parameters

TypeNameDefaultDescription
Integernout1Number of outputs

Connectors

TypeNameDescription
input IntegerInputuConnector of Integer input signal
output IntegerOutputy[nout]Connector of Integer output signals

Modelica definition

block IntegerReplicator "Integer signal replicator" parameter Integer nout=1 "Number of outputs"; Interfaces.IntegerInput u "Connector of Integer input signal"; Interfaces.IntegerOutput y[nout] "Connector of Integer output signals"; equation y = fill(u, nout); end IntegerReplicator;

Buildings.Controls.OBC.CDL.Routing.RealReplicator Buildings.Controls.OBC.CDL.Routing.RealReplicator

Real signal replicator

Buildings.Controls.OBC.CDL.Routing.RealReplicator

Information

This block replicates the Real input signal to an array of nout identical Real output signals.

Parameters

TypeNameDefaultDescription
Integernout1Number of outputs

Connectors

TypeNameDescription
input RealInputuConnector of Real input signal
output RealOutputy[nout]Connector of Real output signal

Modelica definition

block RealReplicator "Real signal replicator" parameter Integer nout=1 "Number of outputs"; Interfaces.RealInput u "Connector of Real input signal"; Interfaces.RealOutput y[nout] "Connector of Real output signal"; equation y = fill(u, nout); end RealReplicator;