blockBandAccumulatedDuration

In every sliding time window, the accumulated time duration where check was true must be within a given band

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 = BandAccumulatedDuration(check=..., window=..., lowerLimit=..., upperLimit=...).y;

Description

In any (sliding) time window of length window, the accumulated time duration where the Boolean input check was true (= accumulatedDuration) 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 accumulatedDuration ≥ lowerLimit and accumulatedDuration ≤ upperLimit then Satisfied else
    (if first and accumulatedDuration ≤ 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

TypeNameDefaultDescription
Modelica.Units.SI.Timewindow (from PartialCheckInSlidingWindowWithPropertyOutput)Length of sliding time window (> 0)
Modelica.Units.SI.TimelowerLimitIn sliding time window, maxDuration(check=true) >= lowerLimit required
Modelica.Units.SI.TimeupperLimitIn sliding time window, maxDuration(check=true) <= upperLimit required

Connectors

TypeNameDefaultDescription
Modelica_Requirements.Interfaces.PropertyOutputy (from PartialCheckInSlidingWindowWithPropertyOutput)Property output signal
Modelica.Blocks.Interfaces.RealOutputaccumulatedDurationAccumulated time duration in the sliding time window where check was true

Components

TypeNameDefaultDescription
Booleancheck (from PartialCheckInSlidingWindowWithPropertyOutput)Boolean to check