blockMinRising

In every sliding time window, a minimum number of check rising edges must occur

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 = MinRising(check=..., window=..., nRisingMin=1).y;

Description

In any (sliding) time window of length window, the number or rising edges of the Boolean input check (= nRising) must be ≥ parameter nRisingMin. Whenever this property is fulfilled, Property output y = Satisfied. If this property is not fulfilled at the end of a sliding time window, Property output y = Violated (exception: before the end of the first time window, y = Undecided):

y =  if nRising ≥ nRisingMin then Satisfied else
    (if first 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)
IntegernRisingMin1Minimum number of check rising edges in a sliding time window

Connectors

TypeNameDefaultDescription
Modelica_Requirements.Interfaces.PropertyOutputy (from PartialCheckInSlidingWindowWithPropertyOutput)Property output signal
Modelica.Blocks.Interfaces.IntegerOutputnRisingNumber of check rising edges in the sliding time window

Components

TypeNameDefaultDescription
Booleancheck (from PartialCheckInSlidingWindowWithPropertyOutput)Boolean to check