## 3 Four-Axis Machining Strategy of Five-Axis Machine Tool
### Interpolation Detection
Firstly, the direction vector of the interpolated straight line L(t) is \(\overset{\rightarrow}{a}\). Subsequently, the distance between any point on Q(t) and L(t) can be determined by Equation (20). \[\varepsilon(t)=\frac{\left|\overset{\rightarrow}{a}\times A\overset{ \rightarrow}{C_{1}}\right|}{\left|\overset{\rightarrow}{a}\right|} \tag{20}\]  
The location of the maximum nonlinear error usually occurs near the midpoint of two adjacent tool path interpolation segments. After considering the impact of tool radius and corner changes on nonlinear errors, point D was established as the contact point of the tool. The connection between tool contacts is parallel to plane \(XOY\), with point O being the center point of the tool. Additionally, angle \(A\) moves from angle \(A_{0}\) to \(A_{1}\). As a result of the orthogonal design of the five-axis CNC machine, the movement of its two rotating axes can be considered relatively independent. By calculating the nonlinear errors produced by each rotating shaft in their respective moving planes, the nonlinear error of the whole five-axis NC machine is obtained. The nonlinear error caused by the motion change of the \(A\) axis on the plane \(YOZ\) is analyzed here as an example. The M\({}_{0}\) coordinates of the tool center point of the tool site M are (\(Y_{m}\), \(Z_{m}\)), and the N\({}_{0}\) coordinates of the tool center point of the tool site N are (\(Y_{n}\), \(Z_{n}\)). The coordinates of the tool contact D1 are (\(Y_{d1}\), \(Z_{d1}\)), and the coordinates of the tool contact D2 are (\(Y_{d2}\), \(Z_{d2}\)). The linear equation of the line between M and N of the center of the tool is as follows:  
\[Z_{0}=(Y_{0}-Y_{m})\frac{Z_{n}-Z_{m}}{Y_{n}-Y_{m}}+Z_{m} \tag{21}\]  
By examining the relationship between the position of the tool contact and the point of the tool center, the linear equation of the contact line be obtained. Given that many current  
Figure 8: Description of the nonlinear error. CNC systems utilize linear interpolation, the rotation of the \(A\) angle also follows a linear progression, and the equation regarding the angle of the A axis can be obtained. \[A=(Y_{0}-Y_{m})\frac{A_{1}-A_{0}}{Y_{n}-Y_{m}}+A_{0} \tag{22}\]  
The Z component of the tool contact is obtained using Equations (21) and (22). \[Z=Z_{0}-r\times\sin(A) \tag{23}\]  
Equation (23) takes the tool radius \(r\) into account. Consequently, the following equation is derived for the deviation of Z.  
\[\frac{d_{z}^{2}}{d_{y}^{2}}=r\bigg{(}\frac{A_{1}-A_{0}}{Y_{n}-Y_{m}}\bigg{)}^{2 }\sin A \tag{24}\]  
When Equation (24) is equal to zero, It can be assumed that changes in the program's angle are typically small. As a result, we can derive Equations (25) and (26). \[\cos A\approx\cos(\frac{A_{0}+A_{1}}{2}) \tag{25}\]  
\[\varepsilon_{Amax}\approx\frac{r(A_{1}-A_{0})^{2}\Big{|}\sin\frac{(A_{1}+A_{0 })}{2}\Big{|}}{8}\leq\frac{r(A_{1}-A_{0})^{2}}{8}=r(\Delta A)^{2}/8 \tag{26}\]  
The maximum nonlinear error caused by the B axis in the same way is \(\varepsilon_{bmax}=r(\Delta B)^{2}/8\). As the A and B axes are orthogonal and the maximum nonlinear errors typically appears at the midpoint of program segments, the maximum nonlinear error of the machine tool will occur at the midpoint of the program segment. Furthermore, the maximum nonlinear error equation of machine tool can be approximately obtained, using Equation (27). The r is tool radius. The \(\Delta\)A is the angle variables of the A axis of adjacent points. The \(\Delta\)B is the angle variables of the B axis of adjacent points. \[\varepsilon_{max}\approx\sqrt{\varepsilon_{max}{}^{2}+\varepsilon_{bmax}{}^{2}} =r\sqrt{\bigg{(}\Delta A^{4}+\Delta B^{4}\bigg{)}}/8 \tag{27}\]  
The maximum nonlinear error \(\varepsilon_{1 max}\) between the five-axis points M and N before interpolation is \(r\sqrt{\bigg{(}\Delta A^{4}+\Delta B^{4}\bigg{)}}/8\). The maximum nonlinear error \(\varepsilon_{2 max}\) between the tool path point M and the interpolation point C\({}_{11}\) after interpolation is \(r\sqrt{\bigg{(}\frac{1}{2}\Delta A\bigg{)}^{4}}/8\).