Skip to content

Commit

Permalink
updating validation model of the tower staging sequences [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
JayHuLBL committed Jan 23, 2024
1 parent 723f11f commit b7c52aa
Show file tree
Hide file tree
Showing 6 changed files with 199 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,8 @@ and disabled.
</li>
</ul>
<p>
The number of enabled tower cells shall be set by chiller stage per the table below.
The number of enabled tower cells shall be set by plant stage (chiller and economizer)
per the table below.
Note that the table would need to be edited by the system design team for each plant
based on the condenser water flow per stage, number of towers in the plant, and
tower minimum flow requirements.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,12 @@ protected
final uLow=fill(0.925, nTowCel),
final uHigh=fill(0.975, nTowCel)) "Check if isolation valve is open more than 95%"
annotation (Placement(transformation(extent={{-140,-90},{-120,-70}})));
Buildings.Controls.OBC.CDL.Logical.MultiAnd mulAnd1(final nin=nTowCel)
"Logical and"
Buildings.Controls.OBC.CDL.Logical.MultiAnd fulOpe(
final nin=nTowCel)
"Enabled valves are fully open"
annotation (Placement(transformation(extent={{80,-60},{100,-40}})));
Buildings.Controls.OBC.CDL.Logical.And and5
"Check if the isolation valve has been fully open"
"Check if it has fully open the valve and the opening process time has past the threshold"
annotation (Placement(transformation(extent={{100,-100},{120,-80}})));
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greEquThr(
final t=chaTowCelIsoTim)
Expand Down Expand Up @@ -108,7 +109,7 @@ protected
annotation (Placement(transformation(extent={{60,140},{80,160}})));
Buildings.Controls.OBC.CDL.Logical.And enaPro "Enabling cells process"
annotation (Placement(transformation(extent={{-60,-10},{-40,10}})));
Buildings.Controls.OBC.CDL.Logical.Not not2 "Logical and"
Buildings.Controls.OBC.CDL.Logical.Not disCel "Disable cell"
annotation (Placement(transformation(extent={{-100,80},{-80,100}})));
Buildings.Controls.OBC.CDL.Logical.And disPro "Disabling cells process"
annotation (Placement(transformation(extent={{-20,80},{0,100}})));
Expand Down Expand Up @@ -216,7 +217,7 @@ equation
annotation (Line(points={{122,-90},{138,-90}}, color={255,0,255}));
connect(booRep1.y, and1.u1)
annotation (Line(points={{162,-90},{180,-90},{180,-132},{0,-132},{0,-160},{18,
-160}}, color={255,0,255}));
-160}}, color={255,0,255}));
connect(and1.y, enaNexCel.u2)
annotation (Line(points={{42,-160},{78,-160}}, color={255,0,255}));
connect(con1.y, enaNexCel.u1) annotation (Line(points={{-38,-140},{60,-140},{60,
Expand All @@ -230,7 +231,7 @@ equation
connect(and2.y, not1.u)
annotation (Line(points={{-98,150},{-62,150}}, color={255,0,255}));
connect(not1.y, enaCel.u) annotation (Line(points={{-38,150},{-22,150}},
color={255,0,255}));
color={255,0,255}));
connect(enaCel.y, celPosSet.u2)
annotation (Line(points={{2,150},{58,150}}, color={255,0,255}));
connect(lin1.y, celPosSet.u1) annotation (Line(points={{42,220},{50,220},{50,158},
Expand All @@ -239,14 +240,14 @@ equation
142},{58,142}}, color={0,0,127}));
connect(enaCel.y, enaPro.u1) annotation (Line(points={{2,150},{20,150},{20,120},
{-120,120},{-120,0},{-62,0}}, color={255,0,255}));
connect(enaCel.y, not2.u) annotation (Line(points={{2,150},{20,150},{20,120},{
-120,120},{-120,90},{-102,90}}, color={255,0,255}));
connect(not2.y, disPro.u1)
annotation (Line(points={{-78,90},{-22,90}}, color={255,0,255}));
connect(enaCel.y, disCel.u) annotation (Line(points={{2,150},{20,150},{20,120},
{-120,120},{-120,90},{-102,90}}, color={255,0,255}));
connect(disCel.y, disPro.u1)
annotation (Line(points={{-78,90},{-22,90}}, color={255,0,255}));
connect(booRep2.y, newTowCell.u2)
annotation (Line(points={{102,-200},{158,-200}}, color={255,0,255}));
connect(enaNexCel.y, newTowCell.u1) annotation (Line(points={{102,-160},{120,-160},
{120,-192},{158,-192}}, color={255,0,255}));
{120,-192},{158,-192}}, color={255,0,255}));
connect(booRep3.y, disExiCel.u2)
annotation (Line(points={{22,-240},{78,-240}}, color={255,0,255}));
connect(uTowSta, disExiCel.u3) annotation (Line(points={{-220,-180},{60,-180},
Expand Down Expand Up @@ -275,14 +276,14 @@ equation
annotation (Line(points={{22,-50},{38,-50}}, color={255,127,0}));
connect(booToInt1.y, intEqu.u2) annotation (Line(points={{22,-80},{30,-80},{30,
-58},{38,-58}}, color={255,127,0}));
connect(intEqu.y, mulAnd1.u) annotation (Line(points={{62,-50},{78,-50}},
color={255,0,255}));
connect(intEqu.y, fulOpe.u)
annotation (Line(points={{62,-50},{78,-50}}, color={255,0,255}));
connect(hys3.y, opeVal.u) annotation (Line(points={{-118,-50},{-20,-50},{-20,-20},
{-2,-20}}, color={255,0,255}));
connect(opeVal.y, and3.u1)
annotation (Line(points={{22,-20},{138,-20}}, color={255,0,255}));
connect(mulAnd1.y, and3.u2) annotation (Line(points={{102,-50},{120,-50},{120,
-28},{138,-28}}, color={255,0,255}));
connect(fulOpe.y, and3.u2) annotation (Line(points={{102,-50},{120,-50},{120,-28},
{138,-28}}, color={255,0,255}));
connect(and3.y, and5.u1) annotation (Line(points={{162,-20},{180,-20},{180,-70},
{70,-70},{70,-90},{98,-90}}, color={255,0,255}));
connect(staPro.y, booRep.u) annotation (Line(points={{82,290},{100,290},{100,260},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,31 @@ model CellsNumber
nTowCel=4) "Find number of enabling cells"
annotation (Placement(transformation(extent={{60,-10},{80,10}})));
Buildings.Controls.OBC.CDL.Logical.Sources.Pulse wseSta(
final width=0.15,
final period=3600,
final shift=300) "Water side economizer status"
width=0.15,
period=3600,
shift=300) "Water side economizer status"
annotation (Placement(transformation(extent={{-60,-40},{-40,-20}})));
Buildings.Controls.OBC.CDL.Reals.Sources.Ramp chiStaGen(
final height=1.2,
final duration=3600,
final offset=1) "Generate chiller stage"
height=1.2,
duration=3600,
offset=1) "Generate chiller stage"
annotation (Placement(transformation(extent={{-100,40},{-80,60}})));
Buildings.Controls.OBC.CDL.Conversions.RealToInteger chiStaSet "Chiller stage setpoint"
annotation (Placement(transformation(extent={{-60,40},{-40,60}})));
Buildings.Controls.OBC.CDL.Integers.Sources.Constant curChiSta(
final k=1) "Current chiller stage"
k=1) "Current chiller stage"
annotation (Placement(transformation(extent={{-60,80},{-40,100}})));
Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul2(
final width=0.75,
final period=3600) "Boolean pulse"
width=0.75,
period=3600) "Boolean pulse"
annotation (Placement(transformation(extent={{-100,0},{-80,20}})));
Buildings.Controls.OBC.CDL.Logical.Not StaTow "Stage tower cells"
annotation (Placement(transformation(extent={{-60,0},{-40,20}})));
Buildings.Controls.OBC.CDL.Reals.Sources.Constant conWatPumSpe[2](
final k=fill(0.5, 2)) "Condenser water pump speed"
k=fill(0.5, 2)) "Condenser water pump speed"
annotation (Placement(transformation(extent={{-60,-110},{-40,-90}})));
Buildings.Controls.OBC.CDL.Logical.Sources.Constant con(
final k=false)
k=false)
"Constant false"
annotation (Placement(transformation(extent={{20,-110},{40,-90}})));
equation
Expand Down Expand Up @@ -61,6 +61,110 @@ This example validates
<a href=\"modelica://Buildings.Controls.OBC.ASHRAE.PrimarySystem.ChillerPlant.Towers.Staging.Subsequences.CellsNumber\">
Buildings.Controls.OBC.ASHRAE.PrimarySystem.ChillerPlant.Towers.Staging.Subsequences.CellsNumber</a>.
</p>
<p>
It shows the calculation of total number of tower cells when the plant is
operating in scenarios including:
</p>
<ul>
<li>
1 chiller only,
</li>
<li>
1 chiller and waterside economizer together,
</li>
<li>
in the chiller staging process but before staging up the tower cells,
</li>
<li>
in the chiller staging process after staging up the tower cell.
</li>
</ul>
<p>
Note in this example, the total number of tower cells is specified
according to following table. It is defined by the
parameter <code>towCelOnSet[totSta]</code>.
</p>
<table summary=\"summary\" border=\"1\">
<tr>
<th>Plant stage </th>
<th>Index</th>
<th>Number of enabled cells </th>
</tr>
<tr>
<td align=\"left\">0</td>
<td align=\"center\">1</td>
<td align=\"center\">0</td>
</tr>
<tr>
<td align=\"left\">WSE</td>
<td align=\"center\">2</td>
<td align=\"center\">2</td>
</tr>
<tr>
<td align=\"left\">1 chiller</td>
<td align=\"center\">3</td>
<td align=\"center\">2</td>
</tr>
<tr>
<td align=\"left\">1 chiller + WSE</td>
<td align=\"center\">4</td>
<td align=\"center\">4</td>
</tr>
<tr>
<td align=\"left\">2 chillers</td>
<td align=\"center\">5</td>
<td align=\"center\">4</td>
</tr>
<tr>
<td align=\"left\">2 chillers + WSE</td>
<td align=\"center\">6</td>
<td align=\"center\">4</td>
</tr>
</table>
<br/>
<p>
The example shows following process:
</p>
<ul>
<li>
Before 300 seconds, the chiller stage equals to its setpoint (1)
and the economizer is not enabled. Thus the plant stage index is 3.
The total number of tower cells should be <code>towCelOnSet[3]</code>,
which is 2.
</li>
<li>
Between 300 seconds and 840 seconds, the chiller stage still equals
to its setpoint (1), but the ecnomizer is enabled. Thus the plant
stage index is 4. The total number of tower cells should be
<code>towCelOnSet[4]</code>, which is 4.
</li>
<li>
Between 840 seconds and 1500 seconds, the economizer is disabled and
the chiller stage keeps equal to its setpoint at 1. Thus the plant
stage index is 3 and the total number of tower cells should be
<code>towCelOnSet[3]</code>, which is 2.
</li>
<li>
Between 1500 seconds and 2700 seconds, the economizer keeps
disabled. However, the chiller stage setpoint changes to be
different from its current stage index. This means the plant
is in the chiller staging process. Since the input
<code>uTowStaCha</code> is false, it means the staging process
has not yet into the subprocess to staging up tower cells.
Thus the plant stage is still 3 and the total number of tower cells
should be <code>towCelOnSet[3]</code>, which is 2.
</li>
<li>
After 2700 seconds, the economizer keeps disabled and it is still
in the chiller staging process. However, the input
<code>uTowStaCha</code> becomes true, it means the staging process
requires staging up tower cells. The plant stage becomes 5.
The total number of tower cells should be <code>towCelOnSet[5]</code>,
which is 4.
</li>
</ul>
</html>", revisions="<html>
<ul>
<li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ model ChangeCells
enaTowCel(
nTowCel=4) "Find enabling cells"
annotation (Placement(transformation(extent={{20,-10},{40,10}})));
Buildings.Controls.OBC.CDL.Logical.Sources.Constant con2[4](
final k={true,true,false,false})
"Enabling cells index"
annotation (Placement(transformation(extent={{-60,-50},{-40,-30}})));
Buildings.Controls.OBC.CDL.Integers.Sources.TimeTable celNum(
table=[0, 2;
1200,2;
Expand All @@ -18,12 +14,16 @@ model ChangeCells
3200,1],
period=3600) "Number of cell that should be enabled"
annotation (Placement(transformation(extent={{-60,30},{-40,50}})));
Buildings.Controls.OBC.CDL.Logical.Pre pre[4] "Current tower cell status"
annotation (Placement(transformation(extent={{-60,-50},{-40,-30}})));

equation
connect(celNum.y[1], enaTowCel.uCelNum) annotation (Line(points={{-38,40},{0,40},
{0,4},{18,4}}, color={255,127,0}));
connect(con2.y, enaTowCel.uTowSta) annotation (Line(points={{-38,-40},{0,-40},
{0,-4},{18,-4}}, color={255,0,255}));
connect(pre.y, enaTowCel.uTowSta) annotation (Line(points={{-38,-40},{0,-40},{
0,-4},{18,-4}}, color={255,0,255}));
connect(enaTowCel.yTowSta, pre.u) annotation (Line(points={{42,4},{60,4},{60,-60},
{-70,-60},{-70,-40},{-62,-40}}, color={255,0,255}));
annotation (experiment(StopTime=3600.0, Tolerance=1e-06),
__Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Towers/Staging/Subsequences/Validation/ChangeCells.mos"
"Simulate and plot"),
Expand All @@ -32,7 +32,41 @@ annotation (experiment(StopTime=3600.0, Tolerance=1e-06),
This example validates
<a href=\"modelica://Buildings.Controls.OBC.ASHRAE.PrimarySystem.ChillerPlant.Towers.Staging.Subsequences.ChangeCells\">
Buildings.Controls.OBC.ASHRAE.PrimarySystem.ChillerPlant.Towers.Staging.Subsequences.ChangeCells</a>.
It shows the process of enabling and disabling tower cells
according to the input <code>uCelNum</code> that specifies
total number of cells that should be enabled.
</p>
<p>
Note that this sequence assumes that the cells are enabled
sequentially as 1, 2, 3, etc. Thus, for example if it
requires two enabled cells, cell 1 and 2 will be enabled.
While if it requires three enabled cell, cell 1, 2 and 3 will
be enabled.
</p>
<ul>
<li>
Before 2000 seconds, the input <code>uCelNum</code> equals 2.
Thus the first two cells are enabled, <code>uTowSta[1]=true</code>
and <code>uTowSta[2]=true</code>.
</li>
<li>
From 2000 seconds to 2800 seconds, the input <code>uCelNum</code>
equals 3.
Thus the first three cells are enabled, <code>uTowSta[1]=true</code>,
<code>uTowSta[2]=true</code>, and <code>uTowSta[3]=true</code>
</li>
<li>
From 2800 seconds to 3200 seconds, the input <code>uCelNum</code>
becomes 2 again.
Thus the first two cells are enabled, <code>uTowSta[1]=true</code>,
and <code>uTowSta[2]=true</code>. The third cell becomes disabled,
<code>uTowSta[3]=false</code>.
</li>
<li>
After 3200 seconds, the input <code>uCelNum</code> equals 1.
Thus only one cell should be enabled, <code>uTowSta[1]=true</code>.
</li>
</ul>
</html>", revisions="<html>
<ul>
<li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,29 @@ annotation (experiment(StopTime=3600.0, Tolerance=1e-06),
This example validates
<a href=\"modelica://Buildings.Controls.OBC.ASHRAE.PrimarySystem.ChillerPlant.Towers.Staging.Subsequences.StageProcesses\">
Buildings.Controls.OBC.ASHRAE.PrimarySystem.ChillerPlant.Towers.Staging.Subsequences.StageProcesses</a>.
It demonstrates the process of enabling (<code>enaPro</code>) and
disabling (<code>disPro</code>) tower cells.
</p>
<ul>
<li>
For enabling process in instance <code>enaPro</code>, at 380 seconds,
the input <code>uChaCel[2]</code> and <code>uChaCel[3]</code> are
true, indicating that the status of cell 2 and 3 should be changed.
As the cell 2 and 3 are initially disabled, thus the cell 2 and 3
are being enabled. After the isolation valve of cell 2 and 3 being
slowly open from 380 seconds to fully open at 470 seconds, the two
cells are enabled.
</li>
<li>
For disabling process in instance <code>disPro</code>, at 380 seconds,
the input <code>uChaCel[2]</code> and <code>uChaCel[3]</code> are
true, indicating that the status of cell 2 and 3 should be changed.
As the cell 2 and 3 are initially enabled, thus the cell 2 and 3
are being disabled. Different from the enabling process, in the
disabling process, it shuts the isolation valve with no delay.
At the meantime, the two cells are disabled.
</li>
</ul>
</html>", revisions="<html>
<ul>
<li>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
simulateModel("Buildings.Controls.OBC.ASHRAE.PrimarySystem.ChillerPlant.Towers.Staging.Subsequences.Validation.ChangeCells", method="Cvode", stopTime=3600, tolerance=1e-06, resultFile="ChangeCells");
createPlot(id=1, position={15, 6, 1488, 1268}, y={"enaTowCel.uCelNum"}, range={0.0, 3600.0, 0.5, 3.5}, grid=true, subPlot=101, colors={{28,108,200}}, timeUnit="s");
createPlot(id=1, position={15, 6, 1488, 1268}, y={"enaTowCel.uTowSta[1]", "enaTowCel.uTowSta[2]", "enaTowCel.uTowSta[3]", "enaTowCel.uTowSta[4]"}, range={0.0, 3600.0, -0.2, 1.2}, grid=true, subPlot=102, colors={{28,108,200}, {28,108,200}, {28,108,200}, {28,108,200}}, timeUnit="s");
createPlot(id=1, position={15, 6, 1488, 1268}, y={"enaTowCel.yChaCel[1]", "enaTowCel.yChaCel[2]", "enaTowCel.yChaCel[3]", "enaTowCel.yChaCel[4]"}, range={0.0, 3600.0, -0.2, 1.2}, grid=true, subPlot=103, colors={{28,108,200}, {28,108,200}, {28,108,200}, {28,108,200}}, timeUnit="s");

createPlot(id=1, position={1, 9, 1488, 1200}, y={"enaTowCel.uCelNum"}, range={0.0, 3600.0, 0.0, 4.0}, grid=true, subPlot=101, colors={{28,108,200}}, timeUnit="s");
createPlot(id=1, position={1, 9, 1488, 1200}, y={"enaTowCel.uTowSta[1]", "enaTowCel.uTowSta[2]", "enaTowCel.uTowSta[3]", "enaTowCel.uTowSta[4]"}, range={0.0, 3600.0, -0.5, 1.5}, grid=true, subPlot=102, colors={{28,108,200}, {28,108,200}, {28,108,200}, {28,108,200}}, timeUnit="s");
createPlot(id=1, position={1, 9, 1488, 1200}, y={"enaTowCel.yChaCel[1]", "enaTowCel.yChaCel[2]", "enaTowCel.yChaCel[3]", "enaTowCel.yChaCel[4]"}, range={0.0, 3600.0, -2.0, 2.0}, grid=true, subPlot=103, colors={{28,108,200}, {28,108,200}, {28,108,200}, {28,108,200}}, timeUnit="s");
createPlot(id=1, position={1, 9, 1488, 1200}, y={"enaTowCel.yTowSta[1]", "enaTowCel.yTowSta[2]", "enaTowCel.yTowSta[3]", "enaTowCel.yTowSta[4]"}, range={0.0, 3600.0, -0.5, 1.5}, grid=true, subPlot=104, colors={{28,108,200}, {28,108,200}, {28,108,200}, {28,108,200}}, timeUnit="s");

0 comments on commit b7c52aa

Please sign in to comment.