Skip to content

Commit

Permalink
Included the fixes learned from the case study, #2293 [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
JayHuLBL committed May 13, 2021
1 parent cd0c681 commit c723d2d
Show file tree
Hide file tree
Showing 27 changed files with 645 additions and 111 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ block Controller "Waterside economizer (WSE) enable/disable status"
final unit="m3/s",
final quantity="VolumeFlowRate",
displayUnit="m3/s")=0.015
"Desing heat exchanger chilled water volume flow rate"
"Design heat exchanger chilled water volume flow rate"
annotation(Dialog(group="Design parameters"));

parameter Real step(
Expand Down Expand Up @@ -92,14 +92,14 @@ block Controller "Waterside economizer (WSE) enable/disable status"
Buildings.Controls.OBC.CDL.Interfaces.RealInput TChiWatRet(
final unit="K",
final quantity="ThermodynamicTemperature")
"Chiller water return temperature upstream of the WSE"
"Chilled water return temperature upstream of the WSE"
annotation (Placement(transformation(extent={{-220,40},{-180,80}}),
iconTransformation(extent={{-140,20},{-100,60}})));

Buildings.Controls.OBC.CDL.Interfaces.RealInput TChiWatRetDow(
final unit="K",
final quantity="ThermodynamicTemperature")
"Chiller water return temperature downstream of the WSE"
"Chilled water return temperature downstream of the WSE"
annotation (Placement(transformation(extent={{-220,0},{-180,40}}),
iconTransformation(extent={{-140,-20},{-100,20}})));

Expand Down Expand Up @@ -139,7 +139,12 @@ block Controller "Waterside economizer (WSE) enable/disable status"
"Enable condition based on the outdoor wet bulb temperature"
annotation (Placement(transformation(extent={{20,40},{40,60}})));

protected
Buildings.Controls.OBC.CDL.Interfaces.RealOutput TChiWatRetDowPre
"Predicted downstream WSE chilled water temperature" annotation (Placement(
transformation(extent={{180,-118},{200,-98}}), iconTransformation(
extent={{100,-100},{120,-80}})));

//protected
Buildings.Controls.OBC.ASHRAE.PrimarySystem.ChillerPlant.Economizers.Subsequences.Tuning wseTun(
final step=step,
final wseOnTimDec=wseOnTimDec,
Expand Down Expand Up @@ -186,7 +191,17 @@ protected
"Measures the disable condition satisfied time "
annotation (Placement(transformation(extent={{20,-20},{40,0}})));

Buildings.Controls.OBC.CDL.Logical.Not not1 "Logical not"
Buildings.Controls.OBC.CDL.Logical.FallingEdge falEdg
"Falling edge to indicate the moment of disable"
annotation (Placement(transformation(extent={{-100,-60},{-80,-40}})));

Buildings.Controls.OBC.CDL.Logical.TrueHoldWithReset truHol(
final duration=holdPeriod)
"Holds a true signal for a period of time right after disable"
annotation (Placement(transformation(extent={{-60,-60},{-40,-40}})));

Buildings.Controls.OBC.CDL.Logical.Nor nor
"Not either of the inputs"
annotation (Placement(transformation(extent={{-20,-20},{0,0}})));

equation
Expand Down Expand Up @@ -221,10 +236,6 @@ equation
color={0,0,127}));
connect(add1.y, hys.u)
annotation (Line(points={{-78,-10},{-62,-10}},color={0,0,127}));
connect(hys.y, not1.u)
annotation (Line(points={{-38,-10},{-22,-10}}, color={255,0,255}));
connect(not1.y, timer.u)
annotation (Line(points={{2,-10},{18,-10}}, color={255,0,255}));
connect(enaTChiWatRet.y, and2.u2) annotation (Line(points={{82,-10},{90,-10},{
90,42},{98,42}}, color={255,0,255}));
connect(wseTun.y, wseTOut.uTunPar) annotation (Line(points={{-119,-90},{-110,-90},
Expand All @@ -237,6 +248,18 @@ equation
annotation (Line(points={{2,50},{18,50}}, color={0,0,127}));
connect(wseTun.y, yTunPar)
annotation (Line(points={{-119,-90},{190,-90}}, color={0,0,127}));
connect(wseTOut.y, TChiWatRetDowPre) annotation (Line(points={{-78,50},{-70,
50},{-70,-108},{190,-108}}, color={0,0,127}));
connect(nor.y, timer.u)
annotation (Line(points={{2,-10},{18,-10}}, color={255,0,255}));
connect(hys.y, nor.u1)
annotation (Line(points={{-38,-10},{-22,-10}}, color={255,0,255}));
connect(truHol.y, nor.u2) annotation (Line(points={{-38,-50},{-30,-50},{-30,
-18},{-22,-18}}, color={255,0,255}));
connect(falEdg.y, truHol.u)
annotation (Line(points={{-78,-50},{-62,-50}}, color={255,0,255}));
connect(pre.y, falEdg.u) annotation (Line(points={{162,-50},{170,-50},{170,
-70},{-120,-70},{-120,-50},{-102,-50}}, color={255,0,255}));
annotation (defaultComponentName = "wseSta",
Icon(graphics={
Rectangle(
Expand Down Expand Up @@ -271,6 +294,13 @@ for <code>delDis</code> time period.
</li>
</ul>
<p>
The following state machine chart illustrates the transitions between WSE enabled and disabled state:
</p>
<p align=\"center\">
<img alt=\"Image of WSE enable-disable state machine chart\"
src=\"modelica://Buildings/Resources/Images/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Economizer/WaterSideEconomizerEnableDisableStateGraph.png\"/>
</p>
<p>
The WSE control sequence uses the following subsequences:
</p>
<ul>
Expand All @@ -289,6 +319,10 @@ Buildings.Controls.OBC.ASHRAE.PrimarySystem.ChillerPlant.Economizers.Subsequence
revisions="<html>
<ul>
<li>
January 19, 2021, by Milica Grahovac:<br/>
Added state chart illustration.
</li>
<li>
October 13, 2018, by Milica Grahovac:<br/>
First implementation.
</li>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
within Buildings.Controls.OBC.ASHRAE.PrimarySystem.ChillerPlant.Generic;
within Buildings.Controls.OBC.ASHRAE.PrimarySystem.ChillerPlant.Generic;
block PlantEnable "Sequence to enable and disable plant"

parameter Boolean have_WSE = true
Expand Down Expand Up @@ -54,7 +54,7 @@ block PlantEnable "Sequence to enable and disable plant"
"Plant enabling schedule allowing operators to lock out the plant during off-hour"
annotation (Placement(transformation(extent={{-140,40},{-120,60}})));

protected
//protected
final parameter Buildings.Controls.OBC.CDL.Types.Smoothness tabSmo=
Buildings.Controls.OBC.CDL.Types.Smoothness.ConstantSegments
"Smoothness of table interpolation";
Expand Down Expand Up @@ -231,8 +231,8 @@ annotation (
textString="STOP")}),
Documentation(info="<html>
<p>
Block that generates chiller plant enable signals and output the initial plant stage,
according to ASHRAE RP-1711 Advanced Sequences of Operatoin for HVAC Systems Phase II -
Block that generate chiller plant enable signals and output the initial plant stage,
according to ASHRAE RP-1711 Advanced Sequences of Operation for HVAC Systems Phase II
Central Plants and Hydronic Systems (Draft 4 on January 7, 2019), section 5.2.2 and
5.2.4.13 Table 2.
</p>
Expand Down Expand Up @@ -279,10 +279,21 @@ The chiller enable schedule is inactive.
</ul>
</li>
</ol>
<p>
The following state machine chart illustrates the transitions between plant enable and plant disable:
</p>
<p align=\"center\">
<img alt=\"Image of chiller plant enable-disable state machine chart\"
src=\"modelica://Buildings/Resources/Images/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Generic/PlantEnableStateGraph.png\"/>
</p>
</html>",
revisions="<html>
<ul>
<li>
January 19, 2021, by Milica Grahovac:<br/>
Added state chart illustration.
</li>
<li>
March 12, 2020, by Milica Grahovac:<br/>
Removed initial stage determination as it is imlemented as a separate sequence. This is for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/1831\">issue 1831</a>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ block Controller "Head pressure controller"
parameter Boolean have_WSE=true
"Flag indicating if the plant has waterside economizer"
annotation (Dialog(group="Plant"));
parameter Boolean fixSpePum=false
parameter Boolean fixSpePum=true
"Flag indicating if the plant has fixed speed condenser water pumps"
annotation (Dialog(group="Plant", enable=not have_WSE));
parameter Real minChiLif=10
Expand Down Expand Up @@ -48,7 +48,7 @@ block Controller "Head pressure controller"
Buildings.Controls.OBC.CDL.Interfaces.RealInput desConWatPumSpe(
final min=0,
final max=1,
final unit="1") if (not have_WSE and varSpePum) or have_WSE
final unit="1") if not ((not have_WSE) and fixSpePum)
"Design condenser water pump speed for current stage"
annotation (Placement(transformation(extent={{-140,0},{-100,40}}),
iconTransformation(extent={{-140,-40},{-100,0}})));
Expand All @@ -72,14 +72,14 @@ block Controller "Head pressure controller"
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yHeaPreConVal(
final min=0,
final max=1,
final unit="1") if have_WSE or (not have_WSE and not varSpePum)
final unit="1") if not ((not have_WSE) and not fixSpePum)
"Head pressure control valve position"
annotation (Placement(transformation(extent={{100,0},{140,40}}),
iconTransformation(extent={{100,-20},{140,20}})));
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yConWatPumSpeSet(
final min=0,
final max=1,
final unit="1") if (not have_WSE and varSpePum) or have_WSE
final unit="1") if not ((not have_WSE) and fixSpePum)
"Condenser water pump speed setpoint"
annotation (Placement(transformation(extent={{100,-50},{140,-10}}),
iconTransformation(extent={{100,-80},{140,-40}})));
Expand All @@ -94,7 +94,7 @@ block Controller "Head pressure controller"
annotation (Placement(transformation(extent={{-20,80},{0,100}})));
Buildings.Controls.OBC.ASHRAE.PrimarySystem.ChillerPlant.HeadPressure.Subsequences.MappingWithoutWSE
noWSE(
final fixSpePum=not varSpePum,
final fixSpePum=fixSpePum,
final minTowSpe=minTowSpe,
final minConWatPumSpe=minConWatPumSpe,
final minHeaPreValPos=minHeaPreValPos) if not have_WSE
Expand All @@ -109,8 +109,6 @@ block Controller "Head pressure controller"
annotation (Placement(transformation(extent={{40,-40},{60,-20}})));

protected
parameter Boolean varSpePum = not fixSpePum or have_WSE
"Flag to indicate if the plant has variable speed condenser water pumps";
Buildings.Controls.OBC.CDL.Logical.Switch swi if have_HeaPreConSig
annotation (Placement(transformation(extent={{-20,-110},{0,-90}})));
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,13 +237,6 @@ block SetpointController
annotation (Placement(transformation(extent={{-442,-30},{-402,10}}),
iconTransformation(extent={{-140,-40},{-100,0}})));

Buildings.Controls.OBC.CDL.Interfaces.RealInput uLif(
final unit="K",
final quantity="TemperatureDifference") if anyVsdCen
"Chiller lift"
annotation (Placement(transformation(extent={{-442,30},{-402,70}}),
iconTransformation(extent={{-140,0},{-100,40}})));

Buildings.Controls.OBC.CDL.Interfaces.RealInput uLifMax(
final unit="K",
final quantity="TemperatureDifference") if anyVsdCen
Expand All @@ -262,7 +255,7 @@ block SetpointController
final unit="K",
final quantity="ThermodynamicTemperature")
"Chilled water return temperature"
annotation (Placement(transformation(extent={{-442,280},{-402,320}}),
annotation (Placement(transformation(extent={{-440,280},{-400,320}}),
iconTransformation(extent={{-140,-190},{-100,-150}})));

Buildings.Controls.OBC.CDL.Interfaces.RealInput VChiWat_flow(
Expand All @@ -288,7 +281,7 @@ block SetpointController
Buildings.Controls.OBC.CDL.Interfaces.RealInput TChiWatSup(
final unit="K",
final quantity="ThermodynamicTemperature")
"Chilled water return temperature"
"Chilled water supply temperature"
annotation (Placement(transformation(extent={{-442,320},{-402,360}}),
iconTransformation(extent={{-140,30},{-100,70}})));

Expand Down Expand Up @@ -337,7 +330,14 @@ block SetpointController
final min=0)
"Minimum operating part load ratio at current stage"
annotation (Placement(transformation(extent={{120,320},{160,360}}),
iconTransformation(extent={{100,-200},{140,-160}})));
iconTransformation(extent={{100,-202},{140,-162}})));

Buildings.Controls.OBC.CDL.Interfaces.RealOutput yCapReq(
final quantity="Power",
final unit="W")
"Chilled water cooling capacity requirement" annotation (Placement(
transformation(extent={{120,370},{160,410}}), iconTransformation(extent=
{{100,-230},{140,-190}})));

Buildings.Controls.OBC.ASHRAE.PrimarySystem.ChillerPlant.Staging.SetPoints.Subsequences.Up staUp(
final have_WSE=have_WSE,
Expand Down Expand Up @@ -381,7 +381,8 @@ block SetpointController
CDL.Interfaces.BooleanOutput yDow "Stage down signal" annotation (Placement(
transformation(extent={{120,22},{156,58}}), iconTransformation(extent={
{100,130},{140,170}})));
protected

//protected
Buildings.Controls.OBC.ASHRAE.PrimarySystem.ChillerPlant.Staging.SetPoints.Subsequences.Initial iniSta(
final have_WSE=have_WSE)
annotation (Placement(transformation(extent={{-80,100},{-60,120}})));
Expand Down Expand Up @@ -423,6 +424,12 @@ protected
staMat=staMat) "Calculates chiller status setpoint vector"
annotation (Placement(transformation(extent={{40,-210},{60,-190}})));

Buildings.Controls.OBC.CDL.Continuous.Add lift(
final k1=1,
final k2=-1) if anyVsdCen
"Calculates chiller lift for variable speed centrifugal chiller containing configurations"
annotation (Placement(transformation(extent={{-260,40},{-240,60}})));

equation
connect(uChiAva, conf.uChiAva)
annotation (Line(points={{-422,-200},{-382,-200},{-382,-170},{-362,-170}},
Expand All @@ -432,9 +439,8 @@ equation
connect(TChiWatSupSet, capReq.TChiWatSupSet) annotation (Line(points={{-422,
370},{-370,370},{-370,319},{-322,319}},
color={0,0,127}));
connect(TChiWatRet, capReq.TChiWatRet) annotation (Line(points={{-422,300},{
-374,300},{-374,314},{-322,314}},
color={0,0,127}));
connect(TChiWatRet, capReq.TChiWatRet) annotation (Line(points={{-420,300},{-374,
300},{-374,314},{-322,314}}, color={0,0,127}));
connect(VChiWat_flow, capReq.VChiWat_flow) annotation (Line(points={{-422,270},
{-370,270},{-370,309},{-322,309}}, color={0,0,127}));
connect(conf.yDesCap, cap.uDesCap) annotation (Line(points={{-338,-162},{-322,
Expand Down Expand Up @@ -465,8 +471,6 @@ equation
connect(cap.yUpMin, PLRs.uUpCapMin) annotation (Line(points={{-248,-178},{
-242,-178},{-242,-187},{-184,-187}},
color={0,0,127}));
connect(uLif, PLRs.uLif) annotation (Line(points={{-422,50},{-202,50},{-202,-190},
{-184,-190}}, color={0,0,127}));
connect(uLifMax, PLRs.uLifMax) annotation (Line(points={{-422,20},{-212,20},{-212,
-192},{-184,-192}}, color={0,0,127}));
connect(uLifMin, PLRs.uLifMin) annotation (Line(points={{-422,-10},{-222,-10},
Expand Down Expand Up @@ -542,7 +546,7 @@ equation
connect(sta.yAvaUp, cha.uAvaUp) annotation (Line(points={{-298,-203},{-292,-203},
{-292,-148},{-40,-148},{-40,-164},{-22,-164}}, color={255,127,0}));
connect(sta.yAvaDow, cha.uAvaDow) annotation (Line(points={{-298,-206},{-290,-206},
{-290,-150},{-42,-150},{-42,-168},{-22,-168}}, color={255,127,0}));
{-290,-150},{-44,-150},{-44,-168},{-22,-168}}, color={255,127,0}));
connect(staUp.y, cha.uUp) annotation (Line(points={{-78,-110},{-50,-110},{-50,
-172},{-22,-172}}, color={255,0,255}));
connect(staDow.y, cha.uDow) annotation (Line(points={{-78,-230},{-50,-230},{-50,
Expand All @@ -562,7 +566,7 @@ equation
{-100,370},{-100,113},{-82,113}}, color={0,0,127}));
connect(uTunPar, iniSta.uTunPar) annotation (Line(points={{-420,150},{-104,150},
{-104,116},{-82,116}}, color={0,0,127}));
connect(iniSta.yIni, cha.uIni) annotation (Line(points={{-59,110},{-28,110},{-28,
connect(iniSta.yIni, cha.uIni) annotation (Line(points={{-59,110},{-30,110},{-30,
-160},{-22,-160}}, color={255,127,0}));
connect(TOutWet, iniSta.TOutWet) annotation (Line(points={{-420,400},{-96,400},
{-96,119},{-82,119}}, color={0,0,127}));
Expand All @@ -581,6 +585,14 @@ equation
{140,80}}, color={255,0,255}));
connect(staDow.y, yDow) annotation (Line(points={{-78,-230},{-60,-230},{-60,
40},{138,40}}, color={255,0,255}));
connect(TChiWatRet, lift.u1) annotation (Line(points={{-420,300},{-388,300},{-388,
56},{-262,56}}, color={0,0,127}));
connect(TChiWatSupSet, lift.u2) annotation (Line(points={{-422,370},{-360,370},
{-360,44},{-262,44}}, color={0,0,127}));
connect(PLRs.uLif, lift.y) annotation (Line(points={{-184,-190},{-202,-190},{-202,
50},{-238,50}}, color={0,0,127}));
connect(capReq.y, yCapReq) annotation (Line(points={{-298,310},{-80,310},{-80,
390},{140,390}}, color={0,0,127}));
annotation (defaultComponentName = "staSetCon",
Icon(coordinateSystem(extent={{-100,-220},{100,200}}, initialScale=0.2),
graphics={
Expand Down Expand Up @@ -643,11 +655,6 @@ equation
lineColor={0,0,127},
pattern=LinePattern.Dash,
textString="uLifMax"),
Text(
extent={{-100,32},{-68,14}},
lineColor={0,0,127},
pattern=LinePattern.Dash,
textString="uLif"),
Text(
extent={{-96,100},{-64,84}},
lineColor={244,125,35},
Expand Down Expand Up @@ -722,7 +729,12 @@ equation
extent={{48,168},{96,132}},
lineColor={217,67,180},
pattern=LinePattern.Dash,
textString="yChaDow")}),
textString="yChaDow"),
Text(
extent={{42,-198},{94,-220}},
lineColor={0,0,127},
pattern=LinePattern.Dash,
textString="yCapReq")}),
Diagram(
coordinateSystem(preserveAspectRatio=false,
extent={{-400,-300},{120,420}})),
Expand Down
Loading

0 comments on commit c723d2d

Please sign in to comment.