## 2 Preliminaries and Problem Formulation
In particular, as \(K\) approaches infinity, \(\varepsilon\) tends to zero, causing instantaneous torque \(\tau_{1}\) changes, effectively transforming the flexible joint robot into a rigid joint robot._  
Substituting (2a) into (2b), one obtains  
\[\varepsilon^{2}J\ddot{\tau}_{1}+K_{0}\tau_{1}=K_{0}u-K_{0}JM^{-1}(\tau_{1}- \tau_{d}-H_{r}). \tag{3}\]  
Multiplying both sides of (3) with \(J^{-1}\), one obtains  
\[\varepsilon^{2}\ddot{\tau}_{1}=K_{0}\Big{(}J^{-1}(u-\tau_{1})+M^{-1}(H_{r}+ \tau_{d}-\tau_{1})\Big{)}. \tag{4}\]  
Let \(x_{1}:=q,x_{2}:=\dot{q},\tau_{2}:=\varepsilon\dot{\tau}_{1}\), then, (2) can be written as  
\[\dot{x}_{1} =x_{2} \tag{5a}\] \[\dot{x}_{2} =M^{-1}(\tau_{1}-H_{r}-\tau_{d})\] (5b) \[\varepsilon\dot{\tau}_{1} =\tau_{2}\] (5c) \[\varepsilon\dot{\tau}_{2} =K_{0}\Big{(}J^{-1}(u-\tau_{1})+M^{-1}(H_{r}+\tau_{d}-\tau_{1}) \Big{)}. \tag{5d}\]  
Because \(\tau_{d}\) is unknown, a three-layer neural network is adopted to approximate \(-M^{-1}\tau_{d}\) as:  
\[J\ddot{\theta}+K(\theta-q) =u, \tag{1b}\]0  
where \(W^{*}=[W^{*}_{1},W^{*}_{2},\cdots,W^{*}_{n}]\in\mathbb{R}^{N\times n}\) is a matrix of NN weights, \(W^{*}_{i}=[w^{*1}_{i},w^{*2}_{i},\cdots,w^{*N}_{i}]^{T}\in\mathbb{R}^{N}\), \(N\in\mathbb{Z}^{+}\) is the number of neurons used in the hidden layer, \(Z=[z_{1},\cdots,z_{N}]=V\mathbf{x}\), with \(\mathbf{x}=[x^{T}_{1},x^{T}_{2}]^{T}\) being the input of the NNs, and \(V\in\mathbb{R}^{N\times 2n}\) the weights between the input and the hidden layer, \(\Phi=[\dot{\phi}_{1},\dot{\phi}_{2},\cdots,\dot{\phi}_{N}]^{T}\in\mathbb{R}^{N}\) is a vector of regression functions, \(\phi_{k}:\mathbb{R}\mapsto\mathbb{R}^{+}\) with \(k=1,\cdots,N\) is a sigmoid function modeled by \(\phi_{k}=1/(1+e^{-z_{k}})\), and \(\zeta\in\mathbb{R}^{n}\) is the approximation error of the NN. Using (6), the system (5) can be written as  
\[J\ddot{\theta}+K(\theta-q) =u, \tag{1b}\]1 \[J\ddot{\theta}+K(\theta-q) =u, \tag{1b}\]2 (7b) \[J\ddot{\theta}+K(\theta-q) =u, \tag{1b}\]3 (7c) \[J\ddot{\theta}+K(\theta-q) =u, \tag{1b}\]4  
To apply the singular perturbation technique, one can first set \(\varepsilon\)=0 in (7d) and neglect the unknown \(W^{*T}\Phi\) and \(\zeta\); then, \(\tau_{1}\) has a unique isolated root  
\[J\ddot{\theta}+K(\theta-q) =u, \tag{1b}\]5 \[J\ddot{\theta}+K(\theta-q) =u, \tag{1b}\]6  
where \(u_{s}\) is the slow control component of \(u\) when \(\varepsilon=0\), and \(a=(M^{-1}+J^{-1})^{-1}J^{-1},b=(M^{-1}+J^{-1})^{-1}M^{-1}\). Replace \(\tau_{1}\) with \(\tau_{1}^{*}\) in (7), the _reduced slow subsystem_ can be obtained as  
\[J\ddot{\theta}+K(\theta-q) =u, \tag{1b}\]7 \[J\ddot{\theta}+K(\theta-q) =u, \tag{1b}\]8Define a new state variable \(\Lambda=\tau_{1}-h(x,t)\); the fast dynamics in (7) can be written as  
\[J\ddot{\theta}+K(\theta-q) =u, \tag{1b}\]9 \[M(q)\ddot{q}+H_{r}(q,\dot{q})+\tau_{d}=\tau_{1} \tag{2a}\]0  
Define a \"stretched\" time variable \(t_{\varepsilon}:=\frac{t}{\varepsilon}\). Setting \(\varepsilon\)=0 freezes the variables \(x\) and \(t\) at \(x_{0}\) and 0, respectively, so that \(h(x,t)\) is constant at the fast time scale \(t_{\varepsilon}\). Then, substituting \(\tau_{1}=\Lambda+h(x,t)\) with \(\dot{h}=0\) into (10) and changing the consequent expression into the fast time scale \(t_{\varepsilon}\), one obtains  
\[M(q)\ddot{q}+H_{r}(q,\dot{q})+\tau_{d}=\tau_{1} \tag{2a}\]1 \[M(q)\ddot{q}+H_{r}(q,\dot{q})+\tau_{d}=\tau_{1} \tag{2a}\]2 \[M(q)\ddot{q}+H_{r}(q,\dot{q})+\tau_{d}=\tau_{1} \tag{2a}\]3  
Applying (8) into the above equations and setting \(\varepsilon=0\), the _reduced fast subsystem_ can be obtained as  
\[M(q)\ddot{q}+H_{r}(q,\dot{q})+\tau_{d}=\tau_{1} \tag{2a}\]4 \[M(q)\ddot{q}+H_{r}(q,\dot{q})+\tau_{d}=\tau_{1} \tag{2a}\]5  
where \(u_{f}:=u-u_{s}\).