From 2fc88f911a7532dd78d2e9b0352c6f4e489cac70 Mon Sep 17 00:00:00 2001 From: Jianjun Hu Date: Fri, 22 Dec 2023 13:21:50 -0800 Subject: [PATCH] Move CDL blocks to Obsolete package (#3601) * moved Or3 to obsolete, replaced Or3 instances with Or * moved ZeroCrossing to obsolete * moved OnOffController to obsolete package * moved triggerTrapezoid to obsolete package * added obsolete icon to the obsolete blocks --------- Co-authored-by: hcasperfu --- .../Validation/Enable_TOut_hOut.mo | 48 +-- .../VAV/SetPoints/FreezeProtection.mo | 42 +- .../AHUs/MultiZone/VAV/SetPoints/SupplyFan.mo | 27 +- .../Validation/Enable_TOut_hOut.mo | 50 +-- .../VAV/SetPoints/FreezeProtection.mo | 60 +-- .../G36/Generic/AirEconomizerHighLimits.mo | 392 +++++++++++------- .../CoolingOnly/Subsequences/ActiveAirFlow.mo | 53 +-- .../CoolingOnly/Subsequences/Dampers.mo | 30 +- .../Subsequences/ActiveAirFlow.mo | 51 ++- .../Subsequences/Overrides.mo | 42 +- .../Subsequences/ActiveAirFlow.mo | 62 +-- .../Subsequences/Overrides.mo | 32 +- .../Subsequences/ActiveAirFlow.mo | 62 +-- .../Subsequences/Overrides.mo | 32 +- .../Subsequences/ActiveAirFlow.mo | 59 +-- .../Subsequences/Overrides.mo | 32 +- .../Subsequences/ActiveAirFlow.mo | 38 +- .../Subsequences/DamperValves.mo | 43 +- .../Subsequences/ActiveAirFlow.mo | 38 +- .../Subsequences/DamperValves.mo | 54 +-- .../Reheat/Subsequences/ActiveAirFlow.mo | 20 +- .../Reheat/Subsequences/DamperValves.mo | 33 +- .../Subsequences/ActiveAirFlow.mo | 38 +- .../SeriesFanCVF/Subsequences/DamperValves.mo | 65 +-- .../Subsequences/ActiveAirFlow.mo | 38 +- .../SeriesFanVVF/Subsequences/DamperValves.mo | 77 ++-- .../OBC/ASHRAE/G36/ThermalZones/Setpoints.mo | 100 +++-- .../ASHRAE/G36/ZoneGroups/OperationMode.mo | 80 ++-- .../OBC/CDL/Logical/Validation/package.order | 4 - .../Controls/OBC/CDL/Logical/package.order | 3 - .../Tutorial/CDL/Controls/SystemOnOff.mo | 55 ++- .../Examples/Tutorial/SpaceCooling/System3.mo | 57 +-- .../PartialCoolingTowersSubsystem.mo | 59 +-- .../Examples/CoolingTowersParallel.mo | 20 +- .../Examples/CoolingTowersWithBypass.mo | 12 +- .../Validation/Enable_TOut_hOut.mo | 4 +- .../AHUs/MultiZone/VAV/SetPoints/SupplyFan.mo | 2 +- .../Validation/Enable_TOut_hOut.mo | 6 +- .../Generic/SetPoints/OperationMode.mo | 4 +- .../SetPoints/ZoneTemperatures.mo | 14 +- .../OBC/CDL/Logical/OnOffController.mo | 19 +- .../Controls/OBC/CDL/Logical/Or3.mo | 23 +- .../OBC/CDL/Logical/TriggeredTrapezoid.mo | 170 ++++++++ .../CDL/Logical/Validation/OnOffController.mo | 17 +- .../OBC/CDL/Logical/Validation/Or3.mo | 13 +- .../Logical/Validation/TriggeredTrapezoid.mo | 12 +- .../CDL/Logical/Validation/ZeroCrossing.mo | 25 +- .../OBC/CDL/Logical/Validation/package.order | 4 + .../Controls/OBC/CDL/Logical/ZeroCrossing.mo | 26 +- .../Controls/OBC/CDL/Logical/package.order | 4 + .../IO/Python36/Examples/SimpleRoom.mo | 2 +- ...bsequences_Validation_Enable_TOut_hOut.txt | 30 +- ...bsequences_Validation_Enable_TOut_hOut.txt | 24 +- ...uildings_Examples_Tutorial_CDL_System5.txt | 12 +- ...systems_Examples_CoolingTowersParallel.txt | 12 +- ...stems_Examples_CoolingTowersWithBypass.txt | 14 +- ...DL_Logical_Validation_OnOffController.txt} | 0 ...ntrols_OBC_CDL_Logical_Validation_Or3.txt} | 0 ...Logical_Validation_TriggeredTrapezoid.txt} | 0 ...C_CDL_Logical_Validation_ZeroCrossing.txt} | 0 ...ties_IO_Python_3_8_Examples_SimpleRoom.txt | 4 +- .../ConvertBuildings_from_10_to_11.0.0.mos | 12 +- .../Examples/CoolingTowersParallel.mos | 2 +- .../Examples/CoolingTowersWithBypass.mos | 2 +- .../Logical/Validation/OnOffController.mos | 2 +- .../OBC/CDL/Logical/Validation/Or3.mos | 2 +- .../Logical/Validation/TriggeredTrapezoid.mos | 2 +- .../CDL/Logical/Validation/ZeroCrossing.mos | 2 +- ...systems.Examples.CoolingTowersParallel.mos | 4 +- ...stems.Examples.CoolingTowersWithBypass.mos | 4 +- ...DL.Logical.Validation.OnOffController.mos} | 0 ...ntrols.OBC.CDL.Logical.Validation.Or3.mos} | 0 ...Logical.Validation.TriggeredTrapezoid.mos} | 0 ...C.CDL.Logical.Validation.ZeroCrossing.mos} | 0 .../IO/Python_3_8/Examples/SimpleRoom.mo | 49 ++- Buildings/package.mo | 23 +- 76 files changed, 1483 insertions(+), 970 deletions(-) rename Buildings/{ => Obsolete}/Controls/OBC/CDL/Logical/OnOffController.mo (82%) rename Buildings/{ => Obsolete}/Controls/OBC/CDL/Logical/Or3.mo (80%) create mode 100644 Buildings/Obsolete/Controls/OBC/CDL/Logical/TriggeredTrapezoid.mo rename Buildings/{ => Obsolete}/Controls/OBC/CDL/Logical/Validation/OnOffController.mo (70%) rename Buildings/{ => Obsolete}/Controls/OBC/CDL/Logical/Validation/Or3.mo (80%) rename Buildings/{ => Obsolete}/Controls/OBC/CDL/Logical/Validation/TriggeredTrapezoid.mo (70%) rename Buildings/{ => Obsolete}/Controls/OBC/CDL/Logical/Validation/ZeroCrossing.mo (68%) rename Buildings/{ => Obsolete}/Controls/OBC/CDL/Logical/ZeroCrossing.mo (84%) rename Buildings/Resources/ReferenceResults/Dymola/{Buildings_Controls_OBC_CDL_Logical_Validation_OnOffController.txt => Buildings_Obsolete_Controls_OBC_CDL_Logical_Validation_OnOffController.txt} (100%) rename Buildings/Resources/ReferenceResults/Dymola/{Buildings_Controls_OBC_CDL_Logical_Validation_Or3.txt => Buildings_Obsolete_Controls_OBC_CDL_Logical_Validation_Or3.txt} (100%) rename Buildings/Resources/ReferenceResults/Dymola/{Buildings_Controls_OBC_CDL_Logical_Validation_TriggeredTrapezoid.txt => Buildings_Obsolete_Controls_OBC_CDL_Logical_Validation_TriggeredTrapezoid.txt} (100%) rename Buildings/Resources/ReferenceResults/Dymola/{Buildings_Controls_OBC_CDL_Logical_Validation_ZeroCrossing.txt => Buildings_Obsolete_Controls_OBC_CDL_Logical_Validation_ZeroCrossing.txt} (100%) rename Buildings/Resources/Scripts/Dymola/{ => Obsolete}/Controls/OBC/CDL/Logical/Validation/OnOffController.mos (66%) rename Buildings/Resources/Scripts/Dymola/{ => Obsolete}/Controls/OBC/CDL/Logical/Validation/Or3.mos (55%) rename Buildings/Resources/Scripts/Dymola/{ => Obsolete}/Controls/OBC/CDL/Logical/Validation/TriggeredTrapezoid.mos (50%) rename Buildings/Resources/Scripts/Dymola/{ => Obsolete}/Controls/OBC/CDL/Logical/Validation/ZeroCrossing.mos (69%) rename Buildings/Resources/Scripts/OpenModelica/compareVars/{Buildings.Controls.OBC.CDL.Logical.Validation.OnOffController.mos => Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation.OnOffController.mos} (100%) rename Buildings/Resources/Scripts/OpenModelica/compareVars/{Buildings.Controls.OBC.CDL.Logical.Validation.Or3.mos => Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation.Or3.mos} (100%) rename Buildings/Resources/Scripts/OpenModelica/compareVars/{Buildings.Controls.OBC.CDL.Logical.Validation.TriggeredTrapezoid.mos => Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation.TriggeredTrapezoid.mos} (100%) rename Buildings/Resources/Scripts/OpenModelica/compareVars/{Buildings.Controls.OBC.CDL.Logical.Validation.ZeroCrossing.mos => Buildings.Obsolete.Controls.OBC.CDL.Logical.Validation.ZeroCrossing.mos} (100%) diff --git a/Buildings/Controls/OBC/ASHRAE/G36/AHUs/MultiZone/VAV/Economizers/Subsequences/Validation/Enable_TOut_hOut.mo b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/MultiZone/VAV/Economizers/Subsequences/Validation/Enable_TOut_hOut.mo index f151aad6243..94703bd6bf8 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36/AHUs/MultiZone/VAV/Economizers/Subsequences/Validation/Enable_TOut_hOut.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/MultiZone/VAV/Economizers/Subsequences/Validation/Enable_TOut_hOut.mo @@ -8,18 +8,6 @@ model Enable_TOut_hOut Buildings.Controls.OBC.CDL.Reals.Sources.Constant hOutCut1( final k=hOutCutoff) "Outdoor air enthalpy cutoff" annotation (Placement(transformation(extent={{-40,40},{-20,60}}))); - Buildings.Controls.OBC.CDL.Logical.TriggeredTrapezoid TOut( - final rising=1000, - final falling=800, - final amplitude=4, - final offset=TOutCutoff - 2) "Outoor air temperature" - annotation (Placement(transformation(extent={{-160,150},{-140,170}}))); - Buildings.Controls.OBC.CDL.Logical.TriggeredTrapezoid hOut( - final amplitude=4000, - final offset=hOutCutoff - 2200, - final rising=1000, - final falling=800) "Outdoor air enthalpy" - annotation (Placement(transformation(extent={{-40,80},{-20,100}}))); Buildings.Controls.OBC.ASHRAE.G36.AHUs.MultiZone.VAV.Economizers.Subsequences.Enable enaDis "Multi zone VAV AHU economizer enable disable sequence" @@ -31,7 +19,18 @@ model Enable_TOut_hOut final use_enthalpy=false) "Multi zone VAV AHU economizer enable disable sequence" annotation (Placement(transformation(extent={{220,-44},{240,-16}}))); - + Buildings.Controls.OBC.CDL.Reals.Sources.Sin TOut( + final amplitude=4, + final freqHz=1/3600, + final offset=TOutCutoff - 2, + final startTime=10) "Outdoor air temperature" + annotation (Placement(transformation(extent={{-160,140},{-140,160}}))); + Buildings.Controls.OBC.CDL.Reals.Sources.Sin hOut( + final amplitude=4000, + final freqHz=1/3600, + final offset=hOutCutoff - 2200, + final startTime=10) "Outdoor air enthalpy" + annotation (Placement(transformation(extent={{-40,82},{-20,102}}))); protected final parameter Real TOutCutoff( final unit="K", @@ -79,12 +78,6 @@ protected Buildings.Controls.OBC.CDL.Logical.Sources.Constant supFanSta( final k=true) "Supply fan status signal" annotation (Placement(transformation(extent={{-200,-42},{-180,-22}}))); - Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul(final shift=10, - final period=2000) "Boolean pulse signal" - annotation (Placement(transformation(extent={{-200,150},{-180,170}}))); - Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul1(final shift=10, - final period=2000) "Boolean pulse signal" - annotation (Placement(transformation(extent={{-80,80},{-60,100}}))); equation connect(TOutCut.y, enaDis.TOutCut) @@ -114,14 +107,6 @@ equation {-82,-22}}, color={0,0,127})); connect(TOutBelowCutoff.y, enaDis1.TOut) annotation (Line(points={{62,90},{70,90},{70,-20},{78,-20},{78,-17}}, color={0,0,127})); - connect(booPul.y, TOut.u) - annotation (Line(points={{-178,160},{-162,160}}, color={255,0,255})); - connect(TOut.y, enaDis.TOut) - annotation (Line(points={{-138,160},{-110,160},{-110,-17},{-82,-17}}, color={0,0,127})); - connect(booPul1.y, hOut.u) - annotation (Line(points={{-58,90},{-58,90},{-42,90}}, color={255,0,255})); - connect(hOut.y, enaDis1.hOut) - annotation (Line(points={{-18,90},{-10,90},{-10,60},{20,60},{20,-22},{78,-22}}, color={0,0,127})); connect(freProSta.y, enaDis1.uFreProSta) annotation (Line(points={{-178,30},{-46,30},{-46,-29},{78,-29}}, color={255,127,0})); connect(outDamPosMax.y, enaDis1.uOutDam_max) annotation (Line(points={{-218,-70}, @@ -134,8 +119,6 @@ equation {20,-150},{20,-41},{78,-41}}, color={0,0,127})); connect(retDamPosMin.y, enaDis1.uRetDam_min) annotation (Line(points={{-138,-190}, {30,-190},{30,-43},{78,-43}}, color={0,0,127})); - connect(TOut.y, enaDis2.TOut) - annotation (Line(points={{-138,160},{200,160},{200,-17},{218,-17}}, color={0,0,127})); connect(TOutCut.y, enaDis2.TOutCut) annotation (Line(points={{-138,90},{-120,90},{-120,120},{188,120},{188,-19}, {218,-19}}, color={0,0,127})); @@ -157,7 +140,12 @@ equation -32},{-160,-12},{-20,-12},{-20,-27},{78,-27}}, color={255,0,255})); connect(supFanSta.y, enaDis2.u1SupFan) annotation (Line(points={{-178,-32},{-160, -32},{-160,-12},{140,-12},{140,-27},{218,-27}}, color={255,0,255})); - + connect(TOut.y, enaDis.TOut) annotation (Line(points={{-138,150},{-100,150},{-100, + -17},{-82,-17}}, color={0,0,127})); + connect(TOut.y, enaDis2.TOut) annotation (Line(points={{-138,150},{196,150},{196, + -17},{218,-17}}, color={0,0,127})); + connect(hOut.y, enaDis1.hOut) annotation (Line(points={{-18,92},{-10,92},{-10, + 60},{20,60},{20,-22},{78,-22}}, color={0,0,127})); annotation ( experiment(StopTime=1800.0, Tolerance=1e-06), __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/G36/AHUs/MultiZone/VAV/Economizers/Subsequences/Validation/Enable_TOut_hOut.mos" diff --git a/Buildings/Controls/OBC/ASHRAE/G36/AHUs/MultiZone/VAV/SetPoints/FreezeProtection.mo b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/MultiZone/VAV/SetPoints/FreezeProtection.mo index 9764b30c8d9..98c08e48927 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36/AHUs/MultiZone/VAV/SetPoints/FreezeProtection.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/MultiZone/VAV/SetPoints/FreezeProtection.mo @@ -299,6 +299,7 @@ block FreezeProtection annotation (Placement(transformation(extent={{440,-860},{480,-820}}), iconTransformation(extent={{100,-210},{140,-170}}))); +protected Buildings.Controls.OBC.CDL.Reals.LessThreshold lesThr( final t=273.15 + 4.4, final h=Thys) if have_frePro @@ -400,7 +401,7 @@ block FreezeProtection Buildings.Controls.OBC.CDL.Logical.Timer tim3( final t=900) if have_frePro "Check if the supply air temperature has been lower than threshold value for sufficient long time" - annotation (Placement(transformation(extent={{-300,240},{-280,260}}))); + annotation (Placement(transformation(extent={{-320,240},{-300,260}}))); Buildings.Controls.OBC.CDL.Reals.LessThreshold lesThr2( final t=273.15 + 1, final h=Thys) if have_frePro @@ -409,15 +410,15 @@ block FreezeProtection Buildings.Controls.OBC.CDL.Logical.Timer tim4( final t=300) if have_frePro "Check if the supply air temperature has been lower than threshold value for sufficient long time" - annotation (Placement(transformation(extent={{-300,200},{-280,220}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or3 if have_frePro + annotation (Placement(transformation(extent={{-320,200},{-300,220}}))); + Buildings.Controls.OBC.CDL.Logical.Or or8 if have_frePro "Check if it should be in stage 3 mode" - annotation (Placement(transformation(extent={{-220,192},{-200,212}}))); + annotation (Placement(transformation(extent={{-220,190},{-200,210}}))); Buildings.Controls.OBC.CDL.Logical.Sources.Constant con2( final k=false) if not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_BAS and have_frePro "Constant false" - annotation (Placement(transformation(extent={{-300,50},{-280,70}}))); + annotation (Placement(transformation(extent={{-320,50},{-300,70}}))); Buildings.Controls.OBC.CDL.Logical.Latch lat1 if have_frePro "Stay in stage 3 freeze protection mode" annotation (Placement(transformation(extent={{-140,150},{-120,170}}))); @@ -732,6 +733,9 @@ block FreezeProtection if (not have_frePro) and heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased "Dummy constant" annotation (Placement(transformation(extent={{360,-820},{380,-800}}))); + Buildings.Controls.OBC.CDL.Logical.Or or7 if have_frePro + "Check if it should be in stage 3 mode" + annotation (Placement(transformation(extent={{-280,232},{-260,252}}))); equation connect(lesThr.y, tim.u) @@ -778,18 +782,12 @@ equation 410},{118,410}}, color={0,0,127})); connect(conInt1.y, intSwi1.u1) annotation (Line(points={{62,350},{100,350},{ 100,328},{118,328}}, color={255,127,0})); - connect(lesThr1.y, tim3.u) annotation (Line(points={{-358,470},{-350,470},{ - -350,250},{-302,250}}, color={255,0,255})); + connect(lesThr1.y, tim3.u) annotation (Line(points={{-358,470},{-350,470},{-350, + 250},{-322,250}}, color={255,0,255})); connect(lesThr2.y, tim4.u) - annotation (Line(points={{-338,210},{-302,210}}, color={255,0,255})); + annotation (Line(points={{-338,210},{-322,210}}, color={255,0,255})); connect(TAirSup, lesThr2.u) annotation (Line(points={{-460,330},{-420,330},{ -420,210},{-362,210}}, color={0,0,127})); - connect(tim3.passed, or3.u1) annotation (Line(points={{-278,242},{-240,242},{ - -240,210},{-222,210}}, color={255,0,255})); - connect(tim4.passed, or3.u2) - annotation (Line(points={{-278,202},{-222,202}}, color={255,0,255})); - connect(con2.y, or3.u3) annotation (Line(points={{-278,60},{-240,60},{-240, - 194},{-222,194}}, color={255,0,255})); connect(u1SofSwiRes, lat1.clr) annotation (Line(points={{-460,20},{-160,20},{ -160,154},{-142,154}}, color={255,0,255})); connect(lat1.y, supFan.u2) annotation (Line(points={{-118,160},{20,160},{20, @@ -960,8 +958,8 @@ equation {318,-62}}, color={255,0,255})); connect(u1FreSta,norFal. u) annotation (Line(points={{-460,130},{-362,130}}, color={255,0,255})); - connect(or3.y, lat1.u) annotation (Line(points={{-198,202},{-160,202},{-160, - 160},{-142,160}}, color={255,0,255})); + connect(or8.y, lat1.u) annotation (Line(points={{-198,200},{-160,200},{-160,160}, + {-142,160}}, color={255,0,255})); connect(falEdg.y, lat1.clr) annotation (Line(points={{-198,130},{-180,130},{ -180,154},{-142,154}}, color={255,0,255})); connect(u1RetFan, and1.u1) annotation (Line(points={{-460,-320},{-80,-320},{-80, @@ -1046,8 +1044,6 @@ equation {460,-220}}, color={0,0,127})); connect(norFal.y, falEdg.u) annotation (Line(points={{-338,130},{-222,130}}, color={255,0,255})); - connect(norFal.y, or3.u3) annotation (Line(points={{-338,130},{-260,130},{-260, - 194},{-222,194}}, color={255,0,255})); connect(conInt9.y, yFreProSta) annotation (Line(points={{402,370},{420,370},{420, 320},{460,320}}, color={255,127,0})); connect(gai8.y, yRetDam) annotation (Line(points={{-218,-50},{366,-50},{366,160}, @@ -1088,6 +1084,16 @@ equation annotation (Line(points={{342,-460},{460,-460}}, color={255,0,255})); connect(and3.y, y1RelDam) annotation (Line(points={{342,-420},{360,-420},{360, -460},{460,-460}}, color={255,0,255})); + connect(tim3.passed, or7.u1) + annotation (Line(points={{-298,242},{-282,242}}, color={255,0,255})); + connect(tim4.passed, or7.u2) annotation (Line(points={{-298,202},{-290,202},{-290, + 234},{-282,234}}, color={255,0,255})); + connect(or7.y, or8.u1) annotation (Line(points={{-258,242},{-240,242},{-240,200}, + {-222,200}}, color={255,0,255})); + connect(norFal.y, or8.u2) annotation (Line(points={{-338,130},{-240,130},{-240, + 192},{-222,192}}, color={255,0,255})); + connect(con2.y, or8.u2) annotation (Line(points={{-298,60},{-240,60},{-240,192}, + {-222,192}}, color={255,0,255})); annotation (defaultComponentName="mulAHUFrePro", Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-200},{100,200}}), graphics={ diff --git a/Buildings/Controls/OBC/ASHRAE/G36/AHUs/MultiZone/VAV/SetPoints/SupplyFan.mo b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/MultiZone/VAV/SetPoints/SupplyFan.mo index 07391f1ad9b..d222a722e2c 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36/AHUs/MultiZone/VAV/SetPoints/SupplyFan.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/MultiZone/VAV/SetPoints/SupplyFan.mo @@ -154,9 +154,9 @@ protected Buildings.Controls.OBC.CDL.Logical.Or or2 if have_perZonRehBox "Setback or warmup mode" annotation (Placement(transformation(extent={{20,30},{40,50}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or3 + Buildings.Controls.OBC.CDL.Logical.Or or3 "Cool-down or setup or occupied mode" - annotation (Placement(transformation(extent={{20,90},{40,110}}))); + annotation (Placement(transformation(extent={{-20,90},{0,110}}))); Buildings.Controls.OBC.CDL.Logical.Sources.Constant con( k=false) if not have_perZonRehBox "Constant true" @@ -210,6 +210,9 @@ protected final samplePeriod=samplePeriod) "Extrapolation through the values of the last two sampled input signals" annotation (Placement(transformation(extent={{-100,-60},{-80,-40}}))); + Buildings.Controls.OBC.CDL.Logical.Or or4 + "Cool-down or setup or occupied mode" + annotation (Placement(transformation(extent={{20,60},{40,80}}))); equation connect(or2.y, or1.u2) @@ -238,13 +241,11 @@ equation annotation (Line(points={{42,10},{60,10},{60,62},{78,62}}, color={255,0,255})); connect(intEqu.y, or3.u1) - annotation (Line(points={{-38,130},{0,130},{0,108},{18,108}}, - color={255,0,255})); - connect(intEqu2.y, or3.u3) - annotation (Line(points={{-38,70},{0,70},{0,92},{18,92}}, + annotation (Line(points={{-38,130},{-30,130},{-30,100},{-22,100}}, color={255,0,255})); connect(intEqu1.y, or3.u2) - annotation (Line(points={{-38,100},{18,100}}, color={255,0,255})); + annotation (Line(points={{-38,100},{-30,100},{-30,92},{-22,92}}, + color={255,0,255})); connect(conInt.y, intEqu.u2) annotation (Line(points={{-98,130},{-90,130},{-90,122},{-62,122}}, color={255,127,0})); @@ -275,9 +276,6 @@ equation connect(uOpeMod, intEqu4.u1) annotation (Line(points={{-180,120},{-140,120},{-140,150},{-80,150}, {-80,10},{-62,10}}, color={255,127,0})); - connect(or3.y, or1.u1) - annotation (Line(points={{42,100},{60,100},{60,70},{78,70}}, - color={255,0,255})); connect(intEqu3.y, or2.u1) annotation (Line(points={{-38,40},{18,40}}, color={255,0,255})); connect(intEqu4.y, or2.u2) @@ -300,7 +298,12 @@ equation -116},{-72,-116}}, color={0,0,127})); connect(firOrdHol.y, norPSet.u1) annotation (Line(points={{-78,-50},{-76,-50}, {-76,-64},{-72,-64}}, color={0,0,127})); - + connect(intEqu2.y, or4.u1) + annotation (Line(points={{-38,70},{18,70}}, color={255,0,255})); + connect(or4.y, or1.u1) + annotation (Line(points={{42,70},{78,70}}, color={255,0,255})); + connect(or3.y, or4.u2) annotation (Line(points={{2,100},{10,100},{10,62},{18,62}}, + color={255,0,255})); annotation ( defaultComponentName="conSupFan", Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-160,-140},{140,160}}), @@ -312,7 +315,7 @@ annotation ( fillPattern=FillPattern.Solid, pattern=LinePattern.None), Rectangle( - extent={{-156,156},{134,-6}}, + extent={{-158,158},{132,2}}, lineColor={0,0,0}, fillColor={215,215,215}, fillPattern=FillPattern.Solid, diff --git a/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/Economizers/Subsequences/Validation/Enable_TOut_hOut.mo b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/Economizers/Subsequences/Validation/Enable_TOut_hOut.mo index ff90dd0a008..21850cc5d8d 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/Economizers/Subsequences/Validation/Enable_TOut_hOut.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/Economizers/Subsequences/Validation/Enable_TOut_hOut.mo @@ -20,18 +20,19 @@ model Enable_TOut_hOut Buildings.Controls.OBC.CDL.Reals.Sources.Constant hOutCut1( final k=hOutCutoff) "Outdoor air enthalpy cutoff" annotation (Placement(transformation(extent={{-80,0},{-60,20}}))); - Buildings.Controls.OBC.CDL.Logical.TriggeredTrapezoid TOut( - final rising=1000, - final falling=800, + Buildings.Controls.OBC.CDL.Reals.Sources.Sin TOut( final amplitude=4, - final offset=TOutCutoff - 2) "Outoor air temperature" + final freqHz=1/3600, + final offset=TOutCutoff - 2, + final startTime=10) "Outdoor air temperature" annotation (Placement(transformation(extent={{-160,80},{-140,100}}))); - Buildings.Controls.OBC.CDL.Logical.TriggeredTrapezoid hOut( + Buildings.Controls.OBC.CDL.Reals.Sources.Sin hOut( final amplitude=4000, + final freqHz=1/3600, final offset=hOutCutoff - 2200, - final rising=1000, - final falling=800) "Outdoor air enthalpy" - annotation (Placement(transformation(extent={{-40,40},{-20,60}}))); + final startTime=10) "Outdoor air enthalpy" + annotation (Placement(transformation(extent={{-40,38},{-20,58}}))); + protected final parameter Real TOutCutoff( final unit="K", @@ -79,12 +80,6 @@ protected Buildings.Controls.OBC.CDL.Logical.Sources.Constant supFanSta( final k=true) "Supply fan status signal" annotation (Placement(transformation(extent={{-200,-80},{-180,-60}}))); - Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul(final shift=10, - final period=2000) "Boolean pulse signal" - annotation (Placement(transformation(extent={{-200,80},{-180,100}}))); - Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul1(final shift=10, - final period=2000) "Boolean pulse signal" - annotation (Placement(transformation(extent={{-80,40},{-60,60}}))); equation connect(TOutCut.y, enaDis.TCut) annotation (Line(points={{-138,50},{-112,50},{ @@ -103,43 +98,29 @@ equation connect(TOutCut1.y, enaDis1.TCut) annotation (Line(points={{22,50},{30,50},{30, -63},{86,-63}}, color={0,0,127})); connect(hOutCut1.y, enaDis1.hCut) annotation (Line(points={{-58,10},{10,10},{ - 10,-67},{86,-67}}, - color={0,0,127})); + 10,-67},{86,-67}}, color={0,0,127})); connect(hOutBelowCutoff.y, enaDis.hOut) annotation (Line(points={{-218,50},{-180,50},{-180,26},{-130,26},{-130,-65}, {-82,-65}}, color={0,0,127})); connect(TOutBelowCutoff.y, enaDis1.TOut) annotation (Line(points={{76,50},{80,50},{80,-61},{86,-61}}, color={0,0,127})); - connect(booPul.y, TOut.u) - annotation (Line(points={{-178,90},{-162,90}}, color={255,0,255})); - connect(TOut.y, enaDis.TOut) - annotation (Line(points={{-138,90},{-110,90},{-110,-61},{-82,-61}}, color={0,0,127})); - connect(booPul1.y, hOut.u) - annotation (Line(points={{-58,50},{-58,50},{-42,50}}, color={255,0,255})); - connect(hOut.y, enaDis1.hOut) - annotation (Line(points={{-18,50},{-10,50},{-10,20},{20,20},{20,-65},{86, - -65}}, color={0,0,127})); connect(freProSta.y, enaDis1.uFreProSta) annotation (Line(points={{-178,-10},{-30,-10},{-30,-73},{86,-73}}, color={255,127,0})); connect(zoneState.y, enaDis1.uZonSta) annotation (Line(points={{-178,-40},{-160,-40},{-160,-26},{4,-26},{4,-75},{ - 86,-75}}, - color={255,127,0})); + 86,-75}}, color={255,127,0})); connect(outDamPosMaxSig.y, enaDis1.uOutDam_max) annotation (Line(points={{-218, -110},{60,-110},{60,-77},{86,-77}}, color={0,0,127})); connect(outDamPosMinSig.y, enaDis1.uOutDam_min) annotation (Line(points={{-218, -150},{-180,-150},{-180,-120},{70,-120},{70,-79},{86,-79}}, color={0, 0,127})); - connect(TOut.y, enaDis2.TOut) - annotation (Line(points={{-138,90},{-138,90},{200,90},{200,-61},{218,-61}},color={0,0,127})); connect(TOutCut.y, enaDis2.TCut) annotation (Line(points={{-138,50},{-112,50}, {-112,80},{188,80},{188,-63},{218,-63}}, color={0,0,127})); connect(freProSta.y, enaDis2.uFreProSta) annotation (Line(points={{-178,-10},{170,-10},{170,-73},{218,-73}}, color={255,127,0})); connect(zoneState.y, enaDis2.uZonSta) annotation (Line(points={{-178,-40},{-170,-40},{-170,-20},{150,-20},{150, - -75},{218,-75}}, - color={255,127,0})); + -75},{218,-75}}, color={255,127,0})); connect(outDamPosMaxSig.y, enaDis2.uOutDam_max) annotation (Line(points={{-218, -110},{180,-110},{180,-77},{218,-77}}, color={0,0,127})); connect(outDamPosMinSig.y, enaDis2.uOutDam_min) annotation (Line(points={{-218, @@ -151,7 +132,12 @@ equation -70},{-160,-54},{-40,-54},{-40,-70},{86,-70}}, color={255,0,255})); connect(supFanSta.y, enaDis2.u1SupFan) annotation (Line(points={{-178,-70},{-170, -70},{-170,-50},{140,-50},{140,-70},{218,-70}}, color={255,0,255})); - + connect(TOut.y, enaDis.TOut) annotation (Line(points={{-138,90},{-106,90},{-106, + -61},{-82,-61}}, color={0,0,127})); + connect(TOut.y, enaDis2.TOut) annotation (Line(points={{-138,90},{194,90},{194, + -61},{218,-61}}, color={0,0,127})); + connect(hOut.y, enaDis1.hOut) annotation (Line(points={{-18,48},{-10,48},{-10, + 20},{20,20},{20,-65},{86,-65}}, color={0,0,127})); annotation ( experiment(StopTime=1800.0, Tolerance=1e-06), __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/Economizers/Subsequences/Validation/Enable_TOut_hOut.mos" diff --git a/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/FreezeProtection.mo b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/FreezeProtection.mo index 352572d79bb..f47d4d8da66 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/FreezeProtection.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/SetPoints/FreezeProtection.mo @@ -156,7 +156,7 @@ block FreezeProtection annotation (Placement(transformation(extent={{440,210},{480,250}}), iconTransformation(extent={{100,-170},{140,-130}}))); Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1EneCHWPum - if have_frePro + if have_frePro "Energize chilled water pump" annotation (Placement(transformation(extent={{440,130},{480,170}}), iconTransformation(extent={{100,170},{140,210}}))); @@ -233,6 +233,7 @@ block FreezeProtection annotation (Placement(transformation(extent={{440,-710},{480,-670}}), iconTransformation(extent={{100,-210},{140,-170}}))); +protected Buildings.Controls.OBC.CDL.Reals.LessThreshold lesThr( final t=273.15 + 4, final h=Thys) if have_frePro @@ -323,7 +324,7 @@ block FreezeProtection Buildings.Controls.OBC.CDL.Logical.Timer tim3( final t=900) if have_frePro "Check if the supply air temperature has been lower than threshold value for sufficient long time" - annotation (Placement(transformation(extent={{-300,160},{-280,180}}))); + annotation (Placement(transformation(extent={{-320,160},{-300,180}}))); Buildings.Controls.OBC.CDL.Reals.LessThreshold lesThr2( final t=273.15 + 1, final h=Thys) if have_frePro @@ -332,8 +333,8 @@ block FreezeProtection Buildings.Controls.OBC.CDL.Logical.Timer tim4( final t=300) if have_frePro "Check if the supply air temperature has been lower than threshold value for sufficient long time" - annotation (Placement(transformation(extent={{-300,120},{-280,140}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or3 if have_frePro + annotation (Placement(transformation(extent={{-320,120},{-300,140}}))); + Buildings.Controls.OBC.CDL.Logical.Or or7 if have_frePro "Check if it should be in stage 3 mode" annotation (Placement(transformation(extent={{-240,112},{-220,132}}))); Buildings.Controls.OBC.CDL.Logical.Latch lat1 if have_frePro @@ -437,7 +438,7 @@ block FreezeProtection "Clear the latch to end the stage 2 freeze protection" annotation (Placement(transformation(extent={{-220,312},{-200,332}}))); Buildings.Controls.OBC.CDL.Logical.Or or2 if have_frePro - "Start stage 1 freeze protection mode" + "Start stage 1 freeze protection mode" annotation (Placement(transformation(extent={{-100,652},{-80,672}}))); Buildings.Controls.OBC.CDL.Logical.FallingEdge falEdg if have_frePro "Switch from stage 2 to stage 1" @@ -484,7 +485,7 @@ block FreezeProtection final k=false) if not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_BAS and have_frePro "Constant false" - annotation (Placement(transformation(extent={{-300,-10},{-280,10}}))); + annotation (Placement(transformation(extent={{-320,-10},{-300,10}}))); Buildings.Controls.OBC.CDL.Logical.Not norSta1 if buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefFan and have_frePro "Not in stage 3" @@ -506,13 +507,12 @@ block FreezeProtection "Not in stage 3" annotation (Placement(transformation(extent={{120,-230},{140,-210}}))); Buildings.Controls.OBC.CDL.Logical.Not norSta3 if have_frePro - "Not in stage 3" + "Not in stage 3" annotation (Placement(transformation(extent={{120,-80},{140,-60}}))); Buildings.Controls.OBC.CDL.Logical.And and3 if not freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment and have_frePro "Disable supply fan when in stage 3" annotation (Placement(transformation(extent={{320,-100},{340,-80}}))); - Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai4(final k=1) if freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment and have_frePro @@ -569,39 +569,43 @@ block FreezeProtection Buildings.Controls.OBC.CDL.Logical.Pre pre if have_frePro "Break loop" annotation (Placement(transformation(extent={{-200,112},{-180,132}}))); - CDL.Integers.Sources.Constant conInt9(final k=0) + Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt9(final k=0) if not have_frePro "Dummy constant" annotation (Placement(transformation(extent={{380,270},{400,290}}))); - CDL.Integers.Sources.Constant conInt10(final k=0) + Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt10(final k=0) if not have_frePro "Dummy constant" annotation (Placement(transformation(extent={{380,-680},{400,-660}}))); - CDL.Reals.MultiplyByParameter gai8(final k=1) + Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai8(final k=1) if not have_frePro "Dummy block for enabling and disabling the conditional connection" annotation (Placement(transformation(extent={{-300,-80},{-280,-60}}))); - CDL.Reals.MultiplyByParameter gai9(final k=1) + Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai9(final k=1) if not have_frePro "Dummy block for enabling and disabling the conditional connection" annotation (Placement(transformation(extent={{-300,-130},{-280,-110}}))); - CDL.Reals.MultiplyByParameter gai10(final k=1) + Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai10(final k=1) if not have_frePro "Dummy block for enabling and disabling the conditional connection" annotation (Placement(transformation(extent={{-300,-190},{-280,-170}}))); - CDL.Reals.MultiplyByParameter gai11(final k=1) if ( + Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai11(final k=1) if ( buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanMeasuredAir or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanDp) and not have_frePro "Dummy block for enabling and disabling the conditional connection" annotation (Placement(transformation(extent={{-300,-310},{-280,-290}}))); - CDL.Reals.MultiplyByParameter gai12(final k=1) if ( + Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai12(final k=1) if ( buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefFan) and not have_frePro "Dummy block for enabling and disabling the conditional connection" annotation (Placement(transformation(extent={{-300,-440},{-280,-420}}))); - CDL.Reals.MultiplyByParameter gai13(final k=1) + Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai13(final k=1) if not have_frePro "Dummy block for enabling and disabling the conditional connection" annotation (Placement(transformation(extent={{-300,-510},{-280,-490}}))); + Buildings.Controls.OBC.CDL.Logical.Or or6 if have_frePro + "Check if it should be in stage 3 mode" + annotation (Placement(transformation(extent={{-280,152},{-260,172}}))); + equation connect(lesThr.y, tim.u) annotation (Line(points={{-338,670},{-302,670}}, color={255,0,255})); @@ -646,13 +650,9 @@ equation connect(conInt1.y, intSwi1.u1) annotation (Line(points={{62,238},{100,238},{100, 218},{118,218}}, color={255,127,0})); connect(lesThr1.y, tim3.u) annotation (Line(points={{-358,370},{-350,370},{-350, - 170},{-302,170}}, color={255,0,255})); + 170},{-322,170}}, color={255,0,255})); connect(TAirSup, lesThr2.u) annotation (Line(points={{-460,250},{-420,250},{ -420,130},{-402,130}}, color={0,0,127})); - connect(tim3.passed, or3.u1) annotation (Line(points={{-278,162},{-260,162},{-260, - 130},{-242,130}}, color={255,0,255})); - connect(tim4.passed, or3.u2) - annotation (Line(points={{-278,122},{-242,122}}, color={255,0,255})); connect(u1SofSwiRes, lat1.clr) annotation (Line(points={{-460,-30},{-160,-30}, {-160,116},{-142,116}}, color={255,0,255})); connect(lat1.y, retFan.u2) annotation (Line(points={{-118,122},{20,122},{20,-260}, @@ -795,8 +795,6 @@ equation color={255,0,255})); connect(falEdg1.y, lat1.clr) annotation (Line(points={{-198,50},{-160,50},{-160, 116},{-142,116}}, color={255,0,255})); - connect(con2.y, or3.u3) annotation (Line(points={{-278,0},{-260,0},{-260,114}, - {-242,114}}, color={255,0,255})); connect(u1RelFan, and2.u1) annotation (Line(points={{-460,-320},{318,-320}}, color={255,0,255})); connect(lat1.y, norSta1.u) annotation (Line(points={{-118,122},{20,122},{20,-340}, @@ -868,10 +866,10 @@ equation connect(gai7.y, yHeaCoi) annotation (Line(points={{342,-590},{360,-590},{360,-560}, {460,-560}}, color={0,0,127})); connect(lesThr2.y, tim4.u) - annotation (Line(points={{-378,130},{-302,130}}, color={255,0,255})); + annotation (Line(points={{-378,130},{-322,130}}, color={255,0,255})); connect(lat1.y, supFan.u2) annotation (Line(points={{-118,122},{20,122},{20,-140}, {158,-140}}, color={255,0,255})); - connect(or3.y, pre.u) + connect(or7.y, pre.u) annotation (Line(points={{-218,122},{-202,122}}, color={255,0,255})); connect(pre.y, lat1.u) annotation (Line(points={{-178,122},{-142,122}}, color={255,0,255})); @@ -881,8 +879,6 @@ equation annotation (Line(points={{-278,662},{-102,662}}, color={255,0,255})); connect(norFal.y, falEdg1.u) annotation (Line(points={{-338,50},{-222,50}}, color={255,0,255})); - connect(norFal.y, or3.u3) annotation (Line(points={{-338,50},{-260,50},{-260, - 114},{-242,114}}, color={255,0,255})); connect(conInt9.y, yFreProSta) annotation (Line(points={{402,280},{420,280},{420, 230},{460,230}}, color={255,127,0})); connect(conInt10.y, yHotWatPlaReq) annotation (Line(points={{402,-670},{420,-670}, @@ -911,6 +907,16 @@ equation -500},{-302,-500}}, color={0,0,127})); connect(gai13.y, yCooCoi) annotation (Line(points={{-278,-500},{360,-500},{360, -460},{460,-460}}, color={0,0,127})); + connect(tim3.passed, or6.u1) + annotation (Line(points={{-298,162},{-282,162}}, color={255,0,255})); + connect(tim4.passed, or6.u2) annotation (Line(points={{-298,122},{-290,122},{-290, + 154},{-282,154}}, color={255,0,255})); + connect(or6.y, or7.u1) annotation (Line(points={{-258,162},{-250,162},{-250,122}, + {-242,122}}, color={255,0,255})); + connect(norFal.y, or7.u2) annotation (Line(points={{-338,50},{-260,50},{-260,114}, + {-242,114}}, color={255,0,255})); + connect(con2.y, or7.u2) annotation (Line(points={{-298,0},{-260,0},{-260,114}, + {-242,114}}, color={255,0,255})); annotation (defaultComponentName="sinAHUFrePro", Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-200},{100,200}}), graphics={ diff --git a/Buildings/Controls/OBC/ASHRAE/G36/Generic/AirEconomizerHighLimits.mo b/Buildings/Controls/OBC/ASHRAE/G36/Generic/AirEconomizerHighLimits.mo index ac8c51b6d53..4a4f422f80f 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36/Generic/AirEconomizerHighLimits.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36/Generic/AirEconomizerHighLimits.mo @@ -21,7 +21,7 @@ block AirEconomizerHighLimits "Specify the economizer high liimits" if (ecoHigLimCon == Buildings.Controls.OBC.ASHRAE.G36.Types.ControlEconomizer.DifferentialDryBulb or ecoHigLimCon == Buildings.Controls.OBC.ASHRAE.G36.Types.ControlEconomizer.FixedDryBulbWithDifferentialDryBulb) "Return air temperature" - annotation (Placement(transformation(extent={{-580,550},{-540,590}}), + annotation (Placement(transformation(extent={{-580,620},{-540,660}}), iconTransformation(extent={{-140,40},{-100,80}}))); Buildings.Controls.OBC.CDL.Interfaces.RealInput hRet( final unit="J/kg", @@ -47,6 +47,7 @@ block AirEconomizerHighLimits "Specify the economizer high liimits" annotation (Placement(transformation(extent={{540,20},{580,60}}), iconTransformation(extent={{100,-80},{140,-40}}))); +protected Buildings.Controls.OBC.CDL.Logical.Sources.Constant fixDryBul( final k=ecoHigLimCon == Buildings.Controls.OBC.ASHRAE.G36.Types.ControlEconomizer.FixedDryBulb) "Fixed dry bulb" @@ -148,26 +149,26 @@ block AirEconomizerHighLimits "Specify the economizer high liimits" if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1 "ASHRAE zone 8" annotation (Placement(transformation(extent={{-380,1040},{-360,1060}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or3 + Buildings.Controls.OBC.CDL.Logical.Or or23 if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1 "Zone 1b, 2b or 3b" - annotation (Placement(transformation(extent={{-40,840},{-20,860}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or1 + annotation (Placement(transformation(extent={{-20,860},{0,880}}))); + Buildings.Controls.OBC.CDL.Logical.Or or1 if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1 "Zone 3c, 4b or 4c" - annotation (Placement(transformation(extent={{-40,800},{-20,820}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or2 + annotation (Placement(transformation(extent={{-20,810},{0,830}}))); + Buildings.Controls.OBC.CDL.Logical.Or or2 if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1 "Zone 5b, 5c or 6b" - annotation (Placement(transformation(extent={{-40,760},{-20,780}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or4 + annotation (Placement(transformation(extent={{-20,760},{0,780}}))); + Buildings.Controls.OBC.CDL.Logical.Or or4 if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1 "Logical or" - annotation (Placement(transformation(extent={{20,800},{40,820}}))); + annotation (Placement(transformation(extent={{40,800},{60,820}}))); Buildings.Controls.OBC.CDL.Logical.Or or6 if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1 "Zone 7 or 8" - annotation (Placement(transformation(extent={{-40,720},{-20,740}}))); + annotation (Placement(transformation(extent={{-20,720},{0,740}}))); Buildings.Controls.OBC.CDL.Logical.Or or7 if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1 "Logical or" @@ -215,27 +216,27 @@ block AirEconomizerHighLimits "Specify the economizer high liimits" if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1 "Cut off temperature" annotation (Placement(transformation(extent={{220,620},{240,640}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or10 + Buildings.Controls.OBC.CDL.Logical.Or or10 if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1 - "Zone 1b, 2b or 3b" - annotation (Placement(transformation(extent={{-40,540},{-20,560}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or11 + "Zone 1b, 2b" + annotation (Placement(transformation(extent={{-60,580},{-40,600}}))); + Buildings.Controls.OBC.CDL.Logical.Or or11 if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1 - "Zone 3c, 4b or 4c" - annotation (Placement(transformation(extent={{-40,500},{-20,520}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or12 + "Zone 3c, 4b" + annotation (Placement(transformation(extent={{-60,530},{-40,550}}))); + Buildings.Controls.OBC.CDL.Logical.Or or12 if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1 - "Zone 5a, 5b or 5c" - annotation (Placement(transformation(extent={{-40,460},{-20,480}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or13 + "Zone 5a, 5b" + annotation (Placement(transformation(extent={{-60,480},{-40,500}}))); + Buildings.Controls.OBC.CDL.Logical.Or or13 if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1 "Zone 6a, 6b or 7" - annotation (Placement(transformation(extent={{-40,420},{-20,440}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or14 + annotation (Placement(transformation(extent={{-60,430},{-40,450}}))); + Buildings.Controls.OBC.CDL.Logical.Or or14 if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1 "Logical or" - annotation (Placement(transformation(extent={{20,500},{40,520}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or15 + annotation (Placement(transformation(extent={{20,460},{40,480}}))); + Buildings.Controls.OBC.CDL.Logical.Or or15 if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1 "Logical or" annotation (Placement(transformation(extent={{80,400},{100,420}}))); @@ -243,10 +244,10 @@ block AirEconomizerHighLimits "Specify the economizer high liimits" if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1 "Cut off outdoor air temperature" annotation (Placement(transformation(extent={{340,420},{360,440}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or8 + Buildings.Controls.OBC.CDL.Logical.Or or8 if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1 - "Zone 1a, 2a or 3a" - annotation (Placement(transformation(extent={{-40,340},{-20,360}}))); + "Zone 2a or 3a" + annotation (Placement(transformation(extent={{-60,340},{-40,360}}))); Buildings.Controls.OBC.CDL.Logical.Or or9 if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1 "Zone 1a, 2a, 3a or 4a" @@ -353,19 +354,19 @@ block AirEconomizerHighLimits "Specify the economizer high liimits" if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.California_Title_24 "Title 24, zone 16" annotation (Placement(transformation(extent={{-220,-240},{-200,-220}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or16 + Buildings.Controls.OBC.CDL.Logical.Or or16 if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.California_Title_24 - "Zone 1, 3 or 5" - annotation (Placement(transformation(extent={{-40,-300},{-20,-280}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or17 + "Zone 1, 3" + annotation (Placement(transformation(extent={{-140,-280},{-120,-260}}))); + Buildings.Controls.OBC.CDL.Logical.Or or35 if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.California_Title_24 - "Zone 11, 12 or 13" - annotation (Placement(transformation(extent={{-40,-340},{-20,-320}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or18 + "Zone 11, 12" + annotation (Placement(transformation(extent={{-140,-330},{-120,-310}}))); + Buildings.Controls.OBC.CDL.Logical.Or or36 if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.California_Title_24 - "Zone 14, 15 or 16" - annotation (Placement(transformation(extent={{-40,-380},{-20,-360}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or20 + "Zone 14, 15" + annotation (Placement(transformation(extent={{-140,-380},{-120,-360}}))); + Buildings.Controls.OBC.CDL.Logical.Or or20 if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.California_Title_24 "Zone 1, 3, 5, or 11 to 16" annotation (Placement(transformation(extent={{20,-340},{40,-320}}))); @@ -382,7 +383,7 @@ block AirEconomizerHighLimits "Specify the economizer high liimits" if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.California_Title_24 "Cut off temperature" annotation (Placement(transformation(extent={{200,-300},{220,-280}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or19 + Buildings.Controls.OBC.CDL.Logical.Or or19 if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.California_Title_24 "Zone 2, 4 or 10" annotation (Placement(transformation(extent={{-40,-430},{-20,-410}}))); @@ -399,7 +400,7 @@ block AirEconomizerHighLimits "Specify the economizer high liimits" if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.California_Title_24 "Cut off temperature" annotation (Placement(transformation(extent={{200,-390},{220,-370}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or21 + Buildings.Controls.OBC.CDL.Logical.Or or21 if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.California_Title_24 "Zone 6, 8 or 9" annotation (Placement(transformation(extent={{-40,-510},{-20,-490}}))); @@ -615,40 +616,83 @@ block AirEconomizerHighLimits "Specify the economizer high liimits" final message="Warning: Climate zone is not specified!") "Warning when the climate zone is not specified" annotation (Placement(transformation(extent={{440,940},{460,960}}))); - + Buildings.Controls.OBC.CDL.Logical.Or or22 + if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1 + "Zone 1b, 2b" + annotation (Placement(transformation(extent={{-60,900},{-40,920}}))); + Buildings.Controls.OBC.CDL.Logical.Or or24 + if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1 + "Zone 3c, 4b" + annotation (Placement(transformation(extent={{-60,830},{-40,850}}))); + Buildings.Controls.OBC.CDL.Logical.Or or25 + if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1 + "Zone 5b, 5c" + annotation (Placement(transformation(extent={{-60,780},{-40,800}}))); + Buildings.Controls.OBC.CDL.Logical.Or or26 + if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1 + "Logical or" + annotation (Placement(transformation(extent={{40,760},{60,780}}))); + Buildings.Controls.OBC.CDL.Logical.Or or27 + if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1 + "Zone 1b, 2b or 3b" + annotation (Placement(transformation(extent={{-20,560},{0,580}}))); + Buildings.Controls.OBC.CDL.Logical.Or or28 + if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1 + "Zone 3c, 4b or 4c" + annotation (Placement(transformation(extent={{-20,510},{0,530}}))); + Buildings.Controls.OBC.CDL.Logical.Or or29 + if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1 + "Zone 5a, 5b or 5c" + annotation (Placement(transformation(extent={{-20,460},{0,480}}))); + Buildings.Controls.OBC.CDL.Logical.Or or30 + if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1 + "Zone 6a, 6b or 7" + annotation (Placement(transformation(extent={{-20,410},{0,430}}))); + Buildings.Controls.OBC.CDL.Logical.Or or31 + if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1 + "Logical or" + annotation (Placement(transformation(extent={{20,560},{40,580}}))); + Buildings.Controls.OBC.CDL.Logical.Or or3 + if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1 + "Logical or" + annotation (Placement(transformation(extent={{60,560},{80,580}}))); + Buildings.Controls.OBC.CDL.Logical.Or or33 + if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1 + "Zone 1a, 2a or 3a" + annotation (Placement(transformation(extent={{-20,320},{0,340}}))); + Buildings.Controls.OBC.CDL.Logical.Or or34 + if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.California_Title_24 + "Zone 1, 3 or 5" + annotation (Placement(transformation(extent={{-100,-300},{-80,-280}}))); + Buildings.Controls.OBC.CDL.Logical.Or or17 + if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.California_Title_24 + "Zone 11, 12 or 13" + annotation (Placement(transformation(extent={{-100,-350},{-80,-330}}))); + Buildings.Controls.OBC.CDL.Logical.Or or18 + if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.California_Title_24 + "Zone 14, 15 or 16" + annotation (Placement(transformation(extent={{-100,-400},{-80,-380}}))); + Buildings.Controls.OBC.CDL.Logical.Or or32 + if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.California_Title_24 + "Logical or" + annotation (Placement(transformation(extent={{-60,-300},{-40,-280}}))); + Buildings.Controls.OBC.CDL.Logical.Or or38 + if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.California_Title_24 + "Zone 2, 4" + annotation (Placement(transformation(extent={{-140,-450},{-120,-430}}))); + Buildings.Controls.OBC.CDL.Logical.Or or39 + if eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.California_Title_24 + "Zone 6, 8" + annotation (Placement(transformation(extent={{-140,-540},{-120,-520}}))); equation - connect(ash1B.y, or3.u1) annotation (Line(points={{-358,1230},{-320,1230},{-320, - 858},{-42,858}}, color={255,0,255})); - connect(ash2B.y, or3.u2) annotation (Line(points={{-198,1230},{-160,1230},{-160, - 850},{-42,850}}, color={255,0,255})); - connect(ash3B.y, or3.u3) annotation (Line(points={{-438,1170},{-410,1170},{-410, - 842},{-42,842}}, color={255,0,255})); - connect(ash3C.y, or1.u1) annotation (Line(points={{-358,1170},{-330,1170},{-330, - 818},{-42,818}}, color={255,0,255})); - connect(ash4B.y, or1.u2) annotation (Line(points={{-198,1170},{-170,1170},{-170, - 810},{-42,810}}, color={255,0,255})); - connect(ash4C.y, or1.u3) annotation (Line(points={{-118,1170},{-90,1170},{-90, - 802},{-42,802}}, color={255,0,255})); - connect(ash5B.y, or2.u1) annotation (Line(points={{-358,1110},{-340,1110},{-340, - 778},{-42,778}}, color={255,0,255})); - connect(ash5C.y, or2.u2) annotation (Line(points={{-278,1110},{-260,1110},{-260, - 770},{-42,770}}, color={255,0,255})); - connect(ash6B.y, or2.u3) annotation (Line(points={{-118,1110},{-100,1110},{-100, - 762},{-42,762}}, color={255,0,255})); - connect(or3.y, or4.u1) annotation (Line(points={{-18,850},{0,850},{0,818},{18, - 818}}, color={255,0,255})); + connect(or23.y, or4.u1) annotation (Line(points={{2,870},{20,870},{20,810},{38, + 810}}, color={255,0,255})); connect(or1.y, or4.u2) - annotation (Line(points={{-18,810},{18,810}}, color={255,0,255})); - connect(or2.y, or4.u3) annotation (Line(points={{-18,770},{0,770},{0,802},{18, - 802}}, color={255,0,255})); + annotation (Line(points={{2,820},{12,820},{12,802},{38,802}}, color={255,0,255})); connect(ash7.y, or6.u1) annotation (Line(points={{-438,1050},{-430,1050},{-430, - 730},{-42,730}}, color={255,0,255})); + 730},{-22,730}}, color={255,0,255})); connect(ash8.y, or6.u2) annotation (Line(points={{-358,1050},{-350,1050},{-350, - 722},{-42,722}}, color={255,0,255})); - connect(or4.y, or7.u1) - annotation (Line(points={{42,810},{78,810}}, color={255,0,255})); - connect(or6.y, or7.u2) annotation (Line(points={{-18,730},{60,730},{60,802},{78, - 802}}, color={255,0,255})); + 722},{-22,722}}, color={255,0,255})); connect(ash5A.y, or5.u1) annotation (Line(points={{-438,1110},{-420,1110},{-420, 670},{78,670}}, color={255,0,255})); connect(ash6A.y, or5.u2) annotation (Line(points={{-198,1110},{-180,1110},{-180, @@ -676,57 +720,33 @@ equation connect(swi2.y, swi1.u3) annotation (Line(points={{402,590},{410,590},{410,662}, {418,662}}, color={0,0,127})); connect(ash1B.y, or10.u1) annotation (Line(points={{-358,1230},{-320,1230},{-320, - 558},{-42,558}}, color={255,0,255})); + 590},{-62,590}}, color={255,0,255})); connect(ash2B.y, or10.u2) annotation (Line(points={{-198,1230},{-160,1230},{-160, - 550},{-42,550}}, color={255,0,255})); - connect(ash3B.y, or10.u3) annotation (Line(points={{-438,1170},{-410,1170},{-410, - 542},{-42,542}}, color={255,0,255})); + 582},{-62,582}}, color={255,0,255})); connect(ash3C.y, or11.u1) annotation (Line(points={{-358,1170},{-330,1170},{-330, - 518},{-42,518}}, color={255,0,255})); + 540},{-62,540}}, color={255,0,255})); connect(ash4B.y, or11.u2) annotation (Line(points={{-198,1170},{-170,1170},{-170, - 510},{-42,510}}, color={255,0,255})); - connect(ash4C.y, or11.u3) annotation (Line(points={{-118,1170},{-90,1170},{-90, - 502},{-42,502}}, color={255,0,255})); + 532},{-62,532}}, color={255,0,255})); connect(ash5A.y, or12.u1) annotation (Line(points={{-438,1110},{-420,1110},{-420, - 478},{-42,478}}, color={255,0,255})); + 490},{-62,490}}, color={255,0,255})); connect(ash5B.y, or12.u2) annotation (Line(points={{-358,1110},{-340,1110},{-340, - 470},{-42,470}}, color={255,0,255})); - connect(ash5C.y, or12.u3) annotation (Line(points={{-278,1110},{-260,1110},{-260, - 462},{-42,462}}, color={255,0,255})); + 482},{-62,482}}, color={255,0,255})); connect(ash6A.y, or13.u1) annotation (Line(points={{-198,1110},{-180,1110},{-180, - 438},{-42,438}}, color={255,0,255})); + 440},{-62,440}}, color={255,0,255})); connect(ash6B.y, or13.u2) annotation (Line(points={{-118,1110},{-100,1110},{-100, - 430},{-42,430}}, color={255,0,255})); - connect(ash7.y, or13.u3) annotation (Line(points={{-438,1050},{-430,1050},{-430, - 422},{-42,422}}, color={255,0,255})); - connect(or10.y, or14.u1) annotation (Line(points={{-18,550},{0,550},{0,518},{18, - 518}}, color={255,0,255})); - connect(or11.y, or14.u2) - annotation (Line(points={{-18,510},{18,510}}, color={255,0,255})); - connect(or12.y, or14.u3) annotation (Line(points={{-18,470},{0,470},{0,502},{18, - 502}}, color={255,0,255})); - connect(or14.y, or15.u1) annotation (Line(points={{42,510},{60,510},{60,418},{ - 78,418}}, color={255,0,255})); - connect(or13.y, or15.u2) annotation (Line(points={{-18,430},{40,430},{40,410}, - {78,410}}, color={255,0,255})); - connect(ash8.y, or15.u3) annotation (Line(points={{-358,1050},{-350,1050},{-350, - 402},{78,402}}, color={255,0,255})); + 432},{-62,432}}, color={255,0,255})); connect(or15.y, and3.u1) annotation (Line(points={{102,410},{218,410}}, color={255,0,255})); connect(difDryBul.y, and3.u2) annotation (Line(points={{-498,970},{140,970},{140, 402},{218,402}}, color={255,0,255})); connect(and3.y, swi3.u2) annotation (Line(points={{242,410},{280,410},{280,430},{338,430}}, color={255,0,255})); - connect(TRet, swi3.u1) annotation (Line(points={{-560,570},{170,570},{170,438}, + connect(TRet, swi3.u1) annotation (Line(points={{-560,640},{170,640},{170,438}, {338,438}}, color={0,0,127})); - connect(ash1A.y, or8.u3) annotation (Line(points={{-438,1230},{-400,1230},{-400, - 342},{-42,342}}, color={255,0,255})); connect(ash2A.y, or8.u2) annotation (Line(points={{-278,1230},{-240,1230},{-240, - 350},{-42,350}}, color={255,0,255})); + 342},{-62,342}}, color={255,0,255})); connect(ash3A.y, or8.u1) annotation (Line(points={{-118,1230},{-80,1230},{-80, - 358},{-42,358}}, color={255,0,255})); - connect(or8.y, or9.u2) annotation (Line(points={{-18,350},{0,350},{0,362},{18, - 362}}, color={255,0,255})); + 350},{-62,350}}, color={255,0,255})); connect(ash4A.y, or9.u1) annotation (Line(points={{-278,1170},{-250,1170},{-250, 370},{18,370}}, color={255,0,255})); connect(or9.y, and4.u1) @@ -752,29 +772,17 @@ equation connect(swi4.y, hCut) annotation (Line(points={{402,40},{560,40}}, color={0,0,127})); connect(titZon1.y, or16.u1) annotation (Line(points={{-438,-50},{-400,-50},{-400, - -282},{-42,-282}}, color={255,0,255})); + -270},{-142,-270}},color={255,0,255})); connect(titZon3.y, or16.u2) annotation (Line(points={{-278,-50},{-240,-50},{-240, - -290},{-42,-290}}, color={255,0,255})); - connect(titZon5.y, or16.u3) annotation (Line(points={{-438,-110},{-410,-110},{ - -410,-298},{-42,-298}}, color={255,0,255})); - connect(titZon11.y, or17.u1) annotation (Line(points={{-278,-170},{-260,-170}, - {-260,-322},{-42,-322}}, color={255,0,255})); - connect(titZon12.y, or17.u2) annotation (Line(points={{-198,-170},{-180,-170}, - {-180,-330},{-42,-330}}, color={255,0,255})); - connect(titZon13.y, or17.u3) annotation (Line(points={{-438,-230},{-430,-230}, - {-430,-338},{-42,-338}}, color={255,0,255})); - connect(titZon14.y, or18.u1) annotation (Line(points={{-358,-230},{-350,-230}, - {-350,-362},{-42,-362}}, color={255,0,255})); - connect(titZon15.y, or18.u2) annotation (Line(points={{-278,-230},{-270,-230}, - {-270,-370},{-42,-370}}, color={255,0,255})); - connect(titZon16.y, or18.u3) annotation (Line(points={{-198,-230},{-190,-230}, - {-190,-378},{-42,-378}}, color={255,0,255})); - connect(or16.y, or20.u1) annotation (Line(points={{-18,-290},{0,-290},{0,-322}, - {18,-322}}, color={255,0,255})); - connect(or17.y, or20.u2) - annotation (Line(points={{-18,-330},{18,-330}}, color={255,0,255})); - connect(or18.y, or20.u3) annotation (Line(points={{-18,-370},{0,-370},{0,-338}, - {18,-338}}, color={255,0,255})); + -278},{-142,-278}},color={255,0,255})); + connect(titZon11.y,or35. u1) annotation (Line(points={{-278,-170},{-260,-170}, + {-260,-320},{-142,-320}},color={255,0,255})); + connect(titZon12.y,or35. u2) annotation (Line(points={{-198,-170},{-180,-170}, + {-180,-328},{-142,-328}},color={255,0,255})); + connect(titZon14.y,or36. u1) annotation (Line(points={{-358,-230},{-350,-230}, + {-350,-370},{-142,-370}},color={255,0,255})); + connect(titZon15.y,or36. u2) annotation (Line(points={{-278,-230},{-270,-230}, + {-270,-378},{-142,-378}},color={255,0,255})); connect(or20.y, and5.u1) annotation (Line(points={{42,-330},{198,-330}}, color={255,0,255})); connect(fixDryBul.y, and5.u2) annotation (Line(points={{-498,1010},{150,1010}, @@ -783,12 +791,6 @@ equation annotation (Line(points={{222,-330},{478,-330}}, color={255,0,255})); connect(con5.y, swi5.u1) annotation (Line(points={{222,-290},{240,-290},{240,-322}, {478,-322}}, color={0,0,127})); - connect(titZon2.y, or19.u1) annotation (Line(points={{-358,-50},{-320,-50},{-320, - -412},{-42,-412}}, color={255,0,255})); - connect(titZon4.y, or19.u2) annotation (Line(points={{-198,-50},{-160,-50},{-160, - -420},{-42,-420}}, color={255,0,255})); - connect(titZon10.y, or19.u3) annotation (Line(points={{-358,-170},{-340,-170}, - {-340,-428},{-42,-428}}, color={255,0,255})); connect(or19.y, and6.u1) annotation (Line(points={{-18,-420},{198,-420}}, color={255,0,255})); connect(fixDryBul.y, and6.u2) annotation (Line(points={{-498,1010},{150,1010}, @@ -803,14 +805,8 @@ equation annotation (Line(points={{222,-500},{398,-500}}, color={255,0,255})); connect(con7.y, swi7.u1) annotation (Line(points={{222,-460},{260,-460},{260,-492}, {398,-492}}, color={0,0,127})); - connect(titZon6.y, or21.u1) annotation (Line(points={{-358,-110},{-330,-110},{ - -330,-492},{-42,-492}}, color={255,0,255})); connect(or21.y, and7.u1) annotation (Line(points={{-18,-500},{198,-500}}, color={255,0,255})); - connect(titZon8.y, or21.u2) annotation (Line(points={{-198,-110},{-170,-110},{ - -170,-500},{-42,-500}}, color={255,0,255})); - connect(titZon9.y, or21.u3) annotation (Line(points={{-438,-170},{-420,-170},{ - -420,-508},{-42,-508}}, color={255,0,255})); connect(fixDryBul.y, and7.u2) annotation (Line(points={{-498,1010},{150,1010}, {150,-508},{198,-508}}, color={255,0,255})); connect(swi7.y, swi6.u3) annotation (Line(points={{422,-500},{430,-500},{430,-428}, @@ -826,7 +822,7 @@ equation connect(and8.y, swi9.u2) annotation (Line(points={{222,-650},{320,-650},{320,-630},{478,-630}}, color={255,0,255})); - connect(TRet, swi9.u1) annotation (Line(points={{-560,570},{170,570},{170,-622}, + connect(TRet, swi9.u1) annotation (Line(points={{-560,640},{170,640},{170,-622}, {478,-622}}, color={0,0,127})); connect(swi10.y, swi9.u3) annotation (Line(points={{462,-730},{470,-730},{470, -638},{478,-638}}, color={0,0,127})); @@ -834,7 +830,7 @@ equation {198,-730}}, color={255,0,255})); connect(difDryBul.y, and9.u2) annotation (Line(points={{-498,970},{140,970},{140, -738},{198,-738}}, color={255,0,255})); - connect(TRet, addPar.u) annotation (Line(points={{-560,570},{170,570},{170,-690}, + connect(TRet, addPar.u) annotation (Line(points={{-560,640},{170,640},{170,-690}, {278,-690}}, color={0,0,127})); connect(and9.y, swi10.u2) annotation (Line(points={{222,-730},{438,-730}}, color={255,0,255})); @@ -850,7 +846,7 @@ equation 140,-818},{198,-818}}, color={255,0,255})); connect(addPar1.y, swi11.u1) annotation (Line(points={{302,-770},{330,-770},{330, -802},{398,-802}}, color={0,0,127})); - connect(TRet, addPar1.u) annotation (Line(points={{-560,570},{170,570},{170,-770}, + connect(TRet, addPar1.u) annotation (Line(points={{-560,640},{170,640},{170,-770}, {278,-770}}, color={0,0,127})); connect(addPar2.y, swi12.u1) annotation (Line(points={{302,-850},{340,-850},{340, -882},{358,-882}}, color={0,0,127})); @@ -858,7 +854,7 @@ equation -818},{398,-818}}, color={0,0,127})); connect(difDryBul.y, swi12.u2) annotation (Line(points={{-498,970},{140,970},{ 140,-890},{358,-890}}, color={255,0,255})); - connect(TRet, addPar2.u) annotation (Line(points={{-560,570},{170,570},{170,-850}, + connect(TRet, addPar2.u) annotation (Line(points={{-560,640},{170,640},{170,-850}, {278,-850}}, color={0,0,127})); connect(swi8.y, swi7.u3) annotation (Line(points={{382,-580},{390,-580},{390,-508}, {398,-508}}, color={0,0,127})); @@ -898,7 +894,7 @@ equation annotation (Line(points={{242,280},{298,280}}, color={255,0,255})); connect(con3.y, min1.u1) annotation (Line(points={{42,160},{100,160},{100,326}, {218,326}},color={0,0,127})); - connect(TRet, min1.u2) annotation (Line(points={{-560,570},{170,570},{170,314}, + connect(TRet, min1.u2) annotation (Line(points={{-560,640},{170,640},{170,314}, {218,314}},color={0,0,127})); connect(min1.y, swi13.u1) annotation (Line(points={{242,320},{280,320},{280,288}, {298,288}},color={0,0,127})); @@ -910,7 +906,7 @@ equation 890},{120,190},{218,190}}, color={255,0,255})); connect(con12.y, min2.u1) annotation (Line(points={{42,260},{80,260},{80,236}, {218,236}}, color={0,0,127})); - connect(TRet, min2.u2) annotation (Line(points={{-560,570},{170,570},{170,224}, + connect(TRet, min2.u2) annotation (Line(points={{-560,640},{170,640},{170,224}, {218,224}},color={0,0,127})); connect(and13.y, swi14.u2) annotation (Line(points={{242,190},{258,190}}, color={255,0,255})); @@ -932,7 +928,7 @@ equation annotation (Line(points={{222,-980},{478,-980}}, color={255,0,255})); connect(con5.y, min3.u1) annotation (Line(points={{222,-290},{240,-290},{240,-944}, {358,-944}}, color={0,0,127})); - connect(TRet, min3.u2) annotation (Line(points={{-560,570},{170,570},{170,-956}, + connect(TRet, min3.u2) annotation (Line(points={{-560,640},{170,640},{170,-956}, {358,-956}}, color={0,0,127})); connect(min3.y, swi15.u1) annotation (Line(points={{382,-950},{400,-950},{400, -972},{478,-972}}, color={0,0,127})); @@ -996,6 +992,112 @@ equation annotation (Line(points={{382,950},{398,950}}, color={255,0,255})); connect(not4.y,assMes3. u) annotation (Line(points={{422,950},{438,950}}, color={255,0,255})); + connect(ash1B.y, or22.u1) annotation (Line(points={{-358,1230},{-320,1230},{-320, + 910},{-62,910}}, color={255,0,255})); + connect(ash2B.y, or22.u2) annotation (Line(points={{-198,1230},{-160,1230},{-160, + 902},{-62,902}}, color={255,0,255})); + connect(ash3B.y, or23.u2) annotation (Line(points={{-438,1170},{-410,1170},{-410, + 862},{-22,862}}, color={255,0,255})); + connect(or22.y, or23.u1) annotation (Line(points={{-38,910},{-30,910},{-30,870}, + {-22,870}}, color={255,0,255})); + connect(ash3C.y, or24.u1) annotation (Line(points={{-358,1170},{-330,1170},{-330, + 840},{-62,840}}, color={255,0,255})); + connect(ash4B.y, or24.u2) annotation (Line(points={{-198,1170},{-170,1170},{-170, + 832},{-62,832}}, color={255,0,255})); + connect(or24.y, or1.u1) annotation (Line(points={{-38,840},{-30,840},{-30,820}, + {-22,820}}, color={255,0,255})); + connect(ash4C.y, or1.u2) annotation (Line(points={{-118,1170},{-90,1170},{-90, + 812},{-22,812}}, color={255,0,255})); + connect(ash5B.y, or25.u1) annotation (Line(points={{-358,1110},{-340,1110},{-340, + 790},{-62,790}}, color={255,0,255})); + connect(ash5C.y, or25.u2) annotation (Line(points={{-278,1110},{-260,1110},{-260, + 782},{-62,782}}, color={255,0,255})); + connect(ash6B.y, or2.u2) annotation (Line(points={{-118,1110},{-100,1110},{-100, + 762},{-22,762}}, color={255,0,255})); + connect(or25.y, or2.u1) annotation (Line(points={{-38,790},{-30,790},{-30,770}, + {-22,770}}, color={255,0,255})); + connect(or2.y, or26.u1) + annotation (Line(points={{2,770},{38,770}}, color={255,0,255})); + connect(or6.y, or26.u2) annotation (Line(points={{2,730},{20,730},{20,762},{38, + 762}}, color={255,0,255})); + connect(or4.y, or7.u1) + annotation (Line(points={{62,810},{78,810}}, color={255,0,255})); + connect(or26.y, or7.u2) annotation (Line(points={{62,770},{70,770},{70,802},{78, + 802}}, color={255,0,255})); + connect(or10.y, or27.u1) annotation (Line(points={{-38,590},{-30,590},{-30,570}, + {-22,570}}, color={255,0,255})); + connect(ash3B.y, or27.u2) annotation (Line(points={{-438,1170},{-410,1170},{-410, + 562},{-22,562}}, color={255,0,255})); + connect(ash4C.y, or28.u2) annotation (Line(points={{-118,1170},{-90,1170},{-90, + 512},{-22,512}}, color={255,0,255})); + connect(or11.y, or28.u1) annotation (Line(points={{-38,540},{-30,540},{-30,520}, + {-22,520}}, color={255,0,255})); + connect(ash5C.y, or29.u2) annotation (Line(points={{-278,1110},{-260,1110},{-260, + 462},{-22,462}}, color={255,0,255})); + connect(or12.y, or29.u1) annotation (Line(points={{-38,490},{-30,490},{-30,470}, + {-22,470}}, color={255,0,255})); + connect(ash7.y, or30.u2) annotation (Line(points={{-438,1050},{-430,1050},{-430, + 412},{-22,412}}, color={255,0,255})); + connect(or13.y, or30.u1) annotation (Line(points={{-38,440},{-30,440},{-30,420}, + {-22,420}}, color={255,0,255})); + connect(or27.y, or31.u1) + annotation (Line(points={{2,570},{18,570}}, color={255,0,255})); + connect(or28.y, or31.u2) annotation (Line(points={{2,520},{10,520},{10,562},{18, + 562}}, color={255,0,255})); + connect(or29.y, or14.u1) + annotation (Line(points={{2,470},{18,470}}, color={255,0,255})); + connect(or30.y, or14.u2) annotation (Line(points={{2,420},{10,420},{10,462},{18, + 462}}, color={255,0,255})); + connect(or31.y, or3.u1) + annotation (Line(points={{42,570},{58,570}}, color={255,0,255})); + connect(or14.y, or3.u2) annotation (Line(points={{42,470},{50,470},{50,562},{58, + 562}}, color={255,0,255})); + connect(ash8.y, or15.u2) annotation (Line(points={{-358,1050},{-350,1050},{-350, + 402},{78,402}}, color={255,0,255})); + connect(or3.y, or15.u1) annotation (Line(points={{82,570},{90,570},{90,440},{60, + 440},{60,410},{78,410}}, color={255,0,255})); + connect(or33.y, or9.u2) annotation (Line(points={{2,330},{10,330},{10,362},{18, + 362}}, color={255,0,255})); + connect(or8.y, or33.u1) annotation (Line(points={{-38,350},{-32,350},{-32,330}, + {-22,330}}, color={255,0,255})); + connect(ash1A.y, or33.u2) annotation (Line(points={{-438,1230},{-400,1230},{-400, + 322},{-22,322}}, color={255,0,255})); + connect(titZon5.y, or34.u2) annotation (Line(points={{-438,-110},{-410,-110},{ + -410,-298},{-102,-298}}, color={255,0,255})); + connect(or16.y, or34.u1) annotation (Line(points={{-118,-270},{-110,-270},{-110, + -290},{-102,-290}}, color={255,0,255})); + connect(titZon13.y, or17.u2) annotation (Line(points={{-438,-230},{-430,-230}, + {-430,-348},{-102,-348}}, color={255,0,255})); + connect(or35.y, or17.u1) annotation (Line(points={{-118,-320},{-110,-320},{-110, + -340},{-102,-340}}, color={255,0,255})); + connect(titZon16.y, or18.u2) annotation (Line(points={{-198,-230},{-190,-230}, + {-190,-398},{-102,-398}}, color={255,0,255})); + connect(or36.y, or18.u1) annotation (Line(points={{-118,-370},{-110,-370},{-110, + -390},{-102,-390}}, color={255,0,255})); + connect(or34.y, or32.u1) + annotation (Line(points={{-78,-290},{-62,-290}}, color={255,0,255})); + connect(or17.y, or32.u2) annotation (Line(points={{-78,-340},{-70,-340},{-70,-298}, + {-62,-298}}, color={255,0,255})); + connect(or32.y, or20.u1) annotation (Line(points={{-38,-290},{-20,-290},{-20,-330}, + {18,-330}}, color={255,0,255})); + connect(or18.y, or20.u2) annotation (Line(points={{-78,-390},{-20,-390},{-20,-338}, + {18,-338}}, color={255,0,255})); + connect(titZon2.y, or38.u2) annotation (Line(points={{-358,-50},{-320,-50},{-320, + -448},{-142,-448}}, color={255,0,255})); + connect(titZon4.y, or38.u1) annotation (Line(points={{-198,-50},{-160,-50},{-160, + -440},{-142,-440}}, color={255,0,255})); + connect(titZon10.y, or19.u1) annotation (Line(points={{-358,-170},{-340,-170}, + {-340,-420},{-42,-420}}, color={255,0,255})); + connect(or38.y, or19.u2) annotation (Line(points={{-118,-440},{-100,-440},{-100, + -428},{-42,-428}}, color={255,0,255})); + connect(titZon8.y, or39.u1) annotation (Line(points={{-198,-110},{-170,-110},{ + -170,-530},{-142,-530}}, color={255,0,255})); + connect(titZon6.y, or39.u2) annotation (Line(points={{-358,-110},{-330,-110},{ + -330,-538},{-142,-538}}, color={255,0,255})); + connect(titZon9.y, or21.u1) annotation (Line(points={{-438,-170},{-420,-170},{ + -420,-500},{-42,-500}}, color={255,0,255})); + connect(or39.y, or21.u2) annotation (Line(points={{-118,-530},{-100,-530},{-100, + -508},{-42,-508}}, color={255,0,255})); annotation (defaultComponentName="ecoHigLim", Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}), graphics={ diff --git a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/CoolingOnly/Subsequences/ActiveAirFlow.mo b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/CoolingOnly/Subsequences/ActiveAirFlow.mo index 0e2a4a932d0..6c6fb36b318 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/CoolingOnly/Subsequences/ActiveAirFlow.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/CoolingOnly/Subsequences/ActiveAirFlow.mo @@ -36,13 +36,14 @@ block ActiveAirFlow annotation (Placement(transformation(extent={{120,-100},{160,-60}}), iconTransformation(extent={{100,-80},{140,-40}}))); +protected Buildings.Controls.OBC.CDL.Conversions.BooleanToReal actCooMax( final realTrue=VCooMax_flow) "Active cooling maximum airflow setpoint" annotation (Placement(transformation(extent={{80,60},{100,80}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or3 + Buildings.Controls.OBC.CDL.Logical.Or or3 "Check if it is in occupied, cooldown, or setup mode" - annotation (Placement(transformation(extent={{40,60},{60,80}}))); + annotation (Placement(transformation(extent={{0,60},{20,80}}))); Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea( final realTrue=1) "Convert boolean to real" @@ -56,7 +57,7 @@ block ActiveAirFlow annotation (Placement(transformation(extent={{-100,90},{-80,110}}))); Buildings.Controls.OBC.CDL.Integers.Equal intEqu "Check if current operation mode is occupied mode" - annotation (Placement(transformation(extent={{-40,90},{-20,110}}))); + annotation (Placement(transformation(extent={{-60,90},{-40,110}}))); Buildings.Controls.OBC.CDL.Integers.Sources.Constant cooDowMod( final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.coolDown) "Cool down mode" @@ -67,34 +68,33 @@ block ActiveAirFlow annotation (Placement(transformation(extent={{-100,-40},{-80,-20}}))); Buildings.Controls.OBC.CDL.Integers.Equal intEqu2 "Check if current operation mode is setup mode" - annotation (Placement(transformation(extent={{-40,-40},{-20,-20}}))); + annotation (Placement(transformation(extent={{-60,-40},{-40,-20}}))); Buildings.Controls.OBC.CDL.Integers.Equal intEqu1 "Check if current operation mode is cool-down mode" - annotation (Placement(transformation(extent={{-40,30},{-20,50}}))); + annotation (Placement(transformation(extent={{-60,30},{-40,50}}))); + Buildings.Controls.OBC.CDL.Logical.Or or2 + "Check if it is in occupied, cooldown, or setup mode" + annotation (Placement(transformation(extent={{40,60},{60,80}}))); equation connect(occMod.y, intEqu.u1) - annotation (Line(points={{-78,100},{-42,100}}, color={255,127,0})); + annotation (Line(points={{-78,100},{-62,100}}, color={255,127,0})); connect(intEqu2.u1, setUpMod.y) - annotation (Line(points={{-42,-30},{-78,-30}}, color={255,127,0})); + annotation (Line(points={{-62,-30},{-78,-30}}, color={255,127,0})); connect(cooDowMod.y, intEqu1.u1) - annotation (Line(points={{-78,40},{-42,40}}, color={255,127,0})); + annotation (Line(points={{-78,40},{-62,40}}, color={255,127,0})); connect(uOpeMod, intEqu.u2) - annotation (Line(points={{-140,0},{-60,0},{-60,92},{-42,92}}, color={255,127,0})); - connect(uOpeMod, intEqu1.u2) annotation (Line(points={{-140,0},{-60,0},{-60,32}, - {-42,32}}, color={255,127,0})); - connect(uOpeMod, intEqu2.u2) annotation (Line(points={{-140,0},{-60,0},{-60,-38}, - {-42,-38}}, color={255,127,0})); - connect(intEqu.y, or3.u1) annotation (Line(points={{-18,100},{0,100},{0,78},{38, - 78}}, color={255,0,255})); - connect(intEqu1.y, or3.u2) annotation (Line(points={{-18,40},{10,40},{10,70},{ - 38,70}}, color={255,0,255})); - connect(intEqu2.y, or3.u3) annotation (Line(points={{-18,-30},{20,-30},{20,62}, - {38,62}}, color={255,0,255})); - connect(or3.y, actCooMax.u) - annotation (Line(points={{62,70},{78,70}}, color={255,0,255})); - connect(intEqu.y, booToRea.u) annotation (Line(points={{-18,100},{0,100},{0,-60}, - {18,-60}}, color={255,0,255})); + annotation (Line(points={{-140,0},{-70,0},{-70,92},{-62,92}}, color={255,127,0})); + connect(uOpeMod, intEqu1.u2) annotation (Line(points={{-140,0},{-70,0},{-70,32}, + {-62,32}}, color={255,127,0})); + connect(uOpeMod, intEqu2.u2) annotation (Line(points={{-140,0},{-70,0},{-70,-38}, + {-62,-38}}, color={255,127,0})); + connect(intEqu.y, or3.u1) annotation (Line(points={{-38,100},{-30,100},{-30,70}, + {-2,70}}, color={255,0,255})); + connect(intEqu1.y, or3.u2) annotation (Line(points={{-38,40},{-20,40},{-20,62}, + {-2,62}}, color={255,0,255})); + connect(intEqu.y, booToRea.u) annotation (Line(points={{-38,100},{-30,100},{-30, + -60},{18,-60}},color={255,0,255})); connect(booToRea.y, actMin.u1) annotation (Line(points={{42,-60},{50,-60},{50, -74},{58,-74}}, color={0,0,127})); connect(VOccMin_flow, actMin.u2) annotation (Line(points={{-140,-100},{41,-100}, @@ -105,7 +105,12 @@ equation annotation (Line(points={{82,-80},{140,-80}}, color={0,0,127})); connect(actMin.y, VActMin_flow) annotation (Line(points={{82,-80},{100,-80},{100, -30},{140,-30}}, color={0,0,127})); - + connect(or3.y, or2.u1) + annotation (Line(points={{22,70},{38,70}}, color={255,0,255})); + connect(intEqu2.y, or2.u2) annotation (Line(points={{-38,-30},{30,-30},{30,62}, + {38,62}}, color={255,0,255})); + connect(or2.y, actCooMax.u) + annotation (Line(points={{62,70},{78,70}}, color={255,0,255})); annotation (defaultComponentName="actAirSet", Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}), graphics={ diff --git a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/CoolingOnly/Subsequences/Dampers.mo b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/CoolingOnly/Subsequences/Dampers.mo index 5b01742a500..5215c198bc9 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/CoolingOnly/Subsequences/Dampers.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/CoolingOnly/Subsequences/Dampers.mo @@ -100,6 +100,7 @@ block Dampers annotation (Placement(transformation(extent={{260,-280},{300,-240}}), iconTransformation(extent={{100,-110},{140,-70}}))); +protected Buildings.Controls.OBC.CDL.Reals.Sources.Constant con( final k=0) "Constant zero" annotation (Placement(transformation(extent={{-220,210},{-200,230}}))); @@ -186,9 +187,9 @@ block Dampers Buildings.Controls.OBC.CDL.Reals.Switch swi1 "Airflow setpoint after considering override" annotation (Placement(transformation(extent={{40,-90},{60,-70}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or3 + Buildings.Controls.OBC.CDL.Logical.Or or3 "Check if the airflow setpoint should be overrided" - annotation (Placement(transformation(extent={{-80,-90},{-60,-70}}))); + annotation (Placement(transformation(extent={{-120,-110},{-100,-90}}))); Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt4( final k=1) "Constant 1" @@ -219,6 +220,9 @@ block Dampers Buildings.Controls.OBC.CDL.Reals.Switch swi2 "Damper setpoint position after considering override" annotation (Placement(transformation(extent={{220,-270},{240,-250}}))); + Buildings.Controls.OBC.CDL.Logical.Or or1 + "Check if the airflow setpoint should be overrided" + annotation (Placement(transformation(extent={{-40,-90},{-20,-70}}))); equation connect(conInt.y, cooSta.u1) @@ -259,7 +263,7 @@ equation {80,-184},{98,-184}}, color={0,0,127})); connect(VDisSet_flowNor.y, conPID.u_s) annotation (Line(points={{122,-130},{136,-130},{136,-110},{148,-110}}, - color={0,0,127})); + color={0,0,127})); connect(VDis_flowNor.y, conPID.u_m) annotation (Line(points={{122,-190},{160, -190},{160,-122}}, color={0,0,127})); connect(oveFloSet,forZerFlo. u1) @@ -288,14 +292,6 @@ equation {-42,26}}, color={0,0,127})); connect(add2.y,add1. u2) annotation (Line(points={{-58,-20},{-50,-20},{-50,14}, {-42,14}}, color={0,0,127})); - connect(forZerFlo.y,or3. u1) annotation (Line(points={{-158,40},{-140,40},{-140, - -72},{-82,-72}}, color={255,0,255})); - connect(forCooMax.y,or3. u2) annotation (Line(points={{-158,0},{-140,0},{-140, - -80},{-82,-80}}, color={255,0,255})); - connect(forMinFlo.y,or3. u3) annotation (Line(points={{-158,-40},{-140,-40},{-140, - -88},{-82,-88}}, color={255,0,255})); - connect(or3.y, swi1.u2) - annotation (Line(points={{-58,-80},{38,-80}}, color={255,0,255})); connect(add1.y, swi1.u1) annotation (Line(points={{-18,20},{0,20},{0,-72},{38, -72}}, color={0,0,127})); connect(swi1.y, VSet_flow) @@ -335,6 +331,18 @@ equation {218,-252}}, color={0,0,127})); connect(u1Fan, conPID.trigger) annotation (Line(points={{-280,-150},{154,-150}, {154,-122}}, color={255,0,255})); + connect(or1.y, swi1.u2) + annotation (Line(points={{-18,-80},{38,-80}}, color={255,0,255})); + connect(or3.y, or1.u2) annotation (Line(points={{-98,-100},{-60,-100},{-60,-88}, + {-42,-88}}, color={255,0,255})); + connect(forMinFlo.y, or1.u1) annotation (Line(points={{-158,-40},{-134,-40},{-134, + -80},{-42,-80}}, color={255,0,255})); + connect(forCooMax.y, or3.u1) annotation (Line(points={{-158,0},{-140,0},{-140, + -100},{-122,-100}}, + color={255,0,255})); + connect(forZerFlo.y, or3.u2) annotation (Line(points={{-158,40},{-146,40},{ + -146,-108},{-122,-108}}, + color={255,0,255})); annotation ( defaultComponentName="damCon", Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-260,-300},{260,300}})), diff --git a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctColdDuctMin/Subsequences/ActiveAirFlow.mo b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctColdDuctMin/Subsequences/ActiveAirFlow.mo index 55123eec788..f9596d69d87 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctColdDuctMin/Subsequences/ActiveAirFlow.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctColdDuctMin/Subsequences/ActiveAirFlow.mo @@ -59,9 +59,9 @@ protected final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.setUp) "Setup mode" annotation (Placement(transformation(extent={{-120,-20},{-100,0}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or3 + Buildings.Controls.OBC.CDL.Logical.Or or3 "Check if it is in occupied, cooldown, or setup mode" - annotation (Placement(transformation(extent={{40,130},{60,150}}))); + annotation (Placement(transformation(extent={{0,130},{20,150}}))); Buildings.Controls.OBC.CDL.Conversions.BooleanToReal actCooMax( final realTrue=VCooMax_flow) "Active cooling maximum flow" @@ -100,9 +100,9 @@ protected Buildings.Controls.OBC.CDL.Integers.Equal ifSetBac "Check if current operation mode is setback mode" annotation (Placement(transformation(extent={{-80,-150},{-60,-130}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or1 + Buildings.Controls.OBC.CDL.Logical.Or or1 "Check if it is in occupied, warm-up, or setback mode" - annotation (Placement(transformation(extent={{40,-120},{60,-100}}))); + annotation (Placement(transformation(extent={{0,-120},{20,-100}}))); Buildings.Controls.OBC.CDL.Reals.Add add2 "Sum of minimum flow and cooling maximum flow" annotation (Placement(transformation(extent={{20,-60},{40,-40}}))); @@ -122,6 +122,12 @@ protected final k=VCooMax_flow) "Cooling maximum flow" annotation (Placement(transformation(extent={{0,0},{20,20}}))); + Buildings.Controls.OBC.CDL.Logical.Or or2 + "Check if it is in occupied, cooldown, or setup mode" + annotation (Placement(transformation(extent={{40,130},{60,150}}))); + Buildings.Controls.OBC.CDL.Logical.Or or4 + "Check if it is in occupied, warm-up, or setback mode" + annotation (Placement(transformation(extent={{40,-120},{60,-100}}))); equation connect(occMod.y, ifOcc.u1) @@ -144,14 +150,10 @@ equation -148},{-82,-148}}, color={255,127,0})); connect(setBacMod.y, ifSetBac.u1) annotation (Line(points={{-98,-140},{-82,-140}}, color={255,127,0})); - connect(ifOcc.y, or3.u1) annotation (Line(points={{-58,130},{-30,130},{-30,148}, - {38,148}}, color={255,0,255})); - connect(ifCooDow.y, or3.u2) annotation (Line(points={{-58,60},{-20,60},{-20,140}, - {38,140}}, color={255,0,255})); - connect(ifSetUp.y, or3.u3) annotation (Line(points={{-58,-10},{-10,-10},{-10,132}, - {38,132}}, color={255,0,255})); - connect(or3.y, actCooMax.u) - annotation (Line(points={{62,140},{98,140}}, color={255,0,255})); + connect(ifOcc.y, or3.u1) annotation (Line(points={{-58,130},{-30,130},{-30,140}, + {-2,140}}, color={255,0,255})); + connect(ifCooDow.y, or3.u2) annotation (Line(points={{-58,60},{-20,60},{-20,132}, + {-2,132}}, color={255,0,255})); connect(ifOcc.y, occModInd.u) annotation (Line(points={{-58,130},{-30,130},{-30, 100},{38,100}}, color={255,0,255})); connect(VOccMin_flow, pro.u2) @@ -162,14 +164,10 @@ equation annotation (Line(points={{122,140},{160,140}}, color={0,0,127})); connect(pro.y, VActMin_flow) annotation (Line(points={{122,90},{160,90}}, color={0,0,127})); - connect(ifOcc.y, or1.u1) annotation (Line(points={{-58,130},{-30,130},{-30,-102}, - {38,-102}},color={255,0,255})); - connect(ifWarUp.y, or1.u2) annotation (Line(points={{-58,-80},{-40,-80},{-40,-110}, - {38,-110}}, color={255,0,255})); - connect(ifSetBac.y, or1.u3) annotation (Line(points={{-58,-140},{-20,-140},{-20, - -118},{38,-118}}, color={255,0,255})); - connect(or1.y, heaMaxFlo.u) - annotation (Line(points={{62,-110},{98,-110}}, color={255,0,255})); + connect(ifOcc.y, or1.u1) annotation (Line(points={{-58,130},{-30,130},{-30,-110}, + {-2,-110}},color={255,0,255})); + connect(ifWarUp.y, or1.u2) annotation (Line(points={{-58,-80},{-40,-80},{-40,-118}, + {-2,-118}}, color={255,0,255})); connect(heaMaxFlo.y, VActHeaMax_flow) annotation (Line(points={{122,-110},{160,-110}}, color={0,0,127})); connect(heaMax.y, add2.u2) annotation (Line(points={{2,-70},{10,-70},{10,-56}, @@ -182,7 +180,18 @@ equation annotation (Line(points={{82,10},{98,10}}, color={255,0,255})); connect(VOccMin_flow, add2.u1) annotation (Line(points={{-160,84},{-50,84},{-50, -44},{18,-44}}, color={0,0,127})); - + connect(or3.y, or2.u1) + annotation (Line(points={{22,140},{38,140}}, color={255,0,255})); + connect(or2.y, actCooMax.u) + annotation (Line(points={{62,140},{98,140}}, color={255,0,255})); + connect(ifSetUp.y, or2.u2) annotation (Line(points={{-58,-10},{30,-10},{30,132}, + {38,132}}, color={255,0,255})); + connect(or4.y, heaMaxFlo.u) + annotation (Line(points={{62,-110},{98,-110}}, color={255,0,255})); + connect(or1.y, or4.u1) + annotation (Line(points={{22,-110},{38,-110}}, color={255,0,255})); + connect(ifSetBac.y, or4.u2) annotation (Line(points={{-58,-140},{30,-140},{30, + -118},{38,-118}}, color={255,0,255})); annotation ( defaultComponentName="actAirSet", Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-140,-160},{140,160}})), diff --git a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctColdDuctMin/Subsequences/Overrides.mo b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctColdDuctMin/Subsequences/Overrides.mo index 63c868ee8e1..51e1296d5fc 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctColdDuctMin/Subsequences/Overrides.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctColdDuctMin/Subsequences/Overrides.mo @@ -65,6 +65,7 @@ block Overrides "Software switches to override setpoints" annotation (Placement(transformation(extent={{140,-220},{180,-180}}), iconTransformation(extent={{100,-80},{140,-40}}))); +protected Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt( final k=1) "Constant 1" @@ -101,10 +102,12 @@ block Overrides "Software switches to override setpoints" annotation (Placement(transformation(extent={{28,150},{48,170}}))); Buildings.Controls.OBC.CDL.Reals.Add add1 "Add up inputs" annotation (Placement(transformation(extent={{62,190},{82,210}}))); - Buildings.Controls.OBC.CDL.Reals.Switch swi "Airflow setpoint after considering override" + Buildings.Controls.OBC.CDL.Reals.Switch swi + "Airflow setpoint after considering override" annotation (Placement(transformation(extent={{100,30},{120,50}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or3 "Check if the airflow setpoint should be overrided" - annotation (Placement(transformation(extent={{-20,50},{0,70}}))); + Buildings.Controls.OBC.CDL.Logical.Or or3 + "Check if the airflow setpoint should be overrided" + annotation (Placement(transformation(extent={{-40,60},{-20,80}}))); Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt3( final k=1) "Constant 1" @@ -183,6 +186,9 @@ block Overrides "Software switches to override setpoints" Buildings.Controls.OBC.CDL.Reals.Switch swi2 "Damper setpoint position after considering override" annotation (Placement(transformation(extent={{80,-210},{100,-190}}))); + Buildings.Controls.OBC.CDL.Logical.Or or5 + "Check if the airflow setpoint should be overrided" + annotation (Placement(transformation(extent={{0,50},{20,70}}))); equation connect(oveFloSet, forZerFlo.u1) @@ -201,18 +207,16 @@ equation annotation (Line(points={{-58,220},{-42,220}}, color={255,0,255})); connect(forCooMax.y, cooMax.u) annotation (Line(points={{-58,180},{-42,180}}, color={255,0,255})); - connect(forMinFlo.y, minFlo.u) - annotation (Line(points={{-58,140},{-42,140}}, color={255,0,255})); connect(cooMax.y, add2.u1) annotation (Line(points={{-18,180},{0,180},{0,166}, {26,166}},color={0,0,127})); connect(zerFlo.y, add1.u1) annotation (Line(points={{-18,220},{20,220},{20,206}, {60,206}}, color={0,0,127})); - connect(forZerFlo.y, or3.u1) annotation (Line(points={{-58,220},{-50,220},{-50, - 68},{-22,68}},color={255,0,255})); - connect(forCooMax.y, or3.u2) annotation (Line(points={{-58,180},{-50,180},{-50, - 60},{-22,60}},color={255,0,255})); - connect(forMinFlo.y, or3.u3) annotation (Line(points={{-58,140},{-50,140},{-50, - 52},{-22,52}}, color={255,0,255})); + connect(forZerFlo.y, or3.u1) annotation (Line(points={{-58,220},{-50,220},{ + -50,70},{-42,70}}, + color={255,0,255})); + connect(forCooMax.y, or3.u2) annotation (Line(points={{-58,180},{-50,180},{ + -50,62},{-42,62}}, + color={255,0,255})); connect(add1.y, swi.u1) annotation (Line(points={{84,200},{90,200},{90,48},{98, 48}}, color={0,0,127})); connect(VActSet_flow, swi.u3) annotation (Line(points={{-160,20},{80,20},{80,32}, @@ -261,10 +265,9 @@ equation {-8,114}},color={0,0,127})); connect(add4.y, add2.u2) annotation (Line(points={{16,120},{22,120},{22,154},{ 26,154}}, color={0,0,127})); - connect(or3.y, or1.u1) annotation (Line(points={{2,60},{20,60},{20,40},{38,40}}, - color={255,0,255})); - connect(forMinFlo1.y, or1.u2) annotation (Line(points={{-58,100},{-50,100},{-50, - 32},{38,32}}, color={255,0,255})); + connect(forMinFlo1.y, or1.u2) annotation (Line(points={{-58,100},{-50,100},{ + -50,32},{38,32}}, + color={255,0,255})); connect(or1.y, swi.u2) annotation (Line(points={{62,40},{98,40}}, color={255,0,255})); connect(conInt6.y,intEqu1. u2) annotation (Line(points={{-98,-160},{-90,-160}, @@ -295,7 +298,14 @@ equation {78,-208}}, color={0,0,127})); connect(swi2.y, yHeaDam) annotation (Line(points={{102,-200},{160,-200}}, color={0,0,127})); - + connect(or3.y, or5.u1) annotation (Line(points={{-18,70},{-12,70},{-12,60},{-2, + 60}}, color={255,0,255})); + connect(or5.y, or1.u1) annotation (Line(points={{22,60},{30,60},{30,40},{38,40}}, + color={255,0,255})); + connect(forMinFlo.y, minFlo.u) + annotation (Line(points={{-58,140},{-42,140}}, color={255,0,255})); + connect(forMinFlo.y, or5.u2) annotation (Line(points={{-58,140},{-50,140},{-50, + 52},{-2,52}}, color={255,0,255})); annotation (defaultComponentName="ove", Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}), graphics={ diff --git a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctMixConDischargeSensor/Subsequences/ActiveAirFlow.mo b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctMixConDischargeSensor/Subsequences/ActiveAirFlow.mo index 4f8980fd91b..c8a7a0f0d07 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctMixConDischargeSensor/Subsequences/ActiveAirFlow.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctMixConDischargeSensor/Subsequences/ActiveAirFlow.mo @@ -56,9 +56,9 @@ protected final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.setUp) "Setup mode" annotation (Placement(transformation(extent={{-100,-20},{-80,0}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or3 + Buildings.Controls.OBC.CDL.Logical.Or or3 "Check if it is in occupied, cooldown, or setup mode" - annotation (Placement(transformation(extent={{40,120},{60,140}}))); + annotation (Placement(transformation(extent={{20,120},{40,140}}))); Buildings.Controls.OBC.CDL.Conversions.BooleanToReal actCooMax( final realTrue=VCooMax_flow) "Active cooling maximum flow" @@ -66,7 +66,7 @@ protected Buildings.Controls.OBC.CDL.Conversions.BooleanToReal occModInd( final realTrue=1) "If in occupied mode, output 1" - annotation (Placement(transformation(extent={{40,80},{60,100}}))); + annotation (Placement(transformation(extent={{20,80},{40,100}}))); Buildings.Controls.OBC.CDL.Reals.Multiply pro "Active cooling minimum, minimum airflow setpoint" annotation (Placement(transformation(extent={{100,70},{120,90}}))); @@ -97,9 +97,15 @@ protected Buildings.Controls.OBC.CDL.Integers.Equal ifSetBac "Check if current operation mode is setback mode" annotation (Placement(transformation(extent={{-60,-150},{-40,-130}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or1 + Buildings.Controls.OBC.CDL.Logical.Or or1 "Check if it is in occupied, warm-up, or setback mode" - annotation (Placement(transformation(extent={{40,-120},{60,-100}}))); + annotation (Placement(transformation(extent={{20,-120},{40,-100}}))); + Buildings.Controls.OBC.CDL.Logical.Or or2 + "Check if it is in occupied, cooldown, or setup mode" + annotation (Placement(transformation(extent={{60,120},{80,140}}))); + Buildings.Controls.OBC.CDL.Logical.Or or4 + "Check if it is in occupied, warm-up, or setback mode" + annotation (Placement(transformation(extent={{60,-120},{80,-100}}))); equation connect(occMod.y, ifOcc.u1) @@ -122,35 +128,41 @@ equation -148},{-62,-148}}, color={255,127,0})); connect(setBacMod.y, ifSetBac.u1) annotation (Line(points={{-78,-140},{-62,-140}}, color={255,127,0})); - connect(ifOcc.y, or3.u1) annotation (Line(points={{-38,120},{0,120},{0,138},{38, - 138}}, color={255,0,255})); - connect(ifCooDow.y, or3.u2) annotation (Line(points={{-38,50},{-10,50},{-10,130}, - {38,130}}, color={255,0,255})); - connect(ifSetUp.y, or3.u3) annotation (Line(points={{-38,-10},{10,-10},{10,122}, - {38,122}}, color={255,0,255})); - connect(or3.y, actCooMax.u) - annotation (Line(points={{62,130},{98,130}}, color={255,0,255})); - connect(ifOcc.y, occModInd.u) annotation (Line(points={{-38,120},{0,120},{0,90}, - {38,90}}, color={255,0,255})); + connect(ifOcc.y, or3.u1) annotation (Line(points={{-38,120},{-10,120},{-10, + 130},{18,130}}, + color={255,0,255})); + connect(ifCooDow.y, or3.u2) annotation (Line(points={{-38,50},{0,50},{0,122}, + {18,122}}, color={255,0,255})); + connect(ifOcc.y, occModInd.u) annotation (Line(points={{-38,120},{-10,120},{-10, + 90},{18,90}}, color={255,0,255})); connect(VOccMin_flow, pro.u2) annotation (Line(points={{-160,74},{98,74}}, color={0,0,127})); - connect(occModInd.y, pro.u1) annotation (Line(points={{62,90},{80,90},{80,86}, + connect(occModInd.y, pro.u1) annotation (Line(points={{42,90},{80,90},{80,86}, {98,86}}, color={0,0,127})); connect(actCooMax.y, VActCooMax_flow) annotation (Line(points={{122,130},{160,130}}, color={0,0,127})); connect(pro.y, VActMin_flow) annotation (Line(points={{122,80},{160,80}}, color={0,0,127})); - connect(ifOcc.y, or1.u1) annotation (Line(points={{-38,120},{0,120},{0,-102},{ - 38,-102}}, color={255,0,255})); - connect(ifWarUp.y, or1.u2) annotation (Line(points={{-38,-70},{-20,-70},{-20,-110}, - {38,-110}}, color={255,0,255})); - connect(ifSetBac.y, or1.u3) annotation (Line(points={{-38,-140},{0,-140},{0,-118}, - {38,-118}}, color={255,0,255})); - connect(or1.y, heaMaxFlo.u) - annotation (Line(points={{62,-110},{98,-110}}, color={255,0,255})); + connect(ifOcc.y, or1.u1) annotation (Line(points={{-38,120},{-10,120},{-10, + -110},{18,-110}}, + color={255,0,255})); + connect(ifWarUp.y, or1.u2) annotation (Line(points={{-38,-70},{-20,-70},{-20, + -118},{18,-118}}, + color={255,0,255})); connect(heaMaxFlo.y, VActHeaMax_flow) annotation (Line(points={{122,-110},{160,-110}}, color={0,0,127})); - + connect(or3.y, or2.u1) + annotation (Line(points={{42,130},{58,130}}, color={255,0,255})); + connect(or2.y, actCooMax.u) + annotation (Line(points={{82,130},{98,130}}, color={255,0,255})); + connect(or1.y, or4.u1) + annotation (Line(points={{42,-110},{58,-110}}, color={255,0,255})); + connect(or4.y, heaMaxFlo.u) + annotation (Line(points={{82,-110},{98,-110}}, color={255,0,255})); + connect(ifSetUp.y, or2.u2) annotation (Line(points={{-38,-10},{50,-10},{50,122}, + {58,122}}, color={255,0,255})); + connect(ifSetBac.y, or4.u2) annotation (Line(points={{-38,-140},{50,-140},{50, + -118},{58,-118}}, color={255,0,255})); annotation ( defaultComponentName="actAirSet", Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-140,-160},{140,160}})), diff --git a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctMixConDischargeSensor/Subsequences/Overrides.mo b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctMixConDischargeSensor/Subsequences/Overrides.mo index 69c45422b60..e58eae38e16 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctMixConDischargeSensor/Subsequences/Overrides.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctMixConDischargeSensor/Subsequences/Overrides.mo @@ -65,6 +65,7 @@ block Overrides "Software switches to override setpoints" annotation (Placement(transformation(extent={{140,-220},{180,-180}}), iconTransformation(extent={{100,-80},{140,-40}}))); +protected Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt( final k=1) "Constant 1" @@ -101,10 +102,12 @@ block Overrides "Software switches to override setpoints" annotation (Placement(transformation(extent={{28,150},{48,170}}))); Buildings.Controls.OBC.CDL.Reals.Add add1 "Add up inputs" annotation (Placement(transformation(extent={{62,190},{82,210}}))); - Buildings.Controls.OBC.CDL.Reals.Switch swi "Airflow setpoint after considering override" + Buildings.Controls.OBC.CDL.Reals.Switch swi + "Airflow setpoint after considering override" annotation (Placement(transformation(extent={{100,30},{120,50}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or3 "Check if the airflow setpoint should be overrided" - annotation (Placement(transformation(extent={{-20,50},{0,70}}))); + Buildings.Controls.OBC.CDL.Logical.Or or3 + "Check if the airflow setpoint should be overrided" + annotation (Placement(transformation(extent={{-40,60},{-20,80}}))); Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt3( final k=1) "Constant 1" @@ -183,6 +186,9 @@ block Overrides "Software switches to override setpoints" Buildings.Controls.OBC.CDL.Reals.Switch swi2 "Damper setpoint position after considering override" annotation (Placement(transformation(extent={{80,-210},{100,-190}}))); + Buildings.Controls.OBC.CDL.Logical.Or or5 + "Check if the airflow setpoint should be overrided" + annotation (Placement(transformation(extent={{0,50},{20,70}}))); equation connect(oveFloSet, forZerFlo.u1) @@ -207,12 +213,12 @@ equation {26,166}},color={0,0,127})); connect(zerFlo.y, add1.u1) annotation (Line(points={{-18,220},{20,220},{20,206}, {60,206}}, color={0,0,127})); - connect(forZerFlo.y, or3.u1) annotation (Line(points={{-58,220},{-50,220},{-50, - 68},{-22,68}},color={255,0,255})); - connect(forCooMax.y, or3.u2) annotation (Line(points={{-58,180},{-50,180},{-50, - 60},{-22,60}},color={255,0,255})); - connect(forMinFlo.y, or3.u3) annotation (Line(points={{-58,140},{-50,140},{-50, - 52},{-22,52}}, color={255,0,255})); + connect(forZerFlo.y, or3.u1) annotation (Line(points={{-58,220},{-50,220},{ + -50,70},{-42,70}}, + color={255,0,255})); + connect(forCooMax.y, or3.u2) annotation (Line(points={{-58,180},{-50,180},{ + -50,62},{-42,62}}, + color={255,0,255})); connect(add1.y, swi.u1) annotation (Line(points={{84,200},{90,200},{90,48},{98, 48}}, color={0,0,127})); connect(VActSet_flow, swi.u3) annotation (Line(points={{-160,20},{80,20},{80,32}, @@ -261,8 +267,6 @@ equation {-8,114}},color={0,0,127})); connect(add4.y, add2.u2) annotation (Line(points={{16,120},{22,120},{22,154},{ 26,154}}, color={0,0,127})); - connect(or3.y, or1.u1) annotation (Line(points={{2,60},{20,60},{20,40},{38,40}}, - color={255,0,255})); connect(forMinFlo1.y, or1.u2) annotation (Line(points={{-58,100},{-50,100},{-50, 32},{38,32}}, color={255,0,255})); connect(or1.y, swi.u2) @@ -295,6 +299,12 @@ equation {78,-208}}, color={0,0,127})); connect(swi2.y, yHeaDam) annotation (Line(points={{102,-200},{160,-200}}, color={0,0,127})); + connect(or3.y, or5.u1) annotation (Line(points={{-18,70},{-10,70},{-10,60},{-2, + 60}}, color={255,0,255})); + connect(or5.y, or1.u1) annotation (Line(points={{22,60},{30,60},{30,40},{38,40}}, + color={255,0,255})); + connect(forMinFlo.y, or5.u2) annotation (Line(points={{-58,140},{-50,140},{-50, + 52},{-2,52}}, color={255,0,255})); annotation (defaultComponentName="ove", Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}), diff --git a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctMixConInletSensor/Subsequences/ActiveAirFlow.mo b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctMixConInletSensor/Subsequences/ActiveAirFlow.mo index 39b691a9737..7b19a4ecb13 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctMixConInletSensor/Subsequences/ActiveAirFlow.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctMixConInletSensor/Subsequences/ActiveAirFlow.mo @@ -56,9 +56,9 @@ protected final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.setUp) "Setup mode" annotation (Placement(transformation(extent={{-100,-20},{-80,0}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or3 + Buildings.Controls.OBC.CDL.Logical.Or or3 "Check if it is in occupied, cooldown, or setup mode" - annotation (Placement(transformation(extent={{40,120},{60,140}}))); + annotation (Placement(transformation(extent={{20,120},{40,140}}))); Buildings.Controls.OBC.CDL.Conversions.BooleanToReal actCooMax( final realTrue=VCooMax_flow) "Active cooling maximum flow" @@ -66,7 +66,7 @@ protected Buildings.Controls.OBC.CDL.Conversions.BooleanToReal occModInd( final realTrue=1) "If in occupied mode, output 1" - annotation (Placement(transformation(extent={{40,80},{60,100}}))); + annotation (Placement(transformation(extent={{20,80},{40,100}}))); Buildings.Controls.OBC.CDL.Reals.Multiply pro "Active cooling minimum, minimum airflow setpoint" annotation (Placement(transformation(extent={{100,70},{120,90}}))); @@ -97,9 +97,15 @@ protected Buildings.Controls.OBC.CDL.Integers.Equal ifSetBac "Check if current operation mode is setback mode" annotation (Placement(transformation(extent={{-60,-150},{-40,-130}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or1 + Buildings.Controls.OBC.CDL.Logical.Or or1 "Check if it is in occupied, warm-up, or setback mode" - annotation (Placement(transformation(extent={{40,-120},{60,-100}}))); + annotation (Placement(transformation(extent={{20,-120},{40,-100}}))); + Buildings.Controls.OBC.CDL.Logical.Or or2 + "Check if it is in occupied, cooldown, or setup mode" + annotation (Placement(transformation(extent={{60,120},{80,140}}))); + Buildings.Controls.OBC.CDL.Logical.Or or4 + "Check if it is in occupied, warm-up, or setback mode" + annotation (Placement(transformation(extent={{60,-120},{80,-100}}))); equation connect(occMod.y, ifOcc.u1) @@ -122,35 +128,41 @@ equation -148},{-62,-148}}, color={255,127,0})); connect(setBacMod.y, ifSetBac.u1) annotation (Line(points={{-78,-140},{-62,-140}}, color={255,127,0})); - connect(ifOcc.y, or3.u1) annotation (Line(points={{-38,120},{0,120},{0,138},{38, - 138}}, color={255,0,255})); - connect(ifCooDow.y, or3.u2) annotation (Line(points={{-38,50},{-10,50},{-10,130}, - {38,130}}, color={255,0,255})); - connect(ifSetUp.y, or3.u3) annotation (Line(points={{-38,-10},{10,-10},{10,122}, - {38,122}}, color={255,0,255})); - connect(or3.y, actCooMax.u) - annotation (Line(points={{62,130},{98,130}}, color={255,0,255})); - connect(ifOcc.y, occModInd.u) annotation (Line(points={{-38,120},{0,120},{0,90}, - {38,90}}, color={255,0,255})); + connect(ifOcc.y, or3.u1) annotation (Line(points={{-38,120},{-10,120},{-10, + 130},{18,130}}, + color={255,0,255})); + connect(ifCooDow.y, or3.u2) annotation (Line(points={{-38,50},{0,50},{0,122}, + {18,122}}, color={255,0,255})); + connect(ifOcc.y, occModInd.u) annotation (Line(points={{-38,120},{-10,120},{-10, + 90},{18,90}}, color={255,0,255})); connect(VOccMin_flow, pro.u2) annotation (Line(points={{-160,74},{98,74}}, color={0,0,127})); - connect(occModInd.y, pro.u1) annotation (Line(points={{62,90},{80,90},{80,86}, + connect(occModInd.y, pro.u1) annotation (Line(points={{42,90},{80,90},{80,86}, {98,86}}, color={0,0,127})); connect(actCooMax.y, VActCooMax_flow) annotation (Line(points={{122,130},{160,130}}, color={0,0,127})); connect(pro.y, VActMin_flow) annotation (Line(points={{122,80},{160,80}}, color={0,0,127})); - connect(ifOcc.y, or1.u1) annotation (Line(points={{-38,120},{0,120},{0,-102},{ - 38,-102}}, color={255,0,255})); - connect(ifWarUp.y, or1.u2) annotation (Line(points={{-38,-70},{-20,-70},{-20,-110}, - {38,-110}}, color={255,0,255})); - connect(ifSetBac.y, or1.u3) annotation (Line(points={{-38,-140},{0,-140},{0,-118}, - {38,-118}}, color={255,0,255})); - connect(or1.y, heaMaxFlo.u) - annotation (Line(points={{62,-110},{98,-110}}, color={255,0,255})); + connect(ifOcc.y, or1.u1) annotation (Line(points={{-38,120},{-10,120},{-10, + -110},{18,-110}}, + color={255,0,255})); + connect(ifWarUp.y, or1.u2) annotation (Line(points={{-38,-70},{-20,-70},{-20, + -118},{18,-118}}, + color={255,0,255})); connect(heaMaxFlo.y, VActHeaMax_flow) annotation (Line(points={{122,-110},{160,-110}}, color={0,0,127})); - + connect(or3.y, or2.u1) + annotation (Line(points={{42,130},{58,130}}, color={255,0,255})); + connect(or2.y, actCooMax.u) + annotation (Line(points={{82,130},{98,130}}, color={255,0,255})); + connect(or1.y, or4.u1) + annotation (Line(points={{42,-110},{58,-110}}, color={255,0,255})); + connect(or4.y, heaMaxFlo.u) + annotation (Line(points={{82,-110},{98,-110}}, color={255,0,255})); + connect(ifSetBac.y, or4.u2) annotation (Line(points={{-38,-140},{50,-140},{50, + -118},{58,-118}}, color={255,0,255})); + connect(ifSetUp.y, or2.u2) annotation (Line(points={{-38,-10},{50,-10},{50,122}, + {58,122}}, color={255,0,255})); annotation ( defaultComponentName="actAirSet", Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-140,-160},{140,160}})), diff --git a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctMixConInletSensor/Subsequences/Overrides.mo b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctMixConInletSensor/Subsequences/Overrides.mo index 0d31fbf1fe1..3429a51573d 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctMixConInletSensor/Subsequences/Overrides.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctMixConInletSensor/Subsequences/Overrides.mo @@ -65,6 +65,7 @@ block Overrides "Software switches to override setpoints" annotation (Placement(transformation(extent={{140,-220},{180,-180}}), iconTransformation(extent={{100,-80},{140,-40}}))); +protected Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt( final k=1) "Constant 1" @@ -101,10 +102,12 @@ block Overrides "Software switches to override setpoints" annotation (Placement(transformation(extent={{28,150},{48,170}}))); Buildings.Controls.OBC.CDL.Reals.Add add1 "Add up inputs" annotation (Placement(transformation(extent={{62,190},{82,210}}))); - Buildings.Controls.OBC.CDL.Reals.Switch swi "Airflow setpoint after considering override" + Buildings.Controls.OBC.CDL.Reals.Switch swi + "Airflow setpoint after considering override" annotation (Placement(transformation(extent={{100,30},{120,50}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or3 "Check if the airflow setpoint should be overrided" - annotation (Placement(transformation(extent={{-20,50},{0,70}}))); + Buildings.Controls.OBC.CDL.Logical.Or or3 + "Check if the airflow setpoint should be overrided" + annotation (Placement(transformation(extent={{-40,60},{-20,80}}))); Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt3( final k=1) "Constant 1" @@ -183,6 +186,9 @@ block Overrides "Software switches to override setpoints" Buildings.Controls.OBC.CDL.Reals.Switch swi2 "Damper setpoint position after considering override" annotation (Placement(transformation(extent={{80,-210},{100,-190}}))); + Buildings.Controls.OBC.CDL.Logical.Or or5 + "Check if the airflow setpoint should be overrided" + annotation (Placement(transformation(extent={{0,50},{20,70}}))); equation connect(oveFloSet, forZerFlo.u1) @@ -207,12 +213,12 @@ equation {26,166}},color={0,0,127})); connect(zerFlo.y, add1.u1) annotation (Line(points={{-18,220},{20,220},{20,206}, {60,206}}, color={0,0,127})); - connect(forZerFlo.y, or3.u1) annotation (Line(points={{-58,220},{-50,220},{-50, - 68},{-22,68}},color={255,0,255})); - connect(forCooMax.y, or3.u2) annotation (Line(points={{-58,180},{-50,180},{-50, - 60},{-22,60}},color={255,0,255})); - connect(forMinFlo.y, or3.u3) annotation (Line(points={{-58,140},{-50,140},{-50, - 52},{-22,52}}, color={255,0,255})); + connect(forZerFlo.y, or3.u1) annotation (Line(points={{-58,220},{-50,220},{ + -50,70},{-42,70}}, + color={255,0,255})); + connect(forCooMax.y, or3.u2) annotation (Line(points={{-58,180},{-50,180},{ + -50,62},{-42,62}}, + color={255,0,255})); connect(add1.y, swi.u1) annotation (Line(points={{84,200},{90,200},{90,48},{98, 48}}, color={0,0,127})); connect(VActSet_flow, swi.u3) annotation (Line(points={{-160,20},{80,20},{80,32}, @@ -261,8 +267,6 @@ equation {-8,114}},color={0,0,127})); connect(add4.y, add2.u2) annotation (Line(points={{16,120},{22,120},{22,154},{ 26,154}}, color={0,0,127})); - connect(or3.y, or1.u1) annotation (Line(points={{2,60},{20,60},{20,40},{38,40}}, - color={255,0,255})); connect(forMinFlo1.y, or1.u2) annotation (Line(points={{-58,100},{-50,100},{-50, 32},{38,32}}, color={255,0,255})); connect(or1.y, swi.u2) @@ -295,6 +299,12 @@ equation {78,-208}}, color={0,0,127})); connect(swi2.y, yHeaDam) annotation (Line(points={{102,-200},{160,-200}}, color={0,0,127})); + connect(or5.y, or1.u1) annotation (Line(points={{22,60},{30,60},{30,40},{38,40}}, + color={255,0,255})); + connect(or3.y, or5.u1) annotation (Line(points={{-18,70},{-10,70},{-10,60},{-2, + 60}}, color={255,0,255})); + connect(forMinFlo.y, or5.u2) annotation (Line(points={{-58,140},{-50,140},{-50, + 52},{-2,52}}, color={255,0,255})); annotation (defaultComponentName="ove", Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}), diff --git a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctSnapActing/Subsequences/ActiveAirFlow.mo b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctSnapActing/Subsequences/ActiveAirFlow.mo index e8c06760ef2..621a689181a 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctSnapActing/Subsequences/ActiveAirFlow.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctSnapActing/Subsequences/ActiveAirFlow.mo @@ -56,9 +56,9 @@ protected final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.setUp) "Setup mode" annotation (Placement(transformation(extent={{-100,-20},{-80,0}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or3 + Buildings.Controls.OBC.CDL.Logical.Or or3 "Check if it is in occupied, cooldown, or setup mode" - annotation (Placement(transformation(extent={{40,120},{60,140}}))); + annotation (Placement(transformation(extent={{20,120},{40,140}}))); Buildings.Controls.OBC.CDL.Conversions.BooleanToReal actCooMax( final realTrue=VCooMax_flow) "Active cooling maximum flow" @@ -66,7 +66,7 @@ protected Buildings.Controls.OBC.CDL.Conversions.BooleanToReal occModInd( final realTrue=1) "If in occupied mode, output 1" - annotation (Placement(transformation(extent={{40,80},{60,100}}))); + annotation (Placement(transformation(extent={{20,80},{40,100}}))); Buildings.Controls.OBC.CDL.Reals.Multiply pro "Active cooling minimum, minimum airflow setpoint" annotation (Placement(transformation(extent={{100,70},{120,90}}))); @@ -97,9 +97,15 @@ protected Buildings.Controls.OBC.CDL.Integers.Equal ifSetBac "Check if current operation mode is setback mode" annotation (Placement(transformation(extent={{-60,-150},{-40,-130}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or1 + Buildings.Controls.OBC.CDL.Logical.Or or1 "Check if it is in occupied, warm-up, or setback mode" - annotation (Placement(transformation(extent={{40,-120},{60,-100}}))); + annotation (Placement(transformation(extent={{20,-120},{40,-100}}))); + Buildings.Controls.OBC.CDL.Logical.Or or2 + "Check if it is in occupied, cooldown, or setup mode" + annotation (Placement(transformation(extent={{60,120},{80,140}}))); + Buildings.Controls.OBC.CDL.Logical.Or or4 + "Check if it is in occupied, warm-up, or setback mode" + annotation (Placement(transformation(extent={{60,-120},{80,-100}}))); equation connect(occMod.y, ifOcc.u1) @@ -122,35 +128,38 @@ equation -148},{-62,-148}}, color={255,127,0})); connect(setBacMod.y, ifSetBac.u1) annotation (Line(points={{-78,-140},{-62,-140}}, color={255,127,0})); - connect(ifOcc.y, or3.u1) annotation (Line(points={{-38,120},{0,120},{0,138},{38, - 138}}, color={255,0,255})); - connect(ifCooDow.y, or3.u2) annotation (Line(points={{-38,50},{-10,50},{-10,130}, - {38,130}}, color={255,0,255})); - connect(ifSetUp.y, or3.u3) annotation (Line(points={{-38,-10},{10,-10},{10,122}, - {38,122}}, color={255,0,255})); - connect(or3.y, actCooMax.u) - annotation (Line(points={{62,130},{98,130}}, color={255,0,255})); - connect(ifOcc.y, occModInd.u) annotation (Line(points={{-38,120},{0,120},{0,90}, - {38,90}}, color={255,0,255})); + connect(ifOcc.y, or3.u1) annotation (Line(points={{-38,120},{-10,120},{-10,130}, + {18,130}}, color={255,0,255})); + connect(ifCooDow.y, or3.u2) annotation (Line(points={{-38,50},{0,50},{0,122},{ + 18,122}}, color={255,0,255})); + connect(ifOcc.y, occModInd.u) annotation (Line(points={{-38,120},{-10,120},{-10, + 90},{18,90}}, color={255,0,255})); connect(VOccMin_flow, pro.u2) annotation (Line(points={{-160,74},{98,74}}, color={0,0,127})); - connect(occModInd.y, pro.u1) annotation (Line(points={{62,90},{80,90},{80,86}, + connect(occModInd.y, pro.u1) annotation (Line(points={{42,90},{80,90},{80,86}, {98,86}}, color={0,0,127})); connect(actCooMax.y, VActCooMax_flow) annotation (Line(points={{122,130},{160,130}}, color={0,0,127})); connect(pro.y, VActMin_flow) annotation (Line(points={{122,80},{160,80}}, color={0,0,127})); - connect(ifOcc.y, or1.u1) annotation (Line(points={{-38,120},{0,120},{0,-102},{ - 38,-102}}, color={255,0,255})); - connect(ifWarUp.y, or1.u2) annotation (Line(points={{-38,-70},{-20,-70},{-20,-110}, - {38,-110}}, color={255,0,255})); - connect(ifSetBac.y, or1.u3) annotation (Line(points={{-38,-140},{0,-140},{0,-118}, - {38,-118}}, color={255,0,255})); - connect(or1.y, heaMaxFlo.u) - annotation (Line(points={{62,-110},{98,-110}}, color={255,0,255})); + connect(ifOcc.y, or1.u1) annotation (Line(points={{-38,120},{-10,120},{-10,-110}, + {18,-110}},color={255,0,255})); + connect(ifWarUp.y, or1.u2) annotation (Line(points={{-38,-70},{-20,-70},{-20,-118}, + {18,-118}}, color={255,0,255})); connect(heaMaxFlo.y, VActHeaMax_flow) annotation (Line(points={{122,-110},{160,-110}}, color={0,0,127})); - + connect(or3.y, or2.u1) + annotation (Line(points={{42,130},{58,130}}, color={255,0,255})); + connect(or2.y, actCooMax.u) + annotation (Line(points={{82,130},{98,130}}, color={255,0,255})); + connect(or1.y, or4.u1) + annotation (Line(points={{42,-110},{58,-110}}, color={255,0,255})); + connect(or4.y, heaMaxFlo.u) + annotation (Line(points={{82,-110},{98,-110}}, color={255,0,255})); + connect(ifSetUp.y, or2.u2) annotation (Line(points={{-38,-10},{50,-10},{50,122}, + {58,122}}, color={255,0,255})); + connect(ifSetBac.y, or4.u2) annotation (Line(points={{-38,-140},{50,-140},{50, + -118},{58,-118}}, color={255,0,255})); annotation ( defaultComponentName="actAirSet", Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-140,-160},{140,160}})), diff --git a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctSnapActing/Subsequences/Overrides.mo b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctSnapActing/Subsequences/Overrides.mo index 5f4762d9031..cf7caabcabb 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctSnapActing/Subsequences/Overrides.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/DualDuctSnapActing/Subsequences/Overrides.mo @@ -63,6 +63,7 @@ block Overrides "Software switches to override setpoints" annotation (Placement(transformation(extent={{140,-220},{180,-180}}), iconTransformation(extent={{100,-80},{140,-40}}))); +protected Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt( final k=1) "Constant 1" @@ -99,10 +100,12 @@ block Overrides "Software switches to override setpoints" annotation (Placement(transformation(extent={{28,150},{48,170}}))); Buildings.Controls.OBC.CDL.Reals.Add add1 "Add up inputs" annotation (Placement(transformation(extent={{62,190},{82,210}}))); - Buildings.Controls.OBC.CDL.Reals.Switch swi "Airflow setpoint after considering override" + Buildings.Controls.OBC.CDL.Reals.Switch swi + "Airflow setpoint after considering override" annotation (Placement(transformation(extent={{100,30},{120,50}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or3 "Check if the airflow setpoint should be overrided" - annotation (Placement(transformation(extent={{-20,50},{0,70}}))); + Buildings.Controls.OBC.CDL.Logical.Or or3 + "Check if the airflow setpoint should be overrided" + annotation (Placement(transformation(extent={{-40,60},{-20,80}}))); Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt3( final k=1) "Constant 1" @@ -181,6 +184,9 @@ block Overrides "Software switches to override setpoints" Buildings.Controls.OBC.CDL.Reals.Switch swi2 "Damper setpoint position after considering override" annotation (Placement(transformation(extent={{80,-210},{100,-190}}))); + Buildings.Controls.OBC.CDL.Logical.Or or5 + "Check if the airflow setpoint should be overrided" + annotation (Placement(transformation(extent={{0,50},{20,70}}))); equation connect(oveFloSet, forZerFlo.u1) @@ -205,12 +211,12 @@ equation {26,166}},color={0,0,127})); connect(zerFlo.y, add1.u1) annotation (Line(points={{-18,220},{20,220},{20,206}, {60,206}}, color={0,0,127})); - connect(forZerFlo.y, or3.u1) annotation (Line(points={{-58,220},{-50,220},{-50, - 68},{-22,68}},color={255,0,255})); - connect(forCooMax.y, or3.u2) annotation (Line(points={{-58,180},{-50,180},{-50, - 60},{-22,60}},color={255,0,255})); - connect(forMinFlo.y, or3.u3) annotation (Line(points={{-58,140},{-50,140},{-50, - 52},{-22,52}}, color={255,0,255})); + connect(forZerFlo.y, or3.u1) annotation (Line(points={{-58,220},{-50,220},{ + -50,70},{-42,70}}, + color={255,0,255})); + connect(forCooMax.y, or3.u2) annotation (Line(points={{-58,180},{-50,180},{ + -50,62},{-42,62}}, + color={255,0,255})); connect(add1.y, swi.u1) annotation (Line(points={{84,200},{90,200},{90,48},{98, 48}}, color={0,0,127})); connect(VActSet_flow, swi.u3) annotation (Line(points={{-160,20},{80,20},{80,32}, @@ -259,8 +265,6 @@ equation {-8,114}},color={0,0,127})); connect(add4.y, add2.u2) annotation (Line(points={{16,120},{22,120},{22,154},{ 26,154}}, color={0,0,127})); - connect(or3.y, or1.u1) annotation (Line(points={{2,60},{20,60},{20,40},{38,40}}, - color={255,0,255})); connect(forMinFlo1.y, or1.u2) annotation (Line(points={{-58,100},{-50,100},{-50, 32},{38,32}}, color={255,0,255})); connect(or1.y, swi.u2) @@ -293,6 +297,12 @@ equation -208},{78,-208}}, color={0,0,127})); connect(swi2.y, yHeaDam) annotation (Line(points={{102,-200},{160,-200}}, color={0,0,127})); + connect(or3.y, or5.u1) annotation (Line(points={{-18,70},{-10,70},{-10,60},{-2, + 60}}, color={255,0,255})); + connect(or5.y, or1.u1) annotation (Line(points={{22,60},{30,60},{30,40},{38,40}}, + color={255,0,255})); + connect(forMinFlo.y, or5.u2) annotation (Line(points={{-58,140},{-50,140},{-50, + 52},{-2,52}}, color={255,0,255})); annotation (defaultComponentName="ove", Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}), diff --git a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/ParallelFanCVF/Subsequences/ActiveAirFlow.mo b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/ParallelFanCVF/Subsequences/ActiveAirFlow.mo index eb2e8d4f502..1415c034e98 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/ParallelFanCVF/Subsequences/ActiveAirFlow.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/ParallelFanCVF/Subsequences/ActiveAirFlow.mo @@ -44,17 +44,17 @@ protected final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.setUp) "Setup mode" annotation (Placement(transformation(extent={{-100,-70},{-80,-50}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or3 + Buildings.Controls.OBC.CDL.Logical.Or or3 "Check if it is in occupied, cooldown, or setup mode" - annotation (Placement(transformation(extent={{20,40},{40,60}}))); + annotation (Placement(transformation(extent={{0,40},{20,60}}))); Buildings.Controls.OBC.CDL.Conversions.BooleanToReal actCooMax( final realTrue=VCooMax_flow) "Active cooling maximum flow" - annotation (Placement(transformation(extent={{80,40},{100,60}}))); + annotation (Placement(transformation(extent={{100,40},{120,60}}))); Buildings.Controls.OBC.CDL.Conversions.BooleanToReal occModInd( final realTrue=1) "If in occupied mode, output 1" - annotation (Placement(transformation(extent={{20,0},{40,20}}))); + annotation (Placement(transformation(extent={{0,0},{20,20}}))); Buildings.Controls.OBC.CDL.Reals.Multiply pro "Active cooling minimum, minimum airflow setpoint" annotation (Placement(transformation(extent={{80,-60},{100,-40}}))); @@ -67,6 +67,9 @@ protected Buildings.Controls.OBC.CDL.Integers.Equal ifSetUp "Check if current operation mode is setup mode" annotation (Placement(transformation(extent={{-60,-70},{-40,-50}}))); + Buildings.Controls.OBC.CDL.Logical.Or or2 + "Check if it is in occupied, cooldown, or setup mode" + annotation (Placement(transformation(extent={{60,40},{80,60}}))); equation connect(occMod.y, ifOcc.u1) @@ -81,25 +84,26 @@ equation -8},{-62,-8}}, color={255,127,0})); connect(uOpeMod, ifSetUp.u2) annotation (Line(points={{-160,30},{-70,30},{-70, -68},{-62,-68}}, color={255,127,0})); - connect(ifOcc.y, or3.u1) annotation (Line(points={{-38,70},{0,70},{0,58},{18,58}}, - color={255,0,255})); - connect(ifCooDow.y, or3.u2) annotation (Line(points={{-38,0},{-10,0},{-10,50}, - {18,50}}, color={255,0,255})); - connect(ifSetUp.y, or3.u3) annotation (Line(points={{-38,-60},{10,-60},{10,42}, - {18,42}}, color={255,0,255})); - connect(or3.y, actCooMax.u) - annotation (Line(points={{42,50},{78,50}}, color={255,0,255})); - connect(ifOcc.y, occModInd.u) annotation (Line(points={{-38,70},{0,70},{0,10}, - {18,10}}, color={255,0,255})); + connect(ifOcc.y, or3.u1) annotation (Line(points={{-38,70},{-20,70},{-20,50}, + {-2,50}},color={255,0,255})); + connect(ifCooDow.y, or3.u2) annotation (Line(points={{-38,0},{-10,0},{-10,42}, + {-2,42}}, color={255,0,255})); + connect(ifOcc.y, occModInd.u) annotation (Line(points={{-38,70},{-20,70},{-20, + 10},{-2,10}}, color={255,0,255})); connect(VOccMin_flow, pro.u2) annotation (Line(points={{-160,-80},{60,-80},{60, -56},{78,-56}}, color={0,0,127})); - connect(occModInd.y, pro.u1) annotation (Line(points={{42,10},{60,10},{60,-44}, + connect(occModInd.y, pro.u1) annotation (Line(points={{22,10},{60,10},{60,-44}, {78,-44}}, color={0,0,127})); connect(actCooMax.y, VActCooMax_flow) - annotation (Line(points={{102,50},{160,50}}, color={0,0,127})); + annotation (Line(points={{122,50},{160,50}}, color={0,0,127})); connect(pro.y, VActMin_flow) annotation (Line(points={{102,-50},{160,-50}}, color={0,0,127})); - + connect(or3.y, or2.u1) + annotation (Line(points={{22,50},{58,50}}, color={255,0,255})); + connect(or2.y, actCooMax.u) + annotation (Line(points={{82,50},{98,50}}, color={255,0,255})); + connect(ifSetUp.y, or2.u2) annotation (Line(points={{-38,-60},{40,-60},{40,42}, + {58,42}}, color={255,0,255})); annotation ( defaultComponentName="actAirSet", Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-140,-120},{140,120}})), diff --git a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/ParallelFanCVF/Subsequences/DamperValves.mo b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/ParallelFanCVF/Subsequences/DamperValves.mo index 6384e8d109d..c8536791406 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/ParallelFanCVF/Subsequences/DamperValves.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/ParallelFanCVF/Subsequences/DamperValves.mo @@ -183,6 +183,7 @@ block DamperValves annotation (Placement(transformation(extent={{320,-260},{360,-220}}), iconTransformation(extent={{100,-210},{140,-170}}))); +protected Buildings.Controls.OBC.CDL.Logical.And and4 "Logical and" annotation (Placement(transformation(extent={{-60,120},{-40,140}}))); Buildings.Controls.OBC.CDL.Reals.Line lin @@ -256,8 +257,8 @@ block DamperValves annotation (Placement(transformation(extent={{100,-200},{120,-180}}))); Buildings.Controls.OBC.CDL.Reals.Switch swi2 "Hot water valve position" annotation (Placement(transformation(extent={{280,-120},{300,-100}}))); - Buildings.Controls.OBC.CDL.Reals.Sources.Constant nomFlow(final k= - VCooMax_flow) + Buildings.Controls.OBC.CDL.Reals.Sources.Constant nomFlow( + final k=VCooMax_flow) "Nominal volume flow rate" annotation (Placement(transformation(extent={{160,110},{180,130}}))); Buildings.Controls.OBC.CDL.Reals.Divide VDisSet_flowNor @@ -328,7 +329,8 @@ block DamperValves Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt2(final k=3) "Constant 3" annotation (Placement(transformation(extent={{-140,250},{-120,270}}))); - Buildings.Controls.OBC.CDL.Conversions.BooleanToReal zerFlo(final realTrue=0) + Buildings.Controls.OBC.CDL.Conversions.BooleanToReal zerFlo( + final realTrue=0) "Force zone airflow setpoint to zero" annotation (Placement(transformation(extent={{-20,350},{0,370}}))); Buildings.Controls.OBC.CDL.Conversions.BooleanToReal cooMax( @@ -346,7 +348,10 @@ block DamperValves Buildings.Controls.OBC.CDL.Reals.Switch swi4 "Airflow setpoint after considering override" annotation (Placement(transformation(extent={{160,240},{180,260}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or3 + Buildings.Controls.OBC.CDL.Logical.Or or3 + "Check if the airflow setpoint should be overrided" + annotation (Placement(transformation(extent={{20,220},{40,240}}))); + Buildings.Controls.OBC.CDL.Logical.Or or2 "Check if the airflow setpoint should be overrided" annotation (Placement(transformation(extent={{100,240},{120,260}}))); @@ -441,19 +446,15 @@ equation connect(nomFlow.y, VDis_flowNor.u2) annotation (Line(points={{182,120},{200,120}, {200,84},{218,84}}, color={0,0,127})); connect(swi3.y, yDam) - annotation (Line(points={{302,-20},{340,-20}}, - color={0,0,127})); + annotation (Line(points={{302,-20},{340,-20}}, color={0,0,127})); connect(isUno.y, swi3.u2) annotation (Line(points={{122,-190},{140,-190},{140, - -20},{278,-20}}, - color={255,0,255})); + -20},{278,-20}}, color={255,0,255})); connect(conZer3.y, swi3.u1) annotation (Line(points={{-238,-20},{40,-20},{40, - -12},{278,-12}}, - color={0,0,127})); + -12},{278,-12}}, color={0,0,127})); connect(conDam.y, swi3.u3) annotation (Line(points={{282,150},{300,150},{300, - 60},{220,60},{220,-28},{278,-28}}, - color={0,0,127})); + 60},{220,60},{220,-28},{278,-28}}, color={0,0,127})); connect(VDis_flowNor.y, conDam.u_m) - annotation (Line(points={{242,90},{270,90},{270,138}}, color={0,0,127})); + annotation (Line(points={{242,90},{270,90},{270,138}}, color={0,0,127})); connect(VOAMin_flow, les.u2) annotation (Line(points={{-340,-308},{-262,-308}}, color={0,0,127})); connect(les.y, truDel7.u) @@ -510,19 +511,15 @@ equation connect(zerFlo.y,add1. u1) annotation (Line(points={{2,360},{60,360},{60,346}, {98,346}}, color={0,0,127})); connect(forZerFlo.y,or3. u1) annotation (Line(points={{-58,360},{-40,360},{-40, - 258},{98,258}}, color={255,0,255})); + 230},{18,230}}, color={255,0,255})); connect(forCooMax.y,or3. u2) annotation (Line(points={{-58,320},{-40,320},{-40, - 250},{98,250}}, color={255,0,255})); - connect(forMinFlo.y,or3. u3) annotation (Line(points={{-58,280},{-40,280},{-40, - 242},{98,242}},color={255,0,255})); + 222},{18,222}}, color={255,0,255})); connect(add1.y, swi4.u1) annotation (Line(points={{122,340},{140,340},{140,258}, {158,258}}, color={0,0,127})); connect(add2.y,add1. u2) annotation (Line(points={{82,300},{90,300},{90,334},{ 98,334}}, color={0,0,127})); connect(minFlo.y,add2. u2) annotation (Line(points={{2,280},{40,280},{40,294}, {58,294}}, color={0,0,127})); - connect(or3.y, swi4.u2) - annotation (Line(points={{122,250},{158,250}}, color={255,0,255})); connect(swi.y, swi4.u3) annotation (Line(points={{122,170},{140,170},{140,242}, {158,242}}, color={0,0,127})); connect(swi4.y, VPri_flow_Set) @@ -531,6 +528,12 @@ equation {200,156},{218,156}}, color={0,0,127})); connect(u1Fan, conDam.trigger) annotation (Line(points={{-340,0},{264,0},{264,138}}, color={255,0,255})); + connect(or2.y, swi4.u2) + annotation (Line(points={{122,250},{158,250}}, color={255,0,255})); + connect(or3.y, or2.u2) annotation (Line(points={{42,230},{80,230},{80,242},{98, + 242}}, color={255,0,255})); + connect(forMinFlo.y, or2.u1) annotation (Line(points={{-58,280},{-40,280},{-40, + 250},{98,250}}, color={255,0,255})); annotation ( defaultComponentName="damValFan", Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-320,-400},{320,400}}), @@ -542,7 +545,7 @@ annotation ( fillPattern=FillPattern.Solid, pattern=LinePattern.None), Text( - extent={{-152,238},{-24,216}}, + extent={{-182,238},{-54,216}}, textColor={0,0,127}, fillColor={215,215,215}, fillPattern=FillPattern.Solid, diff --git a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/ParallelFanVVF/Subsequences/ActiveAirFlow.mo b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/ParallelFanVVF/Subsequences/ActiveAirFlow.mo index 6dc82c5b156..d8e36016e66 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/ParallelFanVVF/Subsequences/ActiveAirFlow.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/ParallelFanVVF/Subsequences/ActiveAirFlow.mo @@ -45,17 +45,17 @@ protected final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.setUp) "Setup mode" annotation (Placement(transformation(extent={{-100,-70},{-80,-50}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or3 + Buildings.Controls.OBC.CDL.Logical.Or or3 "Check if it is in occupied, cooldown, or setup mode" - annotation (Placement(transformation(extent={{20,40},{40,60}}))); + annotation (Placement(transformation(extent={{0,40},{20,60}}))); Buildings.Controls.OBC.CDL.Conversions.BooleanToReal actCooMax( final realTrue=VCooMax_flow) "Active cooling maximum flow" - annotation (Placement(transformation(extent={{80,40},{100,60}}))); + annotation (Placement(transformation(extent={{100,40},{120,60}}))); Buildings.Controls.OBC.CDL.Conversions.BooleanToReal occModInd( final realTrue=1) "If in occupied mode, output 1" - annotation (Placement(transformation(extent={{20,0},{40,20}}))); + annotation (Placement(transformation(extent={{0,0},{20,20}}))); Buildings.Controls.OBC.CDL.Reals.Multiply pro "Active cooling minimum, minimum airflow setpoint" annotation (Placement(transformation(extent={{80,-60},{100,-40}}))); @@ -68,6 +68,9 @@ protected Buildings.Controls.OBC.CDL.Integers.Equal ifSetUp "Check if current operation mode is setup mode" annotation (Placement(transformation(extent={{-60,-70},{-40,-50}}))); + Buildings.Controls.OBC.CDL.Logical.Or or2 + "Check if it is in occupied, cooldown, or setup mode" + annotation (Placement(transformation(extent={{60,40},{80,60}}))); equation connect(occMod.y, ifOcc.u1) @@ -82,25 +85,26 @@ equation -8},{-62,-8}}, color={255,127,0})); connect(uOpeMod, ifSetUp.u2) annotation (Line(points={{-160,30},{-70,30},{-70, -68},{-62,-68}}, color={255,127,0})); - connect(ifOcc.y, or3.u1) annotation (Line(points={{-38,70},{0,70},{0,58},{18,58}}, - color={255,0,255})); - connect(ifCooDow.y, or3.u2) annotation (Line(points={{-38,0},{-10,0},{-10,50}, - {18,50}}, color={255,0,255})); - connect(ifSetUp.y, or3.u3) annotation (Line(points={{-38,-60},{10,-60},{10,42}, - {18,42}}, color={255,0,255})); - connect(or3.y, actCooMax.u) - annotation (Line(points={{42,50},{78,50}}, color={255,0,255})); - connect(ifOcc.y, occModInd.u) annotation (Line(points={{-38,70},{0,70},{0,10}, - {18,10}}, color={255,0,255})); + connect(ifOcc.y, or3.u1) annotation (Line(points={{-38,70},{-20,70},{-20,50},{ + -2,50}}, color={255,0,255})); + connect(ifCooDow.y, or3.u2) annotation (Line(points={{-38,0},{-10,0},{-10,42}, + {-2,42}}, color={255,0,255})); + connect(ifOcc.y, occModInd.u) annotation (Line(points={{-38,70},{-20,70},{-20, + 10},{-2,10}}, color={255,0,255})); connect(VOccMin_flow, pro.u2) annotation (Line(points={{-160,-80},{60,-80},{60, -56},{78,-56}}, color={0,0,127})); - connect(occModInd.y, pro.u1) annotation (Line(points={{42,10},{60,10},{60,-44}, + connect(occModInd.y, pro.u1) annotation (Line(points={{22,10},{60,10},{60,-44}, {78,-44}}, color={0,0,127})); connect(actCooMax.y, VActCooMax_flow) - annotation (Line(points={{102,50},{160,50}}, color={0,0,127})); + annotation (Line(points={{122,50},{160,50}}, color={0,0,127})); connect(pro.y, VActMin_flow) annotation (Line(points={{102,-50},{160,-50}}, color={0,0,127})); - + connect(or3.y, or2.u1) + annotation (Line(points={{22,50},{58,50}}, color={255,0,255})); + connect(or2.y, actCooMax.u) + annotation (Line(points={{82,50},{98,50}}, color={255,0,255})); + connect(ifSetUp.y, or2.u2) annotation (Line(points={{-38,-60},{40,-60},{40,42}, + {58,42}}, color={255,0,255})); annotation ( defaultComponentName="actAirSet", Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-140,-120},{140,120}})), diff --git a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/ParallelFanVVF/Subsequences/DamperValves.mo b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/ParallelFanVVF/Subsequences/DamperValves.mo index 0db090b98f9..25e5c006016 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/ParallelFanVVF/Subsequences/DamperValves.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/ParallelFanVVF/Subsequences/DamperValves.mo @@ -194,6 +194,7 @@ block DamperValves annotation (Placement(transformation(extent={{360,-320},{400,-280}}), iconTransformation(extent={{100,-210},{140,-170}}))); +protected Buildings.Controls.OBC.CDL.Logical.And and4 "Logical and" annotation (Placement(transformation(extent={{-80,250},{-60,270}}))); Buildings.Controls.OBC.CDL.Reals.Line lin @@ -224,10 +225,11 @@ block DamperValves Buildings.Controls.OBC.CDL.Reals.Subtract sub2 "Calculate temperature difference between AHU supply air and room " annotation (Placement(transformation(extent={{-240,190},{-220,210}}))); - Buildings.Controls.OBC.CDL.Reals.Switch swi2 "Hot water valve position" + Buildings.Controls.OBC.CDL.Reals.Switch swi2 + "Hot water valve position" annotation (Placement(transformation(extent={{300,10},{320,30}}))); - Buildings.Controls.OBC.CDL.Reals.Sources.Constant nomFlow(final k= - VCooMax_flow) + Buildings.Controls.OBC.CDL.Reals.Sources.Constant nomFlow( + final k=VCooMax_flow) "Nominal volume flow rate" annotation (Placement(transformation(extent={{60,240},{80,260}}))); Buildings.Controls.OBC.CDL.Reals.Divide VDisSet_flowNor @@ -420,7 +422,10 @@ block DamperValves Buildings.Controls.OBC.CDL.Reals.Switch swi8 "Airflow setpoint after considering override" annotation (Placement(transformation(extent={{100,380},{120,400}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or3 + Buildings.Controls.OBC.CDL.Logical.Or or3 + "Check if the airflow setpoint should be overrided" + annotation (Placement(transformation(extent={{-80,360},{-60,380}}))); + Buildings.Controls.OBC.CDL.Logical.Or or2 "Check if the airflow setpoint should be overrided" annotation (Placement(transformation(extent={{40,380},{60,400}}))); @@ -507,11 +512,9 @@ equation connect(conTDisHeaSet.y, THeaDisSet) annotation (Line(points={{-118,70},{380,70}}, color={0,0,127})); connect(conDam.y, swi3.u3) annotation (Line(points={{262,280},{280,280},{280, - 102},{298,102}}, - color={0,0,127})); + 102},{298,102}}, color={0,0,127})); connect(conZer3.y, swi3.u1) annotation (Line(points={{-258,110},{20,110},{20, - 118},{298,118}}, - color={0,0,127})); + 118},{298,118}}, color={0,0,127})); connect(minFan.y, gai1.u) annotation (Line(points={{-258,-70},{-242,-70}}, color={0,0,127})); connect(gai1.y, sub.u2) annotation (Line(points={{-218,-70},{-200,-70},{-200,-56}, @@ -551,35 +554,35 @@ equation connect(booToRea.y, mul.u1) annotation (Line(points={{122,-90},{160,-90},{160, -104},{198,-104}}, color={0,0,127})); connect(max1.y, mul.u2) annotation (Line(points={{122,-130},{140,-130},{140,-116}, - {198,-116}}, color={0,0,127})); + {198,-116}}, color={0,0,127})); connect(mul.y, swi4.u1) annotation (Line(points={{222,-110},{240,-110},{240,-202}, - {258,-202}}, color={0,0,127})); + {258,-202}}, color={0,0,127})); connect(VOAMin_flow, gre2.u1) annotation (Line(points={{-360,-110},{-300,-110}, {-300,-260},{-62,-260}}, color={0,0,127})); connect(gre2.y, booToRea1.u) annotation (Line(points={{-38,-260},{38,-260}}, color={255,0,255})); connect(max1.y, mul1.u1) annotation (Line(points={{122,-130},{140,-130},{140,-264}, - {158,-264}}, color={0,0,127})); + {158,-264}}, color={0,0,127})); connect(booToRea1.y, mul1.u2) annotation (Line(points={{62,-260},{120,-260},{120, - -276},{158,-276}}, color={0,0,127})); + -276},{158,-276}}, color={0,0,127})); connect(greThr2.y, cooHea.u2) annotation (Line(points={{-258,0},{-120,0},{-120, - -308},{-62,-308}}, color={255,0,255})); + -308},{-62,-308}}, color={255,0,255})); connect(greThr1.y, cooHea.u1) annotation (Line(points={{-218,280},{-100,280},{ -100,-300},{-62,-300}},color={255,0,255})); connect(cooHea.y, not1.u) annotation (Line(points={{-38,-300},{38,-300}}, color={255,0,255})); connect(mul1.y, swi6.u1) annotation (Line(points={{182,-270},{200,-270},{200,-292}, - {218,-292}}, color={0,0,127})); + {218,-292}}, color={0,0,127})); connect(not1.y, swi6.u2) annotation (Line(points={{62,-300},{218,-300}}, color={255,0,255})); connect(swi6.y, swi4.u3) annotation (Line(points={{242,-300},{250,-300},{250,-218}, - {258,-218}}, color={0,0,127})); + {258,-218}}, color={0,0,127})); connect(conHal1.y, heaFanRat.x1) annotation (Line(points={{-38,-380},{20,-380}, {20,-402},{38,-402}}, color={0,0,127})); connect(mul1.y, max2.u2) annotation (Line(points={{182,-270},{200,-270},{200,-322}, - {-260,-322},{-260,-386},{-182,-386}}, color={0,0,127})); + {-260,-322},{-260,-386},{-182,-386}}, color={0,0,127})); connect(minFan.y, max2.u1) annotation (Line(points={{-258,-70},{-250,-70},{-250, - -374},{-182,-374}}, color={0,0,127})); + -374},{-182,-374}}, color={0,0,127})); connect(max2.y, heaFanRat.f1) annotation (Line(points={{-158,-380},{-120,-380}, {-120,-406},{38,-406}}, color={0,0,127})); connect(uHea, heaFanRat.u) annotation (Line(points={{-360,0},{-310,0},{-310,-410}, @@ -603,8 +606,7 @@ equation connect(isUno.y, swi2.u2) annotation (Line(points={{-158,-500},{130,-500},{130, 20},{298,20}}, color={255,0,255})); connect(isUno.y, swi3.u2) annotation (Line(points={{-158,-500},{130,-500},{ - 130,110},{298,110}}, - color={255,0,255})); + 130,110},{298,110}}, color={255,0,255})); connect(isUno.y, swi7.u2) annotation (Line(points={{-158,-500},{130,-500},{130, -240},{318,-240}}, color={255,0,255})); connect(swi4.y, swi7.u3) annotation (Line(points={{282,-210},{300,-210},{300,-248}, @@ -647,21 +649,17 @@ equation connect(zerFlo.y,add1. u1) annotation (Line(points={{-58,500},{0,500},{0,486}, {38,486}}, color={0,0,127})); connect(forZerFlo.y,or3. u1) annotation (Line(points={{-118,500},{-100,500},{-100, - 398},{38,398}}, color={255,0,255})); + 370},{-82,370}},color={255,0,255})); connect(forCooMax.y,or3. u2) annotation (Line(points={{-118,460},{-100,460},{-100, - 390},{38,390}}, color={255,0,255})); + 362},{-82,362}},color={255,0,255})); connect(add1.y,swi8. u1) annotation (Line(points={{62,480},{80,480},{80,398},{ 98,398}}, color={0,0,127})); connect(add2.y,add1. u2) annotation (Line(points={{22,440},{30,440},{30,474},{ 38,474}}, color={0,0,127})); connect(minFlo.y,add2. u2) annotation (Line(points={{-58,420},{-20,420},{-20,434}, {-2,434}}, color={0,0,127})); - connect(forMinFlo.y,or3. u3) annotation (Line(points={{-118,420},{-100,420},{-100, - 382},{38,382}},color={255,0,255})); connect(swi.y, swi8.u3) annotation (Line(points={{82,300},{90,300},{90,382},{98, 382}}, color={0,0,127})); - connect(or3.y, swi8.u2) - annotation (Line(points={{62,390},{98,390}}, color={255,0,255})); connect(swi8.y, VPri_flow_Set) annotation (Line(points={{122,390},{380,390}}, color={0,0,127})); connect(swi8.y, VDisSet_flowNor.u1) annotation (Line(points={{122,390},{140,390}, @@ -672,6 +670,12 @@ equation {-80,-40},{-80,-156},{38,-156}}, color={0,0,127})); connect(u1Fan, conDam.trigger) annotation (Line(points={{-360,130},{244,130},{ 244,268}}, color={255,0,255})); + connect(or2.y, swi8.u2) + annotation (Line(points={{62,390},{98,390}}, color={255,0,255})); + connect(or3.y, or2.u2) annotation (Line(points={{-58,370},{20,370},{20,382},{38, + 382}}, color={255,0,255})); + connect(forMinFlo.y, or2.u1) annotation (Line(points={{-118,420},{-100,420},{-100, + 390},{38,390}}, color={255,0,255})); annotation ( defaultComponentName="damValFan", Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-340,-520},{360,520}}), diff --git a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/Reheat/Subsequences/ActiveAirFlow.mo b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/Reheat/Subsequences/ActiveAirFlow.mo index 37b8fdb7c70..29534af58c6 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/Reheat/Subsequences/ActiveAirFlow.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/Reheat/Subsequences/ActiveAirFlow.mo @@ -74,7 +74,7 @@ protected final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.setUp) "Setup mode" annotation (Placement(transformation(extent={{-160,0},{-140,20}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or3 + Buildings.Controls.OBC.CDL.Logical.Or or3 "Check if it is in occupied, cooldown, or setup mode" annotation (Placement(transformation(extent={{-20,160},{0,180}}))); Buildings.Controls.OBC.CDL.Conversions.BooleanToReal actCooMax( @@ -162,6 +162,9 @@ protected final k=VHeaMin_flow) "Heating minimum airflow" annotation (Placement(transformation(extent={{-100,-40},{-80,-20}}))); + Buildings.Controls.OBC.CDL.Logical.Or or1 + "Check if it is in occupied, cooldown, or setup mode" + annotation (Placement(transformation(extent={{40,160},{60,180}}))); equation connect(occMod.y, ifOcc.u1) @@ -184,14 +187,10 @@ equation -130,-198},{-122,-198}}, color={255,127,0})); connect(setBacMod.y, ifSetBac.u1) annotation (Line(points={{-138,-190},{-122,-190}}, color={255,127,0})); - connect(ifOcc.y, or3.u1) annotation (Line(points={{-98,190},{-60,190},{-60,178}, - {-22,178}}, color={255,0,255})); - connect(ifCooDow.y, or3.u2) annotation (Line(points={{-98,90},{-70,90},{-70,170}, + connect(ifOcc.y, or3.u1) annotation (Line(points={{-98,190},{-60,190},{-60,170}, {-22,170}}, color={255,0,255})); - connect(ifSetUp.y, or3.u3) annotation (Line(points={{-98,10},{-50,10},{-50,162}, + connect(ifCooDow.y, or3.u2) annotation (Line(points={{-98,90},{-70,90},{-70,162}, {-22,162}}, color={255,0,255})); - connect(or3.y, actCooMax.u) - annotation (Line(points={{2,170},{138,170}}, color={255,0,255})); connect(ifOcc.y, occModInd.u) annotation (Line(points={{-98,190},{-60,190},{-60, 130},{-22,130}}, color={255,0,255})); connect(VOccMin_flow, pro.u2) annotation (Line(points={{-220,40},{-180,40},{-180, @@ -252,7 +251,12 @@ equation annotation (Line(points={{182,20},{220,20}}, color={0,0,127})); connect(add4.y, VActHeaMax_flow) annotation (Line(points={{182,-120},{220,-120}}, color={0,0,127})); - + connect(or3.y, or1.u1) + annotation (Line(points={{2,170},{38,170}}, color={255,0,255})); + connect(or1.y, actCooMax.u) + annotation (Line(points={{62,170},{138,170}}, color={255,0,255})); + connect(ifSetUp.y, or1.u2) annotation (Line(points={{-98,10},{30,10},{30,162}, + {38,162}}, color={255,0,255})); annotation ( defaultComponentName="actAirSet", Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-200,-220},{200,220}})), diff --git a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/Reheat/Subsequences/DamperValves.mo b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/Reheat/Subsequences/DamperValves.mo index ae4d9350254..3be1d715c6c 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/Reheat/Subsequences/DamperValves.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/Reheat/Subsequences/DamperValves.mo @@ -193,6 +193,7 @@ block DamperValves annotation (Placement(transformation(extent={{320,-180},{360,-140}}), iconTransformation(extent={{100,-160},{140,-120}}))); +protected Buildings.Controls.OBC.CDL.Logical.And and4 "Logical and" annotation (Placement(transformation(extent={{-60,140},{-40,160}}))); Buildings.Controls.OBC.CDL.Reals.Line lin @@ -389,7 +390,7 @@ block DamperValves Buildings.Controls.OBC.CDL.Reals.Switch swi6 "Airflow setpoint after considering override" annotation (Placement(transformation(extent={{180,270},{200,290}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or3 + Buildings.Controls.OBC.CDL.Logical.Or or3 "Check if the airflow setpoint should be overrided" annotation (Placement(transformation(extent={{-60,290},{-40,310}}))); Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt5( @@ -408,7 +409,7 @@ block DamperValves annotation (Placement(transformation(extent={{0,350},{20,370}}))); Buildings.Controls.OBC.CDL.Logical.Or or1 "Check if the airflow setpoint should be overrided" - annotation (Placement(transformation(extent={{0,270},{20,290}}))); + annotation (Placement(transformation(extent={{60,270},{80,290}}))); Buildings.Controls.OBC.CDL.Reals.Sources.Constant cooMax1( final k=VCooMax_flow) "Cooling maximum flow" @@ -429,6 +430,10 @@ block DamperValves final falseHoldDuration=0) "Hold true input for certain time" annotation (Placement(transformation(extent={{-240,160},{-220,180}}))); + Buildings.Controls.OBC.CDL.Logical.Or or4 + "Check if the airflow setpoint should be overrided" + annotation (Placement(transformation(extent={{0,280},{20,300}}))); + equation connect(uCoo, lin.u) annotation (Line(points={{-340,200},{-162,200}}, color={0,0,127})); @@ -593,12 +598,12 @@ equation annotation (Line(points={{-118,380},{-62,380}},color={255,0,255})); connect(zerFlo.y,add1. u1) annotation (Line(points={{-38,460},{0,460},{0,446}, {118,446}},color={0,0,127})); - connect(forZerFlo.y,or3. u1) annotation (Line(points={{-118,460},{-104,460},{-104, - 308},{-62,308}}, color={255,0,255})); - connect(forCooMax.y,or3. u2) annotation (Line(points={{-118,420},{-96,420},{-96, - 300},{-62,300}}, color={255,0,255})); - connect(forMinFlo.y,or3. u3) annotation (Line(points={{-118,380},{-88,380},{-88, - 292},{-62,292}}, color={255,0,255})); + connect(forZerFlo.y,or3. u1) annotation (Line(points={{-118,460},{-104,460},{ + -104,300},{-62,300}}, + color={255,0,255})); + connect(forCooMax.y,or3. u2) annotation (Line(points={{-118,420},{-96,420},{ + -96,292},{-62,292}}, + color={255,0,255})); connect(add1.y, swi6.u1) annotation (Line(points={{142,440},{160,440},{160,288}, {178,288}}, color={0,0,127})); connect(oveFloSet,forMinFlo1. u1) annotation (Line(points={{-340,460},{-300,460}, @@ -611,12 +616,10 @@ equation {-2,366}}, color={0,0,127})); connect(heaMax.y,add4. u2) annotation (Line(points={{-38,340},{-20,340},{-20,354}, {-2,354}},color={0,0,127})); - connect(or3.y,or1. u1) annotation (Line(points={{-38,300},{-20,300},{-20,280}, - {-2,280}}, color={255,0,255})); connect(forMinFlo1.y,or1. u2) annotation (Line(points={{-118,340},{-80,340},{-80, - 272},{-2,272}}, color={255,0,255})); + 272},{58,272}}, color={255,0,255})); connect(or1.y, swi6.u2) - annotation (Line(points={{22,280},{178,280}}, color={255,0,255})); + annotation (Line(points={{82,280},{178,280}}, color={255,0,255})); connect(add2.y, add1.u2) annotation (Line(points={{82,400},{100,400},{100,434}, {118,434}}, color={0,0,127})); connect(add4.y, add2.u2) annotation (Line(points={{22,360},{40,360},{40,394},{ @@ -657,6 +660,12 @@ equation 138}}, color={255,0,255})); connect(max1.y, swi3.u3) annotation (Line(points={{-78,-240},{-60,-240},{-60, -218},{-42,-218}}, color={0,0,127})); + connect(forMinFlo.y, or4.u2) annotation (Line(points={{-118,380},{-88,380},{-88, + 282},{-2,282}}, color={255,0,255})); + connect(or3.y, or4.u1) annotation (Line(points={{-38,300},{-20,300},{-20,290}, + {-2,290}}, color={255,0,255})); + connect(or4.y, or1.u1) annotation (Line(points={{22,290},{40,290},{40,280},{58, + 280}}, color={255,0,255})); annotation ( defaultComponentName="damVal", Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-320,-500},{320,500}}), diff --git a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/SeriesFanCVF/Subsequences/ActiveAirFlow.mo b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/SeriesFanCVF/Subsequences/ActiveAirFlow.mo index 64dee967a67..044238fce17 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/SeriesFanCVF/Subsequences/ActiveAirFlow.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/SeriesFanCVF/Subsequences/ActiveAirFlow.mo @@ -45,17 +45,17 @@ protected final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.setUp) "Setup mode" annotation (Placement(transformation(extent={{-100,-70},{-80,-50}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or3 + Buildings.Controls.OBC.CDL.Logical.Or or3 "Check if it is in occupied, cooldown, or setup mode" - annotation (Placement(transformation(extent={{20,40},{40,60}}))); + annotation (Placement(transformation(extent={{0,40},{20,60}}))); Buildings.Controls.OBC.CDL.Conversions.BooleanToReal actCooMax( final realTrue=VCooMax_flow) "Active cooling maximum flow" - annotation (Placement(transformation(extent={{80,40},{100,60}}))); + annotation (Placement(transformation(extent={{100,40},{120,60}}))); Buildings.Controls.OBC.CDL.Conversions.BooleanToReal occModInd( final realTrue=1) "If in occupied mode, output 1" - annotation (Placement(transformation(extent={{20,0},{40,20}}))); + annotation (Placement(transformation(extent={{0,0},{20,20}}))); Buildings.Controls.OBC.CDL.Reals.Multiply pro "Active cooling minimum, minimum airflow setpoint" annotation (Placement(transformation(extent={{80,-60},{100,-40}}))); @@ -68,6 +68,9 @@ protected Buildings.Controls.OBC.CDL.Integers.Equal ifSetUp "Check if current operation mode is setup mode" annotation (Placement(transformation(extent={{-60,-70},{-40,-50}}))); + Buildings.Controls.OBC.CDL.Logical.Or or2 + "Check if it is in occupied, cooldown, or setup mode" + annotation (Placement(transformation(extent={{60,40},{80,60}}))); equation connect(occMod.y, ifOcc.u1) @@ -82,25 +85,26 @@ equation -8},{-62,-8}}, color={255,127,0})); connect(uOpeMod, ifSetUp.u2) annotation (Line(points={{-160,30},{-70,30},{-70, -68},{-62,-68}}, color={255,127,0})); - connect(ifOcc.y, or3.u1) annotation (Line(points={{-38,70},{0,70},{0,58},{18,58}}, - color={255,0,255})); - connect(ifCooDow.y, or3.u2) annotation (Line(points={{-38,0},{-10,0},{-10,50}, - {18,50}}, color={255,0,255})); - connect(ifSetUp.y, or3.u3) annotation (Line(points={{-38,-60},{10,-60},{10,42}, - {18,42}}, color={255,0,255})); - connect(or3.y, actCooMax.u) - annotation (Line(points={{42,50},{78,50}}, color={255,0,255})); - connect(ifOcc.y, occModInd.u) annotation (Line(points={{-38,70},{0,70},{0,10}, - {18,10}}, color={255,0,255})); + connect(ifOcc.y, or3.u1) annotation (Line(points={{-38,70},{-20,70},{-20,50}, + {-2,50}},color={255,0,255})); + connect(ifCooDow.y, or3.u2) annotation (Line(points={{-38,0},{-10,0},{-10,42}, + {-2,42}}, color={255,0,255})); + connect(ifOcc.y, occModInd.u) annotation (Line(points={{-38,70},{-20,70},{-20, + 10},{-2,10}}, color={255,0,255})); connect(VOccMin_flow, pro.u2) annotation (Line(points={{-160,-80},{60,-80},{60, -56},{78,-56}}, color={0,0,127})); - connect(occModInd.y, pro.u1) annotation (Line(points={{42,10},{60,10},{60,-44}, + connect(occModInd.y, pro.u1) annotation (Line(points={{22,10},{60,10},{60,-44}, {78,-44}}, color={0,0,127})); connect(actCooMax.y, VActCooMax_flow) - annotation (Line(points={{102,50},{160,50}}, color={0,0,127})); + annotation (Line(points={{122,50},{160,50}}, color={0,0,127})); connect(pro.y, VActMin_flow) annotation (Line(points={{102,-50},{160,-50}}, color={0,0,127})); - + connect(or3.y, or2.u1) + annotation (Line(points={{22,50},{58,50}}, color={255,0,255})); + connect(or2.y, actCooMax.u) + annotation (Line(points={{82,50},{98,50}}, color={255,0,255})); + connect(ifSetUp.y, or2.u2) annotation (Line(points={{-38,-60},{40,-60},{40,42}, + {58,42}}, color={255,0,255})); annotation ( defaultComponentName="actAirSet", Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-140,-120},{140,120}})), diff --git a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/SeriesFanCVF/Subsequences/DamperValves.mo b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/SeriesFanCVF/Subsequences/DamperValves.mo index c848653ac59..b4f3bc13a90 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/SeriesFanCVF/Subsequences/DamperValves.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/SeriesFanCVF/Subsequences/DamperValves.mo @@ -202,6 +202,7 @@ block DamperValves annotation (Placement(transformation(extent={{320,-360},{360,-320}}), iconTransformation(extent={{100,-210},{140,-170}}))); +protected Buildings.Controls.OBC.CDL.Logical.And and4 "Logical and" annotation (Placement(transformation(extent={{-40,140},{-20,160}}))); Buildings.Controls.OBC.CDL.Reals.Line lin @@ -275,8 +276,8 @@ block DamperValves annotation (Placement(transformation(extent={{100,-180},{120,-160}}))); Buildings.Controls.OBC.CDL.Reals.Switch swi2 "Hot water valve position" annotation (Placement(transformation(extent={{280,-100},{300,-80}}))); - Buildings.Controls.OBC.CDL.Reals.Sources.Constant nomFlow(final k= - VCooMax_flow) + Buildings.Controls.OBC.CDL.Reals.Sources.Constant nomFlow( + final k=VCooMax_flow) "Nominal volume flow rate" annotation (Placement(transformation(extent={{160,130},{180,150}}))); Buildings.Controls.OBC.CDL.Reals.Divide VDisSet_flowNor @@ -299,15 +300,14 @@ block DamperValves annotation (Placement(transformation(extent={{240,0},{260,20}}))); Buildings.Controls.OBC.CDL.Logical.Latch lat "Close damper" annotation (Placement(transformation(extent={{100,-280},{120,-260}}))); - Buildings.Controls.OBC.CDL.Reals.LessThreshold cloDam( final t=damPosHys, final h=damPosHys/2) "Check if the damper is fully closed before turning on fan" annotation (Placement(transformation(extent={{-260,-350},{-240,-330}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or3 + Buildings.Controls.OBC.CDL.Logical.Or or5 "Check if it is in heating, cooling state, or it is in occupied mode" - annotation (Placement(transformation(extent={{-40,-280},{-20,-260}}))); + annotation (Placement(transformation(extent={{-60,-260},{-40,-240}}))); Buildings.Controls.OBC.CDL.Integers.Sources.Constant occ( final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.occupied) "Constant signal for occupied mode" @@ -375,9 +375,15 @@ block DamperValves Buildings.Controls.OBC.CDL.Reals.Switch swi8 "Airflow setpoint after considering override" annotation (Placement(transformation(extent={{140,260},{160,280}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or1 + Buildings.Controls.OBC.CDL.Logical.Or or1 + "Check if the airflow setpoint should be overrided" + annotation (Placement(transformation(extent={{20,240},{40,260}}))); + Buildings.Controls.OBC.CDL.Logical.Or or2 "Check if the airflow setpoint should be overrided" - annotation (Placement(transformation(extent={{60,260},{80,280}}))); + annotation (Placement(transformation(extent={{80,260},{100,280}}))); + Buildings.Controls.OBC.CDL.Logical.Or or4 + "Check if it is in heating, cooling state, or it is in occupied mode" + annotation (Placement(transformation(extent={{-20,-280},{0,-260}}))); equation connect(uCoo, lin.u) @@ -483,14 +489,10 @@ equation -230},{-202,-230}}, color={255,127,0})); connect(occ.y, isOcc.u2) annotation (Line(points={{-238,-238},{-202,-238}}, color={255,127,0})); - connect(greThr1.y, or3.u1) annotation (Line(points={{-198,170},{-80,170},{-80, - -262},{-42,-262}}, color={255,0,255})); - connect(greThr2.y, or3.u2) annotation (Line(points={{-238,-110},{-100,-110},{-100, - -270},{-42,-270}}, color={255,0,255})); - connect(isOcc.y, or3.u3) annotation (Line(points={{-178,-230},{-120,-230},{-120, - -278},{-42,-278}}, color={255,0,255})); - connect(or3.y, edg.u) - annotation (Line(points={{-18,-270},{38,-270}}, color={255,0,255})); + connect(greThr1.y,or5. u1) annotation (Line(points={{-198,170},{-80,170},{-80, + -250},{-62,-250}}, color={255,0,255})); + connect(greThr2.y,or5. u2) annotation (Line(points={{-238,-110},{-100,-110},{-100, + -258},{-62,-258}}, color={255,0,255})); connect(edg.y, lat.u) annotation (Line(points={{62,-270},{98,-270}}, color={255,0,255})); connect(u1TerFan, tim.u) @@ -502,18 +504,13 @@ equation connect(booToRea.y, mul.u2) annotation (Line(points={{202,-270},{240,-270},{240, -18},{278,-18}}, color={0,0,127})); connect(swi3.y, mul.u1) annotation (Line(points={{262,10},{270,10},{270,-6},{ - 278,-6}}, - color={0,0,127})); + 278,-6}}, color={0,0,127})); connect(mul.y, yDam) annotation (Line(points={{302,-12},{340,-12}}, color={0,0,127})); connect(cloDam.y, and2.u1) annotation (Line(points={{-238,-340},{38,-340}}, color={255,0,255})); - connect(or3.y, and2.u2) annotation (Line(points={{-18,-270},{0,-270},{0,-348}, - {38,-348}}, color={255,0,255})); connect(and2.y, lat1.u) annotation (Line(points={{62,-340},{98,-340}}, color={255,0,255})); - connect(or3.y, falEdg.u) annotation (Line(points={{-18,-270},{0,-270},{0,-380}, - {38,-380}}, color={255,0,255})); connect(falEdg.y, lat1.clr) annotation (Line(points={{62,-380},{80,-380},{80,-346}, {98,-346}}, color={255,0,255})); connect(lat1.y, y1Fan) @@ -542,19 +539,15 @@ equation connect(zerFlo.y,add1. u1) annotation (Line(points={{-38,380},{20,380},{20,366}, {78,366}}, color={0,0,127})); connect(forZerFlo.y,or1. u1) annotation (Line(points={{-98,380},{-80,380},{-80, - 278},{58,278}}, color={255,0,255})); + 250},{18,250}}, color={255,0,255})); connect(forCooMax.y,or1. u2) annotation (Line(points={{-98,340},{-80,340},{-80, - 270},{58,270}}, color={255,0,255})); + 242},{18,242}}, color={255,0,255})); connect(add1.y,swi8. u1) annotation (Line(points={{102,360},{120,360},{120,278}, {138,278}}, color={0,0,127})); connect(add2.y,add1. u2) annotation (Line(points={{42,320},{60,320},{60,354},{ 78,354}}, color={0,0,127})); connect(minFlo.y,add2. u2) annotation (Line(points={{-38,300},{0,300},{0,314}, {18,314}}, color={0,0,127})); - connect(forMinFlo.y,or1. u3) annotation (Line(points={{-98,300},{-80,300},{-80, - 262},{58,262}},color={255,0,255})); - connect(or1.y, swi8.u2) - annotation (Line(points={{82,270},{138,270}}, color={255,0,255})); connect(swi.y, swi8.u3) annotation (Line(points={{102,190},{120,190},{120,262}, {138,262}}, color={0,0,127})); connect(swi8.y, VDisSet_flowNor.u1) annotation (Line(points={{162,270},{200,270}, @@ -563,6 +556,22 @@ equation annotation (Line(points={{162,270},{340,270}}, color={0,0,127})); connect(u1Fan, conDam.trigger) annotation (Line(points={{-340,30},{264,30},{264, 158}}, color={255,0,255})); + connect(or2.y, swi8.u2) + annotation (Line(points={{102,270},{138,270}}, color={255,0,255})); + connect(forMinFlo.y, or2.u1) annotation (Line(points={{-98,300},{-80,300},{-80, + 270},{78,270}}, color={255,0,255})); + connect(or1.y, or2.u2) annotation (Line(points={{42,250},{60,250},{60,262},{78, + 262}}, color={255,0,255})); + connect(isOcc.y, or4.u2) annotation (Line(points={{-178,-230},{-120,-230},{-120, + -278},{-22,-278}}, color={255,0,255})); + connect(or5.y, or4.u1) annotation (Line(points={{-38,-250},{-30,-250},{-30,-270}, + {-22,-270}}, color={255,0,255})); + connect(or4.y, edg.u) + annotation (Line(points={{2,-270},{38,-270}}, color={255,0,255})); + connect(or4.y, and2.u2) annotation (Line(points={{2,-270},{20,-270},{20,-348}, + {38,-348}}, color={255,0,255})); + connect(or4.y, falEdg.u) annotation (Line(points={{2,-270},{20,-270},{20,-380}, + {38,-380}}, color={255,0,255})); annotation ( defaultComponentName="damValFan", Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-320,-400},{320,400}}), @@ -574,7 +583,7 @@ annotation ( fillPattern=FillPattern.Solid, pattern=LinePattern.None), Text( - extent={{-152,258},{-24,236}}, + extent={{-152,244},{-24,222}}, textColor={0,0,127}, fillColor={215,215,215}, fillPattern=FillPattern.Solid, diff --git a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/SeriesFanVVF/Subsequences/ActiveAirFlow.mo b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/SeriesFanVVF/Subsequences/ActiveAirFlow.mo index c3d5269abbe..c06c70338a9 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/SeriesFanVVF/Subsequences/ActiveAirFlow.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/SeriesFanVVF/Subsequences/ActiveAirFlow.mo @@ -45,17 +45,17 @@ protected final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.setUp) "Setup mode" annotation (Placement(transformation(extent={{-100,-70},{-80,-50}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or3 + Buildings.Controls.OBC.CDL.Logical.Or or3 "Check if it is in occupied, cooldown, or setup mode" - annotation (Placement(transformation(extent={{20,40},{40,60}}))); + annotation (Placement(transformation(extent={{0,40},{20,60}}))); Buildings.Controls.OBC.CDL.Conversions.BooleanToReal actCooMax( final realTrue=VCooMax_flow) "Active cooling maximum flow" - annotation (Placement(transformation(extent={{80,40},{100,60}}))); + annotation (Placement(transformation(extent={{100,40},{120,60}}))); Buildings.Controls.OBC.CDL.Conversions.BooleanToReal occModInd( final realTrue=1) "If in occupied mode, output 1" - annotation (Placement(transformation(extent={{20,0},{40,20}}))); + annotation (Placement(transformation(extent={{0,0},{20,20}}))); Buildings.Controls.OBC.CDL.Reals.Multiply pro "Active cooling minimum, minimum airflow setpoint" annotation (Placement(transformation(extent={{80,-60},{100,-40}}))); @@ -68,6 +68,9 @@ protected Buildings.Controls.OBC.CDL.Integers.Equal ifSetUp "Check if current operation mode is setup mode" annotation (Placement(transformation(extent={{-60,-70},{-40,-50}}))); + Buildings.Controls.OBC.CDL.Logical.Or or2 + "Check if it is in occupied, cooldown, or setup mode" + annotation (Placement(transformation(extent={{60,40},{80,60}}))); equation connect(occMod.y, ifOcc.u1) @@ -82,25 +85,26 @@ equation -8},{-62,-8}}, color={255,127,0})); connect(uOpeMod, ifSetUp.u2) annotation (Line(points={{-160,30},{-70,30},{-70, -68},{-62,-68}}, color={255,127,0})); - connect(ifOcc.y, or3.u1) annotation (Line(points={{-38,70},{0,70},{0,58},{18,58}}, - color={255,0,255})); - connect(ifCooDow.y, or3.u2) annotation (Line(points={{-38,0},{-10,0},{-10,50}, - {18,50}}, color={255,0,255})); - connect(ifSetUp.y, or3.u3) annotation (Line(points={{-38,-60},{10,-60},{10,42}, - {18,42}}, color={255,0,255})); - connect(or3.y, actCooMax.u) - annotation (Line(points={{42,50},{78,50}}, color={255,0,255})); - connect(ifOcc.y, occModInd.u) annotation (Line(points={{-38,70},{0,70},{0,10}, - {18,10}}, color={255,0,255})); + connect(ifOcc.y, or3.u1) annotation (Line(points={{-38,70},{-20,70},{-20,50},{ + -2,50}}, color={255,0,255})); + connect(ifCooDow.y, or3.u2) annotation (Line(points={{-38,0},{-10,0},{-10,42}, + {-2,42}}, color={255,0,255})); + connect(ifOcc.y, occModInd.u) annotation (Line(points={{-38,70},{-20,70},{-20, + 10},{-2,10}}, color={255,0,255})); connect(VOccMin_flow, pro.u2) annotation (Line(points={{-160,-80},{60,-80},{60, -56},{78,-56}}, color={0,0,127})); - connect(occModInd.y, pro.u1) annotation (Line(points={{42,10},{60,10},{60,-44}, + connect(occModInd.y, pro.u1) annotation (Line(points={{22,10},{60,10},{60,-44}, {78,-44}}, color={0,0,127})); connect(actCooMax.y, VActCooMax_flow) - annotation (Line(points={{102,50},{160,50}}, color={0,0,127})); + annotation (Line(points={{122,50},{160,50}}, color={0,0,127})); connect(pro.y, VActMin_flow) annotation (Line(points={{102,-50},{160,-50}}, color={0,0,127})); - + connect(or3.y, or2.u1) + annotation (Line(points={{22,50},{58,50}}, color={255,0,255})); + connect(or2.y, actCooMax.u) + annotation (Line(points={{82,50},{98,50}}, color={255,0,255})); + connect(ifSetUp.y, or2.u2) annotation (Line(points={{-38,-60},{40,-60},{40,42}, + {58,42}}, color={255,0,255})); annotation ( defaultComponentName="actAirSet", Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-140,-120},{140,120}})), diff --git a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/SeriesFanVVF/Subsequences/DamperValves.mo b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/SeriesFanVVF/Subsequences/DamperValves.mo index 638308a0408..7d5b2bb4357 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/SeriesFanVVF/Subsequences/DamperValves.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36/TerminalUnits/SeriesFanVVF/Subsequences/DamperValves.mo @@ -220,6 +220,7 @@ block DamperValves annotation (Placement(transformation(extent={{360,-460},{400,-420}}), iconTransformation(extent={{100,-210},{140,-170}}))); +protected Buildings.Controls.OBC.CDL.Logical.And and4 "Logical and" annotation (Placement(transformation(extent={{-80,250},{-60,270}}))); Buildings.Controls.OBC.CDL.Reals.Line lin @@ -252,8 +253,8 @@ block DamperValves annotation (Placement(transformation(extent={{-240,190},{-220,210}}))); Buildings.Controls.OBC.CDL.Reals.Switch swi2 "Hot water valve position" annotation (Placement(transformation(extent={{300,10},{320,30}}))); - Buildings.Controls.OBC.CDL.Reals.Sources.Constant nomFlow(final k= - VCooMax_flow) + Buildings.Controls.OBC.CDL.Reals.Sources.Constant nomFlow( + final k=VCooMax_flow) "Nominal volume flow rate" annotation (Placement(transformation(extent={{100,240},{120,260}}))); Buildings.Controls.OBC.CDL.Reals.Divide VDisSet_flowNor @@ -328,7 +329,6 @@ block DamperValves Buildings.Controls.OBC.CDL.Integers.Equal isUno "Output true if the operation mode is unoccupied" annotation (Placement(transformation(extent={{20,-340},{40,-320}}))); - Buildings.Controls.OBC.CDL.Reals.Switch swi4 "Fan setpoint when it is in cooling state and the supply air temperture is high" annotation (Placement(transformation(extent={{40,-90},{60,-70}}))); @@ -364,9 +364,9 @@ block DamperValves Buildings.Controls.OBC.CDL.Integers.Equal isOcc "Output true if the operation mode is occupied" annotation (Placement(transformation(extent={{-220,-340},{-200,-320}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or3 + Buildings.Controls.OBC.CDL.Logical.Or or3 "Check if it is in heating, cooling state, or it is in occupied mode" - annotation (Placement(transformation(extent={{-60,-380},{-40,-360}}))); + annotation (Placement(transformation(extent={{-80,-430},{-60,-410}}))); Buildings.Controls.OBC.CDL.Logical.Edge edg "Rising edge" annotation (Placement(transformation(extent={{20,-380},{40,-360}}))); @@ -427,15 +427,21 @@ block DamperValves annotation (Placement(transformation(extent={{0,410},{20,430}}))); Buildings.Controls.OBC.CDL.Reals.Add add1 "Add up inputs" annotation (Placement(transformation(extent={{60,450},{80,470}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or1 + Buildings.Controls.OBC.CDL.Logical.Or or1 "Check if the airflow setpoint should be overrided" - annotation (Placement(transformation(extent={{40,360},{60,380}}))); + annotation (Placement(transformation(extent={{-80,340},{-60,360}}))); Buildings.Controls.OBC.CDL.Reals.Switch swi9 "Airflow setpoint after considering override" annotation (Placement(transformation(extent={{120,360},{140,380}}))); Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt2(final k=3) "Constant 3" annotation (Placement(transformation(extent={{-200,370},{-180,390}}))); + Buildings.Controls.OBC.CDL.Logical.Or or2 + "Check if the airflow setpoint should be overrided" + annotation (Placement(transformation(extent={{60,360},{80,380}}))); + Buildings.Controls.OBC.CDL.Logical.Or or4 + "Check if it is in heating, cooling state, or it is in occupied mode" + annotation (Placement(transformation(extent={{-40,-380},{-20,-360}}))); equation connect(uCoo, lin.u) @@ -518,18 +524,17 @@ equation connect(conTDisHeaSet.y, THeaDisSet) annotation (Line(points={{-118,70},{380,70}}, color={0,0,127})); connect(conZer3.y, swi3.u1) annotation (Line(points={{-258,110},{20,110},{20, - 126},{258,126}}, - color={0,0,127})); + 126},{258,126}}, color={0,0,127})); connect(conHal1.y, heaFanRat.x1) annotation (Line(points={{2,-220},{20,-220},{ 20,-242},{38,-242}}, color={0,0,127})); connect(uHea, heaFanRat.u) annotation (Line(points={{-360,0},{-310,0},{-310,-250}, - {38,-250}}, color={0,0,127})); + {38,-250}}, color={0,0,127})); connect(conHal2.y, heaFanRat.x2) annotation (Line(points={{-158,-280},{-120,-280}, - {-120,-254},{38,-254}}, color={0,0,127})); + {-120,-254},{38,-254}}, color={0,0,127})); connect(maxFan.y, heaFanRat.f2) annotation (Line(points={{2,-280},{20,-280},{20, - -258},{38,-258}}, color={0,0,127})); - connect(uno.y, isUno.u1) annotation (Line(points={{-58,-330},{18,-330}}, - color={255,127,0})); + -258},{38,-258}}, color={0,0,127})); + connect(uno.y, isUno.u1) + annotation (Line(points={{-58,-330},{18,-330}}, color={255,127,0})); connect(isUno.y, swi2.u2) annotation (Line(points={{42,-330},{130,-330},{130,20}, {298,20}}, color={255,0,255})); connect(isUno.y, swi3.u2) annotation (Line(points={{42,-330},{130,-330},{130, @@ -581,13 +586,9 @@ equation connect(uOpeMod, isUno.u2) annotation (Line(points={{-360,-350},{0,-350},{0,-338}, {18,-338}}, color={255,127,0})); connect(greThr1.y, or3.u1) annotation (Line(points={{-218,280},{-100,280},{-100, - -362},{-62,-362}}, color={255,0,255})); - connect(greThr2.y, or3.u2) annotation (Line(points={{-258,0},{-110,0},{-110,-370}, - {-62,-370}}, color={255,0,255})); - connect(isOcc.y, or3.u3) annotation (Line(points={{-198,-330},{-120,-330},{-120, - -378},{-62,-378}}, color={255,0,255})); - connect(or3.y, edg.u) - annotation (Line(points={{-38,-370},{18,-370}}, color={255,0,255})); + -420},{-82,-420}}, color={255,0,255})); + connect(greThr2.y, or3.u2) annotation (Line(points={{-258,0},{-110,0},{-110,-428}, + {-82,-428}}, color={255,0,255})); connect(edg.y, lat.u) annotation (Line(points={{42,-370},{78,-370}}, color={255,0,255})); connect(lat.y, booToRea.u) @@ -600,10 +601,6 @@ equation annotation (Line(points={{-360,-440},{-282,-440}}, color={0,0,127})); connect(cloDam.y, and2.u1) annotation (Line(points={{-258,-440},{18,-440}}, color={255,0,255})); - connect(or3.y, and2.u2) annotation (Line(points={{-38,-370},{0,-370},{0,-448}, - {18,-448}}, color={255,0,255})); - connect(or3.y, falEdg.u) annotation (Line(points={{-38,-370},{0,-370},{0,-480}, - {18,-480}}, color={255,0,255})); connect(and2.y, lat1.u) annotation (Line(points={{42,-440},{78,-440}}, color={255,0,255})); connect(falEdg.y, lat1.clr) annotation (Line(points={{42,-480},{60,-480},{60,-446}, @@ -645,22 +642,20 @@ equation {-2,426}},color={0,0,127})); connect(zerFlo.y,add1. u1) annotation (Line(points={{-58,480},{0,480},{0,466}, {58,466}}, color={0,0,127})); - connect(forZerFlo.y,or1. u1) annotation (Line(points={{-118,480},{-100,480},{-100, - 378},{38,378}}, color={255,0,255})); - connect(forCooMax.y,or1. u2) annotation (Line(points={{-118,440},{-100,440},{-100, - 370},{38,370}}, color={255,0,255})); + connect(forZerFlo.y,or1. u1) annotation (Line(points={{-118,480},{-100,480},{ + -100,350},{-82,350}}, + color={255,0,255})); + connect(forCooMax.y,or1. u2) annotation (Line(points={{-118,440},{-100,440},{ + -100,342},{-82,342}}, + color={255,0,255})); connect(add1.y,swi9. u1) annotation (Line(points={{82,460},{100,460},{100,378}, {118,378}}, color={0,0,127})); connect(add2.y,add1. u2) annotation (Line(points={{22,420},{40,420},{40,454},{ 58,454}}, color={0,0,127})); connect(minFlo.y,add2. u2) annotation (Line(points={{-58,400},{-20,400},{-20,414}, {-2,414}}, color={0,0,127})); - connect(forMinFlo.y,or1. u3) annotation (Line(points={{-118,400},{-100,400},{-100, - 362},{38,362}},color={255,0,255})); connect(conInt2.y,forMinFlo. u2) annotation (Line(points={{-178,380},{-160,380}, {-160,392},{-142,392}}, color={255,127,0})); - connect(or1.y, swi9.u2) - annotation (Line(points={{62,370},{118,370}}, color={255,0,255})); connect(swi.y, swi9.u3) annotation (Line(points={{82,300},{100,300},{100,362}, {118,362}}, color={0,0,127})); connect(swi9.y, max1.u1) annotation (Line(points={{142,370},{160,370},{160,-40}, @@ -673,6 +668,22 @@ equation 244,268}}, color={255,0,255})); connect(conDam.y, swi3.u3) annotation (Line(points={{262,280},{270,280},{270, 200},{220,200},{220,110},{258,110}}, color={0,0,127})); + connect(or2.y, swi9.u2) + annotation (Line(points={{82,370},{118,370}}, color={255,0,255})); + connect(or1.y, or2.u2) annotation (Line(points={{-58,350},{-40,350},{-40,362}, + {58,362}}, color={255,0,255})); + connect(forMinFlo.y, or2.u1) annotation (Line(points={{-118,400},{-100,400},{-100, + 370},{58,370}}, color={255,0,255})); + connect(isOcc.y, or4.u1) annotation (Line(points={{-198,-330},{-180,-330},{-180, + -370},{-42,-370}}, color={255,0,255})); + connect(or3.y, or4.u2) annotation (Line(points={{-58,-420},{-50,-420},{-50,-378}, + {-42,-378}}, color={255,0,255})); + connect(or4.y, edg.u) + annotation (Line(points={{-18,-370},{18,-370}}, color={255,0,255})); + connect(or4.y, and2.u2) annotation (Line(points={{-18,-370},{0,-370},{0,-448}, + {18,-448}}, color={255,0,255})); + connect(or4.y, falEdg.u) annotation (Line(points={{-18,-370},{0,-370},{0,-480}, + {18,-480}}, color={255,0,255})); annotation ( defaultComponentName="damValFan", Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-340,-520},{360,520}}), diff --git a/Buildings/Controls/OBC/ASHRAE/G36/ThermalZones/Setpoints.mo b/Buildings/Controls/OBC/ASHRAE/G36/ThermalZones/Setpoints.mo index 462bf702894..af3593a0ced 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36/ThermalZones/Setpoints.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36/ThermalZones/Setpoints.mo @@ -161,6 +161,7 @@ block Setpoints annotation (Placement(transformation(extent={{340,-410},{380,-370}}), iconTransformation(extent={{100,-100},{140,-60}}))); +protected Buildings.Controls.OBC.CDL.Logical.Or or2 "Check if there is cooling/heating demand limit being imposed" annotation (Placement(transformation(extent={{-280,-40},{-260,-20}}))); @@ -174,9 +175,9 @@ block Setpoints Buildings.Controls.OBC.CDL.Logical.Or or5 "Check if demand limit should be ignored or if there is no demand limit" annotation (Placement(transformation(extent={{160,-20},{180,0}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or1 + Buildings.Controls.OBC.CDL.Logical.Or or1 "Check if cooling demand limit level is imposed" - annotation (Placement(transformation(extent={{-40,140},{-20,160}}))); + annotation (Placement(transformation(extent={{-60,150},{-40,170}}))); Buildings.Controls.OBC.CDL.Logical.Not not1 "Logic not" annotation (Placement(transformation(extent={{0,140},{20,160}}))); Buildings.Controls.OBC.CDL.Reals.AddParameter addPar3( @@ -206,8 +207,9 @@ block Setpoints Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler heaSetFre "Freeze current heating setpoint when demand limit is imposed" annotation (Placement(transformation(extent={{-160,-80},{-140,-60}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or4 "Check if heating demand limit level is imposed" - annotation (Placement(transformation(extent={{-40,-80},{-20,-60}}))); + Buildings.Controls.OBC.CDL.Logical.Or or4 + "Check if heating demand limit level is imposed" + annotation (Placement(transformation(extent={{-60,-74},{-40,-54}}))); Buildings.Controls.OBC.CDL.Logical.Not not2 "Logical not" annotation (Placement(transformation(extent={{0,-80},{20,-60}}))); Buildings.Controls.OBC.CDL.Reals.Multiply pro7 @@ -277,8 +279,15 @@ block Setpoints final p=-0.5) "Cooling setpoint minus the minimum difference between cooling and heating setpoints" annotation (Placement(transformation(extent={{160,-590},{180,-570}}))); - -protected + Buildings.Controls.OBC.CDL.Logical.Or or6 + "Current operation mode is occupied, warm-up, or cooldown mode" + annotation (Placement(transformation(extent={{-80,610},{-60,630}}))); + Buildings.Controls.OBC.CDL.Logical.Or or7 + "Check if cooling demand limit level is imposed" + annotation (Placement(transformation(extent={{-30,140},{-10,160}}))); + Buildings.Controls.OBC.CDL.Logical.Or or8 + "Check if heating demand limit level is imposed" + annotation (Placement(transformation(extent={{-30,-80},{-10,-60}}))); Buildings.Controls.OBC.CDL.Integers.Equal intEqu "Check if current operation mode is warm-up mode" annotation (Placement(transformation(extent={{-300,600},{-280,620}}))); @@ -287,8 +296,8 @@ protected annotation (Placement(transformation(extent={{-200,600},{-180,620}}))); Buildings.Controls.OBC.CDL.Integers.Equal intEqu2 "Check if current operation mode is occupied mode" - annotation (Placement(transformation(extent={{-98,600},{-78,620}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or3 + annotation (Placement(transformation(extent={{-120,580},{-100,600}}))); + Buildings.Controls.OBC.CDL.Logical.Or or9 "Current operation mode is occupied, warm-up, or cooldown mode" annotation (Placement(transformation(extent={{-20,600},{0,620}}))); Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt( @@ -302,7 +311,7 @@ protected Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt2( final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.occupied) "Occupied mode" - annotation (Placement(transformation(extent={{-140,570},{-120,590}}))); + annotation (Placement(transformation(extent={{-180,570},{-160,590}}))); Buildings.Controls.OBC.CDL.Logical.Sources.Constant cooSetAdjCon( final k=have_locAdj) "Cooling setpoint adjustable" @@ -543,7 +552,7 @@ equation annotation (Line(points={{-440,630},{-220,630},{-220,610},{-202,610}}, color={255,127,0})); connect(uOpeMod, intEqu2.u1) - annotation (Line(points={{-440,630},{-120,630},{-120,610},{-100,610}}, + annotation (Line(points={{-440,630},{-140,630},{-140,590},{-122,590}}, color={255,127,0})); connect(conInt.y, intEqu.u2) annotation (Line(points={{-318,580},{-310,580},{-310,602},{-302,602}}, @@ -552,17 +561,8 @@ equation annotation (Line(points={{-218,580},{-210,580},{-210,602},{-202,602}}, color={255,127,0})); connect(conInt2.y, intEqu2.u2) - annotation (Line(points={{-118,580},{-110,580},{-110,602},{-100,602}}, + annotation (Line(points={{-158,580},{-140,580},{-140,582},{-122,582}}, color={255,127,0})); - connect(intEqu.y, or3.u1) - annotation (Line(points={{-278,610},{-260,610},{-260,640},{-34,640}, - {-34,618},{-22,618}}, color={255,0,255})); - connect(intEqu1.y, or3.u2) - annotation (Line(points={{-178,610},{-160,610},{-160,634},{-40,634}, - {-40,610},{-22,610}}, color={255,0,255})); - connect(intEqu2.y, or3.u3) - annotation (Line(points={{-76,610},{-60,610},{-60,602},{-22,602}}, - color={255,0,255})); connect(TOccCooSet, swi.u1) annotation (Line(points={{-440,530},{-360,530},{-360, 538},{-302,538}}, color={0,0,127})); connect(TUnoCooSet, swi.u3) annotation (Line(points={{-440,490},{-360,490},{-360, @@ -571,10 +571,10 @@ equation 458},{-302,458}}, color={0,0,127})); connect(TUnoHeaSet, swi1.u3) annotation (Line(points={{-440,410},{-360,410},{-360, 442},{-302,442}}, color={0,0,127})); - connect(or3.y, swi.u2) + connect(or9.y, swi.u2) annotation (Line(points={{2,610},{20,610},{20,560},{-320,560},{-320,530}, {-302,530}}, color={255,0,255})); - connect(or3.y, swi1.u2) + connect(or9.y, swi1.u2) annotation (Line(points={{2,610},{20,610},{20,560},{-320,560},{-320,450}, {-302,450}}, color={255,0,255})); connect(cooSetAdjCon.y, swi4.u2) @@ -613,7 +613,7 @@ equation annotation (Line(points={{-278,450},{120,450},{120,280},{180,280},{180,258}, {218,258}}, color={0,0,127})); connect(intEqu2.y, swi3.u2) - annotation (Line(points={{-76,610},{-60,610},{-60,380},{200,380},{200,250},{ + annotation (Line(points={{-98,590},{-60,590},{-60,380},{200,380},{200,250},{ 218,250}}, color={255,0,255})); connect(uCooDemLimLev, intGreThr.u) annotation (Line(points={{-440,130},{-360,130},{-360,-10},{-342,-10}}, @@ -655,16 +655,11 @@ equation annotation (Line(points={{-138,30},{-128,30},{-128,22},{-102,22}}, color={255,127,0})); connect(intEqu3.y, or1.u1) - annotation (Line(points={{-78,110},{-66,110},{-66,158},{-42,158}}, + annotation (Line(points={{-78,110},{-70,110},{-70,160},{-62,160}}, color={255,0,255})); connect(intEqu4.y, or1.u2) - annotation (Line(points={{-78,70},{-60,70},{-60,150},{-42,150}}, + annotation (Line(points={{-78,70},{-70,70},{-70,152},{-62,152}}, color={255,0,255})); - connect(intEqu5.y, or1.u3) - annotation (Line(points={{-78,30},{-54,30},{-54,142},{-42,142}}, - color={255,0,255})); - connect(or1.y, not1.u) - annotation (Line(points={{-18,150},{-2,150}}, color={255,0,255})); connect(not1.y, booToRea6.u) annotation (Line(points={{22,150},{38,150}}, color={255,0,255})); connect(booToRea.y, pro.u2) @@ -732,16 +727,11 @@ equation connect(intEqu8.y, booToRea5.u) annotation (Line(points={{-78,-190},{-42,-190}}, color={255,0,255})); connect(intEqu6.y, or4.u1) - annotation (Line(points={{-78,-110},{-66,-110},{-66,-62},{-42,-62}}, + annotation (Line(points={{-78,-110},{-70,-110},{-70,-64},{-62,-64}}, color={255,0,255})); connect(intEqu7.y, or4.u2) - annotation (Line(points={{-78,-150},{-60,-150},{-60,-70},{-42,-70}}, - color={255,0,255})); - connect(intEqu8.y, or4.u3) - annotation (Line(points={{-78,-190},{-54,-190},{-54,-78},{-42,-78}}, + annotation (Line(points={{-78,-150},{-70,-150},{-70,-72},{-62,-72}}, color={255,0,255})); - connect(or4.y, not2.u) - annotation (Line(points={{-18,-70},{-2,-70}}, color={255,0,255})); connect(not2.y, booToRea7.u) annotation (Line(points={{22,-70},{38,-70}}, color={255,0,255})); connect(booToRea7.y, pro7.u1) @@ -839,7 +829,7 @@ equation annotation (Line(points={{242,90},{264,90},{264,-244},{148,-244},{148,-278}, {158,-278}}, color={0,0,127})); connect(intEqu2.y, and10.u1) - annotation (Line(points={{-76,610},{-60,610},{-60,380},{280,380},{280,-220}, + annotation (Line(points={{-98,590},{-60,590},{-60,380},{280,380},{280,-220}, {-300,-220},{-300,-270},{-282,-270}}, color={255,0,255})); connect(not4.y, and10.u2) annotation (Line(points={{-318,-270},{-308,-270},{-308,-278},{-282,-278}}, @@ -869,7 +859,7 @@ equation annotation (Line(points={{242,-130},{260,-130},{260,-240},{204,-240},{204,-318}, {218,-318}}, color={0,0,127})); connect(intEqu2.y, not5.u) - annotation (Line(points={{-76,610},{-60,610},{-60,380},{280,380},{280,-220}, + annotation (Line(points={{-98,590},{-60,590},{-60,380},{280,380},{280,-220}, {-300,-220},{-300,-390},{-282,-390}}, color={255,0,255})); connect(not5.y, and11.u1) annotation (Line(points={{-258,-390},{-240,-390},{-240,-410},{-222,-410}}, @@ -919,7 +909,7 @@ equation -418},{-222,-418}}, color={255,0,255})); connect(conFal.y, swi14.u2) annotation (Line(points={{-358,-470},{-340,-470},{-340,-410},{-260,-410},{-260, - -450},{-182,-450}}, color={255,0,255})); + -450},{-182,-450}}, color={255,0,255})); connect(conFal.y, swi15.u2) annotation (Line(points={{-358,-470},{-340,-470},{-340,-410},{-260,-410},{-260, -432},{-80,-432},{-80,-450},{-62,-450}}, color={255,0,255})); @@ -942,10 +932,10 @@ equation annotation (Line(points={{182,-470},{200,-470},{200,-496},{-204,-496},{-204, -608},{-182,-608}}, color={0,0,127})); connect(intEqu2.y, swi17.u2) - annotation (Line(points={{-76,610},{-60,610},{-60,380},{280,380},{280,-220}, + annotation (Line(points={{-98,590},{-60,590},{-60,380},{280,380},{280,-220}, {-300,-220},{-300,-540},{-182,-540}}, color={255,0,255})); connect(intEqu2.y, swi18.u2) - annotation (Line(points={{-76,610},{-60,610},{-60,380},{280,380},{280,-220}, + annotation (Line(points={{-98,590},{-60,590},{-60,380},{280,380},{280,-220}, {-300,-220},{-300,-600},{-182,-600}}, color={255,0,255})); connect(swi17.y, les.u1) annotation (Line(points={{-158,-540},{18,-540}}, color={0,0,127})); @@ -1018,7 +1008,7 @@ equation -136},{158,-136}}, color={0,0,127})); connect(add8.y, swi11.u3) annotation (Line(points={{182,-130},{190,-130},{190, -138},{218,-138}}, color={0,0,127})); - connect(or3.y, swi2.u2) annotation (Line(points={{2,610},{20,610},{20,400},{-140, + connect(or9.y, swi2.u2) annotation (Line(points={{2,610},{20,610},{20,400},{-140, 400},{-140,350},{-122,350}}, color={255,0,255})); connect(tim.passed, truHol.u) annotation (Line(points={{-198,-278},{-160,-278}, {-160,-270},{-102,-270}}, color={255,0,255})); @@ -1042,6 +1032,26 @@ equation -260,-450},{-182,-450}}, color={255,0,255})); connect(winOpe.y, swi15.u2) annotation (Line(points={{-358,-410},{-260,-410},{ -260,-432},{-80,-432},{-80,-450},{-62,-450}}, color={255,0,255})); + connect(intEqu.y, or6.u1) annotation (Line(points={{-278,610},{-260,610},{-260, + 640},{-90,640},{-90,620},{-82,620}}, color={255,0,255})); + connect(intEqu1.y, or6.u2) annotation (Line(points={{-178,610},{-160,610},{-160, + 612},{-82,612}}, color={255,0,255})); + connect(or6.y,or9. u1) annotation (Line(points={{-58,620},{-40,620},{-40,610}, + {-22,610}}, color={255,0,255})); + connect(intEqu2.y,or9. u2) annotation (Line(points={{-98,590},{-40,590},{-40,602}, + {-22,602}}, color={255,0,255})); + connect(intEqu5.y, or7.u2) annotation (Line(points={{-78,30},{-70,30},{-70,142}, + {-32,142}}, color={255,0,255})); + connect(or1.y, or7.u1) annotation (Line(points={{-38,160},{-36,160},{-36,150}, + {-32,150}}, color={255,0,255})); + connect(not2.u, or8.y) + annotation (Line(points={{-2,-70},{-8,-70}}, color={255,0,255})); + connect(or7.y, not1.u) + annotation (Line(points={{-8,150},{-2,150}}, color={255,0,255})); + connect(or4.y, or8.u1) annotation (Line(points={{-38,-64},{-34,-64},{-34,-70}, + {-32,-70}}, color={255,0,255})); + connect(intEqu8.y, or8.u2) annotation (Line(points={{-78,-190},{-70,-190},{-70, + -78},{-32,-78}}, color={255,0,255})); annotation ( defaultComponentName="TZonSet", Icon(coordinateSystem(extent={{-100,-200},{100,200}}), @@ -1139,7 +1149,7 @@ annotation ( preserveAspectRatio=false, extent={{-420,-620},{340,640}}), graphics={ Rectangle( - extent={{-412,636},{330,558}}, + extent={{-412,638},{330,560}}, lineColor={0,0,0}, fillColor={215,215,215}, fillPattern=FillPattern.Solid, @@ -1157,7 +1167,7 @@ annotation ( fillPattern=FillPattern.Solid, pattern=LinePattern.None), Rectangle( - extent={{-412,174},{332,-212}}, + extent={{-412,178},{332,-208}}, lineColor={0,0,0}, fillColor={215,215,215}, fillPattern=FillPattern.Solid, diff --git a/Buildings/Controls/OBC/ASHRAE/G36/ZoneGroups/OperationMode.mo b/Buildings/Controls/OBC/ASHRAE/G36/ZoneGroups/OperationMode.mo index 2c186397ac5..96af1286bc6 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36/ZoneGroups/OperationMode.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36/ZoneGroups/OperationMode.mo @@ -210,7 +210,7 @@ protected Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt3( final integerTrue=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.unoccupied) "Convert Boolean to Integer " - annotation (Placement(transformation(extent={{120,-370},{140,-350}}))); + annotation (Placement(transformation(extent={{160,-370},{180,-350}}))); Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea6( final realTrue=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.setUp) "Convert Boolean to Real " @@ -228,7 +228,7 @@ protected "Generate alarm message" annotation (Placement(transformation(extent={{100,-140},{120,-120}}))); Buildings.Controls.OBC.CDL.Logical.Not not2 "Logical not" - annotation (Placement(transformation(extent={{80,-370},{100,-350}}))); + annotation (Placement(transformation(extent={{120,-370},{140,-350}}))); Buildings.Controls.OBC.CDL.Logical.And and1 "Warm-up period" annotation (Placement(transformation(extent={{20,170},{40,190}}))); Buildings.Controls.OBC.CDL.Logical.And and2 @@ -237,18 +237,18 @@ protected Buildings.Controls.OBC.CDL.Logical.Or or1 "Check if the number of cold zone is more than 5 or all zones are cold" annotation (Placement(transformation(extent={{-220,20},{-200,40}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or3 + Buildings.Controls.OBC.CDL.Logical.Or or9 "Check if it is in occupied, cooldown, or warm-up mode" annotation (Placement(transformation(extent={{-140,60},{-120,80}}))); Buildings.Controls.OBC.CDL.Logical.Or or4 "Check if the number of hot zone is more than 5 or all zones are hot" annotation (Placement(transformation(extent={{-220,-200},{-200,-180}}))); - Buildings.Controls.OBC.CDL.Logical.Or3 or5 + Buildings.Controls.OBC.CDL.Logical.Or or5 "Check if it is in Setback, Setback_freezeProtection, or Setup mode" - annotation (Placement(transformation(extent={{-20,-350},{0,-330}}))); + annotation (Placement(transformation(extent={{-20,-330},{0,-310}}))); Buildings.Controls.OBC.CDL.Logical.Or or6 "Check if it is in any of the 6 modes except unoccupied mode" - annotation (Placement(transformation(extent={{40,-370},{60,-350}}))); + annotation (Placement(transformation(extent={{80,-370},{100,-350}}))); Buildings.Controls.OBC.CDL.Reals.Switch swi "Switch between occupied mode index and unoccupied period index" annotation (Placement(transformation(extent={{160,310},{180,330}}))); @@ -343,6 +343,12 @@ protected Buildings.Controls.OBC.CDL.Integers.Add addInt7 "Total hot zone and zones with opening window" annotation (Placement(transformation(extent={{-330,-230},{-310,-210}}))); + Buildings.Controls.OBC.CDL.Logical.Or or8 + "Check if it is in occupied, cooldown, or warm-up mode" + annotation (Placement(transformation(extent={{-100,50},{-80,70}}))); + Buildings.Controls.OBC.CDL.Logical.Or or10 + "Check if it is in Setback, Setback_freezeProtection, or Setup mode" + annotation (Placement(transformation(extent={{40,-350},{60,-330}}))); equation connect(swi.y, occMod.u) @@ -363,23 +369,14 @@ equation connect(unoPerInd.y, swi3.u1) annotation (Line(points={{22,350},{50,350},{50,38},{58,38}}, color={0,0,127}, pattern=LinePattern.Dash)); - connect(or3.y, swi3.u2) - annotation (Line(points={{-118,70},{40,70},{40,30},{58,30}}, - color={255,0,255})); connect(lat1.y, booToRea4.u) annotation (Line(points={{-78,-90},{-22,-90}}, color={255,0,255})); - connect(or3.y, swi4.u2) - annotation (Line(points={{-118,70},{40,70},{40,-90},{58,-90}}, - color={255,0,255})); connect(unoPerInd.y, swi4.u1) annotation (Line(points={{22,350},{50,350},{50,-82},{58,-82}}, color={0,0,127}, pattern=LinePattern.Dash)); connect(lat2.y, booToRea6.u) annotation (Line(points={{-78,-190},{-22,-190}}, color={255,0,255})); - connect(or3.y, swi5.u2) - annotation (Line(points={{-118,70},{40,70},{40,-190},{58,-190}}, - color={255,0,255})); connect(unoPerInd.y, swi5.u1) annotation (Line(points={{22,350},{50,350},{50,-182},{58,-182}}, color={0,0,127}, pattern=LinePattern.Dash)); @@ -391,24 +388,19 @@ equation connect(swi5.y, setUpMod.u) annotation (Line(points={{82,-190},{98,-190}}, color={0,0,127})); - connect(or5.y, or6.u1) - annotation (Line(points={{2,-340},{20,-340},{20,-360},{38,-360}}, - color={255,0,255})); connect(or6.y, not2.u) - annotation (Line(points={{62,-360},{78,-360}}, + annotation (Line(points={{102,-360},{118,-360}}, color={255,0,255})); connect(not2.y,booToInt3. u) - annotation (Line(points={{102,-360},{118,-360}}, + annotation (Line(points={{142,-360},{158,-360}}, color={255,0,255})); connect(and1.y,booToRea1. u) annotation (Line(points={{42,180},{78,180}}, color={255,0,255})); - connect(and1.y, or3.u1) - annotation (Line(points={{42,180},{68,180},{68,112},{-190,112},{-190,78}, - {-142,78}}, color={255,0,255})); + connect(and1.y,or9. u1) + annotation (Line(points={{42,180},{68,180},{68,112},{-190,112},{-190,70},{-142, + 70}}, color={255,0,255})); connect(u1Occ, swi.u2) annotation (Line(points={{-380,370},{-350,370},{-350,320}, {158,320}}, color={255,0,255})); - connect(u1Occ, or3.u3) annotation (Line(points={{-380,370},{-350,370},{-350,62}, - {-142,62}}, color={255,0,255})); connect(hys2.y, corCooDowTim.u2) annotation (Line(points={{-238,250},{-222,250}}, color={255,0,255})); connect(hys3.y, corWarUpTim.u2) @@ -462,8 +454,8 @@ equation 180,-164},{198,-164}}, color={255,127,0})); connect(addInt3.y, addInt4.u1) annotation (Line(points={{222,-170},{240,-170}, {240,-304},{258,-304}}, color={255,127,0})); - connect(booToInt3.y, addInt4.u2) annotation (Line(points={{142,-360},{200, - -360},{200,-316},{258,-316}}, color={255,127,0})); + connect(booToInt3.y, addInt4.u2) annotation (Line(points={{182,-360},{200,-360}, + {200,-316},{258,-316}}, color={255,127,0})); connect(addInt5.y, yOpeMod) annotation (Line(points={{342,2},{380,2}}, color={255,127,0})); connect(notOcc.y, and3.u2) annotation (Line(points={{122,70},{140,70},{140,82}, @@ -504,8 +496,8 @@ equation {230,284},{238,284}}, color={255,127,0})); connect(and4.y, booToRea.u) annotation (Line(points={{42,270},{78,270}}, color={255,0,255})); - connect(and4.y, or3.u2) annotation (Line(points={{42,270},{60,270},{60,120},{ - -200,120},{-200,70},{-142,70}},color={255,0,255})); + connect(and4.y,or9. u2) annotation (Line(points={{42,270},{60,270},{60,120},{-200, + 120},{-200,62},{-142,62}}, color={255,0,255})); connect(hys4.y, and2.u1) annotation (Line(points={{-98,250},{-82,250}}, color={255,0,255})); connect(u1OccHeaHig, and5.u2) annotation (Line(points={{-380,130},{-90,130},{-90, @@ -520,14 +512,10 @@ equation annotation (Line(points={{-58,250},{-50,250}}, color={255,0,255})); connect(edg1.y, truFalHol.u) annotation (Line(points={{-26,250},{-22,250}},color={255,0,255})); - connect(lat2.y, or5.u1) annotation (Line(points={{-78,-190},{-40,-190},{-40, - -332},{-22,-332}}, color={255,0,255})); - connect(lat1.y, or5.u2) annotation (Line(points={{-78,-90},{-50,-90},{-50, - -340},{-22,-340}}, color={255,0,255})); - connect(lat.y, or5.u3) annotation (Line(points={{-78,30},{-60,30},{-60,-348}, - {-22,-348}}, color={255,0,255})); - connect(or3.y, or6.u2) annotation (Line(points={{-118,70},{-70,70},{-70,-368}, - {38,-368}}, color={255,0,255})); + connect(lat2.y, or5.u1) annotation (Line(points={{-78,-190},{-40,-190},{-40,-320}, + {-22,-320}}, color={255,0,255})); + connect(lat1.y, or5.u2) annotation (Line(points={{-78,-90},{-50,-90},{-50,-328}, + {-22,-328}}, color={255,0,255})); connect(allCol.y, or1.u2) annotation (Line(points={{-258,0},{-240,0},{-240,22}, {-222,22}}, color={255,0,255})); connect(allHot.y, or4.u2) annotation (Line(points={{-258,-220},{-240,-220},{ @@ -622,6 +610,24 @@ equation {-250,-84},{-222,-84}}, color={0,0,127})); connect(TZonMin, sub2.u2) annotation (Line(points={{-380,-120},{-240,-120},{-240, -96},{-222,-96}}, color={0,0,127})); + connect(u1Occ, or8.u2) annotation (Line(points={{-380,370},{-350,370},{-350,52}, + {-102,52}}, color={255,0,255})); + connect(or8.y, or6.u2) annotation (Line(points={{-78,60},{-70,60},{-70,-368},{ + 78,-368}}, color={255,0,255})); + connect(or8.y, swi5.u2) annotation (Line(points={{-78,60},{40,60},{40,-190},{58, + -190}}, color={255,0,255})); + connect(or8.y, swi4.u2) annotation (Line(points={{-78,60},{40,60},{40,-90},{58, + -90}}, color={255,0,255})); + connect(or8.y, swi3.u2) annotation (Line(points={{-78,60},{40,60},{40,30},{58, + 30}}, color={255,0,255})); + connect(or9.y, or8.u1) annotation (Line(points={{-118,70},{-110,70},{-110,60}, + {-102,60}}, color={255,0,255})); + connect(or10.y, or6.u1) annotation (Line(points={{62,-340},{70,-340},{70,-360}, + {78,-360}}, color={255,0,255})); + connect(or5.y, or10.u1) annotation (Line(points={{2,-320},{20,-320},{20,-340}, + {38,-340}}, color={255,0,255})); + connect(lat.y, or10.u2) annotation (Line(points={{-78,30},{-60,30},{-60,-348}, + {38,-348}}, color={255,0,255})); annotation ( defaultComponentName = "opeModSel", Diagram( diff --git a/Buildings/Controls/OBC/CDL/Logical/Validation/package.order b/Buildings/Controls/OBC/CDL/Logical/Validation/package.order index 9e2e4a4464c..ca408a83863 100644 --- a/Buildings/Controls/OBC/CDL/Logical/Validation/package.order +++ b/Buildings/Controls/OBC/CDL/Logical/Validation/package.order @@ -8,9 +8,7 @@ MultiOr Nand Nor Not -OnOffController Or -Or3 Proof Switch Timer @@ -18,11 +16,9 @@ TimerAccumulating TimerAccumulatingNegativeStartTime TimerNegativeStartTime Toggle -TriggeredTrapezoid TrueDelay TrueFalseHold TrueHoldWithReset VariablePulse VariablePulseMinHold Xor -ZeroCrossing diff --git a/Buildings/Controls/OBC/CDL/Logical/package.order b/Buildings/Controls/OBC/CDL/Logical/package.order index 52b0f87a879..ba45b4c1c9f 100644 --- a/Buildings/Controls/OBC/CDL/Logical/package.order +++ b/Buildings/Controls/OBC/CDL/Logical/package.order @@ -8,9 +8,7 @@ MultiOr Nand Nor Not -OnOffController Or -Or3 Pre Proof Switch @@ -23,6 +21,5 @@ TrueFalseHold TrueHoldWithReset VariablePulse Xor -ZeroCrossing Sources Validation diff --git a/Buildings/Examples/Tutorial/CDL/Controls/SystemOnOff.mo b/Buildings/Examples/Tutorial/CDL/Controls/SystemOnOff.mo index cd7f873a554..cff7773902d 100644 --- a/Buildings/Examples/Tutorial/CDL/Controls/SystemOnOff.mo +++ b/Buildings/Examples/Tutorial/CDL/Controls/SystemOnOff.mo @@ -13,7 +13,6 @@ block SystemOnOff "Controller for system on/off" displayUnit="degC") = 289.15 "Outdoor temperature below which system is allowed to switch on"; - Buildings.Controls.OBC.CDL.Interfaces.RealInput TOut( final unit="K", displayUnit="degC") @@ -27,36 +26,46 @@ block SystemOnOff "Controller for system on/off" Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput onSys "System on command" annotation (Placement(transformation(extent={{100,-20},{140,20}}))); - Buildings.Controls.OBC.CDL.Logical.OnOffController onTOut(bandwidth=1) - "On/off control based on outside air temperature" - annotation (Placement(transformation(extent={{-40,56},{-20,76}}))); Buildings.Controls.OBC.CDL.Reals.Sources.Constant TSetOut(k=TOutLow + 0.5) "Set point for outdoor air temperature plus half the dead band" annotation (Placement(transformation(extent={{-80,70},{-60,90}}))); - Buildings.Controls.OBC.CDL.Logical.OnOffController onTRoo(bandwidth=1) - "On/off control based on room air temperature" - annotation (Placement(transformation(extent={{-40,-64},{-20,-44}}))); Buildings.Controls.OBC.CDL.Reals.Sources.Constant TSetRoo(k=TRooSet) - "Set point for room air temperature plus half the dead band" + "Set point for room air temperature" annotation (Placement(transformation(extent={{-80,-40},{-60,-20}}))); Buildings.Controls.OBC.CDL.Logical.And and1 "And operator to switch boiler on based on temperature and system on command" annotation (Placement(transformation(extent={{60,-10},{80,10}}))); + Buildings.Controls.OBC.CDL.Reals.Subtract sub "Inputs different" + annotation (Placement(transformation(extent={{-40,50},{-20,70}}))); + Buildings.Controls.OBC.CDL.Reals.Hysteresis onTOut( + final uLow=-0.5, + final uHigh=0.5) "On/off control based on outside air temperature" + annotation (Placement(transformation(extent={{0,50},{20,70}}))); + Buildings.Controls.OBC.CDL.Reals.Subtract sub1 "Inputs different" + annotation (Placement(transformation(extent={{-40,-70},{-20,-50}}))); + Buildings.Controls.OBC.CDL.Reals.Hysteresis onTRoo( + final uLow=-0.5, + final uHigh=0.5) "On/off control based on room air temperature" + annotation (Placement(transformation(extent={{0,-70},{20,-50}}))); equation - connect(onTOut.u, TOut) - annotation (Line(points={{-42,60},{-120,60}}, color={0,0,127})); - connect(TSetOut.y, onTOut.reference) annotation (Line(points={{-58,80},{-50, - 80},{-50,72},{-42,72}}, color={0,0,127})); - connect(onTRoo.u, TRoo) - annotation (Line(points={{-42,-60},{-120,-60}}, color={0,0,127})); - connect(TSetRoo.y, onTRoo.reference) annotation (Line(points={{-58,-30},{-50,-30}, - {-50,-48},{-42,-48}}, color={0,0,127})); - connect(and1.u2, onTRoo.y) annotation (Line(points={{58,-8},{-10,-8},{-10,-54}, - {-18,-54}}, color={255,0,255})); connect(and1.y, onSys) annotation (Line(points={{82,0},{120,0}}, color={255,0,255})); - connect(onTOut.y, and1.u1) annotation (Line(points={{-18,66},{-10,66},{-10,0}, - {58,0}}, color={255,0,255})); + connect(TSetOut.y, sub.u1) annotation (Line(points={{-58,80},{-50,80},{-50,66}, + {-42,66}}, color={0,0,127})); + connect(TOut, sub.u2) annotation (Line(points={{-120,60},{-60,60},{-60,54},{-42, + 54}}, color={0,0,127})); + connect(sub.y, onTOut.u) + annotation (Line(points={{-18,60},{-2,60}}, color={0,0,127})); + connect(onTOut.y, and1.u1) annotation (Line(points={{22,60},{40,60},{40,0},{58, + 0}}, color={255,0,255})); + connect(TSetRoo.y, sub1.u1) annotation (Line(points={{-58,-30},{-50,-30},{-50, + -54},{-42,-54}}, color={0,0,127})); + connect(TRoo, sub1.u2) annotation (Line(points={{-120,-60},{-60,-60},{-60,-66}, + {-42,-66}}, color={0,0,127})); + connect(sub1.y, onTRoo.u) + annotation (Line(points={{-18,-60},{-2,-60}}, color={0,0,127})); + connect(onTRoo.y, and1.u2) annotation (Line(points={{22,-60},{40,-60},{40,-8}, + {58,-8}}, color={255,0,255})); annotation ( defaultComponentName="conSysSta", Icon(coordinateSystem(preserveAspectRatio=false), graphics={ @@ -106,6 +115,12 @@ Otherwise, the system on command is false. ", revisions="