blockStageChangeCommand
Information
The plant equipment is staged in part based on required capacity, Qrequired, relative to nominal capacity of a given stage, Qstage. This ratio is the operative part load ratio, OPLR.
OPLR = Qrequired / Qstage
If both primary and secondary hot water temperatures and flow rates are available, the sensors in the primary loop are used for calculating Qrequired. If a heat recovery chiller is piped into the secondary return, the sensors in the primary loop are used. (These conditions are implemented in Buildings.Templates.Plants.Controls.HeatPumps.AirToWater.)
The required capacity is calculated based on return temperature, active supply temperature setpoint and measured flow through the associated circuit flow meter.
The required capacity used in logic is a rolling average over a period
of dtMea
of instantaneous values sampled at minimum once every 30 s.
When a stage up or stage down transition is initiated,
Qrequired is held fixed at its last value until the longer of
the successful completion of the stage change
and the duration dtRun.
The nominal capacity of a given stage, Qstage, is calculated as the sum of the design capacities of all units enabled in a given stage.
Staging is executed per the conditions below subject to the following requirements.
-
Each stage has a minimum runtime of
dtRun. (This condition is implemented in Buildings.Templates.Plants.Controls.Utilities.StageIndex.) - Timers are reset to zero at the completion of every stage change.
- Any unavailable stage is skipped during staging events, but staging conditionals in the current stage are evaluated as per usual.
A stage up command is triggered if any of the following is true:
- Availability condition: The equipment necessary to operate the current stage is unavailable. The availability condition is not subject to the minimum stage runtime requirement. (This condition is implemented in Buildings.Templates.Plants.Controls.Utilities.StageIndex.)
-
Efficiency condition: Current stage OPLR > plrSta for a duration of
dtRun. - Failsafe condition: see Buildings.Templates.Plants.Controls.StagingRotation.FailsafeCondition.
A stage down command is triggered if both of the following are true:
-
Next available lower stage OPLR < plrSta for a duration of
dtRun. - The failsafe stage up condition is not true.
Details
A staging matrix staEqu is required as a parameter.
See the documentation of
Buildings.Templates.Plants.Controls.StagingRotation.EquipmentEnable
for the associated definition and requirements.
An "if" condition is used to generate the stage up and down command as opposed
to a "when" condition. This means that the command remains true as long as the
condition is verified. This is necessary, for example, if no higher stage is
available when a stage up command is triggered. Using a "when" condition –
which is only valid at the point in time at which the condition becomes true –
would prevent the plant from staging when a higher stage becomes available again.
To avoid multiple consecutive stage changes, the block that receives the stage up
and down command and computes the stage index must enforce a minimum stage runtime
of dtRun.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Templates.Plants.Controls.Types.Application | typ | Type of application | |
| Boolean | have_pumSec | Set to true for primary-secondary distribution, false for primary-only | |
| Boolean | have_inpPlrSta | false | Set to true to use an input signal for SPLR, false to use a parameter |
| Real | plrSta | 0.9 | Staging part load ratio |
| Real[nEqu,nSta] | traStaEqu | {{staEqu[i, j] for i in 1:nSta} for j in 1:nEqu} | Transpose of staging matrix |
| Real[:,:] | staEqu | Staging matrix – Equipment required for each stage | |
| Integer | nSta | size(staEqu, 1) | Number of stages |
| Integer | nEqu | size(staEqu, 2) | Number of equipment |
| Real[nEqu] | capEqu | Design capacity of each equipment | |
| Real | dtRun | 900 | Runtime with exceeded staging part load ratio before staging event is triggered |
| Real | dtMea | 300 | Duration used to compute the moving average of required capacity |
| Real | cp_default | Default specific heat capacity used to compute required capacity | |
| Real | rho_default | Default density used to compute required capacity | |
| Real | dT | Delta-T triggering stage up command (>0) | |
| Real | dtPri | 900 | Runtime with high primary-setpoint Delta-T before staging up |
| Real | dtSec | 600 | Runtime with high secondary-primary and secondary-setpoint Delta-T before staging up |
Connectors
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Controls.OBC.CDL.Reals.Sources.Constant[nEqu,nSta] | traMatStaEqu | Transpose of staging matrix | |
| Buildings.Controls.OBC.CDL.Routing.RealExtractor[nEqu] | reqEquSta | Extract equipment required at given stage | |
| Buildings.Controls.OBC.CDL.Routing.IntegerScalarReplicator | intScaRep | Replicate signal | |
| Buildings.Controls.OBC.CDL.Reals.Multiply[nEqu] | capEquSta | Capacity of each equipment required at given stage | |
| Buildings.Controls.OBC.CDL.Reals.Sources.Constant[nEqu] | capEquPar | Capacity of each equipment | |
| Buildings.Controls.OBC.CDL.Reals.MultiSum | capSta | Compute nominal capacity of active stage | |
| Buildings.Controls.OBC.CDL.Reals.Greater | gre | Compare OPLR to SPLR (hysteresis is to avoid chattering with some simulators) | |
| Buildings.Controls.OBC.ASHRAE.G36.Plants.Chillers.Generic.TimerWithReset | timUp | Timer | |
| Buildings.Controls.OBC.CDL.Reals.Less | les | Compare OPLR to SPLR (hysteresis is to avoid chattering with some simulators) | |
| Buildings.Controls.OBC.ASHRAE.G36.Plants.Chillers.Generic.TimerWithReset | timDow | Timer | |
| Utilities.HoldReal | hol | Hold value of required capacity at stage change | |
| Buildings.Controls.OBC.CDL.Integers.Max | maxInt | Maximum between stage index and 1 | |
| Buildings.Controls.OBC.CDL.Integers.Sources.Constant | one | Constant | |
| Buildings.Controls.OBC.CDL.Integers.Sources.Constant[nSta] | idxSta | Stage index | |
| Buildings.Controls.OBC.CDL.Integers.Less[nSta] | idxStaLesAct | Return true if stage index lower than active stage index | |
| Buildings.Controls.OBC.CDL.Logical.And[nSta] | idxStaLesActAva | Return true if stage index lower than active stage index and stage available | |
| Buildings.Controls.OBC.CDL.Routing.IntegerScalarReplicator | intScaRep1 | Replicate signal | |
| Utilities.LastTrueIndex | idxLasTru | Index of next available lower stage | |
| Buildings.Controls.OBC.CDL.Integers.Max | maxInt1 | Maximum between stage index and 1 | |
| Buildings.Controls.OBC.CDL.Routing.IntegerScalarReplicator | intScaRep2 | Replicate signal | |
| Buildings.Controls.OBC.CDL.Routing.RealExtractor[nEqu] | reqEquStaLow | Extract equipment required at next available lower stage | |
| Buildings.Controls.OBC.CDL.Reals.Multiply[nEqu] | capEquStaLow | Capacity of each equipment required at next available lower stage | |
| Buildings.Controls.OBC.CDL.Reals.MultiSum | capStaLow | Compute nominal capacity of next available lower stage | |
| Buildings.Controls.OBC.CDL.Integers.Min | minInt | Minimum between stage index and 1 | |
| Buildings.Controls.OBC.CDL.Conversions.IntegerToReal | intToRea | Convert to real value | |
| Buildings.Controls.OBC.CDL.Reals.Multiply | setZer | Set nominal capacity to zero if no lower available stage | |
| Buildings.Controls.OBC.CDL.Reals.Multiply | splTimCapSta | SPLR times capacity of active stage | |
| Buildings.Controls.OBC.CDL.Reals.Multiply | splTimCapStaLow | SPLR times capacity of next available lower stage | |
| Utilities.PlaceholderReal | parPlrSta | Parameter value for SPLR | |
| Buildings.Controls.OBC.CDL.Logical.FallingEdge | endStaPro | True when staging process terminates | |
| LoadAverage | capReq | Compute required capacity | |
| FailsafeCondition | faiSaf | Failsafe stage up condition | |
| Buildings.Controls.OBC.CDL.Logical.Or | effOrFaiSaf | Efficiency OR failsafe condition met | |
| Buildings.Controls.OBC.CDL.Logical.Not | notFaiSaf | Failsafe stage up condition is not true | |
| Buildings.Controls.OBC.CDL.Logical.And | effAndNotFaiSaf | Efficiency condition met AND failsafe stage up condition is not true |
Revisions
-
May 31, 2024, by Antoine Gautier:
Refactored usingLoadAverageblock and added failsafe condition. -
March 29, 2024, by Antoine Gautier:
First implementation.