modelSystem5

5th part of the system model, which adds closed-loop control for the valves

Extends from Modelica.Icons.Example (Icon for runnable examples).

Information

This part of the system model adds to the model that is implemented in Buildings.Examples.Tutorial.Boiler.System4 closed loop control for the valves.

Implementation

This model was built as follows:

  1. First, we copied the model Buildings.Examples.Tutorial.Boiler.System4 and called it Buildings.Examples.Tutorial.Boiler.System5.

  2. Next, we added closed loop control for the boiler valve as shown in the figure below.

    image

    This is implemented using the constant block Buildings.Controls.OBC.CDL.Reals.Sources.Constant for the set point, the PID controller with output limitation Buildings.Controls.OBC.CDL.Reals.PID. We configured the controller as

      Buildings.Controls.OBC.CDL.Reals.PID conPIDBoi(
        controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.P,
        k=0.1,
        Ti=120,
        Td=1,
        reverseActing=false) "Controller for valve in boiler loop";
    

    We set the proportional band to 10 Kelvin, hence k=0.1. We set the integral time constant to 120 seconds, which is the same time as is required to open or close the valve. These settings turn out to give satisfactory closed loop control performance. Otherwise, we would need to retune the controller, which is usually easiest by configuring the controller as a P-controller, then tuning the proportional gain, and finally changing it to a PI-controller and tuning the integral time constant.

    Note that we also set reverseActing=false because if, for a constant set point, the measured temperature increases, the valve control signal needs to decrease towards y=0, because in this condition, the boiler inlet temperature is not yet high enough. Once it is high enough, the control error will be negative and the valve can open.

  3. The valve control for the radiator loop is implemented similar to the boiler loop, with the exception that the setpoint is computed using the model Buildings.Controls.OBC.CDL.Reals.Line to implement a set point that shifts as a function of the room temperature. This instance is called TSetSup in the control sequence shown in the figure below, and takes as an input the room temperature, and the points for the (x1, f1) and (x2, f2) coordinates through which the setpoint goes.

    image

This completes the closed loop control. When simulating the model for 2 days, or 172800 seconds, the response shown below should be seen.

image

The figure shows that the return water temperature temRet.T quickly raises to 50°C and the supply water temperature temSup.T has smaller oscillations compared to Buildings.Examples.Tutorial.Boiler.System4.

Parameters

TypeNameDefaultDescription
Modelica.Units.SI.HeatFlowRateQ_flow_nominal20000Nominal heat flow rate of radiator
Modelica.Units.SI.TemperatureTRadSup_nominal273.15 + 50Radiator nominal supply water temperature
Modelica.Units.SI.TemperatureTRadRet_nominal273.15 + 40Radiator nominal return water temperature
Modelica.Units.SI.MassFlowRatemRad_flow_nominalQ_flow_nominal/4200/(TRadSup_nominal - TRadRet_nominal)Radiator nominal mass flow rate
Modelica.Units.SI.TemperatureTBoiSup_nominal273.15 + 70Boiler nominal supply water temperature
Modelica.Units.SI.TemperatureTBoiRet_min273.15 + 60Boiler minimum return water temperature
Modelica.Units.SI.MassFlowRatemBoi_flow_nominalQ_flow_nominal/4200/(TBoiSup_nominal - TBoiRet_min)Boiler nominal mass flow rate
Modelica.Units.SI.MassFlowRatemRadVal_flow_nominalQ_flow_nominal/4200/(TBoiSup_nominal - TRadRet_nominal)Radiator nominal mass flow rate
Modelica.Units.SI.VolumeV6*10*3Room volume
Modelica.Units.SI.MassFlowRatemA_flow_nominalV*1.2*6/3600Nominal mass flow rate
Modelica.Units.SI.HeatFlowRateQRooInt_flow4000Internal heat gains of the room

Components

TypeNameDefaultDescription
Buildings.Fluid.MixingVolumes.MixingVolumevol
Modelica.Thermal.HeatTransfer.Components.ThermalConductortheConThermal conductance with the ambient
Modelica.Thermal.HeatTransfer.Sources.FixedTemperatureTOutOutside temperature
Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlowpreHeaPrescribed heat flow
Modelica.Thermal.HeatTransfer.Components.HeatCapacitorheaCapHeat capacity for furniture and walls
Buildings.Controls.OBC.CDL.Reals.Sources.TimeTabletimTabTime table for internal heat gain
Buildings.Fluid.HeatExchangers.Radiators.RadiatorEN442_2radRadiator
Buildings.Fluid.Sensors.TemperatureTwoPorttemSupSupply water temperature
Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensortemRooRoom temperature
Buildings.Fluid.Movers.FlowControlled_m_flowpumRadPump for radiator
Buildings.Fluid.FixedResistances.JunctionmixMixer between valve and radiators
Buildings.Fluid.FixedResistances.JunctionsplSplitter of boiler loop bypass
Buildings.Fluid.FixedResistances.Junctionspl2
Buildings.Fluid.FixedResistances.Junctionmix2Mixer
Buildings.Fluid.FixedResistances.Junctionspl4Splitter for radiator loop valve bypass
Buildings.Fluid.Movers.FlowControlled_m_flowpumBoiPump for boiler
Buildings.Fluid.Boilers.BoilerPolynomialboiBoiler
Buildings.Fluid.Actuators.Valves.ThreeWayEqualPercentageLinearvalRadThree-way valve for radiator loop
Buildings.Fluid.Sources.Boundary_pTpreSouSource for pressure and to account for thermal expansion of water
Buildings.Fluid.Actuators.Valves.ThreeWayEqualPercentageLinearvalBoiThree-way valve for boiler
Buildings.Fluid.Sensors.TemperatureTwoPorttemRetReturn water temperature
Buildings.Fluid.FixedResistances.Junctionspl1Splitter
Buildings.Controls.OBC.CDL.Reals.HysteresishysTOutHysteresis for on/off based on outside temperature
Buildings.Controls.OBC.CDL.Logical.Notnot2
Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensorsenTOutOutdoor temperature sensor
Buildings.Controls.OBC.CDL.Reals.HysteresishysTBoiHysteresis for on/off of boiler
Buildings.Controls.OBC.CDL.Logical.Notnot3
Buildings.Controls.OBC.CDL.Logical.Andand1
Buildings.Controls.OBC.CDL.Conversions.BooleanToRealbooToReaRad1Boiler pump signal
Buildings.Controls.OBC.CDL.Logical.Andand2
Buildings.Controls.OBC.CDL.Conversions.BooleanToRealbooToReaRad2Boiler signal
Buildings.Controls.OBC.CDL.Reals.HysteresishysPumPump hysteresis
Buildings.Controls.OBC.CDL.Conversions.BooleanToRealbooToReaRadRadiator pump signal
Buildings.Controls.OBC.CDL.Logical.Notnot1Negate output of hysteresis
Buildings.Controls.OBC.CDL.Reals.Sources.ConstantTSetBoiRetTemperature setpoint for boiler return
Buildings.Controls.OBC.CDL.Reals.PIDconPIDBoiController for valve in boiler loop
Buildings.Controls.OBC.CDL.Reals.PIDconPIDRadController for valve in radiator loop
Buildings.Controls.OBC.CDL.Reals.LineTSetSupSetpoint for supply water temperature
Buildings.Controls.OBC.CDL.Reals.Sources.ConstantTSupMinMinimum heating supply temperature
Buildings.Controls.OBC.CDL.Reals.Sources.ConstantTSupMaxMaximum heating supply temperature
Buildings.Controls.OBC.CDL.Reals.Sources.ConstantTRooMinMinimum room air temperature

Contents

NameDescription
MediumA
MediumWMedium model

Revisions

  • April 9, 2024, by Hongxiang Fu:
    Specified nominalValuesDefineDefaultPressureCurve=true in the mover component to suppress a warning. This is for #3819.
  • March 6, 2017, by Michael Wetter:
    Added missing density to computation of air mass flow rate.
    This is for #673.
  • July 2, 2015, by Michael Wetter:
    Changed control input for conPIDBoi and set reverseActing=false to address issue #436.
  • December 22, 2014 by Michael Wetter:
    Removed Modelica.Fluid.System to address issue #311.
  • March 1, 2013, by Michael Wetter:
    Added nominal pressure drop for valves as this parameter no longer has a default value.
  • January 27, 2012, by Michael Wetter:
    First implementation.