# Spindle Thermal Error Prediction Based on LSTM Deep Learning for a CNC Machine Tool
## 3 Experimental Results  
### Environment Establishment and Experimental Result Analysis  
In this study, an AWEA VP-2012 (Hsinchu, Taiwan) three-axis gantry-type machining center with a direct drive spindle was the experimental subject, of which the highest rotation speed is 10,000 rpm. According to the heat source and experience analytical results, a total of 47 ITPs were established in different machine structures and positions of the machine tool, as shown in Figure 4 and Table 1, respectively. In Figure 4, \(T_{0}\) is defined as the origin of the mechanical coordinates for AWEA VP-2012, and the absolute Cartesian coordinates for all ITPs are shown in Table 1.  
Subsequently, three spindle thermal displacement experiments were conducted in a constant temperature environment of 25 degrees. For each experiment, the spindle thermal displacement was measured in accordance with the \"five-point method\" from the international standard, and the details are recorded in Section 2.1. The spindle rotation speeds were set to 3000, 6000, and 9000 rpm. For each experiment, the machine was run for 8 h and turned off for another 8 h, as shown in Figure 5. The maximum spindle displacements at 3000, 6000, and 9000 rpm were \(-\)18, \(-\)39, and \(-\)65 \(\upmu\)m, respectively. When the machine was turned off after running for 8 h hours, temporary reverse displacement of the spindle in the z-direction was observed. This phenomenon occurred because when the spindle rotation speed was switched between high rates, the resulting centrifugal force changes caused a change in the bearing load, which indirectly affected the contact angle between the inner and outer bearing rings and the balls, leading to changes in spindle  
To select the reference point of the temperature increase, the variance of the 47 ITPs \(T\) = {\(T_{1}\), \(T_{2}\),..., \(T_{47}\)} was be calculated by using Equation (1). The resulting values were then arranged in ascending order. Table 2 lists the serial numbers of the first ten ITPs and their variance. ITP \(T_{46}\) with the smallest variance was set as the reference point \(T_{\text{b}}\). Subsequently, the temperature rise of each ITP (except for the reference ITP) was obtained by subtracting the value of \(T_{\text{b}}\) from the ITP value in question, which is denoted as \(\Delta T\) = {\(\Delta T_{1}\), \(\Delta T_{2}\),..., \(\Delta T_{n-1}\) }, where \(\Delta T_{1}\) = \(T_{1}\) = \(T_{\text{b}}\). At the stage of obtaining KTPs, the correlation coefficients \(C_{Z}\)(\(E\), \(\Delta T\)) between the temperature increase of each ITP and the spindle displacement in the z-direction \(E\) were calculated. To simplify observation, the acquired correlation coefficients were arranged in descending order, as presented in Table 3. ITP \(T_{17}\) was set as the first KTP group centroid because it had the strongest correlation with the spindle displacement. Subsequently, the correlation coefficients (\(C_{T}\)) between ITP \(T_{17}\) and the other 45 ITPs were determined. Table 4 presents the first ten ITPs in descending order and their corresponding correlation coefficients. The clustering threshold \(\rho\) was set to 0.9. ITPs larger than this \(\rho\) value were then grouped together. Specifically, \(T_{5}\), \(T_{6}\), \(T_{7}\), \(T_{8}\), and \(T_{18}\) were assigned to group 1, and the ITP \(T_{17}\) was the cluster centroid. The remaining ITPs were continuously analyzed according to their correlations with the spindle displacement, as shown in Table 5. Table 5 indicates that ITP \(T_{9}\) was the centroid of group 2. The correlation coefficients between \(T_{9}\) and the remaining ITPs were determined, as listed in Table 6. According to the clustering threshold \(\rho\), the temperature points belonging to group 2 were then identified. These steps were repeated until all the ITPs were clustered. Finally, 13 clustering results were obtained, as shown in Table 7. Meanwhile, 13 cluster centroids were collected as candidate KTP set \(TK\).