Practical Considerations for Discrete-Time Implementations of Continuous-Time Control Barrier Function-Based Safety Filters

Lukas Brunke,Siqi Zhou,Mingxuan Che,Angela P. Schoellig
2024-04-19
Abstract:Safety filters based on control barrier functions (CBFs) have become a popular method to guarantee safety for uncertified control policies, e.g., as resulting from reinforcement learning. Here, safety is defined as staying in a pre-defined set, the safe set, that adheres to the system's state constraints, e.g., as given by lane boundaries for a self-driving vehicle. In this paper, we examine one commonly overlooked problem that arises in practical implementations of continuous-time CBF-based safety filters. In particular, we look at the issues caused by discrete-time implementations of the continuous-time CBF-based safety filter, especially for cases where the magnitude of the Lie derivative of the CBF with respect to the control input is zero or close to zero. When overlooked, this filter can result in undesirable chattering effects or constraint violations. In this work, we propose three mitigation strategies that allow us to use a continuous-time safety filter in a discrete-time implementation with a local relative degree. Using these strategies in augmented CBF-based safety filters, we achieve safety for all states in the safe set by either using an additional penalty term in the safety filtering objective or modifying the CBF such that those undesired states are not encountered during closed-loop operation. We demonstrate the presented issue and validate our three proposed mitigation strategies in simulation and on a real-world quadrotor.
Systems and Control
What problem does this paper attempt to address?
The problem that this paper attempts to solve is a series of problems encountered in the discrete - time implementation of continuous - time control barrier function (CBF) - based safety filters in practical applications. Specifically, when the Lie derivative of the control input with respect to the CBF is close to or equal to zero, the discrete - time implementation may lead to undesired chattering effects or constraint violations. These problems are particularly important in practical applications because most control systems operate in a discrete - time manner, and the safety guarantees of continuous - time CBFs can only be approximately provided in discrete - time implementations. The main contributions of the paper are as follows: 1. **Pointing out practical problems**: Emphasizing the practical problems existing in the use of standard continuous - time CBF safety filters in discrete - time implementations. 2. **Proposing mitigation strategies**: Proposing three practical mitigation strategies to mitigate the impact of the above problems. 3. **Verifying the effectiveness of the strategies**: Verifying the effectiveness of the proposed mitigation strategies through simulations and actual quadrotor experiments. ### Specific problem description In discrete - time implementations, continuous - time CBF safety filters may encounter the following problems: - **Chattering effect**: When the state of the system is close to the boundary of the safety set, if the Lie derivative \(\|\mathcal{L}_g \mathcal{L}_{f}^{s - 1}h(x)\|\) is close to zero, large control inputs may be allowed. However, these large control inputs may cause the system to switch frequently within a finite time interval, thus producing a chattering effect. - **Constraint violation**: When \(\mathcal{L}_g \mathcal{L}_{f}^{s - 1}h(x)=0\), the CBF condition holds for any control input, which makes the safety filter ineffective and may cause the system to leave the safety set. ### Proposed mitigation strategies 1. **Penalty term**: - **Method**: Add a penalty term to the objective function of the safety filter, explicitly considering the situation where \(\|\mathcal{L}_g \mathcal{L}_{f}^{s - 1}h(x)\|\) is close to zero. The new objective function is: \[ J(x)=\frac{1}{2}\|u - \pi(x)\|^2+\frac{r}{2}\|\mathcal{L}_g \mathcal{L}_{f}^{s - 1}h(x)\|^2\|u - \pi_{\text{safe}}(x)\|^2 \] - **Effect**: When \(\|\mathcal{L}_g \mathcal{L}_{f}^{s - 1}h(x)\|\) is close to zero, the safety filter will switch to the backup safety control strategy \(\pi_{\text{safe}}(x)\), thus avoiding chattering and constraint violations. 2. **Safety set design modification**: - **Method 1: Safety set transformation**: Transform the CBF (such as translation or rotation) so that the transformed CBF has \(\|\mathcal{L}_g \mathcal{L}_{f}^{s - 1}\tilde{h}(x)\|\) not close to zero in some states. - **Method 2: Safety set approximation**: Find an alternative safety set \(\tilde{C}\) that can be represented by a set of valid CBFs and \(\|\mathcal{L}_g \mathcal{L}_{f}^{s - 1}h_i(x)\|>\epsilon\) for all \(x\in\tilde{C}\). ### Experimental verification The paper verifies the effectiveness of the proposed mitigation strategies through simulations and actual quadrotor experiments. The experimental results show that these strategies can effectively prevent chattering and constraint violations and ensure that the system operates within the safety set. ### Conclusion Through detailed analysis and experimental verification, the paper shows the problems that may be encountered when using continuous - time CBF safety filters in discrete - time implementations and proposes effective mitigation strategies. These strategies provide important support for safety control in practical applications.