Abstract

This paper presents a modeling methodology for the thermal error of machine tool. The temperatures predicted by modified lumped-mass method and the temperatures measured by sensors are fused by the data fusion method of Kalman filter. The fused temperatures, instead of the measured temperatures used in traditional methods, are applied to predict the thermal error. The genetic algorithm is implemented to optimize the parameters in modified lumped-mass method and the covariances in Kalman filter. The simulations indicate that the proposed method performs much better compared with the traditional method of MRA, in terms of prediction accuracy and robustness under a variety of operating conditions. A compensation system is developed based on the controlling system of Siemens 840D. Validated by the compensation experiment, the thermal error after compensation has been reduced dramatically.

1. Introduction

With the increasing demand of high precision machining, thermal error accounts for an increasingly important part among all error sources of machine tools. The manufacturing industry is going through great challenges in thermal error management. More requirements, such as environment temperature controlling and compulsive warm-up stage before processing, have been proposed by the machine tool builders to avoid the influence of thermal error. Though the thermal error could be reduced to some extent, these methods have the disadvantages of high cost and low efficiency [1]. As a result, more thermal error management techniques, such as identification and modeling, have been developed to decrease the thermal errors more economically and efficiently.

Nowadays, thermal error compensation and structure optimization are two main approaches for the thermal error management. The different approaches apply different modeling techniques: empirical-based modeling method and principle-based modeling method [2]. The empirical-based modeling method aims at thermal error compensation. The prediction models are established by statistical methods, such as regression [3, 4] and neural network [5, 6]. The dependent variables of the models are the thermal-induced displacements. The independent variables are the discrete temperatures and operating parameters related to temperatures. The measurement experiment is essential before modeling. As a result, the measurement accuracy and reliability of the temperatures and thermal-induced displacements are of great importance to the prediction accuracy and stability of the model. If the temperature sensors break down, the compensation system with empirical-based models will be out of order, which may cause potential safety problems. In addition, as the statistical model could not reflect the mechanisms in thermal error generation, the prediction accuracy and robustness of the empirical-based models are limited.

The principle-based modeling method is mainly used to optimize the structure of the machine tool. Utilizing the basic laws of heat transfer and stress-strain, the temperature field and thermal deformation are calculated. The principle-based modeling method could be further classified into two categories, the finite element method (FEM) [7] and lumped-mass method [8]. At present, the FEM is mostly conducted on the reliable commercial software, such as ANSYS and PATRAN. The nodes and elements in FEM are refined but large in quantity. As the calculation amount depends on the number of nodes and elements, the FEM is time consuming and requires the hardware with high performance. This disadvantage constrains the application of FEM in the real-time error compensation. The lumped-masses in the lumped-mass method could be considered as the alternation of the nodes and elements in FEM. However, the number of lumped-masses is much smaller. The decrease in the calculation amount makes it available to develop a principle-based model to compensate the thermal error.

The difficulty in the lumped-mass method is how to evaluate the parameters, such as the convection coefficient and lumped-mass. Several researchers [9, 10] used the modified lumped-mass method to forecast the real-time temperatures of a ball screw system. Influence coefficients are used to compensate the deviations in parameter evaluation. Validated by experiments, the modified lumped-mass method achieved comparable prediction accuracy with the FEM.

In this paper, a novel modeling method is developed based on the data fusion method of Kalman filter. The fused variables are the temperatures from the modified lumped-mass method and measurement. In order to achieve the optimal fitting accuracy, the parameters in modified lumped-mass method and covariances in Kalman filter are optimized by the genetic algorithm. The fused temperatures are further used to forecast the thermal error based on regression analysis. The proposed model in this paper could be considered as an integrated model of empirical-based model and principle-based model. The application of data fusion is aimed at taking the advantages of these two models. Considering the low prediction accuracy and weak robustness of the empirical-based models, the application of principle-based models into the thermal error compensation is a difficult, but meaningful work. In addition, the proposed method provides a more effective way for the compensation system to operate properly, even when the temperature sensors do not work.

In order to validate the performance of the proposed model, several measurement experiments are conducted on a heavy-duty floor-type milling and boring machine tool. Compared with traditional method without data fusion, the proposed model achieves much better prediction accuracy and robustness. Finally, a compensation system based on the controlling system of Siemens 840D has been developed to compensate the thermal errors in real-time.

2. Measurement Experiment

The measurement experiment is the preliminary work of thermal error modeling. The experiments under a variety of operating conditions are conducted on a heavy-duty floor-type milling and boring machine tool. The enclosed design of the ram in this machine tool results in high temperature inside the ram. The amount of thermal expansion is related to dimensions of the component. The ram of the heavy-duty machine tool is usually in large scale, which raises the thermal error to submillimeter range. This paper aims to predict the thermal errors of the ram.

There are two heat sources inside the ram, spindle motor and hydraulic bearing. Two PT100 temperature sensors are used to detect the temperatures around the heat sources as shown in Figure 1. The temperature measuring point of spindle motor is located in front of the spindle motor, next to the coolant outlet. The measuring point of hydrostatic bearing is located inside the oil-returning slot of the bearing. In order to ensure the measurement accuracy and installation stability, both sensors are imbedded into the ram during the assembling stage of the machine tool. Another temperature sensor is used to detect the environment temperature. But in fact, the variation of environment temperature is quite small, and the variation range is within 0.2°C as shown in Figure 2. The thermal error of the ram is mainly affected by the two heat sources.

The thermal errors are measured by laser CCD of KEYENCE LK-H02 and MIIYI ILD1700. The measurement uncertainty of the displacement is 0.5 μm. As thermal errors are usually related to the relative displacement between the workpiece and the tool, the displacement sensors are fixed on the working table of the machine tools to measure the relative distance changes between the sensors and the spindle of the machine tool. The measuring point (see Figure 3(a)) of thermal error in -axis is located at the spindle nose. The measuring points (see Figures 3(a) and 3(b)) of thermal error in -axis and -axis are located at the outer surface of the spindle close to the spindle nose. The thermal errors of an experiment under variable rotating speed are shown in Figure 3(d). It could be easily found that the thermal error in -axis is much larger than those in -axis and -axis. As a result, the proposed model in this paper is focused on the thermal error in -axis. The thermal errors in the other two axes could be predicted as the similar way.

There is a second-level decelerator inside the ram. The reduction ratio for the rotating speed over 750 RPM is 464/3796. And the reduction ratio for the rotating speed below 750 RPM is 1102/2263. The different reduction ratios lead to the different correlations between the heat powers of spindle motor and hydraulic bearing.

3. Thermal Error Modeling

3.1. Modified Lumped-Mass Method

For the modified lumped-mass model, the temperature of a typical lumped-mass is calculated as where is the convection heat. is the conduction heat. is the generation heat. is the influence coefficient to compensate the evaluation deviation of each term. and are the mass and heat capacity of the lumped-mass.

The temperatures of two measuring points inside the tested machine tool could be predicted aswhere and are the temperatures of the measured point and environment at th time. is the convection coefficient. is the convection area. and are the generation heats of spindle motor and hydrostatic bearing, and both of them are proportional to the rotating speed: where is the heat generation coefficient and is the reduction ratio.

Equation (2) could be represented aswhere , , and .

As long as the rotating speed and the environment temperature are provided in real-time, the temperatures of two inner measuring points could be predicted as (4).

3.2. Data Fusion of Kalman Filter

Besides the predicted temperatures, the sensors are used to measure the temperatures in real-time. Data fusion is conducted to calculate fused values of the predicted and measured temperatures. Due to the requirement of low computation complexity for the compensation model, Kalman filter is implemented for data fusion [11, 12].

The Kalman filter algorithm involves two stages: prediction and updating. Based on (4), the equations for the prediction stage are presented as where , , and . is the covariance of the process noise. The variables with the subscripts , , and represent the predicted value, fused value, and measured value, respectively.

The equations for the updating stage are presented as where is the Kalman gain. is the covariance of the measurement noise. The covariances and , which greatly affect the performance of data fusion, will be optimized by the genetic algorithm.

3.3. Regression Analysis of the Thermal Error

The thermal error is calculated by regression analysis. The independent variables are the temperatures after data fusion. The basic prediction model of the thermal error is

In order to minimize the prediction deviation, the least-squares method is conducted to estimate the regression coefficients:in which , .

3.4. Optimization of Genetic Algorithm

The genetic algorithm is one of the intelligent optimization algorithms. Based on the simulation of Darwin’s evolution theory, the best individual is survived after iterations. Due to the excellent capability of global search, the genetic algorithm has been widely used in the researches of parameter optimization and identification.

The optimization is conducted in two steps: the optimization of parameters in modified lumped-mass method and the optimization of the covariances in Kalman filter . These parameters are encoded as floating-point form [13]; namely, a real number of floating-point vector is applied to define an individual. Compared with the traditional binary encoding, the floating-point encoding is more appropriate for the individual with several parameters.

The objective function is used to evaluate the fitness of each individual. It is defined as the root mean square value (RMSV) of the prediction deviations. The objective functions for and are presented as (12) and (13), respectively:

The iteration of the genetic algorithm is conducted by the operators of selection, crossover, and mutation. The selection operator reflects the survival of the fittest. The selection strategy of roulette method is used in this paper. The individual with smaller value of has a larger probability to be selected.

The operators of crossover and mutation affect the convergence rate and global searching ability of the algorithm. The crossover operator is conducted based on arithmetic crossover method. The values of an offspring individual are calculated by the arithmetic averaging of two parent individuals:where is a random number. and are the parameters in the offspring individual and parent individual , respectively.

For the mutation operator, a variation subject to Gaussian distribution is added to the original variable: where and is a scaling parameter. If the parameters after mutation exceed the upper or lower boundary of the parameter, the mutation process will be repeated again.

The flowchart of the proposed model is presented as Figure 4. The real-time data of temperatures and rotating speed are the inputs of the model. After the optimization of genetic algorithm, the data fusion method of Kalman filter is used to calculate the fused value of predicted temperature and measured temperature. The thermal errors are calculated by the fused temperatures.

4. Comparisons

In general, the thermal error models could achieve excellent fitting accuracy. However, the prediction deviations will enlarge obviously under different operating conditions. As a result, the prediction accuracy is an important evaluation indicator for the performance of thermal error model.

The measured results under variable rotating speed as shown in Figures 2 and 3 are used to optimize the parameters in modified lumped-mass method and the covariances in Kalman filter. The crossing probability and variation probability in genetic algorithm are set as 0.7 and 0.02, respectively. The fitting results of the proposed model are presented as Figure 5. The most common model of multivariate regression analysis (MRA) is used for comparison. In the model of MRA, the measured temperatures are used to calculate the thermal error directly:

The maximum residuals (MR) (17) of the proposed model and MRA in Figure 5 are 0.0143 mm and 0.0137 mm, respectively. And the root mean square values (RMSV) (13) of the residuals are 0.0050 mm and 0.0056 mm. Two models achieve comparable accuracies. The fitting performance of them is quite good. where and are the measured and predicted thermal errors, respectively.

In order to evaluate the prediction accuracies under different operating conditions, the results from another two measurement experiments are used for comparisons. One experiment (Case ) is conducted under the rotating speed of 1300 RPM. And the other one (Case ) is conducted under variable rotating speed. The prediction accuracies under different operating conditions are presented in Figures 6 and 7. Compared with the fitting accuracies (see Figure 5), the prediction accuracies (see Figure 6) of the proposed model and MRA are worse. This reduction in prediction accuracy is quite common in research of thermal error modeling. However, the prediction accuracy of the proposed model has been much improved compared with that of MRA. The increase in MR or RMSV for the proposed model is much smaller than the increase for MRA. Taking Case as an example, the RMSV of the proposed model increase by 0.0032 mm, but the RMSV of MRA increase by 0.0106 mm. As the temperature from the modified lumped-mass method is calculated by the basic laws of heat transfer, the fused temperature could reflect the essences of temperature variation, which results in the improvement in prediction accuracy.

During the measurement, the temperature sensors must be attached onto the surface of the component or be dipped into the oil tank. The measurement results can be affected by the mounting stability. The traditional thermal error models are vulnerable to the measurement errors. Therefore, besides the prediction accuracy, the robustness of the model is considered as another evaluation indicator. In order to evaluate the robustness of the proposed model, the values calculated from sinusoidal function (18) and constant values (19) are added to the measured temperatures of spindle motor. The added values could be regarded as the measurement errors of temperatures. The prediction results of the simulation with measurement errors are shown in Figures 8 and 9. The maximum residuals and root mean square values of the residuals are given in Figure 7. Compared with the results of simulation without measurement errors, the residuals are much larger. Taking Case with sinusoidal errors as an example (Figure 8(b)), the measurement errors induce an increase of RMSV from 0.0100 mm to 0.0156 mm for the proposed model. But the same measurement errors drive the RMSV up to 0.0221 mm for MRA. The residuals of both models present sinusoidal wave forms. The amplitude of the sinusoidal wave in the proposed model is much smaller than that in MRA. Similar results could be achieved in the other three simulations. Therefore, the proposed model could reduce the fluctuation and deviation induced by the measurement errors.

Besides high prediction accuracy and strong robustness, the proposed model could operate even when the temperature sensors cannot work, which is impossible for the traditional thermal error models. After setting the Kalman gain in (7) as zero, the fused temperatures are all from the modified lumped-mass model. The performance of the simulations without measurement results is presented in Figures 7 and 10. Though the prediction accuracy for Case is not as good as the prediction accuracy after data fusion, a significant proportion of the thermal error could be predicted. If we make full use of this advantage, it is unnecessary to worry about the sensor faults during the machining process.

5. Compensation

The aim of modeling is to compensate the thermal error in real-time. In order to meet the real-time performance, the computational complexity of the established model must match the computational capacity of the compensation system.

The computational complexity includes space complexity and time complexity. The space complexity represents the storage space required in the compensation system. The number of variables in (5)–(10) is proportional to the number of the measured temperatures. As a result, the proposed model has the linear space complexity: .

The time complexity is used to evaluate the time spent in the calculation. The time complexity is calculated based on the amount of calculations. For the proposed model, there is no array operation. The calculations include the basic operations of addition, subtraction, multiplication, and division. As with the space complexity, the time complexity of the proposed method is linear: .

The iteration method of Newton-Raphson method is widely used in FEM. The inverse operation of Hessian matrix, which has a space complexity of and a time complexity of , is required in Newton-Raphson method. As a result, the FEM is time consuming and space consuming. Compared with the FEM, the proposed method has much smaller computational complexity.

In this paper, a compensation system is developed on the controlling system of Siemens 840D. The signals of PT100 sensors are read by the Siemens module of SM331. The analog signals of sensors are converted to the digital values, and then the digital values are input into the PLC.

The compensation programs are executed in the PLC. As the Siemens PLC supports the floating-point arithmetic, the calculation results could attain high precision. The computational procedures in PLC are presented in Figure 11. The temperatures of and are the fused and measured temperatures at a previous time, respectively. Utilizing the rotating speed read from NC and the environment temperature measured by PT100 sensors, the temperatures of spindle motor and hydrostatic bearing are predicted by the modified lumped-mass method. In addition, the sensors measure these two temperatures in real-time. A criterion is added in the compensation system to decide whether the sensors have broken down. If there is a sudden change of the measurement value, the Kalman gain will be set as zero. The fused temperatures are used to calculate the thermal error. The CNC controller reads the compensation values and shifts the origins of CNC coordinate to implement the compensation. At last, and will be saved as the corresponding temperatures at the previous time.

The reading of rotating speed and measured temperatures will be triggered by a timer. The timer is set to control the compensation frequency. An experiment with the compensation system is conducted to test the compensation system. The PLC in the experiment will execute the programs every 10 s. The thermal errors before and after compensation are shown in Figure 12(b). The thermal error after compensation has been reduced dramatically.

6. Conclusions

In this paper, a thermal error modeling method is proposed based on the method of data fusion. The temperature predicted by the modified lumped-mass method and the temperature measured from the PT100 sensors are fused by Kalman filter. With the help of regression analysis, the thermal errors are predicted by the fused temperatures. In order to achieve the optimal prediction accuracy, the parameters of the modified lumped-mass method and the covariances of the Kalman filter are optimized by genetic algorithm.

Validated by the experiments and simulations, the proposed method could achieve better prediction accuracy and robustness compared with the traditional method of MRA. The proposed model could dramatically reduce the fluctuation and deviation induced by the measurement errors.

A compensation system is developed based on the controlling system of Siemens 840D. An experiment with the compensation system is conducted to test the compensation performance. The thermal error after compensation has been significantly reduced. Due to the low computational complexity of the proposed method, it is believed that the proposed model could be applied to the machine tools with other compensation systems.

At present, the empirical-based models, such as MRA, are the most popular method used in the thermal error compensation. The proposed model integrates the advantages of empirical-based model and principle-based model and achieves good performance. The application of integrated model into the thermal error compensation is a promising way for the thermal error management. More researches could be done to achieve a more reliable thermal error model.

Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.

Acknowledgments

This research work was supported by the National Natural Science Foundation of China (51375040) and the Foundation of Key Laboratory of Vehicle Advanced Manufacturing, Measuring and Control Technology, Ministry of Education in China (M16GY300020).