# An Adaptive Control Based on Improved Gray Wolf Algorithm for Mobile Robots
## 2 Problem Formulation
\begin{array}{l}F_{z1}=\frac{mgl_{r}}{2L}-\frac{m_{z}v_{2}v_{3}}{dL},\\ F_{z2}=\frac{mgl_{r}}{2L}+\frac{m_{z}v_{3}v_{3}}{dL},\\ F_{z3}=\frac{mgl_{f}}{2L}-\frac{m_{z}v_{3}v_{3}}{dL},\\ F_{z4}=\frac{mgl_{f}}{2L}+\frac{m_{z}v_{3}v_{3}}{dL},\end{array}  \tag{9}\]  
where \(h\) is the system center of mass height and \(d\) is the wheel base of the system. Substituting the nonlinear tire model into the dynamic Equations (1) and (2) of the system, we obtain  
\[mv_{l}\big{(}\dot{\gamma}+\omega\big{)}-m_{a}l_{x}\ddot{\psi}+\tau_{o}=\frac{ mg}{L}\left(l_{r}\mathrm{cos}\theta+l_{f}\right) \tag{10}\]  
\[I_{z}\ddot{\theta}=\frac{mgl_{f}}{L}(\mathrm{cos}\theta-1) \tag{11}\]  
Figure 2: Tire model. Define \(x_{1}=\gamma,x_{2}=\theta,x_{3}=\dot{x}_{2},x_{4}=\psi,x_{5}=\dot{x}_{4}\), then the dynamical model of the whole system can be written as  
\[\left\{ \begin{array}{l}\dot{x}_{1}=\frac{1}{m\
u_{l}}\left[\frac{mg}{L}\left(l _{r}\cos\theta+l_{f}\right)+m_{a}l_{x}\dot{x}_{5}-\tau_{o}\right]-\omega\\ \dot{x}_{2}=x_{3}\\ \dot{x}_{3}=\frac{mgl_{f}}{l_{z}L}(\cos x_{2}-1)\\ \dot{x}_{4}=x_{5}\\ \dot{x}_{5}=\frac{1}{L}\left[m_{a}\upsilon_{l}(\dot{x}_{1}+\omega)l_{x}-(m_{ a}gl_{x}-K_{s})x_{4}-D_{s}x_{5}\right]\end{array} \right. \tag{12}\]  
or with a short notation as follows  
\[\left\{ \begin{array}{l}\dot{x}_{1}=j_{1}(x)+x_{5}\\ \dot{x}_{2}=x_{3}\\ \dot{x}_{3}=j_{2}(x)\\ \dot{x}_{4}=x_{5}\\ \dot{x}_{5}=j_{3}(x)+fv_{l}\end{array} \right. \tag{13}\]  
where \(x=\left[x_{1},x_{2},x_{3},x_{4}\right]^{T},j_{1}(x)=\frac{1}{m\
u_{l}}\left[ \frac{mg}{L}\left(l_{r}\cos\theta+l_{f}\right)+m_{a}l_{x}\dot{x}_{5}-\tau_{o} \right]-\omega-x_{5},j_{2}(x)=\frac{mgl_{f}}{l_{z}L}(\cos x_{2}-1),j_{3}(x)= \frac{1}{l_{z}}\left[m_{a}\upsilon_{l}\dot{x}_{1}l_{x}-(m_{a}gl_{x}-K_{s})x_{4 }-D_{s}x_{5}\right],f=\frac{m_{a}l_{x}\omega}{l_{x}}\). Assume that all functions \(j_{1}(x),j_{2}(x),j_{3}(x)\) in \(\Omega\in R\) are unknown. Based on this, considering that mobile robots in practical applications are affected by rolling and external unknown disturbances, without loss of generality, one can obtain generalized system (10), (11), and (3) to a general mobile robot. As a result, one can have derived the generalized nonholonomic constraint equations and dynamic equations for mobile robots under non-ideal conditions as (14) and (15), respectively. \[\left\{ \begin{array}{l}\dot{y}\cos\theta-\dot{x}\sin\theta-d_{0}\dot{\theta }=\zeta\\ \dot{x}\cos\theta+\dot{y}\sin\theta+b\dot{\theta}=r\zeta_{r}\\ \dot{x}\cos\theta+\dot{y}\sin\theta-b\dot{\theta}=r\zeta_{l}\end{array} \right. \tag{14}\]  
\[\dot{\vartheta}=\mathrm{z}(q)\vartheta+\Phi(q,\mu) \tag{15}\]  
where \(\zeta\) is the lateral skidding velocity of the mobile robot, \(\zeta=\left[\zeta_{r},\zeta_{l}\right]^{T}\) is the disturbance of the angular velocity vector due to the two drive wheels, \((x,y)\) is the inertial coordinate of the center of mass, \(d_{0}\) represents the distance from the geometric center of mass to the actual center of mass, \(r\) denotes the actuated wheel's radius, \(q=\left[x,y,\theta\right]^{T}\), \(\Phi(q,\xi)\) is the disturbance vector caused by the nonholonomic constraints of the system, \(\vartheta=\left[\upsilon\,\omega\right]^{T}\). The dynamics of the nonholonomic mobile robot in the non-ideal case can be described by the Lagrange equation as  
\[ \begin{array}{l}\mathrm{M}(\mathrm{q})\ddot{q}+O\big{(}q,\dot{q}\big{)} \dot{q}+G(q)\\ =E(q)\tau(t)+K^{T}(q)\lambda+\tau_{0}(t)\end{array}  \tag{16}\]  
where \(M(q)\) is the bounded inertia matrix, \(O\big{(}q,\dot{q}\big{)}\) denotes a Coriolis and centripetal torque vector, \(G(q)\) denotes the gravitational vector, \(E(q)\) is the input transformation matrix, \(\tau(t)\) is the torque term, \(K^{T}(q)\lambda\) denotes the nonholonomic constraint force, where \(K(q)\) is the full rank matrix relevant to the nonholonomic constraints and \(\lambda\) is a Lagrange multiplier, and \(\tau_{0}(t)\) denotes the unknown and external applied perturbations.