Keywords

1 Introduction

Control-oriented vehicle models have seen widespread use for trajectory planning in consumer and motorsport applications. However, many such models have been limited to simple road geometry. This does not adequately capture vehicle behavior for safety-critical or high performance maneuvers and these limitations result from the lack of suitable road models [4].

Early literature [5] developed 3D road models for ribbon-shaped surfaces, which may curve and twist in 3D but are cross-sectionally linear. These works focused on four-wheeled vehicles, not motorcycles in part due to their more complicated dynamics and ability to camber. Later work [3] applied these road models to motorcycles. In [2] the authors developed a general 3D road model applied to cars. In this paper we extend our road model to motorcycles. We develop a procedure to extend [2] to vehicles which do not remain tangent to the road surface. We apply this to a particular motorcycle model which we use to compute racelines: periodic minimum-time trajectories around a 3D racetrack.

This paper is outlined as follows: In Sect. 2 we introduce a kinematic motorcycle model that allows for extension of our road model. We develop motorcycle dynamics and complete the motorcyle model in Sect. 3. We provide an example of the model’s use for raceline optimization in Sect. 4.

Fig. 1.
figure 1

Motorcycle geometry for nonplanar road model.

2 Road Model Extension for Motorcycles

Motorcycles are inherently multi-body systems comprised of wheels, front and rear suspension, rider, chassis, and more [7]. Control-oriented models invariably simplify some components to capture controllable behaviour while omitting finer details. We develop a motorcycle model kinematically similar to [3]. We neglect suspension motion and assume that there exists an axis fixed relative to the chassis of the motorcycle which remains a constant distance above the road: the “camber axis" shown Fig. 1a.

The camber axis will precisely link nonplanar road surface and motorcycle geometry. We use it to introduce a body reference frame along the camber axis and directly below the center of mass (COM), shown in Fig. 1b with the orthonormal basis \(\boldsymbol{e}^b_{1,2,3}\). Similarly, we introduce a motorcycle frame fixed to the motorcycle chassis at the height of the COM with basis \(\boldsymbol{e}^m_{1,2,3}\). We allow the COM itself to move laterally in the motorcycle frame due to rider motion as shown in Fig. 1a.

We follow the tire convention of [6] illustrated in Fig. 2. The tire camber angle \(c^t\) is the angle between the tire plane of symmetry and the body frame vertical \(\boldsymbol{e}^b_{3}\), and the steering angle \(\gamma ^t\) is the angle between the \(\boldsymbol{e}^b_{1}\) direction and the intersection of the tire plane of symmetry with the \(\boldsymbol{e}^b_{1}-\boldsymbol{e}^b_{2}\) plane. These angles are dependent on camber angle c, rake angle \(\epsilon \), and the steering angle \(\gamma \) about the steering axis. We use superscripts \(^f\) and \(^r\) in place of \(^t\) for quantities specific to the front and rear tire respectively.

We assume the rear tire is unsteered, as a result \(\gamma ^r = 0\) and \(c^r = c\). For the front tire, we have [3]:

$$\begin{aligned} c^f &= \sin ^{-1} \left( \sin (c)\cos (\gamma ) + \cos (c)\sin (\epsilon )\sin (\gamma ) \right) \end{aligned}$$
(1a)
$$\begin{aligned} \gamma ^f &= \tan ^{-1}\left( \frac{\cos (\epsilon )\sin (\gamma )}{\cos (c)\cos (\gamma ) - \sin (c)\sin (\epsilon )\sin (\gamma )} \right) . \end{aligned}$$
(1b)
Fig. 2.
figure 2

Tire diagram, with the tire cross-sectioned through its plane of symmetry. Tire camber and steering angle \(c^t\) and \(\gamma ^t\) are positive as shown, and differ from the steering angle of the motorcycle steering assembly and camber angle of the motorcycle body. Tire forces \(F_{x,y,z}^t\) are discussed in Sect. 3.3.

Fig. 3.
figure 3

Road surface model schematic. The surface is defined by \(\boldsymbol{x}^p(s,y)\) and a vehicle reference location with the basis \(\boldsymbol{e}^b_{1,2,3}\) is located at a fixed normal offset n from the surface.

We leverage the 3D road surface model proposed in [2]. With our road model, vehicle position is described by the surface parameterization \(\boldsymbol{x}^p(s,y)\) and normal offset n. Orientation described by angle \(\theta ^s\), and this is shown in Fig. 3. The main results are:

$$\begin{aligned} \begin{bmatrix} \dot{s}\\ \dot{y} \end{bmatrix} &= \left( {\textbf {I}}- n {\textbf {II}}\right) ^{-1} \textbf{J}\begin{bmatrix} v^b_{1} \\ v^b_{2} \end{bmatrix} \end{aligned}$$
(2a)
$$\begin{aligned} \dot{\theta }^s &= \omega ^b_{3} + \frac{\left( \boldsymbol{x}^p_{ss}\times \boldsymbol{x}^p_s\right) \cdot \boldsymbol{e}^p_n}{\boldsymbol{x}^p_s\cdot \boldsymbol{x}^p_s}\dot{s} + \frac{\left( \boldsymbol{x}^p_{yy}\times \boldsymbol{x}^p_s\right) \cdot \boldsymbol{e}^p_n}{\boldsymbol{x}^p_s\cdot \boldsymbol{x}^p_s}\dot{y} \end{aligned}$$
(2b)
$$\begin{aligned} \begin{bmatrix} -\omega ^b_{2} \\ \omega ^b_{1} \end{bmatrix} &=\textbf{J}^{-1} {\textbf {II}}\ \left( {\textbf {I}}- n {\textbf {II}} \right) ^{-1} \textbf{J}\begin{bmatrix} v^b_{1} \\ v^b_{2} \end{bmatrix} \end{aligned}$$
(2c)
$$\begin{aligned} \begin{bmatrix} -\dot{\omega }_2^b \\ \dot{\omega }_1^b \end{bmatrix} &\approx \textbf{J}^{-1} {\textbf {II}}~\left( {\textbf {I}}- n {\textbf {II}}\right) ^{-1} \textbf{J}\begin{bmatrix} \dot{v}_1^b \\ \dot{v}_2^b \end{bmatrix}. \end{aligned}$$
(2d)

Here \(v^b_i\) and \(\omega ^b_i\) are the ISO body frame components of a vehicle’s linear and angular velocity. \({\textbf {I}}\) and \({\textbf {II}}\) are the first and second fundamental forms of \(\boldsymbol{x}^p\), with partial derivatives of \(\boldsymbol{x}^p\) denoted by subscripts. \(\textbf{J}\) is the Jacobian between the body frame and xp. Implicit in this road model is that the vehicle remains tangent to and in contact with the road, for instance that wheelie and stoppie behaviour of a motorcycle is prevented, and that the curvature of the surface is gradual relative to the length of the motorcycle. The former is considered explicitly later in this paper, while the latter is always subjective to the road and motorcycle considered.

For a motorcycle, we apply this to the body frame \(\boldsymbol{e}^b_{1,2,3}\) of the motorcycle introduced in Fig. 1. However, additional variables c and d are necessary to describe its motion and behaviour, necessitating additional dynamic considerations compared to [2], which we introduce next.

3 Motorcycle Model

We derive our motorcycle model as follows:

  1. 1.

    Compute the momentum and time rate of change thereof of the system

  2. 2.

    Use 1) and Newtonian mechanics to obtain net force and moment

  3. 3.

    Equate 2) to the force and moment from tire forces, gravity, and drag

This process results in a differential algebraic equation of the form:

$$\begin{aligned} \dot{z} &= f(z,u,a) & 0 &= g(z,u,a), \end{aligned}$$
(3)

where g captures the force and moment equalities of step 3). u is a set of inputs while z and a are differential and algebraic states respectively. The components of z, a and u are:

$$\begin{aligned} z &= \{s,y,\theta ^s,v^b_{1},v^b_{2},\omega ^b_{3},c,\dot{c},d,\dot{d}\} \end{aligned}$$
(4a)
$$\begin{aligned} a &= \{\dot{v}^b_1, \dot{v}^b_2, \dot{\omega }^b_3, \ddot{c}, F_z^f, F_z^r\} \end{aligned}$$
(4b)
$$\begin{aligned} u &= \{\gamma , \ddot{d},F_x^f,F_x^r\}, \end{aligned}$$
(4c)

where \(F_z^f\) and \(F_z^r\) are the front and rear tire normal forces and \(F_x^f\) and \(F_x^r\) are the longitudinal force of the same tires. Equation () provides \(\dot{s}\), \(\dot{y}\) and \(\dot{\theta }^s\) for \(\dot{z}\). Other elements of \(\dot{z}\) are elements of z, u, or a.

3.1 Net Force from Mechanics

To obtain g we first determine the momentum and rate thereof of the motorcycle, beginning with the position of the COM relative to our reference location:

$$\begin{aligned} \boldsymbol{r}_{\text {com}}= \boldsymbol{e}^m_{3} (h-r) + \boldsymbol{e}^m_{2} d. \end{aligned}$$
(5)

Basis vectors \(\boldsymbol{e}^m_{1,2,3}\) are related to \(\boldsymbol{e}^b_{1,2,3}\) via the camber angle c. Time derivatives of \(\boldsymbol{e}^b_{1,2,3}\) follow from standard rotation theory and \(\omega ^b_{1,2,3}\). These expressions are omitted for brevity. As a result, the linear velocity of the center of mass is:

$$\begin{aligned} \boldsymbol{v}_{\text {com}}= \boldsymbol{v}^b + \frac{d}{dt}\boldsymbol{r}_{\text {com}}= \boldsymbol{v}^b + \dot{c} \partial _c \boldsymbol{r}_{\text {com}}+ \dot{d} \partial _d \boldsymbol{r}_{\text {com}}+ \sum \nolimits _{k=1,2,3}\frac{d}{dt}(\boldsymbol{e}^b_{k}) \partial _{\boldsymbol{e}^b_{k}} \boldsymbol{r}_{\text {com}}, \end{aligned}$$
(6)

where the \(\boldsymbol{r}_{\text {com}}\) derivative was expanded by using the chain rule.

The net force on the vehicle is then:

$$\begin{aligned} \boldsymbol{F} = \frac{d}{dt}\boldsymbol{p} = m\frac{d}{dt} \boldsymbol{v}_{\text {com}}. \end{aligned}$$
(7)

Deriving \(\frac{d}{dt} \boldsymbol{v}_{\text {com}}\) involves one more round of differentiation with additional derivatives of \(v^b_{1}\), \(v^b_{2}\), \(\omega ^b_{3}\), \(\dot{c}\), and \(\dot{d}\) in the chain rule. The result is a single expression with terms that include either \(\boldsymbol{e}^b_{1}\), \(\boldsymbol{e}^b_{2}\), or \(\boldsymbol{e}^b_{3}\). Grouping all terms that include \(\boldsymbol{e}^b_{k}\) then provides the net force on the vehicle in direction \(\boldsymbol{e}^b_{k}\).

3.2 Net Moment from Mechanics

For the angular momentum and net moment on the motorcycle we use a functionally identical approach with two main differences: First, we assume the moment of inertia matrix of the motorcycle and rider remains constant, i.e. rider displacement is small. Second, momentum is contributed by the spin of both the front and rear tires, approximated as:

$$\begin{aligned} \boldsymbol{l}^t = \left( \omega ^t \right) I^t\boldsymbol{e}^m_{2}. \end{aligned}$$
(8)

As in the previous section, deriving the net moment on the motorcycle involves derivatives and may be automated using symbolic algebra on a computer.

3.3 Force and Moment Laws

We complete our motorcycle model by considering several force models.

Gravitational forces on the motorcycle are fully determined by the orientation of the body frame, in turn determined by \(s,y,\theta ^s\) and found in [2].

Aerodynamic forces are often modeled with steady state equations based on vehicle speed, which are straightforwards to consider.

We use the tire model proposed in [6, ch. 11]. Full equations and parameters of the tire model may be found in Equations (11.40) through (11.59) and Table 11.1 of [6]. Longitudinal and normal tire forces are treated as inputs, with lateral tire force a function of these inputs, camber angle, and slip angle of the tire, which follow from variables in z, u, and a, with slip angle defined in [6]. Importantly, the tire forces \(F_{x,y,z}^t\) are relative to the road (Fig. 2) and must be transformed appropriately to the body frame, e.g. the normal force produces a moment about the center of mass when the motorcycle cambers.

In total, we can compute expressions for the net force and moment as a result of tires, aerodynamics, and gravity. We obtain g in (3) by equating these to the force and moment expressions that resulted from mechanics, which completes our vehicle model. Other sources of force and moment may be seamlessly considered by adding additional equations which model their effects.

Fig. 4.
figure 4

Simulated nonplanar racetrack and motorcycle raceline. The graphical motorcycle model was made by Sketchfab user nouter2077 and is CC BY 4.0.

4 Results

The core result of our work is the general road model applicable to motorcycles. To illustrate its use, we computed a raceline for a motorcycle on a racetrack. This is a well-studied problem [3] with the key difference being that our road model allows more general road surfaces to be considered. We set up the surface, motorcycle model, and raceline problem in CasADi [1], which was solved using IPOPT [8].

Racetrack and raceline are shown in Fig. 4. The 650 m long track includes many nonplanar features such as quarter-pipe turns, gullies, and undulating hills. Our method achieved a lap time of 31.1 s, with 33 s of compute time to converge to local optimality on an 11th Gen Intel® CoreTM i7-11800H @2.3 GHz.

5 Conclusion

We extended the interpretation of a general nonplanar road model to apply it to the dynamics of motorcycles. In the process we added considerations for motorcycle camber and rider motion, and their impact on motorcycle dynamics. We discussed how the flexibility of the road model allows more general road geometry to be considered and used our model to generate time-optimal racelines on a complex nonplanar racetrack.