SimMechanics    
Body

Represent a customizable rigid body

Library

Bodies

Description

The Body block represents a rigid body whose properties you customize. The representation you specify includes:

A rigid body is defined in space by the position of its CG (or center of mass) and its orientation in some CS.

In SimMechanics, you enter the body's properties in two classes, the geometric properties and the mass properties:

Default Initial State of a Body

These two sets of properties determine a body's initial position and orientation:

The initial conditions of a machine can be changed with Joint Initial Condition Actuator blocks before starting a simulation. If you do not change the initial state of a Body before simulation, SimMechanics sets its initial position/orientation to its Body dialog box entries. SimMechanics also sets the Body's initial linear/angular velocities to zero in this case.

Dialog Box and Parameters

The dialog box has two active areas, Mass Properties and Body Coordinate Systems.

Mass Properties

Mass
Enter the mass of the body in the first field and choose units in the pull-down menu to the right. The mass must be a positive, real number or MATLAB equivalent. The defaults are 1 and kg (kilograms).
Inertia tensor
Enter the inertia tensor (with respect to the Body CG CS axes) in the first field and choose units in the pull-down menu to the right. The tensor must be a 3-by-3 real, symmetric matrix. The default tensor is eye(3), the MATLAB 3-by-3 identity matrix. A zero tensor zeros(3,3) defines a point mass. The units default is kg-m2 (kilograms-meters2).

Body Coordinate Systems

Configuring a Body Coordinate System

You set up Body CSs in the Body coordinate systems area:

Configuring the Position fields

The Position fields for each Body CS specify the position of that CS's origin as a translation vector:

Highlight each Body CS to configure it.

Origin position vector [x y z]
Enter the translation vector that defines the position of the Body CS's origin.
The special entry for the CG CS origin places the entire body.
Units
Choose linear units for the translation vector. The default is m (meters).
Translated from the origin of
In the pull-down menu, choose the other, pre-existing CS in your machine that defines the starting point for the translation vector. The choices are WORLD, ADJOINING, and the other Body CSs on this Body. The ending point of the translation vector is this Body CS's origin.
For the CG CS, the default starting-point CS is WORLD. For the additional Body CSs (CS1, CS2, etc.), the default starting point CS is this Body's CG.
Components in the axes of
In the pull-down menu, choose the CS whose axes define the orientation of the translation vector's components. The choices are WORLD, ADJOINING, and the other Body CSs on this Body. The translation vector's components are projected along the axes of the CS chosen in this column.
For the CG CS, the default orientation CS is WORLD. For the additional Body CSs (CS1, CS2, etc.), the default orientation CS is this Body's CG.

Configuring the Orientation Fields

The Orientation fields for each Body CS specify the orientation of that CS's triad of axes as a rotation:

Highlight each Body CS to configure it.

Orientation vector
Enter the components of the rotation that defines the orientation of the Body CS's axes. The geometric meaning of these components is determined by the Specified using convention column.
The special entry for the CG CS orients the CG CS axes. Together with the Inertia tensor entry in Mass properties, the CG CS axes orient the whole body with respect to another CS in your machine.
Units
Choose angular units for the rotation, degrees or radians. The default is deg (degrees).
Relative to coordinate system
In the pull-down menu, choose the other, pre-existing CS in your machine that defines the starting orientation for the rotation. The choices are WORLD, ADJOINING, and the other Body CSs on this Body.
Specified using convention
In the pull-down menu, choose the representation type for the rotation:

Rotation Type
Orientation vector components
Quaternion
[nx*sin(/2) ny*sin(/2) nz*sin(/2) cos(/2)]
3x3Transform
3-by-3 orthogonal rotation matrix R
Euler
Rotation angles about: [X-axis Y-axis Z-axis]

Rotation Conventions

There are three generic conventions for representing rotations:

Managing the Body Coordinate Systems List

The Body coordinate system controls (see the following Body coordinate systems controls figure) allow you to add, duplicate, reorder, and delete Body CSs on a Body block:

Managing Body CS Ports on a Body Block

To connect a Joint, Constraint/Driver, Actuator, or Sensor block to a Body block requires an existing and configured Body CS in the Body to anchor the other block to:

Show port
Select this check box for any Body CS to create a corresponding Body CS Port on the side of the Body block. The Body CS on that line in the Body CS list is now accessible for connection to other blocks.
Unselect this check box to remove the Body CS Port corresponding to that Body CS on that line in the list.
The defaults are: unselected for CG, selected for CS1 and CS2.
To apply your choices to the displayed Body block, click Apply.
Port side
From the pull-down menu, choose which side of the Body block you want the Body CS Port for that Body CS to be placed on, Left or Right.
The defaults are Left for CG and CS1 and Right for CS2.
To apply your choices to the displayed Body block, click Apply.

Body coordinate systems controls

See Also

Body Actuator, Body Sensor, Body Sensor, Ground

See Modeling Bodies, Creating Body CS Ports, and Choosing Visualization Options in SimMechanics for more on setting up Bodies in machines.

See Modeling Sensors for setting general initial conditions (positions and velocities) of DoFs in a machine.


  Bearing Body Actuator