modelSystem6

Closed loop model with all controls implemented

Extends from Buildings.Examples.Tutorial.CDL.BaseClasses.PartialOpenLoop (Partial model with open loop system).

Information

In this step, we added the last controller, which is controlling the mixing valve for the radiator supply water temperature.

Implementation

This model was built as follows:

  1. First, we copied the controller Buildings.Examples.Tutorial.CDL.Controls.OpenLoopRadiatorSupply to create the block Buildings.Examples.Tutorial.CDL.Controls.RadiatorSupply.

  2. In this new block, we used Buildings.Controls.OBC.CDL.Reals.Line to compute the set point for the supply water temperature based on the room air temperature. This set point is then used in a PI controller Buildings.Controls.OBC.CDL.Reals.PID to modulate the mixing valve position in order to track the supply water temperature set point.

  3. To allow configuring the temperatures and the control gains, we exposed the main parameters of the controller, see Buildings.Examples.Tutorial.CDL.Controls.RadiatorSupply.

  4. We also implemented the open loop validation Buildings.Examples.Tutorial.CDL.Controls.Validation.RadiatorSupply to ensure that the controller is implemented correctly.

Exercise

Create a model, such as this model. To do so,

  1. Copy Buildings.Examples.Tutorial.CDL.System5.

  2. Implement the controller for the radiator supply water temperature control.

    Make a small unit test to verify that the controller is implemented correctly.

  3. Use this new controller instead of the open loop controller conRadSup.

Simulate the system to verify that the mixing valve conRadSup is modulated and the room air temperature temRoo.T is well tracked.

Temperatures and control signals.

Parameters

TypeNameDefaultDescription
Modelica.Units.SI.HeatFlowRateQ_flow_nominal (from PartialOpenLoop)20000Nominal heat flow rate of radiator
Modelica.Units.SI.TemperatureTRadSup_nominal (from PartialOpenLoop)273.15 + 50Radiator nominal supply water temperature
Modelica.Units.SI.TemperatureTRadRet_nominal (from PartialOpenLoop)273.15 + 40Radiator nominal return water temperature
Modelica.Units.SI.MassFlowRatemRad_flow_nominal (from PartialOpenLoop)Q_flow_nominal/4200/(TRadSup_nominal - TRadRet_nominal)Radiator nominal mass flow rate
Modelica.Units.SI.TemperatureTBoiSup_nominal (from PartialOpenLoop)273.15 + 70Boiler nominal supply water temperature
Modelica.Units.SI.TemperatureTBoiRet_min (from PartialOpenLoop)273.15 + 60Boiler minimum return water temperature
Modelica.Units.SI.MassFlowRatemBoi_flow_nominal (from PartialOpenLoop)Q_flow_nominal/4200/(TBoiSup_nominal - TBoiRet_min)Boiler nominal mass flow rate
Modelica.Units.SI.MassFlowRatemRadVal_flow_nominal (from PartialOpenLoop)Q_flow_nominal/4200/(TBoiSup_nominal - TRadRet_nominal)Radiator nominal mass flow rate
Modelica.Units.SI.VolumeV (from PartialOpenLoop)6*10*3Room volume
Modelica.Units.SI.MassFlowRatemA_flow_nominal (from PartialOpenLoop)V*1.2*6/3600Nominal mass flow rate
Modelica.Units.SI.HeatFlowRateQRooInt_flow (from PartialOpenLoop)4000Internal heat gains of the room

Connectors

TypeNameDefaultDescription
BoundaryConditions.WeatherData.BusweaBus (from PartialOpenLoop)Weather data bus

Components

TypeNameDefaultDescription
Buildings.Fluid.MixingVolumes.MixingVolumevol (from PartialOpenLoop)Room air volume
Modelica.Thermal.HeatTransfer.Components.ThermalConductortheCon (from PartialOpenLoop)Thermal conductance with the ambient
Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlowpreHea (from PartialOpenLoop)Prescribed heat flow
Modelica.Thermal.HeatTransfer.Components.HeatCapacitorheaCap (from PartialOpenLoop)Heat capacity for furniture and walls
Buildings.Controls.OBC.CDL.Reals.Sources.TimeTabletimTab (from PartialOpenLoop)Time table for internal heat gain
Buildings.Fluid.HeatExchangers.Radiators.RadiatorEN442_2rad (from PartialOpenLoop)Radiator
Buildings.Fluid.Sensors.TemperatureTwoPorttemSup (from PartialOpenLoop)Supply water temperature
Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensortemRoo (from PartialOpenLoop)Room temperature
Buildings.Fluid.Movers.FlowControlled_m_flowpumRad (from PartialOpenLoop)Pump for radiator
Buildings.Fluid.FixedResistances.Junctionmix (from PartialOpenLoop)Mixer between valve and radiators
Buildings.Fluid.FixedResistances.Junctionspl (from PartialOpenLoop)Splitter of boiler loop bypass
Buildings.Fluid.FixedResistances.Junctionspl2 (from PartialOpenLoop)Flow splitter in return from radiator
Buildings.Fluid.FixedResistances.Junctionmix2 (from PartialOpenLoop)Mixer
Buildings.Fluid.FixedResistances.Junctionspl4 (from PartialOpenLoop)Splitter for radiator loop valve bypass
Buildings.Fluid.Movers.FlowControlled_m_flowpumBoi (from PartialOpenLoop)Pump for boiler
Buildings.Fluid.Boilers.BoilerPolynomialboi (from PartialOpenLoop)Boiler
Buildings.Fluid.Actuators.Valves.ThreeWayEqualPercentageLinearvalRad (from PartialOpenLoop)Three-way valve for radiator loop
Buildings.Fluid.Sources.Boundary_pTpreSou (from PartialOpenLoop)Source for pressure and to account for thermal expansion of water
Buildings.Fluid.Actuators.Valves.ThreeWayEqualPercentageLinearvalBoi (from PartialOpenLoop)Three-way valve for boiler
Buildings.Fluid.Sensors.TemperatureTwoPorttemRet (from PartialOpenLoop)Return water temperature
Buildings.Fluid.FixedResistances.Junctionspl1 (from PartialOpenLoop)Splitter
Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensorsenTOut (from PartialOpenLoop)Outdoor temperature sensor
BoundaryConditions.WeatherData.ReaderTMY3weaDat (from PartialOpenLoop)Weather data reader
Modelica.Thermal.HeatTransfer.Sources.PrescribedTemperatureTOut (from PartialOpenLoop)Outside temperature
Controls.BoilerReturnconBoiRetController for boiler return water temperature
Controls.SystemOnOffconSysStaController that switches the system on and off
Controls.RadiatorSupplyconRadSupController for the mixing valve for the radiator supply water
Controls.EquipmentOnOffconEquStaController that switches the equipment on and off
Buildings.Controls.OBC.CDL.Conversions.BooleanToRealradPumConType conversion for radiator pump signal
Buildings.Controls.OBC.CDL.Conversions.BooleanToRealboiPumConType conversion for boiler pump signal
Buildings.Controls.OBC.CDL.Conversions.BooleanToRealboiSigConType conversion for boiler signal

Revisions

  • February 18, 2020, by Michael Wetter:
    First implementation.