## 3 Controllers Design
### The first group of simulations for the planar AAAP system. The structural parameters of the planar AAAP system are shown in Table 3.  
The chosen initial states are as follows:  
\[\left[q_{10}\ q_{20}\ q_{30}\ q_{40}\right]=\left[-0.9\ 0.1\ 0.7\ -0.1\right]\ \mathrm{rad} \tag{54}\] \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.6 & 0.6 & 0.30 & 0.0180 \\ \(i=2\) & 0.8 & 0.8 & 0.40 & 0.0427 \\ \(i=3\) & 1.0 & 1.0 & 0.50 & 0.0833 \\ \(i=4\) & 1.0 & 1.0 & 0.50 & 0.0833 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Structural parameters for the planar AAAP system (First group). Figure 7: The planar AAP system’s simulation results in case C (second group). (**a**) Joint angle; (**b**) joint angular velocity; (**c**) joint torque; (**d**) endpoint coordinates. The parameters in (21) are \(e_{1}=e_{2}=0.0001\). When we give a target position (\(x_{d}~{}=~{}1.0\), \(y_{d}=1.5\)), the target angles for all links determined by Algorithm 1 are as follows:  
\[[q_{1d}~{}q_{2d}~{}q_{3d}~{}q_{4d}]=[-2.4211~{}0.8940~{}1.9017~{}-0.5462]~{}\text{ rad} \tag{55}\]  
**Case A: Zero Initial Velocity**  
The controllers (16) have parameters \(P_{i}=1.0\) and \(D_{i}=1.8\) for the simulation. The chosen initial velocity of all links is zero. The simulation results for every link with a zero beginning velocity are shown in Figure 8. As shown in Figure 8a-c, the last link rotates at a steady speed at \(t=6.79\) s while the first three links remain steady at their target angles. From \(t=6.79\) s to \(t=50\) s, the initial system is thought to be the planar Pendubot since the first stage's control objectives have been met. Eventually, the last link steadies at the desired angle, \(q_{4d}=-0.5462\) rad, and the endpoint attains the objective position at \(t=50\) s (shown in Figure 8d). The simulation findings indicate that the control technique is still potent for the planar AAAP system. **Case B: Non-zero Initial Velocity**  
The controllers (16) have parameters \(P_{i}=1.14\) and \(D_{i}=1.783\) for the simulation. The chosen initial velocity is as follows:  
\[[q_{10}~{}q_{20}~{}q_{30}~{}q_{40}]=[0~{}0~{}0~{}0.01]~{}\text{rad}/\text{s} \tag{56}\]  
The simulation results for PL with non-zero initial velocity are shown in Figure 9. As shown in Figure 9a-c, the velocity of the first three links is stabilized at zero, and the last link rotates with a very small stabilized velocity at \(t=6.42\) s. The system is then considered to be a planar Pendubot with a non-zero initial velocity. Then, from \(t=6.42\) s to \(t=50\) s, the system is always considered as a planar Pendubot and the last link stabilizes at the desired angle of \(q_{4d}=-0.5462\) rad. As shown in Figure 9d, all of its endpoints reach the target position at \(t=50\) s. The simulation results show that the control technique is still effective for planar AAAP systems with a nonzero initial velocity. Figure 8: The planar AAAP system’s simulation results in case A (First group). (**a**) Joint angle; (**b**) joint angular velocity; (**c**) joint torque; (**d**) endpoint coordinates. **Case C: Disturbance Rejection**  
The controllers (16) have parameters \(P_{i}=0.99\) and \(D_{i}=1.795\) 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 chosen as zero.