| SimMechanics™ | ![]() |
Apply initial positions and velocities to primitives of Joint before starting simulation
Sensors & Actuators
The Joint Initial Condition Actuator block supplies the prismatic and revolute joint primitives of a Joint block with initial value data. The initial values are the positions and velocities of the joint primitives and fully specify the initial state of motion (initial kinematic state) of those primitives.
You can set initial positions and velocities for two primitive types:
Translational initial conditions for a prismatic primitive, in terms of linear position and velocity
Rotational initial conditions for a revolute primitive, in terms of angular position and velocity
This block can actuate one, some, or all of the prismatic and revolute primitives of a Joint.
The Joint Initial Condition Actuator applies the initial state along/about the joint axis in the reference coordinate system (CS) specified for that joint primitive in the Joint's dialog. The Joint connects a base and a follower Body. The base-follower sequence determines the sense of the actuation signal.
The output is the connector port you connect to the Joint block whose initial conditions you want to set. You set the initial linear and/or angular positions and velocities in the block's dialog, so there is no input signal.
You cannot actuate a Spherical or spherical primitive with a Joint Initial Condition Actuator.
Caution You cannot simultaneously actuate a joint primitive with a Joint Initial Condition Actuator and with Joint Actuator motion actuation. |
When you build your machine, the geometric configuration of the bodies (the home configuration) implicitly specifies the initial positions/angles of bodies relative to one another and to World. The Ground, Body, and Joint layout specifies only initial coordinates (degrees of freedom or DoFs), not their corresponding velocities. Starting a simulation in this state sets all initial velocities to zero. You can set the full initial kinematic state (the initial configuration), both positions and velocities, of joint primitives by using Joint Initial Condition Actuator blocks.
In a SimMechanics™ model, the DoFs represented by Joints are relative. Suppose you actuate a Joint with initial conditions, and that Joint has other Joints in a sequence connected to it through intermediate Bodies. Then the initial conditions applied to the first Joint change the absolute positions and velocities of the other Joints (as measured in World) because the initial conditions of the other Joints are defined relative to the first.
The one exception to this rule occurs if the actuated Joint is part of a closed loop. SimMechanics simulation cuts one Joint in each closed loop. The initial conditions applied to a Joint indirectly affect the initial conditions of the other connected Joints only up to (but not including) the cut Joint.

The dialog has one active area, Actuation.
The menu choices are available for every primitive in the Joint to which the Joint Initial Condition Actuator is connected. If you connect the Actuator with its dialog open, the primitive list is automatically updated to reflect the connected Joint's primitives. If the Actuator is unconnected, all primitive types are shown, including two that cannot be actuated, spherical (S) and weld (W).
Select this check box if you want to actuate the primitive with initial conditions. The default is not selected.
Displays the name of the primitive within the Joint. Not an active field.
Enter a value for the initial position of the primitive, either prismatic or revolute. The default is 0.
In the pull-down menu, select units for the initial position. The defaults are m (meters) for prismatic primitives and deg (degrees) for revolute primitives.
Enter a value for the initial velocity of the primitive, either prismatic or revolute. The default is 0.
In the pull-down menu, select units for the initial velocity. The defaults are m/s (meters/second) for prismatic primitives and deg/s (degrees/second) for revolute primitives.
Here is a Joint Initial Condition Actuator connected to a Custom Joint, which connects two Bodies:

You must add an Actuator port (connector port) to the Joint block to connect the Joint Initial Condition Actuator to it. The base (B)-follower (F) Body sequence on the two sides of the Joint determines the sense of the Joint Initial Condition Actuator data.
Joint Actuator, Joint Sensor, Joint Stiction Actuator, Mechanical Branching Bar, Prismatic, Revolute
See in the Representing Motion chapter for more details about a machine's state of motion. How SimMechanics™ Software Works explains how SimMechanics simulation initializes a machine.
See Using JICA Blocks for setting general initial conditions (positions and velocities) of DoFs in a machine. Cutting Closed Loops and Verifying Machine Topology discuss how SimMechanics simulation cuts Joints in closed loops.
See Joints.
In Simulink®, see the Signal Routing Library and the Sources Library.
![]() | Joint Actuator | Joint Sensor | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |