blockHysteresis

Transform Real to Boolean signal with Hysteresis
Diagram of Hysteresis

Information

Block that transforms a Real input signal into a Boolean output signal:

  • When the output was false and the input becomes greater than the parameter uHigh, the output switches to true.
  • When the output was true and the input becomes less than the parameter uLow, the output switches to false.

The start value of the output is defined via parameter pre_y_start (= value of pre(y) at initial time). The default value of this parameter is false.

Hysteresis.png

Parameters

TypeNameDefaultDescription
RealuLowif y=true and u<uLow, switch to y=false
RealuHighif y=false and u>uHigh, switch to y=true
Booleanpre_y_startfalseValue of pre(y) at initial time

Connectors

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Interfaces.RealInputuInput to be compared against hysteresis values
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutputyOutput value of comparison

Revisions

  • October 3, 2017, by Michael Wetter:
    Removed start value for parameters, and moved assertion to initial equation.
  • January 3, 2017, by Michael Wetter:
    First implementation, based on the implementation of the Modelica Standard Library.