Buildings.Utilities.IO.SignalExchange

External Signal Exchange Package

Information

Package with blocks that can be used to identify and activate control signal overwrites, and to identify and read sensor signals. This package is used by the Building Optimization Performance Test software BOPTEST.

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

Package Content

Name Description
Buildings.Utilities.IO.SignalExchange.Overwrite Overwrite Block that allows a signal to overwritten by an FMU input
Buildings.Utilities.IO.SignalExchange.Read Read Block that allows a signal to be read as an FMU output
Buildings.Utilities.IO.SignalExchange.SignalTypes SignalTypes Package with signal type definitions
Buildings.Utilities.IO.SignalExchange.Examples Examples This package contains examples for the signal exchange block

Buildings.Utilities.IO.SignalExchange.Overwrite Buildings.Utilities.IO.SignalExchange.Overwrite

Block that allows a signal to overwritten by an FMU input

Buildings.Utilities.IO.SignalExchange.Overwrite

Information

This block enables the overwriting of a control signal by an external program, as well as reading of its meta-data, without the need to explicitly propogate the external input or activation switch to a top-level model.

Typical use and important parameters

This block is typically used by the BOPTEST framework (see BOPTEST) to identify and activate control signals that can be overwritten by test controllers. It is used in combination with a dedicated parser to perform this task (see Parser Code).

The input u is the signal to be overwritten. The output y will be equal to the input signal if the activate flag is false and will be equal to the external input signal uExt if the flag is true.

It is important to add a brief description of the signal using the description parameter and assign a min, max, and unit to the input variable u by modifying its attributes.

Extends from Modelica.Blocks.Interfaces.SISO (Single Input Single Output continuous control block).

Parameters

TypeNameDefaultDescription
Stringdescription Description of the signal being overwritten

Connectors

TypeNameDescription
input RealInputuConnector of Real input signal
output RealOutputyConnector of Real output signal

Modelica definition

block Overwrite "Block that allows a signal to overwritten by an FMU input" extends Modelica.Blocks.Interfaces.SISO; parameter String description "Description of the signal being overwritten"; Modelica.Blocks.Logical.Switch swi "Switch between external signal and direct feedthrough signal"; Modelica.Blocks.Sources.RealExpression uExt "External input signal"; Modelica.Blocks.Sources.BooleanExpression activate "Block to activate use of external signal"; protected final parameter Boolean boptestOverwrite = true "Protected parameter, used by tools to search for overwrite block in models"; equation connect(activate.y, swi.u2); connect(swi.u3, u); connect(uExt.y, swi.u1); connect(swi.y, y); end Overwrite;

Buildings.Utilities.IO.SignalExchange.Read Buildings.Utilities.IO.SignalExchange.Read

Block that allows a signal to be read as an FMU output

Buildings.Utilities.IO.SignalExchange.Read

Information

This block enables the reading of a signal and its meta-data by an external program without the need to explicitly propogate the signal to a top-level model.

Typical use and important parameters

This block is typically used by the BOPTEST framework (see BOPTEST) to identify and read signals as measurements by test controllers. It is used in combination with a dedicated parser to perform this task (see Parser Code). This block is also used by BOPTEST to specify if the signal is needed for calculation of specific key performance indicators (KPI).

The block output y is equal to the input u so that the block can be used in line with connections. However, input signal will also be directed to an external program as an output.

It is important to add a brief description of the signal using the description parameter, assign a unit to the output variable y, assign a type if needed for KPI calculation using the KPIs parameter, and assign a zone designation using the zone parameter if the KPI calculation is specific to a particular zone (for multi-zone models). See documentation for the parameter zone for more details.

Extends from Modelica.Blocks.Routing.RealPassThrough (Pass a Real signal through without modification).

Parameters

TypeNameDefaultDescription
Stringdescription Description of the signal being read
SignalsForKPIsKPIsSignalTypes.SignalsForKPIs.N...Tag with the type of signal for the calculation of the KPIs
Stringzone"1"Zone designation, required if KPIs is AirZoneTemperature, RadiativeZoneTemperature, OperativeZoneTemperature, RelativeHumidity, or CO2Concentration

Connectors

TypeNameDescription
input RealInputuConnector of Real input signal
output RealOutputyConnector of Real output signal

Modelica definition

model Read "Block that allows a signal to be read as an FMU output" extends Modelica.Blocks.Routing.RealPassThrough; parameter String description "Description of the signal being read"; parameter SignalTypes.SignalsForKPIs KPIs = SignalTypes.SignalsForKPIs.None "Tag with the type of signal for the calculation of the KPIs"; parameter String zone = "1" if ( KPIs==Buildings.Utilities.IO.SignalExchange.SignalTypes.SignalsForKPIs.AirZoneTemperature or KPIs==Buildings.Utilities.IO.SignalExchange.SignalTypes.SignalsForKPIs.RadiativeZoneTemperature or KPIs==Buildings.Utilities.IO.SignalExchange.SignalTypes.SignalsForKPIs.OperativeZoneTemperature or KPIs==Buildings.Utilities.IO.SignalExchange.SignalTypes.SignalsForKPIs.RelativeHumidity or KPIs==Buildings.Utilities.IO.SignalExchange.SignalTypes.SignalsForKPIs.CO2Concentration) "Zone designation, required if KPIs is AirZoneTemperature, RadiativeZoneTemperature, OperativeZoneTemperature, RelativeHumidity, or CO2Concentration"; protected final parameter Boolean boptestRead = true "Protected parameter, used by tools to search for read block in models"; end Read;