Twice continuously differentiable approximation to the Heaviside
function
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.
function smoothHeaviside
extends Modelica.Icons.Function;
input Real x "Argument";
input Real delta(min = Modelica.Constants.eps) "Parameter used for scaling";
output Real y "Result";
end smoothHeaviside;
- 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.
Generated at 2026-05-09T18:18:56Z by OpenModelicaOpenModelica 1.26.7 using
GenerateDoc.mos