Laptime simulator

Post here information about your own engineering projects, including but not limited to building your own car or designing a virtual car through CAD.
hcapellato
hcapellato
0
Joined: 28 Jul 2016, 17:59

Re: Laptime simulator

Post

Hi MadMatt!

I know that this is a old post, but I'm very curious to know how you did a GUI with many pages.
I'm starting in Matlab now and I would like to know if you could help me in this topic.

see you,
Henrique

Incredible01
Incredible01
0
Joined: 11 Feb 2017, 19:05

Re: Laptime simulator

Post

Hello everyone. I am excited about this Lap Time Simulator thread/post/blog or whatever you call it.

I started my own code with a combination of Excel and MATLAB back in August 2016. Now I have a ready made method to find the whole lap time.

Using just the single wheel model, today I am able to reproduce a time of 1min 22.052sec lap time on Catalunya circuit (Spain). It is just just 0.06% more than the pole position time (1min 22.000sec) set by Lewis Hamilton at the F1 2016 Spanish GP qualifying. Just unbelievable...!

So I thought of being a part of this community. Thanks a lot all...
Learn from motorsports. Push yourself. Be at your limit. Always.

User avatar
Pierce89
60
Joined: 21 Oct 2009, 18:38

Re: Laptime simulator

Post

Incredible01 wrote:Hello everyone. I am excited about this Lap Time Simulator thread/post/blog or whatever you call it.

I started my own code with a combination of Excel and MATLAB back in August 2016. Now I have a ready made method to find the whole lap time.

Using just the single wheel model, today I am able to reproduce a time of 1min 22.052sec lap time on Catalunya circuit (Spain). It is just just 0.06% more than the pole position time (1min 22.000sec) set by Lewis Hamilton at the F1 2016 Spanish GP qualifying. Just unbelievable...!

So I thought of being a part of this community. Thanks a lot all...
Sounds like you did a pretty good job then. What downforce levelsand distribution, and HP level got you so close?
“To be able to actually make something is awfully nice”
Bruce McLaren on building his first McLaren racecars, 1970

“I've got to be careful what I say, but possibly to probably Juan would have had a bigger go”
Sir Frank Williams after the 2003 Canadian GP, where Ralf hesitated to pass brother M. Schumacher

Greg Locock
Greg Locock
233
Joined: 30 Jun 2012, 00:48

Re: Laptime simulator

Post

Unfortunately matching one lap time is just the start of a correlation process. For instance you probably have an estimated coefficient of friction for the tires. Just using that one figure to tune lap times will result in perfect correlation... until you go to a different circuit. As a guide I match all the K&C and linear range stuff and then 8 extreme events (J turns) before a model is considered to be correlated. Even then i doubt lap time predictions would be much cop.

Incredible01
Incredible01
0
Joined: 11 Feb 2017, 19:05

Re: Laptime simulator

Post

Values I used for Catalunya Circuit: (Secrets of Mercedes W07 revealed..!!)

Power = 760 kW (1018 bhp)
Engine torque = 580 Nm over a range of 11000-12500rpm
Tyre grip coeff = 1.60
Decceleration in braking = -24m/s2 (constant value in all braking events)(-2.5G)
Cd = 0.81(without DRS) and 0.74 with DRS
Cl = -2.03
Mass of car = 702kg (although it will be 722kg with the tyres on, using 702kg it landed me a good laptime)
Af = 1.8 m2
Density of air = 1.2 kg/m3

I did not consider the transmission losses, weight of fuel, inertia of gearbox, losses in gearshifts etc.
This means that Mercedes power unit produced more than 1050 bhp or so..
Learn from motorsports. Push yourself. Be at your limit. Always.

User avatar
andylaurence
123
Joined: 19 Jul 2011, 15:35

Re: Laptime simulator

Post

Your downforce is too low, your tyre coefficient is too. That's why the power requirements are so large.

Good stuff writing your own simulator though, it's a reasonable amount of work to get something basic going. All you're missing is some data to get it closer. Try finding an onboard with corner speeds and see if you can match apex speeds and peak speeds on the straights...

Incredible01
Incredible01
0
Joined: 11 Feb 2017, 19:05

Re: Laptime simulator

Post

Now I understand that I need to modifymy values of grip, drag and downforce constants. Even I wondered that F1 cars run a low downforce before I posted them.

But I selected them such that the top speed of my simulation on catalunya pit straight is 334kmph (DRS) and 307kmph (DRS) on the straight that leads to turn 10. All other straights are without DRS. These speeds are pretty close to (336 and 308 kmph) what can be sen on onboard camera telecast -
https://vimeo.com/166685603

My simulation takes about 4 days. It is not completely automated. It involves modelling the racing line in CAD(once it is done it is enough as in the case of any simulation), translating the corner radii to excel, using MATLAB to get the times of each track section separately, recording them next to the corner cells, adding them all to get the whole laptime

Have a look at my MATLAB underlined structure
I made 2 master functions
1) Curve-straight-curve which takes in velocity-length-radius of the sections in the same sequence to follow
2) Curve-Curve-Curve which takes velocity-length and radius-radius of the sections in same sequence
These above functions again use :-
1 Acceleration function - Sum of all forces/mass
3 nested functions for Rolling Resistance, Drag and Traction each.
Learn from motorsports. Push yourself. Be at your limit. Always.

User avatar
Tim.Wright
330
Joined: 13 Feb 2009, 06:29

Re: Laptime simulator

Post

holy shít, 4 days?? Steady state models should be able to compute a lap in less than a minute.

For what it's worth I don't necessarily think the tyre friction is wrong as Andy said. Search for some of dynatune's posts here. He's an ex-f1 simulation guy, he put the tyre friction at around 1.6.
Not the engineer at Force India

User avatar
Tim.Wright
330
Joined: 13 Feb 2009, 06:29

Re: Laptime simulator

Post

By the way, if you want some good correlation data, Caterham used to upload high-res screen shots of their telemetry from each track.

This is critical because as Greg said, its simple to get the laptime right, but matching the whole speed profile is very difficult.

Another thing to consider is track inclination (laterally and longitudinally) which in my experience has a big effect on cornerimg speeds. Most tracks have banking of a few degrees throughout the whole track which is usually sloping downwards to the inside of the corner.
Not the engineer at Force India

User avatar
andylaurence
123
Joined: 19 Jul 2011, 15:35

Re: Laptime simulator

Post

Tim.Wright wrote:For what it's worth I don't necessarily think the tyre friction is wrong as Andy said. Search for some of dynatune's posts here. He's an ex-f1 simulation guy, he put the tyre friction at around 1.6.
Interesting. When I've looked at my data in the past, it's correlated with figures higher than that. Of course, I shouldn't expect that to relate to F1. We run very sticky slicks so they work from cold.

Cold Fussion
Cold Fussion
93
Joined: 19 Dec 2010, 04:51

Re: Laptime simulator

Post

Tim.Wright wrote:holy shít, 4 days?? Steady state models should be able to compute a lap in less than a minute.
I'm sure he is adding his setup time to that because he said the process wasn't fully automated. Alternatively, maybe he is running it on an Apple 2e...

Greg Locock
Greg Locock
233
Joined: 30 Jun 2012, 00:48

Re: Laptime simulator

Post

If you've ever used Lapsim one of the nice things is how fast it is. However, I figured out the track files and put in a local track. The solve time blew out from say 2 minutes to an hour. Obviously I didn't quite get the track file right!