Research on the digital twin for thermal characteristics of motorized spindle

With the increase of spindle speed, heat generation becomes the crucial problem of high-speed motorized spindle. In order to obtain the actual thermal behavior of a motorized spindle, a digital twin system for thermal characteristics is developed in this paper. The mechanism of digital twin for thermal characteristics is to simulate the thermal behavior of a machine tool through mapping and correcting the thermal boundary conditions using the data acquisition system and correction models. The proposed digital twin system includes three modules which are the digital twin software, the data acquisition system, and the physical model with embedding sensors. The digital twin software is developed based on the Qt with the C + + programming language and the secondary development of ANSYS. Correction models for thermal boundaries are proposed to correct the heat generation and thermal contact resistance using the temperatures measured by the data acquisition system at thermal key points. To verify the prediction accuracy of the digital twin system, an experiment is carried out on a motorized spindle. The experimental results show that the prediction accuracy of the digital twin system is greater than 95%. It is of great significance to improve the accuracy of thermal characteristics simulation and thermal optimization.


Introduction
Thermal behavior prediction is significant in thermal optimization of computer numerical control (CNC) machine tools. The motorized spindle is not only the core but also a main heat source of CNC machine tools. More rigorous requirement on accurate analysis of thermal characteristics of motorized spindle is put forward due to the fast development of CNC machine tools in condition of ultra-high speed and ultra-high precision. The main factors that affect the accurate prediction of temperature field and thermal deformation of the spindle come from two aspects, heat generation and thermal contact resistance, both of which are not constant during the working process of the spindle. Owing to the heat generation that goes with it as spindle works which cause the thermal deformation, the thermal stress between the contact surfaces of the spindle's components is engendered, and the thermal contact resistance (TCR) and the heat generated by internal heat sources also change with the change of contact pressure. In order to improve the prediction accuracy of thermal behavior, digital twin for thermal characteristics becomes the best choice that is helpful in simulating the temperature field distribution of the spindle unit.
Digital twin refers to a virtual and real mapping by constructing the mapping relationship between digital virtual entity and physical entity. It maps the physical entity in the physical space to the digital space and has functions such as data mapping, analysis and decision-making, and control execution. In recent years, many scholars have carried out fruitful research works on digital twin and have formed a mature theoretical system. In the theoretical aspects, the concept of digital twin was proposed by Professor Grieves [1] in 2003 firstly, and later the NASA applied the concept to the aircraft in the Apollo program. Kostenko et al. [2] studied the application of the device digital twins in static and dynamic diagnosis, and proposed a knowledge basebased diagnosis method. Tao et al. [3,4] constructed a fivedimensional structural model and driving-based application standards for the digital twin, and proposed 14 application hypotheses driven by the digital twin, and analyzed in detail the product design, manufacturing and service methods based on digital twin technology, which was applied to the equipment fault prediction and health management research. Besides, abundant relevant scholars emerged in the field of manufacturing [5][6][7][8][9][10]. Zheng et al. [11] studied the digital twin model framework of welding equipment and realized the real-time monitoring of welding equipment based on OPCUA and Socket data collection as well as information preprocessing and real-time data mapping. Luo et al. [12] have done research on the modeling method of digital twin of CNC machine tools and proposed a digital twin framework of CNC with 3 dimensions including data description model, mapping model, and intelligent model. Tuegel et al. [13] studied the problem of aircraft structure life prediction based on digital twin, and proposed a digital twin model for aircraft to integrate the calculation of structural deflection and temperature, thereby the local damage and material state evolution were analyzed. The above works show that digital twin has a wide range of applications and research in the field of mechanical engineering and has displayed good results, which have great applicability and malleability.
Besides the technique of digital twin, the finite element method (FEM) was utilized to simulate the thermal behavior of the machine tools' spindle. Numerical methods have better reliability and convenience than traditional experiment methods in different machine tools or multi-fold experimental environment and can solve complex nonlinear problems. Chen et al. [14] and Su et al. [15] calculated the necessary thermal loads of hydrostatic oil films with the empirical method as well as the utilization of the finite element method and finite volume method to simulate temperature and thermal error behaviors of the hydrostatic spindle unit, respectively. Zhou et al. [16] analyzed the thermal behavior of a machine tool's spindle using the FEM and proposed a thermal error reduction strategy for optimizing the thermal conductivity of the materials by designing a heat conduction and insulation device to achieve the rapid heat conduction and thermal balance of the spindle, thereby the thermal errors were greatly reduced. Determining the thermal boundary conditions accurately is the key of FEM, but the boundary conditions of a spindle are not constant leading to the inaccuracy of the finite element analysis. To solve this problem, Xu and Jiang [17] analyzed the influence of thermal contact resistance on the accuracy of the FEM; the results suggested that the boundary conditions were connected with the analysis accuracy of the FEM. Jian et al. [18] developed a FEM to analyze the temperature distribution of a spindle system under the conditions of different rotational speeds, temperature rises, and thermal deformations. Fan [19] studied the linear relationships between the thermal deformation and the temperature rise as well as the heat flux and the temperature rise by using FEM and designed an application to realize the real-time monitoring of thermal deformation and temperature field of a machine tool. Liu et al. [20] proposed a real-time compensation method, by which it is helpful to control the thermal error of the machine tool.
In order to obtain the accurate boundary conditions that is the key of the FEM, the main types of boundary conditions related is named as heat generation rates, thermal contact resistances, and convective heat transfer coefficients [21]. Huang et al. [22] proposed an inverse method using the ANSYS parametric design language and the conjugate gradient method to acquire the estimated time-varying heat generations of the spindle bearings considering multi-fold conditions. Chow et al. [23] explored ways of getting the optimal convective heat transfer coefficient and the simulated temperature curves fitted well with the experiment by using the FE thermal simulation analysis of a ball screw system in conclusion.
The combination of digital twin and FEM usually includes the steps like processing of multiple heterogeneous data, establishment of multi-level information models, construction of IoT system to collect and transmit data, methods of dynamic control and management of digital twin data, and development of the digital twin system. Liu et al. [24] proposed a digital twin-driven approach for traceability and dynamic control of processing quality through combining the digital twin and FEM, which realized the interactive fusion of physical workshops and virtual workshops and was applied in the processing of diesel engine connecting rods. Lu et al. [25] established a multi-dimensional digital twin model dedicated to product lifecycle of constant velocity joint, which integrated the computer simulation and algorithm analysis and experience evaluation to achieve the purpose of predictive maintenance of constant velocity joint.
On the basis of previous studies, and the emphasis that the temperature field of a spindle is correlative with TCRs of contact surfaces, the convection heat transfer coefficients (CHTCs), and the heat generation of the spindle system, a digital twin system for thermal behavior is introduced in this paper, which uses the real-time temperature data and simulation results to correct the thermal contact resistance of the spindle's contact surface and the heat generated by the internal heat sources through embedding the temperature sensors in the spindle. And digital twin software is developed using the C + + to achieve the purpose of accurately simulating the temperature field and thermal deformation of the spindle. The digital twin mechanism for thermal behavior is clarified in Sect. 2. The correction principle of thermal boundaries is expounded in Sect. 3. The design strategy of digital twin system is introduced in Sect. 4. Finally, the effect of the proposed digital twin system for thermal behavior is verified through simulation and experiment in Sect. 5. The results show that the prediction accuracy of the proposed digital twin system for thermal behavior is greater than 95%; it is of great significance to improve the accuracy of thermal analysis and thermal optimization of CNC machine tools.

Digital twin mechanism for thermal behavior
Digital twin is a simulation process which integrates the multi-disciplines, multi-physical quantities, multi-scales, and multi-probability through using the physical models, sensors, historical data, etc. The purpose of digital twin is using the finite element simulation to map the life cycle of an actual equipment to the virtual space to obtain the attribute changes of the equipment in the physical space. The mechanism of digital twin for thermal characteristics is to simulate the thermal behavior of a machine tool through mapping and correcting the thermal boundary conditions using the data acquisition system and correction models. As shown in Fig. 1, the temperature-rise and thermal deformation of thermal key points related to the thermal boundary conditions of an actual machine tool are measured through embedding the temperature sensors. The measured data are transmitted to the digital twin system through multi-channel data acquisition system. The thermal boundary conditions used in the numerical simulation are corrected using the thermal boundary correction models. The corrected thermal boundary conditions are applied to the finite element model of the motorized spindle through ANSYS Parametric Design Language (APDL), and the thermal characteristic analysis of the motorized spindle is realized by calling the finite element simulation software.
The key of digital twin for thermal behavior is to map the thermal boundaries accurately using the embedded sensors and data acquisition system. However, it is difficult to install a sensor for each thermal boundary. Therefore, the online correction technique for thermal boundary conditions is proposed to correct the thermal boundaries real-timely. As shown in Fig. 2, the heat generated by the internal heat source is transferred to the spindle unit 1 through the thermal contact resistance 1 (TCR1), and then to the spindle unit 2 through TCR2. The measured temperatures at position Temp.1 and 2 are transmitted to the digital twin system through the data collection system. The digital twin system calls APDL to calculate the temperature of each point. If the simulated temperatures at position Temp.1 and 2 are equal to the measured temperature at the same position, then the thermal boundaries used in the simulation is consistent with the actual thermal boundaries. If the simulated temperatures are not equal to the measured temperatures, the thermal boundary correction models are called to correct the thermal boundaries according to the difference between simulated  and measured temperatures. Finally, the accurate thermal boundary conditions can be identified. Using the corrected thermal boundaries, the actual thermal characteristics of the spindle can be obtained through digital twin simulation.

Heat generation correction
The main heat sources of a motorized spindle are the heat generated by the friction of bearings' rotation and the heat converted by the loss of the spindle motor. The loss of motor includes mechanical loss, electrical loss, and magnetic loss. The mechanical loss comes from the friction of air gap between the rotor and stator when the rotor rotates at high speed, which is mainly related to the speed. It occurs at both ends of the rotor and the gap between the stator and rotor, and can be calculated as, where, P n is the mechanical power loss in Watts, C is the friction coefficient, ω is angular velocity in rad/s, ρ is density of air in kg/m 3 , r z is the radius of rotor in meter, and L is the length of rotor in meter. Electric loss is the power loss that occurs when the current passes through the stator conductor coil, which is mainly related to the magnitude of the current. It occurs at the stator and is calculated by the Joule-Lenz law as, where, P e is electrical power loss in Watts, ρ is conductor resistivity, I is winding current of stator in Ampere, and R is conductor resistance of single-phase winding in Ω.
Magnetic loss is the loss formed by the eddy current and hysteresis of the stator and rotor cores, including eddy current loss and hysteresis loss. Eddy current loss is caused by the vortex current generated by the electromagnetic induction of the iron core under the alternating magnetic field of alternating current. Hysteresis loss is that the iron core is alternately demagnetized and magnetized under the action of a periodic magnetic field, which can be calculated as, where, P is the eddy current power loss in Watts, δ is the thickness of rotor in meter, f is magnetic field change frequency in Hz; B max is maximum magnetic induction intensity in T, ρ is iron core resistivity in Ω·m, r c is the iron core density in kg/m 3 , P h is hysteresis power loss in Watts, C h is the constant related to rotor material grade, and a is the empirical constant, when B max < 1 T, a = 1.6, when B max > 1 T, a = 2. When the motorized spindle runs at high speed, the friction between the inner and outer rings of the bearing and the bearing rolling elements generates heat. The heat generation is mainly related to the spindle speed and total friction torque. The heat generated by the bearing's rotation can be calculated by the Palmgre empirical formula, where, Q b is the heat generated by bearing in Watts, n is the spindle speed in rpm, and M is the total friction torque in N·mm.
The amount of heat generation is closely related to the total friction torque. The total friction torque is mainly composed of viscous friction torque and load friction torque. The total friction torque can be calculated as, where, M is the total friction torque in N·mm, M n is the viscous friction torque related to speed in N·mm, f 0 is the coefficient related to lubrication mode, v is the lubricant kinematic viscosity in mm 2 /s; D m is the average bearing diameter in millimeter, M z is the load friction moment in N·mm, f 1 is the factor related to bearing type and load, and P 1 is the load on bearing in Newton.
For a certain bearing, the heat generation Q b is affected by the speed n, the load P 1 and the kinematic viscosity v according to Eqs. (4) and (5). Besides, the load P 1 is proportional to the temperature. On the basis of Eqs. (4) and (5), a correction model for heat generation of bearing according to the measured temperatures at thermal key points is established as, where, v(Δt) is the kinematic viscosity of lubricant with temperature change in mm 2 /s; P 1 (Δt) is the load on bearing with temperature change in Newton.
The application of Eq. (6) can calculate the heat generated by the bearing at different temperatures. In order to simplify the calculation, Fan [19] proposed an empirical correction formula for bearing heat generation described as, where, Q b ′ is the corrected heat generation of bearing in W/ m 3 ; t m is the measured temperature at the thermal key points in °C; t f is the temperature of the motorized spindle obtained through finite element analysis in °C; t ∞ is the environment temperature during the operation in °C.

Thermal contact resistance correction
When a junction is formed by contacting two components together, only a small fraction of the nominal surface area is actually in contact because of the nonflatness and roughness of the contacting surfaces, which causes a thermal resistance, the thermal contact resistance. The factors that affect the thermal contact resistance include pressure on the contacting surface, component's material, surface roughness, gap medium, and temperature difference of the contacting surface. The contact thermal resistance R of the joint surface can be calculated by the following semi-empirical formula as, where, R is the initial contact thermal resistance in m 2 / (K·W), r is the root mean square roughness in micron, k is the tuned average thermal conductivity in W/(m·K), P is the pressure on the contacting surface in MPa, and E is the material elastic modulus in GPa.
It can be seen from Eq. (8) that the thermal contact resistance of the contacting surface of the motorized spindle is proportional to the contact pressure P. As the temperature of the spindle unit increases, the contact pressure P changes continuously. According to the radial thermal deformation formula and Hooke's law, Fan [19] proposed a correction model for thermal contact resistance as, where, R′ is the corrected thermal contact resistance in m 2 ·K/W, A is the contact surface area in m 2 , α is the thermal expansion coefficient, Δt is the temperature difference between the two adjacent temperature measurement points in °C.

Calculation of convection coefficient
The heat generated by the stator and rotor is mainly diffused out through the cooling water which flows in the cooling water jacket with spiral rectangular pipe of water-cooling system. The flow state of the coolant in the pipe is different, which affects the heat transfer coefficient. It is necessary to judge the flow state of the cooling water according to the Reynolds number Re and calculate the convective heat transfer coefficient according to the formulas as follows, When Re < 2200, the flow state of the cooling water is laminar flow, the convective heat transfer coefficient can be calculated as, When 2200 < Re < 10,000, the flow state of the cooling water is transition zone from laminar flow to turbulent flow, the convective heat transfer coefficient can be calculated as, When 10,000 < Re, the flow state of the cooling water turbulent flow zone, the convective heat transfer coefficient can be calculated as, where, Re is the Reynolds constant, Pr is the coolant Prandtl constant, D H is the equivalent diameter of coolant in meter, λ is the thermal conductivity of coolant in W/(m·K), and L is the geometric characteristic length of the heat transfer surface in meter.
Using the correction models, the thermal boundaries of the motorized spindle can be corrected, according to the simulated and measured temperatures. The correction models for thermal boundary conditions are written into the digital twin software for thermal characteristics to correct the thermal boundary conditions automatically.

Design strategy of digital twin system
A digital twin system for thermal behavior includes three modules that are the digital twin software, the data acquisition system, and the physical model with embedding sensors. The design strategy of digital twin system for thermal behavior is to design these three modules, according to the digital twin mechanism for thermal behavior.

Design of digital twin software
The digital twin software is developed using the Qt software based on the C + + programming language. The main functions of the digital twin software include the setting of initial boundary conditions, establishing the connection with the Internet of Things-based Data Acquisition System (IoT-DAS), calling the ANSYS software, displaying data information and solution results, and saving the simulated data. Figure 3 shows the flow chart of digital twin software for thermal characteristics. To begin with, the operating parameters of the system should be set in the initialization interface, which include the selecting of storage address of the result file, the setting of relevant parameters and initial boundary conditions as well as the address of batch files. Then, the macro files based on these data and the corresponding parameter macro file will be created by using Qt's QFile library. Via setting the working directory and job name in the Mechanical APDL Product Launcher, the batch execution commands can be acquired and saved in the.bat file. In Qt, the openUrl statement in the QDesktopServices library is used to start the Mechanical APDL Batch program to run in the background. After these settings are completed, the IoT-DAS will be connected through the socket to establish data transmission between the spindle and computer. Figure 4 shows the interface of the digital twin software. When the above settings are completed, the ANSYS is called and executed in the background which can automatically The batch file calls ANSYS to run in the back ground to solve the thermal characteristics

Output visualization data information
Save thermal characteristics data Fig. 4 The interface of digital twin software create models, divide meshes, add constraints and loads, as well as the process of solving and viewing the results in the light of the command stream file. The batch processing controls the simulation process and result output in the form of a command stream, which makes ANSYS possess excellent separability and operability. The thermal boundary conditions are modified in the form of a new command stream that is generated by the software according to the measured and simulated temperatures at the thermal key points. The correction process of thermal boundaries is controlled by the internal function of the programming language. The software reads the simulation results, that is, the temperature data of each measurement point. At the same time, it finds the data corresponding to the simulation result in the actual measurement data received from the IoT-DAS and calculate the required value and input it to the correction function. The corrected thermal boundaries are written to the parameter macro file named correction parameters.mac which will be read and updated when the next simulation cycle arrives. In this way, the correction of boundary conditions is achieved. The data collected during the spindle work and the thermal characteristic data corresponding to the virtual entity are stored for later analysis.
The execution process of the software is that the simulation analysis of transient thermal-structure coupling in accordance with the generated macro files (file.dat) is started by the.bat file; the program automatically checks the difference of the measured and simulated data and corrects the thermal boundaries using the relevant mathematical model; after correction, the macro file is created through the APDL command (*use) and replace it with the corresponding part of the main command stream file for next simulation. When a solution of temperature field is finished, the node temperature value file (file. rth) is used as the initial condition for thermal deformation analysis. When a solution of thermal behavior is completed, the solution results are output to the interface of digital twin software as shown in Fig. 4, and the output result can be seen through the Qt's table widget to see the actual value of the data, or through the dynamic line graph to see the temperature changing trend. When all the work is done, the experiment results are saved in the set file path.

Design of data acquisition system
The IOT-based data acquisition device (as shown in Fig. 5) is responsible for collecting and transmitting the temperature and thermal deformation data of the physical entity measured at the thermal key points in real time. It adopts the Transmission Control Protocol/Internet Protocol (TCP/IP) to transmit data to the client, the client creates a Socket to describe the IP address and port and sends it to the server to initiate a TCP connection to the server. The server must also prepare at least two Sockets, one welcoming socket is in charge of accepting the connection request of client, that is PC; the other is to create a corresponding connection socket to communicate with the client when receiving the client's connection, thereby a TCP network connection between the collection device and the computer is established. After the connection is built, the data information acquired by sensors is responded to the client socket through a message, and the client parses the response message to obtain the data.
As shown in Fig. 5, the IoT-based data acquisition system includes four modules which are the temperature acquisition module, the displacement acquisition module, the highspeed acquisition module which is used for high frequency data collection, and the wireless transmitter module which is used to transfer data with PC. Using the IoT-based data acquisition system can establish the mapping of thermal boundaries between the physical entities and virtual entities.

Design of physical model
There are many contact surfaces of a motorized spindle, which include the contact surfaces between the bearings and the bearing sleeves and core spindle, the contact surface between the stator and water jacket, the contact surface between the bearing sleeves and water jacket, and the contact surface between the rotor and core spindle. In order to obtain the actual thermal boundaries of the motorized spindle, three temperature sensors are embedded in the motorized spindle to measure the temperature of the inner ring of the bearing sleeve, outer ring of the bearing sleeve, and middle of the bearing sleeve as shown in Fig. 6. The measured temperatures of these three points are used to correct the thermal boundaries according to the correction models. The temperature difference of simulated and measured result at the outer ring of the bearing sleeve is used to correct the thermal contact resistance between water jacket and the rear bearing sleeve, and the temperature difference of simulated and measured result at the inner ring of the bearing sleeve is used to correct the thermal contact resistance between the rear bearing sleeve and the outer ring of rear bearing. The heat generation of bearing is corrected as follows, calculation the difference (Δt mi ) between the measured temperature and initial temperature at these three points firstly, then calculation the difference (Δt ms ) between the measured temperature and simulated temperature at these three points, and the average ratios (Δt ms /Δt mi ) at these three points are used to correct the heat generation of the bearing.
It should be noted that there are some thermal boundaries that are not convenient to embed sensors such as the rotatory spindle, stator, and rotor. In order to solve this problem, the surface temperatures related to the built-in motor and front bearing are used to correct the thermal boundary conditions using the correction models. Thereby, all thermal boundaries of the motorized spindle can be identified and corrected using the measured temperatures of thermal key points.
According to the design methods abovementioned, a digital twin system for thermal characteristics can be designed to obtain the actual thermal behavior of a motorized spindle. In summary, a digital twin system for thermal characteristics includes three modules which are the digital twin software used to correct the thermal boundaries and call the ANSYS to simulate the thermal behavior of the motorized spindle, the data acquisition system used to map the thermal boundaries, and the physical entity with embedded sensors. In order to verify the effect of the proposed digital twin system for thermal characteristics, an experiment for thermal behavior of a motorized spindle is carried out in Sect. 5.

Experimental setup
An experiment platform is set up for verifying the effectiveness of the proposed method based on a high-speed watercooled motorized spindle as shown in Fig. 7. Three temperature sensors are embedded in the selected thermal key points of the motorized spindle as shown in Fig. 6, namely the outer ring of the bearing sleeve, middle of the bearing sleeve, and inner ring of the bearing sleeve through drilling small holes at these thermal key points to make the PT100 temperature sensors fully fit the measuring position closely to improve the accuracy of the experiment. The punching positions are evenly distributed to reduce the impact of the error caused by the punching on the structure damage, and the holes are filled with thermally conductive silica gel to reduce the thermal contact resistance between the sensor and the measuring part. A displacement sensor is arranged at the end of the spindle to measure the axial thermal deformation of the spindle. The motorized spindle is fixed in a vise as shown in Fig. 7.
For data acquisition device, the function is performed by the abovementioned digital twin system for thermal characteristics, all channels are sampled once per second, and the data is processed and counted by the internal functions of the system to achieve continuous monitoring and recording of all channel information.
The material properties of the motorized spindle are listed in Table 1, the heat generated by the stator, the rotor, the front bearings, and the rear bearings are calculated as 5.3 × 10 5 W/m 2 , 7.6 × 10 5 W/m 2 , 1.45 × 10 6 W/m 2 , and 1.04 × 10 6 W/m 2 , respectively. There are 25 contact pairs in the spindle, and their initial thermal contact resistances can be calculated according to Eq. (8). The coefficients of nature convection and the forced convection can be calculated using Eqs. (10), (11) and (12). The ambient temperature is 27 °C.

Experimental results
In order to compare the simulation results before and after digital twin for thermal characteristics, the thermal behavior simulation of the motorized spindle before digital twin is carried out firstly. The simulation conditions are that the spindle speed is 6000 rpm, the temperatures of ambient and cooling water are all 27 °C. The structures of the stator and bearings are simplified as cylinders, some small structures in Outer ring of bearing sleeve Middle of bearing sleeve Inner ring of bearing sleeve Fig. 6 The setup of embedded temperature sensors the finite element model, such as bolts, bolt holes, and chamfers are removed. Applying the calculated initial boundary conditions to the finite element model, the temperature rises at these three thermal key points can be obtained as shown in Fig. 8. It can be seen from Fig. 8 that the thermal equilibrium time is about 1500 s, and the temperature rise trends of these three thermal key points are almost the same. The maximum temperature rise is 4.95 °C which occurs at the first thermal key point that is the inner ring of the bearing sleeve. Figure 9 a shows the temperature field of the motorized spindle; the maximum temperature rise of the motorized spindle is 15.19 °C which occurs in the rotor. The minimum temperature rise is 2.7 °C which occurs in the cooling water jacket. In order to calculate the thermal deformation of the spindle, the calculated temperature field is applied to the finite element model as a temperature load, and the displacement constraint is set to the out surface of the motorized spindle. The thermal expansion coefficients of GCr15 and 45 steel are set to 8.2 × 10 −6 and 1.17 × 10 −5 , respectively. Figure 9 b shows the thermal deformation of the motorized spindle; the maximum thermal deformation of the motorized spindle is 15.4 μm which occurs at the front end of the core spindle.
Next, the experiment of digital twin for thermal behavior is carried out using the digital twin system designed in Sect. 4. The thermal contact resistance and heat generation are corrected according to the measured temperatures and the correction models established in Sect. 3. The experiment conditions for physical and virtual entities are that the spindle speed is 6000 rpm; the temperatures of ambient and cooling water are all 27 °C. The initial boundary conditions are the same as the previous simulation. Figures 10 and 11 show the measured and digital twin-based simulation curves of the temperature distribution at these three thermal key points and the thermal deformation of the core spindle.
It can be seen from Fig. 10 that the maximum temperatures at these three thermal key points measured by the sensors are 29.06, 29.22, and 29.44 °C, respectively; the maximum temperatures calculated by the digital twin system are 29.07, 29.20, and 29.29 °C, respectively. The maximum  error between the digital twin-based simulation results and the measured results is less than 0.36 °C, and the calculation accuracy is greater than 98% in the whole process. Comparing Fig. 10 with Fig. 8, the maximum simulated temperatures at these three thermal key points before digital twin are obviously larger than that using the digital twin system. The maximum temperature rise using the digital twin system is reduced to 2.66 °C compared to traditional simulation. That is, the simulation effect of the proposed digital twin system is significantly better than traditional simulation. That is, the calculated thermal boundary conditions are difficult to be close to the true value due to the influence of many factors. The simulation results also show that the simulated temperature curves at these three thermal key points before digital twin are inconsistent with the measured temperature curves. The simulated thermal equilibrium time before digital twin is about 1500 s; however, the measured temperatures are always rising; this is because the continues change of thermal contact resistance caused by the thermal deformation. Therefore, the digital twin for thermal behavior is of great significance to improve the accuracy of thermal characteristic simulation. Figure 10 also shows that the temperature curves simulated by the digital twin system gradually converge to the measured temperature curves. That is, the correction of the thermal boundaries is a process of gradual convergence. In order to reduce or eliminate the oscillation in the convergence process, the correction models for thermal boundaries or correction method should be improved.
The thermal deformation at the front end of the motorized spindle simulated by the digital twin system is output every 80 s. And the measured thermal deformation at the same time is processed by calculating the average value. Figure 11 shows the measured and simulated thermal deformation curves; the accuracy of the prediction result can reach about 95%. Therefore, the proposed digital twin for thermal behavior can effectively improve the simulation accuracy of the thermal characteristics of the motorized spindle; it has a guiding role in improving the thermal optimization design of the high-speed motorized spindle. The simulated temperature Fig. 8 The temperature curves of simulation without digital twin