---
url: /dyad/stable/stdlib/MultibodyComponents/components/PacejkaSlippingWheel.md
description: >-
  Dyad PacejkaSlippingWheel docs.  Wheel with mass, inertia, and Pacejka
  magic-formula friction on the flat plane y = 0.
---

# `PacejkaSlippingWheel` {#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 {#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: {#Parameters:}

|               Name |                                                                                                                                            Description | Units | Default value |
| ------------------:| ------------------------------------------------------------------------------------------------------------------------------------------------------:| -----:| -------------:|
|            `iscut` |                                                                                                                                                        |     – |         false |
|          `surface` |                                                                                                                                                        |     – |         false |
|    `angular_state` |         Include the wheel's angular state (see PacejkaWheelJoint). Set false on an already-rooted axis to drop the angular state and orientation loop. |     – |          true |
| `friction_ellipse` | Couple longitudinal and lateral forces through the combined friction ellipse (see PacejkaWheelJoint). True shares grip; false uses independent curves. |     – |          true |
|           `render` |                                                                                                                                       Render the wheel |     – |          true |
|            `color` |                                                                                                                       Color of the wheel in animations |     – |  \[1, 0, 0, 1] |
|           `radius` |                                                                                                                                    Radius of the wheel |     m |           0.3 |
|                `m` |                                                                                                                                      Mass of the wheel |    kg |             1 |
|           `I_axis` |                                                                                                     Moment of inertia of the wheel about its spin axis | kg.m2 |          0.06 |
|           `I_long` |                                                                                          Moment of inertia of the wheel perpendicular to its spin axis | kg.m2 |          0.12 |
|            `width` |                                                                                                                                     Width of the wheel |     – |         0.035 |
|               `Bx` |                                                                                            Longitudinal magic-formula stiffness factor (initial slope) |     – |            10 |
|               `Cx` |                                                                                                                Longitudinal magic-formula shape factor |     – |           1.9 |
|               `Dx` |                                                                                                   Longitudinal magic-formula peak friction coefficient |     – |           1.0 |
|               `Ex` |                                                                                                            Longitudinal magic-formula curvature factor |     – |          0.97 |
|               `By` |                                                                                                 Lateral magic-formula stiffness factor (initial slope) |     – |            10 |
|               `Cy` |                                                                                                                     Lateral magic-formula shape factor |     – |           1.3 |
|               `Dy` |                                                                                                        Lateral magic-formula peak friction coefficient |     – |           0.9 |
|               `Ey` |                                                                                                                 Lateral magic-formula curvature factor |     – |          0.97 |

## Connectors {#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`](/stdlib/Dyad/connectors/Frame3D#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`](/stdlib/Dyad/connectors/Frame3D#Frame3D))

## Variables {#Variables}

|         Name |                                                                 Description | Units |
| ------------:| ---------------------------------------------------------------------------:| -----:|
|          `x` |                                                x-position of the wheel axis |     m |
|          `z` |                                                z-position of the wheel axis |     m |
|     `angles` | Angles that rotate the world frame into `frame_a` around the y-, z-, x-axis |   rad |
| `der_angles` |                                                Time derivatives of `angles` | rad/s |

## Behavior {#Behavior}

## Source {#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
  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
  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)
  "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
```

```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
  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
  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)
  "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 {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses
