## 3 Controllers Design
### Controllers Design for Stage 2
Moreover, we selected two groups of planar AAP systems with different structural parameters for simulations to verify the validity of the presented approach. **The first group of simulations for the planar AAP system. **  
The structural parameters of the planar AAP system are shown in Table 1.  
The initial states are selected as follows:  
\[[q_{10}\ q_{20}\ q_{30}]=[-0.7\ 0.6\ 0.8]\ \text{rad} \tag{48}\]  
The parameters of (21) are \(e_{1}=e_{2}=0.0001\). When we give a target position (\(x_{d}\ =\ 0.4,y_{d}=0.7\)), as calculated by Algorithm 1, the target angles for each link are as follows:  
\[[q_{1d}\ q_{2d}\ q_{3d}]=[-1.4290\ 1.0792\ 1.8458]\ \text{rad} \tag{49}\]  
**Case A: Zero Initial Velocity**  
The controllers (16) have parameters \(P_{i}=1.01\) and \(D_{i}=1.775\) for the simulation. The initial velocity of all links is set to zero. Figure 2 shows the simulation results of each link with zero initial velocity. From Figure 2a-c, it can be seen that at \(t=7.14\) s, the PL rotates at a steady speed, while the first two links are stabilized at the desired angle. From \(t=7.14\) s to \(t=50\) s, the planar AAP system can always be regarded as a PVP since the first link always maintains the target angle. Finally, at \(t=50\) s, the PL stabilizes at \(q_{3d}=1.8458\) rad. As can be seen in Figure 2d, the endpoint of the PL has already reached the desired positional coordinates, indicating that the position of the planar AAP system control objective has been realized. The simulation results show that the control method is effective when all the link velocities are zero at the beginning. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Link \(i\)** & \(m_{i}\) (kg)** & \(L_{i}\) (m)** & \(I_{i}\) (m) & \(J_{i}\) (kg \(\cdot\) m\({}^{2}\)) \\ \hline \(i=1\) & 0.7 & 0.7 & 0.35 & 0.0286 \\ \(i=2\) & 0.6 & 0.6 & 0.3 & 0.0180 \\ \(i=3\) & 0.5 & 0.5 & 0.25 & 0.0104 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Structural parameters for the planar AAP system (first group). Figure 2: The planar AAP system’s simulation results in case A (first group). (**a**) Joint angle; (**b**) joint angular velocity; (**c**) joint torque; (**d**) endpoint coordinates. **Case B: Non-zero Initial velocity**  
The controllers (16) have parameters \(P_{i}=1.1\) and \(D_{i}=1.545\) for the simulation. The initial velocity is chosen to test the efficacy of the control approach suggested in this paper, as follows:  
\[[\dot{q}_{10}\ \dot{q}_{20}\ \dot{q}_{30}]=[0\ 0\ 0.01]\ \text{rad/s} \tag{50}\]  
The simulation results for a PL with non-zero initial velocity are shown in Figure 3. As shown in Figure 3a,b, the last link rotates at a steady speed at \(t=8.57\) s. The AL is controlled to the desired coordinates in the first stage, and the system is always treated as a planar Pendubot from \(t=8.57\) s to \(t=50\) s. In the second stage, as shown in Figure 3c, the PL reaches the desired position at \(t=50\) s with \(q_{3d}=1.8458\) rad, while the angular velocities of all links converge to zero as shown in Figure 3d. The simulation results show that the control method is effective when the PL velocity is not zero at the beginning. **Case C: Disturbance Rejection**  
The controllers (16) have parameters \(P_{i}=0.98\) and \(D_{i}=2.04\) for the simulation. At the moment, \(t=0\) s, a disturbance torque, \(r=0.002\) N\(\cdot\)m, is added until the end of the control process to check the system's immunity to disturbances. The initial velocity of all links is selected as zero. The simulation results for the planar AAP system with additional disturbances are shown in Figure 4. As shown in Figure 4a-c, the first two links stabilize at the desired angle at \(t=7.38\) s, and the last link rotates at a steady velocity from \(t=7.38\) s to \(t=20\) s. Eventually, the last link stabilizes at the desired angle, \(q_{3d}=1.8458\) rad, and all the link velocities drop to zero at \(t=50\) s (shown in Figure 4d). Figure 3: The planar AAP system’s simulation results in case B (First group).