apacrace

Adaptive Planning and Control with Time-Varying Tire Models for Autonomous Racing Using Extreme Learning Machine

Table of contents

Overview

overview

Hardware specifications

All experiments have been performed on AMD Ryzen 7 5000 series CPU with 16 GB RAM. For the RC car experiments, it is equipped with a Lidar, a depth dual camera, an IMU and wheel encoders. We however use the Vicon based localization to get an accurate position and orientation of the vehicle with high accuracy (of about 1 cm and 0.01 rad).

High Quality submission video

Numerical simulation experiments

We first present all the results from numeric simulation

Tracks

The tracks along with the racing lines used for the experiments are as follows :-

  1. ETHZ
Track
Track

Rendered racelines at :-

ethz_raceline1 ethz_raceline2 ethz_raceline3 ethz_raceline4
\(\mu=0.6\) \(\mu=0.7\) \(\mu=0.8\) \(\mu=0.9\) \(\mu=1.0\)
  1. ETHZMobil
Track
Track

Rendered racelines at :-

mu=0.6 mu=0.7 mu=0.8 mu=0.9 mu=1.0
\(\mu=0.6\) \(\mu=0.7\) \(\mu=0.8\) \(\mu=0.9\) \(\mu=1.0\)

Offline validation

To demonstrate that our proposed ELM model can really learn from dynamics data and to get an idea of how much data is required to train a reasonable model, we perform this offline validation where we collect training data by running single lap on a ETHZMobil Track with pure pursuit for steering and PID for longitudinal control :-

track_training

We use this data to train ELM models offline and also train GP models as proposed in BayesRace work for comparison. Then, we make a run with NMPC using actual model parameters to run 1 lap on ETHZ track and use the trained models to predict difference in $vx$, $vy$ and $\omega$ between the actual values and the e-kinematic model. Here are the plots for $vx$, $vy$ and $\omega$ predictions for both ours and BayesRace against GT values.

y_comps_vx y_comps_vy y_comps_omega
vx vy $\omega$

As can be seen the predictions from both GP (from BayesRace) and our proposed ELM model are nearly close to the GT with training data used from only 1 lap of training data with limiting speeds (Note that the predictions are not very close if the training data is collected at low speeds with little lateral slips). This suggests that our proposed ELM is indeed as good as (if not worse) using GP for predicting difference between actual and e-kinematic model of the vehicle. But the obvious advantage of using our ELM is that it’s can be trained in an adaptive manner and with very less computation time allowing it to update online while GP’s training time is huge and it scales with more training data. One way to get rid of increaing computation on data size is to use only last few samples for training but it needs to be trained each time for each cycle due to which it contributes larger computation time for each cycle. Also, ELM has significantly less non-linearity which allows us to use it in building a real-time NMPC controller with only around 0.05 $\pm$ 0.02 s computation time while GP takes about 0.3s $\pm$ 0.05s practically on our machine when used online (and even offline it takes 0.25s on avg as also reported by BayesRace) with IPOPT optimization. Also, with estimated tire curve from ELM, we can even estimate the tire friction coefficient by taking the max value of the prediction while for GP we need to use an estimator separately.

Results on ETHZ track with constant friction decline

This is to simulate wear and tear of the tires. We reduce the friction coefficients \(D_f\) and \(D_r\) according to the following plot :-

max_friction_forces
time vs $D_f/D_r$ variation

The resultant trajectory, speed and \(\mu\) (used to render raceline reference speeds) plots for different algorithms are as follows :-

Method Trajectory Speeds \(\mu\) used for raceline
Without any adaptation track_run1 speeds(5) Same as beginning (\(\mu=1.0\))
With only model adaptation track_run1(2) speeds(4) Same as beginning (\(\mu=1.0\))
With model + reference speed adaptations (ours) track_run1(1) speeds(2) mus
With GP for model difference track_run1(3) speeds(1) Same as GT
Oracle track_run1(4) speeds Same as GT

Here is the video comparison with 3 runs (without adaptation, with only model adaptation, with model + reference speed adaptation) in parallel :-

Results on ETHZMobil track with constant friction decline

We reduce the friction coefficients \(D_f\) and \(D_r\) according to the following plot :-

max_friction_forces
time vs \(D_f/D_r\) variation

The resultant trajectory, speed and \(\mu\) (used to render raceline reference speeds) plots for different algorithms are as follows :-

Method Trajectory Speeds \(\mu\) used for raceline
Without any adaptation traj_withoutmobil speeds Same as beginning (\(\mu=1.0\))
With only model adaptation traj_withconstmobil speeds Same as beginning (\(\mu=1.0\))
With model + reference speed adaptations (ours) traj_withmobil speeds mus
With GP for model difference traj_gpmobil speeds_gp_mobil Same as GT
Oracle traj_oraclemobil speeds_oracle Same as GT

Results on ETHZ track with sudden friction decline

Next, to test how our method would perform if there is a suddent drop in maximum friction parameter which can be caused for example by sudden rain/change in weather condition etc., we suddenly drop the friction coefficient by about 30\% at a given time according to the given plot :-

max_friction_forces
time vs \(D_f/D_r\) variation
Method Trajectory Speeds \(\mu\) used for raceline
Without any adaptation track_run1(1) speeds(1) Same as beginning (\(\mu=1.0\))
With model + reference speed adaptations (ours) track_run1 speeds mus

Results on ETHZ track with different friction decline rates

Method Trajectory Speeds \(\mu\) used for raceline
Ours (on higher friction decline rate) traj_gp_fastdecay frame1779 frame1779
Ours (on moderate friction decline rate) traj_gp_mediumdecay frame1779 frame1779
Ours (on less friction decline rate) traj_gp_slowdecay frame1779 frame1779

Carla simulation experiment

To demonstrate our algorithm working on a high fidelity simulator in realtime with full sized car, we deploy it on Carla simulator. Deploying on a simulator gives us additional confidence in terms of the performance guarantee in presence of sensor and model noise. We use the following trackmap (Town07) :-

image
Town07 map

We use Audi TT car in Carla as follows

carla_car
Car used for simulation

We start with the default model parameters as defined in Carla and reduce the tire_friction parameter (which is the coefficient of friction of the tire) of the vehicle linearly as described below :-

Offline validation

For offline validation, we check the lateral and longitudinal forces from the trained model on one lap of data and compare them to the lateral and longitudinal force values obtained from the simulator. As shown in Fig. \ref{fig:offline_val_carla}, although these values are noisy, our trained model archives high fitting accuracy. This is to ensure that the fitted tire curves from offline collected data just from the trajectory data actually confirms with the actual force recorded by carla simulator (available from privileged forces on tyres from carla). We also present the difference in vx, vy and $\omega$ wrt the e-kinematic model.

slips_forces
slip vs force (Predicted (line) vs recorded (scatter))

Online run with constant friction decay

For the online run, we set $\alpha=0.002, \gamma=0.9, \mu_{start} = 1.0, K_{batch} = 2000, t_{th}=44s, n_h=40, N=50, Q=\begin{bmatrix} 0.1 & 0 \ 0 & 0.1 \end{bmatrix}, R = \begin{bmatrix} 0.005 & 0 \ 0 & 1 \end{bmatrix}$. The run plots for without adaptation are as follows :-

Trajectory traj_without
Speeds speeds_carla_without
$\mu$ taken to get raceline Same as at the beginning ($\mu=1$)

As can be seen from the speed plot, the car crashes at about 120s. The plots for with adaptation are as follows :-

Trajectory traj_with
Speeds speeds_carla_with
$\mu$ taken to get raceline mus_carla

The trajectory plots may not be visible clearly due to large track size. The video of the runs help to observe the results more clearly :-

RC Car experiments

Finally, we test our algorithm on a real RC car to demonstrate working on a real system with real sensor, model noises and that we can implement in realtime. The car is equipped with a Lidar, a depth dual camera, an IMU and wheel encoders.

rc_car
RC car hardware

Despite the onboard computation available, we use a windows machine with 16 GB RAM, AMD Ryzen 5000 processor for computation which also runs the Vicon tracker software for localization and communicate the commands directly to the vehicle

Screenshot from 2023-09-16 02-19-06

Experiment Setup

We perform the experiment on 2 track as shown below. The lane width is about 0.5 m. The reference line is taken to be the centerline with limiting speeds rendered according to \cite{doi:10.1080/00423114.2019.1631455}. The speeds are adjusted according to the estimated friction coefficient. We conduct the experiment by starting a friction coefficient equal to $1.5$ and incrementally increase target speeds from $50\%$ of the reference speeds to $100\%$ of the reference speeds from $t=10s$ to $t=35s$. This is to ensure physical safety and also allow sufficient time and data for the adaptation algorithm to estimate the friction and aerodynamic parameters.

rounded_rect_ref rounded_diamond_ref
Oval track Diamond track

Results on Oval track

The trajectories followed if adaptation is used vs not used are as follows :-

Method Trajectory \(\mu\) used for raceline
Without adaptation path Same as beginning (\(\mu=1.5\))
With model + reference speed adaptations (ours) path(1) mu_preds(1)

Then, we change the surface by adding wooden planks on the ground as shown below to change the surface :-

Screenshot from 2023-09-16 02-43-22

Starting with the same predicted model and friction coefficient, we again increase the speeds gradually from 0.5 of raceline speeds to 1. The trajectory followed by the car is as follows :-

Trajectory \(\mu\) used for raceline
path(2) mu_preds(2)

As can be clearly seen, the vehicle does move out of the track at the beginning but is able to use the experience to tune the model and friction coefficient to adjust the next lap accordingly and is able to adapt well to the new surface. The video of the whole run is as below :-

Results on Diamond track

The trajectories followed if adaptation is used vs not used are as follows :-

Method Trajectory \(\mu\) used for raceline
Without adaptation path Same as beginning (\(\mu=1.5\))
With model + reference speed adaptations (ours) path 1399