-
Notifications
You must be signed in to change notification settings - Fork 161
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
Chiller plant sequences #2299
base: master
Are you sure you want to change the base?
Chiller plant sequences #2299
Conversation
Local diff for commit 2c13e9e:
|
@milicag Would you please review the changes? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JayHuLBL This is not an in-depth review but rather some comments that I have after trying to integrate the top-level controller into the CHW plant template for Linkage.
Also, when simulating Buildings.Controls.OBC.ASHRAE.PrimarySystem.ChillerPlant.Validation.Controller
with OCT (r26747) I get the following error.
Error in flattened model:
A when-guard is involved in an algebraic loop, consider breaking it using pre() expressions.
The model simulates with Dymola. However, when simulating the closed loop model with the controller integrated in the system model, I get a similar error with Dymola (2022x).
Failed to generate code for an algebraic loop involving when equations or algorithms with when parts.
...
You may be able to cut the loop by putting 'pre' around some of the references to unknown continuous time variables in when parts or when conditions.
Other than the translation issue, this seems to conflict with https://obc.lbl.gov/specification/cdl.html#model-of-computation.
In addition, the dependency graph from inputs to outputs that directly depend on inputs shall be directed and acyclic. I.e., connections that form an algebraic loop are not allowed.
OCT also issues warnings that should be corrected.
Warning at line 36, column 34, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Controller.mo':
Assuming 'each' for the modification 'unit = "W"'
Warning at line 40, column 34, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Controller.mo':
Assuming 'each' for the modification 'unit = "W"'
Warning at line 45, column 5, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Controller.mo':
Assuming 'each' for the modification 'unit = "K"'
Warning at line 46, column 5, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Controller.mo':
Assuming 'each' for the modification 'displayUnit = "degC"'
Warning at line 251, column 34, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Controller.mo':
Assuming 'each' for the modification 'unit = "m3/s"'
Warning at line 255, column 34, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Controller.mo':
Assuming 'each' for the modification 'unit = "m3/s"'
Warning at line 377, column 48, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Controller.mo':
Assuming 'each' for the modification 'unit = "Pa"'
Warning at line 377, column 59, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Controller.mo':
Assuming 'each' for the modification 'displayUnit = "Pa"'
Warning at line 558, column 33, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Controller.mo':
Assuming 'each' for the modification 'unit = "K"'
Warning at line 563, column 5, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Controller.mo':
Assuming 'each' for the modification 'unit = "K"'
Warning at line 564, column 5, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Controller.mo':
Assuming 'each' for the modification 'displayUnit = "degC"'
Warning at line 569, column 5, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Controller.mo':
Assuming 'each' for the modification 'unit = "K"'
Warning at line 570, column 5, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Controller.mo':
Assuming 'each' for the modification 'displayUnit = "degC"'
Warning at line 906, column 5, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Controller.mo':
Assuming 'each' for the modification 'final min = 0'
Warning at line 907, column 5, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Controller.mo':
Assuming 'each' for the modification 'final max = 1'
Warning at line 908, column 5, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Controller.mo':
Assuming 'each' for the modification 'final unit = "1"'
Warning at line 69, column 5, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Staging/Processes/Down.mo':
Assuming 'each' for the modification 'final unit = "m3/s"'
Warning at line 70, column 5, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Staging/Processes/Down.mo':
Assuming 'each' for the modification 'final quantity = "VolumeFlowRate"'
Warning at line 71, column 5, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Staging/Processes/Down.mo':
Assuming 'each' for the modification 'displayUnit = "m3/s"'
Warning at line 75, column 5, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Staging/Processes/Down.mo':
Assuming 'each' for the modification 'final unit = "m3/s"'
Warning at line 76, column 5, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Staging/Processes/Down.mo':
Assuming 'each' for the modification 'final quantity = "VolumeFlowRate"'
Warning at line 77, column 5, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Staging/Processes/Down.mo':
Assuming 'each' for the modification 'displayUnit = "m3/s"'
Warning at line 29, column 34, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Staging/SetPoints/SetpointController.mo':
Assuming 'each' for the modification 'unit = "W"'
Warning at line 29, column 44, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Staging/SetPoints/SetpointController.mo':
Assuming 'each' for the modification 'displayUnit = "W"'
Warning at line 33, column 34, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Staging/SetPoints/SetpointController.mo':
Assuming 'each' for the modification 'unit = "W"'
Warning at line 33, column 44, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Staging/SetPoints/SetpointController.mo':
Assuming 'each' for the modification 'displayUnit = "W"'
Warning at line 229, column 3, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Economizers/Subsequences/Tuning.mo':
Ignored connection from connector to itself
Warning at line 87, column 3, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Generic/EquipmentRotation/Subsequences/LeastRuntime.mo':
Ignored connection from connector to itself
Warning at line 135, column 3, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Staging/SetPoints/Subsequences/Capacities.mo':
Ignored connection from connector to itself
Warning at line 181, column 3, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Staging/SetPoints/Subsequences/Capacities.mo':
Ignored connection from connector to itself
Warning at line 261, column 3, in file '/home/agautier/gitrepo/modelica-buildings/Buildings/Controls/OBC/ASHRAE/PrimarySystem/ChillerPlant/Staging/SetPoints/Subsequences/Status.mo':
Ignored connection from connector to itself
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uChiConIsoVal[nChi] | ||
"Chiller condenser water isolation valve status" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
Instance should be conditioned by
have_heaConWatPum
and even then it is optional, so another configuration parameter is required. -
If present and two-position valves, there should rather be 2 input points (DI) for open and closed end switch status.
-
Missing option for modulating valve (AI).
-
"Valve status" is not clear: valve open or closed end switch status (or position feedback if modulating) is clearer.
-
That signal is used for fault detection and alarm only in RP1711. Here it is used by
Buildings.Controls.OBC.ASHRAE.PrimarySystem.ChillerPlant.Pumps.CondenserWater.Controller
. This seems incorrect based on:5.2.9.2. Enable lead CW pump when any chiller or WSE CW isolation valve is commanded open. Disable the lead CW pump when all chiller and WSE CW isolation valves are commanded closed.
The signal that should be used is the command (yielded by subcontroller), not the feedback signal.
-
Lacking consistency in variable name between that input and the output
yHeaPreConVal
.
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uChiIsoVal[nChi] if have_heaChiWatPum | ||
"Chilled water isolation valve status" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
Should be optional (even if
have_heaChiWatPum
), so another configuration parameter is required. -
If present in case of two-position valves, there should rather be 2 input points for open and closed end switch status.
-
Missing option for modulating valve.
-
"Valve status" is not clear: valve open or closed end switch status (or position feedback if modulating) is clearer.
-
That signal is used for fault detection and alarm only in RP1711. Here it is used by
Buildings.Controls.OBC.ASHRAE.PrimarySystem.ChillerPlant.Pumps.ChilledWater.Controller
. This seems incorrect based on:5.2.6.2. Enable lead primary CHW pump when any chiller CHW isolation valve is commanded open. Disable the lead primary CHW pump when all chiller CHW isolation valves are commanded closed.
The signal that should be used is the command (yielded by subcontroller), not the feedback signal
Buildings.Controls.OBC.CDL.Interfaces.RealInput uChiWatIsoVal[nChi]( | ||
final min=fill(0, nChi), | ||
final max=fill(1, nChi), | ||
final unit=fill("1", nChi)) | ||
"Chilled water isolation valve position" | ||
annotation(Placement(transformation(extent={{-840,-248},{-800,-208}}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uChiWatIsoVal
should be optional and exclusive fromuChiIsoVal
.- Lacking consistency in variable names between those two inputs.
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yHeaPreConValSta[nChi] | ||
"Chiller head pressure control status setpoint" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- This is not an output per §4. LIST OF POINTS.
- The variable name is confusing as it includes
Val
which makes one think that this signal is for a two-position valve control, whereas the description string indicates that this is actually to enable/disable head pressure control. - This is only to be used internally to disable/enable the BAS head pressure control loop (case where chillers do not have built-in head pressure control).
- If chillers have built-in head pressure control and head pressure control is disabled, a neutral signal shall be used instead of the AI from the the chiller controller.
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yHeaPreConVal[nChi]( | ||
final min=fill(0, nChi), | ||
final max=fill(1, nChi), | ||
final unit=fill("1", nChi)) | ||
"Head pressure control valve position" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The constraints below are not taken into account.
Required for plants with headered condenser water pumps. Delete otherwise. CW isolation valves may be two-position for chillers that do not require head pressure control or for plants with variable speed condenser pumps but no waterside economizer.
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yChiWatMinFloSet( | ||
final quantity="VolumeFlowRate", | ||
final unit="m3/s", | ||
final min=0) "Chilled water minimum flow setpoint" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not an output per §4. LIST OF POINTS. Should be deleted.
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yConWatPum[nConWatPum] | ||
"Status setpoint of condenser water pump" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Should be conditional to water-cooled plant.
- "Status setpoint" is not clear: "on/off command" or "start signal" is clearer.
- "Setpoint" should be reserved for the desired value of a controlled variable.
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yChiWatIsoVal[nChi]( | ||
final unit=fill("1", nChi), | ||
final min=fill(0, nChi), | ||
final max=fill(1, nChi)) | ||
"Chiller isolation valve position setpoints" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Options below not taken into account.
A modulating valve is recommended on primary-only variable flow systems to allow for slow changes in flow during chiller staging. Sometimes electric valve timing may be sufficiently slow that 2-position valves can provide stable performance. Two-position valves are acceptable on primary-secondary systems.
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yNumCel | ||
"Total number of enabled cooling tower cells" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not an output per §4. LIST OF POINTS. Should be deleted.
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yTowCelIsoVal[nTowCel]( | ||
final min=fill(0, nTowCel), | ||
final max=fill(1, nTowCel), | ||
final unit=fill("1", nTowCel)) | ||
"Cooling tower cells isolation valve position" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be
- Boolean, and
- conditional to a configuration parameter (as CT may not have isolation valves), and
- duplicated in case CT have both inlet and outlet isolation valves: one signal for each kind of valve.
…ng detailed sequence applicabilities [ci skip]
Closes #2293, #2086, #1977.
@JayHuLBL