# Hybrid Optimization Method for Correcting Synchronization Errors in Tapping Center Machines
## 4 Experimental Planning and Methods
The rigid tapping command for the FANUC 31 iMA controller used in the experiments was as follows:  
M29 S_;  
G84 X_Y_Z_R_F_K_;  
where  
M29 is the rigid tapping command,  
S is the spindle speed, G84 is the right-hand thread tapping by M3 spindle rotation,  
X, Y are the hole positions in the X- and Y-axes,  
Figure 4: Flowchart of the experimental procedure. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & \(x_{1}\) & \(x_{2}\) & \(x_{3}\) & \(x_{4}\) & \(x_{5}\) & \(x_{6}\) \\ \cline{2-7}
**Level** & **Velocity Feed** & **Proportional Gain of** & **Delay Time** & **Integral Gain of** & **Advanced** & **Position Gain of** \\  & **Forward** & **Velocity Loop for** & **for Motor** & **Velocity Loop for** & **Feed** & **Servo Axis for** \\  & **Coefficient** & **Spindle in Servo Mode** & **Excitation** & **Spindle in Servo Mode** & **Forward** & **Rigid Tap** \\ \hline
1 & 30 & 23 & 200 & 100 & 2500 & 3455 \\
2 & 47  
Table 8 presents the results obtained by the \(U\)_1*\({}_{28}\)(28\({}^{6}\)) uniform layout. Based on the regression analysis results and the experimental results in Table 8, the following regression equation was obtained:  
\[ \begin{array}{c}y=180.116319-3.143699x_{2}-0.023775x_{6}+0.008271x_{2}x_{3}+0.00 0115x_{4}x_{5}+0.000450x_{2}x_{6}+2.93\times 10^{-6}\\ x_{5}x_{6}-4.18\times 10^{-7}\ x_{3}x_{4}x_{5}-6.61\times 10^{-8}\ x_{2}x_{5}x_{6} \end{array}  \tag{9}\]  
According to Equation (9), the key factors in synchronization error in rigid tapping are \(x_{2}\) (rigid tapping speed loop proportional gain), \(x_{3}\) (motor excitation delay time), \(x_{4}\) (rigid tapping speed loop integral gain), \(x_{5}\) (position feed coefficient) and \(x_{6}\) (tapping axis position gain). Next, FPSO was used to find the global best combination of values for factors \(x_{2}\), \(x_{3}\), \(x_{4}\), \(x_{5}\), and \(x_{6}\) and to find the global best output value. According to the FPSO results, the global best combination was (\(x_{2}\), \(x_{3}\), \(x_{4}\), \(x_{5}\), \(x_{6}\)) = (50, 360, 260, 9400, 9400), and the global best output value was 39.9329. Next, the Taguchi method was used to verify the global best combination obtained by UD and FPSO. Table 9 is the \(L^{\prime}\)_16(4\({}^{5}\)) orthogonal array selected for this number of factors. Here, the levels of the \(L^{\prime}\)_16(4\({}^{5}\)) orthogonal array were based on the global best combination obtained by UD and FPSO. Table 10 shows the values for \(x_{2}\), \(x_{3}\), \(x_{4}\), \(x_{5}\), and \(x_{6}\), and Table 11 shows the factor combinations of \(L^{\prime}\)_16(4\({}^{5}\)). The values in Table 11 were used to obtain the results shown in Table 12. Table 13 and Figure 5 are the response table and figure, respectively, which show that the best combination of values for \(x_{2}\), \(x_{3}\  
\begin{table}
\begin{tabular}{c c c c c c c c c c c c c} \hline \hline \multirow{2}{*}{**No. **} & \multicolumn{4}{c}{**Factors**} & \multicolumn{4}{c}{**Results**} & \multirow{2}{*}{**Avg. 1**} & \multirow{2}{*}{**RMSD 2**} & \multirow{2}{*}{**H 3**} \\ \cline{2-2} \cline{6  
The outer diameter (D1) and inner diameter (D2) of the thread were measured, and the difference between D1 and D2 was obtained. Table 14 shows that a significant difference between D1 and D2 indicated that the screw teeth were well-shaped and that the potential for tooth collapse was minimal. Conversely, a slight difference indicated poorly-shaped screw teeth and a high potential for tooth collapse. Screw thread pitch was also measured to determine whether disordered teeth had caused an excessive error during the same period. Table 14 shows that the proposed method obtained superior tapping results compared to the results obtained without optimizing rigid tapping electrical control parameters.