# Research on Multiple-Axis Contour Error Suppression Method Based on Composite Layered Control
## 3 Design of Composite Layered Cross-Coupling Controller
### Experimental Verification of Cross-Coupling Controller Based on Composite Layering  
Figure 25 depicts an open-architecture multi-axis optical polishing machine used to validate the effectiveness of the proposed methods in this paper. By combining different feed commands for different axes, the grinding head can be polished in three-dimensional space to achieve material removal in specific areas on the component. The process begins with the acquisition of machining instructions through the Processing Guidance software (PGS. V12.1). PGS is a machining guidance software that predicts the areas that need to be machined based on different initial surface shapes and generates corresponding G-codes for each axis for machining. Subsequently, these instructions are translated into G-code and transmitted to the PC of the machine. The next step involves the integration of the methods proposed in this paper into the motion control system, which is then subjected to motion control experiments for validation. The feed of each axis's movement of the machine is driven by a SIMOTION D445-2 controller. The position feedback signal for the translation axis is directly obtained from a linear optical encoder with a resolution of 500\(\times\)256 pulses per revolution. Leveraging differentiation calculations, the actual velocity of each axis is determined, which is followed by further processing through a low-pass filter to eliminate high-frequency noise. Figure 24: Space elliptic curve tracking. Figure 25: Experimental verification platform. This experimental platform adopts a modular design method to achieve communication and control between the various functional units of the CNC system and has good scalability. The experimental platform system includes three parts, as shown in Figure 25: an 840D motion controller, an electrical drive control system, and a three-axis linkage CNC machine tool body. According to the system structure diagram shown in Figure 6, based on building a single-axis sliding-mode disturbance observer, the designed fuzzy PID cross-coupling controller was added to the composite layered contour control system, and the effectiveness of the fuzzy-PID-based cross-coupling control was compared and analyzed against traditional PID cross-coupling control. In addition, the trial and error method was used to obtain the fixed values of the traditional PID controller parameters \(K_{p}=7.6\), \(K_{i}=1.5\), and \(K_{d}=1\), while the self-tuning curve of the fuzzy PID control parameters is shown in Figure 26.  
Figures 27 and 28 present the comparative curves for the XY plane contour error and the three-dimensional spatial contour, respectively, considering the adoption of hierarchical control. The blue line represents the reference contour, the orange line depicts the XY plane contour based on the composite hierarchical control, and the yellow line corresponds to the contour under conventional PID cross-coupling control. By comparing the real-time data from the machine tool with the data of the ideal input curve, the maximum value (max) and minimum value (min) between the two can be obtained. By calculating \(MEAN=\sum\limits_{i=1}^{j}(\max_{i}-\min_{i})/j\), the average error of the tracking curve can be derived, where \(i\) is the current data point, and \(j\) is the total number of data points. Further computation leads to the calculation of the integrated absolute error (IAE) according to the following equation: \(IAE=\sum\limits_{i=1}^{j}(|P_{i}-R_{i}|)\), where \(P_{i}\) is the predicted value of the current data point, and \(R_{i}\) is the actual value of the current data point. For both scenarios, the maximum, average, and root mean square values of the tracking error and contour error are detailed in Tables 4 and 5.