Posted by: drracing | January 24, 2020

Lap Time Simulation – The Rise of MATLAB

Hi everybody!

Happy new year! First post of 2020 but an old topic. Sometimes old stuff is good.

Once again, Matlab will be a keyword, as today I will talk about the latest updates i have done to my Lap Time Simulation tool.

As some of you (who succeeded in reading my previous entry till the end, without falling asleep) probably already know, I wanted to build up on the base I created already, introducing a more complete/complex vehicle model.
The foundation the tool is based on still remains the same, anyway. The solver employs a quasi steady-state approach and the overall performance of the car over a lap is derived basing on a performance envelope (or g-g-v map) calculated upfront, now also considering all the new vehicle parameters.
As described already in my previous entry, some simplified assumptions has been accepted, for example regarding the way combined grip situations are handled. I employ a four wheels vehicle model: each tire final friction coefficient is calculated separately taking into account the vertical load acting on it and, now, as we will see shortly, also its camber angle.
The tool actually derives car’s performance envelope in pure cornering, pure braking and pure acceleration and then combined them building an ellipse. As i mentioned already before, this is of course a strong simplification, but it proved to produce pretty accurate results anyway.
As before, solving the full lap the tools first determines the maximum speed the car can achieve at each corner apex and then moves forward and backward to calculate braking and acceleration phases.

The main aim for this latest revision was to consider also the effects of suspensions kinematics and stiffness and of full aeromaps on car’s performance over a lap (or a course). The tire model has also undergone a revision and now includes vertical stiffness, centrifugal expansion and camber effects on grip in both lateral and longitudinal direction. All these parameters are strongly linked to each other: for example, both camber angles and car’s aerodynamics are influenced by suspensions and tires vertical stiffness.
During the process, I also added some other small features here and there, either to expand a bit what the tool can do (I included, for example, the possibility to do a simple, straight line simulation) or to make it easier to use.
Moreover, a nice side effect of adding body movements is that I can now also monitor how the CG height changes during a lap (or specific maneuvers) and how this impacts performance.

What is new?

Nearly all tabs have a new appearance and some completely new ones were added, to deal with the information required to feed the more complex vehicle model.
At cost being repetitive, I have to say once again i really like working in Matlab and, in particular, in the App Designer, as designing a functional GUI and linking code to each feature is relatively easy.

Main Data and Setup
As before, the first tab deals with car’s main dimensions, its mass and mass distribution, CG Height and “fixed” parameters like brake balance or which portion of the engine power is transmitted to the rear wheels.
Here, I also added the maximum steering angle the car can achieve. No Ackermann effects are considered for now and the tool works under the assumption of constant parallel steer and no static or dynamic toe, both for the front and for the rear axle.
The aerodynamics section is now gone, as aerodynamics can be defined in a different window, where full aeromaps can be loaded.
Anyway, this tab is now used to also input car’s full setup, which includes:

  • Static ride heights
  • Corners wheel rates
  • Corners bump stops free gaps
  • Third springs wheel rates
  • Third springs free gaps
  • Third elements bump stops free gaps
  • Antiroll bars stiffness
  • Front and rear, corners and third elements bump stops curves (defined as force vs displacement look-up tables in an Excel file)
  • Static camber

All these parameters (except camber) are used to calculate corners wheel rates, axle vertical rate and roll rate in each calculation step. This is the reason why we don’t need a TLLTD (total lateral load transfer distribution) input anymore and this line is also gone now: loads and load transfers are calculated basing on suspension elastic elements, suspension kinematics, acceleration and aerodynamic forces.
Very basic, but also very useful features are covered by the two buttons at the bottom of this page. Th data relative to the whole car (including information coming from external sources, i.e. Excel files) can be saved and reloaded any time.




Suspension kinematics
This is the first new tab.
Here, I can load up front and rear suspensions and steering kinematics. This is actually nothing particularly fancy, mainly because suspension kinematics is here described simply using tables. If i am not mistaken, this approach is often described as “lumped parameters”: the solver doesn’t compute the parameters of interest at each time step basing on the initial pick-up points position and full suspension kinematics, but simply uses as input the results produced using an external suspension kinematics tool.
For front and rear suspensions, the input is an Excel file (so, again, a simple look up table), that contains data relative to the metrics required by the solver, with respect to wheel travel. These include:

  • Camber
  • Lateral anti effects
  • Longitudinal anti effects (in traction and in braking)

Anti effects are calculated using the approach i described some time ago, when talking about load transfer (here), which means considering n-lines inclination.
Steering kinematics can be defined in a similar manner, again using an Excel file where camber angles of inner and outer wheels and wheels vertical movements are monitored with respect to steering angle.
Once again, some of the features of Matlab App Designer come handy here, as the data relative to each axle can be plotted by using a pop-up menu button.
A final, important input here are also the design ride heights, i.e. the ride height that corresponds to zero wheel travel in the look up table.


Susp Kin


The Aero tab is also new.
As i shortly mentioned before, the solver works now basing on full aeromaps, providing downforce and drag coefficient and aerodynamic balance with respect to front and rear ride heights. This is enabled by having both suspensions modeled, as the way ride heights (and body position in general) change under external loads depends on suspension and tire properties.
As for the bump stops, I felt the easiest way to input aeromaps (which are basically tables) is, again, in the form of an Excel file.
With three buttons, I can call up a map for each of the above mentioned parameters. Each map can be plotted with respect to front and rear ride heights.




Tires have also undergone some work, mainly because having suspension motion opened the door to modeling some important parameters, like camber. Also modeling how rolling radius change with respect to load and speed is now necessary to complement aerodynamics calculations and required some further input, so the tire tab is now pretty busy!
Suspension kinematics files include, as we have seen already, how camber change with respect to wheel travel and steering angle. I also mentioned how a static camber value must be input in the setup panel and how the design and static/setup ride heights are also considered.
With these data, the solver now can calculate how much camber each tire has in each situation, depending on suspension travel, tires deflections, overall body movements and steering angle.
Having the inclination angle of each wheel opens the door to modeling the effects of camber on grip.
The new tire model is a pretty simple evolution of the one i used already and is still based on a simplified, Pacejka-like approach.
Its foundation is still based on load sensitivity: each tire maximum achievable grip coefficient is calculated basing on the vertical load acting on it. As before, it is also still possible to apply an overall grip correction to front and rear tires separately, in either lateral and longitudinal direction.
Tire slip is represented by a normalized curve that is then reworked by the solver basing on peak slip angles input.
Rolling resistance is still considered as a single coefficient for each tire, but now we have also several parameters used to model tire vertical dynamics.
A static tire radius “R0” is now required, together with a vertical stiffness, which is assumed to remain always constant. Beside this, the user can input two coefficients of a quadratic curve that describe how rolling radius evolves with respect to speed.
These two effects, combined together, result in the instantaneous rolling radius of each tire in each simulation step.
Lastly, the tool considers camber effects on both lateral and longitudinal grip in the form of a multiplier, that acts on top of each tire coefficient of friction.
To calculate the multiplier in lateral direction, three vertical loads must be provided and, for each of these loads, the peak camber angle for the multiplier and its magnitude. Quadratic curves are derived basing on these data and, for each given vertical load and camber angle of each tire, a multiplier is obtained and tire final grip (on top of the values calculated basing on vertical load and load sensitivity) can be calculated.
In longitudinal direction, the approach I use is slightly easier. The tool assumes a grip correction of tires friction coefficient that only depends on camber angle and doesn’t change with respect to vertical load.
Camber multipliers are of course equal to zero, for a zero camber angle.




Virtual Wind tunnel
This is also a new tab. The tool performs a scan of some important metrics with respect to speed. For each speed step, the car is assumed to be in steady state, with constant velocity (no longitudinal acceleration and associated load transfer). In my vision, this is pretty much what we would experience if the car would be tested in a wind tunnel at each velocity step we consider.
Among the results, we have ride heights, tires loaded radius, suspension deflections, tires deflection, aerodynamic coefficients and balance.
The results of this scan not only gives a clear picture of car’s attitude depending on speed and of each contribution to final ride heights with respect to speed (and downforce), but also provide data that will be used elsewhere by the tool to build up car’s performance envelope and predict its performance.
Pretty interesting, too, this functionality gives also shows how downforce, drag and balance coefficients evolve depending on speed.
The solver takes into consideration each parameter having an influence on vertical stiffness and ride heights, like springs or tire stiffness, tire expansion with speed, but also each bump stop curve and its free gap.
An additional element in this tab is a quick calculator, providing the values of downforce and drag coefficients and aerodynamic balance, depending on front and rear ride height. This actually doesn’t add any new information to what the plot delivers, but I thought it could be practical to visualize actual numbers on the go, depending on front and rear ride heights input by the user.


Virtual WT


Engine, Gearbox and Performance Envelope
As I mentioned at the beginning, some functions didn’t change, as i felt they were already delivering what they should. This is the case for engine and gearbox.
One thing to mention with regards to the final gear ratios, as calculated by the solver, is that the new, more detailed tire model has also an influence in this area. As the solver is now in a position to calculate tires rolling radii at each time step, basing on initial, unloaded tire radius, tire vertical stiffness and centrifugal expansion, now the calculation of the RPM corresponding to a certain speed should be much more accurate.





Also performance envelope tab didn’t change. In this section, I can define the boundaries of the g-g-v diagram (speed) and generate the envelope independently from full lap simulations, if i need it.
What is new here are the metrics that can be plotted. As the model is built on many more parameters, the tool generates also more results that can be use to understand the influence of speed and acceleration on every subsystem.
In other words, i now have a long list of channels i can plot with respect to speed, or lateral/longitudinal, like suspension travels, ride heights, steering angle, body slip angle, etc.


Perf Env


Straight line simulation
Another new tab. In this section of the tool I can perform pure straight line simulations, strictly based on all the available car data we described before.
This can come handy to do quick evaluations not only of typical powertrain-related parameters, like engine power, gear ratios, etc., but also enables evaluations about how other metrics change with respect to speed and acceleration (see for example ride heights).
It also offers a way to quickly evaluate assumptions made in terms of drag, engine power, gear ratios, etc. in terms of straight line performance, without the need for a complete lap simulation.
The numerical outputs include the time the car needs to cover a certain distance (starting from a certain speed), final speed, gear used and RPM achieved at final speed.
The plot window, on the other hand, allows to visualize a set of channels (Gears, acceleration, ride heights and aerodynamics metrics) together with a speed plot.


Straight 1


Track generation, simulation and analysis
No revolutions in the remaining tabs, but some small additions.
I included the possibility to visualize both closed and open circuits/courses. I don’t think i will deal with hill climb racing anytime soon, but I thought “why not”. You never know!


Track map
As a consequence of the expanded vehicle model, the post-processing plots grow significantly in number and I can now look at any parameter the solver computes, when calculating car performance. This includes basic data, like speed, accelerations, gears, steering angle, RPM, yaw rate but also some more “advanced” stuff, like ride heights, suspension travel, vertical loads (hence also load transfer), tires deflections, camber angles, anti effects, tires and body slip angles, aerodynamics coefficients, etc.
Such a big amount of channels also stimulated the desire to be in a position to manipulate them using math formulas or, in other words, writing math channels. It made no sense to write and include in this tool a proper data analysis module: this would have taken a long time, a big effort, most probably to produce something that would not be even close to professional packages available on the market (sometimes even for free, in their easier versions).

Res - RH

Res - Vert Loads

Res - Camber

Res - track map


As my tool can export simulation results to an Excel file, i looked for data analysis packages that allow to import text files written in standard formats (like CSV or ASCII). To my surprise, there are really few software that enable this functionality for free. Some of them are actually pretty basic tools and this made them a bit unattractive for me. The only, really professional software (although many would probably say it is not really user friendly) with this feature I found is WinDarab, from Bosch Motorsport.
I used it for some years, back when i worked on Formula 3 cars (the tool was mandatory in the class, for the cars fully respecting FIA Spec). My last go with it was in 2008, I think. Heck, I am getting really old!
The latest version of it looks a bit different than what I remembered, but it still works similarly and is pretty capable, in my opinion.
The good thing about using a professional analysis software for data analysis, is that you can create potentially all kind of plots and mathematical channels, easily comparing data of different runs with each other and, potentially, also with external data coming from other simulation packages or a data logger.




The only negative effect of the tool being expanded as i described here, is that the computational time required to simulate a lap increased sensibly.
I am right now at a point where, to simulate a lap of an LMP like car, the tools takes a very slightly bigger time than the simulated lap time (about 1-2% more).
This surely depends, at least partially, on the code not being really optimized yet; there are indeed a couple of things I would like to test, with the aim to improve it a bit and reduce the computational time.
Anyway, an important factor is also the type of car being simulated and the performance envelope boundaries being used (a car reaching higher top speeds, for example, may require to consider a bigger speed window for its performance envelope and, potentially, more time).
A certain amount of “points” (speed) in building the g-g-v map are required to make the simulation robust, but the accuracy of simulation results seems not to be that affected by the number of said points, as far as i could see, while the computational time is.
To get a feeling, reducing the number of points from 21 to 16, produced a reduction of the computational time of about 16%, with a difference in the calculated lap time between the two case studies of only 0.04%.
My feeling is that the tool could be made faster by further working in this direction, if required, even without any specific further optimization in terms of coding.

Despite these latest updates, this lap time simulator is still a pretty easy tool, that uses some important, simplified assumptions and could surely still be optimized in many ways.
Nonetheless, this project has been an incredible experience until now and I am extremely happy I decided to get into it. As I mentioned in my latest entry already, the more I dig into it, the more I can see how the methods I employed to deal with some areas are pretty similar to what other, more clever people did already in the past: even being some 20 years late, it is kind of reassuring to learn that you are coming to the same conclusions of people you have an high opinion of.
I am pretty satisfied about the accuracy of the results and the use I can do out of the tool, above all with addition of the latest features.
Beside this, looking back there are so many “issues” I could not foresee at all, when I started. All this small stones on my way have been actually a great chance to dig deeper into certain topics and improve my understanding of certain phenomena. I still have a long way and a tons of things to learn in front of me, but I really look forward to this.
Finally, it is really cool to have something you can fully adapt to your needs, with the only real limit being your programming skills, something I am keen to go on improving.

Nice times behind and, more importantly, ahead!


Edit: a few days after publishing this article, I could not resist but try to speed up simulation a bit. I further reduced the number of points used to generate the g-g-v map from 16 to 11 and got a further reduction of the computational time of about 16.5%, with a lap time delta of 0.025%. The solver can now compute the same lap I considered before quicker than “real time”: in other words, the tool now takes about 94% of the computed lap time to complete the simulation.

Posted by: drracing | October 18, 2019

Lap Time simulation – The MATLAB awakens

Hi everybody!

Before digging into today’s topic, just a quick note.
This year i had the chance again to write for the magazine “24 Hour Race Technology”. The magazine is out since some weeks now and contains two articles i wrote: one is a summary / analysis of the simulation work i did with CORE Autosport and Jeff Braun in 2018; i explain the approach we used, the tools we employed and the topics that proved to be more important in terms of results.
The second article is about a study i did still using my Excel lap time simulator (that is now outdated, more about this later in this post) and deals with LMP1 cars in Le Mans. I analyzed what difference certain parameters produce in terms of performance and then I dug deeper into setup optimization, working on different areas of the car.
You should definitely buy the magazine! Here you can find this year issue.



Ok, now back to what I want to talk about today.

My last post here was about me switching to Matlab for the tools I built and use for my projects.
Back then I wrote a bit about bringing into Matlab my suspension kinematics tool. This was surely a very interesting exercise: on one side it offered a chance for me to (re)establish a connection with Matlab itself (dealing with a topic I knew already); on the other side, there are some areas where Matlab is surely easier and faster than Excel, because a bit part of the necessary / engineering interesting math is already built in.
Anyway, I am still convinced that a suspension kinematics tool is probably not the best exercise to showcase what can be done in Matlab, so i soon moved to Lap Time Simulation. This is the topic of this article.

As some (very few, most probably!) usual readers may know, I already built a Lap Time Simulator in Excel last year and went on refining and using it also this year.
The basics of this new tool remained the same, and that helped a lot at the beginning because it allowed me to focus more on coding and on finding the best way I could to reach the goal.
Anyway, as I will show in a few moments, I soon realized that Matlab offers a much bigger potential for building a similar tool, also in terms of user interface. So, after fixing the pillars of the tool, the most of the time was spent in adding small features that make using it more intuitive and improve its flexibility.

The first steps have been implementing all what I did previously in Excel. The working principles remained the same.
Basing on user input, the tool derives a performance envelope (or map, if you want), which is basically a g-g-V diagram (achievable acceleration vs speed) in lateral and longitudinal direction. The latter, is considered once for braking and once analyzing acceleration.
To do this, a 4 wheels vehicle model is used, where each tire characteristics can be specified, together with the main geometrical parameters of the vehicle (wheelbase, track widths), masses (overall vehicle weight, front mass distribution), aerodynamic (downforce and aerodynamic balance), CG height, brake balance and the portion of the engine torque transmitted to the rear wheels.
Suspensions are for now considered only as the driver for the final lateral load transfer distribution between front and rear axles. Anyway this will change soon. More on this later.
For now, anyway, this means that CG height always stays constant and ride heights are not mapped, with the aerodynamics being described by one single coefficient for downforce, one for drag and one for aerodynamic balance.

Once the performance envelope has been calculated in both lateral and longitudinal direction, the solver uses it to calculate the speed of the car in each point of the track.
To do this, the lateral and longitudinal available grip is combined as an ellipse. No combined (lateral plus longitudinal) situations are explicitly simulated in deriving the performance envelope.

First of all, the maximum speed the car can achieve at the apex of each corner is calculated. Starting from there, the solver proceeds backward (using the full braking potential of the car, when possible, or a portion of it when the car is already cornering) and forward (same as for braking, but now, beside grip, the other deciding factor is the power the engine can transmit to the driven wheels). In an acceleration phase, the tool considers the resisting forces given by aerodynamic drag, rolling resistance and, if cornering, by tires slip.

The track itself is defined by many small portions of a certain length, with a corner radius and an altitude input by the user. In particular, the matrix giving the corner radius in each point of the track is calculated basing on logged data (time, speed and lateral acceleration or, if available, basing on GPS data). The elevation profile is also considered in terms of its effects in acceleration phases.
In a given point, say for example the apex of a corner (which corresponds to the point of minimum radius) the solver calculates, basing on the performance envelope, the magnitude of the acceleration the car can achieve and, from there, the speed. This is then done backward for braking zones and forward for corners exit and straight sections. If a corner has a big enough radius, the car can negotiate without slowing down.
In each of these small sections, the acceleration is considered constant and the exit speed is derived accordingly. At the apex of a corner, we will have only a lateral component of for the acceleration vector, in acceleration and braking phases either a combination of lateral and longitudinal components or a pure longitudinal one.
This is what is often called quasi steady-state approach.

Pretty simple.

Anyway, the devil is in the details.
As I tried to repeat in my mind all the time, this was mainly an exercise to improve my matlab skills. Considering this and thinking about the desire to have a tool that I could use without cursing also after some time I didn’t open it anymore, I thought it could be a good choice to build from the very beginning a decent GUI (Graphic User Interface), where each parameter could be input, plots would help to get a feeling for the results and could be manipulated by the user, the track could be generated and adapted and results could be analyzed and compared.

To do this, I used the “App Designer” that Matlab offers in latest versions. For people familiar with Matlab, this is meant to replace GUIde. Now, I have no experience with GUIde, never really used it. But I can say, i am pretty happy about the App Designer. It is definitely a nice feature, extremely pleasent to use and very effective, in my humble opinion.

Designing a user interface is surely something I learnt a lot from. It poses you in front of many small “issues” that needs to be solved and which are not always engineering related problems, but that often leads to new ideas to add engineering related features to the tool (being something linked to plots and input, or something regarding the simulation itself).
For sure, having a tool where all parameters are clearly defined and easy to be input helps both when preparing the simulation run itself (see for example changing car setup or track characteristics) and when analyzing or comparing results.

Thanks to this user interface, this simple lap time simulator runs independently from Matlab main interface. The first thing I see when I load it is shown in the following picture. This is the interface where vehicle’s main parameters can be entered, imported or save in an external file.


LTS Matlab - Main


The second window contains tires data. For this tool (as for the excel one) I used a very simple tire model, based mainly on tire load sensitivity: the most important aspect for the solver is indeed the friction coefficient of each tire for a given vertical load. As in Pacejka tire models, I assume here a linear relationship between the two.
Since camber changes with suspension travels are not considered for now, each tire lateral and longitudinal characteristics can be defined separately, to (very roughly) depict camber effects.
Beside this, a normalized slip curve can also be input, together with the peak slip angle values (which are here considered constant with respect to vertical load). These curves are useful when calculating the drag forces the tires produce in a corner and also when deriving the slip angles each tire experiences in each point of the track.
Incidentally, I learnt that this approach is actually very similar to what Bosch Lapsim employs and to what Bill Cobb (a very experienced vehicle dynamic engineer who was very active in the FSAE forum) advocates for its simplicity.
It is nice when you realize you came to the same conclusions of much smarter people, although some 20 years later!


LTS Matlab - Tires


Next up is the engine. Nothing special here: I can input the torque curve, the RPM at which the “driver” shifts up and the RPM limiter position.
A nice thing to mention here is an enjoyable feature of Matlab App Designer itself. The interface can be built as fully interactive, either with buttons or with the plots updating when one of the inputs value is changed. No rocket science, but still a nice thing!


LTS Matlab - Eng


I used more or less the same approach for the gearbox.


LTS Matlab - Gears


As previously described, once car and tires data have been input, as a first step the solver calculates a performance envelope. This is basically a g-g diagram, but to come there lateral and longitudinal accelerations are considered separately. For the tool to “know” where the performance limit of the car at a certain speed is and how the car handles, each axle must be considered.
This means that all these results must be calculated and, in the performance envelope window, I can visualize them in different plots, selecting them with the drop down menu above left (named “Plot”). The picture below shows the g-g-v diagram, but other plots like front and rear axle saturation, lateral and longitudinal acceleration or corner radii against speed can be visualized.


LTS Matlab - Perf Env


Once the car has been defined and its performance envelope calculated, we need a track (actually a trajectory).
A “track” file can be generated in a dedicated section. The tool imports an Excel file containing the required data to generate the trajectory and the map. These data are time, speed and lateral acceleration.
I included the possibility to “filter” the source Excel data, to avoid a too noisy signal when necessary. The tool also provide functions adjust locally and globally both corners radii and local grip. The elevation can also be defined in a dedicated section.
Each of these parameters can been plotted with respect to distance or as a track map where the color signalizes the magnitude of the given parameter.
The track can be saved in a dedicated file, that will be loaded when running the simulation.


LTS Matlab - Track Gen 1

LTS Matlab - Track Gen 2


The possibility to adjust both global and local grip is something useful not only in the validation phase, but also to run sensitivity studies to understand how much final performances change when changing grip on the whole track or only in a certain section.

Once all the preparation work is done, the simulation can be finally run. I left here the possibility to define three track sectors: the end point of first and second sector must be input before the simulation is started.
When clicking on “Run Simulation”, a windows for track selection opens and, once the track has been chosen, the solver starts to work.
Once the lap simulation has been completed, the main numerical results appear. They include lap time, sector times, top speed, RPM at top speed, how much time is spent at full throttle, cornering right and left, max lateral and longitudinal acceleration magnitude and the energy the engine used (also considering drivetrain efficiency) to complete the lap.
Before saving, the run can be given a number and a description. It will be then saved in a folder with a specific name, where also subsequent runs can be collected, if desired. This folder can later (when containing results relative to more runs) be loaded to compare each run with the others.
The results of each run can also be exported to Excel. This is an option I wanted to have, should I need to exchange data with other people.


LTS Matlab - Res


Once the simulation is completed, the results can also be plotted. The first thing to do is surely validate them against logged data. To do this, I included a dedicated window where I can import logged data (collected in an Excel file) and compare them with simulation results.
I can select which channel, beside speed, to plot. I also included a feature to shift the data forward or backward, to compensate for different “finish line” positions in the logged data compared to the simulation results.
Another very handy feature is the possibility to change the sign of the acceleration channel and to zoom on a specific area of the plot, using the minimum and maximum abscissa of the window I want to look at.
Surely this is not even close to what traditional data analysis package are capable of and all these features are pretty basic, but they still enable to do the “job” in a pretty comfortable way.


LTS Matlab - Validation


Simulation results themselves can also be analyzed in isolation, using another dedicated area in the tool.
In this window, I can choose among some pre-configured selections of data and plot them more or less as one would do in a data analysis software. A nice feature I discovered in Matlab is the availability of a sort of plot where, when moving the cursor along the traces, one gets on screen both the x axis and the y axis value.
Among the configurations I programmed, some are related to the gearbox (picture below), the driver (steering, throttle, etc), accelerations, engine, tires and body slip, handling and balance (understeer or oversteer), etc.


LTS Matlab - Plot 1


LTS - Driver


I also included the possibility to visualize the results on a track map, again using a color scale to signalize when a certain channel value gets higher or lower. This doesn’t give any different information than the plots I previously showed, but it is a more intuitive way to get a feeling about what happens on the track and how much time is spent with a channel running over a certain magnitude.
Again, i can select which channel to use for the coloring in a drop down menu on the top left of the window.


LTS Matlab - Plot 2


As previously anticipated, the last feature I included allows to compare results of different simulation runs, previously saved in a specific same folder.
Pushing a bottom on the top left of the window, I can select which results file (folder) I want to open.
The tool opens the selected file and the results appear on the screen.
I can then select one or more runs. For each run, some basic data are shown in a table (lap time, sectors times, top speed). The plots are updated automatically each time a run is selected from the list.
I can also choose which channels to plot, selecting among some pre-programmed configurations, similarly to what we already saw in the other plotting window.
Each time more than one run is selected, the tool also show the delta time (where time is gained and where is lost) comparing the n-run to the first selected one.
Also in this case I included the possibility to zoom in a certain area of the plot, by selecting a minimum and a maximum value for the abscissa (traveled distance), with obviously all the plots then showing the same area.


LTS Matlab - Res compare


Closing, although the main features of the tool are not too different than what I did already in Excel, Matlab here has granted a real step forward in the way the solver works, how the calculations are performed, how certain channels can be calculated and how the data can be manipulated afterward. In Matlab environment, it is much easier to produce a tool that can be used not only to merely simulate, but also to analyse the data and adjust each parameter, all “under one roof”.

I already started working on the next steps.
First thing will be to include chassis vertical movements, to also be in a position to consider full aeromaps and CG height changes along the track.
To do so, first of all I will need to consider each elastic element in front and rear suspension. This includes not only springs, but also third elements, bump stops with their own free gaps, tire stiffness and their centrifugal expansion. All of this will be particularly important for high downforce cars, like the ones i normally deal with lately.
Below a picture showing how front and rear ride heights, suspension and tires deflection depends on speed, in steady state conditions (so basically assuming that each point of the plot has been derived at constant speed, not with the car accelerating from minimum to maximum velocity).
This, together with anti effects built in the suspension, will be implemented into the next version of this tool and this will enable more detailed analysis concerning the aerodynamics of the car, including evaluating the effect of changing static or dynamic ride heights. This should also serve to give a first go to ride heights, bump stops and gap settings depending on track requirements.



Hi everybody!

This post is about something old, on one side and something relatively new, on the other side.

As the title says, i am revising my suspension kinematics tool, as I am porting some of the work I did in Excel in the past into Matlab.
After many years, I started working again with Matlab, in an attempt to refresh, improve and update both my skills and my projects, in a coding/computing environment which surely is among the most powerful and widespread in engineering.

I am in no way an expert in coding in Matlab, so this is really a learning exercise for me. Beside bringing the tools and its functionalities into Matlab, my goal with this small project was really to learn and refresh as much as I could in terms of programming.
With this respect, I received some very good help from some friends who have much more experience than me with it and could point me several times in the right direction. The great thing about Matlab, is that there is a huge community sharing every possible advice, files and material online. Beside this, the help provided with the software and the “benefits” of being registered at Mathworks (see for example free training) are also a nice addition.

To be fully honest, i actually think a suspension kinematics tool is probably not the best way to use Matlab full potential. This is really something that would work relatively well also in Excel, in my opinion, with the addition of some simple macros that can be handy for any iterative process, like creating plots of how typical suspension metrics (like toe, camber, etc.) changes with respect to suspension motion.
Anyway, I also think it is a good idea to (re)start with something I know relatively well now and, having already an equivalent tool, also provides a benchmark for correlation.
Moreover, beside the pure tool functionalities, this project offered a good chance to take confidence with a large array of features that can be useful with many other kind of projects in the future.

The way the tool works and its features are principally the same as the one I built in Excel. Also, as the previous one, also this tool is meant only for double wishbones geometries, with a push/pullrod that activates a rocker. The system includes a third element and an U-Antiroll bar.
Still, being the approach one can use in Matlab completely different compared to what can be done in Excel, the way the tool interacts with the user is necessarily different too.
From a solver perspective, the basics are still the same I already explained when I introduced my suspension kinematics tool here for the first time: the position of each pickup point is calculated by intersecting three spheres. The cool think about Matlab is its ability to deal with vectors, which made unnecessary to solve once again the system of three quadratic equations in three unknowns, which is not that funny.

How does the tool work exactly? 
The first step is obviously the input of the pickup points coordinates.
These are already pre-given in the code, but can be manipulated by the user by mean of a table, that also records any change with respect to the initial points.


Sus Tool Table


The user can afterward specify some other design aspects, like for example to which component the pushrod is attached, and define suspension motion (heave, roll and steering).


Sus Tool Table - Push and motion


Basing on these inputs, the tools calculates the actual position of each point, the most important metrics (Toe, Camber, Caster, Scrub Radius, Roll center position, etc.) and then output the results with a table, an interactive image of the suspension itself (this is a pretty cool feature in Matlab: you can manipulate the 3D image of the suspension rotating it or zooming in and out) and, depending on user’s input, typical plots of a parallel wheel travel motion (the user can specify if the tool should produce these plots or not; if the plots are produced, the user can input how much travel in compression and rebound must be considered).


Sus Tool All results + plots


Once the simulation has been done, the user can select which metric he wants to plot with respect to wheel travel, using a popup menu.

The results of each run are saved in a dedicated file, that can be opened with another function, which also plot the results of each run and of each metric comparing them to the same results for all the other runs.


Sus Tool comparing results


The user can also decide if the numerical results of all runs should be exported to an excel file, to be accessed externally.

It is nothing revolutionary, indeed, as the main functionalities are the same I built in my “old” Excel tool already; still it is nice to have all of this in Matlab too. As i mentioned, although this tool is probably not the best application to explore Matlab potential, it is interesting to see how certain things have to be handled differently compared to Excel and, also, how certain features could be made even more interactive.
Matlab is surely better suited than Excel for typical engineering applications. For sure, having a lot of typical, time consuming, mathematical / numerical approaches to solve certain problems already built in is one of the things that make Matlab more appealing.
Beside this, the opportunity to work so easily on vectors, matrices and differential equations is sure extremely interesting, also with simulation applications in mind.

Posted by: drracing | April 19, 2019

Lap time simulation in Excel – Further development

Hi everybody!

Again a long time since my last entry here.
I was indeed very busy in the last few months. I am currently involved in a couple of projects where DiL simulation plays a major role: one is still linked to CORE Autosport, as they stepped into the DPi class in IMSA and will try to run for the overall win, also in 2019 as a private team fighting against OEMs backed programs.
I am also supporting another team this year, running in the ELMS in the LMP2 class, but i will come to this later on this year, in another post.

Beside this, anyway, I went on improving my Excel Lap Time Simulator, a tool that i am using a lot also as a companion to DiL simulations for the projects i am involved with.

I added some “practical features”, that don’t change what the tool can or cannot actually do, but make its use and the manipulation and analysis of the results a bit easier.
The first of them is an automated function (macro) that allows to export simulation results to an external file, to compile a summary table (where the main performance metrics are logged but also some notes about the specific run) and to save the logged data, for later plotting.
Nothing revolutionary, but it helps to save some time, when going through a series of simulations; it also helps in keeping the results better under control and to have a constant overview of the trends they show.
In terms of automation, I guess the next logical step would be to code something to allow to do a batch of simulations, where a certain parameters varies between given boundaries. This is the next priority in my list right now. 

I am also calculating some more metrics now, some of them exported with the others into the results file, some only meant to give an indication about how much time the car spends in certain condition/situations, see for example left and right cornering, or full throttle.

Last, I now also distinguish between left and right corners. Ok, this is really the least important point, but still makes much easier to compare simulated and logged data and this kind of comparisons are always extremely important to check correlation.

Talking about correlation, i now have a bit more data to base my statistics on and i can say that, although being so simple, this tool normally achieves an accuracy of between 1 and 1.5% in terms of lap times. Now, in tracks where the lap times is about 100 seconds, this means 1 to 1.5 seconds, which could seems a lot.
But if you consider how the solver works and how easy the whole tool is, it is actually a pretty good result.

First point to consider, as I already mentioned in my last entry, is the importance of an accurate “track model”, which in this case is an array of Corner Radii vs Distance values (car’s path), with the add of local elevations and grip levels where needed.  
Logged data, from which normally vehicle’s trajectory is derived, are often very noisy and it takes some care to derive a realistic track out of them. Beside this, sometimes there are some inaccuracies in what sensors read, which could also cause some issues in defining our track file.
To be fair, having an accurate path description for the simulation is important mainly to get correlation with logged data; normally, if the trajectory used in the simulation is at least close to the one the car actually follows on track, we can still at least get realistic trends, when testing what a certain setup or design change would produce, in terms of performance, even if the final performance doesn’t match 1:1 to the real one. 
Anyway, if we deal with a car with substantial aerodynamic features, a few kph of difference can also change the influence of downforce on vehicle’s performance and behavior.

Car’s performance envelope is derived considering steady state cornering, braking and accelerating at different speeds, to account for different levels of downforce.
As in every lap time simulation, the vehicle is always driven at its very limit (of course under steady state assumptions) along its path for the whole lap: sometimes the limit is given by the engine power (see for example at the end of the straight, a power limited condition), sometimes by the cornering, braking and accelerating capabilities (grip limited condition).
To explore each of the three scenarios i mentioned, the tool uses a simplified four wheels vehicle model, where the only important parameter not being considered is suspension kinematics. Still, this simple approach takes into account many other crucial parameters and phenomena, like mass, CG position, track widths, wheelbase, lateral load transfer and load transfer distribution, longitudinal load transfer and aerodynamics, although each of these areas is explored considering fixed values for the parameters of interest (it doesn’t take into account, for example, how the aerodynamic properties of the car vary with ride heights, but simply takes one number each for drag, downforce and balance; the same is true for total lateral load transfer distribution or CG position, which would in the real world also vary depending on ride, roll, pitch and any other body movement).
This means that, even if solving the overall performance around a lap using a point mass approach, this method allows anyway to consider and evaluate the effects of many setup intricacies that could normally not be considered when using a “simple” point mass approach.

All of this, plus the tires being modeled considering their load sensitivity, explains also why some very specific, load related phenomena and settings can be explored in a very realistic way.
As I said in my previous entry about this tool, i was keen in taking tires load sensitivity into account in terms of its effect on cornering, braking and acceleration potential of the car and on its influence on how important downforce is.

One extremely useful consequence of using this approach is that you can get a concrete estimation not only of the effects of weight, downforce and track grip, just to mention a few, but also a pretty good pictures of the effects of tuning parameters more related to the balance of the car.

Despite being pretty simple, the tire model i consider enable me to identify which axle saturates first, as speed, downforce, acceleration and load transfer grows.
This makes possible to quantify the effects on both cornering speed and final lap time of changing parameters like the aerodynamic balance of the car, brake balance, static weight distribution and lateral load transfer distribution.
Playing with these parameters is eye opening and brings to a much better understanding about what really matters in each track, depending on its characteristics and why it is so important to adapt car’s setup depending on the circuit. It also gives an immediate feeling about how much different tires could change the car and about how important it is to adapt vehicle tuning to them, in order to extract the maximum possible performance.

To make a specific example, it could happen that, in a track where top speed is crucial, aerodynamic balance could still be the main performance driver, even if this means compromising top speed. Of course, with some cars you are able to tune overall downforce and drag always keeping the desired aerodynamic balance, but this is not always the case. In such cases and with certain tires characteristics, it could be a bigger benefit on lap times to improve car’s cornering potential, even if sacrificing top speed.

This is a simple example of an area where i am happy i could bend my own tool in my very own direction. In this case, for example, despite being the tool principally very simple, it still allows to consider effects and intricacies that a simple point mass solver would not be in a position to analyze.
Again, the approach i used to tackle this is surely a simplified one, above with respect to the way car’s potential in combined grip situation is estimated.

One final note is that, using lap time simulation in parallel to DiL simulation, one can also get a good picture of how important is to have a driver in the loop sometimes.
The two tools normally show the same trends, which means if you see an improvement in the lap time simulator, normally the same change is also beneficial when tested in the driving simulator.
Anyway, the entity of performance gains or losts, caused by changing a certain setup parameter by a certain amount, is normally different. Lap time simulation normally shows small deltas: this could sometimes lead to underestimate the importance of a certain modification to the car, because one could fall in the trap of thinking the delta is so small that it would barely count.
Anyway, most of the times these deltas gets bigger when we test the same change in the simulator. My opinion is that this depends on many factors, but also that three of them are the most important (here shown in which i consider an order of importance):

1. The driver, which could add on top of an “objective” performance gain or lost his/her own “appreciation” or “disregard” for a certain change. If, say, a certain driver doesn’t tolerate understeer or oversteer in a certain phase of the corner, a modification producing exactly this could exaggerate the performance delta because he/she would not be in a position to drive with confidence anymore. This would put the driver out of its optimum zone, which normally emphasizes the lap time lost following a certain setup change. In a similar way, the opposite could be true when changing car’s behavior in a way the driver likes and that would help to express his/her full potential. 

2. Areas or phenomena which are ignored in the lap time simulator, like suspension kinematics or a complete aeromap, where downforce, drag and aerodynamic balance change with ride heights and, hence, with speed or driving conditions (braking produce a “nose down” situation, where the front diffuser is closer to the road; the opposite is true when the car accelerates). 

3. The basic assumption behind (this kind of) lap time simulation: the car always being operated in steady state. Despite being true that the best drivers are normally extremely smooth and “unsettle” the car in very few occasions (and normally in a controlled way), it is also true that it would be very naive to believe that a car could always operate in steady state conditions. This actually never happens fully. This assumption make writing a lap time simulator much easier and probably don’t take too much out of the results we get, but real life is another story! With this respect, i think it could be fair to believe that a well done DiL simulation could depict the reality better. But we have seen in my previous entry, which are other pros of lap time simulation compared to DiL. 

Posted by: drracing | January 9, 2019

Lap time simulation in excel

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 still 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.

Posted by: drracing | November 2, 2018

Load transfer and anti effects

Hi everybody,

as promised, i am here again, this time finally with something a bit more nerdy than last time.
I normally don’t write too much about theoretical topics explained in vehicle dynamics books, mainly because there would be nothing original in such an article and its content would not be directly connected to something i dealt with in one of my projects.
Anyway, as i mentioned in one of my previous articles, since January I am supporting a bit the Racing Line, a very nice website dealing mainly with sportscars. Being part of the “staff”, i am probably not the best to talk about what this website offers, because my opinion is surely not totally objective. Anyway, what can be honestly said is that we try to skip traditional news reporting (we could never keep up with professionals like the guys behind Dailysportscar or 365Sportscar, just to name two of many very good websites) and we do our best to offer original contents to the community, in my case focusing on the technical side. Our hope is that, trying to share our perspectives and opinions, we could initiate or stimulate a discussion where every fan can hopefully take place and learn something new.
In accordance with this philosophy, in my contents (mainly racecars engineering basics and race analysis) I try to offer my own perspective (which can well be wrong!) and to keep everything as simple as possible, with the aim to allow a broader audience to enjoy the articles without falling asleep.
This differentiates a bit what i write for theRacingLine with what i publish here, as the topics i deal with for tRL are not necessarily connected to any of my projects.

Keeping explanations of complex topics simple while trying to make them interesting also for people with broader knowledge and experience, is not easy at all, but it is an extremely motivating exercise: to explain something in an easy way, you have to have sure you have understood it fully. This means, you are forced to take some time and review also topics you take somehow for granted and also in areas you thought you knew all what there is to know. Actually (and luckily) there is always something new we can learn!

The physics of a racecar is actually pretty simple and there are relatively few areas that are not fully known and understood . Normally, these areas are fields where testing still doesn’t allow to investigate in details or fully objectively which parameters influence a certain phenomenon and how.
Nonetheless, experience has proved to me that I am dumb enough to often learn something new, anytime i tackle a certain topic one more time.

So many words to say, that trying to explain racecars topics in an easy way is an extremely interesting challenge and i found myself really liking it.
It is also a good justification to read more and buy more books. A full library makes always a good impression to somebody visiting your place!

One of the series i prepared for the Racing Line focuses on racecar handling, as i mentioned in the past.
As probably all the people reading this article know, load transfer is a key player in a car behavior.
With respect to this, extremely important is the role played by suspension geometry, with particular focus on what are normally identified as anti effects.
Now, this is indeed an easy topic where i (but i suspect also other people) got confused very easily when i first came into contact with vehicle dynamics. The point is that, sometimes, even the best books don’t go into details in explaining exactly not only how to calculate anti effects or load transfer but, more important, because certain assumptions are supposed to work. Most of the times, this happens either because this would require a lot of pages or because the writers assume that the reader already knows the basics on which their approach is based. Fair enough.

This article will be about anti effects, with particular focus on the lateral dynamic of a race car.

I started thinking about this after reading and getting in contact with some very smart guys writing in the FSAE (Formula SAE) forum, some years ago. Although I afterward analyzed some of the things that were discussed in the forum (with regard to anti effects for example) myself, I want to give full credit to the many smart people writing there, because reading their comments has opened a completely new perspective to me, when considering the effects of suspension kinematics on load transfer and suspension motion in braking, accelerating and cornering phases.
In particular, it has been very enlightening for me to read what Erik Zapletal (“Z” in the forum), Tim Wright and Henning Olsonn wrote. Look for them on the internet, they are really smart cookies.
In general, that Forum is extremely interesting and you can find some good reading material there, because most of the times they deal with more generic topics than something merely related to Formula Student / SAE competitions.

Beside the forum, as far as i know other people (much smarter than me) approach these areas of vehicle dynamics slightly differently than the “classical approach” presented in some books, see for example Mark Ortiz, regular contributor of Racecar Engineering and Chassis Consultant and William Mitchell, who sold for years one of the easiest and most effective suspension kinematic tools ever and sadly passed away some years ago.
Also the author Damian Harty shortly mentions in his book “The Multibody Systems Approach to Vehicle Dynamics” how he prefers dealing with anti effects in a similar way to the one i will discuss here.

Again, a lots of words to say that what i will write here is nothing new or revolutionary, simply tries to tackle this topic in an (hopefully) easier way.

The most popular books i know (beside Harty’s one) normally deal with anti effects using a different approach for longitudinal and lateral direction.
For the longitudinal direction, normally they define percentage parameters, as antisquat/antidive (an effect working against suspension jounce/compression motion respectively at the front and rear axle) and antilift (an effect working against suspension rebound/extension motion respectively more often considered at the rear axle).
For the lateral direction, the most popular approach consists in considering the roll center height, at least in static condition.
I will not go into details about how to calculate these parameters, because this has been done comprehensively in said books. I am sure most of the people crazy enough to read here know these concepts very well anyway.

The point about the way anti effects are conventionally treated is that it is sometimes hard to really visualize what these numbers means. There are easier ways to analyze, at least at the beginning, the importance and the effect of suspension geometry on roll and pitch motion and how its kinematics influence load transfer.
Talking about lateral load transfer and roll centers, in particular, they completely lose their significance in specific situations, like when the car has only two wheels on the road or when the “migration” (the movement of this specific point) is particularly big.

The approach i will describe shortly is nothing else than the application of very basic mechanics principles.
When i wrote the articles about lateral handling for the Racing Line, i tried to expand what can be found in the FSAE forum by calculating all the most important parameters without using the roll centers.
The results i obtained (numerically) using the two approaches are exactly the same, given the same assumptions and boundary conditions.
Anyway, this “more generic” approach, works also when the roll centers migrates by many hundred meters or when one wheel of an axle is not on the ground.
By the way, i inserted the calculation of the critical parameters to deploy this approach also in my excel suspension kinematics tool.

I want to stress once again, that i don’t take any merit for this. What i talk about here is no new idea or concept and i simply tried my best to understand and formalize (mainly for my own use and interest) what other people already use since years and, incidentally, has its foundations on very simple mechanics principles, without using any abstract concepts.
The point is that many excellent books don’t explain fully what really means to change suspension geometry in terms of load transfer and load transfer distribution effects, although this would make the description of this phenomena much easier to understand. For me, at least, this made everything much clearer.

Let’s start from the very beginning, using a simplified approach to make things easier to explain and to analyze.
A racecar suspension can be simplified in two dimensions (which means, projecting every element on a plane passing through the two tyres contact patches and seating vertically with respect to the ground) in what is called a “four bars linkage”. The four links in questions are, from left to right in the following picture, the wheel/upright assembly, in contact with the ground at the contact patch, the upper control arm, the lower control arm and car’s chassis.

4 bar linkage


Actually, most often a racecar suspension cannot be considered a 2D mechanism, but this simplification is very useful to keep the explanation simple.

We normally define wheel travel the distance covered vertically (or in Z direction, in the coordinate system we introduced previously) by the wheel (or by any point of it, although common practice is to consider the center of tyres contact patch or the wheel center).

In a 2D four bars linkage, where we consider car’s chassis to be fixed and the wheel/upright assembly to be free to move with respect to it, the wheel assembly will move on a path that, in each instant, will be circular with its center at the intersection point of the lines obtained elongating the control arms segments.


4 bar linkage IC


This means, the center of this circular path can be considered a pin point in the movement of the wheel (contact patch) with respect to the body. Its position will change, depending on the wheel travel, but in each instant we can represent our suspension using a bar connecting the contact patch (or each point of interest belonging to the wheel/upright assembly) and this point.

This point is normally called instant center (IC in our previous picture) and, as we will see, it is an extremely important concept.

At this point, somebody has surely already recognized how the instant center would be undefined when the upper and lower control arms are (in a certain suspension position) perfectly parallel to each other.


4 bar linkage IC undefined


The instant centre position has not only an effect on suspension kinematics (its position determines the arc on which the wheel moves and this influences how parameters like camber and track width change), but it is also important because the line connecting the contact patch to the instant centre defines the only direction that a force applied to the wheel (tyre) at the contact patch can act on, without causing a rotation of the wheel itself around the instant centre (roll).

The following picture help to understand this point, which is crucial to figure out how suspension kinematics affects lateral load transfer. If we have a bar (which we suppose to be rigid) with a free end and another end located in a pin point, we can apply a force to the bar avoiding its rotation only if said force has the same direction of the bar.


2D no rotation


2D rotation


Generally, the force applied by the road to a tyre in a pure cornering situation acts in a different direction than the one of the above-mentioned line. Our 2D suspension will normally experience a resultant force at the contact patch that can be decomposed in two components: a lateral one, which we named already in several occasions Fy and a vertical one, Fz.


2D susp - all forces


Let’s focus for a moment only on the lateral component, Fy. We immediately recognize how the lateral components of the forces acting at the contact patches generate a moment about the relative IC and, hence, an effect that tends to rotate our “idealized swing arms”.


2D susp - geom antiroll moment

What the reader should keep in mind is that, if the IC seats as shown in the picture, these moments will move the suspension in the opposite direction than the one in which the body would roll, under the action of the centrifugal force (acting at the CG). De facto, as long as the IC seats as in the picture, the two moments generated by each side cornering force will tend to unroll the car, extending the outer suspension and compressing the inner. This is why, if the IC seats as in the above picture we can assume their effect to be a kind of antiroll action. If the IC seats below the ground or outboard with respect to the wheel, on the other hand, the cornering forces moments will have an opposite sign and a kind of pro-roll effect. As we will see, these are the basics to understand a mythical vehicle dynamic concept, namely the roll centre. More about this later.

Looking at the complete picture of the forces acting on the vehicle in a pure cornering situation, we will find, beside the already mentioned tyres contact patch forces also the centrifugal force, acting on car CG (we ignore for a moment the separation between sprung and unsprung mass) and any aerodynamic action. For the sake of simplicity, we will focus only on the vertical component of the resultant aerodynamic force (downforce). This will couple together with the weight/gravity action, to compose a resultant vertical force, acting at the CG.

As we saw, the centrifugal force, acting at the CG (or the portion of this force taken one of the two axle) and coupling with the contact patches lateral forces, rolls the car, compressing the outer springs and tyres, extending the inner ones and twisting the antiroll bars, while leading to a load transfer that will increase the vertical load acting on the outer tyres and lower inner tyres one.

At each contact patch, we will have a resultant force with a generic direction, generally different than the one of our idealized swing arm. As we said, this force can be decomposed in a lateral (Fy) and a vertical (Fz) component. Anyway, we can also decompose it differently, considering the component lying on the line connecting the contact patch and the IC.


2D susp - decomposition


This approach allows us to consider not only the magnitude of the resultant force transmitted directly to the control arms (FCA), whose lateral component (FCAy) is equal to Fy, but also to separate the vertical force Fz in two summing elements, FCAz and Fs: the first one is the vertical component of FCA and is often referred as Jacking Force, because it tends to lift the car (at least if the IC seats as in our previous pictures); the second one is the portion of Fz that cannot be transmitted through the control arms and will be reacted by suspension elastic elements (see the springs and anti-roll bars).

It is easy to see how the relative magnitude of FCAz and Fs depends strictly on the position of IC or, in other terms, on the inclination of the line connecting the contact patch to IC. Some call this line “n-line”. Anyway, what is really important is that, given an Fz, the bigger the inclination of the n-line, the bigger the magnitude of FCAz and the smaller the magnitude of Fs. This means, the bigger the inclination of the n-line, the smaller will be the force that the elastic elements of car suspensions have to react and, hence, the smaller will be the roll angle of the car for a given stiffness of these elastic elements.

The bigger the inclination of the n-line, the bigger will be the antiroll torque generated by the Fy, which will play against the car rolling under the influence of the centrifugal force.

FCAz points upward if we consider the outer side (suspension) of the car and downward on the inner side; anyway, since on the outer side its magnitude is bigger than on the inner side (mainly because of the bigger vertical load acting at tyre contact patch, but sometimes also because of suspension movement in roll, leading to a movement of the IC), we will have a net effect pushing the car upward, in a case with the ICs seating as in our picture.
For a given amount of lateral load transfer experienced by the car and a given roll stiffness, the steeper are suspensions n-lines, the smaller the roll angle, because there will be a bigger antiroll action generated by the lateral forces acting at the contact patches. Similarly, the total lateral load transfer distribution(TLLTD) will be influenced both by the relative roll stiffness distribution of an axle with respect to the other (see, how stiff are front springs and antiroll bar compared to their rear counterparts) and by the relative magnitude of the antiroll torque generated by an axle with respect to the other (see, how big is the inclination of the n-lines of one axle with respect to the other, assuming the IC seats as shown in the picture).

This whole discussion simply shows a different approach to what many experts and books identify with the term roll centre (s).

The roll centre of a suspension is defined as the point where the resultant lateral force of an axle can be applied without causing any roll of the body. This point is nothing less than the intersection of the n-lines relative to the left suspension and the right suspension of an axle. If the car doesn’t roll and the suspensions have a symmetric design (the left side is a mirrored version of the right side), the roll centre lies on the car centerline/plane (longitudinal middle plane).




It is worth to come back shortly to the case where the two control arms are parallel to each other and to the ground. In that case, the instant centre IC is undefined and the roll centre lies on the ground.

As probably everybody reading this article knows, the logic behind roll centres definition can be understood if we imagine sliding our FCA along the n-line till we meet the middle plane of the car. Assuming that both left and right FCA have the same magnitude (hence a situation where the car negotiates a corner with very low centripetal acceleration, thus experiencing very low load transfer), we will have a resultant force with a lateral component two times the magnitude of FCay and a vertical component given by the vector sum of the left and right FCAz (that normally have opposite signs). This latest force is normally identified as Jacking Force, as we mentioned.

The roll centre concept works very well as long as we assume a symmetrical case, meaning we consider the car having the same suspension design (only mirrored) on both sides, not rolling and having contact patches lateral forces with the same magnitude on both sides. This is, of course, a simplification that proves to produce bigger errors as soon as lateral acceleration (and, hence, the lateral load transfer and roll angle) grows, because we move away from the symmetric case we initially assumed. Moreover, the reader has to keep in mind that the roll centre is a point that moves in space depending on suspension position, for example in roll. With certain design the roll centre could migrate meters (if not kilometres) away from its initial position, thus losing its significance. On the other hand, the inclination of n-lines is something that always remains easily definable and measurable.

Nonetheless, roll centers can be successfully used to get a picture (at least statically) of what to expect in terms of load transfer (and hence, of handling), because under the correct assumptions they are an indicator of how much suspension geometry influences load transfer at the front axle, with respect to the rear.

Let’s now analyze how can we put all of this down into equations, with the aim to calculate the load transfer and load transfer distribution of our car.

The load transfer each axle experiences can be divided in a sprung and unsprung mass contribution. Anyway, since the unsprung mass load transfer is not a tunable parameter, to keep our analysis as easy as possible we will simply incorporate its contribution in the overall axle load transfer. Anyway, one thing to mention (and that many books don’t explore) is that the unsprung mass has also an influence on the roll angle (although often small), because the forces the unsprung mass experiences (think for example to a wheel assembly) will be transmitted to the chassis through the control arms.

We will consider a simplified vehicle as shown in the following picture, where also all the main dimensions are shown. The chassis is represented by the thick black lines, at which the suspensions, in the form of swing arms, are connected through ball joints. Front suspension arms are shown in red, while rear ones are in blue. Said swing arms connect the contact patch to the chassis, so their constraints to the chassis are simplified representations of the Instant Centers we introduced in our previous entries. In the picture we identify these points as A, B, C and D.

Kf and Kr are respectively front and rear wheel rates in roll, calculating considering springs, antiroll bars and tyres stiffness.  The CG seats at a height “h” above the ground and at a distance “f” from the front axle and “r” from the rear.

Front and rear track width are tf and tr respectively. The terms named b and c identify the vertical and lateral distance of suspension ball joints / IC to the contact patch. The astute reader can already recognize the connection between these values and the n-lines slope.
The red arrow indicates the forward direction of motion of our car.


Calculation - 1


Front and rear roll stiffness can be calculated as previously shown:

Roll stiffness eq

In the following picture, the same vehicle model is shown, this time including all the external forces acting on the car. Beside the centrifugal force –mAy and the vertical force Fz (combination of both weight and downforce, with the car here assumed having the CoP at the same position as the CG, for the sake of simplicity) acting at the CG (we ignore aerodynamic drag as it doesn’t conceptually influence what we want to show), we have the four contact patches forces, decomposed in their lateral and vertical components: front left tire force, Ffl (composed by Fyfl and Fzfl), front right tire force, Ffr(composed by Fyfr and Fzfr), rear left tire force, Frl (composed by Fyrl and Fzrl) and rear right tire force, Frr(composed by Fyrr and Fzrr).


Calculation - 2 all forces


If we consider the equilibrium of the vehicle (in lateral and vertical direction and to the rotation around longitudinal axis) we can write the following three equations:

Equilibrium eq

Since we know that:

Equilibrium eq 2

where ΔFzf is front load transfer and Fzf0 is the static weight acting on each front tyre (the CG is assumed lying on the car centerline, so the static loads acting on each wheel of the same axle are equal), we can derive:

Equilibrium eq 3

And hence:

Equilibrium eq 4

where ΔFzr is rear load transfer.

So we can conclude:

Equilibrium eq 5

To derive front and rear load transfers, we can consider the rotational equilibrium of each suspension, indicated in our schematic representation by each swing arm. To start, we will consider the front left suspension, shown in the left portion of the following picture. Please consider that the violet arrows represent here the variation of spring force (Fsf) magnitude due to load transfer, with respect to static conditions.


Front susp Forces


The rotational equilibrium of the front left suspension will be given by:

Equilibrium eq 6

This can be rewritten as:

Equilibrium eq 7

Analogously, the rotational equilibrium of the right suspension can be expressed as:

Equilibrium eq 8

As we have seen, front axle roll stiffness is given by:

Equilibrium eq 10

We also know that:

Equilibrium eq 9

where Δsf is the suspension wheel travel. Combining the two equations we can derive:

Equilibrium eq 11

Where Φ is car’s roll angle.

Front left and right suspension rotational equilibrium can then be rewritten as:

Equilibrium eq 12

Summing the two equations together, we obtain:

Equilibrium eq 13

And hence (using also the same approach for the rear suspension):

Equilibrium eq 14

Till now, the roll angle remains unknown. Anyway we can calculate it as follows:

Equilibrium eq 15 roll


Equilibrium eq 16 roll stiff

Mroll can be derived considering the equilibrium of the forces applied to the chassis by the control / swing arms.


Eq control arms


We know that:

Equilibrium eq 17

Chassis rotational equilibrium can then be written as:

Equilibrium eq 18

Hence we derive:

Equilibrium eq 19

With this in mind we can finally obtain:

Final Load transfer eq


These two equations allow to calculate the load transfer that each axle experiences, basing on the cornering force that each tyre of an axle exchange with the road. Some readers may have already recognized how the terms “b/c” multiplying each Fy are nothing else than the slope of the n-line of each suspension. As we said already, n-lines slopes are closely related to the concept of roll centers and, from a pure conceptual perspective, they are nearly synonyms.

The first term of the equation is what we is often called “elastic load transfer”, because its value depends on the roll stiffness contribution of each axle to the overall roll stiffness and, hence, on the elastic elements of the suspension (tyres, springs and antiroll bar). It shows how, increasing the roll stiffness of only one axle produces a bigger load transfer on that axle, because the ratio between that axle roll stiffness and overall roll stiffness will increase. In steady state, this means that, increasing front roll stiffness we will create more understeer (or less oversteer).
The second term is what we initially defined as geometric load transfer. It basically shows how, if the n-line of a suspension gets a bigger slope, as identified by the term “b/c” (or, in other terms, we increase roll center height), the axle under analysis will experience a bigger load transfer. Again, this means if we increase the height “b” of our front pivot points while “c” stays the same (thus increasing our front roll center height), we will create more understeer (or less oversteer).


Out of ΔFzf and ΔFzr we can easy calculate the Total Lateral Load Transfer Distribution (TLLTD):


As known, the bigger the TLLTD, the more the car will tend to understeer in steady state.

This formulation generates exactly the same results as the one using roll centers, under the same assumptions (cornering forces having the same magnitude on each side of the same axle and summing up to generate simply a Fyf for the front and a Fyr for the rear). Anyway, the equations we wrote are more generic and allows to obtain useful results also when considering non-equal cornering forces on the two side of the same axle (in extreme cases a wheel could be in the air, for example and hence produce no lateral force) or even when facing situations where the roll center migrates to very unpractical locations.

Posted by: drracing | August 9, 2018

24 Hour of Le Mans 2018 – Race Analysis – LMP2

Hi everybody,

In my last entry, i tried my best to extract some meaning out of the numbers made available by ACO/FIA for the 24 Hours of Le Mans and LMP1 class.

Today we will take a look at the LMP2 class.

The LMP2 class was dominated on the track by the two Oreca 07 engineered by the TDS team (G-Drive and TDS own crew), with the G-Drive prototype winning in style and the TDS car being extremely fast and finishing on the podium after a hard start of the race. Both cars, anyway, have been disqualified in the post race phases because of a non-conformity of the refueling system, with the victory being inherited by the Alpine squad.

The first thing being evident is that, beside some teams doing a better job than others, the Oreca was still the car to beat, even if the Ligier and the Dallara were allowed to develop a “joker” update for this season, to close the gap to the french manufacturer.
What was also interesting to see is that in Qualifying, lap times improved nearly a second compared to last year and that the best two cars had Michelin tyres, with G-Drive/TDS cars being the only cars using Dunlop tyres getting closer lap times to the best ones. Not a surprise, as the two cars were the constantly extremely fast, during the whole Le Mans week.
It is also interesting to see how Panis-Barthez Competition Ligier (also using Michelin tyres) could get very close lap times to the best Orecas (about 0.5 seconds gap in Qualyfing), with a gap of more than a second to the second best Ligier, engineered by United Autosport.
Basing also on what we saw analysing ELMS first race in Paul Ricard, it looks like Michelin tyres have indeed an advantage in qualifying.
With our analysis we will try to understand if any difference in approach between Dunlop and Michelin exist, with maybe one sacrificing “single lap” performance and the other working to obtain a more stable behavior on the long distance.

Because of the three different chassis manufacturers involved, the two different tyres suppliers and the cars that finished first and third on track being disqualified, we will analyze eight cars in total here, in order to get a picture not only about the fastest cars on track, but also about the relative differences between chassis and tyres.
In particular, we will consider Paniz-Barthez competition Ligier n.23, G-Drive Oreca n.26, TDS Oreca n.28, Dragonspeed Oreca n.31, United Autosport Ligier n.32, SMP Racing Dallara n.35, Signatech Alpine n.36 and Graff Oreca n.39.

What do the numbers tell us?

As usual, we start by looking at the table showing the best lap times and the average of the best 20, 50, 100 and “all clean” laps of the race.

LMP2 best laps table


This table shows immediately some very interesting points.
First of all, it really looks like the Michelin have potential on a single lap, as Dragonspeed Oreca n.31 got the best lap time among the cars we consider, although by a very tight margin with respect to TDS Oreca n.28.
On the longer run, anyway, the fastest cars on track are definitely the TDS and G-Drive Orecas, with the first one topping every metrics, except the “all clean” laps one.
The two cars are faster than any other car in our table by a good margin.
Interestingly, Panis-Barthez Competition Ligier n.23 is constantly faster than United Autosport n.32 one.
This makes our analysis about tyres more complex, because while among the Orecas the Dunlop seemed to have a clear edge on the long run, among the Ligiers the Michelin can be associated to the fastest car.
The plots relative to the best 20, 50 and 100 lap times shows an even clearer picture about the relative performance of each car, compared to the others.


LMP2 best 20 laps


LMP2 best 50 laps


LMP2 best 100 laps


What is immediately clear, is that car n.28 was by far the fastest on track, with a good gap on car n.26 (who finished first, before being disqualified) both on the short and long distance.
Car n.31 is particularly fast if we consider their very best laps, lying between the performance of car n.28 and car n.26, but falls behind if we consider more laps, although still remaining among the “fastest of the others”, with the others being all the cars not engineered by the TDS team.
Interestingly, car n.36, that inherited the win after car n.26 disqualification, is not even the fastest of this second group.
As we anticipated, among the Ligiers car n.23 is constantly faster than car n.32, while the n.35 SMP Dallara seems to be the slowest car in our group.
Although we really know nothing about the setup approach each team used (this meaning, i could well be wrong with any of my conclusions), we can maybe dare to say that Dunlop tyres seem to offer a more stable performance, while the Michelin seem to have an advantage on pure speed over less laps. Among the Orecas, car n.31 is very fast if we consider only a very few laps, but falls down on a longer distance.
Among the Ligiers, car n.23 is constantly faster than car n.32, but the gap between the two gets thinner as we consider more and more laps.
As i said, of course these trends could also be up to different setup decisions that each team took for their cars.

As usual, let’s now break down our analysis, by looking at each track sector separately.
As who read Le Mans LMP1 Race Analysis know, the track was divided in three sectors, as shown in the following picture.


track map


We will start from sector 1, the shortest and slowest of the track, a pretty twisty section composed mainly by slow and medium speed corners.

LMP2 best sec1 table


Car n.31 is here the best in terms of pure performance, staying clear of the closest competition by about 0.2 seconds on the best sector 1 time and remaining the fastest also if we consider the average of the best 20 sector 1 times, although now with a smaller gap to car n.28.
Car n.28 and car n.31 are very close to each other also if we consider the average of the best 50 sector 1 times (with car n.28 now being the fastest), while on the long run car n.31 falls a bit behind, although remaining among the three fastest cars in this track section.
The plots relative to the fastest 20, 50 and 100 sector 1 times help to also give a feeling about the advantage of the fastest three cars compared to the rest of the field.


LMP2 best 20 sec1


LMP2 best 50 sec1


LMP2 best 100 sec1


The last plot shows very clearly how car n.28 was the best performing vehicle in this sector, over a longer distance.
Car n.31, anyway, was extremely fast if we only consider its best 15-20 sector 1 times.
G-Drive car n.26 was the only one staying close to car n.28 performance.
SMP Dallara n.35 is again the slowest car in this sector, while Panis-Barthez Competition Ligier n.23 was pretty close to the performance of Signatech Alpine car n.26, who inherited the win after car n.26 disqualification and sensibly faster than the United Autosport Ligier n.32.

As we saw during our LMP1 analysis, sector 2 is all about acceleration and top speed instead.
Looking at the results in this sector, we get the first interesting hints about the setup approach that each team took.


LMP2 best sec2 table


Beside car n.31 signing again the best time overall (and with a good margin too), What we immediately see is that car n.28 was never the fastest in this sector, no matter which metrics of our table we consider. The gap to the best performing car n.26 gets smaller as we analyze more and more laps, but still G-Drive crew had an edge on the TDS one.
Car n.39 also performs pretty well in this sector, while the Dallara and the two Ligier are a step behind.


LMP2 best 20 sec2


LMP2 best 50 sec2


LMP2 best 100 sec2


The plots relative to the best 20, 50 and 100 sector 2 times show very well how, in this sector, car n.26 was definitely the one to beat. Car n.28 follows closely, though and the gap gets smaller as we look at more and more laps.
Car n.31 performance were good if we only look at the few best times they obtained, but in general Dragonspeed crew didn’t perform particularly well in this sector.
The two Ligier are pretty close to each other, with car n.23 still being the faster, while the Dallara is always a step back.

As we did for the LMP1 class, it is interesting to look at sector 2 and speed trap results in parallel, as the speed trap is placed before the first chicane on the Mulsanne straight and sector 2 is definitely a part of the track where top speed is key to achieve a good performance.


LMP2 best speed


LMP2 best 20 TS


LMP2 best 50 TS


LMP2 best 100 TS


Both the table (relative to the best top speed overall and to the average of the best 20, 50, 100 and “all clean laps” recorded top speeds for each car) and the plots show something very clearly: the Dallara is the car with the best top speed. Still, SMP crew was pretty slow in sector 2, this signalizing either an aerodynamic that is not efficient enough (high speed means low drag, normally, but the question is how much downforce the car had to give up to get to this low drag) or handling issues (or both).
Car n.28 is constantly the one with the lowest top speed and by a good margin; nonetheless the car didn’t perform too bad in sector 2, being only slower than car n.26.
Car n.26, n.36 and n.39 seem to have a pretty similar aerodynamic setup, if we look at the top speeds, but car n.26 was significantly better than the others in terms of sector 2 times. This seems to suggest the package car handling+drivers worked better than the other crews; G-Drive did indeed a really good job.
Car n.39 performed also pretty well in this sector, being on the pace of car n.36, that got the win after car n.26 disqualification.
The crossed comparison of sector 2 times and top speed results for car n.26 and car n.28 seems to suggest that the first opted for a lower downforce solution, while the second sacrificed some top speed but preferred to have some more downforce.

This seems to be confirmed by the analysis of sector 3 performance.


LMP2 best sec3 table


By looking at the previous table, we can immediately recognize how much faster was car n.28 in sector 3 than any other crew on track.
The gap to the best second car is really impressive: if we exclude the best sector 3 time overall, where car n.28 has “only” about 0.1 seconds gap on car n.31, TDS crews is between 0.4 and 0.5 seconds quicker than the second fastest team in this sector in every metrics, with the only exception of the “all clean” laps one.


LMP2 best 20 sec3


LMP2 best 50 sec3


LMP2 best 100 sec3


These plots give an even better feeling about the gap between car n.28 and any other crews in sector 3.
Beside this, we can see once again how off pace the SMP Dallara was.
Michelin tyres seemed to help car n.23 to be the fastest Ligier.
Among the “other Orecas”, car n.39 and car n.36 are very close to each other, while car n.26 was a bit faster but still not close to car n.28.
Finally, car n.31 had once again a few very fast laps but was in general not close to the best cars pace.

As we did for the LMP1, it can be interesting to take a look to the best times each car got in the Porsche Curves section.


LMP2 Porsche Curves


The LMP2 cars we are considering are marked with a red dot in the previous table. Car n.31 is the fastest here, with car n.28 following close. The next fastest car, Signatech Alpine n.36, is nearly 0.3 seconds slower, in a 14.5 seconds long section! Car n.28 and car n.31 were simply in another class in this sector, with the remark that car n.28 seemed to have a very stable performance in the whole sector 3 during the whole race, while car n.31 seemed to be able to only produce a few fast laps.
This seems to reinforce the idea that car n.28 carried indeed more downforce than car n.26, building up its advantage in sector 1 and 3. Even being a bit slower in sector 2, TDS crews could still be the fastest car on track.

Once again, LMP2 has proved to be pretty interesting, at least from a technical perspective, not only because of the chassis variety we have in the class but also because each team uses its own approach to setting the car up.
TDS and G-Drive Orecas were without doubt the fastest on track, with car n.28 actually being slightly quicker.
This seems to confirm that both cars could compete for the win simply relying on their pace, without taking any risks in trying to make their pit stops quicker, by modifying their refueling system. A shame, should none of them get the win (as it looks like at the time of writing) after the FIA/ACO will take their final decision because, basing on pace they would have both deserved it.

Posted by: drracing | August 8, 2018

24 Hour of Le Mans 2018 – Race Analysis – LMP1

Hi everybody,

although with embarrassing delay, this post will focus on the numbers relative to this year Big Race.
It is the first time i analyzed a 24 Hours Race, but i will basically use the same approach i used for other analysis, crunching the numbers provided by FIA/ACO about the race and trying to understand how each of the main actors performed.

This year race was full of promise, with a lot of hot topics on the table, like Fernando Alonso racing (and winning) with Toyota and with a lot of drivers with previous Formula 1 experience taking part to the competition.
Beside this, the LMP1 class has been interested by a revolution, with Toyota remaining the only work team attending the WEC Superseason and being joined by several private teams, running cars without any hybrid system.
The deal had to be that these teams, running with significantly smaller budgets than any manufacturer, would be helped by the rule to get close to Toyota’s performance, mainly through a series of breakthrough mainly regarding aerodynamics, weight and the amount of usable energy for each lap.
All good, if it would not be that the ACO/FIA introduced a further series of “strange” rules with the aim to ensure to Toyota a safe advantage on the competition, although the first race of the Superseason in Spa had already showed how much quicker the Japanese cars were compared to privateers.
Among others, some of the actions consisted in a reduction of the fuel flow that the privateer could use, of the amount of energy per lap and a fixed stint length, that had to be one lap shorter than Toyota’s one, in green flag race conditions.
I would not dig too much into the details of these decisions, but i can say i was extremely disappointed to see similar actions coming so late before Le Mans, with the clear intention to ensure Toyota’s victory. Something that Toyota didn’t need at all.
Beside the reduction in the fuel flow, that most probably put the privateers in an extremely uncomfortable position of having less power than they expected, with this affecting also their ability to deal with traffic (the best qualified private car didn’t have any speed advantage compared to LMP2 cars, for example), the fixed stint length, in particular, is something that goes completely against the spirit of LMP1 technical rules, that from the beginning always focused on efficiency; this also took out a very interesting strategical element during the race, with every team having to pit after a mandated amount of laps.  No more reward for drivers being able to save fuel or teams deciding for a different approach, as the same Toyota did in 2016.

In the LMP1 class the race itself has been poorer of emotions compared to previous editions, with each car more or less doing its own race and the class itself being practically divided in two subclasses: Toyota and all the others.
On the other hand, anyway, it must be said that Toyota was very fast, also compared to previous editions, both in terms of pure speed and general pace and that Toyota’s two cars pushed against each others more or less for the whole race.
Alonso did indeed an amazing job, being not only incredibly fast but also dealing with traffic like a Le Mans veteran.

Enough words. Let’s get to the numbers now!


We will take a look to the LMP1 class first (i will deal with LMP2 in a separeted entry), focusing our attention on the two Toyota (car n.7 and the winning car n.8), the two Rebellion-Oreca cars (car n.1 and car n.3) and the fastest (before its retirement) SMP Dallara (car n.17).
By simply looking at the following table, showing each car best lap times, the average of the best 20, 50 and 100 laps and the “all clean laps” average, we immediately see that Toyota were simply in another class, with the fastest car of the Japanese team (car n.8) being consistently about 2.4 seconds quicker than the best Rebellion (car n.3), no matter which metrics we consider.

LMP1 best laps table


It is interesting to notice how car n.8 seemed to have consistently a better pace than the sister car, with the gap getting bigger as we consider more and more laps and staying between 0.2 and 0.6 seconds.
Focusin on the privateers, the best lap overall was actually obtained by the n.1 Rebellion, about 2.4 seconds slower than the best Toyota and 0.3 seconds faster than the sister car n.3 and the SMP Dallara.
Anyway, if we move on and consider the average of the best 20, 50, 100 and all clean laps, we see how car n.3 was constantly faster than car n.1 and, indeed, the fastest private LMP1 overall.
It is interesting to notice how, although car n.3 and car n.17 had more or less the same best lap, the SMP Dallara was actually slower than both Rebellions, although it fought for a long time with car n.3 before it retired, with the Rebellion apparently not being able to overtake the Russian crew, despite having a better pace. We will see in a few moments what could be the reason for this.

The following plots show the best 20, 50 and 100 lap times obtained by each car. In the last one i took out the SMP car, because their retirement during the night made useless to look at the best 100 laps, as shown also by the very high lap time they had in the table we just considered for the average of the best 100 laps.


LMP1 best 20 laps


LMP1 best 50 laps


LMP1 best 100 laps


These plots seem to confirm what we could conclude already by looking to the previous table.
Toyota was much faster than any private team. If we add this to the longer stints they could do (the winning car n.8 did two pit stop less than the third classified car n.3) and to the shorter refueling times, it is easy to understand why most fans thought the EoT didn’t work too well.
Car n.8 was sensibly faster than car n.7, while car n.3, the fastest privateer squad, was constantly faster than car n.1.
The SMP Dallara was not completely off pace, but still consistently slower than the Rebellions.

Let’s now break down our analysis and consider the sector times of each car.

As usual, the track has been divided into three sectors, the first one being the shortest (about 32 seconds for an LMP1 car) and the following two being much longer, as shown in the following track map.


track map


The first sector is the slowest one, being composed by part of the box straight, the dunlop chicane and the Esses, up to the entry of Tetre Rouge.
The second one is all about acceleration and top speed, being mainly composed by the Mulsanne straight (with its two chicanes) up to entry of Mulsanne’s Corner.
The third one is a mix of straight line parts and very high speed corners, like Indianapolis and the Porsche Curves, but it also includes the two slowest corners of the track: Mulsannes corner and Arnage, both normally driven in first gear.
The performance in the Porsche Curves is a real indicator of how much downforce the car has.

We will start with the first sector.
Here we have the first interesting surprise. The two Toyota were not the fastest cars here, with the honors being taken by the two Rebellion, as shown in the following table.


LMP1 best sec1 table


Car n.3 was not only the fastest Rebellion, but also the fastest car overall in sector 1. Both Rebellion were faster than the two Toyota, if we exclude the “all clean” laps metrics where car n.8 was slightly quicker than car n.1.
Car n.17 is relatively close to the two Toyota.

The following plots, relative to the best 20, 50 and 100 laps help us to get a visual feeling about the relative performance of each car compared to the others.


LMP1 best 20 sec1


LMP1 best 50 sec1


LMP1 best 100 sec1


The first two plots show an interesting point: car n.17 was faster than the two Toyota as well, if we only consider the 6-7 sector 1 times, but falls significantly behind after the 7 mark.
We could speculate about the reasons behind Toyota not being the fastest car in the first sector.
One reason could be that they could opted not to use the hybrid power so much in the first part of the track, as there were no long accelerations were they could deploy it effectively.
Beside this, Sector 1 is a pretty twisty section of the track, where handling and downforce surely play a role.
The privateers are lighter than the two Toyota and could have a very efficient aerodynamic, if the teams did a good job fully exploring the rules. As we will see, most probably this means a very high downforce for the two Rebellion-Oreca.
We have to keep in mind that the gap between car n.3 and car n.8 was anyway pretty small, in absolute terms: we are talking about 0.1 and 0.25 seconds, depending on the metrics we consider. As we said, the first sector is a very short one, so the differences between different cars cannot be too big, in absolute terms.
The magnitude of the gap in sector 1 must be kept in mind, as we move to consider sector 2.

The situation in sector 2 was in fact the opposite, with the two Oreca-Rebellion being slower not only than the two Toyota, but also than the SMP Dallara.


LMP1 best sec2 table


Sector 2 is where the Toyota builds the most of their gap on the non-hybrid cars, despite this sector being slightly shorter than the last one.
This is where the hybrid deployment can be used more effectively with the cars having to accelerate out of two pretty slow chicanes.
The gap between Toyota car n.8 and Rebellion car n.3 is between 1.5 and 2 seconds.
On the pure performance, the two Orecas are also sensibly slower than the SMP Dallara, with car n.17 being 0.6 seconds faster than car n.3 if we consider the best sector 2 time and about 0.3 seconds if we consider the average of the best 20 sector 2 times.
This is easier to visualize by looking at the following plots, relative to the best 20, 50 and 100 sector 2 times.


LMP1 best 20 sec2


LMP1 best 50 sec2


LMP1 best 100 sec2


The first plot shows very well how the SMP Dallara seats pretty much between Rebellion and Toyota, in terms of performance, although closer to the Swiss team. On the long run, anyway, the Russian car loses its advantage and its line even goes above the one of the two french cars.
It is also interesting to notice how both Toyota and Rebellion cars are extremely closer to each other in this sector. The reasons for this are probably connected to both cars of each team using similar aerodynamic settings and on sector 2 being not a track section where the driver can make too much difference.

The performance of each car in sector 2 seems to indicate that the Dallara run with less drag than the two Orecas.
This seems to be confirmed if we look at the speed trap data, with the speed trap being located before the first chicane on the Mulsanne straight.


LMP1 best speed


The SMP Dallara tops pretty much every metrics of our table, as long as the car is on the track. Its top speeds are consistently higher than the Rebellion, with both non hybrid teams being faster than Toyota.
A lower drag (or higher engine power) of the car n.17 with respect to car n.1 and car n.3 would justify its higher top speeds and its good performances in sector 2.
On the other hand it is still extremely revealing to think that, in a part of the track where (with traditional racecars, without any hybrid system) the top speed would normally make a difference, the car obtaining the best times is the one (Toyota n.8) having among the lowest top speed. This is the magic of accelerating like a rocket ship every time the boost of the hybrid kicks in.

The plots relative to the best 20, 50 and 100 top speeds achieved by each car help to identify some further points, beside giving, as usual, a clearer feeling of the difference between each car and the others.


LMP1 best 20 TS


LMP1 best 50 TS


LMP1 best 100 TS


The first thing catching our attention is, again, the higher top speed of the SMP Dallara.
Anyway, another interesting point related to the difference between a hybrid and a traditional internal combustion engined car can be clearly seen in the last plot.
Here we notice how the two Toyota have a much bigger scatter in their top speeds compared to the two Rebellion cars, whose top speed remains more constant even when analyzing more laps.
The reason why this happens lies most probably in the higher flexibility that an hybrid system offers to the drivers to cope with race situations. When needed, the two Toyotas could probably deploy more energy through the hybrid system to help, for example, in overtaking maneuvers, thus also achieving higher top speeds.
In normal situations, on the other hand, they would probably achieve much lower top speeds.
In a traditional car, on the other hand, if there is no special needs to coast before the brakings to save fuel, the driver simply keep the throttle completely open every time, thus having a smaller variation on the recorded top speeds.

Combining the data relative to sector 2 and top speed, we could spot the reason why car n.3 could not overtake car n.17 for a long time during the race, although being faster in terms of pure pace. The SMP crew had simply a better top speed, this making very hard for Rebellion drivers to try any attack.

What about sector 3?
Since sector 3 is composed of pretty different sections, including long straights and both fast and very slow corners, we will use not only the sector times for our analysis, but also some data relative to “best specific sectors” times provided by the FIA/ACO.
If we look at the following table, showing the best sector 3 time and the average of the best 20, 50, 100 and all clean sector 3 times, we can only recognize how big Toyota’s advantage on non hybrid cars was.


LMP1 best sec3 table


This table shows again Toyota’s superiority compared to any competitor, but also how the gap was now “only” about 1 second in a 91 seconds long sector, which is a smaller relative difference compared to sector 2, which was only about 77 seconds long and where Toyota was about 1.5-2 seconds faster than the best Rebellion car (n.3).
This rings a bell. For some reason, although being much faster than the privateers anyway, the gap that Toyota had on other cars here was not as big as would expect, interpolating what we have seen in sector 2.
We keep this in mind and we will come back on this in a moment.
We take a look to the plots showing the best 20, 50 and 100 sector 3 times of each car first.


LMP1 best 20 sec3


LMP1 best 50 sec3


LMP1 best 100 sec3


What these plots show, beside the gap between Toyota and the non-hybrid cars, is that the two Rebellions are constantly quicker than the SMP Dallara, despite the russian car having better top speeds, as we have seen.
This indicates that the two Rebellion were particularly effective in the more twisty part of this sector, which includes both very slow and very fast corners.
Some of them are the famous Porsche Curves, which are a sequence of tremendously fast corners, pretty much at the end of the lap.
Incidentally, although they are not a track sector per se, the FIA/ACO provides the best times each car obtained in the Porsche Curves section.

Porsche Curves


Key to the performance in these corners are downforce and aerodynamic balance, as the cars negotiate them at very high speed. The two Rebellion cars are not only on top in the list here above, but also have a substantial advantage on every other LMP1, with the best time of a Toyota being only fifth, with a gap of more than 0.4 seconds to the best Rebellion. Keeping in mind that this section is only about 14 seconds long, we can immediately recognize how much quicker the two Oreca were than the two Toyota.
Part of the difference in this sector could also come from the hybrid power not being deployed by the Toyota, leaving the two Japanese crews with less power than a privateer LMP1.
These seems the final prof of the Oreca running a very high downforce package, compared to other cars and typical Le Mans standards.
And this seems to explain why Toyota didn’t have such a big margin on Rebellion cars in sector 3, compared to what they had in sector 2.

Although i have always appreciated the fantastic technological battle that made for extremely exciting championships and races in the LMP1 class in the past few years (with Audi, Porsche and Toyota battling on track often wheel to wheel), i have immediately felt a strong interest and simpathy for the many privateers who built and raced cars in Le Mans this year.
Anyway, i have to admit that i think this last Le Mans was a pretty boring race and what disappointed me the most is that this came most of all as a consequence of the regulations and to the adjustments that FIA/ACO did without any apparent technical reason.
Balancing the performances of so different cars and teams, using different technologies and having completely different resources is surely extremely difficult.
Anyway, we all know how WEC was saved by private teams jumping in with nearly no advice, when Porsche stepped out, so it is pretty disappointing seeing how the rules pegged them down just a few days before the big race.
Nonetheless, these analysis should show how some of them have managed to do a great job in designing and building really competitive cars.



Posted by: drracing | August 7, 2018

CORE simulation project

Hi everybody,

another super short post just to say that my small project with CORE Autosport caught some attention by Sportscar365, a website that deals mainly with sporstcar and GT racing.

You can find their interview with Jeff Braun about this here.

In the meant time, CORE Autosport won two races in a row, one in Mosport and one at Road America on sunday. In Mosport, beside a perfect strategy, they also got probably the fastest car.
Last sunday in Road America was a strategy masterpiece, with a perfect fuel saving driving from Colin Braun. Amazing race!

I am extremely proud to be involved with this effort!

Stay tuned for more technical stuff coming soon in the next few days.

Posted by: drracing | July 5, 2018

Short update

Hi everybody!

Quite some time since my last post here, hopefully this trend will be inverted in the next few weeks.

2018 has been indeed a very busy year till now. And a very exciting one too!

As maybe somebody reading here already knows, since January i am contributing a bit to theRacingLine, a very nice website dealing mainly with Sportscars and GT racing.
I mainly write tech articles there, trying to keep them as easy as possible, in order, first of all, not to bore too much the people who are crazy enough to read them and, secondly, to make them interesting for a broader audience than the even more crazy people who, from time to time, comes here to read something.
Till now we dealt with the basics about tyres, here and about aerodynamics, here, each with a series of 6-7 articles.
Next up will be a longer series about handling.

Of course, i highly recommend anybody interested in race car technology to pay a visit to theRacingLine! it is, in general, a very nice website!

In the mean time, i was also very busy on the simulation side.
I was lucky enough to come into contact with a motorsport legend, Jeff Braun and i started to support him and his current team, CORE Autosport, on the simulation side.
CORE Autosport takes part in the IMSA WeatherTech Sportscar Championship in North America, competing in both the GTLM class (as a Porsche work team) and DPi/LMP2 class, with an FIA spec. Oreca 07. Jeff is engineering the LMP2 car, with the two “resident” drivers being Jon Bennet and his son Colin Braun. For the long races, anyway, they also get some help from another legend, Romain Dumas and for the 24 Hours of Daytona they also had another great driver in the car, Loic Duval (ex Audi LMP1 driver and now competing for the german brand in DTM).
We built up a very very detailed vehicle model of their car, basing on my LMP2 model and went on refining it constantly, both to improve correlation with real data and to add new features that the team would like to test.
The first thing we did was to include a tyre model representing their tyres into my original model. After that, we used their logged data to check the correlation and to improve it further, by adjusting some small bit and pieces.
The team also carried over some specific tests and measurements on the real car to reproduce some areas of the vehicle better in simulation environment.
I will write about this project more in details in a different article.
Anyway, to describe very briefly what we are doing, we currently mainly focus on the preparation of races and test days, testing in the simulator a range of solutions to help Jeff and the Team to know upfront what to expect, on what to focus more and to understand which direction seemed to work better and what was probably not worth any real testing time.
As always, one of the biggest advantages of using a driving simulator is that it gives a chance to evaluate the results of each test both objectively (analyzing simulations results and data and comparing several sessions and/or logged data) and subjectively, also to understand not only how the performance potential of the car changes with specific setup changes, but also which impact on the driver they have.
I guess it is not necessary to say how much fun this makes and how much one can learn from a similar experience, both about simulation and racecar development and engineering.
Beside this, working with a guy like Jeff is something extremely special. He is not only an engineering legend (see here his Linkedin profile), who won more or less any important race in North America (he worked more or less on any car, including Indycar, Prototypes, GT and much more), but also a unique person, who somehow manage to make also the most challenging projects extremely easy and from whom anybody can learn a lot. I certainly do!
I am always amazed to see how such a smart, experienced and successful person like Jeff is, at the same time, so easy, nice and positive not only about his work, but about life and personal relationships in general. I always admired him as an engineer, but to know the guy behind the mind has been an even nicer surprise!
This is surely one of the most funny and exciting projects i have been involved in many years.
On a further plus, last weekend CORE Autosport scored a pole position in Watkins Glen and finished second after six hours of racing, but only because of a yellow flagged that come out with about 30 minutes to go and completely destroyed a 26 seconds lead that they had at that time, also putting them in a bad position with the fuel strategy. After that FCY and pit stop, they came out in 8th position but in less than half an hour recovered finishing second.
All of this, although after about 90 minutes into the race they were in 13th position.
Without that neutralization, CORE could surely win the race.
The car was really good!


Beside this, i got to support two drivers who compete in the WEC Superseason and both raced in Le Mans this year.

One of them is Giedo Van der Garde, who races with the duch team Racing Tam Nederland this year, aboard a Dallara LMP2 car. He immediately impressed at his debut Race in Spa, in May, when he overtook more or less the whole LMP2 field, taking the lead of the race in the early phases like it was the easiest thing in life! And all of this after more than one year since he last drove in a titled race, when he won the ELMS title in 2016.
I was lucky enough to get in contact with him and being asked to prepare a vehicle model that he uses for his training in his own simulator.

VdGarde Dallara Spa

The other one is Mathias Beche, who competes in LMP1 with Rebellion and finished third overall in Le Mans (or, we should say, “first of the others”, as Toyota was clearly in another class, but this is a different story).
Mathias is an extremely talented driver but also a very nice guy, very respectful and very open and extremely passionate about what he does.
He regularly trains in his own simulator and, since some time, he uses a vehicle model that i prepared for him.
Beside being an extremely fast driver, Mathias has a very good understanding of racecar engineering and tuning and believes strongly in the advantages of proper simulator training. He his also extremely accurate when he works on car setup with his engineers and he translate this skills also in his simulation experience.
This makes working with him extremely interesting, because his technical understanding and dedication is reflected very well in the detailed feedback he can give about the model and about its setup. It is extremely interesting to hear his thoughts and reactions not only about the model itself, but also about the setup changes I did, during the development phase, to make the car handle in a way i would think being realistic.
For now, Mathias used the model to mainly train for Le Mans and, apparently, this helped him a bit in achieving a podium results, together with his crew mates. Not bad!

rebellion 2018 LMù

That’s it for now. These projects are keeping me very busy and that’s why i didn’t write much here in the last few months. Anyway, I hope to be able to post some new articles soon, going back to tech topics.

Older Posts »