A data-driven high-precision modeling method of machine tool spatial error under the in�uence of Abbe error

: Due to the complex mechanism of the influence of Abbe error on spatial accuracy, the Abbe error accumulated in the traditional spatial accuracy model is hard to be identified and cannot be eliminated, which affects the modeling accuracy and restricts the effect of accuracy improvement. This paper presents a data - driven spatial accuracy modeling method for machine tool under the influence of Abbe error, using a three - axis coupling measurement optical path to directly measure the comprehensive spatial accuracy data of machine tool containing Abbe error. In addition, in order to effectively identify the Abbe error in the comprehensive spatial accuracy, the Abbe error quantization function is established to eliminate the Abbe error in the spatial accuracy data of machine tool by analyzing its formation mechanism in the measurement process. Further, aiming at the problem of small data samples after eliminating Abbe error, the data samples are extended based on the degradation mechanism of machine tool spatial accuracy at different coordinate positions, and a high - precision spatial error model for machine tool is given. Finally, the experiment is conducted on a three - axis CNC machine tool with the model accuracy of over 95%, and the example application verification shows that the developed model scheme is feasible and effective.


Introduction
With the developing of manufacturing industry, there is a high demand on the precision of CNC machining.It is clear that stability and accuracy [1,2] are the two key indicators of the performance of CNC machine.Therefore, it is essential to improve the CNC machining precision, and error compensation that is economic and effective way to for CNC machining accuracy improvement has been wildly applied.Research shows that geometric errors is one of most important machine tool errors.
In addition, geometric errors are relatively stable and easily compensated [3] .CNC geometric errors compensation is an important technique to improve CNC machining precision [4] .And the key step for errors compensation for CNC machine is the way of obtaining the data of machine tool errors.Also, deriving a high-accuracy error compensation model will affect the validity of error compensation.A number of scholars have proposed various mathematical methods for error modeling, and the most widespread method is the Homogeneous Transformation Matrix (HTM).Since the 1980s, the HTM method has been considered the most popular method for spatial error analysis in the world [5,6] .
As suggested in the ISO 230-11 test specification, the premise of establishing a high-precision error compensation model for machine tools is to measure error data [7] .There are many ways to measure geometric errors of CNC systems.According to the different measurement theory, these methods can be divided into indirect measurement [8,9] and direct measurement [10] .For the indirect measurement method, it is mainly to carry out three-coordinate detection of processed products or use special measuring blocks to indirectly obtain geometric errors of machine tools.Wu (2022) obtained the geometric error of the rotating axis by analyzing the contact of the "S"-shaped specimen on the machine tool and measuring the error data of the sampling point.However, due to the low measurement accuracy, this method is rarely applied [11] .And for the direct measurement method,in order to realize the measurement of the single error of the machine tool, the optical instrument is mainly used to identify the changes in the reflected optical path of the optical mirror group as the machine tool moves.Such methods include laser tracker measurements [12,13] , laser interferometers [14][15][16] and 1D spherical error array measurements [17] .The laser interferometer measurement method is widely used due to the advantages of measurement efficiency and it has become the main research direction on error compensation.
The above approach has some disadvantages that are overlooked.First of all, when using the laser interferometer to identify the geometric error of the machine tool, we know that the Abbe error is generated due to the angular error between the measurement axis and the reference axis and the position offset between the measurement point and the tool point.Secondly, the spatial error model established by HTM which uses limited measurement error data to convert the single machine tool error of the measurement point into the spatial error of the tool point through rigid body theory and kinematics.However, the errors of each motion axis of the machine tool are coupled complex relationships, and it is not simple vector operations as the machine tool moves.At the same time, the model established by fitting limited measurement data cannot match the high-precision models.
In order to solve the problems mentioned above, it is necessary to apply the knowledge of precision measurement to the measurement of machine tool geometric errors.In the past decades, Abbe principle [18] and Bryan principle [19] have attracted extensive attention in precision machine design, and have been successfully applied in machine tool error measurement [20][21][22] .The two principles shows that if the measurement axis is not parallel to the reference axis and there is an angle between the two axes, the Abbe error caused must be corrected by multiplying the angle error by the offset between the measurement point and the tool point.Lee [23] tried to build a five-degree-of-freedom measurement system, and estimated the optimal Abbe offset between the measurement point and the tool point through the placement of different measuring instruments, so as to minimize the influence of the Abbe offset.Huang [24] deduced the Abbe error correction formula when measuring the positioning error of the machine tool on the basis of Abbe principle, and deduced the Abbe error correction formula when measuring the straightness error on the basis of Bryan's principle.However, these methods still correct the Abbe error only when measuring the single motion error of the machine tool.
In order to overcome the disadvantages that indirectly measuring the space comprehensive error and ignoring the Abbe error in the measurement process, this paper proposes a machine tool space comprehensive error model that conforms to the Abbe error from different perspectives.The rest of this paper is organized as follows.In Section 2, a method for measuring the space-integrated error coupled with each other under the actual machining state of the machine tool is proposed, and the formation mechanism of the Abbe error generated in the measurement process is analyzed.Also, the space-integrated error optimization model of the Abbe arm and angle error is established.In Section 3, a spatial comprehensive error data sample expansion model based on the coordinate position is given, and a spatial comprehensive error model of the machine tool based on big data is proposed.A case study on error modeling of high-precision machine tools and a validation of the proposed method are provided in Section 4. The final conclusions are given in Section5.

CNC spatial error modeling method 2.1Data acquisition method of CNC feature point spatial error
In order to realize independent measurement of geometric error of each axis of machine tool [25] , traditional measurement method of geometric error data of three-axis machine tool mainly uses laser interferometer to identify the change of grating when each axis moves independently.However, in reality, the machine tool realizes the processing of the work piece through the coordinated movement of the three axes.Therefore, the traditional independent error measurement method of each axis of the machine tool is difficult to meet the needs of high-precision modeling of the geometric error of the machine tool.This paper fully considers the coupling between the geometric errors generated by the independent axes under the three-axis coordinated motion of the machine tool, and effectively obtains the comprehensive data of the three-axis coordinated motion of the machine tool.According to the measurement principle and characteristics of six-dimensional laser interferometer, the characteristics of machine tool guide rails and table motion mechanisms, and with the help of two 90°optical steering mirrors and other measuring devices, the measurement optical path of the laser interferometer is constructed.Therefore the comprehensive error in the X, Y, Z directions of the machine tool at any point in the running space can be directly measured.The details of instrument installation is shown in Figure 1.

Figure 1 Installation method of the interferometer on machine tools
In order to obtain the spatial error data of the machine tool, the motion space of the machine tool is divided into three-dimensional space grids at certain intervals.The entire motion space of the machine tool is composed of multiple small cubes, and the vertices of each small cube are called feature points.
The spatial grid structure formed by the points is shown in Figure 2.

Figure 2 Machine tool space grid point division
In practice, the order of grid point measurement is shown in Figure 3, the X axis is the first compensation axis, and we can measure the grid point error on the axis firstly.Then the Y-axis (the second compensation axis) is increased by a grid distance to measure the next line.After measuring the first layer, Z-axis is increased by a grid distance, and then repeat the measurement process of the first layer.When the space grid point measurement is completed, the machine tool feature point space error data will be given.The laser interferometer is fixed on the distal end of the Y-axis by the magnetic holder, and the laser mirror is fixed on the spindle by the magnetic holder.The optical path is transmitted along the negative direction of the Y-axis to the positive direction of the X-axis to the positive direction of the Z-axis, and then reflected to the laser head through the mirror.Therefore, the optical path changes separately caused by X, Y and Z axis errors during machine tool movement are also coupled and influenced by each other in the optical path of machine tool comprehensive error detection, and finally react to the mirror located at the tool point.Laser interferometer reading error data P X , P Y , P Z , ε x , ε y , ε z ， where,P X , P Y , P Z are the X, Y, Z direction error component of the spatial comprehensive error of machine tool.

Figure 4 Geometric error coupling diagram
When the laser interferometer is used to measure the geometric comprehensive error of the three-axis machine tool, since there is a deviation between the measuring point position and the tool point position and an angle error, the Abbe error caused should be corrected.The machine tool single-axis error optimization model in accordance with Abbe principle in literature [24] was introduced into the full-space comprehensive error measurement method of machine tools, as shown in Figure 5.When the machine tool moves along the Y-axis according to the measurement path, the measurement point and the tool point have X-direction deviation L X 、Y-direction deviation L Y and Z-direction deviation L Z .According to the Abbe error generation mechanism, the X-direction component P X of the machine tool space comprehensive error is jointly affected by the Abbe arm (the offset between the X-axis grating scale reading head and the center point of the tool) and the angle error.The conversion formula of the X-direction error component of the machine tool space comprehensive error is: Similarly, the conversion formulas of the Y-direction error component and the Z-direction error component of the machine tool space comprehensive error are: Where, P αX 、P αY and P αZ are the lead errors of X, Y and Z axis ball screw, respectively.They are the actual error that should be compensated.

The data expansion method of machine tool spatial comprehensive error
The actual measurement process of machine tool spatial error can only obtain a certain amount of spatial feature error data.In order to expand the data sample,based on the feature point spatial error data, data native methods is used to predict (interpolate) the specific location points within the small cube formed by the machine tool feature points.The method based on the idea that "the farther the distance, the smaller the influence on the points to be estimated", and considers that the closest points to the unsampled points have the greatest influence on the non-sampled point values.Based on the given measurement point error and spatial location, the 3D error value at any points (data native points) in space is calculated.
As shown in Figure 6, any non-feature point C in space is contained in the rectangular compensation space by the vertex P n (n = 1,2, … ..8)taht is the space feature point.The error value of the three axis directions of each point P nx , P ny , P ny (n = 1,2, … .8) is measurement, the comprehensive error values: C x 、C y and C z and of the three axis directions of any non-feature point C in the rectangular compensation space needs to be given.Next we give an example for getting the error on X axis, and the error on Y and Z axis can be given in a similar way.
In Figure 6, the point C j (j = 1,2, … ..6) is the projections of point C on each plane or axis, and the error values of C j are C jx 、C jy 、C jz on X ,Y and Z axis,respectively.

Figure 6 Principle of spatial interpolation algorithm
In the rectangular compensation space with vertices: P1 ,P2to P8, the distance weight r x of point C in the direction of the X-axis is given by: where P L1x and P L2x are the x-axis coordinates of the P 1 and P 2 vertices.
Similarly, the distance weights r y 、r z of the point C in the Y and Z-axis directions can be calculated.
Calculate the error value of the point C 1 in the X-axis direction.As the point C 1 is on the line segment P 1 P 2 , and according to the inverse distance weighting method, the error value C 1x of the point C 1 in the X-axis direction is: C jx 、C jy 、C jz (j = 1,2, … .6)can be derived in a similar way.Then based on P nx , P ny , P ny (n = 1,2, … .8)and C jx 、C jy 、C jz (j = 1,2, … .6), the integrated error value C x of point C in the X-axis direction is: Similarly,The compensation value C y and C z on the Y and Z axis are confirmed in the same way.
= [ 1 ,  2 ,  3 ,  4 ,  5 ,  6 ,  7 ,  8 ] • [ According to the measurement spacing and data primitive method, the spatial cube formed by a single measurement spacing is divided at a specific location, as shown in Figure 7.According to the data primitive method, the specific error value is obtained by calculating the position of the cube feature points in the three axis directions for the specific location points.Thus, the error value data of 8 feature points obtained from a single measurement spacing can be expanded to 125 location-specific point data, which provides sufficient training sample data for neural network training.The m neurons input in the hidden layer: Then the h neurons output in the hidden layer: Among them, The activation functions in hidden and output layer are sigmoid functions: Output the n neuron input: Then output the the n neuron input C n can be shown as : The loss function is defined as: Where L is the difference value between the model output value C n and the actual value C n k .
Neural network training is aimed at minimizing the value of the loss function, and the model learning process is achieved by iterating over the weights (v mh ,w hn ) and thresholds.The BP algorithm based on gradient descent converges faster, and the updating range of weights and thresholds are: where is the loss function on the n neuron gradient term in the output layer.
is the loss function on the h neuron gradient in the hidden layer.η is learning rate.
Based on the updating strategy, the weights and thresholds are not continuously adjusted until the number of training sessions or the fitting effect no longer increases (the mean square error no longer decreases).

Basic Information
The research object of this paper is the three-axis linkage CNC machine tool.The machine tool is equipped with a Huazhong CNC hnc-818b/M fieldbus CNC system, which can realize interpolation linkage motion of three axes.The machine tool contains three linear axes X, Y and Z.It adopts a vertical structure with the X-axis driven by double screws on both sides to increase its stiffness, and the Y-axis and Z-axis driven by a single screw.The overall structural features of the machining center are: X-axis working stroke -800mm to 0mm, Y-axis working stroke -350mm to 150mm, Z-axis working stroke -550mm to 0mm, table size (width and length) 500mm x 1050mm.

Machine tool spatial characteristic point error data acquisition
In the case of no collision and considering the rationality of the experiment, the spatial error measurement range of the machine tool is selected as follows: X-axis: -600, -250, Y-axis: -290, 60, Z-axis: -120, -470, the measurement length of all three axes is 350 mm.Under the circumstances of meeting the usage requirements of measurement instrument, the spacing between adjacent measurement points is selected as 70 mm, X, Y, Z-axis are divided into 5 segments, and 4 feature points are inserted in the middle.The 6D sensor of the laser interferometer communicates with the laser head, and the laser head transmits the data to the computer through the network interface.The data is collected using the software provided by API.After setting the measurement parameters, the measurement mode, machine operation, and sample automation are performed.The comprehensive error of the machine tool spatial feature points is measured according to the above measurement path, as shown in Figure 9.The data is automatically saved after the measurement is completed.The machine stops running and the measurement results are shown in Table 1.
Figure 9 Measurement site According to the model shown in Figure 10, the machine tool spatial feature point error data could be optimized, and the optimized data is shown in Table 2.
Figure 10 Error conversion of machine tool space feature points to eliminate Abbe error can be given by the rule ( 6)- (7).The specific error data are shown in Figure 11.  3.This paper presents a data-driven spatial accuracy modeling method for machine tool under the influence of Abbe error.The features of the presented method are as follows: (1) Starting from the measurement principle and characteristics of six-dimensional laser interferometer, two 90°steering mirrors and components are used to realize one-time installation and directly measure the comprehensive error data of the entire working space of the machine tool.At the same time, a vector transfer method is proposed, which is based on Abbe principle and Bryan principle, and transfers the comprehensive error data of the measurement point to the tool point (actual compensation point) to eliminate the Abbe error generated in the measurement process.
(2) For the comprehensive error data of space grid points after vector transfered, the data native method is used to perform local specific position interpolation, and the comprehensive error large data samples of data native positions in the space grid are obtained.In addition, a spatial comprehensive error fitting model of CNC machine tool is established with a neural network algorithm technique.
(3) In order to verify our method, an experiment is conducted on the domestic XHK715 three-axis vertical machining center.The experiment results show that the accuracy of the model is more than 95%.The CNC machine tool spatial integrated error model can predict the integrated error data in the working space, which is beneficial to compensate the integrated error of the machine tool with high accuracy.

Figure 3
Figure 3 Spatial error measurement diagram 2.2 Analysis of the influence of Abbe error on the measurement method of machine tool spatial error As it shown in Figure 4，when measuring distance of machine tool in unit motion, there are positioning error   ()，straightness error   (),   ()，angle error   (),   (),   () in X-axis direction； positioning error   ()， straightness error   (),   ()， angle error   (),   (),   () in

Figure 5
Figure 5 Abbe Error of Worktable in Three-axis Linkage of Machine Tool

Figure 7 cube division 3 . 2
Figure 7 Space cube division 3.2 Model of machine tool spatial comprehensive error A large amount of comprehensive error data was obtained through the machine tool spatial comprehensive error measurement method and the data primitive method.In order to further establish a high-fitness machine tool spatial comprehensive error prediction model, a single hidden layer neural network is applied to fit large data samples.The coordinates of the measured spatial grid points of the machine tool are used as the model input, and the spatial grid point measurement error is used as the output to train the neural network in order to obtain a neural network fitting model for the spatial grid point error values.A typical three-layer neural network model is shown in Figure 8, C Lm (m = X、Y、Z)indicates coordinate values of the non-feature points: X, Y, and Z-axis of the three nodes in the input layer respectively.b h is the output value of the h node in the hidden layer.C n (n = X、Y、Z) indicates error output values of non-feature points: X, Y, and Z direction of the three nodes in the output layer respectively.The model function expression is   = (  ).v mh denotes the weight value (i=1, 2, 3) from the m node in the input layer to the h node in the hidden layer.w hn denotes the weight of the h node in the hidden layer to the n node in the output layer.Use θ n to denote the threshold value of the n node in the output layer and γ h denotes the threshold value of the h node in the hidden layer.

Figure 8
Figure 8 Neural network model

Figure 11
Figure 11 Machine tool spatial non-featured point error 4.4 Analysis on neural network fitting The spatial error data of the machine tool is trained by the neural network, and the number of training set and test set are 6250 and 2900, respectively .According to the characteristics of the data, the number of nodes in the input layer is set to 3, which are the coordinate values C Lm of any point in the machine tool coordinate system.The number of nodes in the output layer is set to 3, which is the error value C n of the point in the direction of the three coordinate axes.The number of nodes in the hidden layer is set to 12 according to the empirical formula.The results of the training experiment are shown in Figure 12, and the detail data are shown in Table3.

Figure 12 Figure 12
Figure 12 Training effect Table3 Data of original and calculated values of training points

Figure 12 (
Figure 12(c) gives the results for the 6250 dataset, and it shows that the error between the training and original values reaches 0.02 mm for the 3620-3750 dataset.And the effect of training results for the rest data is not obvious.It is clear that we can obtain a better prediction model when the 6250 sets of data are trained by the neural network algorithm.Then the test data set of the machine tool was input into the prediction model, and the output value of the machine tool error in the prediction model and the original value of the test data are shown in Figure 13.The prediction accuracy of X-axis,Y-axis and Z-axis are 95.1%, 94.2% and 94.6%,respectively.

Figure 13
Figure 13 Prediction effect

Table 1
Measuring lattice space error (without eliminate of the Abbé error)

Table 2
Measuring lattice space error (with eliminate of the Abbé error)