## 3 CEV Estimation and ILCC Design
\(K(s)=\mathit{diag}\Big{(}\left.K_{m}(s)\right|_{m=x,y,z}\Big{)}\) is a diagonal matrix, and the diagonal entries \(K_{x}(s)\), \(K_{y}(s)\), and \(K_{z}(s)\), respectively, denote the transfer functions of the iterative learning contour controllers for the feed drive axes \(X\), \(Y\), and \(Z\). Because \(\mathrm{H_{j}=H_{j-1}+Z_{L}\), \(\mathrm{R_{j}=G(s)\ P_{j}}}\), the contour error \(\varepsilon_{j}\) shown in Equation (7) can be rewritten as Equation (9) by substituting Equation (8) to Equation (7):  
Figure 4:1  
where \(G(s)\) denotes the transfer function matrix of the feed drive axes. \(G(s)=\mathit{diag}\Big{(}\left.G_{m}(s)\right|_{m=x,y,z}\Big{)}\) is a diagonal matrix, and the diagonal entries \(G_{x}(s)\), \(G_{y}(s)\), and \(G_{z}(s)\) denote the transfer functions of the feed drive axes \(X\), \(Y\), and \(Z\), respectively. Because \(\mathrm{R_{j-1}=G(s)\ P_{j-1}\) and \(Z_{L}=G(s)\ Z_{L}\) are at a steady state, Equation (9) can be further rewritten as Equations (10) and (11):  
Figure 4:2  
Figure 4:3Accordingly, from Equation (11), the iterative equation of the contour error \(\varepsilon_{j}\) can be obtained as Equation (12):  
Figure 4:4  
where \(I\) denotes the identity matrix. Therefore, for each feed drive axis, the relationship between the contour error components in cycles \((j)\) and \((j-1)\) can be represented as Equation (13):  
Figure 4:5  
where \(\varepsilon_{j,x}\), \(\varepsilon_{j,y}\), and \(\varepsilon_{j,z}\) are the axial components of the contour error \(\varepsilon_{j}\) on the \(X\)-axis, \(Y\)-axis, and \(Z\)-axis, respectively. According to Equation (13), for the cycle learning method presented in Equation (8) to achieve convergence, the inequality shown in Equation (14) must be satisfied:  
Figure 4:6  
where \(\|\cdot\|_{\infty}\) denotes the infinity norm. Figure 5 shows the PCB-ILCC structure in detail using the cycle learning method; here, the operation of the PCB-ILCC illustrated in Figure 5 can be described as the following steps:  
* Step 1: compute the command cycle \(\mathrm{P}_{j}\) by combining the recorded command cycle \(\mathrm{P}_{j-1}\), the filtered contour error \(K(s)\)\(\varepsilon_{j-1}\), and the pitch increment \(Z_{L}\); here, the command cycle \(\mathrm{P}_{j}\) must also be recorded to memory. * Step 2: feed drive axes perform motions with the command cycle \(\mathrm{P}_{j}\) so that the response cycle \(\mathrm{R}_{j}\) can be obtained from the motion results. * Step 3: calculate the contour error \(\varepsilon_{j}\) by using the contour error calculation function \(\mathit{cterr}(\ \cdot\ )\), the helical cycle \(\mathrm{H}_{j}\), and the response cycle \(\mathrm{R}_{j}\); here, the contour error \(\varepsilon_{j}\) must also be recorded to memory. * Step 4: if the \((j)\)th pitch cycle is not the last cycle, the PCB-ILCC increases the cycle number and then moves to Step 1. In Figure 5, the pitch cycle number \((j)\) is increased from \((j=1)\) (the first cycle); moreover, for \((j=1)\), the command cycle \(\mathrm{P}_{1}=\mathrm{H}_{1}\), and the recorded command cycle \(\mathrm{P}_{0}\) and the recorded contour error \(\varepsilon_{0}\) are both set to be zeros. A conventional proportional-integral controller was employed in this study as the iterative learning contour controller. The proportional and integral control gains were tuned manually according to the influence of the proportional control gain on the rate of convergence and the influence of the integral control gain on the converged contour error. Moreover, the control gains must be tuned to satisfy the inequality shown in Equation (14) to achieve convergence. Figure 4:7 Detailed PCB-ILCC structure developed in this study.