Hysteresis
True above uHigh, false below uLow, unchanged in between.
- signal
- Boolean
- Modelica Standard Library
- 2 ports
- 2 parameters
boolHysteresisLibraryLogicDescription
A Schmitt trigger: the output turns true when the input rises above uHigh and turns false only when it falls below uLow. Between the two thresholds it keeps its previous value.
The output starts false.
Example
Comparators A sine compared with thresholds, with a ramp, and through a hysteresis band.
sin(πt)t / 4Above 0.5Below −0.5Hysteresis ±0.5Sine > rampSine < ramp
Also in this example:RampSine waveGreater than thresholdLess than thresholdGreater thanLess than
Ports
Inputs 1
-
u
Real input.
Outputs 1
-
y
Boolean output.
Parameters
-
Lower threshold
uLow0Lower threshold. When y is true and u < uLow, y becomes false. Must be less than uHigh.
-
Upper threshold
uHigh1Upper threshold. When y is false and u > uHigh, y becomes true. Must be greater than uLow.
Equations
Modelica
y = (¬y⁻ ∧ u > uHigh) ∨ (y⁻ ∧ u ≥ uLow) y⁻ is the value just before the current event; y⁻ = false at t = 0.
Implementation
Modelica Standard Library 4.1.0
MSL documentation Modelica.Blocks.Logical.HysteresisAssumptions and limitations
- The simulation stops with an error unless uHigh > uLow.
Tips
- For a thermostat-style loop around a moving setpoint, On-off controller expresses the band relative to a reference signal.
See also
Select a block in Gradara and press F1 to open its page offline.