## 4 Simulation Results
### Example 1  
For the first example, consider a formation that consists of one leader and two followers. We apply the adaptive-robust control rule in Equation (32) and to avoid unboundedness in control inputs, a saturation function is applied on the control signals.  
Consider the system dynamic matrices as below:  
\[\begin{split} M_{1i}=\left[\begin{array}{cc}m_{11i}&0\\ 0&m_{33i}\end{array}\right]D_{1i}=\left[\begin{array}{cc}d_{11i}&0\\ 0&d_{33i}\end{array}\right]\\ C_{1i}(v)=\left[\begin{array}{cc}0&-m_{22i}v_{i}\\ (m_{22i}-m_{11i})v_{i}&0\end{array}\right]\end{split} \tag{69}\]  
Proposed values of parameters for both followers and leader are shown in Table 1.  
The initial conditions of ASVs in the simulation are as follows:  
Initial position of leader:  
\[\eta_{ref}=[5,10,\pi]^{T} \tag{70}\]  
The initial position of followers:  
\[\eta_{1}=\left[-5,10,\frac{\pi}{3}\right]^{T},\eta_{2}=\left[5,1,\frac{\pi}{ 4}\right]^{T} \tag{71}\]  
Desired values of relative distance and relative bearing for each follower:  
\[q_{1d}=\left[4,\frac{\pi}{3}\right]^{T},q_{2d}=\left[4,-\frac{\pi}{3}\right]^{T} \tag{72}\]  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline m11 & 25 (kg) \\ m22 & 25 (kg) \\ m33 & 2.5 (kg) \\ d11 & 7 (kg:m/s) \\ d22 & 7 (kg:m/s) \\ d33 & 5 (kg:m/s) \\ \hline \hline \end{tabular}
\end{table}
Table 1: ASV parameters.  
The control parameters for both follower ASVs:  
\[\begin{array}{l}K_{1v}=\left[\begin{array}{cc}1&0\\ 0&2\end{array}\right],K_{2v}=\left[\begin{array}{cc}1&0\\ 0&2\end{array}\right],K_{\epsilon 1}=1,\,K_{\epsilon 2}=1,\gamma_{1}=4,\gamma_{2}=4\\ \varepsilon_{1}(0)=1,\varepsilon_{2}(0)=1\\ \hat{\partial}_{1}(0)=[1,2,3,2,3,1]^{T}\\ \hat{\partial}_{2}(0)=[1,2,3,2,3,1]^{T}\end{array} \tag{73}\]  
It is also assumed that the input torque, i.e., \(\tau_{ai}=[\tau_{u},\tau_{r}]^{T}\) for both follower ASVs are constrained by a saturation function with saturation levels of \(\pm 120\). Simulation results are shown in Figures 5-8.  
Figure 5: Relative distance and relative bearing errors of followers in Example 1.  
Figure 6: Leader-follower trajectories in Example 1.  
It is clear from Figure 5 that relative distance \(\rho_{i}(t)\) and relative bearing \(\psi_{i}(t)\) errors for both followers go to zero. This means that the controller has been successful to keep formation. Moreover, the trajectories of follower ASVs and leader ASV in Figure 6 properly shows the desired leader-follower formation starting from the stated initial conditions of ASVs.  
Input torques for each of follower vessels are shown in Figures 7 and 8. As shown in these figures, the oscillations in the input controls, especially before reaching the desired formation are too much and this makes it difficult to be applied in practice. This volatility is because of the discontinuity of the saturation function. As shown in the second example, using a hyperbolic tangent function as a continuous function, we can overcome this chattering.  
Figure 9 shows the estimated vector \(\hat{\theta}_{i}=\left[\delta_{0},\delta_{1},\delta_{2}\right]^{T},i=1,2\) parameters for each follower in the leader-follower formation.  
Figure 8: Applied input control of the second follower in Example 1.  
Figure 7: Applied input controls of the first follower in Example 1.