functionsmoothHeaviside

Twice continuously differentiable approximation to the Heaviside function

Extends from Modelica.Icons.Function (Icon for functions).

Information

Twice Lipschitz continuously differentiable approximation to the Heaviside(.,.) function.
Function is derived from a quintic polynomial going through (0,0) and (1,1), with zero first and second order derivatives at those points.
See Example Buildings.Utilities.Math.Examples.SmoothHeaviside.

Inputs

TypeNameDefaultDescription
RealxArgument
RealdeltaParameter used for scaling

Outputs

TypeNameDefaultDescription
RealyResult

Revisions

  • July 21, 2025 by Hongxiang Fu:
    Made the function inlined.
    This is for #4278.
  • October 21, 2019:
    Added delta.min attribute to guard against division by zero.
    This is for issue 1202.
  • September 13, 2019, by Kristoff Six and Filip Jorissen:
    Once continuously differentiable replaced by twice continuously differentiable implementation. This is for issue 1202.
  • March 15, 2016, by Michael Wetter:
    Replaced spliceFunction with regStep. This is for issue 300.
  • July 17, 2015, by Marcus Fuchs:
    Add link to example.
  • February 5, 2015, by Filip Jorissen:
    Added smoothOrder = 1.
  • July 14, 2010, by Wangda Zuo, Michael Wetter:
    First implementation.