SimMechanics    
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.

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 Actuator is connected or the default Absolute (World).

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.

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.

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, 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.

See Also

Body, Body Actuator, Constraint & Driver Sensor, Joint Sensor

See Creating Bodies and Grounds.

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


  Body Actuator Bushing