SimMechanics    

Modeling Finite Rigid Bodies

The SimMechanics Body block enables you to model rigid bodies of finite mass and extent. A body is rigid if its internal parts cannot move with respect to one another.

About Body Blocks

A Body block allows you to specify the following attributes of a rigid body.

Mass Properties.   These include the body's mass, which determines its response to translational forces, and its inertia tensor, which determines its response to rotational torques.

Body Coordinate Systems.   By default a Body block defines three local coordinate systems, one associated with a body's center of gravity, labeled CG, and two others, labeled CS1 and CS2, respectively, associated with two other points on the body that you can specify. You can create additional body coordinate systems or delete them as necessary.

A Body block's dialog box allows you to specify a Body CS's origin (see Setting a Body CS's Position) and orientation (see Setting a Body CS's Orientation). The origin and orientation of a body's CG CS specify the body's initial location and orientation. The origins of the other body coordinate systems specify the initial locations of other points on the body.

SimMechanics allows flexibility in specifying the origins and orientations of a body's coordinate systems. You can specify the origin and orientation of a body CS relative to

This simplifies creation and maintenance of models. The only limitation is that you must specify the origin and location of at least one of a model's body coordinate systems relative to the World CS.

Connector Ports.   Any Body CS can display a Body CS Port. A Body CS Port allows you to attach Joints, Actuators, and Sensors to a Body. By default, a Body's CS1 and CS2 coordinate systems each display a Body CS port. You can display a port for any other Body coordinate system as well, including a Body's CG CS.

Creating a Body Block

To create a Body block:

  1. Drag a Body block icon from the SimMechanics Bodies library and drop it into your model window.
  2. Open the Body block's dialog box.
  3. Enter the mass of the body you are modeling in the Mass field.
  4. Select the units of mass from the adjacent units list.
  5. Enter a 3-by-3 matrix representing the body's inertia tensor relative to its center of gravity coordinate system (CG CS) origin and axes in the Inertia field (see Determining Inertia Tensors for Common Shapes).
  6. Enter the initial positions of the body's CG and coordinate systems in the Position pane.
  7. Enter the initial orientation of the body's CG and coordinate systems in the Orientation pane.
  8. Click OK or Apply.

Determining Inertia Tensors for Common Shapes

The following table enables you to determine the inertia tensors for some common shapes. For each shape of mass m, the table lists the shape's principle moments of inertia, I1, I2, and I3, along the x-, y-, and z-axes of the shape's CG coordinate system.

Shape
I1
I2
I3
Thin rod of length L


0
Sphere of radius R



Cylinder of radius R and height h aligned along the CG CS z-axis



Rectangular parallelopiped of sides a, b, and c.



Cone of height h and base radius R



Ellipsoid of semiaxes a, b, and c



The corresponding inertia tensor for the shape is the following 3-by-3 matrix:

Working with Body Coordinate Systems

Every body in SimMechanics has body coordinate systems (CSs) attached to it. The location of a body CS is the origin of that CS. The CS's rectangular x-y-z coordinate axes are rotated at some orientation. You set up body CS origins and orientations before running your model. But once the bodies start to move, the origins and orientations of a body's CSs remain fixed in the body. The elements of a body's inertia tensor also remain fixed in the body.

The sections Managing Body Coordinate Systems and Creating Body CS Ports explain how to create custom body coordinate systems and Body CS ports or delete existing ports.

Setting a Body CS's Position

The Position pane of a Body block's dialog box allows you to specify the position of any of a body's local coordinate systems.

The Translated from origin of and Components in axes of lists in the pane together specify which other of your model's coordinate systems you use as reference points and orientations to set up the coordinate systems of the body you are configuring.

To specify the position of a Body CS:

  1. Open the Body block's dialog box.
  1. The dialog box's Position pane lists the body's local coordinate systems in a table.

    Each row specifies the position of the coordinate system specified in the Name column.

  1. Select the units in which you want to specify the origin of the Body CS from the CS's Units list.
  2. Specify the reference coordinate systems for the Body CS, i.e., the coordinate system relative to which you want to measure the Body CS origin and the orientation of the Body CS's coordinate axes. The choices are World, the adjoining CS, and other Body CSs on the same Body.

  1. You do this by selecting the origin and orientation of the specification CS from the Body CS's Translated from origin of and Components in axes of lists, respectively. For example, suppose that you want to specify the position of CS2 relative to another coordinate system, whose origin is at the origin of CS1 but whose axes run parallel to those of the World CS. Then you would select CS1 from the Translated from origin of list of CS2 and WORLD from the Components in axes of list of CS2.

  1. Enter a vector specifying the location of the Body CS in the Origin position vector [x y z] field of the CS.
  1. The components of the vector must be in the units that you selected and relative to the coordinate system that you selected. For example, suppose that you had selected m as the units for specifying CS2's origin and CS1 and WORLD as the origin and orientation of the position specification CS for CS2. Now suppose that you want to specify the location of CS2 as 1 meter to the right of CS1 along the World x-axis. Then you would enter [1 0 0] as CS2's position vector.

  1. Click Apply to accept the position setting or OK to accept the setting and dismiss the dialog box.

Setting a Body CS's Orientation

The Orientation pane of a Body block's dialog box allows you to specify the orientation of any of a body's local coordinate systems.

To specify the orientation of a Body CS:

  1. Open the Body block's dialog box.
  2. Select the dialog box's Orientation pane.

  3. Select the units (degrees or radians) in which you want to specify the orientation of the CS from the CS's Units pane.
  4. Select the coordinate system relative to which you want to specify the orientation of the Body CS from the Body CS's Relative to coordinate system list. The choices are World, the adjoining CS, and other Body CSs on the same Body.
  5. Select the convention you want to use to specify the orientation of the Body CS from the CS's Specified using convention list.
  6. Enter a vector that specifies the orientation of the Body CS relative to the selected specification CS, according to the selected specification convention.
  7. Click Apply to accept the position setting or OK to accept the setting and dismiss the dialog box.

Managing Body Coordinate Systems

You will often need to modify the default body coordinate systems of a Body block. You might want to connect a Body to more than two Joints, in which case you need not only more Body CSs, but their Body CS ports as well. Connecting Actuators and Sensors to Bodies requires a Body CS and Body CS port for each connection.

The Body coordinate systems panel of a Body block's dialog box contains a row of buttons that allow you to add, delete, duplicate, and reorder a Body's local coordinate systems.

To use these buttons, select a Body CS in the CS table and select

Select Add to add a new CS.

Creating Body CS Ports

To add or delete a port from a Body block's icon, open the block's dialog box and select or unselect the CS's Show port check box in the dialog box's Body CS table. Click OK or Apply to confirm the change.


  Modeling Bodies Modeling Joints