Buildings.Examples.DualFanDualDuct.Controls

Package with controller models

Information

Extends from Modelica.Icons.VariantsPackage (Icon for package containing variants).

Package Content

NameDescription
Buildings.Examples.DualFanDualDuct.Controls.Examples Examples Example models to test the components
Buildings.Examples.DualFanDualDuct.Controls.RoomMixingBox RoomMixingBox Controller for room mixing box
Buildings.Examples.DualFanDualDuct.Controls.CoolingCoilTemperatureSetpoint CoolingCoilTemperatureSetpoint Set point scheduler for cooling coil
Buildings.Examples.DualFanDualDuct.Controls.HeatingCoilTemperatureSetpoint HeatingCoilTemperatureSetpoint Set point scheduler for heating coil
Buildings.Examples.DualFanDualDuct.Controls.FanVFD FanVFD Controller for fan revolution


Buildings.Examples.DualFanDualDuct.Controls.RoomMixingBox Buildings.Examples.DualFanDualDuct.Controls.RoomMixingBox

Controller for room mixing box

Buildings.Examples.DualFanDualDuct.Controls.RoomMixingBox

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.Interfaces.BlockIcon (Basic graphical layout of input/output block).

Parameters

TypeNameDefaultDescription
MassFlowRatem_flow_min Minimum mass flow rate [kg/s]

Connectors

TypeNameDescription
input RealInputTRooMeasured room temperature [K]
output RealOutputyHotSignal for hot air damper
output RealOutputyColSignal for cold deck air damper
input RealInputmAir_flowMeasured air mass flow rate into the room
input RealInputTRooSetHeaRoom temperature setpoint for heating [K]
input RealInputTRooSetCooRoom temperature setpoint for cooling [K]

Modelica definition

block RoomMixingBox "Controller for room mixing box"
  extends Modelica.Blocks.Interfaces.BlockIcon;
  parameter Modelica.SIunits.MassFlowRate m_flow_min "Minimum mass flow rate";
  Buildings.Controls.Continuous.LimPID conHea(
    yMax=1,
    xi_start=0.1,
    initType=Modelica.Blocks.Types.InitPID.InitialState,
    Td=60,
    yMin=0,
    controllerType=Modelica.Blocks.Types.SimpleController.PI,
    k=0.5,
    Ti=60) "Controller for heating";
  Buildings.Controls.Continuous.LimPID conCoo(
    yMax=1,
    reverseAction=true,
    Td=60,
    controllerType=Modelica.Blocks.Types.SimpleController.PI,
    k=0.5,
    Ti=60) "Controller for cooling (acts on damper)";
  Modelica.Blocks.Interfaces.RealInput TRoo(final quantity="ThermodynamicTemperature",
                                          final unit = "K", displayUnit = "degC", min=0) 
    "Measured room temperature";
  Modelica.Blocks.Interfaces.RealOutput yHot "Signal for hot air damper";
  Modelica.Blocks.Interfaces.RealOutput yCol "Signal for cold deck air damper";
  Modelica.Blocks.Interfaces.RealInput mAir_flow 
    "Measured air mass flow rate into the room";
  Buildings.Controls.Continuous.LimPID conFloRat(
    yMax=1,
    xi_start=0.1,
    Td=60,
    yMin=0,
    controllerType=Modelica.Blocks.Types.SimpleController.PI,
    k=1,
    Ti=20) "Controller for mass flow rate";
  Modelica.Blocks.Sources.Constant mAirSet(k=m_flow_min) 
    "Set point for minimum air flow rate";
  Buildings.Utilities.Math.SmoothMax smoothMax(deltaX=0.01);
  Modelica.Blocks.Interfaces.RealInput TRooSetHea(unit="K") 
    "Room temperature setpoint for heating";
  Modelica.Blocks.Interfaces.RealInput TRooSetCoo(unit="K") 
    "Room temperature setpoint for cooling";
equation 
  connect(mAirSet.y, conFloRat.u_s);
  connect(mAir_flow, conFloRat.u_m);
  connect(smoothMax.y, yHot);
  connect(conHea.y, smoothMax.u1);
  connect(conFloRat.y, smoothMax.u2);
  connect(conCoo.y, yCol);
  connect(conHea.u_s, TRooSetHea);
  connect(conCoo.u_s, TRooSetCoo);
  connect(TRoo, conCoo.u_m);
  connect(TRoo, conHea.u_m);
end RoomMixingBox;

Buildings.Examples.DualFanDualDuct.Controls.CoolingCoilTemperatureSetpoint Buildings.Examples.DualFanDualDuct.Controls.CoolingCoilTemperatureSetpoint

Set point scheduler for cooling coil

Buildings.Examples.DualFanDualDuct.Controls.CoolingCoilTemperatureSetpoint

Information

Extends from Modelica.Blocks.Interfaces.BlockIcon (Basic graphical layout of input/output block).

Parameters

TypeNameDefaultDescription
TemperatureTOn Setpoint during on [K]
TemperatureTOff Setpoint during off [K]

Connectors

TypeNameDescription
ControlBuscontrolBus 
output RealOutputTSetTemperature set point

Modelica definition

block CoolingCoilTemperatureSetpoint 
  "Set point scheduler for cooling coil"
  extends Modelica.Blocks.Interfaces.BlockIcon;
  import Buildings.Examples.VAVReheat.Controls.OperationModes;
  parameter Modelica.SIunits.Temperature TOn "Setpoint during on";
  parameter Modelica.SIunits.Temperature TOff "Setpoint during off";
  Modelica.Blocks.Sources.RealExpression TSetPoi(y=if (mode.y ==
        OperationModes.occupied or mode.y == OperationModes.unoccupiedPreCool
         or mode.y == OperationModes.safety) then TOn else TOff) 
    "Air temperature setpoint";
  VAVReheat.Controls.ControlBus controlBus;
  Modelica.Blocks.Routing.IntegerPassThrough mode;
  Modelica.Blocks.Interfaces.RealOutput TSet "Temperature set point";
equation 
  connect(controlBus.controlMode, mode.u);
  connect(TSetPoi.y, TSet);

end CoolingCoilTemperatureSetpoint;

Buildings.Examples.DualFanDualDuct.Controls.HeatingCoilTemperatureSetpoint Buildings.Examples.DualFanDualDuct.Controls.HeatingCoilTemperatureSetpoint

Set point scheduler for heating coil

Buildings.Examples.DualFanDualDuct.Controls.HeatingCoilTemperatureSetpoint

Information

Extends from CoolingCoilTemperatureSetpoint (Set point scheduler for cooling coil).

Parameters

TypeNameDefaultDescription
TemperatureTOn Setpoint during on [K]
TemperatureTOff Setpoint during off [K]

Connectors

TypeNameDescription
ControlBuscontrolBus 
output RealOutputTSetTemperature set point

Modelica definition

block HeatingCoilTemperatureSetpoint 
  "Set point scheduler for heating coil"
  import Buildings.Examples.VAVReheat.Controls.OperationModes;
 extends CoolingCoilTemperatureSetpoint(TSetPoi(y=if (mode.y ==
        OperationModes.unoccupiedOff) then TOff else TOn));
end HeatingCoilTemperatureSetpoint;

Buildings.Examples.DualFanDualDuct.Controls.FanVFD Buildings.Examples.DualFanDualDuct.Controls.FanVFD

Controller for fan revolution

Buildings.Examples.DualFanDualDuct.Controls.FanVFD

Information

Extends from Modelica.Blocks.Interfaces.SISO (Single Input Single Output continuous control block).

Parameters

TypeNameDefaultDescription
RealxSet_nominal Nominal setpoint (used for normalization)
Realr_N_min0.01Minimum normalized fan speed

Connectors

TypeNameDescription
input RealInputuConnector of Real input signal
output RealOutputyConnector of Real output signal
ControlBuscontrolBus 
input RealInputu_mConnector of measurement input signal

Modelica definition

block FanVFD "Controller for fan revolution"
  extends Modelica.Blocks.Interfaces.SISO;
  import Buildings.Examples.VAVReheat.Controls.OperationModes;
  Buildings.Controls.Continuous.LimPID con(
    yMax=1,
    yMin=0,
    controllerType=Modelica.Blocks.Types.SimpleController.PI,
    Td=60,
    Ti=10) "Controller";
  Modelica.Blocks.Math.Gain gaiMea(k=1/xSet_nominal) 
    "Gain to normalize measurement signal";
  parameter Real xSet_nominal "Nominal setpoint (used for normalization)";
  VAVReheat.Controls.ControlBus controlBus;
  Modelica.Blocks.Routing.Extractor extractor(nin=6);
  Modelica.Blocks.Sources.Constant off(k=r_N_min) "Off signal";
  Modelica.Blocks.Sources.Constant on(k=1) "On signal";
  Modelica.Blocks.Math.Gain gaiSet(k=1/xSet_nominal) 
    "Gain to normalize setpoint signal";
  Modelica.Blocks.Interfaces.RealInput u_m 
    "Connector of measurement input signal";
  parameter Real r_N_min=0.01 "Minimum normalized fan speed";
  Modelica.Blocks.Continuous.FirstOrder firstOrder(
    initType=Modelica.Blocks.Types.Init.InitialState,
    y_start=r_N_min,
    T=60);
equation 
  connect(gaiMea.y, con.u_m);
  connect(con.y, extractor.u[OperationModes.occupied]);
  connect(con.y, extractor.u[OperationModes.unoccupiedWarmUp]);
  connect(con.y, extractor.u[OperationModes.unoccupiedPreCool]);
  connect(off.y, extractor.u[OperationModes.unoccupiedOff]);
  connect(off.y, extractor.u[OperationModes.safety]);
  connect(on.y, extractor.u[OperationModes.unoccupiedNightSetBack]);
  connect(controlBus.controlMode, extractor.index);
  connect(gaiSet.y, con.u_s);
  connect(u_m, gaiMea.u);
  connect(gaiSet.u, u);
  connect(extractor.y, firstOrder.u);
  connect(y, extractor.y);
end FanVFD;

Automatically generated Fri Nov 4 08:32:27 2011.