# Research on Multiple-Axis Contour Error Suppression Method Based on Composite Layered Control
## 3 Design of Composite Layered Cross-Coupling Controller
### Design of Fuzzy-PID-Based Cross-Coupling Controller
The research outcomes manifest that the sliding-mode controller based on the improved S-type function (SMC-ISF) yielded a conspicuous superiority in terms of diminishing position tracking errors, accelerating the convergence velocity of position tracking errors, and damping oscillations. This superiority surpassed that of the conventional constant-speed convergence laws and non-singular modified reference line (NSMRL) methods. Consequently, the proposed SMC-ISF approach in this paper exhibited a significant advantage in achieving a faster convergence and a more stable controller output. Building upon the design of the SMC-ISF controller, the incorporation of the disturbance observer, as devised in Section 2.3, was further integrated. This integration aims to estimate and compensate for external disturbances within the sliding-mode control framework. The intention of this step is to address the limitation of the SMC-ISF design in accommodating external disturbances. Given the relatively minor fluctuation in the Z-axis during the entirety of the experimental process, the X and Y axes, representing axes with larger ranges of motion, were selected for the algorithm verification. Single-axis tracking performance tests were conducted for both axes, considering scenarios both with and without the inclusion of the disturbance observer. As evidenced by the simulation results depicted in Figures 16-23, Figures 16 and 20 illustrate the tracking performance of the X and Y axes in the absence of the disturbance observer. Under the circumstance of external disturbances, the SMC-ISF controller exhibited distinct fluctuations without any observable diminishing trend. Evidently, the SMC-ISF controller manifested a deficiency in mitigating external disturbances. However, upon the integration of the designed disturbance observer, the positional tracking oscillations were substantially mitigated, as shown in Figures 17 and 21. Furthermore, Figures 18 and 22 clearly demonstrate that the proposed external disturbance observer effectively estimated external perturbations. Conclusively, Figures 19 and 23 confirmed that the introduction of the disturbance observer addressed the deficiency of the SMC-ISF controller in resisting external disturbances. The synergistic utilization of these methodologies engenders smoother unidirectional motion during practical machining operations, thereby establishing a favorable foundation for the subsequent machining experiments. After simulating the single-axis tracking error as described above, the validation confirmed that the method proposed in this paper effectively reduced the impact of external disturbances on the accuracy of the single-axis tracking. Next, a comparison will be made between the method proposed in this paper and the approaches presented in reference [34] and reference [35] regarding their performance in terms of tracking spatial profiles. The chosen validation for this section was a spatial elliptical curve, whose detailed parameters are outlined in Table 3.  
Figure 15: Controller output curve. Figure 16: Tracking curve of X-axis SMC-ISF without disturbance observation. Figure 17: Tracking curve of X-axis SMC-ISF with disturbance observation. Figure 18: Disturbance estimation curve of X-axis. Figure 19: Tracking error curve of X-axis with SMC-ISF and disturbance observation. Figure 20: Tracking curve of Y-axis SMC-ISF without disturbance observation. The simulation time was 5 s, ensuring that the simulation curve could display multiple spatial ellipses. The parameters of the single-axis controller were the same as those in Section 4.1. The fuzzy PID parameters in the composite layered controller were adjusted by fuzzy rules, and the proportional controller parameter value was 2.3, which needed to be adjusted according to different spatial curves. From Figure 24, it can be seen that due to the system state being set to [\(-2\), \(-2\), \(-2\)], the three methods in the simulation needed to start converging from a distance from the reference curve.