Abstract
Ensuring safety in autonomous systems often involves Control Barrier Functions (CBFs), which act as safety filters for primary controllers. However, traditional CBFs require manual tuning of parameters that do not generalize well to novel environments, particularly for high relative-degree systems. This paper introduces a differentiable safety-critical control framework that automatically tunes CBF parameters using a neural network, termed the $\alpha$-net. By embedding the safety-constrained optimization problem directly into the learning architecture, the system achieves an end-to-end differentiable pipeline that balances safety and performance. Experimental results on high-order systems demonstrate that the proposed method generalizes to unseen environments while maintaining rigorous mathematical guarantees of forward invariance.
Introduction
Control Barrier Functions (CBFs) are a cornerstone of safety-critical control, providing a mathematical framework to ensure forward invariance of safe sets. Typically implemented as Quadratic Programs (CBF-QPs), they filter control inputs to prevent collisions or state violations. A critical challenge in deploying CBFs is the selection of the class $\mathcal{K}$ function, which determines the "aggressiveness" of the safety boundary. Manual tuning of these functions is often environment-specific and fails to scale to complex, high relative-degree systems where the control input does not immediately impact the safety constraint. This paper addresses the need for an automated, generalizable approach to safety-critical control.
Methodology
The proposed framework centers on a Differentiable Exponential Control Barrier Function (ECBF) QP. The architecture consists of four primary blocks:
- The $\alpha$-net: A neural network that maps environment features (e.g., obstacle geometry) to the parameters of the safety constraint.
- Differentiable Optimization Layer: By formulating the ECBF-QP as a differentiable layer, the system allows gradients from a performance loss function to propagate back to the $\alpha$-net.
- Safety-by-Design: The $\alpha$-net's output is structured to satisfy Hurwitz stability criteria, ensuring that the resulting control law always guarantees safety, regardless of the network's training state.
- Slack Variables: To maintain feasibility during the early stages of training, slack variables are introduced and penalized within the loss function.
Experimental Setup
The method was evaluated on simulated robotic systems of varying complexity:
- 2D Double Integrator ($n=4, r=2$): A standard point-mass model where control affects acceleration.
- 2D Quadruple Integrator ($n=8, r=4$): A high-order system representing complex dynamics, which is notoriously difficult to tune manually.
The systems were trained to navigate environments with obstacles and tested on novel, randomly generated configurations with varying obstacle sizes and positions to assess generalization.
Results and Discussion
The learned $\alpha$-net demonstrated a remarkable ability to adapt to unseen environments. In double integrator tests, the performance loss of the learned controller (26.88) was nearly identical to that of a manually "optimal" tuned controller (26.41), but achieved without human intervention.
Key insights include the effectiveness of learning the parameters of the optimization problem rather than a direct state-to-control mapping. This "learning the how" approach preserves the theoretical guarantees of control theory while leveraging the representational power of deep learning. Furthermore, the use of ECBFs allowed the framework to scale to systems with high relative degrees (up to degree four), a significant advancement over existing safe learning techniques that struggle beyond relative-degree one.
Conclusion
This work bridges the gap between control theory and deep learning by providing a differentiable framework for safety-critical control. While the current implementation relies on perfect state information and pre-defined high-level controllers, it sets the stage for future research into vision-based safety filters and joint learning of performance and safety objectives. The successful simulation results suggest a promising path toward robust, self-tuning safety systems for real-world autonomous platforms.
Summary updated