The purpose of this work is to generate a solution for an optimal path planning problem on a racetrack. The topic is about can have applications in autonomous vehicles during manoeuvres where the car is evolving at high accelerations. Two different solutions have been developed to build a trajectory over a track with lap time optimisation.
First, to produce tracks for simulation and field testing, a program has been created called TrackBuilder that generates a track. The track is composed of straight lines and fixed radius corners. The radius, angle and direction can be set for each corner as well as each straight-line length. This function also allows to create a model of an existing track. It has been used over the two handling courses to get precise curvature profile to have accurate optimisation results.
An innovative method has been presented using spline trajectories. The first model was only composed of a straight segment and a classic spline. It allows to generate a trajectory for a corner or a short section of a track. The building of an entire path would have needed an extremely high number of variables. To solve this problem, a new method was introduced using Bezier spline, hence the name B-Spline. This model permits to use control points that directly affect the shape of the trajectory. The control points are linearly spaced over the track centreline. They the parameters of the trajectory are the lateral deviation of each point. Based on that a path can be generated. The curve equation is defined as follows.
Then, a function was built to determine if the path fits or not inside the track limits with variables given by the optimization program. If the track does not fit, a penalty value is returned. Finally, the program uses a function that generates a velocity profile inspired by the literature. It is called three passes velocity profile. It generates a profile based on the maximal acceleration of the car. This function has received an upgrade to better model the problem (integration of the rear-wheel drive specification). Different optimisation algorithms have been tested using Optimisation Toolbox of MATLAB. The optimised function takes as input the lateral deviation variables and returns the lap time if the path fits inside the track.
Secondly, a more complex model has been designed to integrate more vehicle’s parameters. It is based on ordinary differential equations (ODE) and uses the OpenOCL interface to implement Casadi non-linear optimisation algorithms. The model is based on literature but also includes significant contributions. It uses a dynamic bicycle model.
The model is defined by state and control variables. The control variables represent the inputs of the model. The states are defined with an ordinary differential equation.
Tire approximation functions have been created over Pacejka and Brush tire model for improved performance of the algorithm. A function to determine the curvature profile around the track has been created. It is essential as the Optimal Control problem is based on the curvilinear abscissa and the curvature of the centreline. A non-linear discretisation of the path has been introduced to preserve the necessary information regarding the curvature and to lower the number of points to increase algorithm performance. The last contributions were based on the vehicle model, where important specifications have been added. The engine model of the car was integrated into the model with a simple polynomial equation. The aerodynamic effect of downforce was included in the model’ equations. Finally, the longitudinal weight transfer phenomenon was incorporated into the model which as a consequence non-constant tire load. The steering robot characteristics from the test vehicle were implemented with its maximum angular velocity and the maximum steering angles.
The vehicle used is a BMW M2 Competition equipped with hardware to enable autonomous driving. Inside the vehicle a DSpace Microautobox was installed, dGPS positioning system and a steering robot. It uses signals from the sensors and forms the CAN of the vehicle to determine the precise state and position of the car to determine the controls.
Track tests were done on the dynamic platform. Three different approaches have been used to validate the feasibility of the trajectories and their velocity profiles. Autonomous driving showed impressive results. A full manual driving on the track helped to validate the velocity profiles for higher velocities. The lap times estimations were coherent with the recorded laps.
To conclude, both optimisation processes showed great results over the validation process. The B-Spline method demonstrates results a little further from reality on the handling course but with very promising results on a smaller track considering the very simple model used. The Optimal Control generated high-quality outcomes for both scenarios.
The predictions of the models were very close to the human driving performance. The work resulted in a lap time optimization algorithm that can be used on both arbitrary track and real track. Some further tests need to be done on full autonomous mode to help determine the overall performance of the algorithms.
This work was supported by MouldTech Kft. and ZalaZONE Automotive Proving Ground.
Written by the Vehicle Dynamics and Control Team