blockGreater
Information
Block that outputs true if the Real input u1
is greater than the Real input u2, 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 u1 > u2,
and it switches to false if u1 ≤ u2 - h.
Note that in the special case of h = 0, this produces the output y=u1 > u2.
To disable hysteresis, set h=0.
Usage
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.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Real | h | 0 | Hysteresis |
| Advanced | |||
| Boolean | pre_y_start | false | Value of pre(y) at initial time |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Controls.OBC.CDL.Interfaces.RealInput | u1 | First input u1 | |
| Buildings.Controls.OBC.CDL.Interfaces.RealInput | u2 | Second input u2 | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput | y | Output true if u1 is greater than u2 with hysteresis |
Contents
| Name | Description |
|---|---|
| Greater block without hysteresis | |
| Greater block without hysteresis |
Revisions
-
April 29, 2022, by Jianjun Hu:
Corrected the condition of swiching true back to false.
This is for Buildings, issue 2981. -
February 3, 2021, by Antoine Gautier:
Corrected documentation.
This is for Buildings, issue 2246. -
August 5, 2020, by Michael Wetter:
Added hysteresis.
This is for Buildings, issue 2076. -
January 3, 2017, by Michael Wetter:
First implementation, based on the implementation of the Modelica Standard Library.