Racing Line Simulation

P R O J E C T

Simulation of the racing line for the 1st corner at Monza
SKILLS: MATLAB Simulink Path Following Control

As I was unable to implement the racing line reference yaw rate in the Vehicle Dynamics and Control group project, I decided to continue improving it. To generate the reference path, I used splines superimposed onto a Google Earth screenshot of the track (Figure 1). To simplify the problem, I took the reference velocity (Figure 6) from an F1 qualifying lap I found on YouTube instead of trying to optimise an integrated steering and velocity controller.


I then used a Stanley path algorithm to control the vehicle plant (from the MATLAB vehicle toolbox). This involved finding the lateral error using ever expanding concentric circles (Figure 3) until an intersection occurred. It also required the heading error (Figure 4) which was calculated as the angle between a point at a specified look-ahead distance (purple arc) and the current heading direction (red vector) of the car. This resulted in the steering angle input shown in Figure 6.


Since the path is a list of discrete points, this causes discontinuities in the lateral and heading error as the vehicle moves between points which could be causing the variations in the steering angle. However, increasing the number of points increases the computation time of the lookup table, so a compromise between smoothness and computation was required. The simulation was re-run directly with smoothed steering input data and still produce reasonable results (Figure 7,8 & 9).


The biggest source of error is most likely the use of a linear tyre model, which does not consider the non-linearities at high speeds and high steering angles which is exactly the conditions the vehicle is experiencing in the simulation. Also, the plant model does not consider aerodynamics, powertrain or braking dynamics so may not represent the actual car's performance very well. Finally, the path controller was unstable at high speeds, which was solved by always setting the steering angle to zero at velocities above 50 m/s, however this is not an ideal solution as it means long, fast corners cannot be properly simulated.