## 3 Formation Cooperative Search and Transformation Strategy
### Formation Control Scheme  
When large obstacles are encountered during the search process, multiple AUVs traverse the obstacle domain in formation transformation, which can take advantage of cooperative search and ensure the communication quality between robots. The formation recovery can be completed in the shortest time after traversing the obstacles. To facilitate the analysis of a formation traversal mode in array-type obstacle domains, a formation control model is provided in this section to describe the position change of each robot during the formation transformation using the formation parameter information matrix as follows:  
\[BT_{li}(t+t_{all})=\left\{ \begin{array}{l}BT_{lc-x}(t)+\mu_{i}*f_{i}+f_{c}\\ BT_{lc-y}(t)+\mu_{i}*f_{i}+f_{c}\\ BT_{lc-z}(t)+\mu_{i}*f_{i}+f_{c}\\ i=1,2,\cdots,N\end{array} \right. \tag{1}\]  
where \(t\) is the start time of the transformation, \(t_{all}\) is the total time needed to complete the transformation, \(BT_{lc}(t)\) represents the coordinates of the virtual leader before the transformation, \(BT_{li}(t+t_{all})\) represents the coordinates of the robots in the formation after the transformation, \(\mu_{i}\) and \(f_{i}\) are the deformation control rate and the team control function of the \(i\)-th robot, respectively, and \(f_{c}\) is the virtual structure point motion control function set in Section 3.1. The \(N\) AUVs in the formation are denoted as \(R_{1},R_{2}\ldots R_{N}\), and the state of the \(i\)-th robot \(R_{i}\) is represented as \(S_{i}\). If \(R_{i}\) is set as the leader, then \(S_{i}=1\); otherwise, \(S_{i}=0\). To represent the state and formation of each robot, Equations (2) and (3) define the parameter information matrix of the leader and non-leader AUVs, respectively. \[F_{i}=\left[ \begin{array}{c}R_{i}\\ S_{i}\\ BT_{li}(t)\end{array} \right] \tag{2}\]  
\[F_{i}=\left[ \begin{array}{c}R_{i}\\ S_{i}\\ \mu_{i}*f_{i}\end{array} \right] \tag{3}\]  
Figure 3: Underwater virtual environment. If \(R_{1}\) is set as the virtual leader, the parameter information matrix \(F\) for the whole formation can be expressed as:  
\[F=[F_{1},F_{2}\ldots F_{i}\ldots,F_{N}]= \begin{bmatrix}R_{1}&R_{2}&R_{i}&R_{N}\\ S_{1}&S_{2}&\ldots&S_{i}&\ldots&S_{N}\\ BT_{li}(t)&\mu_{2}*f_{2}(x)&\mu_{i}*f_{i}(x)&\mu_{N}*f_{N}(x)\end{bmatrix}  \tag{4}\]  
Meanwhile, the robots inside the formation need to satisfy the collision avoidance constraint, i.e., the distance between any two robots is greater than or equal to the safety distance \(L_{s}\):  
\[\left|R_{i}-R_{j}\right|=\sqrt{(x_{i}-x_{j})^{2}+(y_{i}-y_{j})^{2}+(z_{i}-z_{j} )^{2}}\geq L_{s} \tag{5}\]  
In this paper, the geese formation is set as the basic search formation, and the transformed formations can evolve from the basic formation. For the convenience of explanation, several formation transformation schemes when the geese formation encounters a large obstacle domain are projected onto the XOY plane to obtain Figure 4. If an array-type obstacle domain is detected during the formation cooperative search, the feasible spacing \(D_{o}\) of the obstacle domain is compared with the maximum spacing \(D_{r}\Big{(}D_{r}=2\sqrt{2}D_{S}\Big{)}\) of the robots in the formation to determine whether the current formation can traverse the obstacle domain. If it cannot, then whether Figure 4b,c obtained by modifying \(\mu\) is feasible is determined, and if it is still not possible to traverse the obstacle domain, Figure 4d, obtained by changing \(f\) as the traversal formation, is chosen. Most of the existing formation transformation strategies address the special state where the leader is on the central axis of the obstacle domain, so the analysis of the energy consumption during transformation is incomplete, and the transformation scheme shown in this paper complements the situation where the leader is on both sides of the central axis (Figure 4b), which is more adaptable.