Skip to content
LIBRARY
PacejkaSlippingWheel.md

PacejkaSlippingWheel

Wheel with mass, inertia, and Pacejka magic-formula friction on the flat plane y = 0.

Composes PacejkaWheelJoint and a Body carrying the wheel's mass and diagonal inertia tensor (I_axis about the spin axis, I_long perpendicular). The longitudinal and lateral tire characteristics are set independently through the magic-formula factors Bx,Cx,Dx,Ex and By,Cy,Dy,Ey.

Usage

MultibodyComponents.PacejkaSlippingWheel(render=true, color=[1, 0, 0, 1], radius=0.3, m=1, I_axis=0.06, I_long=0.12, width=0.035, Bx=10, Cx=1.9, Dx=1.0, Ex=0.97, By=10, Cy=1.3, Dy=0.9, Ey=0.97)

Parameters:

NameDescriptionUnitsDefault value
iscutfalse
surfacefalse
angular_stateInclude the wheel's angular state (see PacejkaWheelJoint). Set false on an already-rooted axis to drop the angular state and orientation loop.true
friction_ellipseCouple longitudinal and lateral forces through the combined friction ellipse (see PacejkaWheelJoint). True shares grip; false uses independent curves.true
renderRender the wheeltrue
colorColor of the wheel in animations[1, 0, 0, 1]
radiusRadius of the wheelm0.3
mMass of the wheelkg1
I_axisMoment of inertia of the wheel about its spin axiskg.m20.06
I_longMoment of inertia of the wheel perpendicular to its spin axiskg.m20.12
widthWidth of the wheel0.035
BxLongitudinal magic-formula stiffness factor (initial slope)10
CxLongitudinal magic-formula shape factor1.9
DxLongitudinal magic-formula peak friction coefficient1.0
ExLongitudinal magic-formula curvature factor0.97
ByLateral magic-formula stiffness factor (initial slope)10
CyLateral magic-formula shape factor1.3
DyLateral magic-formula peak friction coefficient0.9
EyLateral magic-formula curvature factor0.97

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)

  • surface_frame - 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
xx-position of the wheel axism
zz-position of the wheel axism
anglesAngles that rotate the world frame into frame_a around the y-, z-, x-axisrad
der_anglesTime derivatives of anglesrad/s

Behavior

Source

dyad
"""
Wheel with mass, inertia, and Pacejka magic-formula friction on the flat plane
y = 0.

Composes `PacejkaWheelJoint` and a `Body` carrying the wheel's mass and
diagonal inertia tensor (`I_axis` about the spin axis, `I_long` perpendicular).
The longitudinal and lateral tire characteristics are set independently through
the magic-formula factors `Bx,Cx,Dx,Ex` and `By,Cy,Dy,Ey`.
"""
component PacejkaSlippingWheel
  frame_a = Frame3D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": 450, "x2": 550, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  # Road-surface frame, exposed only when surface=true (see PacejkaWheelJoint)
  surface_frame = Frame3D() if surface {}
  wheeljoint = PacejkaWheelJoint(final radius = radius, final width = width, final Bx = Bx, final Cx = Cx, final Dx = Dx, final Ex = Ex, final By = By, final Cy = Cy, final Dy = Dy, final Ey = Ey, iscut = iscut, surface = surface, angular_state = angular_state, friction_ellipse = friction_ellipse, render = render, color = color)
  body = Body(final m = m, final I_11 = I_long, final I_22 = I_long, final I_33 = I_axis, r_cm = [0, 0, 0], render = false)
  structural parameter iscut::Boolean = false
  structural parameter surface::Boolean = false
  """
  Include the wheel's angular state (see PacejkaWheelJoint). Set false on an
   already-rooted axis to drop the angular state and orientation loop.
  """
  structural parameter angular_state::Boolean = true
  """
  Couple longitudinal and lateral forces through the combined friction ellipse
   (see PacejkaWheelJoint). True shares grip; false uses independent curves.
  """
  structural parameter friction_ellipse::Boolean = true
  "Render the wheel"
  parameter render::Boolean = true
  "Color of the wheel in animations"
  parameter color::Real[4] = [1, 0, 0, 1]
  "Radius of the wheel"
  parameter radius::Length = 0.3
  "Mass of the wheel"
  parameter m::Mass = 1
  "Moment of inertia of the wheel about its spin axis"
  parameter I_axis::Inertia = 0.06
  "Moment of inertia of the wheel perpendicular to its spin axis"
  parameter I_long::Inertia = 0.12
  "Width of the wheel"
  parameter width::Real = 0.035
  "Longitudinal magic-formula stiffness factor (initial slope)"
  parameter Bx::Real = 10
  "Longitudinal magic-formula shape factor"
  parameter Cx::Real = 1.9
  "Longitudinal magic-formula peak friction coefficient"
  parameter Dx::Real = 1.0
  "Longitudinal magic-formula curvature factor"
  parameter Ex::Real = 0.97
  "Lateral magic-formula stiffness factor (initial slope)"
  parameter By::Real = 10
  "Lateral magic-formula shape factor"
  parameter Cy::Real = 1.3
  "Lateral magic-formula peak friction coefficient"
  parameter Dy::Real = 0.9
  "Lateral magic-formula curvature factor"
  parameter Ey::Real = 0.97
  "x-position of the wheel axis"
  variable x::Length(statePriority = 20)
  "z-position of the wheel axis"
  variable z::Length(statePriority = 20)
  "Angles that rotate the world frame into `frame_a` around the y-, z-, x-axis"
  variable angles::Angle(statePriority = 30)[3] if angular_state
  "Time derivatives of `angles`"
  variable der_angles::AngularVelocity(statePriority = 30)[3] if angular_state
relations
  # Solver guesses for the wheel's generalized coordinates
  guess x = 0
  guess z = 0
  wheeljoint.x = x
  wheeljoint.z = z
  if angular_state
    guess angles = [0, 0, 0]
    guess der_angles = [0, 0, 0]
    wheeljoint.angles = angles
    # See RollingWheel: the derivative relation must live at this level so the
    # high-priority angles/der_angles carry the derivative chain and are
    # selectable as states.
    der_angles = der(angles)
  end
  connect(body.frame_a, frame_a)
  connect(wheeljoint.frame_a, frame_a)
  if surface
    connect(surface_frame, wheeljoint.surface_frame)
  end
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/PacejkaSlippingWheel.svg"},
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 200,
        "rot": 0,
        "attrs": {"font-size": "160"}
      }
    ]
  }
}
end
Flattened Source
dyad
"""
Wheel with mass, inertia, and Pacejka magic-formula friction on the flat plane
y = 0.

Composes `PacejkaWheelJoint` and a `Body` carrying the wheel's mass and
diagonal inertia tensor (`I_axis` about the spin axis, `I_long` perpendicular).
The longitudinal and lateral tire characteristics are set independently through
the magic-formula factors `Bx,Cx,Dx,Ex` and `By,Cy,Dy,Ey`.
"""
component PacejkaSlippingWheel
  frame_a = Frame3D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": 450, "x2": 550, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  # Road-surface frame, exposed only when surface=true (see PacejkaWheelJoint)
  surface_frame = Frame3D() if surface {}
  wheeljoint = PacejkaWheelJoint(final radius = radius, final width = width, final Bx = Bx, final Cx = Cx, final Dx = Dx, final Ex = Ex, final By = By, final Cy = Cy, final Dy = Dy, final Ey = Ey, iscut = iscut, surface = surface, angular_state = angular_state, friction_ellipse = friction_ellipse, render = render, color = color)
  body = Body(final m = m, final I_11 = I_long, final I_22 = I_long, final I_33 = I_axis, r_cm = [0, 0, 0], render = false)
  structural parameter iscut::Boolean = false
  structural parameter surface::Boolean = false
  """
  Include the wheel's angular state (see PacejkaWheelJoint). Set false on an
   already-rooted axis to drop the angular state and orientation loop.
  """
  structural parameter angular_state::Boolean = true
  """
  Couple longitudinal and lateral forces through the combined friction ellipse
   (see PacejkaWheelJoint). True shares grip; false uses independent curves.
  """
  structural parameter friction_ellipse::Boolean = true
  "Render the wheel"
  parameter render::Boolean = true
  "Color of the wheel in animations"
  parameter color::Real[4] = [1, 0, 0, 1]
  "Radius of the wheel"
  parameter radius::Length = 0.3
  "Mass of the wheel"
  parameter m::Mass = 1
  "Moment of inertia of the wheel about its spin axis"
  parameter I_axis::Inertia = 0.06
  "Moment of inertia of the wheel perpendicular to its spin axis"
  parameter I_long::Inertia = 0.12
  "Width of the wheel"
  parameter width::Real = 0.035
  "Longitudinal magic-formula stiffness factor (initial slope)"
  parameter Bx::Real = 10
  "Longitudinal magic-formula shape factor"
  parameter Cx::Real = 1.9
  "Longitudinal magic-formula peak friction coefficient"
  parameter Dx::Real = 1.0
  "Longitudinal magic-formula curvature factor"
  parameter Ex::Real = 0.97
  "Lateral magic-formula stiffness factor (initial slope)"
  parameter By::Real = 10
  "Lateral magic-formula shape factor"
  parameter Cy::Real = 1.3
  "Lateral magic-formula peak friction coefficient"
  parameter Dy::Real = 0.9
  "Lateral magic-formula curvature factor"
  parameter Ey::Real = 0.97
  "x-position of the wheel axis"
  variable x::Length(statePriority = 20)
  "z-position of the wheel axis"
  variable z::Length(statePriority = 20)
  "Angles that rotate the world frame into `frame_a` around the y-, z-, x-axis"
  variable angles::Angle(statePriority = 30)[3] if angular_state
  "Time derivatives of `angles`"
  variable der_angles::AngularVelocity(statePriority = 30)[3] if angular_state
relations
  # Solver guesses for the wheel's generalized coordinates
  guess x = 0
  guess z = 0
  wheeljoint.x = x
  wheeljoint.z = z
  if angular_state
    guess angles = [0, 0, 0]
    guess der_angles = [0, 0, 0]
    wheeljoint.angles = angles
    # See RollingWheel: the derivative relation must live at this level so the
    # high-priority angles/der_angles carry the derivative chain and are
    # selectable as states.
    der_angles = der(angles)
  end
  connect(body.frame_a, frame_a)
  connect(wheeljoint.frame_a, frame_a)
  if surface
    connect(surface_frame, wheeljoint.surface_frame)
  end
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/PacejkaSlippingWheel.svg"},
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 200,
        "rot": 0,
        "attrs": {"font-size": "160"}
      }
    ]
  }
}
end


Test Cases

No test cases defined.

  • Examples

  • Experiments

  • Analyses