In the high-stakes world of autonomous racing, knowing exactly how fast you’re going is a non-trivial challenge. When a car is hurtling around a corner at the limits of handling, traditional sensors drift, and simple kinematic models fall apart. A new paper accepted for IROS 2024, "Learning dynamics models for velocity estimation in autonomous racing," proposes a clever hybrid approach: combining the classic reliability of Kalman Filters with the representational power of neural networks, all while enabling the car to "feel" and adapt to changing road friction in real-time.
TL;DR
This paper introduces a differentiable Unscented Kalman Filter (UKF) that uses a neural network to model complex tire dynamics, optimized specifically for the state estimation task. By including an online-estimated friction coefficient in the filter's state, the system achieves a 17% performance boost over state-of-the-art RNNs and demonstrates remarkable zero-shot adaptation to new road surfaces.
What Problem Does This Paper Address?
Accurate velocity estimation is the backbone of autonomous racing—it’s essential for everything from LiDAR undistortion to stable control. However, racing involves "aggressive maneuvers" where tires aren't just rolling; they are sliding. In these regimes, sideslip angles can reach extreme values, rendering standard vehicle models inaccurate.
While pure machine learning models like LSTMs can fit this data well, they are often "black boxes" that struggle to generalize. If you train a model on a dry track and then it rains, the model will likely fail because it hasn't learned the underlying physics of friction. The authors aim to bridge this gap by creating an estimator that is both flexible (via neural networks) and physically grounded (via a Kalman Filter structure).
Methods
The authors employ a Differentiable Unscented Kalman Filter (UKF). Unlike standard filters where parameters are hand-tuned, a differentiable implementation allows the researchers to use backpropagation to train the internal dynamics model directly to minimize estimation error.
Key components include:
- Hybrid Dynamics: They use a standard single-track vehicle model but replace the complex, non-linear tire force equations (like the famous Pacejka Magic Formula) with a neural network ($F_{NN}$).
- Friction Scaling: To handle different road surfaces, they scale the neural network's output by a friction coefficient $\mu$: $[F_x, F_y] = \mu \cdot F_{NN}(x, u)$.
- Online Adaptation: Crucially, $\mu$ is added to the UKF state vector. This means the filter treats friction as something to be estimated on-the-fly based on sensor feedback (IMU and motor speed).
- Heteroscedastic Noise: The filter doesn't assume sensor noise is constant; it uses linear regression to predict how uncertainty ($Q$ and $R$ matrices) changes based on the car's current state.
Datasets
The researchers introduced a new, publicly available dataset using an F1TENTH vehicle (a 1/8th scale RC racing car).
- Scale: 52 minutes of high-speed driving data.
- Intensity: It features extreme maneuvers with sideslip angles reaching 40°, far surpassing existing benchmarks like the Targa Sixty-Six dataset.
- Diversity: The data includes four different tire types (achieved by covering tires with different tapes) to simulate varying friction levels.
Key Insights and Ideas
- Optimization Criterion Matters: The authors found that training a dynamics model to be a good "one-step predictor" (the standard ML approach) is not the same as training it to be a good "state estimator." By training through the UKF, the model learns to focus on the state dimensions that are hardest to measure directly.
- The Power of $\mu$: By explicitly pulling the friction coefficient out as a scalar multiplier, the neural network only has to learn the shape of the tire forces, while the UKF handles the magnitude based on the road surface.
- Prediction vs. Observation: Their analysis (shown in Figure 6) reveals that a learned model is significantly more impactful during the UKF's prediction step than the observation step.
Key Results
- Superior Accuracy: In nominal (known) conditions, the proposed
NNTFUHmodel outperformed GRU-based estimators by 17% in Mean Squared Error (MSE). - Zero-Shot Adaptation: When tested on a completely unseen road surface (33% lower friction), the model maintained high accuracy, while standard neural network models and RNNs saw their performance degrade significantly.
- Rapid Convergence: As seen in Figure 4, even if the initial guess for friction is wrong, the UKF converges to the true friction value within seconds, allowing the velocity estimate to remain stable.
Limitations and Future Work
While the results are impressive, the authors note a few areas for growth:
- Friction Dynamics: The current model assumes friction is constant ($\dot{\mu} = 0$). While the filter updates this value, it might struggle with extremely rapid, patchy changes in road surface (e.g., hitting a small patch of oil).
- Training Stability: Training a differentiable filter from scratch can be prone to local minima. The authors found that "pre-training" the dynamics model as a one-step predictor before fine-tuning through the UKF was necessary for success.
- Model Complexity: The study used a single-track model; moving to a more complex double-track model could further improve accuracy at the cost of computational overhead.
Summary updated