CMP – Comparator with hysteresis

Block SymbolLicensing group: STANDARD
Qt SVG Document Exported by REXYGEN Studio u1 u2 Y CMP

Function Description
The CMP block compares the inputs u1 and u2 with the hysteresis h as follows:

Y 1 = 0, Y k = hyst(ek),k = 0,1,2,

where

ek = u1k u2k

and

hyst(ek) = 0 for ek h Y k1 for ek (h,h) 1 for ek h(ek > h for h = 0)

The indexed variables refer to the values of the corresponding signal in the cycle defined by the index, i.e. Y k1 denotes the value of output in the previous cycle/step. The value Y 1 is used only once when the block is initialized (k = 0) and the difference of the input signals ek is within the hysteresis limits.

This block propagates the signal quality. More information can be found in the 1.4 section.

Input

u1

First analog input of the block

Double (F64)

u2

Second analog input of the block

Double (F64)

Parameter

hys

Hysteresis   0.0 0.5

Double (F64)

Output

Y

Logical output of the block

Bool

2024 © REX Controls s.r.o., www.rexygen.com