SimMechanics | ![]() ![]() |
Library
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
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:
representing rotational orientation and satisfying RTR = RRT = 1. The components are output column-wise as a 9-component row vector: (R11, R21, R31, R12, ... ).
Absolute (
World), the Rotation matrix measures the body's rotational orientation with respect to its initial orientation. If you choose the With respect to coordinate system above as Local (Body CS)
, the Rotation matrix returns the 3-by-3 identity matrix.
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:
m
(meters), m/s
(meters/second), m/s
2 (meters/second2), and N
(Newtons), respectively, for Position, Velocity, and Acceleration.
deg/s
(degrees/second) and deg/s
2 (degrees/second2), respectively, for Angular velocity and Angular acceleration. The Rotation matrix is dimensionless.
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 | ![]() |