SimMechanics Previous page   Next Page

Observing a Translating, Rotating Rigid Body

You can obtain the special case essential for rigid body motion by letting O be the CG CS of an extended rigid body (the origin of O at the CG itself) and letting b be a point somewhere in the same body. Since a moving body in general accelerates both translationally and rotationally, O is noninertial.

The rotation matrix R now describes the rotational motion of the body in terms of the rotation of the CG CS axes with respect to the World axes. Furthermore, b is now fixed in the body itself and does not move in O. All of its motion as seen by World is due to R and C, and dbO/dt = 0.

The Angular Velocity of a Body from Its Rotation Matrix

Continue to identify O with the body CG CS and b as a point fixed in the body. The vector components of b are observed by World as bWorld and by the CG CS as bBody. In the body, the point is immobile: dbBody/dt = 0. Its velocity observed by World is composed of the translational and rotational motion of the entire rigid body.

Because RRT = I, (dR/dt)*RT + R*(dRT/dt) = 0. Insert RTR = I to the left of bBody and define an antisymmetric matrix = +(dR/dt)*RT = -R*(dRT/dt). Its components are ik = +j ijkj.

where is the body's angular velocity in the World CS.

The motion of bBody decomposes into the motion of the body's CG plus the angular rotation of bBody relative to the CG, all measured in World.

The permutation symbol ijk is +1 if ijk is an even permutation (123 or any cyclic permutation thereof) and -1 if ijk is an odd permutation (321 or any cyclic permutation thereof). It changes sign upon switching any two indices and vanishes if any two indices are equal. The components of the cross (vector) product c = a X b of two vectors a and b are ci = jk ijkajbk.

How SimMechanics Represents Body Rotations

You state a body's orientation by specifying the tilt of its center of gravity coordinate system (CG CS) axes relative to some other set of axes, either the CG CS axes of another body or the World CS axes. Zero tilt is represented by "no rotation" or the rotational identity.

A general rotation of a body in three dimensions has three independent degrees of freedom. There are many ways to represent these degrees of freedom. SimMechanics implements the following forms in the Body and related Body Actuator, Body Sensor, and RotationMatrix2VR blocks.

The Axis-Angle Form

The angle-axis form of a rotation is the most basic representation. Specify a rotation axis (unit vector) n, then rotate by the right-hand rule about that axis by some angle .

The axis-angle form is usually written as a 4-vector: [nx ny nz ]. Of the four numbers, three are independent, because n*n = nx2 + ny2 + nz2 = 1. That is, n specifies only a direction, not a length.

To describe continuous rotation in time, you treat n and as functions of time.

The Rotation Matrix Form

The axis-angle form defines the rotation matrix R written in the exponential form R = exp( n*J), where the Jk are real, antisymmetric matrices, and n*J = nxJ1 + ny J2 + nz J3. The rotation matrix R is orthogonal: RRT = RTR = I.

The J matrices are related to the antisymmetric permutation symbol ijk.

The formal exponential for R is reduced to a closed form by the Rodrigues identity:

where I is the identity matrix and n*J is given by

The inverse of R is identical to its transpose RT. But you can also obtain the inverse by replacing with - or by reversing the direction of n.

To describe continuous rotation in time, you treat n and as functions of time.

The Euler Angle Form

An alternative representation for R is to rotate, in succession, about three independent axes, by three independent Euler angles. The full rotation R relative to World composes by multiplying the matrices successively on the left:

The full rotation R relative to the body composes by multiplying the matrices successively on the right:

One Euler angle convention is to rotate about one body coordinate axis (which rotates the other two); then rotate about a second body coordinate axis (rotated from its original direction); and lastly, rotate about the first body coordinate axis again (which axis has been rotated into a new direction by the second rotation). The rotation axis sequence Z-X-Z is the most common, using , , as the first, second, and third angles, respectively: R = R1()*R2()*R3().

A two-dimensional rotation about a fixed axis requires one angle. For example, rotating the x- and y-axes about the z-axis by is represented by

To describe continuous rotation in time, you treat the Euler angles as functions of time.

The Quaternion Form

A quaternion represents a three-dimensional rotation as a four-component row vector of unit length:

with q*q = qv*qv + qs2 = 1. The vector n = (nx,ny,nz) is a three-component unit vector, n*n = 1, and represents the axis of rotation. The rotation angle about that axis is . To describe continuous rotation in time, you treat n and as functions of time.

You can construct the equivalent rotation matrix R from q.

The term qvqvT is the outer product of qv with itself, the 3-by-3 matrix of qv components multiplied by each other.

Kinematics and the Machine State

Kinematics is the description of a machine's motion without regard to forces, torques, and the mass properties of bodies. Since accelerations are proportional to forces and torques, you only need the positions and their first derivatives (velocities) to integrate a machine's motion, if you know the mass properties of the bodies and the forces and torques applied to them.

The state of motion of a mechanical system is the set of the instantaneous positions and orientations of all its bodies and their first derivatives (linear and angular velocities). In SimMechanics, body positions/orientations are relative: one body's state is specified relative to its neighbors. The absolute positions and velocities of the bodies' states are determined via the machine's connection to one or more grounds. These grounds are at rest in World, although they do not have to coincide with the World origin.

The relative position and orientation of a body with respect to a neighbor make up a degree of freedom (DoF). The fundamental DoFs are translational (one body sliding relative to another along a prismatic axis) and rotational (one body rotating relative to another about a revolute axis, or one body pivoting relative to another about a spherical pivot point).

SimMechanics represents DoFs by Joint blocks connected between Body blocks. Bodies without Joints have no DoFs in SimMechanics and acquire DoFs only by having Joints connected to them. SimMechanics represents the machine state by the positions (prismatics), angles (revolutes or sphericals), and linear/angular velocities of all Joints.

Refer to Counting Degrees of Freedom in the Modeling Mechanical Systems chapter and the command reference for mech_stateVectorMgr for identification of DoFs in SimMechanics and elaboration of the machine state.


Previous page  Representing Body Positions and Orientations Summary of Technical Vocabulary Next page

Product Listing
View the latest versions of MathWorks products:
 © 1994-2008 The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS