blockStage
Output total stages that should be enabled
Information
Block that outputs the total number of stages to be enabled.
The block compares the input u with the threshold of each stage. If the input is greater
than a stage threshold, the output is set to that stage.
The block outputs the total number of stages to be enabled.
The parameter n specifies the maximum number of stages.
The stage thresholds are evenly distributed, i.e. the thresholds
for stages [1, 2, 3, ... , n] are
[0, 1/n, 2/n, ... , (n-1)/n], plus a hysteresis which is by default
h=0.02/n.
Once the output changes, it cannot change for at least holdDuration seconds.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | n | Number of stages that could be enabled | |
| Real | holdDuration | Minimum time that the output needs to be held constant. Set to 0 to disable hold time | |
| Real | h | 0.02/n | Hysteresis for comparing input with threshold |
| Integer | pre_y_start | 0 | Value of pre(y) at initial time |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Controls.OBC.CDL.Interfaces.RealInput | u | Input between 0 and 1 for specifying stages | |
| Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput | y | Total number of stages that should be enabled |
Revisions
-
March 3, 2023, by Michael Wetter:
Revised implementation. -
September 8, 2022, by Jianjun Hu:
First implementation.
This is for Buildings, issue 3103.