Research on Geometric Error Modeling and Compensation Method of CNC Precision Cylindrical Grinder Based on Differential Motion Matrix and Jacobian Matrix

In this paper, the geometric error modeling method of CNC cylindrical grinder based on the differential motion relationship between coordinate systems, the function fitting model method of basic geometric error terms based on cftool toolbox and the error compensation method based on Jacobian matrix are proposed. Firstly, the differential motion theory, which is widely used in the field of robot kinematics error modeling, is used to build the machine tool space machining error model of CNC cylindrical grinder. Different from the multi-body theory, this modeling method can clearly reflect the influence degree of each moving part on the grinding wheel cutter. Secondly, SJ6000 laser interferometer was used to measure and identify the geometric error terms of B2-K3032 CNC precision cylindrical grinder. MATLAB cftool toolbox was used to perform mathematical function fitting on the known error data, and the mathematical relationship between 24 geometric errors and machining instructions was found. Finally, combining with the 24 Sum of Sine function model, the known verticality error and position deviation, the differential motion matrix of each moving part in the tool coordinate system and the corresponding Jacobian matrix, the compensation quantity (dx dz db dc) of the comprehensive geometric error in the tool coordinate system by the CNC precision cylindrical grinder is obtained. In order to verify the feasibility of the above method, RA1000 series roundness meter was used to measure the radial circular runout error before and after the correction. The experimental results show that the precision of each shaft section is increased by 17.54%, 15.22%, 15.71%, 18.4%, 12.87%, respectively, and the average machining accuracy is increased by 15.948%. Therefore, the above methods are effective and reasonable for improving the precision of spindle workpieces, and can also be used for reference in the initial design stage of CNC cylindrical grinder manufacturing enterprises or improving the machining accuracy of existing machine tools.


Introduction
CNC machine tool is an important carrier of manufacturing industry. Its rapid development and wide popularity have injected new vitality into the development of manufacturing industry. In the whole machine manufacturing industry, the overall technical level and the number of grinders are very important. Microscopically, it reflects the final processing level of parts, and macroscopically, it reflects the advanced and backward processing technology [1][2]. If the precision of the grinder processing key parts is poor, the quality of the parts is difficult to ensure, and the machining accuracy, positioning accuracy and repeated positioning accuracy are three important indicators of the precision of CNC machine tools, among which, the machining accuracy is one of the important indicators to measure its machining performance, especially for the machine tools with high precision requirements [3][4].
CNC grinder after a period of use, there may be small movement. If the fault maintenance is carried out, the movement axes may be offset, so error compensation is necessary to improve the machining accuracy of CNC machine tools. On the one hand, it can prolong the service life of CNC machine tools, but also can reduce the cost and time of the design of machine tools [5].
Error compensation technology is a comprehensive technology including error modeling, identification and detection, compensation. And geometric error model is used as the basis of error compensation [6][7][8][9]. After decades of extensive research by researchers, in the early 1970s, Schultschik adopted vector method to establish the machine tool error model and studied the machine tool error during loading [10]. In 2000, Rahman et al. used homogeneous coordinate transformation to establish a comprehensive error model of machine tools, including quasi-static geometric errors, thermal errors and elastic deformation of moving and rotating axes [11]. In 2020, Lu proposed a new Gantry-Moving structure, and applied the theory of multi-body system to correct the main errors and improve the machining accuracy of Gantry-Moving CNC machine tool [12].
In 2006, Lee established a general volume error model to synthesize all geometric error components of a machine tool. Then, a recursive compensation method is proposed to realize the error compensation effectively. The test results show that the positioning accuracy of the miniaturized machine tool is improved through compensation [16].Zuo gave practical error compensation methods and examples. The application of error compensation in different cases is also discussed. [17].
To sum up, among the proposed error compensation methods, the error modeling based on the multibody system theory is the most extensive, and error compensation mostly adopts the iterative or recursive method based on the multi-body system. However, to build geometric error mathematical model based on multi-body system theory requires the establishment of multiple coordinate systems, and the calculation process of spatial machining error matrix and subsequent error compensation and correction is complex, and the terms of second order and above have little influence on the comprehensive geometric error. After the MATLAB software calculation, usually need to manually eliminate the second order and above terms, can get the machine tool space machining error model, and then used in the error compensation module, this process is more complex and troublesome. Moreover, the established spatial geometric error model cannot reflect the error influence of a single moving part on the tool, and the error compensation quantity used also needs to be iteratively corrected, which is complicated and difficult to understand. In addition, CNC grinder scholars have almost no research on differential motion error modeling and Jacobian error compensation methods which are widely used in the field of robotics. There is little research on the relationship between the geometric error terms of each axis of motion of CNC grinder and the machining code instructions. Therefore, it is necessary to study the error modeling and compensation of CNC grinder based on the new theory, and it is of great value to explore the relationship between geometric error of CNC grinder and machining code.
In view of the limitations of the above research, the geometric error modeling method of CNC cylindrical grinder based on the differential motion relationship between coordinate systems, the function fitting model method based on the basic geometric error term of cftool toolbox and the error compensation method based on the Jacobian matrix are proposed in this paper. Sect. 2: the geometric error modeling of CNC precision cylindrical grinder based on differential motion matrix is described in detail. The differential motion matrix of each moving part in the tool coordinate system is obtained, which reflects the influence of each part on the tool. By superposition of these effects, the comprehensive spatial machining error model in the tool coordinate system can be easily obtained. Sect. 3: the mathematical function fitting model of the basic geometric error term based on cftool is described in detail. The sine function model of the basic geometric error term of each axis is obtained by using the cftool toolbox in MATLAB R2018a. Sect. 4 describes the error compensation method based on the Jacobian matrix. The Jacobian matrix is constructed by using the differential motion matrix of each moving part relative to the tool, and the error correction quantity in the tool coordinate system is determined. Sect. 5: the feasibility of the above method is verified by the experiment of workpiece machining measurement. Sect. 6 is the conclusion.
2 Geometric error modeling of CNC precision cylindrical grinder based on differential motion matrix 2.1 Differential motion relation between coordinate systems of CNC precision cylindrical grinding machine 1) Description of differential motion between coordinate systems The differential motion matrix is a six -dimensional matrix, which can describe the differential motion relation between two coordinate systems. Accordingly, the differential motion matrix can be obtained by the homogeneous transformation matrix between the two coordinate systems. In the research of robot kinematics error modeling, the coordinate system of each moving joint of the robot is usually set, because the motion of each joint can be described conveniently by the differential motion of the coordinate system of the joint, so as to calculate the error caused by the error at each joint on the end-effector. In the field of CNC machine tools, the differential motion relation between coordinate systems has not been widely used.
In the study of geometric error and precision design of CNC machine tools, geometric error can be seen as the small amount of motion of each axis of machine tools, this small change in mathematics is generally expressed by differential. Therefore, the motion between the axes of motion of CNC machine tools can also be described by the motion between the coordinate systems, and then the small error movement between the axes of motion can be converted to the tool coordinate system, reflecting the impact of the small motion on the tool. The small motion here is the error component generated by each axis of motion. The differential motion of the coordinate system is the differential motion of the coordinate system of each axis of the machine tool, which leads to the differential motion of the tool coordinate system. It can be described that the sum of the tool geometric errors caused by each moving part is the combined geometric errors of the tool in its own coordinate system. Therefore, the meaning of geometric errors can be clearly expressed through the differential motion relation between coordinate systems.
2) Differential motion between coordinate systems of CNC grinding machine Taking B2-K3032 CNC precision cylindrical grinder as an example, as shown in Fig. 1, the geometric error modeling and error compensation method based on differential motion relations will be studied. It adopts HNC-818B CNC system and HVS-180 servo drive, the machine tool is equipped with X, Z, B, C axis. This type of CNC grinder is composed of a bed, grinding wheel, working table, sliding seat, grinding wheel, spindle and other components, as shown in Fig. 2. In the grinding process, the Z-direction slide seat drives the workpiece clamped between the head frame and tail frame to move along the Z-direction guide rail, and the X-direction slide seat drives the grinding wheel to move along the X-direction guide rail. The workpiece rotates around the Z-axis with the spindle, and the grinding wheel rotates around the Y-axis with the turntable. In order to model the geometric error of grinding machine, it is necessary to define the coordinate system of each moving part to describe its influence on the tool indirectly, then the comprehensive geometric error model on the tool coordinate system can be obtained. The position and direction of machine tool coordinate system do not change with the movement of each axis of machine tool, which is the benchmark for measuring and controlling the movement position of machine tool. The moving coordinate system is fixedly connected to the moving parts of the machine tool and moves with the movement and rotation of the moving axis. The axis of motion of CNC machine tools can be divided into translational axis and rotational axis according to the type of motion. Among them, the rotation axis can adjust the attitude of the tool relative to the workpiece, and improve the machining accuracy and efficiency. In international practice, it is determined that if the direction of Z-translational shaft is parallel to the spindle of the machine tool, it is away from the square of the Z-translational shaft of the processed parts. The direction of the X and Y translational axes is parallel to the direction of the moving guide rail, while the positive direction of the rotation axis is based on the right hand spiral rule. The right thumb points to the positive direction of the translational axis, and the direction held by the four fingers is the positive direction of the rotation axis. The coordinate system of B2-K3032 CNC precision cylindrical grinding machine is shown in Fig. 3 n o a p M (1) In Eq. (1), p is unlimited; a , o , n must satisfy  n = o a ; a and o are unit vectors and orthogonal. On the contrary, the differential motion of coordinate system B relative to coordinate system A can be expressed in homogeneous coordinate form as:

S(p)
The differential motion vector in the coordinate system A is expressed as Eq. (3), then the differential motion vector in the coordinate system B caused by the differential motion in the coordinate system is expressed as Eq. (4) by the differential motion matrix.
Where, D is the differential motion vector in the coordinate system A; ' D is the differential motion TW M , you will get ' D .

Forward motion topology structure and modeling of CNC precision cylindrical grinder
For a robot, forward kinematics is from the joint parameters of the robot to the position of the endeffector; Correspondingly, for a CNC grinder, it is the process of movement from the table to the tool.
According to the low-order body theory of multi-body system, the branches of cutter-bed and work-bed were established, and the bed of CNC precision cylindrical grinder was defined as O body, Z-slide carriage as Z body, Principal axis as C body, workpiece as W body and etc, as shown in Fig. 4. Combined with the forward kinematics theory of robot and the low-order body theory, the forward motion topological structure of the CNC precision cylindrical grinder based on the differential motion theory can be built, as shown in Fig. 5, which lays a foundation for future machine tool designers to carry out geometric error compensation work. The forward motion topological structure of CNC precision cylindrical grinder was built by combining the low-order body theory of multi-body system and the forward kinematics theory of robot. In addition, combined with the differential motion relationship between the coordinate systems, the influence of the differential motion on the tool of each axis of motion is obtained. After the superposition and summary of these influence components, the comprehensive influence on the tool is obtained.
The steps to establish the comprehensive geometric error model of CNC precision cylindrical grinder are as follows: (1) The homogeneous transformation matrix between adjacent bodies of each moving part is obtained; (2) The homogeneous transformation matrix of the tool relative to the coordinate system of each moving part is obtained. (3) The geometric error differential motion vector expression of translational and rotational axes is obtained; (4) Obtaining the differential motion matrix of each moving part relative to the tool coordinate system; (5) The sum of the expressions of the geometric errors of each axis relative to the tool coordinate system is used to obtain the comprehensive spatial geometric error model. Specific geometric error model of CNC precision cylindrical grinder based on differential motion matrix is detailed as follows:

1) Homogeneous transformation matrix between adjacent bodies
In an ideal working environment, the homogeneous transformation matrix of the workpiece relative to the C axis is (body relative to Z axis) Eq. (5) is also known as the forward kinematics equation of CNC precision cylindrical grinding machine. Accordingly, the homogeneous transformation matrices of the tool in the workpiece coordinate system, relative to the axis C coordinate system, the axis Z coordinate system, the body, the axis X coordinate system and the axis B coordinate system are respectively expressed in Eq. ((6)-(11)) : 3) The differential motion vector of the geometric error of each axis of motion In the error study of CNC grinder, six degrees of freedom exist in each axis, assuming that each axis is a rigid body. Due to the reasons of assembly and manufacturing, the errors in the direction of six degrees of freedom and the errors in the coordinate system of each axis will be produced in the process of grinding machine, which are called geometric errors. According to the research of scholars at home and abroad, the influence of geometric error on the machining accuracy of CNC machine tools accounts for 25%-40%. According to the variation of geometric error with the movement and rotation of the moving axis, it can be divided into motion error and position error [19].
The motion error is also known as position-dependent error, affected by machine tool processing instruction, here we call them the basic geometric error terms, take the translational axis Z as an example, six basic geometric error terms for ( ), ( ), ( ), ( ), ( ), ( ) . These six basic errors are nonlinear functions related to Z (the translational axis Z/Z direction of the processing code instructions), such as Fig. 6. The position error is a constant value, independent of the machining instruction, and includes the verticality error and the position deviation. The verticality error is the deviation between the actual position and the ideal position of the axis of motion, and its magnitude is the difference between the actual angle between two adjacent axes and 90°. As the rotation axis rotates around the axis, its position will also affect the accuracy, and the position deviation of the rotation axis is the deviation between the actual rotation axis and the ideal axis, which is the position deviation [20][21][22][23]. Take axis B as an example, as shown in Fig. 7.  (14)   00000 T cx p  Perror_c (15) 4) The differential motion matrix of each axis in the tool coordinate system Combined with the above differential motion vectors of the geometric errors of each motion axis, it can be obtained that the differential motion vectors of the geometric errors of the translational axes X and Z are respectively Eq. ( (16)-(17)), and that of the rotation axes B and C are respectively Eq. ((18)- Combined with the homogeneous transformation matrix of the tool in the coordinate system of each moving part, the differential motion matrix of each moving part relative to the tool can be obtained through the calculation of MATLAB R2018a software. The calculation of this process reflects the influence of each moving part on the machining precision of CNC precision cylindrical grinder. Eq. (20) is the differential motion matrix of the workpiece in the tool coordinate system. Eq. ((21)-(25)) are the differential motion matrices of rotation axis C, translational axis Z, body O, translational axis Z, and rotation axis B in the tool coordinate system respectively. 21 22 MM TW M MM (20) In Eq. (20),  21 22 TT TW M TT (21) In Eq. (21), cos( ) 0 sin( ) 0 *sin( ) 0  x

Measurement and identification of geometric errors
As a representative of modern precision measuring instruments, laser interferometer has been widely used in high-end equipment fields such as CNC machine tools and coordinate measuring machines [24].
In order to minimize the impact of the measuring instrument on the error, it must be recognized that the environmental impact on the measurement accuracy must be minimized during each measurement process.
Taking B2-K3032 CNC cylindrical precision grinder as an example, the measurement was done with SJ6000 laser interferometer. 20 evenly distributed mark points with 0-365mm transverse guide rail (X axis) stroke were selected for error measurement respectively; 20 evenly distributed mark points of longitudinal guide rail (Z axis) with 0-1500mm stroke were selected for error measurement respectively; 10 mark points evenly distributed in the 0-360° range of the workpiece spindle (C axis) were selected for error measurement; 10 marks evenly distributed in the 0-360° range of the grinding wheel turntable (B-axis) were selected for error measurement.
The specific measurement of each axis is as follows, in which the linear measurement is aimed at the positioning accuracy of the translational axis and the repeated positioning accuracy. Due to the confidentiality of the project, the measurement process is only shown in the form of schematic diagram in this paper, as shown in Fig. 8: The WR50 automatic precision turntable, used in conjunction with the SJ6000 angle measurement, connects the WR50 to the rotation axis and acts as an angle measuring standard. The positioning accuracy and repeated positioning accuracy of the rotation axis are measured, as shown in Fig. 9.
For example, in the horizontal axis left and right direction of straightness, using a linear mirror for collimation work, through the linear mirror back to the laser head. The straightness of X and Z axes was measured, as shown in Fig. 10.
The perpendicularity is measured as shown in Fig. 11. The collimation baseline is first adjusted so that it is parallel to the direction to be measured, and any subsequent adjustments should not change the double-sided mirror. Therefore, the laser interferometer collimation baseline is parallel to the address to be measured. At this point, the beam rotates 90° with a right-angle standard block and a reflection prism, and the incoming and outgoing light are formed by a hollow tetrahedron. The prism is placed on the exit side, and the light beam returns from the double-sided mirror, closes the light and enters the laser count.
The straightness error of the tetrahedral prism in the process of following the other direction of motion is the vertical error, and the error divided by the distance traveled is the angle value.

The mathematical fitting function model of basic geometric error term
The basic geometric error of the moving axis is related to the instruction of the machining code.
According to the different moving distance or rotation angle of each moving axis of the CNC cylindrical grinder, the data of basic geometric error are different. Since the basic geometric error terms is a nonlinear function of () x z b c , the mathematical function models of the basic geometric error terms of each axis are obtained by using the nonlinear curve fitting method combined with some known error data.
Then, error compensation is carried out by using these mathematical models.
In most areas of practice, there is not necessarily a linear relationship between the variables, such as a curvilinear relationship between disease efficacy and duration of treatment. Curve fitting is to select the appropriate curve type to fit the known data and analyze the relationship between variables with the curve equation fitted, which is one of the important methods in processing data analysis [25][26].
The nonlinear curve fitting can usually be analyzed by data processing software such as MATLAB, Origin and Maple. In this section, MATLAB software is used for curve fitting. There are many types of fitting provided by its cftool toolbox. Users can choose the type of fitting curve by themselves, so cftool toolbox is selected for fitting.
The following are the steps to use the MATLAB R2018A cftool toolbox visual interface: (1) Under the cftool command, enter "X data","Y data"; (2) In the model column, select the corresponding model; (3) Tick "Auto Fit" to get the image; (4) If the image fitting is not good, adjust the parameters a, b and c for fitting; (5) Finally get the fitting image, function model and fitting evaluation parameters Cftool toolbox's optional function fitting models include "Exponential", "Power", "Smoothing Spline" and "Sum of Sine" have their own advantages and disadvantages.
Combined with the measured error data in Fig. ((12)-(19)), the mathematical expression models were fitted for the basic geometric error terms of the four motion axes. In this part, based on the cftool toolbox, the six basic geometric errors of the four axes of motion of CNC cylindrical precision grinder were fitted respectively, and the most appropriate mathematical function models were found out for the error compensation. When evaluating the fitting effect of a curve, in addition to the degree of fitting of intuitive images and scattered points, there are four main evaluation criterion. SSE (The Sum of Squares Due to Error), which measures the sum of the total deviation between the fitting value and the actual value, is called the square sum of the residuals. The closer SSE is to 0, the better the fitting degree is. R-square measures the success of the fitting in explaining the changes in the data. The value of the fitting is between 0 and 1. The closer the value is to 1, the more complete the interpretation model of the Eq.'s variables to the output is. Adjusted R-square can accept any value less than or equal to 1, and a value closer to 1 is a better fit. RMSE (Root mean square error) is the root mean square error between the fitting data and the input data. The closer RMSE is to 0, the better the fitting degree is. The fitting results of MATLAB cftool toolbox show that Exponential fitting, Smooth Spline fitting and Sum of Sine fitting have good fitting effects, as shown in Fig. ((20)-(25)) and Table 1 Table 3. The exponential fitting evaluation parameters of Z-axis basic geometric error terms Error terms   Taking B2-K3032 CNC cylindrical grinder as an example, and combining with the error data measured in Fig. ((12)-(19)), the basic geometric errors of its four axes of motion are fitted. The curve of Smoothing Spline fitting is shown in Fig. ((22)-(23)), and the evaluation parameters of basic geometric error terms of each motion axis are shown in the Table 6 Fig. ((12)-(19)), various basic geometric errors of its four axes of motion were fitted. The curve of Sum of Sine function fitting is shown in Fig. ((24)-(25)), and the evaluation parameters of the basic geometric error terms of each motion axis are shown in the Table 10- Table 11. Sum of sine fitting evaluation parameters of Z-axis basic geometric error terms Error terms 2) The function models of the amount of movement z of sliding carriage Z ( ) 3 3) The function models of the amount of rotation b of turntable B

Overview of the Jacobian matrix and the generalized inverse matrix
In vector calculus, the Jacobian matrix is a matrix whose first partial derivatives are arranged in a certain way. It is essentially the best linear approximation of a differentiable Eq. to a given point, so it is similar to the partial differential of a function of several variables. If there are m functions : should be selected instead of the more difficult ones. Such as cylindrical elements can choose roundness or cylindricity; the radial vertical tolerance of axis can be replaced by radial circular runout or radial total runout, which can bring great convenience to measurement and reduce economic cost [28].
In the actual detection process, it is not necessary to measure all parts of the measured elements, but to reasonably arrange the appropriate measurement section or measurement points. If there is not enough number of measuring points, the actual situation of the measured surface can not be truly reflected, resulting in large errors. And choosing too many measurement points will cause inconvenience in measurement. Many factors, such as the measured surface area, processing methods and measurement accuracy requirements, need to be taken into account for the number of measurements [29].
This experimental workpiece belongs to the product of grinding, and generally fewer measuring points are selected. According to the description of the workpiece processed by CNC precision cylindrical grinding machine experiment and the precision requirements of B2-K3032 grinding machine, the runout precision of the grinding circle is less than 5 m  , the roundness of the grinding 40X500 workpiece is less than 2 m  , and the straightness is less than 5 m  , which indicates that the precision of the processed workpiece is required to be higher. Roundness and cylindricity shape errors can be measured without reference edge. Compared with the radial circular runout error, the reference axis is required to specify, and it can comprehensively reflect the remaining accuracy requirements of the measured elements of the workpiece. Therefore, the measurement of radial circular runout error of machining workpiece is chosen to reflect the machining accuracy of the CNC cylindrical grinder, and to reflect whether the geometric error compensation method is effective.

Experimental process and results
Combined with the established comprehensive geometric error model and the 24 basic geometric error function models, the error compensation applied to the CNC grinder was obtained. First of all, the unmodified CNC instructions and the modified CNC instructions were used to grind the workpiece, and then the radial circular runout error of the workpiece was measured by the RA1000 series roundness meter of WALE company to evaluate the experimental results, and the feasibility of the three methods applied to the precision CNC cylindrical grinder was evaluated. Fig. 27 is the experimental processing site before and after correcting the error.
a) Uncorrected machining b) Corrected processing   15.948%. Therefore, the geometric error modeling based on the differential motion matrix, the function model fitting based on the basic geometric error terms of cftool, and the geometric error compensation method based on the Jacobian matrix are effective and applicable to improve the machining accuracy of the CNC precision cylindrical grinding machine.

Conclusions
The main purpose of this paper is to prove the validity and feasibility of the proposed geometric error modeling method based on the differential motion relationship between coordinate systems, the mathematical fitting function model method based on the basic geometric error terms of cftool and the geometric error compensation method based on the Jacobian matrix applied to the geometric error field of CNC cylindrical grinder.
Compared with the previous methods, the geometric error modeling methods of CNC machine tools mostly adopt the multi-body system theory. The advantages of the modeling method in this paper are : (1) the differential motion matrix between coordinate systems is widely used in robot kinematics error modeling, and this paper is innovative in the field of geometric error modeling for CNC cylindrical grinder;(2) Combining the forward kinematics theory of robot and the topological structure diagram of low-order body theory, the forward motion topological structure of CNC cylindrical grinder was established;(3) According to the forward motion topology structure, the differential motion matrix of each moving part relative to the tool is obtained, which clearly reflects the influence of each moving part on the tool;(4) These effects are superimposed to obtain the comprehensive spatial machining error model of machine tool, which greatly simplifies the calculation process of the spatial machining error model.
The obtained differential motion matrix of each moving part relative to the tool is used in the subsequent error compensation, which simplifies the compensation method. In order to further explore the functional relationship between the basic geometric error of CNC cylindrical grinder and the machining code instructions, this paper proposes a mathematical fitting function method based on the basic geometric error term of cftool toolbox. This method uses MATLAB R2018a cftool toolbox to find that the Sum of Sine function model is in line with the actual situation by combining data graph and evaluation parameters. Finally, the 24 geometric error mathematical models are applied in the error compensation.
In order to simplify the compensation process, this paper proposes a geometric error compensation method based on Jacobian matrix. Combined with the spatial machining error model in the tool coordinate system, the Sum of Sine function models of 24 basic geometric errors, the identified perpendicularity errors and position deviations, the Jacobian matrix and the generalized inverse matrix are finally obtained for the geometric error compensation.
In order to verify the feasibility and practicability of the above method, an experiment was carried out.
Firstly, the radial circular runout error which can comprehensively reflect the precision requirements of the workpiece is selected as the evaluation standard. Then we get the workpiece contour comparison diagram before and after the correction with the theory. Finally, after processing the measured data, the machining accuracy of each shaft segment is increased by 17.54%, 15.22%, 15.71%, 18.4%, 12.87% respectively, and the average machining accuracy is increased by 15.948%. Therefore, the three methods for geometric error compensation of CNC grinder proposed in this paper are feasible, accurate and effective. They can be applied to geometric error compensation of CNC grinder in actual processing conditions, which is conducive to improving the machining accuracy of spindle parts and has a reference role for spindle processing enterprises and machine tool design and research enterprises.
Although progress has been made in the field of geometric error compensation of CNC grinder in this paper, this error modeling method is not widely used in CNC machine tools, and it is not certain whether it is applicable to other high-end CNC equipment. According to the known error data, the fitting function of the basic geometric error terms also needs to be improved, and a model that can better fit the functional relationship between the error and the machining instructions needs to be found. So, these underexplored areas need to be explored.

Funding
This work is financially supported by the National Natural Science Foundation of China (No.

Conflicts of interest/Competing interests
We declare that we have no financial and personal relationships with other people or organizations that can inappropriately influence our work; there is no professional or other personal interest of any nature or kind in any product or company that could be construed as influencing the position presented in, or the review of the manuscript.

Availability of data and material
We declare that the data and materials in this paper are open and used within the permitted scope and are not allowed to be used by third parties

Code availability
Not applicable

Ethics approval
Not applicable

Consent for publication
Not applicable

Authors' contributions
Not applicable