Thermal Errors Classification Compensation without Sensor for CNC Machine Tools

Both multicollinearity and utilization deficiency of temperature sensors affect the robustness and the prediction precision of traditional thermal error predictionmodels. To address the problem, a thermal error predictionmodel without temperature sensors is proposed. Firstly, the paper analyzes the temperature field and thermal deformation mechanisms of the spindle of a CNC gear grindingmachine in accordancewith the parameters, efficiencies, and structures of themachine spindle and bearing. A preliminary theoretical model is established on the basis of the mechanism analysis. Secondly, the theoretical model is corrected according to the actual operation parameters of themachine.Thirdly, verification experiments are carried out onmachine tools of the same type. It is found that the corrected model has higher precision in predicting thermal errors at the same rotational velocity.The standard deviation and the maximum residual error are reduced by at least 39% and 48% separately.The prediction precision decreases with the increase in prediction range when predicting thermal errors at different rotational velocities. The model has high prediction precision and strong robustness in the case of reasonable prediction range and classified prediction. In a word, prediction precision and robustness of themodel without temperature sensors can be effectively ensured by reasonably determining the prediction range and practicing classified prediction and compensation for thermal errors at different rotational velocities. The model established can be applied to machine tools that have difficulties in arranging sensors or those whose sensors are significantly disturbed.


Introduction
Thermal errors, which have become one of the major impact factors on component manufacturing precision in CNC precision machining, account for 50 ∼ 70% of all manufacturing errors [1,2].Currently, there are many methods of reducing the impact of thermal errors, including symmetric structural design, use of materials with low thermal expansion coefficient, workplace temperature control, and thermal error compensation [3].Among them, thermal error compensation has been widely used to compensate thermal errors of the various machine tools due to its economic efficiency [4,5].
The core problem of thermal error compensation is to establish a mathematical model that has high prediction precision and strong robustness.Generally, thermal error compensation follows the steps below.(1) Appropriate temperature measurement points are selected.(2) A thermal error compensation model is established on the basis of the temperature data collected.(3) Thermal errors are predicted in real time.Jiri Vyroubal [6] divided machine tools into several parts and arranged temperature sensors in each part.An error prediction model was built on the premise of finding temperature-sensitive points most relevant to thermal errors through correlation analysis.Lee et al. [7] organically combined linear regression with correlation analysis to optimize temperature-sensitive points and considered the minimum sum of residual squares as the basis for selecting temperaturesensitive points.Yang et al. [8,9] screened five temperaturesensitive points with the highest grey correlation degree by computing the grey correlation between thermal errors and temperature sensors, thereby achieving the goal of optimization.However, all these methods caused multicollinearity among the measurement points selected, eventually leading to the poor robustness of error compensation models 2 Mathematical Problems in Engineering [10].To eliminate the impact of multicollinearity among temperature-sensitive points, Miao et al. [11,12] employed principle component regression analysis to optimize the modeling variables.All of the above methods collect temperature information through temperature sensors.Sensors, as the major information detection devices, are mostly challenged by temperature coefficient differences, nonlinear response curves, slow responses, and cross-sensitivity [13].In the meantime, many industrial processes are characterized by multiple variables, strong interference, hysteresis, and strong coupling, which shall inevitably result in some sensor prediction errors.Therefore, some scholars [14][15][16] analyzed the temperature field of machine tools by using finite element analysis, so as to avoid the impact of sensors on the prediction precision.Kim [17] used the finite element method to establish temperature field models for ball screws at different feeding velocities.Nevertheless, the models were inaccurate since the temperature of ball screws was assumed to be consistent.Ming [18] established temperature models for ball screws by using finite element analysis and took into account the thermal contact resistance of bearings.Horejs [19] adopted the closed-loop finite element method for ball screw analysis and verified the impact of screw load on the stability of ball screws.Li [20] established thermal error prediction models by using the multivariate method, so as to improve the robustness of the prediction models that took temperature as the input variable.However, it is a complicated process to determine the variable.Bossmanns [21] used the finite difference method to characterize the temperature distribution of motor spindle.Shi [22] constructed axial heat generation equations by analyzing the heat generation and heat transfer of ball screws.Nevertheless, further application of the method is limited by the uncertain boundary conditions in finite element analysis.
To address the above problems a thermal error compensation model without temperature sensors is proposed in this paper.The theoretical prediction models for temperature field and thermal deformation are established based on the mechanism analysis of the spindle of a CNC gear grinding machine (YKZ7230).The paper simulates actual operation conditions of the spindle and corrects the theoretical model in accordance with the temperature and thermal deformation data collected, thereby obtaining a mathematical model that is consistent with the actual situation.Considering that acquisition of the corrected data is influenced by working environments, necessary measures are taken to minimize the impact of environmental factors on sensors, so as to ensure the modeling precision.The sensorless prediction of thermal errors has the following advantages: (1) economically efficient: no additional data acquisition devices or detection sensors are required; (2) convenient: there is no need for online real time sensor monitoring; (3) robust: the sensorless prediction eliminates errors caused by sensor instability and external interference.In the meantime, the impact of multicollinearity caused by improper measurement points is eliminated.
Contributions of this paper lie in the following two aspects: (1) different from the traditional thermal error model, the model proposed in this paper has no temperature sensors; therefore, it eliminates the interference errors caused

Lower bearing
Central spindle by temperature sensors, thereby improving the prediction precision and robustness; (2) thermal errors are influenced by multiple parameters, including thermal contact resistance, ambient temperature, spindle velocity, and hysteresis.As a result, the unified thermal error model has poor robustness.The experimental results show that classified prediction [23] can effectively improve the prediction precision and robustness.

Establishment of the Sensorless Models
2.1.Theoretical Model for Temperature Field.Spindle is a major supporting component of the gears of CNC gear grinding machines.Therefore, thermal errors caused by spindle motor heating and bearing heating shall inevitably exert a significant impact on the gear machining quality.

Spindle Heat Generation.
As is shown in Figure 1, spindle heat generation mainly consists of motor heat generation and bearing heat generation.Heat generated by the motor can be calculated in accordance with the motor efficiency while heat generated by the bearings mainly comes from friction.
Therefore, the motor heat is expressed as where   is the heat generated by the spindle;  - is the energy input into the spindle and can be calculated from the input voltage and current of the motor;  - is the mechanical energy output and expressed by torque and rotational velocity.The calculation parameters in (1) are easily obtained.
According to Document [24], frictional heat of the bearings can be expressed as where  B is the heat generated by the gearings; n is the spindle velocity; M is the total frictional moment of the bearings.
The overall heat equation of the spindle is expressed as where   is the total heat input into the spindle; Q B1 is the heat generated by the upper bearing; Q B2 is the heat generated by the lower bearing.
2.1.2.Basic Theoretical Model for Temperature Field.Equation ( 4) can be constructed based on the heat input and output of the spindle [25]: where  is the specific heat capacity of the spindle materials; m is the spindle mass;   is the spindle temperature; S is the heat radiation area of the spindle;  is the thermal diffusion coefficient of the spindle; Q out is the heat dissipation of the spindle.
Based on ( 4) and ( 5), average temperature   and time constant   of the spindle can be expressed as where  is the coefficient determined by the initial ambient temperature.

Theoretical Model for Spindle
Heating.The spindle is heated during rotation, leading to forced convection between the spindle and the air.The forced convection coefficient  up can be expressed as where  is the thermal conductivity coefficient of the spindle; n is the spindle velocity; v is the kinematic viscosity of air (v=16mm 2 /s); ℎ  is the experimental coefficient that is adjusted in accordance with specific experimental conditions;   is the Prandtl constant (  =0.701).Theoretical model for the spindle temperature field in the warming process can be obtained by substituting  up and ( 7) into (6).theoretical model for the spindle temperature field in the cooling process can be expressed as where  0 is the initial temperature of the cooling phase.

Theoretical Model for Thermal Deformation.
To establish the theoretical model for thermal deformation, it is necessary to analyze the structure and deformation characteristics of the gear grinding machine first.The structure of the machine tool is shown in Figure 2. According to the thermal deformation theory, the machine tool is structurally symmetric in the X direction, which has little impact on thermal deformation of the spindle.Due to the asymmetric structure in the Y direction, the spindle shall bend in the Y direction and the basement shall tilt during heating.Deformation in the Z direction mainly refers to spindle thermal extension.Figure 3 demonstrates thermal deformation of the spindle.As is shown in Figure 4, major errors that influence the component precision mainly consist of two parts: errors caused by the spindle inclination angle  in the Y direction (h) and errors caused by spindle thermal extension in the Z direction (ΔL).Therefore, thermal errors can be expressed with ℎ and ΔL.Expressions of thermal errors are described below: (1) Theoretical Formula of ΔL.Considering the structure of the machine tools, the spindle is divided into two parts when calculating ΔL, as shown in Figure 5. B 1 B 2 , which represents the distance between the upper and lower bearings of the spindle, is expressed by  1 .WB 1 , which represents the distance between the upper bearing and the mandrel, is expressed by  2 .B 1 is fixed while B 2 is mobile, indicating that thermal extension in B 1 B 2 has no impact on thermal errors.WB 1 experiences single point heating, with B 1 as the heated point.Since thermal deformation that takes place in WB 1 influences the precision of machine tools, Δ 2 =ΔL.According to Document [26], the temperature is triangularly distributed in WB 1 (see Figure 6).The thermal extension Δ 2 is expressed as Equation ( 12) is obtained by substituting () =  max (/ 2 ) into (11).
where   is the linear expansion coefficient of materials;  max is the temperature at B 1 . max =  =  m during warming and  max =T down = m during cooling. max can be obtained by ( 9) and ( 10).
(2) Theoretical Equation of h.According to Figure 4, the following can be obtained: where  is a function that varies with temperature.Since  is small, it can be expressed as Since ΔL is far smaller than L, it can be neglected.Substituting ( 14) into ( 13), the thermal error ℎ can be eventually expressed as where  is the undetermined coefficient.According to practical machining experience, h is small and easily calculated.Therefore, it is feasible to directly determine  on the basis of experimental data, thereby obtaining prediction equations consistent with the actual conditions.The spindle rotates at a constant velocity during machining, leading to an increase in temperature.It stops rotating when the machining is completed and the temperature drops accordingly in that case.The theoretical and actual temperature curves of the machine tools during operation are shown in Figure 7.It is revealed in the figure that the theoretical curve deviates from the actual curve.Therefore, the correction of the theoretical curve is the key to ensure the prediction precision and robustness of the model.
(1) Correction of the Model during Heating.Equation ( 9) can be corrected as follows in accordance with the experimental data: where   is the ambient temperature; p up1 is the correction slope during heating; p up2 is the temperature correction value during heating.
The optimal correction coefficients   , p up1 , and p up2 can be obtained by solving the optimal solution of the objective function.The objective function during heating can be established in accordance with Document [25].
(2) Correction of the Model during Cooling.Similarly, (10) can be corrected as where p dn1 is the correction slope during the  th cooling process and p dn2 is the temperature correction value during the  th cooling process.

Correction of the Thermal Error Model.
The thermal error model is corrected in a similar way to the temperature model.The thermal error model during heating is corrected in accordance with (12) as where  1 is the correction slope of thermal errors and  2 is the correction value of thermal errors.The optimal correction coefficients  1 and  2 can be obtained by solving the optimization problem.

Experimental System
3.1.Experimental Equipment.According to the theoretical analysis in previous chapters, it is necessary to correct the theoretical models in accordance with the temperature and thermal deformation data acquired.The experiment takes YKZ7230 (a CNC gear grinding machine) as the experimental platform and uses HIOKI8423 as the data acquisition instrument.The temperature and displacement

Experimental Design.
In accordance with the international standard Test Code for Machine Tools-Part 3: Determination of Thermal Effects (IS0 230-3:2001 IDT) [27], all the experiments were carried out at a constant temperature of 20 ∘ C. It should be noted that the spindle was in an idling condition.The spindle shall stop rotating when machine tools replace workpieces and repair grinding wheels during actual machining, leading to a decline in spindle temperature.Therefore, the heating and cooling cycles were set to 20 minutes and 5 minutes separately.And the cycles were repeated until the temperature reached thermal equilibrium.
To avoid the impact of sensor defects on the model proposed, the following measures were taken: (1) To ensure the precision of the temperature and thermal deformation data measured, shielding tubes were introduced to protect sensor cables during data acquisition.In the meantime, surrounding machine tools and other devices were disabled to avoid interference in the experimental data.The gross-error data was eliminated.
(2) Sensors were wrapped in plastic films during the experiments, so as to minimize the impact of cutting fluids on the model.
(3) Considering the impact of the multicollinearity of temperature sensors, 4 temperature sensors were evenly arranged around the measured object during model correction.Average temperature of the 4 temperature sensors was calculated and used as the temperature of the model, thereby avoiding the impact of multicollinearity on the model proposed.
Considering the changes of temperature fields and thermal errors with rotational velocity, experiments were carried out at different spindle velocities.Since the rotational velocity of YKZ7230 ranges between 0 and 300r/min, the experimental rotational velocities are evenly distributed in this range.The grouping of the experimental rotational velocities is shown in Table 1.

Temperature Data Acquisition.
In order to accurately arrange the temperature sensors, FLIR infrared camera was  It is revealed in Figure 9(b) that the main heating component is the bearing.To acquire temperature data more uniformly, 4 temperature sensors were uniformly arranged in the circumference near the bearing, as shown in Figure 9(c).We computed average temperature of the 4 temperature sensors and obtained 10 sets of temperature data under different rotational velocities.The actual temperature curve measured is shown in Figure 10.As Figure 10 shows, temperature of the spindle bearing increases with the increase in spindle velocity and drops quickly when the spindle stops rotating. up and  down in ( 16) and ( 17) can be corrected by virtue of the actual temperature data. in Figure 4 can be obtained by calculation, based on which the actual thermal deformation in the Y direction (h) can be obtained.The displacement sensor S3 in Figure 11 is used to measure actual deformation in the Z direction, namely, ΔL.

Result Verification
4.1.Correction Model.Table 2 demonstrates parameters of the machine spindle.Correction coefficients of the temperature field and thermal deformation models at different rotational velocities can be obtained by virtue of the methods introduced in Section 2, as shown in Tables 3 and 4 separately.
Since the experiments were carried out at a constant temperature, T  in ( 16) and ( 17) is equal to the ambient temperature, namely,  e =20 ∘ C.

Model Prediction Result before and after Correction.
To illustrate the effect of the modified model, one of these models is used as an example to discuss. Figure 12 is a comparison of the prediction results between the theoretical prediction model for temperature and the corrected model when the spindle velocity is 240r/min.According to the figure, the corrected model is far superior in prediction precision, indicating the feasibility of temperature correction.
Figure 13 is a comparison of the prediction results between the theoretical model for △L and the corrected model when the spindle velocity is 240r/min.It is revealed in the figure that prediction results of the theoretical model fluctuate significantly with temperature changes during spindle cooling.Influenced by the thermal contact resistance and machine tool structure, the actual measurement curve is insensitive to the drastic temperature changes.Overall, the corrected model obtains good prediction results.Table 5 is a numerical comparison of the prediction results between the theoretical prediction model for △L and the corrected model when the spindle velocity is 240r/min.As the figure shows, the prediction precision is significantly improved after correction.The standard deviation and the maximum residual are reduced by 60% and 79% separately.Figure 14 is a comparison of the prediction results between the theoretical prediction model for ℎ and the corrected model when the spindle velocity is 240r/min.It can be seen from the figure that the corrected model has better prediction results than the theoretical model.Table 6 is a numerical comparison of the prediction results between the theoretical prediction model for ℎ and the corrected model when the spindle velocity is 240r/min.As is shown in the figure, the corrected model enjoys higher prediction precision.The standard deviation is reduced by 39% and the maximum residual is reduced by 48%.According to the above experiments, the maximum residual and the standard derivation of the corrected model are 1.7m and 1.1m, respectively, when the spindle velocity is 240r/min, indicating that the corrected model has high prediction precision and strong robustness.In the following section, the prediction results of the corrected model shall be verified at other velocities.

Mathematical Problems in Engineering
Maximum residual and standard deviation of the corrected model increased from 1.6m to 2.1m and from 1.0m to 1.3m separately at other velocities.

Prediction Range of the Corrected Model.
To verify the effective prediction range of the corrected model, model (150r/min) was adopted to predict thermal deformation at 30r/min, 60r/min, 90r/min, 120r/min, 180r/min, 210r/min, 240r/min, 270r/min, and 300r/min, respectively.The prediction residuals are shown in Figure 15(a).Figure 15   demonstrates the profiles of the X axis and the Y axis in Figure 15(a).According to Figure 15, the prediction residual is small and the prediction precision is high when the corrected model predicts thermal errors at about 150r/min.The prediction residual is large when the rotational velocity is greater or smaller than 150r/m (see 200r/min and 50r/min in Figure 15(b)).Therefore, the prediction precision decreases with the increase in prediction range when the prediction model has a definite prediction range.In addition, the prediction precision is higher when the prediction range is closer to the rotational velocity for modeling.Table 7, which demonstrates the standard deviation and the maximum T im e ( m in )   residual at different rotational velocities, reveals the same laws as Figure 15.
To verify the above conclusions, model (30r/min) and model (300r/min) were adopted to predict △L at different velocities in Table 1.The results are shown in Figures 16 and  17 separately and consistent with the conclusions in Figure 15.
Since the prediction results on ℎ were consistent with those on △L, the prediction range of ℎ was not repeatedly analyzed.
It can be concluded from the above analysis that the prediction model corrected based on temperature and thermal errors at a specific velocity has a specific prediction range.Therefore, the prediction range of the model should be limited to a specific range, so as to ensure the precision of the model proposed.

Classified Prediction of the Thermal Errors.
To further improve the prediction precision of the corrected model, the prediction range at different rotational velocities was limited to modeling velocity ±30r/min.Due to the impacts of machine tool assembly, lubrication, and other factors,    thermal errors may be different.Therefore, verification experiments were carried out on another CNC gear grinding machine of the same type, so as to verify the robustness of the model.Model (90r/min), model (150r/min), model (210r/min), and model (270r/min) were employed to predict thermal errors in corresponding velocity ranges and the prediction results were shown in Tables 8, 9, 10, and 11 separately.As the tables show, the maximum standard deviation and the maximum residual are 1.9m and 2.7m separately when the prediction range is limited to modeling velocity ±30r/min.Both prediction precision and robustness are high in that case.

Conclusions
(1) The sensorless prediction model effectively avoids the multicollinearity brought by improper measurement points and the poor robustness caused by sensor instability in traditional methods.
(2) The sensorless thermal error model can accurately predict thermal errors of the gear grinding machine selected.Standard deviation and maximum residual of the corrected model for △L are reduced by 60% and 79% separately, and those of the corrected model for ℎ are reduced by 39% and 48%, respectively.
(3) Since prediction precision of the sensorless thermal error model decreases with the increase in prediction range, prediction precision of the model is effectively ensured by reasonably determining the prediction range and practicing classified prediction and compensation for thermal errors.

Figure 1 :
Figure 1: Schematic of heat generation of a spindle.

Figure 4 :
Figure 4: An abbreviated drawing of spindle thermal deformation.

Figure 5 :
Figure 5: A structural diagram of the spindle.

Figure 4
Figure4is an abbreviated drawing of the thermal deformation in Figure3.As is shown in Figure4, major errors that influence the component precision mainly consist of two parts: errors caused by the spindle inclination angle  in the Y direction (h) and errors caused by spindle thermal extension in the Z direction (ΔL).Therefore, thermal errors can be expressed with ℎ and ΔL.Expressions of thermal errors are described below:

2. 3 .
Correction of the Temperature and Thermal Deformation Models 2.3.1.Correction of the Temperature Model.In the following sections, the temperature model correction process is illustrated by the example of the spindle.

Figure 7 :
Figure 7: Schematic drawing of the theoretical and actual temperature curves.

Figure 9 :
Figure 9: Infrared image of the spindle and arrangement of the temperature sensors.(a) Before heating.(b) After heating.(c) Arrangement of the temperature sensors.

Table 1 :
Experimental rotational velocity.the central spindle and seek major heat sources.The thermal image is shown in Figures 9(a) and 9(b).

Figure 12 :Figure 13 :
Figure 12: Comparison of temperature curves before and after correction. (b)

Figure 14 :
Figure 14: Comparison of ℎ before and after Correction.

Figure 15 :
Figure 15: Error prediction result by model (150r/min): (a) residual result of 150r/min and (b) profile of X axis and Y axis.

R
ot at e sp ee d (r /m in )

Table 3 :
Correction coefficient of the temperature field model.

Table 4 :
Correction coefficients of the thermal deformation model.

Table 6 :
Prediction results of h (unit: m).