## 3 Controllers Design
### Controllers Design for Stage 2  
Considering (6) and (12), we obtain the following:  
\[\tilde{\tau}_{1}=\Big{(}\tilde{M}_{11}-\tilde{M}_{12}\tilde{M}_{22}^{-1} \tilde{M}_{21}\Big{)}u+\tilde{H}_{1}-\tilde{M}_{12}\tilde{M}_{22}^{-1}\tilde{H }_{2} \tag{22}\]  
The algorithm of the nilpotent approximation is used for the underactuated manipulator. Therefore, we refer to the proposed method to calculate the nilpotent approximation model of the PVP (13). Similarity, we select the vector field \(\{\tilde{f},\tilde{g},[\tilde{f},\tilde{g}],[\tilde{g},[\tilde{f},\tilde{g}]]\}\) to construct a reachable matrix and carry out the coordinate transformation to obtain the privileged coordinates of the PVP at \([\tilde{q}_{1}^{0}\ \tilde{q}_{2}^{0}\ \tilde{q}_{1}^{0}\ \tilde{q}_{2}^{0}]\) as follows:  
\[\left\{ \begin{array}{l}\tilde{q}_{1}=\tilde{q}_{1}^{0}-z_{3}\\ \tilde{q}_{2}=\tilde{q}_{2}^{0}+\tilde{q}_{2}^{0}z_{1}+az_{3}\\ \tilde{q}_{1}=z_{2}\\ \tilde{q}_{2}=\tilde{q}_{2}^{0}-az_{2}+\beta z_{3}-\gamma z_{4}+\beta z_{1}z_{2} \end{array} \right. \tag{23a}\]  
where \(\alpha=1+N\cos\vartheta_{2}^{0}\), \(\beta=N\vartheta_{2}^{0}\sin\vartheta_{2}^{0}\), \(\gamma=N^{2}\sin 2\vartheta_{2}^{0}\). The establishment of a PVP nilpotent approximation model:  
\[u(t)=\left\{ \begin{array}{ll}-A\text{cos}\dfrac{4\pi t}{T},&t\in\left[0,\dfrac{T }{2}\right)\\ A\text{cos}\dfrac{4\pi\left(t-\frac{T}{2}\right)}{T},&t\in\left[\dfrac{T}{2},T \right]\end{array} \right. \tag{33}\]  
where \(A\) is the amplitude of \(u(t)\). From (24b) and (24c), we obtain \(z_{3}=-u\)  
\[\int_{0}^{T}z_{3}(t)\text{d}t=\int_{0}^{T}\int_{0}^{t}\int_{0}^{\sigma}u(\rho) \text{d}\rho\text{d}\sigma\text{d}t=0 \tag{34}\]  
and  
\[\int_{0}^{T}z_{2}^{2}(t)\text{d}t=\int_{0}^{T}\left(\int_{0}^{t}u(\sigma)\text {d}\sigma\right)^{2}\text{d}t=\dfrac{T^{3}}{32\pi^{2}}A^{2} \tag{35}\]  
According to (32), (34) and (35), we can obtain  
\[\Delta\hat{q}_{2}=\dfrac{A^{2}T^{3}N^{2}}{64\pi^{2}}\text{sin}2\hat{q}_{2}^{0} \tag{36}\]  
The above formula shows that \(\Delta\hat{q}_{2}\) and \(\text{sin}\,2\hat{q}_{2}^{0}\) have the same symbols. In order to guarantee that the second link is controlled by iterative steering with a smaller error from the target value after each cycle, the constraint relation of the first cycle is given as follows:  
\[\left|\hat{q}_{2}^{d}-\hat{q}_{2}^{1}\right|\leq\eta_{1}\left|\hat{q}_{2}^{d}- \hat{q}_{2}^{0}\right| \tag{37}\]  
\[\left|\hat{q}_{2}^{1}\right|\leq\eta_{2}\left|\hat{q}_{2}^{0}\right| \tag{38}\]  
where \(\eta_{1},\eta_{2}\in[0,1)\) are the coefficients of convergence. Without sacrificing generality, we suppose the following:  
\[\hat{q}_{2}^{d}-\hat{q}_{2}^{1}=\eta_{1}\left(\hat{q}_{2}^{d}-\hat{q}_{2}^{0}\right) \tag{39}\]  
\[\hat{q}_{2}^{1}=\eta_{2}\hat{q}_{2}^{0} \tag{40}\]  
Considering (27) and (39), we arrive at the following:  
\[T=(1-\eta_{1})\dfrac{\hat{q}_{2}^{d}-\hat{q}_{2}^{0}}{\hat{q}_{2}^{0}},0\leq \eta_{1}<1 \tag{41}\]  
Because of \(T>0\), when Equation (41) is true, the following conditions are met:  
\[\left\{ \begin{array}{ll}\hat{q}_{2}^{0}<\hat{q}_{2}^{d}\\ \hat{q}_{2}^{0}>0\end{array} \right.\text{ \ \ or \ }\left\{ \begin{array}{ll}\hat{q}_{2}^{0}> \hat{q}_{2}^{d}\\ \hat{q}_{2}^{0}<0\end{array} \right. \tag{42}\]  
And according to (28), (36), and (40), we obtain the following:  
\[A=\dfrac{8\pi}{NT}\sqrt{\dfrac{\hat{q}_{2}^{0}(\eta_{2}-1)}{T\text{sin}2\hat{ q}_{2}^{0}}},0\leq\eta_{2}<1 \tag{43}\]  
To ensure that the square root of the above equation is positive, conditions should be satisfied as follows:  
\[\hat{q}_{2}^{0}<0\text{:}\left\{ \begin{array}{ll}\hat{q}_{2}^{0}\in Q_{1} \\ \hat{q}_{2}^{0}\in Q_{3}\end{array} \right.\text{ }\hat{q}_{2}^{0}>0\text{:}\left\{ \begin{array}{ll}\hat{q}_{2}^{0}\in Q_{2}\\ \hat{q}_{2}^{0}\in Q_{4}\end{array} \right. \tag{44}\]  
where \(Q_{1}\), \(Q_{2}\), \(Q_{3}\), and \(Q_{4}\) denote the four quadrants, respectively. non-zero, and the torque was added to the disturbances.