## 3 Control Design
### Proposed Control  
#### 3.2.1 Adaptive Approximation Based on RBFNN  
As presented in Section 2, the uncertainties always exist in the system dynamics. They are smooth uncertanties and unsmooth uncertainties. This section presents two approximations via the Radial Basis Function Neural Network [18] to compensate the smooth uncertainties in the mechanical and hydraulic dynamics. The RBFNN has three layers which are the input layer, hidden layer, and the output layer, which is employed to implement the approximations. The inputs and the output of the RBFNN are the tracking errors and the control input, respectively. The function of each layer is presented as follows:  
The input layer rescaled the input variables, \(e_{i}(i=1,\ldots,m)\) to the next layers. The hidden layer derives the input values with the Radius Basis function, Gaussian function, as follows:  
\[\mu_{ijk}=\exp\left(\frac{-\left(E_{i}-m_{eijk}\right)^{T}\left(E_{i}-m_{eijk }\right)}{\sigma_{ijk}^{2}}\right)_{(i=1,2;j=1,2,3;k=1,\cdots,n)} \tag{25}\]  
where \(E_{i}=\left[ \begin{array}{cc}e_{i1}&\cdots&e_{im}\end{array} \right]^{T}\in R ^{m\times 1}\) is the input vector, \(m_{eijk}\in R^{m\times 1}\), and \(\sigma_{ijk}(i=1,2;j=1,2,3,k=1,\ldots,n)\in R^{m\times 1}\), respectively, are the mean vector and the standard derivation of the Gaussian functions of the node \(ij\) in the hidden layer. The output layer presents the compensation signals for the mechanical dynamic and the hydraulic dynamic as follows:  
\[D_{i}=\left[ \begin{array}{cccc}d_{i1}&d_{i2}&d_{i3}\end{array} \right]^{T}=W_ {i}^{T}\mu_{i} \tag{26}\]  
with \(W_{i}=\left[ \begin{array}{cccccc}\omega_{i11}&\cdots&\omega_{i1n}&0&0&0&0\\ 0&0&0&\cdots&0&0&0\\ 0&0&0&0&\omega_{i31}&\cdots&\omega_{i3n}\end{array} \right]^{T}\in R^{3n\times 3 },\quad\mu_{i}=\left[ \begin{array}{cccccc}\mu_{i11}&\cdots&\mu_{i1n}&\mu_{i2 1}&\cdots&\mu_{i2n}&\mu_{i31}&\cdots&\mu_{i3n}\end{array} \right]^{T}\in R^{3n \times 1},(i=1,2)\) Each adaptive approximation includes RBFNNs and its adaptive laws and the online-tuning RBFNN is deployed to eliminate the smooth uncertainties in the mechanical dynamic and the hydraulic dynamic. These approximations reduce the chattering effects and improve the precisions. The adaptive lawsare derived from the Lyapunov approach. The approximations will compensate the mechanical uncertainties and the hydraulic uncertainties such that  
\[D_{i}=D_{i}^{*}+\varepsilon_{i}={W_{i}^{*}}^{T}\mu_{i}(m_{ei}^{*},\sigma_{i}^{*}) +\varepsilon_{i},(i=1,2) \tag{27}\]  
where \(\varepsilon_{i}=\left[ \begin{array}{cccc}\varepsilon_{i1}&\varepsilon_{i2}& \varepsilon_{i3}\end{array} \right]^{T},(i=1,2)\) are reconstructed errors; and \({W_{i}^{*}},(i=1,2)\), \(m_{ei^{*}}^{*},(i=1,2)\), and \(\sigma_{i}^{*},(i=1,2)\) are optimal parameters of \(W_{i},(i=1,2)\), \(m_{ei}=\left[ \begin{array}{cccccccc}m_{ei11}&\cdots&m_{ei1n}&m_{ei21}&\cdots &m_{ei2n}&m_{ei31}&\cdots&m_{ei3n}\end{array} \right]^{T},(i=1,2)\in R^{3 nm\times 1}\) and \(\sigma_{i}=\left[ \begin{array}{cccccccc}\sigma_{i11}&\cdots&\sigma_{i1n}& \sigma_{i21}&\cdots&\sigma_{i2n}&\sigma_{i31}&\cdots&\sigma_{i3n}\end{array}  \right]^{T}\in R^{3 nm\times 1}\),(\(i=1,2)\) respectively, in the RBFNN. The approximation is expressed as the following form:  
\[\hat{D}_{i}=\hat{W}_{i}^{T}\hat{\mu}_{i}(\hat{m}_{ei},\widehat{\sigma}_{i}),( i=1,2) \tag{28}\]  
where \(\hat{W}_{i},\hat{m}_{ei},\hat{\sigma}_{i}\) are the estimated parameters of the RBFNN. An approximation error vector \(\widetilde{D}_{i}\) is defined as follows:  
\[\widetilde{D}_{i}=D_{i}-\hat{D}_{i}=D_{i}^{*}+\varepsilon_{i}-\hat{D}_{i}={W_ {i}^{*}}^{T}{\mu_{i}}^{*}-\hat{W}_{i}^{T}\mu_{i}+\varepsilon_{i}=\widetilde{W }_{i}{\mu_{i}}^{*}+\hat{W}_{i}\widetilde{\mu}_{i}+\varepsilon_{i} \tag{29}\]  
where \(\widetilde{W}_{i}={W_{i}}^{*}-\hat{W}_{i}\) and \(\widetilde{\mu}_{i}={\mu_{i}}^{*}-\hat{\mu}_{i}\). The RBFs are transformed into partially linear form by the Taylor series expansion, and the \(\widetilde{\mu}\) can be represented as:  
\[\widetilde{\mu}_{i}=\left[