1. Introduction
Errors of machine tools can be classified into quasi-static errors and dynamic errors [
1]. Quasi-static errors include geometry errors [
2], load-induced errors [
3], etc., of which thermal error is also an very important part, greatly influencing the accuracy of the machine tools [
4,
5], and may account for up to 40%–70% of the total error [
6,
7]. Thermal error compensation is considered as one of the most effective methods to alleviate the influence of the thermal error [
8,
9], in which the temperature field and the thermal error of the machine tool are firstly measured then, according to the measured data, thermal error model [
10,
11,
12] is established to predict the thermal error of the machine tool and the prediction is transmitted into the numerical control (NC) system to complete the compensation. Among the whole procedure, temperature sensor location selection is considered an important step. Although a large number of temperature sensors are placed in the machine tool to obtain the whole temperature field containing detailed temperature information, not every one of them is required [
13,
14,
15] in thermal error modeling. There are some reasons: firstly, more temperature sensors lead to a more complex thermal error model, greatly increasing the cost of software and hardware in the establishment of a compensation system; secondly, some sensors may contain similar information that would reduce the stability and accuracy of the model, and a bad selection of them would lead to a poor prediction of the thermal error model. Thus, proper temperature sensors are needed to be selected.
A “sensors-near-heat source” method was firstly used for selection in which the selected sensors are near heat sources. It is obvious that the “sensors-near-heat source” method is not a scientific method and it may ignore some key sensors that not close to heat sources. Thus, some mathematical methods were introduced by researchers to guide the selection of proper temperature sensors [
16,
17,
18,
19,
20]. Lo [
21] established an optimization objective function by a modified model adequacy criterion based on the Mallow’s
Cp statistic and used a discrete domain search method for the selection. Li [
22] and Yan [
23] introduced grey correlation theory to select proper sensors. Lee [
24] used the Optimal Brain Surgeon (OBS) method to eliminate sensors with insignificant information. In recent years, clustering methods have also been used to select proper temperature sensors. The core concept of a clustering method is to cluster sensors into clusters (groups). Then, one most representative sensor of each cluster is selected to form the final selection. This kind of method has been the most widely used one since it can reduce redundant temperature information. Many clustering algorithms have been used by researchers, such as K-means clustering [
7], fuzzy C-means clustering [
25,
26,
27], etc. Additionally, new measuring instruments have also been used for the selection recently. Abdulshahed [
28] used a thermal imaging camera to obtain the thermal images and then key sensors were identified. In summary, all of the above methods can effectively select proper temperature sensors and also guarantee a high-accuracy thermal error model.
It can be concluded from the above references that one common thing in these methods is deriving an indicator that describes the difference between the temperatures of the sensors. The indicator that can more effectively describe the real difference between sensors leads to a better selection. Therefore, in this paper, a new indicator was firstly derived. Considering the Euclidean distance between the value of temperature sensors can describe their physical distance on the machine tool, and the correlation coefficient depicts the similarity of the variation of the value of temperature sensors, they were both included in the new indicator. Then, the indicator was expressed as the form of distance matrix to be used in a hierarchical clustering method [
17] to cluster temperature sensors. During the clustering process, there are two parameters, the weight coefficient and the number of the clusters, which remains to be optimized. Due to the high-nonlinearity of the problem, the parameters were optimized by a genetic algorithm (GA) [
29,
30,
31], and the fitness function of the GA was also rebuilt. By establishing the thermal error model at one rotation speed and then deriving its root mean square error (RMSE) at two different rotation speeds with a small temperature disturbance, the value of the fitness function is defined as the average RMSE. Thus, the optimized parameters were derived. Meanwhile, the final selection of the temperature sensors were also derived during the GA process.
The method proposed in this paper was verified on a heavy floor-type milling machine tool. According to the method, three temperature sensors were selected from 23 options. Based on the selected temperature sensors, the thermal error model was established to predict the thermal error at different rotation speeds. Then, the accuracy of the prediction was compared to the prediction derived from different temperature sensor selection methods (clustering only based on Euclidean distance, clustering only based on the correlation coefficient, temperature sensor selection based on the “sensors-near-heat source” method, etc.). The result indicates that the method in this paper can derive better accuracy for different rotation speeds, so the effectiveness of the method is proved. The method in this paper is expected to be applicable to temperature sensor location selection of other machine tools.
In summary, the structure of the paper is illustrated as follows: the structure of the investigated milling machine tool is introduced in
Section 2; the temperature sensor clustering method is presented in
Section 3; in
Section 4, the verification of the method is introduced; and the conclusions are shown in
Section 5.
2. Structure of the Investigated Machine Tool
In this paper, a heavy floor-type milling machine tool (type: BHBM200, Beijing No. 1 Machine Tool Plant, Beijing, China) was chosen as the object to analyze. The configuration of the machine tool is shown in
Figure 1, which is a four-axis machine tool, composed of five main parts: (1) guide way; (2) pillar; (3) headstock; (4) ram; and (5) spindle. The four axes are
-axis,
-axis,
-axis, and
-axis, respectively. The pillar moves horizontally on the guide way along the
-axis; the headstock moves vertically on the pillar along the
-axis; the ram moves forward and backward in the headstock along the
-axis; and the spindle moves forward and backward in the ram along the
-axis. The
-axis and
-axis are parallel to each other. According to the pre-experiment, heat was mostly generated in the ram and the spindle of the machine tool, and most of the thermal errors lie in the direction of
-axis of the ram. The pillar and headstock contribute a small amount of the thermal error.
In order to derive the detailed temperature field of the machine tool, 23 Pt100 temperature sensors (type: STT-F, Beijing Sailing Technology Corporation, Beijing, China) were placed on the machine tool. The resolution of the sensors is 0.1 °C, which meets the demand of the measurement. These sensors were mainly placed in the ram of the machine tool, which has the most obvious temperature change, and some other sensors were placed on the pillar and the headstock. Some sensors were also placed at the inlet and outlet of the oil, since the temperature of the oil can indicates the temperature where temperature sensors cannot be placed. The list of the locations of the temperature sensors is shown in
Table 1. The temperature rise of the sensors were recorded by a computer software.
Thermal error of the machine tool was also measured. A measurement bar was installed on the spindle and then three charge coupled device (CCD) laser displacement sensors (type: ILD1700, Micro-Epsilon Corporation, Ortenburg, Germany, and type: LK-H020, Keyence Corporation, Osaka, Japan) were placed along the axial and radial directions of the bar to measure the thermal error along the
-axis,
-axis, and
-axis, respectively, as shown in
Figure 2. The resolution of the CCD laser sensors is 0.1 μm, which also satisfies the demand of the measurement.
4. Verification of the Method
The effectiveness of the above method was verified by an experiment. The selected temperature sensors were used to establish the model to predict the thermal error of the machine tool and compared to other temperature sensor selection methods. In order to verify whether the selected temperature sensors can be used at different spindle rotation speeds, firstly the machine tool was operated at 1200 rpm and 2000 rpm, respectively, to generate the data for establishing the thermal error model, and then verify its prediction accuracy at other rotation speeds.
According to
Table 3, temperature sensor No. 10 (oil of the gear box), No. 14 (hydrostatic oil of the spindle), and No. 21 (near the spindle motor) were selected after optimization. Multiple regression analysis (MRA) [
32,
33,
34] was used to establish the model. Since the thermal error along the
-axis contributes most of the thermal error, the thermal error along
-axis was considered in the model. Through MRA, the thermal error model was derived as follows:
in which, the value of temperature rise was used, so the constant term of the model is zero. Then, four comparison groups with different temperature sensor selection methods were established, in which the models were all established by MRA to make sure the differences between groups are mainly caused by the temperature selection method.
As for the first comparison group, temperature sensors were clustered and selected only considering the Euclidean distance between the temperature sensors. Three temperature sensors (No. 4 (upper surface on the rear of the ram), No. 18 (cooling water of the spindle motor), and No. 21 (near the spindle motor)) were selected. Then the thermal error model was established:
As for the second comparison group, temperature sensors were clustered and selected only according to the correlation coefficient between temperature sensors. Three temperature sensors (No. 10 (oil of the gear box), No. 16 (inlet of the cooling box), and No. 21 (near the spindle motor)) were selected to establish the thermal error model:
In the third comparison group, only one temperature sensor was selected. Considering temperature sensor No. 21 (near the spindle motor) has the minimum model prediction error among all sensors, temperature sensor No. 21 was selected to establish the proportional model of thermal error:
In the fourth comparison group, temperature sensors were selected according to the “sensors-near-heat source” method, in which the temperature sensors that were placed near the heat source of the machine tool, as well as the sensors reflecting the temperature of the environment, were selected. Thus, four sensors (No. 21 (near the spindle motor), No. 15 (surface of the worktable), No. 22 (near the hydrostatic oil in the ram), and No. 23 (environment temperature near the pillar)) were selected to establish the thermal error model:
After the establishment of the models, the machine tool was operated at 1000 rpm to verify the accuracy of the model. Since the rotation speed was not within the range of the rotation speed that was used to build the thermal error model, the universality of the selected temperature sensors can be verified. Comparisons of the accuracy of these models are shown in
Figure 9, and the RMSEs and maximum deviations are shown in
Table 4.
According to
Figure 9 and
Table 4, the conclusions can be drawn that the method in this paper can derive the best model accuracy, and the predicted thermal error can depict the general trend of the thermal error, as well as the small variation of the thermal error caused by the cooling water. For the maximum deviation between the predicted thermal error and the measured thermal error, the method in this paper still has the lowest value among all the compared methods.
As for the first comparison group, only the Euclidian distance of the temperature sensors were considered, which would cause there to be one dominated temperature sensor among the selected sensors because its variation amplitude is much larger than the others. Thus, some information would be lost and the accuracy of the prediction is poor. The small variation caused by cooling water cannot be predicted either.
As for the second comparison group, only the correlation coefficient of the sensors were considered. Thus, some temperature sensors that only have very small amplitudes would be clustered with temperature sensors that have large amplitudes, and probably be selected. Thus, although they can predict the variation caused by the cooling water, they failed to derive an accurate amplitude of the thermal error.
As for the third comparison group, only one temperature sensor was included. This is similar to the first comparison group. Thus, the accuracy of the prediction would be lower, and the variation caused by cooling water cannot be predicted either.
As for the fourth comparison group, temperature sensors near the heat sources and temperature sensors of the environment were selected. It seems that this method contains the main information of the heat sources. However, most of the heat sources have very similar temperature variation when the machine tool is working, so there is very high collinearity when establishing the thermal error model, resulting in instability. The model might have high accuracy for the same rotation speed as the measurement. However, when predicting the thermal error at another rotation speed, the accuracy is much lower.
In order to further verify the effectiveness of the temperature selection method in a more real working condition, the machine tool operated according to a schedule that simulated the working process of the machine tool, as shown in
Table 5, in which the spindle of the machine tool rotated at different rotation speeds and also paused for a period of time during working. Then the thermal error prediction accuracy of the method in this paper was also compared to other comparison groups. The results are shown in
Figure 10 and the RMSEs and maximum deviations are shown in
Table 6.
According to the result, although the rotation speed in the verification is far less than the speed when establishing the model (1200 rpm and 2000 rpm), the method in this paper can still derive a predicted thermal error that has better accuracy. The results show that both the RMSE and the maximum deviation of the method are smaller than the other considered temperature sensor selection methods.
As for Comparison Group 1, it has one dominated temperature sensor that was placed near the heat source and has a larger amplitude. Since the model is established at high rotation speed (1200 rpm and 2000 rpm), the dominated temperature sensor usually overestimates the thermal error when the rotation speed is low (300 rpm or 500 rpm). This is because, at lower speed, the heat generated by the heat source reduces, but the temperature near the heat source may not reduce significantly, while the other selected temperature sensors cannot remedy this problem since they are similar to the dominated sensor. As for comparison groups 3 and 4, they would have the same problem since the sensors are all placed near the heat source.
As for Comparison Group 2, the accuracy is better since the clustering is based on the correlation coefficient. The selected sensors are not similar, reducing the collinearity of the model and improving its stability for different rotation speeds. However, its accuracy is still not better than the method considering both the Euclidean distance and correlation coefficient.
Thus, according to the results, the effectiveness of the temperature clustering method in this paper is confirmed, and this method is expected to have a wide applicability for different working conditions.
5. Conclusions
In this paper, a new temperature sensor clustering method is derived for the selection of sensor locations. An indicator comprehensively considering both the Euclidean distance and the correlation coefficient was proposed to reflect the difference between them. Then, the indicator was expressed as the form of distance matrix, which was used in hierarchical clustering. A genetic algorithm (GA) was used to optimize the parameters in clustering, and the fitness function of the algorithm was also rebuilt. After the optimization by GA, the proper parameters for clustering were derived, as well as the final selection of the temperature sensors. Finally, the effectiveness of the method was verified and compared to some other temperature sensor selection method through an experiment on a heavy floor-type milling machine tool. Conclusions can be drawn according to the experiment results:
The RMSE of the method is 0.0118 mm at 1000 rpm and 0.0200 mm at near-real working conditions. The maximum deviation of the method is 0.0227 mm at 1000 rpm and 0.0434 mm at the near-real conditions. The accuracy is better than all other comparison groups and also meets the demand of manufacturing. It can also be found that all the groups appeared overestimating at a much lower rotation speed, while the method in this paper can better control this phenomenon. These above conclusions proved the effectiveness of the method to be used in the thermal error modeling of the machine tools.
Additionally, it can be found that, on the basis of a proper temperature sensor selection, a simple model can also guarantee an accurate and stable prediction of thermal errors. Actually, a much more complex error model would lead to more instability, influencing its application in engineering. This conclusion emphasizes the importance of temperature sensor selection for thermal error modeling.
Future work will increase the initial number of temperature sensors for the method, adjusting the structure of the combination of the Euclidian distance and correlation coefficient (not just linear superposition), and applying the method to another machine tool.