The STEP function approximates the Heaviside step function with a cubic polynomial. It has continuous first derivatives. Its second derivatives are discontinuous at x=x0 and x=x1.
Format
STEP (x, x0, h0, x1, h1)
Arguments
x | The independent variable. It can be a function expression. |
x0 | A real variable that specifies the x value at which the STEP function begins. |
x1 | A real variable that specifies the x value at which the STEP function ends. |
h0 | The initial value of the step. |
h1 | The final value of the step. |
Extended Definition
The STEP function approximates the Heaviside step function with a cubic polynomial. The figure below illustrates the STEP function.
Step Function
The equation defining the STEP function is:
Tip: | HAVSIN, STEP5, and TANH offer other approximations for the Heaviside step function. These (except for HAVERSINE) have a higher degree of continuity and differentiability, but may have larger derivatives. |
The figure shown next compares the STEP, STEP5, HAVSIN, and TANH functions.
Comparisons of STEP, STEP5, HAVSIN, and TANH
The next figure shows the first derivatives of these four functions.
First Derivatives of STEP, STEP5, HAVSIN, and TANH
Examples
MOTION/1, JOINT=21, VELOCITY
, FUNCTION=STEP(TIME, 1, 0, 2, 1)
This MOTION statement defines a smooth step function from time 1 to time 2 with a velocity from 0 to 1. Note that the motion is specified at the velocity rather than the position level. This prevents the second-order derivative to be invoked during acceleration computation, which is something that would happen if the motion were defined as a displacement level motion.