blockBandDuration
Extends from Interfaces.PartialCheckInSlidingWindowWithPropertyOutput (Interfaces and icon for check block that evaluates a property in a sliding time window and returns the result as Property).
Information
Syntax
property = BandDuration(check=..., window=..., lowerLimit=..., upperLimit=...).y;
Description
In any (sliding) time window of length window, the longest time duration where the Boolean input check was permanently true (= maxDuration) must be ≥ parameter lowerLimit and ≤ parameter upperLimit. Whenever this property is fulfilled, Property output y = Satisfied. If this property is not fulfilled at the end of a sliding time window, y = Violated (exception: before the end of the first time window, y = Undecided provided maxDuration ≤ lowerLimit):
y = if maxDuration ≥ lowerLimit and maxDuration ≤ upperLimit then Satisfied else
(if first and maxDuration ≤ upperLimit then Undecided else Violated);
Violated, Undecided, and Satisfied are elements of enumeration Property.
Example
The property is demonstrated with the following example calling the block as:
results in
![]() |
|
| simulation result |
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.Time | window (from PartialCheckInSlidingWindowWithPropertyOutput) | Length of sliding time window (> 0) | |
| Modelica.Units.SI.Time | lowerLimit | In sliding time window, maxDuration(check=true) >= lowerLimit required | |
| Modelica.Units.SI.Time | upperLimit | In sliding time window, maxDuration(check=true) <= upperLimit required |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica_Requirements.Interfaces.PropertyOutput | y (from PartialCheckInSlidingWindowWithPropertyOutput) | Property output signal | |
| Modelica.Blocks.Interfaces.RealOutput | maxDuration | Longest time duration in the sliding time window where check was permanently true |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | check (from PartialCheckInSlidingWindowWithPropertyOutput) | Boolean to check |
