Race Optimal creates optimized racing lines based on simulated laps for different vehicle types. This is a superior approach to those based on optimizing only the geometry of the racing line (for minimal curvature, for example) because many corners require an approach that is partly determined by vehicle dynamics (power, grip, downforce, etc.). And, for different vehicles, no single line will be the best for both. On this page, you can read about the physics that go into predicting vehicle lap times.

Lap Simulations

Each lap starts with a path that is generated from a given set of control points. Race Optimal currently conducts optimizations in 2D, but 3D analysis will be incorporated in the future. An example of the control points and resulting line is shown below. Although the control points look somewhat chaotic, the result is a smooth curve. The genetic algorithm operates on these control points, shifting them around until the line with the best lap time is produced.

Calculate fastest possible speed at every point on the path, based on instantaneous radius of curvature

Adjust the acceleration so that it does not exceed what is available from the engine and tires

Adjust the braking so that it does not exceed what is available from the tires and aerodynamic drag

Although the first step may sound like gibberish, the idea is simple. At every point on a path, there is a circle that fits perfectly into the path at that point. The radius of that circle is the instantaneous radius of curvature, as shown in the drawing below (for a straight line, the radius is equal to infinity). The fastest possible speed at that point is equal to the speed the vehicle could travel around that circle without losing traction, limited by the vehicle's top speed.

Figure 2.Instantaneous radius of curvature (dashed line). In 2D, lateral grip is dependent only on downforce, vehicle weight, and coefficient of friction. In 3D, track camber and curvature must also be taken into account.

The resulting speed distribution is shown in Figure 3 below. As you can see, the acceleration and braking zones are extremely steep, and there are several periods where the vehicle is pegged at its top speed. This is clearly unrealistic, and requires some adjustments to represent the real behavior of the vehicle. Step 2 in the simulation is to limit the acceleration according to the available traction, engine power, and aerodynamic drag. Instead of modeling actual gear shifts, accelerative force is assumed to vary inversely with speed, as if the vehicle has a constantly variable transmission (CVT). The result of this correction is the green line in Figure 3.

Figure 3.Uncorrected vehicle speed, and corrected for acceleration.

In Step 3, similar corrections are employed for the braking zones, as shown in Figure 4. The result is a speed distribution that very closely simulates the actual vehicle's capabilities. The gray and blue dashed lines show that the lap starts and ends at the same speed, and connects smoothly to itself.

Vehicle Types

For each circuit analyzed by Race Optimal, racing lines for four major vehicle types are displayed.

The first vehicle type is the Mazda Miata. Long beloved as a "driver's car," Miatas riddle race tracks around the world, and Spec Miata is a popular and accessible racing series in the US. The Miata represents the (sorely) underpowered track vehicle.

The second vehicle type represents the very fast track car, embodied by the Porsche 911 GT3 RS 4.0. It has tons of power, and puts down over 400 pounds of downforce at top speed. It's also fairly popular, and there is a lot of footage from this and similar cars available online.

To represent two-wheeled vehicles, a motorcycle vehicle class is used that doesn't model any one bike in particular. Unlike the four-wheeled types, the motorcycle can ride all the way to the edges of the track, but has slightly lower overall traction and cornering grip. This reflects the fact that most riders are less likely to approach the traction limits than the car drivers of an equivalent skill level. The power level is meant to be slightly faster than a 600cc sportbike, but not as fast as a 1000.

Finally, the fourth vehicle class, the über class, the Formula 1 car. F1 lines are shown in order to provide insight into the different approaches required for vehicles with high downforce and massive power. They might also be helpful to some of those in the video game crowd.

Vehicle Model

There are four essential parameters that account for the majority of a vehicle's performance in the simulation. They are:

Reference Acceleration — arefMaximum forward acceleration of the vehicle at the reference speed of 80 MPH (130 KPH) assuming unlimited grip. This is an important point for the F1 car, which has more power available than it can use at that speed.

Top Speed — vmaxVehicle top speed, assumed to result from aerodynamic drag rather than gearing limits.

Tire Friction Coefficient — μFriction coefficient between the tires and track. With μ of 1.3, a 1000 pound vehicle can theoretically produce 1300 pounds of force in any given direction before exceeding the traction limit of the tires. High coefficients of friction are used in order to simulate vehicles equipped with race tires.

Downforce — FDFDownforce (in pounds) generated at a given speed.

Table 1. Primary vehicle parameters for the four basic types.

Miata

GT3 RS 4.0

Motorcycle

F1

aref (ft/s2)

8.07

17.7

24

85

vmax (MPH)

130

195

164

194

μ

1.3

1.3

1.2

1.73

FDF (lbs)

0

426 @ 193 MPH

0

2750 @ 150 MPH

Additional parameters are incorporated to limit grip during acceleration, turning, and braking, in order to bring some more accuracy into the vehicle dynamics. Finally, a simple model for the drag that results from tire slip is also utilized.

Well, did you make it this far? If so, I'm impressed. That concludes our introduction to the physics behind Race Optimal. If there's anything about which you want to know more, or think was explained badly, please let us know and we'll do our best to address it.