FreeMotion

Free motion joint (6 degrees-of-freedom, 12 potential states)

    FreeMotion

Library

Modelica/Mechanics/MultiBody/Joints

Description

Joint which does not constrain the motion between frame_a and frame_b. Such a joint is only meaningful if the relative distance and orientation between frame_a and frame_b, and their derivatives, shall be used as states.

Note, that bodies such as Parts.Body, Parts.BodyShape, have potential states describing the distance and orientation, and their derivatives, between the world frame and a body fixed frame. Therefore, if these potential state variables are suited, a FreeMotion joint is not needed.

The states of the FreeMotion object are:

  • The relative position vector r_rel_a from the origin of frame_a to the origin of frame_b, resolved in frame_a and the relative velocity v_rel_a of the origin of frame_b with respect to the origin of frame_a, resolved in frame_a (= der(r_rel_a)).
  • If parameter useQuaternions in the "Advanced" menu is true (this is the default), then 4 quaternions are states. Additionally, the coordinates of the relative angular velocity vector are 3 potential states.
    If useQuaternions in the "Advanced" menu is false, then 3 angles and the derivatives of these angles are potential states. The orientation of frame_b is computed by rotating frame_a along the axes defined in parameter vector "sequence_angleStates" (default = {1,2,3}, i.e., the Cardan angle sequence) around the angles used as states. For example, the default is to rotate the x-axis of frame_a around angles[1], the new y-axis around angles[2] and the new z-axis around angles[3], arriving at frame_b.

The quaternions have the slight disadvantage that there is a non-linear constraint equation between the 4 quaternions. Therefore, at least one non-linear equation has to be solved during simulation. A tool might, however, analytically solve this simple constraint equation. Using the 3 angles as states has the disadvantage that there is a singular configuration in which a division by zero will occur. If it is possible to determine in advance for an application class that this singular configuration is outside of the operating region, the 3 angles might be used as states by setting useQuaternions = false.

In text books about 3-dimensional mechanics often 3 angles and the angular velocity are used as states. This is not the case here, since 3 angles and their derivatives are used as states (if useQuaternions = false). The reason is that for real-time simulation the discretization formula of the integrator might be "inlined" and solved together with the model equations. By appropriate symbolic transformation the performance is drastically increased if angles and their derivatives are used as states, instead of angles and the angular velocity.

If parameter enforceStates is set to true (= the default) in the "Advanced" menu, then FreeMotion variables are forced to be used as states according to the setting of parameters "useQuaternions" and "sequence_angleStates".

In the following figure the animation of a FreeMotion joint is shown. The light blue coordinate system is frame_a and the dark blue coordinate system is frame_b of the joint. (here: r_rel_a_start = {0.5, 0, 0.5}, angles_start = {45, 45, 45}o).

Parameters

FreeMotion_0

NameLabelDescriptionData TypeValid Values

mo_animation

animation

= true, if animation shall be enabled (show arrow from frame_a to frame_b)

Scalar

true
false

mo_angles_fixed

angles_fixed

= true, if angles_start are used as initial values, else as guess values

Scalar

true
false

mo_angles_start

angles_start

Initial values of angles to rotate frame_a around 'sequence_start' axes into frame_b

Vector of size 3

mo_sequence_start

sequence_start

Sequence of rotations to rotate frame_a into frame_b at initial time

Vector of size 3

mo_w_rel_a_fixed

w_rel_a_fixed

= true, if w_rel_a_start are used as initial values, else as guess values

Scalar

true
false

mo_w_rel_a_start

w_rel_a_start

Initial values of angular velocity of frame_b with respect to frame_a, resolved in frame_a

Vector of size 3

mo_z_rel_a_fixed

z_rel_a_fixed

= true, if z_rel_a_start are used as initial values, else as guess values

Scalar

true
false

mo_z_rel_a_start

z_rel_a_start

Initial values of angular acceleration z_rel_a = der(w_rel_a)

Vector of size 3

mo_R_rel_start

R_rel_start

Orientation object from frame_a to frame_b at initial time

FromModelica('Modelica.Mechanics.MultiBody.Frames.Orientation')

mo_Q_start

Q_start

Quaternion orientation object from frame_a to frame_b at initial time

Vector of size 4

mo_phi_start

phi_start

Potential angle states at initial time

Vector of size 3

FreeMotion_1

NameLabelDescriptionData TypeValid Values

mo_arrowDiameter

arrowDiameter

Diameter of arrow from frame_a to frame_b

Scalar

mo_arrowColor

arrowColor

Color of arrow

Vector of size 3

mo_specularCoefficient

specularCoefficient

Reflection of ambient light (= 0: light is completely absorbed)

Scalar

FreeMotion_2

NameLabelDescriptionData TypeValid Values

mo_enforceStates

enforceStates

= true, if relative variables between frame_a and frame_b shall be used as states

Scalar

true
false

mo_useQuaternions

useQuaternions

= true, if quaternions shall be used as states otherwise use 3 angles as states

Scalar

true
false

mo_sequence_angleStates

sequence_angleStates

Sequence of rotations to rotate frame_a into frame_b around the 3 angles used as states

Vector of size 3

FreeMotion_3

NameLabelDescriptionData TypeValid Values

mo_r_rel_a

r_rel_a

r_rel_a

Structure

mo_r_rel_a/fixed

fixed

Cell of vectors of size 3

true
false

mo_r_rel_a/start

start

Cell of vectors of size 3

mo_v_rel_a

v_rel_a

v_rel_a

Structure

mo_v_rel_a/fixed

fixed

Cell of vectors of size 3

true
false

mo_v_rel_a/start

start

Cell of vectors of size 3

mo_a_rel_a

a_rel_a

a_rel_a

Structure

mo_a_rel_a/fixed

fixed

Cell of vectors of size 3

true
false

mo_a_rel_a/start

start

Cell of vectors of size 3

Ports

NameTypeDescriptionIO TypeNumber

frame_a

implicit

Coordinate system a fixed to the component with one cut-force and cut-torque

input

1

frame_b

implicit

Coordinate system b fixed to the component with one cut-force and cut-torque

output

1