1. Introduction
With the development of the machine manufacturing industry, the demand for high-precision machine tools is increasing. Not only a better accuracy, but also a higher removal rate is provided by high-precision machine tools than that of traditional machine tools. High-speed machining technology can provide high spindle revolution, high axial feed rate, and a high-CPU (Central Processing Unit) processing speed. Machining efficiency can be improved greatly, and the machining time can be reduced significantly. However, the more heat is generated by the high-speed machining technology, and the more the accuracy of the machine tools is damaged. Thermally induced error is demonstrated as one of the greatest contributors to the accuracy of the high-precision and ultra-precision machine tools. A thermally induced error can account for 40–70% of the total errors [
1,
2,
3], which must be reduced to keep the accuracy of the machine tools during processing.
Generally speaking, there are two ways to reduce the thermal error: error avoidance and error compensation [
4]. In the error avoidance, the thermally symmetric design of machine structure, the separation of heat sources, rearrangement of machine tool structures, the improvement of the rigidity of machine tool structure, and materials with low thermal expansion coefficient, an air-cooling system with a hollow ball screw, room temperature-controlled workshop, etc. are the common methods to reduce the thermal error [
5,
6]. The basic accuracy of machine tools can be ensured in this way, but the costs dramatically increase with the increase in accuracy grade. In contrast, error compensation is a cost-efficient way to enhance the accuracy of machine tools [
7]. A thermal error is predicted by the error model, and then compensated by the software [
8]. The main steps of error compensation are: (1) the relationship between the errors and the location is established considering temperatures; (2) the compensation signals based on the error model sent to the CNC (Computer Numerical Control) controllers; (3) the tool and the workpiece have relative motions in the opposite direction to the predicted errors.
Thermal error measurement, error modeling, and error compensation have been the focus of many significant studies in recent years. Two popular methods of thermal error modeling are theoretical modeling and empirical modeling. In the theoretical modeling, through the calculations of heat generations and convective heat transfer coefficients of different components in a machine tool, the temperature distribution can be obtained, and the deformation can also be gained according to thermo-elasticity. Both the analytic method and the numerical method could effectively solve the problems of establishing differential equations. The finite element method with the help of mathematical software is the most common method. However, the accurate boundary conditions and the heat transfer characteristics of theoretical modeling are in need of theoretical modeling, which are difficult to clearly identify. A three-dimensional FEA (Finite Element Analysis) model was proposed to conduct a transient thermal structure interactive analysis of a high-speed spindle by Ma et al. [
9]. Shi et al. [
10] investigated the effect of thermal expansion on the ball screw feed drive system of a precision boring machine tool, and the theoretical model for thermally induced error along with heat generation characteristics was established. Zhang et al. [
11] used the finite element method to predict the temperature field of a high-speed and high-precision motorized spindle under different working conditions.
Empirical modeling is different from theoretical modeling, where the relationship between the thermal errors and the temperature measurements was mapped by the data-driven models such as the neural network [
12,
13], gray model [
14], support vector model [
15], and time series model [
16]. A thermal error model with the four key temperature points was proposed by Guo et al. [
17] using an ant colony algorithm-based back propagation neural network (ACO-BPN). Wang et al. [
18] proposed a compound error model by Newton interpolation for the geometric and thermal errors of a milling center. A comprehensive compensation model was established through the decomposition of the geometric error and thermal error components by Li et al. [
19], where the thermal effects caused by internal and external heat sources were modeled separately. Xiang et al. [
20] presented a strategy to build an error model of an NC (Numerical Control) lathe considering both thermal and load effects. An offline compensation technique modifying the NC G-codes for positional, geometrical, and thermally induced errors of machine tools was presented by Eskandari et al. [
21].
In this paper, an empirical modeling was applied to build the thermal error model. The core idea of empirical modeling was to map the relationship between the thermal errors and the temperature measurements. However, if the multi-collinearity among the temperature variables existed, the accuracy and the robustness of the thermal error modeling would be directly affected. Therefore, the highly correlated variables must be screened out. Various approaches were presented to eliminate the influence of the multi-collinearity among the variables. The gray correlation theory [
22] and the clustering [
23,
24,
25,
26] are the commonly used methods to optimize the temperature variables. The fuzzy clustering analysis, gray correlation, stepwise regression, and determination coefficient were combined to select temperature-sensitive points by Miao et al. [
27].
The establishment of the thermal error model has two requirements. One is that the model has a high enough accuracy, and the other one is that the model has a strong enough robustness. Therefore, a thermal error modeling method considering these two requirements is presented in this paper.
The multi-collinearity among independent variables needs to be removed before establishing the thermal error model. In the traditional methods, after the classification, the representative variable in each group is selected, and the variables finally chosen to build the error model from these representative variables are determined by the least degree of multi-collinearity. The benefits of the traditional method are that the multi-collinearity can be furthest reduced, and the predicted robustness can be guaranteed.
Generally, the stronger the correlation between input variables and the thermal error is, the more accurate the precision of the model is. However, some variables which have low correlation with respect to the thermal error are picked out by these methods, which may decrease the accuracy and robustness of the thermal error model. Therefore, in this paper, the selection method of variables is different from the traditional ones. After the representative variables are picked out, the fitting accuracy of the error model should be considered first. The variables for building the thermal error model are selected based on sample determination coefficient and the significance of the regression equation, which gives priority to the fitting precision of the error model. However, there may be still multi-collinearity among the input variables selected by this method. Principal component regression is then applied to build the thermal error model. Multi-collinearity among the input variables can be further reduced. The robustness and prediction accuracy of the error model can be enhanced.
The rest of this paper is arranged as follows: in
Section 2, the modeling of principal component regression is established.
Section 3 deals with the selection of temperature measuring points based on fuzzy clustering analysis. A three-axis machine tool is taken as an example to verify the proposed method in
Section 4, and some conclusions are presented in
Section 5.
3. Selection of Temperature Measuring Points
Thermal error modeling is a challenging task because the mechanism causing the machine tool deformations is so complex that thermal error cannot be accurately predicted. In order to improve the robustness and the prediction accuracy of the error model, the multi-collinearity among the temperature variables must be eliminated through selecting the representative temperature variables from many temperature sensors preliminarily installed on the machine tool. The essence of identifying the representative temperature variables is to conduct classification, and then select one variable from each group to represent this category. The clustering analysis is one of the most common tools for the classification.
3.1. Clustering Analysis
Fuzzy cluster analysis is widely used, which has unique advantages compared to the traditional ones. In this paper, the maximal tree method was chosen.
The maximal tree method is implemented through the following steps. Firstly, correlation analysis between every two temperature variables is made, and the fuzzy similarity matrix is obtained. Secondly, the maximal tree is built based on the prim method. Thirdly, clustering analysis is conducted to classify the whole temperature variables. Lastly, representative temperature variables are gained from each clustering based on the correlation coefficient between the temperature variables and the thermal error. The permutation and combination of these representative temperature variables are regarded as input variables of the error model.
3.2. Clustering Criterion
In the process of clustering, the criterion of selecting the optimal clustering result is very important. The criterion is a quantitative indicator determine the optimal clustering result from the whole clustering results. In this paper, the sample determination coefficient (R2) and the significance of the regression equation were taken as the criteria.
The sample determination coefficient is:
, , , and . where is the measured value, is the fitted value, and .
F statistics is constructed:
This obeys F distribution, whose degrees of freedom are p and n−p−1. When , the regression equation is significant under the significance level which is usually equal to 0.05. On the contrary, the regression equation is not significant.
The closer
R2 is to 1 and the more significant the regression equation is, the better the optimal clustering result is. The flow chart of the thermal positioning error modeling is shown in
Figure 2, where MLR is abbreviated as multiple linear regression.
4. Experiment and Verification
The experiments were conducted on a three-axis machine tool whose structure is shown in
Figure 3. The positioning error of the
Y axis was taken as an example to verify the thermal positioning error modeling, the modeling processes and experiments of the
X axis and the
Z axis were similar to the
Y axis. A laser interferometer (Renishaw XL-80) was used to measure the positioning error, and the principle of measurement was shown in
Figure 4. Measurement was based on the principle of light interference. A laser beam ① was emitted from the laser head, which was divided into two beams of light ② and ③ through the interference mirror. Beam ② directly returns to the receiving point of the laser head through the interference mirror, and beam ③ reflects to the receiving point by the reflector. The displacement of the reflector can be obtained according to the number of pulses.
The distribution of temperature was detected by the PT100 temperature sensors, where the Pt 100 temperature sensors with two wires were used. The scene of the measurement can be seen in
Figure 5. Considering the structure of the machine tool and the actual operating conditions, 11 temperature sensors were preliminarily installed on the parts of the machine tool, such as the bed, screw, and similar others. The arrangement of the sensors is shown in
Figure 6 where T means the temperature sensor. Here, T6 and T11 are not included. The installation locations of the temperature sensors are explained in
Table 1.
4.1. Thermal Positioning Error Measurement and Modeling
The starting point of the positioning error measurement was set to be the machine reference origin of the
Y axis, and the positioning error was bi-directionally measured every 10 mm in the whole stroke range of 280 mm. Firstly, the geometric positioning error was measured when the machine tool was initially switched on. Then, the machine tool is cooled down to the initial condition which is the same as the first measurement, and the positioning error was measured again. This process was repeated four times, and the geometric positioning error was calculated by averaging the obtained five groups of data. The machine tool was warmed up by moving the
Y axis slide all along its stroke with a feed rate of 20 mm/s and an acceleration of 10 mm/s
2. However, the process of the positioning error measurement in the heating process was different from that of the geometric positioning error. When the machine tool began to be heated, the thermal state changed dramatically. Even the movement of the
Y axis for measurement would make the thermal state change greatly. Therefore, the measurement of the positioning error was repeated only twice at the beginning of the heating process. With the development of the heating process, the change in thermal state was gradually slow. At this stage, the positioning error was measured three times. Finally, the machine tool reached the thermal equilibrium state which changed very little, and the positioning error was measured five times. Meanwhile, the temperatures were measured at an interval of 10 min until the ball screw system reached a thermal equilibrium state. As shown in
Figure 1, the measurements of the positioning error were synchronized with the temperature measurements after the machine tool had been warmed up for 0, 20, 60, 120, 210, 240, 340, and 390 min, respectively (represented by the numbers 0, 1, 2, 3, 4, 5, 6, and 7).
Modeling for the thermal positioning error could be carried out. Firstly, the initial positioning error was modeled with polynomial fitting, for which the expression is:
Secondly, the slope of each trend line was calculated, which is given in
Table 2. The thermally induced positioning error is:
The slope is a linear function of the key temperature variables which are selected in the following.
4.2. Selection of Key Temperature Variables
Eleven sensors (PT100) were preliminarily installed on the machine tool, and the temperature curves of 11 temperature sensors were plotted at intervals of 10 min and are described in
Figure 7. It can be seen that the temperatures are rising until the ball screw system reached a thermal equilibrium state.
The key temperature variables were selected by fuzzy clustering analysis. The steps of the maximal tree method were implemented as follows:
(1) The correlation coefficient between every two temperature variables is calculated:
Then, all the correlation coefficients that form the fuzzy similarity matrix are shown in Equation (12):
(2) The maximal tree is built based on the prim method. First, Variable 1 is taken, and the maximum correlation coefficient relative to Variable 1 is determined from Variable 2 to Variable 11. Here, is maximum, and the tree is drawn as
Then, in the rest of variables, the maximum correlation coefficients relative to Variables 1 and 9 are determined, respectively—which are and . The bigger one remains and the tree is achieved.
In a similar way, finally, the maximal tree is built as shown in
Figure 8.
(3) Clustering analysis was conducted. When
is in [0,1], the branches of the maximal tree whose correlation coefficients are less than
are cut off, and a disconnected graph was obtained. The connected branches are the cluster results based on the threshold value
. The cluster results can be seen in
Table 3.
(4) The representative variable of each cluster is chosen. The temperature variable in each clustering who has the maximal correlation coefficient with respect to the slope
is chosen as the representative temperature variable of this clustering. The correlation coefficients are calculated based on Equation (11), and the result is shown in
Table 4. Based on the correlation coefficients, the combination of variables in each cluster result is shown in
Table 5.
(5) The input variables of the error model are selected. When the optimal input variables are selected, the fitting accuracy of the error model should be considered first. According to the sample determination coefficient and the significance of the regression equation, the selection results are obtained in
Table 6,
Table 7 and
Table 8. When the number of variables is 5, the sample determination coefficient is nearly equal to 1, and the regression equation is significant. While the number of variables is less than five, the sample determination coefficient is smaller than that of five variables. If the number of variables were 6, although the sample determination coefficient is equal to 1, the regression equation could be less significant than that of five variables. When the number of variables is bigger than six, the tolerance is exceeded, and some variables have to be excluded. Therefore, the best number of input variables is five, and they are
—as shown in
Table 5.
The relationship between the slopes and five input variables is established by multiple regression analysis. The model summary and coefficients of the regression equation are shown in
Table 9 and
Table 10. Although the regression equation is significant, not all the variables pass the significance test. This means that the multi-collinearity exists among input variables. Therefore, a thermal error modeling method of principal component regression (PCR) algorithm is presented to eliminate the effect of multi-collinearity.
4.3. Principal Component Regression Modeling
Principal component analysis is one kind of mathematical statistics methods. PCR is applied to regression analysis with principal components which are unrelated to each other. Therefore, PCR can eliminate the influence of multi-collinearity among input variables. The construction of the principal component can be seen in
Table 11.
According to the cumulative percentage bigger than 85% and scree plot shown in
Figure 9, only the principal component 1 is selected as the input variable. The analysis results of PCR are given in
Table 12,
Table 13 and
Table 14. The equation of PCR is:
where
is the slopes calculated by PCR, and
is the principal component 1.
The relationship between principal component 1 and the five temperature variables is:
The analysis results are shown in
Table 15,
Table 16 and
Table 17. The equation of PCR with five temperature variables is:
The obtained model for the
Y axis positioning error is expressed as follows:
Multiple linear regression (MLR) and artificial neural network (ANN) are also used to build the thermal error model to compare with the PCR. The input variables of the MLR and the ANN are the same as PCR.
The slope calculated by MLR is:
The
Y axis thermal positioning error of MLR is expressed as follows:
4.4. Artificial Neural Network Modeling
Artificial neural network (ANN) is usually applied to nonlinear fitting. The neural network model is a network structure, which is composed of an input layer, hidden layers (one or two), and an output layer. For the neural network model shown in
Figure 10, the node numbers of the input layer and output layer are determined by the input variables and output variables. The node numbers of the hidden layer can be selected by optimizing the structure of the neural network.
The neural network in this paper has only one hidden layer, as shown in
Figure 10. The input layer has five nodes indicating that the model has five input variables, and the output layer has one node indicating that the model has one output variable. MSE (mean square error) and
R2 for different number of nodes in the hidden layer are given in
Table 18 and
Table 19. It can be seen that the MSE and
R2 of the hidden layer with four nodes, five nodes, and six nodes are almost the same, therefore the hidden layer with four nodes which has the least nodes of the hidden layer among three neural network model is selected.
4.5. The Modeling Results for the Y Axis Positioning Error
For convenience, this experiment is abbreviated as experiment I. The modeling results of three models are shown in
Figure 11,
Figure 12 and
Figure 13, and the residual error of three models can be seen in
Figure 14. The performances of three models are calculated in
Table 20 where the RMSE, MAXR, and MINR are short for root mean square error, maximal residual error, and minimum residual error, respectively.
Although the fitting accuracy of the PCR model is worse than that of the other two models, the fitting curves of the PCR model could match quite well with the actual measured values. This is because that the PCR model only contains the data of principal components which are less than the data carried by the MLR model or the ANN model. The performance of the MLR model is a little better than that of the ANN model. Even though the fitting accuracy of the PCR model is the worst, it can reach about 89% which is still very high.
4.6. Experimental Verification of the Positioning Error Modeling
Subsequently, the robustness and predictive accuracy of the positioning error modeling were verified based on another set of experimental data (abbreviated as experiment II). The temperatures are plotted every 10 min in
Figure 15, and the positioning error can be observed in
Figure 16, where the feed rate is 15 mm/s and the acceleration is 8 mm/s
2 to warm up the machine tool. The temperature of experiment II is different from experiment I. Environment temperatures of the room in two experiment are the main differentia. Experiment I was conducted in the daytime and experiment II was in the evening. Sunshine and central heating were also different.
When the machine tool had been warmed up for 40, 120, 160, and 220 min (represented by the numbers 0, 1, 2, and 3), the measured positioning errors were compared with the predicted positioning errors calculated by three positioning error models. The modeling results are shown in
Figure 17,
Figure 18 and
Figure 19, the residual error can be seen in
Figure 20, and the details of each positioning error curve can be observed in
Figure 21. The performances of three models are evaluated in
Table 21. The prediction accuracy of the PCR model can reach about 86%, which is the highest. The prediction accuracy of the MLR model is higher than that of the ANN model.
In experiment I, the fitting accuracy of the PCR model is the lowest. However, in experiment II, the prediction accuracy of the PCR model is in fact the best. The selection method of the temperature-sensitive points in this paper, to some extent, can reduce the multi-collinearity among the input variables. However, when the input variables are selected, what should be first considered is that the fitting accuracy of the error model is the highest. Therefore, multi-collinearity still exists among the selected input variables. Then PCR is applied to establishing the thermal error model which does not have the problem of multi-collinearity. The prediction accuracy of the PCR model is better than that of the other two models, which means that the PCR model is of strong robustness.
If the model had the problem of multi-collinearity, when the conditions of the experiment changed, i.e., the distribution of temperatures was different, the prediction accuracy would degrade. Therefore, the PCR model is more suitable for thermal error modeling.