Safe value functions, such as control barrier functions, characterize a safe set and synthesize a safety filter, overriding unsafe actions, for a dynamic system. While function approximators like neural networks can synthesize approximately safe value functions, they typically lack formal guarantees. In this paper, we propose a local dynamic programming-based approach to "patch" approximately safe value functions to obtain a safe value function. This algorithm, HJ-Patch, produces a novel value function that provides formal safety guarantees, yet retains the global structure of the initial value function. HJ-Patch modifies an approximately safe value function at states that are both (i) near the safety boundary and (ii) may violate safety. We iteratively update both this set of "active" states and the value function until convergence. This approach bridges the gap between value function approximation methods and formal safety through Hamilton-Jacobi (HJ) reachability, offering a framework for integrating various safety methods. We provide simulation results on analytic and learned examples, demonstrating HJ-Patch reduces the computational complexity by 2 orders of magnitude with respect to standard HJ reachability. Additionally, we demonstrate the perils of using approximately safe value functions directly and showcase improved safety using HJ-Patch.
翻译:安全值函数(如控制屏障函数)能够刻画动态系统的安全集并综合出一个安全滤波器,以覆盖不安全动作。虽然神经网络等函数逼近器可以综合出近似安全值函数,但它们通常缺乏形式化保证。本文提出一种基于局部动态规划的方法来“修正”近似安全值函数,从而获得一个安全值函数。该算法(HJ-Patch)生成一种新颖的值函数,它既提供形式化的安全保证,又保留了初始值函数的全局结构。HJ-Patch在同时满足以下两个条件的状态处修正近似安全值函数:(i) 接近安全边界,且 (ii) 可能违反安全性。我们迭代地更新这组“活跃”状态及值函数直至收敛。该方法通过Hamilton-Jacobi (HJ) 可达性架起了值函数逼近方法与形式化安全之间的桥梁,为整合各类安全方法提供了一个框架。我们在解析示例和学习示例上提供了仿真结果,证明HJ-Patch相对于标准HJ可达性方法将计算复杂度降低了两个数量级。此外,我们展示了直接使用近似安全值函数的风险,并验证了采用HJ-Patch可提升安全性。