Package Modelica.​Mechanics.​MultiBody.​Sensors
Sensors to measure variables

Information

Package Sensors contains ideal measurement components to determine absolute and relative kinematic quantities, as well as cut-forces, cut-torques and power. All measured quantities can be provided in every desired coordinate system.

Extends from Modelica.​Icons.​SensorsPackage (Icon for packages containing sensors).

Package Contents

NameDescription
AbsoluteAnglesMeasure absolute angles between frame connector and the world frame
AbsoluteAngularVelocityMeasure absolute angular velocity of frame connector
AbsolutePositionMeasure absolute position vector of the origin of a frame connector
AbsoluteSensorMeasure absolute kinematic quantities of frame connector
AbsoluteVelocityMeasure absolute velocity vector of origin of frame connector
CutForceMeasure cut force vector
CutForceAndTorqueMeasure cut force and cut torque vector
CutTorqueMeasure cut torque vector
DistanceMeasure the distance between the origins of two frame connectors
InternalInternal package, should not be used by user
PowerMeasure power flowing from frame_a to frame_b
RelativeAnglesMeasure relative angles between two frame connectors
RelativeAngularVelocityMeasure relative angular velocity between two frame connectors
RelativePositionMeasure relative position vector between the origins of two frame connectors
RelativeSensorMeasure relative kinematic quantities between two frame connectors
RelativeVelocityMeasure relative velocity vector between the origins of two frame connectors
TansformAbsoluteVectorObsolete model will be removed in future versions, use TransformAbsoluteVector instead!
TansformRelativeVectorObsolete model will be removed in future versions, use TransformRelativeVector instead!
TransformAbsoluteVectorTransform absolute vector in to another frame
TransformRelativeVectorTransform relative vector in to another frame

Model Modelica.​Mechanics.​MultiBody.​Sensors.​AbsoluteSensor
Measure absolute kinematic quantities of frame connector

Information

Absolute kinematic quantities of frame_a are determined and provided at the conditional output signal connectors. For example, if parameter "get_r = true", the connector "r" is enabled and contains the absolute vector from the world frame to the origin of frame_a. The following quantities can be provided as output signals:

  1. Absolute position vector (= r)
  2. Absolute velocity vector (= v)
  3. Absolute acceleration vector (= a)
  4. Three angles to rotate world frame into frame_a (= angles)
  5. Absolute angular velocity vector (= w)
  6. Absolute angular acceleration vector (= z)

Via parameter resolveInFrame it is defined, in which frame a vector is resolved:

resolveInFrame =
Types.ResolveInFrameA.
Meaning
world Resolve vectors in world frame
frame_a Resolve vectors in frame_a
frame_resolve Resolve vectors in frame_resolve

If resolveInFrame = Types.ResolveInFrameA.frame_resolve, the conditional connector "frame_resolve" is enabled and the vectors are resolved in the frame, to which frame_resolve is connected. Note, if this connector is enabled, it must be connected.

In the following figure the animation of an AbsoluteSensor component is shown. The light blue coordinate system is frame_a and the yellow arrow is the animated sensor.

Velocity, acceleration, angular velocity and angular acceleration are determined by differentiating them in the world frame and then transforming them in to the frame defined by resolveInFrame.

For example, if resolveInFrame = Types.ResolveInFrameA.frame_a, then

   v0 = der(frame_a.r0);
   v  = resolve2(frame_a.R, v0);

is returned, i.e., the derivative of the absolute distance from the world frame to the origin of frame_a, resolved in frame_a.

The cut-force and the cut-torque in frame_resolve are always zero, whether frame_resolve is connected or not.

If get_angles = true, the 3 angles to rotate the world frame into frame_a along the axes defined by parameter sequence are returned. For example, if sequence = {3,1,2} then the world frame is rotated around angles[1] along the z-axis, afterwards it is rotated around angles[2] along the x-axis, and finally it is rotated around angles[3] along the y-axis and is then identical to frame_a. The 3 angles are returned in the range

    -p <= angles[i] <= p

There are two solutions for "angles[1]" in this range. Via parameter guessAngle1 (default = 0) the returned solution is selected such that |angles[1] - guessAngle1| is minimal. The absolute transformation matrix of frame_a may be in a singular configuration with respect to "sequence", i.e., there is an infinite number of angle values leading to the same absolute transformation matrix. In this case, the returned solution is selected by setting angles[1] = guessAngle1. Then angles[2] and angles[3] can be uniquely determined in the above range.

The parameter sequence has the restriction that only values 1,2,3 can be used and that sequence[1] ≠ sequence[2] and sequence[2] ≠ sequence[3]. Often used values are:

  sequence = {1,2,3}  // Cardan or Tait-Bryan angle sequence
           = {3,1,3}  // Euler angle sequence
           = {3,2,1}

Extends from Modelica.​Mechanics.​MultiBody.​Sensors.​Internal.​PartialAbsoluteSensor (Base class for absolute sensor models).

Parameters

TypeNameDefaultDescription
Booleananimationtrue= true, if animation shall be enabled (show arrow)
ResolveInFrameAresolveInFrameModelica.​Mechanics.​MultiBody.​Types.​ResolveInFrameA.​frame_aFrame in which vectors are resolved (world, frame_a, or frame_resolve)
Booleanget_rfalse= true, to measure the absolute position vector of the origin of frame_a
Booleanget_vfalse= true, to measure the absolute velocity of the origin of frame_a
Booleanget_afalse= true, to measure the absolute acceleration of the origin of frame_a
Booleanget_wfalse= true, to measure the absolute angular velocity of frame_a
Booleanget_zfalse= true, to measure the absolute angular acceleration of frame_a
Booleanget_anglesfalse= true, to measure the 3 rotation angles
RotationSequencesequence[3]{1, 2, 3}If get_angles=true: Angles are returned to rotate world frame around axes sequence[1], sequence[2] and finally sequence[3] into frame_a
AngleguessAngle10If get_angles=true: Select angles[1] such that abs(angles[1] - guessAngle1) is a minimum

Inputs

TypeNameDefaultDescription
DiameterarrowDiameterworld.​defaultArrowDiameterDiameter of absolute arrow from world frame to frame_a
ColorarrowColor[3]Modelica.​Mechanics.​MultiBody.​Types.​Defaults.​SensorColorColor of absolute arrow from world frame to frame_b
SpecularCoefficientspecularCoefficientworld.​defaultSpecularCoefficientReflection of ambient light (= 0: light is completely absorbed)

Connectors

TypeNameDescription
output RealOutputr[3]Absolute position vector frame_a.r_0 resolved in frame defined by resolveInFrame
output RealOutputv[3]Absolute velocity vector
output RealOutputa[3]Absolute acceleration vector
output RealOutputangles[3]Angles to rotate world frame into frame_a via 'sequence'
output RealOutputw[3]Absolute angular velocity vector
output RealOutputz[3]Absolute angular acceleration vector
Frame_aframe_aCoordinate system a of which the absolute kinematic quantities are measured
Frame_resolveframe_resolveIf resolveInFrame = Types.ResolveInFrameA.frame_resolve, the output signals are resolved in this frame

Model Modelica.​Mechanics.​MultiBody.​Sensors.​RelativeSensor
Measure relative kinematic quantities between two frame connectors

Information

Relative kinematic quantities between frame_a and frame_b are determined and provided at the conditional output signal connectors. For example, if parameter "get_r_rel = true", the connector "r_rel" is enabled and contains the relative vector from frame_a to frame_b. The following quantities can be provided as output signals:

  1. Relative position vector (= r_rel)
  2. Relative velocity vector (= v_rel)
  3. Relative acceleration vector (= a_rel)
  4. Three angles to rotate frame_a into frame_b (= angles)
  5. Relative angular velocity vector (= w_rel)
  6. Relative angular acceleration vector (= z_rel)

Via parameter resolveInFrame it is defined, in which frame a vector is resolved (before differentiation):

resolveInFrame =
Types.ResolveInFrameAB.
Meaning
world Resolve vectors in world frame
frame_a Resolve vectors in frame_a
frame_b Resolve vectors in frame_b
frame_resolve Resolve vectors in frame_resolve

If resolveInFrame = Types.ResolveInFrameAB.frame_resolve, the conditional connector "frame_resolve" is enabled and the vectors are resolved in the frame, to which frame_resolve is connected. Note, if this connector is enabled, it must be connected.

In the following figure the animation of a RelativeSensor component is shown. The light blue coordinate system is frame_a, the dark blue coordinate system is frame_b, and the yellow arrow is the animated sensor.

Note, derivatives of relative kinematic quantities are always performed with respect to the frame, in which the vector to be differentiated is resolved. After differentiation, it is possible via parameter resolveInFrameAfterDifferentiation (in the "Advanced" menu) to resolve the differentiated vector in another frame.

For example, if resolveInFrame = Types.ResolveInFrameAB.frame_b, then

   r_rel = resolve2(frame_b.R, frame_b.r_0 - frame_a.r0);
   v_rel = der(r_rel);

is returned (r_rel = resolve2(frame_b.R, frame_b.r_0 - frame_a.r0)), i.e., the derivative of the relative distance from frame_a to frame_b, resolved in frame_b. If resolveInFrameAfterDifferentiation = Types.ResolveInFrameAB.world, then v_rel is additionally transformed to:

   v_rel = resolve1(frame_b.R, der(r_rel))

The cut-force and the cut-torque in frame_resolve are always zero, whether frame_resolve is connected or not.

If get_angles = true, the 3 angles to rotate frame_a into frame_b along the axes defined by parameter sequence are returned. For example, if sequence = {3,1,2} then frame_a is rotated around angles[1] along the z-axis, afterwards it is rotated around angles[2] along the x-axis, and finally it is rotated around angles[3] along the y-axis and is then identical to frame_b. The 3 angles are returned in the range

    -p <= angles[i] <= p

There are two solutions for "angles[1]" in this range. Via parameter guessAngle1 (default = 0) the returned solution is selected such that |angles[1] - guessAngle1| is minimal. The relative transformation matrix between frame_a and frame_b may be in a singular configuration with respect to "sequence", i.e., there is an infinite number of angle values leading to the same relative transformation matrix. In this case, the returned solution is selected by setting angles[1] = guessAngle1. Then angles[2] and angles[3] can be uniquely determined in the above range.

The parameter sequence has the restriction that only values 1,2,3 can be used and that sequence[1] ≠ sequence[2] and sequence[2] ≠ sequence[3]. Often used values are:

  sequence = {1,2,3}  // Cardan or Tait-Bryan angle sequence
           = {3,1,3}  // Euler angle sequence
           = {3,2,1}

Extends from Modelica.​Mechanics.​MultiBody.​Sensors.​Internal.​PartialRelativeSensor (Base class for relative sensor models).

Parameters

TypeNameDefaultDescription
Booleananimationtrue= true, if animation shall be enabled (show arrow)
ResolveInFrameABresolveInFrameModelica.​Mechanics.​MultiBody.​Types.​ResolveInFrameAB.​frame_aFrame in which vectors are resolved before differentiation (world, frame_a, frame_b, or frame_resolve)
Booleanget_r_relfalse= true, to measure the relative position vector from the origin of frame_a to frame_b
Booleanget_v_relfalse= true, to measure the relative velocity of the origin of frame_b with respect to frame_a
Booleanget_a_relfalse= true, to measure the relative acceleration of the origin of frame_b with respect to frame_a
Booleanget_w_relfalse= true, to measure the relative angular velocity of frame_b with respect to frame_a
Booleanget_z_relfalse= true, to measure the relative angular acceleration of frame_b with respect to frame_a
Booleanget_anglesfalse= true, to measure the 3 rotation angles
RotationSequencesequence[3]{1, 2, 3}If get_angles=true: Angles are returned to rotate frame_a around axes sequence[1], sequence[2] and finally sequence[3] into frame_b
AngleguessAngle10If get_angles=true: Select angles[1] such that abs(angles[1] - guessAngle1) is a minimum
ResolveInFrameABresolveInFrameAfterDifferentiationresolveInFrameFrame in which vectors are resolved after differentiation (world, frame_a, frame_b, or frame_resolve)

Inputs

TypeNameDefaultDescription
DiameterarrowDiameterworld.​defaultArrowDiameterDiameter of relative arrow from frame_a to frame_b
ColorarrowColor[3]Modelica.​Mechanics.​MultiBody.​Types.​Defaults.​SensorColorColor of relative arrow from frame_a to frame_b
SpecularCoefficientspecularCoefficientworld.​defaultSpecularCoefficientReflection of ambient light (= 0: light is completely absorbed)

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a
Frame_bframe_bCoordinate system b
Frame_resolveframe_resolveIf resolveInFrame = Types.ResolveInFrameAB.frame_resolve, the output signals are resolved in this frame
output RealOutputr_rel[3]Relative position vector frame_b.r_0 - frame_a.r_0 resolved in frame defined by resolveInFrame
output RealOutputv_rel[3]Relative velocity vector
output RealOutputa_rel[3]Relative acceleration vector
output RealOutputangles[3]Angles to rotate frame_a into frame_b via 'sequence'
output RealOutputw_rel[3]Relative angular velocity vector
output RealOutputz_rel[3]Relative angular acceleration vector

Model Modelica.​Mechanics.​MultiBody.​Sensors.​AbsolutePosition
Measure absolute position vector of the origin of a frame connector

Information

The absolute position vector of the origin of frame_a is determined and provided at the output signal connector r.

Via parameter resolveInFrame it is defined, in which frame the position vector is resolved:

resolveInFrame =
Types.ResolveInFrameA.
Meaning
world Resolve vector in world frame
frame_a Resolve vector in frame_a
frame_resolve Resolve vector in frame_resolve

If resolveInFrame = Types.ResolveInFrameA.frame_resolve, the conditional connector "frame_resolve" is enabled and r is resolved in the frame, to which frame_resolve is connected. Note, if this connector is enabled, it must be connected.

Example

If resolveInFrame = Types.ResolveInFrameA.frame_a, the output vector is computed as:

r = MultiBody.Frames.resolve2(frame_a.R, frame_b.r_0);

Extends from Modelica.​Mechanics.​MultiBody.​Sensors.​Internal.​PartialAbsoluteSensor (Base class for absolute sensor models).

Parameters

TypeNameDefaultDescription
ResolveInFrameAresolveInFrameModelica.​Mechanics.​MultiBody.​Types.​ResolveInFrameA.​frame_aFrame in which output vector r shall be resolved (world, frame_a, or frame_resolve)

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a of which the absolute kinematic quantities are measured
output RealOutputr[3]Absolute position vector resolved in frame defined by resolveInFrame
Frame_resolveframe_resolveCoordinate system in which output vector r is optionally resolved

Model Modelica.​Mechanics.​MultiBody.​Sensors.​AbsoluteVelocity
Measure absolute velocity vector of origin of frame connector

Information

The absolute velocity vector of the origin of frame_a is determined and provided at the output signal connector v.

Via parameter resolveInFrame it is defined, in which frame the velocity vector is resolved:

resolveInFrame =
Types.ResolveInFrameA.
Meaning
world Resolve vector in world frame
frame_a Resolve vector in frame_a
frame_resolve Resolve vector in frame_resolve

If resolveInFrame = Types.ResolveInFrameA.frame_resolve, the conditional connector "frame_resolve" is enabled and v is resolved in the frame, to which frame_resolve is connected. Note, if this connector is enabled, it must be connected.

Example

If resolveInFrame = Types.ResolveInFrameA.frame_a, the output vector is computed as:

v0 = der(frame_a.r_0);
v  = MultiBody.Frames.resolve2(frame_a.R, v0);

Extends from Modelica.​Mechanics.​MultiBody.​Sensors.​Internal.​PartialAbsoluteSensor (Base class for absolute sensor models).

Parameters

TypeNameDefaultDescription
ResolveInFrameAresolveInFrameModelica.​Mechanics.​MultiBody.​Types.​ResolveInFrameA.​frame_aFrame in which output vector v shall be resolved (world, frame_a, or frame_resolve)

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a of which the absolute kinematic quantities are measured
output RealOutputv[3]Absolute velocity vector resolved in frame defined by resolveInFrame
Frame_resolveframe_resolveCoordinate system in which output vector v is optionally resolved

Model Modelica.​Mechanics.​MultiBody.​Sensors.​AbsoluteAngles
Measure absolute angles between frame connector and the world frame

Information

This model determines the 3 angles to rotate the world frame into frame_a along the axes defined by parameter sequence. For example, if sequence = {3,1,2} then the world frame is rotated around angles[1] along the z-axis, afterwards it is rotated around angles[2] along the x-axis, and finally it is rotated around angles[3] along the y-axis and is then identical to frame_a. The 3 angles are returned in the range

    -p <= angles[i] <= p

There are two solutions for "angles[1]" in this range. Via parameter guessAngle1 (default = 0) the returned solution is selected such that |angles[1] - guessAngle1| is minimal. The transformation matrix between the world frame and frame_a may be in a singular configuration with respect to "sequence", i.e., there is an infinite number of angle values leading to the same relative transformation matrix. In this case, the returned solution is selected by setting angles[1] = guessAngle1. Then angles[2] and angles[3] can be uniquely determined in the above range.

The parameter sequence has the restriction that only values 1,2,3 can be used and that sequence[1] ≠ sequence[2] and sequence[2] ≠ sequence[3]. Often used values are:

  sequence = {1,2,3}  // Cardan or Tait-Bryan angle sequence
           = {3,1,3}  // Euler angle sequence
           = {3,2,1}

Extends from Modelica.​Mechanics.​MultiBody.​Sensors.​Internal.​PartialAbsoluteSensor (Base class for absolute sensor models).

Parameters

TypeNameDefaultDescription
RotationSequencesequence[3]{1, 2, 3}Angles are returned to rotate world frame around axes sequence[1], sequence[2] and finally sequence[3] into frame_a
AngleguessAngle10Select angles[1] such that abs(angles[1] - guessAngle1) is a minimum

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a of which the absolute kinematic quantities are measured
output RealOutputangles[3]Angles to rotate world frame into frame_a via 'sequence'

Model Modelica.​Mechanics.​MultiBody.​Sensors.​AbsoluteAngularVelocity
Measure absolute angular velocity of frame connector

Information

The absolute angular velocity of frame_a with respect to the world frame is determined and provided at the output signal connector w.

Via parameter resolveInFrame it is defined, in which frame the angular velocity is resolved:

resolveInFrame =
Types.ResolveInFrameA.
Meaning
world Resolve vector in world frame
frame_a Resolve vector in frame_a
frame_resolve Resolve vector in frame_resolve

If resolveInFrame = Types.ResolveInFrameA.frame_resolve, the conditional connector "frame_resolve" is enabled and w is resolved in the frame, to which frame_resolve is connected. Note, if this connector is enabled, it must be connected.

Example

If resolveInFrame = Types.ResolveInFrameA.frame_a, the output vector is computed as:

w = MultiBody.Frames.angularVelocity2(frame_a.R);

Extends from Modelica.​Mechanics.​MultiBody.​Sensors.​Internal.​PartialAbsoluteSensor (Base class for absolute sensor models).

Parameters

TypeNameDefaultDescription
ResolveInFrameAresolveInFrameModelica.​Mechanics.​MultiBody.​Types.​ResolveInFrameA.​frame_aFrame in which output vector w shall be resolved (world, frame_a, or frame_resolve)

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a of which the absolute kinematic quantities are measured
output RealOutputw[3]Absolute angular velocity vector of frame_a with respect to world frame, resolved in frame defined by resolveInFrame
Frame_resolveframe_resolveCoordinate system in which w is optionally resolved

Model Modelica.​Mechanics.​MultiBody.​Sensors.​RelativePosition
Measure relative position vector between the origins of two frame connectors

Information

The relative position vector between the origins of frame_a and frame_b are determined and provided at the output signal connector r_rel.

Via parameter resolveInFrame it is defined, in which frame the position vector is resolved:

resolveInFrame =
Types.ResolveInFrameAB.
Meaning
world Resolve vector in world frame
frame_a Resolve vector in frame_a
frame_b Resolve vector in frame_b
frame_resolve Resolve vector in frame_resolve

If resolveInFrame = Types.ResolveInFrameAB.frame_resolve, the conditional connector "frame_resolve" is enabled and r_rel is resolved in the frame, to which frame_resolve is connected. Note, if this connector is enabled, it must be connected.

Example

If resolveInFrame = Types.ResolveInFrameAB.frame_a, the output vector is computed as:

r_rel = MultiBody.Frames.resolve2(frame_a.R, frame_b.r_0 - frame_a.r_0);

Extends from Modelica.​Mechanics.​MultiBody.​Sensors.​Internal.​PartialRelativeSensor (Base class for relative sensor models).

Parameters

TypeNameDefaultDescription
ResolveInFrameABresolveInFrameModelica.​Mechanics.​MultiBody.​Types.​ResolveInFrameAB.​frame_aFrame in which output vector r_rel shall be resolved (world, frame_a, frame_b, or frame_resolve)

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a
Frame_bframe_bCoordinate system b
output RealOutputr_rel[3]Relative position vector resolved in frame defined by resolveInFrame
Frame_resolveframe_resolveCoordinate system in which r_rel is optionally resolved

Model Modelica.​Mechanics.​MultiBody.​Sensors.​RelativeVelocity
Measure relative velocity vector between the origins of two frame connectors

Information

The relative velocity vector between the origins of frame_a and of frame_b are determined and provided at the output signal connector v_rel. This vector is defined as:

r_rel = MultiBody.Frames.resolve2(frame_a.R, frame_b.r_0 - frame_a.r_0);
v_rel = der(r_rel);

Via parameter resolveInFrame it is defined, in which frame the velocity vector is resolved:

resolveInFrame =
Types.ResolveInFrameAB.
Meaning
world Resolve vector in world frame
frame_a Resolve vector in frame_a
frame_b Resolve vector in frame_b
frame_resolve Resolve vector in frame_resolve

If resolveInFrame = Types.ResolveInFrameAB.frame_resolve, the conditional connector "frame_resolve" is enabled and v_rel is resolved in the frame, to which frame_resolve is connected. Note, if this connector is enabled, it must be connected.

Example

If resolveInFrame = Types.ResolveInFrameAB.frame_b, the output vector is computed as:

r_rel   = MultiBody.Frames.resolve2(frame_a.R, frame_b.r_0 - frame_a.r_0);
v_rel_a = der(r_rel);
v_rel   = MultiBody.Frames.resolveRelative(frame_a.R, frame_b.R, v_rel_a);

Extends from Modelica.​Mechanics.​MultiBody.​Sensors.​Internal.​PartialRelativeSensor (Base class for relative sensor models).

Parameters

TypeNameDefaultDescription
ResolveInFrameABresolveInFrameModelica.​Mechanics.​MultiBody.​Types.​ResolveInFrameAB.​frame_aFrame in which output vector v_rel shall be resolved (world, frame_a, frame_b, or frame_resolve)

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a
Frame_bframe_bCoordinate system b
output RealOutputv_rel[3]Relative velocity vector resolved in frame defined by resolveInFrame
Frame_resolveframe_resolveCoordinate system in which v_rel is optionally resolved

Model Modelica.​Mechanics.​MultiBody.​Sensors.​RelativeAngles
Measure relative angles between two frame connectors

Information

This model determines the 3 angles to rotate frame_a into frame_b along the axes defined by parameter sequence. For example, if sequence = {3,1,2} then frame_a is rotated around angles[1] along the z-axis, afterwards it is rotated around angles[2] along the x-axis, and finally it is rotated around angles[3] along the y-axis and is then identical to frame_b. The 3 angles are returned in the range

    -p <= angles[i] <= p

There are two solutions for "angles[1]" in this range. Via parameter guessAngle1 (default = 0) the returned solution is selected such that |angles[1] - guessAngle1| is minimal. The relative transformation matrix between frame_a and frame_b may be in a singular configuration with respect to "sequence", i.e., there is an infinite number of angle values leading to the same relative transformation matrix. In this case, the returned solution is selected by setting angles[1] = guessAngle1. Then angles[2] and angles[3] can be uniquely determined in the above range.

The parameter sequence has the restriction that only values 1,2,3 can be used and that sequence[1] ≠ sequence[2] and sequence[2] ≠ sequence[3]. Often used values are:

  sequence = {1,2,3}  // Cardan or Tait-Bryan angle sequence
           = {3,1,3}  // Euler angle sequence
           = {3,2,1}

Extends from Modelica.​Mechanics.​MultiBody.​Sensors.​Internal.​PartialRelativeSensor (Base class for relative sensor models) and Modelica.​Icons.​RotationalSensor (Icon representing a round measurement device).

Parameters

TypeNameDefaultDescription
RotationSequencesequence[3]{1, 2, 3}Angles are returned to rotate frame_a around axes sequence[1], sequence[2] and finally sequence[3] into frame_b
AngleguessAngle10Select angles[1] such that abs(angles[1] - guessAngle1) is a minimum

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a
Frame_bframe_bCoordinate system b
output RealOutputangles[3]Angles to rotate frame_a into frame_b via 'sequence'

Model Modelica.​Mechanics.​MultiBody.​Sensors.​RelativeAngularVelocity
Measure relative angular velocity between two frame connectors

Information

The relative angular velocity between frame_a and frame_b is determined and provided at the output signal connector w_rel.

Via parameter resolveInFrame it is defined, in which frame the angular velocity is resolved:

resolveInFrame =
Types.ResolveInFrameAB.
Meaning
world Resolve vector in world frame
frame_a Resolve vector in frame_a
frame_b Resolve vector in frame_b
frame_resolve Resolve vector in frame_resolve

In this basic sensor model, the connector frame_resolve is always enabled. If resolveInFrame = Types.ResolveInFrameAB.frame_resolve, the vector w_rel is resolved in the frame to which frame_resolve is connected.

Example

If resolveInFrame = Types.ResolveInFrameAB.frame_a, the output vector is computed as:

// Relative orientation object from frame_a to frame_b
R_rel = MultiBody.Frames.relativeRotation(frame_a.R, frame_b.R);

// Angular velocity resolved in frame_a
w_rel = MultiBody.Frames.angularVelocity1(R_rel);

Extends from Modelica.​Mechanics.​MultiBody.​Sensors.​Internal.​PartialRelativeSensor (Base class for relative sensor models).

Parameters

TypeNameDefaultDescription
ResolveInFrameABresolveInFrameModelica.​Mechanics.​MultiBody.​Types.​ResolveInFrameAB.​frame_aFrame in which output vector w_rel shall be resolved (world, frame_a, frame_b, or frame_resolve)

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a
Frame_bframe_bCoordinate system b
output RealOutputw_rel[3]Relative angular velocity vector between frame_a and frame_b resolved in frame defined by resolveInFrame
Frame_resolveframe_resolveCoordinate system in which w_rel is optionally resolved

Model Modelica.​Mechanics.​MultiBody.​Sensors.​Distance
Measure the distance between the origins of two frame connectors

Information

The distance between the origins of frame_a and of frame_b are determined and provided at the output signal connector distance. This distance is always positive. Derivatives of this signal can be easily obtained by connecting the block Modelica.Blocks.Continuous.Der to "distance" (this block performs analytic differentiation of the input signal using the der(..) operator).

In the following figure the animation of a Distance sensor is shown. The light blue coordinate system is frame_a, the dark blue coordinate system is frame_b, and the yellow arrow is the animated sensor.

If the distance is smaller as parameter s_small (in the "advanced" menu), it is approximated such that its derivative is finite for zero distance. Without such an approximation, the derivative would be infinite and a division by zero would occur. The approximation is performed in the following way: If distance > s_small, it is computed as sqrt(r*r) where r is the position vector from the origin of frame_a to the origin of frame_b. If the distance becomes smaller as s_small, the "sqrt()" function is approximated by a second order polynomial, such that the function value and its first derivative are identical for sqrt() and the polynomial at s_small. Furthermore, the polynomial passes through zero. The effect is, that the distance function is continuous and differentiable everywhere. The derivative at zero distance is 3/(2*s_small).

Extends from Modelica.​Mechanics.​MultiBody.​Interfaces.​PartialTwoFrames (Base model for components providing two frame connectors + outer world + assert to guarantee that the component is connected) and Modelica.​Icons.​TranslationalSensor (Icon representing a linear measurement device).

Parameters

TypeNameDefaultDescription
Booleananimationtrue= true, if animation shall be enabled (show arrow)

Inputs

TypeNameDefaultDescription
DiameterarrowDiameterworld.​defaultArrowDiameterDiameter of relative arrow from frame_a to frame_b
ColorarrowColor[3]Modelica.​Mechanics.​MultiBody.​Types.​Defaults.​SensorColorColor of relative arrow from frame_a to frame_b
SpecularCoefficientspecularCoefficientworld.​defaultSpecularCoefficientReflection of ambient light (= 0: light is completely absorbed)
Positions_small1e-10Prevent zero-division if distance between frame_a and frame_b is zero

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a fixed to the component with one cut-force and cut-torque
Frame_bframe_bCoordinate system b fixed to the component with one cut-force and cut-torque
output RealOutputdistanceDistance between the origin of frame_a and the origin of frame_b

Model Modelica.​Mechanics.​MultiBody.​Sensors.​CutForce
Measure cut force vector

Information

The cut-force acting between the two frames to which this model is connected, is determined and provided at the output signal connector force (= frame_a.f). If parameter positiveSign = false, the negative cut-force is provided (= frame_b.f).

Via parameter resolveInFrame it is defined, in which frame the force vector is resolved:

resolveInFrame =
Types.ResolveInFrameA.
Meaning
world Resolve vector in world frame
frame_a Resolve vector in frame_a
frame_resolve Resolve vector in frame_resolve

If resolveInFrame = Types.ResolveInFrameAB.frame_resolve, the conditional connector "frame_resolve" is enabled and output force is resolved in the frame, to which frame_resolve is connected. Note, if this connector is enabled, it must be connected.

In the following figure the animation of a CutForce sensor is shown. The dark blue coordinate system is frame_b, and the green arrow is the cut force acting at frame_b and with negative sign at frame_a.

Extends from Modelica.​Mechanics.​MultiBody.​Sensors.​Internal.​PartialCutForceSensor (Base class to measure cut force and/or torque between two frames, defined by components).

Parameters

TypeNameDefaultDescription
Booleananimationtrue= true, if animation shall be enabled (show arrow)
BooleanpositiveSigntrue= true, if force with positive sign is returned (= frame_a.f), otherwise with negative sign (= frame_b.f)
ResolveInFrameAresolveInFrameModelica.​Mechanics.​MultiBody.​Types.​ResolveInFrameA.​frame_aFrame in which output vector(s) is/are resolved (world, frame_a, or frame_resolve)

Inputs

TypeNameDefaultDescription
RealN_to_m1000Force arrow scaling (length = force/N_to_m)
DiameterforceDiameterworld.​defaultArrowDiameterDiameter of force arrow
ColorforceColor[3]Modelica.​Mechanics.​MultiBody.​Types.​Defaults.​ForceColorColor of force arrow
SpecularCoefficientspecularCoefficientworld.​defaultSpecularCoefficientReflection of ambient light (= 0: light is completely absorbed)

Connectors

TypeNameDescription
output RealOutputforce[3]Cut force resolved in frame defined by resolveInFrame
Frame_aframe_aCoordinate system a
Frame_bframe_bCoordinate system b
Frame_resolveframe_resolveOutput vectors are optionally resolved in this frame (cut-force/-torque are set to zero)

Model Modelica.​Mechanics.​MultiBody.​Sensors.​CutTorque
Measure cut torque vector

Information

The cut-torque acting between the two frames to which this model is connected, is determined and provided at the output signal connector torque (= frame_a.t). If parameter positiveSign = false, the negative cut-torque is provided (= frame_b.t).

Via parameter resolveInFrame it is defined, in which frame the torque vector is resolved:

resolveInFrame =
Types.ResolveInFrameA.
Meaning
world Resolve vector in world frame
frame_a Resolve vector in frame_a
frame_resolve Resolve vector in frame_resolve

If resolveInFrame = Types.ResolveInFrameAB.frame_resolve, the conditional connector "frame_resolve" is enabled and output torque is resolved in the frame, to which frame_resolve is connected. Note, if this connector is enabled, it must be connected.

In the following figure the animation of a CutTorque sensor is shown. The dark blue coordinate system is frame_b, and the green arrow is the cut torque acting at frame_b and with negative sign at frame_a.

Extends from Modelica.​Mechanics.​MultiBody.​Sensors.​Internal.​PartialCutForceSensor (Base class to measure cut force and/or torque between two frames, defined by components).

Parameters

TypeNameDefaultDescription
Booleananimationtrue= true, if animation shall be enabled (show arrow)
BooleanpositiveSigntrue= true, if torque with positive sign is returned (= frame_a.t), otherwise with negative sign (= frame_b.t)
ResolveInFrameAresolveInFrameModelica.​Mechanics.​MultiBody.​Types.​ResolveInFrameA.​frame_aFrame in which output vector(s) is/are resolved (world, frame_a, or frame_resolve)

Inputs

TypeNameDefaultDescription
RealNm_to_m1000Torque arrow scaling (length = torque/Nm_to_m)
DiametertorqueDiameterworld.​defaultArrowDiameterDiameter of torque arrow
ColortorqueColor[3]Modelica.​Mechanics.​MultiBody.​Types.​Defaults.​TorqueColorColor of torque arrow
SpecularCoefficientspecularCoefficientworld.​defaultSpecularCoefficientReflection of ambient light (= 0: light is completely absorbed)

Connectors

TypeNameDescription
output RealOutputtorque[3]Cut torque resolved in frame defined by resolveInFrame
Frame_aframe_aCoordinate system a
Frame_bframe_bCoordinate system b
Frame_resolveframe_resolveOutput vectors are optionally resolved in this frame (cut-force/-torque are set to zero)

Model Modelica.​Mechanics.​MultiBody.​Sensors.​CutForceAndTorque
Measure cut force and cut torque vector

Information

The cut-force and cut-torque acting between the two frames to which this model is connected, are determined and provided at the output signal connectors force (= frame_a.f) and torque (= frame_a.t). If parameter positiveSign = false, the negative cut-force and cut-torque is provided (= frame_b.f, frame_b.t).

Via parameter resolveInFrame it is defined, in which frame the two vectors are resolved:

resolveInFrame =
Types.ResolveInFrameA.
Meaning
world Resolve vector in world frame
frame_a Resolve vector in frame_a
frame_resolve Resolve vector in frame_resolve

If resolveInFrame = Types.ResolveInFrameAB.frame_resolve, the conditional connector "frame_resolve" is enabled and the output vectors force and torque are resolved in the frame, to which frame_resolve is connected. Note, if this connector is enabled, it must be connected.

In the following figure the animation of a CutForceAndTorque sensor is shown. The dark blue coordinate system is frame_b, and the green arrows are the cut force and the cut torque, respectively, acting at frame_b and with negative sign at frame_a.

Extends from Modelica.​Mechanics.​MultiBody.​Sensors.​Internal.​PartialCutForceSensor (Base class to measure cut force and/or torque between two frames, defined by components).

Parameters

TypeNameDefaultDescription
Booleananimationtrue= true, if animation shall be enabled (show force and torque arrow)
BooleanpositiveSigntrue= true, if force and torque with positive sign is returned (= frame_a.f/.t), otherwise with negative sign (= frame_b.f/.t)
ResolveInFrameAresolveInFrameModelica.​Mechanics.​MultiBody.​Types.​ResolveInFrameA.​frame_aFrame in which output vector(s) is/are resolved (world, frame_a, or frame_resolve)

Inputs

TypeNameDefaultDescription
RealN_to_m1000Force arrow scaling (length = force/N_to_m)
RealNm_to_m1000Torque arrow scaling (length = torque/Nm_to_m)
DiameterforceDiameterworld.​defaultArrowDiameterDiameter of force arrow
DiametertorqueDiameterforceDiameterDiameter of torque arrow
ColorforceColor[3]Modelica.​Mechanics.​MultiBody.​Types.​Defaults.​ForceColorColor of force arrow
ColortorqueColor[3]Modelica.​Mechanics.​MultiBody.​Types.​Defaults.​TorqueColorColor of torque arrow
SpecularCoefficientspecularCoefficientworld.​defaultSpecularCoefficientReflection of ambient light (= 0: light is completely absorbed)

Connectors

TypeNameDescription
output RealOutputforce[3]Cut force resolved in frame defined by resolveInFrame
output RealOutputtorque[3]Cut torque resolved in frame defined by resolveInFrame
Frame_aframe_aCoordinate system a
Frame_bframe_bCoordinate system b
Frame_resolveframe_resolveOutput vectors are optionally resolved in this frame (cut-force/-torque are set to zero)

Model Modelica.​Mechanics.​MultiBody.​Sensors.​Power
Measure power flowing from frame_a to frame_b

Information

This component provides the power flowing from frame_a to frame_b as output signal power.

Extends from Modelica.​Icons.​RotationalSensor (Icon representing a round measurement device) and Modelica.​Mechanics.​MultiBody.​Interfaces.​PartialTwoFrames (Base model for components providing two frame connectors + outer world + assert to guarantee that the component is connected).

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a fixed to the component with one cut-force and cut-torque
Frame_bframe_bCoordinate system b fixed to the component with one cut-force and cut-torque
output RealOutputpowerPower at frame_a as output signal

Model Modelica.​Mechanics.​MultiBody.​Sensors.​TransformAbsoluteVector
Transform absolute vector in to another frame

Information

The input vector "Real r_in[3]" is assumed to be an absolute kinematic quantity of frame_a that is defined to be resolved in the frame defined with parameter "frame_r_in". This model resolves vector r_in in the coordinate system defined with parameter "frame_r_out" and returns the transformed output vector as "Real r_out[3]";

Extends from Modelica.​Icons.​RotationalSensor (Icon representing a round measurement device).

Parameters

TypeNameDefaultDescription
ResolveInFrameAframe_r_inModelica.​Mechanics.​MultiBody.​Types.​ResolveInFrameA.​frame_aFrame in which vector r_in is resolved (world, frame_a, or frame_resolve)
ResolveInFrameAframe_r_outframe_r_inFrame in which vector r_in shall be resolved and provided as r_out (world, frame_a, or frame_resolve)

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system from which absolute kinematic quantities are measured
Frame_resolveframe_resolveCoordinate system in which r_in or r_out is optionally resolved
input RealInputr_in[3]Input vector resolved in frame defined by frame_r_in
output RealOutputr_out[3]Input vector r_in resolved in frame defined by frame_r_out

Model Modelica.​Mechanics.​MultiBody.​Sensors.​TransformRelativeVector
Transform relative vector in to another frame

Information

The input vector "Real r_in[3]" is assumed to be a relative kinematic quantity between frame_a and frame_b that is defined to be resolved in the frame defined with parameter "frame_r_in". This model resolves vector r_in in the coordinate system defined with parameter "frame_r_out" and returns the transformed output vector as "Real r_out[3]";

Extends from Modelica.​Mechanics.​MultiBody.​Sensors.​Internal.​PartialRelativeSensor (Base class for relative sensor models).

Parameters

TypeNameDefaultDescription
ResolveInFrameABframe_r_inModelica.​Mechanics.​MultiBody.​Types.​ResolveInFrameAB.​frame_aFrame in which vector r_in is resolved (world, frame_a, frame_b, or frame_resolve)
ResolveInFrameABframe_r_outframe_r_inFrame in which vector r_in shall be resolved and provided as r_out (world, frame_a, frame_b, or frame_resolve)

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a
Frame_bframe_bCoordinate system b
Frame_resolveframe_resolveCoordinate system in which r_in or r_out is optionally resolved
input RealInputr_in[3]Input vector resolved in frame defined by frame_r_in
output RealOutputr_out[3]Input vector r_in resolved in frame defined by frame_r_out

Model Modelica.​Mechanics.​MultiBody.​Sensors.​TansformAbsoluteVector
Obsolete model will be removed in future versions, use TransformAbsoluteVector instead!

Information

Extends from Modelica.​Icons.​ObsoleteModel (Icon for classes that are obsolete and will be removed in later versions) and Modelica.​Mechanics.​MultiBody.​Sensors.​TransformAbsoluteVector (Transform absolute vector in to another frame).

Parameters

TypeNameDefaultDescription
ResolveInFrameAframe_r_inModelica.​Mechanics.​MultiBody.​Types.​ResolveInFrameA.​frame_aFrame in which vector r_in is resolved (world, frame_a, or frame_resolve)
ResolveInFrameAframe_r_outframe_r_inFrame in which vector r_in shall be resolved and provided as r_out (world, frame_a, or frame_resolve)

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system from which absolute kinematic quantities are measured
Frame_resolveframe_resolveCoordinate system in which r_in or r_out is optionally resolved
input RealInputr_in[3]Input vector resolved in frame defined by frame_r_in
output RealOutputr_out[3]Input vector r_in resolved in frame defined by frame_r_out

Model Modelica.​Mechanics.​MultiBody.​Sensors.​TansformRelativeVector
Obsolete model will be removed in future versions, use TransformRelativeVector instead!

Information

Extends from Modelica.​Icons.​ObsoleteModel (Icon for classes that are obsolete and will be removed in later versions) and Modelica.​Mechanics.​MultiBody.​Sensors.​TransformRelativeVector (Transform relative vector in to another frame).

Parameters

TypeNameDefaultDescription
ResolveInFrameABframe_r_inModelica.​Mechanics.​MultiBody.​Types.​ResolveInFrameAB.​frame_aFrame in which vector r_in is resolved (world, frame_a, frame_b, or frame_resolve)
ResolveInFrameABframe_r_outframe_r_inFrame in which vector r_in shall be resolved and provided as r_out (world, frame_a, frame_b, or frame_resolve)

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a
Frame_bframe_bCoordinate system b
Frame_resolveframe_resolveCoordinate system in which r_in or r_out is optionally resolved
input RealInputr_in[3]Input vector resolved in frame defined by frame_r_in
output RealOutputr_out[3]Input vector r_in resolved in frame defined by frame_r_out