## 6 Simulation Results
### Simulation of the Fuzzy Controller  
Depending on the given data of the kinematic, dynamic, etc., parameters, the physical value domain of input and output terms of the fuzzy controller are estimated as shown in Table 6.  
Figure 11: The errors of the joint positions of the PD1, PD2 controllers.  
Figure 12: The errors of the cutting trajectory with respect to the set one are the toolpaths of the PD1, PD2 controllers.  
Figure 13 is the graph representing the comparison of joint position errors of the robot between the fuzzy controller and the two cases of the Inverse Dynamics + PD controller.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Link** & \(\mathbf{e_{i}}\) & \(\dot{\mathbf{e_{i}}}\) & \(\mathbf{u_{i}}\) \\ \hline
1 & [\(-\)0.001,0.001] (rad) & [\(-\)0.5,0.5] (rad/s) & [\(-\)18,000,18,000] (Nm) \\ \hline
2 & [\(-\)0.001,0.001] (rad) & [\(-\)2.4,2.4] (rad/s) & [\(-\)4,000,44,000] (Nm) \\ \hline
3 & [\(-\)0.006,0.006] (rad) & [\(-\)2.5,2.5] (rad/s) & [\(-\)42,000,42,000] (Nm) \\ \hline
4 & [\(-\)0.009,0.009] (rad) & [\(-\)12.0,12.0] (rad/s) & [\(-\)18,000,18,000] (Nm) \\ \hline
5 & [\(-\)0.008,0.008] (rad) & [\(-\)7.0,7.0] (rad/s) & [\(-\)9800,9800] (Nm) \\ \hline
6 & [\(-\)0.008,0.008] (rad) & [\(-\)10.0,10.0] (rad/s) & [\(-\)5200,5200] (Nm) \\ \hline
7 & [\(-\)0.001,0.001] (m) & [\(-\)0.2,0.2] (m/s) & [\(-\)4700,4700] (N) \\ \hline
8 & [\(-\)0.001,0.001] (m) & [\(-\)0.5,0.5] (m/s) & [\(-\)3100,3100] (N) \\ \hline \hline \end{tabular}
\end{table}
Table 6: The physical value domain of input and output quantities of the fuzzy controller.  
Figure 13: The joint position errors of the PD1, PD2, fuzzy controllers.  
Figure 14 shows the trajectory error of the cutting point of the tool in the operational frame \(\mathrm{O_{d}x_{d}y_{d}z_{d}}\), with the lines representing the error of the fuzzy controller, and the two cases of Inverse Dynamics + PD controller.  
One can see that the joint position errors of the fuzzy controller are smaller than that of the PD1 and PD2 controllers.  
Figure 15a shows the trajectory of the cutting point of the tool in the operational frame. Due to small errors, the desired and actual trajectories of the fuzzy controller and Inverse Dynamics + PD controller are approximately coinciding.  
To verify the adjustment capability of the fuzzy controller, the simulation of the fuzzy controller is performed by the initial value of the trajectory as a deviation of the desired values.  
Figure 15b shows the asymptotical and convergent process of the trajectory of the cutting point from the initial deviation to coincide with the toolpath (desired trajectory) in the milling process.  
Figure 16 shows the simulation result of the fuzzy controller with initial trajectory error, time history of the joint positions, with the splines that represent the desired, actual trajectories and errors.  
From the results, it can be seen that the fuzzy controller is able to control the system to the required state when there are perturbations.  
In general, the simulated results show that with the assumption of ideal computed cutting forces, the Inverse Dynamics + PD explicit controller and fuzzy controller give accurate control results.  
Figure 14: The errors of the cutting trajectory with respect to the set one are the toolpaths of the PD1, PD2, FZ controllers.  
Figure 15: The trajectory of the cutting point with respect to the operational frame. (**a**)- when there is no initial deviation; (**b**)- there is initial deviation.