Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue3544 heat pump rtu controls #3545

Open
wants to merge 94 commits into
base: issue3544_HeatPumpRTUControls
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
f699f5a
Created DX coil control sequences for RTU systems
junkewang001 Jul 25, 2023
dc1cdc0
Added compressorDR controller
junkewang001 Jul 28, 2023
c512dd2
Added documentations
junkewang001 Aug 8, 2023
7f3c182
Updated block parameters
junkewang001 Aug 10, 2023
46cceb7
Added block for calculation of humidity ratio
junkewang001 Aug 11, 2023
b294b49
Modified comments and updated documentations
junkewang001 Aug 11, 2023
a60c6c4
Added RTU controller and scripts
junkewang001 Aug 12, 2023
ff7f909
Merged DXCoils folders from PTACDevelopment branch
junkewang001 Aug 12, 2023
7f59ca8
Revised blocks due to auxiliary coil control changes
junkewang001 Aug 15, 2023
d716a91
Separated DX heating and cooling coil inputs
junkewang001 Aug 23, 2023
bb019a5
Added each and min properties for parameters
junkewang001 Aug 25, 2023
2697beb
Added example model of RTU with G36
junkewang001 Aug 29, 2023
a8383c1
Added new block to track skipped coils
karthikeyad-pnnl Aug 29, 2023
8b5d944
Updated control blocks for DX coil staging
karthikeyad-pnnl Sep 4, 2023
d06cd21
Added new model for trying out different stage control sequence
karthikeyad-pnnl Sep 6, 2023
7b6b8e5
Added cooling example model and modified heating example model
junkewang001 Sep 8, 2023
f9394e1
Added filter for commanded compressor speed
junkewang001 Sep 13, 2023
9fa3063
Replaced using a second-order filter for commanded compressor speed
junkewang001 Sep 18, 2023
191fee2
Keep one example model for Guideline36_RTU
junkewang001 Sep 19, 2023
f90bf6c
Tuned PI controller
junkewang001 Sep 19, 2023
13cbfd5
Merge branch 'RTUdevelopment' of github.com:junkewang001/modelica-bui…
karthikeyad-pnnl Sep 20, 2023
e7162c8
Merge branch 'junkewang001-RTUdevelopment' into RTUdevelopment
karthikeyad-pnnl Sep 20, 2023
48f3dd3
Keep one example model script for Guideline36_RTU
junkewang001 Sep 21, 2023
6d11ef3
Added junctions for DX coils
junkewang001 Sep 22, 2023
06b5dd4
Merge pull request #90 from junkewang001/RTUdevelopment
karthikeyad-pnnl Sep 22, 2023
9fe41ed
Increased stage numbers in DX cooling coil data and tuned PI controller
junkewang001 Sep 22, 2023
84fd8a5
Added junctions in ASHRAE2006 example model
junkewang001 Sep 22, 2023
b686a5d
Added temperature check to control logic
karthikeyad-pnnl Sep 23, 2023
d7ae741
Merge pull request #9 from karthikeyad-pnnl/RTUdevelopment
junkewang001 Sep 23, 2023
f6d15ac
Added limits on max and min coil operation temperature
karthikeyad-pnnl Sep 23, 2023
4c6aa21
Merge pull request #10 from karthikeyad-pnnl/RTUdevelopment
junkewang001 Sep 23, 2023
100c2c2
Modifying blocks after adding supply temperature limits
junkewang001 Sep 23, 2023
b95c8ab
Changed logic for downstaging coils
karthikeyad-pnnl Sep 23, 2023
017c29d
Merge pull request #11 from karthikeyad-pnnl/RTUdevelopment
junkewang001 Sep 23, 2023
dee9e4d
Merge branch 'RTUdevelopment' of https://github.com/junkewang001/mode…
junkewang001 Sep 23, 2023
72c7327
Modified blocks after adding PI controller for DX supply air temperature
junkewang001 Sep 23, 2023
c9c706a
Merge pull request #91 from junkewang001/RTUdevelopment
karthikeyad-pnnl Sep 23, 2023
41d0a55
Changed fan control logic to resolve simulation issues
karthikeyad-pnnl Sep 24, 2023
5120c51
Merge pull request #12 from karthikeyad-pnnl/RTUdevelopment
junkewang001 Sep 24, 2023
5835a9b
Organized blocks
junkewang001 Sep 24, 2023
b8b139d
Changed initial zone temperatures to 24C for cooling
junkewang001 Sep 26, 2023
e13908c
Changed back to hysteresis deadband control for auxiliary coil
junkewang001 Sep 26, 2023
400c18c
Merge pull request #92 from junkewang001/RTUdevelopment
karthikeyad-pnnl Sep 27, 2023
2cf64df
Added latest models made to test individual features
karthikeyad-pnnl Sep 27, 2023
f551fe5
Updated control module names to indicate ASHRAE2006 and G36
karthikeyad-pnnl Sep 27, 2023
af3fdd4
Merge pull request #13 from karthikeyad-pnnl/RTUdevelopment
junkewang001 Sep 27, 2023
e1da070
Updated documentation and scripts
junkewang001 Sep 27, 2023
eebbdff
Merge branch 'RTUdevelopment' of https://github.com/junkewang001/mode…
junkewang001 Sep 27, 2023
2482873
Corrected heating PI controller and updated fan controller
junkewang001 Sep 29, 2023
23c95f8
Merge pull request #93 from junkewang001/RTUdevelopment
karthikeyad-pnnl Sep 29, 2023
f778566
Updated documentation and scripts
junkewang001 Sep 30, 2023
7e39c7e
Merge pull request #95 from junkewang001/RTUdevelopment
karthikeyad-pnnl Sep 30, 2023
4a3933f
Updated documentation, formatting and naming conventions for DX coil …
karthikeyad-pnnl Sep 30, 2023
cc9a4c2
Merge branch 'RTUdevelopment' of github.com:karthikeyad-pnnl/modelica…
karthikeyad-pnnl Sep 30, 2023
20d3c5b
Updated all controller modules
karthikeyad-pnnl Oct 1, 2023
e746050
Removed unused control modules
karthikeyad-pnnl Oct 1, 2023
7714383
Removed unused models for closed loop validation
karthikeyad-pnnl Oct 1, 2023
116ec8c
Removed unused validation script
karthikeyad-pnnl Oct 1, 2023
cda11d1
Removed package used for development
karthikeyad-pnnl Oct 1, 2023
449557c
Rmoved unused files in folder structure
karthikeyad-pnnl Oct 1, 2023
8e427d6
Removed unused files
karthikeyad-pnnl Oct 1, 2023
50f5a46
Reverted all Fluid package files to old commit before changes were pu…
karthikeyad-pnnl Oct 1, 2023
76fa9df
Reverted examples folder to last verified commit
karthikeyad-pnnl Oct 1, 2023
e1839df
Removed unused files and packages
karthikeyad-pnnl Oct 1, 2023
c657485
Added unit test results
karthikeyad-pnnl Oct 3, 2023
99a0e3b
Removed unused module and corrected errors found in unit tests
karthikeyad-pnnl Oct 4, 2023
0eb1c70
Changes to resolve warnings in unit tests
karthikeyad-pnnl Oct 4, 2023
b9e67df
Updated unit test results
karthikeyad-pnnl Oct 4, 2023
d9b8293
Removed unused unit test results
karthikeyad-pnnl Oct 4, 2023
d1c9e4a
Merge pull request #18 from karthikeyad-pnnl/issue3544_HeatPumpRTUCon…
junkewang001 Jan 5, 2024
a7dde99
Updated module directory from "Continuous" to "Reals"
junkewang001 Jan 5, 2024
1111d15
Uploading new module for determining next coil to be enabled
karthikeyad-pnnl Jan 11, 2024
86fa821
Added documentation to new module
karthikeyad-pnnl Jan 11, 2024
e03293e
Updated validation script and added new reference file.
karthikeyad-pnnl Jan 11, 2024
0f046a3
Integrated new block into main controller
karthikeyad-pnnl Jan 11, 2024
1ffc03d
Merge pull request #19 from karthikeyad-pnnl/issue3544_HeatPumpRTUCon…
junkewang001 Jan 11, 2024
81cfcb5
Merge branch 'issue3544_HeatPumpRTUControls' of https://github.com/ju…
junkewang001 Jan 11, 2024
105a8fc
Unit tests after adding NextCoil module
junkewang001 Jan 12, 2024
178a9d9
Updated documentation
junkewang001 Jan 13, 2024
2e4f554
Added curves for auxiliary coil validation model and rerun unit test
junkewang001 Jan 19, 2024
fb759ec
Merge pull request #119 from lbl-srg/issue3544_HeatPumpRTUControls
karthikeyad-pnnl Feb 7, 2024
6cdbe0b
Updated references to Reals package in CDL library
karthikeyad-pnnl Feb 7, 2024
ca6acd1
Added and modified validation models for VAV reheat systems
karthikeyad-pnnl Feb 7, 2024
3634715
Fixed bug and reverted weather file to version with modelica environm…
karthikeyad-pnnl Feb 7, 2024
327fff9
Added validation script for new validation model
karthikeyad-pnnl Feb 8, 2024
8ab4b69
Updated package order for new files
karthikeyad-pnnl Feb 8, 2024
448d038
Merge branch 'issue3544_HeatPumpRTUControls' into issue3544_HeatPumpR…
junkewang001 Feb 8, 2024
7ac625b
Merge pull request #22 from karthikeyad-pnnl/issue3544_HeatPumpRTUCon…
junkewang001 Feb 8, 2024
208bfc4
Revised script and line connections
junkewang001 Feb 16, 2024
0713cfd
Added images for RTU system with DX coils
junkewang001 Feb 19, 2024
ffc7a5f
Added documentation for base case modules and example model
junkewang001 Feb 19, 2024
2763cc9
Corrected line connections and changed simulation times
junkewang001 Feb 26, 2024
8ef5133
Added results from Unit Tests
junkewang001 Feb 27, 2024
96788c1
Merge pull request #122 from junkewang001/issue3544_HeatPumpRTUControls
karthikeyad-pnnl May 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
275 changes: 275 additions & 0 deletions Buildings/Controls/OBC/RooftopUnits/AuxiliaryCoil/AuxiliaryCoil.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,275 @@
within Buildings.Controls.OBC.RooftopUnits.AuxiliaryCoil;
block AuxiliaryCoil
"Sequences to control auxiliary heating coil"

parameter Integer nCoi(min=1)
"Number of DX coils"
annotation (Dialog(group="DX coil parameters"));

parameter Real TLocOut(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")=273.15-12.2
"Minimum outdoor dry-bulb lockout temperature";

parameter Real dTHys(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")=0.05
"Small temperature difference used in comparison blocks"
annotation(Dialog(tab="Advanced"));

parameter Real kLocOut=1
"Gain of auxiliary heating controller when the DX heating coils are locked out"
annotation (Dialog(group="P controller"));

parameter Real kOpe=10
"Gain of auxiliary heating controller when the DX heating coils are operational"
annotation (Dialog(group="P controller"));

parameter Real uThrHeaCoi(
final min=0,
final max=1)=0.9
"Threshold of heating coil valve position signal above which auxiliary coil is enabled";

parameter Real dUHys=0.01
"Coil valve position comparison hysteresis difference"
annotation(Dialog(tab="Advanced"));

Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uDXCoi[nCoi]
"DX coil signal"
annotation (Placement(transformation(extent={{-140,60},{-100,100}}),
iconTransformation(extent={{-140,40},{-100,80}})));

Buildings.Controls.OBC.CDL.Interfaces.RealInput TOut(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
"Outdoor air temperature"
annotation (Placement(transformation(extent={{-140,-20},{-100,20}}),
iconTransformation(extent={{-140,-20},{-100,20}})));

Buildings.Controls.OBC.CDL.Interfaces.RealInput uHeaCoi(
final min=0,
final max=1,
final unit="1")
"Heating coil valve position"
annotation (Placement(transformation(extent={{-140,-60},{-100,-20}}),
iconTransformation(extent={{-140,-80},{-100,-40}})));

Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yDXCoi[nCoi]
"DX coil signal"
annotation (Placement(transformation(extent={{100,40},{140,80}}),
iconTransformation(extent={{100,0},{140,40}})));

Buildings.Controls.OBC.CDL.Interfaces.RealOutput yAuxHea(
final min=0,
final max=1,
final unit="1")
"Auxiliary heating coil signal"
annotation (Placement(transformation(extent={{100,-40},{140,0}}),
iconTransformation(extent={{100,-40},{140,0}})));

protected
parameter Modelica.Blocks.Types.SimpleController controllerType=Modelica.Blocks.Types.SimpleController.P
"Type of auxiliary heating controller"
annotation (Dialog(group="P controller"));

Buildings.Controls.OBC.CDL.Routing.BooleanScalarReplicator booScaRep(
final nout=nCoi)
"Boolean scalar replicator"
annotation (Placement(transformation(extent={{-40,90},{-20,110}})));

Buildings.Controls.Continuous.LimPID conPHeaHig(
final controllerType=controllerType,
final k=kOpe,
final yMax=1,
final yMin=0,
final reverseActing=false)
"Regulate supply air temperature at or above its setpoint when load is unmet by DX heating"
annotation (Placement(transformation(extent={{-10,-100},{10,-80}})));

Buildings.Controls.OBC.CDL.Logical.And and2[nCoi]
"Logical And"
annotation (Placement(transformation(extent={{60,78},{80,98}})));

Buildings.Controls.OBC.CDL.Logical.Not not1[nCoi]
"Logical Not"
annotation (Placement(transformation(extent={{0,90},{20,110}})));

Buildings.Controls.OBC.CDL.Reals.Multiply mulSupHeaEng
"Enable auxiliary heating if DX coil is unable to meet heating load"
annotation (Placement(transformation(extent={{30,-96},{50,-76}})));

Buildings.Controls.OBC.CDL.Reals.LessThreshold lesThrLocOut(
final t=TLocOut,
final h=dTHys)
"Check if outdoor air lockout temperature is less than threshold"
annotation (Placement(transformation(extent={{-80,-10},{-60,10}})));

Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThrHeaCoi(
final t=uThrHeaCoi,
final h=dUHys)
"Check if heating coil signal is equal to or greater than threshold"
annotation (Placement(transformation(extent={{-80,-70},{-60,-50}})));

Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToReaSupHeaHig
"Convert Boolean auxiliary heating enable signal to real value"
annotation (Placement(transformation(extent={{-20,-60},{0,-40}})));

Buildings.Controls.OBC.CDL.Logical.And andLocOut
"Check for heating coil signal and outdoor air temperature lockout"
annotation (Placement(transformation(extent={{-46,-10},{-26,10}})));

Buildings.Controls.OBC.CDL.Reals.Max maxSupHea
"Output higher of the two auxiliary heating signals"
annotation (Placement(transformation(extent={{70,-30},{90,-10}})));

Buildings.Controls.OBC.CDL.Reals.Sources.Constant conHeaCoiSig(
final k=uThrHeaCoi)
"Constant heating coil signal"
annotation (Placement(transformation(extent={{-50,-100},{-30,-80}})));

Buildings.Controls.Continuous.LimPID conPHeaLocOut(
final controllerType=controllerType,
final k=kLocOut,
final yMax=1,
final yMin=0,
final reverseActing=false)
"Regulate supply air temperature at or above its setpoint"
annotation (Placement(transformation(extent={{-10,40},{10,60}})));

Buildings.Controls.OBC.CDL.Reals.Multiply mulSupHeaEng1
"Enable auxiliary heating when DX coil is locked out"
annotation (Placement(transformation(extent={{30,44},{50,64}})));

Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToReaSupHeaLocOut
"Convert Boolean auxiliary heating enable signal to real value"
annotation (Placement(transformation(extent={{-10,-10},{10,10}})));

Buildings.Controls.OBC.CDL.Reals.Sources.Constant conHeaCoiSigZer(
final k=0)
"Constant zero heating coil signal"
annotation (Placement(transformation(extent={{-46,40},{-26,60}})));

Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThrHeaCoi1(
final t=dUHys,
final h=dUHys/2)
"Check if heating coil signal is greater than zero during lockout mode"
annotation (Placement(transformation(extent={{-80,-40},{-60,-20}})));

equation
connect(lesThrLocOut.u, TOut)
annotation (Line(points={{-82,0},{-120,0}}, color={0,0,127}));
connect(uHeaCoi, greThrHeaCoi.u)
annotation (Line(points={{-120,-40},{-90,-40},{-90,-60},{-82,-60}},
color={0,0,127}));
connect(lesThrLocOut.y, andLocOut.u1)
annotation (Line(points={{-58,0},{-48,0}}, color={255,0,255}));
connect(conPHeaHig.y, mulSupHeaEng.u1)
annotation (Line(points={{11,-90},{20,-90},{20,-80},{28,-80}},
color={0,0,127}));
connect(mulSupHeaEng.y, maxSupHea.u2)
annotation (Line(points={{52,-86},{60,-86},{60,-26},{68,-26}}, color={0,0,127}));
connect(maxSupHea.y, yAuxHea)
annotation (Line(points={{92,-20},{120,-20}}, color={0,0,127}));
connect(conPHeaHig.u_s, conHeaCoiSig.y)
annotation (Line(points={{-12,-90},{-28,-90}}, color={0,0,127}));
connect(uHeaCoi, conPHeaHig.u_m)
annotation (Line(points={{-120,-40},{-90,-40},{-90,-110},{0,-110},{0,-102}},color={0,0,127}));
connect(booToReaSupHeaHig.y, mulSupHeaEng.u2)
annotation (Line(points={{2,-50},{24,-50},{24,-92},{28,-92}}, color={0,0,127}));
connect(conPHeaLocOut.y, mulSupHeaEng1.u1)
annotation (Line(points={{11,50},{20,50},{20,60},{28,60}}, color={0,0,127}));
connect(booToReaSupHeaLocOut.y, mulSupHeaEng1.u2)
annotation (Line(points={{12,0},{ 20,0},{20,48},{28,48}}, color={0,0,127}));
connect(greThrHeaCoi.y, booToReaSupHeaHig.u)
annotation (Line(points={{-58,-60},{-40,-60},{-40,-50},{-22,-50}},
color={255,0,255}));
connect(andLocOut.y, booToReaSupHeaLocOut.u)
annotation (Line(points={{-24,0},{-12,0}}, color={255,0,255}));
connect(mulSupHeaEng1.y, maxSupHea.u1)
annotation (Line(points={{52,54},{60,54},{60,-14},{68,-14}}, color={0,0,127}));
connect(conHeaCoiSigZer.y, conPHeaLocOut.u_s)
annotation (Line(points={{-24,50},{-12,50}}, color={0,0,127}));
connect(uHeaCoi, conPHeaLocOut.u_m)
annotation (Line(points={{-120,-40},{-90,-40},{-90,28},{0,28},{0,38}}, color={0,0,127}));

connect(lesThrLocOut.y, booScaRep.u) annotation (Line(points={{-58,0},{-52,0},
{-52,100},{-42,100}}, color={255,0,255}));
connect(booScaRep.y, not1.u)
annotation (Line(points={{-18,100},{-2,100}}, color={255,0,255}));
connect(not1.y, and2.u1) annotation (Line(points={{22,100},{50,100},{50,88},{58,
88}}, color={255,0,255}));
connect(and2.y, yDXCoi) annotation (Line(points={{82,88},{90,88},{90,60},{120,
60}}, color={255,0,255}));
connect(uDXCoi, and2.u2)
annotation (Line(points={{-120,80},{58,80}}, color={255,0,255}));
connect(uHeaCoi, greThrHeaCoi1.u) annotation (Line(points={{-120,-40},{-90,-40},
{-90,-30},{-82,-30}}, color={0,0,127}));
connect(greThrHeaCoi1.y, andLocOut.u2) annotation (Line(points={{-58,-30},{-52,
-30},{-52,-8},{-48,-8}}, color={255,0,255}));
annotation (defaultComponentName="conAuxCoi",
Icon(coordinateSystem(preserveAspectRatio=false),
graphics={
Text(
extent={{-100,6},{-66,-8}},
textColor={0,0,127},
pattern=LinePattern.Dash,
textString="TOut"),
Text(
extent={{-98,-52},{-46,-66}},
textColor={0,0,127},
pattern=LinePattern.Dash,
textString="uHeaCoi"),
Text(
extent={{42,-6},{94,-32}},
textColor={0,0,127},
pattern=LinePattern.Dash,
textString="yAuxHea"),
Text(
extent={{-98,66},{-52,52}},
textColor={255,0,255},
textString="uDXCoi"),
Text(
extent={{54,26},{96,12}},
textColor={255,0,255},
textString="yDXCoi"),
Rectangle(
extent={{-100,100},{100,-100}},
lineColor={0,0,0},
fillColor={255,255,255},
fillPattern=FillPattern.Solid),
Text(
extent={{-150,140},{150,100}},
textString="%name",
textColor={0,0,255})}),
Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-120},{100,120}})),
Documentation(info="<html>
<p>
This is a control module for adjusting auxiliary heating coil operation signal.
The control module operates as follows:
</p>
<ul>
<li>
When the outdoor air temperature <code>TOut</code> falls below an outdoor air lockout temperature
<code>TLocOut</code>, the controller deactivates DX coils and utilizes the heating coil valve
position signal <code>uHeaCoi</code> as an auxiliary heating coil operation signal
<code>yAuxHea</code>.
</li>
<li>
When <code>TOut</code> exceeds <code>TLocOut</code>, the controller maps <code>yAuxHea</code>
from the heating coil valve signal threshold <code>uThrHeaCoi</code> to 100% of <code>uHeaCoi</code>
if <code>uHeaCoi</code> exceeds <code>uThrHeaCoi</code>. This ensures that the auxiliary heating
is only employed during coil staging or when the coils are unable to meet the heating load.
</li>
</ul>
</html>", revisions="<html>
<ul>
<li>
July 3, 2023, by Junke Wang and Karthik Devaprasad:<br/>
First implementation.
</li>
</ul>
</html>"));
end AuxiliaryCoil;
Loading