Thermoelectric-based cooling system for high-speed motorized spindle I: design and control mechanism

With the increase of spindle speed, heat generation becomes the crucial problem of high-speed motorized spindle. A new cooling system for motorized spindle is proposed based on the principles of thermoelectric refrigeration and fast heat conduction. The main strategy of the proposed thermoelectric-based cooling system (TECS) is using the thermoelectric cooler (TEC) to cool the spindle through a heat conduction sleeve (HCS). The TEC is designed according to the heat generation of motorized spindle. The cooling capacity generated by the TEC is controlled by electric current passing through the TEC according to the temperature rise of HCS. The HCS is designed to distribute the cold quickly and is installed around the spindle sleeve working as cooling medium. The simulation results show that the cooling effect of the proposed TECS is better than water-cooling system. It is meaningful to improve the accuracy of motorized spindle.


Introduction
With the increase of spindle speed and the widely use of high-speed motorized spindle in CNC machine tools, thermal deformation has become a main factor affecting the machining accuracy and efficiency [1]. In high-speed and high-precision machining, thermally-induced errors account for 60-80% of total errors [2]. Furthermore, the heat generated by internal heat sources of motorized spindle is an important factor affecting its life. Therefore, how to effectively solve the thermally induced errors of high-speed motorized spindle has become a hotspot in CNC machine tools and other high precision equipment. In current technologies, there are two methods to control the thermal deformation, the first is error compensation method and the second is error prevention method.
The error compensation method is that it uses the software to real-timely compensate the thermally induced errors without changing the machine tool's structure [3]. The key of this method is to establish a thermal error model with high accuracy and robustness, which can be realized through using the temperature rise of thermal key point to fit the thermal deformation [4]. Generally, the temperature rise and thermal deformation are measured through temperature and displacement sensors under a specific working condition (usually air cutting) [5]. There are many modeling methods, such as the neural network, orthogonal polynomials, and multiple regression, can fit the thermal deformation accurately. Then, the thermally induced errors can be compensated through offsetting the external coordinate system or modifying the G-code, etc. according to the established thermal error model. However, due to the influence of actual working conditions (E.g., the introduction of cutting heat) and the changes in ambient temperature, the robustness of the established thermal error model will decrease which limits the effectiveness and accuracy of thermal error compensation method. Nevertheless, the error compensation method is still an effective way to improve the machining accuracy in the existing technologies. In addition, many CNC machine tools have introduced the error compensation technology to the CNC system to improve the machining accuracy.
The thermal error prevention method, which is not limited by the robustness and accuracy of thermal error model, is to control the thermal deformation or temperature rise directly through changing the machine tool's structure or cooling the internal heat sources and its assemblies. Thermal optimization design is one of the mainly used thermal error prevention method. The main strategy is to design a symmetrical structure to reduce the radial thermal deformation, or using the constraint method to limit the thermal deformation, or transfer the thermal deformation to the direction which does not influence the machining accuracy [6][7][8]. Symmetrical structure has been widely used in the existing machine tools, but it is difficult to offset the thermal errors in all directions, especially in the axial direction. The thermal error constraint method, such as using the carbon fiber to limit the thermal elongation of spindle housing [7], will generate thermal stress which may cause new strain of machine tool's assemblies. The error transfer method is also difficult to offset the thermal errors in all directions. Furthermore, due to the influence of machine tool's structure, stiffness, mechanical properties, and machining accuracy of assemblies, optimal optimization strategy for machine tool's structure needs to be further studied.
The other thermal error prevention method is to control the temperature rise of assemblies of motorized spindle, and the cooling system becomes the best choice. The commonly used cooling methods include the liquid cooling [9] and forced air convection cooling [10]. No matter which cooling method is used, the core idea of this method is to dissipate the heat generated by internal heat sources through fluid. The key of this method is to design an optimal cooling device and to control the cooling parameters accurately. The helical cooling channel is widely used in cooling system of high-speed motorized spindle. The traditional shape of the helical channel is rectangular which can be achieved conveniently. But this structure cannot match the various heat sources with different heat generation rate. Recently, the fractal tree-like channel was introduced to the cooling system to balance the temperature field distribution for different internal heat sources [11]. In order to effectively dissipate the heat generated by internal heat sources of high-speed motorized spindle, the control parameters of cooling system such as velocity of flow, flow, and temperature, should be calculated and controlled accurately [12]. Grama et al. [13] proposed a model-based cooling strategy for motorized spindle using the spindle speed and load to estimate the realtime heat generation to control the cooling power and energy quantities of coolant through the established model. Zhang et al. [14] proposed an active coolant strategy using differentiated multi-loops bath recirculation system to control the spindle thermal balance.
Recently, the loop thermosyphon and oil-air lubrication system are used to cool the spindle [15,16]; however, the health risk created by oil mist and effective control of ambient air quality should be considered in oil-air lubrication system, and the medium with a wide range of phase transition temperatures should be further studied in loop thermosyphon. In summary, with the continuous development of optimized design and cooling technology, the temperature rise and thermal deformation of motorized spindle have been effectively improved. Because the existing cooling system uses fluid as cooling medium, it is difficult to accurately control the temperature of the fluid in coolant channel, the temperature of fluid at the outlet is significantly higher than that at the inlet. It is difficult to accurately match the heats generated by different internal heat sources of motorized spindle. The same problem exists in the loop thermosyphon and oil-air lubrication cooling system. In addition, the heat transfer capacity of the fluid medium is affected by many factors such as the thickness of the stagnant fluid layer, fouling resistance caused by fluid impurities precipitation, thermal conductivity of fluid, temperature difference between the cooling channel and fluid, and the flow rate, etc., which influence the cooling effect of the cooling system and even causes the blockage of the cooling channel. In order to improve the cooling effect, the commonly used methods are to decrease the temperature of the cooling medium or to increase the flow rate and flow velocity of the cooling medium. However, the fluid flow and flow velocity are limited by the structure of motorized spindle, the control of fluid temperature will introduce a new cooling system to cool the fluid and it is difficult to control the temperature of the fluid to completely dissipate the heat transferred to the cooling channel, which becomes the bottleneck of the existing cooling system. Therefore, studying a new type of cooling method is helpful to improve the cooling effect and accuracy of high-speed motorized spindle.
With the development of thermoelectric technology [17][18][19], it has become possible to use solid materials as cooling medium in cooling system of motorized spindle. Thermoelectric refrigeration is a solid-state refrigeration method, it has no moving parts and refrigerant. It is easy to integrate with other devices and is widely used in thermal systems. In this study, a thermoelectric-based cooling system (TECS) is designed based on the principles of thermoelectric refrigeration and fast heat conduction. The TECS includes a thermoelectric cooler (TEC) and a heat conduction sleeve (HCS) as shown in Fig. 1. The main strategy of the proposed TECS is using the TEC to cool the spindle through HCS. The working principle of the proposed TECS is introduced in Sect. 2. The detailed design strategy of HCS and TEC are carried out in Sect. 3. The control method of the TEC is introduced in Sect. 4. The effect of the proposed TECS is verified through numerical simulation in Sect. 5. In order to improve the simulation accuracy, an online correction method for thermal boundary conditions is proposed in Sect. 5. The simulation results show that the cooling effect of the proposed TECS is significantly better than water-cooling system. But the temperature field of the spindle sleeve is ununiform which will cause uneven deformation and affect the air gap between the stator and rotor. Therefore, an optimization strategy for HCS is proposed in part 2 to balance the temperature field of spindle sleeve.

Working principle of TECS
As shown in Fig. 1, the structure of the proposed TECSbased motorized spindle is using the TECS to replace the water-cooling system. The HCS is installed around the spindle sleeve to transfer and distribute the cold generated by the TEC to the spindle sleeve. The thermoelectric cooling chips are fixed on the outside of the HCS to generate the cooling power. A cooling sleeve is designed to cool the hot sides of the thermoelectric cooling chips.
The working principle of the proposed TECS is to make the cooling power generated by the TEC and the heat transferred to the HCS equal in real time. As shown in Fig. 2, the heat generated by the bearings and the built-in motor and the cooling power generated by the TEC are all transferred to the HCS. In order to cool the heat transferred to the HCS completely, the cooling power generated by the TEC should be equal to the heat transferred to the HCS, that is, where Q INT is the internal heat transferred to the HCS in Watts, which can be calculated by Eq. (2), Q TEC is the cooling power generate by the TEC in Watts, which is calculated by Eq. (3).
(1) where c HCS , m HCS , and ΔT HCS are the specific heat capacity in J/(kg·℃), the mass in kg, and the average temperature rise rate of the HCS in ℃/s, respectively.
where π is the Peltier coefficient, I denotes the electric current passing through the TEC in Ampere, R is the resistance of thermoelectric element, k is the thermal conductivity of thermoelectric element in W/(m·K), ΔT TEC is the temperature difference between the hot and cold side in ℃. Substituting Eqs. (2) and (3) into Eq. (1), and Eq. (1) can be rewritten as It can be seen from Eq. (4) that using the temperature rise rate of the HCS to control the electric current passing through the TEC can obtain a required cooling capacity if the other parameters are constant. That is, the heat transferred to the HCS can be cooled completely through controlling the electric current passing through the TEC. However, the Peltier coefficient and the temperature difference between the hot and cold side of the TEC are not constant which will introduce new detection variables and complicate the control system of the TEC. Therefore, the proportion integral differential (PID) algorithm is used to control the cooling capacity of the TEC in this study, which is introduced in Sect. 4.

Design strategy of TECS
In order to compare the cooling effect of the TECS with water-cooling system, a water-cooled motorized spindle (as shown in Fig. 3) was re-equipped in this study. The power of the water-cooled motorized spindle is 0.8 kW, the rated voltage and electric current are 220 V and 5 A, respectively, the frequency is 400 Hz, and the maximum spindle speed is 12,000 rpm. Both front and rear bearings are a pair of angular contact grease lubricated bearings, the installation mode is face to face, and the parameters of bearing are shown in Table 1.
The design strategy of the TECS is to design the HCS and TEC according to the structure of the water-cooled motorized spindle and the working principle of TECS.

Design strategy of HCS
The main uses of the HCS are to transfer the cooling power from TEC to spindle sleeve quickly and to distribute the cooling capacity for different internal heat sources accurately. In order to realize these purposes, the thermal contact resistance between the HCS and spindle sleeve and the cold side of TEC should be as small as possible; however, the thermal conductivity of the HCS should be as large as possible. That is, the design of HCS is to select a suitable material and to design its structure according to the requirements abovementioned. Because the thermal contact resistance is related to the material properties as shown in Eq. (5) [23], the material of HCS can be determined through the method of constrained optimization of thermal contact resistance.
where σ is the root-mean-square value of surface roughness which can be calculated by Eq. (6), k is the tuned average thermal conductivity which can be calculated by Eq. (7), H is the minimum hardness of the contact surfaces in HB, P is the contact pressure in MPa, which can be calculated by Eq. (8).
where σ 1 and σ 2 are the surface roughness of the two contact parts in micron.
where k 1 and k 2 are the thermal conductivities of the two contact parts in W/(m·K).
where ε is the amount of interference between the HCS and spindle sleeve in millimeter, r 1 and r 2 represent the inner and outer radius of spindle sleeve in millimeter, r 3 is the outer radius of HCS, E 1 and E 2 denote the elasticity modulus of spindle sleeve and HCS in MPa, μ 1 and μ 2 are the Poisson's ratios. Substituting Eqs. (6) through (8) into Eq. (5), the optimization objective equation of thermal contact resistance is established as follows: Spindle Front end cover Rear end cover Water jacket to be replaced by TECS Outlet Inlet Fig. 3 The structure of the water-cooled motorized spindle In order to achieve the requirement of fast heat conduction, the copper alloys and aluminum alloys with high thermal conductivity become the best choice for the material of HCS. In order to minimize the thermal contact resistance, the surface roughness and hardness of HCS should be as small as possible, but the thermal conductivity and contact pressure should be as large as possible as shown in Eq. (5). That is to say, the constraints in Eq. (9) should meet the above requirements. Because the material properties and the radius of the spindle sleeve are all known, the constraints of HCS in Eq. (9) is determined as In Eq. (10), the maximum and minimum constraints of the HCS are determined according to the material properties of copper alloys and aluminum alloys; the surface roughness is determined by the existing processing methods and the milling method is used in this study; the amount of interference is conformed by the fit tolerance between the HCS and spindle sleeve. Using the optimization toolbox of MATLAB, the optimum constraints of HCS is obtained as shown in Table 2.
It should be noted that the results in Table 2 are the optimized values considering the economy of processing methods and materials, which can be used to guide the selection of material and determination of machining accuracy of HCS. In order to make the parameters of HCS meet the optimization Table 2, the H96 (CuZn5) brass and AL 6063 can be selected as the material of HCS, and the AL 6063 is used in this study. In order to surround the spindle completely and fix the thermoelectric cooling chips conveniently, the structure of the HCS is designed as a rectangular parallelepiped with through hole like a round cage as shown in Fig. 4. The through hole of HCS was processed by finish-milling to meet the surface roughness requirement, the contact pressure is applied through the amount of interference between the HCS and spindle sleeve which can be realized through controlling the dimension of the through hole of HCS. The HCS is as the cold side of the TEC, and the thermoelectric chips are installed on its surfaces through a series connection.

Design strategy of TEC
The design strategy of the TEC is to determine the required maximum cooling power according to the heats generated by internal heat sources of motorized spindle and to design its structure to surround and cool the spindle completely. As shown in Fig. 1, a part of the heats generated by the stator, rotor, front bearings, and rear bearings is dissipated to the environment by convection, a part of it is converted into the internal energy of components, and a part of it is transferred to the HCS and cooled by the TEC. Assuming that there is no energy loss during the heat transfer and the controlled temperature of the motorized spindle is not lower than the ambient temperature, the required cooling power of the motorized spindle is calculated as Considering the extreme working condition, the maximum heat generation of each internal heat source should be calculated firstly. The heat generated by bearings rotation is mainly related to the friction torque caused by preload applied to the bearings and spindle speed [20], which is calculated as where f 0 = 4 for a pair of angular contact grease lubricated bearings [20], v 0 is the kinematic viscosity in centiStokes, f 1 = 0.0013 P 0 ∕C 0 0.33 , P 0 is the static equivalent load, C 0 is the basic static load rating, P 1 is the preload applied to the bearings in Newton, and D m is the pitch diameter of bearing in millimeter. The heat generation of the built-in motor is mainly related to the magnetic and electrical losses [13], which can be estimated as where η is the mechanical efficiency of motor, P is the proportional load on the motor, and P r is the rated power in Watts. Thereby, the maximum heat generation of the builtin motor can be estimated according to the relationship between the mechanical efficiency and proportional load of the motorized spindle.
In order to calculate the maximum cooling power and to ensure the cooling effect of the TEC, the following suppositions and conditions are given: 1. The controlled temperature of the motorized spindle is not lower than the ambient temperature, that is, there is no external heat transfer to the motorized spindle. 2. The cold side of the TEC contact with the HCS completely or insulate the untouched parts, that is, there is no heat loss in TEC. where ΔT max is the maximum temperature difference between the hot and cold side of the TEC which can be obtained from the product description of thermoelectric cooling chip, ΔT = T h -T c is the design temperature difference of the TEC, T h = T a + 5 when the hot side of the TEC has enough heat dissipation, T h = T a + 15 when the hot side of the TEC has poor heat dissipation [22], T h , T c , and T a are the temperature of the hot side of the TEC, the cold side of the TEC, and the ambient, respectively. Using Eqs. (12) through (15), the required maximum cooling power of the TEC can be calculated. Then, the number of thermoelectric cooling chips required by the TEC can be determined according to the rated cooling power of the thermoelectric cooling chip and the structure of the motorized spindle. Following is the detailed design of the TEC.
In order to confirm the required maximum cooling power of the TEC, the maximum heat generation of the internal heat sources are estimated as follows. The maximum heats generated by the front and rear bearings are calculated using Eqs. (12) and (13), the selection principle of the parameters in Eq. (13) is as follows, the maximum kinematic viscosity is determined according to the grease type used in the bearings as 35.2 cSt, the maximum allowable preload of the front and rear bearings is obtained from the mechanical manual as 105 N and 90 N, the maximum static equivalent load should be equal to the basic static load rating when it is used to calculate the maximum friction torque, that is, f 1 = 0.0013. Then, the maximum heat generation of the front and rear bearings is calculated as Q bf = 40.8 W and Q br = 25.57 W, respectively. According to the relationship between the mechanical efficiency and proportional load of the motorized spindle, the maximum heat generated by the built-in motor is calculated as Q m = 105 W. Thereby, the maximum heat generation of the motorized spindle can be calculated as 171.37 W. After determining the maximum heat generation of the motorized spindle, the required maximum cooling power of the TEC can be calculated by Eq. (15). Because the maximum temperature difference between the hot and cold side of the existing TEC products is greater than 60 ℃, and the controlled temperature of HCS is equal to ambient temperature, considering the poor heat dissipation of the hot side of TEC, the required maximum cooling power of the TEC is calculated as Q cmax = (40.8 + 25.57 + 105) × 60/(60 − 15) = 228.5 W. According to the structure of HCS, eight or twelve thermoelectric cooling chips with dimensions of 40 × 40 mm are needed to surround the HCS completely. In this study, eight thermoelectric cooling chips are used as shown in Fig. 4, the required minimum cooling power of each thermoelectric cooling chip is 228.5/8 = 28.56 W. According to the rated cooling power of the existing thermoelectric cooling chips, the thermoelectric cooling chip of TEC1-12704 with maximum cooling power of 36 W is selected, which parameters are shown in Table 3. The thermoelectric cooling chips are installed on the HCS as shown in Fig. 4.
In order to cool the hot side of the TEC, a cooling sleeve is designed as shown in Fig. 5. The material of the cooling sleeve is aluminum alloy to transfer the heat quickly, either compressed air or water can be used as the cooling medium. The cooling sleeve is installed around the thermoelectric cooling chips to cool its hot sides. The required mass flow rate of coolant is calculated as follows: where m F is the mass flow rate of the coolant fluid in kg/s, Q F is the heat extraction rate from the hot side of TEC which is the sum of the total maximum heat generation of internal heat sources and the power consumption of the TEC, c F is the specific heat capacity of the fluid in J/(kg·℃), and ΔT F = 5 ~ 10 ℃ is the temperature difference of coolant between the outlet and inlet of cooling sleeve. The heat transfer area can be estimated as where h = Nu·k fluid /L is the convective heat transfer coefficient in W/(m 2 ·℃), ΔT m is the average temperature difference between the hot side of TEC and the coolant, Nu is the Nusselt number which can be calculated as Nu = c ⋅ Re n ⋅ Pr m , k fluid is the thermal conductivity of heat transfer medium, L is the characteristic dimensions.
Using Eqs. (16) and (17), the structure of the cooling sleeve and the mass flow rate of coolant can be designed. It should be noted that the temperature of the hot side of thermoelectric cooling chips affects the cooling effect of the TEC as shown in Eq. (3). The existing studies have shown that the water cooling has the best heat dissipation effect, followed by the heat pipe heat dissipation. Therefore, the cooling method of the hot sides of thermoelectric cooling chips can be made into a heat pipe mode in actual application which can simplify the structure of the TECS and no additional cooling system is required.
Using the abovementioned design strategy of HCS and TEC, a TECS-based motorized spindle can be re-equipped as shown in Fig. 6. The water-cooling system is replaced by the TECS.

Control method of TECS
In order to control the cooling capacity real-timely, a TEC controller is designed as shown in Fig. 7. The TEC controller includes an electric current converter, an electric current regulator, and a temperature setting and display module. The Cooling sleeve Grid Outlet Fig. 5 The cooling sleeve is installed around the thermoelectric cooling chips to cool its hot sides electric current converter is used to convert alternating current to direct current. The temperature setting and display module is used to preset and display the temperature of HCS. The electric current regulator, which is used to control the electric current passing through the TEC according to the temperature difference between the HCS and preset temperature, includes a microcontroller unit (MCU) system, an A/D converter (ADC), and a control circuit. The diagram of controlling circuit of the TEC controller is shown in Fig. 8, the measured temperature of HCS is input to the MCU through ADC, the MCU read the temperature of HCS (T HCS ) real-timely and compare with the preset temperature (T P ), if T HCS ≠ T P , the following PID algorithm is used to calculate the voltage of TEC: where V is the controlled voltage of the TEC, ΔT i = T HCSi − T P is the temperature difference of the measured temperature of HCS and the preset temperature, ΔT HCSi = T HCSi − T HCSi−1 is the measured temperature difference of HCS, K p , K i , and K d are the proportional coefficient, integral coefficient, and differential coefficient, respectively, V 0 is the minimum voltage to keep the temperature of HCS at the preset value.
If T HCS = T P , V = V 0 . The calculated voltage is used to generate the pulse width modulation (PWM) signal to drive the control circuit work. The control circuit, which is used to drive the TEC work, includes a current drive chip and an H-bridge. In order to verify the control effect of the TEC controller, some thermal characteristics experiments are carried out in part 2 using the ISO-203 standard and different control temperature.

Simulation verification
In order to verify the cooling effect of the proposed TECS, the numerical simulation is carried out. Due to the simulation accuracy is related to the thermal boundary conditions,  Fig. 8 Control principle of the TEC controller using the measured temperature of HCS to control the electric current passing through the TEC an online correction method for thermal boundary conditions is proposed in Sect. 5.1.

Online correction mechanism
Because the temperature rise is one of the main representations of thermal behavior of machine tools, the temperature rise of thermal key points can be used to correct the thermal boundary conditions real-timely. As shown in Fig. 9, the heat generated by the heat source transfers to the environment through thermal contact resistance 1 (TCR1) and TCR 2. In theory, if the simulated temperatures at positions Temp. 1 through 4 are equal to the measured temperatures at the same position and running time, the thermal boundary conditions used in numerical simulation are consistent with the actual boundary conditions. If temperatures 1 through 4 can be measured real-timely, the thermal boundary conditions of heat generation, thermal contact resistance, and convection coefficient used in numerical simulation can be corrected by Eqs. (19) through (21).
where q cor is the corrected heat flux in W/m 2 , t m and t s are the measured and simulated temperatures of thermal key points in ℃, respectively, t a is the ambient temperature, q cal is the calculated heat generation using the Eqs. (12) and (14).
where R cor is the corrected thermal contact resistance in m 2 ·K/W, R cal is the calculated thermal contact resistance using Eq. (5), α T is the thermal expansion coefficient in 1/℃, E is the elastic modulus in Mpa, A is the contact area in m 2 .
where h cor is the corrected convection coefficient in W/ (m 2 ·K), h cal is the calculated convection coefficient using the equation listed in Table 4. The correction strategy of thermal boundary conditions is using Eq. (19) to correct the heat generation according to the measured and simulated temperature at the position Temp. 1, if the simulated temperature is equal to the measured temperature at the same position and running time, the heat generation of the heat source is determined. At the same time, Eq. (20) is used to correct the thermal contact resistance according to the measured and simulated temperature at the position Temp. 2, if the simulated temperature is equal to the measured temperature at the same position and running time, the thermal contact resistance of TCR 1 is determined, the correction of TCR 2 is the same way, and so on. Finally, Eq. (21) is used to correct the convection coefficient according to the measured and simulated temperature at the position Temp. 4, if the simulated temperature is equal to the measured temperature at the same position and running time, the convection coefficient used in numerical simulation is determined.
In this study, the online correction method for thermal boundary conditions is used to correct the heat generation, thermal contact resistance, and convection coefficient of the motorized spindle. Figure 10 shows the experimental setup for online correction of thermal boundary conditions of the motorized spindle. Six PT100 temperature sensors with an accuracy of ± 0.15 ℃ and range of −50 to 200 ℃ are used to correct the thermal boundary conditions of the motorized spindle.
In Fig. 10, Temp. 1 is used to measure the surface temperature of bearing to correct the heat flux generated by bearing rotation. Temp. 2 is used to measure the temperature of bearing sleeve to correct the thermal contact resistance between the bearing and its sleeve. Temp. 3 is used to measure the surface temperature of spindle sleeve to correct the thermal contact resistance between the bearing sleeve and spindle sleeve and the convection coefficient of cooling water. Temp. 4 is used to measure the surface temperature of rear bearing cap to correct the natural convection coefficient. Because it is difficult to install the temperature sensor on the rotatory spindle, and the thermal elongation is related to the temperature rise of the spindle, the thermal deformation of the spindle is used to correct the thermal contact resistance between the spindle and bearing using the following equation. where R rcor is the corrected thermal contact resistance between rotatory components in m 2 ·K/W, Δl m and Δl s are the measured and simulated thermal elongation of the spindle in micron. Figure 11 shows the correction process of the boundary conditions, and a software is developed to realize the online correction of boundary conditions as shown in Fig. 12. The working principle of the application is that the software calls ANSYS and drives it work through ANSYS Parametric Design Language (APDL) for thermal simulation analysis, the temperatures of thermal key points and the thermal deformation of the spindle are extracted from the simulated results using the APDL and compared with the measured temperatures and thermal elongation of the spindle. If the difference between the simulated and measured results exceeds the threshold, the simulated and measured results are used to correct the thermal boundary conditions using Eqs. (19) through (22), the corrected results are used to replace the heat flux, thermal contact resistance, and convection coefficient in the APDL and drives the ANSYS work again to simulate the thermal behavior until the difference between the simulated and measured results is within the threshold.
In order to avoid the influence of cooling water on the correction accuracy of thermal boundary conditions, the water-cooling system is not work at first. When the boundary conditions are corrected, the water-cooling system starts working, and the measured temperature of Temp. 3 is used to correct the convection coefficient of cooling water using Eq. (21). It should be noted that there are some thermal boundaries that are not convenient to install sensors. In order to solve this problem, the surface temperatures of Temp. 5 and 6 related to the built-in motor and front bearing are used to correct the thermal boundary conditions using the following equation.
where B i-cor and B i-cal are the to be corrected and calculated boundary conditions, t ms and t ss are the measured and simulated surface temperature related to the boundary condition,  Fig. 12 The interface of online correction software shows the cloud diagram of temperature field and thermal deformation, temperatures, and displacements of thermal key points and its fitted curves B j-cor and B j-cal are the corrected and calculated boundary conditions related to B i . Using the online correction method for thermal boundary conditions, the heat flux, thermal contact resistance, and convection coefficient of the motorized spindle is corrected. Table 4 shows the corrected results.
Although the temperature rises of a machine tool can be used to correct the boundary conditions, it is difficult to find a suitable thermal key point for each boundary condition. Therefore, studying the built-in detection method to measure the temperature rises of assemblies to real-timely correct the thermal contact resistance and heat generation can realize the quantitative simulation of machine tool's thermal behavior, which is of great significance for thermal optimization design and thermally-induced errors compensation.

Thermal behavior simulation
The simulation conditions are that the spindle speed is 6000 rpm, the temperature of ambient is 20 ℃. Because the simulation is carried out under the idling condition, the mechanical efficiency of the motorized spindle is equal to 0, the proportional load on the motor is calculated as where n is the spindle speed in rpm, M b is the total friction torque of bearings in Nm, which can be calculated by Eq. (13), M s , J s , and α s are the torque in N·m, moment of inertia in kgm 2 , and angular acceleration in rad/s 2 of the spindle, respectively.
According to the structure of the spindle and the acceleration time, the proportional load on the motor under the idling condition can be calculated as 6% using Eq. (24) and (25). Then, the total heat generated by the built-in motor can be calculated as Q m = 48 W using Eq. (14). Since one-third of the total heat of the built-in motor is distributed to rotor and two-thirds to stator [24,25], the heat generated by the stator and rotor can be calculated as Q s = 32 W, Q r = 16 W. Since it is difficult to accurately obtain the parameters for calculating the thermal boundary conditions, this study uses the allowable values of each parameter to calculate the initial thermal boundary, and uses the online correction technology to correct the thermal boundaries of the motorized spindle. Using the corrected heat generation of internal heat sources, the cold generated by TEC can be adjusted to make that the temperature of HCS is 20 ℃.
The structures of the stator and bearings are simplified as cylinders, some small structures in the finite element model, such as bolts, bolt holes, and chamfers are removed. Appling the corrected boundary conditions to the finite element model, the temperature field of the motorized spindle before and after re-equipped can be obtained as shown in Figs. 13 and 14.  Figure 13 shows the temperature field of the motorized spindle with water-cooling system. The maximum temperature rise of the motorized spindle is 32.302 ℃ which occurs in the rotor. The temperature distribution of the spindle sleeve and main shaft are ununiform, the temperature rises at the regions related to the internal heat sources are higher than that at other regions. The minimum temperature rise at steady state is 5.513 ℃ which occurs in the cooling water jacket. That is, the water-cooling system cannot dissipate the heat transferred to the cooling channel completely when the water temperature is the room temperature. Figure 14 shows the temperature field of the motorized spindle with TECS. The maximum temperature rise of the motorized spindle is 15.311 ℃ which occurs in the rotor. The temperature distribution of the spindle sleeve and main shaft are also ununiform. The minimum temperature rise is 0 ℃ which occurs in the HCS. That is, the TECS can cold the heat transferred to the HCS completely.
Comparing Figs. 13 and 14, the maximum temperature rises of the TECS-based motorized spindle is reduced 16.991 ℃ compared with water-cooling system. That is, the cooling effect of the TECS is significantly better than that of water-cooling system when the water temperature is the room temperature. The simulation results also show that the temperature distributions of the motorized spindle before and after re-equipped are basically the same, but the temperature distributions of the spindle sleeve before and after re-equipped are all ununiform. That is, the HCS and cooling channel should be optimized to distribute the cooling capacity effectively. In this study, an optimization method for HCS is proposed in part 2, which can distribute the cooling capacity accurately.

Conclusions
A new cooling system for motorized spindle has been proposed based on the principles of thermoelectric refrigeration and fast heat conduction. The thermoelectric-based cooling system (TECS) consists a thermoelectric cooler (TEC) and a heat conduction sleeve (HCS). The TEC is designed and the cooling power is controlled through the measured temperature of HCS. The structure of HCS is designed to distribute the cooling capacity generated by the TEC. According to the simulation results, the following conclusions can be drawn.
1. The empirical formula of thermal contact resistance can be used to optimize the thermal characteristics of motorized spindle; the assemblies' material and dimension of the motorized spindle can be determined through constrained optimization method. 2. The temperature rise of the heat conduction sleeve (HCS) can be used to control the cooling capacity of the thermoelectric cooler (TEC) through controlling the electric current using the proportion integral differential (PID) algorithm, which is easier to control than water-cooling system. 3. The simulated temperature and thermal elongation will equal to the actual state when the boundary conditions of finite element simulation are consistent with the actual boundary conditions of the motorized spindle. Therefore, the measured temperature and thermal elongation of thermal key points can be used to correct the boundary conditions to improve the simulation accuracy.
Funding This paper is sponsored by the "Technology of on-line monitoring system for thermal characteristics of NC machine tools" (No. H2019304021); the "Project funded of Shanghai science committee-Precision technology and its application for five-axis machine tool based on the real-time compensation" (No. J16022).

Availability of data and materials
The data that supports the findings of this study is available from the corresponding author upon reasonable request.