Skip to content

Commit

Permalink
Merge pull request #10 from karthikeyad-pnnl/revert-9-issue1378_stagi…
Browse files Browse the repository at this point in the history
…ng_primarySequences

Revert "Issue1378 staging primary sequences"
  • Loading branch information
karthikeyad-pnnl authored Jun 11, 2020
2 parents bd51a8a + 0f08f46 commit 781a1e8
Show file tree
Hide file tree
Showing 29 changed files with 455 additions and 513 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ block EnableLag_primary_dP
parameter Integer nPum_nominal(final max = nPum, final min = 1) = nPum
"Total number of pumps that operate at design conditions"
annotation (Dialog(group="Nominal conditions"));
parameter Real VChiWat_flow_nominal(
final unit="m3/s",
final quantity="VolumeFlowRate",
parameter Modelica.SIunits.VolumeFlowRate VChiWat_flow_nominal(
final min=1e-6)=0.5
"Total plant design chilled water flow rate"
annotation (Dialog(group="Nominal conditions"));
Expand All @@ -31,11 +29,11 @@ block EnableLag_primary_dP
annotation (Placement(transformation(extent={{-180,-20},{-140,20}}),
iconTransformation(extent={{-140,-58},{-100,-18}})));
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yUp
"Next lag pump status, a rising edge indicates that next lag pump should be enabled"
"Next lag pump status"
annotation (Placement(transformation(extent={{140,20},{180,60}}),
iconTransformation(extent={{100,20},{140,60}})));
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yDown
"Last lag pump status, a falling edge indicates that last lag pump should be disabled"
"Last lag pump status"
annotation (Placement(transformation(extent={{140,-100},{180,-60}}),
iconTransformation(extent={{100,-60},{140,-20}})));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,16 @@ block EnableLead_dedicated
final quantity="Time")=180
"Threshold to check lead chiller off time";

Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uPla
"True: plant is enabled"
annotation (Placement(transformation(extent={{-140,60},{-100,100}}),
iconTransformation(extent={{-140,60},{-100,100}})));
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uLeaChiEna
"True: lead chiller is enabled"
annotation (Placement(transformation(extent={{-140,0},{-100,40}}),
iconTransformation(extent={{-140,10},{-100,50}})));
"Lead chiller enabling status"
annotation (Placement(transformation(extent={{-140,60},{-100,100}})));
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uLeaChiSta
"True: lead chiller is proven on"
annotation (Placement(transformation(extent={{-140,-50},{-100,-10}}),
iconTransformation(extent={{-140,-50},{-100,-10}})));
"Lead chiller status"
annotation (Placement(transformation(extent={{-140,-20},{-100,20}})));
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uLeaChiWatReq
"True: lead chiller is requesting chilled water"
"Status indicating if chiller is requesting chilled water"
annotation (Placement(transformation(extent={{-140,-100},{-100,-60}})));
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yLea
"Lead pump status setpoint"
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yLea "Lead pump status"
annotation (Placement(transformation(extent={{100,60},{140,100}}),
iconTransformation(extent={{100,-20},{140,20}})));

Expand All @@ -34,54 +27,51 @@ block EnableLead_dedicated

protected
Buildings.Controls.OBC.CDL.Logical.Or or2 "Logical or"
annotation (Placement(transformation(extent={{40,-40},{60,-20}})));
Buildings.Controls.OBC.CDL.Logical.Not noChiWatReq "No chilled water request"
annotation (Placement(transformation(extent={{40,-10},{60,10}})));
Buildings.Controls.OBC.CDL.Logical.Not not1 "Logical not"
annotation (Placement(transformation(extent={{-80,-90},{-60,-70}})));
Buildings.Controls.OBC.CDL.Logical.Not proOff "Lead chiller proven off"
annotation (Placement(transformation(extent={{-80,-40},{-60,-20}})));
Buildings.Controls.OBC.CDL.Logical.Not not2 "Logical not"
annotation (Placement(transformation(extent={{-80,-10},{-60,10}})));
Buildings.Controls.OBC.CDL.Logical.Timer tim "Measures chiller OFF time"
annotation (Placement(transformation(extent={{-40,-40},{-20,-20}})));
annotation (Placement(transformation(extent={{-40,-10},{-20,10}})));
Buildings.Controls.OBC.CDL.Continuous.GreaterEqualThreshold greEquThr(
final threshold=offTimThr)
"Check if the chiller has been OFF for more than 3 minutes"
annotation (Placement(transformation(extent={{0,-40},{20,-20}})));
annotation (Placement(transformation(extent={{0,-10},{20,10}})));
Buildings.Controls.OBC.CDL.Logical.And and2 "Logical and"
annotation (Placement(transformation(extent={{-40,10},{-20,30}})));
Buildings.Controls.OBC.CDL.Logical.Not disLeaChi "Disabled lead chiller"
annotation (Placement(transformation(extent={{-80,10},{-60,30}})));
Buildings.Controls.OBC.CDL.Logical.Edge disLeaPum
"Disable lead pump when the input has rising edge"
annotation (Placement(transformation(extent={{0,10},{20,30}})));
annotation (Placement(transformation(extent={{0,40},{20,60}})));
Buildings.Controls.OBC.CDL.Logical.Not not3 "Logical not"
annotation (Placement(transformation(extent={{-60,40},{-40,60}})));

equation
connect(uLeaChiWatReq, noChiWatReq.u)
connect(uLeaChiWatReq, not1.u)
annotation (Line(points={{-120,-80},{-82,-80}}, color={255,0,255}));
connect(uLeaChiEna, leaPumSta.u)
annotation (Line(points={{-120,80},{58,80}}, color={255,0,255}));
connect(leaPumSta.y, yLea)
annotation (Line(points={{82,80},{120,80}}, color={255,0,255}));
connect(uLeaChiSta, proOff.u)
annotation (Line(points={{-120,-30},{-82,-30}}, color={255,0,255}));
connect(proOff.y, tim.u)
annotation (Line(points={{-58,-30},{-42,-30}}, color={255,0,255}));
connect(uLeaChiSta, not2.u)
annotation (Line(points={{-120,0},{-82,0}}, color={255,0,255}));
connect(not2.y, tim.u)
annotation (Line(points={{-58,0},{-42,0}}, color={255,0,255}));
connect(tim.y, greEquThr.u)
annotation (Line(points={{-18,-30},{-2,-30}}, color={0,0,127}));
annotation (Line(points={{-18,0},{-2,0}}, color={0,0,127}));
connect(greEquThr.y, or2.u1)
annotation (Line(points={{22,-30},{38,-30}}, color={255,0,255}));
connect(noChiWatReq.y, or2.u2)
annotation (Line(points={{-58,-80},{30,-80},{30,-38},{38,-38}},
annotation (Line(points={{22,0},{38,0}}, color={255,0,255}));
connect(not1.y, or2.u2)
annotation (Line(points={{-58,-80},{30,-80},{30,-8},{38,-8}},
color={255,0,255}));
connect(uLeaChiEna, not3.u)
annotation (Line(points={{-120,80},{-80,80},{-80,50},{-62,50}},
color={255,0,255}));
connect(not3.y, and2.u1)
annotation (Line(points={{-38,50},{-2,50}},
color={255,0,255}));
connect(uLeaChiEna, disLeaChi.u)
annotation (Line(points={{-120,20},{-82,20}}, color={255,0,255}));
connect(disLeaChi.y, and2.u1)
annotation (Line(points={{-58,20},{-42,20}}, color={255,0,255}));
connect(or2.y, and2.u2)
annotation (Line(points={{62,-30},{80,-30},{80,-10},{-50,-10},{-50,12},
{-42,12}}, color={255,0,255}));
connect(uPla, leaPumSta.u)
annotation (Line(points={{-120,80},{58,80}}, color={255,0,255}));
connect(and2.y, disLeaPum.u)
annotation (Line(points={{-18,20},{-2,20}}, color={255,0,255}));
connect(disLeaPum.y, leaPumSta.clr)
annotation (Line(points={{22,20},{40,20},{40,74},{58,74}}, color={255,0,255}));
annotation (Line(points={{62,0},{80,0},{80,20},{-20,20},{-20,42},{-2,42}},
color={255,0,255}));
connect(and2.y, leaPumSta.clr)
annotation (Line(points={{22,50},{40,50},{40,74},{58,74}}, color={255,0,255}));

annotation (
defaultComponentName="enaLeaChiPum",
Expand All @@ -92,7 +82,7 @@ annotation (
fillColor={255,255,255},
fillPattern=FillPattern.Solid),
Text(
extent={{-98,42},{-44,20}},
extent={{-98,94},{-44,72}},
lineColor={255,0,255},
pattern=LinePattern.Dash,
textString="uLeaChiEna"),
Expand All @@ -106,40 +96,35 @@ annotation (
lineColor={0,0,255},
textString="%name"),
Text(
extent={{-98,-18},{-44,-40}},
extent={{-98,12},{-44,-10}},
lineColor={255,0,255},
pattern=LinePattern.Dash,
textString="uLeaChiOn"),
Text(
extent={{-98,-68},{-26,-90}},
lineColor={255,0,255},
pattern=LinePattern.Dash,
textString="uLeaChiWatReq"),
Text(
extent={{-98,90},{-78,74}},
lineColor={255,0,255},
pattern=LinePattern.Dash,
textString="uPla")}),
textString="uLeaChiWatReq")}),
Diagram(coordinateSystem(preserveAspectRatio=false)),
Documentation(info="<html>
<p>
Block that enable and disable leading primary chilled water pump, for plants
with dedicated primary chilled water pumps and parallel chillers,
with headered primary chilled water pumps and parallel chillers,
according to ASHRAE RP-1711 Advanced Sequences of Operation for HVAC Systems Phase II –
Central Plants and Hydronic Systems (Draft on March, 2020),
Central Plants and Hydronic Systems (Draft 6 on July 25, 2019),
section 5.2.6 Primary chilled water pumps, part 5.2.6.5.
</p>
<p>
The lead primary chilled water pump should be enabled when the plant is enabled
(<code>uPla</code> = true). It should be disabled when the lead
chiller is disabled (<code>uLeaChiEna</code> = false) and either the lead chiller
has been proven off (<code>uLeaChiSta</code> = false) for 3 minutes or is not
requesting chilled water flow (<code>uLeaChiWatReq</code> = false).
The lead primary chilled water pump should be enabled when lead chiller is commanded
to run (<code>uLeaChiEna</code> = true). It should be disabled when the lead
chiller is disabled and either the lead chiller has been proven off (<code>uLeaChiSta</code>
= false) for 3 minutes or is not requesting chilled water flow
(<code>uLeaChiWatReq</code> = false).
</p>
</html>", revisions="<html>
<ul>
<li>
August 1, 2020, by Jianjun Hu:<br/>
August 1, 2019, by Jianjun Hu:<br/>
First implementation.
</li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ block EnableLead_headered
parameter Integer nChi=2 "Total number of chiller CHW isolation valves";

Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uChiIsoVal[nChi]
"True: chilled water isolation valve commended on"
"Chilled water isolation valve status"
annotation (Placement(transformation(extent={{-140,-20},{-100,20}})));
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yLea
"Lead pump status setpoint"
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yLea "Lead pump status"
annotation (Placement(transformation(extent={{100,-20},{140,20}})));

protected
Expand Down Expand Up @@ -65,13 +64,12 @@ annotation (
Block that enable and disable leading primary chilled water pump, for plants
with headered primary chilled water pumps and parallel chillers,
according to ASHRAE RP-1711 Advanced Sequences of Operation for HVAC Systems Phase II –
Central Plants and Hydronic Systems (Draft on March, 2020),
Central Plants and Hydronic Systems (Draft 6 on July 25, 2019),
section 5.2.6 Primary chilled water pumps, part 1 and 2.
</p>
<ol>
<li>
Primary chilled water pumps shall be lead-lag. Note that the lead-lag control is
implemented in a separated sequence.
Primary chilled water pumps shall be lead-lag.
</li>
<li>
The lead primary chilled water pump shall be enabled when any chiller
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@ block Speed_primary_localDp
"Total number of remote differential pressure sensors";
parameter Integer nPum = 2
"Total number of chilled water pumps";
parameter Real minLocDp(
final unit="Pa",
final displayUnit="Pa",
final quantity="PressureDifference",
final min=0)=5*6894.75
parameter Modelica.SIunits.PressureDifference minLocDp(
final min=0,
final displayUnit="Pa")=5*6894.75
"Minimum chilled water loop local differential pressure setpoint";
parameter Real maxLocDp(
final unit="Pa",
final displayUnit="Pa",
final quantity="PressureDifference",
final min=minLocDp) = 15*6894.75
parameter Modelica.SIunits.PressureDifference maxLocDp(
final min=minLocDp,
final displayUnit="Pa") = 15*6894.75
"Maximum chilled water loop local differential pressure setpoint";
parameter Real minPumSpe = 0.1 "Minimum pump speed";
parameter Real maxPumSpe = 1 "Maximum pump speed";
Expand Down Expand Up @@ -45,13 +41,13 @@ block Speed_primary_localDp
iconTransformation(extent={{-140,60},{-100,100}})));
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uChiWatPum[nPum]
"Chilled water pump status"
annotation (Placement(transformation(extent={{-180,-60},{-140,-20}}),
annotation (Placement(transformation(extent={{-180,-40},{-140,0}}),
iconTransformation(extent={{-140,20},{-100,60}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput dpChiWat_remote[nSen](
final unit=fill("Pa", nSen),
final quantity=fill("PressureDifference", nSen))
"Chilled water differential static pressure from remote sensor"
annotation (Placement(transformation(extent={{-180,-100},{-140,-60}}),
annotation (Placement(transformation(extent={{-180,-110},{-140,-70}}),
iconTransformation(extent={{-140,-60},{-100,-20}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput dpChiWatSet(
final unit="Pa",
Expand All @@ -73,6 +69,7 @@ block Speed_primary_localDp
final Td=Td,
final yMax=1,
final yMin=0,
final reverseAction=true,
final reset=Buildings.Controls.OBC.CDL.Types.Reset.Parameter,
final y_reset=0) "Pump speed controller"
annotation (Placement(transformation(extent={{-40,50},{-20,70}})));
Expand All @@ -91,6 +88,7 @@ block Speed_primary_localDp
final Td=fill(Td, nSen),
final yMax=fill(1, nSen),
final yMin=fill(0, nSen),
final reverseAction=fill(true, nSen),
final reset=fill(Buildings.Controls.OBC.CDL.Types.Reset.Parameter, nSen),
final y_reset=fill(0, nSen)) "Pump speed controller"
annotation (Placement(transformation(extent={{0,-30},{20,-10}})));
Expand All @@ -102,7 +100,7 @@ protected
Buildings.Controls.OBC.CDL.Routing.BooleanReplicator booRep(
final nout=nSen)
"Replicate boolean input"
annotation (Placement(transformation(extent={{-40,-50},{-20,-30}})));
annotation (Placement(transformation(extent={{-40,-70},{-20,-50}})));
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant zer(final k=0)
"Constant zero"
annotation (Placement(transformation(extent={{60,10},{80,30}})));
Expand All @@ -123,6 +121,11 @@ protected
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant pumSpe_max(
final k=maxPumSpe) "Maximum pump speed"
annotation (Placement(transformation(extent={{-20,90},{0,110}})));
Buildings.Controls.OBC.CDL.Logical.Not not2[nPum] "Logical not"
annotation (Placement(transformation(extent={{-120,-30},{-100,-10}})));
Buildings.Controls.OBC.CDL.Logical.MultiAnd mulAnd(
final nu=nPum) "Multiple logical and"
annotation (Placement(transformation(extent={{-120,-70},{-100,-50}})));
Buildings.Controls.OBC.CDL.Continuous.Division div[nSen]
"Normalized pressure difference"
annotation (Placement(transformation(extent={{-40,-110},{-20,-90}})));
Expand All @@ -132,17 +135,17 @@ protected
Buildings.Controls.OBC.CDL.Routing.RealReplicator reaRep1(
final nout=nSen) "Replicate real input"
annotation (Placement(transformation(extent={{-80,-10},{-60,10}})));
Buildings.Controls.OBC.CDL.Logical.Not pumOn
"Check if there is any pump is ON"
annotation (Placement(transformation(extent={{-80,-70},{-60,-50}})));
Buildings.Controls.OBC.CDL.Logical.Switch swi "Logical switch"
annotation (Placement(transformation(extent={{100,110},{120,130}})));
Buildings.Controls.OBC.CDL.Logical.MultiOr mulOr(final nu=nPum)
"Check if there is any pump enabled"
annotation (Placement(transformation(extent={{-120,-50},{-100,-30}})));

equation
connect(conPID.y, maxRemDP.u)
annotation (Line(points={{22,-20},{38,-20}}, color={0,0,127}));
connect(booRep.y, conPID.trigger)
annotation (Line(points={{-18,-40},{4,-40},{4,-32}}, color={255,0,255}));
annotation (Line(points={{-18,-60},{2,-60},{2,-32}}, color={255,0,255}));
connect(dpChiWatSet, reaRep.u)
annotation (Line(points={{-160,-120},{-122,-120}}, color={0,0,127}));
connect(maxRemDP.y, locDpSet.u)
Expand All @@ -168,8 +171,14 @@ equation
annotation (Line(points={{-98,20},{40,20},{40,56},{98,56}},color={0,0,127}));
connect(pumSpe_max.y, pumSpe.f2)
annotation (Line(points={{2,100},{20,100},{20,52},{98,52}}, color={0,0,127}));
connect(uChiWatPum, not2.u)
annotation (Line(points={{-160,-20},{-122,-20}},
color={255,0,255}));
connect(not2.y, mulAnd.u)
annotation (Line(points={{-98,-20},{-80,-20},{-80,-40},{-130,-40},
{-130,-60},{-122,-60}}, color={255,0,255}));
connect(dpChiWat_remote, div.u1)
annotation (Line(points={{-160,-80},{-80,-80},{-80,-94},{-42,-94}},
annotation (Line(points={{-160,-90},{-80,-90},{-80,-94},{-42,-94}},
color={0,0,127}));
connect(reaRep.y, div.u2)
annotation (Line(points={{-98,-120},{-80,-120},{-80,-106},{-42,-106}},
Expand All @@ -180,6 +189,14 @@ equation
connect(dpChiWat_local, div1.u1)
annotation (Line(points={{-160,100},{-120,100},{-120,86},{-102,86}},
color={0,0,127}));
connect(mulAnd.y, pumOn.u)
annotation (Line(points={{-98,-60},{-82,-60}}, color={255,0,255}));
connect(pumOn.y, booRep.u)
annotation (Line(points={{-58,-60},{-42,-60}},
color={255,0,255}));
connect(pumOn.y, conPID1.trigger)
annotation (Line(points={{-58,-60},{-50,-60},{-50,-20},{-38,-20},{-38,48}},
color={255,0,255}));
connect(one.y, reaRep1.u)
annotation (Line(points={{-98,20},{-90,20},{-90,0},{-82,0}}, color={0,0,127}));
connect(reaRep1.y, conPID.u_s)
Expand All @@ -194,21 +211,14 @@ equation
connect(pumSpe.y, swi.u1)
annotation (Line(points={{122,60},{130,60},{130,100},{80,100},{80,128},{98,128}},
color={0,0,127}));
connect(pumOn.y, swi.u2)
annotation (Line(points={{-58,-60},{-50,-60},{-50,120},{98,120}},
color={255,0,255}));
connect(zer.y, swi.u3)
annotation (Line(points={{82,20},{90,20},{90,112},{98,112}},
color={0,0,127}));
connect(swi.y, yChiWatPumSpe)
annotation (Line(points={{122,120},{160,120}}, color={0,0,127}));
connect(mulOr.y, booRep.u)
annotation (Line(points={{-98,-40},{-42,-40}}, color={255,0,255}));
connect(mulOr.y, swi.u2)
annotation (Line(points={{-98,-40},{-50,-40},{-50,120},{98,120}},
color={255,0,255}));
connect(mulOr.y, conPID1.trigger)
annotation (Line(points={{-98,-40},{-50,-40},{-50,-20},{-36,-20},{-36,48}},
color={255,0,255}));
connect(uChiWatPum, mulOr.u)
annotation (Line(points={{-160,-40},{-122,-40}},color={255,0,255}));

annotation (
defaultComponentName="chiPumSpe",
Expand Down Expand Up @@ -255,7 +265,7 @@ Block that control speed of enabled chilled water pumps for primary-only plants
the remote pressure differential (DP) sensor(s) is not hardwired to the plant controller,
but a local DP sensor is hardwired to the plant controller,
according to ASHRAE RP-1711 (Draft 6 on July 25, 2019),
section 5.2.6 Primary chilled water pumps, part 5.2.6.9, 5.2.6.10 and 5.2.6.11.
section 5.2.6 Primary chilled water pumps, part 5.2.6.9, 5.2.6.8.10 and 5.2.6.11.
</p>
<ol>
<li>
Expand Down
Loading

0 comments on commit 781a1e8

Please sign in to comment.