Skip to content

Commit

Permalink
Merge pull request #127 from cerrinamouchref-pnnl/issue2614_ChilledBe…
Browse files Browse the repository at this point in the history
…amSequences_ForPR

Issue2614 chilled beam sequences for pr
  • Loading branch information
karthikeyad-pnnl authored Mar 14, 2024
2 parents 7bec660 + 81ea895 commit ceeb3c6
Show file tree
Hide file tree
Showing 24 changed files with 574 additions and 569 deletions.
23 changes: 13 additions & 10 deletions Buildings/Controls/OBC/FDE/DOAS/CoolingCoil.mo
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ block CoolingCoil "This block commands the cooling coil."

parameter Real erwDPadj(
final unit = "K",
final displayUnit = "degC",
final quantity = "ThermodynamicTemperature") = 5
final quantity = "TemperatureDifference") = 5
"Value subtracted from ERW supply air dewpoint.";


// ---inputs---
Buildings.Controls.OBC.CDL.Interfaces.RealInput saT(
final unit = "K",
Expand Down Expand Up @@ -75,7 +75,7 @@ block CoolingCoil "This block commands the cooling coil."

Buildings.Controls.OBC.CDL.Reals.Switch swi
"Logical switch outputs supply air PI value when fan is proven on."
annotation(Placement(transformation(extent = {{14, -54}, {34, -34}})));
annotation(Placement(transformation(extent={{22,-50},{42,-30}})));

Buildings.Controls.OBC.CDL.Reals.Switch swi1
"Logical switch passes different PI calculations to yCC based on dehumidification mode."
Expand All @@ -85,24 +85,27 @@ block CoolingCoil "This block commands the cooling coil."
"Logical AND;true when dehumidification is on and supply fan is proven on."
annotation(Placement(transformation(extent = {{-20, -14}, {0, 8}})));

Buildings.Controls.OBC.CDL.Reals.PID conPID2 annotation(Placement(visible = true, transformation(origin = {-62, -42}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Buildings.Controls.OBC.CDL.Reals.PID conPID2(reverseActing=false)
annotation(Placement(visible = true, transformation(origin = {-62, -42}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));

Buildings.Controls.OBC.CDL.Reals.PID conPID
Buildings.Controls.OBC.CDL.Reals.PID conPID(reverseActing=false)
annotation(Placement(visible = true, transformation(origin = {16, 78}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));

Buildings.Controls.OBC.CDL.Psychrometrics.DewPoint_TDryBulPhi dewPoi
"Calculates dewpoint temperature for ERW return air"
annotation(Placement(visible = true, transformation(origin = {-66, 48}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));

Buildings.Controls.OBC.CDL.Reals.AddParameter addPar(
p = -erwDPadj)
p = -erwDPadj) "Ensures setpoint is below calculated dewpoint"
annotation(Placement(visible = true, transformation(origin = {-36, 36}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));

equation
connect(con0.y, swi.u3) annotation (
Line(points = {{2, -52}, {12, -52}}, color = {0, 0, 127}));
Line(points={{2,-52},{18,-52},{18,-48},{20,-48}},
color = {0, 0, 127}));

connect(swi.u2, supFanProof) annotation (
Line(points = {{12, -44}, {6, -44}, {6, -96}, {-122, -96}}, color = {255, 0, 255}));
Line(points={{20,-40},{6,-40},{6,-96},{-122,-96}}, color = {255, 0, 255}));

connect(and2.u1, dehumMode) annotation (
Line(points = {{-22, -3}, {-78, -3}, {-78, -4}, {-122, -4}}, color = {255, 0, 255}));
Expand All @@ -117,7 +120,7 @@ equation
Line(points = {{80, 76}, {122, 76}}, color = {0, 0, 127}));

connect(swi.y, swi1.u3) annotation (
Line(points = {{36, -44}, {46, -44}, {46, 68}, {56, 68}}, color = {0, 0, 127}));
Line(points={{44,-40},{46,-40},{46,68},{56,68}}, color = {0, 0, 127}));

connect(saT, conPID2.u_m) annotation (
Line(points = {{-122, -36}, {-90, -36}, {-90, -54}, {-62, -54}}, color = {0, 0, 127}));
Expand All @@ -126,7 +129,7 @@ equation
Line(points = {{-122, -66}, {-80, -66}, {-80, -42}, {-74, -42}}, color = {0, 0, 127}));

connect(conPID2.y, swi.u1) annotation (
Line(points = {{-50, -42}, {-17, -42}, {-17, -36}, {12, -36}}, color = {0, 0, 127}));
Line(points={{-50,-42},{-17,-42},{-17,-32},{20,-32}}, color = {0, 0, 127}));

connect(ccT, conPID.u_m) annotation (
Line(points = {{-122, 84}, {-22, 84}, {-22, 66}, {16, 66}}, color = {0, 0, 127}));
Expand Down
297 changes: 107 additions & 190 deletions Buildings/Controls/OBC/FDE/DOAS/Dewpoint.mo

Large diffs are not rendered by default.

25 changes: 14 additions & 11 deletions Buildings/Controls/OBC/FDE/DOAS/EnergyWheel.mo
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ block EnergyWheel "This block commands the energy recovery wheel and associated
parameter Real recSet(
final unit = "K",
final displayUnit = "degC",
final quantity = "ThermodynamicTemperature") = 7 +273.15
final quantity = "ThermodynamicTemperature") = 7
"Energy recovery set point.";

parameter Real Thys(
Expand Down Expand Up @@ -94,7 +94,7 @@ block EnergyWheel "This block commands the energy recovery wheel and associated

Buildings.Controls.OBC.CDL.Logical.MultiAnd mulAnd(nin=3) "Logical AND; true when fan is proven, economizer mode is off, and ERW
temperature start conditions are met."
annotation (Placement(transformation(extent={{62,10},{82,30}})));
annotation (Placement(transformation(extent={{66,8},{86,28}})));

Buildings.Controls.OBC.CDL.Logical.Not not1
"Logical NOT; true when economizer mode is off."
Expand Down Expand Up @@ -144,13 +144,15 @@ equation
Line(points = {{-28, 50}, {-122, 50}}, color = {255, 0, 255}));

connect(mulAnd.y, erwStart)
annotation (Line(points={{84,20},{122,20}}, color={255,0,255}));
annotation (Line(points={{88,18},{104,18},{104,20},{122,20}},
color={255,0,255}));

connect(max.y, swi.u1) annotation (
Line(points = {{-40, -68}, {64, -68}}, color = {0, 0, 127}));

connect(mulAnd.y, swi.u2) annotation (Line(points={{84,20},{88,20},{88,-58},{
56,-58},{56,-76},{64,-76}}, color={255,0,255}));
connect(mulAnd.y, swi.u2) annotation (Line(points={{88,18},{88,-20},{92,-20},{
92,-58},{58,-58},{58,-76},{64,-76}},
color={255,0,255}));

connect(con0.y, swi.u3) annotation (
Line(points = {{52, -84}, {64, -84}}, color = {0, 0, 127}));
Expand All @@ -169,8 +171,9 @@ equation
connect(not2.y, or2.u2) annotation (
Line(points = {{56, 50}, {58, 50}, {58, 58}, {60, 58}}, color = {255, 0, 255}));

connect(mulAnd.y, not2.u) annotation (Line(points={{84,20},{88,20},{88,36},{
28,36},{28,50},{32,50}}, color={255,0,255}));
connect(mulAnd.y, not2.u) annotation (Line(points={{88,18},{88,20},{98,20},{98,
36},{28,36},{28,50},{32,50}},
color={255,0,255}));

connect(or2.y, bypDam) annotation (
Line(points = {{84, 66}, {122, 66}}, color = {255, 0, 255}));
Expand Down Expand Up @@ -209,11 +212,11 @@ equation
connect(abs.y, hys.u)
annotation (Line(points={{-14, 2}, {-4, 2}}, color={0,0,127}));
connect(supFanProof, mulAnd.u[1]) annotation (Line(points={{-122,80},{-70,80},
{-70,88},{20,88},{20,24.6667},{60,24.6667}}, color={255,0,255}));
connect(not1.y, mulAnd.u[2]) annotation (Line(points={{-4,50},{10,50},{10,20},
{60,20}}, color={255,0,255}));
{-70,88},{20,88},{20,22.6667},{64,22.6667}}, color={255,0,255}));
connect(not1.y, mulAnd.u[2]) annotation (Line(points={{-4,50},{10,50},{10,18},
{64,18}}, color={255,0,255}));
connect(truDel.y, mulAnd.u[3]) annotation (Line(points={{54,0},{56,0},{56,
15.3333},{60,15.3333}}, color={255,0,255}));
13.3333},{64,13.3333}}, color={255,0,255}));
annotation (
defaultComponentName = "ERWcon",
Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}), graphics={ Rectangle(fillColor = {255, 255, 255},
Expand Down
131 changes: 65 additions & 66 deletions Buildings/Controls/OBC/FDE/DOAS/HeatingCoil.mo
Original file line number Diff line number Diff line change
@@ -1,84 +1,83 @@
within Buildings.Controls.OBC.FDE.DOAS;

block HeatingCoil "This block commands the heating coil."
parameter Real SArhcPIk = 0.0000001
parameter Real SArhcPIk = 0.0000001
"Heating coil SAT PI gain value k.";
parameter Real SArhcPITi = 0.000025

parameter Real SArhcPITi = 0.000025
"Heating coil SAT PI time constant value Ti.";

// ---inputs---
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput supFanProof
"True when supply fan is proven on."
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput supFanProof
"True when supply fan is proven on."
annotation(Placement(transformation(extent = {{-142, -20}, {-102, 20}}), iconTransformation(extent = {{-142, -20}, {-102, 20}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput saT "Supply air temperature sensor value."

Buildings.Controls.OBC.CDL.Interfaces.RealInput saT "Supply air temperature sensor value."
annotation(Placement(transformation(extent = {{-142, -60}, {-102, -20}}), iconTransformation(extent = {{-142, -70}, {-102, -30}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput supHeaSP

Buildings.Controls.OBC.CDL.Interfaces.RealInput supHeaSP
"Supply air temperature heating set point." annotation(Placement(transformation(extent = {{-142, 16}, {-102, 56}}), iconTransformation(extent = {{-142, 28}, {-102, 68}})));

// ---outputs---
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yRHC "Reheat coil valve command."
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yRHC "Reheat coil valve command."
annotation(Placement(transformation(extent = {{102, -20}, {142, 20}}), iconTransformation(extent = {{102, -20}, {142, 20}})));

Buildings.Controls.OBC.CDL.Reals.Switch swi
"Logical switch passes supply air heating set point when supply fan is proven otherwise sends 0 set point." annotation(Placement(transformation(extent = {{-20, -10}, {0, 10}})));


Buildings.Controls.OBC.CDL.Reals.Switch swi
"Logical switch passes supply air heating set point when supply fan is proven otherwise sends 0 set point." annotation(Placement(transformation(extent={{36,-12},
{56,8}})));

Buildings.Controls.OBC.CDL.Reals.Sources.Constant con0(
final k = 0)
"Real constant 0"
annotation(Placement(transformation(extent = {{-52, -28}, {-32, -8}})));
final k = 0)
"Real constant 0"
annotation(Placement(transformation(extent={{-20,-38},{0,-18}})));

Buildings.Controls.OBC.CDL.Reals.PID conPID1(
Ti = SArhcPITi,
k = SArhcPIk)
annotation(Placement(visible = true, transformation(origin = {32, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Ti = SArhcPITi,
k = SArhcPIk)
annotation(Placement(visible = true, transformation(origin={-30,24}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));

equation

connect(swi.u2, supFanProof) annotation(
Line(points = {{-22, 0}, {-122, 0}}, color = {255, 0, 255}));

connect(con0.y, swi.u3) annotation(
Line(points = {{-30, -18}, {-26, -18}, {-26, -8}, {-22, -8}}, color = {0, 0, 127}));

connect(swi.u1, supHeaSP) annotation(
Line(points = {{-22, 8}, {-32, 8}, {-32, 36}, {-122, 36}}, color = {0, 0, 127}));

connect(swi.y, conPID1.u_s) annotation(
Line(points = {{2, 0}, {20, 0}}, color = {0, 0, 127}));

connect(saT, conPID1.u_m) annotation(
Line(points = {{-122, -40}, {32, -40}, {32, -12}}, color = {0, 0, 127}));

connect(conPID1.y, yRHC) annotation(
Line(points = {{44, 0}, {122, 0}}, color = {0, 0, 127}));

annotation(
connect(swi.u2, supFanProof) annotation (
Line(points={{34,-2},{-62,-2},{-62,0},{-122,0}},
color = {255, 0, 255}));

connect(con0.y, swi.u3) annotation (
Line(points={{2,-28},{12,-28},{12,-12},{28,-12},{28,-10},{34,-10}},
color = {0, 0, 127}));

connect(saT, conPID1.u_m) annotation (
Line(points={{-122,-40},{-30,-40},{-30,12}}, color = {0, 0, 127}));

connect(conPID1.y, swi.u1) annotation (Line(points={{-18,24},{-4,24},{-4,6},{
34,6}}, color={0,0,127}));
connect(supHeaSP, conPID1.u_s) annotation (Line(points={{-122,36},{-86,36},{
-86,32},{-50,32},{-50,24},{-42,24}}, color={0,0,127}));
connect(swi.y, yRHC) annotation (Line(points={{58,-2},{90,-2},{90,0},{122,0}},
color={0,0,127}));
annotation (
defaultComponentName = "Heating",
Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}), graphics = {Rectangle(lineColor = {179, 151, 128}, fillColor = {255, 255, 255},
fillPattern =
FillPattern.Solid, extent = {{-100, 100}, {100, -100}}, radius = 10), Rectangle(lineColor = {238, 46, 47}, fillColor = {254, 56, 30},
fillPattern =
FillPattern.Solid, extent = {{-22, 68}, {6, -66}}), Rectangle(fillColor = {162, 29, 33},
fillPattern =
FillPattern.Solid, extent = {{-14, 58}, {68, 56}}), Ellipse(lineColor = {28, 108, 200}, fillColor = {162, 29, 33},
fillPattern =
FillPattern.Solid, extent = {{-16, 60}, {-10, 54}}), Rectangle(fillColor = {162, 29, 33},
fillPattern =
FillPattern.Solid, extent = {{-2, -56}, {80, -58}}), Ellipse(lineColor = {28, 108, 200}, fillColor = {162, 29, 33},
fillPattern =
FillPattern.Solid, extent = {{-4, -54}, {2, -60}}), Polygon(lineColor = {127, 0, 0}, fillColor = {255, 255, 255},
fillPattern =
FillPattern.Solid, points = {{42, -58}, {30, -66}, {30, -50}, {42, -58}}), Polygon(lineColor = {127, 0, 0}, fillColor = {255, 255, 255},
fillPattern =
FillPattern.Solid, points = {{42, -58}, {54, -66}, {54, -50}, {42, -58}}), Ellipse(lineColor = {127, 0, 0}, fillColor = {255, 255, 255},
fillPattern =
FillPattern.Solid, extent = {{38, -54}, {46, -62}}), Line(points = {{42, -48}, {42, -54}}, color = {127, 0, 0}), Ellipse(lineColor = {127, 0, 0}, fillColor = {255, 255, 255},
fillPattern =
FillPattern.Solid, extent = {{36, -32}, {48, -46}}), Rectangle(lineColor = {127, 0, 0}, fillColor = {255, 255, 255},
fillPattern =
Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}), graphics={ Rectangle(lineColor = {179, 151, 128}, fillColor = {255, 255, 255},
fillPattern=
FillPattern.Solid, extent = {{-100, 100}, {100, -100}}, radius = 10), Rectangle(lineColor = {238, 46, 47}, fillColor = {254, 56, 30},
fillPattern=
FillPattern.Solid, extent = {{-22, 68}, {6, -66}}), Rectangle(fillColor = {162, 29, 33},
fillPattern=
FillPattern.Solid, extent = {{-14, 58}, {68, 56}}), Ellipse(lineColor = {28, 108, 200}, fillColor = {162, 29, 33},
fillPattern=
FillPattern.Solid, extent = {{-16, 60}, {-10, 54}}), Rectangle(fillColor = {162, 29, 33},
fillPattern=
FillPattern.Solid, extent = {{-2, -56}, {80, -58}}), Ellipse(lineColor = {28, 108, 200}, fillColor = {162, 29, 33},
fillPattern=
FillPattern.Solid, extent = {{-4, -54}, {2, -60}}), Polygon(lineColor = {127, 0, 0}, fillColor = {255, 255, 255},
fillPattern=
FillPattern.Solid, points = {{42, -58}, {30, -66}, {30, -50}, {42, -58}}), Polygon(lineColor = {127, 0, 0}, fillColor = {255, 255, 255},
fillPattern=
FillPattern.Solid, points = {{42, -58}, {54, -66}, {54, -50}, {42, -58}}), Ellipse(lineColor = {127, 0, 0}, fillColor = {255, 255, 255},
fillPattern=
FillPattern.Solid, extent = {{38, -54}, {46, -62}}), Line(points = {{42, -48}, {42, -54}}, color = {127, 0, 0}), Ellipse(lineColor = {127, 0, 0}, fillColor = {255, 255, 255},
fillPattern=
FillPattern.Solid, extent = {{36, -32}, {48, -46}}), Rectangle(lineColor = {127, 0, 0}, fillColor = {255, 255, 255},
fillPattern=
FillPattern.Solid, extent = {{36, -38}, {48, -48}}), Text(textColor = {28, 108, 200}, extent = {{-90, 180}, {90, 76}}, textString = "%name", textStyle = {TextStyle.Bold}), Text(textColor = {28, 108, 200}, extent = {{-98, 8}, {-54, -6}}, textString = "supFanProof"), Text(textColor = {28, 108, 200}, extent = {{58, 8}, {102, -6}}, textString = "yRHC"), Text(textColor = {28, 108, 200}, extent = {{-98, 54}, {-58, 44}}, textString = "supHeaSP"), Text(textColor = {28, 108, 200}, extent = {{-108, -42}, {-68, -54}}, textString = "saT")}),
Diagram(coordinateSystem(preserveAspectRatio = false)),
experiment(StopTime = 5760, __Dymola_Algorithm = "Dassl"));
Expand Down
Loading

0 comments on commit ceeb3c6

Please sign in to comment.