## 2 Preliminaries and Problem Formulation
### Problem Formulation  
**Assumption 1**.: _The UUV only moves on the horizontal plane. This means that the robot dives to a predetermined depth and always remains at this depth (see Figure 1). Moreover, the UUV moves at a low-speed. This implies that the dynamics of UUV associated with the motion in heave, roll, and pitch are neglected, that is \(w=p=q\simeq 0\), and \(r\simeq 0\). Then, \(\eta_{i}=\left(x_{i},y_{i},\psi_{i}\right)^{T}\in R^{3}\) and \(\mathbf{v}_{i}=\left[u_{i},v_{i},r_{i}\right]^{T}\in R^{3}\)._  
**Assumption 2**.: _The graph \(G\) is directed and connected, and the leading UUV has access to the reference trajectory. The following UUVs always sense the leading UUV, and rely on the cameras equipped on each UUV._  
**Assumption 3**.: _In this work, we only focus on the control for the follower ULUVs with the assumption that the leader UUV is controlled in a given trajectory._According to [PERSON] et al. [27], new coordinates, namely, the vessel parallel coordinates, are introduced as  
\[\eta_{ib}=R^{\top}\left(\psi_{i}\right)\eta_{i} \tag{4}\]  
where \(\eta_{ip}\in R^{3}\) is the position and heading of UUV in the body-fixed coordinates. Consequently, under the assumption 1 with \(r_{i}=\dot{\psi}_{i}\simeq 0\), Equations (2) and (3) can be expressed in terms of \(\eta_{ip}\) by  
\[\dot{\eta}_{ib} =\mathbf{v}_{i} \tag{5}\] \[M_{i}\dot{\mathbf{v}}_{i}+C_{i}\left(\mathbf{v}_{i}\right) \mathbf{v}_{i}+D_{i}\left(\mathbf{v}_{i}\right)\mathbf{v}_{i}+g_{i}\left(\eta _{i}\right) =\tau_{iAct}+\tau_{iDist} \tag{6}\]  
then  
\[\dot{\eta}_{ib} =\mathbf{v}_{i} \tag{7}\] \[\dot{\mathbf{v}}_{i} =M_{i}^{-1}[\tau_{iAct}+\tau_{iDist}-C_{i}\left(\mathbf{v}_{i} \right)\mathbf{v}_{i}-D_{i}\left(\mathbf{v}_{i}\right)\mathbf{v}_{i}-g_{i} \left(\eta_{i}\right)] \tag{8}\]  
Let \(\mathbf{x}_{i}=\left(\eta_{ib},\mathbf{v}_{i}\right)^{\top}=\left(x_{ib},y_{ ib},\eta_{ib},u_{i},v_{i},r_{i}\right)^{\top}\in R^{6}\) is the state of UUV \(i\) in the body-fixed coordinates, Equations (7) and (8) can be written in a state-space model with a form  
\[\dot{\mathbf{x}}_{i}=A\mathbf{x}_{i}+B\left[u_{i}+f_{i}\left(\mathbf{x}_{i} \right)+w_{i}\left(t\right)\right] \tag{9}\]  
where  
\[A=\left[\begin{array}{cc}0_{3\times 3}&I_{3\times 3}\\ 0_{3\times 3}&0_{3\times 3}\end{array}\right],\qquad B=\left[\begin{array}{c}0_{3 \times 3}\\ M_{i}^{-1}\end{array}\right] \tag{10}\]  
\(w_{i}=\tau_{iDist}\), \(u_{i}=\tau_{iAct}\in R^{3}\), and \(f_{i}\left(\mathbf{x}_{i}\right)=-C_{i}(\mathbf{v}_{i})\mathbf{v}_{i}-D_{i}( \mathbf{v}_{i})\mathbf{v}_{i}-g_{i}\left(\mathbf{v}_{i}\right)\) is the unmodeled and unknown terms of the dynamics UUV \(i\), which is approximated by Equation (1).  
Let \(\delta_{ij}=[\delta_{x,ji},\delta_{y,ji},\delta_{\phi,ij},0,0,0]\in R^{6}\) denote the desired state deviation between UUV \(i\) and UUV \(j\) in 3 DOF. In addition, the reference model is considered as the leading UUV, which is given by  
\[\dot{\mathbf{x}}_{L}=A\mathbf{x}_{L}+Br\left(\mathbf{x}_{L},t\right) \tag{11}\]  
The objective of this paper is to apply a distributed adaptive neural network for the group of low-cost underwater drones to achieve the desired formation \(\delta_{ij}\) and to stabilize the attitude dynamics \(d_{ij}\rightarrow\delta_{ij}\). Meanwhile, the distance between the UUV \(d_{ij}\) is guaranteed to avoid collision \(d_{in}<d_{ij}\) with  
Figure 1: A proposal for submarine pipeline monitoring by using a low-cost unmanned underwater vehicle (UUV).  
\(d_{in}<D_{out}<\delta_{ij}\), where \(d_{in}\) and \(D_{out}\) are predefined values. And finally, \(\max(d_{ij})<(h-\Delta)\) to ensure a group of UUVs can pass the narrow area, where \(h\) is the smallest size between narrow slots, \(\Delta\) is a given value depending on the size of UUV.  
To satisfy the assumption that the graph is connected in practice with the use of cameras, which are equipped on each UUV, a proposal for the following UUV sense of relative position and orientation for the leading UUV is introduced in this paper.