Another update on my MATLAB lap time simulation program. This time I wanted to show more of the details, demonstrate how I can generate a basic tire model from logged data, and show how the simulation compares to that data.
As I mentioned previously I’m using logged data from a driver-in-the-loop racing simulator, but the methods are exactly the same as you would do for real data. The first step is to take the logged suspension forces and accelerations and calculate friction coefficients (mu) for the front and rear tires. Plotting mu vs load for each tire allows me to generate an equation for tire grip and load sensitivity. To keep things manageable I’m using a linear model where the friction coefficient equals a constant plus a load sensitivity term.
For this example I’ve taken logged data from four different tracks and combined them in order to get a robust model. In the plots above the dotted lines are the linear fit from each track, and the solid line is the average of all four. As you can see the data lines up quite nicely (it is from a simulation after all). This car has different tires front and rear, and we see that the rears generate more lateral and longitudinal grip, which makes sense.
The tire model is combined with a number of other parameters to define the vehicle in a MATLAB file. Below is a snapshot of just some of the parameters including chassis, powertrain, and aerodynamics data.
All we’re missing now is the track data. This is a fairly straightforward process where the track radius is calculated from the logged velocity and lateral acceleration. I also have a process for adding local grip corrections to the track, which significantly improves the correlation between simulated and logged data.
The end result is shown below (speed, RPM, gear, throttle, brake), with simulated data in blue and logged data in pink — not perfect, but pretty close!
Ride heights also match fairly well:
With the baseline model completed, I can now use the program to simulate different setup changes and get an idea of how they affect performance and stability (more on this next time).