blockCrossingMonitoring

Output is true for a positive threshold crossing of the input and false for a negative threshold crossing

Information

Syntax

b = CrossingMonitoring(u=..., threshold = 0).y;

Description

Whenever the Real input u crosses parameter threshold from negative to positive values, output y is set to true, and whenever u crosses threshold from positive to negative values, y is set to false. The default value for the threshold = 0.

Example

This block is demonstrated with the following example:

results in

simulation result

Parameters

TypeNameDefaultDescription
Realthreshold0Threshold to define crossing

Connectors

TypeNameDefaultDescription
Modelica.Blocks.Interfaces.RealInputuReal input signal
Modelica.Blocks.Interfaces.BooleanOutputyBoolean output signal (= monitoring zero crossing of u)