# Safety Control for Satellite Formation Flying via High-Order Control Barrier Functions
## 2 Problem Formulation and Preliminaries
### Dynamic Model of Satellite Formation  
A satellite formation consists of two or more satellites that work collaboratively to accomplish a common task. The key to formation flying is the control of the relative position and velocity between satellites, which requires precise dynamic models. The study of satellite formation dynamics primarily focuses on describing and predicting the relative motion among the satellites that comprise the formation. Each satellite in the formation is influenced by various gravitational forces, and the interactions of these forces determine the satellites' trajectories. As shown in Figure 1, assume that the reference satellite is operating in a circular orbit with a radius \(r=\|\mathbf{r}\|\). The \(OXYZ\) coordinate system represents the Earth-centered inertial frame, while the \(O_{2}X_{2}Y_{2}Z_{2}\) coordinate system is the reference satellite's orbital frame. The \(O_{2}Y_{2}\) axis points from the Earth's center towards the reference satellite, the \(O_{2}X_{2}\) axis points in the opposite direction of the reference satellite's motion, and the \(O_{2}Z_{2}\) direction is determined by the right-hand screw rule. In the orbital coordinate system, the position vector of the accompanying satellite is represented as \(\mathbf{r}=[x\ y\ z]^{\top}\). When neglecting the influence of gravitational forces, the Lagrangian function for the motion of the accompanying satellite relative to the reference satellite is described as  
\[L = \frac{m}{2}\left[(\dot{x}-\omega y-\omega r)^{2}+(\dot{y}+\omega x )^{2}+\dot{z}^{2}\right]+\frac{\mu m}{d}, \tag{1}\]  
where \(d=\sqrt{x^{2}+(y+r)^{2}+z^{2}}\), \(\mu\) is the gravitational constant of the earth, \(m\) is the mass of the orbiting satellite, and \(\omega\) is the orbital angular velocity of the central body. Substituting Equation (1) into the Lagrange equation yields the following dynamics model for the satellite formation:  
\[\left[ \begin{array}{c}\ddot{x}-\omega^{2}x-2\omega\dot{y}\\ \dot{y}\\ \ddot{z}\end{array} \right] = \frac{\mu}{d^{3}}\left[ \begin{array}{c}x\\ y+r\\ z\end{array} \right]. \tag{2}\]  
Figure 1: Sketch of coordinates of satellite formation. It can be observed that Equation (2) is nonlinear, and due to the fact that the relative distance between the reference and accompanying satellites is much smaller than the orbital radius of the primary star, the model in (2) exhibits weak nonlinearity. By performing a [PERSON] expansion on the nonlinear terms and retaining the lower-order terms, the nonlinear model (2) can be linearized as follows. \[\left[ \begin{array}{c}\ddot{x}\\ \ddot{y}\\ \ddot{z}\end{array} \right] = \left[ \begin{array}{c}2\omega\dot{y}\\ 3\omega^{2}y-2\omega\dot{x}\\ -\omega^{2}z\end{array} \right]. \tag{3}\]  
The linearized dynamic model (3) has become a commonly used tool in research on satellite formation dynamics and control due to its concise mathematical form. However, when formation satellites require significant orbital maneuvers and adjustments, the prediction accuracy of the linear model drops significantly, making it difficult to accurately describe the actual motion of the system. Additionally, since the linearization assumption neglects second-order and higher-order nonlinear terms, it may lead to instability in the system under certain conditions. Therefore, when dealing with complex space environments where nonlinear effects are prominent, the linear model has limited applicability and fails to meet the requirements for high-precision control. In this paper, the nonlinear Equation (1) is equivalently rewritten as a combination of a linear part and a nonlinear part. The following equivalent expression of Equation (1) is obtained. \[\left[ \begin{array}{c}\ddot{x}\\ \ddot{y}\\ \ddot{z}\end{array} \right] = \left[ \begin{array}{c}2\omega\dot{y}\\ 3\omega^{2}y-2\omega\dot{x}\\ -\omega^{2}z\end{array} \right]+\left[ \begin{array}{c}\omega^{2}x\\ -2\omega^{2}y-r\omega^{2}\\ \omega^{2}z\end{array} \right]\] \[-\frac{\mu}{d^{3}}\left[ \begin{array}{c}x\\ y+r\\ z\end{array}