Instructions to run the model are found in blue text.
Vehicle
To make the model practical and interesting for the user, it has been created around the 5 litre twin turbo powertrain of the Koenigsegg Agera One:1, which weighs approximately 1400 kg. Vehicle parameters can be edited in the script file (*.m).
NOTE, the following simplifications are applied to the first version of the Simulation:
1) Simplistic lateral and longitudinal model
2) One-dimensional look-up table for engine torque
3) Perfect tyre traction
4) Zero-shift times
click on the image to download all model files
Simple instructions to run the model:
1) Unzip all model files to the preferred folder
1) Start Matlab 2013b or a version which accepts the .slx file format
2) Point the Matlab active folder to the location of the .slx .m and .mat files
3) Right click on the .m file and select "Run" - this loads the parameters used by the model and runs the simulation
5) Open the .m file to alter parameters that affect the simulation
Circuit
The Simulink lap time simulator takes track files which for convenience use the ChassisSim format. As an example we can start with Spa Francorchamps because we have evidence of the Agera One:1 lapping at 2.32.14 (Agera One:1 Spa Lap) and records of various other cars listed below.
Calibration
From recorded data or video, sector speeds for the track can be established and compared them with a first simulation run. Initial runs show that the simulated apex speeds are too high, so the maximum lateral acceleration can be recalibrated from 1.5g to 0.97g and the results become more representative.
Data input format
The circuit data format is tab separated.
Curvature (1/m) Distance (m)
An example is shown below:
0 0
0 5
0 10
0 15
-0.00001 20
-0.00003 25
-0.00007 30
-0.00012 35
-0.00018 40
-0.00022 45
The data is imported from existing files as an array:
Circuit=importdata('tr_spa_f3_rhs.txt');
Velocity, Acceleration and Distance
The variables of a, v, x and t are bound by the following equations:
x = delta distance
vi = initial velocity
vf = final velocity
a = acceleration
t = delta time
x = vi*t + 0.5*a*t^2
x = 0.5*(vi+vf)*t
vf = vi + a*t
vf^2 = vi^2 + 2*a*x
vf = sqrt (vi^2 + 2*a*x)
Lateral Acceleration
In simplistic terms, the lateral acceleration is governed by the relationship aLat = velocity^2/CornerRadius .
And since our track files have data for curvature points, which are 1/Radius, we can rewrite this as aLat = velocity^2*Curvature
For the moment we disregard the influence of aerodynamics on vertical tyre load, so we make the assumption that the vehicle can "typically" obtain a certain maximum lateral (and longitudinal) acceleration: for example we set a maximum of 1.53g = 15 m/s^2 for our Agera example.
So the maximum the vehicle can be driven at is velocity = sqrt(aLat/Curvature)
Tyre friction circle/ellipse
References
[https://pure.tue.nl/ws/files/4257904/626941.pdf]
[http://www.jameshakewill.com/Lap_Time_Simulation.pdf]
https://uk.mathworks.com/help/matlab/ref/importdata.html
https://uk.mathworks.com/matlabcentral/answers/12557-importing-tab-delimited-text-file
https://uk.mathworks.com/matlabcentral/fileexchange/32782-tsvread--importing-tab-separated-data
https://uk.mathworks.com/help/matlab/ref/flipud.html
https://www.linkedin.com/pulse/thinking-kinematics-led-optimisation-willem-toet