Buildings.Utilities.IO.SignalExchange.Examples.BaseClasses

Contains base classes for signal exchange examples

Information

This package contains base classes that are used to construct the models in Buildings.Utilities.IO.SignalExchange.Examples.

Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).

Package Content

Name Description
Buildings.Utilities.IO.SignalExchange.Examples.BaseClasses.ExportedModel ExportedModel Model to be exported as an FMU
Buildings.Utilities.IO.SignalExchange.Examples.BaseClasses.OriginalModel OriginalModel Original model

Buildings.Utilities.IO.SignalExchange.Examples.BaseClasses.ExportedModel Buildings.Utilities.IO.SignalExchange.Examples.BaseClasses.ExportedModel

Model to be exported as an FMU

Buildings.Utilities.IO.SignalExchange.Examples.BaseClasses.ExportedModel

Information

This is an example of a model that would be compiled in BOPTEST if the original model were using the signal exchange blocks. Note that inputs are added to activate and set values of control signals that can be overwritten and outputs are added to read signals from the read blocks.

Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).

Connectors

TypeNameDescription
input RealInputoveWriSet_uSignal for overwrite block for set point
input BooleanInputoveWriSet_activateActivation for overwrite block for set point
input RealInputoveWriAct_uSignal for overwrite block for actuator signal
input BooleanInputoveWriAct_activateActivation for overwrite block for actuator signal
output RealOutputreaMeasured state variable

Modelica definition

model ExportedModel "Model to be exported as an FMU" extends Modelica.Blocks.Icons.Block; Modelica.Blocks.Interfaces.RealInput oveWriSet_u "Signal for overwrite block for set point"; Modelica.Blocks.Interfaces.BooleanInput oveWriSet_activate "Activation for overwrite block for set point"; Modelica.Blocks.Interfaces.RealInput oveWriAct_u "Signal for overwrite block for actuator signal"; Modelica.Blocks.Interfaces.BooleanInput oveWriAct_activate "Activation for overwrite block for actuator signal"; Modelica.Blocks.Interfaces.RealOutput rea = mod.rea.y "Measured state variable"; BaseClasses.OriginalModel mod( oveWriSet( uExt( y=oveWriSet_u), activate( y=oveWriSet_activate)), oveWriAct( uExt( y=oveWriAct_u), activate( y=oveWriAct_activate))) "Original model"; end ExportedModel;

Buildings.Utilities.IO.SignalExchange.Examples.BaseClasses.OriginalModel Buildings.Utilities.IO.SignalExchange.Examples.BaseClasses.OriginalModel

Original model

Buildings.Utilities.IO.SignalExchange.Examples.BaseClasses.OriginalModel

Information

This is a model of a first order dynamic system with feedback control. Signal exchange blocks are implemented to overwrite either the setpoint or actuator control signals as well as read the output of the first order system.

Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).

Modelica definition

model OriginalModel "Original model" extends Modelica.Blocks.Icons.Block; Modelica.Blocks.Sources.Constant TSet(k=1) "Set point"; Modelica.Blocks.Continuous.LimPID conPI( controllerType=Modelica.Blocks.Types.SimpleController.PI, yMax=10) "Controller"; Modelica.Blocks.Continuous.FirstOrder firOrd( T=1, initType=Modelica.Blocks.Types.Init.InitialOutput) "First order element"; Overwrite oveWriSet( description="First order system control setpoint", u(min=-10, max=10, unit="1")) "Overwrite block for setpoint"; Overwrite oveWriAct(description="First order system input", u(min=-10, max=10, unit="1")) "Overwrite block for actuator signal"; Read rea( description="First order system output", KPIs=Buildings.Utilities.IO.SignalExchange.SignalTypes.SignalsForKPIs.None) "Measured state variable"; equation connect(TSet.y, oveWriSet.u); connect(oveWriSet.y, conPI.u_s); connect(conPI.y, oveWriAct.u); connect(oveWriAct.y, firOrd.u); connect(firOrd.y, rea.u); connect(rea.y, conPI.u_m); end OriginalModel;