# 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  
In multi-axis servo feed systems, due to the increased complexity, nonlinearity, and coupling effects of the controlled objects, the parameters of conventional PID controllers cannot be adjusted in a timely manner. In contrast, fuzzy PID control transforms empirical knowledge into control strategies, enabling prompt adjustments of the PID parameters with changing errors, thereby effectively managing errors in intricate systems. A fuzzy PID controller combines the advantages of conventional PID control and fuzzy control, making it suitable for addressing the issue of dynamic mismatch among axes in multi-axis coordinated machining processes. Consequently, in both upper and lower contour error models, this study employs a design featuring fuzzy-PID-based cross-coupling controllers. **Step 1:** Take the error \(e\) and the error change rate \(\dot{e}\) as the input of the fuzzy controller, take the PID controller parameters \(K_{i}\), \(K_{p}\), and \(K_{d}\) as the output, and set the fuzzy subset of the input and output of the fuzzy controller as \(\{NL,NM,NS,ZO,PS,PM,PL\}\), where the elements represent negative large, negative middle, negative small, zero, positive small, positive middle, and positive large, respectively. In the membership function editor of the fuzzy logic toolbox, membership functions are established for each fuzzy language variable, as shown in Figure 11.  
**Step 2:** Summarize the technical knowledge and experience of the engineering designers and consider the system stability, response speed, overshoot, and steady-state accuracy. The specific plan is as follows:  
1. When the error \(|e|\) is large, regardless of the trend in the error variation, a larger value of \(K_{p}\) should be employed to enhance the response speed. To prevent an instantaneous overshoot \(|ec|\) from becoming too large, a smaller value for \(K_{d}\) should be chosen. Considering the magnitude of the overshoot, a smaller value for \(K_{i}\) should also be selected. 2. When the error \(|e|\) is moderate, to balance the system response speed and control overshoot, relatively smaller values of \(K_{p}\) and \(K_{i}\) should be chosen while keeping \(K_{d}\) at a moderately selected value. 3. When the error \(|e|\) is relatively small, to maintain good steady-state characteristics, larger values of \(K_{p}\) and \(K_{i}\) should be applied. Simultaneously, to avoid oscillations, the value of \(K_{d}\) should closely correlate with the value of \(|ec|\). The setting of parameters \(K_{p}\), \(K_{i}\), and \(K_{d}\) should follow the following rules to establish a fuzzy control rule table [38], as shown in Table 1. The corresponding output surfaces of \(K_{p}\), \(K_{i}\), and \(K_{d}\) on the universe are shown in Figure 12. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**EC** & & & & & & & \\
**Kp/Ki/Kd** & **NL** & **NM** & **NS** & **ZO** & **PS** & **PM** & **PL** \\
**E** & & & & & & & & \\ \hline NL & PL/PL/PL & PL/PL/PL & PL/PL/PL & PL/PL/NL & PS/NS/NL & ZO/NM/NM & NS/NL/NS \\ \hline NM & PL/PL/PL & PL/PL/PL & PM/PM/PM & PM/PM/NM & ZO/NM/ZO & NS/NL/PS & NM/NL/PM \\ \hline NS & PL/PL/PS & PM/PM/PM & PM/PS/PL & NS/PS/PL & PM/NL/PL & PL/NL/PM & PL/NL/PS \\ \hline ZO & ZO/ZO/ZO & ZO/ZO/ZO & ZO/ZO/ZO & ZO/ZO/ZO & ZO/ZO/ZO & ZO/ZO/ZO & ZO/ZO/ZO & ZO/ZO/ZO \\ \hline PS & NB/NL/PL & NM/NL/PL & NS/NL/PM & PS/PS/NS & PM/PS/PM & PM/PM/PM & PL/PL/PL \\ \hline PM & NL/ZO/PM & NL/PS/PS & ZO/NM/ZO & PM/PM/NM & PL/PM/PM & PL/PL/PL & PL/PL/PL \\ \hline PL & NS/NB/NS & ZO/NM/NM & PS/NS/NB & PL/PL/NB & PL/PL/PL & PL/PL/PL & PL/PL/PL \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Fuzzy control rule table of \(K_{p}\), \(K_{i}\), and \(K_{d}\). Figure 11: The membership function of each fuzzy language variable. Figure 12: Output surface of \(K_{p}\), \(K_{i}\), and \(K_{d}\).