## 4 Simulations
### Simulation Results  
#### 4.2.1 Tracking Periodic Trajectories  
In the simulations, we assumed that the robotic manipulator would be performing repetitive tasks; i.e., tracking periodic trajectories. Figure 9 presents the position tracking performance for joint 1. Note that in Figure 9, the PID controller clearly underperformed the other controllers. The reason is that the PID cannot handle the nonlinear model well. Figure 9 presents a partial enlargement of Figure 9 near \(t=6.59\) s. We can see that NFTSMC and NFTSMC+TDE poorly dealt with disturbances that occurred at the points of position tracking, where the corresponding disturbances were mainly caused by backlash and friction. In contrast, the proposed controller handled these two disturbances very well; thus, the result clearly outperformed the other controllers. Figure 10 presents the position tracking performance for joint 2. Note that we obtain similar results in the use of different controllers. Figure 10 presents a partial enlargement of Figure 10 near \(t=4.92\) s, from which we can see that the proposed controller is still relatively the best among the four controllers.  
Figure 8: **(a)** Position and velocity following the trajectory of joint 1. **(b)** Position and velocity following the trajectory of joint 2.  
Since this simulation uses the differential method to obtain the velocity value of the system, we consider that this method will amplify the noise. Therefore, a simple first-order low-pass filter is used with a time constant of 0.2 for all controllers' velocity signals in order to obtain more realistic velocity tracking results. Figures 11 and 12 present the velocity tracking performance for joints 1 and 2. Overall, the proposed system was far less effective in controlling velocity than in controlling position. The reason for this phenomenon is that the velocity signal is delayed after the low-pass filter, but it can filter most of the noise caused by the differential methods so that we can compare the tracking results of each controller more clearly. Nonetheless, we can see in Figures 11 and 12 that the proposed controller outperformed the other controllers in controlling the velocity of joint 1.  
Figure 10: (**a**) Position tracking of joint 2. (**b**) Partial enlargement of (**a**).  
Figure 9: (**a**) Position tracking of joint 1. (**b**) Partial enlargement of (**a**).  
In order to show the tracking situation of the four controllers more intuitively, the root mean square error (RMSE) of the four controllers in tracking periodic trajectories is calculated, and the results are shown in Table 2. We can see that the RMSE results of the proposed controller are the best. The values of position tracking RMSE for the proposed controller joints 1 and 2 are 0.080 \(\times\) 10\({}^{-4}\) rad and 0.214 \(\times\) 10\({}^{-4}\) rad, respectively. In terms of velocity tracking, although affected by noise, the proposed controller still has pretty good performances, proving the proposed controller's effectiveness and superiority in tracking periodic trajectories.  
\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** \\  & \(\mathbf{1\times 10^{-4}}\) **(rad)** & \(\mathbf{1\times 10^{-4}}\) **(rad/s)** & \(\mathbf{1\times 10^{-4}}\) **(rad)** & \(\mathbf{1\times 10^{-4}}\) **(rad/s)** \\ \hline PID & 282.000 & 1143.000 & 59.000 & 730.000 \\ NFTSMC & 15.000 & 694.000 & 65.000 & 717.000 \\ NFTSMC+TDE & 2.716 & 676.000 & 3.892 & 693.000 \\ Proposed & 0.080 & 674.000 & 0.214 & 692.000 \\ \hline \hline \end{tabular}
\end{table}
Table 2: RMSE of tracking results for periodic trajectories.  
Figure 11: (a) Velocity tracking of joint 1. (b) Partial enlargement of (a).  
Figure 12: (a) Velocity tracking of joint 2. (b) Partial enlargement of (a).