Hi everybody,

and happy new year!

In this first post of 2019 i will talk about something i worked on during the last few months and i am pretty happy about, mainly because, despite being a relatively simple exercise, it produced a very useful tool.

Moreover, this is something I wanted to do (even in such a simplified form) since a very long time, so I am glad I finally could take some time to complete this task.

As the title says, I built up a Lap Time Simulation Tool in Excel and I am refining it little by little, when time allows. It is already able to simulate the performance of a car over a complete lap, basing on the input data and to produce, as an output, plots showing how the most important metrics evolves with respect to traveled distance and some more high level metrics like, lap times, sector times, top speed, etc.

I am in no way a programmer nor an expert in data handling or fitting, so my way is for sure not the most efficient efficient to produce a lap time simulator. Still, as always, I learnt a lot in the process and I am still learning a lot anytime I use it (or I try to solve some bugs or add new features), although the clear limitations of my approach. More about this later.

As the few people reading regularly my blog will most probably know, in general I am more involved with DiL simulations, trying to use simple/cheap tools in the most effective way i can.

So the first question is really: **why a lap time simulation**?

Beside my personal interest in all what is vehicle dynamics and performance simulation and desire since a long time to write my own lap time simulator, the main point of using lap time simulators is that they allow to go through a big amount of iterations in a relative short time, because the tool itself always “drive” the car at the edge of its performance and, in my case, produces results in a few seconds.

The definition of the maximum achievable performance of the car depends on the assumptions we consider for the simulation; the tool i developed, for example, uses a quasi-steady-state approach. Again, more about this in a little while.

As far as I am concerned, a LTS is a very effective tool to go through high level setup decisions, like the aerodynamic configuration most suited for a certain track or to investigate the effects of important physical parameters of the car, like mass (see having more or less fuel on board), or of the track, like grip conditions or different grip conditions in different corners.

Another example that fits very well, is exploring the effects of BoP (Balance of Performance) in terms of lap times, top speed, sector times, etc.

Anyway, depending on how realistic are the assumptions we consider, also a simple tool like mine could also give a relative good indication of the effects of more specific setup choices, like gear ratios (or shifting points), weight distribution, lateral load transfer distribution just to name a few.

Beside this, lap time simulators are also a great help in understanding how it makes more sense to proceed when dealing with a new car or with designing a car from scratch, deciding which compromises can be accepted and which should not.

For more in-depth setup work, surely a DiL simulation could be a better option, because it would also incorporate drivers input and enable to collect his/her feedback about the car or the changes that are being tested.

In my vision, a combination of the two would be very appealing, as they could cover different aspects of the preparation work for a race or a test or allow to explore the effects of changing certain setup parameters at different details levels.

Lap time simulation (as, in general, every form of simulation) is also very useful to verify how good data and assumptions are, for example when building vehicle models for other purposes, like for DiL simulatiors.

With this respect, we can see LTS not only as a predictive tool, but also as a mean to better understand if what we are assuming makes sense against real data/performance or not.

I am not the first attempting a LTS in excel. Already many years ago a guy named James Hakewill published on his website a very detailed article about his attempt of doing a simple tool in excel to simulate the performance of his car around a lap.

His vehicle model was very simple, but his paper was anyway very informative and well written.

More recently, OptimumG has also made a simple lap time simulator available for free for everyone, allowing basic simulations to be run by every user at no cost.

Beside wanting to do my own tool to learn something new, I had the desire to create something more tailored to my needs, but still simple enough to run in excel.

I tried using the (very good) tool released by OptimumG, but in more than an occasion i had the desire to approach some areas differently to what their software allowed and that motivated me even more to try on my own.

**How does it work**?

The core of the solver is based on a point mass approach, this meaning that the car is simulated as a single mass that moves on a specified path.

Its trajectory can be derived from logged data, more specifically from speed and lateral acceleration channels: from them, we can derive the value of the cornering radius over the whole lap. As we will see later on, this is key in calculating the maximum performance achievable by the car in each point of the track.

The “car” accelerates, brakes, corners and does any combination of them always driving at the edge of its steady state performance envelope, with it being defined by the available grip or by the engine power/brakes effectiveness, depending on the situation.

The key elements in solving for the performance on the whole lap are the minimum corners speeds (at the apex): each corner has a point where its radius has a minimum and where we assume that the car is using all of its available grip in lateral direction, without any forward or backward acceleration.

From there, the solver moves forward, accelerating over the next straight (or track section where the car, although still cornering, has still some free grip potential to increase its speed) and backward, braking on the previous straight and corner entry. The braking points are defined by the intersection of this moving forward and backward from corners apex.

The maximum lateral acceleration achievable at the apex is defined by the pure cornering performance envelope, while the combined performance ellipse is used to define how much available grip can be used, beside the already used lateral one, to accelerate and brake the car in transients.

In corners that have a big enough radius to be driven without decelerating the solver still consider the resistance produce by the tires when exchanging with the road the necessary (below car’s performance edge) forces to follow the given path.

The tool also gives the chance to change both global track grip, the grip of each tire (with a multiplier that acts on the tyres data) or the grip of a certain track section.

It also considers four different tires specifications, one for each tire. This allows, for example, to at least directionally take into account the effects of camber on outer and inner wheels grip, for example.

This would not be necessary if I used a Pacejka model, but I wanted to keep this aspect simple and to be free to input the data I need without sticking to sets of Pacejka coefficients.

What differentiates the most my way of solving from other tools that also use a point mass approach is the way the performance envelope is calculated.

What the tool does is calculating the maximum achievable performances analyzing three different scenarios: pure cornering, pure acceleration, pure braking. In all of them, I considered the car moving in steady state; in cornering, for example, this means that the performance envelope is derived considering a net yaw moment equal to zero.

For each scenario, the tool derives the maximum achievable acceleration at several speeds, so to cover each realistic track situation for the car and to consider also the effects of downforce. The most important car parameters, like wheelbase, track width, downforce, drag, weight, weight distribution, CG height, tyres data, total lateral load transfer distribution, brake balance, etc. are considered in defining the simplified vehicle model.

We can say, i am using a glorified point mass approach.

The cornering performance envelope, for example, is calculated using a four wheels vehicle model, where the maximum friction coefficient of each tire is derived using tire data, but also downforce, lateral load transfer, static weight distribution. Each parameter has a direct influence on the maximum achievable centripetal acceleration at each speed (and, hence, the minimum achievable cornering radius).

For sake of simplicity, although considering lateral load transfer distribution, the effects of suspension kinematics are for now ignored.

To combine cornering, acceleration and braking scenarios in a complete performance envelope (a friction ellipse of the car at different speeds) I assumed that said performance envelope has an elliptical shape and, hence, can be described with the ellipse characteristic equation, which is calculated again at several speeds, so to consider how the dimensions of the grip ellipse vary with downforce.

On the other hand, this means I didn’t simulated explicitly combined cornering/braking or cornering/acceleration situations.

This is of course a very strong simplification, but the results not only still seem to make perfect sense physically, but also match relatively well with the real car, above all considering how simple this tool is.

Calculating the performance envelope this way, gives a picture of the effects linked to tires load sensitivity, which include lateral and longitudinal weight transfers, downforce and also all what drives a higher or lower mass, see for example fuel load, despite the solver using a point mass approach. Or, if we switch to tires with a different load sensitivity, the effects will be also reflected in the final performance.

This was something i was very keen about.

As mentioned, this also allows to takes (at least directionally) into account the effects of weight distribution and aero balance.

All car data are entered in a dedicated section of the sheet where all areas are covered. As briefly mentioned, the input data include mass properties, total lateral load transfer distribution, aerodynamics, brakes, transmission (FWD, AWD or RWD), tyres, powertrain (engine power, gearbox efficiencies, ratios, etc).

The results are then plotted and, being in excel environment, creativity is the only limit to how the results can be visualized.

One interesting note about the accuracy of the results, is the importance of the input data used to generate “the track”.

Logged data are often very noisy and, sometimes, we have to be careful about measurement errors, filtering, etc.

Indeed, in my experience, generating the track from logged data is one of the most boring but important task when trying to create and properly use a lap time simulator.

Since the tool explores in every point of the track the maximum achievable performance (under the given assumptions), small errors in the definition of the corner radius vs distance data can generate pretty big mismatches and partially reduce the trust the user can put into deriving trends out of the simulated results.

Anyway, this doesn’t take out to how much can be learned using such a simple tool to understand what affects the performance the most, by how much and, more important, why. In the matter of a few seconds it is possible can go through the effects of very different things: from basic physics parameters like how much grip the track has (or, for example, if it makes more sense to look for lateral or longitudinal grip improvements) to understanding the impact of high level design features (mass, downforce, engine power) or of setup choices (mass distribution, aerodynamic balance, gear ratios, shifting points, etc.). Also very interesting, how the track itself influences the relative effect of each parameter.

Finally, as I mentioned when describing my excel suspension kinematic tool, building up my own tools allows me to make them as flexible as I need, because I am in control of removing or adding the features I consider more useful. And this is something I like a lot!

I am currently using this simple excel LTS pretty often, also to support the simulation projects I am involved with and I am really happy about the results and what I can learn every time.