# Application of Improved Sliding Mode and Artificial Neural Networks in Robot Control
## 2 Application of Improved Sliding Surfaces and Artificial Neural Networks in Robotics
### Controlling Robots Using an Improved Slider Interface
Substituting Equation (4) into the derivative of Equation (5), we obtain Equation (6):  
\[\dot{\mathbf{s}}=2\Big{(}\mathbf{A}_{w}\mathbf{X}+\mathbf{B}_{w}\mathbf{U}+\mathbf{D}_{f}-\ddot{\mathbf{ \Gamma}}_{d}\Big{)}+(\mathbf{\lambda}+2\mathbf{\alpha})\dot{\mathbf{e}}+\mathbf{\alpha}^{2} \mathbf{e} \tag{6}\]  
The exponential approach law with the Hyperbolic tangent function (tanh) is as Equation (7) [30]:  
\[\dot{\mathbf{s}}=-\eta\text{tanh}\Big{(}\frac{\mathbf{s}}{\varepsilon}\Big{)}-\kappa \mathbf{s} \tag{7}\]  
where \(\mathbf{\eta}=diag\big{(}\big{[}\eta_{x},\eta_{y},\eta_{\phi}\big{]}\big{)},\mathbf{ \kappa}=diag\big{(}\big{[}\kappa_{x},\kappa_{y},\kappa_{\phi}\big{]}\big{)}, \mathbf{e}=diag\big{(}\big{[}\varepsilon_{x},\varepsilon_{y},\epsilon_{\phi} \big{]}\big{)}\), and for all \(\eta_{i},\kappa_{i},\epsilon_{i}>0\). The proposed control law for the robot is given by Equation (8):  
\[\mathbf{U}=\mathbf{U}_{ISMC-Tanh}=-\frac{1}{2}\mathbf{B}_{W}^{-1}\Big{[}2\Big{(}\mathbf{A}_{W} \mathbf{X}+\mathbf{D}_{f}-\ddot{\mathbf{\Gamma}}_{d}\Big{)}+(\mathbf{\lambda}+2\mathbf{\alpha}) \dot{\mathbf{e}}+\mathbf{\alpha}^{2}\mathbf{e}+\eta\text{tanh}\Big{(}\frac{\mathbf{s}}{ \varepsilon}\Big{)}+\kappa\mathbf{s}\Big{]} \tag{8}\]  
The Lyapunov function is as Equation (9):  
\[V=\frac{1}{2}\mathbf{s}^{2} \tag{9}\]  
At this point, the derivative of \(V\) with the tanh function is represented by Equation (10):  
\[ \begin{array}{ll}\dot{V}&=\mathbf{s}\dot{\mathbf{s}}=\mathbf{s}\Big{[}2\Big{(}\mathbf{A}_{W} \mathbf{X}+\mathbf{B}_{W}\mathbf{U}+\mathbf{D}_{f}-\ddot{\mathbf{\Gamma}}_{d}\Big{)}+(\mathbf{\lambda} +2\mathbf{\kappa})\dot{\mathbf{e}}+\mathbf{\alpha}^{2}\mathbf{e}\Big{]}\\ &=\mathbf{s}\big{[}-\eta\text{tanh}\Big{(}\frac{\mathbf{s}}{\varepsilon}\Big{)}-\kappa \mathbf{s}\big{]}=-\eta\text{tanh}\big{(}\frac{\mathbf{s}}{\varepsilon}\big{)}-\kappa \mathbf{s}^{2}\end{array}  \tag{10}\]According to [30], we have:  
\[|s|-\text{stanh}\Big{(}\frac{s}{\epsilon}\Big{)}\leq\mu\epsilon \tag{11}\]  
Then, we have Equation (12) and consequently Equation (13):  
\[\mathbf{\eta}|s|-\mathbf{\eta}\text{stanh}\Big{(}\frac{s}{\epsilon}\Big{)}\leq\mu\epsilon \tag{12}\]  
\[-\mathbf{\eta}\text{stanh}\Big{(}\frac{s}{\epsilon}\Big{)}\leq-\mathbf{\eta}|s|+\eta\mu\epsilon \tag{13}\]  
Therefore, we can establish Equation (14) for the derivative of \(V\):  
\[\dot{V}=\dot{s\mathbf{\dot{s}}}\leq-\kappa s^{2}-\mathbf{\eta}|s|+\eta\mu\epsilon\leq- \kappa s^{2}+\eta\mu\epsilon=-2\kappa V+\beta \tag{14}\]  
Using Lemma 1.3 from [12], we obtain Equation (15):  
\[ \begin{split}&\dot{V}\leq e^{-2\kappa(t-t_{0})}V(t_{0})+\mathbf{\beta}e^ {-2\kappa t}\int_{t_{0}}^{t}e^{2\kappa t}d\tau=e^{-2\kappa(t-t_{0})}V(t_{0})+ \frac{\mathbf{\beta}e^{-2\kappa t}}{2\kappa}\big{(}e^{-2\kappa t}-e^{-2\kappa t_{ 0}}\big{)}\\ &=e^{-2\kappa(t-t_{0})}V(t_{0})+\frac{\beta}{2\kappa}\Big{(}1-e^ {-2\kappa(t-t_{0})}\Big{)}=e^{-2\kappa(t-t_{0})}V(t_{0})+\frac{\eta\mu\epsilon }{2\kappa}\Big{(}1-e^{-2\kappa(t-t_{0})}\Big{)}\end{split}  \tag{15}\]  
Thus, we conclude with Equation (16):  
\[\lim_{t\to\infty}V(t)\leq\frac{\eta\mu\epsilon}{2\kappa} \tag{16}\]  
From inequality (16), it can be deduced that the tracking error converges asymptotically, and the convergence accuracy depends on the values of \(\epsilon\), \(\mathbf{\eta}\), and \(\kappa\). Additionally, the error \(\mathbf{e}(t)\) will approach zero, as \(\mathbf{s}(t)\) does when t approaches infinity. Therefore, \(\mathbf{e}(t)\) and \(\dot{\mathbf{e}}(t)\) will both approach zero as \(t\to\infty\).