Constraints

Constraints

Constraints operate on one or more parts to restrict their relative range of motion.

Depending on the type of constraint, there may only be one coordinate that can be controlled (for example, the Hinge joint); or there are multiple controllable coordinates (for example, the Angular 1 Position 3 constraint).

For an exhaustive list of all available constraints, please refer to Constraint Types.

Between each pair of parts, there are three degrees of freedom for position and three for orientation. A constraint removes some of the degrees of freedom between the attached parts. A hinge constraint, for example, which is a two-part constraint, removes five out of the six degrees of freedom between the two attached parts. Depending on the constraint, the remaining degrees of freedom (also called "constraint coordinates") can be controlled either by setting limits, locking, or motorizing.

Basic Constraint Concepts

The way in which a given constraint restricts the motion between the attached parts depends not only on the type of constraint, but also on user-provided constraint axes and positions. The latter represent reference frames which are attached to the constrained parts. These reference frames are called Part Attachments, each of which is defined by a set of three orthonormal axes and a position, specified relative to the attached part. The primary and secondary axes of each attachment can be set in the constraint's Attachments tab. The third axis (or tertiary axis) is automatically computed as the cross product between primary and secondary axes, in this order.

The geometric meaning of the attachment axes and positions differs from constraint to constraint. For example in a constraint which has an angular controllable coordinate, such as a hinge, the primary axis would define the axis of rotation for this coordinate. For a linear coordinate, as in a prismatic joint, the axis defines the direction of motion.

In many constraints, the positions of the part attachment are used to maintain a common point in space between the attached parts. Take as an example the ball and socket joint. The positions of the ball and the socket, relative to the attached parts, would be represented by the positions given in the two part attachments. The specific meaning of the part attachments in the context of an individual constraint, and how they define the behavior of the constraint is explained in the respective constraint's detailed description.

In general, the part attachments are used to calculate the constraint violations and constraint coordinate positions. The violations and coordinate positions, in turn, define the reaction forces and torques applied by the constraint to the attached parts. As an example, a hinge constraint which has its controllable coordinate locked at angle zero is not violated if the world space positions of both its art attachments overlap and the three axes in both attachments are aligned in world space.

Controlling a Constraint Coordinate

Some constraints offer controllable coordinates, which represent relative linear or angular movements between the attached parts. This movement can be controlled in one of three ways:

  • Free: The rigid bodies can move freely along the coordinate.

  • Motorized: Allows you to specify a desired velocity for the coordinate, indicating a motion along or about the coordinate. The constraint will try to achieve this velocity by applying a force to the constrained bodies. The maximum force the motor can apply, as well as the motor loss (inverse of the damping coefficient), can be specified.
    A motorized coordinate acts like a proportional controller on the velocity level, applying a viscous force,

    , which is proportional to the velocity error Verror and the specified damping coefficient c, representing the proportional gain. The proportional gain is equivalent to the inverse of the user-provided motor loss.

  • Lock: This mode locks the coordinate to a specified position or angle and restricts the parts' relative movement accordingly. A locked coordinate exhibits viscoelastic characteristics when undergoing deformations. The amount of viscoelasticity can be specified via stiffness and damping coefficients, k and c, yielding the following constraint force:


    Here, the position and velocity error in the coordinate are denoted by xerror and verror respectively.
    A lock can also be set to behave plastically, allowing irreversible plastic deformations in the coordinate position when the maximum force of the lock is overcome. In this mode, the target lock coordinate position will be displaced as soon as the yield point in the lock force is reached. Until this point, the lock acts elastically and the deformations are reversible. This allows modeling elastoplastic constraint characteristics.
    It is also possible to make the locked coordinate move at a given speed, specified by the lock velocity. This way the lock control can be used to actuate the attached parts similar to a motor. Combining the lock velocity with the plastic lock mode, a position-based motor can be modelled, which, as opposed to the ordinary velocity-based motor control, never experiences any slip.

Turning on the Lock All input will cause the constraint to not move for all the coordinates (no rotation and no translation). But the constraint will still have the default compliance for that constraint type.

Limiting Constraint Coordinates

Coordinate range limits can be defined for all controllable constraint coordinates. By default, limits are not enabled and the coordinate range is unrestricted. Enabling limits allows the range of controllable coordinates to be restricted to a provided minimum and maximum, which can also be set to +/- infinity. Coordinate limits are modelled as unilateral spring-dampers, which can only apply reaction forces towards the admissible range of the coordinate, meaning they cannot act sticky. This is comparable to the way contacts are modelled. As such, when a coordinate hits a limit, a viscoelastic reaction force is applied which can be configured through stiffness and damping coefficients. The applied force can be capped via minimum and maximum limit force parameters.

A limit can also be moved kinematically, via the limit velocity parameter, thus changing the admissible range of the coordinate over time. This is comparable to the lock velocity in a controllable and locked coordinate which makes the equilibrium position of the coordinate move over time according to the provided velocity.

Relaxing a Constraint

Intuitively speaking, relaxing a constraint introduces compliance in the corresponding relaxed coordinates, which manifests itself as slack in the joint bearings when the constrained parts are subject to external forces.

Controllable coordinates cannot be relaxed but most constraints allow their non-controllable coordinates to be relaxed. A hinge constraint for example, which has one controllable angular coordinate, has five remaining non-controllable coordinates (three linear and two angular) which can all be relaxed.

Relaxing a positional constraint (i.e., a constraint which has a target position) puts the constraint into a mode in which it responds with a viscoelastic force to a constraint violation, identical to the reaction force of a spring-damper. The spring-damper can be parametrized via stiffness and damping coefficients. An example of such a constraint is a hinge.

Relaxing a velocity constraint (i.e., a constraint which has a target velocity) leads to a viscous force response upon constraint violation. The force response is parametrized via a kinetic loss parameter (inverse of a damping coefficient). An example of such a constraint is a gear ratio.

Constraint Friction

Most controllable coordinates offer the option of enabling friction forces. Constraint friction applies a dissipative force which intends to remove any relative motion in the corresponding coordinate. For example, a hinge with its controllable angular coordinate in the free control mode can apply a friction force (or torque in this case) to the constrained parts about the hinge axis. The friction force can be set to a fixed maximum value or be chosen to be linearly proportional to the forces applied in the non-controllable coordinates of the joint. For a hinge, this means that the friction force would increase with the loads felt in the hinge bearing (that is, in the remaining five non-controllable coordinates).

  1. In the Properties panel for a constraint, click either Axes tab (Controlled Axes or Other Axes), depending on the friction you need to set.

  2. Select the Friction box to enable friction for the constraint's coordinate.

  3. Set the following parameters:

    • Coefficient: Sets the coefficient used to calculate the maximum scalar friction force that will be applied in the coordinate, as described by Fmax = (friction coefficient) * (constraint force outside coordinate axis). The "constraint force outside coordinate axis" is the rejection of the constraint force vector (taken from the last simulation step) from the coordinate axis vector, i.e., the scalar constraint force outside of the coordinate. This parameter is only used when Proportional is selected.

    • Loss: Specifies the regularization parameter that limits the applied friction force to (1/loss) * (relative velocity). This models the friction force as a viscous force. If set to zero, friction force is not regularized and not velocity dependent.

    • Maximum Force: Sets a constant maximum friction force that will be applied in the coordinate. This value is only used when Proportional is not selected.

    • Proportional: When selected, the Coefficient and Static Friction Scale parameters are used. When not selected, Maximum Force is used.

    • Static Friction Scale: Specifies a multiplier on top of the friction Coefficient that is included in the formula for Fmax, when the joint coordinate is stationary (no coordinate velocity). Thus, Fmax = (friction coefficient) * (static friction scale) * (constraint force outside coordinate axis).
      This is used to dynamically model the difference in friction force in the static versus the kinetic case. If the joint is moving (i.e., kinetic case), the static friction scale in the previous equation is assumed to be 1.
      This value is only used when Proportional is selected.

Adding Constraints

Once you have loaded the parts in the Assembly and modified their position, you can add a constraint between two or more parts.

  1. Select the parts that you want to use. (You can use the Ctrl or Shift keys to select multiple parts.)

  2. Select either Common Constraints or Advanced Constraints from the Toolbox, then double-click the desired constraint.
    Note that you can also add a constraint without first selecting the parts. You would later add the parts via the constraint's Properties panel.

  3. Select the Constraint in the Explorer panel. Enter a Name for the constraint.

  4. To alter the default part assignments, you can change the assigned part.

  5. Click Ok when you are finished setting up the constraint. Vortex has already calculated the Offset values and displays them on the constraint's Property panel.

Changing the Constrained Parts

You can use this procedure if you want to change the currently constrained parts:

  1. In the constraint's Properties panel, click the Browse button next to the part's name

    , then
    .
    If a part is connected, its name appears in the Select Part pop-up window.

  2. In the Explorer panel or 3D View, select the part that you want to assign.

  3. Click

    to accept the assignment and close the box.
    The name of the part you chose now appears as the part.

  4. You can now finish setting up the constraint.

Editing Constraint Properties

In the Vortex® Studio Editor, you can define how the attached parts will react in the simulation environment by defining the constraint's properties:

Note In order to verify proper functioning of a constraint after it has been modified, you should run the simulation to see the behavior of the relationship between the part and the constraint in motion. When a simulation is running, the physics engine is activated and the parts and constraints behave accordingly based on the environmental settings.

Editing Basic Constraint Properties

  1. Select the constraint from the Explorer panel of the Assembly editor.

    The constraint properties appear in the Property panel. On the Attachments tab you can see that Vortex Studio has already calculated and is displaying the offsets.

  2. You can modify the following values:

    • Reference Object

    • Position

    • Primary Axis

    • Secondary Axis

  3. Click the Orthonormalize button to recalculate the axis dimensions, based on the primary axis being dominant. The secondary axis direction will be set orthogonal to the primary axis.

    The primary axis' dimensions will be normalized, and the orthonormal vector nearest to the specified secondary axis (and in the same plane) will be assigned to the secondary axis.

  4. If you click the Orthonormalize button and Vortex cannot perform the computation (for example if you enter [0,0,0]), the following message appears:

Setting Limits on the Constraint