Simulation

Minimum Lap Time Simulation: F1 at Monaco

MotorsportAnalytical modellingOptimal control

A minimum lap time simulator for Formula 1, implemented in Python and validated against Monaco Grand Prix qualifying data, demonstrating the core vehicle dynamics pipeline from trajectory optimization to GG-diagram interpretation.

Links & Resources

Starting Point

McLaren's head of Vehicle Dynamics Mike Law published a practical 7-step guide to building a minimum lap time simulator. For an aeronautical engineer with a background in helicopter aerodynamics, wind turbine dynamics and automotive drivetrains — but limited prior exposure to slip angles, downforce and GG-diagrams — this was a well-scoped entry point.

Implementation

The simulator was implemented in Python, with post-processing and animation in MATLAB. The total time investment was approximately 20 hours, split roughly equally between modelling and implementation on one side, and data gathering and animation on the other.

The vehicle model is a 3-DOF formulation: a point mass with lateral and longitudinal tyre force limits derived from a simplified Pacejka model. Gear selection is not included in the initial version. The optimizer finds the minimum-time trajectory across a discretized track representation using a direct collocation method.

Initial implementation was on the Circuit de Catalunya with Mercedes W12 data, as this combination had accessible vehicle and track parameters. A follow-up simulation used Monaco circuit data to simulate Senna's 1988 qualifying lap, placed alongside Leclerc's 2024 Monaco qualifier for comparison. Given the model fidelity, this comparison is directional rather than quantitative — but the 1988 car's constraints in cornering and power delivery relative to a modern car emerge clearly.

What the Exercise Demonstrates

For someone approaching vehicle dynamics from adjacent disciplines, the exercise demonstrates that the conceptual framework of lap time optimization is accessible once the essential tyre force model is in place. The GG-diagram provides a physically transparent link between vehicle limits, driving style and lap time. Extensions to higher-DOF vehicle models and more detailed power unit representations are the natural next steps, both of which are pursued in subsequent projects in this portfolio.