Autonomous Drifting Based on Maximal Safety Probability Learning

Hikaru Hoshino, Jiaxing Li, Arnav Menon, John M. Dolan, Yorie NakahiraITSC 2024

Abstract

Autonomous drifting and high-speed cornering represent significant challenges for vehicle control systems due to complex nonlinear dynamics and operation at physical handling limits. This paper introduces a novel Physics-Informed Reinforcement Learning (PIRL) framework that enables autonomous vehicles to perform these maneuvers by maximizing "maximal safety probability." Unlike traditional methods that rely on pre-computed reference trajectories or labor-intensive reward shaping, the proposed approach learns safe behaviors directly from sparse binary rewards. By incorporating a physics-based loss term derived from the Hamilton-Jacobi-Bellman (HJB) equation, the agent effectively navigates edge-case scenarios like high-speed drifting in high-fidelity simulations.

Introduction

Controlling autonomous vehicles at their physical limits, such as during high-speed drifting, typically requires either computationally expensive model-based control (e.g., Model Predictive Control) or standard Reinforcement Learning (RL) that necessitates complex reward engineering. Model-based approaches often struggle with long horizons and nonlinear tire dynamics, while RL often requires a "reference trajectory" to follow.

This research addresses the gap by focusing on maximal safety probability—the likelihood that a vehicle remains within a defined safe set (e.g., track boundaries) over a specific time horizon. The goal is to learn extreme maneuvers without a pre-defined map or hand-crafted reward functions.

Methods: Physics-Informed Reinforcement Learning (PIRL)

The core of the solution is the PIRL framework, which integrates physical constraints directly into the learning process.

The PIRL agent architecture combines standard DQN data loss with physics-informed losses derived from the HJB equation and a vehicle model.

The framework employs several key innovations:

  • Augmented State Space: The RL problem is redefined by adding a "remaining time" dimension to the vehicle's state, transforming the maximization of safety probability into a standard additive reward RL problem.
  • HJB Equation Integration: Maximal safety probability is treated as a solution to the Hamilton-Jacobi-Bellman (HJB) equation.
  • Physics-Informed Loss: The neural network's loss function includes a physics loss term ($L_P, L_B$). This term penalizes predictions that violate the HJB equation, using a dynamic bicycle model and Pacejka tire model as constraints.
  • Sparse Rewards: The physics model acts as a guide, allowing the agent to learn from binary rewards (1 for safety, 0 for failure), eliminating the need for manual reward shaping.

Experimental Setup and Results

The framework was evaluated using the CARLA simulator. Training involved normal cornering on the "Town2" map and high-speed drifting on a custom racing circuit.

Normal Cornering and Safety Mapping

The agent successfully learned lane-keeping, with safety probability converging after approximately 20,000 episodes. A key result is the visualization of the learned safety maps, which represent the agent's understanding of safe operating regions.

Learned safety maps showing the effect of lateral error ($e$), heading error ($\psi$), and longitudinal velocity ($v_x$) on the probability of staying safe.

As shown in the safety maps, the model correctly predicts lower safety as longitudinal velocity ($v_x$) increases or as the vehicle approaches the limits of lateral and heading errors.

High-Speed Drifting

In racing scenarios at speeds up to 30 m/s (~108 km/h), the agent learned to navigate sharp corners by drifting. Notably, this was achieved without a specific "drift equilibrium" target; the policy simply maximizes the probability of staying on the track. Hyperparameter tuning revealed that the learning rate is critical, with $5 \times 10^{-5}$ being optimal for stability.

Key Insights

  • Physics as Reward Shaping: The PDE constraint (physics loss) serves as a mathematical substitute for manual reward shaping, providing necessary gradients when environmental rewards are sparse.
  • Safety as a Value Function: Treating safety probability as the RL "Value" allows the system to naturally develop cautious behaviors near boundaries.

Limitations and Future Work

While successful, the approach currently assumes known vehicle parameters (e.g., tire coefficients). Future work could involve using Physics-Informed Neural Networks (PINNs) to identify these parameters from data. Additionally, the learned safety probability could serve as a "shield" for nominal controllers, providing a safety layer for extreme driving conditions.

Summary updated

BibTeX
@inproceedings{hoshino2024autonomous,
  author = {Hikaru Hoshino and Jiaxing Li and Arnav Menon and John M. Dolan and Yorie Nakahira},
  title = {{Autonomous Drifting Based on Maximal Safety Probability Learning}},
  booktitle = {ITSC},
  year = {2024},
}
Figure