From 07096716c850feeaa0fd8caecca8b83448758c52 Mon Sep 17 00:00:00 2001 From: Devaprasad Date: Tue, 15 Feb 2022 14:44:58 -0800 Subject: [PATCH 01/83] Added packages for fan coil unit control sequences --- .../OBC/ASHRAE/FanCoilUnit/Controller.mo | 7 + .../FanCoilUnit/Subsequences/FanSpeed.mo | 131 ++++++++++++++++++ .../FanCoilUnit/Subsequences/package.mo | 4 + .../FanCoilUnit/Subsequences/package.order | 1 + .../OBC/ASHRAE/FanCoilUnit/package.mo | 39 ++++++ .../OBC/ASHRAE/FanCoilUnit/package.order | 2 + Buildings/Controls/OBC/ASHRAE/package.order | 1 + 7 files changed, 185 insertions(+) create mode 100644 Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Controller.mo create mode 100644 Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo create mode 100644 Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/package.mo create mode 100644 Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/package.order create mode 100644 Buildings/Controls/OBC/ASHRAE/FanCoilUnit/package.mo create mode 100644 Buildings/Controls/OBC/ASHRAE/FanCoilUnit/package.order diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Controller.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Controller.mo new file mode 100644 index 00000000000..040216f65df --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Controller.mo @@ -0,0 +1,7 @@ +within Buildings.Controls.OBC.ASHRAE.FanCoilUnit; +block Controller "Controller for fan coil systems" + G36_PR1.Generic.SetPoints.OperationMode opeModSel + annotation (Placement(transformation(extent={{-60,4},{-40,36}}))); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); +end Controller; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo new file mode 100644 index 00000000000..7a1abca2325 --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo @@ -0,0 +1,131 @@ +within Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences; +block FanSpeed + + parameter Real deaSpe = 0.1 + "Deadband mode fan speed"; + + parameter Real heaSpeMin = 0.1 + "Deadband mode fan speed"; + + parameter Real heaPerMin + "Minimum heating loop signal at which fan speed"; + + CDL.Interfaces.BooleanInput uFanPro "Fan proven on signal" + annotation (Placement(transformation(extent={{-140,0},{-100,40}}))); + CDL.Interfaces.IntegerInput opeMod "System operating mode" + annotation (Placement(transformation(extent={{-140,40},{-100,80}}))); + CDL.Interfaces.BooleanOutput yFan "Fan enable signal" + annotation (Placement(transformation(extent={{120,20},{160,60}}))); + CDL.Integers.Equal intEqu "Check if zone is unoccupied" + annotation (Placement(transformation(extent={{-40,50},{-20,70}}))); + CDL.Integers.Sources.Constant conInt(k=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.unoccupied) + "Constant unoccupied mode signal" + annotation (Placement(transformation(extent={{-80,30},{-60,50}}))); + CDL.Logical.Not not1 "Enable only if zone is not in unoccupied mode" + annotation (Placement(transformation(extent={{-10,50},{10,70}}))); + CDL.Continuous.Switch swi + annotation (Placement(transformation(extent={{80,-10},{100,10}}))); + CDL.Conversions.BooleanToReal booToRea "Convert fan enable signal to Real" + annotation (Placement(transformation(extent={{50,-30},{70,-10}}))); + CDL.Interfaces.RealInput uHea "Heating loop signal" + annotation (Placement(transformation(extent={{-140,-40},{-100,0}}))); + CDL.Interfaces.RealInput uCoo "Cooling loop signal" + annotation (Placement(transformation(extent={{-140,-120},{-100,-80}}))); + CDL.Continuous.Line lin "Heating fan speed signal" + annotation (Placement(transformation(extent={{-30,-30},{-10,-10}}))); + CDL.Continuous.Sources.Constant con[2](k={heaPerMin,heaPerMax}) + "Heating loop signal support points" + annotation (Placement(transformation(extent={{-80,-50},{-60,-30}}))); + CDL.Continuous.Sources.Constant con1[2](k={heaSpeMin,heaSpeMax}) + "Heating fan speed signals" + annotation (Placement(transformation(extent={{-80,-10},{-60,10}}))); + CDL.Continuous.Sources.Constant con2[2](k={minCooSpe,maxCooSpe}) + "Cooling fan speed signals" + annotation (Placement(transformation(extent={{-80,-90},{-60,-70}}))); + CDL.Continuous.Line lin1 "Cooling fan speed signal" + annotation (Placement(transformation(extent={{-30,-110},{-10,-90}}))); + CDL.Continuous.Sources.Constant con3[2](k={cooLooPerMin,cooLooPerMax}) + "Cooling loop signal support points" + annotation (Placement(transformation(extent={{-80,-130},{-60,-110}}))); + CDL.Continuous.Sources.Constant con4(k=deaSpe) + "Deadband mode fan speed signal" + annotation (Placement(transformation(extent={{-30,-70},{-10,-50}}))); + CDL.Continuous.Hysteresis hys(uLow=heaDea - deaHysLim, uHigh=heaDea) + "Hysteresis for switching between deadband mode and heating mode" + annotation (Placement(transformation(extent={{0,-50},{20,-30}}))); + CDL.Continuous.Switch swi1 + "Switch for turning on heating mode from deadband mode" + annotation (Placement(transformation(extent={{30,-70},{50,-50}}))); + CDL.Continuous.Hysteresis hys1(uLow=cooDea - deaHysLim, uHigh=cooDea) + "Hysteresis for switching on cooling mode from deadband mode" + annotation (Placement(transformation(extent={{0,-90},{20,-70}}))); + CDL.Continuous.Switch swi2 + "Switch for turning on cooling mode from deadband mode" + annotation (Placement(transformation(extent={{60,-110},{80,-90}}))); + CDL.Continuous.Multiply mul "Multiply fan speed signal by fan enable signal" + annotation (Placement(transformation(extent={{90,-50},{110,-30}}))); + CDL.Interfaces.RealOutput yFanSpe "Fan speed signal" + annotation (Placement(transformation(extent={{120,-20},{160,20}}))); +equation + connect(conInt.y, intEqu.u2) annotation (Line(points={{-58,40},{-50,40},{-50, + 52},{-42,52}}, color={255,127,0})); + connect(opeMod, intEqu.u1) + annotation (Line(points={{-120,60},{-42,60}}, color={255,127,0})); + connect(intEqu.y, not1.u) + annotation (Line(points={{-18,60},{-12,60}}, color={255,0,255})); + connect(not1.y, yFan) annotation (Line(points={{12,60},{20,60},{20,40},{140, + 40}}, color={255,0,255})); + connect(uFanPro, swi.u2) annotation (Line(points={{-120,20},{10,20},{10,0},{ + 78,0}}, color={255,0,255})); + connect(not1.y, booToRea.u) annotation (Line(points={{12,60},{20,60},{20,-20}, + {48,-20}}, color={255,0,255})); + connect(booToRea.y, swi.u3) annotation (Line(points={{72,-20},{74,-20},{74,-8}, + {78,-8}}, color={0,0,127})); + connect(uHea, lin.u) + annotation (Line(points={{-120,-20},{-32,-20}}, color={0,0,127})); + connect(con[1].y, lin.x1) annotation (Line(points={{-58,-40},{-50,-40},{-50, + -12},{-32,-12}}, color={0,0,127})); + connect(con[2].y, lin.x2) annotation (Line(points={{-58,-40},{-50,-40},{-50, + -24},{-32,-24}}, color={0,0,127})); + connect(con1[1].y, lin.f1) annotation (Line(points={{-58,0},{-40,0},{-40,-16}, + {-32,-16}}, color={0,0,127})); + connect(con1[2].y, lin.f2) annotation (Line(points={{-58,0},{-40,0},{-40,-28}, + {-32,-28}}, color={0,0,127})); + connect(con3[2].y, lin1.x2) annotation (Line(points={{-58,-120},{-50,-120},{ + -50,-104},{-32,-104}}, color={0,0,127})); + connect(con3[1].y, lin1.x1) annotation (Line(points={{-58,-120},{-50,-120},{ + -50,-92},{-32,-92}}, color={0,0,127})); + connect(con2[2].y, lin1.f2) annotation (Line(points={{-58,-80},{-40,-80},{-40, + -108},{-32,-108}}, color={0,0,127})); + connect(con2[1].y, lin1.f1) annotation (Line(points={{-58,-80},{-40,-80},{-40, + -96},{-32,-96}}, color={0,0,127})); + connect(uCoo, lin1.u) + annotation (Line(points={{-120,-100},{-32,-100}}, color={0,0,127})); + connect(uHea, hys.u) annotation (Line(points={{-120,-20},{-44,-20},{-44,-40}, + {-2,-40}}, color={0,0,127})); + connect(hys.y, swi1.u2) annotation (Line(points={{22,-40},{26,-40},{26,-60},{ + 28,-60}}, color={255,0,255})); + connect(con4.y, swi1.u3) annotation (Line(points={{-8,-60},{20,-60},{20,-68}, + {28,-68}}, color={0,0,127})); + connect(lin.y, swi1.u1) annotation (Line(points={{-8,-20},{-4,-20},{-4,-52},{ + 28,-52}}, color={0,0,127})); + connect(hys1.y, swi2.u2) annotation (Line(points={{22,-80},{26,-80},{26,-100}, + {58,-100}}, color={255,0,255})); + connect(uCoo, hys1.u) annotation (Line(points={{-120,-100},{-44,-100},{-44, + -84},{-20,-84},{-20,-80},{-2,-80}}, color={0,0,127})); + connect(lin1.y, swi2.u1) annotation (Line(points={{-8,-100},{20,-100},{20,-92}, + {58,-92}}, color={0,0,127})); + connect(swi1.y, swi2.u3) annotation (Line(points={{52,-60},{54,-60},{54,-108}, + {58,-108}}, color={0,0,127})); + connect(booToRea.y, mul.u1) annotation (Line(points={{72,-20},{74,-20},{74, + -34},{88,-34}}, color={0,0,127})); + connect(swi2.y, mul.u2) annotation (Line(points={{82,-100},{84,-100},{84,-46}, + {88,-46}}, color={0,0,127})); + connect(mul.y, swi.u1) annotation (Line(points={{112,-40},{114,-40},{114,20}, + {74,20},{74,8},{78,8}}, color={0,0,127})); + connect(swi.y, yFanSpe) + annotation (Line(points={{102,0},{140,0}}, color={0,0,127})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, + -140},{120,100}})), Diagram(coordinateSystem(preserveAspectRatio= + false, extent={{-100,-140},{120,100}}))); +end FanSpeed; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/package.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/package.mo new file mode 100644 index 00000000000..b81958a97bb --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/package.mo @@ -0,0 +1,4 @@ +within Buildings.Controls.OBC.ASHRAE.FanCoilUnit; +package Subsequences + +end Subsequences; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/package.order b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/package.order new file mode 100644 index 00000000000..645f531340b --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/package.order @@ -0,0 +1 @@ +FanSpeed diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/package.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/package.mo new file mode 100644 index 00000000000..d9a019e51f8 --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/package.mo @@ -0,0 +1,39 @@ +within Buildings.Controls.OBC.ASHRAE; +package FanCoilUnit "Control sequences for fan coil unit" + +annotation(Icon(graphics={ + Rectangle( + lineColor={200,200,200}, + fillColor={248,248,248}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Rectangle( + lineColor={128,128,128}, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Ellipse( + origin={10.0,10.0}, + fillColor={76,76,76}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + extent={{-80.0,-80.0},{-20.0,-20.0}}), + Ellipse( + origin={10.0,10.0}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + extent={{0.0,-80.0},{60.0,-20.0}}), + Ellipse( + origin={10.0,10.0}, + fillColor={128,128,128}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + extent={{0.0,0.0},{60.0,60.0}}), + Ellipse( + origin={10.0,10.0}, + lineColor={128,128,128}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid, + extent={{-80.0,0.0},{-20.0,60.0}})})); + +end FanCoilUnit; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/package.order b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/package.order new file mode 100644 index 00000000000..b074d7ba5aa --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/package.order @@ -0,0 +1,2 @@ +Subsequences +Controller diff --git a/Buildings/Controls/OBC/ASHRAE/package.order b/Buildings/Controls/OBC/ASHRAE/package.order index 52e8b17269d..65e7b758c6e 100644 --- a/Buildings/Controls/OBC/ASHRAE/package.order +++ b/Buildings/Controls/OBC/ASHRAE/package.order @@ -1 +1,2 @@ G36_PR1 +FanCoilUnit From 2fd68092bdfb149b99d823c42dbc62317b20a281 Mon Sep 17 00:00:00 2001 From: Devaprasad Date: Tue, 8 Mar 2022 14:08:52 -0800 Subject: [PATCH 02/83] Backing up files --- .../FanCoilUnit/Subsequences/FanSpeed.mo | 176 +++++++++++++--- .../Subsequences/SupplyAirTemperature.mo | 194 ++++++++++++++++++ .../Subsequences/Validation/FanSpeed.mo | 183 +++++++++++++++++ .../Validation/SupplyAirTemperature.mo | 94 +++++++++ .../Subsequences/Validation/package.mo | 3 + .../Subsequences/Validation/package.order | 2 + .../FanCoilUnit/Subsequences/package.mo | 2 +- .../FanCoilUnit/Subsequences/package.order | 2 + .../Subsequences/Validation/FanSpeed.mos | 39 ++++ 9 files changed, 662 insertions(+), 33 deletions(-) create mode 100644 Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/SupplyAirTemperature.mo create mode 100644 Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/FanSpeed.mo create mode 100644 Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mo create mode 100644 Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/package.mo create mode 100644 Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/package.order create mode 100644 Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/FanSpeed.mos diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo index 7a1abca2325..6e403c4e92a 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo @@ -1,50 +1,135 @@ within Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences; block FanSpeed + "Fan speed setpoint subsequence" - parameter Real deaSpe = 0.1 - "Deadband mode fan speed"; + parameter Boolean have_coolingCoil + "Does the fan coil unit have a cooling coil?"; - parameter Real heaSpeMin = 0.1 - "Deadband mode fan speed"; + parameter Boolean have_heatingCoil + "Does the fan coil unit have a heating coil?"; - parameter Real heaPerMin - "Minimum heating loop signal at which fan speed"; + parameter Real deaSpe( + final unit="1", + displayUnit="1") = 0.1 + "Deadband mode fan speed" + annotation(Dialog(group="Deadband parameters")); + + parameter Real heaSpeMin( + final unit="1", + displayUnit="1") = 0.1 + "Minimum heating mode fan speed" + annotation(Dialog(group="Heating loop parameters", + enable = have_heatingCoil)); + + parameter Real heaPerMin( + final unit="1", + displayUnit="1") = 0.5 + "Minimum heating loop signal at which fan speed is modified" + annotation(Dialog(group="Heating loop parameters", + enable = have_heatingCoil)); + + parameter Real heaSpeMax( + final unit="1", + displayUnit="1") = 0.6 + "Maximum heating mode fan speed" + annotation(Dialog(group="Heating loop parameters", + enable = have_heatingCoil)); + + parameter Real heaPerMax( + final unit="1", + displayUnit="1") = 1 + "Maximum heating loop signal at which fan speed is modified" + annotation(Dialog(group="Heating loop parameters", + enable = have_heatingCoil)); + + parameter Real cooSpeMin( + final unit="1", + displayUnit="1") = 0.2 + "Minimum cooling mode fan speed" + annotation(Dialog(group="Cooling loop parameters", + enable = have_coolingCoil)); + + parameter Real cooPerMin( + final unit="1", + displayUnit="1") = 0.5 + "Minimum cooling loop signal at which fan speed is modified" + annotation(Dialog(group="Cooling loop parameters", + enable = have_coolingCoil)); + + parameter Real cooSpeMax( + final unit="1", + displayUnit="1") = 1 + "Maximum cooling mode fan speed" + annotation(Dialog(group="Cooling loop parameters", + enable = have_coolingCoil)); + + parameter Real cooPerMax( + final unit="1", + displayUnit="1") = 1 + "Maximum cooling loop signal at which fan speed is modified" + annotation(Dialog(group="Cooling loop parameters", + enable = have_coolingCoil)); + + parameter Real heaDea( + final unit="1", + displayUnit="1") = 0.05 + "Heating loop signal limit at which deadband mode transitions to heating mode" + annotation(Dialog(group="Transition parameters", + enable = have_heatingCoil)); + + parameter Real cooDea( + final unit="1", + displayUnit="1") = 0.05 + "Cooling loop signal limit at which deadband mode transitions to cooling mode" + annotation(Dialog(group="Transition parameters", + enable = have_coolingCoil)); + + parameter Real deaHysLim( + final unit="1", + displayUnit="1") = 0.01 + "Hysteresis limits for deadband mode transitions" + annotation(Dialog(tab="Advanced")); CDL.Interfaces.BooleanInput uFanPro "Fan proven on signal" - annotation (Placement(transformation(extent={{-140,0},{-100,40}}))); + annotation (Placement(transformation(extent={{-140,20},{-100,60}}))); CDL.Interfaces.IntegerInput opeMod "System operating mode" - annotation (Placement(transformation(extent={{-140,40},{-100,80}}))); + annotation (Placement(transformation(extent={{-140,60},{-100,100}}))); CDL.Interfaces.BooleanOutput yFan "Fan enable signal" - annotation (Placement(transformation(extent={{120,20},{160,60}}))); + annotation (Placement(transformation(extent={{120,20},{160,60}}), + iconTransformation(extent={{100,0},{140,40}}))); CDL.Integers.Equal intEqu "Check if zone is unoccupied" - annotation (Placement(transformation(extent={{-40,50},{-20,70}}))); + annotation (Placement(transformation(extent={{-40,70},{-20,90}}))); CDL.Integers.Sources.Constant conInt(k=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.unoccupied) "Constant unoccupied mode signal" - annotation (Placement(transformation(extent={{-80,30},{-60,50}}))); + annotation (Placement(transformation(extent={{-80,50},{-60,70}}))); CDL.Logical.Not not1 "Enable only if zone is not in unoccupied mode" - annotation (Placement(transformation(extent={{-10,50},{10,70}}))); + annotation (Placement(transformation(extent={{-10,70},{10,90}}))); CDL.Continuous.Switch swi + "Switch fan speed to maximum until the fan is proven ON" annotation (Placement(transformation(extent={{80,-10},{100,10}}))); CDL.Conversions.BooleanToReal booToRea "Convert fan enable signal to Real" annotation (Placement(transformation(extent={{50,-30},{70,-10}}))); - CDL.Interfaces.RealInput uHea "Heating loop signal" + CDL.Interfaces.RealInput uHea if have_heatingCoil + "Heating loop signal" annotation (Placement(transformation(extent={{-140,-40},{-100,0}}))); - CDL.Interfaces.RealInput uCoo "Cooling loop signal" - annotation (Placement(transformation(extent={{-140,-120},{-100,-80}}))); + CDL.Interfaces.RealInput uCoo if have_coolingCoil + "Cooling loop signal" + annotation (Placement(transformation(extent={{-140,-120},{-100,-80}}), + iconTransformation(extent={{-140,-80},{-100,-40}}))); CDL.Continuous.Line lin "Heating fan speed signal" annotation (Placement(transformation(extent={{-30,-30},{-10,-10}}))); CDL.Continuous.Sources.Constant con[2](k={heaPerMin,heaPerMax}) "Heating loop signal support points" annotation (Placement(transformation(extent={{-80,-50},{-60,-30}}))); CDL.Continuous.Sources.Constant con1[2](k={heaSpeMin,heaSpeMax}) - "Heating fan speed signals" + "Heating fan speed limit signals" annotation (Placement(transformation(extent={{-80,-10},{-60,10}}))); - CDL.Continuous.Sources.Constant con2[2](k={minCooSpe,maxCooSpe}) - "Cooling fan speed signals" + CDL.Continuous.Sources.Constant con2[2](k={cooSpeMin,cooSpeMax}) + "Cooling fan speed limit signals" annotation (Placement(transformation(extent={{-80,-90},{-60,-70}}))); CDL.Continuous.Line lin1 "Cooling fan speed signal" annotation (Placement(transformation(extent={{-30,-110},{-10,-90}}))); - CDL.Continuous.Sources.Constant con3[2](k={cooLooPerMin,cooLooPerMax}) + CDL.Continuous.Sources.Constant con3[2](k={cooPerMin,cooPerMax}) "Cooling loop signal support points" annotation (Placement(transformation(extent={{-80,-130},{-60,-110}}))); CDL.Continuous.Sources.Constant con4(k=deaSpe) @@ -65,19 +150,26 @@ block FanSpeed CDL.Continuous.Multiply mul "Multiply fan speed signal by fan enable signal" annotation (Placement(transformation(extent={{90,-50},{110,-30}}))); CDL.Interfaces.RealOutput yFanSpe "Fan speed signal" - annotation (Placement(transformation(extent={{120,-20},{160,20}}))); + annotation (Placement(transformation(extent={{120,-20},{160,20}}), + iconTransformation(extent={{100,-40},{140,0}}))); + CDL.Continuous.Sources.Constant con6(k=0) if not have_heatingCoil + "Constant zero signal" + annotation (Placement(transformation(extent={{-50,10},{-30,30}}))); + CDL.Continuous.Sources.Constant con8(k=0) if not have_coolingCoil + "Constant zero signal" + annotation (Placement(transformation(extent={{-40,-140},{-20,-120}}))); equation - connect(conInt.y, intEqu.u2) annotation (Line(points={{-58,40},{-50,40},{-50, - 52},{-42,52}}, color={255,127,0})); + connect(conInt.y, intEqu.u2) annotation (Line(points={{-58,60},{-50,60},{-50, + 72},{-42,72}}, color={255,127,0})); connect(opeMod, intEqu.u1) - annotation (Line(points={{-120,60},{-42,60}}, color={255,127,0})); + annotation (Line(points={{-120,80},{-42,80}}, color={255,127,0})); connect(intEqu.y, not1.u) - annotation (Line(points={{-18,60},{-12,60}}, color={255,0,255})); - connect(not1.y, yFan) annotation (Line(points={{12,60},{20,60},{20,40},{140, + annotation (Line(points={{-18,80},{-12,80}}, color={255,0,255})); + connect(not1.y, yFan) annotation (Line(points={{12,80},{40,80},{40,40},{140, 40}}, color={255,0,255})); - connect(uFanPro, swi.u2) annotation (Line(points={{-120,20},{10,20},{10,0},{ + connect(uFanPro, swi.u2) annotation (Line(points={{-120,40},{30,40},{30,0},{ 78,0}}, color={255,0,255})); - connect(not1.y, booToRea.u) annotation (Line(points={{12,60},{20,60},{20,-20}, + connect(not1.y, booToRea.u) annotation (Line(points={{12,80},{40,80},{40,-20}, {48,-20}}, color={255,0,255})); connect(booToRea.y, swi.u3) annotation (Line(points={{72,-20},{74,-20},{74,-8}, {78,-8}}, color={0,0,127})); @@ -111,8 +203,8 @@ equation 28,-52}}, color={0,0,127})); connect(hys1.y, swi2.u2) annotation (Line(points={{22,-80},{26,-80},{26,-100}, {58,-100}}, color={255,0,255})); - connect(uCoo, hys1.u) annotation (Line(points={{-120,-100},{-44,-100},{-44, - -84},{-20,-84},{-20,-80},{-2,-80}}, color={0,0,127})); + connect(uCoo, hys1.u) annotation (Line(points={{-120,-100},{-44,-100},{-44,-84}, + {-20,-84},{-20,-80},{-2,-80}}, color={0,0,127})); connect(lin1.y, swi2.u1) annotation (Line(points={{-8,-100},{20,-100},{20,-92}, {58,-92}}, color={0,0,127})); connect(swi1.y, swi2.u3) annotation (Line(points={{52,-60},{54,-60},{54,-108}, @@ -125,7 +217,27 @@ equation {74,20},{74,8},{78,8}}, color={0,0,127})); connect(swi.y, yFanSpe) annotation (Line(points={{102,0},{140,0}}, color={0,0,127})); - annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -140},{120,100}})), Diagram(coordinateSystem(preserveAspectRatio= - false, extent={{-100,-140},{120,100}}))); + connect(con6.y, lin.u) annotation (Line(points={{-28,20},{-20,20},{-20,4},{ + -44,4},{-44,-20},{-32,-20}}, color={0,0,127})); + connect(con8.y, lin1.u) annotation (Line(points={{-18,-130},{-10,-130},{-10, + -114},{-44,-114},{-44,-100},{-32,-100}}, color={0,0,127})); + connect(con6.y, hys.u) annotation (Line(points={{-28,20},{-20,20},{-20,4},{ + -44,4},{-44,-40},{-2,-40}}, color={0,0,127})); + connect(con8.y, hys1.u) annotation (Line(points={{-18,-130},{-10,-130},{-10, + -114},{-44,-114},{-44,-84},{-20,-84},{-20,-80},{-2,-80}}, color={0,0, + 127})); + annotation (defaultComponentName="fanSpe", + Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, + -100},{100,100}}), graphics={ + Rectangle( + extent={{-100,-100},{100,100}}, + lineColor={0,0,127}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), + Text( + extent={{-100,140},{100,100}}, + textColor={0,0,255}, + textString="%name")}), + Diagram(coordinateSystem(preserveAspectRatio=false, + extent={{-100,-140},{120,100}}))); end FanSpeed; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/SupplyAirTemperature.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/SupplyAirTemperature.mo new file mode 100644 index 00000000000..5e17fc1ec76 --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/SupplyAirTemperature.mo @@ -0,0 +1,194 @@ +within Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences; +block SupplyAirTemperature + "Subsequence for calculating supply air temperature setpoint" + + parameter Boolean have_coolingCoil + "Does the fan coil unit have a cooling coil?"; + + parameter Boolean have_heatingCoil + "Does the fan coil unit have a heating coil?"; + + parameter Real THeaSupAirLow( + final unit="1", + displayUnit="1") = 0.1 + "Supply air temperature setpoint at minimum heating loop signal" + annotation(Dialog(group="Heating loop parameters", + enable = have_heatingCoil)); + + parameter Real heaPerMin( + final unit="1", + displayUnit="1") = 0.5 + "Minimum heating loop signal at which fan speed is modified" + annotation(Dialog(group="Heating loop parameters", + enable = have_heatingCoil)); + + parameter Real THeaSupAirHi( + final unit="1", + displayUnit="1") = 0.6 + "Supply air temperature setpoint at maximum heating loop signal" + annotation(Dialog(group="Heating loop parameters", + enable = have_heatingCoil)); + + parameter Real heaPerMax( + final unit="1", + displayUnit="1") = 1 + "Maximum heating loop signal at which fan speed is modified" + annotation(Dialog(group="Heating loop parameters", + enable = have_heatingCoil)); + + parameter Real TCooSupAirLow( + final unit="1", + displayUnit="1") = 0.2 + "Supply air temperature setpoint at minimum cooling loop signal" + annotation(Dialog(group="Cooling loop parameters", + enable = have_coolingCoil)); + + parameter Real cooPerMin( + final unit="1", + displayUnit="1") = 0.5 + "Minimum cooling loop signal at which fan speed is modified" + annotation(Dialog(group="Cooling loop parameters", + enable = have_coolingCoil)); + + parameter Real TCooSupAirHi( + final unit="1", + displayUnit="1") = 1 + "Supply air temperature setpoint at maximum cooling loop signal" + annotation(Dialog(group="Cooling loop parameters", + enable = have_coolingCoil)); + + parameter Real cooPerMax( + final unit="1", + displayUnit="1") = 1 + "Maximum cooling loop signal at which fan speed is modified" + annotation(Dialog(group="Cooling loop parameters", + enable = have_coolingCoil)); + + CDL.Interfaces.RealInput uHea if have_heatingCoil "Heating loop signal" + annotation (Placement(transformation(extent={{-140,40},{-100,80}}))); + CDL.Interfaces.RealInput uCoo if have_coolingCoil + "Cooling loop signal" + annotation (Placement(transformation(extent={{-140,-80},{-100,-40}}), + iconTransformation(extent={{-140,-80},{-100,-40}}))); + CDL.Interfaces.RealInput TAirSup + "Measured supply air temperature" + annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); + CDL.Interfaces.RealOutput yHeaCoi if have_heatingCoil + "Heating coil signal" + annotation (Placement(transformation(extent={{100,40},{140,80}}))); + CDL.Interfaces.RealOutput yCooCoi if have_coolingCoil + "Heating coil signal" + annotation (Placement(transformation(extent={{100,-80},{140,-40}}))); + CDL.Continuous.Line lin + "Convert heating loop signal to supply air temperature setpoint" + annotation (Placement(transformation(extent={{-40,50},{-20,70}}))); + CDL.Continuous.Line lin1 + "Convert cooling loop signal to supply air temperature setpoint" + annotation (Placement(transformation(extent={{-40,-70},{-20,-50}}))); + CDL.Continuous.Sources.Constant con1[2](k={THeaSupAirLow,THeaSupAirHi}) if + have_heatingCoil "Heating supply air temperature setpoint limit signals" + annotation (Placement(transformation(extent={{-80,70},{-60,90}}))); + CDL.Continuous.Sources.Constant con2 + [2](k={heaPerMin,heaPerMax}) if + have_heatingCoil + "Heating loop signal support points" + annotation (Placement(transformation(extent={{-80,30},{-60,50}}))); + CDL.Continuous.Sources.Constant con3[2](k={TCooSupAirLow,TCooSupAirHi}) if + have_coolingCoil "Cooling supply air temperature setpoint limit signals" + annotation (Placement(transformation(extent={{-80,-50},{-60,-30}}))); + CDL.Continuous.Sources.Constant con4[2](k={cooPerMin,cooPerMax}) if + have_coolingCoil + "Cooling loop signal support points" + annotation (Placement(transformation(extent={{-80,-90},{-60,-70}}))); + CDL.Continuous.PID conPID + annotation (Placement(transformation(extent={{40,50},{60,70}}))); + CDL.Continuous.PID conPID1 + annotation (Placement(transformation(extent={{60,-70},{80,-50}}))); + CDL.Continuous.Hysteresis hys(uLow=heaDea - deaHysLim, uHigh=heaDea) + "Hysteresis for switching between deadband mode and heating mode" + annotation (Placement(transformation(extent={{-20,90},{0,110}}))); + CDL.Continuous.Sources.Constant con6(k=0) if not have_heatingCoil + "Constant zero signal" + annotation (Placement(transformation(extent={{-50,90},{-30,110}}))); + CDL.Continuous.Switch swi1 + "Switch for turning on heating mode from deadband mode" + annotation (Placement(transformation(extent={{0,50},{20,70}}))); + CDL.Continuous.Switch swi2 + "Switch for turning on cooling mode from deadband mode" + annotation (Placement(transformation(extent={{20,-30},{40,-10}}))); + CDL.Continuous.Hysteresis hys1(uLow=cooDea - deaHysLim, uHigh=cooDea) + "Hysteresis for switching on cooling mode from deadband mode" + annotation (Placement(transformation(extent={{-20,-30},{0,-10}}))); + CDL.Continuous.Sources.Constant con8(k=0) if not have_coolingCoil + "Constant zero signal" + annotation (Placement(transformation(extent={{-20,-110},{0,-90}}))); + CDL.Continuous.Sources.Constant con5(k=0) + "Constant zero signal" + annotation (Placement(transformation(extent={{-30,10},{-10,30}}))); +equation + connect(uHea, lin.u) + annotation (Line(points={{-120,60},{-42,60}}, color={0,0,127})); + connect(con1[1].y, lin.f1) annotation (Line(points={{-58,80},{-50,80},{-50,64}, + {-42,64}}, color={0,0,127})); + connect(con1[2].y, lin.f2) annotation (Line(points={{-58,80},{-50,80},{-50,52}, + {-42,52}}, color={0,0,127})); + connect(con2[1].y, lin.x1) annotation (Line(points={{-58,40},{-46,40},{-46,68}, + {-42,68}}, color={0,0,127})); + connect(con2[2].y, lin.x2) annotation (Line(points={{-58,40},{-46,40},{-46,56}, + {-42,56}}, color={0,0,127})); + connect(uCoo, lin1.u) + annotation (Line(points={{-120,-60},{-42,-60}}, color={0,0,127})); + connect(con3[1].y, lin1.f1) annotation (Line(points={{-58,-40},{-50,-40},{-50, + -56},{-42,-56}}, color={0,0,127})); + connect(con3[2].y, lin1.f2) annotation (Line(points={{-58,-40},{-50,-40},{-50, + -68},{-42,-68}}, color={0,0,127})); + connect(con4[1].y, lin1.x1) annotation (Line(points={{-58,-80},{-54,-80},{-54, + -52},{-42,-52}}, color={0,0,127})); + connect(con4[2].y, lin1.x2) annotation (Line(points={{-58,-80},{-54,-80},{-54, + -64},{-42,-64}}, color={0,0,127})); + connect(TAirSup, conPID.u_m) + annotation (Line(points={{-120,0},{50,0},{50,48}}, color={0,0,127})); + connect(conPID.y, yHeaCoi) + annotation (Line(points={{62,60},{120,60}}, color={0,0,127})); + connect(TAirSup, conPID1.u_m) annotation (Line(points={{-120,0},{50,0},{50, + -90},{70,-90},{70,-72}}, color={0,0,127})); + connect(conPID1.y, yCooCoi) + annotation (Line(points={{82,-60},{120,-60}}, color={0,0,127})); + connect(con5.y, swi1.u3) annotation (Line(points={{-8,20},{-6,20},{-6,52},{-2, + 52}}, color={0,0,127})); + connect(lin.y, swi1.u1) annotation (Line(points={{-18,60},{-10,60},{-10,68},{ + -2,68}}, color={0,0,127})); + connect(con6.y, hys.u) + annotation (Line(points={{-28,100},{-22,100}}, color={0,0,127})); + connect(con6.y, lin.u) annotation (Line(points={{-28,100},{-26,100},{-26,76}, + {-54,76},{-54,60},{-42,60}}, color={0,0,127})); + connect(uHea, hys.u) annotation (Line(points={{-120,60},{-54,60},{-54,76},{ + -26,76},{-26,100},{-22,100}}, color={0,0,127})); + connect(hys.y, swi1.u2) annotation (Line(points={{2,100},{10,100},{10,80},{-6, + 80},{-6,60},{-2,60}}, color={255,0,255})); + connect(con8.y, lin1.u) annotation (Line(points={{2,-100},{10,-100},{10,-80},{ + -46,-80},{-46,-60},{-42,-60}}, color={0,0,127})); + connect(hys1.y, swi2.u2) + annotation (Line(points={{2,-20},{18,-20}}, color={255,0,255})); + connect(uCoo, hys1.u) annotation (Line(points={{-120,-60},{-46,-60},{-46,-20}, + {-22,-20}}, color={0,0,127})); + connect(con8.y, hys1.u) annotation (Line(points={{2,-100},{10,-100},{10,-80},{ + -46,-80},{-46,-20},{-22,-20}}, color={0,0,127})); + connect(swi1.y, swi2.u3) annotation (Line(points={{22,60},{28,60},{28,40},{10, + 40},{10,-28},{18,-28}}, color={0,0,127})); + connect(lin1.y, swi2.u1) annotation (Line(points={{-18,-60},{6,-60},{6,-12},{18, + -12}}, color={0,0,127})); + connect(swi2.y, conPID.u_s) annotation (Line(points={{42,-20},{44,-20},{44,40}, + {32,40},{32,60},{38,60}}, color={0,0,127})); + connect(swi2.y, conPID1.u_s) annotation (Line(points={{42,-20},{44,-20},{44,-60}, + {58,-60}}, color={0,0,127})); + annotation (defaultComponentName = "TSupAir", + Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100, + 100}}), graphics={ + Rectangle( + extent={{-100,-100},{100,100}}, + lineColor={0,0,127}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid)}), Diagram(coordinateSystem( + preserveAspectRatio=false, extent={{-100,-120},{100,120}}))); +end SupplyAirTemperature; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/FanSpeed.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/FanSpeed.mo new file mode 100644 index 00000000000..ad3c5c0e240 --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/FanSpeed.mo @@ -0,0 +1,183 @@ +within Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.Validation; +block FanSpeed + "Validation model for fan speed subsequence" + + extends Modelica.Icons.Example; + + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.FanSpeed fanSpe( + have_coolingCoil=true, have_heatingCoil=true) + "Instance demonstrating variation of heating loop signal" + annotation (Placement(transformation(extent={{-40,120},{-20,140}}))); + + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.FanSpeed fanSpe2( + have_coolingCoil=true, have_heatingCoil=true) + "Instance demonstrating variation of operating mode" + annotation (Placement(transformation(extent={{80,120},{100,140}}))); + + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.FanSpeed fanSpe1( + have_coolingCoil=true, have_heatingCoil=true) + "Instance demonstrating variation of cooling loop signal" + annotation (Placement(transformation(extent={{-40,-10},{-20,10}}))); + + Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ram( + final height=6, + final duration=70, + final offset=1) "Operating mode signal" + annotation (Placement(transformation(extent={{20,160},{40,180}}))); + CDL.Conversions.RealToInteger reaToInt "Real to Integer conversion" + annotation (Placement(transformation(extent={{-70,160},{-50,180}}))); + CDL.Logical.Sources.Pulse booPul(final period=100) "Fan proven on signal" + annotation (Placement(transformation(extent={{-100,130},{-80,150}}))); + CDL.Continuous.Sources.Sine sin(final freqHz=1/50) "Heating loop signal" + annotation (Placement(transformation(extent={{-100,100},{-80,120}}))); + CDL.Continuous.Abs abs "Convert negative loop signal to positive" + annotation (Placement(transformation(extent={{-70,100},{-50,120}}))); + CDL.Continuous.Sources.Constant con(final k=0) "Cooling loop signal" + annotation (Placement(transformation(extent={{-100,70},{-80,90}}))); + CDL.Continuous.Sources.Constant con1(final k=1) "Operating mode signal" + annotation (Placement(transformation(extent={{-100,160},{-80,180}}))); + + CDL.Conversions.RealToInteger reaToInt1 "Real to Integer conversion" + annotation (Placement(transformation(extent={{50,160},{70,180}}))); + CDL.Logical.Sources.Pulse booPul1(final period=100) "Fan proven on signal" + annotation (Placement(transformation(extent={{20,130},{40,150}}))); + CDL.Continuous.Sources.Constant con2(final k=0) "Cooling loop signal" + annotation (Placement(transformation(extent={{20,70},{40,90}}))); + + CDL.Conversions.RealToInteger reaToInt2 "Real to Integer conversion" + annotation (Placement(transformation(extent={{-70,30},{-50,50}}))); + CDL.Logical.Sources.Pulse booPul2(final period=100) "Fan proven on signal" + annotation (Placement(transformation(extent={{-100,0},{-80,20}}))); + CDL.Continuous.Sources.Sine sin2(final freqHz=1/50) "Cooling loop signal" + annotation (Placement(transformation(extent={{-100,-60},{-80,-40}}))); + CDL.Continuous.Abs abs2 "Convert negative loop signal to positive" + annotation (Placement(transformation(extent={{-70,-60},{-50,-40}}))); + CDL.Continuous.Sources.Constant con3(final k=0) "Heating loop signal" + annotation (Placement(transformation(extent={{-100,-30},{-80,-10}}))); + CDL.Continuous.Sources.Constant con4(final k=1) "Operating mode signal" + annotation (Placement(transformation(extent={{-100,30},{-80,50}}))); + CDL.Continuous.Sources.Constant con5(final k=0.75) "Heating loop signal" + annotation (Placement(transformation(extent={{20,100},{40,120}}))); + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.FanSpeed fanSpe3( + have_coolingCoil=true, have_heatingCoil=false) + "Instance demonstrating variation of cooling loop signal with no heating coil" + annotation (Placement(transformation(extent={{80,-10},{100,10}}))); + CDL.Conversions.RealToInteger reaToInt3 "Real to Integer conversion" + annotation (Placement(transformation(extent={{50,30},{70,50}}))); + CDL.Logical.Sources.Pulse booPul3(final period=100) "Fan proven on signal" + annotation (Placement(transformation(extent={{20,0},{40,20}}))); + CDL.Continuous.Sources.Sine sin1(final freqHz=1/50) "Cooling loop signal" + annotation (Placement(transformation(extent={{20,-30},{40,-10}}))); + CDL.Continuous.Abs abs1 "Convert negative loop signal to positive" + annotation (Placement(transformation(extent={{50,-30},{70,-10}}))); + CDL.Continuous.Sources.Constant con7(final k=1) "Operating mode signal" + annotation (Placement(transformation(extent={{20,30},{40,50}}))); + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.FanSpeed fanSpe4( + have_coolingCoil=false, have_heatingCoil=true) + "Instance demonstrating variation of heating loop signal with no cooling coil" + annotation (Placement(transformation(extent={{-40,-140},{-20,-120}}))); + CDL.Conversions.RealToInteger reaToInt4 + "Real to Integer conversion" + annotation (Placement(transformation(extent={{-70,-100},{-50,-80}}))); + CDL.Logical.Sources.Pulse booPul4(final period=100) + "Fan proven on signal" + annotation (Placement(transformation(extent={{-100,-130},{-80,-110}}))); + CDL.Continuous.Sources.Sine sin3(final freqHz=1/50) + "Heating loop signal" + annotation (Placement(transformation(extent={{-100,-160},{-80,-140}}))); + CDL.Continuous.Abs abs3 + "Convert negative loop signal to positive" + annotation (Placement(transformation(extent={{-70,-160},{-50,-140}}))); + CDL.Continuous.Sources.Constant con8(final k=1) "Operating mode signal" + annotation (Placement(transformation(extent={{-100,-100},{-80,-80}}))); + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.FanSpeed fanSpe5( + have_coolingCoil=false, have_heatingCoil=false) + "Instance demonstrating variation of operating mode with no heating and cooling coils" + annotation (Placement(transformation(extent={{80,-140},{100,-120}}))); + CDL.Continuous.Sources.Ramp ram1( + final height=6, + final duration=70, + final offset=1) "Operating mode signal" + annotation (Placement(transformation(extent={{20,-100},{40,-80}}))); + CDL.Conversions.RealToInteger reaToInt5 "Real to Integer conversion" + annotation (Placement(transformation(extent={{50,-100},{70,-80}}))); + CDL.Logical.Sources.Pulse booPul5(final period=100) "Fan proven on signal" + annotation (Placement(transformation(extent={{20,-130},{40,-110}}))); +equation + connect(reaToInt.y, fanSpe.opeMod) annotation (Line(points={{-48,170},{-46,170}, + {-46,138},{-42,138}}, + color={255,127,0})); + connect(booPul.y, fanSpe.uFanPro) annotation (Line(points={{-78,140},{-50,140}, + {-50,134},{-42,134}}, + color={255,0,255})); + connect(sin.y, abs.u) + annotation (Line(points={{-78,110},{-72,110}}, + color={0,0,127})); + connect(abs.y, fanSpe.uHea) annotation (Line(points={{-48,110},{-46,110},{-46, + 128},{-42,128}}, + color={0,0,127})); + connect(con.y, fanSpe.uCoo) annotation (Line(points={{-78,80},{-44,80},{-44,124}, + {-42,124}},color={0,0,127})); + connect(con1.y, reaToInt.u) + annotation (Line(points={{-78,170},{-72,170}}, color={0,0,127})); + connect(reaToInt1.y, fanSpe2.opeMod) annotation (Line(points={{72,170},{74, + 170},{74,138},{78,138}}, color={255,127,0})); + connect(booPul1.y, fanSpe2.uFanPro) annotation (Line(points={{42,140},{70,140}, + {70,134},{78,134}}, color={255,0,255})); + connect(con2.y, fanSpe2.uCoo) annotation (Line(points={{42,80},{76,80},{76, + 124},{78,124}}, color={0,0,127})); + connect(ram.y, reaToInt1.u) + annotation (Line(points={{42,170},{48,170}}, color={0,0,127})); + connect(reaToInt2.y,fanSpe1. opeMod) annotation (Line(points={{-48,40},{-46,40}, + {-46,8},{-42,8}}, color={255,127,0})); + connect(booPul2.y,fanSpe1. uFanPro) annotation (Line(points={{-78,10},{-50,10}, + {-50,4},{-42,4}}, color={255,0,255})); + connect(sin2.y, abs2.u) + annotation (Line(points={{-78,-50},{-72,-50}}, color={0,0,127})); + connect(con4.y, reaToInt2.u) + annotation (Line(points={{-78,40},{-72,40}}, color={0,0,127})); + connect(con3.y,fanSpe1. uHea) annotation (Line(points={{-78,-20},{-56,-20},{-56, + -2},{-42,-2}}, color={0,0,127})); + connect(abs2.y,fanSpe1. uCoo) annotation (Line(points={{-48,-50},{-46,-50},{-46, + -6},{-42,-6}}, color={0,0,127})); + connect(con5.y, fanSpe2.uHea) annotation (Line(points={{42,110},{60,110},{60, + 128},{78,128}}, color={0,0,127})); + connect(reaToInt3.y,fanSpe3. opeMod) annotation (Line(points={{72,40},{74,40}, + {74,8},{78,8}}, color={255,127,0})); + connect(booPul3.y,fanSpe3. uFanPro) annotation (Line(points={{42,10},{70,10},{ + 70,4},{78,4}}, color={255,0,255})); + connect(sin1.y,abs1. u) + annotation (Line(points={{42,-20},{48,-20}}, color={0,0,127})); + connect(con7.y,reaToInt3. u) + annotation (Line(points={{42,40},{48,40}}, color={0,0,127})); + connect(abs1.y,fanSpe3. uCoo) annotation (Line(points={{72,-20},{74,-20},{74,-6}, + {78,-6}}, color={0,0,127})); + connect(reaToInt4.y, fanSpe4.opeMod) annotation (Line(points={{-48,-90},{-46, + -90},{-46,-122},{-42,-122}}, + color={255,127,0})); + connect(booPul4.y, fanSpe4.uFanPro) annotation (Line(points={{-78,-120},{-50, + -120},{-50,-126},{-42,-126}}, + color={255,0,255})); + connect(sin3.y, abs3.u) + annotation (Line(points={{-78,-150},{-72,-150}}, color={0,0,127})); + connect(abs3.y, fanSpe4.uHea) annotation (Line(points={{-48,-150},{-46,-150}, + {-46,-132},{-42,-132}}, + color={0,0,127})); + connect(con8.y, reaToInt4.u) + annotation (Line(points={{-78,-90},{-72,-90}}, color={0,0,127})); + connect(reaToInt5.y, fanSpe5.opeMod) annotation (Line(points={{72,-90},{74, + -90},{74,-122},{78,-122}}, color={255,127,0})); + connect(booPul5.y, fanSpe5.uFanPro) annotation (Line(points={{42,-120},{70, + -120},{70,-126},{78,-126}}, color={255,0,255})); + connect(ram1.y, reaToInt5.u) + annotation (Line(points={{42,-90},{48,-90}}, color={0,0,127})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, + {100,100}})), Diagram( + coordinateSystem(preserveAspectRatio=false, extent={{-120,-200},{120,200}})), + experiment( + StopTime=100, + Interval=1, + __Dymola_Algorithm="Dassl"), + __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/FanSpeed.mos" + "Simulate and plot")); +end FanSpeed; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mo new file mode 100644 index 00000000000..b8828c25a94 --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mo @@ -0,0 +1,94 @@ +within Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.Validation; +block SupplyAirTemperature + "Validation model for supply air temperature setpoint subsequence" + + extends Modelica.Icons.Example; + + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.SupplyAirTemperature + TSupAir(have_coolingCoil=true, have_heatingCoil=true) + annotation (Placement(transformation(extent={{-40,40},{-20,60}}))); + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.SupplyAirTemperature + TSupAir1(have_coolingCoil=true, have_heatingCoil=false) + annotation (Placement(transformation(extent={{60,-60},{80,-40}}))); + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.SupplyAirTemperature + TSupAir2(have_coolingCoil=false, have_heatingCoil=true) + annotation (Placement(transformation(extent={{-40,-60},{-20,-40}}))); + CDL.Continuous.Sources.Sine sin( + amplitude=273.15 + 10, + freqHz=1/50, + offset=273.15 + 25) + annotation (Placement(transformation(extent={{-80,40},{-60,60}}))); + CDL.Continuous.Sources.Sine sin1( + amplitude=0.5, + freqHz=1/200, + offset=0.5) + annotation (Placement(transformation(extent={{-80,10},{-60,30}}))); + CDL.Continuous.Sources.Sine sin2( + amplitude=0.5, + freqHz=1/100, + offset=0.5) + annotation (Placement(transformation(extent={{-80,70},{-60,90}}))); + + CDL.Continuous.Sources.Sine sin3( + amplitude=273.15 + 10, + freqHz=1/50, + offset=273.15 + 25) + annotation (Placement(transformation(extent={{20,-80},{40,-60}}))); + CDL.Continuous.Sources.Sine sin5( + amplitude=0.5, + freqHz=1/100, + offset=0.5) + annotation (Placement(transformation(extent={{20,-50},{40,-30}}))); + CDL.Continuous.Sources.Sine sin6( + amplitude=273.15 + 10, + freqHz=1/50, + offset=273.15 + 25) + annotation (Placement(transformation(extent={{-80,-60},{-60,-40}}))); + CDL.Continuous.Sources.Sine sin8( + amplitude=0.5, + freqHz=1/100, + offset=0.5) + annotation (Placement(transformation(extent={{-80,-30},{-60,-10}}))); + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.SupplyAirTemperature + TSupAir3(have_coolingCoil=true, have_heatingCoil=true) + annotation (Placement(transformation(extent={{60,40},{80,60}}))); + CDL.Continuous.Sources.Sine sin4( + amplitude=273.15 + 10, + freqHz=1/50, + offset=273.15 + 25) + annotation (Placement(transformation(extent={{20,40},{40,60}}))); + CDL.Continuous.Sources.Sine sin7( + amplitude=0.5, + freqHz=1/200, + offset=0.5) + annotation (Placement(transformation(extent={{20,10},{40,30}}))); + CDL.Continuous.Sources.Sine sin9( + amplitude=0.5, + freqHz=1/100, + offset=0.5) + annotation (Placement(transformation(extent={{20,70},{40,90}}))); +equation + connect(sin.y, TSupAir.TAirSup) + annotation (Line(points={{-58,50},{-42,50}}, color={0,0,127})); + connect(sin2.y, TSupAir.uHea) annotation (Line(points={{-58,80},{-50,80},{-50, + 56},{-42,56}}, color={0,0,127})); + connect(sin1.y, TSupAir.uCoo) annotation (Line(points={{-58,20},{-50,20},{-50, + 44},{-42,44}}, color={0,0,127})); + connect(sin5.y, TSupAir1.TAirSup) annotation (Line(points={{42,-40},{50,-40}, + {50,-50},{58,-50}}, color={0,0,127})); + connect(sin3.y, TSupAir1.uCoo) annotation (Line(points={{42,-70},{50,-70},{50, + -56},{58,-56}}, color={0,0,127})); + connect(sin6.y, TSupAir2.TAirSup) + annotation (Line(points={{-58,-50},{-42,-50}}, color={0,0,127})); + connect(sin8.y, TSupAir2.uHea) annotation (Line(points={{-58,-20},{-50,-20},{ + -50,-44},{-42,-44}}, color={0,0,127})); + connect(sin4.y, TSupAir3.TAirSup) + annotation (Line(points={{42,50},{58,50}}, color={0,0,127})); + connect(sin9.y, TSupAir3.uHea) annotation (Line(points={{42,80},{50,80},{50, + 56},{58,56}}, color={0,0,127})); + connect(sin7.y, TSupAir3.uCoo) annotation (Line(points={{42,20},{50,20},{50, + 44},{58,44}}, color={0,0,127})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); + +end SupplyAirTemperature; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/package.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/package.mo new file mode 100644 index 00000000000..c4a6895ad85 --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/package.mo @@ -0,0 +1,3 @@ +within Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences; +package Validation +end Validation; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/package.order b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/package.order new file mode 100644 index 00000000000..1a965b479ea --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/package.order @@ -0,0 +1,2 @@ +FanSpeed +SupplyAirTemperature diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/package.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/package.mo index b81958a97bb..ee2c5c69d5f 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/package.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/package.mo @@ -1,4 +1,4 @@ within Buildings.Controls.OBC.ASHRAE.FanCoilUnit; package Subsequences - + end Subsequences; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/package.order b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/package.order index 645f531340b..c1e21b9679a 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/package.order +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/package.order @@ -1 +1,3 @@ FanSpeed +Validation +SupplyAirTemperature diff --git a/Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/FanSpeed.mos b/Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/FanSpeed.mos new file mode 100644 index 00000000000..4433946df77 --- /dev/null +++ b/Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/FanSpeed.mos @@ -0,0 +1,39 @@ +simulateModel("Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.Validation.FanSpeed", method="Cvode", stopTime=100, tolerance=1e-06, resultFile="FanSpeed"); + +createPlot(id=1, position={0, 0, 1669, 978}, y={"fanSpe.opeMod"}, range={0.0, 100.0, 0.8, 1.2000000000000002}, grid=true, colors={{28,108,200}}); +createPlot(id=1, position={0, 0, 1669, 159}, y={"fanSpe.uFanPro"}, range={0.0, 100.0, -0.5, 1.5}, grid=true, subPlot=2, colors={{28,108,200}}); +createPlot(id=1, position={0, 0, 1669, 158}, y={"fanSpe.uHea"}, range={0.0, 100.0, -0.5, 1.5}, grid=true, subPlot=3, colors={{28,108,200}}); +createPlot(id=1, position={0, 0, 1669, 159}, y={"fanSpe.uCoo"}, range={0.0, 100.0, -2.0, 2.0}, grid=true, subPlot=4, colors={{28,108,200}}); +createPlot(id=1, position={0, 0, 1669, 159}, y={"fanSpe.yFan"}, range={0.0, 100.0, 0.8, 1.2000000000000002}, grid=true, subPlot=5, colors={{28,108,200}}); +createPlot(id=1, position={0, 0, 1669, 159}, y={"fanSpe.yFanSpe"}, range={0.0, 100.0, 0.0, 1.5}, grid=true, subPlot=6, colors={{28,108,200}}); + +createPlot(id=2, position={0, 0, 1669, 978}, y={"fanSpe1.opeMod"}, range={0.0, 100.0, 0.8, 1.2000000000000002}, grid=true, colors={{28,108,200}}); +createPlot(id=2, position={0, 0, 1669, 159}, y={"fanSpe1.uFanPro"}, range={0.0, 100.0, -0.5, 1.5}, grid=true, subPlot=2, colors={{28,108,200}}); +createPlot(id=2, position={0, 0, 1669, 158}, y={"fanSpe1.uHea"}, range={0.0, 100.0, -0.5, 1.5}, grid=true, subPlot=3, colors={{28,108,200}}); +createPlot(id=2, position={0, 0, 1669, 159}, y={"fanSpe1.uCoo"}, range={0.0, 100.0, -2.0, 2.0}, grid=true, subPlot=4, colors={{28,108,200}}); +createPlot(id=2, position={0, 0, 1669, 159}, y={"fanSpe1.yFan"}, range={0.0, 100.0, 0.8, 1.2000000000000002}, grid=true, subPlot=5, colors={{28,108,200}}); +createPlot(id=2, position={0, 0, 1669, 159}, y={"fanSpe1.yFanSpe"}, range={0.0, 100.0, 0.0, 1.5}, grid=true, subPlot=6, colors={{28,108,200}}); + +createPlot(id=3, position={0, 0, 1669, 978}, y={"fanSpe2.opeMod"}, range={0.0, 100.0, 0.8, 1.2000000000000002}, grid=true, colors={{28,108,200}}); +createPlot(id=3, position={0, 0, 1669, 159}, y={"fanSpe2.uFanPro"}, range={0.0, 100.0, -0.5, 1.5}, grid=true, subPlot=2, colors={{28,108,200}}); +createPlot(id=3, position={0, 0, 1669, 158}, y={"fanSpe2.uHea"}, range={0.0, 100.0, -0.5, 1.5}, grid=true, subPlot=3, colors={{28,108,200}}); +createPlot(id=3, position={0, 0, 1669, 159}, y={"fanSpe2.uCoo"}, range={0.0, 100.0, -2.0, 2.0}, grid=true, subPlot=4, colors={{28,108,200}}); +createPlot(id=3, position={0, 0, 1669, 159}, y={"fanSpe2.yFan"}, range={0.0, 100.0, 0.8, 1.2000000000000002}, grid=true, subPlot=5, colors={{28,108,200}}); +createPlot(id=3, position={0, 0, 1669, 159}, y={"fanSpe2.yFanSpe"}, range={0.0, 100.0, 0.0, 1.5}, grid=true, subPlot=6, colors={{28,108,200}}); + +createPlot(id=4, position={0, 0, 1669, 978}, y={"fanSpe3.opeMod"}, range={0.0, 100.0, 0.8, 1.2000000000000002}, grid=true, colors={{28,108,200}}); +createPlot(id=4, position={0, 0, 1669, 159}, y={"fanSpe3.uFanPro"}, range={0.0, 100.0, -0.5, 1.5}, grid=true, subPlot=2, colors={{28,108,200}}); +createPlot(id=4, position={0, 0, 1669, 159}, y={"fanSpe3.uCoo"}, range={0.0, 100.0, -2.0, 2.0}, grid=true, subPlot=3, colors={{28,108,200}}); +createPlot(id=4, position={0, 0, 1669, 159}, y={"fanSpe3.yFan"}, range={0.0, 100.0, 0.8, 1.2000000000000002}, grid=true, subPlot=4, colors={{28,108,200}}); +createPlot(id=4, position={0, 0, 1669, 159}, y={"fanSpe3.yFanSpe"}, range={0.0, 100.0, 0.0, 1.5}, grid=true, subPlot=5, colors={{28,108,200}}); + +createPlot(id=5, position={0, 0, 1669, 978}, y={"fanSpe4.opeMod"}, range={0.0, 100.0, 0.8, 1.2000000000000002}, grid=true, colors={{28,108,200}}); +createPlot(id=5, position={0, 0, 1669, 159}, y={"fanSpe4.uFanPro"}, range={0.0, 100.0, -0.5, 1.5}, grid=true, subPlot=2, colors={{28,108,200}}); +createPlot(id=5, position={0, 0, 1669, 158}, y={"fanSpe4.uHea"}, range={0.0, 100.0, -0.5, 1.5}, grid=true, subPlot=3, colors={{28,108,200}}); +createPlot(id=5, position={0, 0, 1669, 159}, y={"fanSpe4.yFan"}, range={0.0, 100.0, 0.8, 1.2000000000000002}, grid=true, subPlot=4, colors={{28,108,200}}); +createPlot(id=5, position={0, 0, 1669, 159}, y={"fanSpe4.yFanSpe"}, range={0.0, 100.0, 0.0, 1.5}, grid=true, subPlot=5, colors={{28,108,200}}); + +createPlot(id=6, position={0, 0, 1669, 978}, y={"fanSpe5.opeMod"}, range={0.0, 100.0, 0.8, 1.2000000000000002}, grid=true, colors={{28,108,200}}); +createPlot(id=6, position={0, 0, 1669, 159}, y={"fanSpe5.uFanPro"}, range={0.0, 100.0, -0.5, 1.5}, grid=true, subPlot=2, colors={{28,108,200}}); +createPlot(id=6, position={0, 0, 1669, 159}, y={"fanSpe5.yFan"}, range={0.0, 100.0, 0.8, 1.2000000000000002}, grid=true, subPlot=3, colors={{28,108,200}}); +createPlot(id=6, position={0, 0, 1669, 159}, y={"fanSpe5.yFanSpe"}, range={0.0, 100.0, 0.0, 1.5}, grid=true, subPlot=4, colors={{28,108,200}}); From d680a400a3b2c12a29d4f03e27d2bfa1c77438ad Mon Sep 17 00:00:00 2001 From: Devaprasad Date: Tue, 15 Mar 2022 12:06:20 -0700 Subject: [PATCH 03/83] Backing up files --- .../Subsequences/SupplyAirTemperature.mo | 177 ++++++++++++------ .../Validation/SupplyAirTemperature.mo | 152 ++++++++------- .../Validation/SupplyAirTemperature.mos | 26 +++ 3 files changed, 227 insertions(+), 128 deletions(-) create mode 100644 Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mos diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/SupplyAirTemperature.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/SupplyAirTemperature.mo index 5e17fc1ec76..bcffdb3e663 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/SupplyAirTemperature.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/SupplyAirTemperature.mo @@ -8,68 +8,88 @@ block SupplyAirTemperature parameter Boolean have_heatingCoil "Does the fan coil unit have a heating coil?"; - parameter Real THeaSupAirLow( - final unit="1", - displayUnit="1") = 0.1 - "Supply air temperature setpoint at minimum heating loop signal" - annotation(Dialog(group="Heating loop parameters", - enable = have_heatingCoil)); +// parameter Real THeaSupAirLow( +// final unit="K", +// displayUnit="degC") = 273.15 + 21 +// "Supply air temperature setpoint at minimum heating loop signal" +// annotation(Dialog(group="Heating loop parameters", +// enable = have_heatingCoil)); parameter Real heaPerMin( final unit="1", - displayUnit="1") = 0.5 + displayUnit="1") = heaDea "Minimum heating loop signal at which fan speed is modified" annotation(Dialog(group="Heating loop parameters", enable = have_heatingCoil)); parameter Real THeaSupAirHi( - final unit="1", - displayUnit="1") = 0.6 + final unit="K", + displayUnit="degC") = 273.15 + 32 "Supply air temperature setpoint at maximum heating loop signal" annotation(Dialog(group="Heating loop parameters", enable = have_heatingCoil)); parameter Real heaPerMax( final unit="1", - displayUnit="1") = 1 + displayUnit="1") = 0.5 "Maximum heating loop signal at which fan speed is modified" annotation(Dialog(group="Heating loop parameters", enable = have_heatingCoil)); - parameter Real TCooSupAirLow( - final unit="1", - displayUnit="1") = 0.2 - "Supply air temperature setpoint at minimum cooling loop signal" - annotation(Dialog(group="Cooling loop parameters", - enable = have_coolingCoil)); +// parameter Real TCooSupAirLow( +// final unit="K", +// displayUnit="degC") = 273.15+25 +// "Supply air temperature setpoint at minimum cooling loop signal" +// annotation(Dialog(group="Cooling loop parameters", +// enable = have_coolingCoil)); parameter Real cooPerMin( final unit="1", - displayUnit="1") = 0.5 + displayUnit="1") = cooDea "Minimum cooling loop signal at which fan speed is modified" annotation(Dialog(group="Cooling loop parameters", enable = have_coolingCoil)); parameter Real TCooSupAirHi( - final unit="1", - displayUnit="1") = 1 + final unit="K", + displayUnit="degC") = 273.15+12.8 "Supply air temperature setpoint at maximum cooling loop signal" annotation(Dialog(group="Cooling loop parameters", enable = have_coolingCoil)); parameter Real cooPerMax( final unit="1", - displayUnit="1") = 1 + displayUnit="1") = 0.5 "Maximum cooling loop signal at which fan speed is modified" annotation(Dialog(group="Cooling loop parameters", enable = have_coolingCoil)); + parameter Real heaDea( + final unit="1", + displayUnit="1") = 0.05 + "Heating loop signal limit at which deadband mode transitions to heating mode" + annotation(Dialog(group="Transition parameters", + enable = have_heatingCoil)); + + parameter Real cooDea( + final unit="1", + displayUnit="1") = 0.05 + "Cooling loop signal limit at which deadband mode transitions to cooling mode" + annotation(Dialog(group="Transition parameters", + enable = have_coolingCoil)); + + parameter Real deaHysLim( + final unit="1", + displayUnit="1") = 0.01 + "Hysteresis limits for deadband mode transitions" + annotation(Dialog(tab="Advanced")); + CDL.Interfaces.RealInput uHea if have_heatingCoil "Heating loop signal" - annotation (Placement(transformation(extent={{-140,40},{-100,80}}))); - CDL.Interfaces.RealInput uCoo if have_coolingCoil - "Cooling loop signal" - annotation (Placement(transformation(extent={{-140,-80},{-100,-40}}), - iconTransformation(extent={{-140,-80},{-100,-40}}))); + annotation (Placement(transformation(extent={{-140,20},{-100,60}}), + iconTransformation(extent={{-140,20},{-100,60}}))); + CDL.Interfaces.RealInput uCoo if have_coolingCoil "Cooling loop signal" + annotation (Placement(transformation(extent={{-140,-60},{-100,-20}}), + iconTransformation(extent={{-140,-60},{-100,-20}}))); CDL.Interfaces.RealInput TAirSup "Measured supply air temperature" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); @@ -85,24 +105,22 @@ block SupplyAirTemperature CDL.Continuous.Line lin1 "Convert cooling loop signal to supply air temperature setpoint" annotation (Placement(transformation(extent={{-40,-70},{-20,-50}}))); - CDL.Continuous.Sources.Constant con1[2](k={THeaSupAirLow,THeaSupAirHi}) if - have_heatingCoil "Heating supply air temperature setpoint limit signals" - annotation (Placement(transformation(extent={{-80,70},{-60,90}}))); + CDL.Continuous.Sources.Constant con1(k=THeaSupAirHi) + "Heating supply air temperature setpoint limit signals" + annotation (Placement(transformation(extent={{-90,90},{-70,110}}))); CDL.Continuous.Sources.Constant con2 - [2](k={heaPerMin,heaPerMax}) if - have_heatingCoil + [2](k={heaPerMin,heaPerMax}) "Heating loop signal support points" - annotation (Placement(transformation(extent={{-80,30},{-60,50}}))); - CDL.Continuous.Sources.Constant con3[2](k={TCooSupAirLow,TCooSupAirHi}) if - have_coolingCoil "Cooling supply air temperature setpoint limit signals" - annotation (Placement(transformation(extent={{-80,-50},{-60,-30}}))); - CDL.Continuous.Sources.Constant con4[2](k={cooPerMin,cooPerMax}) if - have_coolingCoil + annotation (Placement(transformation(extent={{-80,10},{-60,30}}))); + CDL.Continuous.Sources.Constant con3(k=TCooSupAirHi) + "Cooling supply air temperature setpoint limit signals" + annotation (Placement(transformation(extent={{-80,-30},{-60,-10}}))); + CDL.Continuous.Sources.Constant con4[2](k={cooPerMin,cooPerMax}) "Cooling loop signal support points" annotation (Placement(transformation(extent={{-80,-90},{-60,-70}}))); CDL.Continuous.PID conPID annotation (Placement(transformation(extent={{40,50},{60,70}}))); - CDL.Continuous.PID conPID1 + CDL.Continuous.PID conPID1(reverseActing=false) annotation (Placement(transformation(extent={{60,-70},{80,-50}}))); CDL.Continuous.Hysteresis hys(uLow=heaDea - deaHysLim, uHigh=heaDea) "Hysteresis for switching between deadband mode and heating mode" @@ -122,55 +140,60 @@ block SupplyAirTemperature CDL.Continuous.Sources.Constant con8(k=0) if not have_coolingCoil "Constant zero signal" annotation (Placement(transformation(extent={{-20,-110},{0,-90}}))); - CDL.Continuous.Sources.Constant con5(k=0) - "Constant zero signal" - annotation (Placement(transformation(extent={{-30,10},{-10,30}}))); + CDL.Interfaces.RealInput TZonSetHea if + have_heatingCoil + "Zone heating temperature setpoint" annotation (Placement(transformation( + extent={{-140,60},{-100,100}}), iconTransformation(extent={{-140,60},{ + -100,100}}))); + CDL.Interfaces.RealInput TZonSetCoo if + have_coolingCoil + "Zone cooling temperature setpoint" annotation (Placement(transformation( + extent={{-140,-120},{-100,-80}}), iconTransformation(extent={{-140,-100}, + {-100,-60}}))); + CDL.Conversions.BooleanToReal booToRea "Convert Boolean to Real" + annotation (Placement(transformation(extent={{20,90},{40,110}}))); + CDL.Continuous.Multiply mul + "Output heating coil signal only when heating mode is enabled" + annotation (Placement(transformation(extent={{74,50},{94,70}}))); + CDL.Conversions.BooleanToReal booToRea1 "Convert Boolean to Real" + annotation (Placement(transformation(extent={{20,-80},{40,-60}}))); + CDL.Continuous.Multiply mul1 + "Output cooling coil signal only when cooling mode is enabled" + annotation (Placement(transformation(extent={{74,-112},{94,-92}}))); equation connect(uHea, lin.u) - annotation (Line(points={{-120,60},{-42,60}}, color={0,0,127})); - connect(con1[1].y, lin.f1) annotation (Line(points={{-58,80},{-50,80},{-50,64}, - {-42,64}}, color={0,0,127})); - connect(con1[2].y, lin.f2) annotation (Line(points={{-58,80},{-50,80},{-50,52}, - {-42,52}}, color={0,0,127})); - connect(con2[1].y, lin.x1) annotation (Line(points={{-58,40},{-46,40},{-46,68}, + annotation (Line(points={{-120,40},{-82,40},{-82,60},{-42,60}}, + color={0,0,127})); + connect(con2[1].y, lin.x1) annotation (Line(points={{-58,20},{-46,20},{-46,68}, {-42,68}}, color={0,0,127})); - connect(con2[2].y, lin.x2) annotation (Line(points={{-58,40},{-46,40},{-46,56}, + connect(con2[2].y, lin.x2) annotation (Line(points={{-58,20},{-46,20},{-46,56}, {-42,56}}, color={0,0,127})); connect(uCoo, lin1.u) - annotation (Line(points={{-120,-60},{-42,-60}}, color={0,0,127})); - connect(con3[1].y, lin1.f1) annotation (Line(points={{-58,-40},{-50,-40},{-50, - -56},{-42,-56}}, color={0,0,127})); - connect(con3[2].y, lin1.f2) annotation (Line(points={{-58,-40},{-50,-40},{-50, - -68},{-42,-68}}, color={0,0,127})); + annotation (Line(points={{-120,-40},{-82,-40},{-82,-60},{-42,-60}}, + color={0,0,127})); connect(con4[1].y, lin1.x1) annotation (Line(points={{-58,-80},{-54,-80},{-54, -52},{-42,-52}}, color={0,0,127})); connect(con4[2].y, lin1.x2) annotation (Line(points={{-58,-80},{-54,-80},{-54, -64},{-42,-64}}, color={0,0,127})); connect(TAirSup, conPID.u_m) annotation (Line(points={{-120,0},{50,0},{50,48}}, color={0,0,127})); - connect(conPID.y, yHeaCoi) - annotation (Line(points={{62,60},{120,60}}, color={0,0,127})); connect(TAirSup, conPID1.u_m) annotation (Line(points={{-120,0},{50,0},{50, - -90},{70,-90},{70,-72}}, color={0,0,127})); - connect(conPID1.y, yCooCoi) - annotation (Line(points={{82,-60},{120,-60}}, color={0,0,127})); - connect(con5.y, swi1.u3) annotation (Line(points={{-8,20},{-6,20},{-6,52},{-2, - 52}}, color={0,0,127})); + -78},{70,-78},{70,-72}}, color={0,0,127})); connect(lin.y, swi1.u1) annotation (Line(points={{-18,60},{-10,60},{-10,68},{ -2,68}}, color={0,0,127})); connect(con6.y, hys.u) annotation (Line(points={{-28,100},{-22,100}}, color={0,0,127})); connect(con6.y, lin.u) annotation (Line(points={{-28,100},{-26,100},{-26,76}, {-54,76},{-54,60},{-42,60}}, color={0,0,127})); - connect(uHea, hys.u) annotation (Line(points={{-120,60},{-54,60},{-54,76},{ - -26,76},{-26,100},{-22,100}}, color={0,0,127})); + connect(uHea, hys.u) annotation (Line(points={{-120,40},{-54,40},{-54,76},{-26, + 76},{-26,100},{-22,100}}, color={0,0,127})); connect(hys.y, swi1.u2) annotation (Line(points={{2,100},{10,100},{10,80},{-6, 80},{-6,60},{-2,60}}, color={255,0,255})); connect(con8.y, lin1.u) annotation (Line(points={{2,-100},{10,-100},{10,-80},{ -46,-80},{-46,-60},{-42,-60}}, color={0,0,127})); connect(hys1.y, swi2.u2) annotation (Line(points={{2,-20},{18,-20}}, color={255,0,255})); - connect(uCoo, hys1.u) annotation (Line(points={{-120,-60},{-46,-60},{-46,-20}, + connect(uCoo, hys1.u) annotation (Line(points={{-120,-40},{-46,-40},{-46,-20}, {-22,-20}}, color={0,0,127})); connect(con8.y, hys1.u) annotation (Line(points={{2,-100},{10,-100},{10,-80},{ -46,-80},{-46,-20},{-22,-20}}, color={0,0,127})); @@ -182,6 +205,36 @@ equation {32,40},{32,60},{38,60}}, color={0,0,127})); connect(swi2.y, conPID1.u_s) annotation (Line(points={{42,-20},{44,-20},{44,-60}, {58,-60}}, color={0,0,127})); + connect(con1.y, lin.f2) annotation (Line(points={{-68,100},{-60,100},{-60,52}, + {-42,52}}, color={0,0,127})); + connect(con3.y, lin1.f2) annotation (Line(points={{-58,-20},{-50,-20},{-50,-68}, + {-42,-68}}, color={0,0,127})); + connect(TZonSetHea, lin.f1) annotation (Line(points={{-120,80},{-56,80},{-56,64}, + {-42,64}}, color={0,0,127})); + connect(TZonSetCoo, lin1.f1) annotation (Line(points={{-120,-100},{-52,-100},{ + -52,-56},{-42,-56}}, color={0,0,127})); + connect(TAirSup, swi1.u3) annotation (Line(points={{-120,0},{-10,0},{-10,52},{ + -2,52}}, color={0,0,127})); + connect(con6.y, lin.f1) annotation (Line(points={{-28,100},{-26,100},{-26,76}, + {-54,76},{-54,64},{-42,64}}, color={0,0,127})); + connect(con8.y, lin1.f1) annotation (Line(points={{2,-100},{10,-100},{10,-80}, + {-46,-80},{-46,-56},{-42,-56}}, color={0,0,127})); + connect(hys.y, booToRea.u) + annotation (Line(points={{2,100},{18,100}}, color={255,0,255})); + connect(yHeaCoi, mul.y) + annotation (Line(points={{120,60},{96,60}}, color={0,0,127})); + connect(conPID.y, mul.u2) annotation (Line(points={{62,60},{68,60},{68,54},{ + 72,54}}, color={0,0,127})); + connect(booToRea.y, mul.u1) annotation (Line(points={{42,100},{68,100},{68,66}, + {72,66}}, color={0,0,127})); + connect(hys1.y, booToRea1.u) annotation (Line(points={{2,-20},{14,-20},{14, + -70},{18,-70}}, color={255,0,255})); + connect(booToRea1.y, mul1.u2) annotation (Line(points={{42,-70},{46,-70},{46, + -108},{72,-108}}, color={0,0,127})); + connect(conPID1.y, mul1.u1) annotation (Line(points={{82,-60},{84,-60},{84, + -86},{68,-86},{68,-96},{72,-96}}, color={0,0,127})); + connect(mul1.y, yCooCoi) annotation (Line(points={{96,-102},{98,-102},{98,-60}, + {120,-60}}, color={0,0,127})); annotation (defaultComponentName = "TSupAir", Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100, 100}}), graphics={ diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mo index b8828c25a94..83ce6b8151b 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mo @@ -6,89 +6,109 @@ block SupplyAirTemperature Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.SupplyAirTemperature TSupAir(have_coolingCoil=true, have_heatingCoil=true) - annotation (Placement(transformation(extent={{-40,40},{-20,60}}))); - Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.SupplyAirTemperature - TSupAir1(have_coolingCoil=true, have_heatingCoil=false) - annotation (Placement(transformation(extent={{60,-60},{80,-40}}))); - Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.SupplyAirTemperature - TSupAir2(have_coolingCoil=false, have_heatingCoil=true) - annotation (Placement(transformation(extent={{-40,-60},{-20,-40}}))); + annotation (Placement(transformation(extent={{-50,60},{-30,80}}))); + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.SupplyAirTemperature TSupAir3( + have_coolingCoil=true, have_heatingCoil=false) + annotation (Placement(transformation(extent={{60,-80},{80,-60}}))); + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.SupplyAirTemperature TSupAir2( + have_coolingCoil=false, have_heatingCoil=true) + annotation (Placement(transformation(extent={{-50,-100},{-30,-80}}))); CDL.Continuous.Sources.Sine sin( - amplitude=273.15 + 10, + amplitude=20, freqHz=1/50, - offset=273.15 + 25) - annotation (Placement(transformation(extent={{-80,40},{-60,60}}))); - CDL.Continuous.Sources.Sine sin1( - amplitude=0.5, - freqHz=1/200, - offset=0.5) - annotation (Placement(transformation(extent={{-80,10},{-60,30}}))); - CDL.Continuous.Sources.Sine sin2( - amplitude=0.5, - freqHz=1/100, - offset=0.5) - annotation (Placement(transformation(extent={{-80,70},{-60,90}}))); + offset=273.15 + 23) "Supply air temperature signal" + annotation (Placement(transformation(extent={{-90,60},{-70,80}}))); CDL.Continuous.Sources.Sine sin3( - amplitude=273.15 + 10, + amplitude=20, freqHz=1/50, - offset=273.15 + 25) - annotation (Placement(transformation(extent={{20,-80},{40,-60}}))); + offset=273.15 + 23) "Supply air temperature signal" + annotation (Placement(transformation(extent={{20,-70},{40,-50}}))); CDL.Continuous.Sources.Sine sin5( amplitude=0.5, freqHz=1/100, - offset=0.5) - annotation (Placement(transformation(extent={{20,-50},{40,-30}}))); + offset=0.5) "Cooling loop signal" + annotation (Placement(transformation(extent={{20,-100},{40,-80}}))); CDL.Continuous.Sources.Sine sin6( - amplitude=273.15 + 10, + amplitude=20, freqHz=1/50, - offset=273.15 + 25) - annotation (Placement(transformation(extent={{-80,-60},{-60,-40}}))); + offset=273.15 + 23) "Supply air temperature signal" + annotation (Placement(transformation(extent={{-90,-100},{-70,-80}}))); CDL.Continuous.Sources.Sine sin8( amplitude=0.5, freqHz=1/100, - offset=0.5) - annotation (Placement(transformation(extent={{-80,-30},{-60,-10}}))); + offset=0.5) "Heating loop signal" + annotation (Placement(transformation(extent={{-90,-70},{-70,-50}}))); Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.SupplyAirTemperature - TSupAir3(have_coolingCoil=true, have_heatingCoil=true) - annotation (Placement(transformation(extent={{60,40},{80,60}}))); + TSupAir1(have_coolingCoil=true, have_heatingCoil=true) + annotation (Placement(transformation(extent={{80,60},{100,80}}))); CDL.Continuous.Sources.Sine sin4( - amplitude=273.15 + 10, + amplitude=20, freqHz=1/50, - offset=273.15 + 25) - annotation (Placement(transformation(extent={{20,40},{40,60}}))); - CDL.Continuous.Sources.Sine sin7( - amplitude=0.5, - freqHz=1/200, - offset=0.5) - annotation (Placement(transformation(extent={{20,10},{40,30}}))); - CDL.Continuous.Sources.Sine sin9( - amplitude=0.5, - freqHz=1/100, - offset=0.5) - annotation (Placement(transformation(extent={{20,70},{40,90}}))); + offset=273.15 + 23) "Supply air temperature signal" + annotation (Placement(transformation(extent={{40,60},{60,80}}))); + CDL.Continuous.Sources.Constant con(k=273.15 + 21) + "Zone heating temperature setpoint" + annotation (Placement(transformation(extent={{-90,120},{-70,140}}))); + CDL.Continuous.Sources.Constant con1(k=273.15 + 25) + "Zone cooling temperature setpoint" + annotation (Placement(transformation(extent={{-90,0},{-70,20}}))); + CDL.Continuous.Sources.Constant con2(k=273.15 + 21) + "Zone heating temperature setpoint" + annotation (Placement(transformation(extent={{40,120},{60,140}}))); + CDL.Continuous.Sources.Constant con3(k=273.15 + 25) + "Zone cooling temperature setpoint" + annotation (Placement(transformation(extent={{40,0},{60,20}}))); + CDL.Continuous.Sources.Constant con4(k=273.15 + 21) + "Zone heating temperature setpoint" + annotation (Placement(transformation(extent={{-90,-40},{-70,-20}}))); + CDL.Continuous.Sources.Constant con6(k=273.15 + 25) + "Zone cooling temperature setpoint" + annotation (Placement(transformation(extent={{20,-130},{40,-110}}))); + CDL.Continuous.Sources.Constant con5(k=0.25) "Heating loop signal" + annotation (Placement(transformation(extent={{-90,90},{-70,110}}))); + CDL.Continuous.Sources.Constant con7(k=0) "Heating loop signal" + annotation (Placement(transformation(extent={{40,90},{60,110}}))); + CDL.Continuous.Sources.Constant con8(k=0) "Cooling loop signal" + annotation (Placement(transformation(extent={{-90,30},{-70,50}}))); + CDL.Continuous.Sources.Constant con9(k=0.25) "Cooling loop signal" + annotation (Placement(transformation(extent={{40,30},{60,50}}))); equation connect(sin.y, TSupAir.TAirSup) - annotation (Line(points={{-58,50},{-42,50}}, color={0,0,127})); - connect(sin2.y, TSupAir.uHea) annotation (Line(points={{-58,80},{-50,80},{-50, - 56},{-42,56}}, color={0,0,127})); - connect(sin1.y, TSupAir.uCoo) annotation (Line(points={{-58,20},{-50,20},{-50, - 44},{-42,44}}, color={0,0,127})); - connect(sin5.y, TSupAir1.TAirSup) annotation (Line(points={{42,-40},{50,-40}, - {50,-50},{58,-50}}, color={0,0,127})); - connect(sin3.y, TSupAir1.uCoo) annotation (Line(points={{42,-70},{50,-70},{50, - -56},{58,-56}}, color={0,0,127})); + annotation (Line(points={{-68,70},{-52,70}}, color={0,0,127})); connect(sin6.y, TSupAir2.TAirSup) - annotation (Line(points={{-58,-50},{-42,-50}}, color={0,0,127})); - connect(sin8.y, TSupAir2.uHea) annotation (Line(points={{-58,-20},{-50,-20},{ - -50,-44},{-42,-44}}, color={0,0,127})); - connect(sin4.y, TSupAir3.TAirSup) - annotation (Line(points={{42,50},{58,50}}, color={0,0,127})); - connect(sin9.y, TSupAir3.uHea) annotation (Line(points={{42,80},{50,80},{50, - 56},{58,56}}, color={0,0,127})); - connect(sin7.y, TSupAir3.uCoo) annotation (Line(points={{42,20},{50,20},{50, - 44},{58,44}}, color={0,0,127})); - annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( - coordinateSystem(preserveAspectRatio=false))); - + annotation (Line(points={{-68,-90},{-52,-90}}, color={0,0,127})); + connect(sin8.y, TSupAir2.uHea) annotation (Line(points={{-68,-60},{-60,-60},{ + -60,-86},{-52,-86}}, color={0,0,127})); + connect(sin4.y,TSupAir1. TAirSup) + annotation (Line(points={{62,70},{78,70}}, color={0,0,127})); + connect(con.y, TSupAir.TZonSetHea) annotation (Line(points={{-68,130},{-56, + 130},{-56,78},{-52,78}}, color={0,0,127})); + connect(con1.y, TSupAir.TZonSetCoo) annotation (Line(points={{-68,10},{-56,10}, + {-56,62},{-52,62}}, color={0,0,127})); + connect(con2.y, TSupAir1.TZonSetHea) annotation (Line(points={{62,130},{72, + 130},{72,78},{78,78}}, color={0,0,127})); + connect(con3.y, TSupAir1.TZonSetCoo) annotation (Line(points={{62,10},{72,10}, + {72,62},{78,62}}, color={0,0,127})); + connect(con4.y, TSupAir2.TZonSetHea) annotation (Line(points={{-68,-30},{-56, + -30},{-56,-82},{-52,-82}}, color={0,0,127})); + connect(con6.y, TSupAir3.TZonSetCoo) annotation (Line(points={{42,-120},{54, + -120},{54,-78},{58,-78}}, color={0,0,127})); + connect(con5.y, TSupAir.uHea) annotation (Line(points={{-68,100},{-60,100},{ + -60,74},{-52,74}}, color={0,0,127})); + connect(con7.y, TSupAir1.uHea) annotation (Line(points={{62,100},{68,100},{68, + 74},{78,74}}, color={0,0,127})); + connect(con8.y, TSupAir.uCoo) annotation (Line(points={{-68,40},{-60,40},{-60, + 66},{-52,66}}, color={0,0,127})); + connect(con9.y, TSupAir1.uCoo) annotation (Line(points={{62,40},{70,40},{70, + 66},{78,66}}, color={0,0,127})); + connect(sin5.y, TSupAir3.uCoo) annotation (Line(points={{42,-90},{52,-90},{52, + -74},{58,-74}}, color={0,0,127})); + connect(sin3.y, TSupAir3.TAirSup) annotation (Line(points={{42,-60},{52,-60}, + {52,-70},{58,-70}}, color={0,0,127})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, + {100,100}})), Diagram( + coordinateSystem(preserveAspectRatio=false, extent={{-140,-140},{140,140}})), + __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mos" + "Simulate and plot")); end SupplyAirTemperature; diff --git a/Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mos b/Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mos new file mode 100644 index 00000000000..2e58358cf07 --- /dev/null +++ b/Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mos @@ -0,0 +1,26 @@ +simulateModel("Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.Validation.SupplyAirTemperature", method="Cvode", stopTime=100, tolerance=1e-06, resultFile="SupplyAirTemperature"); + +createPlot(id=1, position={0, 0, 1669, 978}, y={"TSupAir.uHea"}, range={0.0, 100.0, 0.22, 0.28}, grid=true, colors={{28,108,200}}); +createPlot(id=1, position={0, 0, 1669, 159}, y={"TSupAir.uCoo"}, range={0.0, 100.0, -2.0, 2.0}, grid=true, subPlot=2, colors={{28,108,200}}); +createPlot(id=1, position={0, 0, 1669, 158}, y={"TSupAir.TZonSetHea", "TSupAir.TZonSetCoo", "TSupAir.swi2.y"}, range={0.0, 100.0, 294.0, 300.0}, grid=true, subPlot=3, colors={{28,108,200}, {238,46,47}, {0,140,72}}); +createPlot(id=1, position={0, 0, 1669, 159}, y={"TSupAir.swi2.y", "TSupAir.TAirSup"}, range={0.0, 100.0, 0.0, 600.0}, grid=true, subPlot=4, colors={{28,108,200}, {238,46,47}}); +createPlot(id=1, position={0, 0, 1669, 159}, y={"TSupAir.yHeaCoi"}, range={0.0, 100.0, -0.5, 1.5}, grid=true, subPlot=5, colors={{28,108,200}}); +createPlot(id=1, position={0, 0, 1669, 159}, y={"TSupAir.yCooCoi"}, range={0.0, 100.0, -0.5, 1.5}, grid=true, subPlot=6, colors={{28,108,200}}); + +createPlot(id=2, position={0, 0, 1669, 978}, y={"TSupAir1.uHea"}, range={0.0, 100.0, 0.22, 0.28}, grid=true, colors={{28,108,200}}); +createPlot(id=2, position={0, 0, 1669, 159}, y={"TSupAir1.uCoo"}, range={0.0, 100.0, -2.0, 2.0}, grid=true, subPlot=2, colors={{28,108,200}}); +createPlot(id=2, position={0, 0, 1669, 158}, y={"TSupAir1.TZonSetHea", "TSupAir1.TZonSetCoo", "TSupAir1.swi2.y"}, range={0.0, 100.0, 294.0, 300.0}, grid=true, subPlot=3, colors={{28,108,200}, {238,46,47}, {0,140,72}}); +createPlot(id=2, position={0, 0, 1669, 159}, y={"TSupAir1.swi2.y", "TSupAir1.TAirSup"}, range={0.0, 100.0, 0.0, 600.0}, grid=true, subPlot=4, colors={{28,108,200}, {238,46,47}}); +createPlot(id=2, position={0, 0, 1669, 159}, y={"TSupAir1.yHeaCoi"}, range={0.0, 100.0, -0.5, 1.5}, grid=true, subPlot=5, colors={{28,108,200}}); +createPlot(id=2, position={0, 0, 1669, 159}, y={"TSupAir1.yCooCoi"}, range={0.0, 100.0, -0.5, 1.5}, grid=true, subPlot=6, colors={{28,108,200}}); + +createPlot(id=3, position={0, 0, 1669, 978}, y={"TSupAir2.uHea"}, range={0.0, 100.0, 0.22, 0.28}, grid=true, colors={{28,108,200}}); +createPlot(id=3, position={0, 0, 1669, 158}, y={"TSupAir2.TZonSetHea", "TSupAir2.swi2.y"}, range={0.0, 100.0, 294.0, 300.0}, grid=true, subPlot=2, colors={{28,108,200}, {238,46,47}}); +createPlot(id=3, position={0, 0, 1669, 159}, y={"TSupAir2.swi2.y", "TSupAir2.TAirSup"}, range={0.0, 100.0, 0.0, 600.0}, grid=true, subPlot=3, colors={{28,108,200}, {238,46,47}}); +createPlot(id=3, position={0, 0, 1669, 159}, y={"TSupAir2.yHeaCoi"}, range={0.0, 100.0, -0.5, 1.5}, grid=true, subPlot=4, colors={{28,108,200}}); + +createPlot(id=4, position={0, 0, 1669, 159}, y={"TSupAir3.uCoo"}, range={0.0, 100.0, -2.0, 2.0}, grid=true, colors={{28,108,200}}); +createPlot(id=4, position={0, 0, 1669, 158}, y={"TSupAir3.TZonSetCoo", "TSupAir3.swi2.y"}, range={0.0, 100.0, 294.0, 300.0}, grid=true, subPlot=2, colors={{28,108,200}, {238,46,47}}); +createPlot(id=4, position={0, 0, 1669, 159}, y={"TSupAir3.swi2.y", "TSupAir3.TAirSup"}, range={0.0, 100.0, 0.0, 600.0}, grid=true, subPlot=3, colors={{28,108,200}, {238,46,47}}); +createPlot(id=4, position={0, 0, 1669, 159}, y={"TSupAir3.yCooCoi"}, range={0.0, 100.0, -0.5, 1.5}, grid=true, subPlot=4, colors={{28,108,200}}); + From 0eb59d081fd3f76331284fcf1adfeec393c7853f Mon Sep 17 00:00:00 2001 From: Devaprasad Date: Thu, 17 Mar 2022 14:48:47 -0700 Subject: [PATCH 04/83] Updated formatting --- .../OBC/ASHRAE/FanCoilUnit/Controller.mo | 854 +++++++++++++++++- .../FanCoilUnit/Subsequences/FanSpeed.mo | 137 ++- .../Subsequences/SupplyAirTemperature.mo | 241 +++-- .../Subsequences/Validation/FanSpeed.mo | 154 +++- .../Validation/SupplyAirTemperature.mo | 94 +- .../Subsequences/Validation/package.mo | 1 + .../FanCoilUnit/Subsequences/package.mo | 1 + .../FanCoilUnit/Validation/Controller.mo | 340 +++++++ .../ASHRAE/FanCoilUnit/Validation/package.mo | 5 + .../FanCoilUnit/Validation/package.order | 1 + .../OBC/ASHRAE/FanCoilUnit/package.mo | 5 +- .../OBC/ASHRAE/FanCoilUnit/package.order | 1 + .../FanCoilUnit/Validation/Controller.mos | 11 + 13 files changed, 1695 insertions(+), 150 deletions(-) create mode 100644 Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mo create mode 100644 Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/package.mo create mode 100644 Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/package.order create mode 100644 Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mos diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Controller.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Controller.mo index 040216f65df..3cf3ab14ce7 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Controller.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Controller.mo @@ -1,7 +1,851 @@ within Buildings.Controls.OBC.ASHRAE.FanCoilUnit; -block Controller "Controller for fan coil systems" - G36_PR1.Generic.SetPoints.OperationMode opeModSel - annotation (Placement(transformation(extent={{-60,4},{-40,36}}))); - annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( - coordinateSystem(preserveAspectRatio=false))); + +block Controller + + "Fan coil unit controller that comprises subsequences for controlling fan speed and supply air temperature" + + parameter Boolean have_coolingCoil + "Does the fan coil unit have a cooling coil?"; + + parameter Boolean have_heatingCoil + "Does the fan coil unit have a heating coil?"; + + parameter Boolean have_winSen + "Check if the zone has window status sensor"; + + parameter Boolean have_occSen + "Set to true if zones have occupancy sensor"; + + parameter Real TZonHeaOn( + final unit="K", + displayUnit="degC", + final quantity="ThermodynamicTemperature")=293.15 + "Heating setpoint during on" + annotation (Dialog(group="Zone setpoints")); + + parameter Real TZonHeaOff( + final unit="K", + displayUnit="degC", + final quantity="ThermodynamicTemperature")=285.15 + "Heating setpoint during off" + annotation (Dialog(group="Zone setpoints")); + + parameter Real TZonCooOn( + final unit="K", + displayUnit="degC", + final quantity="ThermodynamicTemperature")=297.15 + "Cooling setpoint during on" + annotation (Dialog(group="Zone setpoints")); + + parameter Real TZonCooOff( + final unit="K", + displayUnit="degC", + final quantity="ThermodynamicTemperature")=303.15 + "Cooling setpoint during off" + annotation (Dialog(group="Zone setpoints")); + + + parameter Real heaDea=0.05 + "Heating loop signal limit at which deadband mode transitions to heating mode"; + + parameter Real cooDea=0.05 + "Cooling loop signal limit at which deadband mode transitions to cooling mode"; + + parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerTypeCoo= + Buildings.Controls.OBC.CDL.Types.SimpleController.PI + "Type of controller" + annotation (Dialog(tab="PID parameters", group="Cooling loop control")); + + parameter Real kCoo(final unit="1/K") = 0.1 + "Gain for cooling control loop signal" + annotation(Dialog(tab="PID parameters", group="Cooling loop control")); + + parameter Real TiCoo( + final unit="s", + final quantity="Time")=900 + "Time constant of integrator block for cooling control loop signal" + annotation(Dialog(tab="PID parameters", group="Cooling loop control", + enable=controllerTypeCoo == Buildings.Controls.OBC.CDL.Types.SimpleController.PI + or controllerTypeCoo == Buildings.Controls.OBC.CDL.Types.SimpleController.PID)); + + parameter Real TdCoo( + final unit="s", + final quantity="Time")=0.1 + "Time constant of derivative block for cooling control loop signal" + annotation (Dialog(tab="PID parameters", group="Cooling loop control", + enable=controllerTypeCoo == Buildings.Controls.OBC.CDL.Types.SimpleController.PD + or controllerTypeCoo == Buildings.Controls.OBC.CDL.Types.SimpleController.PID)); + + parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerTypeHea= + Buildings.Controls.OBC.CDL.Types.SimpleController.PI + "Type of controller" + annotation(Dialog(tab="PID parameters", group="Heating loop control")); + + parameter Real kHea(final unit="1/K")=0.1 + "Gain for heating control loop signal" + annotation(Dialog(tab="PID parameters", group="Heating loop control")); + + parameter Real TiHea( + final unit="s", + final quantity="Time")=900 + "Time constant of integrator block for heating control loop signal" + annotation(Dialog(tab="PID parameters", group="Heating loop control", + enable=controllerTypeHea == Buildings.Controls.OBC.CDL.Types.SimpleController.PI + or controllerTypeHea == Buildings.Controls.OBC.CDL.Types.SimpleController.PID)); + + parameter Real TdHea( + final unit="s", + final quantity="Time")=0.1 + "Time constant of derivative block for heating control loop signal" + annotation (Dialog(tab="PID parameters", group="Heating loop control", + enable=controllerTypeHea == Buildings.Controls.OBC.CDL.Types.SimpleController.PD + or controllerTypeHea == Buildings.Controls.OBC.CDL.Types.SimpleController.PID)); + + parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerTypeCooCoi= + Buildings.Controls.OBC.CDL.Types.SimpleController.PI + "Type of controller" + annotation(Dialog(tab="PID parameters", group="Cooling coil control")); + + parameter Real kCooCoi(final unit="1/K")=0.1 + "Gain for cooling coil control signal" + annotation(Dialog(tab="PID parameters", group="Cooling coil control")); + + parameter Real TiCooCoi( + final unit="s", + final quantity="Time")=900 + "Time constant of integrator block for cooling coil control signal" + annotation(Dialog(tab="PID parameters", group="Cooling coil control", + enable=controllerTypeCooCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PI + or controllerTypeCooCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PID)); + + parameter Real TdCooCoi( + final unit="s", + final quantity="Time")=0.1 + "Time constant of derivative block for cooling coil control signal" + annotation (Dialog(tab="PID parameters", group="Cooling coil control", + enable=controllerTypeCooCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PD + or controllerTypeCooCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PID)); + + parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerTypeHeaCoi= + Buildings.Controls.OBC.CDL.Types.SimpleController.PI + "Type of controller" + annotation(Dialog(tab="PID parameters", group="Heating coil control")); + + parameter Real kHeaCoi(final unit="1/K")=0.1 + "Gain for heating coil control signal" + annotation(Dialog(tab="PID parameters", group="Heating coil control")); + + parameter Real TiHeaCoi( + final unit="s", + final quantity="Time")=900 + "Time constant of integrator block for heating coil control signal" + annotation(Dialog(tab="PID parameters", group="Heating coil control", + enable=controllerTypeCooCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PI + or controllerTypeCooCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PID)); + + parameter Real TdHeaCoi( + final unit="s", + final quantity="Time")=0.1 + "Time constant of derivative block for heatinging coil control signal" + annotation (Dialog(tab="PID parameters", group="Heating coil control", + enable=controllerTypeCooCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PD + or controllerTypeCooCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PID)); + + parameter Real cooPerMin(min=0, max=1, unit="1")=0.5 + "Cooling loop signal limit at which supply air temperature is at minimum and + fan speed starts to be modified" + annotation (Dialog(tab="Supply air setpoints")); + + parameter Real heaPerMin(min=0, max=1, unit="1")=0.5 + "Heating loop signal limit at which supply air temperature is at maximum and + fan speed starts to be modified" + annotation (Dialog(tab="Supply air setpoints")); + + parameter Real TSupSetMax( + final unit="K", + displayUnit="degC", + final quantity="ThermodynamicTemperature") + "Maximum supply air temperature for heating" + annotation (Dialog(tab="Supply air setpoints",group="Temperature limits")); + + parameter Real TSupSetMin( + final unit="K", + displayUnit="degC", + final quantity="ThermodynamicTemperature") + "Minimum supply air temperature for cooling" + annotation (Dialog(tab="Supply air setpoints",group="Temperature limits")); + + + parameter Real deaSpe=deaSpe + "Deadband mode fan speed" + annotation (Dialog(tab="Supply air setpoints",group="Fan speed")); + + parameter Real heaPerMaxFanSpe(min=0, max=1, unit="1")=1 + "Maximum heating loop signal at which fan speed is modified" + annotation (Dialog(tab="Supply air setpoints",group="Fan speed - Heating")); + + parameter Real heaSpeMax(min=0, max=1, unit="1") + "Maximum fan speed for heating" + annotation (Dialog(tab="Supply air setpoints",group="Fan speed - Heating")); + + parameter Real heaSpeMin(min=0, max=1, unit="1") + "Minimum fan speed for heating" + annotation (Dialog(tab="Supply air setpoints",group="Fan speed - Heating")); + + + parameter Real cooPerMaxFanSpe(min=0, max=1, unit="1")=1 + "Maximum cooling loop signal at which fan speed is modified" + annotation (Dialog(tab="Supply air setpoints",group="Fan speed - Cooling")); + + parameter Real cooSpeMax(min=0, max=1, unit="1") = 1 + "Maximum fan speed for cooling" + annotation (Dialog(tab="Supply air setpoints",group="Fan speed - Cooling")); + parameter Real cooSpeMin(min=0, max=1, unit="1") + "Minimum fan speed for cooling" + annotation (Dialog(tab="Supply air setpoints",group="Fan speed - Cooling")); + + parameter Boolean cooAdj=false + "Flag, set to true if both cooling and heating setpoint are adjustable separately" + annotation (Dialog(tab="Adjust temperature setpoint", group="General")); + + parameter Boolean heaAdj=false + "Flag, set to true if heating setpoint is adjustable" + annotation (Dialog(tab="Adjust temperature setpoint", group="General")); + + parameter Boolean sinAdj=false + "Flag, set to true if both cooling and heating setpoint are adjustable through a single common knob" + annotation (Dialog(tab="Adjust temperature setpoint", group="General")); + + parameter Boolean ignDemLim=false + "Flag, set to true to exempt individual zone from demand limit setpoint adjustment" + annotation (Dialog(tab="Adjust temperature setpoint", group="General")); + + parameter Real TZonCooOnMax( + final unit="K", + displayUnit="degC", + final quantity="ThermodynamicTemperature")=300.15 + "Maximum cooling setpoint during on" + annotation (Dialog(tab="Adjust temperature setpoint", group="Limits")); + + parameter Real TZonCooOnMin( + final unit="K", + displayUnit="degC", + final quantity="ThermodynamicTemperature")=295.15 + "Minimum cooling setpoint during on" + annotation (Dialog(tab="Adjust temperature setpoint", group="Limits")); + + parameter Real TZonHeaOnMax( + final unit="K", + displayUnit="degC", + final quantity="ThermodynamicTemperature")=295.15 + "Maximum heating setpoint during on" + annotation (Dialog(tab="Adjust temperature setpoint", group="Limits")); + + parameter Real TZonHeaOnMin( + final unit="K", + displayUnit="degC", + final quantity="ThermodynamicTemperature")=291.15 + "Minimum heating setpoint during on" + annotation (Dialog(tab="Adjust temperature setpoint", group="Limits")); + + parameter Real TZonCooSetWinOpe( + final unit="K", + displayUnit="degC", + final quantity="ThermodynamicTemperature")=322.15 + "Cooling setpoint when window is open" + annotation (Dialog(tab="Adjust temperature setpoint", group="Limits")); + + parameter Real TZonHeaSetWinOpe( + final unit="K", + displayUnit="degC", + final quantity="ThermodynamicTemperature")=277.15 + "Heating setpoint when window is open" + annotation (Dialog(tab="Adjust temperature setpoint", group="Limits")); + + parameter Real incTSetDem_1=0.56 + "Cooling setpoint increase value (degC) when cooling demand limit level 1 is imposed" + annotation (Dialog(tab="Adjust temperature setpoint", group="Demand control adjustment")); + + parameter Real incTSetDem_2=1.1 + "Cooling setpoint increase value (degC) when cooling demand limit level 2 is imposed" + annotation (Dialog(tab="Adjust temperature setpoint", group="Demand control adjustment")); + + parameter Real incTSetDem_3=2.2 + "Cooling setpoint increase value (degC) when cooling demand limit level 3 is imposed" + annotation (Dialog(tab="Adjust temperature setpoint", group="Demand control adjustment")); + + parameter Real decTSetDem_1=0.56 + "Heating setpoint decrease value (degC) when heating demand limit level 1 is imposed" + annotation (Dialog(tab="Adjust temperature setpoint", group="Demand control adjustment")); + + parameter Real decTSetDem_2=1.1 + "Heating setpoint decrease value (degC) when heating demand limit level 2 is imposed" + annotation (Dialog(tab="Adjust temperature setpoint", group="Demand control adjustment")); + + parameter Real decTSetDem_3=2.2 + "Heating setpoint decrease value (degC) when heating demand limit level 3 is imposed" + annotation (Dialog(tab="Adjust temperature setpoint", group="Demand control adjustment")); + + parameter Real uLow=-0.1 + "Low limit of the hysteresis for checking temperature difference" + annotation (Dialog(tab="Advanced")); + + parameter Real uHigh=0.1 + "High limit of the hysteresis for checking temperature difference" + annotation (Dialog(tab="Advanced")); + + + parameter Real deaHysLim=0.01 + "Hysteresis limits for cooling and heating loop signals for deadband mode transitions" + annotation (Dialog(tab="Advanced")); + + + Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uOcc + "Current occupancy period, true if it is in occupant period" + annotation (Placement(transformation(extent={{-240,100},{-200,140}}), + iconTransformation(extent={{-240,20},{-200,60}}))); + + Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uWin if have_winSen + "Window status, true if open, false if closed" + annotation (Placement(transformation(extent={{-240,-160},{-200,-120}}), + iconTransformation(extent={{-240,-220},{-200,-180}}))); + + Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uFan + "Fan proven on signal" annotation (Placement( + transformation(extent={{-240,-120},{-200,-80}}), iconTransformation( + extent={{-240,-140},{-200,-100}}))); + + Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uCooDemLimLev + "Cooling demand limit level" + annotation (Placement(transformation(extent={{-240,50},{-200,90}}), + iconTransformation(extent={{-240,-20},{-200,20}}))); + + Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uHeaDemLimLev + "Heating demand limit level" + annotation (Placement(transformation(extent={{-240,20},{-200,60}}), + iconTransformation(extent={{-240,-60},{-200,-20}}))); + + Buildings.Controls.OBC.CDL.Interfaces.RealInput warUpTim( + final unit="s", + final quantity="Time") + "Warm-up time retrieved from optimal warm-up block" + annotation (Placement(transformation(extent={{-240,170},{-200,210}}), + iconTransformation(extent={{-240,180},{-200,220}}))); + + Buildings.Controls.OBC.CDL.Interfaces.RealInput cooDowTim( + final unit="s", + final quantity="Time") + "Cool-down time retrieved from optimal cool-down block" + annotation (Placement(transformation(extent={{-240,200},{-200,240}}), + iconTransformation(extent={{-240,140},{-200,180}}))); + + Buildings.Controls.OBC.CDL.Interfaces.RealInput tNexOcc + "Time to next occupied period" + annotation (Placement(transformation(extent={{-240,140},{-200,180}}), + iconTransformation(extent={{-240,100},{-200,140}}))); + + Buildings.Controls.OBC.CDL.Interfaces.RealInput TZon( + final unit="K", + displayUnit="degC", + final quantity = + "ThermodynamicTemperature") + "Measured zone temperatures" + annotation (Placement(transformation(extent={{-240,-40},{-200,0}}), + iconTransformation(extent={{-240,60},{-200,100}}))); + + + Buildings.Controls.OBC.CDL.Interfaces.RealInput TSup( + final unit="K", + displayUnit="degC", + final quantity = + "ThermodynamicTemperature") + "Measured supply air temperature" + annotation (Placement(transformation(extent={{-240,-10},{-200,30}}), + iconTransformation(extent={{-240,-100},{-200,-60}}))); + + Buildings.Controls.OBC.CDL.Interfaces.RealInput nOcc(final unit="1") if + have_occSen + "Number of occupants" + annotation (Placement(transformation(extent={{-240,-80},{-200,-40}}), + iconTransformation(extent={{-240,-180},{-200,-140}}))); + + Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yFan + "Fan enable signal" + annotation (Placement(transformation(extent={{200,180},{240,220}}), + iconTransformation(extent={{200,100},{240,140}}))); + + Buildings.Controls.OBC.CDL.Interfaces.RealOutput TAirSup( + final unit="K", + displayUnit="degC", + final quantity = + "ThermodynamicTemperature") + "Supply air temperature setpoint" + annotation (Placement(transformation(extent={{200,-40},{240,0}}), + iconTransformation(extent={{200,-140},{240,-100}}))); + + Buildings.Controls.OBC.CDL.Interfaces.RealOutput yFanSpe( + final min=0, + final max=1, + final unit="1") + "Fan speed signal" annotation (Placement(transformation( + extent={{200,140},{240,180}}), iconTransformation(extent={{200,60},{240, + 100}}))); + + Buildings.Controls.OBC.CDL.Interfaces.RealOutput TZonHeaSet( + final unit="K", + displayUnit="degC", + final quantity = + "ThermodynamicTemperature") + "Heating setpoint temperature" + annotation (Placement(transformation(extent={{200,100},{240,140}}), + iconTransformation(extent={{200,20},{240,60}}))); + + Buildings.Controls.OBC.CDL.Interfaces.RealOutput TZonCooSet( + final unit="K", + displayUnit="degC", + final quantity = + "ThermodynamicTemperature") + "Cooling setpoint temperature" + annotation (Placement(transformation(extent={{200,60},{240,100}}), + iconTransformation(extent={{200,-20},{240,20}}))); + + Buildings.Controls.OBC.CDL.Interfaces.RealOutput yCooCoi( + final min=0, + final max=1, + final unit="1") if have_coolingCoil + "Cooling coil control signal" + annotation (Placement(transformation(extent={{200,-80},{240,-40}}), + iconTransformation(extent={{200,-100},{240,-60}}))); + + Buildings.Controls.OBC.CDL.Interfaces.RealOutput yHeaCoi( + final min=0, + final max=1, + final unit="1") if have_heatingCoil + "Heating coil control signal" + annotation (Placement(transformation(extent={{200,0},{240,40}}), + iconTransformation(extent={{200,-60},{240,-20}}))); + + + Buildings.Controls.OBC.ASHRAE.G36_PR1.AHUs.SingleZone.VAV.SetPoints.ModeAndSetPoints + modSetPoi( + final have_winSen=have_winSen, + final have_occSen=have_occSen, + final THeaSetOcc=TZonHeaOn, + final THeaSetUno=TZonHeaOff, + final TCooSetOcc=TZonCooOn, + final TCooSetUno=TZonCooOff, + final cooAdj=cooAdj, + final heaAdj=heaAdj, + final sinAdj=sinAdj, + final ignDemLim=ignDemLim, + final TZonCooOnMax=TZonCooOnMax, + final TZonCooOnMin=TZonCooOnMin, + final TZonHeaOnMax=TZonHeaOnMax, + final TZonHeaOnMin=TZonHeaOnMin, + final TZonCooSetWinOpe=TZonCooSetWinOpe, + final TZonHeaSetWinOpe=TZonHeaSetWinOpe, + final incTSetDem_1=incTSetDem_1, + final incTSetDem_2=incTSetDem_2, + final incTSetDem_3=incTSetDem_3, + final decTSetDem_1=decTSetDem_1, + final decTSetDem_2=decTSetDem_2, + final decTSetDem_3=decTSetDem_3, + final uLow=uLow, + final uHigh=uHigh) + "Zone setpoint and operation mode" + annotation (Placement(transformation(extent={{-140,150},{-120,170}}))); + + Buildings.Controls.OBC.CDL.Continuous.PIDWithReset cooPI( + final reverseActing=false, + final controllerType=controllerTypeCoo, + final k=kCoo, + final Ti=TiCoo, + final Td=TdCoo) + "Zone cooling control signal" + annotation (Placement(transformation(extent={{-40,150},{-20,170}}))); + + Buildings.Controls.OBC.CDL.Continuous.PIDWithReset heaPI( + final controllerType=controllerTypeHea, + final k=kHea, + final Ti=TiHea, + final Td=TdHea) + "Zone heating control signal" + annotation (Placement(transformation(extent={{-80,210},{-60,230}}))); + + Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt( + final k=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.unoccupied) + "Unoccupied mode" + annotation (Placement(transformation(extent={{-160,-180},{-140,-160}}))); + + Buildings.Controls.OBC.CDL.Integers.Equal intEqu + "Check if current operation mode is unoccupied mode" + annotation (Placement(transformation(extent={{-100,-180},{-80,-160}}))); + + Buildings.Controls.OBC.CDL.Logical.Not switch + "If in unoccupied mode, switch off" + annotation (Placement(transformation(extent={{-70,-180},{-50,-160}}))); + + Buildings.Controls.OBC.CDL.Logical.Sources.Constant win( + final k=false) if not have_winSen + "Window status" + annotation (Placement(transformation(extent={{-180,-50},{-160,-30}}))); + + Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold havOcc( + final t=0.5) if have_occSen + "Check if there is occupant" + annotation (Placement(transformation(extent={{-100,50},{-80,70}}))); + + Subsequences.SupplyAirTemperature TSupAir(have_coolingCoil=have_coolingCoil, + have_heatingCoil=have_heatingCoil, + THeaSupAirHi=TSupSetMax, + heaPerMax=heaPerMin, + TCooSupAirHi=TSupSetMin, + cooPerMax=cooPerMin, + heaDea=heaDea, + cooDea=cooDea, + controllerTypeCooCoi=controllerTypeCooCoi, + kCooCoi=kCooCoi, + TiCooCoi=TiCooCoi, + TdCooCoi=TdCooCoi, + controllerTypeHeaCoi=controllerTypeHeaCoi, + kHeaCoi=kHeaCoi, + TiHeaCoi=TiHeaCoi, + TdHeaCoi=TdHeaCoi, + deaHysLim=deaHysLim) + annotation (Placement(transformation(extent={{100,0},{120,20}}))); + + Subsequences.FanSpeed fanSpe(have_coolingCoil=have_coolingCoil, + have_heatingCoil=have_heatingCoil, + deaSpe=deaSpe, + heaSpeMin=heaSpeMin, + heaPerMin=heaPerMin, + heaSpeMax=heaSpeMax, + heaPerMax=heaPerMaxFanSpe, + cooSpeMin=cooSpeMin, + cooPerMin=cooPerMin, + cooSpeMax=cooSpeMax, + cooPerMax=cooPerMaxFanSpe, + heaDea=heaDea, + cooDea=cooDea, + deaHysLim=deaHysLim) + annotation (Placement(transformation(extent={{120,170},{140,190}}))); + + + + + +equation + connect(conInt.y, intEqu.u2) annotation (Line(points={{-138,-170},{-120,-170}, + {-120,-178},{-102,-178}},color={255,127,0})); + + connect(intEqu.y, switch.u) annotation (Line(points={{-78,-170},{-72,-170}}, color={255,0,255})); + + connect(TZon, cooPI.u_m) annotation (Line(points={{-220,-20},{-30,-20},{-30,148}}, + color={0,0,127})); + + connect(switch.y, heaPI.trigger) annotation (Line(points={{-48,-170},{-36,-170}, + {-36,84},{-76,84},{-76,208}}, color={255,0,255})); + + connect(switch.y, cooPI.trigger) annotation (Line(points={{-48,-170},{-36,-170}, + {-36,148}}, color={255,0,255})); + + connect(TZon, heaPI.u_m) annotation (Line(points={{-220,-20},{-70,-20},{-70,208}}, + color={0,0,127})); + + connect(modSetPoi.TZonHeaSet, heaPI.u_s) annotation (Line(points={{-118,152},{ + -100,152},{-100,220},{-82,220}}, color={0,0,127})); + + connect(modSetPoi.TZonHeaSet, TZonHeaSet) annotation (Line(points={{-118,152}, + {-100,152},{-100,120},{220,120}}, color={0,0,127})); + + connect(modSetPoi.TZonCooSet, cooPI.u_s) annotation (Line(points={{-118,160}, + {-42,160}},color={0,0,127})); + + connect(modSetPoi.TZonCooSet, TZonCooSet) annotation (Line(points={{-118,160}, + {-50,160},{-50,80},{220,80}}, color={0,0,127})); + + connect(TZon, modSetPoi.TZon) annotation (Line(points={{-220,-20},{-168,-20},{ + -168,164},{-142,164}}, color={0,0,127})); + + connect(tNexOcc, modSetPoi.tNexOcc) annotation (Line(points={{-220,160},{-142, + 160}}, color={0,0,127})); + + connect(uOcc, modSetPoi.uOcc) annotation (Line(points={{-220,120},{-174,120},{ + -174,162},{-142,162}}, color={255,0,255})); + + connect(modSetPoi.yOpeMod, intEqu.u1) annotation (Line(points={{-118,168},{-110, + 168},{-110,-170},{-102,-170}}, color={255,127,0})); + + connect(win.y, modSetPoi.uWin) annotation (Line(points={{-158,-40},{-150,-40}, + {-150,166},{-142,166}}, color={255,0,255})); + + connect(uWin, modSetPoi.uWin) annotation (Line(points={{-220,-140},{-150,-140}, + {-150,166},{-142,166}},color={255,0,255})); + + connect(nOcc, havOcc.u) annotation (Line(points={{-220,-60},{-120,-60},{-120,60}, + {-102,60}}, color={0,0,127})); + + connect(havOcc.y, modSetPoi.uOccSen) annotation (Line(points={{-78,60},{-60,60}, + {-60,112},{-180,112},{-180,154},{-142,154}}, color={255,0,255})); + + connect(modSetPoi.warUpTim, warUpTim) annotation (Line(points={{-142,168},{-180, + 168},{-180,190},{-220,190}}, color={0,0,127})); + + connect(modSetPoi.cooDowTim, cooDowTim) annotation (Line(points={{-142,170},{-174, + 170},{-174,220},{-220,220}}, color={0,0,127})); + + connect(modSetPoi.uCooDemLimLev, uCooDemLimLev) annotation (Line(points={{-142, + 152},{-162,152},{-162,70},{-220,70}}, color={255,127,0})); + + connect(modSetPoi.uHeaDemLimLev, uHeaDemLimLev) annotation (Line(points={{-142, + 150},{-156,150},{-156,40},{-220,40}}, color={255,127,0})); + + connect(TSupAir.yCooCoi, yCooCoi) annotation (Line(points={{122,4},{160,4},{160, + -60},{220,-60}}, color={0,0,127})); + + connect(TSupAir.yHeaCoi, yHeaCoi) annotation (Line(points={{122,16},{160,16},{ + 160,20},{220,20}}, color={0,0,127})); + + connect(TSupAir.TAirSupSet, TAirSup) annotation (Line(points={{122,10},{180,10}, + {180,-20},{220,-20}}, color={0,0,127})); + + connect(fanSpe.yFanSpe, yFanSpe) annotation (Line(points={{142,178},{160,178}, + {160,160},{220,160}}, color={0,0,127})); + + connect(fanSpe.yFan, yFan) annotation (Line(points={{142,182},{160,182},{160,200}, + {220,200}}, color={255,0,255})); + + connect(modSetPoi.yOpeMod, fanSpe.opeMod) annotation (Line(points={{-118,168}, + {-60,168},{-60,180},{20,180},{20,188},{118,188}}, color={255,127,0})); + + connect(TSup, TSupAir.TAirSup) annotation (Line(points={{-220,10},{98,10}}, + color={0,0,127})); + + connect(uFan, fanSpe.uFanPro) annotation (Line(points={{-220,-100},{28,-100},{ + 28,184},{118,184}}, color={255,0,255})); + + connect(heaPI.y, fanSpe.uHea) annotation (Line(points={{-58,220},{0,220},{0,178}, + {118,178}}, color={0,0,127})); + + connect(cooPI.y, fanSpe.uCoo) annotation (Line(points={{-18,160},{20,160},{20, + 174},{118,174}}, color={0,0,127})); + + connect(modSetPoi.TZonCooSet, TSupAir.TZonSetCoo) annotation (Line(points={{-118, + 160},{-50,160},{-50,2},{98,2}}, color={0,0,127})); + + connect(modSetPoi.TZonHeaSet, TSupAir.TZonSetHea) annotation (Line(points={{-118, + 152},{-54,152},{-54,18},{98,18}}, color={0,0,127})); + + connect(cooPI.y, TSupAir.uCoo) annotation (Line(points={{-18,160},{20,160},{20, + 6},{98,6}}, color={0,0,127})); + + connect(heaPI.y, TSupAir.uHea) annotation (Line(points={{-58,220},{0,220},{0,14}, + {98,14}}, color={0,0,127})); + + connect(TZonHeaSet, TZonHeaSet) + annotation (Line(points={{220,120},{220,120}}, color={0,0,127})); + +annotation (defaultComponentName="conFCU", + Icon(coordinateSystem(preserveAspectRatio=false, extent={{-200,-220},{200,220}}), + graphics={Rectangle( + extent={{-200,-220},{200,220}}, + lineColor={0,0,127}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), + Text( + extent={{-210,300},{210,220}}, + textString="%name", + textColor={0,0,255}), + Text( + extent={{-198,136},{-136,108}}, + textColor={0,0,127}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid, + textString="tNexOcc"), + Text( + extent={{-200,92},{-156,72}}, + textColor={0,0,127}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid, + textString="TZon"), + Text( + extent={{-200,52},{-154,32}}, + textColor={255,0,255}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid, + textString="uOcc"), + Text( + extent={{-200,-68},{-152,-90}}, + textColor={0,0,127}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid, + textString="TSup"), + Text( + visible=have_occSen, + extent={{-196,-172},{-150,-144}}, + textColor={0,0,127}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid, + textString="nOcc"), + Text( + visible=have_winSen, + extent={{-196,-186},{-152,-208}}, + textColor={255,0,255}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid, + textString="uWin"), + Text( + extent={{132,-102},{198,-136}}, + textColor={0,0,127}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid, + textString="TAirSup"), + Text( + extent={{150,96},{198,72}}, + textColor={0,0,127}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid, + textString="yFanSpe"), + Text( + extent={{118,56},{196,22}}, + textColor={0,0,127}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid, + textString="TZonHeaSet"), + Text( + extent={{118,18},{198,-20}}, + textColor={0,0,127}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid, + textString="TZonCooSet"), + Text( + extent={{144,-20},{198,-58}}, + textColor={0,0,127}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid, + textString="yHeaCoi"), + Text( + extent={{144,-60},{198,-98}}, + textColor={0,0,127}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid, + textString="yCooCoi"), + Text( + extent={{-196,218},{-122,186}}, + textColor={0,0,127}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid, + textString="warUpTim"), + Text( + extent={{-196,178},{-116,146}}, + textColor={0,0,127}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid, + textString="cooDowTim"), + Text( + extent={{-196,14},{-84,-8}}, + textColor={255,127,0}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid, + textString="uCooDemLimLev"), + Text( + extent={{-196,-28},{-84,-50}}, + textColor={255,127,0}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid, + textString="uHeaDemLimLev"), + Text( + extent={{-200,-110},{-154,-130}}, + textColor={255,0,255}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid, + textString="uFan"), + Text( + extent={{158,134},{202,112}}, + textColor={255,0,255}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid, + textString="yFan")}), + Diagram(coordinateSystem( + preserveAspectRatio=false, extent={{-200,-200},{200,240}})), +Documentation(info=" +

+Block for single zone VAV control. It outputs supply fan speed, supply air temperature +setpoints for heating, economizer and cooling, zone air heating and cooling setpoints, +outdoor and return air damper positions, and valve positions of heating and cooling coils. +

+

+It is implemented according to the ASHRAE Guideline 36, Part 5.18. +

+

+The sequences consist of the following subsequences. +

+

Supply fan speed control

+

+The fan speed control is implemented according to PART 5.18.4. It outputs +the control signal yFan to adjust the speed of the supply fan. +See + +Buildings.Controls.OBC.ASHRAE.G36_PR1.AHUs.SingleZone.VAV.SetPoints.Supply +for more detailed description. +

+

Supply air temperature setpoints

+

+The supply air temperature setpoints control sequences are implemented based on PART 5.18.4. +They are implemented in the same control block as the supply fan speed control. The supply air temperature setpoint +for heating and economizer is the same; + + while the supply air temperature setpoint for cooling has +a separate control loop. See + +Buildings.Controls.OBC.ASHRAE.G36_PR1.AHUs.SingleZone.VAV.SetPoints.Supply +for more detailed description. +

+

Economizer control

+

+The Economizer control block outputs outdoor and return air damper position, i.e. yOutDamPos and +yRetDamPos, as well as control signal for heating coil yHeaCoi. +Optionally, there is also an override for freeze protection, which is not part of Guideline 36. +See + +Buildings.Controls.OBC.ASHRAE.G36_PR1.AHUs.SingleZone.VAV.Economizers.Controller +for more detailed description. +

+

Minimum outdoor airflow

+

+Control sequences are implemented to compute the minimum outdoor airflow +setpoint, which is used as an input for the economizer control. More detailed +information can be found at + +Buildings.Controls.OBC.ASHRAE.G36_PR1.AHUs.SingleZone.VAV.SetPoints.OutsideAirFlow. +

+

Zone air heating and cooling setpoints

+

+Zone air heating and cooling setpoints as well as system operation modes are detailed at + +Buildings.Controls.OBC.ASHRAE.G36_PR1.AHUs.SingleZone.VAV.SetPoints.ModeAndSetPoints. +

+", +revisions=" +
    +
  • +June 20, 2020, by Jianjun Hu:
    +Updated the block of specifying operating mode and setpoints.
    +This is for #1893. +
  • +
  • +March 10, 2020, by Jianjun Hu:
    +Replaced the block for calculating the operation mode and setpoint temperature with the one +from the terminal unit package. The new block does not have vector-valued calculations.
    +This is for #1709. +
  • +
  • +August 3, 2019, by David Blum & + + Kun Zhang:
    +First implementation. +
  • +
+")); + end Controller; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo index 6e403c4e92a..1421e8fe5a2 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo @@ -1,6 +1,8 @@ within Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences; + block FanSpeed - "Fan speed setpoint subsequence" + + "Fan speed setpoint subsequence" parameter Boolean have_coolingCoil "Does the fan coil unit have a cooling coil?"; @@ -90,142 +92,210 @@ block FanSpeed "Hysteresis limits for deadband mode transitions" annotation(Dialog(tab="Advanced")); - CDL.Interfaces.BooleanInput uFanPro "Fan proven on signal" + Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uFanPro + "Fan proven on signal" annotation (Placement(transformation(extent={{-140,20},{-100,60}}))); - CDL.Interfaces.IntegerInput opeMod "System operating mode" + + Buildings.Controls.OBC.CDL.Interfaces.IntegerInput opeMod + "System operating mode" annotation (Placement(transformation(extent={{-140,60},{-100,100}}))); - CDL.Interfaces.BooleanOutput yFan "Fan enable signal" + + Buildings.Controls.OBC.CDL.Interfaces.RealInput uHea if have_heatingCoil + "Heating loop signal" + annotation (Placement(transformation(extent={{-140,-40},{-100,0}}))); + + Buildings.Controls.OBC.CDL.Interfaces.RealInput uCoo if have_coolingCoil + "Cooling loop signal" + annotation (Placement(transformation(extent={{-140,-120},{-100,-80}}), + iconTransformation(extent={{-140,-80},{-100,-40}}))); + + Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yFan + "Fan enable signal" annotation (Placement(transformation(extent={{120,20},{160,60}}), iconTransformation(extent={{100,0},{140,40}}))); - CDL.Integers.Equal intEqu "Check if zone is unoccupied" + + Buildings.Controls.OBC.CDL.Interfaces.RealOutput yFanSpe + "Fan speed signal" + annotation (Placement(transformation(extent={{120,-20},{160,20}}), + iconTransformation(extent={{100,-40},{140,0}}))); + + Buildings.Controls.OBC.CDL.Integers.Equal intEqu + "Check if zone is unoccupied" annotation (Placement(transformation(extent={{-40,70},{-20,90}}))); - CDL.Integers.Sources.Constant conInt(k=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.unoccupied) + + Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt(k=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.unoccupied) "Constant unoccupied mode signal" annotation (Placement(transformation(extent={{-80,50},{-60,70}}))); - CDL.Logical.Not not1 "Enable only if zone is not in unoccupied mode" + + Buildings.Controls.OBC.CDL.Logical.Not not1 + "Enable only if zone is not in unoccupied mode" annotation (Placement(transformation(extent={{-10,70},{10,90}}))); - CDL.Continuous.Switch swi + + Buildings.Controls.OBC.CDL.Continuous.Switch swi "Switch fan speed to maximum until the fan is proven ON" annotation (Placement(transformation(extent={{80,-10},{100,10}}))); - CDL.Conversions.BooleanToReal booToRea "Convert fan enable signal to Real" + + Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea + "Convert fan enable signal to Real" annotation (Placement(transformation(extent={{50,-30},{70,-10}}))); - CDL.Interfaces.RealInput uHea if have_heatingCoil - "Heating loop signal" - annotation (Placement(transformation(extent={{-140,-40},{-100,0}}))); - CDL.Interfaces.RealInput uCoo if have_coolingCoil - "Cooling loop signal" - annotation (Placement(transformation(extent={{-140,-120},{-100,-80}}), - iconTransformation(extent={{-140,-80},{-100,-40}}))); - CDL.Continuous.Line lin "Heating fan speed signal" + + Buildings.Controls.OBC.CDL.Continuous.Line lin + "Heating fan speed signal" annotation (Placement(transformation(extent={{-30,-30},{-10,-10}}))); - CDL.Continuous.Sources.Constant con[2](k={heaPerMin,heaPerMax}) + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con[2](k={heaPerMin,heaPerMax}) "Heating loop signal support points" annotation (Placement(transformation(extent={{-80,-50},{-60,-30}}))); - CDL.Continuous.Sources.Constant con1[2](k={heaSpeMin,heaSpeMax}) + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con1[2](k={heaSpeMin,heaSpeMax}) "Heating fan speed limit signals" annotation (Placement(transformation(extent={{-80,-10},{-60,10}}))); - CDL.Continuous.Sources.Constant con2[2](k={cooSpeMin,cooSpeMax}) + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con2[2](k={cooSpeMin,cooSpeMax}) "Cooling fan speed limit signals" annotation (Placement(transformation(extent={{-80,-90},{-60,-70}}))); - CDL.Continuous.Line lin1 "Cooling fan speed signal" + + Buildings.Controls.OBC.CDL.Continuous.Line lin1 + "Cooling fan speed signal" annotation (Placement(transformation(extent={{-30,-110},{-10,-90}}))); - CDL.Continuous.Sources.Constant con3[2](k={cooPerMin,cooPerMax}) + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con3[2](k={cooPerMin,cooPerMax}) "Cooling loop signal support points" annotation (Placement(transformation(extent={{-80,-130},{-60,-110}}))); - CDL.Continuous.Sources.Constant con4(k=deaSpe) + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con4(k=deaSpe) "Deadband mode fan speed signal" annotation (Placement(transformation(extent={{-30,-70},{-10,-50}}))); - CDL.Continuous.Hysteresis hys(uLow=heaDea - deaHysLim, uHigh=heaDea) + + Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys(uLow=heaDea - deaHysLim, uHigh=heaDea) "Hysteresis for switching between deadband mode and heating mode" annotation (Placement(transformation(extent={{0,-50},{20,-30}}))); - CDL.Continuous.Switch swi1 + + Buildings.Controls.OBC.CDL.Continuous.Switch swi1 "Switch for turning on heating mode from deadband mode" annotation (Placement(transformation(extent={{30,-70},{50,-50}}))); - CDL.Continuous.Hysteresis hys1(uLow=cooDea - deaHysLim, uHigh=cooDea) + + Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys1(uLow=cooDea - deaHysLim, uHigh=cooDea) "Hysteresis for switching on cooling mode from deadband mode" annotation (Placement(transformation(extent={{0,-90},{20,-70}}))); - CDL.Continuous.Switch swi2 + + Buildings.Controls.OBC.CDL.Continuous.Switch swi2 "Switch for turning on cooling mode from deadband mode" annotation (Placement(transformation(extent={{60,-110},{80,-90}}))); - CDL.Continuous.Multiply mul "Multiply fan speed signal by fan enable signal" + + Buildings.Controls.OBC.CDL.Continuous.Multiply mul + "Multiply fan speed signal by fan enable signal" annotation (Placement(transformation(extent={{90,-50},{110,-30}}))); - CDL.Interfaces.RealOutput yFanSpe "Fan speed signal" - annotation (Placement(transformation(extent={{120,-20},{160,20}}), - iconTransformation(extent={{100,-40},{140,0}}))); - CDL.Continuous.Sources.Constant con6(k=0) if not have_heatingCoil + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con6(k=0) if not have_heatingCoil "Constant zero signal" annotation (Placement(transformation(extent={{-50,10},{-30,30}}))); - CDL.Continuous.Sources.Constant con8(k=0) if not have_coolingCoil + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con8(k=0) if not have_coolingCoil "Constant zero signal" annotation (Placement(transformation(extent={{-40,-140},{-20,-120}}))); + equation connect(conInt.y, intEqu.u2) annotation (Line(points={{-58,60},{-50,60},{-50, 72},{-42,72}}, color={255,127,0})); + connect(opeMod, intEqu.u1) annotation (Line(points={{-120,80},{-42,80}}, color={255,127,0})); + connect(intEqu.y, not1.u) annotation (Line(points={{-18,80},{-12,80}}, color={255,0,255})); + connect(not1.y, yFan) annotation (Line(points={{12,80},{40,80},{40,40},{140, 40}}, color={255,0,255})); + connect(uFanPro, swi.u2) annotation (Line(points={{-120,40},{30,40},{30,0},{ 78,0}}, color={255,0,255})); + connect(not1.y, booToRea.u) annotation (Line(points={{12,80},{40,80},{40,-20}, {48,-20}}, color={255,0,255})); + connect(booToRea.y, swi.u3) annotation (Line(points={{72,-20},{74,-20},{74,-8}, {78,-8}}, color={0,0,127})); + connect(uHea, lin.u) annotation (Line(points={{-120,-20},{-32,-20}}, color={0,0,127})); + connect(con[1].y, lin.x1) annotation (Line(points={{-58,-40},{-50,-40},{-50, -12},{-32,-12}}, color={0,0,127})); + connect(con[2].y, lin.x2) annotation (Line(points={{-58,-40},{-50,-40},{-50, -24},{-32,-24}}, color={0,0,127})); + connect(con1[1].y, lin.f1) annotation (Line(points={{-58,0},{-40,0},{-40,-16}, {-32,-16}}, color={0,0,127})); + connect(con1[2].y, lin.f2) annotation (Line(points={{-58,0},{-40,0},{-40,-28}, {-32,-28}}, color={0,0,127})); + connect(con3[2].y, lin1.x2) annotation (Line(points={{-58,-120},{-50,-120},{ -50,-104},{-32,-104}}, color={0,0,127})); + connect(con3[1].y, lin1.x1) annotation (Line(points={{-58,-120},{-50,-120},{ -50,-92},{-32,-92}}, color={0,0,127})); + connect(con2[2].y, lin1.f2) annotation (Line(points={{-58,-80},{-40,-80},{-40, -108},{-32,-108}}, color={0,0,127})); + connect(con2[1].y, lin1.f1) annotation (Line(points={{-58,-80},{-40,-80},{-40, -96},{-32,-96}}, color={0,0,127})); + connect(uCoo, lin1.u) annotation (Line(points={{-120,-100},{-32,-100}}, color={0,0,127})); + connect(uHea, hys.u) annotation (Line(points={{-120,-20},{-44,-20},{-44,-40}, {-2,-40}}, color={0,0,127})); + connect(hys.y, swi1.u2) annotation (Line(points={{22,-40},{26,-40},{26,-60},{ 28,-60}}, color={255,0,255})); + connect(con4.y, swi1.u3) annotation (Line(points={{-8,-60},{20,-60},{20,-68}, {28,-68}}, color={0,0,127})); + connect(lin.y, swi1.u1) annotation (Line(points={{-8,-20},{-4,-20},{-4,-52},{ 28,-52}}, color={0,0,127})); + connect(hys1.y, swi2.u2) annotation (Line(points={{22,-80},{26,-80},{26,-100}, {58,-100}}, color={255,0,255})); + connect(uCoo, hys1.u) annotation (Line(points={{-120,-100},{-44,-100},{-44,-84}, {-20,-84},{-20,-80},{-2,-80}}, color={0,0,127})); + connect(lin1.y, swi2.u1) annotation (Line(points={{-8,-100},{20,-100},{20,-92}, {58,-92}}, color={0,0,127})); + connect(swi1.y, swi2.u3) annotation (Line(points={{52,-60},{54,-60},{54,-108}, {58,-108}}, color={0,0,127})); + connect(booToRea.y, mul.u1) annotation (Line(points={{72,-20},{74,-20},{74, -34},{88,-34}}, color={0,0,127})); + connect(swi2.y, mul.u2) annotation (Line(points={{82,-100},{84,-100},{84,-46}, {88,-46}}, color={0,0,127})); + connect(mul.y, swi.u1) annotation (Line(points={{112,-40},{114,-40},{114,20}, {74,20},{74,8},{78,8}}, color={0,0,127})); + connect(swi.y, yFanSpe) annotation (Line(points={{102,0},{140,0}}, color={0,0,127})); + connect(con6.y, lin.u) annotation (Line(points={{-28,20},{-20,20},{-20,4},{ -44,4},{-44,-20},{-32,-20}}, color={0,0,127})); + connect(con8.y, lin1.u) annotation (Line(points={{-18,-130},{-10,-130},{-10, -114},{-44,-114},{-44,-100},{-32,-100}}, color={0,0,127})); + connect(con6.y, hys.u) annotation (Line(points={{-28,20},{-20,20},{-20,4},{ -44,4},{-44,-40},{-2,-40}}, color={0,0,127})); + connect(con8.y, hys1.u) annotation (Line(points={{-18,-130},{-10,-130},{-10, -114},{-44,-114},{-44,-84},{-20,-84},{-20,-80},{-2,-80}}, color={0,0, 127})); + annotation (defaultComponentName="fanSpe", Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, -100},{100,100}}), graphics={ @@ -240,4 +310,5 @@ equation textString="%name")}), Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-140},{120,100}}))); + end FanSpeed; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/SupplyAirTemperature.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/SupplyAirTemperature.mo index bcffdb3e663..37940a4fe93 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/SupplyAirTemperature.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/SupplyAirTemperature.mo @@ -1,6 +1,8 @@ within Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences; + block SupplyAirTemperature - "Subsequence for calculating supply air temperature setpoint" + + "Subsequence for calculating supply air temperature setpoint" parameter Boolean have_coolingCoil "Does the fan coil unit have a cooling coil?"; @@ -8,17 +10,10 @@ block SupplyAirTemperature parameter Boolean have_heatingCoil "Does the fan coil unit have a heating coil?"; -// parameter Real THeaSupAirLow( -// final unit="K", -// displayUnit="degC") = 273.15 + 21 -// "Supply air temperature setpoint at minimum heating loop signal" -// annotation(Dialog(group="Heating loop parameters", -// enable = have_heatingCoil)); - parameter Real heaPerMin( final unit="1", displayUnit="1") = heaDea - "Minimum heating loop signal at which fan speed is modified" + "Minimum heating loop signal at which supply air temperature is modified" annotation(Dialog(group="Heating loop parameters", enable = have_heatingCoil)); @@ -32,21 +27,14 @@ block SupplyAirTemperature parameter Real heaPerMax( final unit="1", displayUnit="1") = 0.5 - "Maximum heating loop signal at which fan speed is modified" + "Maximum heating loop signal at which supply air temperature is modified" annotation(Dialog(group="Heating loop parameters", enable = have_heatingCoil)); -// parameter Real TCooSupAirLow( -// final unit="K", -// displayUnit="degC") = 273.15+25 -// "Supply air temperature setpoint at minimum cooling loop signal" -// annotation(Dialog(group="Cooling loop parameters", -// enable = have_coolingCoil)); - parameter Real cooPerMin( final unit="1", displayUnit="1") = cooDea - "Minimum cooling loop signal at which fan speed is modified" + "Minimum cooling loop signal at which supply air temperature is modified" annotation(Dialog(group="Cooling loop parameters", enable = have_coolingCoil)); @@ -60,7 +48,7 @@ block SupplyAirTemperature parameter Real cooPerMax( final unit="1", displayUnit="1") = 0.5 - "Maximum cooling loop signal at which fan speed is modified" + "Maximum cooling loop signal at which supply air temperature is modified" annotation(Dialog(group="Cooling loop parameters", enable = have_coolingCoil)); @@ -78,164 +66,304 @@ block SupplyAirTemperature annotation(Dialog(group="Transition parameters", enable = have_coolingCoil)); + parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerTypeCooCoi=Buildings.Controls.OBC.CDL.Types.SimpleController.PI + "Controller type" + annotation(Dialog(tab="PID controller parameters", group="Cooling coil")); + + parameter Real kCooCoi( + final unit="1", + displayUnit="1")=1 + "Controller gain" + annotation(Dialog(tab="PID controller parameters", group="Cooling coil")); + + parameter Real TiCooCoi( + final unit="s", + displayUnit="s", + final quantity="time")=0.5 + "Integrator time constant" + annotation(Dialog(tab="PID controller parameters", group="Cooling coil", + enable = controllerTypeCooCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PI or + controllerTypeCooCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PID)); + + parameter Real TdCooCoi( + final unit="s", + displayUnit="s", + final quantity="time")=0.1 + "Derivative block time constant" + annotation(Dialog(tab="PID controller parameters", group="Cooling coil", + enable = controllerTypeCooCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PD or + controllerTypeCooCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PID)); + + parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerTypeHeaCoi=Buildings.Controls.OBC.CDL.Types.SimpleController.PI + "Controller type" + annotation(Dialog(tab="PID controller parameters", group="Heating coil")); + + parameter Real kHeaCoi( + final unit="1", + displayUnit="1")=1 + "Controller gain" + annotation(Dialog(tab="PID controller parameters", group="Heating coil")); + + parameter Real TiHeaCoi( + final unit="s", + displayUnit="s", + final quantity="time")=0.5 + "Integrator block time constant" + annotation(Dialog(tab="PID controller parameters", group="Heating coil", + enable = controllerTypeHeaCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PI or + controllerTypeHeaCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PID)); + + parameter Real TdHeaCoi( + final unit="s", + displayUnit="s", + final quantity="time")=0.1 + "Derivative block time constant" + annotation(Dialog(tab="PID controller parameters", group="Heating coil", + enable = controllerTypeHeaCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PD or + controllerTypeHeaCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PID)); + + parameter Real deaHysLim( final unit="1", displayUnit="1") = 0.01 "Hysteresis limits for deadband mode transitions" annotation(Dialog(tab="Advanced")); - CDL.Interfaces.RealInput uHea if have_heatingCoil "Heating loop signal" + Buildings.Controls.OBC.CDL.Interfaces.RealInput uHea if have_heatingCoil + "Heating loop signal" annotation (Placement(transformation(extent={{-140,20},{-100,60}}), iconTransformation(extent={{-140,20},{-100,60}}))); - CDL.Interfaces.RealInput uCoo if have_coolingCoil "Cooling loop signal" + + Buildings.Controls.OBC.CDL.Interfaces.RealInput uCoo if have_coolingCoil + "Cooling loop signal" annotation (Placement(transformation(extent={{-140,-60},{-100,-20}}), iconTransformation(extent={{-140,-60},{-100,-20}}))); - CDL.Interfaces.RealInput TAirSup + + Buildings.Controls.OBC.CDL.Interfaces.RealInput TAirSup "Measured supply air temperature" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); - CDL.Interfaces.RealOutput yHeaCoi if have_heatingCoil - "Heating coil signal" + + Buildings.Controls.OBC.CDL.Interfaces.RealInput TZonSetHea if + have_heatingCoil + "Zone heating temperature setpoint" annotation (Placement(transformation( + extent={{-140,60},{-100,100}}), iconTransformation(extent={{-140,60},{ + -100,100}}))); + + Buildings.Controls.OBC.CDL.Interfaces.RealInput TZonSetCoo if + have_coolingCoil + "Zone cooling temperature setpoint" annotation (Placement(transformation( + extent={{-140,-120},{-100,-80}}), iconTransformation(extent={{-140,-100}, + {-100,-60}}))); + + Buildings.Controls.OBC.CDL.Interfaces.RealOutput yHeaCoi if have_heatingCoil + "Heating coil signal" annotation (Placement(transformation(extent={{100,40},{140,80}}))); - CDL.Interfaces.RealOutput yCooCoi if have_coolingCoil + + Buildings.Controls.OBC.CDL.Interfaces.RealOutput yCooCoi if have_coolingCoil "Heating coil signal" annotation (Placement(transformation(extent={{100,-80},{140,-40}}))); - CDL.Continuous.Line lin + + Buildings.Controls.OBC.CDL.Interfaces.RealOutput TAirSupSet + "Supply air temperature setpoint" + annotation (Placement(transformation(extent={{100,-20},{140,20}}))); + + Buildings.Controls.OBC.CDL.Continuous.Line lin "Convert heating loop signal to supply air temperature setpoint" annotation (Placement(transformation(extent={{-40,50},{-20,70}}))); - CDL.Continuous.Line lin1 + + Buildings.Controls.OBC.CDL.Continuous.Line lin1 "Convert cooling loop signal to supply air temperature setpoint" annotation (Placement(transformation(extent={{-40,-70},{-20,-50}}))); - CDL.Continuous.Sources.Constant con1(k=THeaSupAirHi) + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con1(k=THeaSupAirHi) "Heating supply air temperature setpoint limit signals" annotation (Placement(transformation(extent={{-90,90},{-70,110}}))); - CDL.Continuous.Sources.Constant con2 + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con2 [2](k={heaPerMin,heaPerMax}) "Heating loop signal support points" annotation (Placement(transformation(extent={{-80,10},{-60,30}}))); - CDL.Continuous.Sources.Constant con3(k=TCooSupAirHi) + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con3(k=TCooSupAirHi) "Cooling supply air temperature setpoint limit signals" annotation (Placement(transformation(extent={{-80,-30},{-60,-10}}))); - CDL.Continuous.Sources.Constant con4[2](k={cooPerMin,cooPerMax}) + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con4[2](k={cooPerMin,cooPerMax}) "Cooling loop signal support points" annotation (Placement(transformation(extent={{-80,-90},{-60,-70}}))); - CDL.Continuous.PID conPID + + Buildings.Controls.OBC.CDL.Continuous.PID conPID( + controllerType=controllerTypeHeaCoi, + k=kHeaCoi, + Ti=TiHeaCoi, + Td=TdHeaCoi) annotation (Placement(transformation(extent={{40,50},{60,70}}))); - CDL.Continuous.PID conPID1(reverseActing=false) + + Buildings.Controls.OBC.CDL.Continuous.PID conPID1( + controllerType=controllerTypeCooCoi, + k=kCooCoi, + Ti=TiCooCoi, + Td=TdCooCoi, reverseActing=false) annotation (Placement(transformation(extent={{60,-70},{80,-50}}))); - CDL.Continuous.Hysteresis hys(uLow=heaDea - deaHysLim, uHigh=heaDea) + + Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys(uLow=heaDea - deaHysLim, uHigh=heaDea) "Hysteresis for switching between deadband mode and heating mode" annotation (Placement(transformation(extent={{-20,90},{0,110}}))); - CDL.Continuous.Sources.Constant con6(k=0) if not have_heatingCoil + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con6(k=0) if not have_heatingCoil "Constant zero signal" annotation (Placement(transformation(extent={{-50,90},{-30,110}}))); - CDL.Continuous.Switch swi1 + + Buildings.Controls.OBC.CDL.Continuous.Switch swi1 "Switch for turning on heating mode from deadband mode" annotation (Placement(transformation(extent={{0,50},{20,70}}))); - CDL.Continuous.Switch swi2 + + Buildings.Controls.OBC.CDL.Continuous.Switch swi2 "Switch for turning on cooling mode from deadband mode" annotation (Placement(transformation(extent={{20,-30},{40,-10}}))); - CDL.Continuous.Hysteresis hys1(uLow=cooDea - deaHysLim, uHigh=cooDea) + + Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys1(uLow=cooDea - deaHysLim, uHigh=cooDea) "Hysteresis for switching on cooling mode from deadband mode" annotation (Placement(transformation(extent={{-20,-30},{0,-10}}))); - CDL.Continuous.Sources.Constant con8(k=0) if not have_coolingCoil + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con8(k=0) if not have_coolingCoil "Constant zero signal" annotation (Placement(transformation(extent={{-20,-110},{0,-90}}))); - CDL.Interfaces.RealInput TZonSetHea if - have_heatingCoil - "Zone heating temperature setpoint" annotation (Placement(transformation( - extent={{-140,60},{-100,100}}), iconTransformation(extent={{-140,60},{ - -100,100}}))); - CDL.Interfaces.RealInput TZonSetCoo if - have_coolingCoil - "Zone cooling temperature setpoint" annotation (Placement(transformation( - extent={{-140,-120},{-100,-80}}), iconTransformation(extent={{-140,-100}, - {-100,-60}}))); - CDL.Conversions.BooleanToReal booToRea "Convert Boolean to Real" + + Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea + "Convert Boolean to Real" annotation (Placement(transformation(extent={{20,90},{40,110}}))); - CDL.Continuous.Multiply mul + + Buildings.Controls.OBC.CDL.Continuous.Multiply mul "Output heating coil signal only when heating mode is enabled" annotation (Placement(transformation(extent={{74,50},{94,70}}))); - CDL.Conversions.BooleanToReal booToRea1 "Convert Boolean to Real" + + Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea1 + "Convert Boolean to Real" annotation (Placement(transformation(extent={{20,-80},{40,-60}}))); - CDL.Continuous.Multiply mul1 + + Buildings.Controls.OBC.CDL.Continuous.Multiply mul1 "Output cooling coil signal only when cooling mode is enabled" annotation (Placement(transformation(extent={{74,-112},{94,-92}}))); + + + equation connect(uHea, lin.u) annotation (Line(points={{-120,40},{-82,40},{-82,60},{-42,60}}, color={0,0,127})); + connect(con2[1].y, lin.x1) annotation (Line(points={{-58,20},{-46,20},{-46,68}, {-42,68}}, color={0,0,127})); + connect(con2[2].y, lin.x2) annotation (Line(points={{-58,20},{-46,20},{-46,56}, {-42,56}}, color={0,0,127})); + connect(uCoo, lin1.u) annotation (Line(points={{-120,-40},{-82,-40},{-82,-60},{-42,-60}}, color={0,0,127})); + connect(con4[1].y, lin1.x1) annotation (Line(points={{-58,-80},{-54,-80},{-54, -52},{-42,-52}}, color={0,0,127})); + connect(con4[2].y, lin1.x2) annotation (Line(points={{-58,-80},{-54,-80},{-54, -64},{-42,-64}}, color={0,0,127})); + connect(TAirSup, conPID.u_m) annotation (Line(points={{-120,0},{50,0},{50,48}}, color={0,0,127})); + connect(TAirSup, conPID1.u_m) annotation (Line(points={{-120,0},{50,0},{50, -78},{70,-78},{70,-72}}, color={0,0,127})); + connect(lin.y, swi1.u1) annotation (Line(points={{-18,60},{-10,60},{-10,68},{ -2,68}}, color={0,0,127})); + connect(con6.y, hys.u) annotation (Line(points={{-28,100},{-22,100}}, color={0,0,127})); + connect(con6.y, lin.u) annotation (Line(points={{-28,100},{-26,100},{-26,76}, {-54,76},{-54,60},{-42,60}}, color={0,0,127})); + connect(uHea, hys.u) annotation (Line(points={{-120,40},{-54,40},{-54,76},{-26, 76},{-26,100},{-22,100}}, color={0,0,127})); + connect(hys.y, swi1.u2) annotation (Line(points={{2,100},{10,100},{10,80},{-6, 80},{-6,60},{-2,60}}, color={255,0,255})); + connect(con8.y, lin1.u) annotation (Line(points={{2,-100},{10,-100},{10,-80},{ -46,-80},{-46,-60},{-42,-60}}, color={0,0,127})); + connect(hys1.y, swi2.u2) annotation (Line(points={{2,-20},{18,-20}}, color={255,0,255})); + connect(uCoo, hys1.u) annotation (Line(points={{-120,-40},{-46,-40},{-46,-20}, {-22,-20}}, color={0,0,127})); + connect(con8.y, hys1.u) annotation (Line(points={{2,-100},{10,-100},{10,-80},{ -46,-80},{-46,-20},{-22,-20}}, color={0,0,127})); + connect(swi1.y, swi2.u3) annotation (Line(points={{22,60},{28,60},{28,40},{10, 40},{10,-28},{18,-28}}, color={0,0,127})); + connect(lin1.y, swi2.u1) annotation (Line(points={{-18,-60},{6,-60},{6,-12},{18, -12}}, color={0,0,127})); - connect(swi2.y, conPID.u_s) annotation (Line(points={{42,-20},{44,-20},{44,40}, + + connect(swi2.y, conPID.u_s) annotation (Line(points={{42,-20},{56,-20},{56,40}, {32,40},{32,60},{38,60}}, color={0,0,127})); - connect(swi2.y, conPID1.u_s) annotation (Line(points={{42,-20},{44,-20},{44,-60}, + + connect(swi2.y, conPID1.u_s) annotation (Line(points={{42,-20},{56,-20},{56,-60}, {58,-60}}, color={0,0,127})); + connect(con1.y, lin.f2) annotation (Line(points={{-68,100},{-60,100},{-60,52}, {-42,52}}, color={0,0,127})); + connect(con3.y, lin1.f2) annotation (Line(points={{-58,-20},{-50,-20},{-50,-68}, {-42,-68}}, color={0,0,127})); + connect(TZonSetHea, lin.f1) annotation (Line(points={{-120,80},{-56,80},{-56,64}, {-42,64}}, color={0,0,127})); + connect(TZonSetCoo, lin1.f1) annotation (Line(points={{-120,-100},{-52,-100},{ -52,-56},{-42,-56}}, color={0,0,127})); + connect(TAirSup, swi1.u3) annotation (Line(points={{-120,0},{-10,0},{-10,52},{ -2,52}}, color={0,0,127})); + connect(con6.y, lin.f1) annotation (Line(points={{-28,100},{-26,100},{-26,76}, {-54,76},{-54,64},{-42,64}}, color={0,0,127})); + connect(con8.y, lin1.f1) annotation (Line(points={{2,-100},{10,-100},{10,-80}, {-46,-80},{-46,-56},{-42,-56}}, color={0,0,127})); + connect(hys.y, booToRea.u) annotation (Line(points={{2,100},{18,100}}, color={255,0,255})); + connect(yHeaCoi, mul.y) annotation (Line(points={{120,60},{96,60}}, color={0,0,127})); + connect(conPID.y, mul.u2) annotation (Line(points={{62,60},{68,60},{68,54},{ 72,54}}, color={0,0,127})); + connect(booToRea.y, mul.u1) annotation (Line(points={{42,100},{68,100},{68,66}, {72,66}}, color={0,0,127})); + connect(hys1.y, booToRea1.u) annotation (Line(points={{2,-20},{14,-20},{14, -70},{18,-70}}, color={255,0,255})); + connect(booToRea1.y, mul1.u2) annotation (Line(points={{42,-70},{46,-70},{46, -108},{72,-108}}, color={0,0,127})); + connect(conPID1.y, mul1.u1) annotation (Line(points={{82,-60},{84,-60},{84, -86},{68,-86},{68,-96},{72,-96}}, color={0,0,127})); + connect(mul1.y, yCooCoi) annotation (Line(points={{96,-102},{98,-102},{98,-60}, {120,-60}}, color={0,0,127})); - annotation (defaultComponentName = "TSupAir", + + connect(swi2.y, TAirSupSet) annotation (Line(points={{42,-20},{56,-20},{56,0}, + {120,0}}, color={0,0,127})); + + annotation (defaultComponentName = + "TSupAir", Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100, 100}}), graphics={ Rectangle( @@ -244,4 +372,5 @@ equation fillColor={255,255,255}, fillPattern=FillPattern.Solid)}), Diagram(coordinateSystem( preserveAspectRatio=false, extent={{-100,-120},{100,120}}))); + end SupplyAirTemperature; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/FanSpeed.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/FanSpeed.mo index ad3c5c0e240..000df05359f 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/FanSpeed.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/FanSpeed.mo @@ -1,6 +1,8 @@ within Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.Validation; + block FanSpeed - "Validation model for fan speed subsequence" + + "Validation model for fan speed subsequence" extends Modelica.Icons.Example; @@ -22,155 +24,242 @@ block FanSpeed Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ram( final height=6, final duration=70, - final offset=1) "Operating mode signal" + final offset=1) + "Operating mode signal" annotation (Placement(transformation(extent={{20,160},{40,180}}))); - CDL.Conversions.RealToInteger reaToInt "Real to Integer conversion" + + Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt + "Real to Integer conversion" annotation (Placement(transformation(extent={{-70,160},{-50,180}}))); - CDL.Logical.Sources.Pulse booPul(final period=100) "Fan proven on signal" + + Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul(final period=100) + "Fan proven on signal" annotation (Placement(transformation(extent={{-100,130},{-80,150}}))); - CDL.Continuous.Sources.Sine sin(final freqHz=1/50) "Heating loop signal" + + Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sin(final freqHz=1/50) + "Heating loop signal" annotation (Placement(transformation(extent={{-100,100},{-80,120}}))); - CDL.Continuous.Abs abs "Convert negative loop signal to positive" + + Buildings.Controls.OBC.CDL.Continuous.Abs abs + "Convert negative loop signal to positive" annotation (Placement(transformation(extent={{-70,100},{-50,120}}))); - CDL.Continuous.Sources.Constant con(final k=0) "Cooling loop signal" + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con(final k=0) + "Cooling loop signal" annotation (Placement(transformation(extent={{-100,70},{-80,90}}))); - CDL.Continuous.Sources.Constant con1(final k=1) "Operating mode signal" + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con1(final k=1) + "Operating mode signal" annotation (Placement(transformation(extent={{-100,160},{-80,180}}))); - CDL.Conversions.RealToInteger reaToInt1 "Real to Integer conversion" + Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt1 + "Real to Integer conversion" annotation (Placement(transformation(extent={{50,160},{70,180}}))); - CDL.Logical.Sources.Pulse booPul1(final period=100) "Fan proven on signal" + + Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul1(final period=100) + "Fan proven on signal" annotation (Placement(transformation(extent={{20,130},{40,150}}))); - CDL.Continuous.Sources.Constant con2(final k=0) "Cooling loop signal" + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con2(final k=0) + "Cooling loop signal" annotation (Placement(transformation(extent={{20,70},{40,90}}))); - CDL.Conversions.RealToInteger reaToInt2 "Real to Integer conversion" + Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt2 + "Real to Integer conversion" annotation (Placement(transformation(extent={{-70,30},{-50,50}}))); - CDL.Logical.Sources.Pulse booPul2(final period=100) "Fan proven on signal" + + Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul2(final period=100) + "Fan proven on signal" annotation (Placement(transformation(extent={{-100,0},{-80,20}}))); - CDL.Continuous.Sources.Sine sin2(final freqHz=1/50) "Cooling loop signal" + + Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sin2(final freqHz=1/50) + "Cooling loop signal" annotation (Placement(transformation(extent={{-100,-60},{-80,-40}}))); - CDL.Continuous.Abs abs2 "Convert negative loop signal to positive" + + Buildings.Controls.OBC.CDL.Continuous.Abs abs2 + "Convert negative loop signal to positive" annotation (Placement(transformation(extent={{-70,-60},{-50,-40}}))); - CDL.Continuous.Sources.Constant con3(final k=0) "Heating loop signal" + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con3(final k=0) + "Heating loop signal" annotation (Placement(transformation(extent={{-100,-30},{-80,-10}}))); - CDL.Continuous.Sources.Constant con4(final k=1) "Operating mode signal" + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con4(final k=1) + "Operating mode signal" annotation (Placement(transformation(extent={{-100,30},{-80,50}}))); - CDL.Continuous.Sources.Constant con5(final k=0.75) "Heating loop signal" + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con5(final k=0.75) + "Heating loop signal" annotation (Placement(transformation(extent={{20,100},{40,120}}))); + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.FanSpeed fanSpe3( have_coolingCoil=true, have_heatingCoil=false) "Instance demonstrating variation of cooling loop signal with no heating coil" annotation (Placement(transformation(extent={{80,-10},{100,10}}))); - CDL.Conversions.RealToInteger reaToInt3 "Real to Integer conversion" + + Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt3 + "Real to Integer conversion" annotation (Placement(transformation(extent={{50,30},{70,50}}))); - CDL.Logical.Sources.Pulse booPul3(final period=100) "Fan proven on signal" + + Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul3(final period=100) + "Fan proven on signal" annotation (Placement(transformation(extent={{20,0},{40,20}}))); - CDL.Continuous.Sources.Sine sin1(final freqHz=1/50) "Cooling loop signal" + + Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sin1(final freqHz=1/50) + "Cooling loop signal" annotation (Placement(transformation(extent={{20,-30},{40,-10}}))); - CDL.Continuous.Abs abs1 "Convert negative loop signal to positive" + + Buildings.Controls.OBC.CDL.Continuous.Abs abs1 + "Convert negative loop signal to positive" annotation (Placement(transformation(extent={{50,-30},{70,-10}}))); - CDL.Continuous.Sources.Constant con7(final k=1) "Operating mode signal" + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con7(final k=1) + "Operating mode signal" annotation (Placement(transformation(extent={{20,30},{40,50}}))); + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.FanSpeed fanSpe4( have_coolingCoil=false, have_heatingCoil=true) "Instance demonstrating variation of heating loop signal with no cooling coil" annotation (Placement(transformation(extent={{-40,-140},{-20,-120}}))); - CDL.Conversions.RealToInteger reaToInt4 + + Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt4 "Real to Integer conversion" annotation (Placement(transformation(extent={{-70,-100},{-50,-80}}))); - CDL.Logical.Sources.Pulse booPul4(final period=100) + + Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul4(final period=100) "Fan proven on signal" annotation (Placement(transformation(extent={{-100,-130},{-80,-110}}))); - CDL.Continuous.Sources.Sine sin3(final freqHz=1/50) + + Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sin3(final freqHz=1/50) "Heating loop signal" annotation (Placement(transformation(extent={{-100,-160},{-80,-140}}))); - CDL.Continuous.Abs abs3 + + Buildings.Controls.OBC.CDL.Continuous.Abs abs3 "Convert negative loop signal to positive" annotation (Placement(transformation(extent={{-70,-160},{-50,-140}}))); - CDL.Continuous.Sources.Constant con8(final k=1) "Operating mode signal" + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con8(final k=1) + "Operating mode signal" annotation (Placement(transformation(extent={{-100,-100},{-80,-80}}))); + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.FanSpeed fanSpe5( have_coolingCoil=false, have_heatingCoil=false) "Instance demonstrating variation of operating mode with no heating and cooling coils" annotation (Placement(transformation(extent={{80,-140},{100,-120}}))); - CDL.Continuous.Sources.Ramp ram1( + + Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ram1( final height=6, final duration=70, - final offset=1) "Operating mode signal" + final offset=1) + "Operating mode signal" annotation (Placement(transformation(extent={{20,-100},{40,-80}}))); - CDL.Conversions.RealToInteger reaToInt5 "Real to Integer conversion" + + Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt5 + "Real to Integer conversion" annotation (Placement(transformation(extent={{50,-100},{70,-80}}))); - CDL.Logical.Sources.Pulse booPul5(final period=100) "Fan proven on signal" + + Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul5(final period=100) + "Fan proven on signal" annotation (Placement(transformation(extent={{20,-130},{40,-110}}))); + equation connect(reaToInt.y, fanSpe.opeMod) annotation (Line(points={{-48,170},{-46,170}, {-46,138},{-42,138}}, color={255,127,0})); + connect(booPul.y, fanSpe.uFanPro) annotation (Line(points={{-78,140},{-50,140}, {-50,134},{-42,134}}, color={255,0,255})); + connect(sin.y, abs.u) annotation (Line(points={{-78,110},{-72,110}}, color={0,0,127})); + connect(abs.y, fanSpe.uHea) annotation (Line(points={{-48,110},{-46,110},{-46, 128},{-42,128}}, color={0,0,127})); + connect(con.y, fanSpe.uCoo) annotation (Line(points={{-78,80},{-44,80},{-44,124}, {-42,124}},color={0,0,127})); + connect(con1.y, reaToInt.u) annotation (Line(points={{-78,170},{-72,170}}, color={0,0,127})); + connect(reaToInt1.y, fanSpe2.opeMod) annotation (Line(points={{72,170},{74, 170},{74,138},{78,138}}, color={255,127,0})); + connect(booPul1.y, fanSpe2.uFanPro) annotation (Line(points={{42,140},{70,140}, {70,134},{78,134}}, color={255,0,255})); + connect(con2.y, fanSpe2.uCoo) annotation (Line(points={{42,80},{76,80},{76, 124},{78,124}}, color={0,0,127})); + connect(ram.y, reaToInt1.u) annotation (Line(points={{42,170},{48,170}}, color={0,0,127})); + connect(reaToInt2.y,fanSpe1. opeMod) annotation (Line(points={{-48,40},{-46,40}, {-46,8},{-42,8}}, color={255,127,0})); + connect(booPul2.y,fanSpe1. uFanPro) annotation (Line(points={{-78,10},{-50,10}, {-50,4},{-42,4}}, color={255,0,255})); + connect(sin2.y, abs2.u) annotation (Line(points={{-78,-50},{-72,-50}}, color={0,0,127})); + connect(con4.y, reaToInt2.u) annotation (Line(points={{-78,40},{-72,40}}, color={0,0,127})); + connect(con3.y,fanSpe1. uHea) annotation (Line(points={{-78,-20},{-56,-20},{-56, -2},{-42,-2}}, color={0,0,127})); + connect(abs2.y,fanSpe1. uCoo) annotation (Line(points={{-48,-50},{-46,-50},{-46, -6},{-42,-6}}, color={0,0,127})); + connect(con5.y, fanSpe2.uHea) annotation (Line(points={{42,110},{60,110},{60, 128},{78,128}}, color={0,0,127})); + connect(reaToInt3.y,fanSpe3. opeMod) annotation (Line(points={{72,40},{74,40}, {74,8},{78,8}}, color={255,127,0})); + connect(booPul3.y,fanSpe3. uFanPro) annotation (Line(points={{42,10},{70,10},{ 70,4},{78,4}}, color={255,0,255})); + connect(sin1.y,abs1. u) annotation (Line(points={{42,-20},{48,-20}}, color={0,0,127})); + connect(con7.y,reaToInt3. u) annotation (Line(points={{42,40},{48,40}}, color={0,0,127})); + connect(abs1.y,fanSpe3. uCoo) annotation (Line(points={{72,-20},{74,-20},{74,-6}, {78,-6}}, color={0,0,127})); + connect(reaToInt4.y, fanSpe4.opeMod) annotation (Line(points={{-48,-90},{-46, -90},{-46,-122},{-42,-122}}, color={255,127,0})); + connect(booPul4.y, fanSpe4.uFanPro) annotation (Line(points={{-78,-120},{-50, -120},{-50,-126},{-42,-126}}, color={255,0,255})); + connect(sin3.y, abs3.u) annotation (Line(points={{-78,-150},{-72,-150}}, color={0,0,127})); + connect(abs3.y, fanSpe4.uHea) annotation (Line(points={{-48,-150},{-46,-150}, {-46,-132},{-42,-132}}, color={0,0,127})); + connect(con8.y, reaToInt4.u) annotation (Line(points={{-78,-90},{-72,-90}}, color={0,0,127})); + connect(reaToInt5.y, fanSpe5.opeMod) annotation (Line(points={{72,-90},{74, -90},{74,-122},{78,-122}}, color={255,127,0})); + connect(booPul5.y, fanSpe5.uFanPro) annotation (Line(points={{42,-120},{70, -120},{70,-126},{78,-126}}, color={255,0,255})); + connect(ram1.y, reaToInt5.u) annotation (Line(points={{42,-90},{48,-90}}, color={0,0,127})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, {100,100}})), Diagram( coordinateSystem(preserveAspectRatio=false, extent={{-120,-200},{120,200}})), @@ -180,4 +269,5 @@ equation __Dymola_Algorithm="Dassl"), __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/FanSpeed.mos" "Simulate and plot")); + end FanSpeed; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mo index 83ce6b8151b..88cf802418e 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mo @@ -1,114 +1,162 @@ within Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.Validation; + block SupplyAirTemperature - "Validation model for supply air temperature setpoint subsequence" + + "Validation model for supply air temperature setpoint subsequence" extends Modelica.Icons.Example; Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.SupplyAirTemperature TSupAir(have_coolingCoil=true, have_heatingCoil=true) annotation (Placement(transformation(extent={{-50,60},{-30,80}}))); + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.SupplyAirTemperature TSupAir3( have_coolingCoil=true, have_heatingCoil=false) annotation (Placement(transformation(extent={{60,-80},{80,-60}}))); + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.SupplyAirTemperature TSupAir2( have_coolingCoil=false, have_heatingCoil=true) annotation (Placement(transformation(extent={{-50,-100},{-30,-80}}))); - CDL.Continuous.Sources.Sine sin( + + Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sin( amplitude=20, freqHz=1/50, - offset=273.15 + 23) "Supply air temperature signal" + offset=273.15 + 23) + "Supply air temperature signal" annotation (Placement(transformation(extent={{-90,60},{-70,80}}))); - CDL.Continuous.Sources.Sine sin3( + Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sin3( amplitude=20, freqHz=1/50, - offset=273.15 + 23) "Supply air temperature signal" + offset=273.15 + 23) + "Supply air temperature signal" annotation (Placement(transformation(extent={{20,-70},{40,-50}}))); - CDL.Continuous.Sources.Sine sin5( + + Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sin5( amplitude=0.5, freqHz=1/100, - offset=0.5) "Cooling loop signal" + offset=0.5) + "Cooling loop signal" annotation (Placement(transformation(extent={{20,-100},{40,-80}}))); - CDL.Continuous.Sources.Sine sin6( + + Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sin6( amplitude=20, freqHz=1/50, - offset=273.15 + 23) "Supply air temperature signal" + offset=273.15 + 23) + "Supply air temperature signal" annotation (Placement(transformation(extent={{-90,-100},{-70,-80}}))); - CDL.Continuous.Sources.Sine sin8( + + Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sin8( amplitude=0.5, freqHz=1/100, - offset=0.5) "Heating loop signal" + offset=0.5) + "Heating loop signal" annotation (Placement(transformation(extent={{-90,-70},{-70,-50}}))); + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.SupplyAirTemperature TSupAir1(have_coolingCoil=true, have_heatingCoil=true) annotation (Placement(transformation(extent={{80,60},{100,80}}))); - CDL.Continuous.Sources.Sine sin4( + + Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sin4( amplitude=20, freqHz=1/50, - offset=273.15 + 23) "Supply air temperature signal" + offset=273.15 + 23) + "Supply air temperature signal" annotation (Placement(transformation(extent={{40,60},{60,80}}))); - CDL.Continuous.Sources.Constant con(k=273.15 + 21) + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con(k=273.15 + 21) "Zone heating temperature setpoint" annotation (Placement(transformation(extent={{-90,120},{-70,140}}))); - CDL.Continuous.Sources.Constant con1(k=273.15 + 25) + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con1(k=273.15 + 25) "Zone cooling temperature setpoint" annotation (Placement(transformation(extent={{-90,0},{-70,20}}))); - CDL.Continuous.Sources.Constant con2(k=273.15 + 21) + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con2(k=273.15 + 21) "Zone heating temperature setpoint" annotation (Placement(transformation(extent={{40,120},{60,140}}))); - CDL.Continuous.Sources.Constant con3(k=273.15 + 25) + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con3(k=273.15 + 25) "Zone cooling temperature setpoint" annotation (Placement(transformation(extent={{40,0},{60,20}}))); - CDL.Continuous.Sources.Constant con4(k=273.15 + 21) + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con4(k=273.15 + 21) "Zone heating temperature setpoint" annotation (Placement(transformation(extent={{-90,-40},{-70,-20}}))); - CDL.Continuous.Sources.Constant con6(k=273.15 + 25) + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con6(k=273.15 + 25) "Zone cooling temperature setpoint" annotation (Placement(transformation(extent={{20,-130},{40,-110}}))); - CDL.Continuous.Sources.Constant con5(k=0.25) "Heating loop signal" + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con5(k=0.25) + "Heating loop signal" annotation (Placement(transformation(extent={{-90,90},{-70,110}}))); - CDL.Continuous.Sources.Constant con7(k=0) "Heating loop signal" + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con7(k=0) + "Heating loop signal" annotation (Placement(transformation(extent={{40,90},{60,110}}))); - CDL.Continuous.Sources.Constant con8(k=0) "Cooling loop signal" + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con8(k=0) + "Cooling loop signal" annotation (Placement(transformation(extent={{-90,30},{-70,50}}))); - CDL.Continuous.Sources.Constant con9(k=0.25) "Cooling loop signal" + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con9(k=0.25) + "Cooling loop signal" annotation (Placement(transformation(extent={{40,30},{60,50}}))); + equation connect(sin.y, TSupAir.TAirSup) annotation (Line(points={{-68,70},{-52,70}}, color={0,0,127})); + connect(sin6.y, TSupAir2.TAirSup) annotation (Line(points={{-68,-90},{-52,-90}}, color={0,0,127})); + connect(sin8.y, TSupAir2.uHea) annotation (Line(points={{-68,-60},{-60,-60},{ -60,-86},{-52,-86}}, color={0,0,127})); + connect(sin4.y,TSupAir1. TAirSup) annotation (Line(points={{62,70},{78,70}}, color={0,0,127})); + connect(con.y, TSupAir.TZonSetHea) annotation (Line(points={{-68,130},{-56, 130},{-56,78},{-52,78}}, color={0,0,127})); + connect(con1.y, TSupAir.TZonSetCoo) annotation (Line(points={{-68,10},{-56,10}, {-56,62},{-52,62}}, color={0,0,127})); + connect(con2.y, TSupAir1.TZonSetHea) annotation (Line(points={{62,130},{72, 130},{72,78},{78,78}}, color={0,0,127})); + connect(con3.y, TSupAir1.TZonSetCoo) annotation (Line(points={{62,10},{72,10}, {72,62},{78,62}}, color={0,0,127})); + connect(con4.y, TSupAir2.TZonSetHea) annotation (Line(points={{-68,-30},{-56, -30},{-56,-82},{-52,-82}}, color={0,0,127})); + connect(con6.y, TSupAir3.TZonSetCoo) annotation (Line(points={{42,-120},{54, -120},{54,-78},{58,-78}}, color={0,0,127})); + connect(con5.y, TSupAir.uHea) annotation (Line(points={{-68,100},{-60,100},{ -60,74},{-52,74}}, color={0,0,127})); + connect(con7.y, TSupAir1.uHea) annotation (Line(points={{62,100},{68,100},{68, 74},{78,74}}, color={0,0,127})); + connect(con8.y, TSupAir.uCoo) annotation (Line(points={{-68,40},{-60,40},{-60, 66},{-52,66}}, color={0,0,127})); + connect(con9.y, TSupAir1.uCoo) annotation (Line(points={{62,40},{70,40},{70, 66},{78,66}}, color={0,0,127})); + connect(sin5.y, TSupAir3.uCoo) annotation (Line(points={{42,-90},{52,-90},{52, -74},{58,-74}}, color={0,0,127})); + connect(sin3.y, TSupAir3.TAirSup) annotation (Line(points={{42,-60},{52,-60}, {52,-70},{58,-70}}, color={0,0,127})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, {100,100}})), Diagram( coordinateSystem(preserveAspectRatio=false, extent={{-140,-140},{140,140}})), __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mos" "Simulate and plot")); + end SupplyAirTemperature; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/package.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/package.mo index c4a6895ad85..31e8c5561e3 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/package.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/package.mo @@ -1,3 +1,4 @@ within Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences; + package Validation end Validation; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/package.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/package.mo index ee2c5c69d5f..2b8671ec73f 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/package.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/package.mo @@ -1,4 +1,5 @@ within Buildings.Controls.OBC.ASHRAE.FanCoilUnit; + package Subsequences end Subsequences; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mo new file mode 100644 index 00000000000..547781a5d90 --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mo @@ -0,0 +1,340 @@ +within Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Validation; + +model Controller + "Validation of the top-level controller" + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Controller conFCU( + final have_winSen=false, + final kHea=1, + final yHeaMax=1, + final yMin=0.1, + final AFlo=50, + final controllerTypeCoo=Buildings.Controls.OBC.CDL.Types.SimpleController.P, + final controllerTypeHea=Buildings.Controls.OBC.CDL.Types.SimpleController.P, + final have_occSen=true, + final TSupSetMax=297.15, + final TSupSetMin=285.15, + final use_TMix=false, + final controllerTypeMod=Buildings.Controls.OBC.CDL.Types.SimpleController.P, + final kMod=1, + final VOutMin_flow=6e-3, + final VOutDes_flow=0.25, + have_coolingCoil=true, + have_heatingCoil=true) + "Validate the heating case" + annotation (Placement(transformation(extent={{20,80},{60,124}}))); + + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Controller conFCU1( + final have_winSen=true, + final kCoo=1, + final kHea=1, + final yHeaMax=1, + final yMin=0.1, + final AFlo=50, + final controllerTypeCoo=Buildings.Controls.OBC.CDL.Types.SimpleController.P, + final controllerTypeHea=Buildings.Controls.OBC.CDL.Types.SimpleController.P, + final have_occSen=false, + final TSupSetMax=297.15, + final TSupSetMin=285.15, + final use_TMix=false, + final controllerTypeMod=Buildings.Controls.OBC.CDL.Types.SimpleController.P, + final kMod=1, + final VOutMin_flow=6e-3, + final VOutDes_flow=0.25, + have_coolingCoil=true, + have_heatingCoil=true) + "Validate the cooling case" + annotation (Placement(transformation(extent={{20,12},{60,56}}))); + + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Controller conFCU2( + final have_winSen=false, + final kCoo=1, + final kHea=1, + final yHeaMax=1, + final yMin=0.1, + final AFlo=50, + final controllerTypeCoo=Buildings.Controls.OBC.CDL.Types.SimpleController.P, + final controllerTypeHea=Buildings.Controls.OBC.CDL.Types.SimpleController.P, + final have_occSen=true, + final TSupSetMax=297.15, + final TSupSetMin=285.15, + final use_TMix=false, + final controllerTypeMod=Buildings.Controls.OBC.CDL.Types.SimpleController.P, + final kMod=1, + final VOutMin_flow=6e-3, + final VOutDes_flow=0.25, + have_coolingCoil=true, + have_heatingCoil=true) + "Validate the cooling case" + annotation (Placement(transformation(extent={{20,-50},{60,-6}}))); + + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Controller conFCU3( + final have_winSen=true, + final kCoo=1, + final kHea=1, + final yHeaMax=1, + final yMin=0.1, + final AFlo=50, + final controllerTypeCoo=Buildings.Controls.OBC.CDL.Types.SimpleController.P, + final controllerTypeHea=Buildings.Controls.OBC.CDL.Types.SimpleController.P, + final have_occSen=false, + final TSupSetMax=297.15, + final TSupSetMin=285.15, + final use_TMix=false, + final controllerTypeMod=Buildings.Controls.OBC.CDL.Types.SimpleController.P, + final kMod=1, + final VOutMin_flow=6e-3, + final VOutDes_flow=0.25, + have_coolingCoil=true, + have_heatingCoil=true) + "Validate the cooling case" + annotation (Placement(transformation(extent={{20,-112},{60,-68}}))); + + Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp TZon( + final duration=86400, + final height=6, + final offset=273.15 + 16, + y(unit="K")) + "Measured zone temperature" + annotation (Placement(transformation(extent={{-180,70},{-160,90}}))); + + Buildings.Controls.SetPoints.OccupancySchedule occSch( + final occupancy=3600*{4,20}) + "Occupancy schedule" + annotation (Placement(transformation(extent={{-120,44},{-100,64}}))); + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant nOcc(final k=2) + "Number of occupants" + annotation (Placement(transformation(extent={{-150,-10},{-130,10}}))); + + Buildings.Controls.OBC.CDL.Logical.Sources.Constant win(final k=false) + "Window status" + annotation (Placement(transformation(extent={{-120,-130},{-100,-110}}))); + + Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp TZon1( + final duration=86400, + final height=-3, + final offset=273.15 + 26, + y(unit="K")) + "Measured zone temperature" + annotation (Placement(transformation(extent={{-180,-50},{-160,-30}}))); + + Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp TSup( + final height=2, + final duration=86400, + final offset=273.15 + 22.5, + y(unit="K")) + "Terminal unit discharge air temperature" + annotation (Placement(transformation(extent={{-180,30},{-160,50}}))); + + Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp TSup1( + final height=-3, + final duration=86400, + final offset=273.15 + 24, + y(unit="K")) + "Terminal unit discharge air temperature" + annotation (Placement(transformation(extent={{-180,-80},{-160,-60}}))); + + Buildings.Controls.OBC.CDL.Integers.Sources.Constant demLim( + final k=0) + "Cooling and heating demand imit level" + annotation (Placement(transformation(extent={{-150,-110},{-130,-90}}))); + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant cooWarTim( + final k=0) + "Cooldown and warm-up time" + annotation (Placement(transformation(extent={{-120,10},{-100,30}}))); + + Buildings.Controls.OBC.CDL.Logical.Pre pre + "Logical pre block" + annotation (Placement(transformation(extent={{80,100},{100,120}}))); + + Buildings.Controls.OBC.CDL.Logical.Pre pre1 + "Logical pre block" + annotation (Placement(transformation(extent={{80,40},{100,60}}))); + + Buildings.Controls.OBC.CDL.Logical.Pre pre2 + "Logical pre block" + annotation (Placement(transformation(extent={{80,-30},{100,-10}}))); + + Buildings.Controls.OBC.CDL.Logical.Pre pre3 + "Logical pre block" + annotation (Placement(transformation(extent={{80,-80},{100,-60}}))); + +equation + connect(TZon.y,conFCU. TZon) annotation (Line(points={{-158,80},{-20,80},{-20, + 110},{18,110}}, color={0,0,127})); + + connect(occSch.occupied,conFCU. uOcc) annotation (Line(points={{-99,48},{-74, + 48},{-74,106},{18,106}}, color={255,0,255})); + + connect(occSch.tNexOcc,conFCU. tNexOcc) annotation (Line(points={{-99,60},{ + -80,60},{-80,114},{18,114}}, color={0,0,127})); + + connect(nOcc.y,conFCU. nOcc) annotation (Line(points={{-128,0},{-8,0},{-8,86}, + {18,86}}, color={0,0,127})); + + connect(TSup.y,conFCU. TSup) annotation (Line(points={{-158,40},{-140,40},{ + -140,94},{18,94}}, color={0,0,127})); + + connect(win.y,conFCU1. uWin) annotation (Line(points={{-98,-120},{0,-120},{0,14}, + {18,14}}, color={255,0,255})); + + connect(occSch.tNexOcc,conFCU1. tNexOcc) annotation (Line(points={{-99,60},{-20, + 60},{-20,46},{18,46}}, color={0,0,127})); + + connect(occSch.occupied,conFCU1. uOcc) + annotation (Line(points={{-99,48},{-40,48},{-40,38},{18,38}}, + color={255,0,255})); + + connect(TZon1.y,conFCU1. TZon) annotation (Line(points={{-158,-40},{-70,-40},{ + -70,42},{18,42}}, color={0,0,127})); + + connect(TSup1.y,conFCU1. TSup) annotation (Line(points={{-158,-70},{-84,-70},{ + -84,26},{18,26}}, color={0,0,127})); + + connect(TSup1.y,conFCU2. TSup) annotation (Line(points={{-158,-70},{-84,-70},{ + -84,-36},{18,-36}}, color={0,0,127})); + + connect(occSch.occupied,conFCU2. uOcc) annotation (Line(points={{-99,48},{-74, + 48},{-74,-24},{18,-24}}, color={255,0,255})); + + connect(occSch.tNexOcc,conFCU2. tNexOcc) annotation (Line(points={{-99,60},{-80, + 60},{-80,-16},{18,-16}}, color={0,0,127})); + + connect(TZon1.y,conFCU2. TZon) annotation (Line(points={{-158,-40},{-70,-40},{ + -70,-20},{18,-20}}, color={0,0,127})); + + connect(win.y,conFCU3. uWin) annotation (Line(points={{-98,-120},{0,-120},{0,-110}, + {18,-110}}, color={255,0,255})); + + connect(occSch.occupied,conFCU3. uOcc) annotation (Line(points={{-99,48},{-74, + 48},{-74,-86},{18,-86}}, color={255,0,255})); + + connect(TSup1.y,conFCU3. TSup) annotation (Line(points={{-158,-70},{-84,-70},{ + -84,-98},{18,-98}}, color={0,0,127})); + + connect(TZon1.y,conFCU3. TZon) annotation (Line(points={{-158,-40},{-70,-40},{ + -70,-82},{18,-82}}, color={0,0,127})); + + connect(occSch.tNexOcc,conFCU3. tNexOcc) annotation (Line(points={{-99,60},{-80, + 60},{-80,-78},{18,-78}}, color={0,0,127})); + + connect(nOcc.y,conFCU2. nOcc) annotation (Line(points={{-128,0},{-8,0},{-8,-44}, + {18,-44}}, color={0,0,127})); + + connect(cooWarTim.y,conFCU. warUpTim) annotation (Line(points={{-98,20},{-14, + 20},{-14,122},{18,122}}, color={0,0,127})); + + connect(cooWarTim.y,conFCU. cooDowTim) annotation (Line(points={{-98,20},{-14, + 20},{-14,118},{18,118}}, color={0,0,127})); + + connect(cooWarTim.y,conFCU1. warUpTim) annotation (Line(points={{-98,20},{-14, + 20},{-14,54},{18,54}}, color={0,0,127})); + + connect(cooWarTim.y,conFCU1. cooDowTim) annotation (Line(points={{-98,20},{-14, + 20},{-14,50},{18,50}}, color={0,0,127})); + + connect(cooWarTim.y,conFCU2. warUpTim) annotation (Line(points={{-98,20},{-14, + 20},{-14,-8},{18,-8}}, color={0,0,127})); + + connect(cooWarTim.y,conFCU2. cooDowTim) annotation (Line(points={{-98,20},{-14, + 20},{-14,-12},{18,-12}}, color={0,0,127})); + + connect(cooWarTim.y,conFCU3. warUpTim) annotation (Line(points={{-98,20},{-14, + 20},{-14,-70},{18,-70}}, color={0,0,127})); + + connect(cooWarTim.y,conFCU3. cooDowTim) annotation (Line(points={{-98,20},{-14, + 20},{-14,-74},{18,-74}}, color={0,0,127})); + + connect(demLim.y,conFCU3. uHeaDemLimLev) annotation (Line(points={{-128,-100}, + {-4,-100},{-4,-94},{18,-94}}, color={255,127,0})); + + connect(demLim.y,conFCU3. uCooDemLimLev) annotation (Line(points={{-128,-100}, + {-4,-100},{-4,-90},{18,-90}}, color={255,127,0})); + + connect(demLim.y,conFCU2. uHeaDemLimLev) annotation (Line(points={{-128,-100}, + {-4,-100},{-4,-32},{18,-32}}, color={255,127,0})); + + connect(demLim.y,conFCU2. uCooDemLimLev) annotation (Line(points={{-128,-100}, + {-4,-100},{-4,-28},{18,-28}}, color={255,127,0})); + + connect(demLim.y,conFCU1. uHeaDemLimLev) annotation (Line(points={{-128,-100}, + {-4,-100},{-4,30},{18,30}}, color={255,127,0})); + + connect(demLim.y,conFCU1. uCooDemLimLev) annotation (Line(points={{-128,-100}, + {-4,-100},{-4,34},{18,34}}, color={255,127,0})); + + connect(demLim.y,conFCU. uCooDemLimLev) annotation (Line(points={{-128,-100}, + {-4,-100},{-4,102},{18,102}}, color={255,127,0})); + + connect(demLim.y,conFCU. uHeaDemLimLev) annotation (Line(points={{-128,-100}, + {-4,-100},{-4,98},{18,98}}, color={255,127,0})); + + connect(conFCU.yFan, pre.u) annotation (Line(points={{62,114},{68,114},{68, + 110},{78,110}}, color={255,0,255})); + + connect(pre.y, conFCU.uFan) annotation (Line(points={{102,110},{120,110},{120, + 136},{0,136},{0,90},{18,90}}, + color={255,0,255})); + + connect(conFCU1.yFan, pre1.u) annotation (Line(points={{62,46},{72,46},{72,50}, + {78,50}}, color={255,0,255})); + + connect(pre1.y, conFCU1.uFan) annotation (Line(points={{102,50},{110,50},{110, + 66},{10,66},{10,22},{18,22}}, color={255,0,255})); + + connect(conFCU2.yFan, pre2.u) annotation (Line(points={{62,-16},{70,-16},{70,-20}, + {78,-20}}, color={255,0,255})); + + connect(pre2.y, conFCU2.uFan) annotation (Line(points={{102,-20},{108,-20},{108, + 4},{12,4},{12,-40},{18,-40}}, color={255,0,255})); + + connect(conFCU3.yFan, pre3.u) annotation (Line(points={{62,-78},{68,-78},{68,-70}, + {78,-70}}, color={255,0,255})); + + connect(pre3.y, conFCU3.uFan) annotation (Line(points={{102,-70},{110,-70},{110, + -54},{12,-54},{12,-102},{18,-102}}, color={255,0,255})); + +annotation (experiment(StopTime=86400, Interval=300, Tolerance=1e-06), + __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mos" + "Simulate and plot"), + Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}), + graphics={ + Polygon( + lineColor={0,0,255}, + fillColor={75,138,73}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + points={{-36,58},{64,-2},{-36,-62},{-36,58}}), + Ellipse( + lineColor={75,138,73}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid, + extent={{-100,-100},{100,100}}), + Polygon( + lineColor={0,0,255}, + fillColor={75,138,73}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + points={{-36,58},{64,-2},{-36,-62},{-36,58}})}), + Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-200,-160},{140,140}})), +Documentation(info=" +

+This example validates + +Buildings.Controls.OBC.ASHRAE.G36_PR1.AHUs.SingleZone.VAV.Controller. +

+", revisions=" +
    +
  • +August 7, 2019, by Kun Zhang:
    +Included more validation cases. +
  • +
  • +October 24, 2018, by David Blum:
    +First implementation. +
  • +
+")); + +end Controller; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/package.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/package.mo new file mode 100644 index 00000000000..e52860e8219 --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/package.mo @@ -0,0 +1,5 @@ +within Buildings.Controls.OBC.ASHRAE.FanCoilUnit; + +package Validation + +end Validation; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/package.order b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/package.order new file mode 100644 index 00000000000..8cba75e31a7 --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/package.order @@ -0,0 +1 @@ +Controller diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/package.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/package.mo index d9a019e51f8..0397426335e 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/package.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/package.mo @@ -1,5 +1,8 @@ within Buildings.Controls.OBC.ASHRAE; -package FanCoilUnit "Control sequences for fan coil unit" + +package FanCoilUnit + "Control sequences for fan coil unit" + annotation(Icon(graphics={ Rectangle( diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/package.order b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/package.order index b074d7ba5aa..4533eb3a1cf 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/package.order +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/package.order @@ -1,2 +1,3 @@ Subsequences Controller +Validation diff --git a/Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mos b/Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mos new file mode 100644 index 00000000000..832c2ed7afa --- /dev/null +++ b/Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mos @@ -0,0 +1,11 @@ +simulateModel("Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Validation.Controller", method="Cvode", outputInterval=300, stopTime=86400, tolerance=1e-06, resultFile="conFCU"); +createPlot(id=1, position={35, 30, 592, 427}, y={"conFCU.TSup", "conFCU.setPoiVAV.TSupHeaEco", "conFCU.setPoiVAV.TSupCoo"}, range={0.0, 90000.0, 0.0, 40.0}, grid=true, colors={{0,140,72}, {162,29,33}, {244,125,35}}, displayUnits={"degC", "degC", "degC"}); +createPlot(id=1, position={35, 30, 592, 104}, y={"conFCU.yRetDamPos", "conFCU.yOutDamPos", "conFCU.yFan","conFCU.yHeaCoi"}, range={0.0, 90000.0, -2.0, 2.0}, grid=true, subPlot=2, colors={{28,108,200}, {238,46,47}, {0,140,72}, {217,67,180}}); +createPlot(id=1, position={35, 30, 592, 103}, y={"conFCU.uOcc"}, range={0.0, 90000.0, -2.0, 2.0}, grid=true, subPlot=3, colors={{28,108,200}}); +createPlot(id=1, position={35, 30, 592, 104}, y={"conFCU.modSetPoi.TZonHeaSet", "conFCU.modSetPoi.TZonCooSet","conFCU.TZon", "conFCU.TOut"}, range={0.0, 90000.0, 280.0, 320.0}, grid=true, subPlot=4, colors={{28,108,200}, {238,46,47}, {0,140,72}, {217,67,180}}); +createPlot(id=2, position={458, 1, 445, 332}, x="conFCU1.cooPI.y", y={"conFCU1.setPoiVAV.y", "conFCU2.setPoiVAV.y", "conFCU3.setPoiVAV.y"}, range={0.0, 1.0, 0.2, 1.2}, grid=true, legendHorizontal=false, colors={{0,140,72}, {162,29,33}, {244,125,35}}, patterns={LinePattern.None, LinePattern.None, LinePattern.None}, markers={MarkerStyle.Circle, MarkerStyle.Circle, MarkerStyle.Circle}); +createPlot(id=3, position={2, 1, 449, 335}, x="conFCU.heaPI.y", y={"conFCU.setPoiVAV.y"}, range={0.0, 1.0, 0.2, 1.2}, grid=true, legendHorizontal=false, colors={{238,46,47}}, patterns={LinePattern.None}, markers={MarkerStyle.Circle}); +createPlot(id=4, position={458, 362, 444, 335}, x="conFCU1.cooPI.y", y={"conFCU1.setPoiVAV.TSupHeaEco", "conFCU1.setPoiVAV.TSupCoo"}, range={0.0, 1.0, 14.0, 26.0}, grid=true, legendHorizontal=false, colors={{0,140,72}, {162,29,33}}, patterns={LinePattern.None, LinePattern.None}, markers={MarkerStyle.Circle, MarkerStyle.Circle}, displayUnits={"degC", "degC"}); +createPlot(id=5, position={1, 363, 453, 333}, x="conFCU.heaPI.y", y={"conFCU.setPoiVAV.TSupCoo"}, range={0.0, 1.0, 14.0, 26.0}, grid=true, legendHorizontal=false, colors={{238,46,47}}, patterns={LinePattern.None}, markers={MarkerStyle.Circle}, displayUnits={"degC"}); +createPlot(id=6, position={910, 0, 447, 336}, x="conFCU.conEco.mod.uTSup.y", y={"conFCU.conEco.mod.yOutDamPos", "conFCU.conEco.mod.yRetDamPos","conFCU.conEco.mod.yHeaCoi"}, range={0.0, 1.0, -0.4, 1.2000000000000002}, grid=true, legendHorizontal=false, colors={{244,125,35}, {0,140,72}, {28,108,200}}, patterns={LinePattern.None, LinePattern.None, LinePattern.None}, markers={MarkerStyle.Circle, MarkerStyle.Circle, MarkerStyle.Circle}); +createPlot(id=7, position={910, 366, 449, 332}, x="conFCU.conEco.damLim.uSupFanSpe", y={"conFCU.conEco.damLim.yOutDamPosMin", "conFCU.conEco.damLim.yOutDamPosMax"}, range={0.30000000000000004, 1.2000000000000002, -0.4, 1.2000000000000002}, grid=true, legendHorizontal=false, colors={{238,46,47}, {0,140,72}}, patterns={LinePattern.None, LinePattern.None}, markers={MarkerStyle.Circle, MarkerStyle.Circle}); From d14ded52c5b1f36eca2a711f8147fc620b95aa96 Mon Sep 17 00:00:00 2001 From: Devaprasad Date: Sat, 19 Mar 2022 03:00:33 -0700 Subject: [PATCH 05/83] Added documentation sections and updated formatting --- .../OBC/ASHRAE/FanCoilUnit/Controller.mo | 236 +++++++---- .../FanCoilUnit/Subsequences/FanSpeed.mo | 87 +++- .../Subsequences/SupplyAirTemperature.mo | 401 +++++++++++------- .../Subsequences/Validation/FanSpeed.mo | 136 +++--- .../Validation/SupplyAirTemperature.mo | 184 +++++--- .../Subsequences/Validation/package.mo | 4 +- .../FanCoilUnit/Validation/Controller.mo | 46 +- 7 files changed, 672 insertions(+), 422 deletions(-) diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Controller.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Controller.mo index 3cf3ab14ce7..e0468a5fd3b 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Controller.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Controller.mo @@ -1,8 +1,6 @@ within Buildings.Controls.OBC.ASHRAE.FanCoilUnit; - block Controller - - "Fan coil unit controller that comprises subsequences for controlling fan speed and supply air temperature" + "Fan coil unit controller that comprises subsequences for controlling fan speed and supply air temperature" parameter Boolean have_coolingCoil "Does the fan coil unit have a cooling coil?"; @@ -13,7 +11,7 @@ block Controller parameter Boolean have_winSen "Check if the zone has window status sensor"; - parameter Boolean have_occSen + parameter Boolean have_occSen "Set to true if zones have occupancy sensor"; parameter Real TZonHeaOn( @@ -131,7 +129,8 @@ block Controller "Type of controller" annotation(Dialog(tab="PID parameters", group="Heating coil control")); - parameter Real kHeaCoi(final unit="1/K")=0.1 + parameter Real kHeaCoi( + final unit="1/K")=0.1 "Gain for heating coil control signal" annotation(Dialog(tab="PID parameters", group="Heating coil control")); @@ -151,12 +150,18 @@ block Controller enable=controllerTypeCooCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PD or controllerTypeCooCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PID)); - parameter Real cooPerMin(min=0, max=1, unit="1")=0.5 + parameter Real cooPerMin( + final min=0, + final max=1, + final unit="1")=0.5 "Cooling loop signal limit at which supply air temperature is at minimum and fan speed starts to be modified" annotation (Dialog(tab="Supply air setpoints")); - parameter Real heaPerMin(min=0, max=1, unit="1")=0.5 + parameter Real heaPerMin( + final min=0, + final max=1, + final unit="1")=0.5 "Heating loop signal limit at which supply air temperature is at maximum and fan speed starts to be modified" annotation (Dialog(tab="Supply air setpoints")); @@ -176,31 +181,51 @@ block Controller annotation (Dialog(tab="Supply air setpoints",group="Temperature limits")); - parameter Real deaSpe=deaSpe + parameter Real deaSpe( + final unit="1", + displayUnit="1")=0.1 "Deadband mode fan speed" annotation (Dialog(tab="Supply air setpoints",group="Fan speed")); - parameter Real heaPerMaxFanSpe(min=0, max=1, unit="1")=1 + parameter Real heaPerMaxFanSpe( + final min=0, + final max=1, + final unit="1")=1 "Maximum heating loop signal at which fan speed is modified" annotation (Dialog(tab="Supply air setpoints",group="Fan speed - Heating")); - parameter Real heaSpeMax(min=0, max=1, unit="1") + parameter Real heaSpeMax( + final min=0, + final max=1, + final unit="1") "Maximum fan speed for heating" annotation (Dialog(tab="Supply air setpoints",group="Fan speed - Heating")); - parameter Real heaSpeMin(min=0, max=1, unit="1") + parameter Real heaSpeMin( + final min=0, + final max=1, + final unit="1") "Minimum fan speed for heating" annotation (Dialog(tab="Supply air setpoints",group="Fan speed - Heating")); - - parameter Real cooPerMaxFanSpe(min=0, max=1, unit="1")=1 + parameter Real cooPerMaxFanSpe( + final min=0, + final max=1, + final unit="1")=1 "Maximum cooling loop signal at which fan speed is modified" annotation (Dialog(tab="Supply air setpoints",group="Fan speed - Cooling")); - parameter Real cooSpeMax(min=0, max=1, unit="1") = 1 + parameter Real cooSpeMax( + final min=0, + final max=1, + final unit="1") = 1 "Maximum fan speed for cooling" annotation (Dialog(tab="Supply air setpoints",group="Fan speed - Cooling")); - parameter Real cooSpeMin(min=0, max=1, unit="1") + + parameter Real cooSpeMin( + final min=0, + final max=1, + final unit="1") "Minimum fan speed for cooling" annotation (Dialog(tab="Supply air setpoints",group="Fan speed - Cooling")); @@ -262,40 +287,64 @@ block Controller "Heating setpoint when window is open" annotation (Dialog(tab="Adjust temperature setpoint", group="Limits")); - parameter Real incTSetDem_1=0.56 + parameter Real incTSetDem_1( + final unit="K", + displayUnit="K", + final quantity="TemperatureDifference")=0.56 "Cooling setpoint increase value (degC) when cooling demand limit level 1 is imposed" annotation (Dialog(tab="Adjust temperature setpoint", group="Demand control adjustment")); - parameter Real incTSetDem_2=1.1 + parameter Real incTSetDem_2( + final unit="K", + displayUnit="K", + final quantity="TemperatureDifference")=1.1 "Cooling setpoint increase value (degC) when cooling demand limit level 2 is imposed" annotation (Dialog(tab="Adjust temperature setpoint", group="Demand control adjustment")); - parameter Real incTSetDem_3=2.2 + parameter Real incTSetDem_3( + final unit="K", + displayUnit="K", + final quantity="TemperatureDifference")=2.2 "Cooling setpoint increase value (degC) when cooling demand limit level 3 is imposed" annotation (Dialog(tab="Adjust temperature setpoint", group="Demand control adjustment")); - parameter Real decTSetDem_1=0.56 + parameter Real decTSetDem_1( + final unit="K", + displayUnit="K", + final quantity="TemperatureDifference")=0.56 "Heating setpoint decrease value (degC) when heating demand limit level 1 is imposed" annotation (Dialog(tab="Adjust temperature setpoint", group="Demand control adjustment")); - parameter Real decTSetDem_2=1.1 + parameter Real decTSetDem_2( + final unit="K", + displayUnit="K", + final quantity="TemperatureDifference")=1.1 "Heating setpoint decrease value (degC) when heating demand limit level 2 is imposed" annotation (Dialog(tab="Adjust temperature setpoint", group="Demand control adjustment")); - parameter Real decTSetDem_3=2.2 + parameter Real decTSetDem_3( + final unit="K", + displayUnit="K", + final quantity="TemperatureDifference")=2.2 "Heating setpoint decrease value (degC) when heating demand limit level 3 is imposed" annotation (Dialog(tab="Adjust temperature setpoint", group="Demand control adjustment")); - parameter Real uLow=-0.1 + parameter Real uLow( + final unit="1", + displayUnit="1")=-0.1 "Low limit of the hysteresis for checking temperature difference" annotation (Dialog(tab="Advanced")); - parameter Real uHigh=0.1 + parameter Real uHigh( + final unit="1", + displayUnit="1")=0.1 "High limit of the hysteresis for checking temperature difference" annotation (Dialog(tab="Advanced")); - parameter Real deaHysLim=0.01 + parameter Real deaHysLim( + final unit="1", + displayUnit="1")=0.01 "Hysteresis limits for cooling and heating loop signals for deadband mode transitions" annotation (Dialog(tab="Advanced")); @@ -325,8 +374,14 @@ block Controller annotation (Placement(transformation(extent={{-240,20},{-200,60}}), iconTransformation(extent={{-240,-60},{-200,-20}}))); + Buildings.Controls.OBC.CDL.Interfaces.IntegerInput nOcc if have_occSen + "Number of occupants" + annotation (Placement(transformation(extent={{-240,-80},{-200,-40}}), + iconTransformation(extent={{-240,-180},{-200,-140}}))); + Buildings.Controls.OBC.CDL.Interfaces.RealInput warUpTim( final unit="s", + displayUnit="min", final quantity="Time") "Warm-up time retrieved from optimal warm-up block" annotation (Placement(transformation(extent={{-240,170},{-200,210}}), @@ -334,12 +389,16 @@ block Controller Buildings.Controls.OBC.CDL.Interfaces.RealInput cooDowTim( final unit="s", + displayUnit="min", final quantity="Time") "Cool-down time retrieved from optimal cool-down block" annotation (Placement(transformation(extent={{-240,200},{-200,240}}), iconTransformation(extent={{-240,140},{-200,180}}))); - Buildings.Controls.OBC.CDL.Interfaces.RealInput tNexOcc + Buildings.Controls.OBC.CDL.Interfaces.RealInput tNexOcc( + final unit="s", + displayUnit="min", + final quantity="Time") "Time to next occupied period" annotation (Placement(transformation(extent={{-240,140},{-200,180}}), iconTransformation(extent={{-240,100},{-200,140}}))); @@ -347,28 +406,19 @@ block Controller Buildings.Controls.OBC.CDL.Interfaces.RealInput TZon( final unit="K", displayUnit="degC", - final quantity = - "ThermodynamicTemperature") + final quantity="ThermodynamicTemperature") "Measured zone temperatures" annotation (Placement(transformation(extent={{-240,-40},{-200,0}}), iconTransformation(extent={{-240,60},{-200,100}}))); - Buildings.Controls.OBC.CDL.Interfaces.RealInput TSup( final unit="K", displayUnit="degC", - final quantity = - "ThermodynamicTemperature") + final quantity="ThermodynamicTemperature") "Measured supply air temperature" annotation (Placement(transformation(extent={{-240,-10},{-200,30}}), iconTransformation(extent={{-240,-100},{-200,-60}}))); - Buildings.Controls.OBC.CDL.Interfaces.RealInput nOcc(final unit="1") if - have_occSen - "Number of occupants" - annotation (Placement(transformation(extent={{-240,-80},{-200,-40}}), - iconTransformation(extent={{-240,-180},{-200,-140}}))); - Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yFan "Fan enable signal" annotation (Placement(transformation(extent={{200,180},{240,220}}), @@ -377,8 +427,7 @@ block Controller Buildings.Controls.OBC.CDL.Interfaces.RealOutput TAirSup( final unit="K", displayUnit="degC", - final quantity = - "ThermodynamicTemperature") + final quantity="ThermodynamicTemperature") "Supply air temperature setpoint" annotation (Placement(transformation(extent={{200,-40},{240,0}}), iconTransformation(extent={{200,-140},{240,-100}}))); @@ -394,8 +443,7 @@ block Controller Buildings.Controls.OBC.CDL.Interfaces.RealOutput TZonHeaSet( final unit="K", displayUnit="degC", - final quantity = - "ThermodynamicTemperature") + final quantity="ThermodynamicTemperature") "Heating setpoint temperature" annotation (Placement(transformation(extent={{200,100},{240,140}}), iconTransformation(extent={{200,20},{240,60}}))); @@ -403,8 +451,7 @@ block Controller Buildings.Controls.OBC.CDL.Interfaces.RealOutput TZonCooSet( final unit="K", displayUnit="degC", - final quantity = - "ThermodynamicTemperature") + final quantity="ThermodynamicTemperature") "Cooling setpoint temperature" annotation (Placement(transformation(extent={{200,60},{240,100}}), iconTransformation(extent={{200,-20},{240,20}}))); @@ -425,7 +472,6 @@ block Controller annotation (Placement(transformation(extent={{200,0},{240,40}}), iconTransformation(extent={{200,-60},{240,-20}}))); - Buildings.Controls.OBC.ASHRAE.G36_PR1.AHUs.SingleZone.VAV.SetPoints.ModeAndSetPoints modSetPoi( final have_winSen=have_winSen, @@ -490,50 +536,50 @@ block Controller "Window status" annotation (Placement(transformation(extent={{-180,-50},{-160,-30}}))); - Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold havOcc( - final t=0.5) if have_occSen + Buildings.Controls.OBC.CDL.Integers.GreaterEqualThreshold havOcc( + final t=1) if have_occSen "Check if there is occupant" annotation (Placement(transformation(extent={{-100,50},{-80,70}}))); - Subsequences.SupplyAirTemperature TSupAir(have_coolingCoil=have_coolingCoil, - have_heatingCoil=have_heatingCoil, - THeaSupAirHi=TSupSetMax, - heaPerMax=heaPerMin, - TCooSupAirHi=TSupSetMin, - cooPerMax=cooPerMin, - heaDea=heaDea, - cooDea=cooDea, - controllerTypeCooCoi=controllerTypeCooCoi, - kCooCoi=kCooCoi, - TiCooCoi=TiCooCoi, - TdCooCoi=TdCooCoi, - controllerTypeHeaCoi=controllerTypeHeaCoi, - kHeaCoi=kHeaCoi, - TiHeaCoi=TiHeaCoi, - TdHeaCoi=TdHeaCoi, - deaHysLim=deaHysLim) + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.SupplyAirTemperature TSupAir( + final have_coolingCoil=have_coolingCoil, + final have_heatingCoil=have_heatingCoil, + final THeaSupAirHi=TSupSetMax, + final heaPerMax=heaPerMin, + final TCooSupAirHi=TSupSetMin, + final cooPerMax=cooPerMin, + final heaDea=heaDea, + final cooDea=cooDea, + final controllerTypeCooCoi=controllerTypeCooCoi, + final kCooCoi=kCooCoi, + final TiCooCoi=TiCooCoi, + final TdCooCoi=TdCooCoi, + final controllerTypeHeaCoi=controllerTypeHeaCoi, + final kHeaCoi=kHeaCoi, + final TiHeaCoi=TiHeaCoi, + final TdHeaCoi=TdHeaCoi, + final deaHysLim=deaHysLim) + "Supply air temperature setpoint controller" annotation (Placement(transformation(extent={{100,0},{120,20}}))); - Subsequences.FanSpeed fanSpe(have_coolingCoil=have_coolingCoil, - have_heatingCoil=have_heatingCoil, - deaSpe=deaSpe, - heaSpeMin=heaSpeMin, - heaPerMin=heaPerMin, - heaSpeMax=heaSpeMax, - heaPerMax=heaPerMaxFanSpe, - cooSpeMin=cooSpeMin, - cooPerMin=cooPerMin, - cooSpeMax=cooSpeMax, - cooPerMax=cooPerMaxFanSpe, - heaDea=heaDea, - cooDea=cooDea, - deaHysLim=deaHysLim) + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.FanSpeed fanSpe( + final have_coolingCoil=have_coolingCoil, + final have_heatingCoil=have_heatingCoil, + final deaSpe=deaSpe, + final heaSpeMin=heaSpeMin, + final heaPerMin=heaPerMin, + final heaSpeMax=heaSpeMax, + final heaPerMax=heaPerMaxFanSpe, + final cooSpeMin=cooSpeMin, + final cooPerMin=cooPerMin, + final cooSpeMax=cooSpeMax, + final cooPerMax=cooPerMaxFanSpe, + final heaDea=heaDea, + final cooDea=cooDea, + final deaHysLim=deaHysLim) + "Fan speed controller" annotation (Placement(transformation(extent={{120,170},{140,190}}))); - - - - equation connect(conInt.y, intEqu.u2) annotation (Line(points={{-138,-170},{-120,-170}, {-120,-178},{-102,-178}},color={255,127,0})); @@ -556,7 +602,7 @@ equation -100,152},{-100,220},{-82,220}}, color={0,0,127})); connect(modSetPoi.TZonHeaSet, TZonHeaSet) annotation (Line(points={{-118,152}, - {-100,152},{-100,120},{220,120}}, color={0,0,127})); + {-54,152},{-54,120},{220,120}}, color={0,0,127})); connect(modSetPoi.TZonCooSet, cooPI.u_s) annotation (Line(points={{-118,160}, {-42,160}},color={0,0,127})); @@ -582,9 +628,6 @@ equation connect(uWin, modSetPoi.uWin) annotation (Line(points={{-220,-140},{-150,-140}, {-150,166},{-142,166}},color={255,0,255})); - connect(nOcc, havOcc.u) annotation (Line(points={{-220,-60},{-120,-60},{-120,60}, - {-102,60}}, color={0,0,127})); - connect(havOcc.y, modSetPoi.uOccSen) annotation (Line(points={{-78,60},{-60,60}, {-60,112},{-180,112},{-180,154},{-142,154}}, color={255,0,255})); @@ -600,10 +643,10 @@ equation connect(modSetPoi.uHeaDemLimLev, uHeaDemLimLev) annotation (Line(points={{-142, 150},{-156,150},{-156,40},{-220,40}}, color={255,127,0})); - connect(TSupAir.yCooCoi, yCooCoi) annotation (Line(points={{122,4},{160,4},{160, + connect(TSupAir.yCooCoi, yCooCoi) annotation (Line(points={{122,5},{160,5},{160, -60},{220,-60}}, color={0,0,127})); - connect(TSupAir.yHeaCoi, yHeaCoi) annotation (Line(points={{122,16},{160,16},{ + connect(TSupAir.yHeaCoi, yHeaCoi) annotation (Line(points={{122,15},{160,15},{ 160,20},{220,20}}, color={0,0,127})); connect(TSupAir.TAirSupSet, TAirSup) annotation (Line(points={{122,10},{180,10}, @@ -618,7 +661,8 @@ equation connect(modSetPoi.yOpeMod, fanSpe.opeMod) annotation (Line(points={{-118,168}, {-60,168},{-60,180},{20,180},{20,188},{118,188}}, color={255,127,0})); - connect(TSup, TSupAir.TAirSup) annotation (Line(points={{-220,10},{98,10}}, + connect(TSup, TSupAir.TAirSup) annotation (Line(points={{-220,10},{-62,10},{-62, + 8.33333},{98,8.33333}}, color={0,0,127})); connect(uFan, fanSpe.uFanPro) annotation (Line(points={{-220,-100},{28,-100},{ @@ -631,20 +675,27 @@ equation 174},{118,174}}, color={0,0,127})); connect(modSetPoi.TZonCooSet, TSupAir.TZonSetCoo) annotation (Line(points={{-118, - 160},{-50,160},{-50,2},{98,2}}, color={0,0,127})); + 160},{-50,160},{-50,1.66667},{98,1.66667}}, + color={0,0,127})); connect(modSetPoi.TZonHeaSet, TSupAir.TZonSetHea) annotation (Line(points={{-118, - 152},{-54,152},{-54,18},{98,18}}, color={0,0,127})); + 152},{-54,152},{-54,15},{98,15}}, color={0,0,127})); connect(cooPI.y, TSupAir.uCoo) annotation (Line(points={{-18,160},{20,160},{20, - 6},{98,6}}, color={0,0,127})); + 5},{98,5}}, color={0,0,127})); - connect(heaPI.y, TSupAir.uHea) annotation (Line(points={{-58,220},{0,220},{0,14}, - {98,14}}, color={0,0,127})); + connect(heaPI.y, TSupAir.uHea) annotation (Line(points={{-58,220},{0,220},{0, + 11.6667},{98,11.6667}}, + color={0,0,127})); connect(TZonHeaSet, TZonHeaSet) annotation (Line(points={{220,120},{220,120}}, color={0,0,127})); + connect(uFan, TSupAir.uFan) annotation (Line(points={{-220,-100},{28,-100},{ + 28,18.3333},{98,18.3333}}, + color={255,0,255})); + connect(nOcc, havOcc.u) annotation (Line(points={{-220,-60},{-120,-60},{-120,60}, + {-102,60}}, color={255,127,0})); annotation (defaultComponentName="conFCU", Icon(coordinateSystem(preserveAspectRatio=false, extent={{-200,-220},{200,220}}), graphics={Rectangle( @@ -847,5 +898,4 @@ First implementation. ")); - end Controller; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo index 1421e8fe5a2..78b225f78f3 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo @@ -1,8 +1,6 @@ within Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences; - block FanSpeed - - "Fan speed setpoint subsequence" + "Fan speed setpoint subsequence" parameter Boolean have_coolingCoil "Does the fan coil unit have a cooling coil?"; @@ -100,12 +98,16 @@ block FanSpeed "System operating mode" annotation (Placement(transformation(extent={{-140,60},{-100,100}}))); - Buildings.Controls.OBC.CDL.Interfaces.RealInput uHea if have_heatingCoil - "Heating loop signal" + Buildings.Controls.OBC.CDL.Interfaces.RealInput uHea( + final unit="1", + displayUnit="1") if have_heatingCoil + "Heating loop signal" annotation (Placement(transformation(extent={{-140,-40},{-100,0}}))); - Buildings.Controls.OBC.CDL.Interfaces.RealInput uCoo if have_coolingCoil - "Cooling loop signal" + Buildings.Controls.OBC.CDL.Interfaces.RealInput uCoo( + final unit="1", + displayUnit="1") if have_coolingCoil + "Cooling loop signal" annotation (Placement(transformation(extent={{-140,-120},{-100,-80}}), iconTransformation(extent={{-140,-80},{-100,-40}}))); @@ -114,16 +116,20 @@ block FanSpeed annotation (Placement(transformation(extent={{120,20},{160,60}}), iconTransformation(extent={{100,0},{140,40}}))); - Buildings.Controls.OBC.CDL.Interfaces.RealOutput yFanSpe + Buildings.Controls.OBC.CDL.Interfaces.RealOutput yFanSpe( + final unit="1", + displayUnit="1") "Fan speed signal" annotation (Placement(transformation(extent={{120,-20},{160,20}}), iconTransformation(extent={{100,-40},{140,0}}))); +protected Buildings.Controls.OBC.CDL.Integers.Equal intEqu "Check if zone is unoccupied" annotation (Placement(transformation(extent={{-40,70},{-20,90}}))); - Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt(k=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.unoccupied) + Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt( + final k=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.unoccupied) "Constant unoccupied mode signal" annotation (Placement(transformation(extent={{-80,50},{-60,70}}))); @@ -143,15 +149,18 @@ block FanSpeed "Heating fan speed signal" annotation (Placement(transformation(extent={{-30,-30},{-10,-10}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con[2](k={heaPerMin,heaPerMax}) + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con[2]( + final k={heaPerMin,heaPerMax}) "Heating loop signal support points" annotation (Placement(transformation(extent={{-80,-50},{-60,-30}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con1[2](k={heaSpeMin,heaSpeMax}) + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con1[2]( + final k={heaSpeMin,heaSpeMax}) "Heating fan speed limit signals" annotation (Placement(transformation(extent={{-80,-10},{-60,10}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con2[2](k={cooSpeMin,cooSpeMax}) + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con2[2]( + final k={cooSpeMin,cooSpeMax}) "Cooling fan speed limit signals" annotation (Placement(transformation(extent={{-80,-90},{-60,-70}}))); @@ -159,15 +168,19 @@ block FanSpeed "Cooling fan speed signal" annotation (Placement(transformation(extent={{-30,-110},{-10,-90}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con3[2](k={cooPerMin,cooPerMax}) + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con3[2]( + final k={cooPerMin,cooPerMax}) "Cooling loop signal support points" annotation (Placement(transformation(extent={{-80,-130},{-60,-110}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con4(k=deaSpe) + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con4( + final k=deaSpe) "Deadband mode fan speed signal" annotation (Placement(transformation(extent={{-30,-70},{-10,-50}}))); - Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys(uLow=heaDea - deaHysLim, uHigh=heaDea) + Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys( + final uLow=heaDea - deaHysLim, + final uHigh=heaDea) "Hysteresis for switching between deadband mode and heating mode" annotation (Placement(transformation(extent={{0,-50},{20,-30}}))); @@ -175,7 +188,9 @@ block FanSpeed "Switch for turning on heating mode from deadband mode" annotation (Placement(transformation(extent={{30,-70},{50,-50}}))); - Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys1(uLow=cooDea - deaHysLim, uHigh=cooDea) + Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys1( + final uLow=cooDea - deaHysLim, + final uHigh=cooDea) "Hysteresis for switching on cooling mode from deadband mode" annotation (Placement(transformation(extent={{0,-90},{20,-70}}))); @@ -187,11 +202,13 @@ block FanSpeed "Multiply fan speed signal by fan enable signal" annotation (Placement(transformation(extent={{90,-50},{110,-30}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con6(k=0) if not have_heatingCoil + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con6( + final k=0) if not have_heatingCoil "Constant zero signal" annotation (Placement(transformation(extent={{-50,10},{-30,30}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con8(k=0) if not have_coolingCoil + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con8( + final k=0) if not have_coolingCoil "Constant zero signal" annotation (Placement(transformation(extent={{-40,-140},{-20,-120}}))); @@ -308,7 +325,35 @@ equation extent={{-100,140},{100,100}}, textColor={0,0,255}, textString="%name")}), - Diagram(coordinateSystem(preserveAspectRatio=false, - extent={{-100,-140},{120,100}}))); - + Diagram(coordinateSystem(preserveAspectRatio=false, + extent={{-100,-140},{120,100}})), + Documentation(info=" +

+ Block that outputs the fan enable signal and the fan speed signal based on + the heating and cooling loop signals. +

+

+ The fan enable signal yFan is switched to false + when the operating mode signal opeMod is unoccupied, + and is set to true otherwise. +
+ The fan speed signal yFanSpe is varied from + the minimum cooling mode fan speed cooSpeMin to the maximum + cooling mode fan speed cooSpeMax, + when the cooling loop signal uCoo varies from the minimum limit + cooPerMin to the maximum limit cooPerMax. + Similarly, yFanSpe is varied from the minimum heating mode fan speed + heaSpeMin to the maximum heating mode fan speed heaSpeMax, + when the heating loop signal uHea varies from the minimum limit + heaPerMin to the maximum limit heaPerMax. + The setpoint in deadband mode is equal to the deadband fan speed deaSpe. +

+ ", revisions=" +
    +
  • + March 17, 2021, by Karthik Devaprasad:
    + First implementation. +
  • +
+ ")); end FanSpeed; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/SupplyAirTemperature.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/SupplyAirTemperature.mo index 37940a4fe93..a4472d37ad8 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/SupplyAirTemperature.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/SupplyAirTemperature.mo @@ -1,8 +1,6 @@ within Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences; - block SupplyAirTemperature - - "Subsequence for calculating supply air temperature setpoint" + "Subsequence for calculating supply air temperature setpoint" parameter Boolean have_coolingCoil "Does the fan coil unit have a cooling coil?"; @@ -83,7 +81,7 @@ block SupplyAirTemperature "Integrator time constant" annotation(Dialog(tab="PID controller parameters", group="Cooling coil", enable = controllerTypeCooCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PI or - controllerTypeCooCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PID)); + controllerTypeCooCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PID)); parameter Real TdCooCoi( final unit="s", @@ -92,7 +90,7 @@ block SupplyAirTemperature "Derivative block time constant" annotation(Dialog(tab="PID controller parameters", group="Cooling coil", enable = controllerTypeCooCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PD or - controllerTypeCooCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PID)); + controllerTypeCooCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PID)); parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerTypeHeaCoi=Buildings.Controls.OBC.CDL.Types.SimpleController.PI "Controller type" @@ -111,7 +109,7 @@ block SupplyAirTemperature "Integrator block time constant" annotation(Dialog(tab="PID controller parameters", group="Heating coil", enable = controllerTypeHeaCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PI or - controllerTypeHeaCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PID)); + controllerTypeHeaCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PID)); parameter Real TdHeaCoi( final unit="s", @@ -120,8 +118,7 @@ block SupplyAirTemperature "Derivative block time constant" annotation(Dialog(tab="PID controller parameters", group="Heating coil", enable = controllerTypeHeaCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PD or - controllerTypeHeaCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PID)); - + controllerTypeHeaCoi == Buildings.Controls.OBC.CDL.Types.SimpleController.PID)); parameter Real deaHysLim( final unit="1", @@ -129,248 +126,338 @@ block SupplyAirTemperature "Hysteresis limits for deadband mode transitions" annotation(Dialog(tab="Advanced")); - Buildings.Controls.OBC.CDL.Interfaces.RealInput uHea if have_heatingCoil + Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uFan + "Fan proven on signal" + annotation (Placement(transformation(extent={{-160,120},{-120,160}}), + iconTransformation(extent={{-140,80},{-100,120}}))); + + Buildings.Controls.OBC.CDL.Interfaces.RealInput uHea( + final unit="1", + displayUnit="1") if have_heatingCoil "Heating loop signal" - annotation (Placement(transformation(extent={{-140,20},{-100,60}}), - iconTransformation(extent={{-140,20},{-100,60}}))); + annotation (Placement(transformation(extent={{-160,20},{-120,60}}), + iconTransformation(extent={{-140,0},{-100,40}}))); - Buildings.Controls.OBC.CDL.Interfaces.RealInput uCoo if have_coolingCoil + Buildings.Controls.OBC.CDL.Interfaces.RealInput uCoo( + final unit="1", + displayUnit="1") if have_coolingCoil "Cooling loop signal" - annotation (Placement(transformation(extent={{-140,-60},{-100,-20}}), - iconTransformation(extent={{-140,-60},{-100,-20}}))); + annotation (Placement(transformation(extent={{-160,-60},{-120,-20}}), + iconTransformation(extent={{-140,-80},{-100,-40}}))); - Buildings.Controls.OBC.CDL.Interfaces.RealInput TAirSup + Buildings.Controls.OBC.CDL.Interfaces.RealInput TAirSup( + final unit="K", + displayUnit="K", + quantity="ThermodynamicTemperature") "Measured supply air temperature" - annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); + annotation (Placement(transformation(extent={{-160,-20},{-120,20}}), + iconTransformation(extent={{-140,-40},{-100,0}}))); - Buildings.Controls.OBC.CDL.Interfaces.RealInput TZonSetHea if - have_heatingCoil - "Zone heating temperature setpoint" annotation (Placement(transformation( - extent={{-140,60},{-100,100}}), iconTransformation(extent={{-140,60},{ - -100,100}}))); + Buildings.Controls.OBC.CDL.Interfaces.RealInput TZonSetHea( + final unit="K", + displayUnit="K", + quantity="ThermodynamicTemperature") if have_heatingCoil + "Zone heating temperature setpoint" + annotation (Placement(transformation(extent={{-160,60},{-120,100}}), + iconTransformation(extent={{-140,40},{-100,80}}))); - Buildings.Controls.OBC.CDL.Interfaces.RealInput TZonSetCoo if - have_coolingCoil - "Zone cooling temperature setpoint" annotation (Placement(transformation( - extent={{-140,-120},{-100,-80}}), iconTransformation(extent={{-140,-100}, - {-100,-60}}))); + Buildings.Controls.OBC.CDL.Interfaces.RealInput TZonSetCoo( + final unit="K", + displayUnit="K", + quantity="ThermodynamicTemperature") if have_coolingCoil + "Zone cooling temperature setpoint" + annotation (Placement(transformation(extent={{-160,-120},{-120,-80}}), + iconTransformation(extent={{-140,-120},{-100,-80}}))); - Buildings.Controls.OBC.CDL.Interfaces.RealOutput yHeaCoi if have_heatingCoil + Buildings.Controls.OBC.CDL.Interfaces.RealOutput yHeaCoi( + final unit="1", + displayUnit="1") if have_heatingCoil "Heating coil signal" - annotation (Placement(transformation(extent={{100,40},{140,80}}))); + annotation (Placement(transformation(extent={{120,40},{160,80}}), + iconTransformation(extent={{100,40},{140,80}}))); - Buildings.Controls.OBC.CDL.Interfaces.RealOutput yCooCoi if have_coolingCoil - "Heating coil signal" - annotation (Placement(transformation(extent={{100,-80},{140,-40}}))); + Buildings.Controls.OBC.CDL.Interfaces.RealOutput yCooCoi( + final unit="1", + displayUnit="1") if have_coolingCoil + "Cooling coil signal" + annotation (Placement(transformation(extent={{120,-80},{160,-40}}), + iconTransformation(extent={{100,-80},{140,-40}}))); - Buildings.Controls.OBC.CDL.Interfaces.RealOutput TAirSupSet + Buildings.Controls.OBC.CDL.Interfaces.RealOutput TAirSupSet( + final unit="K", + displayUnit="K", + quantity="ThermodynamicTemperature") "Supply air temperature setpoint" - annotation (Placement(transformation(extent={{100,-20},{140,20}}))); + annotation (Placement(transformation(extent={{120,-20},{160,20}}), + iconTransformation(extent={{100,-20},{140,20}}))); + Buildings.Controls.OBC.CDL.Continuous.Switch swi2 + "Switch for turning on cooling mode from deadband mode" + annotation (Placement(transformation(extent={{0,-30},{20,-10}}))); + +protected Buildings.Controls.OBC.CDL.Continuous.Line lin "Convert heating loop signal to supply air temperature setpoint" - annotation (Placement(transformation(extent={{-40,50},{-20,70}}))); + annotation (Placement(transformation(extent={{-60,50},{-40,70}}))); Buildings.Controls.OBC.CDL.Continuous.Line lin1 "Convert cooling loop signal to supply air temperature setpoint" - annotation (Placement(transformation(extent={{-40,-70},{-20,-50}}))); + annotation (Placement(transformation(extent={{-60,-70},{-40,-50}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con1(k=THeaSupAirHi) + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con1( + final k=THeaSupAirHi) "Heating supply air temperature setpoint limit signals" - annotation (Placement(transformation(extent={{-90,90},{-70,110}}))); + annotation (Placement(transformation(extent={{-110,90},{-90,110}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con2 - [2](k={heaPerMin,heaPerMax}) + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con2[2]( + final k={heaPerMin,heaPerMax}) "Heating loop signal support points" - annotation (Placement(transformation(extent={{-80,10},{-60,30}}))); + annotation (Placement(transformation(extent={{-100,10},{-80,30}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con3(k=TCooSupAirHi) + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con3( + final k=TCooSupAirHi) "Cooling supply air temperature setpoint limit signals" - annotation (Placement(transformation(extent={{-80,-30},{-60,-10}}))); + annotation (Placement(transformation(extent={{-100,-30},{-80,-10}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con4[2](k={cooPerMin,cooPerMax}) + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con4[2]( + final k={cooPerMin,cooPerMax}) "Cooling loop signal support points" - annotation (Placement(transformation(extent={{-80,-90},{-60,-70}}))); + annotation (Placement(transformation(extent={{-100,-90},{-80,-70}}))); Buildings.Controls.OBC.CDL.Continuous.PID conPID( - controllerType=controllerTypeHeaCoi, - k=kHeaCoi, - Ti=TiHeaCoi, - Td=TdHeaCoi) - annotation (Placement(transformation(extent={{40,50},{60,70}}))); + final controllerType=controllerTypeHeaCoi, + final k=kHeaCoi, + final Ti=TiHeaCoi, + final Td=TdHeaCoi) + "PID controller for heating coil" + annotation (Placement(transformation(extent={{20,50},{40,70}}))); Buildings.Controls.OBC.CDL.Continuous.PID conPID1( - controllerType=controllerTypeCooCoi, - k=kCooCoi, - Ti=TiCooCoi, - Td=TdCooCoi, reverseActing=false) - annotation (Placement(transformation(extent={{60,-70},{80,-50}}))); - - Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys(uLow=heaDea - deaHysLim, uHigh=heaDea) + final controllerType=controllerTypeCooCoi, + final k=kCooCoi, + final Ti=TiCooCoi, + final Td=TdCooCoi, + final reverseActing=false) + "PID controller for cooling coil" + annotation (Placement(transformation(extent={{40,-70},{60,-50}}))); + + Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys( + final uLow=heaDea - deaHysLim, + final uHigh=heaDea) "Hysteresis for switching between deadband mode and heating mode" - annotation (Placement(transformation(extent={{-20,90},{0,110}}))); + annotation (Placement(transformation(extent={{-40,90},{-20,110}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con6(k=0) if not have_heatingCoil + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con6( + final k=0) if not have_heatingCoil "Constant zero signal" - annotation (Placement(transformation(extent={{-50,90},{-30,110}}))); + annotation (Placement(transformation(extent={{-70,90},{-50,110}}))); Buildings.Controls.OBC.CDL.Continuous.Switch swi1 "Switch for turning on heating mode from deadband mode" - annotation (Placement(transformation(extent={{0,50},{20,70}}))); + annotation (Placement(transformation(extent={{-20,50},{0,70}}))); - Buildings.Controls.OBC.CDL.Continuous.Switch swi2 - "Switch for turning on cooling mode from deadband mode" - annotation (Placement(transformation(extent={{20,-30},{40,-10}}))); - - Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys1(uLow=cooDea - deaHysLim, uHigh=cooDea) + Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys1( + final uLow=cooDea - deaHysLim, + final uHigh=cooDea) "Hysteresis for switching on cooling mode from deadband mode" - annotation (Placement(transformation(extent={{-20,-30},{0,-10}}))); + annotation (Placement(transformation(extent={{-40,-30},{-20,-10}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con8(k=0) if not have_coolingCoil + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con8( + final k=0) if not have_coolingCoil "Constant zero signal" - annotation (Placement(transformation(extent={{-20,-110},{0,-90}}))); + annotation (Placement(transformation(extent={{-100,-130},{-80,-110}}))); Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea "Convert Boolean to Real" - annotation (Placement(transformation(extent={{20,90},{40,110}}))); + annotation (Placement(transformation(extent={{0,90},{20,110}}))); Buildings.Controls.OBC.CDL.Continuous.Multiply mul "Output heating coil signal only when heating mode is enabled" - annotation (Placement(transformation(extent={{74,50},{94,70}}))); + annotation (Placement(transformation(extent={{60,50},{80,70}}))); Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea1 "Convert Boolean to Real" - annotation (Placement(transformation(extent={{20,-80},{40,-60}}))); + annotation (Placement(transformation(extent={{0,-80},{20,-60}}))); Buildings.Controls.OBC.CDL.Continuous.Multiply mul1 "Output cooling coil signal only when cooling mode is enabled" - annotation (Placement(transformation(extent={{74,-112},{94,-92}}))); + annotation (Placement(transformation(extent={{60,-110},{80,-90}}))); + + Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea2 + "Boolean to Real conversion" + annotation (Placement(transformation(extent={{-100,130},{-80,150}}))); + Buildings.Controls.OBC.CDL.Continuous.Multiply mul2 + "Output heating coil signal only when fan is proven on" + annotation (Placement(transformation(extent={{90,50},{110,70}}))); + Buildings.Controls.OBC.CDL.Continuous.Multiply mul3 + "Output cooling coil signal only when fan is proven on" + annotation (Placement(transformation(extent={{90,-70},{110,-50}}))); equation connect(uHea, lin.u) - annotation (Line(points={{-120,40},{-82,40},{-82,60},{-42,60}}, + annotation (Line(points={{-140,40},{-102,40},{-102,60},{-62,60}}, color={0,0,127})); - connect(con2[1].y, lin.x1) annotation (Line(points={{-58,20},{-46,20},{-46,68}, - {-42,68}}, color={0,0,127})); + connect(con2[1].y, lin.x1) annotation (Line(points={{-78,20},{-66,20},{-66,68}, + {-62,68}}, color={0,0,127})); - connect(con2[2].y, lin.x2) annotation (Line(points={{-58,20},{-46,20},{-46,56}, - {-42,56}}, color={0,0,127})); + connect(con2[2].y, lin.x2) annotation (Line(points={{-78,20},{-66,20},{-66,56}, + {-62,56}}, color={0,0,127})); connect(uCoo, lin1.u) - annotation (Line(points={{-120,-40},{-82,-40},{-82,-60},{-42,-60}}, + annotation (Line(points={{-140,-40},{-102,-40},{-102,-60},{-62,-60}}, color={0,0,127})); - connect(con4[1].y, lin1.x1) annotation (Line(points={{-58,-80},{-54,-80},{-54, - -52},{-42,-52}}, color={0,0,127})); + connect(con4[1].y, lin1.x1) annotation (Line(points={{-78,-80},{-74,-80},{-74, + -52},{-62,-52}}, color={0,0,127})); - connect(con4[2].y, lin1.x2) annotation (Line(points={{-58,-80},{-54,-80},{-54, - -64},{-42,-64}}, color={0,0,127})); + connect(con4[2].y, lin1.x2) annotation (Line(points={{-78,-80},{-74,-80},{-74, + -64},{-62,-64}}, color={0,0,127})); connect(TAirSup, conPID.u_m) - annotation (Line(points={{-120,0},{50,0},{50,48}}, color={0,0,127})); + annotation (Line(points={{-140,0},{30,0},{30,48}}, color={0,0,127})); - connect(TAirSup, conPID1.u_m) annotation (Line(points={{-120,0},{50,0},{50, - -78},{70,-78},{70,-72}}, color={0,0,127})); + connect(TAirSup, conPID1.u_m) annotation (Line(points={{-140,0},{30,0},{30,-78}, + {50,-78},{50,-72}}, color={0,0,127})); - connect(lin.y, swi1.u1) annotation (Line(points={{-18,60},{-10,60},{-10,68},{ - -2,68}}, color={0,0,127})); + connect(lin.y, swi1.u1) annotation (Line(points={{-38,60},{-30,60},{-30,68},{-22, + 68}}, color={0,0,127})); connect(con6.y, hys.u) - annotation (Line(points={{-28,100},{-22,100}}, color={0,0,127})); + annotation (Line(points={{-48,100},{-42,100}}, color={0,0,127})); - connect(con6.y, lin.u) annotation (Line(points={{-28,100},{-26,100},{-26,76}, - {-54,76},{-54,60},{-42,60}}, color={0,0,127})); + connect(con6.y, lin.u) annotation (Line(points={{-48,100},{-46,100},{-46,76},{ + -74,76},{-74,60},{-62,60}}, color={0,0,127})); - connect(uHea, hys.u) annotation (Line(points={{-120,40},{-54,40},{-54,76},{-26, - 76},{-26,100},{-22,100}}, color={0,0,127})); + connect(uHea, hys.u) annotation (Line(points={{-140,40},{-74,40},{-74,76},{-46, + 76},{-46,100},{-42,100}}, color={0,0,127})); - connect(hys.y, swi1.u2) annotation (Line(points={{2,100},{10,100},{10,80},{-6, - 80},{-6,60},{-2,60}}, color={255,0,255})); + connect(hys.y, swi1.u2) annotation (Line(points={{-18,100},{-10,100},{-10,80}, + {-26,80},{-26,60},{-22,60}}, + color={255,0,255})); - connect(con8.y, lin1.u) annotation (Line(points={{2,-100},{10,-100},{10,-80},{ - -46,-80},{-46,-60},{-42,-60}}, color={0,0,127})); + connect(con8.y, lin1.u) annotation (Line(points={{-78,-120},{-66,-120},{-66,-60}, + {-62,-60}}, color={0,0,127})); connect(hys1.y, swi2.u2) - annotation (Line(points={{2,-20},{18,-20}}, color={255,0,255})); + annotation (Line(points={{-18,-20},{-2,-20}}, + color={255,0,255})); - connect(uCoo, hys1.u) annotation (Line(points={{-120,-40},{-46,-40},{-46,-20}, - {-22,-20}}, color={0,0,127})); + connect(uCoo, hys1.u) annotation (Line(points={{-140,-40},{-66,-40},{-66,-20}, + {-42,-20}}, color={0,0,127})); - connect(con8.y, hys1.u) annotation (Line(points={{2,-100},{10,-100},{10,-80},{ - -46,-80},{-46,-20},{-22,-20}}, color={0,0,127})); + connect(con8.y, hys1.u) annotation (Line(points={{-78,-120},{-66,-120},{-66,-20}, + {-42,-20}}, color={0,0,127})); - connect(swi1.y, swi2.u3) annotation (Line(points={{22,60},{28,60},{28,40},{10, - 40},{10,-28},{18,-28}}, color={0,0,127})); + connect(swi1.y, swi2.u3) annotation (Line(points={{2,60},{8,60},{8,40},{-10,40}, + {-10,-28},{-2,-28}}, color={0,0,127})); - connect(lin1.y, swi2.u1) annotation (Line(points={{-18,-60},{6,-60},{6,-12},{18, - -12}}, color={0,0,127})); + connect(lin1.y, swi2.u1) annotation (Line(points={{-38,-60},{-14,-60},{-14,-12}, + {-2,-12}}, + color={0,0,127})); - connect(swi2.y, conPID.u_s) annotation (Line(points={{42,-20},{56,-20},{56,40}, - {32,40},{32,60},{38,60}}, color={0,0,127})); + connect(swi2.y, conPID.u_s) annotation (Line(points={{22,-20},{36,-20},{36,40}, + {12,40},{12,60},{18,60}}, color={0,0,127})); - connect(swi2.y, conPID1.u_s) annotation (Line(points={{42,-20},{56,-20},{56,-60}, - {58,-60}}, color={0,0,127})); + connect(swi2.y, conPID1.u_s) annotation (Line(points={{22,-20},{36,-20},{36,-60}, + {38,-60}}, color={0,0,127})); - connect(con1.y, lin.f2) annotation (Line(points={{-68,100},{-60,100},{-60,52}, - {-42,52}}, color={0,0,127})); + connect(con1.y, lin.f2) annotation (Line(points={{-88,100},{-80,100},{-80,52}, + {-62,52}}, color={0,0,127})); - connect(con3.y, lin1.f2) annotation (Line(points={{-58,-20},{-50,-20},{-50,-68}, - {-42,-68}}, color={0,0,127})); + connect(con3.y, lin1.f2) annotation (Line(points={{-78,-20},{-70,-20},{-70,-68}, + {-62,-68}}, color={0,0,127})); - connect(TZonSetHea, lin.f1) annotation (Line(points={{-120,80},{-56,80},{-56,64}, - {-42,64}}, color={0,0,127})); + connect(TZonSetHea, lin.f1) annotation (Line(points={{-140,80},{-76,80},{-76,64}, + {-62,64}}, color={0,0,127})); - connect(TZonSetCoo, lin1.f1) annotation (Line(points={{-120,-100},{-52,-100},{ - -52,-56},{-42,-56}}, color={0,0,127})); + connect(TZonSetCoo, lin1.f1) annotation (Line(points={{-140,-100},{-72,-100},{ + -72,-56},{-62,-56}}, color={0,0,127})); - connect(TAirSup, swi1.u3) annotation (Line(points={{-120,0},{-10,0},{-10,52},{ - -2,52}}, color={0,0,127})); + connect(TAirSup, swi1.u3) annotation (Line(points={{-140,0},{-30,0},{-30,52},{ + -22,52}},color={0,0,127})); - connect(con6.y, lin.f1) annotation (Line(points={{-28,100},{-26,100},{-26,76}, - {-54,76},{-54,64},{-42,64}}, color={0,0,127})); + connect(con6.y, lin.f1) annotation (Line(points={{-48,100},{-46,100},{-46,76}, + {-74,76},{-74,64},{-62,64}}, color={0,0,127})); - connect(con8.y, lin1.f1) annotation (Line(points={{2,-100},{10,-100},{10,-80}, - {-46,-80},{-46,-56},{-42,-56}}, color={0,0,127})); + connect(con8.y, lin1.f1) annotation (Line(points={{-78,-120},{-66,-120},{-66,-56}, + {-62,-56}}, color={0,0,127})); connect(hys.y, booToRea.u) - annotation (Line(points={{2,100},{18,100}}, color={255,0,255})); - - connect(yHeaCoi, mul.y) - annotation (Line(points={{120,60},{96,60}}, color={0,0,127})); - - connect(conPID.y, mul.u2) annotation (Line(points={{62,60},{68,60},{68,54},{ - 72,54}}, color={0,0,127})); - - connect(booToRea.y, mul.u1) annotation (Line(points={{42,100},{68,100},{68,66}, - {72,66}}, color={0,0,127})); - - connect(hys1.y, booToRea1.u) annotation (Line(points={{2,-20},{14,-20},{14, - -70},{18,-70}}, color={255,0,255})); - - connect(booToRea1.y, mul1.u2) annotation (Line(points={{42,-70},{46,-70},{46, - -108},{72,-108}}, color={0,0,127})); - - connect(conPID1.y, mul1.u1) annotation (Line(points={{82,-60},{84,-60},{84, - -86},{68,-86},{68,-96},{72,-96}}, color={0,0,127})); - - connect(mul1.y, yCooCoi) annotation (Line(points={{96,-102},{98,-102},{98,-60}, - {120,-60}}, color={0,0,127})); - - connect(swi2.y, TAirSupSet) annotation (Line(points={{42,-20},{56,-20},{56,0}, - {120,0}}, color={0,0,127})); - - annotation (defaultComponentName = - "TSupAir", - Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100, - 100}}), graphics={ + annotation (Line(points={{-18,100},{-2,100}}, + color={255,0,255})); + + connect(conPID.y, mul.u2) annotation (Line(points={{42,60},{48,60},{48,54},{58, + 54}}, color={0,0,127})); + + connect(booToRea.y, mul.u1) annotation (Line(points={{22,100},{48,100},{48,66}, + {58,66}}, color={0,0,127})); + + connect(hys1.y, booToRea1.u) annotation (Line(points={{-18,-20},{-6,-20},{-6,-70}, + {-2,-70}}, color={255,0,255})); + + connect(booToRea1.y, mul1.u2) annotation (Line(points={{22,-70},{26,-70},{26,-106}, + {58,-106}}, color={0,0,127})); + + connect(conPID1.y, mul1.u1) annotation (Line(points={{62,-60},{64,-60},{64,-86}, + {48,-86},{48,-94},{58,-94}}, color={0,0,127})); + + connect(swi2.y, TAirSupSet) annotation (Line(points={{22,-20},{36,-20},{36,0}, + {140,0}}, color={0,0,127})); + + connect(uFan, booToRea2.u) + annotation (Line(points={{-140,140},{-102,140}}, color={255,0,255})); + connect(yHeaCoi, mul2.y) + annotation (Line(points={{140,60},{112,60}}, color={0,0,127})); + connect(mul.y, mul2.u2) annotation (Line(points={{82,60},{84,60},{84,54},{88,54}}, + color={0,0,127})); + connect(booToRea2.y, mul2.u1) annotation (Line(points={{-78,140},{86,140},{86, + 66},{88,66}}, color={0,0,127})); + connect(mul3.y, yCooCoi) annotation (Line(points={{112,-60},{124,-60},{124,-60}, + {140,-60}}, color={0,0,127})); + connect(mul1.y, mul3.u2) annotation (Line(points={{82,-100},{84,-100},{84,-66}, + {88,-66}}, color={0,0,127})); + connect(booToRea2.y, mul3.u1) annotation (Line(points={{-78,140},{86,140},{86, + -54},{88,-54}}, color={0,0,127})); + annotation (defaultComponentName="TSupAir", + Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-120},{100,120}}), + graphics={ Rectangle( - extent={{-100,-100},{100,100}}, + extent={{-100,-120},{100,120}}, lineColor={0,0,127}, fillColor={255,255,255}, - fillPattern=FillPattern.Solid)}), Diagram(coordinateSystem( - preserveAspectRatio=false, extent={{-100,-120},{100,120}}))); - + fillPattern=FillPattern.Solid), + Text( + extent={{-110,160},{110,120}}, + textString="%name", + textColor={0,0,255})}), Diagram(coordinateSystem( + preserveAspectRatio=false, extent={{-120,-160},{120,160}})), + Documentation(info=" +

+ Block that outputs the supply air temperature setpoint, as well as the control + signals for the cooling and heating coils in a fan coil unit system. +

+

+ The supply air temperature TAirSupSet is varied from the zone cooling setpoint temperature + TZonSetCoo to the minimum supply air temperature for coolingTCooSupAirHi, + when the cooling loop signal uCoo varies from the minimum limit + cooPerMin to the maximum limit cooPerMax. + Similarly,TAirSupSet is varied from the zone heating setpoint temperature + TZonSetHea to the maximum supply air temperature for heatingTHeaSupAirHi, + when the heating loop signal uHea varies from the minimum limit + heaPerMin to the maximum limit heaPerMax. + The setpoint in deadband mode is equal to the current measured supply air + temperature TAirSup. uCoo and uHea are + set to zero when the fan proven on signal uFan is false. +

+ ", revisions=" +
    +
  • + March 17, 2021, by Karthik Devaprasad:
    + First implementation. +
  • +
+ ")); end SupplyAirTemperature; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/FanSpeed.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/FanSpeed.mo index 000df05359f..cc7435da5de 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/FanSpeed.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/FanSpeed.mo @@ -1,42 +1,63 @@ within Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.Validation; - block FanSpeed - - "Validation model for fan speed subsequence" + "Validation model for fan speed subsequence" extends Modelica.Icons.Example; Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.FanSpeed fanSpe( - have_coolingCoil=true, have_heatingCoil=true) + final have_coolingCoil=true, + final have_heatingCoil=true) "Instance demonstrating variation of heating loop signal" annotation (Placement(transformation(extent={{-40,120},{-20,140}}))); Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.FanSpeed fanSpe2( - have_coolingCoil=true, have_heatingCoil=true) + final have_coolingCoil=true, + final have_heatingCoil=true) "Instance demonstrating variation of operating mode" annotation (Placement(transformation(extent={{80,120},{100,140}}))); Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.FanSpeed fanSpe1( - have_coolingCoil=true, have_heatingCoil=true) + final have_coolingCoil=true, + final have_heatingCoil=true) "Instance demonstrating variation of cooling loop signal" annotation (Placement(transformation(extent={{-40,-10},{-20,10}}))); + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.FanSpeed fanSpe3( + final have_coolingCoil=true, + final have_heatingCoil=false) + "Instance demonstrating variation of cooling loop signal with no heating coil" + annotation (Placement(transformation(extent={{80,-10},{100,10}}))); + + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.FanSpeed fanSpe4( + final have_coolingCoil=false, + final have_heatingCoil=true) + "Instance demonstrating variation of heating loop signal with no cooling coil" + annotation (Placement(transformation(extent={{-40,-140},{-20,-120}}))); + + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.FanSpeed fanSpe5( + final have_coolingCoil=false, + final have_heatingCoil=false) + "Instance demonstrating variation of operating mode with no heating and cooling coils" + annotation (Placement(transformation(extent={{80,-140},{100,-120}}))); + Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ram( final height=6, final duration=70, final offset=1) "Operating mode signal" - annotation (Placement(transformation(extent={{20,160},{40,180}}))); + annotation (Placement(transformation(extent={{20,160},{40,180}}))); Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt "Real to Integer conversion" annotation (Placement(transformation(extent={{-70,160},{-50,180}}))); - Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul(final period=100) + Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul( + final period=100) "Fan proven on signal" annotation (Placement(transformation(extent={{-100,130},{-80,150}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sin(final freqHz=1/50) + Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sin( + final freqHz=1/50) "Heating loop signal" annotation (Placement(transformation(extent={{-100,100},{-80,120}}))); @@ -44,11 +65,13 @@ block FanSpeed "Convert negative loop signal to positive" annotation (Placement(transformation(extent={{-70,100},{-50,120}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con(final k=0) + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con( + final k=0) "Cooling loop signal" annotation (Placement(transformation(extent={{-100,70},{-80,90}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con1(final k=1) + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con1( + final k=1) "Operating mode signal" annotation (Placement(transformation(extent={{-100,160},{-80,180}}))); @@ -56,11 +79,13 @@ block FanSpeed "Real to Integer conversion" annotation (Placement(transformation(extent={{50,160},{70,180}}))); - Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul1(final period=100) + Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul1( + final period=100) "Fan proven on signal" annotation (Placement(transformation(extent={{20,130},{40,150}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con2(final k=0) + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con2( + final k=0) "Cooling loop signal" annotation (Placement(transformation(extent={{20,70},{40,90}}))); @@ -68,11 +93,13 @@ block FanSpeed "Real to Integer conversion" annotation (Placement(transformation(extent={{-70,30},{-50,50}}))); - Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul2(final period=100) + Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul2( + final period=100) "Fan proven on signal" annotation (Placement(transformation(extent={{-100,0},{-80,20}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sin2(final freqHz=1/50) + Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sin2( + final freqHz=1/50) "Cooling loop signal" annotation (Placement(transformation(extent={{-100,-60},{-80,-40}}))); @@ -80,32 +107,32 @@ block FanSpeed "Convert negative loop signal to positive" annotation (Placement(transformation(extent={{-70,-60},{-50,-40}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con3(final k=0) + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con3( + final k=0) "Heating loop signal" annotation (Placement(transformation(extent={{-100,-30},{-80,-10}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con4(final k=1) + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con4( + final k=1) "Operating mode signal" annotation (Placement(transformation(extent={{-100,30},{-80,50}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con5(final k=0.75) + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con5( + final k=0.75) "Heating loop signal" annotation (Placement(transformation(extent={{20,100},{40,120}}))); - Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.FanSpeed fanSpe3( - have_coolingCoil=true, have_heatingCoil=false) - "Instance demonstrating variation of cooling loop signal with no heating coil" - annotation (Placement(transformation(extent={{80,-10},{100,10}}))); - Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt3 "Real to Integer conversion" annotation (Placement(transformation(extent={{50,30},{70,50}}))); - Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul3(final period=100) + Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul3( + final period=100) "Fan proven on signal" annotation (Placement(transformation(extent={{20,0},{40,20}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sin1(final freqHz=1/50) + Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sin1( + final freqHz=1/50) "Cooling loop signal" annotation (Placement(transformation(extent={{20,-30},{40,-10}}))); @@ -113,52 +140,47 @@ block FanSpeed "Convert negative loop signal to positive" annotation (Placement(transformation(extent={{50,-30},{70,-10}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con7(final k=1) + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con7( + final k=1) "Operating mode signal" annotation (Placement(transformation(extent={{20,30},{40,50}}))); - Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.FanSpeed fanSpe4( - have_coolingCoil=false, have_heatingCoil=true) - "Instance demonstrating variation of heating loop signal with no cooling coil" - annotation (Placement(transformation(extent={{-40,-140},{-20,-120}}))); - Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt4 - "Real to Integer conversion" + "Real to Integer conversion" annotation (Placement(transformation(extent={{-70,-100},{-50,-80}}))); - Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul4(final period=100) - "Fan proven on signal" + Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul4( + final period=100) + "Fan proven on signal" annotation (Placement(transformation(extent={{-100,-130},{-80,-110}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sin3(final freqHz=1/50) - "Heating loop signal" + Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sin3( + final freqHz=1/50) + "Heating loop signal" annotation (Placement(transformation(extent={{-100,-160},{-80,-140}}))); Buildings.Controls.OBC.CDL.Continuous.Abs abs3 - "Convert negative loop signal to positive" + "Convert negative loop signal to positive" annotation (Placement(transformation(extent={{-70,-160},{-50,-140}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con8(final k=1) + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con8( + final k=1) "Operating mode signal" annotation (Placement(transformation(extent={{-100,-100},{-80,-80}}))); - Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.FanSpeed fanSpe5( - have_coolingCoil=false, have_heatingCoil=false) - "Instance demonstrating variation of operating mode with no heating and cooling coils" - annotation (Placement(transformation(extent={{80,-140},{100,-120}}))); - - Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ram1( + Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ram1( final height=6, final duration=70, final offset=1) "Operating mode signal" - annotation (Placement(transformation(extent={{20,-100},{40,-80}}))); + annotation (Placement(transformation(extent={{20,-100},{40,-80}}))); Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt5 "Real to Integer conversion" annotation (Placement(transformation(extent={{50,-100},{70,-80}}))); - Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul5(final period=100) + Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul5( + final period=100) "Fan proven on signal" annotation (Placement(transformation(extent={{20,-130},{40,-110}}))); @@ -268,6 +290,24 @@ equation Interval=1, __Dymola_Algorithm="Dassl"), __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/FanSpeed.mos" - "Simulate and plot")); - + "Simulate and plot"), + Documentation(info=" +

+ This example validates + + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.FanSpeed. + Each of the six instances of the controller represents operation with different + inputs for heating and cooling loop signals, as well as the operating mode + and fan proven on signal, and different configuration + parameters of fan coil unit with presence or absence of heating and cooling + coils, as described by the comment for each instance. +

+ ", revisions=" +
    +
  • + March 18, 2022, by Karthik Devaprasad:
    + First implementation. +
  • +
+ ")); end FanSpeed; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mo index 88cf802418e..4717f480dbd 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mo @@ -1,162 +1,222 @@ within Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.Validation; - block SupplyAirTemperature - - "Validation model for supply air temperature setpoint subsequence" + "Validation model for supply air temperature setpoint subsequence" extends Modelica.Icons.Example; - Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.SupplyAirTemperature - TSupAir(have_coolingCoil=true, have_heatingCoil=true) + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.SupplyAirTemperature TSupAir( + final have_coolingCoil=true, + final have_heatingCoil=true) + "Instance demonstrating heating signal operation" annotation (Placement(transformation(extent={{-50,60},{-30,80}}))); Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.SupplyAirTemperature TSupAir3( - have_coolingCoil=true, have_heatingCoil=false) + final have_coolingCoil=true, + final have_heatingCoil=false) + "Instance demonstrating cooling signal operation when heating coil is absent" annotation (Placement(transformation(extent={{60,-80},{80,-60}}))); Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.SupplyAirTemperature TSupAir2( - have_coolingCoil=false, have_heatingCoil=true) + final have_coolingCoil=false, + final have_heatingCoil=true) + "Instance demonstrating heating signal operation when cooling coil is absent" annotation (Placement(transformation(extent={{-50,-100},{-30,-80}}))); + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.SupplyAirTemperature TSupAir1( + final have_coolingCoil=true, + final have_heatingCoil=true) + "Instance demonstrating cooling signal operation" + annotation (Placement(transformation(extent={{80,60},{100,80}}))); + +protected Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sin( - amplitude=20, - freqHz=1/50, - offset=273.15 + 23) + final amplitude=20, + final freqHz=1/50, + final offset=273.15 + 23) "Supply air temperature signal" annotation (Placement(transformation(extent={{-90,60},{-70,80}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sin3( - amplitude=20, - freqHz=1/50, - offset=273.15 + 23) + final amplitude=20, + final freqHz=1/50, + final offset=273.15 + 23) "Supply air temperature signal" annotation (Placement(transformation(extent={{20,-70},{40,-50}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sin5( - amplitude=0.5, - freqHz=1/100, - offset=0.5) + final amplitude=0.5, + final freqHz=1/100, + final offset=0.5) "Cooling loop signal" annotation (Placement(transformation(extent={{20,-100},{40,-80}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sin6( - amplitude=20, - freqHz=1/50, - offset=273.15 + 23) + final amplitude=20, + final freqHz=1/50, + final offset=273.15 + 23) "Supply air temperature signal" annotation (Placement(transformation(extent={{-90,-100},{-70,-80}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sin8( - amplitude=0.5, - freqHz=1/100, - offset=0.5) + final amplitude=0.5, + final freqHz=1/100, + final offset=0.5) "Heating loop signal" annotation (Placement(transformation(extent={{-90,-70},{-70,-50}}))); - Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.SupplyAirTemperature - TSupAir1(have_coolingCoil=true, have_heatingCoil=true) - annotation (Placement(transformation(extent={{80,60},{100,80}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sin4( - amplitude=20, - freqHz=1/50, - offset=273.15 + 23) + final amplitude=20, + final freqHz=1/50, + final offset=273.15 + 23) "Supply air temperature signal" annotation (Placement(transformation(extent={{40,60},{60,80}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con(k=273.15 + 21) + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con( + final k=273.15 + 21) "Zone heating temperature setpoint" annotation (Placement(transformation(extent={{-90,120},{-70,140}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con1(k=273.15 + 25) + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con1( + final k=273.15 + 25) "Zone cooling temperature setpoint" annotation (Placement(transformation(extent={{-90,0},{-70,20}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con2(k=273.15 + 21) + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con2( + final k=273.15 + 21) "Zone heating temperature setpoint" annotation (Placement(transformation(extent={{40,120},{60,140}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con3(k=273.15 + 25) + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con3( + final k=273.15 + 25) "Zone cooling temperature setpoint" annotation (Placement(transformation(extent={{40,0},{60,20}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con4(k=273.15 + 21) + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con4( + final k=273.15 + 21) "Zone heating temperature setpoint" annotation (Placement(transformation(extent={{-90,-40},{-70,-20}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con6(k=273.15 + 25) + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con6( + final k=273.15 + 25) "Zone cooling temperature setpoint" annotation (Placement(transformation(extent={{20,-130},{40,-110}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con5(k=0.25) + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con5( + final k=0.25) "Heating loop signal" annotation (Placement(transformation(extent={{-90,90},{-70,110}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con7(k=0) + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con7( + final k=0) "Heating loop signal" annotation (Placement(transformation(extent={{40,90},{60,110}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con8(k=0) + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con8( + final k=0) "Cooling loop signal" annotation (Placement(transformation(extent={{-90,30},{-70,50}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con9(k=0.25) + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con9( + final k=0.25) "Cooling loop signal" annotation (Placement(transformation(extent={{40,30},{60,50}}))); + Buildings.Controls.OBC.CDL.Logical.Sources.Constant con10( + final k=true) + "Boolean fale signal" + annotation (Placement(transformation(extent={{-120,-20},{-100,0}}))); + equation connect(sin.y, TSupAir.TAirSup) - annotation (Line(points={{-68,70},{-52,70}}, color={0,0,127})); + annotation (Line(points={{-68,70},{-60,70},{-60,68.3333},{-52,68.3333}}, + color={0,0,127})); connect(sin6.y, TSupAir2.TAirSup) - annotation (Line(points={{-68,-90},{-52,-90}}, color={0,0,127})); + annotation (Line(points={{-68,-90},{-60,-90},{-60,-91.6667},{-52,-91.6667}}, + color={0,0,127})); connect(sin8.y, TSupAir2.uHea) annotation (Line(points={{-68,-60},{-60,-60},{ - -60,-86},{-52,-86}}, color={0,0,127})); + -60,-88.3333},{-52,-88.3333}}, + color={0,0,127})); connect(sin4.y,TSupAir1. TAirSup) - annotation (Line(points={{62,70},{78,70}}, color={0,0,127})); + annotation (Line(points={{62,70},{70,70},{70,68.3333},{78,68.3333}}, + color={0,0,127})); - connect(con.y, TSupAir.TZonSetHea) annotation (Line(points={{-68,130},{-56, - 130},{-56,78},{-52,78}}, color={0,0,127})); + connect(con.y, TSupAir.TZonSetHea) annotation (Line(points={{-68,130},{-56,130}, + {-56,75},{-52,75}}, color={0,0,127})); connect(con1.y, TSupAir.TZonSetCoo) annotation (Line(points={{-68,10},{-56,10}, - {-56,62},{-52,62}}, color={0,0,127})); + {-56,61.6667},{-52,61.6667}}, + color={0,0,127})); - connect(con2.y, TSupAir1.TZonSetHea) annotation (Line(points={{62,130},{72, - 130},{72,78},{78,78}}, color={0,0,127})); + connect(con2.y, TSupAir1.TZonSetHea) annotation (Line(points={{62,130},{72,130}, + {72,75},{78,75}}, color={0,0,127})); connect(con3.y, TSupAir1.TZonSetCoo) annotation (Line(points={{62,10},{72,10}, - {72,62},{78,62}}, color={0,0,127})); + {72,61.6667},{78,61.6667}}, + color={0,0,127})); - connect(con4.y, TSupAir2.TZonSetHea) annotation (Line(points={{-68,-30},{-56, - -30},{-56,-82},{-52,-82}}, color={0,0,127})); + connect(con4.y, TSupAir2.TZonSetHea) annotation (Line(points={{-68,-30},{-56,-30}, + {-56,-85},{-52,-85}}, color={0,0,127})); connect(con6.y, TSupAir3.TZonSetCoo) annotation (Line(points={{42,-120},{54, - -120},{54,-78},{58,-78}}, color={0,0,127})); + -120},{54,-78.3333},{58,-78.3333}}, + color={0,0,127})); connect(con5.y, TSupAir.uHea) annotation (Line(points={{-68,100},{-60,100},{ - -60,74},{-52,74}}, color={0,0,127})); + -60,71.6667},{-52,71.6667}}, + color={0,0,127})); connect(con7.y, TSupAir1.uHea) annotation (Line(points={{62,100},{68,100},{68, - 74},{78,74}}, color={0,0,127})); + 71.6667},{78,71.6667}}, + color={0,0,127})); connect(con8.y, TSupAir.uCoo) annotation (Line(points={{-68,40},{-60,40},{-60, - 66},{-52,66}}, color={0,0,127})); + 65},{-52,65}}, color={0,0,127})); - connect(con9.y, TSupAir1.uCoo) annotation (Line(points={{62,40},{70,40},{70, - 66},{78,66}}, color={0,0,127})); + connect(con9.y, TSupAir1.uCoo) annotation (Line(points={{62,40},{70,40},{70,65}, + {78,65}}, color={0,0,127})); connect(sin5.y, TSupAir3.uCoo) annotation (Line(points={{42,-90},{52,-90},{52, - -74},{58,-74}}, color={0,0,127})); + -75},{58,-75}}, color={0,0,127})); connect(sin3.y, TSupAir3.TAirSup) annotation (Line(points={{42,-60},{52,-60}, - {52,-70},{58,-70}}, color={0,0,127})); - + {52,-71.6667},{58,-71.6667}}, + color={0,0,127})); + + connect(con10.y, TSupAir.uFan) annotation (Line(points={{-98,-10},{-54,-10},{ + -54,78.3333},{-52,78.3333}}, + color={255,0,255})); + connect(con10.y, TSupAir1.uFan) annotation (Line(points={{-98,-10},{74,-10},{ + 74,78.3333},{78,78.3333}}, + color={255,0,255})); + connect(con10.y, TSupAir2.uFan) annotation (Line(points={{-98,-10},{-54,-10}, + {-54,-81.6667},{-52,-81.6667}},color={255,0,255})); + connect(con10.y, TSupAir3.uFan) annotation (Line(points={{-98,-10},{54,-10},{ + 54,-61.6667},{58,-61.6667}}, + color={255,0,255})); annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, {100,100}})), Diagram( coordinateSystem(preserveAspectRatio=false, extent={{-140,-140},{140,140}})), __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mos" - "Simulate and plot")); - + "Simulate and plot"), + Documentation(info=" +

+ This example validates + + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.SupplyAirTemperature. + Each of the four instances of the controller represents operation with different + inputs for heating and cooling loop signals, and different configuration + parameters of fan coil unit with presence or absence of heating and cooling + coils, as described in the instance comments. +

+ ", revisions=" +
    +
  • + March 18, 2022, by Karthik Devaprasad:
    + First implementation. +
  • +
+ ")); end SupplyAirTemperature; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/package.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/package.mo index 31e8c5561e3..4b021d9438d 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/package.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/package.mo @@ -1,4 +1,6 @@ within Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences; +package Validation "Package containing validation models for fan coil unit subsequences" + + extends Modelica.Icons.ExamplesPackage; -package Validation end Validation; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mo index 547781a5d90..746a2e91372 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mo @@ -1,25 +1,16 @@ within Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Validation; - model Controller "Validation of the top-level controller" Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Controller conFCU( final have_winSen=false, final kHea=1, - final yHeaMax=1, - final yMin=0.1, - final AFlo=50, final controllerTypeCoo=Buildings.Controls.OBC.CDL.Types.SimpleController.P, final controllerTypeHea=Buildings.Controls.OBC.CDL.Types.SimpleController.P, final have_occSen=true, final TSupSetMax=297.15, final TSupSetMin=285.15, - final use_TMix=false, - final controllerTypeMod=Buildings.Controls.OBC.CDL.Types.SimpleController.P, - final kMod=1, - final VOutMin_flow=6e-3, - final VOutDes_flow=0.25, have_coolingCoil=true, - have_heatingCoil=true) + have_heatingCoil=true) "Validate the heating case" annotation (Placement(transformation(extent={{20,80},{60,124}}))); @@ -27,21 +18,13 @@ model Controller final have_winSen=true, final kCoo=1, final kHea=1, - final yHeaMax=1, - final yMin=0.1, - final AFlo=50, final controllerTypeCoo=Buildings.Controls.OBC.CDL.Types.SimpleController.P, final controllerTypeHea=Buildings.Controls.OBC.CDL.Types.SimpleController.P, final have_occSen=false, final TSupSetMax=297.15, final TSupSetMin=285.15, - final use_TMix=false, - final controllerTypeMod=Buildings.Controls.OBC.CDL.Types.SimpleController.P, - final kMod=1, - final VOutMin_flow=6e-3, - final VOutDes_flow=0.25, have_coolingCoil=true, - have_heatingCoil=true) + have_heatingCoil=true) "Validate the cooling case" annotation (Placement(transformation(extent={{20,12},{60,56}}))); @@ -49,21 +32,13 @@ model Controller final have_winSen=false, final kCoo=1, final kHea=1, - final yHeaMax=1, - final yMin=0.1, - final AFlo=50, final controllerTypeCoo=Buildings.Controls.OBC.CDL.Types.SimpleController.P, final controllerTypeHea=Buildings.Controls.OBC.CDL.Types.SimpleController.P, final have_occSen=true, final TSupSetMax=297.15, final TSupSetMin=285.15, - final use_TMix=false, - final controllerTypeMod=Buildings.Controls.OBC.CDL.Types.SimpleController.P, - final kMod=1, - final VOutMin_flow=6e-3, - final VOutDes_flow=0.25, have_coolingCoil=true, - have_heatingCoil=true) + have_heatingCoil=true) "Validate the cooling case" annotation (Placement(transformation(extent={{20,-50},{60,-6}}))); @@ -71,21 +46,13 @@ model Controller final have_winSen=true, final kCoo=1, final kHea=1, - final yHeaMax=1, - final yMin=0.1, - final AFlo=50, final controllerTypeCoo=Buildings.Controls.OBC.CDL.Types.SimpleController.P, final controllerTypeHea=Buildings.Controls.OBC.CDL.Types.SimpleController.P, final have_occSen=false, final TSupSetMax=297.15, final TSupSetMin=285.15, - final use_TMix=false, - final controllerTypeMod=Buildings.Controls.OBC.CDL.Types.SimpleController.P, - final kMod=1, - final VOutMin_flow=6e-3, - final VOutDes_flow=0.25, have_coolingCoil=true, - have_heatingCoil=true) + have_heatingCoil=true) "Validate the cooling case" annotation (Placement(transformation(extent={{20,-112},{60,-68}}))); @@ -93,7 +60,7 @@ model Controller final duration=86400, final height=6, final offset=273.15 + 16, - y(unit="K")) + y(unit="K")) "Measured zone temperature" annotation (Placement(transformation(extent={{-180,70},{-160,90}}))); @@ -114,7 +81,7 @@ model Controller final duration=86400, final height=-3, final offset=273.15 + 26, - y(unit="K")) + y(unit="K")) "Measured zone temperature" annotation (Placement(transformation(extent={{-180,-50},{-160,-30}}))); @@ -336,5 +303,4 @@ First implementation. ")); - end Controller; From f7aae212192ed30039497a2dccbb215592f19ab6 Mon Sep 17 00:00:00 2001 From: Devaprasad Date: Tue, 22 Mar 2022 14:22:00 -0700 Subject: [PATCH 06/83] Updated documentation and validation model for main controller --- .../OBC/ASHRAE/FanCoilUnit/Controller.mo | 86 ++++++------------- .../FanCoilUnit/Subsequences/FanSpeed.mo | 5 +- .../Subsequences/SupplyAirTemperature.mo | 5 +- .../FanCoilUnit/Subsequences/package.mo | 37 +++++++- .../FanCoilUnit/Validation/Controller.mo | 58 +++++++------ .../ASHRAE/FanCoilUnit/Validation/package.mo | 5 +- .../FanCoilUnit/Validation/Controller.mos | 57 +++++++++--- 7 files changed, 152 insertions(+), 101 deletions(-) diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Controller.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Controller.mo index e0468a5fd3b..451d93bbe81 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Controller.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Controller.mo @@ -424,13 +424,13 @@ block Controller annotation (Placement(transformation(extent={{200,180},{240,220}}), iconTransformation(extent={{200,100},{240,140}}))); - Buildings.Controls.OBC.CDL.Interfaces.RealOutput TAirSup( + Buildings.Controls.OBC.CDL.Interfaces.RealOutput TAirSupSet( final unit="K", displayUnit="degC", final quantity="ThermodynamicTemperature") "Supply air temperature setpoint" annotation (Placement(transformation(extent={{200,-40},{240,0}}), - iconTransformation(extent={{200,-140},{240,-100}}))); + iconTransformation(extent={{200,-140},{240,-100}}))); Buildings.Controls.OBC.CDL.Interfaces.RealOutput yFanSpe( final min=0, @@ -462,7 +462,7 @@ block Controller final unit="1") if have_coolingCoil "Cooling coil control signal" annotation (Placement(transformation(extent={{200,-80},{240,-40}}), - iconTransformation(extent={{200,-100},{240,-60}}))); + iconTransformation(extent={{200,-100},{240,-60}}))); Buildings.Controls.OBC.CDL.Interfaces.RealOutput yHeaCoi( final min=0, @@ -470,7 +470,7 @@ block Controller final unit="1") if have_heatingCoil "Heating coil control signal" annotation (Placement(transformation(extent={{200,0},{240,40}}), - iconTransformation(extent={{200,-60},{240,-20}}))); + iconTransformation(extent={{200,-60},{240,-20}}))); Buildings.Controls.OBC.ASHRAE.G36_PR1.AHUs.SingleZone.VAV.SetPoints.ModeAndSetPoints modSetPoi( @@ -518,6 +518,7 @@ block Controller "Zone heating control signal" annotation (Placement(transformation(extent={{-80,210},{-60,230}}))); +protected Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt( final k=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.unoccupied) "Unoccupied mode" @@ -649,8 +650,8 @@ equation connect(TSupAir.yHeaCoi, yHeaCoi) annotation (Line(points={{122,15},{160,15},{ 160,20},{220,20}}, color={0,0,127})); - connect(TSupAir.TAirSupSet, TAirSup) annotation (Line(points={{122,10},{180,10}, - {180,-20},{220,-20}}, color={0,0,127})); + connect(TSupAir.TAirSupSet, TAirSupSet) annotation (Line(points={{122,10},{180, + 10},{180,-20},{220,-20}}, color={0,0,127})); connect(fanSpe.yFanSpe, yFanSpe) annotation (Line(points={{142,178},{160,178}, {160,160},{220,160}}, color={0,0,127})); @@ -821,58 +822,40 @@ annotation (defaultComponentName="conFCU", preserveAspectRatio=false, extent={{-200,-200},{200,240}})), Documentation(info="

-Block for single zone VAV control. It outputs supply fan speed, supply air temperature -setpoints for heating, economizer and cooling, zone air heating and cooling setpoints, -outdoor and return air damper positions, and valve positions of heating and cooling coils. +Block for fan coil unit control. It outputs supply fan enable signal and speed signal, +the supply air temperature setpoint, the zone air heating and cooling setpoints, +and valve positions of heating and cooling coils.

-It is implemented according to the ASHRAE Guideline 36, Part 5.18. +It is implemented according to the ASHRAE Guideline 36, Part 5.22.

The sequences consist of the following subsequences.

-

Supply fan speed control

+

Supply fan control

-The fan speed control is implemented according to PART 5.18.4. It outputs -the control signal yFan to adjust the speed of the supply fan. +The supply fan control is implemented according to Part 5.22.4. It outputs +the control signals for supply fan enable yFan and the fan speed +yFanSpe. See - -Buildings.Controls.OBC.ASHRAE.G36_PR1.AHUs.SingleZone.VAV.SetPoints.Supply -for more detailed description. -

-

Supply air temperature setpoints

-

-The supply air temperature setpoints control sequences are implemented based on PART 5.18.4. -They are implemented in the same control block as the supply fan speed control. The supply air temperature setpoint -for heating and economizer is the same; - - while the supply air temperature setpoint for cooling has -a separate control loop. See - -Buildings.Controls.OBC.ASHRAE.G36_PR1.AHUs.SingleZone.VAV.SetPoints.Supply -for more detailed description. + +Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.FanSpeed for more detailed +description.

-

Economizer control

+

Supply air temperature setpoint

-The Economizer control block outputs outdoor and return air damper position, i.e. yOutDamPos and -yRetDamPos, as well as control signal for heating coil yHeaCoi. -Optionally, there is also an override for freeze protection, which is not part of Guideline 36. -See - -Buildings.Controls.OBC.ASHRAE.G36_PR1.AHUs.SingleZone.VAV.Economizers.Controller +The supply air temperature setpoint control sequences are implemented based on Part 5.22.4. +The block outputs a supply air temperature setpoint signal TAirSupSet, +and control signals for the heating coil yHeaCoi and the cooling coil +yCooCoi. See + +Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.SupplyAirTemperature for more detailed description.

-

Minimum outdoor airflow

-

-Control sequences are implemented to compute the minimum outdoor airflow -setpoint, which is used as an input for the economizer control. More detailed -information can be found at - -Buildings.Controls.OBC.ASHRAE.G36_PR1.AHUs.SingleZone.VAV.SetPoints.OutsideAirFlow. -

Zone air heating and cooling setpoints

-Zone air heating and cooling setpoints as well as system operation modes are detailed at +The zone air heating setpoint TZonHeaSetand cooling setpoint TZonHeaSet +as well as system operation mode signal modSetPoi.yOpeMod are detailed at Buildings.Controls.OBC.ASHRAE.G36_PR1.AHUs.SingleZone.VAV.SetPoints.ModeAndSetPoints.

@@ -880,20 +863,7 @@ Buildings.Controls.OBC.ASHRAE.G36_PR1.AHUs.SingleZone.VAV.SetPoints.ModeAndSetPo revisions="
  • -June 20, 2020, by Jianjun Hu:
    -Updated the block of specifying operating mode and setpoints.
    -This is for #1893. -
  • -
  • -March 10, 2020, by Jianjun Hu:
    -Replaced the block for calculating the operation mode and setpoint temperature with the one -from the terminal unit package. The new block does not have vector-valued calculations.
    -This is for #1709. -
  • -
  • -August 3, 2019, by David Blum & - - Kun Zhang:
    +March 22, 2022, by Karthik Devaprasad:
    First implementation.
diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo index 78b225f78f3..417cae59a72 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo @@ -330,7 +330,8 @@ equation Documentation(info="

Block that outputs the fan enable signal and the fan speed signal based on - the heating and cooling loop signals. + the heating and cooling loop signals. The implemented sequence is based on + ASHRAE Guideline 36, 2021, Part 5.22.4.

The fan enable signal yFan is switched to false @@ -351,7 +352,7 @@ equation ", revisions="

  • - March 17, 2021, by Karthik Devaprasad:
    + March 17, 2022, by Karthik Devaprasad:
    First implementation.
diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/SupplyAirTemperature.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/SupplyAirTemperature.mo index a4472d37ad8..635a93b2eac 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/SupplyAirTemperature.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/SupplyAirTemperature.mo @@ -437,7 +437,8 @@ equation Documentation(info="

Block that outputs the supply air temperature setpoint, as well as the control - signals for the cooling and heating coils in a fan coil unit system. + signals for the cooling and heating coils in a fan coil unit system. The implemented + sequence is based on ASHRAE Guideline 36, 2021, Part 5.22.4.

The supply air temperature TAirSupSet is varied from the zone cooling setpoint temperature @@ -455,7 +456,7 @@ equation ", revisions="

  • - March 17, 2021, by Karthik Devaprasad:
    + March 17, 2022, by Karthik Devaprasad:
    First implementation.
diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/package.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/package.mo index 2b8671ec73f..e11324fdf07 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/package.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/package.mo @@ -1,5 +1,38 @@ within Buildings.Controls.OBC.ASHRAE.FanCoilUnit; +package Subsequences "Package of subsequences for fan coil unit controls" -package Subsequences - + annotation(Icon(graphics={ + Rectangle( + lineColor={200,200,200}, + fillColor={248,248,248}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Rectangle( + lineColor={128,128,128}, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Ellipse( + origin={10.0,10.0}, + fillColor={76,76,76}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + extent={{-80.0,-80.0},{-20.0,-20.0}}), + Ellipse( + origin={10.0,10.0}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + extent={{0.0,-80.0},{60.0,-20.0}}), + Ellipse( + origin={10.0,10.0}, + fillColor={128,128,128}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + extent={{0.0,0.0},{60.0,60.0}}), + Ellipse( + origin={10.0,10.0}, + lineColor={128,128,128}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid, + extent={{-80.0,0.0},{-20.0,60.0}})})); end Subsequences; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mo index 746a2e91372..09b83b3d230 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mo @@ -9,8 +9,11 @@ model Controller final have_occSen=true, final TSupSetMax=297.15, final TSupSetMin=285.15, - have_coolingCoil=true, - have_heatingCoil=true) + final have_coolingCoil=true, + final have_heatingCoil=true, + final heaSpeMax=0.6, + final heaSpeMin=0.2, + final cooSpeMin=0.2) "Validate the heating case" annotation (Placement(transformation(extent={{20,80},{60,124}}))); @@ -23,8 +26,11 @@ model Controller final have_occSen=false, final TSupSetMax=297.15, final TSupSetMin=285.15, - have_coolingCoil=true, - have_heatingCoil=true) + final have_coolingCoil=true, + final have_heatingCoil=true, + final heaSpeMax=0.6, + final heaSpeMin=0.2, + final cooSpeMin=0.2) "Validate the cooling case" annotation (Placement(transformation(extent={{20,12},{60,56}}))); @@ -37,8 +43,11 @@ model Controller final have_occSen=true, final TSupSetMax=297.15, final TSupSetMin=285.15, - have_coolingCoil=true, - have_heatingCoil=true) + final have_coolingCoil=true, + final have_heatingCoil=true, + final heaSpeMax=0.6, + final heaSpeMin=0.2, + final cooSpeMin=0.2) "Validate the cooling case" annotation (Placement(transformation(extent={{20,-50},{60,-6}}))); @@ -51,11 +60,15 @@ model Controller final have_occSen=false, final TSupSetMax=297.15, final TSupSetMin=285.15, - have_coolingCoil=true, - have_heatingCoil=true) + final have_coolingCoil=true, + final have_heatingCoil=true, + final heaSpeMax=0.6, + final heaSpeMin=0.2, + final cooSpeMin=0.2) "Validate the cooling case" annotation (Placement(transformation(extent={{20,-112},{60,-68}}))); +protected Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp TZon( final duration=86400, final height=6, @@ -69,7 +82,8 @@ model Controller "Occupancy schedule" annotation (Placement(transformation(extent={{-120,44},{-100,64}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant nOcc(final k=2) + Buildings.Controls.OBC.CDL.Integers.Sources.Constant nOcc( + final k=2) "Number of occupants" annotation (Placement(transformation(extent={{-150,-10},{-130,10}}))); @@ -116,15 +130,15 @@ model Controller annotation (Placement(transformation(extent={{80,100},{100,120}}))); Buildings.Controls.OBC.CDL.Logical.Pre pre1 - "Logical pre block" + "Logical pre block" annotation (Placement(transformation(extent={{80,40},{100,60}}))); Buildings.Controls.OBC.CDL.Logical.Pre pre2 - "Logical pre block" + "Logical pre block" annotation (Placement(transformation(extent={{80,-30},{100,-10}}))); Buildings.Controls.OBC.CDL.Logical.Pre pre3 - "Logical pre block" + "Logical pre block" annotation (Placement(transformation(extent={{80,-80},{100,-60}}))); equation @@ -137,9 +151,6 @@ equation connect(occSch.tNexOcc,conFCU. tNexOcc) annotation (Line(points={{-99,60},{ -80,60},{-80,114},{18,114}}, color={0,0,127})); - connect(nOcc.y,conFCU. nOcc) annotation (Line(points={{-128,0},{-8,0},{-8,86}, - {18,86}}, color={0,0,127})); - connect(TSup.y,conFCU. TSup) annotation (Line(points={{-158,40},{-140,40},{ -140,94},{18,94}}, color={0,0,127})); @@ -186,9 +197,6 @@ equation connect(occSch.tNexOcc,conFCU3. tNexOcc) annotation (Line(points={{-99,60},{-80, 60},{-80,-78},{18,-78}}, color={0,0,127})); - connect(nOcc.y,conFCU2. nOcc) annotation (Line(points={{-128,0},{-8,0},{-8,-44}, - {18,-44}}, color={0,0,127})); - connect(cooWarTim.y,conFCU. warUpTim) annotation (Line(points={{-98,20},{-14, 20},{-14,122},{18,122}}, color={0,0,127})); @@ -262,6 +270,10 @@ equation connect(pre3.y, conFCU3.uFan) annotation (Line(points={{102,-70},{110,-70},{110, -54},{12,-54},{12,-102},{18,-102}}, color={255,0,255})); + connect(nOcc.y, conFCU.nOcc) annotation (Line(points={{-128,0},{-10,0},{-10,86}, + {18,86}}, color={255,127,0})); + connect(nOcc.y, conFCU2.nOcc) annotation (Line(points={{-128,0},{-10,0},{-10,-44}, + {18,-44}}, color={255,127,0})); annotation (experiment(StopTime=86400, Interval=300, Tolerance=1e-06), __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mos" "Simulate and plot"), @@ -288,17 +300,13 @@ annotation (experiment(StopTime=86400, Interval=300, Tolerance=1e-06), Documentation(info="

This example validates - -Buildings.Controls.OBC.ASHRAE.G36_PR1.AHUs.SingleZone.VAV.Controller. + +Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Controller.

", revisions="
  • -August 7, 2019, by Kun Zhang:
    -Included more validation cases. -
  • -
  • -October 24, 2018, by David Blum:
    +March 22, 2022, by Karthik Devaprasad:
    First implementation.
diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/package.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/package.mo index e52860e8219..1de11a77887 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/package.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/package.mo @@ -1,5 +1,6 @@ within Buildings.Controls.OBC.ASHRAE.FanCoilUnit; +package Validation "Package of validation models for fan coil unit controls" + + extends Modelica.Icons.ExamplesPackage; -package Validation - end Validation; diff --git a/Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mos b/Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mos index 832c2ed7afa..3ba34758725 100644 --- a/Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mos +++ b/Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mos @@ -1,11 +1,48 @@ simulateModel("Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Validation.Controller", method="Cvode", outputInterval=300, stopTime=86400, tolerance=1e-06, resultFile="conFCU"); -createPlot(id=1, position={35, 30, 592, 427}, y={"conFCU.TSup", "conFCU.setPoiVAV.TSupHeaEco", "conFCU.setPoiVAV.TSupCoo"}, range={0.0, 90000.0, 0.0, 40.0}, grid=true, colors={{0,140,72}, {162,29,33}, {244,125,35}}, displayUnits={"degC", "degC", "degC"}); -createPlot(id=1, position={35, 30, 592, 104}, y={"conFCU.yRetDamPos", "conFCU.yOutDamPos", "conFCU.yFan","conFCU.yHeaCoi"}, range={0.0, 90000.0, -2.0, 2.0}, grid=true, subPlot=2, colors={{28,108,200}, {238,46,47}, {0,140,72}, {217,67,180}}); -createPlot(id=1, position={35, 30, 592, 103}, y={"conFCU.uOcc"}, range={0.0, 90000.0, -2.0, 2.0}, grid=true, subPlot=3, colors={{28,108,200}}); -createPlot(id=1, position={35, 30, 592, 104}, y={"conFCU.modSetPoi.TZonHeaSet", "conFCU.modSetPoi.TZonCooSet","conFCU.TZon", "conFCU.TOut"}, range={0.0, 90000.0, 280.0, 320.0}, grid=true, subPlot=4, colors={{28,108,200}, {238,46,47}, {0,140,72}, {217,67,180}}); -createPlot(id=2, position={458, 1, 445, 332}, x="conFCU1.cooPI.y", y={"conFCU1.setPoiVAV.y", "conFCU2.setPoiVAV.y", "conFCU3.setPoiVAV.y"}, range={0.0, 1.0, 0.2, 1.2}, grid=true, legendHorizontal=false, colors={{0,140,72}, {162,29,33}, {244,125,35}}, patterns={LinePattern.None, LinePattern.None, LinePattern.None}, markers={MarkerStyle.Circle, MarkerStyle.Circle, MarkerStyle.Circle}); -createPlot(id=3, position={2, 1, 449, 335}, x="conFCU.heaPI.y", y={"conFCU.setPoiVAV.y"}, range={0.0, 1.0, 0.2, 1.2}, grid=true, legendHorizontal=false, colors={{238,46,47}}, patterns={LinePattern.None}, markers={MarkerStyle.Circle}); -createPlot(id=4, position={458, 362, 444, 335}, x="conFCU1.cooPI.y", y={"conFCU1.setPoiVAV.TSupHeaEco", "conFCU1.setPoiVAV.TSupCoo"}, range={0.0, 1.0, 14.0, 26.0}, grid=true, legendHorizontal=false, colors={{0,140,72}, {162,29,33}}, patterns={LinePattern.None, LinePattern.None}, markers={MarkerStyle.Circle, MarkerStyle.Circle}, displayUnits={"degC", "degC"}); -createPlot(id=5, position={1, 363, 453, 333}, x="conFCU.heaPI.y", y={"conFCU.setPoiVAV.TSupCoo"}, range={0.0, 1.0, 14.0, 26.0}, grid=true, legendHorizontal=false, colors={{238,46,47}}, patterns={LinePattern.None}, markers={MarkerStyle.Circle}, displayUnits={"degC"}); -createPlot(id=6, position={910, 0, 447, 336}, x="conFCU.conEco.mod.uTSup.y", y={"conFCU.conEco.mod.yOutDamPos", "conFCU.conEco.mod.yRetDamPos","conFCU.conEco.mod.yHeaCoi"}, range={0.0, 1.0, -0.4, 1.2000000000000002}, grid=true, legendHorizontal=false, colors={{244,125,35}, {0,140,72}, {28,108,200}}, patterns={LinePattern.None, LinePattern.None, LinePattern.None}, markers={MarkerStyle.Circle, MarkerStyle.Circle, MarkerStyle.Circle}); -createPlot(id=7, position={910, 366, 449, 332}, x="conFCU.conEco.damLim.uSupFanSpe", y={"conFCU.conEco.damLim.yOutDamPosMin", "conFCU.conEco.damLim.yOutDamPosMax"}, range={0.30000000000000004, 1.2000000000000002, -0.4, 1.2000000000000002}, grid=true, legendHorizontal=false, colors={{238,46,47}, {0,140,72}}, patterns={LinePattern.None, LinePattern.None}, markers={MarkerStyle.Circle, MarkerStyle.Circle}); +createPlot(id=1, position={0, 0, 790, 939}, y={"conFCU.uOcc"}, range={0.0, 90000.0, -0.5, 1.5}, grid=true, colors={{28,108,200}}); +createPlot(id=1, position={0, 0, 790, 184}, y={"conFCU.TZon", "conFCU.TZonHeaSet", "conFCU.TZonCooSet"}, range={0.0, 90000.0, 10.0, 35.0}, grid=true, subPlot=2, colors={{0,140,72}, {28,108,200}, {238,46,47}}, displayUnits={"degC", "degC", "degC"}); +createPlot(id=1, position={0, 0, 790, 183}, y={"conFCU.heaPI.y"}, range={0.0, 90000.0, -0.5, 1.5}, grid=true, subPlot=3, colors={{28,108,200}}); +createPlot(id=1, position={0, 0, 790, 184}, y={"conFCU.cooPI.y"}, range={0.0, 90000.0, -2.0, 2.0}, grid=true, subPlot=4, colors={{28,108,200}}); +createPlot(id=1, position={0, 0, 790, 184}, y={"conFCU.modSetPoi.yOpeMod"}, range={0.0, 90000.0, 0.0, 8.0}, grid=true, subPlot=5, colors={{28,108,200}}); + +createPlot(id=2, position={160, 947, 790, 939}, y={"conFCU.heaPI.y"}, range={0.0, 90000.0, -0.5, 1.5}, grid=true, colors={{28,108,200}}); +createPlot(id=2, position={160, 947, 790, 184}, y={"conFCU.yFan"}, range={0.0, 90000.0, -0.5, 1.5}, grid=true, subPlot=2, colors={{28,108,200}}); +createPlot(id=2, position={160, 947, 790, 183}, y={"conFCU.yFanSpe"}, range={0.0, 90000.0, -0.2, 0.8}, grid=true, subPlot=3, colors={{28,108,200}}); +createPlot(id=2, position={160, 947, 790, 184}, y={"conFCU.TSup", "conFCU.TAirSupSet"}, range={0.0, 90000.0, 18.0, 26.0}, grid=true, subPlot=4, colors={{28,108,200}, {238,46,47}}, displayUnits={"degC", "degC"}); +createPlot(id=2, position={160, 947, 790, 184}, y={"conFCU.yHeaCoi"}, range={0.0, 90000.0, -0.5, 1.5}, grid=true, subPlot=5, colors={{28,108,200}}); + +createPlot(id=3, position={320, 947, 790, 939}, y={"conFCU1.uOcc"}, range={0.0, 90000.0, -0.5, 1.5}, grid=true, colors={{28,108,200}}); +createPlot(id=3, position={320, 947, 790, 184}, y={"conFCU1.TZon", "conFCU1.TZonHeaSet", "conFCU1.TZonCooSet"}, range={0.0, 90000.0, 10.0, 35.0}, grid=true, subPlot=2, colors={{28,108,200}, {238,46,47}, {0,140,72}}, displayUnits={"degC", "degC", "degC"}); +createPlot(id=3, position={320, 947, 790, 183}, y={"conFCU1.heaPI.y"}, range={0.0, 90000.0, -2.0, 2.0}, grid=true, subPlot=3, colors={{28,108,200}}); +createPlot(id=3, position={320, 947, 790, 184}, y={"conFCU1.cooPI.y"}, range={0.0, 90000.0, -0.5, 1.5}, grid=true, subPlot=4, colors={{28,108,200}}); +createPlot(id=3, position={320, 947, 790, 184}, y={"conFCU1.modSetPoi.yOpeMod"}, range={0.0, 90000.0, 0.0, 8.0}, grid=true, subPlot=5, colors={{28,108,200}}); + +createPlot(id=4, position={480, 947, 788, 939}, y={"conFCU1.cooPI.y"}, range={0.0, 90000.0, -0.5, 1.5}, grid=true, colors={{28,108,200}}); +createPlot(id=4, position={480, 947, 788, 184}, y={"conFCU1.yFan"}, range={0.0, 90000.0, -0.5, 1.5}, grid=true, subPlot=2, colors={{28,108,200}}); +createPlot(id=4, position={480, 947, 788, 183}, y={"conFCU1.yFanSpe"}, range={0.0, 90000.0, -0.5, 1.5}, grid=true, subPlot=3, colors={{28,108,200}}); +createPlot(id=4, position={480, 947, 788, 184}, y={"conFCU1.TSup", "conFCU1.TAirSupSet"}, range={0.0, 90000.0, 10.0, 25.0}, grid=true, subPlot=4, colors={{28,108,200}, {238,46,47}}, displayUnits={"degC", "degC"}); +createPlot(id=4, position={480, 947, 788, 184}, y={"conFCU1.yCooCoi"}, range={0.0, 90000.0, -0.5, 1.5}, grid=true, subPlot=5, colors={{28,108,200}}); + +createPlot(id=5, position={640, 947, 788, 939}, y={"conFCU2.uOcc"}, range={0.0, 90000.0, -0.5, 1.5}, grid=true, colors={{28,108,200}}); +createPlot(id=5, position={640, 947, 788, 184}, y={"conFCU2.TZon", "conFCU2.TZonHeaSet", "conFCU2.TZonCooSet"}, range={0.0, 90000.0, 10.0, 35.0}, grid=true, subPlot=2, colors={{28,108,200}, {238,46,47}, {0,140,72}}, displayUnits={"degC", "degC", "degC"}); +createPlot(id=5, position={640, 947, 788, 183}, y={"conFCU2.heaPI.y"}, range={0.0, 90000.0, -2.0, 2.0}, grid=true, subPlot=3, colors={{28,108,200}}); +createPlot(id=5, position={640, 947, 788, 184}, y={"conFCU2.cooPI.y"}, range={0.0, 90000.0, -0.5, 1.5}, grid=true, subPlot=4, colors={{28,108,200}}); +createPlot(id=5, position={640, 947, 788, 184}, y={"conFCU2.modSetPoi.yOpeMod"}, range={0.0, 90000.0, 0.0, 8.0}, grid=true, subPlot=5, colors={{28,108,200}}); + +createPlot(id=6, position={800, 947, 788, 939}, y={"conFCU2.cooPI.y"}, range={0.0, 90000.0, -0.5, 1.5}, grid=true, colors={{28,108,200}}); +createPlot(id=6, position={800, 947, 788, 184}, y={"conFCU2.yFan"}, range={0.0, 90000.0, -0.5, 1.5}, grid=true, subPlot=2, colors={{28,108,200}}); +createPlot(id=6, position={800, 947, 788, 183}, y={"conFCU2.yFanSpe"}, range={0.0, 90000.0, -0.5, 1.5}, grid=true, subPlot=3, colors={{28,108,200}}); +createPlot(id=6, position={800, 947, 788, 184}, y={"conFCU2.TSup", "conFCU2.TAirSupSet"}, range={0.0, 90000.0, 10.0, 25.0}, grid=true, subPlot=4, colors={{28,108,200}, {238,46,47}}, displayUnits={"degC", "degC"}); +createPlot(id=6, position={800, 947, 788, 184}, y={"conFCU2.yCooCoi"}, range={0.0, 90000.0, -0.5, 1.5}, grid=true, subPlot=5, colors={{28,108,200}}); + +createPlot(id=7, position={640, 947, 788, 939}, y={"conFCU3.uOcc"}, range={0.0, 90000.0, -0.5, 1.5}, grid=true, colors={{28,108,200}}); +createPlot(id=7, position={640, 947, 788, 184}, y={"conFCU3.TZon", "conFCU3.TZonHeaSet", "conFCU3.TZonCooSet"}, range={0.0, 90000.0, 10.0, 35.0}, grid=true, subPlot=2, colors={{28,108,200}, {238,46,47}, {0,140,72}}, displayUnits={"degC", "degC", "degC"}); +createPlot(id=7, position={640, 947, 788, 183}, y={"conFCU3.heaPI.y"}, range={0.0, 90000.0, -2.0, 2.0}, grid=true, subPlot=3, colors={{28,108,200}}); +createPlot(id=7, position={640, 947, 788, 184}, y={"conFCU3.cooPI.y"}, range={0.0, 90000.0, -0.5, 1.5}, grid=true, subPlot=4, colors={{28,108,200}}); +createPlot(id=7, position={640, 947, 788, 184}, y={"conFCU3.modSetPoi.yOpeMod"}, range={0.0, 90000.0, 0.0, 8.0}, grid=true, subPlot=5, colors={{28,108,200}}); + +createPlot(id=8, position={800, 947, 788, 939}, y={"conFCU3.cooPI.y"}, range={0.0, 90000.0, -0.5, 1.5}, grid=true, colors={{28,108,200}}); +createPlot(id=8, position={800, 947, 788, 184}, y={"conFCU3.yFan"}, range={0.0, 90000.0, -0.5, 1.5}, grid=true, subPlot=2, colors={{28,108,200}}); +createPlot(id=8, position={800, 947, 788, 183}, y={"conFCU3.yFanSpe"}, range={0.0, 90000.0, -0.5, 1.5}, grid=true, subPlot=3, colors={{28,108,200}}); +createPlot(id=8, position={800, 947, 788, 184}, y={"conFCU3.TSup", "conFCU2.TAirSupSet"}, range={0.0, 90000.0, 10.0, 25.0}, grid=true, subPlot=4, colors={{28,108,200}, {238,46,47}}, displayUnits={"degC", "degC"}); +createPlot(id=8, position={800, 947, 788, 184}, y={"conFCU3.yCooCoi"}, range={0.0, 90000.0, -0.5, 1.5}, grid=true, subPlot=5, colors={{28,108,200}}); \ No newline at end of file From 9e1c512ca401a65ef7e074eb90ac42dd9a7ad636 Mon Sep 17 00:00:00 2001 From: Devaprasad Date: Sun, 27 Mar 2022 12:40:41 -0700 Subject: [PATCH 07/83] Added control logic diagrams to information sections --- .../ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo | 4 ++++ .../Subsequences/SupplyAirTemperature.mo | 4 ++++ .../FanCoilUnit/Subsequences/FanSpeed.png | Bin 0 -> 34136 bytes .../Subsequences/SupplyAirTemperature.png | Bin 0 -> 26576 bytes 4 files changed, 8 insertions(+) create mode 100644 Buildings/Resources/Images/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.png create mode 100644 Buildings/Resources/Images/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/SupplyAirTemperature.png diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo index 417cae59a72..34b118cf808 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo @@ -349,6 +349,10 @@ equation heaPerMin to the maximum limit heaPerMax. The setpoint in deadband mode is equal to the deadband fan speed deaSpe.

+

+ \"Fan +

", revisions=" "), experiment( - StopTime=3600, + StopTime=100, Interval=1, Tolerance=1e-06, __Dymola_Algorithm="Dassl")); From 2732a204efe8f94a63813b18f1a3541723cbb4a1 Mon Sep 17 00:00:00 2001 From: Devaprasad Date: Fri, 15 Apr 2022 13:33:33 -0700 Subject: [PATCH 16/83] Updated models based on feedback during presentation --- .../OBC/ASHRAE/FanCoilUnit/Controller.mo | 181 ++++++----- .../FanCoilUnit/Subsequences/FanSpeed.mo | 246 +++++++-------- .../Subsequences/SupplyAirTemperature.mo | 281 +++++++++--------- .../Validation/SupplyAirTemperature.mo | 66 ++-- .../FanCoilUnit/Validation/Controller.mo | 107 +++---- .../Validation/SupplyAirTemperature.mos | 16 +- 6 files changed, 460 insertions(+), 437 deletions(-) diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Controller.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Controller.mo index 7fb1ccd88a8..f5abb9dae18 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Controller.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Controller.mo @@ -347,32 +347,32 @@ block Controller Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uOcc "Current occupancy period, true if it is in occupant period" - annotation (Placement(transformation(extent={{-240,100},{-200,140}}), + annotation (Placement(transformation(extent={{-240,50},{-200,90}}), iconTransformation(extent={{-240,20},{-200,60}}))); Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uWin if have_winSen "Window status, true if open, false if closed" - annotation (Placement(transformation(extent={{-240,-160},{-200,-120}}), - iconTransformation(extent={{-240,-220},{-200,-180}}))); + annotation (Placement(transformation(extent={{-240,-170},{-200,-130}}), + iconTransformation(extent={{-240,-260},{-200,-220}}))); Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uFan - "Fan proven on signal" annotation (Placement( - transformation(extent={{-240,-120},{-200,-80}}), iconTransformation( - extent={{-240,-140},{-200,-100}}))); + "Fan proven on signal" + annotation (Placement(transformation(extent={{-240,-140},{-200,-100}}), + iconTransformation(extent={{-240,-220},{-200,-180}}))); Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uCooDemLimLev "Cooling demand limit level" - annotation (Placement(transformation(extent={{-240,50},{-200,90}}), + annotation (Placement(transformation(extent={{-240,20},{-200,60}}), iconTransformation(extent={{-240,-20},{-200,20}}))); Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uHeaDemLimLev "Heating demand limit level" - annotation (Placement(transformation(extent={{-240,20},{-200,60}}), + annotation (Placement(transformation(extent={{-240,-10},{-200,30}}), iconTransformation(extent={{-240,-60},{-200,-20}}))); Buildings.Controls.OBC.CDL.Interfaces.IntegerInput nOcc if have_occSen "Number of occupants" - annotation (Placement(transformation(extent={{-240,-80},{-200,-40}}), + annotation (Placement(transformation(extent={{-240,-110},{-200,-70}}), iconTransformation(extent={{-240,-180},{-200,-140}}))); Buildings.Controls.OBC.CDL.Interfaces.RealInput warUpTim( @@ -381,7 +381,7 @@ block Controller final quantity="Time") "Warm-up time retrieved from optimal warm-up block" annotation (Placement(transformation(extent={{-240,170},{-200,210}}), - iconTransformation(extent={{-240,180},{-200,220}}))); + iconTransformation(extent={{-240,220},{-200,260}}))); Buildings.Controls.OBC.CDL.Interfaces.RealInput cooDowTim( final unit="s", @@ -389,32 +389,47 @@ block Controller final quantity="Time") "Cool-down time retrieved from optimal cool-down block" annotation (Placement(transformation(extent={{-240,200},{-200,240}}), - iconTransformation(extent={{-240,140},{-200,180}}))); + iconTransformation(extent={{-240,180},{-200,220}}))); Buildings.Controls.OBC.CDL.Interfaces.RealInput tNexOcc( final unit="s", displayUnit="min", - final quantity="Time") - "Time to next occupied period" + final quantity="Time") "Time to next occupied period" annotation (Placement(transformation(extent={{-240,140},{-200,180}}), - iconTransformation(extent={{-240,100},{-200,140}}))); + iconTransformation(extent={{-240,140},{-200,180}}))); Buildings.Controls.OBC.CDL.Interfaces.RealInput TZon( final unit="K", displayUnit="degC", final quantity="ThermodynamicTemperature") "Measured zone temperatures" - annotation (Placement(transformation(extent={{-240,-40},{-200,0}}), - iconTransformation(extent={{-240,60},{-200,100}}))); + annotation (Placement(transformation(extent={{-240,-70},{-200,-30}}), + iconTransformation(extent={{-240,-140},{-200,-100}}))); Buildings.Controls.OBC.CDL.Interfaces.RealInput TSup( final unit="K", displayUnit="degC", final quantity="ThermodynamicTemperature") "Measured supply air temperature" - annotation (Placement(transformation(extent={{-240,-10},{-200,30}}), + annotation (Placement(transformation(extent={{-240,-40},{-200,0}}), iconTransformation(extent={{-240,-100},{-200,-60}}))); + Buildings.Controls.OBC.CDL.Interfaces.RealInput setAdj( + final unit="K", + displayUnit="degC", + final quantity="TemperatureDifference") if cooAdj or sinAdj + "Setpoint adjustment value" + annotation (Placement(transformation(extent={{-240,110},{-200,150}}), + iconTransformation(extent={{-240,100},{-200,140}}))); + + Buildings.Controls.OBC.CDL.Interfaces.RealInput heaSetAdj( + final unit="K", + displayUnit="degC", + final quantity="TemperatureDifference") if heaAdj + "Heating setpoint adjustment value" + annotation (Placement(transformation(extent={{-240,80},{-200,120}}), + iconTransformation(extent={{-240,60},{-200,100}}))); + Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yFan "Fan enable signal" annotation (Placement(transformation(extent={{200,180},{240,220}}), @@ -515,23 +530,23 @@ block Controller annotation (Placement(transformation(extent={{-80,210},{-60,230}}))); protected - Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt( + Buildings.Controls.OBC.CDL.Integers.Sources.Constant unOccMod( final k=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.unoccupied) "Unoccupied mode" annotation (Placement(transformation(extent={{-160,-180},{-140,-160}}))); - Buildings.Controls.OBC.CDL.Integers.Equal intEqu + Buildings.Controls.OBC.CDL.Integers.Equal isUnOcc "Check if current operation mode is unoccupied mode" annotation (Placement(transformation(extent={{-100,-180},{-80,-160}}))); - Buildings.Controls.OBC.CDL.Logical.Not switch + Buildings.Controls.OBC.CDL.Logical.Not isOcc "If in unoccupied mode, switch off" annotation (Placement(transformation(extent={{-70,-180},{-50,-160}}))); Buildings.Controls.OBC.CDL.Logical.Sources.Constant win( final k=false) if not have_winSen "Window status" - annotation (Placement(transformation(extent={{-180,-50},{-160,-30}}))); + annotation (Placement(transformation(extent={{-180,-80},{-160,-60}}))); Buildings.Controls.OBC.CDL.Integers.GreaterEqualThreshold havOcc( final t=1) if have_occSen @@ -541,9 +556,9 @@ protected Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.SupplyAirTemperature TSupAir( final have_coolingCoil=have_coolingCoil, final have_heatingCoil=have_heatingCoil, - final THeaSupAirHi=TSupSetMax, + final THeaSupAirMax=TSupSetMax, + final TCooSupAirMin=TSupSetMin, final heaPerMax=heaPerMin, - final TCooSupAirHi=TSupSetMin, final cooPerMax=cooPerMin, final heaDea=heaDea, final cooDea=cooDea, @@ -557,7 +572,7 @@ protected final TdHeaCoi=TdHeaCoi, final deaHysLim=deaHysLim) "Supply air temperature setpoint controller" - annotation (Placement(transformation(extent={{100,0},{120,20}}))); + annotation (Placement(transformation(extent={{100,-2},{120,22}}))); Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.FanSpeed fanSpe( final have_coolingCoil=have_coolingCoil, @@ -578,21 +593,22 @@ protected annotation (Placement(transformation(extent={{120,170},{140,190}}))); equation - connect(conInt.y, intEqu.u2) annotation (Line(points={{-138,-170},{-120,-170}, - {-120,-178},{-102,-178}},color={255,127,0})); + connect(unOccMod.y, isUnOcc.u2) annotation (Line(points={{-138,-170},{-120,-170}, + {-120,-178},{-102,-178}}, color={255,127,0})); - connect(intEqu.y, switch.u) annotation (Line(points={{-78,-170},{-72,-170}}, color={255,0,255})); + connect(isUnOcc.y, isOcc.u) + annotation (Line(points={{-78,-170},{-72,-170}}, color={255,0,255})); - connect(TZon, cooPI.u_m) annotation (Line(points={{-220,-20},{-30,-20},{-30,148}}, + connect(TZon, cooPI.u_m) annotation (Line(points={{-220,-50},{-30,-50},{-30,148}}, color={0,0,127})); - connect(switch.y, heaPI.trigger) annotation (Line(points={{-48,-170},{-36,-170}, + connect(isOcc.y, heaPI.trigger) annotation (Line(points={{-48,-170},{-36,-170}, {-36,84},{-76,84},{-76,208}}, color={255,0,255})); - connect(switch.y, cooPI.trigger) annotation (Line(points={{-48,-170},{-36,-170}, + connect(isOcc.y, cooPI.trigger) annotation (Line(points={{-48,-170},{-36,-170}, {-36,148}}, color={255,0,255})); - connect(TZon, heaPI.u_m) annotation (Line(points={{-220,-20},{-70,-20},{-70,208}}, + connect(TZon, heaPI.u_m) annotation (Line(points={{-220,-50},{-70,-50},{-70,208}}, color={0,0,127})); connect(modSetPoi.TZonHeaSet, heaPI.u_s) annotation (Line(points={{-118,152},{ @@ -607,22 +623,22 @@ equation connect(modSetPoi.TZonCooSet, TZonCooSet) annotation (Line(points={{-118,160}, {-50,160},{-50,80},{220,80}}, color={0,0,127})); - connect(TZon, modSetPoi.TZon) annotation (Line(points={{-220,-20},{-168,-20},{ + connect(TZon, modSetPoi.TZon) annotation (Line(points={{-220,-50},{-168,-50},{ -168,164},{-142,164}}, color={0,0,127})); connect(tNexOcc, modSetPoi.tNexOcc) annotation (Line(points={{-220,160},{-142, 160}}, color={0,0,127})); - connect(uOcc, modSetPoi.uOcc) annotation (Line(points={{-220,120},{-174,120},{ - -174,162},{-142,162}}, color={255,0,255})); + connect(uOcc, modSetPoi.uOcc) annotation (Line(points={{-220,70},{-174,70},{-174, + 162},{-142,162}}, color={255,0,255})); - connect(modSetPoi.yOpeMod, intEqu.u1) annotation (Line(points={{-118,168},{-110, + connect(modSetPoi.yOpeMod, isUnOcc.u1) annotation (Line(points={{-118,168},{-110, 168},{-110,-170},{-102,-170}}, color={255,127,0})); - connect(win.y, modSetPoi.uWin) annotation (Line(points={{-158,-40},{-150,-40}, + connect(win.y, modSetPoi.uWin) annotation (Line(points={{-158,-70},{-150,-70}, {-150,166},{-142,166}}, color={255,0,255})); - connect(uWin, modSetPoi.uWin) annotation (Line(points={{-220,-140},{-150,-140}, + connect(uWin, modSetPoi.uWin) annotation (Line(points={{-220,-150},{-150,-150}, {-150,166},{-142,166}},color={255,0,255})); connect(havOcc.y, modSetPoi.uOccSen) annotation (Line(points={{-78,60},{-60,60}, @@ -635,15 +651,15 @@ equation 170},{-174,220},{-220,220}}, color={0,0,127})); connect(modSetPoi.uCooDemLimLev, uCooDemLimLev) annotation (Line(points={{-142, - 152},{-162,152},{-162,70},{-220,70}}, color={255,127,0})); + 152},{-162,152},{-162,40},{-220,40}}, color={255,127,0})); connect(modSetPoi.uHeaDemLimLev, uHeaDemLimLev) annotation (Line(points={{-142, - 150},{-156,150},{-156,40},{-220,40}}, color={255,127,0})); + 150},{-156,150},{-156,10},{-220,10}}, color={255,127,0})); - connect(TSupAir.yCooCoi, yCooCoi) annotation (Line(points={{122,5},{160,5},{160, + connect(TSupAir.yCooCoi, yCooCoi) annotation (Line(points={{122,4},{160,4},{160, -60},{220,-60}}, color={0,0,127})); - connect(TSupAir.yHeaCoi, yHeaCoi) annotation (Line(points={{122,15},{160,15},{ + connect(TSupAir.yHeaCoi, yHeaCoi) annotation (Line(points={{122,16},{160,16},{ 160,20},{220,20}}, color={0,0,127})); connect(TSupAir.TAirSupSet, TAirSupSet) annotation (Line(points={{122,10},{180, @@ -656,14 +672,13 @@ equation {220,200}}, color={255,0,255})); connect(modSetPoi.yOpeMod, fanSpe.opeMod) annotation (Line(points={{-118,168}, - {-60,168},{-60,180},{20,180},{20,188},{118,188}}, color={255,127,0})); + {-60,168},{-60,180},{20,180},{20,186},{118,186}}, color={255,127,0})); - connect(TSup, TSupAir.TAirSup) annotation (Line(points={{-220,10},{-62,10},{-62, - 8.33333},{98,8.33333}}, - color={0,0,127})); + connect(TSup, TSupAir.TAirSup) annotation (Line(points={{-220,-20},{-62,-20},{ + -62,8},{98,8}}, color={0,0,127})); - connect(uFan, fanSpe.uFanPro) annotation (Line(points={{-220,-100},{28,-100},{ - 28,184},{118,184}}, color={255,0,255})); + connect(uFan, fanSpe.uFanPro) annotation (Line(points={{-220,-120},{28,-120},{ + 28,182},{118,182}}, color={255,0,255})); connect(heaPI.y, fanSpe.uHea) annotation (Line(points={{-58,220},{0,220},{0,178}, {118,178}}, color={0,0,127})); @@ -672,46 +687,47 @@ equation 174},{118,174}}, color={0,0,127})); connect(modSetPoi.TZonCooSet, TSupAir.TZonSetCoo) annotation (Line(points={{-118, - 160},{-50,160},{-50,1.66667},{98,1.66667}}, - color={0,0,127})); + 160},{-50,160},{-50,0},{98,0}}, color={0,0,127})); connect(modSetPoi.TZonHeaSet, TSupAir.TZonSetHea) annotation (Line(points={{-118, - 152},{-54,152},{-54,15},{98,15}}, color={0,0,127})); + 152},{-54,152},{-54,16},{98,16}}, color={0,0,127})); connect(cooPI.y, TSupAir.uCoo) annotation (Line(points={{-18,160},{20,160},{20, - 5},{98,5}}, color={0,0,127})); + 4},{98,4}}, color={0,0,127})); - connect(heaPI.y, TSupAir.uHea) annotation (Line(points={{-58,220},{0,220},{0, - 11.6667},{98,11.6667}}, - color={0,0,127})); + connect(heaPI.y, TSupAir.uHea) annotation (Line(points={{-58,220},{0,220},{0,12}, + {98,12}}, color={0,0,127})); connect(TZonHeaSet, TZonHeaSet) annotation (Line(points={{220,120},{220,120}}, color={0,0,127})); - connect(uFan, TSupAir.uFan) annotation (Line(points={{-220,-100},{28,-100},{ - 28,18.3333},{98,18.3333}}, - color={255,0,255})); - connect(nOcc, havOcc.u) annotation (Line(points={{-220,-60},{-120,-60},{-120,60}, + connect(uFan, TSupAir.uFan) annotation (Line(points={{-220,-120},{28,-120},{28, + 20},{98,20}}, color={255,0,255})); + connect(nOcc, havOcc.u) annotation (Line(points={{-220,-90},{-120,-90},{-120,60}, {-102,60}}, color={255,127,0})); + connect(setAdj, modSetPoi.setAdj) annotation (Line(points={{-220,130},{-184,130}, + {-184,158},{-142,158}}, color={0,0,127})); + connect(heaSetAdj, modSetPoi.heaSetAdj) annotation (Line(points={{-220,100},{-152, + 100},{-152,156},{-142,156}}, color={0,0,127})); annotation (defaultComponentName="conFCU", - Icon(coordinateSystem(preserveAspectRatio=false, extent={{-200,-220},{200,220}}), + Icon(coordinateSystem(preserveAspectRatio=false, extent={{-200,-260},{200,260}}), graphics={Rectangle( - extent={{-200,-220},{200,220}}, + extent={{-200,-260},{200,260}}, lineColor={0,0,127}, fillColor={255,255,255}, fillPattern=FillPattern.Solid), Text( - extent={{-210,300},{210,220}}, + extent={{-210,340},{210,260}}, textString="%name", textColor={0,0,255}), Text( - extent={{-198,136},{-136,108}}, + extent={{-196,176},{-134,148}}, textColor={0,0,127}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="tNexOcc"), Text( - extent={{-200,92},{-156,72}}, + extent={{-200,-108},{-156,-128}}, textColor={0,0,127}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, @@ -729,15 +745,14 @@ annotation (defaultComponentName="conFCU", fillPattern=FillPattern.Solid, textString="TSup"), Text( - visible=have_occSen, - extent={{-196,-172},{-150,-144}}, - textColor={0,0,127}, + extent={{-198,-172},{-152,-144}}, + textColor={244,125,35}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="nOcc"), Text( visible=have_winSen, - extent={{-196,-186},{-152,-208}}, + extent={{-198,-226},{-154,-248}}, textColor={255,0,255}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, @@ -755,55 +770,55 @@ annotation (defaultComponentName="conFCU", fillPattern=FillPattern.Solid, textString="yFanSpe"), Text( - extent={{118,56},{196,22}}, + extent={{116,56},{194,22}}, textColor={0,0,127}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="TZonHeaSet"), Text( - extent={{118,18},{198,-20}}, + extent={{116,18},{196,-20}}, textColor={0,0,127}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="TZonCooSet"), Text( - extent={{144,-20},{198,-58}}, + extent={{142,-20},{196,-58}}, textColor={0,0,127}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="yHeaCoi"), Text( - extent={{144,-60},{198,-98}}, + extent={{142,-60},{196,-98}}, textColor={0,0,127}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="yCooCoi"), Text( - extent={{-196,218},{-122,186}}, + extent={{-194,258},{-120,226}}, textColor={0,0,127}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="warUpTim"), Text( - extent={{-196,178},{-116,146}}, + extent={{-194,218},{-114,186}}, textColor={0,0,127}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="cooDowTim"), Text( - extent={{-196,14},{-84,-8}}, + extent={{-194,14},{-82,-8}}, textColor={255,127,0}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="uCooDemLimLev"), Text( - extent={{-196,-28},{-84,-50}}, + extent={{-194,-28},{-82,-50}}, textColor={255,127,0}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="uHeaDemLimLev"), Text( - extent={{-200,-110},{-154,-130}}, + extent={{-202,-190},{-156,-210}}, textColor={255,0,255}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, @@ -813,7 +828,19 @@ annotation (defaultComponentName="conFCU", textColor={255,0,255}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, - textString="yFan")}), + textString="yFan"), + Text( + extent={{-196,134},{-134,106}}, + textColor={0,0,127}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid, + textString="setAdj"), + Text( + extent={{-196,94},{-134,66}}, + textColor={0,0,127}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid, + textString="heaSetAdj")}), Diagram(coordinateSystem( preserveAspectRatio=false, extent={{-200,-200},{200,240}})), Documentation(info=" diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo index 34b118cf808..3ae611776dd 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/FanSpeed.mo @@ -92,24 +92,27 @@ block FanSpeed Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uFanPro "Fan proven on signal" - annotation (Placement(transformation(extent={{-140,20},{-100,60}}))); + annotation (Placement(transformation(extent={{-140,20},{-100,60}}), + iconTransformation(extent={{-140,0},{-100,40}}))); Buildings.Controls.OBC.CDL.Interfaces.IntegerInput opeMod "System operating mode" - annotation (Placement(transformation(extent={{-140,60},{-100,100}}))); + annotation (Placement(transformation(extent={{-140,60},{-100,100}}), + iconTransformation(extent={{-140,40},{-100,80}}))); Buildings.Controls.OBC.CDL.Interfaces.RealInput uHea( final unit="1", displayUnit="1") if have_heatingCoil "Heating loop signal" - annotation (Placement(transformation(extent={{-140,-40},{-100,0}}))); + annotation (Placement(transformation(extent={{-140,-40},{-100,0}}), + iconTransformation(extent={{-140,-40},{-100,0}}))); Buildings.Controls.OBC.CDL.Interfaces.RealInput uCoo( final unit="1", displayUnit="1") if have_coolingCoil "Cooling loop signal" - annotation (Placement(transformation(extent={{-140,-120},{-100,-80}}), - iconTransformation(extent={{-140,-80},{-100,-40}}))); + annotation (Placement(transformation(extent={{-140,-140},{-100,-100}}), + iconTransformation(extent={{-140,-80},{-100,-40}}))); Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yFan "Fan enable signal" @@ -124,20 +127,20 @@ block FanSpeed iconTransformation(extent={{100,-40},{140,0}}))); protected - Buildings.Controls.OBC.CDL.Integers.Equal intEqu + Buildings.Controls.OBC.CDL.Integers.Equal isUnOcc "Check if zone is unoccupied" annotation (Placement(transformation(extent={{-40,70},{-20,90}}))); - Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt( + Buildings.Controls.OBC.CDL.Integers.Sources.Constant unOccMod( final k=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.unoccupied) "Constant unoccupied mode signal" annotation (Placement(transformation(extent={{-80,50},{-60,70}}))); - Buildings.Controls.OBC.CDL.Logical.Not not1 + Buildings.Controls.OBC.CDL.Logical.Not isOcc "Enable only if zone is not in unoccupied mode" annotation (Placement(transformation(extent={{-10,70},{10,90}}))); - Buildings.Controls.OBC.CDL.Continuous.Switch swi + Buildings.Controls.OBC.CDL.Continuous.Switch swiFanPro "Switch fan speed to maximum until the fan is proven ON" annotation (Placement(transformation(extent={{80,-10},{100,10}}))); @@ -145,56 +148,56 @@ protected "Convert fan enable signal to Real" annotation (Placement(transformation(extent={{50,-30},{70,-10}}))); - Buildings.Controls.OBC.CDL.Continuous.Line lin + Buildings.Controls.OBC.CDL.Continuous.Line linHeaFanSpe "Heating fan speed signal" annotation (Placement(transformation(extent={{-30,-30},{-10,-10}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con[2]( - final k={heaPerMin,heaPerMax}) - "Heating loop signal support points" - annotation (Placement(transformation(extent={{-80,-50},{-60,-30}}))); + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant conHeaPerMin( + final k=heaPerMin) + "Minimum heating loop signal support point" + annotation (Placement(transformation(extent={{-90,-50},{-70,-30}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con1[2]( - final k={heaSpeMin,heaSpeMax}) - "Heating fan speed limit signals" - annotation (Placement(transformation(extent={{-80,-10},{-60,10}}))); + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant conHeaSpeMin( + final k=heaSpeMin) + "Minimum heating fan speed limit signal" + annotation (Placement(transformation(extent={{-90,10},{-70,30}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con2[2]( - final k={cooSpeMin,cooSpeMax}) - "Cooling fan speed limit signals" - annotation (Placement(transformation(extent={{-80,-90},{-60,-70}}))); + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant conCooSpeMin( + final k=cooSpeMin) + "Minimum cooling fan speed limit signal" + annotation (Placement(transformation(extent={{-90,-110},{-70,-90}}))); - Buildings.Controls.OBC.CDL.Continuous.Line lin1 + Buildings.Controls.OBC.CDL.Continuous.Line linCooFanSpe "Cooling fan speed signal" - annotation (Placement(transformation(extent={{-30,-110},{-10,-90}}))); + annotation (Placement(transformation(extent={{-30,-130},{-10,-110}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con3[2]( - final k={cooPerMin,cooPerMax}) - "Cooling loop signal support points" - annotation (Placement(transformation(extent={{-80,-130},{-60,-110}}))); + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant conCooPerMin( + final k=cooPerMin) + "Minimum cooling loop signal support point" + annotation (Placement(transformation(extent={{-90,-150},{-70,-130}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con4( + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant conDeaFanSpe( final k=deaSpe) "Deadband mode fan speed signal" annotation (Placement(transformation(extent={{-30,-70},{-10,-50}}))); - Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys( - final uLow=heaDea - deaHysLim, + Buildings.Controls.OBC.CDL.Continuous.Hysteresis hysDeaHea( + final uLow=heaDea-deaHysLim, final uHigh=heaDea) "Hysteresis for switching between deadband mode and heating mode" annotation (Placement(transformation(extent={{0,-50},{20,-30}}))); - Buildings.Controls.OBC.CDL.Continuous.Switch swi1 + Buildings.Controls.OBC.CDL.Continuous.Switch swiDeaHea "Switch for turning on heating mode from deadband mode" annotation (Placement(transformation(extent={{30,-70},{50,-50}}))); - Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys1( - final uLow=cooDea - deaHysLim, + Buildings.Controls.OBC.CDL.Continuous.Hysteresis hysDeaCoo( + final uLow=cooDea-deaHysLim, final uHigh=cooDea) "Hysteresis for switching on cooling mode from deadband mode" - annotation (Placement(transformation(extent={{0,-90},{20,-70}}))); + annotation (Placement(transformation(extent={{0,-110},{20,-90}}))); - Buildings.Controls.OBC.CDL.Continuous.Switch swi2 + Buildings.Controls.OBC.CDL.Continuous.Switch swiDeaCoo "Switch for turning on cooling mode from deadband mode" annotation (Placement(transformation(extent={{60,-110},{80,-90}}))); @@ -202,120 +205,131 @@ protected "Multiply fan speed signal by fan enable signal" annotation (Placement(transformation(extent={{90,-50},{110,-30}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con6( + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant conZerHeaMod( final k=0) if not have_heatingCoil - "Constant zero signal" - annotation (Placement(transformation(extent={{-50,10},{-30,30}}))); + "Constant zero signal for heating mode" + annotation (Placement(transformation(extent={{-90,-80},{-70,-60}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con8( + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant conZerCooMod( final k=0) if not have_coolingCoil - "Constant zero signal" - annotation (Placement(transformation(extent={{-40,-140},{-20,-120}}))); + "Constant zero signal for cooling mode" + annotation (Placement(transformation(extent={{-30,-160},{-10,-140}}))); + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant conHeaSpeMax( + final k=heaSpeMax) + "Maximum heating fan speed limit signal" + annotation (Placement(transformation(extent={{-60,10},{-40,30}}))); + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant conHeaPerMax( + final k=heaPerMax) + "Maximum heating loop signal support point" + annotation (Placement(transformation(extent={{-60,-50},{-40,-30}}))); + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant conCooSpeMax( + final k=cooSpeMax) + "Maximum cooling fan speed limit signal" + annotation (Placement(transformation(extent={{-60,-100},{-40,-80}}))); + + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant conCooPerMax( + final k=cooPerMax) + "Maximum cooling loop signal support point" + annotation (Placement(transformation(extent={{-60,-160},{-40,-140}}))); equation - connect(conInt.y, intEqu.u2) annotation (Line(points={{-58,60},{-50,60},{-50, + connect(unOccMod.y, isUnOcc.u2) annotation (Line(points={{-58,60},{-50,60},{-50, 72},{-42,72}}, color={255,127,0})); - connect(opeMod, intEqu.u1) + connect(opeMod, isUnOcc.u1) annotation (Line(points={{-120,80},{-42,80}}, color={255,127,0})); - connect(intEqu.y, not1.u) + connect(isUnOcc.y, isOcc.u) annotation (Line(points={{-18,80},{-12,80}}, color={255,0,255})); - connect(not1.y, yFan) annotation (Line(points={{12,80},{40,80},{40,40},{140, - 40}}, color={255,0,255})); + connect(isOcc.y, yFan) annotation (Line(points={{12,80},{40,80},{40,40},{140,40}}, + color={255,0,255})); - connect(uFanPro, swi.u2) annotation (Line(points={{-120,40},{30,40},{30,0},{ - 78,0}}, color={255,0,255})); + connect(uFanPro, swiFanPro.u2) annotation (Line(points={{-120,40},{30,40},{30, + 0},{78,0}}, color={255,0,255})); - connect(not1.y, booToRea.u) annotation (Line(points={{12,80},{40,80},{40,-20}, + connect(isOcc.y, booToRea.u) annotation (Line(points={{12,80},{40,80},{40,-20}, {48,-20}}, color={255,0,255})); - connect(booToRea.y, swi.u3) annotation (Line(points={{72,-20},{74,-20},{74,-8}, - {78,-8}}, color={0,0,127})); + connect(booToRea.y, swiFanPro.u3) annotation (Line(points={{72,-20},{74,-20},{ + 74,-8},{78,-8}}, color={0,0,127})); - connect(uHea, lin.u) + connect(uHea, linHeaFanSpe.u) annotation (Line(points={{-120,-20},{-32,-20}}, color={0,0,127})); - connect(con[1].y, lin.x1) annotation (Line(points={{-58,-40},{-50,-40},{-50, - -12},{-32,-12}}, color={0,0,127})); - - connect(con[2].y, lin.x2) annotation (Line(points={{-58,-40},{-50,-40},{-50, - -24},{-32,-24}}, color={0,0,127})); - - connect(con1[1].y, lin.f1) annotation (Line(points={{-58,0},{-40,0},{-40,-16}, - {-32,-16}}, color={0,0,127})); - - connect(con1[2].y, lin.f2) annotation (Line(points={{-58,0},{-40,0},{-40,-28}, - {-32,-28}}, color={0,0,127})); - - connect(con3[2].y, lin1.x2) annotation (Line(points={{-58,-120},{-50,-120},{ - -50,-104},{-32,-104}}, color={0,0,127})); + connect(uCoo, linCooFanSpe.u) + annotation (Line(points={{-120,-120},{-32,-120}}, color={0,0,127})); - connect(con3[1].y, lin1.x1) annotation (Line(points={{-58,-120},{-50,-120},{ - -50,-92},{-32,-92}}, color={0,0,127})); + connect(uHea, hysDeaHea.u) annotation (Line(points={{-120,-20},{-36,-20},{-36, + -40},{-2,-40}}, color={0,0,127})); - connect(con2[2].y, lin1.f2) annotation (Line(points={{-58,-80},{-40,-80},{-40, - -108},{-32,-108}}, color={0,0,127})); + connect(hysDeaHea.y, swiDeaHea.u2) annotation (Line(points={{22,-40},{26,-40}, + {26,-60},{28,-60}}, color={255,0,255})); - connect(con2[1].y, lin1.f1) annotation (Line(points={{-58,-80},{-40,-80},{-40, - -96},{-32,-96}}, color={0,0,127})); + connect(conDeaFanSpe.y, swiDeaHea.u3) annotation (Line(points={{-8,-60},{20,-60}, + {20,-68},{28,-68}}, color={0,0,127})); - connect(uCoo, lin1.u) - annotation (Line(points={{-120,-100},{-32,-100}}, color={0,0,127})); + connect(linHeaFanSpe.y, swiDeaHea.u1) annotation (Line(points={{-8,-20},{-4,-20}, + {-4,-52},{28,-52}}, color={0,0,127})); - connect(uHea, hys.u) annotation (Line(points={{-120,-20},{-44,-20},{-44,-40}, - {-2,-40}}, color={0,0,127})); + connect(hysDeaCoo.y, swiDeaCoo.u2) + annotation (Line(points={{22,-100},{58,-100}}, color={255,0,255})); - connect(hys.y, swi1.u2) annotation (Line(points={{22,-40},{26,-40},{26,-60},{ - 28,-60}}, color={255,0,255})); + connect(uCoo, hysDeaCoo.u) annotation (Line(points={{-120,-120},{-34,-120},{-34, + -100},{-2,-100}}, color={0,0,127})); - connect(con4.y, swi1.u3) annotation (Line(points={{-8,-60},{20,-60},{20,-68}, - {28,-68}}, color={0,0,127})); + connect(linCooFanSpe.y, swiDeaCoo.u1) annotation (Line(points={{-8,-120},{40,-120}, + {40,-92},{58,-92}}, color={0,0,127})); - connect(lin.y, swi1.u1) annotation (Line(points={{-8,-20},{-4,-20},{-4,-52},{ - 28,-52}}, color={0,0,127})); - - connect(hys1.y, swi2.u2) annotation (Line(points={{22,-80},{26,-80},{26,-100}, - {58,-100}}, color={255,0,255})); - - connect(uCoo, hys1.u) annotation (Line(points={{-120,-100},{-44,-100},{-44,-84}, - {-20,-84},{-20,-80},{-2,-80}}, color={0,0,127})); - - connect(lin1.y, swi2.u1) annotation (Line(points={{-8,-100},{20,-100},{20,-92}, - {58,-92}}, color={0,0,127})); - - connect(swi1.y, swi2.u3) annotation (Line(points={{52,-60},{54,-60},{54,-108}, - {58,-108}}, color={0,0,127})); + connect(swiDeaHea.y, swiDeaCoo.u3) annotation (Line(points={{52,-60},{54,-60}, + {54,-108},{58,-108}}, color={0,0,127})); connect(booToRea.y, mul.u1) annotation (Line(points={{72,-20},{74,-20},{74, -34},{88,-34}}, color={0,0,127})); - connect(swi2.y, mul.u2) annotation (Line(points={{82,-100},{84,-100},{84,-46}, - {88,-46}}, color={0,0,127})); + connect(swiDeaCoo.y, mul.u2) annotation (Line(points={{82,-100},{84,-100},{84, + -46},{88,-46}}, color={0,0,127})); - connect(mul.y, swi.u1) annotation (Line(points={{112,-40},{114,-40},{114,20}, - {74,20},{74,8},{78,8}}, color={0,0,127})); + connect(mul.y, swiFanPro.u1) annotation (Line(points={{112,-40},{114,-40},{114, + 20},{74,20},{74,8},{78,8}}, color={0,0,127})); - connect(swi.y, yFanSpe) + connect(swiFanPro.y, yFanSpe) annotation (Line(points={{102,0},{140,0}}, color={0,0,127})); - connect(con6.y, lin.u) annotation (Line(points={{-28,20},{-20,20},{-20,4},{ - -44,4},{-44,-20},{-32,-20}}, color={0,0,127})); - - connect(con8.y, lin1.u) annotation (Line(points={{-18,-130},{-10,-130},{-10, - -114},{-44,-114},{-44,-100},{-32,-100}}, color={0,0,127})); - - connect(con6.y, hys.u) annotation (Line(points={{-28,20},{-20,20},{-20,4},{ - -44,4},{-44,-40},{-2,-40}}, color={0,0,127})); - - connect(con8.y, hys1.u) annotation (Line(points={{-18,-130},{-10,-130},{-10, - -114},{-44,-114},{-44,-84},{-20,-84},{-20,-80},{-2,-80}}, color={0,0, - 127})); - + connect(conZerHeaMod.y, linHeaFanSpe.u) annotation (Line(points={{-68,-70},{-36, + -70},{-36,-20},{-32,-20}}, color={0,0,127})); + + connect(conZerCooMod.y, linCooFanSpe.u) annotation (Line(points={{-8,-150},{-6, + -150},{-6,-100},{-34,-100},{-34,-120},{-32,-120}}, color={0,0,127})); + + connect(conZerHeaMod.y, hysDeaHea.u) annotation (Line(points={{-68,-70},{-36,-70}, + {-36,-40},{-2,-40}}, color={0,0,127})); + + connect(conZerCooMod.y, hysDeaCoo.u) annotation (Line(points={{-8,-150},{-6,-150}, + {-6,-100},{-2,-100}}, color={0,0,127})); + + connect(conHeaSpeMax.y, linHeaFanSpe.f2) annotation (Line(points={{-38,20},{-34, + 20},{-34,-28},{-32,-28}}, color={0,0,127})); + connect(conHeaPerMax.y, linHeaFanSpe.x2) + annotation (Line(points={{-38,-40},{-38,-24},{-32,-24}}, color={0,0,127})); + connect(conCooSpeMax.y, linCooFanSpe.f2) annotation (Line(points={{-38,-90},{-36, + -90},{-36,-128},{-32,-128}}, color={0,0,127})); + connect(conCooPerMax.y, linCooFanSpe.x2) annotation (Line(points={{-38,-150},{ + -34,-150},{-34,-124},{-32,-124}}, color={0,0,127})); + connect(conHeaSpeMin.y, linHeaFanSpe.f1) annotation (Line(points={{-68,20},{-66, + 20},{-66,-16},{-32,-16}}, color={0,0,127})); + connect(conHeaPerMin.y, linHeaFanSpe.x1) annotation (Line(points={{-68,-40},{-64, + -40},{-64,-12},{-32,-12}}, color={0,0,127})); + connect(conCooPerMin.y, linCooFanSpe.x1) annotation (Line(points={{-68,-140},{ + -66,-140},{-66,-112},{-32,-112}}, color={0,0,127})); + connect(conCooSpeMin.y, linCooFanSpe.f1) annotation (Line(points={{-68,-100},{ + -64,-100},{-64,-116},{-32,-116}}, color={0,0,127})); annotation (defaultComponentName="fanSpe", - Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}}), graphics={ + Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}), + graphics={ Rectangle( extent={{-100,-100},{100,100}}, lineColor={0,0,127}, @@ -326,7 +340,7 @@ equation textColor={0,0,255}, textString="%name")}), Diagram(coordinateSystem(preserveAspectRatio=false, - extent={{-100,-140},{120,100}})), + extent={{-100,-180},{120,120}})), Documentation(info="

Block that outputs the fan enable signal and the fan speed signal based on diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/SupplyAirTemperature.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/SupplyAirTemperature.mo index ec43ada53b3..2f217fbd7c1 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/SupplyAirTemperature.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/SupplyAirTemperature.mo @@ -15,7 +15,7 @@ block SupplyAirTemperature annotation(Dialog(group="Heating loop parameters", enable = have_heatingCoil)); - parameter Real THeaSupAirHi( + parameter Real THeaSupAirMax( final unit="K", displayUnit="degC") = 273.15 + 32 "Supply air temperature setpoint at maximum heating loop signal" @@ -36,7 +36,7 @@ block SupplyAirTemperature annotation(Dialog(group="Cooling loop parameters", enable = have_coolingCoil)); - parameter Real TCooSupAirHi( + parameter Real TCooSupAirMin( final unit="K", displayUnit="degC") = 273.15+12.8 "Supply air temperature setpoint at maximum cooling loop signal" @@ -166,7 +166,7 @@ block SupplyAirTemperature displayUnit="K", quantity="ThermodynamicTemperature") if have_coolingCoil "Zone cooling temperature setpoint" - annotation (Placement(transformation(extent={{-160,-120},{-120,-80}}), + annotation (Placement(transformation(extent={{-160,-140},{-120,-100}}), iconTransformation(extent={{-140,-120},{-100,-80}}))); Buildings.Controls.OBC.CDL.Interfaces.RealOutput yHeaCoi( @@ -191,101 +191,91 @@ block SupplyAirTemperature annotation (Placement(transformation(extent={{120,-20},{160,20}}), iconTransformation(extent={{100,-20},{140,20}}))); - Buildings.Controls.OBC.CDL.Continuous.Switch swi2 +protected + Buildings.Controls.OBC.CDL.Continuous.Switch swiDeaCoo "Switch for turning on cooling mode from deadband mode" annotation (Placement(transformation(extent={{0,-30},{20,-10}}))); -protected - Buildings.Controls.OBC.CDL.Continuous.Line lin + Buildings.Controls.OBC.CDL.Continuous.Switch swiCooCoi + "Switch cooling coil signal to zero in deadband mode" + annotation (Placement(transformation(extent={{70,-110},{90,-90}}))); + + Buildings.Controls.OBC.CDL.Continuous.Switch swiHeaCoi + "Switch heating coil signal to zero in deadband mode" + annotation (Placement(transformation(extent={{50,80},{70,100}}))); + + Buildings.Controls.OBC.CDL.Continuous.Line linTHeaSupAir "Convert heating loop signal to supply air temperature setpoint" annotation (Placement(transformation(extent={{-60,50},{-40,70}}))); - Buildings.Controls.OBC.CDL.Continuous.Line lin1 + Buildings.Controls.OBC.CDL.Continuous.Line linTCooSupAir "Convert cooling loop signal to supply air temperature setpoint" annotation (Placement(transformation(extent={{-60,-70},{-40,-50}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con1( - final k=THeaSupAirHi) - "Heating supply air temperature setpoint limit signals" + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant conTHeaSupAirMax( + final k=THeaSupAirMax) + "Maximum heating supply air temperature setpoint limit signal" annotation (Placement(transformation(extent={{-110,90},{-90,110}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con2[2]( - final k={heaPerMin,heaPerMax}) - "Heating loop signal support points" - annotation (Placement(transformation(extent={{-100,10},{-80,30}}))); + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant conHeaPerMin( + final k=heaPerMin) + "Minimum heating loop signal support point" + annotation (Placement(transformation(extent={{-110,10},{-90,30}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con3( - final k=TCooSupAirHi) - "Cooling supply air temperature setpoint limit signals" - annotation (Placement(transformation(extent={{-100,-30},{-80,-10}}))); + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant conTCooSupAirMin( + final k=TCooSupAirMin) + "Minimum cooling supply air temperature setpoint limit signal" + annotation (Placement(transformation(extent={{-110,-30},{-90,-10}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con4[2]( - final k={cooPerMin,cooPerMax}) - "Cooling loop signal support points" - annotation (Placement(transformation(extent={{-100,-90},{-80,-70}}))); + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant conCooPerMin( + final k=cooPerMin) + "Minimum cooling loop signal support point" + annotation (Placement(transformation(extent={{-110,-70},{-90,-50}}))); - Buildings.Controls.OBC.CDL.Continuous.PID conPID( + Buildings.Controls.OBC.CDL.Continuous.PID conPIDHea( final controllerType=controllerTypeHeaCoi, final k=kHeaCoi, final Ti=TiHeaCoi, - final Td=TdHeaCoi) - "PID controller for heating coil" + final Td=TdHeaCoi) "PID controller for heating coil" annotation (Placement(transformation(extent={{20,50},{40,70}}))); - Buildings.Controls.OBC.CDL.Continuous.PID conPID1( + Buildings.Controls.OBC.CDL.Continuous.PID conPIDCoo( final controllerType=controllerTypeCooCoi, final k=kCooCoi, final Ti=TiCooCoi, final Td=TdCooCoi, - final reverseActing=false) - "PID controller for cooling coil" + final reverseActing=false) "PID controller for cooling coil" annotation (Placement(transformation(extent={{40,-70},{60,-50}}))); - Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys( - final uLow=heaDea - deaHysLim, + Buildings.Controls.OBC.CDL.Continuous.Hysteresis hysDeaHea( + final uLow=heaDea-deaHysLim, final uHigh=heaDea) "Hysteresis for switching between deadband mode and heating mode" annotation (Placement(transformation(extent={{-40,90},{-20,110}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con6( + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant conZerHeaMod( final k=0) if not have_heatingCoil - "Constant zero signal" + "Constant zero signal for heating mode" annotation (Placement(transformation(extent={{-70,90},{-50,110}}))); - Buildings.Controls.OBC.CDL.Continuous.Switch swi1 + Buildings.Controls.OBC.CDL.Continuous.Switch swiDeaHea "Switch for turning on heating mode from deadband mode" annotation (Placement(transformation(extent={{-20,50},{0,70}}))); - Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys1( - final uLow=cooDea - deaHysLim, + Buildings.Controls.OBC.CDL.Continuous.Hysteresis hysDeaCoo( + final uLow=cooDea-deaHysLim, final uHigh=cooDea) "Hysteresis for switching on cooling mode from deadband mode" annotation (Placement(transformation(extent={{-40,-30},{-20,-10}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con8( + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant conZerCooMod( final k=0) if not have_coolingCoil - "Constant zero signal" - annotation (Placement(transformation(extent={{-100,-130},{-80,-110}}))); - - Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea - "Convert Boolean to Real" - annotation (Placement(transformation(extent={{0,90},{20,110}}))); - - Buildings.Controls.OBC.CDL.Continuous.Multiply mul - "Output heating coil signal only when heating mode is enabled" - annotation (Placement(transformation(extent={{60,50},{80,70}}))); - - Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea1 - "Convert Boolean to Real" - annotation (Placement(transformation(extent={{0,-80},{20,-60}}))); - - Buildings.Controls.OBC.CDL.Continuous.Multiply mul1 - "Output cooling coil signal only when cooling mode is enabled" - annotation (Placement(transformation(extent={{60,-110},{80,-90}}))); + "Constant zero signal for cooling mode" + annotation (Placement(transformation(extent={{-100,-150},{-80,-130}}))); Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea2 "Boolean to Real conversion" - annotation (Placement(transformation(extent={{-100,130},{-80,150}}))); + annotation (Placement(transformation(extent={{60,130},{80,150}}))); Buildings.Controls.OBC.CDL.Continuous.Multiply mul2 "Output heating coil signal only when fan is proven on" @@ -295,132 +285,131 @@ protected "Output cooling coil signal only when fan is proven on" annotation (Placement(transformation(extent={{90,-70},{110,-50}}))); -equation - connect(uHea, lin.u) - annotation (Line(points={{-140,40},{-102,40},{-102,60},{-62,60}}, - color={0,0,127})); - - connect(con2[1].y, lin.x1) annotation (Line(points={{-78,20},{-66,20},{-66,68}, - {-62,68}}, color={0,0,127})); + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant conHeaPerMax( + final k=heaPerMax) + "Maximum heating loop signal support point" + annotation (Placement(transformation(extent={{-80,10},{-60,30}}))); - connect(con2[2].y, lin.x2) annotation (Line(points={{-78,20},{-66,20},{-66,56}, - {-62,56}}, color={0,0,127})); + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant conCooPerMax( + final k=cooPerMax) + "Maximum cooling loop signal support point" + annotation (Placement(transformation(extent={{-110,-110},{-90,-90}}))); - connect(uCoo, lin1.u) - annotation (Line(points={{-140,-40},{-102,-40},{-102,-60},{-62,-60}}, - color={0,0,127})); + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant conZer( + final k=0) + "Constant zero signal" + annotation (Placement(transformation(extent={{0,10},{20,30}}))); - connect(con4[1].y, lin1.x1) annotation (Line(points={{-78,-80},{-74,-80},{-74, - -52},{-62,-52}}, color={0,0,127})); +equation + connect(uHea, linTHeaSupAir.u) annotation (Line(points={{-140,40},{-74,40},{-74, + 60},{-62,60}}, color={0,0,127})); - connect(con4[2].y, lin1.x2) annotation (Line(points={{-78,-80},{-74,-80},{-74, - -64},{-62,-64}}, color={0,0,127})); + connect(uCoo, linTCooSupAir.u) annotation (Line(points={{-140,-40},{-66,-40},{ + -66,-60},{-62,-60}}, color={0,0,127})); - connect(TAirSup, conPID.u_m) + connect(TAirSup, conPIDHea.u_m) annotation (Line(points={{-140,0},{30,0},{30,48}}, color={0,0,127})); - connect(TAirSup, conPID1.u_m) annotation (Line(points={{-140,0},{30,0},{30,-78}, - {50,-78},{50,-72}}, color={0,0,127})); + connect(TAirSup, conPIDCoo.u_m) annotation (Line(points={{-140,0},{30,0},{30,-78}, + {50,-78},{50,-72}}, color={0,0,127})); - connect(lin.y, swi1.u1) annotation (Line(points={{-38,60},{-30,60},{-30,68},{-22, - 68}}, color={0,0,127})); + connect(linTHeaSupAir.y, swiDeaHea.u1) annotation (Line(points={{-38,60},{-30, + 60},{-30,68},{-22,68}}, color={0,0,127})); - connect(con6.y, hys.u) + connect(conZerHeaMod.y, hysDeaHea.u) annotation (Line(points={{-48,100},{-42,100}}, color={0,0,127})); - connect(con6.y, lin.u) annotation (Line(points={{-48,100},{-46,100},{-46,76},{ - -74,76},{-74,60},{-62,60}}, color={0,0,127})); - - connect(uHea, hys.u) annotation (Line(points={{-140,40},{-74,40},{-74,76},{-46, - 76},{-46,100},{-42,100}}, color={0,0,127})); - - connect(hys.y, swi1.u2) annotation (Line(points={{-18,100},{-10,100},{-10,80}, - {-26,80},{-26,60},{-22,60}}, - color={255,0,255})); - - connect(con8.y, lin1.u) annotation (Line(points={{-78,-120},{-66,-120},{-66,-60}, - {-62,-60}}, color={0,0,127})); - - connect(hys1.y, swi2.u2) - annotation (Line(points={{-18,-20},{-2,-20}}, - color={255,0,255})); - - connect(uCoo, hys1.u) annotation (Line(points={{-140,-40},{-66,-40},{-66,-20}, - {-42,-20}}, color={0,0,127})); - - connect(con8.y, hys1.u) annotation (Line(points={{-78,-120},{-66,-120},{-66,-20}, - {-42,-20}}, color={0,0,127})); + connect(conZerHeaMod.y, linTHeaSupAir.u) annotation (Line(points={{-48,100},{-46, + 100},{-46,76},{-74,76},{-74,60},{-62,60}}, color={0,0,127})); - connect(swi1.y, swi2.u3) annotation (Line(points={{2,60},{8,60},{8,40},{-10,40}, - {-10,-28},{-2,-28}}, color={0,0,127})); + connect(uHea, hysDeaHea.u) annotation (Line(points={{-140,40},{-74,40},{-74,76}, + {-46,76},{-46,100},{-42,100}}, color={0,0,127})); - connect(lin1.y, swi2.u1) annotation (Line(points={{-38,-60},{-14,-60},{-14,-12}, - {-2,-12}}, - color={0,0,127})); + connect(hysDeaHea.y, swiDeaHea.u2) annotation (Line(points={{-18,100},{-10,100}, + {-10,80},{-26,80},{-26,60},{-22,60}}, color={255,0,255})); - connect(swi2.y, conPID.u_s) annotation (Line(points={{22,-20},{36,-20},{36,40}, - {12,40},{12,60},{18,60}}, color={0,0,127})); + connect(conZerCooMod.y, linTCooSupAir.u) annotation (Line(points={{-78,-140},{ + -66,-140},{-66,-60},{-62,-60}}, color={0,0,127})); - connect(swi2.y, conPID1.u_s) annotation (Line(points={{22,-20},{36,-20},{36,-60}, - {38,-60}}, color={0,0,127})); + connect(hysDeaCoo.y, swiDeaCoo.u2) + annotation (Line(points={{-18,-20},{-2,-20}}, color={255,0,255})); - connect(con1.y, lin.f2) annotation (Line(points={{-88,100},{-80,100},{-80,52}, - {-62,52}}, color={0,0,127})); + connect(uCoo, hysDeaCoo.u) annotation (Line(points={{-140,-40},{-66,-40},{-66, + -20},{-42,-20}}, color={0,0,127})); - connect(con3.y, lin1.f2) annotation (Line(points={{-78,-20},{-70,-20},{-70,-68}, - {-62,-68}}, color={0,0,127})); + connect(conZerCooMod.y, hysDeaCoo.u) annotation (Line(points={{-78,-140},{-66, + -140},{-66,-20},{-42,-20}}, color={0,0,127})); - connect(TZonSetHea, lin.f1) annotation (Line(points={{-140,80},{-76,80},{-76,64}, - {-62,64}}, color={0,0,127})); + connect(swiDeaHea.y, swiDeaCoo.u3) annotation (Line(points={{2,60},{8,60},{8,40}, + {-10,40},{-10,-28},{-2,-28}}, color={0,0,127})); - connect(TZonSetCoo, lin1.f1) annotation (Line(points={{-140,-100},{-72,-100},{ - -72,-56},{-62,-56}}, color={0,0,127})); + connect(linTCooSupAir.y, swiDeaCoo.u1) annotation (Line(points={{-38,-60},{-14, + -60},{-14,-12},{-2,-12}}, color={0,0,127})); - connect(TAirSup, swi1.u3) annotation (Line(points={{-140,0},{-30,0},{-30,52},{ - -22,52}},color={0,0,127})); + connect(swiDeaCoo.y, conPIDHea.u_s) annotation (Line(points={{22,-20},{36,-20}, + {36,40},{12,40},{12,60},{18,60}}, color={0,0,127})); - connect(con6.y, lin.f1) annotation (Line(points={{-48,100},{-46,100},{-46,76}, - {-74,76},{-74,64},{-62,64}}, color={0,0,127})); + connect(swiDeaCoo.y, conPIDCoo.u_s) annotation (Line(points={{22,-20},{36,-20}, + {36,-60},{38,-60}}, color={0,0,127})); - connect(con8.y, lin1.f1) annotation (Line(points={{-78,-120},{-66,-120},{-66,-56}, - {-62,-56}}, color={0,0,127})); + connect(conTHeaSupAirMax.y, linTHeaSupAir.f2) annotation (Line(points={{-88,100}, + {-80,100},{-80,52},{-62,52}}, color={0,0,127})); - connect(hys.y, booToRea.u) - annotation (Line(points={{-18,100},{-2,100}}, - color={255,0,255})); + connect(conTCooSupAirMin.y, linTCooSupAir.f2) annotation (Line(points={{-88,-20}, + {-70,-20},{-70,-68},{-62,-68}}, color={0,0,127})); - connect(conPID.y, mul.u2) annotation (Line(points={{42,60},{48,60},{48,54},{58, - 54}}, color={0,0,127})); + connect(TZonSetHea, linTHeaSupAir.f1) annotation (Line(points={{-140,80},{-74, + 80},{-74,64},{-62,64}}, color={0,0,127})); - connect(booToRea.y, mul.u1) annotation (Line(points={{22,100},{48,100},{48,66}, - {58,66}}, color={0,0,127})); + connect(TZonSetCoo, linTCooSupAir.f1) annotation (Line(points={{-140,-120},{-64, + -120},{-64,-56},{-62,-56}}, color={0,0,127})); - connect(hys1.y, booToRea1.u) annotation (Line(points={{-18,-20},{-6,-20},{-6,-70}, - {-2,-70}}, color={255,0,255})); + connect(TAirSup, swiDeaHea.u3) annotation (Line(points={{-140,0},{-30,0},{-30, + 52},{-22,52}}, color={0,0,127})); - connect(booToRea1.y, mul1.u2) annotation (Line(points={{22,-70},{26,-70},{26,-106}, - {58,-106}}, color={0,0,127})); + connect(conZerHeaMod.y, linTHeaSupAir.f1) annotation (Line(points={{-48,100},{ + -46,100},{-46,76},{-74,76},{-74,64},{-62,64}}, color={0,0,127})); - connect(conPID1.y, mul1.u1) annotation (Line(points={{62,-60},{64,-60},{64,-86}, - {48,-86},{48,-94},{58,-94}}, color={0,0,127})); + connect(conZerCooMod.y, linTCooSupAir.f1) annotation (Line(points={{-78,-140}, + {-66,-140},{-66,-56},{-62,-56}}, color={0,0,127})); - connect(swi2.y, TAirSupSet) annotation (Line(points={{22,-20},{36,-20},{36,0}, - {140,0}}, color={0,0,127})); + connect(swiDeaCoo.y, TAirSupSet) annotation (Line(points={{22,-20},{36,-20},{36, + 0},{140,0}}, color={0,0,127})); connect(uFan, booToRea2.u) - annotation (Line(points={{-140,140},{-102,140}}, color={255,0,255})); + annotation (Line(points={{-140,140},{58,140}}, color={255,0,255})); connect(yHeaCoi, mul2.y) annotation (Line(points={{140,60},{112,60}}, color={0,0,127})); - connect(mul.y, mul2.u2) annotation (Line(points={{82,60},{84,60},{84,54},{88,54}}, - color={0,0,127})); - connect(booToRea2.y, mul2.u1) annotation (Line(points={{-78,140},{86,140},{86, - 66},{88,66}}, color={0,0,127})); + connect(booToRea2.y, mul2.u1) annotation (Line(points={{82,140},{86,140},{86,66}, + {88,66}}, color={0,0,127})); connect(mul3.y, yCooCoi) annotation (Line(points={{112,-60},{124,-60},{124,-60}, {140,-60}}, color={0,0,127})); - connect(mul1.y, mul3.u2) annotation (Line(points={{82,-100},{84,-100},{84,-66}, - {88,-66}}, color={0,0,127})); - connect(booToRea2.y, mul3.u1) annotation (Line(points={{-78,140},{86,140},{86, - -54},{88,-54}}, color={0,0,127})); + connect(booToRea2.y, mul3.u1) annotation (Line(points={{82,140},{86,140},{86,-54}, + {88,-54}}, color={0,0,127})); + connect(conHeaPerMax.y, linTHeaSupAir.x2) annotation (Line(points={{-58,20},{-52, + 20},{-52,40},{-68,40},{-68,56},{-62,56}}, color={0,0,127})); + connect(conHeaPerMin.y, linTHeaSupAir.x1) annotation (Line(points={{-88,20},{-84, + 20},{-84,68},{-62,68}}, color={0,0,127})); + connect(conCooPerMin.y, linTCooSupAir.x1) annotation (Line(points={{-88,-60},{ + -86,-60},{-86,-52},{-62,-52}}, color={0,0,127})); + connect(conCooPerMax.y, linTCooSupAir.x2) annotation (Line(points={{-88,-100}, + {-80,-100},{-80,-64},{-62,-64}}, color={0,0,127})); + connect(conPIDCoo.y, swiCooCoi.u1) annotation (Line(points={{62,-60},{66,-60}, + {66,-92},{68,-92}}, color={0,0,127})); + connect(swiCooCoi.y, mul3.u2) annotation (Line(points={{92,-100},{100,-100},{100, + -80},{86,-80},{86,-66},{88,-66}}, color={0,0,127})); + connect(hysDeaCoo.y, swiCooCoi.u2) annotation (Line(points={{-18,-20},{-6,-20}, + {-6,-100},{68,-100}}, color={255,0,255})); + connect(swiHeaCoi.y, mul2.u2) annotation (Line(points={{72,90},{80,90},{80,54}, + {88,54}}, color={0,0,127})); + connect(conPIDHea.y, swiHeaCoi.u1) annotation (Line(points={{42,60},{44,60},{44, + 98},{48,98}}, color={0,0,127})); + connect(hysDeaHea.y, swiHeaCoi.u2) annotation (Line(points={{-18,100},{-10,100}, + {-10,90},{48,90}}, color={255,0,255})); + connect(conZer.y, swiHeaCoi.u3) annotation (Line(points={{22,20},{46,20},{46,82}, + {48,82}}, color={0,0,127})); + connect(conZer.y, swiCooCoi.u3) annotation (Line(points={{22,20},{46,20},{46,-40}, + {64,-40},{64,-108},{68,-108}}, color={0,0,127})); annotation (defaultComponentName="TSupAir", Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-120},{100,120}}), graphics={ diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mo index eb24eab3b10..7b4065ba8c8 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mo @@ -6,25 +6,25 @@ block SupplyAirTemperature final have_coolingCoil=true, final have_heatingCoil=true) "Instance demonstrating heating signal operation" - annotation (Placement(transformation(extent={{-50,60},{-30,80}}))); + annotation (Placement(transformation(extent={{-50,60},{-30,84}}))); Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.SupplyAirTemperature TSupAir3( final have_coolingCoil=true, final have_heatingCoil=false) "Instance demonstrating cooling signal operation when heating coil is absent" - annotation (Placement(transformation(extent={{60,-80},{80,-60}}))); + annotation (Placement(transformation(extent={{60,-80},{80,-56}}))); Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.SupplyAirTemperature TSupAir2( final have_coolingCoil=false, final have_heatingCoil=true) "Instance demonstrating heating signal operation when cooling coil is absent" - annotation (Placement(transformation(extent={{-50,-100},{-30,-80}}))); + annotation (Placement(transformation(extent={{-50,-100},{-30,-76}}))); Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.SupplyAirTemperature TSupAir1( final have_coolingCoil=true, final have_heatingCoil=true) "Instance demonstrating cooling signal operation" - annotation (Placement(transformation(extent={{80,60},{100,80}}))); + annotation (Placement(transformation(extent={{80,60},{100,84}}))); protected Buildings.Controls.OBC.CDL.Continuous.Sources.Sine sin( @@ -126,74 +126,64 @@ protected equation connect(sin.y, TSupAir.TAirSup) - annotation (Line(points={{-68,70},{-60,70},{-60,68.3333},{-52,68.3333}}, + annotation (Line(points={{-68,70},{-60,70},{-60,70},{-52,70}}, color={0,0,127})); connect(sin6.y, TSupAir2.TAirSup) - annotation (Line(points={{-68,-90},{-60,-90},{-60,-91.6667},{-52,-91.6667}}, + annotation (Line(points={{-68,-90},{-60,-90},{-60,-90},{-52,-90}}, color={0,0,127})); connect(sin8.y, TSupAir2.uHea) annotation (Line(points={{-68,-60},{-60,-60},{ - -60,-88.3333},{-52,-88.3333}}, - color={0,0,127})); + -60,-86},{-52,-86}}, color={0,0,127})); connect(sin4.y,TSupAir1. TAirSup) - annotation (Line(points={{62,70},{70,70},{70,68.3333},{78,68.3333}}, + annotation (Line(points={{62,70},{70,70},{70,70},{78,70}}, color={0,0,127})); - connect(con.y, TSupAir.TZonSetHea) annotation (Line(points={{-68,130},{-56,130}, - {-56,75},{-52,75}}, color={0,0,127})); + connect(con.y, TSupAir.TZonSetHea) annotation (Line(points={{-68,130},{-56, + 130},{-56,78},{-52,78}}, color={0,0,127})); connect(con1.y, TSupAir.TZonSetCoo) annotation (Line(points={{-68,10},{-56,10}, - {-56,61.6667},{-52,61.6667}}, - color={0,0,127})); + {-56,62},{-52,62}}, color={0,0,127})); - connect(con2.y, TSupAir1.TZonSetHea) annotation (Line(points={{62,130},{72,130}, - {72,75},{78,75}}, color={0,0,127})); + connect(con2.y, TSupAir1.TZonSetHea) annotation (Line(points={{62,130},{72, + 130},{72,78},{78,78}}, color={0,0,127})); connect(con3.y, TSupAir1.TZonSetCoo) annotation (Line(points={{62,10},{72,10}, - {72,61.6667},{78,61.6667}}, - color={0,0,127})); + {72,62},{78,62}}, color={0,0,127})); - connect(con4.y, TSupAir2.TZonSetHea) annotation (Line(points={{-68,-30},{-56,-30}, - {-56,-85},{-52,-85}}, color={0,0,127})); + connect(con4.y, TSupAir2.TZonSetHea) annotation (Line(points={{-68,-30},{-56, + -30},{-56,-82},{-52,-82}}, color={0,0,127})); connect(con6.y, TSupAir3.TZonSetCoo) annotation (Line(points={{42,-120},{54, - -120},{54,-78.3333},{58,-78.3333}}, - color={0,0,127})); + -120},{54,-78},{58,-78}}, color={0,0,127})); connect(con5.y, TSupAir.uHea) annotation (Line(points={{-68,100},{-60,100},{ - -60,71.6667},{-52,71.6667}}, - color={0,0,127})); + -60,74},{-52,74}}, color={0,0,127})); connect(con7.y, TSupAir1.uHea) annotation (Line(points={{62,100},{68,100},{68, - 71.6667},{78,71.6667}}, - color={0,0,127})); + 74},{78,74}}, color={0,0,127})); connect(con8.y, TSupAir.uCoo) annotation (Line(points={{-68,40},{-60,40},{-60, - 65},{-52,65}}, color={0,0,127})); + 66},{-52,66}}, color={0,0,127})); - connect(con9.y, TSupAir1.uCoo) annotation (Line(points={{62,40},{70,40},{70,65}, - {78,65}}, color={0,0,127})); + connect(con9.y, TSupAir1.uCoo) annotation (Line(points={{62,40},{70,40},{70, + 66},{78,66}}, color={0,0,127})); connect(sin5.y, TSupAir3.uCoo) annotation (Line(points={{42,-90},{52,-90},{52, - -75},{58,-75}}, color={0,0,127})); + -74},{58,-74}}, color={0,0,127})); connect(sin3.y, TSupAir3.TAirSup) annotation (Line(points={{42,-60},{52,-60}, - {52,-71.6667},{58,-71.6667}}, - color={0,0,127})); + {52,-70},{58,-70}}, color={0,0,127})); connect(con10.y, TSupAir.uFan) annotation (Line(points={{-98,-10},{-54,-10},{ - -54,78.3333},{-52,78.3333}}, - color={255,0,255})); + -54,82},{-52,82}}, color={255,0,255})); connect(con10.y, TSupAir1.uFan) annotation (Line(points={{-98,-10},{74,-10},{ - 74,78.3333},{78,78.3333}}, - color={255,0,255})); + 74,82},{78,82}}, color={255,0,255})); connect(con10.y, TSupAir2.uFan) annotation (Line(points={{-98,-10},{-54,-10}, - {-54,-81.6667},{-52,-81.6667}},color={255,0,255})); + {-54,-78},{-52,-78}}, color={255,0,255})); connect(con10.y, TSupAir3.uFan) annotation (Line(points={{-98,-10},{54,-10},{ - 54,-61.6667},{58,-61.6667}}, - color={255,0,255})); + 54,-58},{58,-58}}, color={255,0,255})); annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, {100,100}}), graphics={ Ellipse(lineColor = {75,138,73}, diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mo index 09b83b3d230..e7b4850eadd 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mo @@ -15,7 +15,7 @@ model Controller final heaSpeMin=0.2, final cooSpeMin=0.2) "Validate the heating case" - annotation (Placement(transformation(extent={{20,80},{60,124}}))); + annotation (Placement(transformation(extent={{20,80},{60,132}}))); Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Controller conFCU1( final have_winSen=true, @@ -32,7 +32,7 @@ model Controller final heaSpeMin=0.2, final cooSpeMin=0.2) "Validate the cooling case" - annotation (Placement(transformation(extent={{20,12},{60,56}}))); + annotation (Placement(transformation(extent={{20,12},{60,64}}))); Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Controller conFCU2( final have_winSen=false, @@ -49,7 +49,7 @@ model Controller final heaSpeMin=0.2, final cooSpeMin=0.2) "Validate the cooling case" - annotation (Placement(transformation(extent={{20,-50},{60,-6}}))); + annotation (Placement(transformation(extent={{20,-50},{60,2}}))); Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Controller conFCU3( final have_winSen=true, @@ -66,7 +66,7 @@ model Controller final heaSpeMin=0.2, final cooSpeMin=0.2) "Validate the cooling case" - annotation (Placement(transformation(extent={{20,-112},{60,-68}}))); + annotation (Placement(transformation(extent={{20,-112},{60,-60}}))); protected Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp TZon( @@ -149,77 +149,78 @@ equation 48},{-74,106},{18,106}}, color={255,0,255})); connect(occSch.tNexOcc,conFCU. tNexOcc) annotation (Line(points={{-99,60},{ - -80,60},{-80,114},{18,114}}, color={0,0,127})); + -80,60},{-80,122},{18,122}}, color={0,0,127})); connect(TSup.y,conFCU. TSup) annotation (Line(points={{-158,40},{-140,40},{ -140,94},{18,94}}, color={0,0,127})); - connect(win.y,conFCU1. uWin) annotation (Line(points={{-98,-120},{0,-120},{0,14}, - {18,14}}, color={255,0,255})); + connect(win.y,conFCU1. uWin) annotation (Line(points={{-98,-120},{0,-120},{0, + 14},{18,14}}, color={255,0,255})); - connect(occSch.tNexOcc,conFCU1. tNexOcc) annotation (Line(points={{-99,60},{-20, - 60},{-20,46},{18,46}}, color={0,0,127})); + connect(occSch.tNexOcc,conFCU1. tNexOcc) annotation (Line(points={{-99,60},{ + -20,60},{-20,54},{18,54}}, color={0,0,127})); connect(occSch.occupied,conFCU1. uOcc) annotation (Line(points={{-99,48},{-40,48},{-40,38},{18,38}}, color={255,0,255})); - connect(TZon1.y,conFCU1. TZon) annotation (Line(points={{-158,-40},{-70,-40},{ - -70,42},{18,42}}, color={0,0,127})); + connect(TZon1.y,conFCU1. TZon) annotation (Line(points={{-158,-40},{-70,-40}, + {-70,42},{18,42}},color={0,0,127})); - connect(TSup1.y,conFCU1. TSup) annotation (Line(points={{-158,-70},{-84,-70},{ - -84,26},{18,26}}, color={0,0,127})); + connect(TSup1.y,conFCU1. TSup) annotation (Line(points={{-158,-70},{-84,-70}, + {-84,26},{18,26}}, color={0,0,127})); - connect(TSup1.y,conFCU2. TSup) annotation (Line(points={{-158,-70},{-84,-70},{ - -84,-36},{18,-36}}, color={0,0,127})); + connect(TSup1.y,conFCU2. TSup) annotation (Line(points={{-158,-70},{-84,-70}, + {-84,-36},{18,-36}}, color={0,0,127})); connect(occSch.occupied,conFCU2. uOcc) annotation (Line(points={{-99,48},{-74, 48},{-74,-24},{18,-24}}, color={255,0,255})); - connect(occSch.tNexOcc,conFCU2. tNexOcc) annotation (Line(points={{-99,60},{-80, - 60},{-80,-16},{18,-16}}, color={0,0,127})); + connect(occSch.tNexOcc,conFCU2. tNexOcc) annotation (Line(points={{-99,60},{ + -80,60},{-80,-8},{18,-8}}, color={0,0,127})); - connect(TZon1.y,conFCU2. TZon) annotation (Line(points={{-158,-40},{-70,-40},{ - -70,-20},{18,-20}}, color={0,0,127})); + connect(TZon1.y,conFCU2. TZon) annotation (Line(points={{-158,-40},{-70,-40}, + {-70,-20},{18,-20}},color={0,0,127})); - connect(win.y,conFCU3. uWin) annotation (Line(points={{-98,-120},{0,-120},{0,-110}, - {18,-110}}, color={255,0,255})); + connect(win.y,conFCU3. uWin) annotation (Line(points={{-98,-120},{0,-120},{0, + -110},{18,-110}}, + color={255,0,255})); connect(occSch.occupied,conFCU3. uOcc) annotation (Line(points={{-99,48},{-74, 48},{-74,-86},{18,-86}}, color={255,0,255})); - connect(TSup1.y,conFCU3. TSup) annotation (Line(points={{-158,-70},{-84,-70},{ - -84,-98},{18,-98}}, color={0,0,127})); + connect(TSup1.y,conFCU3. TSup) annotation (Line(points={{-158,-70},{-84,-70}, + {-84,-98},{18,-98}}, color={0,0,127})); - connect(TZon1.y,conFCU3. TZon) annotation (Line(points={{-158,-40},{-70,-40},{ - -70,-82},{18,-82}}, color={0,0,127})); + connect(TZon1.y,conFCU3. TZon) annotation (Line(points={{-158,-40},{-70,-40}, + {-70,-82},{18,-82}},color={0,0,127})); - connect(occSch.tNexOcc,conFCU3. tNexOcc) annotation (Line(points={{-99,60},{-80, - 60},{-80,-78},{18,-78}}, color={0,0,127})); + connect(occSch.tNexOcc,conFCU3. tNexOcc) annotation (Line(points={{-99,60},{ + -80,60},{-80,-70},{18,-70}}, color={0,0,127})); connect(cooWarTim.y,conFCU. warUpTim) annotation (Line(points={{-98,20},{-14, - 20},{-14,122},{18,122}}, color={0,0,127})); + 20},{-14,130},{18,130}}, color={0,0,127})); connect(cooWarTim.y,conFCU. cooDowTim) annotation (Line(points={{-98,20},{-14, - 20},{-14,118},{18,118}}, color={0,0,127})); + 20},{-14,126},{18,126}}, color={0,0,127})); connect(cooWarTim.y,conFCU1. warUpTim) annotation (Line(points={{-98,20},{-14, - 20},{-14,54},{18,54}}, color={0,0,127})); + 20},{-14,62},{18,62}}, color={0,0,127})); - connect(cooWarTim.y,conFCU1. cooDowTim) annotation (Line(points={{-98,20},{-14, - 20},{-14,50},{18,50}}, color={0,0,127})); + connect(cooWarTim.y,conFCU1. cooDowTim) annotation (Line(points={{-98,20},{ + -14,20},{-14,58},{18,58}}, color={0,0,127})); connect(cooWarTim.y,conFCU2. warUpTim) annotation (Line(points={{-98,20},{-14, - 20},{-14,-8},{18,-8}}, color={0,0,127})); + 20},{-14,0},{18,0}}, color={0,0,127})); - connect(cooWarTim.y,conFCU2. cooDowTim) annotation (Line(points={{-98,20},{-14, - 20},{-14,-12},{18,-12}}, color={0,0,127})); + connect(cooWarTim.y,conFCU2. cooDowTim) annotation (Line(points={{-98,20},{ + -14,20},{-14,-4},{18,-4}}, color={0,0,127})); connect(cooWarTim.y,conFCU3. warUpTim) annotation (Line(points={{-98,20},{-14, - 20},{-14,-70},{18,-70}}, color={0,0,127})); + 20},{-14,-62},{18,-62}}, color={0,0,127})); - connect(cooWarTim.y,conFCU3. cooDowTim) annotation (Line(points={{-98,20},{-14, - 20},{-14,-74},{18,-74}}, color={0,0,127})); + connect(cooWarTim.y,conFCU3. cooDowTim) annotation (Line(points={{-98,20},{ + -14,20},{-14,-66},{18,-66}}, color={0,0,127})); connect(demLim.y,conFCU3. uHeaDemLimLev) annotation (Line(points={{-128,-100}, {-4,-100},{-4,-94},{18,-94}}, color={255,127,0})); @@ -245,35 +246,37 @@ equation connect(demLim.y,conFCU. uHeaDemLimLev) annotation (Line(points={{-128,-100}, {-4,-100},{-4,98},{18,98}}, color={255,127,0})); - connect(conFCU.yFan, pre.u) annotation (Line(points={{62,114},{68,114},{68, + connect(conFCU.yFan, pre.u) annotation (Line(points={{62,118},{68,118},{68, 110},{78,110}}, color={255,0,255})); connect(pre.y, conFCU.uFan) annotation (Line(points={{102,110},{120,110},{120, 136},{0,136},{0,90},{18,90}}, color={255,0,255})); - connect(conFCU1.yFan, pre1.u) annotation (Line(points={{62,46},{72,46},{72,50}, + connect(conFCU1.yFan, pre1.u) annotation (Line(points={{62,50},{72,50},{72,50}, {78,50}}, color={255,0,255})); connect(pre1.y, conFCU1.uFan) annotation (Line(points={{102,50},{110,50},{110, 66},{10,66},{10,22},{18,22}}, color={255,0,255})); - connect(conFCU2.yFan, pre2.u) annotation (Line(points={{62,-16},{70,-16},{70,-20}, - {78,-20}}, color={255,0,255})); + connect(conFCU2.yFan, pre2.u) annotation (Line(points={{62,-12},{70,-12},{70, + -20},{78,-20}}, color={255,0,255})); - connect(pre2.y, conFCU2.uFan) annotation (Line(points={{102,-20},{108,-20},{108, - 4},{12,4},{12,-40},{18,-40}}, color={255,0,255})); + connect(pre2.y, conFCU2.uFan) annotation (Line(points={{102,-20},{108,-20},{ + 108,4},{12,4},{12,-40},{18,-40}}, color={255,0,255})); - connect(conFCU3.yFan, pre3.u) annotation (Line(points={{62,-78},{68,-78},{68,-70}, - {78,-70}}, color={255,0,255})); + connect(conFCU3.yFan, pre3.u) annotation (Line(points={{62,-74},{68,-74},{68, + -70},{78,-70}}, color={255,0,255})); - connect(pre3.y, conFCU3.uFan) annotation (Line(points={{102,-70},{110,-70},{110, - -54},{12,-54},{12,-102},{18,-102}}, color={255,0,255})); + connect(pre3.y, conFCU3.uFan) annotation (Line(points={{102,-70},{110,-70},{ + 110,-54},{12,-54},{12,-102},{18,-102}}, color={255,0,255})); - connect(nOcc.y, conFCU.nOcc) annotation (Line(points={{-128,0},{-10,0},{-10,86}, - {18,86}}, color={255,127,0})); - connect(nOcc.y, conFCU2.nOcc) annotation (Line(points={{-128,0},{-10,0},{-10,-44}, - {18,-44}}, color={255,127,0})); + connect(nOcc.y, conFCU.nOcc) annotation (Line(points={{-128,0},{-10,0},{-10, + 86},{18,86}}, + color={255,127,0})); + connect(nOcc.y, conFCU2.nOcc) annotation (Line(points={{-128,0},{-10,0},{-10, + -44},{18,-44}}, + color={255,127,0})); annotation (experiment(StopTime=86400, Interval=300, Tolerance=1e-06), __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mos" "Simulate and plot"), diff --git a/Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mos b/Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mos index d244d23d511..2d8ae84a665 100644 --- a/Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mos +++ b/Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/SupplyAirTemperature.mos @@ -2,24 +2,24 @@ simulateModel("Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.Validation createPlot(id=1, position={0, 0, 1669, 978}, y={"TSupAir.uHea"}, range={0.0, 100.0, 0.22, 0.28}, grid=true, colors={{28,108,200}}); createPlot(id=1, position={0, 0, 1669, 159}, y={"TSupAir.uCoo"}, range={0.0, 100.0, -2.0, 2.0}, grid=true, subPlot=2, colors={{28,108,200}}); -createPlot(id=1, position={0, 0, 1669, 158}, y={"TSupAir.TZonSetHea", "TSupAir.TZonSetCoo", "TSupAir.swi2.y"}, range={0.0, 100.0, 294.0, 300.0}, grid=true, subPlot=3, colors={{28,108,200}, {238,46,47}, {0,140,72}}); -createPlot(id=1, position={0, 0, 1669, 159}, y={"TSupAir.swi2.y", "TSupAir.TAirSup"}, range={0.0, 100.0, 0.0, 600.0}, grid=true, subPlot=4, colors={{28,108,200}, {238,46,47}}); +createPlot(id=1, position={0, 0, 1669, 158}, y={"TSupAir.TZonSetHea", "TSupAir.TZonSetCoo", "TSupAir.TAirSupSet"}, range={0.0, 100.0, 294.0, 300.0}, grid=true, subPlot=3, colors={{28,108,200}, {238,46,47}, {0,140,72}}); +createPlot(id=1, position={0, 0, 1669, 159}, y={"TSupAir.TAirSupSet", "TSupAir.TAirSup"}, range={0.0, 100.0, 0.0, 600.0}, grid=true, subPlot=4, colors={{28,108,200}, {238,46,47}}); createPlot(id=1, position={0, 0, 1669, 159}, y={"TSupAir.yHeaCoi"}, range={0.0, 100.0, -0.5, 1.5}, grid=true, subPlot=5, colors={{28,108,200}}); createPlot(id=1, position={0, 0, 1669, 159}, y={"TSupAir.yCooCoi"}, range={0.0, 100.0, -0.5, 1.5}, grid=true, subPlot=6, colors={{28,108,200}}); createPlot(id=2, position={0, 0, 1669, 978}, y={"TSupAir1.uHea"}, range={0.0, 100.0, 0.22, 0.28}, grid=true, colors={{28,108,200}}); createPlot(id=2, position={0, 0, 1669, 159}, y={"TSupAir1.uCoo"}, range={0.0, 100.0, -2.0, 2.0}, grid=true, subPlot=2, colors={{28,108,200}}); -createPlot(id=2, position={0, 0, 1669, 158}, y={"TSupAir1.TZonSetHea", "TSupAir1.TZonSetCoo", "TSupAir1.swi2.y"}, range={0.0, 100.0, 294.0, 300.0}, grid=true, subPlot=3, colors={{28,108,200}, {238,46,47}, {0,140,72}}); -createPlot(id=2, position={0, 0, 1669, 159}, y={"TSupAir1.swi2.y", "TSupAir1.TAirSup"}, range={0.0, 100.0, 0.0, 600.0}, grid=true, subPlot=4, colors={{28,108,200}, {238,46,47}}); +createPlot(id=2, position={0, 0, 1669, 158}, y={"TSupAir1.TZonSetHea", "TSupAir1.TZonSetCoo", "TSupAir1.TAirSupSet"}, range={0.0, 100.0, 294.0, 300.0}, grid=true, subPlot=3, colors={{28,108,200}, {238,46,47}, {0,140,72}}); +createPlot(id=2, position={0, 0, 1669, 159}, y={"TSupAir1.TAirSupSet", "TSupAir1.TAirSup"}, range={0.0, 100.0, 0.0, 600.0}, grid=true, subPlot=4, colors={{28,108,200}, {238,46,47}}); createPlot(id=2, position={0, 0, 1669, 159}, y={"TSupAir1.yHeaCoi"}, range={0.0, 100.0, -0.5, 1.5}, grid=true, subPlot=5, colors={{28,108,200}}); createPlot(id=2, position={0, 0, 1669, 159}, y={"TSupAir1.yCooCoi"}, range={0.0, 100.0, -0.5, 1.5}, grid=true, subPlot=6, colors={{28,108,200}}); createPlot(id=3, position={0, 0, 1669, 978}, y={"TSupAir2.uHea"}, range={0.0, 100.0, 0.22, 0.28}, grid=true, colors={{28,108,200}}); -createPlot(id=3, position={0, 0, 1669, 158}, y={"TSupAir2.TZonSetHea", "TSupAir2.swi2.y"}, range={0.0, 100.0, 294.0, 300.0}, grid=true, subPlot=2, colors={{28,108,200}, {238,46,47}}); -createPlot(id=3, position={0, 0, 1669, 159}, y={"TSupAir2.swi2.y", "TSupAir2.TAirSup"}, range={0.0, 100.0, 0.0, 600.0}, grid=true, subPlot=3, colors={{28,108,200}, {238,46,47}}); +createPlot(id=3, position={0, 0, 1669, 158}, y={"TSupAir2.TZonSetHea", "TSupAir2.TAirSupSet"}, range={0.0, 100.0, 294.0, 300.0}, grid=true, subPlot=2, colors={{28,108,200}, {238,46,47}}); +createPlot(id=3, position={0, 0, 1669, 159}, y={"TSupAir2.TAirSupSet", "TSupAir2.TAirSup"}, range={0.0, 100.0, 0.0, 600.0}, grid=true, subPlot=3, colors={{28,108,200}, {238,46,47}}); createPlot(id=3, position={0, 0, 1669, 159}, y={"TSupAir2.yHeaCoi"}, range={0.0, 100.0, -0.5, 1.5}, grid=true, subPlot=4, colors={{28,108,200}}); createPlot(id=4, position={0, 0, 1669, 159}, y={"TSupAir3.uCoo"}, range={0.0, 100.0, -2.0, 2.0}, grid=true, colors={{28,108,200}}); -createPlot(id=4, position={0, 0, 1669, 158}, y={"TSupAir3.TZonSetCoo", "TSupAir3.swi2.y"}, range={0.0, 100.0, 294.0, 300.0}, grid=true, subPlot=2, colors={{28,108,200}, {238,46,47}}); -createPlot(id=4, position={0, 0, 1669, 159}, y={"TSupAir3.swi2.y", "TSupAir3.TAirSup"}, range={0.0, 100.0, 0.0, 600.0}, grid=true, subPlot=3, colors={{28,108,200}, {238,46,47}}); +createPlot(id=4, position={0, 0, 1669, 158}, y={"TSupAir3.TZonSetCoo", "TSupAir3.TAirSupSet"}, range={0.0, 100.0, 294.0, 300.0}, grid=true, subPlot=2, colors={{28,108,200}, {238,46,47}}); +createPlot(id=4, position={0, 0, 1669, 159}, y={"TSupAir3.TAirSupSet", "TSupAir3.TAirSup"}, range={0.0, 100.0, 0.0, 600.0}, grid=true, subPlot=3, colors={{28,108,200}, {238,46,47}}); createPlot(id=4, position={0, 0, 1669, 159}, y={"TSupAir3.yCooCoi"}, range={0.0, 100.0, -0.5, 1.5}, grid=true, subPlot=4, colors={{28,108,200}}); From 6d090a6865d0e265fc44dfa4e6311bc87d7ef8a9 Mon Sep 17 00:00:00 2001 From: Devaprasad Date: Fri, 15 Apr 2022 13:36:21 -0700 Subject: [PATCH 17/83] Removed redubndant pre blocks --- .../FanCoilUnit/Validation/Controller.mo | 93 ++++++------------- 1 file changed, 30 insertions(+), 63 deletions(-) diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mo index e7b4850eadd..7c2340eb796 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mo @@ -125,34 +125,18 @@ protected "Cooldown and warm-up time" annotation (Placement(transformation(extent={{-120,10},{-100,30}}))); - Buildings.Controls.OBC.CDL.Logical.Pre pre - "Logical pre block" - annotation (Placement(transformation(extent={{80,100},{100,120}}))); - - Buildings.Controls.OBC.CDL.Logical.Pre pre1 - "Logical pre block" - annotation (Placement(transformation(extent={{80,40},{100,60}}))); - - Buildings.Controls.OBC.CDL.Logical.Pre pre2 - "Logical pre block" - annotation (Placement(transformation(extent={{80,-30},{100,-10}}))); - - Buildings.Controls.OBC.CDL.Logical.Pre pre3 - "Logical pre block" - annotation (Placement(transformation(extent={{80,-80},{100,-60}}))); - equation connect(TZon.y,conFCU. TZon) annotation (Line(points={{-158,80},{-20,80},{-20, - 110},{18,110}}, color={0,0,127})); + 94},{18,94}}, color={0,0,127})); connect(occSch.occupied,conFCU. uOcc) annotation (Line(points={{-99,48},{-74, - 48},{-74,106},{18,106}}, color={255,0,255})); + 48},{-74,110},{18,110}}, color={255,0,255})); connect(occSch.tNexOcc,conFCU. tNexOcc) annotation (Line(points={{-99,60},{ -80,60},{-80,122},{18,122}}, color={0,0,127})); connect(TSup.y,conFCU. TSup) annotation (Line(points={{-158,40},{-140,40},{ - -140,94},{18,94}}, color={0,0,127})); + -140,98},{18,98}}, color={0,0,127})); connect(win.y,conFCU1. uWin) annotation (Line(points={{-98,-120},{0,-120},{0, 14},{18,14}}, color={255,0,255})); @@ -161,39 +145,39 @@ equation -20,60},{-20,54},{18,54}}, color={0,0,127})); connect(occSch.occupied,conFCU1. uOcc) - annotation (Line(points={{-99,48},{-40,48},{-40,38},{18,38}}, + annotation (Line(points={{-99,48},{-40,48},{-40,42},{18,42}}, color={255,0,255})); connect(TZon1.y,conFCU1. TZon) annotation (Line(points={{-158,-40},{-70,-40}, - {-70,42},{18,42}},color={0,0,127})); + {-70,26},{18,26}},color={0,0,127})); connect(TSup1.y,conFCU1. TSup) annotation (Line(points={{-158,-70},{-84,-70}, - {-84,26},{18,26}}, color={0,0,127})); + {-84,30},{18,30}}, color={0,0,127})); connect(TSup1.y,conFCU2. TSup) annotation (Line(points={{-158,-70},{-84,-70}, - {-84,-36},{18,-36}}, color={0,0,127})); + {-84,-32},{18,-32}}, color={0,0,127})); connect(occSch.occupied,conFCU2. uOcc) annotation (Line(points={{-99,48},{-74, - 48},{-74,-24},{18,-24}}, color={255,0,255})); + 48},{-74,-20},{18,-20}}, color={255,0,255})); connect(occSch.tNexOcc,conFCU2. tNexOcc) annotation (Line(points={{-99,60},{ -80,60},{-80,-8},{18,-8}}, color={0,0,127})); connect(TZon1.y,conFCU2. TZon) annotation (Line(points={{-158,-40},{-70,-40}, - {-70,-20},{18,-20}},color={0,0,127})); + {-70,-36},{18,-36}},color={0,0,127})); connect(win.y,conFCU3. uWin) annotation (Line(points={{-98,-120},{0,-120},{0, -110},{18,-110}}, color={255,0,255})); connect(occSch.occupied,conFCU3. uOcc) annotation (Line(points={{-99,48},{-74, - 48},{-74,-86},{18,-86}}, color={255,0,255})); + 48},{-74,-82},{18,-82}}, color={255,0,255})); connect(TSup1.y,conFCU3. TSup) annotation (Line(points={{-158,-70},{-84,-70}, - {-84,-98},{18,-98}}, color={0,0,127})); + {-84,-94},{18,-94}}, color={0,0,127})); connect(TZon1.y,conFCU3. TZon) annotation (Line(points={{-158,-40},{-70,-40}, - {-70,-82},{18,-82}},color={0,0,127})); + {-70,-98},{18,-98}},color={0,0,127})); connect(occSch.tNexOcc,conFCU3. tNexOcc) annotation (Line(points={{-99,60},{ -80,60},{-80,-70},{18,-70}}, color={0,0,127})); @@ -223,60 +207,43 @@ equation -14,20},{-14,-66},{18,-66}}, color={0,0,127})); connect(demLim.y,conFCU3. uHeaDemLimLev) annotation (Line(points={{-128,-100}, - {-4,-100},{-4,-94},{18,-94}}, color={255,127,0})); + {-4,-100},{-4,-90},{18,-90}}, color={255,127,0})); connect(demLim.y,conFCU3. uCooDemLimLev) annotation (Line(points={{-128,-100}, - {-4,-100},{-4,-90},{18,-90}}, color={255,127,0})); + {-4,-100},{-4,-86},{18,-86}}, color={255,127,0})); connect(demLim.y,conFCU2. uHeaDemLimLev) annotation (Line(points={{-128,-100}, - {-4,-100},{-4,-32},{18,-32}}, color={255,127,0})); + {-4,-100},{-4,-28},{18,-28}}, color={255,127,0})); connect(demLim.y,conFCU2. uCooDemLimLev) annotation (Line(points={{-128,-100}, - {-4,-100},{-4,-28},{18,-28}}, color={255,127,0})); + {-4,-100},{-4,-24},{18,-24}}, color={255,127,0})); connect(demLim.y,conFCU1. uHeaDemLimLev) annotation (Line(points={{-128,-100}, - {-4,-100},{-4,30},{18,30}}, color={255,127,0})); + {-4,-100},{-4,34},{18,34}}, color={255,127,0})); connect(demLim.y,conFCU1. uCooDemLimLev) annotation (Line(points={{-128,-100}, - {-4,-100},{-4,34},{18,34}}, color={255,127,0})); + {-4,-100},{-4,38},{18,38}}, color={255,127,0})); connect(demLim.y,conFCU. uCooDemLimLev) annotation (Line(points={{-128,-100}, - {-4,-100},{-4,102},{18,102}}, color={255,127,0})); + {-4,-100},{-4,106},{18,106}}, color={255,127,0})); connect(demLim.y,conFCU. uHeaDemLimLev) annotation (Line(points={{-128,-100}, - {-4,-100},{-4,98},{18,98}}, color={255,127,0})); - - connect(conFCU.yFan, pre.u) annotation (Line(points={{62,118},{68,118},{68, - 110},{78,110}}, color={255,0,255})); - - connect(pre.y, conFCU.uFan) annotation (Line(points={{102,110},{120,110},{120, - 136},{0,136},{0,90},{18,90}}, - color={255,0,255})); - - connect(conFCU1.yFan, pre1.u) annotation (Line(points={{62,50},{72,50},{72,50}, - {78,50}}, color={255,0,255})); - - connect(pre1.y, conFCU1.uFan) annotation (Line(points={{102,50},{110,50},{110, - 66},{10,66},{10,22},{18,22}}, color={255,0,255})); - - connect(conFCU2.yFan, pre2.u) annotation (Line(points={{62,-12},{70,-12},{70, - -20},{78,-20}}, color={255,0,255})); - - connect(pre2.y, conFCU2.uFan) annotation (Line(points={{102,-20},{108,-20},{ - 108,4},{12,4},{12,-40},{18,-40}}, color={255,0,255})); - - connect(conFCU3.yFan, pre3.u) annotation (Line(points={{62,-74},{68,-74},{68, - -70},{78,-70}}, color={255,0,255})); - - connect(pre3.y, conFCU3.uFan) annotation (Line(points={{102,-70},{110,-70},{ - 110,-54},{12,-54},{12,-102},{18,-102}}, color={255,0,255})); + {-4,-100},{-4,102},{18,102}}, color={255,127,0})); connect(nOcc.y, conFCU.nOcc) annotation (Line(points={{-128,0},{-10,0},{-10, - 86},{18,86}}, + 90},{18,90}}, color={255,127,0})); connect(nOcc.y, conFCU2.nOcc) annotation (Line(points={{-128,0},{-10,0},{-10, - -44},{18,-44}}, + -40},{18,-40}}, color={255,127,0})); + connect(conFCU.yFan, conFCU.uFan) annotation (Line(points={{62,118},{80,118}, + {80,74},{12,74},{12,86},{18,86}}, color={255,0,255})); + connect(conFCU1.yFan, conFCU1.uFan) annotation (Line(points={{62,50},{80,50}, + {80,8},{12,8},{12,18},{18,18}}, color={255,0,255})); + connect(conFCU2.yFan, conFCU2.uFan) annotation (Line(points={{62,-12},{80,-12}, + {80,-52},{14,-52},{14,-44},{18,-44}}, color={255,0,255})); + connect(conFCU3.yFan, conFCU3.uFan) annotation (Line(points={{62,-74},{72,-74}, + {72,-120},{14,-120},{14,-106},{18,-106}}, color={255,0,255})); annotation (experiment(StopTime=86400, Interval=300, Tolerance=1e-06), __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mos" "Simulate and plot"), From bd59301a97064be6b358fb8c8ff19c9287883b21 Mon Sep 17 00:00:00 2001 From: Devaprasad Date: Sat, 30 Apr 2022 15:38:53 -0700 Subject: [PATCH 18/83] Added model for plant requests from G36 package on lbl-srg/modelica-buildings:issue1913_g36_final --- .../SingleZone/VAV/SetPoints/PlantRequests.mo | 452 ++++++++++++++++++ .../VAV/SetPoints/Validation/PlantRequests.mo | 101 ++++ .../VAV/SetPoints/Validation/package.mo | 37 ++ .../VAV/SetPoints/Validation/package.order | 1 + .../AHUs/SingleZone/VAV/SetPoints/package.mo | 24 + .../SingleZone/VAV/SetPoints/package.order | 2 + .../ASHRAE/G36/AHUs/SingleZone/VAV/package.mo | 44 ++ .../G36/AHUs/SingleZone/VAV/package.order | 1 + .../OBC/ASHRAE/G36/AHUs/SingleZone/package.mo | 23 + .../ASHRAE/G36/AHUs/SingleZone/package.order | 1 + .../Controls/OBC/ASHRAE/G36/AHUs/package.mo | 29 ++ .../OBC/ASHRAE/G36/AHUs/package.order | 1 + Buildings/Controls/OBC/ASHRAE/G36/package.mo | 131 +++++ .../Controls/OBC/ASHRAE/G36/package.order | 1 + Buildings/Controls/OBC/ASHRAE/package.order | 1 + 15 files changed, 849 insertions(+) create mode 100644 Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/PlantRequests.mo create mode 100644 Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/Validation/PlantRequests.mo create mode 100644 Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/Validation/package.mo create mode 100644 Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/Validation/package.order create mode 100644 Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/package.mo create mode 100644 Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/package.order create mode 100644 Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/package.mo create mode 100644 Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/package.order create mode 100644 Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/package.mo create mode 100644 Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/package.order create mode 100644 Buildings/Controls/OBC/ASHRAE/G36/AHUs/package.mo create mode 100644 Buildings/Controls/OBC/ASHRAE/G36/AHUs/package.order create mode 100644 Buildings/Controls/OBC/ASHRAE/G36/package.mo create mode 100644 Buildings/Controls/OBC/ASHRAE/G36/package.order diff --git a/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/PlantRequests.mo b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/PlantRequests.mo new file mode 100644 index 00000000000..f41ff4e4cb7 --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/PlantRequests.mo @@ -0,0 +1,452 @@ +within Buildings.Controls.OBC.ASHRAE.G36.AHUs.SingleZone.VAV.SetPoints; +block PlantRequests + "Output plant requests for single zone air handling unit" + + parameter Boolean have_hotWatCoi = true + "True: the AHU has hot water heating coil"; + parameter Real Thys = 0.1 + "Hysteresis for checking temperature difference" + annotation(Dialog(tab="Advanced")); + parameter Real posHys = 0.05 + "Hysteresis for checking valve position difference" + annotation(Dialog(tab="Advanced")); + + Buildings.Controls.OBC.CDL.Interfaces.RealInput TAirSup( + final unit="K", + final displayUnit="degC", + final quantity="ThermodynamicTemperature") + "Measured supply air temperature" + annotation (Placement(transformation(extent={{-240,180},{-200,220}}), + iconTransformation(extent={{-140,70},{-100,110}}))); + Buildings.Controls.OBC.CDL.Interfaces.RealInput TSupCoo( + final unit="K", + final displayUnit="degC", + final quantity="ThermodynamicTemperature") + "Cooling supply air temperature setpoint" + annotation (Placement(transformation(extent={{-240,140},{-200,180}}), + iconTransformation(extent={{-140,30},{-100,70}}))); + Buildings.Controls.OBC.CDL.Interfaces.RealInput uCooCoi_actual( + final unit="1", + final min=0, + final max=1) + "Cooling coil valve actual position" + annotation (Placement(transformation(extent={{-240,80},{-200,120}}), + iconTransformation(extent={{-140,-20},{-100,20}}))); + Buildings.Controls.OBC.CDL.Interfaces.RealInput TSupHeaEco( + final unit="K", + final displayUnit="degC", + final quantity="ThermodynamicTemperature") if have_hotWatCoi + "Heating supply air temperature setpoint" + annotation (Placement(transformation(extent={{-240,-60},{-200,-20}}), + iconTransformation(extent={{-140,-70},{-100,-30}}))); + Buildings.Controls.OBC.CDL.Interfaces.RealInput uHeaCoi_actual( + final unit="1", + final min=0, + final max=1) if have_hotWatCoi + "Heating coil valve actual position" + annotation (Placement(transformation(extent={{-240,-160},{-200,-120}}), + iconTransformation(extent={{-140,-110},{-100,-70}}))); + Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yChiWatResReq + "Chilled water reset request" + annotation (Placement(transformation(extent={{200,180},{240,220}}), + iconTransformation(extent={{100,60},{140,100}}))); + Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yChiPlaReq + "Chiller plant request" + annotation (Placement(transformation(extent={{200,0},{240,40}}), + iconTransformation(extent={{100,10},{140,50}}))); + Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yHotWatResReq if have_hotWatCoi + "Hot water reset request" + annotation (Placement(transformation(extent={{200,-60},{240,-20}}), + iconTransformation(extent={{100,-50},{140,-10}}))); + Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yHotWatPlaReq if have_hotWatCoi + "Hot water plant request" + annotation (Placement(transformation(extent={{200,-240},{240,-200}}), + iconTransformation(extent={{100,-100},{140,-60}}))); + +protected + Buildings.Controls.OBC.CDL.Continuous.Subtract cooSupTemDif + "Find the cooling supply temperature difference to the setpoint" + annotation (Placement(transformation(extent={{-160,190},{-140,210}}))); + Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr( + final t=3, + final h=Thys) + "Check if the supply temperature is greater than the setpoint by a threshold value" + annotation (Placement(transformation(extent={{-80,190},{-60,210}}))); + Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr1( + final t=2, + final h=Thys) + "Check if the supply temperature is greater than the setpoint by a threshold value" + annotation (Placement(transformation(extent={{-80,140},{-60,160}}))); + Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel( + final delayTime=120) + "Check if the input has been true for a certain time" + annotation (Placement(transformation(extent={{-40,190},{-20,210}}))); + Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel1( + final delayTime=120) + "Check if the input has been true for a certain time" + annotation (Placement(transformation(extent={{-40,140},{-20,160}}))); + Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr2( + final t=0.95, + final h=posHys) + "Check if the chilled water valve position is greater than a threshold value" + annotation (Placement(transformation(extent={{-120,90},{-100,110}}))); + Buildings.Controls.OBC.CDL.Integers.Sources.Constant thr( + final k=3) "Constant 3" + annotation (Placement(transformation(extent={{0,222},{20,242}}))); + Buildings.Controls.OBC.CDL.Integers.Switch chiWatRes3 + "Send 3 chilled water reset request" + annotation (Placement(transformation(extent={{160,190},{180,210}}))); + Buildings.Controls.OBC.CDL.Integers.Switch chiWatRes2 + "Send 2 chilled water reset request" + annotation (Placement(transformation(extent={{120,140},{140,160}}))); + Buildings.Controls.OBC.CDL.Integers.Sources.Constant two( + final k=2) + "Constant 2" + annotation (Placement(transformation(extent={{0,170},{20,190}}))); + Buildings.Controls.OBC.CDL.Continuous.LessThreshold lesThr( + final t=0.85, + final h=posHys) + "Check if the chilled water valve position is less than a threshold value" + annotation (Placement(transformation(extent={{-120,50},{-100,70}}))); + Buildings.Controls.OBC.CDL.Logical.Latch lat + "Keep true signal until other condition becomes true" + annotation (Placement(transformation(extent={{-40,90},{-20,110}}))); + Buildings.Controls.OBC.CDL.Integers.Switch chiWatRes1 + "Send 1 chilled water reset request" + annotation (Placement(transformation(extent={{80,90},{100,110}}))); + Buildings.Controls.OBC.CDL.Integers.Sources.Constant one( + final k=1) "Constant 1" + annotation (Placement(transformation(extent={{0,110},{20,130}}))); + Buildings.Controls.OBC.CDL.Integers.Sources.Constant zer( + final k=0) "Constant 0" + annotation (Placement(transformation(extent={{0,50},{20,70}}))); + Buildings.Controls.OBC.CDL.Logical.Latch lat1 + "Keep true signal until other condition becomes true" + annotation (Placement(transformation(extent={{-40,10},{-20,30}}))); + Buildings.Controls.OBC.CDL.Continuous.LessThreshold lesThr1( + final t=0.1, + final h=posHys) + "Check if the chilled water valve position is less than a threshold value" + annotation (Placement(transformation(extent={{-120,4},{-100,24}}))); + Buildings.Controls.OBC.CDL.Integers.Switch intSwi3 + "Send 1 chiller plant request" + annotation (Placement(transformation(extent={{80,10},{100,30}}))); + Buildings.Controls.OBC.CDL.Continuous.Subtract heaSupTemDif if have_hotWatCoi + "Find the heating supply temperature difference to the setpoint" + annotation (Placement(transformation(extent={{-140,-50},{-120,-30}}))); + Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr3( + final t=17, + final h=Thys) + if have_hotWatCoi + "Check if the supply temperature is less than the setpoint by a threshold value" + annotation (Placement(transformation(extent={{-80,-50},{-60,-30}}))); + Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr4( + final t=8, + final h=Thys) + if have_hotWatCoi + "Check if the supply temperature is less than the setpoint by a threshold value" + annotation (Placement(transformation(extent={{-80,-100},{-60,-80}}))); + Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel2( + final delayTime=300) if have_hotWatCoi + "Check if the input has been true for a certain time" + annotation (Placement(transformation(extent={{-40,-50},{-20,-30}}))); + Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel3( + final delayTime=300) if have_hotWatCoi + "Check if the input has been true for a certain time" + annotation (Placement(transformation(extent={{-40,-100},{-20,-80}}))); + Buildings.Controls.OBC.CDL.Integers.Switch hotWatRes3 if have_hotWatCoi + "Send 3 hot water reset request" + annotation (Placement(transformation(extent={{160,-50},{180,-30}}))); + Buildings.Controls.OBC.CDL.Integers.Switch hotWatRes2 if have_hotWatCoi + "Send 2 hot water reset request" + annotation (Placement(transformation(extent={{120,-100},{140,-80}}))); + Buildings.Controls.OBC.CDL.Continuous.LessThreshold lesThr2( + final t=0.85, + final h=posHys) + if have_hotWatCoi + "Check if the hot water valve position is less than a threshold value" + annotation (Placement(transformation(extent={{-120,-190},{-100,-170}}))); + Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr5( + final t=0.95, + final h=posHys) + if have_hotWatCoi + "Check if the hot water valve position is greater than a threshold value" + annotation (Placement(transformation(extent={{-120,-150},{-100,-130}}))); + Buildings.Controls.OBC.CDL.Logical.Latch lat2 if have_hotWatCoi + "Keep true signal until other condition becomes true" + annotation (Placement(transformation(extent={{-40,-150},{-20,-130}}))); + Buildings.Controls.OBC.CDL.Integers.Switch hotWatRes1 if have_hotWatCoi + "Send 1 hot water reset request" + annotation (Placement(transformation(extent={{80,-150},{100,-130}}))); + Buildings.Controls.OBC.CDL.Continuous.LessThreshold lesThr3( + final t=0.1, + final h=posHys) + if have_hotWatCoi + "Check if the hot water valve position is less than a threshold value" + annotation (Placement(transformation(extent={{-120,-236},{-100,-216}}))); + Buildings.Controls.OBC.CDL.Logical.Latch lat3 if have_hotWatCoi + "Keep true signal until other condition becomes true" + annotation (Placement(transformation(extent={{-40,-230},{-20,-210}}))); + Buildings.Controls.OBC.CDL.Integers.Switch intSwi1 if have_hotWatCoi + "Send 1 hot water plant request" + annotation (Placement(transformation(extent={{80,-230},{100,-210}}))); + +equation + connect(TAirSup, cooSupTemDif.u1) annotation (Line(points={{-220,200},{-180,200}, + {-180,206},{-162,206}}, color={0,0,127})); + connect(TSupCoo, cooSupTemDif.u2) annotation (Line(points={{-220,160},{-190,160}, + {-190,194},{-162,194}}, color={0,0,127})); + connect(cooSupTemDif.y, greThr.u) + annotation (Line(points={{-138,200},{-82,200}}, color={0,0,127})); + connect(greThr.y, truDel.u) + annotation (Line(points={{-58,200},{-42,200}}, color={255,0,255})); + connect(greThr1.y, truDel1.u) + annotation (Line(points={{-58,150},{-42,150}}, color={255,0,255})); + connect(cooSupTemDif.y, greThr1.u) annotation (Line(points={{-138,200},{-100,200}, + {-100,150},{-82,150}}, color={0,0,127})); + connect(uCooCoi_actual, greThr2.u) + annotation (Line(points={{-220,100},{-122,100}}, color={0,0,127})); + connect(truDel.y, chiWatRes3.u2) + annotation (Line(points={{-18,200},{158,200}}, color={255,0,255})); + connect(thr.y, chiWatRes3.u1) annotation (Line(points={{22,232},{60,232},{60,208}, + {158,208}}, color={255,127,0})); + connect(truDel1.y, chiWatRes2.u2) + annotation (Line(points={{-18,150},{118,150}}, color={255,0,255})); + connect(two.y, chiWatRes2.u1) annotation (Line(points={{22,180},{50,180},{50,158}, + {118,158}}, color={255,127,0})); + connect(greThr2.y, lat.u) + annotation (Line(points={{-98,100},{-42,100}}, color={255,0,255})); + connect(uCooCoi_actual, lesThr.u) annotation (Line(points={{-220,100},{-140,100}, + {-140,60},{-122,60}}, color={0,0,127})); + connect(lesThr.y, lat.clr) annotation (Line(points={{-98,60},{-60,60},{-60,94}, + {-42,94}}, color={255,0,255})); + connect(one.y, chiWatRes1.u1) annotation (Line(points={{22,120},{40,120},{40,108}, + {78,108}}, color={255,127,0})); + connect(lat.y, chiWatRes1.u2) + annotation (Line(points={{-18,100},{78,100}}, color={255,0,255})); + connect(chiWatRes1.y, chiWatRes2.u3) annotation (Line(points={{102,100},{110,100}, + {110,142},{118,142}}, color={255,127,0})); + connect(chiWatRes2.y, chiWatRes3.u3) annotation (Line(points={{142,150},{150,150}, + {150,192},{158,192}}, color={255,127,0})); + connect(zer.y, chiWatRes1.u3) annotation (Line(points={{22,60},{30,60},{30,92}, + {78,92}}, color={255,127,0})); + connect(chiWatRes3.y, yChiWatResReq) + annotation (Line(points={{182,200},{220,200}}, color={255,127,0})); + connect(greThr2.y, lat1.u) annotation (Line(points={{-98,100},{-80,100},{-80,20}, + {-42,20}}, color={255,0,255})); + connect(uCooCoi_actual, lesThr1.u) annotation (Line(points={{-220,100},{-140,100}, + {-140,14},{-122,14}}, color={0,0,127})); + connect(lesThr1.y, lat1.clr) + annotation (Line(points={{-98,14},{-42,14}}, color={255,0,255})); + connect(lat1.y, intSwi3.u2) + annotation (Line(points={{-18,20},{78,20}}, color={255,0,255})); + connect(one.y, intSwi3.u1) annotation (Line(points={{22,120},{40,120},{40,28}, + {78,28}}, color={255,127,0})); + connect(zer.y, intSwi3.u3) annotation (Line(points={{22,60},{30,60},{30,12},{78, + 12}}, color={255,127,0})); + connect(intSwi3.y, yChiPlaReq) + annotation (Line(points={{102,20},{220,20}}, color={255,127,0})); + connect(TAirSup, heaSupTemDif.u2) annotation (Line(points={{-220,200},{-180,200}, + {-180,-46},{-142,-46}}, color={0,0,127})); + connect(greThr3.y, truDel2.u) + annotation (Line(points={{-58,-40},{-42,-40}}, color={255,0,255})); + connect(greThr4.y, truDel3.u) + annotation (Line(points={{-58,-90},{-42,-90}}, color={255,0,255})); + connect(heaSupTemDif.y, greThr3.u) + annotation (Line(points={{-118,-40},{-82,-40}}, color={0,0,127})); + connect(heaSupTemDif.y, greThr4.u) annotation (Line(points={{-118,-40},{-100,-40}, + {-100,-90},{-82,-90}}, color={0,0,127})); + connect(truDel2.y, hotWatRes3.u2) + annotation (Line(points={{-18,-40},{158,-40}}, color={255,0,255})); + connect(thr.y, hotWatRes3.u1) annotation (Line(points={{22,232},{60,232},{60,-32}, + {158,-32}}, color={255,127,0})); + connect(hotWatRes2.y, hotWatRes3.u3) annotation (Line(points={{142,-90},{150,-90}, + {150,-48},{158,-48}}, color={255,127,0})); + connect(two.y, hotWatRes2.u1) annotation (Line(points={{22,180},{50,180},{50,-82}, + {118,-82}}, color={255,127,0})); + connect(truDel3.y, hotWatRes2.u2) + annotation (Line(points={{-18,-90},{118,-90}}, color={255,0,255})); + connect(hotWatRes3.y, yHotWatResReq) + annotation (Line(points={{182,-40},{220,-40}}, color={255,127,0})); + connect(uHeaCoi_actual, greThr5.u) + annotation (Line(points={{-220,-140},{-122,-140}}, color={0,0,127})); + connect(greThr5.y, lat2.u) + annotation (Line(points={{-98,-140},{-42,-140}}, color={255,0,255})); + connect(uHeaCoi_actual, lesThr2.u) annotation (Line(points={{-220,-140},{-140, + -140},{-140,-180},{-122,-180}}, color={0,0,127})); + connect(lesThr2.y, lat2.clr) annotation (Line(points={{-98,-180},{-60,-180},{-60, + -146},{-42,-146}}, color={255,0,255})); + connect(lat2.y, hotWatRes1.u2) + annotation (Line(points={{-18,-140},{78,-140}}, color={255,0,255})); + connect(one.y, hotWatRes1.u1) annotation (Line(points={{22,120},{40,120},{40,-132}, + {78,-132}}, color={255,127,0})); + connect(zer.y, hotWatRes1.u3) annotation (Line(points={{22,60},{30,60},{30,-148}, + {78,-148}}, color={255,127,0})); + connect(hotWatRes1.y, hotWatRes2.u3) annotation (Line(points={{102,-140},{110, + -140},{110,-98},{118,-98}}, color={255,127,0})); + connect(uHeaCoi_actual, lesThr3.u) annotation (Line(points={{-220,-140},{-140, + -140},{-140,-226},{-122,-226}}, color={0,0,127})); + connect(lesThr3.y, lat3.clr) + annotation (Line(points={{-98,-226},{-42,-226}}, color={255,0,255})); + connect(greThr5.y, lat3.u) annotation (Line(points={{-98,-140},{-80,-140},{-80, + -220},{-42,-220}}, color={255,0,255})); + connect(lat3.y, intSwi1.u2) + annotation (Line(points={{-18,-220},{78,-220}}, color={255,0,255})); + connect(one.y, intSwi1.u1) annotation (Line(points={{22,120},{40,120},{40,-212}, + {78,-212}}, color={255,127,0})); + connect(zer.y, intSwi1.u3) annotation (Line(points={{22,60},{30,60},{30,-228}, + {78,-228}}, color={255,127,0})); + connect(intSwi1.y, yHotWatPlaReq) + annotation (Line(points={{102,-220},{220,-220}}, color={255,127,0})); + connect(yChiWatResReq, yChiWatResReq) + annotation (Line(points={{220,200},{220,200}}, color={255,127,0})); + connect(TSupHeaEco, heaSupTemDif.u1) + annotation (Line(points={{-220,-40},{-160,-40},{-160,-34},{-142,-34}}, color={0,0,127})); + +annotation ( + defaultComponentName="sinAHUPlaReq", + Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}), + graphics={ + Rectangle( + extent={{-100,-100},{100,100}}, + lineColor={0,0,127}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), + Text( + extent={{-98,98},{-76,82}}, + lineColor={0,0,127}, + pattern=LinePattern.Dash, + textString="TSup"), + Text( + extent={{-100,140},{100,100}}, + lineColor={0,0,255}, + textString="%name"), + Text( + extent={{-98,60},{-60,42}}, + lineColor={0,0,127}, + pattern=LinePattern.Dash, + textString="TSupCoo"), + Text( + extent={{-100,8},{-58,-6}}, + lineColor={0,0,127}, + pattern=LinePattern.Dash, + textString="uCooCoi"), + Text( + extent={{-100,-82},{-58,-96}}, + lineColor={0,0,127}, + pattern=LinePattern.Dash, + visible=have_hotWatCoi, + textString="uHeaCoi"), + Text( + extent={{34,92},{98,70}}, + lineColor={255,127,0}, + pattern=LinePattern.Dash, + textString="yChiWatResReq"), + Text( + extent={{52,42},{98,20}}, + lineColor={255,127,0}, + pattern=LinePattern.Dash, + textString="yChiPlaReq"), + Text( + extent={{34,-18},{98,-40}}, + lineColor={255,127,0}, + pattern=LinePattern.Dash, + textString="yHotWatResReq", + visible=have_hotWatCoi), + Text( + extent={{38,-66},{98,-88}}, + lineColor={255,127,0}, + pattern=LinePattern.Dash, + textString="yHotWatPlaReq", + visible=have_hotWatCoi), + Text( + extent={{-96,-42},{-40,-60}}, + lineColor={0,0,127}, + pattern=LinePattern.Dash, + textString="TSupHeaEco", + visible=have_hotWatCoi)}), + Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-200,-260},{200,260}})), + Documentation(info=" +

+This sequence outputs the system reset requests for single zone air handling unit. The +implementation is according to the Section 5.18.15 of ASHRAE Guideline 36, May 2020. +

+

chilled water reset request yChiWatResReq

+
    +
  1. +If the supply air temperature TAirSup exceeds the cooling supply air temperature +set point TSupCoo by 3 °C (5 °F) for 2 minutes, send 3 requests. +
  2. +
  3. +If the supply air temperature TAirSup exceeds the cooling supply air temperature +set point TSupCoo by 2 °C (3 °F) for 2 minutes, send 2 requests. +
  4. +
  5. +Else if the chilled water valve position uCooCoi_actual is greater than +95%, send 1 request until the uCooCoi_actual is less than 85%. +
  6. +
  7. +Else if the chilled water valve position uCooCoi_actual is less than 95%, +send 0 request. +
  8. +
+

Chiller plant request yChiPlaReq

+

+Send the chiller plant that serves the system a chiller plant request as follows: +

+
    +
  1. +If the chilled water valve position uCooCoi_actual is greater than +95%, send 1 request until the uCooCoi_actual is less than 10%. +
  2. +
  3. +Else if the chilled water valve position uCooCoi_actual is less than 95%, +send 0 request. +
  4. +
+

If there is a hot-water coil (have_hotWatCoi=true), hot-water +reset requests yHotWatResReq

+
    +
  1. +If the supply air temperature TAirSup is 17 °C (30 °F) less than +the heating supply air temperature set point TSupHeaEco for 5 minutes, send 3 +requests. +
  2. +
  3. +Else if the supply air temperature TAirSup is 8 °C (15 °F) less than +the heating supply air temperature set point TSupHeaEco for 5 minutes, send 2 +requests. +
  4. +
  5. +Else if the hot water valve position uHeaCoi_actual is greater than +95%, send 1 request until the uHeaCoi_actual is less than 85%. +
  6. +
  7. +Else if the hot water valve position uHeaCoi_actual is less than 95%, +send 0 request. +
  8. +
+

If there is a hot-water coil and heating hot-water plant, heating hot-water +plant reqeusts yHotWatPlaReq

+

+Send the heating hot-water plant that serves the air handling unit a heating hot-water +plant request as follows: +

+
    +
  1. +If the hot water valve position uHeaCoi_actual is greater than 95%, send 1 +request until the hot water valve position is less than 10%. +
  2. +
  3. +If the hot water valve position uHeaCoi_actual is less than 95%, send 0 requests. +
  4. +
+", revisions=" +
    +
  • +December 1, 2021, by Jianjun Hu:
    +First implementation. +
  • +
+")); +end PlantRequests; diff --git a/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/Validation/PlantRequests.mo b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/Validation/PlantRequests.mo new file mode 100644 index 00000000000..23fb9a6c426 --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/Validation/PlantRequests.mo @@ -0,0 +1,101 @@ +within Buildings.Controls.OBC.ASHRAE.G36.AHUs.SingleZone.VAV.SetPoints.Validation; +model PlantRequests + "Validate model for calculating the plant requests" + + Buildings.Controls.OBC.ASHRAE.G36.AHUs.SingleZone.VAV.SetPoints.PlantRequests plaReq + "Calculate plant request" + annotation (Placement(transformation(extent={{60,50},{80,70}}))); + Buildings.Controls.OBC.ASHRAE.G36.AHUs.SingleZone.VAV.SetPoints.PlantRequests plaReq1( + final have_hotWatCoi=false) + "Calculate plant request" + annotation (Placement(transformation(extent={{60,-80},{80,-60}}))); + + Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp supTem( + final height=8, + final offset=273.15 + 15, + final duration=3600) "Supply air temperature" + annotation (Placement(transformation(extent={{-80,-50},{-60,-30}}))); + Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp supTemSet( + final height=6, + final offset=273.15 + 14.5, + final duration=3600) "Supply air temperature setpoint" + annotation (Placement(transformation(extent={{-40,-70},{-20,-50}}))); + Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp cooCoi( + final height=-0.3, + final offset=0.96, + final duration=3600, + startTime=1000) "Cooling coil position" + annotation (Placement(transformation(extent={{-80,-90},{-60,-70}}))); + Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp heaCoi( + final height=-0.3, + final offset=0.96, + final duration=3600, + startTime=1000) "Heating coil position" + annotation (Placement(transformation(extent={{-80,-10},{-60,10}}))); + Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp supTem1( + final height=8, + final offset=273.15 + 12, + final duration=3600) "Cooling supply air temperature" + annotation (Placement(transformation(extent={{-80,70},{-60,90}}))); + Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp supTemSet1( + final height=15, + final offset=273.15 + 20, + final duration=3600) "Supply air temperature setpoint" + annotation (Placement(transformation(extent={{-40,50},{-20,70}}))); + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant cooCoi1( + final k=0) "Cooling coil position" + annotation (Placement(transformation(extent={{-80,30},{-60,50}}))); + Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp supTem2( + final height=7, + final offset=273.15 + 13, + final duration=3600) "Supply air temperature" + annotation (Placement(transformation(extent={{-40,10},{-20,30}}))); + +equation + connect(supTem.y, plaReq1.TAirSup) annotation (Line(points={{-58,-40},{20,-40}, + {20,-61},{58,-61}}, color={0,0,127})); + connect(cooCoi.y, plaReq1.uCooCoi_actual) annotation (Line(points={{-58,-80}, + {20,-80},{20,-70},{58,-70}}, color={0,0,127})); + connect(supTem1.y, plaReq.TAirSup) annotation (Line(points={{-58,80},{0,80},{ + 0,69},{58,69}}, color={0,0,127})); + connect(cooCoi1.y, plaReq.uCooCoi_actual) annotation (Line(points={{-58,40},{ + 10,40},{10,60},{58,60}}, color={0,0,127})); + connect(heaCoi.y, plaReq.uHeaCoi_actual) annotation (Line(points={{-58,0},{30, + 0},{30,51},{58,51}}, color={0,0,127})); + connect(supTemSet1.y, plaReq.TSupCoo) annotation (Line(points={{-18,60},{0,60}, + {0,65},{58,65}}, color={0,0,127})); + connect(supTemSet.y, plaReq1.TSupCoo) annotation (Line(points={{-18,-60},{0,-60}, + {0,-65},{58,-65}}, color={0,0,127})); + connect(supTem2.y, plaReq.TSupHeaEco) annotation (Line(points={{-18,20},{20,20}, + {20,55},{58,55}}, color={0,0,127})); + +annotation ( + experiment(StopTime=3600, Tolerance=1e-6), + __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/Validation/PlantRequests.mos" + "Simulate and plot"), + Documentation(info=" +

+This example validates + +Buildings.Controls.OBC.ASHRAE.G36.AHUs.SingleZone.VAV.SetPoints.PlantRequests +for air handling unit serving single zone. +

+", revisions=" +
    +
  • +February 6, by Jianjun Hu:
    +First implementation. +
  • +
+"), + Icon(graphics={ + Ellipse(lineColor = {75,138,73}, + fillColor={255,255,255}, + fillPattern = FillPattern.Solid, + extent = {{-100,-100},{100,100}}), + Polygon(lineColor = {0,0,255}, + fillColor = {75,138,73}, + pattern = LinePattern.None, + fillPattern = FillPattern.Solid, + points = {{-36,60},{64,0},{-36,-60},{-36,60}})})); +end PlantRequests; diff --git a/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/Validation/package.mo b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/Validation/package.mo new file mode 100644 index 00000000000..438b07b12a2 --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/Validation/package.mo @@ -0,0 +1,37 @@ +within Buildings.Controls.OBC.ASHRAE.G36.AHUs.SingleZone.VAV.SetPoints; +package Validation "Collection of validation models" + +annotation (preferredView="info", Documentation(info=" +

+This package contains validation models for the classes in + +Buildings.Controls.OBC.ASHRAE.G36.AHUs.SingleZone.VAV.SetPoints. +

+

+Note that most validation models contain simple input data +which may not be realistic, but for which the correct +output can be obtained through an analytic solution. +The examples plot various outputs, which have been verified against these +solutions. These model outputs are stored as reference data and +used for continuous validation whenever models in the library change. +

+"), + Icon(graphics={ + Rectangle( + lineColor={200,200,200}, + fillColor={248,248,248}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Rectangle( + lineColor={128,128,128}, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Polygon( + origin={8.0,14.0}, + lineColor={78,138,73}, + fillColor={78,138,73}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})})); +end Validation; diff --git a/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/Validation/package.order b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/Validation/package.order new file mode 100644 index 00000000000..e290891ee6e --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/Validation/package.order @@ -0,0 +1 @@ +PlantRequests diff --git a/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/package.mo b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/package.mo new file mode 100644 index 00000000000..15e544b420a --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/package.mo @@ -0,0 +1,24 @@ +within Buildings.Controls.OBC.ASHRAE.G36.AHUs.SingleZone.VAV; +package SetPoints "Output setpoints for AHU control" + +annotation (preferredView="info", Documentation(info=" +

+This package contains sequences generating setpoints for single zone VAV AHU control. +

+"), + Icon(graphics={ + Rectangle( + lineColor={200,200,200}, + fillColor={248,248,248}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Rectangle( + lineColor={128,128,128}, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Text( + extent={{-100,100},{100,-100}}, + lineColor={0,0,0}, + textString="S")})); +end SetPoints; diff --git a/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/package.order b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/package.order new file mode 100644 index 00000000000..09d2e251c50 --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/package.order @@ -0,0 +1,2 @@ +PlantRequests +Validation diff --git a/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/package.mo b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/package.mo new file mode 100644 index 00000000000..efc8c53c81a --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/package.mo @@ -0,0 +1,44 @@ +within Buildings.Controls.OBC.ASHRAE.G36.AHUs.SingleZone; +package VAV "Sequences for single zone VAV AHU control" + +annotation (preferredView="info", Documentation(info=" +

+This package contains control sequences from ASHRAE Guideline 36, Section 5.18 for +single zone VAV air handling unit control. +

+"), + Icon(graphics={ + Rectangle( + lineColor={200,200,200}, + fillColor={248,248,248}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Rectangle( + lineColor={128,128,128}, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Ellipse( + origin={10.0,10.0}, + fillColor={76,76,76}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + extent={{-80.0,-80.0},{-20.0,-20.0}}), + Ellipse( + origin={10.0,10.0}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + extent={{0.0,-80.0},{60.0,-20.0}}), + Ellipse( + origin={10.0,10.0}, + fillColor={128,128,128}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + extent={{0.0,0.0},{60.0,60.0}}), + Ellipse( + origin={10.0,10.0}, + lineColor={128,128,128}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid, + extent={{-80.0,0.0},{-20.0,60.0}})})); +end VAV; diff --git a/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/package.order b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/package.order new file mode 100644 index 00000000000..5e72dbe8c8e --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/package.order @@ -0,0 +1 @@ +SetPoints diff --git a/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/package.mo b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/package.mo new file mode 100644 index 00000000000..8d3599bb663 --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/package.mo @@ -0,0 +1,23 @@ +within Buildings.Controls.OBC.ASHRAE.G36.AHUs; +package SingleZone "Sequences for single zone AHU control" + +annotation (preferredView="info", Documentation(info=" +

+This package contains control sequences from ASHRAE Guideline 36 for single zone air handling units. +

+"), + Icon(graphics={ + Rectangle( + lineColor={200,200,200}, + fillColor={248,248,248}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Rectangle( + lineColor={128,128,128}, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), Rectangle( + extent={{-66,70},{70,-72}}, + lineColor={0,0,127}, + lineThickness=0.5)})); +end SingleZone; diff --git a/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/package.order b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/package.order new file mode 100644 index 00000000000..662f765ce45 --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/package.order @@ -0,0 +1 @@ +VAV diff --git a/Buildings/Controls/OBC/ASHRAE/G36/AHUs/package.mo b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/package.mo new file mode 100644 index 00000000000..ba10d7a961d --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/package.mo @@ -0,0 +1,29 @@ +within Buildings.Controls.OBC.ASHRAE.G36; +package AHUs "AHU Sequences as defined in guideline G36" + + annotation ( + Documentation(info=" +

+This package contains AHU control sequences from ASHRAE Guideline 36. +

+"), Icon(graphics={ + Rectangle( + lineColor={200,200,200}, + fillColor={248,248,248}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Rectangle( + lineColor={128,128,128}, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Rectangle( + lineColor={200,200,200}, + fillColor={248,248,248}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), Rectangle( + extent={{-60,60},{60,-60}}, + lineColor={0,0,127}, + lineThickness=0.5)})); +end AHUs; diff --git a/Buildings/Controls/OBC/ASHRAE/G36/AHUs/package.order b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/package.order new file mode 100644 index 00000000000..1e9921b5d17 --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/package.order @@ -0,0 +1 @@ +SingleZone diff --git a/Buildings/Controls/OBC/ASHRAE/G36/package.mo b/Buildings/Controls/OBC/ASHRAE/G36/package.mo new file mode 100644 index 00000000000..1142a318c83 --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/G36/package.mo @@ -0,0 +1,131 @@ +within Buildings.Controls.OBC.ASHRAE; +package G36 "Package with control sequences from ASHRAE Guideline 36" + +annotation (Documentation(info=" +

+This package contains control sequences from +ASHRAE Guideline 36 (G36). +All sequences are created using blocks from the + +Buildings.Controls.OBC.CDL library, following the + +CDL specification. +

+

+The G36 library is structured as follows: +

+

Implementation of PID controllers

+

+For the PID controllers, the implementation in + +Buildings.Controls.OBC.CDL.Continuous.LimPID +is used. +Hence, the PID controllers are in the standard form +

+

+y(t) = k   ( e(t) + 1 ⁄ Ti   ∫ e(s) ds + Td de(t)⁄dt ), +

+

+where +y(t) is the control signal, +e(t) = us(t) - um(t) is the control error, +with us(t) being the set point and um(t) being +the measured quantity, +k is the gain, +Ti is the time constant of the integral term and +Td is the time constant of the derivative term. +

+

+Note that the units of k are the inverse of the units of the control error, +while the units of Ti and Td are seconds. +As the units of flow rates and pressure can vary between orders of magnitude, +for example depening on whether cfm, m3⁄s or +m3⁄h are used for flow measurements, the control +error is normalized as follows: +

    +
  • +For temperatures, no normalization is used, and the units of k are +1/Kelvin. No normalization is used because 1 Kelvin is 1.8 +Fahrenheit, and hence these are of the same order of magnitude. +
  • +
  • +For air flow rate control, the design flow rate is used to normalize the +control error, and hence k is unitless. +This also allows to use the same control gain for flows of different magnitudes, +for example for a VAV box of a large and a small room, provided the rooms +have similar transient response. +
  • +
  • +For pressure control, the pressure difference is used to normalize the +control error, and hence k is unitless. +
  • +
+

+Guideline 36 is specific as the where a P or a PI controller should be +used. These recommendations are used as the default control configuration. +However, all controllers can be configured as P, PI or PID controller. +This allows to configure a PI controller as a P controller as part of the +tuning process. +

+

References

+

+ASHRAE Guideline 36P, High Performance Sequences of Operation for HVAC +systems. First Public Review Draft (June 2016) +

+"), Icon(graphics={ + Rectangle( + lineColor={200,200,200}, + fillColor={248,248,248}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Rectangle( + lineColor={128,128,128}, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Ellipse( + origin={10.0,10.0}, + fillColor={76,76,76}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + extent={{-80.0,-80.0},{-20.0,-20.0}}), + Ellipse( + origin={10.0,10.0}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + extent={{0.0,-80.0},{60.0,-20.0}}), + Ellipse( + origin={10.0,10.0}, + fillColor={128,128,128}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + extent={{0.0,0.0},{60.0,60.0}}), + Ellipse( + origin={10.0,10.0}, + lineColor={128,128,128}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid, + extent={{-80.0,0.0},{-20.0,60.0}})})); +end G36; diff --git a/Buildings/Controls/OBC/ASHRAE/G36/package.order b/Buildings/Controls/OBC/ASHRAE/G36/package.order new file mode 100644 index 00000000000..6024e200370 --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/G36/package.order @@ -0,0 +1 @@ +AHUs diff --git a/Buildings/Controls/OBC/ASHRAE/package.order b/Buildings/Controls/OBC/ASHRAE/package.order index 0b815396928..865905bb5be 100644 --- a/Buildings/Controls/OBC/ASHRAE/package.order +++ b/Buildings/Controls/OBC/ASHRAE/package.order @@ -1,2 +1,3 @@ FanCoilUnit +G36 G36_PR1 From aea03100e5bbde3d62e7aebecd29a4a1e6c1c862 Mon Sep 17 00:00:00 2001 From: Devaprasad Date: Tue, 3 May 2022 10:24:46 -0700 Subject: [PATCH 19/83] Added request generation block to fan coil unit controls package --- .../OBC/ASHRAE/FanCoilUnit/Controller.mo | 194 +++++-- .../FanCoilUnit/Subsequences/PlantRequests.mo | 502 ++++++++++++++++++ .../Subsequences/Validation/PlantRequests.mo | 103 ++++ .../Subsequences/Validation/package.order | 1 + .../FanCoilUnit/Subsequences/package.order | 1 + .../FanCoilUnit/Validation/Controller.mo | 115 ++-- 6 files changed, 821 insertions(+), 95 deletions(-) create mode 100644 Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/PlantRequests.mo create mode 100644 Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/PlantRequests.mo diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Controller.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Controller.mo index f5abb9dae18..b73b77bc292 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Controller.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Controller.mo @@ -348,32 +348,32 @@ block Controller Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uOcc "Current occupancy period, true if it is in occupant period" annotation (Placement(transformation(extent={{-240,50},{-200,90}}), - iconTransformation(extent={{-240,20},{-200,60}}))); + iconTransformation(extent={{-240,60},{-200,100}}))); Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uWin if have_winSen "Window status, true if open, false if closed" annotation (Placement(transformation(extent={{-240,-170},{-200,-130}}), - iconTransformation(extent={{-240,-260},{-200,-220}}))); + iconTransformation(extent={{-240,-220},{-200,-180}}))); Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uFan "Fan proven on signal" annotation (Placement(transformation(extent={{-240,-140},{-200,-100}}), - iconTransformation(extent={{-240,-220},{-200,-180}}))); + iconTransformation(extent={{-240,-180},{-200,-140}}))); Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uCooDemLimLev "Cooling demand limit level" annotation (Placement(transformation(extent={{-240,20},{-200,60}}), - iconTransformation(extent={{-240,-20},{-200,20}}))); + iconTransformation(extent={{-240,20},{-200,60}}))); Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uHeaDemLimLev "Heating demand limit level" annotation (Placement(transformation(extent={{-240,-10},{-200,30}}), - iconTransformation(extent={{-240,-60},{-200,-20}}))); + iconTransformation(extent={{-240,-20},{-200,20}}))); Buildings.Controls.OBC.CDL.Interfaces.IntegerInput nOcc if have_occSen "Number of occupants" annotation (Placement(transformation(extent={{-240,-110},{-200,-70}}), - iconTransformation(extent={{-240,-180},{-200,-140}}))); + iconTransformation(extent={{-240,-140},{-200,-100}}))); Buildings.Controls.OBC.CDL.Interfaces.RealInput warUpTim( final unit="s", @@ -381,7 +381,7 @@ block Controller final quantity="Time") "Warm-up time retrieved from optimal warm-up block" annotation (Placement(transformation(extent={{-240,170},{-200,210}}), - iconTransformation(extent={{-240,220},{-200,260}}))); + iconTransformation(extent={{-240,260},{-200,300}}))); Buildings.Controls.OBC.CDL.Interfaces.RealInput cooDowTim( final unit="s", @@ -389,14 +389,14 @@ block Controller final quantity="Time") "Cool-down time retrieved from optimal cool-down block" annotation (Placement(transformation(extent={{-240,200},{-200,240}}), - iconTransformation(extent={{-240,180},{-200,220}}))); + iconTransformation(extent={{-240,220},{-200,260}}))); Buildings.Controls.OBC.CDL.Interfaces.RealInput tNexOcc( final unit="s", displayUnit="min", final quantity="Time") "Time to next occupied period" annotation (Placement(transformation(extent={{-240,140},{-200,180}}), - iconTransformation(extent={{-240,140},{-200,180}}))); + iconTransformation(extent={{-240,180},{-200,220}}))); Buildings.Controls.OBC.CDL.Interfaces.RealInput TZon( final unit="K", @@ -404,7 +404,7 @@ block Controller final quantity="ThermodynamicTemperature") "Measured zone temperatures" annotation (Placement(transformation(extent={{-240,-70},{-200,-30}}), - iconTransformation(extent={{-240,-140},{-200,-100}}))); + iconTransformation(extent={{-240,-100},{-200,-60}}))); Buildings.Controls.OBC.CDL.Interfaces.RealInput TSup( final unit="K", @@ -412,7 +412,7 @@ block Controller final quantity="ThermodynamicTemperature") "Measured supply air temperature" annotation (Placement(transformation(extent={{-240,-40},{-200,0}}), - iconTransformation(extent={{-240,-100},{-200,-60}}))); + iconTransformation(extent={{-240,-60},{-200,-20}}))); Buildings.Controls.OBC.CDL.Interfaces.RealInput setAdj( final unit="K", @@ -420,7 +420,7 @@ block Controller final quantity="TemperatureDifference") if cooAdj or sinAdj "Setpoint adjustment value" annotation (Placement(transformation(extent={{-240,110},{-200,150}}), - iconTransformation(extent={{-240,100},{-200,140}}))); + iconTransformation(extent={{-240,140},{-200,180}}))); Buildings.Controls.OBC.CDL.Interfaces.RealInput heaSetAdj( final unit="K", @@ -428,12 +428,46 @@ block Controller final quantity="TemperatureDifference") if heaAdj "Heating setpoint adjustment value" annotation (Placement(transformation(extent={{-240,80},{-200,120}}), - iconTransformation(extent={{-240,60},{-200,100}}))); + iconTransformation(extent={{-240,100},{-200,140}}))); + + Buildings.Controls.OBC.CDL.Interfaces.RealInput uHeaCoi( + final unit="1", + displayUnit="1") if have_heatingCoil + "Measured heating coil control action" + annotation (Placement(transformation(extent={{-240,-220},{-200,-180}}), + iconTransformation(extent={{-240,-260},{-200,-220}}))); + + Buildings.Controls.OBC.CDL.Interfaces.RealInput uCooCoi( + final unit="1", + displayUnit="1") if have_coolingCoil + "Measured cooling coil control action" + annotation (Placement(transformation(extent={{-240,-260},{-200,-220}}), + iconTransformation(extent={{-240,-300},{-200,-260}}))); Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yFan "Fan enable signal" annotation (Placement(transformation(extent={{200,180},{240,220}}), - iconTransformation(extent={{200,100},{240,140}}))); + iconTransformation(extent={{200,180},{240,220}}))); + + Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yChiWatResReq if have_coolingCoil + "Chilled water reset request" + annotation (Placement(transformation(extent={{200,-120},{240,-80}}), + iconTransformation(extent={{200,-100},{240,-60}}))); + + Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yChiPlaReq if have_coolingCoil + "Chiller plant requests" + annotation (Placement(transformation(extent={{200,-160},{240,-120}}), + iconTransformation(extent={{200,-140},{240,-100}}))); + + Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yHotWatResReq if have_heatingCoil + "Hot water reset requests" + annotation (Placement(transformation(extent={{200,-200},{240,-160}}), + iconTransformation(extent={{200,-180},{240,-140}}))); + + Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yHotWatPlaReq if have_heatingCoil + "Hot water plant requests" + annotation (Placement(transformation(extent={{200,-240},{240,-200}}), + iconTransformation(extent={{200,-220},{240,-180}}))); Buildings.Controls.OBC.CDL.Interfaces.RealOutput TAirSupSet( final unit="K", @@ -441,7 +475,7 @@ block Controller final quantity="ThermodynamicTemperature") "Supply air temperature setpoint" annotation (Placement(transformation(extent={{200,-40},{240,0}}), - iconTransformation(extent={{200,-140},{240,-100}}))); + iconTransformation(extent={{200,-60},{240,-20}}))); Buildings.Controls.OBC.CDL.Interfaces.RealOutput yFanSpe( final min=0, @@ -449,7 +483,7 @@ block Controller final unit="1") "Fan speed signal" annotation (Placement(transformation(extent={{200,140},{240,180}}), - iconTransformation(extent={{200,60},{240,100}}))); + iconTransformation(extent={{200,140},{240,180}}))); Buildings.Controls.OBC.CDL.Interfaces.RealOutput TZonHeaSet( final unit="K", @@ -457,7 +491,7 @@ block Controller final quantity="ThermodynamicTemperature") "Heating setpoint temperature" annotation (Placement(transformation(extent={{200,100},{240,140}}), - iconTransformation(extent={{200,20},{240,60}}))); + iconTransformation(extent={{200,100},{240,140}}))); Buildings.Controls.OBC.CDL.Interfaces.RealOutput TZonCooSet( final unit="K", @@ -465,7 +499,7 @@ block Controller final quantity="ThermodynamicTemperature") "Cooling setpoint temperature" annotation (Placement(transformation(extent={{200,60},{240,100}}), - iconTransformation(extent={{200,-20},{240,20}}))); + iconTransformation(extent={{200,60},{240,100}}))); Buildings.Controls.OBC.CDL.Interfaces.RealOutput yCooCoi( final min=0, @@ -473,7 +507,7 @@ block Controller final unit="1") if have_coolingCoil "Cooling coil control signal" annotation (Placement(transformation(extent={{200,-80},{240,-40}}), - iconTransformation(extent={{200,-100},{240,-60}}))); + iconTransformation(extent={{200,-20},{240,20}}))); Buildings.Controls.OBC.CDL.Interfaces.RealOutput yHeaCoi( final min=0, @@ -481,7 +515,7 @@ block Controller final unit="1") if have_heatingCoil "Heating coil control signal" annotation (Placement(transformation(extent={{200,0},{240,40}}), - iconTransformation(extent={{200,-60},{240,-20}}))); + iconTransformation(extent={{200,20},{240,60}}))); Buildings.Controls.OBC.ASHRAE.G36_PR1.AHUs.SingleZone.VAV.SetPoints.ModeAndSetPoints modSetPoi( @@ -530,6 +564,16 @@ block Controller annotation (Placement(transformation(extent={{-80,210},{-60,230}}))); protected + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con( + final k=0) if not have_coolingCoil + "Constant zero signal source if cooling coil is absent" + annotation (Placement(transformation(extent={{40,-60},{60,-40}}))); + + Buildings.Controls.OBC.ASHRAE.G36.AHUs.SingleZone.VAV.SetPoints.PlantRequests sinAHUPlaReq( + final have_hotWatCoi=have_heatingCoil) + "Block for generating chilled water requests and hot water requests for their respective plants" + annotation (Placement(transformation(extent={{100,-100},{120,-80}}))); + Buildings.Controls.OBC.CDL.Integers.Sources.Constant unOccMod( final k=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.OperationModes.unoccupied) "Unoccupied mode" @@ -674,8 +718,8 @@ equation connect(modSetPoi.yOpeMod, fanSpe.opeMod) annotation (Line(points={{-118,168}, {-60,168},{-60,180},{20,180},{20,186},{118,186}}, color={255,127,0})); - connect(TSup, TSupAir.TAirSup) annotation (Line(points={{-220,-20},{-62,-20},{ - -62,8},{98,8}}, color={0,0,127})); + connect(TSup, TSupAir.TAirSup) annotation (Line(points={{-220,-20},{-60,-20},{ + -60,8},{98,8}}, color={0,0,127})); connect(uFan, fanSpe.uFanPro) annotation (Line(points={{-220,-120},{28,-120},{ 28,182},{118,182}}, color={255,0,255})); @@ -709,140 +753,196 @@ equation {-184,158},{-142,158}}, color={0,0,127})); connect(heaSetAdj, modSetPoi.heaSetAdj) annotation (Line(points={{-220,100},{-152, 100},{-152,156},{-142,156}}, color={0,0,127})); + connect(TSupAir.TAirSupSet, sinAHUPlaReq.TSupCoo) annotation (Line(points={{122, + 10},{130,10},{130,-60},{90,-60},{90,-85},{98,-85}}, color={0,0,127})); + connect(TSupAir.TAirSupSet, sinAHUPlaReq.TSupHeaEco) annotation (Line(points={ + {122,10},{130,10},{130,-60},{90,-60},{90,-95},{98,-95}}, color={0,0,127})); + connect(TSup, sinAHUPlaReq.TAirSup) annotation (Line(points={{-220,-20},{-60,-20}, + {-60,-81},{98,-81}}, color={0,0,127})); + connect(uCooCoi, sinAHUPlaReq.uCooCoi_actual) annotation (Line(points={{-220,-240}, + {80,-240},{80,-90},{98,-90}}, color={0,0,127})); + connect(uHeaCoi, sinAHUPlaReq.uHeaCoi_actual) annotation (Line(points={{-220,-200}, + {90,-200},{90,-99},{98,-99}}, color={0,0,127})); + connect(con.y, sinAHUPlaReq.uCooCoi_actual) annotation (Line(points={{62,-50}, + {80,-50},{80,-90},{98,-90}}, color={0,0,127})); + connect(sinAHUPlaReq.yChiWatResReq, yChiWatResReq) annotation (Line(points={{122, + -82},{160,-82},{160,-100},{220,-100}}, color={255,127,0})); + connect(sinAHUPlaReq.yChiPlaReq, yChiPlaReq) annotation (Line(points={{122,-87}, + {156,-87},{156,-140},{220,-140}}, color={255,127,0})); + connect(sinAHUPlaReq.yHotWatResReq, yHotWatResReq) annotation (Line(points={{122, + -93},{150,-93},{150,-180},{220,-180}}, color={255,127,0})); + connect(sinAHUPlaReq.yHotWatPlaReq, yHotWatPlaReq) annotation (Line(points={{122, + -98},{144,-98},{144,-220},{220,-220}}, color={255,127,0})); annotation (defaultComponentName="conFCU", - Icon(coordinateSystem(preserveAspectRatio=false, extent={{-200,-260},{200,260}}), + Icon(coordinateSystem(preserveAspectRatio=false, extent={{-200,-300},{200,300}}), graphics={Rectangle( - extent={{-200,-260},{200,260}}, + extent={{-200,-300},{200,300}}, lineColor={0,0,127}, fillColor={255,255,255}, fillPattern=FillPattern.Solid), Text( - extent={{-210,340},{210,260}}, + extent={{-200,380},{200,300}}, textString="%name", textColor={0,0,255}), Text( - extent={{-196,176},{-134,148}}, + extent={{-196,216},{-134,188}}, textColor={0,0,127}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="tNexOcc"), Text( - extent={{-200,-108},{-156,-128}}, + extent={{-200,-68},{-156,-88}}, textColor={0,0,127}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="TZon"), Text( - extent={{-200,52},{-154,32}}, + extent={{-200,92},{-154,72}}, textColor={255,0,255}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="uOcc"), Text( - extent={{-200,-68},{-152,-90}}, + extent={{-200,-28},{-152,-50}}, textColor={0,0,127}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="TSup"), Text( - extent={{-198,-172},{-152,-144}}, + extent={{-198,-132},{-152,-104}}, textColor={244,125,35}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="nOcc"), Text( visible=have_winSen, - extent={{-198,-226},{-154,-248}}, + extent={{-198,-186},{-154,-208}}, textColor={255,0,255}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="uWin"), Text( - extent={{132,-102},{198,-136}}, + extent={{132,-22},{198,-56}}, textColor={0,0,127}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="TAirSup"), Text( - extent={{150,96},{198,72}}, + extent={{150,174},{198,150}}, textColor={0,0,127}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="yFanSpe"), Text( - extent={{116,56},{194,22}}, + extent={{116,136},{194,102}}, textColor={0,0,127}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="TZonHeaSet"), Text( - extent={{116,18},{196,-20}}, + extent={{116,98},{196,60}}, textColor={0,0,127}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="TZonCooSet"), Text( - extent={{142,-20},{196,-58}}, + extent={{142,60},{196,22}}, textColor={0,0,127}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="yHeaCoi"), Text( - extent={{142,-60},{196,-98}}, + extent={{142,20},{196,-18}}, textColor={0,0,127}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="yCooCoi"), Text( - extent={{-194,258},{-120,226}}, + extent={{-194,298},{-120,266}}, textColor={0,0,127}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="warUpTim"), Text( - extent={{-194,218},{-114,186}}, + extent={{-194,258},{-114,226}}, textColor={0,0,127}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="cooDowTim"), Text( - extent={{-194,14},{-82,-8}}, + extent={{-194,54},{-82,32}}, textColor={255,127,0}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="uCooDemLimLev"), Text( - extent={{-194,-28},{-82,-50}}, + extent={{-194,12},{-82,-10}}, textColor={255,127,0}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="uHeaDemLimLev"), Text( - extent={{-202,-190},{-156,-210}}, + extent={{-202,-150},{-156,-170}}, textColor={255,0,255}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="uFan"), Text( - extent={{158,134},{202,112}}, + extent={{158,212},{202,190}}, textColor={255,0,255}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="yFan"), Text( - extent={{-196,134},{-134,106}}, + extent={{-196,174},{-134,146}}, textColor={0,0,127}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, textString="setAdj"), Text( - extent={{-196,94},{-134,66}}, + extent={{-196,134},{-134,106}}, + textColor={0,0,127}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid, + textString="heaSetAdj"), + Text( + extent={{-196,-228},{-148,-250}}, + textColor={0,0,127}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid, + textString="uHeaCoi"), + Text( + extent={{-196,-268},{-148,-290}}, textColor={0,0,127}, fillColor={0,0,0}, fillPattern=FillPattern.Solid, - textString="heaSetAdj")}), + textString="uCooCoi"), + Text( + extent={{106,-90},{198,-66}}, + textColor={244,125,35}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid, + textString="yChiWatResReq"), + Text( + extent={{132,-130},{198,-108}}, + textColor={244,125,35}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid, + textString="yChiPlaReq"), + Text( + extent={{104,-170},{196,-146}}, + textColor={244,125,35}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid, + textString="yHotWatResReq"), + Text( + extent={{106,-210},{198,-186}}, + textColor={244,125,35}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid, + textString="yHotWatPlaReq")}), Diagram(coordinateSystem( - preserveAspectRatio=false, extent={{-200,-200},{200,240}})), + preserveAspectRatio=false, extent={{-200,-260},{200,240}})), Documentation(info="

Block for fan coil unit control. It outputs supply fan enable signal and speed signal, diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/PlantRequests.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/PlantRequests.mo new file mode 100644 index 00000000000..a74aabff937 --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/PlantRequests.mo @@ -0,0 +1,502 @@ +within Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences; +block PlantRequests "Output plant requests for fan coil unit" + + parameter Boolean have_hotWatCoi = true + "True: the AHU has hot water heating coil"; + parameter Real Thys = 0.1 + "Hysteresis for checking temperature difference" + annotation(Dialog(tab="Advanced")); + parameter Real posHys = 0.05 + "Hysteresis for checking valve position difference" + annotation(Dialog(tab="Advanced")); + + parameter Real cooSpeMax = 1 + "Maximum cooling mode fan speed"; + + parameter Real heaSpeMax = 0.6 + "Maximum heating mode fan speed"; + + parameter Real dFanSpe = 0.05 + "Fan speed hysteresis difference"; + + Buildings.Controls.OBC.CDL.Interfaces.RealInput TAirSup( + final unit="K", + final displayUnit="degC", + final quantity="ThermodynamicTemperature") + "Measured supply air temperature" + annotation (Placement(transformation(extent={{-240,180},{-200,220}}), + iconTransformation(extent={{-140,40},{-100,80}}))); + Buildings.Controls.OBC.CDL.Interfaces.RealInput TSupCoo( + final unit="K", + final displayUnit="degC", + final quantity="ThermodynamicTemperature") + "Cooling supply air temperature setpoint" + annotation (Placement(transformation(extent={{-240,140},{-200,180}}), + iconTransformation(extent={{-140,0},{-100,40}}))); + Buildings.Controls.OBC.CDL.Interfaces.RealInput uCooCoi_actual( + final unit="1", + final min=0, + final max=1) + "Cooling coil valve actual position" + annotation (Placement(transformation(extent={{-240,80},{-200,120}}), + iconTransformation(extent={{-140,-40},{-100,0}}))); + Buildings.Controls.OBC.CDL.Interfaces.RealInput TSupHeaEco( + final unit="K", + final displayUnit="degC", + final quantity="ThermodynamicTemperature") if have_hotWatCoi + "Heating supply air temperature setpoint" + annotation (Placement(transformation(extent={{-240,-60},{-200,-20}}), + iconTransformation(extent={{-140,-80},{-100,-40}}))); + Buildings.Controls.OBC.CDL.Interfaces.RealInput uHeaCoi_actual( + final unit="1", + final min=0, + final max=1) if have_hotWatCoi + "Heating coil valve actual position" + annotation (Placement(transformation(extent={{-240,-160},{-200,-120}}), + iconTransformation(extent={{-140,-120},{-100,-80}}))); + Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yChiWatResReq + "Chilled water reset request" + annotation (Placement(transformation(extent={{200,180},{240,220}}), + iconTransformation(extent={{100,60},{140,100}}))); + Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yChiPlaReq + "Chiller plant request" + annotation (Placement(transformation(extent={{200,0},{240,40}}), + iconTransformation(extent={{100,10},{140,50}}))); + Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yHotWatResReq if have_hotWatCoi + "Hot water reset request" + annotation (Placement(transformation(extent={{200,-60},{240,-20}}), + iconTransformation(extent={{100,-50},{140,-10}}))); + Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yHotWatPlaReq if have_hotWatCoi + "Hot water plant request" + annotation (Placement(transformation(extent={{200,-240},{240,-200}}), + iconTransformation(extent={{100,-100},{140,-60}}))); + + CDL.Interfaces.RealInput uFanSpe "Fan speed signal" annotation (Placement( + transformation(extent={{-240,220},{-200,260}}), iconTransformation( + extent={{-140,80},{-100,120}}))); + CDL.Continuous.Hysteresis hysFanCoo(uLow=cooSpeMax - 2*dFanSpe, uHigh= + cooSpeMax - dFanSpe) "Check if fan is at max cooling mode speed" + annotation (Placement(transformation(extent={{-130,230},{-110,250}}))); + CDL.Conversions.BooleanToInteger booToIntCoo + "Output integer 1 when fan is at max cooling mode speed" + annotation (Placement(transformation(extent={{-80,230},{-60,250}}))); + CDL.Integers.Multiply mulIntCoo + "Output reset requests only if fan is at max cooling mode speed" + annotation (Placement(transformation(extent={{100,230},{120,250}}))); + CDL.Continuous.Hysteresis hysFanHea(uLow=cooSpeMax - 2*dFanSpe, uHigh= + cooSpeMax - dFanSpe) "Check if fan is at max heating mode speed" + annotation (Placement(transformation(extent={{-140,-20},{-120,0}}))); + CDL.Conversions.BooleanToInteger booToIntHea + "Output integer 1 when fan is at max heating mode speed" + annotation (Placement(transformation(extent={{-90,-20},{-70,0}}))); + CDL.Integers.Multiply mulIntHea + "Output reset requests only if fan is at max heating mode speed" + annotation (Placement(transformation(extent={{110,-10},{130,10}}))); +protected + Buildings.Controls.OBC.CDL.Continuous.Subtract cooSupTemDif + "Find the cooling supply temperature difference to the setpoint" + annotation (Placement(transformation(extent={{-140,190},{-120,210}}))); + Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr( + final t=3, + final h=Thys) + "Check if the supply temperature is greater than the setpoint by a threshold value" + annotation (Placement(transformation(extent={{-80,190},{-60,210}}))); + Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr1( + final t=2, + final h=Thys) + "Check if the supply temperature is greater than the setpoint by a threshold value" + annotation (Placement(transformation(extent={{-80,140},{-60,160}}))); + Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel( + final delayTime=120) + "Check if the input has been true for a certain time" + annotation (Placement(transformation(extent={{-40,190},{-20,210}}))); + Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel1( + final delayTime=120) + "Check if the input has been true for a certain time" + annotation (Placement(transformation(extent={{-40,140},{-20,160}}))); + Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr2( + final t=0.95, + final h=posHys) + "Check if the chilled water valve position is greater than a threshold value" + annotation (Placement(transformation(extent={{-120,90},{-100,110}}))); + Buildings.Controls.OBC.CDL.Integers.Sources.Constant thr( + final k=3) "Constant 3" + annotation (Placement(transformation(extent={{0,222},{20,242}}))); + Buildings.Controls.OBC.CDL.Integers.Switch chiWatRes3 + "Send 3 chilled water reset request" + annotation (Placement(transformation(extent={{160,190},{180,210}}))); + Buildings.Controls.OBC.CDL.Integers.Switch chiWatRes2 + "Send 2 chilled water reset request" + annotation (Placement(transformation(extent={{120,140},{140,160}}))); + Buildings.Controls.OBC.CDL.Integers.Sources.Constant two( + final k=2) + "Constant 2" + annotation (Placement(transformation(extent={{0,170},{20,190}}))); + Buildings.Controls.OBC.CDL.Continuous.LessThreshold lesThr( + final t=0.85, + final h=posHys) + "Check if the chilled water valve position is less than a threshold value" + annotation (Placement(transformation(extent={{-120,50},{-100,70}}))); + Buildings.Controls.OBC.CDL.Logical.Latch lat + "Keep true signal until other condition becomes true" + annotation (Placement(transformation(extent={{-40,90},{-20,110}}))); + Buildings.Controls.OBC.CDL.Integers.Switch chiWatRes1 + "Send 1 chilled water reset request" + annotation (Placement(transformation(extent={{80,90},{100,110}}))); + Buildings.Controls.OBC.CDL.Integers.Sources.Constant one( + final k=1) "Constant 1" + annotation (Placement(transformation(extent={{0,110},{20,130}}))); + Buildings.Controls.OBC.CDL.Integers.Sources.Constant zer( + final k=0) "Constant 0" + annotation (Placement(transformation(extent={{0,50},{20,70}}))); + Buildings.Controls.OBC.CDL.Logical.Latch lat1 + "Keep true signal until other condition becomes true" + annotation (Placement(transformation(extent={{-40,10},{-20,30}}))); + Buildings.Controls.OBC.CDL.Continuous.LessThreshold lesThr1( + final t=0.1, + final h=posHys) + "Check if the chilled water valve position is less than a threshold value" + annotation (Placement(transformation(extent={{-120,4},{-100,24}}))); + Buildings.Controls.OBC.CDL.Integers.Switch intSwi3 + "Send 1 chiller plant request" + annotation (Placement(transformation(extent={{80,10},{100,30}}))); + Buildings.Controls.OBC.CDL.Continuous.Subtract heaSupTemDif if have_hotWatCoi + "Find the heating supply temperature difference to the setpoint" + annotation (Placement(transformation(extent={{-140,-50},{-120,-30}}))); + Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr3( + final t=17, + final h=Thys) if + have_hotWatCoi + "Check if the supply temperature is less than the setpoint by a threshold value" + annotation (Placement(transformation(extent={{-80,-50},{-60,-30}}))); + Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr4( + final t=8, + final h=Thys) if + have_hotWatCoi + "Check if the supply temperature is less than the setpoint by a threshold value" + annotation (Placement(transformation(extent={{-80,-100},{-60,-80}}))); + Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel2( + final delayTime=300) if have_hotWatCoi + "Check if the input has been true for a certain time" + annotation (Placement(transformation(extent={{-40,-50},{-20,-30}}))); + Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel3( + final delayTime=300) if have_hotWatCoi + "Check if the input has been true for a certain time" + annotation (Placement(transformation(extent={{-40,-100},{-20,-80}}))); + Buildings.Controls.OBC.CDL.Integers.Switch hotWatRes3 if have_hotWatCoi + "Send 3 hot water reset request" + annotation (Placement(transformation(extent={{160,-50},{180,-30}}))); + Buildings.Controls.OBC.CDL.Integers.Switch hotWatRes2 if have_hotWatCoi + "Send 2 hot water reset request" + annotation (Placement(transformation(extent={{120,-100},{140,-80}}))); + Buildings.Controls.OBC.CDL.Continuous.LessThreshold lesThr2( + final t=0.85, + final h=posHys) if + have_hotWatCoi + "Check if the hot water valve position is less than a threshold value" + annotation (Placement(transformation(extent={{-120,-190},{-100,-170}}))); + Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr5( + final t=0.95, + final h=posHys) if + have_hotWatCoi + "Check if the hot water valve position is greater than a threshold value" + annotation (Placement(transformation(extent={{-120,-150},{-100,-130}}))); + Buildings.Controls.OBC.CDL.Logical.Latch lat2 if have_hotWatCoi + "Keep true signal until other condition becomes true" + annotation (Placement(transformation(extent={{-40,-150},{-20,-130}}))); + Buildings.Controls.OBC.CDL.Integers.Switch hotWatRes1 if have_hotWatCoi + "Send 1 hot water reset request" + annotation (Placement(transformation(extent={{80,-150},{100,-130}}))); + Buildings.Controls.OBC.CDL.Continuous.LessThreshold lesThr3( + final t=0.1, + final h=posHys) if + have_hotWatCoi + "Check if the hot water valve position is less than a threshold value" + annotation (Placement(transformation(extent={{-120,-236},{-100,-216}}))); + Buildings.Controls.OBC.CDL.Logical.Latch lat3 if have_hotWatCoi + "Keep true signal until other condition becomes true" + annotation (Placement(transformation(extent={{-40,-230},{-20,-210}}))); + Buildings.Controls.OBC.CDL.Integers.Switch intSwi1 if have_hotWatCoi + "Send 1 hot water plant request" + annotation (Placement(transformation(extent={{80,-230},{100,-210}}))); + +equation + connect(TAirSup, cooSupTemDif.u1) annotation (Line(points={{-220,200},{-180,200}, + {-180,206},{-142,206}}, color={0,0,127})); + connect(TSupCoo, cooSupTemDif.u2) annotation (Line(points={{-220,160},{-190,160}, + {-190,194},{-142,194}}, color={0,0,127})); + connect(cooSupTemDif.y, greThr.u) + annotation (Line(points={{-118,200},{-82,200}}, color={0,0,127})); + connect(greThr.y, truDel.u) + annotation (Line(points={{-58,200},{-42,200}}, color={255,0,255})); + connect(greThr1.y, truDel1.u) + annotation (Line(points={{-58,150},{-42,150}}, color={255,0,255})); + connect(cooSupTemDif.y, greThr1.u) annotation (Line(points={{-118,200},{-100,200}, + {-100,150},{-82,150}}, color={0,0,127})); + connect(uCooCoi_actual, greThr2.u) + annotation (Line(points={{-220,100},{-122,100}}, color={0,0,127})); + connect(truDel.y, chiWatRes3.u2) + annotation (Line(points={{-18,200},{158,200}}, color={255,0,255})); + connect(thr.y, chiWatRes3.u1) annotation (Line(points={{22,232},{60,232},{60,208}, + {158,208}}, color={255,127,0})); + connect(truDel1.y, chiWatRes2.u2) + annotation (Line(points={{-18,150},{118,150}}, color={255,0,255})); + connect(two.y, chiWatRes2.u1) annotation (Line(points={{22,180},{50,180},{50,158}, + {118,158}}, color={255,127,0})); + connect(greThr2.y, lat.u) + annotation (Line(points={{-98,100},{-42,100}}, color={255,0,255})); + connect(uCooCoi_actual, lesThr.u) annotation (Line(points={{-220,100},{-140,100}, + {-140,60},{-122,60}}, color={0,0,127})); + connect(lesThr.y, lat.clr) annotation (Line(points={{-98,60},{-60,60},{-60,94}, + {-42,94}}, color={255,0,255})); + connect(one.y, chiWatRes1.u1) annotation (Line(points={{22,120},{40,120},{40,108}, + {78,108}}, color={255,127,0})); + connect(lat.y, chiWatRes1.u2) + annotation (Line(points={{-18,100},{78,100}}, color={255,0,255})); + connect(chiWatRes1.y, chiWatRes2.u3) annotation (Line(points={{102,100},{110,100}, + {110,142},{118,142}}, color={255,127,0})); + connect(chiWatRes2.y, chiWatRes3.u3) annotation (Line(points={{142,150},{150,150}, + {150,192},{158,192}}, color={255,127,0})); + connect(zer.y, chiWatRes1.u3) annotation (Line(points={{22,60},{30,60},{30,92}, + {78,92}}, color={255,127,0})); + connect(greThr2.y, lat1.u) annotation (Line(points={{-98,100},{-80,100},{-80,20}, + {-42,20}}, color={255,0,255})); + connect(uCooCoi_actual, lesThr1.u) annotation (Line(points={{-220,100},{-140,100}, + {-140,14},{-122,14}}, color={0,0,127})); + connect(lesThr1.y, lat1.clr) + annotation (Line(points={{-98,14},{-42,14}}, color={255,0,255})); + connect(lat1.y, intSwi3.u2) + annotation (Line(points={{-18,20},{78,20}}, color={255,0,255})); + connect(one.y, intSwi3.u1) annotation (Line(points={{22,120},{40,120},{40,28}, + {78,28}}, color={255,127,0})); + connect(zer.y, intSwi3.u3) annotation (Line(points={{22,60},{30,60},{30,12},{78, + 12}}, color={255,127,0})); + connect(intSwi3.y, yChiPlaReq) + annotation (Line(points={{102,20},{220,20}}, color={255,127,0})); + connect(TAirSup, heaSupTemDif.u2) annotation (Line(points={{-220,200},{-180,200}, + {-180,-46},{-142,-46}}, color={0,0,127})); + connect(greThr3.y, truDel2.u) + annotation (Line(points={{-58,-40},{-42,-40}}, color={255,0,255})); + connect(greThr4.y, truDel3.u) + annotation (Line(points={{-58,-90},{-42,-90}}, color={255,0,255})); + connect(heaSupTemDif.y, greThr3.u) + annotation (Line(points={{-118,-40},{-82,-40}}, color={0,0,127})); + connect(heaSupTemDif.y, greThr4.u) annotation (Line(points={{-118,-40},{-100,-40}, + {-100,-90},{-82,-90}}, color={0,0,127})); + connect(truDel2.y, hotWatRes3.u2) + annotation (Line(points={{-18,-40},{158,-40}}, color={255,0,255})); + connect(thr.y, hotWatRes3.u1) annotation (Line(points={{22,232},{60,232},{60,-32}, + {158,-32}}, color={255,127,0})); + connect(hotWatRes2.y, hotWatRes3.u3) annotation (Line(points={{142,-90},{150,-90}, + {150,-48},{158,-48}}, color={255,127,0})); + connect(two.y, hotWatRes2.u1) annotation (Line(points={{22,180},{50,180},{50,-82}, + {118,-82}}, color={255,127,0})); + connect(truDel3.y, hotWatRes2.u2) + annotation (Line(points={{-18,-90},{118,-90}}, color={255,0,255})); + connect(uHeaCoi_actual, greThr5.u) + annotation (Line(points={{-220,-140},{-122,-140}}, color={0,0,127})); + connect(greThr5.y, lat2.u) + annotation (Line(points={{-98,-140},{-42,-140}}, color={255,0,255})); + connect(uHeaCoi_actual, lesThr2.u) annotation (Line(points={{-220,-140},{-140, + -140},{-140,-180},{-122,-180}}, color={0,0,127})); + connect(lesThr2.y, lat2.clr) annotation (Line(points={{-98,-180},{-60,-180},{-60, + -146},{-42,-146}}, color={255,0,255})); + connect(lat2.y, hotWatRes1.u2) + annotation (Line(points={{-18,-140},{78,-140}}, color={255,0,255})); + connect(one.y, hotWatRes1.u1) annotation (Line(points={{22,120},{40,120},{40,-132}, + {78,-132}}, color={255,127,0})); + connect(zer.y, hotWatRes1.u3) annotation (Line(points={{22,60},{30,60},{30,-148}, + {78,-148}}, color={255,127,0})); + connect(hotWatRes1.y, hotWatRes2.u3) annotation (Line(points={{102,-140},{110, + -140},{110,-98},{118,-98}}, color={255,127,0})); + connect(uHeaCoi_actual, lesThr3.u) annotation (Line(points={{-220,-140},{-140, + -140},{-140,-226},{-122,-226}}, color={0,0,127})); + connect(lesThr3.y, lat3.clr) + annotation (Line(points={{-98,-226},{-42,-226}}, color={255,0,255})); + connect(greThr5.y, lat3.u) annotation (Line(points={{-98,-140},{-80,-140},{-80, + -220},{-42,-220}}, color={255,0,255})); + connect(lat3.y, intSwi1.u2) + annotation (Line(points={{-18,-220},{78,-220}}, color={255,0,255})); + connect(one.y, intSwi1.u1) annotation (Line(points={{22,120},{40,120},{40,-212}, + {78,-212}}, color={255,127,0})); + connect(zer.y, intSwi1.u3) annotation (Line(points={{22,60},{30,60},{30,-228}, + {78,-228}}, color={255,127,0})); + connect(intSwi1.y, yHotWatPlaReq) + annotation (Line(points={{102,-220},{220,-220}}, color={255,127,0})); + connect(yChiWatResReq, yChiWatResReq) + annotation (Line(points={{220,200},{220,200}}, color={255,127,0})); + connect(TSupHeaEco, heaSupTemDif.u1) + annotation (Line(points={{-220,-40},{-160,-40},{-160,-34},{-142,-34}}, color={0,0,127})); + + connect(uFanSpe, hysFanCoo.u) + annotation (Line(points={{-220,240},{-132,240}}, color={0,0,127})); + connect(hysFanCoo.y, booToIntCoo.u) + annotation (Line(points={{-108,240},{-82,240}}, color={255,0,255})); + connect(chiWatRes3.y, mulIntCoo.u2) annotation (Line(points={{182,200},{188,200}, + {188,220},{90,220},{90,234},{98,234}}, color={255,127,0})); + connect(booToIntCoo.y, mulIntCoo.u1) annotation (Line(points={{-58,240},{-20,240}, + {-20,252},{60,252},{60,246},{98,246}}, color={255,127,0})); + connect(mulIntCoo.y, yChiWatResReq) annotation (Line(points={{122,240},{194,240}, + {194,200},{220,200}}, color={255,127,0})); + connect(hotWatRes3.y, mulIntHea.u2) annotation (Line(points={{182,-40},{186,-40}, + {186,-20},{104,-20},{104,-6},{108,-6}}, color={255,127,0})); + connect(hysFanHea.y, booToIntHea.u) + annotation (Line(points={{-118,-10},{-92,-10}}, color={255,0,255})); + connect(booToIntHea.y, mulIntHea.u1) annotation (Line(points={{-68,-10},{100,-10}, + {100,6},{108,6}}, color={255,127,0})); + connect(uFanSpe, hysFanHea.u) annotation (Line(points={{-220,240},{-170,240},{ + -170,-10},{-142,-10}}, color={0,0,127})); + connect(mulIntHea.y, yHotWatResReq) annotation (Line(points={{132,0},{192,0},{ + 192,-40},{220,-40}}, color={255,127,0})); +annotation ( + defaultComponentName="sinAHUPlaReq", + Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-120},{100,120}}), + graphics={ + Rectangle( + extent={{-100,-120},{100,120}}, + lineColor={0,0,127}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), + Text( + extent={{-98,68},{-76,52}}, + lineColor={0,0,127}, + pattern=LinePattern.Dash, + textString="TSup"), + Text( + extent={{-100,160},{100,120}}, + lineColor={0,0,255}, + textString="%name"), + Text( + extent={{-98,30},{-60,12}}, + lineColor={0,0,127}, + pattern=LinePattern.Dash, + textString="TSupCoo"), + Text( + extent={{-100,-12},{-58,-26}}, + lineColor={0,0,127}, + pattern=LinePattern.Dash, + textString="uCooCoi"), + Text( + extent={{-100,-92},{-58,-106}}, + lineColor={0,0,127}, + pattern=LinePattern.Dash, + visible=have_hotWatCoi, + textString="uHeaCoi"), + Text( + extent={{34,92},{98,70}}, + lineColor={255,127,0}, + pattern=LinePattern.Dash, + textString="yChiWatResReq"), + Text( + extent={{52,42},{98,20}}, + lineColor={255,127,0}, + pattern=LinePattern.Dash, + textString="yChiPlaReq"), + Text( + extent={{34,-18},{98,-40}}, + lineColor={255,127,0}, + pattern=LinePattern.Dash, + textString="yHotWatResReq", + visible=have_hotWatCoi), + Text( + extent={{38,-66},{98,-88}}, + lineColor={255,127,0}, + pattern=LinePattern.Dash, + textString="yHotWatPlaReq", + visible=have_hotWatCoi), + Text( + extent={{-96,-52},{-40,-70}}, + lineColor={0,0,127}, + pattern=LinePattern.Dash, + textString="TSupHeaEco", + visible=have_hotWatCoi), + Text( + extent={{-98,108},{-56,94}}, + lineColor={0,0,127}, + pattern=LinePattern.Dash, + textString="uFanSpe")}), + Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-200,-260},{200,260}})), + Documentation(info=" +

+This sequence outputs the system reset requests for single zone air handling unit. The +implementation is according to the Section 5.18.15 of ASHRAE Guideline 36, May 2020. +

+

chilled water reset request yChiWatResReq

+
    +
  1. +If the supply air temperature TAirSup exceeds the cooling supply air temperature +set point TSupCoo by 3 °C (5 °F) for 2 minutes, send 3 requests. +
  2. +
  3. +If the supply air temperature TAirSup exceeds the cooling supply air temperature +set point TSupCoo by 2 °C (3 °F) for 2 minutes, send 2 requests. +
  4. +
  5. +Else if the chilled water valve position uCooCoi_actual is greater than +95%, send 1 request until the uCooCoi_actual is less than 85%. +
  6. +
  7. +Else if the chilled water valve position uCooCoi_actual is less than 95%, +send 0 request. +
  8. +
+

Chiller plant request yChiPlaReq

+

+Send the chiller plant that serves the system a chiller plant request as follows: +

+
    +
  1. +If the chilled water valve position uCooCoi_actual is greater than +95%, send 1 request until the uCooCoi_actual is less than 10%. +
  2. +
  3. +Else if the chilled water valve position uCooCoi_actual is less than 95%, +send 0 request. +
  4. +
+

If there is a hot-water coil (have_hotWatCoi=true), hot-water +reset requests yHotWatResReq

+
    +
  1. +If the supply air temperature TAirSup is 17 °C (30 °F) less than +the heating supply air temperature set point TSupHeaEco for 5 minutes, send 3 +requests. +
  2. +
  3. +Else if the supply air temperature TAirSup is 8 °C (15 °F) less than +the heating supply air temperature set point TSupHeaEco for 5 minutes, send 2 +requests. +
  4. +
  5. +Else if the hot water valve position uHeaCoi_actual is greater than +95%, send 1 request until the uHeaCoi_actual is less than 85%. +
  6. +
  7. +Else if the hot water valve position uHeaCoi_actual is less than 95%, +send 0 request. +
  8. +
+

If there is a hot-water coil and heating hot-water plant, heating hot-water +plant reqeusts yHotWatPlaReq

+

+Send the heating hot-water plant that serves the air handling unit a heating hot-water +plant request as follows: +

+
    +
  1. +If the hot water valve position uHeaCoi_actual is greater than 95%, send 1 +request until the hot water valve position is less than 10%. +
  2. +
  3. +If the hot water valve position uHeaCoi_actual is less than 95%, send 0 requests. +
  4. +
+", revisions=" +
    +
  • +December 1, 2021, by Jianjun Hu:
    +First implementation. +
  • +
+")); +end PlantRequests; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/PlantRequests.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/PlantRequests.mo new file mode 100644 index 00000000000..02c8349e278 --- /dev/null +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/PlantRequests.mo @@ -0,0 +1,103 @@ +within Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.Validation; +model PlantRequests + "Validate model for calculating the plant requests" + + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.PlantRequests plaReq + "Calculate plant request" + annotation (Placement(transformation(extent={{60,50},{80,70}}))); + + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.PlantRequests plaReq1( + final have_hotWatCoi=false) + "Calculate plant request" + annotation (Placement(transformation(extent={{60,-80},{80,-60}}))); + +protected + Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp supTem( + final height=8, + final offset=273.15 + 15, + final duration=3600) "Supply air temperature" + annotation (Placement(transformation(extent={{-80,-50},{-60,-30}}))); + Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp supTemSet( + final height=6, + final offset=273.15 + 14.5, + final duration=3600) "Supply air temperature setpoint" + annotation (Placement(transformation(extent={{-40,-70},{-20,-50}}))); + Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp cooCoi( + final height=-0.3, + final offset=0.96, + final duration=3600, + startTime=1000) "Cooling coil position" + annotation (Placement(transformation(extent={{-80,-90},{-60,-70}}))); + Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp heaCoi( + final height=-0.3, + final offset=0.96, + final duration=3600, + startTime=1000) "Heating coil position" + annotation (Placement(transformation(extent={{-80,-10},{-60,10}}))); + Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp supTem1( + final height=8, + final offset=273.15 + 12, + final duration=3600) "Cooling supply air temperature" + annotation (Placement(transformation(extent={{-80,70},{-60,90}}))); + Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp supTemSet1( + final height=15, + final offset=273.15 + 20, + final duration=3600) "Supply air temperature setpoint" + annotation (Placement(transformation(extent={{-40,50},{-20,70}}))); + Buildings.Controls.OBC.CDL.Continuous.Sources.Constant cooCoi1( + final k=0) "Cooling coil position" + annotation (Placement(transformation(extent={{-80,30},{-60,50}}))); + Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp supTem2( + final height=7, + final offset=273.15 + 13, + final duration=3600) "Supply air temperature" + annotation (Placement(transformation(extent={{-40,10},{-20,30}}))); + +equation + connect(supTem.y, plaReq1.TAirSup) annotation (Line(points={{-58,-40},{20,-40}, + {20,-61},{58,-61}}, color={0,0,127})); + connect(cooCoi.y, plaReq1.uCooCoi_actual) annotation (Line(points={{-58,-80}, + {20,-80},{20,-70},{58,-70}}, color={0,0,127})); + connect(supTem1.y, plaReq.TAirSup) annotation (Line(points={{-58,80},{0,80},{ + 0,69},{58,69}}, color={0,0,127})); + connect(cooCoi1.y, plaReq.uCooCoi_actual) annotation (Line(points={{-58,40},{ + 10,40},{10,60},{58,60}}, color={0,0,127})); + connect(heaCoi.y, plaReq.uHeaCoi_actual) annotation (Line(points={{-58,0},{30, + 0},{30,51},{58,51}}, color={0,0,127})); + connect(supTemSet1.y, plaReq.TSupCoo) annotation (Line(points={{-18,60},{0,60}, + {0,65},{58,65}}, color={0,0,127})); + connect(supTemSet.y, plaReq1.TSupCoo) annotation (Line(points={{-18,-60},{0,-60}, + {0,-65},{58,-65}}, color={0,0,127})); + connect(supTem2.y, plaReq.TSupHeaEco) annotation (Line(points={{-18,20},{20,20}, + {20,55},{58,55}}, color={0,0,127})); + +annotation ( + experiment(StopTime=3600, Tolerance=1e-6), + __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/Validation/PlantRequests.mos" + "Simulate and plot"), + Documentation(info=" +

+This example validates + +Buildings.Controls.OBC.ASHRAE.G36.AHUs.SingleZone.VAV.SetPoints.PlantRequests +for air handling unit serving single zone. +

+", revisions=" +
    +
  • +February 6, by Jianjun Hu:
    +First implementation. +
  • +
+"), + Icon(graphics={ + Ellipse(lineColor = {75,138,73}, + fillColor={255,255,255}, + fillPattern = FillPattern.Solid, + extent = {{-100,-100},{100,100}}), + Polygon(lineColor = {0,0,255}, + fillColor = {75,138,73}, + pattern = LinePattern.None, + fillPattern = FillPattern.Solid, + points = {{-36,60},{64,0},{-36,-60},{-36,60}})})); +end PlantRequests; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/package.order b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/package.order index 1a965b479ea..8112ed18fc0 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/package.order +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/package.order @@ -1,2 +1,3 @@ FanSpeed SupplyAirTemperature +PlantRequests diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/package.order b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/package.order index ff9e85e5944..9278af4be39 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/package.order +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/package.order @@ -1,3 +1,4 @@ FanSpeed SupplyAirTemperature Validation +PlantRequests diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mo index 7c2340eb796..336277d82bc 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mo @@ -15,7 +15,7 @@ model Controller final heaSpeMin=0.2, final cooSpeMin=0.2) "Validate the heating case" - annotation (Placement(transformation(extent={{20,80},{60,132}}))); + annotation (Placement(transformation(extent={{20,76},{60,136}}))); Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Controller conFCU1( final have_winSen=true, @@ -32,7 +32,7 @@ model Controller final heaSpeMin=0.2, final cooSpeMin=0.2) "Validate the cooling case" - annotation (Placement(transformation(extent={{20,12},{60,64}}))); + annotation (Placement(transformation(extent={{20,0},{60,60}}))); Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Controller conFCU2( final have_winSen=false, @@ -49,7 +49,7 @@ model Controller final heaSpeMin=0.2, final cooSpeMin=0.2) "Validate the cooling case" - annotation (Placement(transformation(extent={{20,-50},{60,2}}))); + annotation (Placement(transformation(extent={{20,-78},{60,-18}}))); Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Controller conFCU3( final have_winSen=true, @@ -66,7 +66,7 @@ model Controller final heaSpeMin=0.2, final cooSpeMin=0.2) "Validate the cooling case" - annotation (Placement(transformation(extent={{20,-112},{60,-60}}))); + annotation (Placement(transformation(extent={{20,-154},{60,-94}}))); protected Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp TZon( @@ -127,123 +127,142 @@ protected equation connect(TZon.y,conFCU. TZon) annotation (Line(points={{-158,80},{-20,80},{-20, - 94},{18,94}}, color={0,0,127})); + 98},{18,98}}, color={0,0,127})); connect(occSch.occupied,conFCU. uOcc) annotation (Line(points={{-99,48},{-74, - 48},{-74,110},{18,110}}, color={255,0,255})); + 48},{-74,114},{18,114}}, color={255,0,255})); connect(occSch.tNexOcc,conFCU. tNexOcc) annotation (Line(points={{-99,60},{ - -80,60},{-80,122},{18,122}}, color={0,0,127})); + -80,60},{-80,126},{18,126}}, color={0,0,127})); connect(TSup.y,conFCU. TSup) annotation (Line(points={{-158,40},{-140,40},{ - -140,98},{18,98}}, color={0,0,127})); + -140,102},{18,102}}, color={0,0,127})); connect(win.y,conFCU1. uWin) annotation (Line(points={{-98,-120},{0,-120},{0, - 14},{18,14}}, color={255,0,255})); + 10},{18,10}}, color={255,0,255})); connect(occSch.tNexOcc,conFCU1. tNexOcc) annotation (Line(points={{-99,60},{ - -20,60},{-20,54},{18,54}}, color={0,0,127})); + -20,60},{-20,50},{18,50}}, color={0,0,127})); connect(occSch.occupied,conFCU1. uOcc) - annotation (Line(points={{-99,48},{-40,48},{-40,42},{18,42}}, + annotation (Line(points={{-99,48},{-40,48},{-40,38},{18,38}}, color={255,0,255})); connect(TZon1.y,conFCU1. TZon) annotation (Line(points={{-158,-40},{-70,-40}, - {-70,26},{18,26}},color={0,0,127})); + {-70,22},{18,22}},color={0,0,127})); connect(TSup1.y,conFCU1. TSup) annotation (Line(points={{-158,-70},{-84,-70}, - {-84,30},{18,30}}, color={0,0,127})); + {-84,26},{18,26}}, color={0,0,127})); connect(TSup1.y,conFCU2. TSup) annotation (Line(points={{-158,-70},{-84,-70}, - {-84,-32},{18,-32}}, color={0,0,127})); + {-84,-52},{18,-52}}, color={0,0,127})); connect(occSch.occupied,conFCU2. uOcc) annotation (Line(points={{-99,48},{-74, - 48},{-74,-20},{18,-20}}, color={255,0,255})); + 48},{-74,-40},{18,-40}}, color={255,0,255})); connect(occSch.tNexOcc,conFCU2. tNexOcc) annotation (Line(points={{-99,60},{ - -80,60},{-80,-8},{18,-8}}, color={0,0,127})); + -80,60},{-80,-28},{18,-28}}, color={0,0,127})); connect(TZon1.y,conFCU2. TZon) annotation (Line(points={{-158,-40},{-70,-40}, - {-70,-36},{18,-36}},color={0,0,127})); + {-70,-56},{18,-56}},color={0,0,127})); connect(win.y,conFCU3. uWin) annotation (Line(points={{-98,-120},{0,-120},{0, - -110},{18,-110}}, + -144},{18,-144}}, color={255,0,255})); connect(occSch.occupied,conFCU3. uOcc) annotation (Line(points={{-99,48},{-74, - 48},{-74,-82},{18,-82}}, color={255,0,255})); + 48},{-74,-116},{18,-116}}, color={255,0,255})); connect(TSup1.y,conFCU3. TSup) annotation (Line(points={{-158,-70},{-84,-70}, - {-84,-94},{18,-94}}, color={0,0,127})); + {-84,-128},{18,-128}}, color={0,0,127})); connect(TZon1.y,conFCU3. TZon) annotation (Line(points={{-158,-40},{-70,-40}, - {-70,-98},{18,-98}},color={0,0,127})); + {-70,-132},{18,-132}}, + color={0,0,127})); connect(occSch.tNexOcc,conFCU3. tNexOcc) annotation (Line(points={{-99,60},{ - -80,60},{-80,-70},{18,-70}}, color={0,0,127})); + -80,60},{-80,-104},{18,-104}}, color={0,0,127})); connect(cooWarTim.y,conFCU. warUpTim) annotation (Line(points={{-98,20},{-14, - 20},{-14,130},{18,130}}, color={0,0,127})); + 20},{-14,134},{18,134}}, color={0,0,127})); connect(cooWarTim.y,conFCU. cooDowTim) annotation (Line(points={{-98,20},{-14, - 20},{-14,126},{18,126}}, color={0,0,127})); + 20},{-14,130},{18,130}}, color={0,0,127})); connect(cooWarTim.y,conFCU1. warUpTim) annotation (Line(points={{-98,20},{-14, - 20},{-14,62},{18,62}}, color={0,0,127})); + 20},{-14,58},{18,58}}, color={0,0,127})); connect(cooWarTim.y,conFCU1. cooDowTim) annotation (Line(points={{-98,20},{ - -14,20},{-14,58},{18,58}}, color={0,0,127})); + -14,20},{-14,54},{18,54}}, color={0,0,127})); connect(cooWarTim.y,conFCU2. warUpTim) annotation (Line(points={{-98,20},{-14, - 20},{-14,0},{18,0}}, color={0,0,127})); + 20},{-14,-20},{18,-20}}, color={0,0,127})); connect(cooWarTim.y,conFCU2. cooDowTim) annotation (Line(points={{-98,20},{ - -14,20},{-14,-4},{18,-4}}, color={0,0,127})); + -14,20},{-14,-24},{18,-24}}, color={0,0,127})); connect(cooWarTim.y,conFCU3. warUpTim) annotation (Line(points={{-98,20},{-14, - 20},{-14,-62},{18,-62}}, color={0,0,127})); + 20},{-14,-96},{18,-96}}, color={0,0,127})); connect(cooWarTim.y,conFCU3. cooDowTim) annotation (Line(points={{-98,20},{ - -14,20},{-14,-66},{18,-66}}, color={0,0,127})); + -14,20},{-14,-100},{18,-100}}, color={0,0,127})); connect(demLim.y,conFCU3. uHeaDemLimLev) annotation (Line(points={{-128,-100}, - {-4,-100},{-4,-90},{18,-90}}, color={255,127,0})); + {-4,-100},{-4,-124},{18,-124}}, color={255,127,0})); connect(demLim.y,conFCU3. uCooDemLimLev) annotation (Line(points={{-128,-100}, - {-4,-100},{-4,-86},{18,-86}}, color={255,127,0})); + {-4,-100},{-4,-120},{18,-120}}, color={255,127,0})); connect(demLim.y,conFCU2. uHeaDemLimLev) annotation (Line(points={{-128,-100}, - {-4,-100},{-4,-28},{18,-28}}, color={255,127,0})); + {-4,-100},{-4,-48},{18,-48}}, color={255,127,0})); connect(demLim.y,conFCU2. uCooDemLimLev) annotation (Line(points={{-128,-100}, - {-4,-100},{-4,-24},{18,-24}}, color={255,127,0})); + {-4,-100},{-4,-44},{18,-44}}, color={255,127,0})); connect(demLim.y,conFCU1. uHeaDemLimLev) annotation (Line(points={{-128,-100}, - {-4,-100},{-4,34},{18,34}}, color={255,127,0})); + {-4,-100},{-4,30},{18,30}}, color={255,127,0})); connect(demLim.y,conFCU1. uCooDemLimLev) annotation (Line(points={{-128,-100}, - {-4,-100},{-4,38},{18,38}}, color={255,127,0})); + {-4,-100},{-4,34},{18,34}}, color={255,127,0})); connect(demLim.y,conFCU. uCooDemLimLev) annotation (Line(points={{-128,-100}, - {-4,-100},{-4,106},{18,106}}, color={255,127,0})); + {-4,-100},{-4,110},{18,110}}, color={255,127,0})); connect(demLim.y,conFCU. uHeaDemLimLev) annotation (Line(points={{-128,-100}, - {-4,-100},{-4,102},{18,102}}, color={255,127,0})); + {-4,-100},{-4,106},{18,106}}, color={255,127,0})); connect(nOcc.y, conFCU.nOcc) annotation (Line(points={{-128,0},{-10,0},{-10, - 90},{18,90}}, + 94},{18,94}}, color={255,127,0})); connect(nOcc.y, conFCU2.nOcc) annotation (Line(points={{-128,0},{-10,0},{-10, - -40},{18,-40}}, + -60},{18,-60}}, color={255,127,0})); - connect(conFCU.yFan, conFCU.uFan) annotation (Line(points={{62,118},{80,118}, - {80,74},{12,74},{12,86},{18,86}}, color={255,0,255})); - connect(conFCU1.yFan, conFCU1.uFan) annotation (Line(points={{62,50},{80,50}, - {80,8},{12,8},{12,18},{18,18}}, color={255,0,255})); - connect(conFCU2.yFan, conFCU2.uFan) annotation (Line(points={{62,-12},{80,-12}, - {80,-52},{14,-52},{14,-44},{18,-44}}, color={255,0,255})); - connect(conFCU3.yFan, conFCU3.uFan) annotation (Line(points={{62,-74},{72,-74}, - {72,-120},{14,-120},{14,-106},{18,-106}}, color={255,0,255})); + connect(conFCU.yFan, conFCU.uFan) annotation (Line(points={{62,126},{70,126}, + {70,74},{12,74},{12,90},{18,90}}, color={255,0,255})); + connect(conFCU1.yFan, conFCU1.uFan) annotation (Line(points={{62,50},{72,50}, + {72,-8},{12,-8},{12,14},{18,14}}, + color={255,0,255})); + connect(conFCU2.yFan, conFCU2.uFan) annotation (Line(points={{62,-28},{72,-28}, + {72,-86},{12,-86},{12,-64},{18,-64}}, color={255,0,255})); + connect(conFCU3.yFan, conFCU3.uFan) annotation (Line(points={{62,-104},{72, + -104},{72,-160},{10,-160},{10,-140},{18,-140}}, + color={255,0,255})); + connect(conFCU.yHeaCoi, conFCU.uHeaCoi) annotation (Line(points={{62,110},{68, + 110},{68,72},{14,72},{14,82},{18,82}}, color={0,0,127})); + connect(conFCU.yCooCoi, conFCU.uCooCoi) annotation (Line(points={{62,106},{66, + 106},{66,70},{16,70},{16,78},{18,78}}, color={0,0,127})); + connect(conFCU1.yHeaCoi, conFCU1.uHeaCoi) annotation (Line(points={{62,34},{ + 70,34},{70,-6},{14,-6},{14,6},{18,6}}, color={0,0,127})); + connect(conFCU1.yCooCoi, conFCU1.uCooCoi) annotation (Line(points={{62,30},{ + 68,30},{68,-4},{16,-4},{16,2},{18,2}}, color={0,0,127})); + connect(conFCU2.yHeaCoi, conFCU2.uHeaCoi) annotation (Line(points={{62,-44},{ + 70,-44},{70,-84},{14,-84},{14,-72},{18,-72}}, color={0,0,127})); + connect(conFCU2.yCooCoi, conFCU2.uCooCoi) annotation (Line(points={{62,-48},{ + 68,-48},{68,-82},{16,-82},{16,-76},{18,-76}}, color={0,0,127})); + connect(conFCU3.yHeaCoi, conFCU3.uHeaCoi) annotation (Line(points={{62,-120}, + {70,-120},{70,-158},{12,-158},{12,-148},{18,-148}}, color={0,0,127})); + connect(conFCU3.yCooCoi, conFCU3.uCooCoi) annotation (Line(points={{62,-124}, + {68,-124},{68,-156},{14,-156},{14,-152},{18,-152}}, color={0,0,127})); annotation (experiment(StopTime=86400, Interval=300, Tolerance=1e-06), __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mos" "Simulate and plot"), From 188e5b72d184538aa7bc7d48cd619ae920898ac0 Mon Sep 17 00:00:00 2001 From: Devaprasad Date: Fri, 6 May 2022 19:19:21 -0700 Subject: [PATCH 20/83] Updated controller with plant request module --- .../OBC/ASHRAE/FanCoilUnit/Controller.mo | 204 ++++++++-- .../FanCoilUnit/Subsequences/PlantRequests.mo | 375 ++++++++++++------ .../Subsequences/Validation/PlantRequests.mo | 97 +++-- .../FanCoilUnit/Validation/Controller.mo | 13 +- .../Subsequences/Validation/PlantRequests.mos | 13 + .../FanCoilUnit/Validation/Controller.mos | 90 +++-- 6 files changed, 572 insertions(+), 220 deletions(-) create mode 100644 Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/PlantRequests.mos diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Controller.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Controller.mo index b73b77bc292..1334a211555 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Controller.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Controller.mo @@ -42,10 +42,14 @@ block Controller "Cooling setpoint during off" annotation (Dialog(group="Zone setpoints")); - parameter Real heaDea=0.05 + parameter Real heaDea( + final unit="1", + displayUnit="1")=0.05 "Heating loop signal limit at which deadband mode transitions to heating mode"; - parameter Real cooDea=0.05 + parameter Real cooDea( + final unit="1", + displayUnit="1")=0.05 "Cooling loop signal limit at which deadband mode transitions to cooling mode"; parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerTypeCoo= @@ -327,16 +331,108 @@ block Controller "Heating setpoint decrease value (degC) when heating demand limit level 3 is imposed" annotation (Dialog(tab="Adjust temperature setpoint", group="Demand control adjustment")); + parameter Real chiWatPlaReqLim0( + final unit = "1", + displayUnit="1")=0.1 + "Valve position limit below which zero chilled water plant requests are sent when one request was previously being sent" + annotation(Dialog(tab="Request limits", group="Chilled water requests", enable=have_coolingCoil)); + + parameter Real chiWatResReqLim0( + final unit = "1", + displayUnit="1")=0.85 + "Valve position limit below which zero chilled water reset requests are sent when one request was previously being sent" + annotation(Dialog(tab="Request limits", group="Chilled water requests", enable=have_coolingCoil)); + + parameter Real chiWatPlaReqLim1( + final unit = "1", + displayUnit="1")=0.95 + "Valve position limit above which one chilled water plant request is sent" + annotation(Dialog(tab="Request limits", group="Chilled water requests", enable=have_coolingCoil)); + + parameter Real chiWatResReqLim2( + final unit="K", + displayUnit="K", + final quantity="TemperatureDifference")=2.78 + "Temperature difference limit between setpoint and supply air temperature above which two chilled water reset requests are sent" + annotation(Dialog(tab="Request limits", group="Chilled water requests", enable=have_coolingCoil)); + + parameter Real chiWatResReqTimLim2( + final unit="s", + displayUnit="s", + final quantity="Time")=300 + "Time period for which chiWatResReqLim2 has to be exceeded before two chilled water reset requests are sent" + annotation(Dialog(tab="Request limits", group="Chilled water requests", enable=have_coolingCoil)); + + parameter Real chiWatResReqLim3( + final unit="K", + displayUnit="K", + final quantity="TemperatureDifference")=5.56 + "Temperature difference limit between setpoint and supply air temperature above which three chilled water reset requests are sent" + annotation(Dialog(tab="Request limits", group="Chilled water requests", enable=have_coolingCoil)); + + parameter Real chiWatResReqTimLim3( + final unit="s", + displayUnit="s", + final quantity="Time")=300 + "Time period for which chiWatResReqLim3 has to be exceeded before three chilled water reset requests are sent" + annotation(Dialog(tab="Request limits", group="Chilled water requests", enable=have_coolingCoil)); + + parameter Real hotWatPlaReqLim0( + final unit = "1", + displayUnit="1")=0.1 + "Valve position limit below which zero hot water plant requests are sent when one request was previously being sent" + annotation(Dialog(tab="Request limits", group="Hot water requests", enable=have_heatingCoil)); + + parameter Real hotWatResReqLim0( + final unit = "1", + displayUnit="1")=0.85 + "Valve position limit below which zero hot water reset requests are sent when one request was previously being sent" + annotation(Dialog(tab="Request limits", group="Hot water requests", enable=have_heatingCoil)); + + parameter Real hotWatPlaReqLim1( + final unit = "1", + displayUnit="1")=0.95 + "Valve position limit above which one hot water plant request is sent" + annotation(Dialog(tab="Request limits", group="Hot water requests", enable=have_heatingCoil)); + + parameter Real hotWatResReqLim2( + final unit="K", + displayUnit="K", + final quantity="TemperatureDifference")=8 + "Temperature difference limit between setpoint and supply air temperature above which two hot water reset requests are sent" + annotation(Dialog(tab="Request limits", group="Hot water requests", enable=have_heatingCoil)); + + parameter Real hotWatResReqTimLim2( + final unit="s", + displayUnit="s", + final quantity="Time")=300 + "Time period for which hotWatResReqLim2 has to be exceeded before two hot water reset requests are sent" + annotation(Dialog(tab="Request limits", group="Hot water requests", enable=have_heatingCoil)); + + parameter Real hotWatResReqLim3( + final unit="K", + displayUnit="K", + final quantity="TemperatureDifference")=17 + "Temperature difference limit between setpoint and supply air temperature above which three hot water reset requests are sent" + annotation(Dialog(tab="Request limits", group="Hot water requests", enable=have_heatingCoil)); + + parameter Real hotWatResReqTimLim3( + final unit="s", + displayUnit="s", + final quantity="Time")=300 + "Time period for which hotWatResReqLim3 has to be exceeded before three hot water reset requests are sent" + annotation(Dialog(tab="Request limits", group="Hot water requests", enable=have_heatingCoil)); + parameter Real uLow( final unit="1", displayUnit="1")=-0.1 - "Low limit of the hysteresis for checking temperature difference" + "Lower limit of the hysteresis for checking temperature difference" annotation (Dialog(tab="Advanced")); parameter Real uHigh( final unit="1", displayUnit="1")=0.1 - "High limit of the hysteresis for checking temperature difference" + "Higher limit of the hysteresis for checking temperature difference" annotation (Dialog(tab="Advanced")); parameter Real deaHysLim( @@ -345,6 +441,31 @@ block Controller "Hysteresis limits for cooling and heating loop signals for deadband mode transitions" annotation (Dialog(tab="Advanced")); + parameter Real preWarCooTim( + final unit="s", + displayUnit="s", + final quantity="Time")=10800 + "Maximum cool-down or warm-up time" + annotation(Dialog(tab="Advanced", group="Operation mode")); + + parameter Real Thys( + final unit="1", + displayUnit="1")=0.1 + "Hysteresis for checking temperature difference" + annotation(Dialog(tab="Advanced")); + + parameter Real posHys( + final unit="1", + displayUnit="1")=0.05 + "Hysteresis for checking valve position difference" + annotation(Dialog(tab="Advanced")); + + parameter Real dFanSpe( + final unit="1", + displayUnit="1")=0.05 + "Fan speed hysteresis difference" + annotation(Dialog(tab="Advanced")); + Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uOcc "Current occupancy period, true if it is in occupant period" annotation (Placement(transformation(extent={{-240,50},{-200,90}}), @@ -541,8 +662,10 @@ block Controller final decTSetDem_1=decTSetDem_1, final decTSetDem_2=decTSetDem_2, final decTSetDem_3=decTSetDem_3, + bouLim=Thys, final uLow=uLow, - final uHigh=uHigh) + final uHigh=uHigh, + preWarCooTim=preWarCooTim) "Zone setpoint and operation mode" annotation (Placement(transformation(extent={{-140,150},{-120,170}}))); @@ -569,8 +692,28 @@ protected "Constant zero signal source if cooling coil is absent" annotation (Placement(transformation(extent={{40,-60},{60,-40}}))); - Buildings.Controls.OBC.ASHRAE.G36.AHUs.SingleZone.VAV.SetPoints.PlantRequests sinAHUPlaReq( - final have_hotWatCoi=have_heatingCoil) + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.PlantRequests fcuPlaReq( + final have_hotWatCoi=have_heatingCoil, + have_chiWatCoi=have_coolingCoil, + cooSpeMax=cooSpeMax, + heaSpeMax=heaSpeMax, + chiWatPlaReqLim0=chiWatPlaReqLim0, + chiWatResReqLim0=chiWatResReqLim0, + chiWatPlaReqLim1=chiWatPlaReqLim1, + chiWatResReqLim2=chiWatResReqLim2, + chiWatResReqTimLim2=chiWatResReqTimLim2, + chiWatResReqLim3=chiWatResReqLim3, + chiWatResReqTimLim3=chiWatResReqTimLim3, + hotWatPlaReqLim0=hotWatPlaReqLim0, + hotWatResReqLim0=hotWatResReqLim0, + hotWatPlaReqLim1=hotWatPlaReqLim1, + hotWatResReqLim2=hotWatResReqLim2, + hotWatResReqTimLim2=hotWatResReqTimLim2, + hotWatResReqLim3=hotWatResReqLim3, + hotWatResReqTimLim3=hotWatResReqTimLim3, + Thys=Thys, + posHys=posHys, + dFanSpe=dFanSpe) "Block for generating chilled water requests and hot water requests for their respective plants" annotation (Placement(transformation(extent={{100,-100},{120,-80}}))); @@ -636,6 +779,10 @@ protected "Fan speed controller" annotation (Placement(transformation(extent={{120,170},{140,190}}))); + CDL.Continuous.Sources.Constant con1(final k=0) if + not have_heatingCoil + "Constant zero signal source if heating coil is absent" + annotation (Placement(transformation(extent={{40,-130},{60,-110}}))); equation connect(unOccMod.y, isUnOcc.u2) annotation (Line(points={{-138,-170},{-120,-170}, {-120,-178},{-102,-178}}, color={255,127,0})); @@ -753,26 +900,29 @@ equation {-184,158},{-142,158}}, color={0,0,127})); connect(heaSetAdj, modSetPoi.heaSetAdj) annotation (Line(points={{-220,100},{-152, 100},{-152,156},{-142,156}}, color={0,0,127})); - connect(TSupAir.TAirSupSet, sinAHUPlaReq.TSupCoo) annotation (Line(points={{122, - 10},{130,10},{130,-60},{90,-60},{90,-85},{98,-85}}, color={0,0,127})); - connect(TSupAir.TAirSupSet, sinAHUPlaReq.TSupHeaEco) annotation (Line(points={ - {122,10},{130,10},{130,-60},{90,-60},{90,-95},{98,-95}}, color={0,0,127})); - connect(TSup, sinAHUPlaReq.TAirSup) annotation (Line(points={{-220,-20},{-60,-20}, - {-60,-81},{98,-81}}, color={0,0,127})); - connect(uCooCoi, sinAHUPlaReq.uCooCoi_actual) annotation (Line(points={{-220,-240}, - {80,-240},{80,-90},{98,-90}}, color={0,0,127})); - connect(uHeaCoi, sinAHUPlaReq.uHeaCoi_actual) annotation (Line(points={{-220,-200}, - {90,-200},{90,-99},{98,-99}}, color={0,0,127})); - connect(con.y, sinAHUPlaReq.uCooCoi_actual) annotation (Line(points={{62,-50}, - {80,-50},{80,-90},{98,-90}}, color={0,0,127})); - connect(sinAHUPlaReq.yChiWatResReq, yChiWatResReq) annotation (Line(points={{122, - -82},{160,-82},{160,-100},{220,-100}}, color={255,127,0})); - connect(sinAHUPlaReq.yChiPlaReq, yChiPlaReq) annotation (Line(points={{122,-87}, - {156,-87},{156,-140},{220,-140}}, color={255,127,0})); - connect(sinAHUPlaReq.yHotWatResReq, yHotWatResReq) annotation (Line(points={{122, - -93},{150,-93},{150,-180},{220,-180}}, color={255,127,0})); - connect(sinAHUPlaReq.yHotWatPlaReq, yHotWatPlaReq) annotation (Line(points={{122, - -98},{144,-98},{144,-220},{220,-220}}, color={255,127,0})); + connect(TSup, fcuPlaReq.TAirSup) annotation (Line(points={{-220,-20},{-60,-20}, + {-60,-86},{98,-86}}, color={0,0,127})); + connect(uCooCoi, fcuPlaReq.uCooCoi_actual) annotation (Line(points={{-220,-240}, + {80,-240},{80,-93.8},{98,-93.8}}, color={0,0,127})); + connect(uHeaCoi, fcuPlaReq.uHeaCoi_actual) annotation (Line(points={{-220,-200}, + {90,-200},{90,-98},{98,-98}}, color={0,0,127})); + connect(con.y, fcuPlaReq.uCooCoi_actual) annotation (Line(points={{62,-50},{80, + -50},{80,-93.8},{98,-93.8}}, color={0,0,127})); + connect(fcuPlaReq.yChiWatResReq, yChiWatResReq) annotation (Line(points={{122,-84}, + {160,-84},{160,-100},{220,-100}}, color={255,127,0})); + connect(fcuPlaReq.yChiPlaReq, yChiPlaReq) annotation (Line(points={{122,-88},{ + 156,-88},{156,-140},{220,-140}}, color={255,127,0})); + connect(fcuPlaReq.yHotWatResReq, yHotWatResReq) annotation (Line(points={{122,-92}, + {150,-92},{150,-180},{220,-180}}, color={255,127,0})); + connect(fcuPlaReq.yHotWatPlaReq, yHotWatPlaReq) annotation (Line(points={{122,-96}, + {144,-96},{144,-220},{220,-220}}, color={255,127,0})); + connect(TSupAir.TAirSupSet, fcuPlaReq.TSupSet) annotation (Line(points={{122,10}, + {130,10},{130,-70},{94,-70},{94,-90},{98,-90}}, color={0,0,127})); + connect(fanSpe.yFanSpe, fcuPlaReq.uFanSpe) annotation (Line(points={{142,178}, + {150,178},{150,-60},{90,-60},{90,-82},{98,-82}}, color={0,0, + 127})); + connect(con1.y, fcuPlaReq.uHeaCoi_actual) annotation (Line(points={{62,-120},{ + 90,-120},{90,-98},{98,-98}}, color={0,0,127})); annotation (defaultComponentName="conFCU", Icon(coordinateSystem(preserveAspectRatio=false, extent={{-200,-300},{200,300}}), graphics={Rectangle( diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/PlantRequests.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/PlantRequests.mo index a74aabff937..bd203bc8aaf 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/PlantRequests.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/PlantRequests.mo @@ -2,22 +2,126 @@ within Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences; block PlantRequests "Output plant requests for fan coil unit" parameter Boolean have_hotWatCoi = true - "True: the AHU has hot water heating coil"; - parameter Real Thys = 0.1 - "Hysteresis for checking temperature difference" - annotation(Dialog(tab="Advanced")); - parameter Real posHys = 0.05 - "Hysteresis for checking valve position difference" - annotation(Dialog(tab="Advanced")); + "True: the fan coil unit has hot water heating coil"; - parameter Real cooSpeMax = 1 + parameter Boolean have_chiWatCoi = true + "True: the fan coil unit has chilled water cooling coil"; + + parameter Real cooSpeMax( + final unit="1", + displayUnit="1") = 1 "Maximum cooling mode fan speed"; - parameter Real heaSpeMax = 0.6 + parameter Real heaSpeMax( + final unit="1", + displayUnit="1") = 0.6 "Maximum heating mode fan speed"; - parameter Real dFanSpe = 0.05 - "Fan speed hysteresis difference"; + parameter Real chiWatPlaReqLim0( + final unit="1", + displayUnit="1") = 0.1 + "Valve position limit below which zero chilled water plant requests are sent when one request was previously being sent" + annotation(Dialog(tab="Request limits", group="Chilled water requests", enable=have_chiWatCoi)); + + parameter Real chiWatResReqLim0( + final unit="1", + displayUnit="1") = 0.85 + "Valve position limit below which zero chilled water reset requests are sent when one request was previously being sent" + annotation(Dialog(tab="Request limits", group="Chilled water requests", enable=have_chiWatCoi)); + + parameter Real chiWatPlaReqLim1( + final unit="1", + displayUnit="1") = 0.95 + "Valve position limit above which one chilled water plant request is sent" + annotation(Dialog(tab="Request limits", group="Chilled water requests", enable=have_chiWatCoi)); + + parameter Real chiWatResReqLim2( + final unit="K", + final quantity="TemperatureDifference") = 2.78 + "Temperature difference limit between setpoint and supply air temperature above which two chilled water reset requests are sent" + annotation(Dialog(tab="Request limits", group="Chilled water requests", enable=have_chiWatCoi)); + + parameter Real chiWatResReqTimLim2( + final unit="s", + displayUnit="s", + final quantity="Time") = 300 + "Time period for which chiWatResReqLim2 has to be exceeded before two chilled water reset requests are sent" + annotation(Dialog(tab="Request limits", group="Chilled water requests", enable=have_chiWatCoi)); + + parameter Real chiWatResReqLim3( + final unit="K", + final quantity="TemperatureDifference") = 5.56 + "Temperature difference limit between setpoint and supply air temperature above which three chilled water reset requests are sent" + annotation(Dialog(tab="Request limits", group="Chilled water requests", enable=have_chiWatCoi)); + + parameter Real chiWatResReqTimLim3( + final unit="s", + displayUnit="s", + final quantity="Time") = 300 + "Time period for which chiWatResReqLim3 has to be exceeded before three chilled water reset requests are sent" + annotation(Dialog(tab="Request limits", group="Chilled water requests", enable=have_chiWatCoi)); + + parameter Real hotWatPlaReqLim0( + final unit="1", + displayUnit="1") = 0.1 + "Valve position limit below which zero hot water plant requests are sent when one request was previously being sent" + annotation(Dialog(tab="Request limits", group="Hot water requests", enable=have_hotWatCoi)); + + parameter Real hotWatResReqLim0( + final unit="1", + displayUnit="1") = 0.85 + "Valve position limit below which zero hot water reset requests are sent when one request was previously being sent" + annotation(Dialog(tab="Request limits", group="Hot water requests", enable=have_hotWatCoi)); + + parameter Real hotWatPlaReqLim1( + final unit="1", + displayUnit="1") = 0.95 + "Valve position limit above which one hot water plant request is sent" + annotation(Dialog(tab="Request limits", group="Hot water requests", enable=have_hotWatCoi)); + + parameter Real hotWatResReqLim2( + final unit="K", + final quantity="TemperatureDifference") = 8 + "Temperature difference limit between setpoint and supply air temperature above which two hot water reset requests are sent" + annotation(Dialog(tab="Request limits", group="Hot water requests", enable=have_hotWatCoi)); + + parameter Real hotWatResReqTimLim2( + final unit="s", + displayUnit="s", + final quantity="Time") = 300 + "Time period for which hotWatResReqLim2 has to be exceeded before two hot water reset requests are sent" + annotation(Dialog(tab="Request limits", group="Hot water requests", enable=have_hotWatCoi)); + + parameter Real hotWatResReqLim3( + final unit="K", + final quantity="TemperatureDifference") = 17 + "Temperature difference limit between setpoint and supply air temperature above which three hot water reset requests are sent" + annotation(Dialog(tab="Request limits", group="Hot water requests", enable=have_hotWatCoi)); + + parameter Real hotWatResReqTimLim3( + final unit="s", + displayUnit="s", + final quantity="Time") = 300 + "Time period for which hotWatResReqLim3 has to be exceeded before three hot water reset requests are sent" + annotation(Dialog(tab="Request limits", group="Hot water requests", enable=have_hotWatCoi)); + + parameter Real Thys( + final unit="K", + final quantity = "TemperatureDifference") = 0.1 + "Hysteresis for checking temperature difference" + annotation(Dialog(tab="Advanced")); + + parameter Real posHys( + final unit="1", + displayUnit="1") = 0.05 + "Hysteresis for checking valve position difference" + annotation(Dialog(tab="Advanced")); + + parameter Real dFanSpe( + final unit="1", + displayUnit="1") = 0.05 + "Fan speed hysteresis difference" + annotation(Dialog(tab="Advanced")); Buildings.Controls.OBC.CDL.Interfaces.RealInput TAirSup( final unit="K", @@ -25,122 +129,128 @@ block PlantRequests "Output plant requests for fan coil unit" final quantity="ThermodynamicTemperature") "Measured supply air temperature" annotation (Placement(transformation(extent={{-240,180},{-200,220}}), - iconTransformation(extent={{-140,40},{-100,80}}))); - Buildings.Controls.OBC.CDL.Interfaces.RealInput TSupCoo( + iconTransformation(extent={{-140,20},{-100,60}}))); + Buildings.Controls.OBC.CDL.Interfaces.RealInput TSupSet( final unit="K", final displayUnit="degC", final quantity="ThermodynamicTemperature") "Cooling supply air temperature setpoint" annotation (Placement(transformation(extent={{-240,140},{-200,180}}), - iconTransformation(extent={{-140,0},{-100,40}}))); + iconTransformation(extent={{-140,-20},{-100,20}}))); Buildings.Controls.OBC.CDL.Interfaces.RealInput uCooCoi_actual( final unit="1", final min=0, - final max=1) - "Cooling coil valve actual position" + final max=1) if have_chiWatCoi + "Actual cooling coil control action" annotation (Placement(transformation(extent={{-240,80},{-200,120}}), - iconTransformation(extent={{-140,-40},{-100,0}}))); - Buildings.Controls.OBC.CDL.Interfaces.RealInput TSupHeaEco( - final unit="K", - final displayUnit="degC", - final quantity="ThermodynamicTemperature") if have_hotWatCoi - "Heating supply air temperature setpoint" - annotation (Placement(transformation(extent={{-240,-60},{-200,-20}}), - iconTransformation(extent={{-140,-80},{-100,-40}}))); + iconTransformation(extent={{-140,-58},{-100,-18}}))); Buildings.Controls.OBC.CDL.Interfaces.RealInput uHeaCoi_actual( final unit="1", final min=0, final max=1) if have_hotWatCoi - "Heating coil valve actual position" + "Actual heating coil control action" annotation (Placement(transformation(extent={{-240,-160},{-200,-120}}), - iconTransformation(extent={{-140,-120},{-100,-80}}))); - Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yChiWatResReq + iconTransformation(extent={{-140,-100},{-100,-60}}))); + + CDL.Interfaces.RealInput uFanSpe( + final unit="1", + final min=0, + final max=1) + "Fan speed signal" + annotation (Placement(transformation(extent={{-240,220},{-200,260}}), + iconTransformation(extent={{-140,60},{-100,100}}))); + + Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yChiWatResReq if + have_chiWatCoi "Chilled water reset request" annotation (Placement(transformation(extent={{200,180},{240,220}}), - iconTransformation(extent={{100,60},{140,100}}))); - Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yChiPlaReq + iconTransformation(extent={{100,40},{140,80}}))); + Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yChiPlaReq if + have_chiWatCoi "Chiller plant request" annotation (Placement(transformation(extent={{200,0},{240,40}}), - iconTransformation(extent={{100,10},{140,50}}))); + iconTransformation(extent={{100,0},{140,40}}))); Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yHotWatResReq if have_hotWatCoi "Hot water reset request" annotation (Placement(transformation(extent={{200,-60},{240,-20}}), - iconTransformation(extent={{100,-50},{140,-10}}))); + iconTransformation(extent={{100,-40},{140,0}}))); Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yHotWatPlaReq if have_hotWatCoi "Hot water plant request" annotation (Placement(transformation(extent={{200,-240},{240,-200}}), - iconTransformation(extent={{100,-100},{140,-60}}))); + iconTransformation(extent={{100,-80},{140,-40}}))); - CDL.Interfaces.RealInput uFanSpe "Fan speed signal" annotation (Placement( - transformation(extent={{-240,220},{-200,260}}), iconTransformation( - extent={{-140,80},{-100,120}}))); +protected CDL.Continuous.Hysteresis hysFanCoo(uLow=cooSpeMax - 2*dFanSpe, uHigh= - cooSpeMax - dFanSpe) "Check if fan is at max cooling mode speed" + cooSpeMax - dFanSpe) if have_chiWatCoi + "Check if fan is at max cooling mode speed" annotation (Placement(transformation(extent={{-130,230},{-110,250}}))); - CDL.Conversions.BooleanToInteger booToIntCoo + CDL.Conversions.BooleanToInteger booToIntCoo if have_chiWatCoi "Output integer 1 when fan is at max cooling mode speed" annotation (Placement(transformation(extent={{-80,230},{-60,250}}))); - CDL.Integers.Multiply mulIntCoo + CDL.Integers.Multiply mulIntCoo if have_chiWatCoi "Output reset requests only if fan is at max cooling mode speed" annotation (Placement(transformation(extent={{100,230},{120,250}}))); - CDL.Continuous.Hysteresis hysFanHea(uLow=cooSpeMax - 2*dFanSpe, uHigh= - cooSpeMax - dFanSpe) "Check if fan is at max heating mode speed" + CDL.Continuous.Hysteresis hysFanHea(uLow=heaSpeMax - 2*dFanSpe, uHigh= + heaSpeMax - dFanSpe) if have_hotWatCoi + "Check if fan is at max heating mode speed" annotation (Placement(transformation(extent={{-140,-20},{-120,0}}))); - CDL.Conversions.BooleanToInteger booToIntHea + CDL.Conversions.BooleanToInteger booToIntHea if have_hotWatCoi "Output integer 1 when fan is at max heating mode speed" annotation (Placement(transformation(extent={{-90,-20},{-70,0}}))); - CDL.Integers.Multiply mulIntHea + CDL.Integers.Multiply mulIntHea if have_hotWatCoi "Output reset requests only if fan is at max heating mode speed" annotation (Placement(transformation(extent={{110,-10},{130,10}}))); -protected + Buildings.Controls.OBC.CDL.Continuous.Subtract cooSupTemDif "Find the cooling supply temperature difference to the setpoint" annotation (Placement(transformation(extent={{-140,190},{-120,210}}))); - Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr( - final t=3, - final h=Thys) + Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr(final t= + chiWatResReqLim3, + final h=Thys) if have_chiWatCoi "Check if the supply temperature is greater than the setpoint by a threshold value" annotation (Placement(transformation(extent={{-80,190},{-60,210}}))); - Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr1( - final t=2, - final h=Thys) + Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr1(final t= + chiWatResReqLim2, + final h=Thys) if have_chiWatCoi "Check if the supply temperature is greater than the setpoint by a threshold value" annotation (Placement(transformation(extent={{-80,140},{-60,160}}))); - Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel( - final delayTime=120) + Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel(final delayTime= + chiWatResReqTimLim3) if + have_chiWatCoi "Check if the input has been true for a certain time" annotation (Placement(transformation(extent={{-40,190},{-20,210}}))); - Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel1( - final delayTime=120) + Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel1(final delayTime= + chiWatResReqTimLim2) if + have_chiWatCoi "Check if the input has been true for a certain time" annotation (Placement(transformation(extent={{-40,140},{-20,160}}))); - Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr2( - final t=0.95, - final h=posHys) + Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr2(final t= + chiWatPlaReqLim1, + final h=posHys) if have_chiWatCoi "Check if the chilled water valve position is greater than a threshold value" annotation (Placement(transformation(extent={{-120,90},{-100,110}}))); Buildings.Controls.OBC.CDL.Integers.Sources.Constant thr( final k=3) "Constant 3" annotation (Placement(transformation(extent={{0,222},{20,242}}))); - Buildings.Controls.OBC.CDL.Integers.Switch chiWatRes3 + Buildings.Controls.OBC.CDL.Integers.Switch chiWatRes3 if have_chiWatCoi "Send 3 chilled water reset request" annotation (Placement(transformation(extent={{160,190},{180,210}}))); - Buildings.Controls.OBC.CDL.Integers.Switch chiWatRes2 + Buildings.Controls.OBC.CDL.Integers.Switch chiWatRes2 if have_chiWatCoi "Send 2 chilled water reset request" annotation (Placement(transformation(extent={{120,140},{140,160}}))); Buildings.Controls.OBC.CDL.Integers.Sources.Constant two( final k=2) "Constant 2" annotation (Placement(transformation(extent={{0,170},{20,190}}))); - Buildings.Controls.OBC.CDL.Continuous.LessThreshold lesThr( - final t=0.85, - final h=posHys) + Buildings.Controls.OBC.CDL.Continuous.LessThreshold lesThr(final t= + chiWatResReqLim0, + final h=posHys) if have_chiWatCoi "Check if the chilled water valve position is less than a threshold value" annotation (Placement(transformation(extent={{-120,50},{-100,70}}))); - Buildings.Controls.OBC.CDL.Logical.Latch lat + Buildings.Controls.OBC.CDL.Logical.Latch lat if have_chiWatCoi "Keep true signal until other condition becomes true" annotation (Placement(transformation(extent={{-40,90},{-20,110}}))); - Buildings.Controls.OBC.CDL.Integers.Switch chiWatRes1 + Buildings.Controls.OBC.CDL.Integers.Switch chiWatRes1 if have_chiWatCoi "Send 1 chilled water reset request" annotation (Placement(transformation(extent={{80,90},{100,110}}))); Buildings.Controls.OBC.CDL.Integers.Sources.Constant one( @@ -149,38 +259,40 @@ protected Buildings.Controls.OBC.CDL.Integers.Sources.Constant zer( final k=0) "Constant 0" annotation (Placement(transformation(extent={{0,50},{20,70}}))); - Buildings.Controls.OBC.CDL.Logical.Latch lat1 + Buildings.Controls.OBC.CDL.Logical.Latch lat1 if have_chiWatCoi "Keep true signal until other condition becomes true" annotation (Placement(transformation(extent={{-40,10},{-20,30}}))); - Buildings.Controls.OBC.CDL.Continuous.LessThreshold lesThr1( - final t=0.1, - final h=posHys) + Buildings.Controls.OBC.CDL.Continuous.LessThreshold lesThr1(final t= + chiWatPlaReqLim0, + final h=posHys) if have_chiWatCoi "Check if the chilled water valve position is less than a threshold value" annotation (Placement(transformation(extent={{-120,4},{-100,24}}))); - Buildings.Controls.OBC.CDL.Integers.Switch intSwi3 + Buildings.Controls.OBC.CDL.Integers.Switch intSwi3 if have_chiWatCoi "Send 1 chiller plant request" annotation (Placement(transformation(extent={{80,10},{100,30}}))); Buildings.Controls.OBC.CDL.Continuous.Subtract heaSupTemDif if have_hotWatCoi "Find the heating supply temperature difference to the setpoint" annotation (Placement(transformation(extent={{-140,-50},{-120,-30}}))); - Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr3( - final t=17, + Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr3(final t= + hotWatResReqLim3, final h=Thys) if have_hotWatCoi "Check if the supply temperature is less than the setpoint by a threshold value" annotation (Placement(transformation(extent={{-80,-50},{-60,-30}}))); - Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr4( - final t=8, + Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr4(final t= + hotWatResReqLim2, final h=Thys) if have_hotWatCoi "Check if the supply temperature is less than the setpoint by a threshold value" annotation (Placement(transformation(extent={{-80,-100},{-60,-80}}))); - Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel2( - final delayTime=300) if have_hotWatCoi + Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel2(final delayTime= + hotWatResReqTimLim3) if + have_hotWatCoi "Check if the input has been true for a certain time" annotation (Placement(transformation(extent={{-40,-50},{-20,-30}}))); - Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel3( - final delayTime=300) if have_hotWatCoi + Buildings.Controls.OBC.CDL.Logical.TrueDelay truDel3(final delayTime= + hotWatResReqTimLim2) if + have_hotWatCoi "Check if the input has been true for a certain time" annotation (Placement(transformation(extent={{-40,-100},{-20,-80}}))); Buildings.Controls.OBC.CDL.Integers.Switch hotWatRes3 if have_hotWatCoi @@ -189,14 +301,14 @@ protected Buildings.Controls.OBC.CDL.Integers.Switch hotWatRes2 if have_hotWatCoi "Send 2 hot water reset request" annotation (Placement(transformation(extent={{120,-100},{140,-80}}))); - Buildings.Controls.OBC.CDL.Continuous.LessThreshold lesThr2( - final t=0.85, + Buildings.Controls.OBC.CDL.Continuous.LessThreshold lesThr2(final t= + hotWatResReqLim0, final h=posHys) if have_hotWatCoi "Check if the hot water valve position is less than a threshold value" annotation (Placement(transformation(extent={{-120,-190},{-100,-170}}))); - Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr5( - final t=0.95, + Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr5(final t= + hotWatPlaReqLim1, final h=posHys) if have_hotWatCoi "Check if the hot water valve position is greater than a threshold value" @@ -207,8 +319,8 @@ protected Buildings.Controls.OBC.CDL.Integers.Switch hotWatRes1 if have_hotWatCoi "Send 1 hot water reset request" annotation (Placement(transformation(extent={{80,-150},{100,-130}}))); - Buildings.Controls.OBC.CDL.Continuous.LessThreshold lesThr3( - final t=0.1, + Buildings.Controls.OBC.CDL.Continuous.LessThreshold lesThr3(final t= + hotWatPlaReqLim0, final h=posHys) if have_hotWatCoi "Check if the hot water valve position is less than a threshold value" @@ -223,7 +335,7 @@ protected equation connect(TAirSup, cooSupTemDif.u1) annotation (Line(points={{-220,200},{-180,200}, {-180,206},{-142,206}}, color={0,0,127})); - connect(TSupCoo, cooSupTemDif.u2) annotation (Line(points={{-220,160},{-190,160}, + connect(TSupSet, cooSupTemDif.u2) annotation (Line(points={{-220,160},{-190,160}, {-190,194},{-142,194}}, color={0,0,127})); connect(cooSupTemDif.y, greThr.u) annotation (Line(points={{-118,200},{-82,200}}, color={0,0,127})); @@ -325,8 +437,6 @@ equation annotation (Line(points={{102,-220},{220,-220}}, color={255,127,0})); connect(yChiWatResReq, yChiWatResReq) annotation (Line(points={{220,200},{220,200}}, color={255,127,0})); - connect(TSupHeaEco, heaSupTemDif.u1) - annotation (Line(points={{-220,-40},{-160,-40},{-160,-34},{-142,-34}}, color={0,0,127})); connect(uFanSpe, hysFanCoo.u) annotation (Line(points={{-220,240},{-132,240}}, color={0,0,127})); @@ -348,17 +458,19 @@ equation -170,-10},{-142,-10}}, color={0,0,127})); connect(mulIntHea.y, yHotWatResReq) annotation (Line(points={{132,0},{192,0},{ 192,-40},{220,-40}}, color={255,127,0})); + connect(TSupSet, heaSupTemDif.u1) annotation (Line(points={{-220,160},{-190,160}, + {-190,-34},{-142,-34}}, color={0,0,127})); annotation ( - defaultComponentName="sinAHUPlaReq", - Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-120},{100,120}}), + defaultComponentName="fcuPlaReq", + Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}), graphics={ Rectangle( - extent={{-100,-120},{100,120}}, + extent={{-100,-100},{100,100}}, lineColor={0,0,127}, fillColor={255,255,255}, fillPattern=FillPattern.Solid), Text( - extent={{-98,68},{-76,52}}, + extent={{-98,48},{-76,32}}, lineColor={0,0,127}, pattern=LinePattern.Dash, textString="TSup"), @@ -367,134 +479,135 @@ annotation ( lineColor={0,0,255}, textString="%name"), Text( - extent={{-98,30},{-60,12}}, + extent={{-98,10},{-60,-8}}, lineColor={0,0,127}, pattern=LinePattern.Dash, - textString="TSupCoo"), + textString="TSupSet"), Text( - extent={{-100,-12},{-58,-26}}, + extent={{-98,-30},{-56,-44}}, lineColor={0,0,127}, pattern=LinePattern.Dash, textString="uCooCoi"), Text( - extent={{-100,-92},{-58,-106}}, + extent={{-98,-72},{-56,-86}}, lineColor={0,0,127}, pattern=LinePattern.Dash, visible=have_hotWatCoi, textString="uHeaCoi"), Text( - extent={{34,92},{98,70}}, + extent={{34,72},{98,50}}, lineColor={255,127,0}, pattern=LinePattern.Dash, textString="yChiWatResReq"), Text( - extent={{52,42},{98,20}}, + extent={{52,32},{98,10}}, lineColor={255,127,0}, pattern=LinePattern.Dash, textString="yChiPlaReq"), Text( - extent={{34,-18},{98,-40}}, + extent={{34,-8},{98,-30}}, lineColor={255,127,0}, pattern=LinePattern.Dash, textString="yHotWatResReq", visible=have_hotWatCoi), Text( - extent={{38,-66},{98,-88}}, + extent={{38,-48},{98,-70}}, lineColor={255,127,0}, pattern=LinePattern.Dash, textString="yHotWatPlaReq", visible=have_hotWatCoi), Text( - extent={{-96,-52},{-40,-70}}, - lineColor={0,0,127}, - pattern=LinePattern.Dash, - textString="TSupHeaEco", - visible=have_hotWatCoi), - Text( - extent={{-98,108},{-56,94}}, + extent={{-98,88},{-56,74}}, lineColor={0,0,127}, pattern=LinePattern.Dash, textString="uFanSpe")}), Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-200,-260},{200,260}})), Documentation(info="

-This sequence outputs the system reset requests for single zone air handling unit. The -implementation is according to the Section 5.18.15 of ASHRAE Guideline 36, May 2020. +This sequence outputs the system reset requests for fan coil unit. The +implementation is according to the Section 5.22.8 of ASHRAE Guideline 36, 2021.

-

chilled water reset request yChiWatResReq

+

If there is a chilled-water coil (have_chiWatCoi=true), chilled +water reset requests yChiWatResReq

  1. -If the supply air temperature TAirSup exceeds the cooling supply air temperature -set point TSupCoo by 3 °C (5 °F) for 2 minutes, send 3 requests. +If the supply air temperature TAirSup exceeds the supply air temperature +set point TSupSet by chiWatResReqLim3 for time period chiWatResReqTimLim3, +send 3 requests.
  2. -If the supply air temperature TAirSup exceeds the cooling supply air temperature -set point TSupCoo by 2 °C (3 °F) for 2 minutes, send 2 requests. +If the supply air temperature TAirSup exceeds TSupSet +by chiWatResReqLim2 for time period chiWatResReqTimLim2, +send 2 requests.
  3. Else if the chilled water valve position uCooCoi_actual is greater than -95%, send 1 request until the uCooCoi_actual is less than 85%. +chiWatPlaReqLim1, send 1 request until uCooCoi_actual +is less than chiWatResReqLim0.
  4. -Else if the chilled water valve position uCooCoi_actual is less than 95%, -send 0 request. +Else if the chilled water valve position uCooCoi_actual is less than +chiWatPlaReqLim1, send 0 requests.
-

Chiller plant request yChiPlaReq

+

If there is a chilled-water coil and chilled water plant, chiller plant request yChiPlaReq

Send the chiller plant that serves the system a chiller plant request as follows:

  1. If the chilled water valve position uCooCoi_actual is greater than -95%, send 1 request until the uCooCoi_actual is less than 10%. +chiWatPlaReqLim1, send 1 request until the uCooCoi_actual +is less than chiWatPlaReqLim0.
  2. -Else if the chilled water valve position uCooCoi_actual is less than 95%, -send 0 request. +Else if the chilled water valve position uCooCoi_actual is less than +chiWatPlaReqLim1, send 0 request.

If there is a hot-water coil (have_hotWatCoi=true), hot-water reset requests yHotWatResReq

  1. -If the supply air temperature TAirSup is 17 °C (30 °F) less than -the heating supply air temperature set point TSupHeaEco for 5 minutes, send 3 -requests. +If the supply air temperature TAirSup is hotWatResReqLim3 less than +the supply air temperature set point TSupSet for time period hotWatResReqTimLim3, +send 3 requests.
  2. -Else if the supply air temperature TAirSup is 8 °C (15 °F) less than -the heating supply air temperature set point TSupHeaEco for 5 minutes, send 2 -requests. +Else if the supply air temperature TAirSup is hotWatResReqLim2 +less than TSupSet for time period hotWatResReqTimLim2, +send 2 requests.
  3. Else if the hot water valve position uHeaCoi_actual is greater than -95%, send 1 request until the uHeaCoi_actual is less than 85%. +hotWatPlaReqLim1, send 1 request until the uHeaCoi_actual +is less than hotWatResReqLim0.
  4. -Else if the hot water valve position uHeaCoi_actual is less than 95%, +Else if the hot water valve position uHeaCoi_actual is less than hotWatPlaReqLim1, send 0 request.

If there is a hot-water coil and heating hot-water plant, heating hot-water -plant reqeusts yHotWatPlaReq

+plant requests yHotWatPlaReq

Send the heating hot-water plant that serves the air handling unit a heating hot-water plant request as follows:

  1. -If the hot water valve position uHeaCoi_actual is greater than 95%, send 1 -request until the hot water valve position is less than 10%. +If the hot water valve position uHeaCoi_actual is greater than hotWatPlaReqLim1, +send 1 request until the hot water valve position is less than hotWatPlaReqLim0.
  2. -If the hot water valve position uHeaCoi_actual is less than 95%, send 0 requests. +If the hot water valve position uHeaCoi_actual is less than hotWatPlaReqLim1, +send 0 requests.
", revisions="
  • -December 1, 2021, by Jianjun Hu:
    +May 6, 2022, by Karthik Devaprasad:
    First implementation.
diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/PlantRequests.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/PlantRequests.mo index 02c8349e278..829ba818b44 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/PlantRequests.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/PlantRequests.mo @@ -7,13 +7,28 @@ model PlantRequests annotation (Placement(transformation(extent={{60,50},{80,70}}))); Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.PlantRequests plaReq1( - final have_hotWatCoi=false) + final have_hotWatCoi=false) "Calculate plant request" annotation (Placement(transformation(extent={{60,-80},{80,-60}}))); + Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.PlantRequests plaReq2( + final have_chiWatCoi=false) + "Calculate plant request" + annotation (Placement(transformation(extent={{60,-160},{80,-140}}))); + protected + CDL.Continuous.Sources.Pulse faSpe(width=0.8, period=3600) "Fan speed signal" + annotation (Placement(transformation(extent={{10,70},{30,90}}))); + CDL.Continuous.Sources.Pulse faSpe1(width=0.8, period=3600) + "Fan speed signal" + annotation (Placement(transformation(extent={{20,-30},{40,-10}}))); + + CDL.Continuous.Sources.Pulse faSpe2(width=0.8, period=3600) + "Fan speed signal" + annotation (Placement(transformation(extent={{20,-110},{40,-90}}))); + Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp supTem( - final height=8, + final height=16, final offset=273.15 + 15, final duration=3600) "Supply air temperature" annotation (Placement(transformation(extent={{-80,-50},{-60,-30}}))); @@ -40,57 +55,86 @@ protected final duration=3600) "Cooling supply air temperature" annotation (Placement(transformation(extent={{-80,70},{-60,90}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp supTemSet1( - final height=15, + final height=25, final offset=273.15 + 20, final duration=3600) "Supply air temperature setpoint" annotation (Placement(transformation(extent={{-40,50},{-20,70}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant cooCoi1( final k=0) "Cooling coil position" annotation (Placement(transformation(extent={{-80,30},{-60,50}}))); - Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp supTem2( - final height=7, - final offset=273.15 + 13, - final duration=3600) "Supply air temperature" - annotation (Placement(transformation(extent={{-40,10},{-20,30}}))); + CDL.Continuous.Sources.Ramp supTem3( + final height=8, + final offset=273.15 + 15, + final duration=3600) "Supply air temperature" + annotation (Placement(transformation(extent={{-80,-130},{-60,-110}}))); + CDL.Continuous.Sources.Ramp supTemSet2( + final height=6, + final offset=273.15 + 14.5, + final duration=3600) "Supply air temperature setpoint" + annotation (Placement(transformation(extent={{-40,-150},{-20,-130}}))); + CDL.Continuous.Sources.Ramp heaCoi2( + final height=-0.3, + final offset=0.96, + final duration=3600, + startTime=1000) "Heating coil position" + annotation (Placement(transformation(extent={{-80,-170},{-60,-150}}))); equation connect(supTem.y, plaReq1.TAirSup) annotation (Line(points={{-58,-40},{20,-40}, - {20,-61},{58,-61}}, color={0,0,127})); + {20,-66.6667},{58,-66.6667}}, + color={0,0,127})); connect(cooCoi.y, plaReq1.uCooCoi_actual) annotation (Line(points={{-58,-80}, - {20,-80},{20,-70},{58,-70}}, color={0,0,127})); + {20,-80},{20,-73.1667},{58,-73.1667}}, + color={0,0,127})); connect(supTem1.y, plaReq.TAirSup) annotation (Line(points={{-58,80},{0,80},{ - 0,69},{58,69}}, color={0,0,127})); + 0,63.3333},{58,63.3333}}, + color={0,0,127})); connect(cooCoi1.y, plaReq.uCooCoi_actual) annotation (Line(points={{-58,40},{ - 10,40},{10,60},{58,60}}, color={0,0,127})); + 10,40},{10,56.8333},{58,56.8333}}, + color={0,0,127})); connect(heaCoi.y, plaReq.uHeaCoi_actual) annotation (Line(points={{-58,0},{30, - 0},{30,51},{58,51}}, color={0,0,127})); - connect(supTemSet1.y, plaReq.TSupCoo) annotation (Line(points={{-18,60},{0,60}, - {0,65},{58,65}}, color={0,0,127})); - connect(supTemSet.y, plaReq1.TSupCoo) annotation (Line(points={{-18,-60},{0,-60}, - {0,-65},{58,-65}}, color={0,0,127})); - connect(supTem2.y, plaReq.TSupHeaEco) annotation (Line(points={{-18,20},{20,20}, - {20,55},{58,55}}, color={0,0,127})); + 0},{30,53.3333},{58,53.3333}}, + color={0,0,127})); + connect(supTemSet1.y,plaReq.TSupSet) annotation (Line(points={{-18,60},{0,60}, + {0,60},{58,60}}, color={0,0,127})); + connect(supTemSet.y,plaReq1.TSupSet) annotation (Line(points={{-18,-60},{0,-60}, + {0,-70},{58,-70}}, color={0,0,127})); + connect(faSpe.y, plaReq.uFanSpe) annotation (Line(points={{32,80},{50,80},{50, + 66.6667},{58,66.6667}}, color={0,0,127})); + connect(faSpe1.y, plaReq1.uFanSpe) annotation (Line(points={{42,-20},{52,-20}, + {52,-63.3333},{58,-63.3333}}, color={0,0,127})); + connect(supTem3.y, plaReq2.TAirSup) annotation (Line(points={{-58,-120},{20, + -120},{20,-146.667},{58,-146.667}}, + color={0,0,127})); + connect(supTemSet2.y, plaReq2.TSupSet) annotation (Line(points={{-18,-140},{0, + -140},{0,-150},{58,-150}}, color={0,0,127})); + connect(faSpe2.y, plaReq2.uFanSpe) annotation (Line(points={{42,-100},{52, + -100},{52,-143.333},{58,-143.333}}, + color={0,0,127})); + connect(heaCoi2.y, plaReq2.uHeaCoi_actual) annotation (Line(points={{-58,-160}, + {52,-160},{52,-156.667},{58,-156.667}}, color={0,0,127})); annotation ( experiment(StopTime=3600, Tolerance=1e-6), - __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/Validation/PlantRequests.mos" + __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/FanCoilUnit/Subsequences/Validation/PlantRequests.mos" "Simulate and plot"), Documentation(info="

This example validates - -Buildings.Controls.OBC.ASHRAE.G36.AHUs.SingleZone.VAV.SetPoints.PlantRequests -for air handling unit serving single zone. + +Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Subsequences.PlantRequests +for fan coil units.

", revisions="
  • -February 6, by Jianjun Hu:
    +May 5,2022 by Karthik Devaprasad:
    First implementation.
"), - Icon(graphics={ + Icon(coordinateSystem(extent={{-100,-100},{100,100}}), + graphics={ Ellipse(lineColor = {75,138,73}, fillColor={255,255,255}, fillPattern = FillPattern.Solid, @@ -99,5 +143,6 @@ First implementation. fillColor = {75,138,73}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, - points = {{-36,60},{64,0},{-36,-60},{-36,60}})})); + points = {{-36,60},{64,0},{-36,-60},{-36,60}})}), + Diagram(coordinateSystem(extent={{-100,-180},{100,100}}))); end PlantRequests; diff --git a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mo b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mo index 336277d82bc..d133f6d57be 100644 --- a/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mo +++ b/Buildings/Controls/OBC/ASHRAE/FanCoilUnit/Validation/Controller.mo @@ -285,12 +285,23 @@ annotation (experiment(StopTime=86400, Interval=300, Tolerance=1e-06), pattern=LinePattern.None, fillPattern=FillPattern.Solid, points={{-36,58},{64,-2},{-36,-62},{-36,58}})}), - Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-200,-160},{140,140}})), + Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-200,-180},{140,160}})), Documentation(info="

This example validates Buildings.Controls.OBC.ASHRAE.FanCoilUnit.Controller. +
+conFCU represents an instance of the controller with heating mode +operation, with the open-loop signals for measured zone temperature and measured +supply air temperature increasing with time. +
+conFCU1 represents an instance of the controller with cooling mode +operation, with the open-loop signals for measured zone temperature and measured +supply air temperature decreasing with time. +
+conFCU2 and conFCU3 represent instances of the controller +with cooling mode operation, with different parameter settings for the window and occupancy sensors.

", revisions="