Research on geometric error modelling and decoupling of machine tool based on NURBS projection curve

As a geometric measuring instrument of machine tool, double ball bar (DBB) instrument can effectively identify the geometric error of machine tool. In the existing literature, DBB mostly uses the two-dimensional circle as the identification trajectory to identify the geometric error continuously, and the most efficient way of single recognition is still in two-dimensional plane. Aiming at the low efficiency of DBB spatial geometric error recognition, the recognition range of DBB is extended from two-dimensional plane to spatial hemisphere. A method of space recognition and decoupling based on NURBS projection curve is proposed in this paper. The error decoupling of feed axis and rotation axis is realized in an experiment. The identification method has the characteristics of high efficiency, no secondary assembly and avoiding interference. It can decouple all the five-axis in hemispherical space at one time and get the effective solution.


Introduction
Multi-axis CNC machine tools are usually used to process spatial surfaces and curved surfaces, which have strict requirements on motion accuracy. Due to the spatial error in the synchronous interpolation of multi-axis machine tool, the error of each axis can be determined by error decoupling, and the compensation scheme of machine tool can be further analysed.
As the pre-process of error decoupling, the selection of error identification method will directly determine the accuracy and efficiency of identification. Many scholars have carried out studies on error identification methods. Xiang et al. [1,2] used the static feature point method and the ball bar instrument to identify the errors of PDGEs and PIGEs. Andolfatto et al. used the static feature point method and the ball bar instrument to identify the errors of PDGEs and PIGEs and used cap-ball system to study the geometric error of five-axis machine tool [3]. Ibaraki et al. used the "touch trigger probe" method [4] and the "chase-the-ball" method [5] for measurement. The "touch trigger probe" method uses a laser probe to calibrate the space of the standard gauge block to determine the position between the deviation of the reference vector and the deviation of the measurement; it is simple and easy to use. The "chase-the-ball" method needs to instal six measuring balls on the circular and use optical instruments for measurement, which has high accuracy. There are also many scholars that use the ball bar [6][7][8], a laser interferometer [9][10][11] or other methods [12][13][14][15] to study the errors of the machine tools. The accuracy of this method is high, but the existing methods are difficult to decouple.
From the perspective of multi-body system, the spatial error identification process of multi-axis CNC machine tools belongs to rooted system identification. Although the use of laser interferometer, probe and other instruments for error identification can also be more convenient for space measurement, because there is no space closed loop, it is easy to cause the loss of error accuracy in Measurement Engineering, resulting in inaccurate error decoupling. The double ball bar instrument can overcome this problem, but it generally identifies the interpolation of two axes or less [16][17][18]. Or it needs to be assembled many times to produce assembly error, which needs additional identification or compensation [19]. In order to identify and decouple the errors of more axes in the same identification process, the spatial NURBS projection curve is used to identify the rotation hemispherical surface. NURBS curve can effectively ensure that the spatial identification process has good smoothness, so that the double ball bar instrument can effectively identify and decouple in the process of spatial motion.
In this paper, for more accurate expression, error abbreviations and measurement units are shown in Table 1. For the convenience of expression, the identification method is called SDIT, and double ball bar instrument is called DBB for abbreviation.
2 Identify method 2.1 Space identification principle DBB is an instrument that is commonly used for measuring errors in the two-dimensional space plane, which has two high precision spheres for the space measurement benchmark. One sphere is fixed, in which the centre is installed on the working platform of the machine tool, and it is defined as O 1 . The other ball is at the moving end, in which the centre is installed on the spindle of the machine tool, and it is defined as O 0 2 . The standard reference space between the fixed end sphere and the moving end sphere is L, and the two spheres are connected by a spring rod. The spring rod can catch the position deviation of the micro displacement along the radius direction of the track. The ball centre of the sphere at the moving end is pulled to the position end by the expansion rod in space O 2 . When performing measurements, it draws a two-dimensional circular track with a fixed motion radius in the XY, YZ and ZX planes as the reference trajectory. The centre is O 1 , the radius is L=L O 1 O 2 , and the motion deviation is ΔL. ΔL changes in real time with the change in the two-dimensional circle track, and there is a track that is created at a time between t 1 and t 2 , as shown in Fig.1a.
In order to identify the spatial error, it is extended from two-dimensional identification plane to threedimensional space. As shown in Fig.1b, the DBB is installed and measured in a three-dimensional Cartesian coordinate system. The actual coordinate values of the fixed end and floating end can be expressed as O 1 (x 1 , y 1 , z 1 ) and O 2 (x 2 , y 2 , z 2 ), and the reference system can be expressed as O ; Since the position of the ball centre at the fixed end is fixed without displacement, the actual coordinates coincide with the reference coordinates, which is expressed as Then, the space point distance L between the two spheres of the identified trajectory can be expressed as Eq. (1).
In order to identify the deviation effectively, the parameter of the identified deviation value is introduced, and the DBB identification process can be described as Eq. (2).
The relationship between the variation of the DBB radius and the error components of each feed axis is shown in Eq. (3).
L is the reference rigid rod length of the DBB. In addition, Δx, Δy and Δz represent the error value components of the ball bar instrument along the three standard reference axes of X, Y and Z, respectively, in the Cartesian coordinate system at the current time for ΔL. If the coordinate value of the fixed end spherical centre O 1 and the ΔL expansion are known, then the floating end coordinate value of O 2 can be calculated as Eq. (3).

Identification trajectory of NURBS projection curve
When installing the DBB on the working platform, its moving space is half spherical, as shown in Figure 2. Let's take trajectory A as an example. In track A, the DBB stops six times every 15°for 2 s, and results in points A-1, A-2, A-3, A-4, A-5 and A-6(A-1), respectively, which correspond to 0°, 60°, 120°, 180°, 240°, 300°and 360°(0°) in track A, respectively. A-1, A-2, B-1 and B-2 are used as the four nodes in the test of trajectory B-E, and the space sphere enclosed by them is part of the standard sphere.
The scope of DBB identification in space is a hemisphere, and the static partition on the hemisphere can be projected by multiple concentric circles on the same plane above. It can be seen in Fig.2 that the space sphere composed of four points C1-1, C1-2, D1-1 and D1-2 in the leftmost area of the layer III is taken as an example, which can be formed by the concentric circle projection in the figure. The NURBS curve on the concentric circle will also be projected to the sphere through the projection relationship, and the projection curve on the sphere can be used as the identification curve of DBB motion decoupling in the space sphere. The identification equation of spherical parameters can be described by Eq. (4).
The trajectory of DBB passing through the space hemispherical surface is an S-like curve, which is convenient to generate by using spline curve. Let a k-spline curve with N+ 1 control vertices P i be expressed as Eq. (5).
When the node vector U [u 0 ,u 1 , ……, u i + 2k + 1 ] is not constant, a NURBS curve is generated. Where P i is the control vertex, B i, k is the harmonic function, and W i is the weight factor of the control vertex. The standard form is shown in Equation (6).
(a) DBB identify trace in plane XZ (b) DBB in Cartesian coordinate system The error vector ΔP i generated by NURBS curve at any identification point P i offsets and rotates the theoretical trajectory, and the actual position is P i + 1 . The space curve in Cartesian coordinate system is shown in Fig.3. The end point coordinates of the theoretical and actual trajectory are respectively P p (x p , y p , z p ) andP q (x q , y q , z q ), and the radius vector is r p (r px , r py , r pz ) T and r q (rqx , r qy , r qz ) T , and the base vector is e 1 ! e 2 ! e 3 ! À Á . The error vector ΔP i in space can be expressed by Eq. (7). The angle of the vector can be expressed by the angle α and β between two axes in space, and its direction cosine is shown in Eq. (8).
3 Error modelling

Machine tool's structure
The modelling object is a swivel table five-axis CNC machine tool as shown in Fig.4. By taking the five-axis machine tool structure as an example, as shown in Fig.5a, the machine tool is composed of three groups of feed axis motion mechanisms, X, Y and Z, and two groups of spatial rotation axes, B and C. If the machine bed is fixed on the ground, the whole machine tool can be regarded as a rooted system in multibody dynamics. It is divided into two motion branches: one is CA, in which the chain can be expressed as MCS->ZCS->SCS->TCS, and another chain is CB, which can be expressed as MCS->XCS->YCS->BCS->CCS->WCS. The working area between the two branches is connected by DBB; thus, the overall error of the rooting system can be detected by it. One end of the DBB is installed on the main shaft, and the other end is installed on the rotary table. MCS is the Cartesian coordinate system that is generated by the origin of the machine tool. XCS, YCS and ZCS are the coordinate systems for the movement of the feed system. BCS and CCS are the coordinate systems that are generated in the rotation process of the rotating axis. SCS is the coordinate system in the rotation process of the spindle, TCS is the tool coordinate system, and WCS is the coordinate system of the workbench. Then, the error between the two chains can be expressed as Eq. (9). The three-axis machine tool can be regarded as subtracting the rotation axis B and C from the original five-axis structure, as shown in Fig. 5b.
The coordinate point p 0 i with the actual error can be represented by the error transfer matrix and the theoretical coordinate point, as shown in Eq. (11).
ΔL is the expansion and contraction change of the DBB during the test, which needs to be stored and recorded during the measurement. The other parameters include L, h, α and β. L and h are the theoretical length and the installation position height of the DBB, and α and β are generated by the spatial spline identification trajectory. This consists of ε xx ; ; ε xy ; ; ε xz ; ; ε yx ; ; ε yy ; ; ε yz ; ; ε zx ; ; ε zy ; ; ε zz ; ; δ xx ; ; δ xy ; ; δ xz ; ; δ yx ; ; δ yy ; ; δ yz ; ; δ zx ; ; δ zy ; ; and δ zz ; which is a total of 21 parameters that need to be identified to form a nonlinear polynomial. These correspond to six error elements of the XCS, YCS and ZCS coordinate systems, respectively. In order to identify a section of a curved surface space, it is necessary to collect 18 non-coincident points in the space. Then error factors can be identified by solving the nonlinear equations and the iterative method.

Error effectiveness of the five-axis machine tools
Based on the three-axis, the five-axis adds the rotation axes B and C. This is the coordinate systems CB-3 (BCS) and CB-4 (CCS) in Fig. 5a. If the error axis of the rotation axis is O, then the error of axes B and C is presented in Eq. (13) and Eq. (14). The system error factors of the lower branch chain of machine tool composed of them can be characterized by Eq. (15).
There are 30 error factors that need to be identified in the five-axis error model, and the polynomial is more complex, and the form is similar to Eq. (12). Due to the limitation of space, this paper does not list them one by one. Based on the error compensation of the tool and spindle, the error transfer matrix is used to describe the error model of the five-axis machine tool, as shown in Eq. (15).  4 Experiment and result

Overall principle of experiment
In order to avoid the influence of DBB's axial error on measurement and decoupling, it should be corrected before measurement. The calibration process is shown as Fig.6a and the result shown as Fig.6b. It can be seen from Fig.6b that after being corrected, the accuracy of DBB reached 0.1μm, which can be used for μ-precision measurement. In order to verify the correctness of the space formula of constant temperature and humidity experiment, the pre-experiment was carried out after the heat engine was preheated 6 h in advance and the thermal error entered the steady state. The SDIT method is used for error identification and decoupling on the five-axis machine tool in Fig.7. The experiment is divided into two parts: three-axis experiment and five-axis experiment. The three-axis experiment is used to verify the feasibility of SDIT method, and the five-axis

Experimental result and analysis of SDIT-3
In the pre-selected identification track, the three-axis experiment adopts the semi closed-loop control mode for the linkage, the BC axis is locked, rotation does not occur, and it applies the three-axis for interpolation.
As shown in Fig.8a, the dark line of the identification curve for the experiment is the front track, and the light grey line is the back track. In order to compare with the curve in Section 4.3, the experiment in SDIT-3 uses symmetric curve as error identification curve to study A1/A2 space. In the identification curve in A1/A2, 21 effective nodes P 1~P21 are selected for sampling in SDIT-3. Fig.8b is the result of the simulation before testing on the SINUMERIK 840Dsl CNC system. By performing a comparison, it was determined that the simulation result of the identification curve is basically the same as the standard curve, which can effectively measure the error in the coordinate system during multi-axis linkage movement of the machine tool. The identification results of the static calibration nodes are shown in Table 2.
Based on the above method, the SDIT overall space error identification is carried out for the machine tool. The semi-circle identification space is spatially divided by the space division method. The volume of the third layer and the fourth layer is relatively small, which is not convenient for the development of the NURBS curve. In this experiment, the first layer and the second layer of the identification curve can be divided into three spaces, respectively. According to the method discussed in Section 2, the layer A error factors for XCS, YCS and ZCS can be obtained, as shown in Fig. 9.
In Fig. 9, the label of y-axis represents the numeric of dynamic error, and x-axis represents the static calibration point. The red area represents that the error exceeds the standard value, the yellow area indicates that the local area exceeds the standard value, and the green area indicates that the standard is met. The red line represents the curve of the numerical fitting for each error factor that is calculated under the condition of the known static calibration point. Meanwhile, the blue curve represents the curve that is formed by the dynamic acquisition and interpolation. It can be observed from the figure that the displacement error Fig. 11 Identify trajectory re-planing in layer D Fig. 12 Five-axis test: CCS's error factors of layer A factors in XCS, YCS and ZCS have a relatively consistent identification. The displacement error factors ε xx ; , ε xy ; , ε xz ; , ε yx ; , ε yy ; , ε yz ; , ε zx ; , ε zy ; and ε zz ; basically have the same results for the static calibration and dynamic identification except the points which numeral change too fast. Especially when the starting point velocity is 0 and the acceleration is large, there will be an obvious error phase angle between static identification and dynamic identification.

Experimental result and analysis of SDIT-5
In order to make the identification curve have better decoupling accuracy in spatial error identification, the space is divided into A-E layers, and each layer is divided into 18 curves of sphere for identification and interpolation. Taking A-I as an example, the nodes of recognition curve on the sphere are selected according to the arc length equidistance method, and A-I is divided into three recognition curves, namely green, red and blue; the identification trajectory is shown in Fig.10.
The curves on the sphere can be identified, and effective dynamic identification results can be obtained (Fig. 11). Take the identification results in Fig.12 and Fig.13 as examples. The identification results are the CCS identification errors of layer A and the YCS identification errors of layer C.
It is also found that some curves on the space sphere have large errors in Fig.14. After decoupling the identification curve of D layer, the results show that a lot of out of tolerance straightness errors exist, such as δ xx ; =δ xz ; =δ bx ; =δ by ; =δ bz ; . And there are some angle errors out of tolerance, such as ε bx ; in D2-D6 segment seriously exceeds the allowable error, ε cz ; is seriously out of tolerance in D5-D6 section. The specific values of error factors exceeding ISO standard is shown in the "original trajectory" of Table 3. The blank space indicates that the error is within the tolerance range, which is not indicated in the table.
The decoupling result is too large, which may be caused by the following aspects.
1) The feed speed of identification curve is too fast in this section. 2) There is a big error in this section of surface.
3) Unreasonable path planning on curve.
In order to improve the identification result, the author re-measured the BCS of layer D by reducing the feed speed of identification trajectory and changing the identification trajectory. When the feed rate of the curve is reduced from F600 to F200, it is found that there is little difference between the two decoupling results. After the trajectory planning is carried out again, the decoupling results are obviously different; decoupling result data is shown in "modified trajectory" of Table 4. As shown in Fig.11, the pink curve is the identification trajectory before the change, and the green curve is the after one. The decoupling result after changing the identification trajectory is shown in Fig.15.
By comparing data and figures, the result shows that: Fig. 13 Five-axis test: YCS's error factors of layer C 1) By adjusting the feed rate, the author does not find that the SDIT method is directly related to the feed rate, but it is related to the hemispherical position of the identification curve.
2) The result of decoupling is one-to-one corresponding to the motion process of each axis, so changing the motion of each axis will get different decoupling results. 3) When decoupling, even a small error will lead to a large difference in decoupling results. Therefore, in order to accurately decouple the error, the higher the accuracy of error identification, the better. It is concluded that the more precise the curve is, the more accurate the result is. However, how to divide the curve and how to get the optimal solution on the surface quickly and effectively are not in the scope of this paper.

Conclusions
This paper discusses the experimental principle, measurement method, identification curve selection, error decoupling and experiment of SDIT. This method adopts the static calibration method first followed by dynamic identification. Because the instrument that is used in the identification tool is a double headed ball bar, its rigidity is sufficient, and the reliability of the obtained data is good. The experimental results show that it can effectively and quickly test and decouple the error of the three-axis machine tools, and a space NURBS curve can identify 21 error factors. Using the same method, 37 spatial error factors of five-axis machine tool can be identified and decoupled. The experimental results show that the displacement error factors of static calibration and dynamic identification are approximate in the identification space, and the angle error factors of static calibration and dynamic identification have obvious phase difference at the position where the acceleration changes too fast. It can be considered to remove the starting point in the experiment, so that the identification of dynamic characteristics and error interpolation will be greatly improved.
At the same time, it should be noted that the error value of partial decoupling in Table 3 is far beyond the allowable range of machine tool error in ISO. The author has repeated several tests with the same identification trajectory on the same machine tool, and the approximate results are still obtained. In the test, ΔL values of these areas are large. According to the measuring theory of this paper, this is also the correct result, but limited by the experimental environment, it is unable to further verify these out of tolerance data. It should be noted that due to the spatial constraints and DBB recognition range, this method has some points for attention.

1)
Although the length of DBB can be changed by lengthening the rod, the rod length of DBB is fixed in each measurement. Therefore, in a single measurement, the spatial range of SDIT identification method is difficult to break through the fixed L of spatial hemisphere.
2) It should also be noted that the trajectory of identification curve cannot cover all the spheres of the region, so the maximum error in this range may be missed. In order to ensure the effectiveness of the method in error identification and decoupling, the identification trajectory should be the same as the CNC programme trajectory.

3)
In the five-axis identification experiment, 18 curves are used for identification. It is found that the more curves are divided, the finer the decoupling results are. However, it is beyond the scope of this paper to what extent the division should be.
Author contribution A fast identification method is provided, which can identify and decouple the geometric errors of hemispherical surface in space without secondary assembly. This method uses the spatial NURBS projection curve as the identification curve and is easy to adjust the identification trajectory. The method proposed in this paper does not need secondary assembly, and the error identification process is completed at one time. This provides an effective premise for error decoupling of five-axis machine tools.
Funding This work was supported by the National Natural Science Foundation of China (Grant No. 5187050926) and Natural Science Foundation of Tianjin City (Grant No. 20YDTPJC01740).
Data availability The experimental data of this paper are true and effective and can be used as the research basis for other researchers.

Declarations
Ethical approval This paper is based on the author's theoretical analysis and many experiments. The experimental method is innovative, and the experimental data are true and reliable.

Consent to participate
The author agrees to participate in publishing related matters, and the editor has the right to modify and adjust the manuscript and reject the manuscript with the author's knowledge.
Consent to publish The author agrees and authorizes this journal to publish the paper.

Competing interests
The authors declare no competing interests.