Skip to content
LIBRARY
GearConstraint.md

GearConstraint

Ideal massless gear constraint between two arbitrary 3D shaft axes.

Provides a kinematic gear ratio coupling between rotations about frame_a axis n_a and frame_b axis n_b. The two shafts share a common bearing frame; the joint axes are offset from bearing by r_a and r_b respectively.

  • ratio: gear speed ratio (phi_a = ratio * phi_b)

  • n_a: axis of rotation of shaft a (same coordinates in frame_a, frame_b, bearing)

  • n_b: axis of rotation of shaft b (same coordinates in frame_a, frame_b, bearing)

  • r_a: vector from bearing to frame_a, resolved in bearing

  • r_b: vector from bearing to frame_b, resolved in bearing

  • checkTotalPower: when true, exposes total_power (~0 for an ideal gear; for testing only)

This component extends from PartialTwoFrames

Usage

MultibodyComponents.GearConstraint(ratio, n_a=[1, 0, 0], n_b=[1, 0, 0], r_a=[0, 0, 0], r_b=[0, 0, 0])

Parameters:

NameDescriptionUnitsDefault value
checkTotalPowerfalse
statePriority1
ratioGear speed ratio
n_aAxis of rotation of shaft a (same coordinates in frame_a, frame_b, bearing)[1, 0, 0]
n_bAxis of rotation of shaft b (same coordinates in frame_a, frame_b, bearing)[1, 0, 0]
r_aVector from bearing to frame_a, resolved in bearingm[0, 0, 0]
r_bVector from bearing to frame_b, resolved in bearingm[0, 0, 0]

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)

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

connectors that can be connected together (Frame3D)

Variables

NameDescriptionUnits
phi_bRelative rotation angle of revolute joint at frame_brad
w_bRelative angular velocity of revolute joint at frame_brad/s
a_bRelative angular acceleration of revolute joint at frame_brad/s2
total_powerTotal power flowing into this element (~0 for an ideal gear)

Behavior

Source

dyad
"""
Ideal massless gear constraint between two arbitrary 3D shaft axes.

Provides a kinematic gear ratio coupling between rotations about `frame_a` axis
`n_a` and `frame_b` axis `n_b`. The two shafts share a common `bearing` frame;
the joint axes are offset from `bearing` by `r_a` and `r_b` respectively.

- `ratio`: gear speed ratio (phi_a = ratio * phi_b)
- `n_a`: axis of rotation of shaft a (same coordinates in frame_a, frame_b, bearing)
- `n_b`: axis of rotation of shaft b (same coordinates in frame_a, frame_b, bearing)
- `r_a`: vector from bearing to frame_a, resolved in bearing
- `r_b`: vector from bearing to frame_b, resolved in bearing
- `checkTotalPower`: when true, exposes `total_power` (~0 for an ideal gear; for testing only)
"""
component GearConstraint
  extends PartialTwoFrames()
  bearing = Frame3D() {}
  actuated_revolute_a = Revolute(final n = n_a, render = false)
  actuated_revolute_b = Revolute(final n = n_b, render = false)
  ideal_gear = RotationalComponents.Components.IdealGear(final ratio = ratio)
  gear_support = RotationalComponents.Components.Fixed()
  translation_a = FixedTranslation(final r = r_a, render = false)
  translation_b = FixedTranslation(final r = r_b, render = false)
  structural parameter checkTotalPower::Boolean = false
  structural parameter statePriority::Integer = 1
  "Gear speed ratio"
  parameter ratio::Real
  "Axis of rotation of shaft a (same coordinates in frame_a, frame_b, bearing)"
  parameter n_a::Real[3] = [1, 0, 0]
  "Axis of rotation of shaft b (same coordinates in frame_a, frame_b, bearing)"
  parameter n_b::Real[3] = [1, 0, 0]
  "Vector from bearing to frame_a, resolved in bearing"
  parameter r_a::Length[3] = [0, 0, 0]
  "Vector from bearing to frame_b, resolved in bearing"
  parameter r_b::Length[3] = [0, 0, 0]
  "Relative rotation angle of revolute joint at frame_b"
  variable phi_b::Angle(statePriority = statePriority)
  "Relative angular velocity of revolute joint at frame_b"
  variable w_b::AngularVelocity(statePriority = statePriority)
  "Relative angular acceleration of revolute joint at frame_b"
  variable a_b::AngularAcceleration
  "Total power flowing into this element (~0 for an ideal gear)"
  variable total_power::Real if checkTotalPower
relations
  phi_b = actuated_revolute_b.phi
  w_b = der(phi_b)
  a_b = der(w_b)
  connect(actuated_revolute_a.axis, ideal_gear.spline_a)
  connect(ideal_gear.spline_b, actuated_revolute_b.axis)
  connect(ideal_gear.support, gear_support.spline)
  connect(actuated_revolute_a.frame_a, translation_a.frame_b)
  connect(translation_a.frame_a, bearing)
  connect(translation_b.frame_a, bearing)
  connect(translation_b.frame_b, actuated_revolute_b.frame_a)
  connect(frame_a, actuated_revolute_a.frame_b)
  connect(actuated_revolute_b.frame_b, frame_b)
  if checkTotalPower
    total_power = dot(frame_a.f, resolve2(frame_a.R, der(frame_a.r_0))) + dot(frame_b.f, resolve2(frame_b.R, der(frame_b.r_0))) + dot(bearing.f, resolve2(bearing.R, der(bearing.r_0))) + dot(frame_a.tau, angular_velocity2(frame_a.R)) + dot(frame_b.tau, angular_velocity2(frame_b.R)) + dot(bearing.tau, angular_velocity2(bearing.R))
  end
end
Flattened Source
dyad
"""
Ideal massless gear constraint between two arbitrary 3D shaft axes.

Provides a kinematic gear ratio coupling between rotations about `frame_a` axis
`n_a` and `frame_b` axis `n_b`. The two shafts share a common `bearing` frame;
the joint axes are offset from `bearing` by `r_a` and `r_b` respectively.

- `ratio`: gear speed ratio (phi_a = ratio * phi_b)
- `n_a`: axis of rotation of shaft a (same coordinates in frame_a, frame_b, bearing)
- `n_b`: axis of rotation of shaft b (same coordinates in frame_a, frame_b, bearing)
- `r_a`: vector from bearing to frame_a, resolved in bearing
- `r_b`: vector from bearing to frame_b, resolved in bearing
- `checkTotalPower`: when true, exposes `total_power` (~0 for an ideal gear; for testing only)
"""
component GearConstraint
  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": []
    }
  }
  bearing = Frame3D() {}
  actuated_revolute_a = Revolute(final n = n_a, render = false)
  actuated_revolute_b = Revolute(final n = n_b, render = false)
  ideal_gear = RotationalComponents.Components.IdealGear(final ratio = ratio)
  gear_support = RotationalComponents.Components.Fixed()
  translation_a = FixedTranslation(final r = r_a, render = false)
  translation_b = FixedTranslation(final r = r_b, render = false)
  structural parameter checkTotalPower::Boolean = false
  structural parameter statePriority::Integer = 1
  "Gear speed ratio"
  parameter ratio::Real
  "Axis of rotation of shaft a (same coordinates in frame_a, frame_b, bearing)"
  parameter n_a::Real[3] = [1, 0, 0]
  "Axis of rotation of shaft b (same coordinates in frame_a, frame_b, bearing)"
  parameter n_b::Real[3] = [1, 0, 0]
  "Vector from bearing to frame_a, resolved in bearing"
  parameter r_a::Length[3] = [0, 0, 0]
  "Vector from bearing to frame_b, resolved in bearing"
  parameter r_b::Length[3] = [0, 0, 0]
  "Relative rotation angle of revolute joint at frame_b"
  variable phi_b::Angle(statePriority = statePriority)
  "Relative angular velocity of revolute joint at frame_b"
  variable w_b::AngularVelocity(statePriority = statePriority)
  "Relative angular acceleration of revolute joint at frame_b"
  variable a_b::AngularAcceleration
  "Total power flowing into this element (~0 for an ideal gear)"
  variable total_power::Real if checkTotalPower
relations
  phi_b = actuated_revolute_b.phi
  w_b = der(phi_b)
  a_b = der(w_b)
  connect(actuated_revolute_a.axis, ideal_gear.spline_a)
  connect(ideal_gear.spline_b, actuated_revolute_b.axis)
  connect(ideal_gear.support, gear_support.spline)
  connect(actuated_revolute_a.frame_a, translation_a.frame_b)
  connect(translation_a.frame_a, bearing)
  connect(translation_b.frame_a, bearing)
  connect(translation_b.frame_b, actuated_revolute_b.frame_a)
  connect(frame_a, actuated_revolute_a.frame_b)
  connect(actuated_revolute_b.frame_b, frame_b)
  if checkTotalPower
    total_power = dot(frame_a.f, resolve2(frame_a.R, der(frame_a.r_0))) + dot(frame_b.f, resolve2(frame_b.R, der(frame_b.r_0))) + dot(bearing.f, resolve2(bearing.R, der(bearing.r_0))) + dot(frame_a.tau, angular_velocity2(frame_a.R)) + dot(frame_b.tau, angular_velocity2(frame_b.R)) + dot(bearing.tau, angular_velocity2(bearing.R))
  end
metadata {}
end


Test Cases

No test cases defined.

  • Examples

  • Experiments

  • Analyses