3.1. Modelling of Heat Transfer
At different locations within the spindle, various complex heat transfer processes occur during its high-speed rotation.
Figure 2 presents an analysis of the heat transfer processes in the spindle structure of the VDL-600A vertical machining center:
The thermal deformations of bearings A, B, and various shaft sections are the primary factors contributing to spindle thermal errors, as these components are highly temperature-sensitive. During high-speed rotation, significant amounts of frictional heat (Q1, Q2, Q3) are generated, resulting from friction between the belt and pulley C, as well as between ball bearings A, B, and their outer rings. As a result, temperatures rise at pulley C and bearings A, B, designating these components as the spindle’s primary heat sources. Temperature at the bearing positions can be measured using temperature sensors mounted on the bearing outer rings. However, due to the spindle’s high rotational speed, it is not feasible to directly measure the temperature at pulley C. Thus, this study developed a spindle temperature field model using heat transfer theory to calculate the temperature at the pulley position.
The heat generated by friction between pulley C and bearings A, B causes a temperature rise in these components. The temperature of bearings A, B is further elevated via heat conduction from the marked shaft segments C1 and C2. The air temperature surrounding the spindle also increases due to heat convection (marked as D1 and D2).
Equation (7) presents the formula for heat generation from friction between pulley
C and bearings
A,
B:
where the frictional heat generation rates for bearings
A,
B, and pulley
C are represented by Δ
Q1
i, Δ
Q2
i, and Δ
Q3
i, respectively. Bearings
A and
B exhibit a friction coefficient of
μ1, whereas pulley
C exhibits a friction coefficient of
μ2. The applied loads on bearings
A,
B, and pulley
C are represented by
p1,
p2, and
p3, respectively. The relative velocity of the frictional surfaces for bearings
A and
B is denoted as
v1, and the relative velocity of the frictional surfaces for pulley
C is denoted as
v2.
Equation (8) presents the formula for heat conduction:
where the heat conduction rates from pulley
C to bearings
A and
B along the spindle shaft are represented as Δ
C1i and Δ
C2i, respectively. The diameter of the heat-conducting shaft segment is denoted as
d3. The thermal conductivity is represented as
λ. The instantaneous temperatures of bearings
A,
B, and pulley
C are denoted as
TAi,
TBi, and
TCi, respectively. The axial distances from pulley
C to bearings
A and
B are represented by
L1 and
L2, respectively.
Equation (9) presents the formula for convective heat transfer:
where the convective heat transfer rates between the shaft segments (from pulley
C to bearing
A, and from pulley
C to bearing
B) and the surrounding air are represented as Δ
D1
i and Δ
D2
i, respectively. The convective heat transfer coefficient is denoted as
h, whereas the diameter of the heat-conducting shaft segments is represented by
d3. Additionally, the axial distances from pulley
C to bearings
A and
B are represented by
L1 and
L2. The instantaneous temperatures of pulley
C and the spindle’s surrounding air are denoted as
TCi and
Thi, respectively.
Equation (10) presents the formula for pulley
C’s temperature rise and the heat required for this rise:
where the instantaneous temperature of pulley
C at the current time step is represented by
TCi, the specific heat capacity of pulley
C is denoted as
C, the mass of pulley
C is represented by
m, the heat required for instantaneous temperature rise is denoted as Δ
Qxi, and
TC(i−1) represents the instantaneous temperature at the previous time step.
The heat required for the temperature rise of bearings A and B is provided by conductively transferred heat and friction-induced heat. Heat conduction is the primary contributor to this heat requirement. Considering the complexity of the governing equations, the heat input from bearings A and B’s self-friction (for their temperature rise) is disregarded.
Usually, the instantaneous heat generation of thermal radiation was found to be very small, accounting for less than one percent of the heat generated by friction. Therefore, considering the complexity of the equation, the heat generated by radiation was ignored.
Equation (11) was derived based on the fundamental principle of energy conservation:
where the frictional heat generation rates of bearings
A,
B, and pulley
C are represented by Δ
Q1
i, Δ
Q2
i, and Δ
Q3
i, respectively. The number of measured temperature points is denoted by
n. The heat conduction rates from pulley
C to bearings
A,
B along the spindle shaft are represented by Δ
C1
i and Δ
C2
i, respectively. Additionally, the convective heat transfer rates between the shaft segments (between pulley
C and bearing
A, and between pulley
C and bearing
B) and the surrounding air are represented by Δ
D1i and Δ
D2i, respectively. The heat required for pulley
C’s instantaneous temperature rise is denoted by Δ
Qxi.
Equation (12) presents the spindle temperature field model, which was established by substituting Equations (8)–(10) into Equation (11):
where the friction coefficients of bearings
A and
B are represented by
μ1, and the friction coefficient of pulley
C is represented by
μ2. The number of measured temperature points is denoted by
n. The applied loads on bearings
A,
B, and pulley
C are represented by
p1,
p2, and
p3, respectively. The relative velocity of the frictional surfaces of bearings
A and
B is denoted as
v1, whereas the relative velocity of the frictional surface of pulley
C is denoted as
v1. The heat required for instantaneous temperature rise is represented by Δ
Qxi. The convective heat transfer coefficient is denoted as
h, and the diameter of the heat-conducting shaft segments is represented by
d3. The axial distances from pulley
C to bearings
A and
B are denoted as
L1 and
L2, respectively. The instantaneous temperature of pulley
C is represented by
Tcᵢ, and the instantaneous temperature of the surrounding air at the current time step is represented by
Thi. The specific heat capacity of pulley
C is denoted as
C, and the mass of pulley
C is represented by
m. The instantaneous temperature of pulley
C at the previous time step is denoted as
TC(i−1), and the thermal conductivity is represented by
λ. The instantaneous temperatures of bearings
A and
B at the current time step are represented by
TAi and
TBi, respectively.
The spindle heat transfer model includes numerous material property parameters, many of which can be obtained via measurement or calculation. For instance, the relative velocities of the frictional surfaces (v1 for bearings A, B; v2 for pulley C), the diameter of the heat-conducting shaft segments (d3), and the axial distances from pulley C to bearings A, B (L1, L2) can be directly obtained. However, certain parameters—such as the friction coefficients (μ1 for bearings A, B; μ2 for pulley C) and the applied loads on bearings A, B, and pulley C (p1, p2, p3)—are often prone to minor deviations from actual values when obtained via literature research or data lookup. To obtain more precise parameter values, it is customary to use temperature data at specific spindle positions as input, then apply intelligent algorithms to iteratively adjust these parameters and identify values that best match the spindle’s actual operating conditions.
3.2. WOA Optimization Searching
The use of the Whale Optimization Algorithm (WOA) involves simulating various hunting behaviors of whales, including encircling and ensnaring prey, bubble-net feeding, and exploring for food sources. The algorithm employs either random or optimized search agents to emulate these behaviors. WOA has several advantages, including low dependence on tunable parameters and strong global optimization capability. Consequently, WOA is employed to optimize the spindle’s material property parameters.
The algorithm’s specific steps are as follows:
- (1)
The population size, maximum number of iterations, and upper/lower bounds for the optimization variables are set. The initial population is randomly generated within these specified bounds;
- (2)
The fitness values of the initial population are evaluated by substituting them into the objective function. The population is sorted by the magnitude of fitness values. The position of the individual (in the population) with the minimum fitness value is updated and designated as the optimal solution;
- (3)
In the initial stage, whales’ encircling and ensnaring behavior is simulated. The specific formula is given by Equation (13):
where the coefficient vectors
A and
C are used. The current optimal position of an individual in the population is denoted as
X*(
t), whereas
X(
t) represents the current position of an individual in the population. The updated position of an individual in the population is represented by
X(
t + 1). The current iteration number is denoted as
t.
a is linearly decreased from 2 to 0 over the course of iterations. Random numbers
r1 and
r2 in the range [0, 1] are used.
P denotes
a random value in [0, 1] that determines either the contraction-expansion mechanism, the spiral motion mechanism, or the prey searching mechanism.
- (4)
Whales’ spiral motion behavior during hunting is simulated, and the specific formula is presented in Equation (14):
where the distance between a whale and its prey is represented by
Dp. The current optimal position of an individual in the population is denoted as
X*(
t), whereas
X(
t + 1) represents the updated position of an individual in the population. The spiral shape is denoted by
b, while the parameter l is a randomly generated number in the range [−1, 1]. Additionally, the current position of an individual in the population is represented by
X(
t). The selection of either the contraction–expansion mechanism, the spiral motion mechanism, or the prey searching mechanism is denoted by
p, a random value in [0, 1]. Finally, the selection between the spiral motion mechanism and the prey searching mechanism is denoted by
A.
- (5)
Whales’ prey-searching motion behavior is simulated, and the specific formula is presented in Equation (15):
where the randomly selected position of an individual whale is represented by
Xrand. The current position of an individual in the population is denoted as
X(
t).
A random coefficient vector is denoted by
C. The updated position of an individual in the population is represented by
X(
t + 1). The choice between the contraction-expansion mechanism, the spiral motion mechanism, a random value in [0, 1]. The selection between the spiral motion mechanism or the prey searching mechanism is represented by
A.
- (6)
Steps (3)–(5) are repeated until the termination condition is satisfied.
3.3. WOA Optimization for Temperature Field Model
The WOA is employed to optimize the physical parameters of the temperature field model. These parameters include the friction coefficients
μ1 (for bearings
A,
B) and
μ2 (for pulley
C), as well as the applied loads
p1 (bearing
A),
p2 (bearing
B), and
p3 (pulley
C). The process flow is shown in
Figure 3.
The WOA optimization process for temperature field model parameters is carried out as follows: First, the population size, maximum number of iterations, and upper/lower bounds of the optimization variables for the whale population are set, followed by generating a random initial population whose dimensions match the number of optimization variables. Subsequently, the fitness of each individual in the initial population is calculated by inputting the initial population and measured temperature data into the model, and the optimal individual—corresponding to a smaller residual—is selected based on the highest fitness. A new offspring population is then generated by simulating whale hunting behaviors: encircling prey, spiral movement, and prey searching; after inputting the positions of these offspring individuals into the model to calculate their fitness, the optimal individual (again indicated by the highest fitness and a smaller residual) is chosen. These steps are repeated until the maximum number of iterations is reached.
Through the above three formulas of the Whale Optimization Algorithm (WOA), it is possible to avoid falling into local optimal solutions during the optimization process of the spindle’s physical parameters, making the optimized physical parameters more reasonable.
Through repeated iteration of these steps, the theoretical material parameters in the model gradually converge to the machine tool’s actual state, corrected by input temperature data. Consequently, accurate temperature data at the spindle’s sensitive points can be obtained using the calibrated temperature field model. However, real-time thermal error compensation cannot be achieved solely by obtaining accurate temperature data. To achieve real-time compensation, a reliable mapping between temperature and thermal error must be established. It is worth noting that the fitting performance of mappings established by general mathematical models is poor and lacks robustness and stability. In contrast, neural network models exhibit superior fitting performance, robustness, and stability, as they can effectively establish mappings between complex datasets.