Package with controller models
Information
Extends from Modelica.Icons.VariantsPackage (Icon for package containing variants).
Package Content
Name |
Description |
CoolingCoilTemperatureSetpoint
|
Set point scheduler for cooling coil |
HeatingCoilTemperatureSetpoint
|
Set point scheduler for heating coil |
MixedAirTemperatureSetpoint
|
Mixed air temperature setpoint for economizer |
PreHeatCoil
|
Controller for preheat coil |
RoomMixingBox
|
Controller for room mixing box |
Examples
|
Example models to test the components |
Set point scheduler for cooling coil
Information
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Parameters
Connectors
Modelica definition
Set point scheduler for heating coil
Information
Extends from CoolingCoilTemperatureSetpoint (Set point scheduler for cooling coil).
Parameters
Connectors
Modelica definition
Mixed air temperature setpoint for economizer
Information
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Connectors
Type | Name | Description |
input RealInput | TSupHeaSet | Supply temperature setpoint for heating [K] |
input RealInput | TSupCooSet | Supply temperature setpoint for cooling [K] |
output RealOutput | TSet | Mixed air temperature setpoint [K] |
ControlBus | controlBus | |
Modelica definition
model MixedAirTemperatureSetpoint
extends Modelica.Blocks.Icons.Block;
Modelica.Blocks.Routing.Extractor TSetMix(
nin=6,
index(start=2, fixed=true)) ;
Modelica.Blocks.Sources.Constant off(k=273.15 + 13)
;
Buildings.Utilities.Math.Average ave(nin=2);
Buildings.Controls.OBC.CDL.Interfaces.RealInput TSupHeaSet(
final unit="K",
displayUnit="degC")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TSupCooSet(
final unit="K",
displayUnit="degC")
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput TSet(
final unit="K",
displayUnit="degC")
;
Modelica.Blocks.Sources.Constant TPreCoo(k=273.15 + 13)
;
VAVReheat.BaseClasses.Controls.ControlBus controlBus;
Modelica.Blocks.Routing.Multiplex2 multiplex2_1;
equation
connect(TSetMix.u[1], ave.y);
connect(ave.y, TSetMix.u[1]);
connect(off.y, TSetMix.u[2]);
connect(off.y, TSetMix.u[3]);
connect(off.y, TSetMix.u[4]);
connect(TPreCoo.y, TSetMix.u[5]);
connect(off.y, TSetMix.u[6]);
connect(controlBus.controlMode, TSetMix.index);
connect(TSetMix.y, TSet);
connect(multiplex2_1.y, ave.u);
connect(TSupCooSet, multiplex2_1.u2[1]);
connect(TSupHeaSet, multiplex2_1.u1[1]);
end MixedAirTemperatureSetpoint;
Controller for preheat coil
Information
Controller for the preheat coil. If the air inlet temperature is below
a minimum temperature, such as 10°C, the preheat coil is activated.
It then switches the pump on, and regulates the valve
to meet the set point temperature for the supply air.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Connectors
Type | Name | Description |
input RealInput | TAirSup | Supply air temperature after the coil [K] |
input RealInput | TSupSetHea | Heating set point temperature for supply air [K] |
output RealOutput | yVal | Control signal for valve [1] |
input RealInput | TMix | Mixed air temperature upstream of coil [K] |
output RealOutput | yPum | Control signal for pump [1] |
Modelica definition
model PreHeatCoil
extends Modelica.Blocks.Icons.Block;
Buildings.Controls.Continuous.LimPID preHeaCoiCon(
yMax=1,
yMin=0,
Td=60,
initType=Modelica.Blocks.Types.Init.InitialState,
Ti=120,
strict=true,
k=0.1) ;
Modelica.Blocks.Sources.Constant zero(k=0) ;
Modelica.Blocks.Logical.Switch swiPumPreCoi ;
Modelica.Blocks.Logical.OnOffController preHeaOn(bandwidth=1)
;
Modelica.Blocks.Sources.Constant TPreHeaOn(k=273.15 + 10)
;
Modelica.Blocks.Sources.Constant one(k=1) ;
Modelica.Blocks.Interfaces.RealInput TAirSup(unit="K")
;
Modelica.Blocks.Interfaces.RealInput TSupSetHea(unit="K")
;
Modelica.Blocks.Interfaces.RealOutput yVal(unit="1")
;
Modelica.Blocks.Interfaces.RealInput TMix(unit="K")
;
Modelica.Blocks.Interfaces.RealOutput yPum(unit="1")
;
Modelica.Blocks.Logical.Switch swiValOp
;
Modelica.StateGraph.InitialStep pumOff(nIn=1, nOut=1)
;
Modelica.StateGraph.TransitionWithSignal toOn ;
inner Modelica.StateGraph.StateGraphRoot
stateGraphRoot;
Modelica.StateGraph.StepWithSignal pumOn(nIn=1, nOut=1)
;
Modelica.StateGraph.TransitionWithSignal toOff(enableTimer=true, waitTime=30*
60) ;
Modelica.Blocks.Logical.Not not1;
equation
connect(preHeaOn.reference,TPreHeaOn. y);
connect(zero.y, swiPumPreCoi.u3);
connect(one.y, swiPumPreCoi.u1);
connect(TAirSup, preHeaCoiCon.u_m);
connect(TSupSetHea, preHeaCoiCon.u_s);
connect(TMix, preHeaOn.u);
connect(yPum, swiPumPreCoi.y);
connect(zero.y, swiValOp.u3);
connect(swiValOp.y, yVal);
connect(pumOff.outPort[1], toOn.inPort);
connect(toOn.condition, preHeaOn.y);
connect(pumOn.inPort[1], toOn.outPort);
connect(toOff.inPort, pumOn.outPort[1]);
connect(preHeaOn.y, not1.u);
connect(not1.y, toOff.condition);
connect(toOff.outPort, pumOff.inPort[1]);
connect(pumOn.active, swiPumPreCoi.u2);
connect(pumOn.active, swiValOp.u2);
connect(preHeaCoiCon.y, swiValOp.u1);
end PreHeatCoil;
Controller for room mixing box
Information
This controller outputs the control signal for the air damper for the hot deck and the cold deck.
The control signal for the hot deck is the larger of the two signals needed to track the room heating
temperature setpoint, and the minimum air flow rate.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Parameters
Type | Name | Default | Description |
MassFlowRate | m_flow_min | | Minimum mass flow rate [kg/s] |
Connectors
Type | Name | Description |
input RealInput | TRoo | Measured room temperature [K] |
output RealOutput | yHot | Signal for hot air damper |
output RealOutput | yCol | Signal for cold deck air damper |
input RealInput | mAir_flow | Measured air mass flow rate into the room |
input BooleanInput | yFan | Fan operation, true if fan is running |
input RealInput | TRooSetHea | Room temperature setpoint for heating [K] |
input RealInput | TRooSetCoo | Room temperature setpoint for cooling [K] |
Modelica definition
block RoomMixingBox
extends Modelica.Blocks.Icons.Block;
parameter Modelica.Units.SI.MassFlowRate m_flow_min ;
Buildings.Controls.OBC.CDL.Continuous.PID conHea(
controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI,
Td=60,
k=0.1,
Ti=120) ;
Buildings.Controls.OBC.CDL.Continuous.PID conCoo(
controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI,
reverseActing=false,
Td=60,
k=0.1,
Ti=120) ;
Modelica.Blocks.Interfaces.RealInput TRoo(
final quantity="ThermodynamicTemperature",
final unit = "K",
displayUnit = "degC", min=0)
;
Modelica.Blocks.Interfaces.RealOutput yHot ;
Modelica.Blocks.Interfaces.RealOutput yCol ;
Modelica.Blocks.Interfaces.RealInput mAir_flow
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput yFan
;
Buildings.Controls.OBC.CDL.Continuous.PID conFloRat(
controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI,
Td=60,
k=0.1,
Ti=120,
r=m_flow_min) ;
Modelica.Blocks.Sources.Constant mAirSet(k=m_flow_min)
;
Buildings.Controls.OBC.CDL.Continuous.Max max
;
Modelica.Blocks.Interfaces.RealInput TRooSetHea(unit="K")
;
Modelica.Blocks.Interfaces.RealInput TRooSetCoo(unit="K")
;
Modelica.Blocks.Sources.RealExpression gaiHea(y=1 - gaiCoo.y)
;
Modelica.Blocks.Math.Product product;
Modelica.Blocks.Math.Product product1;
Buildings.Controls.OBC.CDL.Continuous.Max maxCoo
;
Buildings.Controls.OBC.CDL.Continuous.Subtract dTSet
;
Buildings.Controls.OBC.CDL.Continuous.Subtract dTRooHea
;
Buildings.Controls.OBC.CDL.Continuous.Limiter gaiCoo(uMax=1, uMin=0)
;
Buildings.Controls.OBC.CDL.Continuous.Divide gaiCooUnl
;
Buildings.Controls.OBC.CDL.Continuous.Switch swiHot ;
Buildings.Controls.OBC.CDL.Continuous.Switch swiCoo ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant zer(k=0) ;
equation
connect(mAir_flow, conFloRat.u_m);
connect(conHea.y, max.u1);
connect(conHea.u_s, TRooSetHea);
connect(conCoo.u_s, TRooSetCoo);
connect(TRoo, conCoo.u_m);
connect(TRoo, conHea.u_m);
connect(conFloRat.y, product.u1);
connect(product.y, max.u2);
connect(product.u2, gaiHea.y);
connect(mAirSet.y, conFloRat.u_s);
connect(dTSet.u1, TRooSetCoo);
connect(dTSet.u2, TRooSetHea);
connect(dTRooHea.u1, TRoo);
connect(dTRooHea.u2, TRooSetHea);
connect(gaiCooUnl.u1, dTRooHea.y);
connect(dTSet.y, gaiCooUnl.u2);
connect(gaiCooUnl.y, gaiCoo.u);
connect(gaiCoo.y, product1.u2);
connect(conFloRat.y, product1.u1);
connect(conCoo.y, maxCoo.u1);
connect(maxCoo.u2, product1.y);
connect(swiHot.y, yHot);
connect(swiHot.u1, max.y);
connect(yCol, swiCoo.y);
connect(swiCoo.u1, maxCoo.y);
connect(swiCoo.u2, yFan);
connect(zer.y, swiCoo.u3);
connect(zer.y, swiHot.u3);
connect(yFan, swiHot.u2);
end RoomMixingBox;