Keywords

1 Introduction

In recent years, the field of autonomous vehicle technology has expanded into motorsport, with racing competitions like the Indy Autonomous Challenge and the Abu Dhabi Autonomous Racing League demonstrating the capabilities of these vehicles in extreme scenarios and serving as a challenging technology development platform. A critical aspect in the evolution of autonomous vehicles is the control of vehicle dynamics at the limit of handling, especially in high-speed and complex driving conditions that exceed the capabilities of average drivers.

Current literature in vehicle dynamics control predominantly focuses on lateral dynamics due to its significant impact on vehicle stability, particularly for commercial vehicles.

Most relevant works [1,2,3] focus on simple feedforward and feedback steering controllers, which guarantee the tracking of a reference path and the damping of yaw oscillations. For instance, in [1] feedback corrections are applied according to the slip of the wheels, while in [2] the feedback is computed as a desired front steering force and then converted to a steering angle through the inversion of the tire force model. A different approach is followed by [3], which is to impose the tangency of the vehicle sideslip to the reference trajectory.

More advanced lateral controllers are proposed in [4,5,6], mainly based on optimal control and Model Predictive Control (MPC), devoted to the stabilization of vehicle at the limit of handling and intended for collision avoidance and driver assistance systems. Control algorithms for combined lateral and longitudinal dynamics are presented in [7, 8], addressing the case of high-performance applications. These two studies present a hierarchical control structure with two optimization-based algorithms that addresses both the planning of the trajectory and the control of the vehicle. The higher-level controller computes the optimal path and speed profile, while a lower-level MPC optimizes the actual control actions online over a shorter horizon with a more complex vehicle model.

In this paper, an MPC controller for trajectory tracking of high-performance autonomous vehicles is presented. The algorithm is designed for controlling both the lateral and longitudinal dynamics of the vehicle on a racetrack, following a given path and speed profile. These are assumed to be provided by an external planner or available from a precomputed database. The controller is also able to manage actuation dynamics and delays. Finally, the algorithm is implemented in real time and its simulation results are briefly discussed in Sect. 4.

2 Control-Oriented Vehicle Model

Fig. 1.
figure 1

Force-input bicycle model in Frenet frame.

The vehicle model implemented in the controller must achieve a delicate balance between accuracy and low complexity to ensure the feasibility of real-time solution of the MPC optimization problem.

The chosen model is based on an Affine-Force-Input (AFI) single-track nonlinear bicycle model, inspired by [9]. The inputs of the model (i.e. the outputs of the MPC optimization) are the forces at the wheels, which are used to compute the actual vehicle inputs, as explained in Sect. 3. This method removes the tire force nonlinearities from the vehicle model, thus reducing the complexity of the MPC optimization.

The position of the vehicle is expressed in a Frenet frame centered on the closest point of the reference path, while the velocities are expressed with respect to the vehicle local reference frame, as shown in Fig. 1. The inputs of the model are the longitudinal tire forces \(F_{x,f}\), \(F_{x,r}\) and the lateral force generated by the front tires \(F_{y,f}\).

The final equations of the vehicle model read as

figure b

where, the curvature of the path k(s) is available from the knowledge of the reference trajectory. The lateral force on the rear tire \(F_{y,r}\) is modeled using Pacejka’s Magic Formula [10], while the drag force \(F_{drag}\) and the downforce are expressed as quadratic functions of the longitudinal speed.

3 MPC Implementation

The complete architecture of the controller consists of the following components:

  • The input interface computes the initial conditions of the MPC problem, starting from the global position of the vehicle, the information on the reference trajectory and the last solution of the optimization problem.

  • The Model Predictive Controller implements the vehicle model presented in Sect. 2, linearized around the operating point of the previous solution, and a first-order approximation of the actuators’ dynamics. It computes the optimal inputs which minimize a given cost function, while satisfying a set of constraints.

  • The output interface converts the optimal control actions computed by the MPC, which are expressed in terms of forces, into real vehicle inputs that can be actuated on the car, i.e. throttle, brake and steer commands. This is achieved by inverting the engine map, the brake characteristics and the nonlinear tire model, respectively.

Fig. 2.
figure 2

Overall architecture of the controller.

3.1 Actuation Delays Compensation

The MPC implements a delay-free first-order approximation of the actuators’ dynamics. However, the actuators may also present not negligible time delays. To account for them, a simple compensator is implemented as follows.

Let \(\tau \) be the actuation time delay. At every iteration of the controller, instead of initializing the MPC problem with the measured state x(t), the initial state is set to \(\hat{x}(t+\tau )\), which is obtained with an open loop integration of the nonlinear model described by Eqs. (1a)–(1f), from the measured state x(t). Hence, the first element of the resulting MPC optimal solution contains the actuator reference signals that compensate for time delays.

3.2 MPC Optimization Problem

The MPC optimization is formulated as a separable multistage quadratic problem, where the optimization variables are a set of N vectors, each one corresponding to a single time step in the prediction horizon.

$$\begin{aligned} \min _{z_1,\dots ,z_N} \quad \sum ^N_{k=1} \frac{1}{2}z_k^T H_kz_k + f_k^T z_k \end{aligned}$$
(2)

Each component of the sum involves quadratic penalties on the lateral error, the lateral error derivative and the control action variations, while a negative linear term maximizes the vehicle speed.

Maximum values for the lateral error and the input forces are imposed through lower and upper bound constraints. The adherence of the state variables to the model dynamics and the maximum absolute speed are represented by nonlinear constraints, which are linearized around the predicted operating points of the last MPC solution and implemented as linear inequalities.

4 Real-Time Simulation Results

The presented controller is implemented in , using OSQP [11] as the solver for the optimization problem, and tested within a real-time hardware-in-the-loop (HIL) simulator, conducting autonomous laps around various racetracks, adhering to a predetermined racing line and speed profile. The simulated vehicle is a Dallara AV-21, a 470-horsepower autonomous racecar derived from the single-seater Dallara IL-15, designed for the Indy Lights championship. Its most relevant geometric parameters are reported in Table 1.

Table 1. AV-21 parameters.

The real-time implementation of the algorithm enables its execution on a standard high-end Linux laptop with a 6-core 2.2 GHz CPU and 16 GB of RAM. The computation time during the simulations is always below 40 ms, allowing a prescribed execution rate of 25 Hz, with N = 30 steps in the prediction horizon. As in Fig. 3, the results of the simulations at the Monza Circuit show excellent tracking performance, achieving less than 0.6 m of lateral error, while reaching speeds up to 280 km/h and lateral accelerations up to 1.7 g.

Fig. 3.
figure 3

Lateral and longitudinal tracking performance, lateral acceleration and actuators usage during a HIL simulation at the Monza Circuit.

5 Conclusions

This paper presents a MPC controller for the integrated control of lateral and longitudinal dynamics of a high-performance autonomous vehicle. The accuracy of the vehicle model allows to achieve excellent results in a realistic simulation environment, even in demanding scenarios such as driving at the limit of handling. Also, the feasibility of a real-time implementation is demonstrated by the low execution time of the algorithm on standard hardware. Future work will focus on the experimental validation of the controller on a real-world setup.