.ObsoleteModelica3.Mechanics.MultiBody.Sensors.RelativeSensor

Information

Relative kinematic quantities between frame_a and frame_b are determined and provided at the output signal connector y in packed format in the order

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

For example, if parameters get_v_rel and get_w_rel are true and all other get_XXX parameters are false, then y contains 6 elements:

 y = relative velocity
 y = relative angular velocity

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.

If parameter resolveInFrame_a = true, then the provided relative kinematic vectors of frame_b with respect to frame_a are resolved before differentiation in frame_a. If this parameter is false, the relative kinematic vectors are resolved before differentiation in frame_b. If frame_resolve is connected to another frame, then the kinematic vector as defined above and/or its required derivatives are resolved in frame_resolve. Note, derivatives of relative kinematic quantities are always performed with respect to frame_a (resolveInFrame_a = true) or with respect to frame_b (resolveInFrame_a = false). The resulting vector is then resolved in frame_resolve, if this connector is connected.

For example, if frame_resolve is not connected and if resolveInFrame_a = false, and get_v = true, then

  y = 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 frame_resolve is connected, then

  y = v_rel
    = resolve2(frame_resolve.R, der(r_rel))

is returned, i.e., the previous relative velocity vector is additionally resolved in frame_resolve.

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

Note, that 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 angle sequence
           = {3,1,3}  // Euler angle sequence
           = {3,2,1}  // Tait-Bryan angle sequence

Exact definition of the returned quantities (r_rel_ab, R_rel_ab, w_rel_ab are defined below the enumeration):

  1. r_rel is vector r_rel_ab, resolved according to table below.
  2. v_rel is vector der(r_rel_ab), resolved according to table below.
  3. a_rel is vector der(der(r_rel_ab)), resolved according to table below.
  4. angles is a vector of 3 angles such that R_rel_ab = Frames.axesRotations(sequence, angles).
  5. w_rel is vector w_rel_ab, resolved according to table below.
  6. z_rel is vector der(w_rel_ab), resolved according to table below.

using the auxiliary quantities

  1. r_rel_ab is vector frame_b.r_0 - frame_a.r_0, resolved either in frame_a or frame_b according to parameter resolveInFrame_a.
  2. R_rel_ab is orientation object Frames.relativeRotation(frame_a.R, frame_b.R).
  3. w_rel_ab is vector Frames.angularVelocity1(R_rel_ab, der(R_rel_ab)), resolved either in frame_a or frame_b according to parameter resolveInFrame_a.

and resolved in the following frame

frame_resolve is resolveInFrame_a = vector is resolved in
connected true frame_resolve
connected false frame_resolve
not connected true frame_a
not connected false frame_b

Generated at 2019-09-25T10:30:33Z by OpenModelica 1.13.2