## 4 Simulations
### Simulation Results
#### 4.2.2 Tracking Aperiodic Trajectories  
We also examined the performance in controlling aperiodic trajectories. Figure 13a,b present the position tracking results for joint 1 and Figure 14a,b present the position tracking results for joint 2. In the process of tracking aperiodic trajectories, the position tracking results of joint 1 show that the PID controller performs relatively worst, and the proposed controller performs the best. In addition, the position tracking results of joint 2 show that the proposed controller is also the best. The results validate that the proposed controller can also track aperiodic position trajectories well.  
Figure 15a,b present the velocity tracking results for joint 1 and Figure 16a,b present the velocity tracking results for joint 2. The results show that the NFTSMC controller performs best in tracking the velocity of aperiodic trajectories, which is better than the proposed controller and NFTSMC+TDE. The reason for this situation is that the TDE is based on a dynamic model to estimate the disturbance term. This process requires acceleration \(\tilde{q}\), however, the differentiation used will further amplify the noise and affect the estimation accuracy of the TDE. Therefore, the accuracy of the velocity tracking is reduced. However, we can see the results of Figures 15b and 16b that under the cases of both using TDE, the velocity tracking accuracy of the proposed controller is better than that of NFTSMC+TDE.  
Figure 14: (**a**) Position tracking of joint 2. (**b**) Partial enlargement of (**a**).  
Figure 13: (**a**) Position tracking of joint 1. (**b**) Partial enlargement of (**a**).  
Table 3 shows the RMSE of the proposed controller and other controllers when tracking aperiodic trajectories. Compared with tracking periodic trajectories, we can find that the tracking aperiodic trajectories vary more within a short period of time, and the noise changes are more complicated, affecting the tracking accuracy of each controller. However, the proposed controller's position tracking is still relatively the best, with \(1.2\times 10^{-3}\) rad and 3.8 \(\times\) 10\({}^{-3}\) rad, respectively. In terms of velocity tracking, because of the influence of noise in the tracking process of TDE, the RMSE results of the proposed controller and NFTSMC+TDE are not as good as NFTSMC. However, comparing the proposed controller with NFTSMC+TDE, we can find that the proposed controller performs better, thus proving that the proposed controller has better tracking accuracy and stability.  
Figure 16: (**a**) Velocity tracking of joint 2. (**b**) Partial enlargement of (**a**).  
Figure 15: (**a**) Velocity tracking of joint 1. (**b**) Partial enlargement of (**a**).  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline  & \multicolumn{2}{c}{**Joint 1**} & \multicolumn{2}{c}{**Joint 2**} \\
**Controller** & **Position** & **Velocity** & **Position** & **Velocity** \\  & **1\(\times\)10\({}^{-3}\) (rad)** & **1\(\times\)10\({}^{-3}\) (rad/s)** & **1\(\times\)10\({}^{-3}\) (rad)** & **1\(\times\)10\({}^{-3}\) (rad/s)** \\ \hline PID & 26.600 & 110.200 & 6.400 & 52.700 \\ NFTSMC & 1.900 & 81.100 & 7.800 & 54.300 \\ NFTSMC+TDE & 2.200 & 107.900 & 15.500 & 56.800 \\ Proposed & 1.200 & 82.600 & 3.800 & 53.800 \\ \hline \hline \end{tabular}
\end{table}
Table 3: RMSE of tracking results for aperiodic trajectories.  
We further discussed the weight variances for the periodic and aperiodic trajectories. Figure 17 presents the weight change; the results can be seen in Figure 17a. Since the periodic trajectory is easier to track, thus, the weight changes are minor. The magnitude of the weight changes is about around \(1\times 10^{-5}\), which is presented in Figure 17b. Conversely, the aperiodic trajectory has a more significant vibration in the weight changes of Figure 17a,b because it is not easy to track. The results of weight changes can help us understand why the tracking performances of the two trajectories are different.