## 4 Stability Analysis  
Provided that \(f(q_{1},q_{2},\ldots,q_{n},u,d(t),t)\) is globally Lipschitz with reference to \(q\), there appears a constant \(w_{o}>0\), \(w_{c}>0\), whereby the closed-loop system Equation (18) is asymptotically stable.  
Proof.: \[\mathbf{U}=\;[\tau_{1},\tau_{2}]^{T}=\mathbf{N}_{inv}\;(\mathbf{K_{p}}\;\mathbf{e}-\mathbf{K_{d}}\; \dot{\mathbf{e}}+\ddot{q_{d}}-\overset{\wedge}{\mathbf{f}})\] (18)  
\(q_{s,r}\) and \(q_{e,r}\) are the reference trajectories for the shoulder and elbow joints. The goal is to properly track these inputs \(q_{s,d}\), whose derivative, \(q_{s,r,1}\), \(\ddot{q}_{s,r,2}\;\ldots,q_{s,r}^{(n)}\) are bounded. Let, for the shoulder joint \([q_{s,r,1}\), \(q_{s,r,2}\), \(q_{s,r,3}]^{T}=[\dot{q}_{s,r}\), \(q_{s,r,1},q_{s,r,2}]^{T}\). Define \(e_{i}=q_{s,r,i}-q_{i}\), \(i=1,2\), and \(\widetilde{q}_{1}=q_{1}-\widetilde{q}_{1}\), \(\widetilde{q}_{2}=q_{2}-\widetilde{q}_{2}\), \(\widetilde{q}_{3}=q_{3}-\widetilde{q}_{3},e_{1}=q_{s,r,1}-q_{1}\), \(e_{2}=q_{s,r,2}-q_{2}\). The proposed control law is as follows:  
\[\begin{array}{l}U_{1}=[k_{p}(q_{s,r,1}-\widetilde{q}_{1})+k_{d}(q_{s,r,2}- \widetilde{q}_{2})\;+q_{s,r,3}-\widehat{q}_{3}](P_{f1}.j_{22})\\ =\{[k_{p}[(q_{s,r,1}-(q_{1}-\widetilde{q}_{1})]+[k_{d}[(q_{s,r,2}-(q_{2}- \widetilde{q}_{2})]+q_{s,r,3}-\widehat{q}_{3})(P_{f1}.j_{22})\\ =[k_{p}(e_{1}+\widetilde{q}_{1})+k_{d}[(e_{2}+\widetilde{q}_{2})+q_{s,r,3}- \widehat{q}_{3}]/(P_{f1}.j_{22})\end{array} \tag{19}\]  
It follows that for the shoulder joint  
\[\begin{array}{l}\dot{e}_{1}=q_{s,r,1}-q_{1}=q_{s,r,2}-q_{2}=e_{2},\\ \dot{e}_{2}=q_{s,r,2}-q_{2}=q_{s,r,3}-(q_{3}+\frac{1}{(P_{f1}.j_{22})}U_{1}\\ =q_{s,r,3}-q_{3}-[k_{p}(e_{1}+\widetilde{q}_{1})]\;-k_{d}[(e_{2}+\widetilde{q} _{2})-\widehat{q}_{3}+q_{s,r,3}]\\ =-k_{p}(e_{1}+\widetilde{q}_{1})-k_{d}[(e_{2}+\widetilde{q}_{2})-\widehat{q}_ {3}\end{array} \tag{20}\]  
Let \(e=[e_{1},e_{2}]^{T}\in R^{n}\), \(\widetilde{q}=[\widetilde{q}_{1}\), \(\widetilde{q}_{2}\), \(\widetilde{q}_{3}]^{T}\in R^{n+1}\); then,  
\[\begin{array}{l}\dot{e}(t)=B_{e}e(t)+B_{\widetilde{q}}\;\widetilde{q}(t)\\ \\ B_{e}=\begin{bmatrix}0&1\\ -k_{p,e}&-k_{d,s}\end{bmatrix}\;\text{and}\;\;B_{\widetilde{q}}=\begin{bmatrix} 0&0&0\\ 0&0&0\\ -k_{p,e}&-k_{d,e}&-1\end{bmatrix}\end{array} \tag{21}\]  
Similarly, for the elbow joint,  
\[\begin{array}{l}\dot{e}(t)=B_{e}e(t)+B_{\widetilde{q}}\;\widetilde{q}(t)\\ \\ B_{e}=\begin{bmatrix}0&1\\ -k_{p,e}&-k_{d,e}\end{bmatrix}\;\text{and}\;\;B_{\widetilde{q}}=\begin{bmatrix} 0&0&0\\ 0&0&0\\ -k_{p,e}&-k_{d,e}&-1\end{bmatrix}\end{array} \tag{22}\]  
\(k_{p,s}\), \(k_{d,s}\), \(k_{p,e}\) and \(k_{d,e}\) for the shoulder and elbow joints are selected to achieve \(s^{2}+k_{d}s+k_{p}\) Hurwitz; \(B_{e}\) is Hurwitz. To make tuning easier, let \(s^{2}+k_{d}s+k_{p}=(s+\omega_{c})^{2}\) where \(w_{c}>0\). As a result, the only tuning controller parameter is \(w_{c}\).  
\(\lim\limits_{t\to 0}||B_{\widetilde{q}}\;\widetilde{q}(t)||=0\) if \(h(q,u,d,\dot{d})\) is globally Lipschitz with respect to \(q\) and \(\lim\limits_{t\to\infty}(t)=0\), \(i=1,2\;Q.E.D.\;\widetilde{q}_{1}\), \(\widetilde{q}_{2}\ldots\;\widetilde{q}_{5}\;\) and \(\;\widetilde{q}_{6}\) are the observer estimation errors. \(e_{1}\), \(e_{2}\ldots e_{5}\;\) and \(e_{6}\) are the controller errors. The above analysis demonstrates that the closed-loop system is asymptotically stable.