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.WeatherStation WeatherStation Implements typical weather measurements with signal exchange blocks
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"; final parameter Boolean boptestOverwrite = true "Parameter that is used by tools to search for overwrite block in models"; 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"; 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"; final parameter Boolean boptestRead = true "Parameter that is used by tools to search for read block in models"; end Read;

Buildings.Utilities.IO.SignalExchange.WeatherStation Buildings.Utilities.IO.SignalExchange.WeatherStation

Implements typical weather measurements with signal exchange blocks

Buildings.Utilities.IO.SignalExchange.WeatherStation

Information

This block enables the reading of weather measurements and their meta-data by an external program without the need to explicitly propagate the signal to a top-level model. This block utilizes a number of pre-configured instances of Buildings.Utilities.IO.SignalExchange.Read

Typical use and important parameters

This block is typically used by the BOPTEST framework (see BOPTEST) to identify and read weather measurements by test controllers. It is used in combination with a dedicated parser to perform this task (see Parser Code).

Connectors

TypeNameDescription
BusweaBusWeather data

Modelica definition

model WeatherStation "Implements typical weather measurements with signal exchange blocks" Buildings.BoundaryConditions.WeatherData.Bus weaBus "Weather data"; Buildings.Utilities.IO.SignalExchange.Read reaWeaTDryBul( description="Outside drybulb temperature measurement", y(final unit="K")) "Outside drybulb temperature measurement"; Buildings.Utilities.IO.SignalExchange.Read reaWeaRelHum( description="Outside relative humidity measurement", y(final unit="1")) "Outside relative humidity measurement"; Buildings.Utilities.IO.SignalExchange.Read reaWeaWinSpe( description="Wind speed measurement", y(final unit="m/s")) "Wind speed measurement"; Buildings.Utilities.IO.SignalExchange.Read reaWeaWinDir( description="Wind direction measurement", y(final unit="rad")) "Wind direction measurement"; Buildings.Utilities.IO.SignalExchange.Read reaWeaHGloHor( description="Global horizontal solar irradiation measurement", y(final unit="W/m2")) "Global horizontal solar irradiation measurement"; Buildings.Utilities.IO.SignalExchange.Read reaWeaNTot( description="Sky cover measurement", y(final unit="1")) "Sky cover measurement"; Buildings.Utilities.IO.SignalExchange.Read reaWeaPAtm( description="Atmospheric pressure measurement", y(final unit="Pa")) "Atmospheric pressure measurement"; Buildings.Utilities.IO.SignalExchange.Read reaWeaHDifHor( description="Horizontal diffuse solar radiation measurement", y(final unit="W/m2")) "Horizontal diffuse solar radiation measurement"; Buildings.Utilities.IO.SignalExchange.Read reaWeaCeiHei( description="Cloud cover ceiling height measurement", y(final unit="m")) "Cloud cover ceiling height measurement"; Buildings.Utilities.IO.SignalExchange.Read reaWeaTWetBul( description="Wet bulb temperature measurement", y(final unit="K")) "Wet bulb temperature measurement"; Buildings.Utilities.IO.SignalExchange.Read reaWeaTDewPoi( description="Dew point temperature measurement", y(final unit="K")) "Dew point temperature measurement"; Buildings.Utilities.IO.SignalExchange.Read reaWeaTBlaSky( description="Black-body sky temperature measurement", y(final unit="K")) "Black-body sky temperature measurement"; Buildings.Utilities.IO.SignalExchange.Read reaWeaHHorIR( description="Horizontal infrared irradiation measurement", y(final unit="W/m2")) "Horizontal infrared irradiation measurement"; Buildings.Utilities.IO.SignalExchange.Read reaWeaHDirNor( description="Direct normal radiation measurement", y(final unit="W/m2")) "Direct normal radiation measurement"; Buildings.Utilities.IO.SignalExchange.Read reaWeaCloTim( description="Day number with units of seconds", y(final unit="s")) "Day number with units of seconds"; Buildings.Utilities.IO.SignalExchange.Read reaWeaSolAlt( description="Solar altitude angle measurement", y(final unit="rad")) "Solar altitude angle measurement"; Buildings.Utilities.IO.SignalExchange.Read reaWeaNOpa( description="Opaque sky cover measurement", y(final unit="1")) "Opaque sky cover measurement"; Buildings.Utilities.IO.SignalExchange.Read reaWeaLat( description="Latitude of the location", y(final unit="rad")) "Latitude of the location"; Buildings.Utilities.IO.SignalExchange.Read reaWeaLon( description="Longitude of the location", y(final unit="rad")) "Longitude of the location"; Buildings.Utilities.IO.SignalExchange.Read reaWeaSolDec( description="Solar declination angle measurement", y(final unit="rad")) "Solar declination angle measurement"; Buildings.Utilities.IO.SignalExchange.Read reaWeaSolHouAng( description="Solar hour angle measurement", y(final unit="rad")) "Solar hour angle measurement"; Buildings.Utilities.IO.SignalExchange.Read reaWeaSolTim( description="Solar time", y(final unit="s")) "Solar time"; Buildings.Utilities.IO.SignalExchange.Read reaWeaSolZen( description="Solar zenith angle measurement", y(final unit="rad")) "Solar zenith angle measurement"; equation connect(weaBus.TDryBul, reaWeaTDryBul.u); connect(weaBus.relHum, reaWeaRelHum.u); connect(weaBus.winSpe, reaWeaWinSpe.u); connect(weaBus.winDir, reaWeaWinDir.u); connect(weaBus.HGloHor, reaWeaHGloHor.u); connect(weaBus.nTot, reaWeaNTot.u); connect(weaBus.pAtm, reaWeaPAtm.u); connect(weaBus.HDifHor, reaWeaHDifHor.u); connect(weaBus.HDirNor, reaWeaHDirNor.u); connect(weaBus.HHorIR, reaWeaHHorIR.u); connect(weaBus.TBlaSky, reaWeaTBlaSky.u); connect(weaBus.TDewPoi, reaWeaTDewPoi.u); connect(weaBus.TWetBul, reaWeaTWetBul.u); connect(weaBus.ceiHei, reaWeaCeiHei.u); connect(weaBus.cloTim, reaWeaCloTim.u); connect(weaBus.lat, reaWeaLat.u); connect(weaBus.lon, reaWeaLon.u); connect(weaBus.nOpa, reaWeaNOpa.u); connect(weaBus.solAlt, reaWeaSolAlt.u); connect(weaBus.solDec, reaWeaSolDec.u); connect(weaBus.solHouAng, reaWeaSolHouAng.u); connect(weaBus.solTim, reaWeaSolTim.u); connect(weaBus.solZen, reaWeaSolZen.u); end WeatherStation;