Skip to content

Commit

Permalink
Merge pull request #10 from karthikeyad-pnnl/issue2614_ChilledBeamSeq…
Browse files Browse the repository at this point in the history
…uences_ForPR

Updated interfaces as per OBC conventions
  • Loading branch information
cerrinamouchref-pnnl authored Mar 15, 2024
2 parents 178ac66 + 12e3536 commit 14202fe
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 31 deletions.
15 changes: 11 additions & 4 deletions Buildings/Controls/OBC/FDE/DOAS/CoolingCoil.mo
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ block CoolingCoil "This block commands the cooling coil."
annotation (Placement(transformation(extent={{-142,4},{-102,44}}),
iconTransformation(extent={{-142,-104},{-102,-64}})));

Buildings.Controls.OBC.CDL.Interfaces.RealInput TCoiCoo(
Buildings.Controls.OBC.CDL.Interfaces.RealInput TAirDis(
final unit="K",
final displayUnit="degC",
final quantity="ThermodynamicTemperature")
"Cooling coil discharge air temperature sensor." annotation (Placement(
"Measured discharge air temperature" annotation (Placement(
transformation(extent={{-142,64},{-102,104}}), iconTransformation(
extent={{-142,-52},{-102,-12}})));

Expand Down Expand Up @@ -98,7 +98,10 @@ block CoolingCoil "This block commands the cooling coil."
"Enable dehumidification mode only when supply fan is proven on"
annotation (Placement(transformation(extent={{-20,-14},{0,8}})));

Buildings.Controls.OBC.CDL.Reals.PID conPIDRegOpe(reverseActing=false)
Buildings.Controls.OBC.CDL.Reals.PID conPIDRegOpe(
controllerType=controllerTypeRegOpe,
k=kRegOpe,
Ti=TiRegOpe, reverseActing=false)
"PID controller for regular cooling coil operation mode" annotation (
Placement(visible=true, transformation(
origin={-62,-42},
Expand Down Expand Up @@ -130,6 +133,10 @@ block CoolingCoil "This block commands the cooling coil."
extent={{-10,-10},{10,10}},
rotation=0)));

parameter CDL.Types.SimpleController controllerTypeRegOpe=Buildings.Controls.OBC.CDL.Types.SimpleController.PI
"Type of controller";
parameter Real kRegOpe=1 "Gain of controller";
parameter Real TiRegOpe=0.5 "Time constant of integrator block";
equation
connect(conZer.y, swiFanSupPro.u3) annotation (Line(points={{-8,-70},{18,-70},
{18,-48},{20,-48}}, color={0,0,127}));
Expand Down Expand Up @@ -161,7 +168,7 @@ equation
connect(conPIDRegOpe.y, swiFanSupPro.u1) annotation (Line(points={{-50,-42},{-17,
-42},{-17,-32},{20,-32}}, color={0,0,127}));

connect(TCoiCoo, conPIDDeh.u_m) annotation (Line(points={{-122,84},{-22,84},{-22,
connect(TAirDis, conPIDDeh.u_m) annotation (Line(points={{-122,84},{-22,84},{-22,
68},{10,68}}, color={0,0,127}));

connect(conPIDDeh.y, swiTSetCoo.u1)
Expand Down
18 changes: 9 additions & 9 deletions Buildings/Controls/OBC/FDE/DOAS/DOAScontroller.mo
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,10 @@ block DOAScontroller "DOAS controller built from DOAS blocks."
iconTransformation(extent = {{-140, -46}, {-100, -6}})));

// ---outputs---
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput supFanStart
"Command supply fan to start when true."
annotation(Placement(transformation(extent = {{102, 54}, {142, 94}}),
iconTransformation(extent = {{102, 34}, {142, 74}})));
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yFanSup
"Command supply fan to start when true." annotation (Placement(
transformation(extent={{102,54},{142,94}}), iconTransformation(extent={
{102,34},{142,74}})));

Buildings.Controls.OBC.CDL.Interfaces.RealOutput supFanSpeed
"Supply fan speed command"
Expand Down Expand Up @@ -344,10 +344,10 @@ equation
Line(points = {{-86, 71.4}, {-98, 71.4}, {-98, 50}, {-122, 50}}, color = {0, 0, 127}));
connect(SFcon.DDSP, DDSP) annotation (
Line(points = {{-86, 60.8}, {-94, 60.8}, {-94, -2}, {-120, -2}}, color = {0, 0, 127}));
connect(SFcon.supFanStart, supFanStart) annotation (
Line(points = {{-62, 73.2}, {122, 73.2}, {122, 74}}, color = {255, 0, 255}));
connect(SFcon.supFanSpeed, supFanSpeed) annotation (
Line(points = {{-62, 63.6}, {84, 63.6}, {84, 48}, {122, 48}}, color = {0, 0, 127}));
connect(SFcon.yFanSup, yFanSup) annotation (Line(points={{-62,73.2},{122,73.2},
{122,74}}, color={255,0,255}));
connect(SFcon.yFanSupSpe, supFanSpeed) annotation (Line(points={{-62,63.6},{
84,63.6},{84,48},{122,48}}, color={0,0,127}));
//connect(SFcon.supFanProof, DehumMod.supFanProof) annotation (
// Line(points={{-62,68},{-56,68},{-56,25.2},{-50.2,25.2}},color={255,0,255}));
//connect(SFcon.supFanProof, Cooling.supFanProof) annotation (
Expand All @@ -358,7 +358,7 @@ equation
Line(points = {{-50.2, 18}, {-92, 18}, {-92, -60}, {-120, -60}}, color = {0, 0, 127}));
connect(Cooling.TAirSup, saT) annotation (Line(points={{55.8,33.6},{-90,33.6},
{-90,-86},{-120,-86}}, color={0,0,127}));
connect(Cooling.TCoiCoo, ccT) annotation (Line(points={{55.8,24.8},{-20,24.8},
connect(Cooling.TAirDis, ccT) annotation (Line(points={{55.8,24.8},{-20,24.8},
{-20,-164},{-120,-164}}, color={0,0,127}));
connect(Cooling.phiAirEneRecWhe, erwHum) annotation (Line(points={{55.8,22.2},
{-18,22.2},{-18,-190},{-120,-190}}, color={0,0,127}));
Expand Down
20 changes: 10 additions & 10 deletions Buildings/Controls/OBC/FDE/DOAS/SupplyFanController.mo
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ block SupplyFanController "This block manages start, stop, status, and speed of
Buildings.Controls.OBC.CDL.Interfaces.RealInput DDSP "Down duct static pressure measurement."
annotation(Placement(transformation(extent = {{-142, -106}, {-102, -66}}), iconTransformation(extent = {{-140, -92}, {-100, -52}})));
// ---outputs---
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput supFanStart
"Command supply fan to start when true."
annotation(Placement(transformation(extent = {{102, 60}, {142, 100}}), iconTransformation(extent = {{100, 32}, {140, 72}})));
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yFanSup
"Supply fan enable signal" annotation (Placement(transformation(extent={{
102,60},{142,100}}), iconTransformation(extent={{100,32},{140,72}})));

Buildings.Controls.OBC.CDL.Interfaces.RealOutput supFanSpeed
"Supply fan speed command"
annotation(Placement(transformation(extent = {{102, -50}, {142, -10}}), iconTransformation(extent = {{100, -64}, {140, -24}})));
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yFanSupSpe
"Supply fan speed signal" annotation (Placement(transformation(extent={{102,
-50},{142,-10}}), iconTransformation(extent={{100,-64},{140,-24}})));

Buildings.Controls.OBC.CDL.Reals.Sources.Constant dampSet(
k = damSet) if vvUnit
Expand Down Expand Up @@ -126,14 +126,14 @@ equation
connect(DDSP, FanSpeedSPPI.u_m) annotation (
Line(points = {{-122, -86}, {62, -86}, {62, -42}}, color = {0, 0, 127}));

connect(FanSpeedSPPI.y, supFanSpeed) annotation (
Line(points = {{74, -30}, {122, -30}}, color = {0, 0, 127}));
connect(FanSpeedSPPI.y, yFanSupSpe)
annotation (Line(points={{74,-30},{122,-30}}, color={0,0,127}));

connect(occ, tim.u) annotation (
Line(points = {{-122, 80}, {-69, 80}, {-69, 88}, {-20, 88}}, color = {255, 0, 255}));

connect(tim.passed, supFanStart) annotation (
Line(points = {{4, 80}, {122, 80}}, color = {255, 0, 255}));
connect(tim.passed, yFanSup)
annotation (Line(points={{4,80},{122,80}}, color={255,0,255}));

annotation (
defaultComponentName = "SFcon",
Expand Down
2 changes: 1 addition & 1 deletion Buildings/Controls/OBC/FDE/DOAS/Validation/CoolingCoil.mo
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ equation
connect(saTGen.y, Cooling.TAirSup) annotation (Line(points={{-4,50},{12,50},{
12,-8.4},{45.8,-8.4}}, color={0,0,127}));

connect(ccTGen.y, Cooling.TCoiCoo) annotation (Line(points={{-38,-18},{14,-18},
connect(ccTGen.y, Cooling.TAirDis) annotation (Line(points={{-38,-18},{14,-18},
{14,-17.2},{45.8,-17.2}}, color={0,0,127}));

connect(dehumMode.y, Cooling.uDeh) annotation (Line(points={{-4,4},{0,4},{0,-14.6},
Expand Down
5 changes: 2 additions & 3 deletions Buildings/Controls/OBC/FDE/DOAS/Validation/DOAScontroller.mo
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,8 @@ equation
connect(ccTGen.y, DOAScon.ccT) annotation (
Line(points={{-2,-82},{28,-82},{28,5.4},{68,5.4}}, color = {0, 0, 127}));

connect(DOAScon.supFanStart, pre.u) annotation (
Line(points={{92.2,23.4},{-86,23.4},{-86,52},{-80,52}},
color = {255, 0, 255}));
connect(DOAScon.yFanSup, pre.u) annotation (Line(points={{92.2,23.4},{-86,
23.4},{-86,52},{-80,52}}, color={255,0,255}));

connect(pre.y, truDel.u) annotation (
Line(points = {{-56, 52}, {-56, 41}, {-48, 41}, {-48, 32}}, color = {255, 0, 255}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ annotation (Placement(transformation(extent={{40,-6},{60,14}})));
annotation (Placement(transformation(extent={{-66,-38},{-46,-18}})));

equation
connect(SFcon.supFanStart, truDel.u) annotation (
Line(points={{62,9.2},{66,9.2},{66,-46},{0,-46},{0,-24},{6,-24}}, color={255,0,255}));
connect(SFcon.yFanSup, truDel.u) annotation (Line(points={{62,9.2},{66,9.2},{
66,-46},{0,-46},{0,-24},{6,-24}}, color={255,0,255}));

connect(truDel.y, SFcon.supFanStatus) annotation (
Line(points={{30,-24},{34,-24},{34,0.4},{38,0.4}}, color={255,0,255}));
Expand Down
4 changes: 2 additions & 2 deletions Buildings/Examples/ChilledBeamSystem/ClosedLoopValidation.mo
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ equation
connect(sub.y, chiBeaTesBed.deltaT) annotation (Line(points={{18,-82},{20,-82},
{20,-98},{-136,-98},{-136,-38},{-104,-38},{-104,6},{-68,6},{-68,10},{
-24,10},{-24,-2},{-18,-2},{-18,-4},{-12,-4}}, color={0,0,127}));
connect(DOAScon.supFanStart, chiBeaTesBed.uFanSta) annotation (Line(points={{
-23.14,-4.6},{-17.57,-4.6},{-17.57,-14},{-12,-14}}, color={255,0,255}));
connect(DOAScon.yFanSup, chiBeaTesBed.uFanSta) annotation (Line(points={{-23.14,
-4.6},{-17.57,-4.6},{-17.57,-14},{-12,-14}}, color={255,0,255}));
connect(reaScaRep.y, terCon.TZonHeaSet) annotation (Line(points={{-14,98},{0,98},
{0,68},{20,68},{20,67.75},{40,67.75}}, color={0,0,127}));
annotation (
Expand Down

0 comments on commit 14202fe

Please sign in to comment.