## 2 Design of PCB-ILCC  
Three paths are considered in thread milling operations, including the helical, command, and response paths, as shown in Figure 1. Here, the helical path denotes the path formed by the thread contour to be machined, the command path represents the path referenced by the feed drive axes, and the response path denotes the path produced by the feed drive axes. For thread milling operations, the feed drive axes perform synchronous motions for the given command path so that a thread milling tool can move along the response path for thread cutting. Conventionally, the command path is given as the helical path, and the feed drive axes are  
memories to record a large amount of collected data and take longer data processing and computing time. Therefore, ILCC methods are usually difficult to implement on compact controllers with a limited number of memories and computation speed. Furthermore, ILCC methods could produce a few defective products before achieving convergence, increasing manufacturing costs.  
Since a helical path is composed of multiple pitch cycles, and feed drive axes generally possess similar external disturbances and motion dynamics during pitch cycle motions, the PCB-ILCC developed in this study applies the ILCC to the pitch cycles so that the contour error of the previous pitch cycle \(\varepsilon_{j-1}\) can be considered with the previous command cycle P\({}_{j-1}\) to modify the current command cycle P\({}_{j}\) through the iterative learning contour controller, as shown in Figure 3. Compared with the conventional ILCC structure shown in Figure 2, the helical path H must be segmented to obtain the helical cycle H\({}_{j}\) and the response path is naturally amalgamated by the response cycle R\({}_{j}\) through the motions of the feed drive axes. In addition, the operation of the pitch increment is required in the segmentation process and iterative learning contour controller to make the thread milling operation move from the current pitch cycle to the next pitch cycle. The contour error of the \((j)\)th pitch cycle \(\varepsilon_{j}\) was calculated by referring to the \((j)\)th helical cycle H\({}_{j}\) and the \((j)\)th response cycle R\({}_{j}\). Both the contour error \(\varepsilon_{j}\) and command cycle P\({}_{j}\) were recorded in different memories for the modification of the next command cycle. Therefore, the PCB-ILCC can gradually improve the accuracy of helical motions pitch by pitch and mitigate the problems of applying conventional ILCC methods to thread milling operations. Nevertheless, as indicated by Figure 3, some issues must be carefully considered in this study when applying the PCB-ILCC in practice, including the estimation of the CEV (adopted in the contour error calculation to approximately calculate the contour error of each pitch cycle), the design of the ILCC (adopted in the iterative learning contour  
Figure 1: Relationship between helical path, command path, and response path.  
Figure 2: Control structure of ILCC methods applying to thread milling operations.  
controller to gradually reduce the contour errors of the pitch cycles), and the design of the PMSM driving control (adopted in the feed drive axes to actuate the feed drive axes with a stable and improved motion performance).