# An Adaptive Control Based on Improved Gray Wolf Algorithm for Mobile Robots
## 2 Problem Formulation
Here, one can construct a suitable matrix \(S(q)=\left[-J_{1}^{-1}(q)I_{2}(q)-J_{2}^{-1}(q)I_{3}(q)\ I_{2}\right]\), which divides linearly independent vectors in a generalized coordinate space, satisfying \(J(q)S(q)=0\), substituting into (16) yields \(\overline{M}(q)=S^{T}(q)M(q)S(q)\), \(\overline{E}(q)=S^{T}(q)E(q)\). We assume the trajectory tracking error as \(\mathrm{r}(t)=q_{d}(t)-q_{d,a}(t)\) where \(q_{d}(t)\) and \(q_{d,a}(t)\) are the desired trajectories and actual trajectories of the robot system, respectively. What is more, the tracking error of the filter is defined as \(f(t)=\dot{r}(t)+Ar(t)\), where \(A\) is a positive definite matrix. Then, we obtain the error states as \(\widetilde{z}(t)=\left[r^{T}(t)f^{T}(t)\right]^{T}\). The complete error state dynamic equation for the kinematic force of the robot system is provided by [34]  
\[\dot{\widetilde{z}}(t)=A\big{(}q,\dot{q}\big{)}\widetilde{z}(t)+u(t) \tag{17}\]  
where a control input \(u(t)=H(f_{e})-\overline{E}(q)\tau\) with \(f_{e}=\left[q_{d,a^{\prime}}^{T}\dot{q}_{d,a^{\prime}}^{T},q_{d}^{T},\dot{q}_ {d,}^{T}\dot{q}_{d}^{T}\right]^{T}\). For the control problem, it can be reduced to a motion control system design issue, where the adjustable controller parameters can be self-tuned in real time to effectively handle various unknown external disturbances \(\tau_{0}\). This ensures that the robot system accurately tracks the desired trajectory \(q_{d}(t)\), even when the kinematic matrices of the mobile robot system are all entirely unknown. The nonholonomic robotic intelligent control system proposed in the paper is shown in Figure 3, and the equation is as follows  
\[\overline{E}(q)\tau(t)=\hat{H}-u_{o}(t)+u_{r}(t) \tag{18}\]  
where \(\overline{E}(q)\) denotes the transformation matrix with known inputs, \(u_{o}(t)\) denotes the linear quadratic regulator (LQR) term, \(\hat{H}\) denotes the neural network term, and \(u_{r}(t)\) denotes the robust term. It should be emphasized that the traditional LQR controllers' parameters are calculated with the Riccati equation [35], which brings a challenge to the real-time self-tuning of some parameters. Then, a new adaptive algorithm to adjust the controller parameters in real time will be given. Substituting (18) into (17) yields the following equation of the augmented error dynamic  
\[\dot{\widetilde{z}}(t)=A\widetilde{z}(t)+B\bigg{[}u_{o}(t)+\widetilde{H}-u_{r }(t)\bigg{]} \tag{19}\]  
where \(B= \begin{bmatrix}0\\ \overline{M}^{-1}(q)\end{bmatrix} \) represents the matrix of coefficient and \(\widetilde{H}=H-\hat{H}\) denotes an approximation error of the neural network. Figure 3: Bloc diagram of tracking control scheme. The optimal control term ensures that the following quadratic function can be minimized [36]  
\[J_{0}=\int_{t_{0}}^{\infty}L\Big{(}\widetilde{z},u\Big{)}dt \tag{20}\]  
with the Lagrange function  
\[L\Big{(}\widetilde{z},u\Big{)}=\frac{1}{2}\widetilde{z}^{\top}(t)Q\widetilde{x} (t)+\frac{1}{2}u^{T}(t)Ru(t) \tag{21}\]  
where \(R\) and \(Q\) are both the symmetric positive definite matrices, \(\widetilde{A}= \begin{bmatrix}I&0\\ A&I\end{bmatrix} \), \(\widetilde{z}=\widetilde{A}\Big{[}r^{T},\tilde{r}^{T}\Big{]}^{T}\).