Hi all,
Tim here from RMIT Electric Racing.
I am working on a simple point mass simulator in MATLAB using the 'critical points' method as described in Chris Patton's thesis (no yaw dynamics yet though)
In his work, he uses a simple test track with two corners, a straight and a slalom. GPS data is used and the track curvature is calculated using the first and second x and y derivatives, and filtfilt is used in MATLAB to smooth the resultant curvature.
I have successfully replicated this using the GPS file released by SAE-A from the 2016 endurance/autox track, however the calculated lap time is quite sensitive to the method used to derive the curvature from the GPS log.
For example with parameters from the RMIT-E 2016 car. (lots of power, no downforce)
Smoothing with csaps(), p=0.1, laptime= 86.38s
csaps, p=0.9, laptime = 87.78
pchip, laptime = 88.24s
Butterworth filter filtfilt 0.25hz 2nd order (as in Chris Patton's thesis) , laptime = 80.65s (!!!!)
For reference, the best time at the 2016 event was ~76s, we got ~79.5s as our best time.
The improvement in lap time with the Butterworth filter is coming from it rounding off the peaks of the curvature substantially, however I suspect that those peaks are an artifact of the curvature calculation to start off with.
Here is a plot with the different methods of curvature filtering, bottom scale is distance in m
https://i.imgur.com/j99BjLy.png
I would appreciate any suggestions on how to best treat this data, or if there is another method I could use.
I have attached the GPS file and the matlab script I am currently using if anyone would like to have a look.
lapsim_.zip
Cheers,
Tim