About Functions

You can use functions during a simulation to define the motion of mechanism elements such as drivers or applied loads through time.

This page discusses:

Context

Functions define a relationship between a physical quantity (independent variable specified as the input value) and another physical quantity (dependent variable that determines the output value).

A function uses a given independent x variable to determine the output values of the corresponding F(x) variable.

During the creation of mechanisms, you can use functions to define complex and nonlinear behaviors in motion elements, including:

  • The displacement of a motion driver.
  • The position or velocity of a joint.
  • The stiffness of a spring.
  • The force or torque of an applied load.

You can use the same function on several motion elements to simulate a common behavior.

Important: To assign a function to a motion element, specify the input and output physical quantities according to the function parameter of the corresponding motion element.

For example, you can define the displacement (output) of a driver with respect to time (input), but you cannot define the force (output) of an applied load with respect to angle or velocity (input).

The following types of functions are available:

Function Type Description
Predefined Functions using predefined knowledge parameters to evaluate the output values.
Note: The physical quantities of the parameters depend on the physical quantities selected for the input and output values.

For example, a velocity can either be linear (m/s) or angular (rad/s) depending on the output displacement (linear or angular).

Data Points Function interpolating or extrapolating a series of input and output values specified by the user in a table.

Predefined Functions

The following predefined functions are available:

Function Description
Constant Function using the same output value for every input value. The resulting curve is a horizontal line.
Step 3rd order polynomial step function using intervals in the output and input values. The resulting curve is a series of horizontal segments, also called steps.
Step5 5th order polynomial step function using intervals in the output and input values. The resulting curve is a series of horizontal segments, also called steps.
Harmonic Function using two variables, and for which the value at each point equals the average of the values along any circle around that point (provided the function is defined within the circle).

To create a function, specify values for each element of the function.

Function Formula User Input
Constant F(x) = C C: constant output value
Step

where h0 = F(x0) and h1 = F(x1).
  • x0
  • F(x0)
  • x1
  • F(x1)
Step5

where h0 = F(x0) and h1 = F(x1).
  • x0
  • F(x0)
  • x1
  • F(x1)
Harmonic F(x) = A*sinn(omega *x + phi) + B
  • A: amplitude
  • B: offset
  • omega: angular frequency
  • phi: phase
  • n: exponent

Data Points Functions

A Data Points function consists in specifying input and output values in a data table.

Tip: You can also copy data from an external application and paste it in the Data Points table. To do so, select the rows to fill in and press Ctrl + V.

A Data Points function lets you proceed to the interpolation and extrapolation of the data included in the table. Depending on the number of rows in the data table, the app selects a specific interpolation method.

Number of Rows Interpolation Method
2 rows Linear interpolation
3 rows Quadratic interpolation
4 rows or more Cubic interpolation (natural cubic spline)
Note: Before the first table value and after the last table value, the slope is constant with a linear extrapolation.

In this example of a natural spline, the linear extrapolation appears in red before P0 and after P5.

You can also specify scale values and offset values for the input and output values.