Sensor to measure the inertial properties of body groups or mechanisms
Simscape / Multibody / Body Elements

Use the Inertia Sensor block to measure the inertial properties for collections of body elements in your Simscape Multibody model. Parameters that the Inertia Sensor block can measure include:
Mass
Center of mass
Inertia matrix
Centered inertia matrix
Principal inertia matrix
Orientation of principal inertia frame
The Inertia Sensor block connects to a frame in your Simscape Multibody model and uses the frame to determine which body group or mechanism is measured.
A body group is the set of all body elements that are connected to each other directly or through rigid transforms. The body group may include solid blocks, inertia blocks, variable mass blocks, or flexible body blocks. By default, two body elements that are connected by a weld joint are not considered to be a part of the same body group, though you may choose to group these bodies with the Span Weld Joints property.
A mechanism is the set of all connected body elements within the model. With mechanisms, you can choose to exclude grounded bodies with the Exclude Grounded Bodies property. A grounded body is any rigid body that is rigidly connected to a World Frame.
S — Sensor portSensor port to attach to a frame in the model. Use this port to determine which body group or mechanism is measured.
M — Custom measurement frame portWhen Custom is selected, a second port, M, appears on
the Inertia Sensor block. The Inertia Sensor block measures inertial properties
relative to the frame connected to the M port.
To enable this port, set the Measurement Frame parameter to
Custom.
m — MassTotal mass for the collection of body elements.
To enable this port, select the Mass check box.
com — Center of MassThe center of mass for the collection of body elements.
To enable this port, select the Center of Mass check box.
I — Inertia MatrixThe inertia matrix for the collection of body elements.
To enable this port, select the Inertia Matrix check box.
Ic — Centered Inertia MatrixThe centered inertia matrix for the collection of body elements.
To enable this port, select the Centered Inertia Matrix check box.
Ip — Principal Inertia MatrixThe principal inertia matrix for the collection of body elements.
To enable this port, select the Principal Inertia Matrix check box.
R — Rotation MatrixThe rotation matrix for orientation of principal inertia frame relative to measurement frame.
To enable this port, select the Rotation Matrix check box.
Sensor Extent — Determine the extent that the Inertia Sensor block measuresBody Group (default) | MechanismExtent that the Inertia Sensor block measures, defined as Body Group or Mechanism.
Body GroupWhen Body Group is selected, the
Inertia Sensor block measures inertial
properties for the collection of body elements that are connected to each other
directly or through rigid transforms. This includes solid, inertia, variable
mass, or flexible bodies.
MechanismWhen Mechanism is selected, the
Inertia Sensor block measures inertial
properties for all connected body elements within the model.
Sensor Extent: Span Weld Joints — Include bodies connected by weld joints in a body groupcleared (default) | checkedIf selected, this option causes body groups to include body elements that are connected via a weld joint.
To enable this option, set Sensor Extent to Body
Group.
Sensor Extent: Exclude Grounded Bodies — Do not measure inertial properties of grounded bodiescleared (default) | checkedIf selected, this option causes the Inertia Sensor block to measure inertial properties for the collection of body elements connected to the same mechanism as the Inertia Sensor block excluding any grounded bodies.
To enable this option, set Sensor Extent to
Mechanism.
Measurement Frame — Determine the frame that the Inertia Sensor block uses for measurementsAttached (default) | World | Custom
AttachedWhen Attached is selected, the
Inertia Sensor block measures inertial
properties relative to the same frame that is connected to the S port.
WorldWhen World is selected, the
Inertia Sensor block measures inertial
properties relative to the World Frame.
CustomWhen Custom is selected, the M port is exposed.
The Inertia Sensor block measures inertial properties relative to the frame
connected to the M port.
Mass — Total mass of measured bodiescleared (default) | checkedSelect the Mass check box to measure the mass of the collection of body elements.
Center of Mass — Center of mass coordinatescleared (default) | checkedSelect the Center of Mass check box to measure the center of mass of the collection of body elements, output as a 3-by-1 vector relative to the measurement frame. If the mass of the measured body group or mechanism is zero, the center of mass is undefined and a runtime error occurs.
Inertia Matrix — Measurement of the inertia tensorcleared (default) | checkedSelect the Inertia Matrix check box to measure the inertia tensor of the collection of body elements, output as a 3-by-3 matrix relative to the measurement frame.
Centered Inertia Matrix — Measurement of the inertia tensor relative to the centered framecleared (default) | checkedSelect the Centered Inertia Matrix check box to measure the inertia tensor of the collection of body elements, output as a 3-by-3 matrix relative to the centered frame. The centered frame is a frame whose origin coincides with the center of mass and whose axes are aligned with those of the measurement frame. If the mass of the measured body group or mechanism is zero, the centered inertia matrix is undefined and a runtime error occurs.
Principal Inertia Matrix — Measurement of the inertia tensor with respect to the principal inertia framecleared (default) | checkedSelect the Principal Inertia Matrix check box to measure the inertia tensor of the collection of body elements, output as a 3-by-3 matrix with respect to the principal inertia frame. The principal inertia frame is a frame with an origin that coincides with the center of mass and axes that are aligned with the principal axes of inertia. If the mass of the measured body group or mechanism is zero, the principal inertia matrix is undefined and a runtime error occurs.
Rotation Matrix — Orientation of the principal inertia framecleared (default) | checkedSelect the Rotation Matrix check box to measure the orientation of the principal axes of inertia with respect to the measurement frame as a 3-by-3 matrix. If the mass of the measured body group or mechanism is zero, the rotation matrix is undefined and a runtime error occurs.
Graphic: Type — Sensor visualization settingPrincipal Inertia Frame (default) | Equivalent Inertia Ellipsoid | NoneDisplay of the inertial properties for the sensed collection of body elements, specified as Principal Inertia Frame, Equivalent Inertia Ellipsoid, or None.
Principal Inertia FrameWhen Principal Inertia Frame is selected, the
inertial properties are shown as an axes triad in the solid object.
Equivalent Inertia EllipsoidWhen Equivalent Inertia Ellipsoid is selected,
the inertial properties are shown as an ellipsoid that has the same mass,
moments, and products of inertia as the group of bodies being sensed.
NoneWhen None is selected, the inertial properties
are not displayed.
Graphic: Size — Display size for the principal inertia frame20 pixels (default) | positive scalarChoose the display size for the principal inertia frame.
To enable this option, set Graphic Type to
Principal Inertia Frame.
Visual Properties — Parameterizations for color and opacitySimple (default) | AdvancedParameterizations for specifying visual properties. Select
Simple to specify diffuse color and
opacity. Select Advanced to specify more visual
properties, such as Specular Color, Ambient
Color, Emissive Color, and
Shininess.
To enable this parameter, set Type to From
Geometry or
Marker.
Color — True color as [R,G,B] vector on 0–1 scale[0.5 0.5 0.5] (default) | three-element vector with values constrained to 0–1RGB color vector with red (R), green (G), and blue (B) color amounts specified on a
0–1 scale. A color picker provides an alternative interactive means of specifying a
color. If you change the Visual Properties setting to
Advanced, the color specified in this parameter becomes
the Diffuse Color vector.
To enable this parameter, set :
Type to Marker.
Visual Properties to
Simple.
Opacity — Graphic opacityGraphic opacity, specified as a scalar in the range of 0 to 1. A scalar of 0 corresponds to completely transparent, and a scalar of 1 corresponds to completely opaque.
To enable this parameter, set:
Type to Marker
Visual Properties to
Simple
Diffuse Color — True color as [R,G,B,A] vector on 0–1 scale[0.5 0.5 0.5] (default) | three- or four-element vector with values constrained to 0–1True color under direct white light specified as an [R,G,B] or [R,G,B,A] vector on a
0–1 scale. An optional fourth element specifies the color opacity also on a scale of
0–1. Omitting the opacity element is equivalent to specifying a value of
1.
To enable this parameter, set :
Type to Marker.
Visual Properties to
Advanced.
Specular Color — Highlight colorColor of specular highlights, specified as an [R,G,B] or [R,G,B,A] vector on a 0–1 scale. The optional fourth element specifies the color opacity. Omitting the opacity element is equivalent to specifying a value of 1.
To enable this parameter, set:
Type to From Geometry or
Marker
Visual Properties to
Advanced
Ambient Color — Shadow colorColor of shadow areas in diffuse ambient light, specified as an [R,G,B] or [R,G,B,A] vector on a 0–1 scale. The optional fourth element specifies the color opacity. Omitting the opacity element is equivalent to specifying a value of 1.
To enable this parameter, set:
Type to From Geometry or
Marker
Visual Properties to
Advanced
Emissive Color — Self-illumination colorGraphic color due to self illumination, specified as an [R,G,B] or [R,G,B,A] vector on a 0–1 scale. The optional fourth element (A) specifies the color opacity. Omitting the opacity element is equivalent to specifying a value of 1.
To enable this parameter, set:
Type to From Geometry or
Marker
Visual Properties to
Advanced
Shininess — Highlight sharpnessSharpness of specular light reflections, specified as a scalar number on a 0–128 scale. Increase the shininess value for smaller but sharper highlights. Decrease the value for larger but smoother highlights.
To enable this parameter, set:
Type to From Geometry or
Marker
Visual Properties to
Advanced