## 3 Designing Adaptive-Robust Controller
### Designing Adaptive-Robust Controller in the Presence of Model Uncertainties  
Considering \(T_{i}=D_{I}\Big{(}e_{i},u_{d},\dot{v}_{d},\dot{v}_{i}\Big{)}+R_{i}^{-T}\tau_ {w1i}(t)\) as uncertainty, the model in (26) can be written as follows:  
\[M_{i}(e_{i})\ddot{q}_{i}+C_{i}\Big{(}e_{i},\dot{q}_{i}\Big{)}\dot{q}_{i}+T_{i }=\overline{\tau}_{ai}(t) \tag{31}\]  
Now, define \(e_{i}=q_{di}-q_{i}\) and then \(r_{i}=e_{i}+\dot{e}_{i}\) where \(q_{di}\) indicates the desired formation for \(i\)-th ASV. We propose the following adaptive-robust controller for each of ASVs:  
\[\overline{\tau}_{i\;a}=K_{iv}r_{i}+V_{iR} \tag{32}\]  
where \(K_{iv}\) is a diagonal positive definite matrix and \(V_{iR}\) is obtained as follows:  
\[V_{iR}\;=\frac{r_{i}\;\hat{\rho}_{i}^{2}}{\hat{\rho}_{i}\|r_{i}\|+\varepsilon_ {i}} \tag{33}\]  
where \(\varepsilon_{i}\) and \(\hat{\rho}_{i}\) are obtained from the following equations:  
\[\dot{\varepsilon}_{i}=-K_{xi}\varepsilon_{i},\varepsilon_{i}(0)=1,K_{xi} \in\mathcal{R}^{+} \tag{34}\]  
\[\hat{\rho}_{i}=s_{i}\;\hat{\rho}_{i} \tag{35}\]\[s_{i}=\left( \begin{array}{cccc}1&\|e_{i}\|&\|e_{i}\|^{2}\end{array} \right) \tag{36}\] \[\hat{\theta}_{i}=\left( \begin{array}{cccc}\delta_{0}&\delta_{1}& \delta_{2}\end{array} \right)^{T} \tag{37}\]  
In these equations, \(s_{i}\) is the regressor matrix and \(\hat{\theta}_{i}\) denotes the estimated parameters vector that is obtained by the following adaptation rule. \[\dot{\hat{\theta}}_{i}=\gamma_{i}s_{i}^{T}r_{i} \tag{38}\]  
where \(\gamma_{i}\) is an arbitrary positive constant value. Theorem 1: _Consider the leader-follower formation model of ASVs in Equation (26) by applying the adaptive-robust controller in (32), the formation errors converge to zero, and estimated parameters in Equation (38) remain bounded._  
**Proof. ** The proof is similar to the proof of applying a similar controller that has been proposed in [32] for solving the desired path following problem in manipulators. To prevent recurrence, the proof is omitted here. Designing Adaptive-Robust Controller in the Presence of Model Uncertainties and Input Saturation Constraint  
First, consider the model in (26) that is based on the system states and rewrite it in the terms of errors. To this, substituting the error and its derivative that are, respectively, \(e_{i}=q_{di}-q_{i}\) and \(\dot{e}_{i}=\dot{q}_{di}-\dot{q}_{i}\) into (26) results. \[M_{i}(e_{i})\ddot{e}_{i}+C_{i}\Big{(}e_{i},\dot{e}_{i}\Big{)}\dot{e}_{i}+\dot {\xi}_{i}=-\overline{\tau}_{ai}(t) \tag{39}\]  
where:  
\[\dot{\xi}_{i}=-M_{i}(e_{i})\ddot{q}_{d}-C_{i}\Big{(}e_{i},\dot{e}_{i}\Big{)} \dot{q}_{d}-D_{i}\Big{(}e_{i},\ \dot{u}_{d},\dot{v}_{d},\dot{v}_{i}\Big{)}-R_{i}^{-T}\tau_{w1\ i}\ (t) \tag{40}\]  
The aim is to design \(\overline{\tau}_{ai}(t)\) in Equation (39) in such a way that \(q_{i}\to q_{d}\) while \(\overline{\tau}_{ai}(t)\) is bounded and the dynamic of the model is unknown. To this end, we use function \(tanh\) that is a bounded and continuous function. To reach the desired formation considering input constraint and unknown dynamic in model, we propose the following controller [52]. First, suppose that \(\xi_{i}\) in Equation (40) is bounded as below:  
\[\|\xi_{i}\|\leq G_{i}\theta_{i} \tag{41}\]  
where we have as follows:  
\[G_{i}=\left[\|\ddot{q}_{d}\|,\|\dot{q}_{d}\|\|\dot{q}_{i}\|\|,\|\dot{q}_{i}\|,\|\dot{q}_{i}\|,\|\dot{\mathbf{R}_{i}}^{-T}(e_{i})\|\right]\in R^{1 \times 4} \tag{42}\]  
Here, \(\theta_{i}\) is the parameters vector that includes mass, friction coefficient, and disturbances. In fact, \(G_{i}\theta_{i}\) is the regressor form of the equation in (40). Now, define the following filtered error signal. \[r_{i}=\dot{e}_{i}+\Lambda_{pi}\mbox{tanh}(e_{i}) \tag{43}\]  
where \(\Lambda_{p}\) is a symmetric positive definite matrix.