Temperature measurement point optimization and experimental research for bi-rotary milling head of five-axis CNC machine tool

Thermal deformation is the main factor affecting the machining accuracy of the bi-rotary milling head. To accurately determine the temperature-sensitive points of the bi-rotary milling head to suppress thermal deformation, this paper adopts back propagation (BP) neural network sensitivity analysis method with improved connection weights to optimize the temperature measurement points. The analysis results are subjected to randomized mean value processing to reduce the randomness of the initialization of the prediction model. The number of temperature measurement points is reduced from 15 to 4. Taking the 5AS01 direct-drive bi-rotary milling head as an example, a thermal-structural coupling model is established to analyze its thermal characteristics. The capillary copper tube cooling suppression experiment is arranged according to the position of the temperature-sensitive points. The experimental results show that cooling the temperature-sensitive points can simultaneously reduce the thermal error in X- and Z-directions by about 58%, providing a basis for the bi-rotary milling head to improve machining accuracy.


Introduction
The bi-rotary milling head (hereinafter referred to as milling head) is the core of the five-axis NC machine tools. It is used chiefly to process complicated surfaces such as impeller and propeller, reflecting the manufacturing level of high-end equipment. Compared with the three-axis machine tool, the five-axis machine tool has two more rotating axes, which can be more flexible for surface processing with higher precision. So it can complete multiple processing procedures in one clamping [1], reducing the positioning errors caused by multiple clamping and improving the accuracy of the workpiece. Due to the influence of multiple heat sources during the machining process, a non-uniform temperature field is formed inside the milling head, resulting in a different temperature rise of each component, which generates different degrees of thermal deformation and ultimately affects the machining accuracy of the machine tool. Some experiments show that the thermal error caused by thermal deformation accounts for 40~70% of the total error [2]. At present, many domestic and foreign scholars have conducted in-depth and extensive research on the thermal characteristics of the milling head.
Since the thermal error is affected by several factors such as temperature gradient, cooling system, and ambient temperature, it presents time lag, time variation, and nonlinearity [3]. It is difficult to construct an accurate mathematical model according to its mechanism, so the thermal error is usually described by finite element simulation analysis. Sun et al. [4] simulated the temperature field diagram of the milling head, and the high temperature is mainly concentrated in the motorized spindle. When the spindle is running, the high-speed rotation of the spindle leads to a significant increase in the temperature of the spindle and the A/C axis [5]. To analyze the spindle thermal error closely related to the bearing thermal characteristics, Liu et al. [6] proposed an analytical modeling method based on thermal-fluid-structure coupled finite element simulation. It was concluded that the bearing radial thermal deformation was the dominant factor of spindle thermal displacement. Lin et al. [7] used finite elements to analyze the C-axis transmission part of the milling head and found that the torsional deformation of the spacer greatly influenced the C-axis transmission. In addition to finite element simulation, many scholars also conduct thermal network analysis based on the mechanism or build a neural network prediction model to predict thermal error. Zhou et al. [8] combined the thermal-mechanical coupling effect to strengthen the thermal network model of the motorized spindle, and the error of the prediction results was less than 8%. Yan et al. [9] carried out a transient thermal analysis of the spindle combined with the thermal network method and considered time-varying parameters and thermal-structural coupling. Scholars have proposed various modeling approaches to make the thermal error prediction model with high accuracies, such as neural networks, support vector machines, gray system theory, and optimization algorithms. Guo et al. [10] proposed an artificial bee colony neural network (ABC-NN) modeling method to train the connection weights and make the residual error less than 3 μm. Abdulshahed et al. [11] optimized the model parameters by varying the number of inputs and affiliation functions, reducing the error by 95%. Wu et al. [12] used convolutional neural network (CNN) to extract and learn the features of the C-axis thermal image and predicted the localization error under different temperature conditions. Various modeling methods have shortcomings such as prematurity and a large amount of calculation. To solve this problem, Li et al. [13] integrated the artificial fish swarm algorithm, ant colony algorithm, and neural network and constructed an online prediction model of thermal deformation by combining spindle thermal deformation and temperature data. In these studies, the establishment of the model requires the acquisition of temperature data through temperature sensors. Too many sensors will lead to complex models, and too few sensors will make it difficult to ensure model accuracy.
As the world enters the era of big data, scholars pay more and more attention to data analysis. Data sensitivity analysis methods are mainly divided into two based on mathematical statistics and neural networks. Tunkiel et al. [14] proposed a data-driven sensitivity analysis method based on machine learning models but over-reliance on input data. Arnst et al. [15] used mathematical statistics to obtain the characteristics of elastoplastic material and determined the characteristics that have the most significant on deformation based on stochastic sensitivity analysis. Guo et al. [16] combined the Morris method in mathematical statistics and the grey correlation analysis method to determine the weight coefficient to correct the comprehensive model. The research methods of neural network local sensitivity analysis mainly include partial derivative-based, connection weight-based, and perturbation-based methods. Jiang et al. [17] combined the randomization test method with three sensitivity analysis methods respectively. Then, the constructed prediction model to determine the main factors affecting the output change of the model was analyzed. To reduce the disturbance of the initial data, Yang et al. [18] proposed the neural network thermal error prediction model that could identify the critical thermal stiffness of the machine tool, constructed a temperature transfer matrix, and judged the critical thermal stiffness of the machine tool according to the value of thermal error variation. These studies show that the two sensitivity analysis methods can accurately calculate the sensitive terms of the model and accurately describe the model characteristics with fewer parameters.
The most direct and effective way to reduce thermal errors is to cool with coolant or industrial cold air. Du et al. [19] proposed a cooling air diversion channel, which distributes cold air by setting up deflectors, but the cooling efficiency is low, and the durability of the cold air is not high. Due to the general effect of air cooling, so the machine tool thermal deformation is often used to cool the liquid cooling method. Liquid cooling often uses different water jacket structures, Zhang et al. [20] designed a tree-like miniature channel for cooling, which increases the cooling area of the coolant by increasing the end branches to distribute the temperature evenly. Li et al. [21] compared the cooling effect of the cell under various cooling schemes and found that the cooling scheme of copper tube liquid cooling combined with thermally conductive silica gel had the best cooling effect. In summary, the liquid cooling effect is better than air cooling, and it is easy to achieve a balanced heat dissipation using copper tube liquid cooling. So this paper adopts this method to conduct cooling experiments.
Some of the analyses mentioned above are mainly based on the finite element method to analyze the thermal performance of the milling head, find out the severe heating parts, and predict the thermal errors based on the sensitivity analysis or the construction of a neural network prediction model. Nevertheless, they neglect to screen out temperature-sensitive points for cooling suppression. When the neural network model has many parameters or the relationship between the parameters and the output is nonlinear, it is more challenging to get accurate results based on mathematical statistics by the sensitivity analysis method. However, due to the complex thermal deformation mechanism of the milling head and the nonlinear relationship between the parameters and the output, the sensitivity analysis method based on mathematical statistics is not suitable for analyzing the thermal error model of the milling head.
This paper is mainly aimed at the problem that the temperature rise of the milling head shell (hereinafter referred to as shell) causes the thermal error at the end of the motorized spindle, constructs a mathematical model of the neural network to describe the shell thermal deformation, uses the sensitivity analysis algorithm to calculate the sensitivity of the input data, and then combines the randomized mean value method to reduce the fluctuation of the sensitivity coefficient and optimize the selection of temperature-sensitive points. Finally, cooling experiments are arranged to verify the accuracy of the algorithm according to the temperature-sensitive points, providing a theoretical basis for the milling head to suppress thermal deformation.

The mechanical structure of the milling head
The milling head mainly includes the A/C axis, motorized spindle, shell, and some connecting parts. This paper takes the 5AS01 direct-drive milling head as the research object, and its structure is shown in Fig. 1. The highspeed motorized spindle and rotor are connected by interference, and the torque of the built-in motor is transmitted to the spindle. The built-in motor power is enormous, and the stator and rotor generate heat seriously. Therefore, a cooling water sleeve is installed outside the built-in motor. The shell is the mounting base for the main parts of the milling head and the motorized spindle, and the motorized spindle is fixedly connected to the A/C axis, where the C-axis can achieve ± 360° rotation around the Z-axis, and the A-axis drives the motorized spindle to swing around the X-axis at ± 110°. By adding two degrees of freedom to the machining center, the five-axis linkage can be realized to complete the machining of complex surfaces with high precision.

Calculation of thermal boundary conditions
The direct-drive milling head is directly driven by a torque motor, so the heat source mainly considers the heat generation of the motor and ignores the heat generation of the bearing and the cutting heat. The motor heat mainly includes the heat generation of the A-axis and C-axis motors and the motorized spindle motor. The A-axis motor is directly connected to the shell, and the C-axis motor rotor is connected to the shell through the connecting piece. Assuming that all the losses generated by the motor are converted into heat, the heat generation rate can be calculated by Eq. (1). Since the temperature of the external environment remains constant, the heat generated inside the milling head is mainly exchanged through heat conduction and heat convection. Heat conduction can be calculated by setting parameters in the software. Heat convection is divided into natural convection and forced convection. The convective heat transfer coefficient h can be calculated according to Eq. (2) [22].
In the formula: P loss is the power loss (W); η is the efficiency; P 0 is the rated power (W), q is the heat generation rate (W/m 3 ); Q is the thermal power (W); and V is the volume of the heat source (m 3 ).
In the formula, λ is the thermal conductivity of the fluid(W/(m·K)), Nu is the Nusselt number, L is the

Analysis of temperature field of milling head
The internal structure of the milling head is complex, and small parts and structures such as screws, holes, chamfers, and rounded corners need to be ignored in the modeling to prevent such small structures from affecting the mesh division. The 3D model was imported into the ANSYS platform and the material parameters of each part was set. The entire model has meshed with hexahedral cells, and the mesh is encrypted for some crucial locations. The primary heat source of the milling head is the motor heat of the motorized spindle and the A/C axis. Tables 1 and 2 are combined to set up the boundary conditions and perform finite element analysis on the milling head.
At rated speed, the steady-state temperature field results of the milling head and shell are shown in Fig. 2a. After the temperature field of the milling head reaches a steady state, the highest temperature is located at the rotor axis of the motorized spindle, which can reach 78.054 °C, followed by the rotor of the C-axis and A-axis motors, respectively. As the internal structure of the motorized spindle is compact, the airflow heat dissipation effect is poor, and there is no cooling water for heat dissipation, so its temperature is the highest. Although the heat generated by the stator accounts for 2/3 of the heat generated by the motor, the cooling water sleeve installed outside the motor stator can effectively reduce the temperature, making it much lower than the rotor. The A/C axis motor has a larger shaft center space, the heat dissipation effect is excellent, and less heat generation than  the motorized spindle, so the temperature rise is relatively lower.
As the most significant connecting piece in the milling head, the shell is connected to the primary heat source and has a high-temperature rise. The highest temperature is at hole A where the shell is connected to the A-axis, and the temperature of hole A is low above and high below. The maximum temperature variation at the milling head, shell, and heat source is analyzed. As shown in Fig. 3a, the highest temperature of the milling head tends to be stable after 1600 s. However, the highest temperature of the shell tends to be stable after 6400 s, which is because the motorized spindle rotor with the highest temperature in the milling head is not directly connected with the shell, and the cooling water sleeve is arranged outside the stator of the motorized spindle, which further slows down the heat transfer to the milling head.

Analysis of thermal deformation field of milling head
The maximum thermal deformation of the milling head (in Fig. 2b) is located at the end of the motorized spindle, which is 0.19076 mm. From the temperature field of the milling head, it can be seen that the temperature of the motorized spindle core is the highest, so the transient thermal error diagram of the motorized spindle end is derived. As shown in Fig. 3b, the Y-directional thermal error in the displacement is the smallest and leveled off after about 2500 s. Z-direction thermal error is the largest and tends to be stable after about 6400 s. X-direction thermal error is the slowest stable, and it first varies along the X-negative direction, and then changes along the X-positive direction. This is because in the initial stage, the thermal deformation of hole A is small, and the thermal error changes in the negative direction due to the influence of the motorized spindle. Hole A is connected to the motorized spindle, and the heat from the motorized spindle and the A/C axis is gradually transferred to hole A. The thermal deformation of hole A causes the end of the motorized spindle to shift and begin to deform in the X-positive direction. From the analysis, it can be concluded that the motorized spindle Z-direction and X-direction thermal errors are the primary error sources of the milling head. 5AS01 model milling head is an offset direct-drive milling head with a symmetrical structure in the Y-direction. The Y-direction maximum thermal error is located at the side of the shell and is symmetrical. As shown in Fig. 3a and b, the Y-direction thermal error stabilization time of the motorized spindle is much earlier than the maximum temperature smoothing time of the shell. So the Y-direction thermal deformation of the shell has a negligible effect on the thermal error of the milling head. The asymmetry between the X-and Z-directions significantly influences the thermal error of the milling head. Among them, the Z-direction thermal error is the largest, and the Z-direction thermal error stabilization time is consistent with the highest temperature stabilization time of the shell. So the Z-direction thermal deformation of the shell significantly influences the thermal error of the milling head. The high-speed motorized spindle has high power and serious heat generation. When the heat is gradually conducted to the shell, hole A is thermally expanded, resulting in a more considerable X-direction deformation, so the X-direction thermal error is significant.

Thermal deformation experiment and sensitivity analysis algorithm
The robustness of the model is affected due to errors in temperature acquisition and linear coupling between different temperature measurement points. Temperature-sensitive points are optimally selected from 15 temperature measurement points to ensure the accuracy of the BP neural network model input. First, the heating experiment is carried out to collect temperature and thermal displacement data, and the influence of thermal deformation on the thermal error of the motorized spindle is analyzed. Then, based on the sensitivity analysis method of improving connection weights, the temperature-sensitive points are optimized and selected, and the points with higher sensitivity coefficients are used as temperature-sensitive points for cooling suppression.

Heating experiment
As the enormous connection of the milling head, the shell is connected to the three motors on the milling head at the same time, and the change in its temperature field and thermal deformation field will have a direct impact on the displacement of the tooltip, which results in a large machining error. Therefore, the heating experiment is performed on the shell.

Experimental scheme
The experiment uses 15 PT100 temperature sensor probes and two displacement sensor probes. Using the temperature real-time monitoring device and the position real-time monitoring device to transfer the collected data to the computer, the software accompanying the collector controls the sampling frequency. The overall process of the heating experiment is shown in Fig. 4. Figure 5 shows the overall experimental setup and the position of the displacement sensor. Two eddy current sensors measure the thermal displacement data, where X 1 measures Z-direction thermal displacement and X 2 measures X-direction thermal displacement. The temperature detection points of the shell are shown in Fig. 6. The heat source detection points are T5, T6, T7, and T14, and the air detection point is T15.

Experimental results and data analysis
The experiment is set to sample the temperature and displacement data at an interval of 5 s, at which time the temperature and displacement data of each detection point tend to be stable. The temperature data are organized as shown in Fig. 7a. The contact area between the shell and the C-axis is large, and the heat is quickly transferred. While the contact area with the A-axis is relatively narrower, so the temperature of T6 is higher than the temperature of T14 under the same voltage. Among the non-heat source detection points, the temperature rise at the detection point near hole A is higher than at other points, especially at the bottom of the shell (T1), where the highest temperature rise is up to 5 °C. This is due to the high temperature caused by the structure of the shell itself. The highest tsemperature position is T2 at the bottom position of hole A, but it is lower than T1, T3, and T4 in the experiment, which is because the heat failed to transfer to the back cover faster in the heating experiment, so the temperature of these three points is high.
The thermal displacement change curves at X 1 and X 2 are shown in Fig. 7b, and the X-and Z-directional displacements measured by the displacement sensor grow negatively. After the shell is heated for 5.5 h, the maximum thermal error in the Z-direction reaches about 0.034 mm, and the maximum thermal error in the X-direction reaches 0.014 mm. So the Z-direction thermal error in the heating experiment is much larger than that of the X-direction, which is consistent with the conclusion from the thermal deformation simulation analysis and verifies the accuracy of the simulation analysis.

BP neural network
The neural network is a mathematical model imitating bionic nerves, and its design parameters mainly include the number of network layers, the number of neurons in the input layer, hidden layer, and output layer. It can realize complex nonlinear mapping and is suitable for solving Fig. 4 Heating experiment process problems with internal mechanisms. A single hidden layer BP neural network is used to construct the thermal error prediction model of the part, which reduces the number of parameters of the neural network and the uncertainty of the model. As shown in Fig. 8, the BP neural network has n inputs, k outputs, and j hidden layer neurons. Where x t n is the n-th input of the t-th sample of the neural network, b 1 and b 2 are the biases, and the functions f(·)and g(·) use the Sigmoid function as the activation function of the hidden layer and output layer. The w nj is the weight from the input layer to the hidden layer, v jk is the weight from the hidden layer to the output layer, and the update formulas of w nj and v jk are as Eq. (3) [23].
where η is the learning rate and e k is the output expectation.
The input q t j of the j-th neuron in the hidden layer under the t-th sample generates the output α t j under the action of the hidden layer function, that is w nj x t n + w 0j b 1 The input r t k of the k-th output neuron of the t-th sample generates the output result y t k under the action of the output layer function, that is

Sensitivity analysis method based on improved connection weights
Sensitivity analysis can quantitatively evaluate the impact of changes in model input variables on the output results and is an effective way to reveal the laws embedded in the model. To accurately water-cool the parts with severe shell heating, this paper uses the BP neural network combined with the sensitivity analysis method to screen out the temperaturesensitive points for cooling. In the experiment, the shell heat source detection points (T5, T6, T7, T14) and air detection point temperature data are excluded firstly, and the neural network prediction model is constructed with the temperature and displacement detection point data. Then, the BP neural network prediction model is subjected to sensitivity analysis using the sensitivity analysis method based on connection weights, and the sensitivity coefficients in the detection points are sorted. Among the sensitivity analysis methods, the Garson algorithm is relatively classic, which mainly calculates the sensitivity coefficient of the input parameters according to the weights in the BP neural network. The disadvantage is that the positive and negative effects of the weights are ignored, which leads to the deviation of the final calculation results. The improved sensitivity analysis method can reflect the positive and negative correlations between input and output, and the sensitivity coefficient S nk,olden of this method can be obtained by Eq. (6) [24]. It is assumed that the neural network has N input layer neurons, J hidden layer neurons, and K output layer neurons.
Due to the randomness of BP neural network initialization, there will be some concatenation in the output sensitivity coefficient results, and the instability caused by random initialization needs to be weakened. The randomized mean value method is finally introduced, and the mean value of multiple sets of data is taken after randomizing the parameters, making the calculation result stable. The steps are as follows: (1) Determine the BP neural network structure. The input layer nodes are temperature-sensitive points, and the nodes of the output layer are their respective sensitivity coefficients. (2) Initialize the grid and related parameters of the model, and input the data of temperature-sensitive points for training. (3) Calculate the sensitivity of neural network input based on the sensitivity analysis method of improved connection weights. (4) Repeat steps (2) and (3) 2000 times. (5) Calculate the overall mean of the sensitivity coefficient and the effect of each result on the mean value, evaluate whether the sensitivity coefficient is stable, output and sort. (6) Repeat steps (1) to (5) 3 times. Output the results of the three randomized mean processing and verify the sensitivity ranking accuracy. The randomized mean processing procedure is shown in Fig. 9.
The sensitivity coefficient of the input temperature is calculated by MATLAB combined with Eq. (6), and the model is subjected to random mean value processing. After 2000 calculations and three randomization averages, Fig. 9 Steps of randomized mean value method for sensitivity coefficients the fluctuations are significantly reduced. One of the Zand X-direction sensitivity coefficient calculation results wass derived, as shown in Fig. 10. In the initial stage, the Z-direction and X-direction sensitivity coefficients fluctuated wildly. After 600 calculations, the overall fluctuation of the sensitivity coefficient is slight, and after 2000 calculations, it becomes stable. This indicates the high reliability of the sensitivity coefficient results after random mean processing, eliminating the instability caused by random initialization.
The sensitivity coefficients of each temperature measurement point are obtained by sensitivity analysis. The results of sensitivity analyses are shown in Fig. 11. T1 and T4 have high sensitivity coefficients, which have the most significant effect on the thermal error. T8 has a higher X-directional sensitivity coefficient, and T11 has a higher Z-directional sensitivity coefficient. This indicates that T8 has a more significant effect on the X-direction thermal error and T11 has a more significant effect on the Z-direction thermal error. T3 has the lowest sensitivity coefficient and has almost no effect on the thermal errors. The results of three randomized mean value methods are shown in Table 3. The sensitivity coefficients of T1, T4, T11, and T8 are higher, and the differences between the three sensitivity coefficients of Z-direction and X-direction are tiny. It can be seen from the table that the ranking of the sensitivity coefficients is basically the same after using the randomized mean value method.

Cooling suppression experiment
Combined with temperature measurement point optimization results, points T1, T4, T8, and T11 with high sensitivity coefficients and point T3 with low sensitivity coefficients are selected as cooling points, and capillary copper tubes are used to cool them. The capillary copper tube uses W-shaped, O-shaped and straight-shaped to cool the iron block to test which shape has the best cooling effect. After testing, it is found that the cooling effect of the straight-shaped tube is better than the W-shaped and O-shaped capillary copper tube, so the cooling experiment using the straight-shaped tube way to carry out.

Experimental scheme
The cooling system mainly includes a water cooler, flow meter, ball valve, capillary copper tube, and relief valve, which are connected as shown in Fig. 12. The water cooler uses air cooling to ensure the cooling water temperature, making the temperature of the cooling position close to room temperature and reducing the temperature gradient difference. The outlet end is connected to a flow meter to detect the magnitude of the flow rate. The two ends of the ball valve are connected to the flow meter and the capillary copper pipe connector to control the size of the flow of coolant into the capillary copper pipe. The length of the capillary copper tube is about 80 mm, and there are two snap rings inside the joint to effectively prevent coolant leakage. The pipeline is connected with a relief valve to prevent coolant leakage due to excessive pressure in the pipeline. The PC internal and external threads connect the pipelines between each part.
For a more straightforward comparison of temperature changes and considering the installation arrangement, the cooling locations were all near the heat-sensitive points, and the final locations of the five cooling points are selected in Fig. 13. The copper tube is installed with heat-conducting silica gel at contact with the shell to play the role of heat transfer uniformity and vibration damping. Before the experiment, it is detected that the vibration of the displacement detection point caused by the capillary copper tube flowing water is less than 0.7 μm, which can be ignored.

Experimental results and data analysis
To accurately obtain the cooling effect, S0 is set as the control group without cooling after heating, and the thermal error data of the six experimental groups are compared. From Fig. 14a and b, it can be seen that S1 has the best effect, which can reduce the thermal error in both the X-and  High  T1  T1  T1  T1  T1  T1   Low   T4  T4  T4  T4  T4  T4  T11  T11  T11  T8  T8  T8  T8  T8  T8  T11  T11  T11  T10  T9  T9  T9  T9  T9  T9  T10  T10  T12  T10  T10  T2  T2  T2  T10  T12  T12  T13  T13  T13  T13  T13  T13  T12  T12  T12  T2  T2  T2  T3  T3  T3  T3  T3  T3 Fig. 12 Cooling experimental instrument connection Z-directions by about 58%. If only X-directional thermal errors are considered, S1 converges and becomes stable in a short time. However, the vibration of the cooling water causes slight fluctuations in the X-directional thermal error of S1. The Z-direction thermal error of S3 also converges faster. Due to the close distance to the heat source, S3 has a greater impact on thermal error, and the stabilization time and cooling effect are second only to S1. The Z-directional cooling effect of S5 is better than that of S4, and the X-directional cooling effect is almost the same. S2 cooling effect is consistent with the uncooled state. There is a miniature vibration after passing cooling water, which leads to fluctuations in measuring the thermal error. Since the gravity of the milling head is vertically downward, it makes the fluctuation of the thermal error in Z-direction less than in the X-direction. The cooling effect of S2 is the same as the uncooled state, and there is an inevitable error when measuring the X-directional thermal error of S2, so its X-directional thermal error is 2 μm larger than that of uncooled, which is within the allowable error range. The cooling effect and algorithm calculation results are sorted from high to low, as shown in Table 4. The Z-direction cooling effect is S1 > S3 > S5 > S4 > S2, and the X-direction cooling effect is S1 > S3 > S4 > S5 > S2. The experimental results and algorithm calculation results all show that the cooling effect of the temperature-sensitive points T1 (S1) and T4 (S3) is the best, and the cooling effect of the T3 (S2) point is the worst.

Conclusion
In this paper, considering that the suppression of different temperature-sensitive points during the cooling process has different cooling effects on the cooling of the milling head, the sensitivity analysis algorithm combined with the randomized mean value method is adapted to screen out the temperature-sensitive points, and the thermal error cooling suppression experiment is carried out. Finally, we come to the following conclusions: (1) From the finite element simulation, we can get that the highest temperature of the shell is located at the bottom of hole A. The most considerable deformation is at the end of the motorized spindle, where the thermal deformation of hole A has a relatively significant effect on the thermal error in the X-direction of the end of the motorized spindle. The Z-directional thermal deformation of the shell has a significant effect on the thermal error of the milling head. (2) The randomized mean value method is introduced into the BP neural network sensitivity analysis algorithm, which can reduce the instability of the neural network sensitivity analysis to a certain extent and make the parameter sensitivity analysis results of the neural network model have a better consistency. (3) Compared with the uncooled state, the points with higher sensitivity coefficients can achieve a better suppression effect after cooling, and the temperature-sensitive point S1 can simultaneously reduce the thermal error in both X-and Z-directions by about 58%. It is shown that optimizing temperature measurement points can accurately find temperature-sensitive points. (4) If the locations of the temperature-sensitive points are accurately identified in the design stage, the enterprise can directly modify and optimize the structural design and related parameters of the milling head or add a cooling system and a heat dissipation system at the temperature-sensitive points to achieve the purpose of reducing thermal deformation and improving machining accuracy.