SimMechanics Previous page   Next Page
Body Sensor

Measure body motion

Library

Sensors & Actuators

Description

The Body Sensor block detects the position, velocity, and/or acceleration of a body represented by a Body block.

The Body Sensor measures the motion in the reference coordinate system (CS) specified in the block dialog box.

You can measure one, two, or all three of these motion types:

The input is the connector port connected to the Body being sensed. The outport is a set of Simulink signals or one bundled Simulink signal of the position, velocity, and/or acceleration vector(s) and/or the rotation matrix of the body.

A body's orientation rotation matrix R relates vector components measured in the body CS and in the inertial World CS by [R]vb = vs. The column vector vb lists the vector v's three components measured in the body CS. The column vector vs lists the vector v's three components measured in the World CS.

Dialog Box and Parameters

The dialog box has one active area, Measurements.

Measurements

Measuring Body coordinate system
This field is not active. You choose the Body CS at which to measure the motion by connecting it to the Body Sensor.
With respect to coordinate system
In the pull-down menu, choose the coordinate system in which the body motion is measured: either the Local (Body CS) to which the Sensor is connected or the default Absolute (World).
In the Absolute case, the rotation matrix R and the motion vectors have components measured relative to the inertial World CS axes. In the Local case, the same body motion signals are premultiplied by the body's inverse orientation rotation matrix R-1 = RT.

Select the check box(es) for each of the possible measurements you want to make:

Each vector measurement is a row vector in the Simulink output signal. The selected signals are ordered in the same sequence as the dialog box.

In the pull-down menus, choose the units for each of the measurements you want:

Output selected parameters as one signal
Select this check box to convert the output signals into a single bundled signal. The default is selected. If you unselect it, the Body Sensor block will grow as many Simulink outports as there are active signals selected, in the same order top to bottom, as in the dialog box.
If the check box is selected, the Simulink signal out has all the active (selected) signals ordered into a single row vector, in the same order you see in the dialog box. Unselected components are removed from the vector signal.

Example

Here is a Body Sensor connected to a Body:

You must connect the Body Sensor to the Body at one of that Body's attached Body CSs, at the corresponding Body CS Port. The sensor measures the motion of that Body CS.

See Also

Body, Body Actuator, Constraint & Driver Sensor, Joint Sensor, Mechanical Branching Bar

See Representing Body Positions and Orientations for more details on body coordinate system rotations.

See Representing Body Positions and Orientations and Modeling Sensors.

In Simulink, see the Signal Routing Library and the Sinks Library.


Previous page  Body Actuator Body Spring & Damper Next page

Learn more about the latest releases of MathWorks products:

 © 1994-2008 The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS