Block that outputs true if the Real input
u is greater than a threshold t,
optionally within a hysteresis h.
The parameter h ≥ 0 is used to specify a
hysteresis. For any h ≥ 0, the output switches to
true if u > t, where t is the
threshold, and it switches to false if u ≤ t -
h. Note that in the special case of h = 0, this produces
the output y=u > t.
To disable hysteresis, set h=0.
Enabling hysteresis can avoid frequent switching.
In simulation, adding hysteresis is recommended to guard against
numerical noise. Otherwise, numerical noise from a nonlinear solver
or from an implicit time integration algorithm may cause the
simulation to stall. Numerical noise can be present if an input
depends on a state variable or a quantity that requires an
iterative solution, such as a temperature or a mass flow rate of an
HVAC system.
In real controllers, adding hysteresis is recommended to guard
against measurement noise. Otherwise, measurement noise may cause
the output to change frequently.