# Artificial Neural Networks in Coordinated Control of Multiple Hovercrafts with Unmodeled Terms
## 3 Controller Design  
Following the works of [7] and [9], we define the position error in the body frame as  
\[\mathbf{e}_{1}=\mathbf{R}^{T}(\mathbf{p}-\mathbf{p}_{d}) \tag{10}\]  
Figure 2: Simple example of RBFNNs. where \(\mathbf{R}=\mathbf{R}(\psi)\) denotes the rotation matrix. The time derivative of \(\mathbf{e}_{1}\) yields  
\[\dot{\mathbf{e}}_{1}=-\mathbf{S}(\omega)\mathbf{e}_{1}+\mathbf{v}-\mathbf{R}^{T }\dot{\mathbf{p}}_{d}. \tag{11}\]  
Define our first Lyapunov function as  
\[V_{1}=\frac{1}{2}\mathbf{e}_{1}^{T}\mathbf{e}_{1} \tag{12}\]  
and compute its time derivative, we have  
\[\dot{V}_{1}=-\alpha_{1}+\mathbf{e}_{1}^{T}(\mathbf{v}-\mathbf{R}^{T}\dot{ \mathbf{p}}_{d}+k_{1}\mathbf{e}_{1}) \tag{13}\]  
where \(\alpha_{1}=k_{1}\mathbf{e}_{1}^{T}\mathbf{e}_{1}\) is positive definite, and \(k_{1}\) denotes gain, which is a positive value. In order to continue to use the backstepping technique, a second error term is defined as  
\[\mathbf{e}_{2}=\mathbf{v}-\mathbf{R}^{T}\dot{\mathbf{p}}_{d}+k_{1}\mathbf{e}_ {1}-\boldsymbol{\eta}, \tag{14}\]  
and its integral term  
\[\mathbf{e}_{2n}=\int_{0}^{t}\mathbf{e}_{2}dt \tag{15}\]  
where \(\boldsymbol{\eta}=[\eta_{1},\eta_{2}]^{T}\), \(\eta_{1}\
eq 0\) is a constant vector. Define our second Lyapunov function as  
\[V_{2}=V_{1}+\frac{1}{2}\mathbf{e}_{2}^{T}\mathbf{e}_{2}+\frac{1}{2}\mathbf{e} _{2n}^{T}\mathbf{e}_{2n}, \tag{16}\]  
and its time derivative yields  
\[ \begin{split}\dot{V}_{2}&=-\alpha_{2}+\mathbf{e}_{ 1}^{T}\boldsymbol{\eta}+\mathbf{e}_{2}^{T}\Big{(}-\mathbf{S}(\omega) \boldsymbol{\eta}+m^{-1}T\mathbf{n}_{1}-\mathbf{R}^{T}\dot{\mathbf{p}}_{d}+k_{ 1}(\mathbf{e}_{2}-k_{1}\mathbf{e}_{1}+\boldsymbol{\eta})\\ &+k_{2}\mathbf{e}_{2}+\boldsymbol{\Delta}_{v}+\mathbf{e}_{2n} \Big{)}\end{split}  \tag{17}\]  
where \(\alpha_{2}=k_{1}\mathbf{e}_{1}^{T}\mathbf{e}_{1}+k_{2}\mathbf{e}^{T}\mathbf{e }_{2}\), which is positive definite, and \(k_{2}\) is a positive number. It is relevant to point out that \(\mathbf{e}_{2n}\) is introduced to eliminate the external slow-varying disturbances that act on the dynamic of the linear velocity \(\mathbf{v}\). Moreover, notice that we do not know \(\boldsymbol{\Delta}_{v}\), thereby we use RBFNNs mentioned before to approximate it, given by  
\[\boldsymbol{\Delta}_{v}=\mathbf{W}_{d1}^{T}\boldsymbol{\sigma}(\mathbf{x}_{1 })+\boldsymbol{e}_{1}(\mathbf{x}_{1}) \tag{18}\]  
where \(\mathbf{x}_{1}=[1,\mathbf{v}^{T}]^{T}\in\mathbb{R}^{3}\). Moreover, notice that  
\[-\mathbf{S}(\omega)\boldsymbol{\eta}+m^{-1}T\mathbf{n}_{1}=\mathbf{NI} \tag{19}\]  
where  
\[\mathbf{N}= \begin{bmatrix}m^{-1}&\eta_{2}\\ 0&-\eta_{1}\end{bmatrix} .\quad\mathbf{I}=[T,\omega]^{T}.\]  
Rewrite Equation (17), and we have  
\[\dot{V}_{2}=-\alpha_{2}+\mathbf{e}_{1}^{T}\boldsymbol{\eta}+\mathbf{e}_{2}^{T }\Big{(}\mathbf{NI}+\boldsymbol{\beta}+\mathbf{W}_{d1}^{T}\boldsymbol{\sigma}( \mathbf{x}_{1})\Big{)}+\mathbf{e}_{2}^{T}\boldsymbol{e}_{1}(\mathbf{x}_{1}) \tag{20}\]  
where \(\boldsymbol{\beta}=-\mathbf{R}^{T}\dot{\mathbf{p}}_{d}+k_{1}(\mathbf{e}_{2}-k _{1}\mathbf{e}_{1}+\boldsymbol{\eta})+k_{2}\mathbf{e}_{2}+\mathbf{e}_{2n}\). Now, we can define our third Lyapunov function as  
\[V_{3}=V_{2}+\frac{1}{2}\operatorname{tr}\left(\widehat{\mathbf{W}}_{d1}^{T}\Gamma _{1}^{-1}\widehat{\mathbf{W}}_{d1}\right) \tag{21}\]  
where \(\widehat{\mathbf{W}}_{d1}=\mathbf{W}_{d}-\widehat{\mathbf{W}}_{d1}\) denotes the estimation error, \(\Gamma_{1}=\text{diag}(\lambda_{11},and\lambda_{12})\) is a matrix, where \(\lambda_{11}\) and \(\lambda_{12}\) are positive values. Compute the time derivative of \(V_{3}\), and one obtains  
\[