# Safety Control for Satellite Formation Flying via High-Order Control Barrier Functions
## 2 Problem Formulation and Preliminaries
### Control Barrier Function  
In this paper, the control barrier function is introduced to design a safety controller for the satellite formation flying. Some preliminaries concerning the safety control based on the control barrier function is provided. Consider the following control affine nonlinear system:  
\[\dot{x}=f(x)+g(x)u, \tag{5}\]  
where \(x\in\mathcal{D}\subset\mathcal{R}^{n}\) is the system state, and it is forward complete. \(u\) is the control input to be designed. The nonlinear functions \(f(x)\) and \(g(x)\) are locally Lipschitz. For System (5), define the set \(\mathcal{C}\) as  
\[\mathcal{C} = \{x\in\mathcal{R}^{n}:h(x)\geq 0\} \tag{6}\]  
where \(h(x)\) is a continuously differentiable function. Before proceeding further, the following definitions are given to explain the forward invariant, barrier function, and control barrier function. **Definition 1**. : _If any initial value \(x(t_{0})\in\mathcal{C}\) can make \(x(t)\in\mathcal{C}\) for any \(t\geq t_{0}\), the set \(\mathcal{C}\) is forward invariant._  
If the function \(h(x)\) satisfies Definition 2, the function \(h(x)\) is a barrier function of System (5). **Definition 2**. : _If there exists a \(\mathcal{K}\) class function \(\alpha(\cdot)\) such that \(\dot{h}(x)+\alpha(h(x))\geq 0\) holds \(\forall x\in\mathcal{C}\), the function \(h(x)\) is a barrier function of System (5)._  
Per the descriptions mentioned above, Definition 3 provides the definition for the control barrier function. **Definition 3**. : _For the defined set \(\mathcal{C}\), if there exists a \(\mathcal{K}\) class function \(\alpha(\cdot)\) such that the following inequality holds, the function \(h(x)\) is a control barrier function of System (5)._  
\[L_{f}h(x)+L_{g}h(x)u+\alpha(h(x))\geq 0, \tag{7}\]  
_where \(L_{f}h(x)\) and \(L_{g}h(x)\) are the Lie derivative operations, and the expressions are given as below._  
\[L_{f}h(x) = \frac{\partial h(x)}{\partial x}f(x),\ L_{g}h(x)=\frac{\partial h (x)}{\partial x}g(x).\]  
If the relative degree of the Lie derivative of the control barrier function with regard to System (5) is one, according to Theorem 2 in [27], there exists a control input \(u\) such that the set \(\mathcal{C}\) is forward invariant for System (5). Per the aforementioned discussion, one can describe the safety constraints for System (5) by constructing a control barrier function \(h(x)\), based on which the safety set \(\mathcal{C}\) can be defined, namely,  
\[\mathcal{C} = \{x\in\mathcal{D}\subset\mathcal{R}^{n}:h(x)\geq 0\},\] \[\partial\mathcal{C} = \{x\in\mathcal{D}\subset\mathcal{R}^{n}:h(x)=0\},\] \[\mathrm{Int}(\mathcal{C}) = \{x\in\mathcal{D}\subset\mathcal{R}^{n}:h(x)>0\},\]  
where \(\partial\mathcal{C}\) is the boundary of the set \(\mathcal{C}\), and \(\mathrm{Int}(\mathcal{C})\) is the inner of the set \(\mathcal{C}\). Then, one can calculate the safety controller \(u\) by solving the following optimization problem. \[\min\|u\|\] \[s.t.\] \[L_{j}h(x)+L_{g}h(x)u+\alpha(h(x))\geq 0.\]  
Once the controller \(u\) is obtained in a real-time manner by solving the above problem, the safety of System (5) can be guaranteed. Obviously, the stability of System (5) is not considered in the above problem. If one adds the constraint on the control Lyapunov function, both the safety and stability of System (5) can be preserved. For more details, one can refer to the literature, for example, [28; 29]. The aim of this paper is to design a safety controller for the accompanying satellite and avoid collisions between the reference satellite and the accompanying satellite. Specifically, one problem to be solved is to construct an appropriate control barrier function for the provided formation flying model. The other lies in devising a safety control algorithm for the accompanying satellite. To clearly formulate the control problem to be solved based on the previous description, it can be summarized as follows.