## 3 Controller Design Based on RBF  
In this study, a sliding mode controller based on variable structure control was designed for passive rehabilitation motion control of the upper limb exoskeleton. Expressing the general form dynamics model of the upper limb exoskeleton as a state-space equation, we have  
\[\left\{ \begin{array}{l}\Delta M=M-M_{0}\\ \Delta C=C-C_{0}\\ \Delta K=K-K_{0}\\ \Delta\tau_{d}=\tau_{d}-\tau_{d0}\end{array} \right. \tag{20}\]  
where \(M_{0}\) is the nominal value of the inertia matrix, \(\Delta K\) is the estimated error of the inertia matrix, \(C_{0}\) is the nominal value of the Coriolis force matrix, \(\Delta C\) is the estimated error of the Coriolis force and the centripetal force matrix, \(K_{0}\) is the estimated value of the gravity term, \(\Delta K\) is the estimated error of the gravity term, \(\tau_{d0}\) is the nominal value of the external disturbance, and \(\Delta\tau_{d}\) is the estimated error of the disturbance. The sliding surface function is defined as  
\[R=\dot{e}+Pe \tag{21}\]  
where \(P=P^{T}=[p_{1}\ p_{2}\ \ldots\ p_{n}]^{T}>0\), and \(e\to 0\) while \(R\to 0\). From (21), we obtained  
\[\dot{q}=-R+\dot{q}_{d}+Pe \tag{22}\]  
Combining (22) with the exoskeleton Lagrangian dynamic model, we obtained  
\[ \begin{array}{l}M\dot{R}=M(\ddot{q}_{d}-\ddot{q}+P\dot{e})=M(\ddot{q}_{d}+P \dot{e})-M\ddot{q}\\ =M(\ddot{q}_{d}+P\dot{e})+C\dot{q}+G+F+\tau_{d}-\tau\\ =M(\ddot{q}_{d}+P\dot{e})-CR+C(\dot{q}_{d}+Pe)+G+F+\tau_{d}-\tau\\ =-CR-\tau+f+\tau_{d}\end{array}  \tag{23}\]  
It can be seen that this model contained all the estimated model information of the upper limb exoskeleton, including gravity, friction, and interference, as we considered the motor as a connecting rod, Therefore, the whole system could be approximated by the RBF network, and then a sliding mode robust controller that did not require model information was designed. The Gaussian kernel function was designed as  
\[\varphi_{j}=\exp\frac{\|x-c_{j}\|}{\sigma_{j}^{2}},\ j=1,2,\ldots,\text{m} \tag{24}\]  
\[f(x)=W^{\text{T}}\varphi+\varepsilon \tag{25}\]  
where \(x=\left[e\ \dot{e}\ q_{d}\ \dot{q}_{d}\ \ddot{q}_{d}\right]\) is the input of the RBF network, \(W\) is the desired ideal weight of the network, \(\varphi_{j}\) is the intermediate function, and \(\varepsilon\) is a very small positive real number. Then, we obtained  
\[\hat{f}(x)=\hat{W}^{T}h \tag{26}\]  
where \(\hat{f}(x)\) is the approximation term to \(f(x)\), \(\widetilde{W}=W-\hat{W}\), and \(||W||_{F}\leq W_{\text{max}}\). Combining (25) and (26), we obtained  
\[f-\hat{f}=W^{T}\varphi+\varepsilon-\hat{W}^{T}h=\widetilde{W}^{T}h+\varepsilon \tag{27}\]  
The control law was designed as  
\[\tau=\hat{f}+K_{s}R-v \tag{28}\]  
where \(K_{s}\) is the sliding mode surface function coefficient and \(v=-(\varepsilon_{n}+a_{d})\text{sgn}(R)\) is the robust term, which is used to overcome the unstable error. In order to update and adjust the RBF network weight parameters, we set the RBF network weight adaptive law as  
\[\dot{\widetilde{W}}=L\varphi R^{T}\ (L=L^{T}>0) \tag{29}\]  
Substituting (28) into (23), we obtained  
\[ \begin{array}{l}M\dot{R}=-CR-[\hat{f}+K_{s}R-v]+f+\tau_{d}\\ =-(K_{s}+C)R+\widetilde{W}^{T}\varphi+(\varepsilon+\tau_{d})+v=-(K_{s}+C)R+ \eta_{1}\end{array}  \tag{30}\]  
where \(\eta_{1}=\widetilde{W}^{T}\varphi+(\varepsilon+\tau_{d})+v\). The Lyapunov function was constructed as  
\[V=\frac{1}{2}R^{T}MR+\frac{1}{2}tr(\widetilde{W}^{T}L^{-1}\widetilde{W}) \tag{31}\]Taking the derivative of both sides of (31), we obtained  
\[\dot{V}=R^{T}MR+\frac{1}{2}R^{T}\dot{M}R+tr(\widetilde{W}^{T}L^{-1}\dot{\widetilde {W}}) \tag{32}\]  
Substituting (30) into (32), we obtained  
\[\dot{V}=-R^{T}K_{s}R+\frac{1}{2}R^{T}(\dot{M}-2C)R+tr\widetilde{W}^{T}(L^{-1} \dot{\widetilde{W}}+\varphi R^{T})+R^{T}(\varepsilon+\tau_{d}+v) \tag{33}\]  
The manipulators had the following mathematical properties according to [27]:  
1. The oblique symmetry of the dynamic model of the robotic arm system: \(R^{T}\left(\dot{M}-2C\right)R=0\);
2.