## 2 Relation between Tool Position Data and Machine Tool Axis Displacement
### Kinematic Modeling of Machine Tool  
Machine tools with this type of structure exhibit many different types according to the order of translation of their worktable. The structure of the moving chain is shown in Figure 3. The motion of the X, Y, Z axes between the B-axis and A-axis, based on \begin{table}
\begin{tabular}{c c} \hline \hline
**Item** & **Parameter** \\ \hline Spindle maximum speed & 12,000 r/min \\ Spindle rated speed & 8000 r/min \\ Axis travel of X, Y, and Z & 1000/600/500 mm \\ B, A axis angle range & \(\pm\)90\({}^{\circ}\)/\(\pm\)360\({}^{\circ}\) \\ Fast moving speed of X, Y, and Z axes & 24 m/min \\ Numerical control system & Sinumerik 828D \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Main parameters of machine tool. Figure 1: The schematic diagram of the tool path. Figure 2: A typical five-axis CNC milling machine with a swinging head and a rotation table. mathematical knowledge of translation and the translation matrix, is independent of the sequence. As a result, the motion modeling of the machine tool can be classified as the following process. Then, 'A' is the A-axis (rotation on the X-axis), and 'B' is the B-axis (rotation on the Y-axis). 'A' is the workpiece rotation axis, and 'B' is the tool rotation axis. In order to depict the kinematic correlation between the tool data and the NC machine tool axes, the coordinate system shown in Figure 4 is established. In this system, O\({}_{w}\)X\({}_{w}\)Y\({}_{w}\)Z\({}_{w}\) denotes the work coordinate system, which serves as the reference frame for the data in the location source file. O\({}_{l}\)X\({}_{l}\)Y\({}_{l}\)Z\({}_{t}\) represents the tool coordinate system, where the coordinate origin coincides with the location of the tool itself. Similarly, O\({}_{b}\)X\({}_{b}\)Y\({}_{b}\)Z\({}_{b}\) pertains to the B-axis coordinate system, where the coordinate origin is situated at the intersection of the tool axis and the B-axis. O\({}_{a}\)X\({}_{a}\)Y\({}_{a}\)Z\({}_{a}\) denotes the A-axis coordinate system, where the coordinate origin can be any point along the A-axis. Moreover, L represents the distance between the center of the tool and the center of rotation of the B-axis. The process of solving the displacement of the machine tool axis is the process of decomposing the relative motion between them into each axis using a relational equation. Given that the X, Y, and Z axes translate in space between the B and A axes, and that the principles of mathematics demonstrate the sequence independence of translation and the translation matrix, The modeling of machine tool motion can be categorized into the following process. As depicted in Figure 4, the machine tool in its initial state features a tool axis that is parallel to the Z axis. The machine tool coordinate system and the workpiece coordinate system are aligned with each other, with the coordinate origin of the tool coordinate system coinciding with that of the workpiece coordinate system. After undergoing a coordinate  
Figure 4: Coordinate system of the A\({}^{\prime}\)-B machine tool. Figure 3: Kinematic chain of the A\({}^{\prime}\)-B machine tool. transformation, the tool position data can be related to the movement of the machine tool axes in the following manner. \[[i,j,k,0]^{T}=T(r_{m1})\cdot R_{X}(-\theta_{A})\cdot T(r_{s}-r_{m1}+r_{m2})\cdot R _{Y}(\theta_{B})\cdot T(-r_{m2})\cdot[0,0,1,0]^{T} \tag{1}\]  
\[[x,y,z,0]^{T}=T(r_{m1})\cdot R_{X}(-\theta_{A})\cdot T(r_{s}-r_{m1}+r_{m2})\cdot R _{Y}(\theta_{B})\cdot T(-r_{m2})\cdot[0,0,0,1]^{T} \tag{2}\]  
In Equations (1) and (2), \(T\) and \(R\) signify, respectively, the homogeneous coordinate transformation matrices for translational and rotational motion, which are commonly used in computer graphics. \[T(r_{m1})= \begin{bmatrix}1&0&0&m_{x}\\ 0&1&0&m_{y}\\ 0&0&1&m_{z}\\ 0&0&0&1\end{bmatrix} \]  
\[T(r_{s}-r_{m1}+r_{m2})= \begin{bmatrix}1&0&0&X-m_{x}\\ 0&1&0&Y-m_{y}\\ 0&0&1&Z-m_{z}+L\\ 0&0&0&1\end{bmatrix} \]  
\[T(-r_{m2})= \begin{bmatrix}1&0&0&0\\ 0&1&0&0\\ 0&0&1&-L\\ 0&0&0&1\end{bmatrix} \]  
\[R_{X}(-\theta_{A})=