## 2 Background Description
### Mathematical Model of the AUV
 \tag{12}\]  
where \(i=1,2,\ldots N\), \(x_{i}(t)\in\mathbb{R}^{n}\), and \(v_{i}(t)\in\mathbb{R}^{n}\) refer to the position and velocity vectors of the \(i\)th AUV, respectively, and \(u_{i}(t)\in\mathbb{R}^{n}\) refers to the control inputs. Figure 2: Two-loop formation-control scheme for multiple-AUV (multi-AUV) systems. Define \(\theta_{i}(t)=[x_{i}(t),v_{i}(t)]^{T}\), \(B_{1}=[1,0]^{T}\), and \(B_{2}=[0,1]^{T}\). Then, the multi-AUV system in Equation (12) can be rewritten as follows:  
\[\dot{\theta}_{i}(t)=B_{1}B_{2}^{T}\theta_{i}(t)+B_{2}u_{i}(t), \tag{13}\]  
Let \(m_{i}(t)=[m_{ix}(t),m_{ip}(t)]^{T}\) be piecewise continuously differentiable vectors \((i=1,2\ldots,N)\) and \(m(t)=\left[m_{1}^{T}(t),m_{2}^{T}(t),\ldots m_{N}^{T}(t)\right]^{T}\in\mathbb{ R}^{2N}\). Condition 1: A vector \(m(t)\) specifies the time-varying formation. If the multi-AUV in Equation (13) establishes time-varying formation \(m(t)\) for the appropriate initial states, then a vector-valued function \(c(t)\in\mathbb{R}^{2}\) satisfies \(\lim_{t\to\infty}(\theta_{i}(t)-m_{i}(t)-c(t))=0\), where \(c(t)\) means the formation center function. To certify the Condition 1, suppose we have an affine pentagon structure of a multi-AUV system with five AUVs moving in the plane. Let \(x_{iX}(t)\in\mathbb{R}\), \(m_{iX}(t)\in\mathbb{R}\), and \(c_{xX}(t)\in\mathbb{R}\), and \(x_{iY}(t)\in\mathbb{R}m_{iY}(t)\in\mathbb{R}\), \(c_{xY}(t)\in\mathbb{R}\) refer to the position, the formation, and the formation center function of the \(i\)th AUV along the x- and y-axes in the X-Y plane, respectively. \[ \begin{cases}\theta_{ix}(t)=[x_{iX}(t),x_{iY}(t)]^{T}\\ \theta_{ix}(t)=[x_{iX}(t),x_{iY}(t)]^{T},\\ c_{ix}(t)=[c_{iX}(t),c_{iY}(t)]^{T}\end{cases}  \tag{14}\]  
If \(\theta_{ix}(t)-m_{ix}(t)-c_{x}(t)\to 0\) as \(t\to\infty\) for all AUVs \(i\leq 5\) in Figure 4, the two pentagons indicated by \(m_{ix}(t)\) and \(\theta_{ix}(t)(i\leq 5)\) are congruent. Condition 2: If a vector function \(s(t)\in\mathbb{R}^{2}\) makes \(\lim_{t\to\infty}(\theta_{i}(t)-s(t))=0(i=1,2,\ldots,N)\), then the multi-AUV system in Equation (12) can attain consensus for any bounded initial states, so a consensus function is described as \(s(t)\). From conditions 1 and 2, if \(m(t)\equiv 0\), the multi-AUV system in Equation (13) establishes the formation, and then the consensus also can be established. Thus, the time-varying formation center function and the consensus function are critical. The time-varying formation protocol can be defined as follows:  
\[u_{i}(t)=K_{1}(\theta_{i}(t)-m_{i}(t))+K_{2}\sum_{j\in N_{i}}w_{ij}\big{(} \big{(}\theta_{j}(t)-m_{j}(t)-(\theta_{i}(t)-m_{i}(t))\big{)}\big{)}+\dot{m} _{ip}(t) \tag{15}\]  
where \(i=1,2\ldots,N\), \(K_{1}=[k_{11},k_{12}]\), and \(K_{2}=[k_{21},k_{22}]\). \(K_{1}\) is the motion mode of the formation center, and \(K_{2}\) is the appropriate value that can lead all AUVs to establish the desired formation. Figure 3: All AUVs operate at the same height (distance from the ocean floor). Define the following:  
\[\left\{ \begin{aligned} \theta(t)&=\left[\theta_{1}^{T}(t), \theta_{2}^{T}(t),\ldots\theta_{N}^{T}(t)\right]^{T}\\ m_{x}(t)&=\left[m_{1x}^{T}(t),m_{2x}^{T}(t),\ldots m_{Nx}^ {T}(t)\right]^{T},\\ m_{v}(t)&=\left[m_{1v}^{T}(t),m_{2v}^{T}(t),\ldots m_{Nv}^ {T}(t)\right]^{T}\end{aligned} \right. \tag{16}\]  
So, multi-AUV system (12) can be written in a compact form as Equation (15). \[\dot{\theta}(t)=\Big{(}I_{N}\otimes\Big{(}B_{2}K_{1}+B_{1}B_{2}^{T}\Big{)}-L \otimes(B_{2}K_{2})\Big{)}\theta(t)-(I_{N}\otimes(B_{2}K_{1})-L\otimes(B_{2}K_ {2}))m(t)+(I_{N}\otimes B_{2})\dot{m}(t) \tag{17}\]  
This paper focuses on two problems for multi-AUV system in Equation (17):  
1. When the time-varying formation is established. 2. If the system obtains the time-varying formation, what is the protocol in Equation (17)?