modelSystem7
Extends from Modelica.Icons.Example (Icon for runnable examples).
Information
This part of the system model changes the implementation of the control in Buildings.Examples.Tutorial.Boiler.System6 to use a state machine to switch the pumps and the boiler on and off. State machines provide an alternate way to implement discrete event, reactive and hybrid systems. The state machine that is implemented in this model is shown in the figure below.
In the figure above, the ovals depict states, and the arrows are transitions between the states. The transitions fire when the conditions are true.
Implementation
This model was built as follows:
-
First, we copied the model Buildings.Examples.Tutorial.Boiler.System6 and called it
Buildings.Examples.Tutorial.Boiler.System7. -
We implemented the state machine using blocks from the library Modelica.StateGraph. How to use these blocks is explained in Modelica.StateGraph.UsersGuide.
The figure below shows the state machine. The square icons are states, and the black bars are transitions. The initial state is indicated by the double frame. The transitions are enabled when their input signal is true. The numbers to the right of the transition indicate the delay in seconds. If a delay is present, the input needs to be true during the entire duration of the delay for a transition to fire. The active state is rendered green. Some states have a Boolean output signal that is used to switch components such as the pumps and the boiler on or off.
In our implementation, the state
allOffis the initial state, indicated by its double frame. The transitionT1is used to switch the pumps on. Once thepumpsOnstate is active, there are two alternate paths. Either transitionT2may fire, which would switch the boiler on, orT4may fire, which would return to theallOffstate. Hence, the boiler can only be on when the pumps are on. From the stateboilerOn, the only next step can be to transition to the statepumpsOn. Note that the transitionsT3andT4only fire when their input is true for the entire duration of 10 seconds. Hence, the pumps and the boiler must run for at least 10 seconds before they can be switched off.
When simulating the model for 2 days, or 172800 seconds, the response shown below should be seen.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.HeatFlowRate | Q_flow_nominal | 20000 | Nominal heat flow rate of radiator |
| Modelica.Units.SI.Temperature | TRadSup_nominal | 273.15 + 50 | Radiator nominal supply water temperature |
| Modelica.Units.SI.Temperature | TRadRet_nominal | 273.15 + 40 | Radiator nominal return water temperature |
| Modelica.Units.SI.MassFlowRate | mRad_flow_nominal | Q_flow_nominal/4200/(TRadSup_nominal - TRadRet_nominal) | Radiator nominal mass flow rate |
| Modelica.Units.SI.Temperature | TBoiSup_nominal | 273.15 + 70 | Boiler nominal supply water temperature |
| Modelica.Units.SI.Temperature | TBoiRet_min | 273.15 + 60 | Boiler minimum return water temperature |
| Modelica.Units.SI.MassFlowRate | mBoi_flow_nominal | Q_flow_nominal/4200/(TBoiSup_nominal - TBoiRet_min) | Boiler nominal mass flow rate |
| Modelica.Units.SI.MassFlowRate | mRadVal_flow_nominal | Q_flow_nominal/4200/(TBoiSup_nominal - TRadRet_nominal) | Radiator nominal mass flow rate |
| Modelica.Units.SI.Volume | V | 6*10*3 | Room volume |
| Modelica.Units.SI.MassFlowRate | mA_flow_nominal | V*1.2*6/3600 | Nominal mass flow rate |
| Modelica.Units.SI.HeatFlowRate | QRooInt_flow | 4000 | Internal heat gains of the room |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| BoundaryConditions.WeatherData.Bus | weaBus |
Components
Contents
| Name | Description |
|---|---|
| Medium model |
Revisions
-
April 9, 2024, by Hongxiang Fu:
SpecifiednominalValuesDefineDefaultPressureCurve=truein the mover component to suppress a warning. This is for #3819. -
February 15, 2022, by Michael Wetter:
Changed block downstream ofgreThrTRoofromandtoorblock. This ensures that the system is off when the outdoor air or room air is sufficiently warm. -
March 6, 2017, by Michael Wetter:
Added missing density to computation of air mass flow rate.
This is for #673. -
April 6, 2016, by Michael Wetter:
ReplacedModelica_StateGraph2withModelica.StateGraph. This is for issue 504. -
July 2, 2015, by Michael Wetter:
Changed control input forconPIDBoiand setreverseActing=falseto address issue #436. -
December 22, 2014 by Michael Wetter:
RemovedModelica.Fluid.Systemto address issue #311. -
March 1, 2013, by Michael Wetter:
Added nominal pressure drop for valves as this parameter no longer has a default value. -
April 13, 2012, by Michael Wetter:
Removed first order filter at boiler pump input. -
January 27, 2012, by Michael Wetter:
First implementation.