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

TypeNameDefaultDescription
IntegernStaNumber of stages
RealtSta0Minimum runtime of each stage

Connectors

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Interfaces.BooleanInputu1Enable signal
Buildings.Controls.OBC.CDL.Interfaces.BooleanInputu1UpStaging up signal
Buildings.Controls.OBC.CDL.Interfaces.BooleanInputu1DowStaging down signal
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutputidxStaStage index
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutputpreIdxStaLeft limit (in discrete-time) of stage index

Components

TypeNameDefaultDescription
Modelica.StateGraph.InitialStepWithSignalsta0Stage 0: no unit
Modelica.StateGraph.StepWithSignal[nSta]staStage i
Modelica.StateGraph.TransitionWithSignalenaLeaTransition enabling lead unit
Modelica.StateGraph.StateGraphRootstateGraphRootState graph root
Modelica.StateGraph.TransitionWithSignal[nSta]enaLagTransition enabling lag unit
Buildings.Controls.OBC.CDL.Logical.Timer[nSta]timTimer for minimum runtime
Buildings.Controls.OBC.CDL.Logical.Timertim0Timer for minimum runtime
Buildings.Controls.OBC.CDL.Logical.Andand2Timer for minimum runtime
Buildings.Controls.OBC.CDL.Logical.And[nSta]andUpRuntime criterion met AND staging up order
Buildings.Controls.OBC.CDL.Routing.BooleanScalarReplicatorrepReplicate
Buildings.Controls.OBC.CDL.Logical.And[nSta]andDowRuntime criterion met AND staging down order
Buildings.Controls.OBC.CDL.Routing.BooleanScalarReplicatorrep1Replicate
Modelica.StateGraph.TransitionWithSignal[nSta]disLagTransition disabling lag unit
Modelica.StateGraph.TransitionWithSignal[nSta]disAllTransition disabling all units
Buildings.Controls.OBC.CDL.Logical.And[nSta]andNotEnaRuntime criterion met AND enable signal false
Buildings.Controls.OBC.CDL.Routing.BooleanScalarReplicatorrep2Replicate
Buildings.Controls.OBC.CDL.Logical.Notnot1True if enable signal false
Modelica.Blocks.Sources.IntegerExpressioncalIdxStaCompute stage index
Buildings.Controls.OBC.CDL.Logical.EdgeedgTransition to stage 1 at enable time
Buildings.Controls.OBC.CDL.Logical.Oror2Transition to stage 1 at enable time or staging up order
Modelica.Blocks.Sources.IntegerExpressioncalPreCompute left limit of stage index
Buildings.Controls.OBC.CDL.Logical.AndupAndEnaStage up only if enabled
Buildings.Controls.OBC.CDL.Logical.AnddowOrDisStage down if disabled

Revisions

  • February 24, 2023, by Antoine Gautier:
    First implementation.