# Artificial Neural Networks in Coordinated Control of Multiple Hovercrafts with Unmodeled Terms
## 3 Controller Design
\begin{split}\dot{V}_{3}&=-\alpha_{2}+\mathbf{e}_{ 1}^{T}\boldsymbol{\eta}+\mathbf{e}_{2}^{T}\epsilon_{1}(\mathbf{x}_{1})+ \mathbf{e}_{2}^{T}\Big{(}\mathbf{N}\mathbf{I}+\boldsymbol{\beta}+\widehat{ \mathbf{W}}_{d1}^{T}\boldsymbol{\sigma}(\mathbf{x}_{1})\Big{)}\\ &+\mathbf{e}_{2}^{T}\widehat{\mathbf{W}}_{d1}^{T}\boldsymbol{ \sigma}(\mathbf{x}_{1})-\operatorname{tr}\left(\widehat{\mathbf{W}}_{d1}^{T} \Gamma_{1}^{-1}\widehat{\mathbf{W}}_{d1}\right).\end{split}  \tag{22}\]  
Therefore, we choose our desired input \(\mathbf{I}_{d}\) as  
\[\mathbf{I}_{d}=-\mathbf{N}^{-1}\Big{(}\boldsymbol{\beta}+\widehat{\mathbf{W}} _{d1}^{T}\boldsymbol{\sigma}(\mathbf{x}_{1})\Big{)}, \tag{23}\]  
and thereby our first controller \(T\) is chosen as  
\[T=\mathbf{n}_{1}^{T}\mathbf{I}_{d}. \tag{24}\]  
Correspondingly, the desired angular velocity is  
\[\omega_{d}=\mathbf{n}_{2}^{T}\mathbf{I}_{d} \tag{25}\]  
where \(\mathbf{n}_{2}=[0,1]^{T}\). Notice that, if the updated law for \(\hat{\mathbf{W}}_{d1}\) is set as  
\[\hat{\mathbf{W}}_{d1}=\Gamma_{1}\boldsymbol{\sigma}(\mathbf{x}_{1})\mathbf{e }_{2}^{T}, \tag{26}\]  
we cannot ensure that it is bounded by \(\mathbf{W}_{\max}\). To solve this problem, a projection operator, which is Lipschitz continuous [25], is applied in our case, which is given by  
\[\mathbf{proj}(\rho,\hat{\ell})=\left\{ \begin{array}{ll}\rho&\text{if }\Theta(\hat{ \ell})\leq 0\\ \rho&\text{if }\Theta(\hat{\ell})\geq 0\text{ and }\Theta_{\hat{\ell}}(\hat{\ell})\rho\leq 0\\ (1-\Theta(\hat{\ell}))\rho&\text{if }\Theta(\hat{\ell})>0\text{ and }\Theta_{\hat{\ell}}(\hat{\ell})\rho>0 \end{array} \right. \tag{27}\]  
where  
\[\Theta(\hat{\ell})=\frac{\hat{\ell}^{2}-\ell_{\max}^{2}}{\hat{\epsilon}^{2}+2 \epsilon\ell_{\max}^{2}},\ \ \ \Theta_{\hat{\ell}}(\hat{\ell})=\frac{\partial\Theta(\hat{\ell})}{\partial\hat{ \ell}}, \tag{28}\]  
with the following condition: if \(\hat{\ell}=proj(\rho,\hat{\ell})\) and \(\hat{\ell}(t_{0})\leq\ell_{\max}\), then  
1. \(\hat{\ell}\leq\ell_{\max}+\epsilon\), \(\forall\,0\leq t<\infty\);
2. \(\mathbf{proj}(\rho,\hat{\ell})\) is Lipschitz continuous;
3. \(|\mathbf{proj}(\rho,\hat{\ell})|\leq|\rho|\);
4. \(\hat{\ell}\mathbf{proj}(\rho,\hat{\ell})\geq\hat{\ell}\rho\), where \(\hat{\ell}=\ell-\hat{\ell}\). Therefore, to make sure all elements of \(\hat{\mathbf{W}}_{d1}\) are upper-bounded, the update law for \(\hat{\mathbf{W}}_{d1}\) is finally set as  
\[\hat{\mathbf{W}}_{d1}=\Gamma_{1}\mathbf{proj}\Big{(}\boldsymbol{\sigma}( \mathbf{x}_{1})\mathbf{e}_{2},\widehat{\mathbf{W}}_{d1}\Big{)}. \tag{29}\]To keep using the backstepping technique, we define a new error term  
\[\mathbf{e}_{3}=\omega-\omega_{d}, \tag{30}\]  
and its corresponding integral term  
\[\mathbf{e}_{3n}=\int_{0}^{t}\mathbf{e}_{3}dt. \tag{31}\]  
Then, we define a new Lyapunov function as  
\[V_{4}=V_{3}+\frac{1}{2}\mathbf{e}_{3}^{T}\mathbf{e}_{3}+\frac{1}{2}\mathbf{e}_ {3n}^{T}\mathbf{e}_{3n}. \tag{32}\]  
Compute its time derivatives, substitute Equation (29) into Equation (24), and combine the 4 th property of projector \((\tilde{\ell}\mathbf{proj}(\rho,\hat{\ell})\geq\tilde{\ell}\rho)\), and one obtains  
\[ \begin{split}\dot{V}_{4}&\leq-\alpha_{3}+\mathbf{e }_{1}^{T}\boldsymbol{\eta}+\mathbf{e}_{2}^{T}\boldsymbol{e}_{1}(\mathbf{x}_{1} )+\mathbf{e}_{3}^{T}\Big{(}\mathbf{n}_{2}^{T}\mathbf{N}^{T}\boldsymbol{e}_{2} -\frac{1}{\tilde{\tau}}+\mathbf{n}_{2}^{T}\mathbf{N}^{-1}(\hat{\boldsymbol{ \beta}}+\hat{\mathbf{W}}_{d1}\boldsymbol{\sigma}(\mathbf{x}_{1})\\ &+\hat{\mathbf{W}}_{d1}\hat{\boldsymbol{\sigma}}(\mathbf{x}_{1} ))+k_{3}\mathbf{e}_{3}+\mathbf{e}_{3n}+\Delta_{\omega}\Big{)}\end{split}  \tag{33}\]  
where \(\alpha_{3}=\alpha_{2}+k_{3}\mathbf{e}_{3}^{T}\mathbf{e}_{3}\geq 0\), \(k_{3}>0\). However, it is noted that both \(\dot{\boldsymbol{\beta}}\) and \(\hat{\boldsymbol{\sigma}}(\mathbf{x}_{1})\) contain unmodeled term \(\Delta_{\
u}\), so we need to separate \(\Delta_{\
u}\) out from \(\dot{\boldsymbol{\beta}}\) and \(\hat{\boldsymbol{\sigma}}(\mathbf{x}_{1})\). After that, we can use RBFNNs to estimate it.