blockRegStep

Approximation of a general step, such that the approximation is continuous and differentiable

Information

This model is used to approximate the equation

y = if x > 0 then y1 else y2;

by a smooth characteristic, so that the expression is continuous and differentiable:

y = smooth(1, if x > x_small then y1 else

if x < -x_small then y2 else f(y1, y2));

In the region -x_small < x < x_small a 2nd order polynomial is used for a smooth transition from y1 to y2.

Parameters

TypeNameDefaultDescription
Realx_small1e-5Approximation of step for -x_small <= x <= x_small; x_small >= 0 required

Connectors

TypeNameDefaultDescription
Modelica.Blocks.Interfaces.RealInputy1Ordinate value for x > 0
Modelica.Blocks.Interfaces.RealInputy2Ordinate value for x < 0
Modelica.Blocks.Interfaces.RealInputxAbscissa value
Modelica.Blocks.Interfaces.RealOutputyConnector of Real output signal

Revisions

  • Feburary 27, 2019, by Benedikt Leitner:
    Implementation and added User's guide.