## 3 Hybrid Prediction Model of the Temperature Field of the Motorized Spindle  
In the traditional temperature field of the motorized spindle model, the heat transfer coefficients at key positions are calculated using an empirical formula that leads to an associated error in the calculation of the temperature field. This paper provides a precise temperature field for the finite element model of the motorized spindle where the heat transfer coefficients are optimized using a genetic algorithm. The finite element model of the boundary conditions of the motorized spindle is then used to accurately obtain the temperature field. The prediction model of the temperature field of the motorized spindle is shown in Figure 2. First, the initial values of the heat transfer coefficients \(h\) (\(h1\), \(h2\), \(h3\), \(h4\), and \(h5\)) are first calculated according to the empirical formulae shown in Formulae (3)-(7). Heat generation rates are calculated according to losses in the motorized spindle. The boundary conditions of the rates of heat generation and the initial value of the heat transfer coefficients are used as initial conditions of the finite element model to calculate the temperature field. Second, the speed of the motorized spindle, the temperature of the cooling water, its flow rate, the pressure of the compressed, and the interval of fuel supply are varied as the surface temperature of the motorized spindle is monitored. Third, the heat transfer coefficients of the motorized spindle are optimized by genetic manipulation. It is clear from the flowchart in Figure 3 that the five elements of the genetic algorithm are coding, initial population generation, population fitness assessment, genetic manipulation, and operation parameters' setting.  
The objective function is given by  
\[f_{m}=\frac{1}{m}\sum_{i=1}^{m}\lvert T_{ei}-T_{si}\rvert \tag{8}\]  
where \(m\) is the number of measurement positions, \(T_{ei}\) is the monitored temperature of the motorized spindle, and \(T_{si}\) is the simulation temperature of the motorized spindle. The fitness function is  
\[f_{fit}=\frac{1}{1+f_{m}} \tag{9}\]  
where \(f_{m}\) and \(f_{fit}\) are the termination conditions for iterations used to optimize the heat transfer coefficient. When \(f_{m}\leq 0.5\)\({}^{\circ}\)C, that is, \(f_{fit}\leq 0.67\), the iterations are terminated. Moreover, to render the research results more suitable for engineering applications, the maximum number of iterations is limited to 100. If the value of the fitness function satisfies the conditions of convergence, the given heat transfer coefficient is considered optimized. Otherwise, the genetic operation obtains a set of new heat transfer coefficients, evaluates their fitness, and judges the convergence once again.  
Figure 2: Prediction model of the temperature field of the motorized spindle.  
Finally, the optimized heat transfer coefficients are used as the boundary conditions of the model and the temperature field of the motorized spindle is predicted.  
Compared with the finite element heat transfer coefficients of traditional models, those of the model developed in this work are associated with the cooling system, lubrication system, control system, and load of the motorized spindle, which have dynamic and nonlinear characteristics. As long as the key position of spindle temperature can be measured, this model can predict the temperature field of the motorized spindle under different operating conditions.