## 3 An Adaptive Robust Controller Using SMCs and RBFNNs
### Dead Zone Compensation Algorithm
Let \(f(x)=\zeta_{D}(x)\), using the Taylor series expansion \(f(x)=f(x_{0})+f^{\prime}(x_{0})(x-x_{0})+R(\xi)\); where \(R(\xi)=1/2!\zeta_{D}^{\prime}(\xi_{0})(x-x_{0})^{2}\), one has:  
\[R(\xi)=R\big{(}\widetilde{W}_{C},u\big{)}=\frac{1}{2!}\zeta_{D}^{\prime}(\xi _{0})\bigg{(}\{\widetilde{W}_{C}\big{\}}^{T}\cdot\zeta_{C}(u)+\delta_{C}(u) \bigg{)}^{2} \tag{17}\]  
then Equation (16) becomes  
\[ \begin{array}{ll}u=&\{W_{D}\}^{T}\cdot\left(\zeta_{D}(x_{0})+\zeta_{D}^{ \prime}(x_{0})(x-x_{0})+R(\xi)\right)+\delta_{D}(u+u_{NN}(u))\\ &=\{W_{D}\}^{T}\cdot\zeta_{D}\bigg{(}u+\big{\{}\hat{W}_{C}\big{\}}^{T}\cdot \zeta_{C}(u)\bigg{)}+\\ &\{W_{D}\}^{T}\cdot\zeta_{D}^{\prime}\bigg{(}u+\big{\{}\hat{W}_{C}\big{\}}^{T} \cdot\zeta_{C}(u)\bigg{)}\cdot\Big{(}\{\widetilde{W}_{C}\big{\}}^{T}\cdot \zeta_{C}(u)+\delta_{C}(u)\bigg{)}+\\ &\{W_{D}\}^{T}\cdot R(\xi)+\delta_{D}(u+u_{NN}(u))\end{array}  \tag{18}\]  
Substituting \(b\) given by Equation (13) into (18), one has:  
\[ \begin{array}{ll}u=&\{W_{D}\}^{T}\cdot\zeta_{D}\bigg{(}u+\big{\{}\hat{W}_{C }\big{\}}^{T}\cdot\zeta_{C}(u)\bigg{)}+\\ &\{W_{D}\}^{T}\cdot\zeta_{D}^{\prime}\bigg{(}u+\big{\{}\hat{W}_{C}\big{\}}^{T} \cdot\zeta_{C}(u)\bigg{)}\cdot\big{\{}\widetilde{W}_{C}\big{\}}^{T}\cdot\zeta_{ C}(u)+b\end{array}  \tag{19}\]  
Combining Equations (9) and (19), one has:  
\[ \begin{array}{ll}u+\delta_{D}(u_{C})&=&\{W_{D}\}^{T}\cdot\zeta_{D}\bigg{(}u+ \big{\{}\hat{W}_{C}\big{\}}^{T}\cdot\zeta_{C}(u)\bigg{)}+\\ &\big{\{}\hat{W}_{D}\big{\}}^{T}\cdot\zeta_{D}^{\prime}\bigg{(}u+\big{\{}\hat{W} _{C}\big{\}}^{T}\cdot\zeta_{C}(u)\bigg{)}\cdot\big{\{}\widetilde{W}_{C}\big{\}}^ {T}\cdot\zeta_{C}(u)+\\ &\big{\{}\widetilde{W}_{D}\big{\}}^{T}\cdot\zeta_{D}^{\prime}\bigg{(}u+\big{\{} \hat{W}_{C}\big{\}}^{T}\cdot\zeta_{C}(u)\cdot\big{\{}\widetilde{W}_{C}\big{\}}^ {T}\cdot\zeta_{C}(u)+b+\delta_{D}(u_{C})\\ &=&\{W_{D}\}^{T}\cdot\zeta_{D}(u_{C})+\big{\{}\hat{W}_{D}\big{\}}^{T}\cdot \zeta_{D}^{\prime}(u_{C})\cdot\big{\{}\widetilde{W}_{C}\big{\}}^{T}\cdot\zeta_ {C}(u)+\\ &=&\{W_{D}\}^{T}\cdot\zeta_{D}(u_{C})+\big{\{}\hat{W}_{D}\big{\}}^{T}\cdot \zeta_{D}^{\prime}(u_{C})\cdot\big{\{}\widetilde{W}_{C}\big{\}}^{T}\cdot\zeta_ {C}(u)+\\ &\big{\{}\widetilde{W}_{D}\big{\}}^{T}\cdot\zeta_{D}^{\prime}(u_{C})\cdot\big{\{} \widetilde{W}_{C}\big{\}}^{T}\cdot\zeta_{C}(u)-\big{\{}\widetilde{W}_{D}\big{\}}^ {T}\cdot\zeta_{D}^{\prime}(u_{C})\cdot\big{\{}\hat{W}_{C}\big{\}}^{T}\cdot\zeta_ {C}(u)+b+\delta_{D}(u_{C})\end{array}  \tag{20}\]  
Combining Equations (12), (14), and (20), one gets:  
\[ \begin{array}{ll}u_{D}=&u-\big{\{}\tilde{W}_{D}\big{\}}^{T}\cdot\big{\{} \zeta_{D}^{\prime}(u_{C})\big{\}}\cdot\big{\{}\widetilde{W}_{C}\big{\}}^{T} \cdot\big{\{}\zeta_{C}(u)\big{\}}+\\ &\big{\{}\widetilde{W}_{D}\big{\}}^{T}\cdot\big{\{}\zeta_{D}^{\prime}(u_{C}) \big{\}}\cdot\big{\{}\hat{W}_{C}\big{\}}^{T}\cdot\big{\{}\zeta_{C}(u)\big{\}}+d \end{array}  \tag{21}\]  
The trajectory tracking error was defined as:  
\[e(t)=q_{d}(t)-q(t) \tag{27}\]  
Compared to other sliding surfaces, the parameter design of the linear sliding surface was simpler and can be more easily implemented in engineering, since only the slope of the sliding surface should be designed. Therefore, the sliding surface is introduced here and designed as follows:  
\[s(t)=ce(t)+\dot{e}(t) \tag{28}\]  
where \(c\) is the gain matrix of the sliding mode's surface. Defining the auxiliary error variable \(q_{s}(t)=\int s(t)dt+q(t)\), from Equations (27) and (28), one obtains the derivatives:  
\[\left\{ \begin{array}{c}\dot{q}_{s}=s(t)+\dot{q}(t)\\ \ddot{q}_{s}=\dot{c}\dot{e}(t)+\ddot{q}_{d}(t)\end{array} \right. \tag{29}\]  
Combining Equations (1) and (29) yields:  
\[ \begin{split}& M(q)\dot{s}(t)=M(q)\ddot{q}_{s}-M(q)\ddot{q}\\ &\quad=M(q)\ddot{q}_{s}+C\Big{(}q,\dot{q}\Big{)}\dot{q}+G(q)+F\Big{(} \dot{q}\Big{)}+\tau_{d}-u_{D}\\ &\quad=M(q)\ddot{q}_{s}+C\Big{(}q,\dot{q}\Big{)}\big{(}\dot{q}_{s}-s(t) \Big{)}+G(q)+F\Big{(}\dot{q}\Big{)}+\tau_{d}-u_{D}\\ &\quad=-C\Big{(}q,\dot{q}\Big{)}s(t)+f-u_{D}\end{split}