# An Adaptive Control Based on Improved Gray Wolf Algorithm for Mobile Robots
## 3 Design of the Adaptive Controller  
Without a loss of generality, one can consider the mobile robot system described in (14) and (16) to design the controller. In the proposed controller, the nonlinear dynamics of the system are approximated through an adaptive neural network. The local unknown upper limits associated with each subsystem disturbance are estimated using the method of incorporating the robust term in the controller. And an assumption is given as follows. Assumption: Suppose that \(\lambda_{min}\{\delta\}\) is the smallest characteristic value of positive definite matrix \(\delta=[\delta_{ii}]\), and the uncertain disturbance term \(\Psi(t)\) is constrained by the \(\lambda_{min}\{\delta\}\), i.e., \(\parallel\Psi\parallel\leq\lambda_{min}\{\delta\}\). Note that it is not necessary to know the upper bound. For the unknown nonlinear function, the matrix is defined as follows  
\[\Lambda= \begin{bmatrix}0&&&\\ &W_{1}&&\\ &&W_{2}&\\ &&&W_{3}\end{bmatrix} ,\left\|\Lambda\right\|_{F}\leq\Lambda_{M} \tag{29}\]  
\[\hat{\Lambda}= \begin{bmatrix}0&&&\\ &\hat{W}_{1}&&\\ &&\hat{W}_{2}&\\ &&&\hat{W}_{3}\end{bmatrix} ,\widetilde{\Lambda}=\Lambda-\hat{\Lambda} \tag{30}\]  
where \(W_{i}\ (i=1,\ 2,\ 3)\) are the ideal interconnection weights, and \(\hat{W}_{i}\ (i=1,\ 2,\ 3)\) are the estimated weights of the neural network for the nonlinear function. **Theorem 1**. : _For the nonholonomic mobile robot system (14) and (16) under unmodeled dynamics and parameter uncertainties, one can design the control law as follows_  
\[\dot{\hat{\Lambda}}=Q\Psi\xi^{T}-sQ\|\xi\|\hat{\Lambda} \tag{31}\]  
\[u_{r}=\delta^{T}sign\bigg{(}\widetilde{z}^{T}(t)P^{T}B\bigg{)} \tag{32}\]  
\[\dot{\hat{\delta}}=\eta_{\delta}\bigg{\{}-\alpha\parallel\widetilde{z}^{T}(t) P^{T}B\parallel\dot{\delta}+\text{diag}\Big{[}\Big{|}B^{T}P\widetilde{z}(t) \Big{|}\Big{]}\bigg{\}} \tag{33}\]  
_where \(\Psi=[0,\phi_{1},\phi_{2},\phi_{3}]^{T}\),sis a positive constant (\(s>0\)),\(\hat{\delta}(t)\)represents the adaptive estimated value, \(P= \begin{bmatrix}K&0\\ 0&\overline{M}(q)\end{bmatrix} \), and \(K\) denotes a positive definite symmetric matrix. The bounded stability of the closed-loop system can be ensured when all states of the controlled robot system are limited, and the error eventually reaches a uniform boundedness._  
**Proof. ** Define a function of the Lyapunov candidate term as follows  
\[ \begin{array}{rl}V&=\frac{1}{2}\widetilde{z}^{T}P\widetilde{z}+\frac{1}{2} \xi^{T}\xi+\frac{1}{2}tr\bigg{(}\widetilde{\Lambda}^{T}Q^{-1}\widetilde{ \Lambda}\bigg{)}\\ &+\frac{1}{2}\widetilde{\eta}\widetilde{f}^{2}+\frac{1}{2\widetilde{\eta}_{ \delta}}tr\bigg{(}\widetilde{\delta}^{T}\widetilde{\delta}\bigg{)}\end{array}  \tag{34}\]  
\(\cdot\)  
where \(\widetilde{\delta}=\delta-\delta\) represents the estimated error, \(tr(\cdot)\) represents a trace operator, \(\widetilde{f}(0)\geq f>0\), \(\xi=[r_{1},r_{2},r_{3},r_{4}]^{T}\) is the error matrix, \(V_{1}=\frac{1}{2}\xi^{T}\xi\), and \(Q= \begin{bmatrix}0&&&\\ &\Gamma_{1}&&\\ &&\Gamma_{2}&\\ &&&\Gamma_{3}\end{bmatrix} \). Derive the Lyapunov function (34), one can obtain  
\[ \begin{array}{ll}\dot{V}=&\widetilde{z}^{T}\Big{(}PA-PBR^{-1}B^{T}P+\frac{1}{2} \dot{P}\Big{)}\widetilde{z}\\ &+\xi^{T}\xi+\eta\widetilde{f}\widetilde{f}+tr\Big{(}\widetilde{\Lambda}^{T}Q^ {-1}\dot{\Lambda}\Big{)}\\ &-\frac{1}{\widetilde{h}_{\delta}}tr\Big{\{}\widetilde{\delta}^{T}\dot{\delta} \Big{\}}\end{array}  \tag{35}\]  
where \(\widetilde{W}_{i}^{T}=W_{i}^{T}-\hat{W}_{i}^{T},i=1,2,3,\dot{\widetilde{ \delta}}=-\dot{\delta}\). Thus, the following equation is derived  
\[