CrossingMonitoring block

Requirements.SignalAnalysis.CrossingMonitoring  ยท source

Icon of CrossingMonitoring

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

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

NameTypeDescription
threshold parameterRealThreshold to define crossing

Components and variables

NameTypeDescription
uModelica.Blocks.Interfaces.RealInputReal input signal
yModelica.Blocks.Interfaces.BooleanOutputBoolean output signal (= monitoring zero crossing of u)