blockStageIndex
Block that computes the stage index out of staging signals
Information
This block is used to compute the stage index of the plant or of multiple lead/lag units such as pump groups.
At initial time, stage #0 is active.
The transition to stage #1 is triggered when stage #0 has been active
for the minimum runtime and when either the Enable signal u1
has a rising edge or when the stage up signal u1Up is true.
From stage #i, the transition to stage #i+1 (resp. i-1) is triggered
when stage #i has been active for the minimum runtime and when the
stage up signal u1Up (resp. stage down signal u1Dow)
is true.
From stage #i, the transition to stage #0 is triggered
when stage #i has been active for the minimum runtime and the Enable signal
u1 is false.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nSta | Number of stages | |
| Real | tSta | 0 | Minimum runtime of each stage |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Controls.OBC.CDL.Interfaces.BooleanInput | u1 | Enable signal | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanInput | u1Up | Staging up signal | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanInput | u1Dow | Staging down signal | |
| Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput | idxSta | Stage index | |
| Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput | preIdxSta | Left limit (in discrete-time) of stage index | |
| Modelica.StateGraph.InitialStepWithSignal | sta0 | Stage 0: no unit | |
| Modelica.StateGraph.StepWithSignal[nSta] | sta | Stage i | |
| Modelica.StateGraph.TransitionWithSignal | enaLea | Transition enabling lead unit | |
| Modelica.StateGraph.StateGraphRoot | stateGraphRoot | State graph root | |
| Modelica.StateGraph.TransitionWithSignal[nSta] | enaLag | Transition enabling lag unit | |
| Buildings.Controls.OBC.CDL.Logical.Timer[nSta] | tim | Timer for minimum runtime | |
| Buildings.Controls.OBC.CDL.Logical.Timer | tim0 | Timer for minimum runtime | |
| Buildings.Controls.OBC.CDL.Logical.And | and2 | Timer for minimum runtime | |
| Buildings.Controls.OBC.CDL.Logical.And[nSta] | andUp | Runtime criterion met AND staging up order | |
| Buildings.Controls.OBC.CDL.Routing.BooleanScalarReplicator | rep | Replicate | |
| Buildings.Controls.OBC.CDL.Logical.And[nSta] | andDow | Runtime criterion met AND staging down order | |
| Buildings.Controls.OBC.CDL.Routing.BooleanScalarReplicator | rep1 | Replicate | |
| Modelica.StateGraph.TransitionWithSignal[nSta] | disLag | Transition disabling lag unit | |
| Modelica.StateGraph.TransitionWithSignal[nSta] | disAll | Transition disabling all units | |
| Buildings.Controls.OBC.CDL.Logical.And[nSta] | andNotEna | Runtime criterion met AND enable signal false | |
| Buildings.Controls.OBC.CDL.Routing.BooleanScalarReplicator | rep2 | Replicate | |
| Buildings.Controls.OBC.CDL.Logical.Not | not1 | True if enable signal false | |
| Modelica.Blocks.Sources.IntegerExpression | calIdxSta | Compute stage index | |
| Buildings.Controls.OBC.CDL.Logical.Edge | edg | Transition to stage 1 at enable time | |
| Buildings.Controls.OBC.CDL.Logical.Or | or2 | Transition to stage 1 at enable time or staging up order | |
| Modelica.Blocks.Sources.IntegerExpression | calPre | Compute left limit of stage index | |
| Buildings.Controls.OBC.CDL.Logical.And | upAndEna | Stage up only if enabled | |
| Buildings.Controls.OBC.CDL.Logical.And | dowOrDis | Stage down if disabled |
Revisions
-
February 24, 2023, by Antoine Gautier:
First implementation.