Skip to content
LIBRARY
RelativeAngularVelocity.md

RelativeAngularVelocity

Measures the relative angular velocity between two frame connectors.

Uses the relative rotation R_rel = frame_b.R * transpose(frame_a.R) (the same expression used by the existing RelativeAngles sensor).

This is a sensor: no forces or torques are exerted.

Usage

MultibodyComponents.RelativeAngularVelocity()

Parameters:

NameDescriptionUnitsDefault value
resolve_in_frameResolveInFrame.FrameA()

Connectors

  • frame_a - Frame3D is the fundamental 3D connector used for 6DOF motion. Most components have one or several Frame

connectors that can be connected together (Frame3D)

  • frame_b - Frame3D is the fundamental 3D connector used for 6DOF motion. Most components have one or several Frame

connectors that can be connected together (Frame3D)

  • frame_resolve - Frame3D is the fundamental 3D connector used for 6DOF motion. Most components have one or several Frame

connectors that can be connected together (Frame3D)

  • w_rel_x - This connector represents a real signal as an output from a component (RealOutput)

  • w_rel_y - This connector represents a real signal as an output from a component (RealOutput)

  • w_rel_z - This connector represents a real signal as an output from a component (RealOutput)

Variables

NameDescriptionUnits
R_relRelative rotation matrix: rotates a frame_a-resolved vector into frame_b
w_relrad/s

Behavior

Dict{MIME{Symbol("text/plain")}, String} with 1 entry: MIME type text/plain => "Error displaying result"

Source

dyad
"""
Measures the relative angular velocity between two frame connectors.

Uses the relative rotation `R_rel = frame_b.R * transpose(frame_a.R)` (the
same expression used by the existing `RelativeAngles` sensor).

This is a sensor: no forces or torques are exerted.
"""
component RelativeAngularVelocity
  frame_a = Frame3D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -50, "y1": 450, "x2": 50, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  frame_b = Frame3D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 950, "y1": 450, "x2": 1050, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  frame_resolve = Frame3D() if case(resolve_in_frame, ResolveInFrame.FrameResolve) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": -50, "x2": 550, "y2": 50, "rot": 0}
      },
      "tags": []
    }
  }
  w_rel_x = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 130, "y1": 960, "x2": 230, "y2": 1060, "rot": 90}
      },
      "tags": []
    }
  }
  w_rel_y = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": 960, "x2": 550, "y2": 1060, "rot": 90}
      },
      "tags": []
    }
  }
  w_rel_z = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 770, "y1": 960, "x2": 870, "y2": 1060, "rot": 90}
      },
      "tags": []
    }
  }
  structural parameter resolve_in_frame::ResolveInFrame = ResolveInFrame.FrameA()
  "Relative rotation matrix: rotates a frame_a-resolved vector into frame_b"
  variable R_rel::Real[3, 3]
  variable w_rel::AngularVelocity[3]
relations
  frame_a.f = [0, 0, 0]
  frame_a.tau = [0, 0, 0]
  frame_b.f = [0, 0, 0]
  frame_b.tau = [0, 0, 0]
  if case(resolve_in_frame, ResolveInFrame.FrameResolve)
    frame_resolve.f = [0, 0, 0]
    frame_resolve.tau = [0, 0, 0]
  end
  R_rel = frame_b.R * transpose(frame_a.R)
  switch resolve_in_frame
    case FrameA
      w_rel = angular_velocity1(R_rel)
    case FrameB
      w_rel = angular_velocity2(R_rel)
    case World
      w_rel = resolve1(frame_a.R, angular_velocity1(R_rel))
    case FrameResolve
      w_rel = resolve_relative(angular_velocity1(R_rel), frame_a.R, frame_resolve.R)
  end
  [w_rel_x, w_rel_y, w_rel_z] = w_rel
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/TwoFrameSensor.svg"},
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 150,
        "rot": 0,
        "attrs": {"font-size": "140"}
      },
      {"label": "rel ang vel", "x": 500, "y": 680, "rot": 0}
    ]
  }
}
end
Flattened Source
dyad
"""
Measures the relative angular velocity between two frame connectors.

Uses the relative rotation `R_rel = frame_b.R * transpose(frame_a.R)` (the
same expression used by the existing `RelativeAngles` sensor).

This is a sensor: no forces or torques are exerted.
"""
component RelativeAngularVelocity
  frame_a = Frame3D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -50, "y1": 450, "x2": 50, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  frame_b = Frame3D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 950, "y1": 450, "x2": 1050, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  frame_resolve = Frame3D() if case(resolve_in_frame, ResolveInFrame.FrameResolve) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": -50, "x2": 550, "y2": 50, "rot": 0}
      },
      "tags": []
    }
  }
  w_rel_x = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 130, "y1": 960, "x2": 230, "y2": 1060, "rot": 90}
      },
      "tags": []
    }
  }
  w_rel_y = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": 960, "x2": 550, "y2": 1060, "rot": 90}
      },
      "tags": []
    }
  }
  w_rel_z = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 770, "y1": 960, "x2": 870, "y2": 1060, "rot": 90}
      },
      "tags": []
    }
  }
  structural parameter resolve_in_frame::ResolveInFrame = ResolveInFrame.FrameA()
  "Relative rotation matrix: rotates a frame_a-resolved vector into frame_b"
  variable R_rel::Real[3, 3]
  variable w_rel::AngularVelocity[3]
relations
  frame_a.f = [0, 0, 0]
  frame_a.tau = [0, 0, 0]
  frame_b.f = [0, 0, 0]
  frame_b.tau = [0, 0, 0]
  if case(resolve_in_frame, ResolveInFrame.FrameResolve)
    frame_resolve.f = [0, 0, 0]
    frame_resolve.tau = [0, 0, 0]
  end
  R_rel = frame_b.R * transpose(frame_a.R)
  switch resolve_in_frame
    case FrameA
      w_rel = angular_velocity1(R_rel)
    case FrameB
      w_rel = angular_velocity2(R_rel)
    case World
      w_rel = resolve1(frame_a.R, angular_velocity1(R_rel))
    case FrameResolve
      w_rel = resolve_relative(angular_velocity1(R_rel), frame_a.R, frame_resolve.R)
  end
  [w_rel_x, w_rel_y, w_rel_z] = w_rel
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/TwoFrameSensor.svg"},
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 150,
        "rot": 0,
        "attrs": {"font-size": "140"}
      },
      {"label": "rel ang vel", "x": 500, "y": 680, "rot": 0}
    ]
  }
}
end


Test Cases

No test cases defined.

  • Examples

  • Experiments

  • Analyses