Modeling method and system for space-time prediction model of thermal error of machine tool spindle based on environmental temperature sensing
By using a spatiotemporal prediction model for machine tool spindle thermal error based on ambient temperature sensing, and leveraging multi-source datasets and attention weighting technology, the modeling problem of the coupling relationship between ambient temperature and thermal deformation of structural components was solved, achieving high-precision thermal error prediction and adapting to thermal error changes under different working conditions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XI AN JIAOTONG UNIV
- Filing Date
- 2026-04-08
- Publication Date
- 2026-06-05
Smart Images

Figure CN122154483A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of spindle thermal error modeling technology, and relates to a modeling method and system for spatiotemporal prediction of machine tool spindle thermal error based on ambient temperature sensing. Background Technology
[0002] In machine tool processing, thermal error is one of the factors affecting machining accuracy. Thermal error in gear hobbing machines directly affects tooth profile and pitch, thus impacting gear machining accuracy and yield. Deep learning-based data-driven models are widely used in spindle thermal error modeling, but they have the following problems: Existing spindle thermal error models mostly focus on local heat sources such as spindle bearings, neglecting the coupled effects of ambient temperature fluctuations on large support components such as machine tool columns and slides. If the coupling relationship between ambient temperature and thermal deformation of structural components is not fully characterized during the modeling process, the prediction accuracy will tend to decrease under long-term, variable-temperature conditions.
[0003] Spindle thermal error modeling treats each measuring point as an independent entity, lacking in-depth correlation analysis of the temperature field in terms of temporal evolution and spatial layout, making it difficult to accurately extract the nonlinear laws of the overall thermal characteristics of the machine tool. Summary of the Invention
[0004] To address the shortcomings of existing technologies, the present invention aims to provide a modeling method and system for a spatiotemporal prediction model of machine tool spindle thermal error based on ambient temperature sensing.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: This invention provides a modeling method for a spatiotemporal prediction model of machine tool spindle thermal error based on ambient temperature sensing, comprising the following steps: acquiring a multi-source dataset; preprocessing the multi-source dataset to obtain a sequence sample matrix; applying spatial attention weighting to the initial spatial features in the sequence sample matrix to obtain attention-enhanced spatial feature vectors; applying temporal attention weighting to the initial temporal features in the sequence sample matrix to obtain attention-enhanced temporal feature vectors; concatenating the spatial feature vectors and temporal feature vectors and performing nonlinear regression to predict the spindle thermal error at the current moment, thereby constructing a spatiotemporal prediction model for machine tool spindle thermal error; dividing the sequence sample matrix into a training set and a validation set; using the training set to train the spatiotemporal prediction model for spindle thermal error until the loss value of the spatiotemporal prediction model for machine tool spindle thermal error converges on the validation set.
[0006] Further, the initial spatial features in the sequence sample matrix are spatially attention-weighted to obtain an attention-enhanced spatial feature vector, including: performing max pooling and average pooling on the initial spatial features in the sequence sample matrix respectively, concatenating the max pooling result and the average pooling result, then performing convolution and nonlinear activation to obtain a spatial correlation matrix, and multiplying the spatial correlation matrix with the input features of the attention mechanism to obtain an attention-enhanced spatial feature vector.
[0007] Furthermore, the attention-enhanced spatial feature vector is: :
[0008]
[0009]
[0010] in, This is the spatial correlation matrix. For initial spatial features, For activation function, This is the spatial feature matrix after channel-dimensional compression. For convolution kernel, For feature splicing, The final value of the max-pooling feature map is obtained. This represents the final value of the average pooling feature map.
[0011] Further, the temporal features in the sequence sample matrix are weighted by temporal attention to obtain a temporal feature vector, including: using a fully connected layer and a Softmax layer to transform the temporal features into a similarity matrix, and assigning weights to the attention-enhanced temporal feature vector based on the similarity matrix to obtain the temporal feature vector.
[0012] Furthermore, the attention-enhanced temporal feature vector is: :
[0013]
[0014] in, This is the index of the input sequence at the current time step. For the first The input feature vector at each time step, For the first The attention weight coefficients corresponding to each time step For normalized exponential functions, It is a non-linear activation function. The learnable weight matrix for the attention mechanism. For the first Each time step feature vector to be scored This is a learnable bias term.
[0015] Furthermore, training the spindle thermal error spatiotemporal prediction model using the training set also includes evaluating the spindle thermal error spatiotemporal prediction model based on the root mean square error, mean absolute error, and maximum absolute error.
[0016] Furthermore, the root mean square error is :
[0017] The mean absolute error is :
[0018] The maximum absolute error is :
[0019] in, For the sample size, This represents the actual thermal error. This is the predicted thermal error output by the machine tool spindle thermal error model.
[0020] Furthermore, the multi-source dataset consists of multi-source sensor data collected from the machine tool spindle, column, and slide under different ambient temperatures and rotational speeds.
[0021] Further, the multi-source dataset is preprocessed to obtain a sequence sample matrix, including: performing sliding window segmentation and normalization on the multi-source dataset according to a set time step to obtain the sequence sample matrix.
[0022] This invention also provides a modeling system for a spatiotemporal prediction model of machine tool spindle thermal error based on ambient temperature sensing, comprising: an acquisition module for acquiring multi-source datasets and preprocessing the multi-source datasets to obtain a sequence sample matrix; a weighting module for applying spatial attention weighting to the initial spatial features in the sequence sample matrix to obtain attention-enhanced spatial feature vectors, applying temporal attention weighting to the initial temporal features in the sequence sample matrix to obtain attention-enhanced temporal feature vectors, concatenating the spatial feature vectors and temporal feature vectors and performing nonlinear regression to predict the spindle thermal error at the current moment, and constructing a spatiotemporal prediction model of machine tool spindle thermal error; and a training module for dividing the sequence sample matrix into a training set and a validation set, using the training set to train the spatiotemporal prediction model of spindle thermal error until the loss value of the spatiotemporal prediction model of machine tool spindle thermal error converges on the validation set.
[0023] Compared with the prior art, the present invention has the following beneficial technical effects: This invention presents a modeling method for spatiotemporal prediction of machine tool spindle thermal error based on ambient temperature sensing. By acquiring multi-source datasets and preprocessing them to obtain a sequence sample matrix, it comprehensively integrates multi-dimensional information such as ambient temperature and spindle operating parameters, avoiding the limitations of a single data source. Initial spatial and temporal features are extracted from the sequence sample matrix through spatial attention weighting and temporal attention weighting, respectively, capturing the correlation between different temperature measurement points and thermal error, as well as the dynamic law of thermal error change over time. The two feature vectors are concatenated and nonlinear regression is performed to accurately predict the spindle thermal error at the current moment, improving the accuracy and timeliness of thermal error prediction and overcoming the shortcomings of traditional linear models in characterizing the nonlinear and time-varying characteristics of thermal error. The predicted spindle thermal error values are divided into training and validation sets, and the spatiotemporal prediction model is trained until the loss value converges, continuously optimizing the model parameters to adapt to ambient temperature fluctuations and spindle operating state changes under different working conditions, reducing the impact of thermal error on machining accuracy. Attached Figure Description
[0024] Figure 1 This is a flowchart of a modeling method for a spatiotemporal prediction model of machine tool spindle thermal error based on ambient temperature sensing, according to the present invention. Figure 2 This is a schematic diagram of the machine tool in an embodiment of the present invention, where a is the front view of the machine tool and b is the right view of the machine tool; Figure 3 These are temperature rise and thermal error curves under operating conditions K1 and K3 in this embodiment of the invention, where a is the temperature rise curve under operating condition K1, b is the thermal error curve under operating condition K1, c is the temperature rise curve under operating condition K3, and d is the thermal error curve under operating condition K3. Figure 4 This is a schematic diagram of the installation structure of the temperature and displacement sensors in an embodiment of the present invention; Figure 5 This is a schematic diagram illustrating the principle of machine tool spindle thermal error modeling in an embodiment of the present invention; Figure 6 The figures represent the prediction performance of different models in the embodiments of the present invention, where a is the prediction performance of the machine tool spindle thermal error model, b is the prediction performance of the long short-term memory network, c is the prediction performance of the convolutional neural network, and d is the prediction performance of the multiple linear regression. Detailed Implementation
[0025] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0026] Example 1 This invention discloses a modeling method for spatiotemporal prediction of machine tool spindle thermal errors based on ambient temperature sensing, such as... Figure 1 As shown, the method includes the following steps: acquiring a multi-source dataset; preprocessing the multi-source dataset to obtain a sequence sample matrix; applying spatial attention weighting to the initial spatial features in the sequence sample matrix to obtain an attention-enhanced spatial feature vector; applying temporal attention weighting to the initial temporal features in the sequence sample matrix to obtain an attention-enhanced temporal feature vector; concatenating the spatial feature vector and the temporal feature vector and performing nonlinear regression to predict the spindle thermal error at the current moment, thus constructing a spatiotemporal prediction model for machine tool spindle thermal error; dividing the sequence sample matrix into a training set and a validation set; using the training set to train the spatiotemporal prediction model for spindle thermal error until the loss value of the spatiotemporal prediction model for machine tool spindle thermal error converges on the validation set.
[0027] like Figure 2 As shown, the machine tool includes a worktable, spindle, slide, Y-axis motor, spindle box, and column. The thermal error of the spindle originates not only from the heat generated by the spindle bearings and the motor itself, but also from the static heat generated by the hydraulic system and fluctuations in the external ambient temperature. Because the spindle system and large structural components such as the column and slide have significant heat capacity, their thermal expansion and contraction processes exhibit time lag. The current thermal deformation is cumulatively affected by the thermal states of multiple past time steps, meaning the spindle thermal error exhibits a strong time-series dependence. The distances of structural components at different locations (such as the four corners of the slide and the top and bottom of the column) from the main heat source and the external environment's heat exchange surface vary. Local interference from nonlinear factors such as workshop airflow and direct sunlight leads to significant differences in the contribution of temperature rise at different spatial locations to the thermal drift of the spindle end face, confirming the spatial heterogeneity of the thermal error.
[0028] like Figure 3 Figure a shows the temperature rise curve and thermal error curve for operating condition K1. The temperature rise curves at different measuring points exhibit significantly different growth rates and trends over time. Even under the same operating conditions, there are significant differences in the temperature rise amplitude and change stages at each measuring point. Figure 3As shown in b, the spindle thermal elongation error and tilt angle error exhibit obvious nonlinear fluctuation characteristics over time, and show a certain lag relationship with temperature rise changes, further verifying the time-series accumulation effect of thermal errors. Figure 3 As shown in Figure c, the temperature rise curve and thermal error curve are for the K3 operating condition. Under the K3 operating condition, the overall temperature rise level and distribution differences at each measuring point are further amplified, and the temperature rise distribution in different regions exhibits stronger non-uniformity, such as... Figure 3 As shown in Figure d, the amplitude of the spindle thermal error increases significantly and its trend becomes more complex, indicating that the influence of temperature rise at different spatial locations on the thermal error has a significant non-uniform contribution characteristic. In summary, the spindle thermal error not only exhibits significant temporal correlation but also strong spatial heterogeneity.
[0029] A multi-source dataset was acquired, consisting of multi-source sensor data collected from the machine tool spindle, column, and slide under different ambient temperatures and rotational speeds. Under static and variable ambient temperature conditions (K1, K2), the spindle remained stationary (rotational speed 0 r / min). The ambient temperature rise ranges recorded during the two sets of experiments were 0–2.5℃ and 0–2.0℃, respectively. To eliminate interference from spindle operation heat generation, the effects of ambient temperature fluctuations and the static state of the machine tool system on the temperature rise of large structural components and the initial thermal drift of the spindle were independently evaluated and extracted. Under constant rotational speed conditions (K3–K5), the spindle operated continuously at fixed speeds of 3000 r / min (K3), 4000 r / min (K4), and 5000 r / min (K5), respectively, with corresponding ambient temperature rise ranges of 0–2.2℃, 0–2.0℃, and 0–3.5℃. This covered the thermal deformation patterns of the spindle under medium- and high-speed constant loads, superimposed with different amplitudes of ambient temperature rise. The stepped variable speed composite operating condition (K6) is a stepped variable speed operation mode. The spindle speed increases sequentially at 3000 r / min, 4000 r / min, and 5000 r / min, with each speed stage running stably for 2 hours. During the test, the ambient temperature rise range is 0–1.0℃. A highly nonlinear heat generation / dissipation alternation phenomenon is generated, which is used to verify the long-time lag tracking capability and high-precision prediction performance under complex dynamic loads.
[0030] like Figure 4As shown, 20 PT100 temperature sensors are arranged on the spindle head, bearing housing, upper and lower end faces of the column, four corners of the slide, and surrounding environment. Simultaneously, 5 ML33 eddy current displacement sensors are non-contactly arranged on the spindle end face to capture axial and radial thermal expansion of the spindle end face. All sensors use industrial-grade shielded twisted-pair cabling, and common-mode noise suppression is achieved through single-point grounding. After converting the analog signals collected by the sensors into digital signals, they are connected to a Raspberry Pi via a USB-RS485 converter using the Modbus RTU protocol. A low-noise reference is constructed using a power isolation design. The Raspberry Pi polls cyclically as a master station to achieve high-density synchronous acquisition across multiple channels. A Python program is used on the Raspberry Pi to insert a timestamp for each acquisition, ensuring absolute alignment of ambient temperature, component temperature rise, and spindle displacement in the time dimension. Data is written to Excel in real time, and a TCP server is established to distribute JSON format data streams externally.
[0031] The collected multi-source datasets are segmented by sliding window according to a set time step, and after normalization, they are divided into sequence sample matrices. The sequence sample matrices are simultaneously input into the Long Short-Term Memory Neural Network (LSTM) and Convolutional Neural Network (CNN) branches. Temporal features are extracted in the LSTM branch, and a temporal attention mechanism is introduced to weight the output features. Spatial features are extracted in the CNN branch, and a spatial attention mechanism is introduced to weight the output features. The temporal and spatial features weighted by the attention mechanism are concatenated and fused, and the final prediction of thermal errors is achieved through a fully connected layer.
[0032] The LSTM network is configured with 128 hidden layer units. Dynamic evolution information of the thermal characteristic sequence is extracted step-by-step. A temporal attention mechanism module is integrated at the end, autonomously learning and assigning weight coefficients for the time dimension, enabling the machine tool spindle thermal error model to focus on the historical time step that has the most significant impact on the current thermal deformation. Specifically, fully connected layers and Softmax layers are used to transform the nonlinear relationships between temporal features in the sequence sample matrix into similarity matrices. Based on similarity matrix Weights are assigned to the attention-enhanced temporal feature vector to obtain the attention-enhanced temporal feature vector. .
[0033]
[0034]
[0035] in, This is the index of the input sequence at the current time step. For the first The input feature vector at each time step, For the first The attention weight coefficients corresponding to each time step This is a normalized exponential function used to map scores to the (0, 1) interval while ensuring that the sum of all weights is 1. It is a non-linear activation function. The learnable weight matrix for the attention mechanism. For the first Each time step feature vector to be scored This is a learnable bias term.
[0036] like Figure 5 As shown, the CNN network is configured with a kernel stride of 1 and padding of 1. Convolution is performed on multi-source temperature data within a single time step, increasing the feature channels from 1 microdimensionality to 64 dimensions to extract deep spatial features. Subsequently, a spatial attention mechanism module is connected to adaptively calculate and amplify the feature weights of large components or environmental measurement points that contribute most to the principal axis thermal error, while suppressing irrelevant noise. Specifically, the spatial features in the sequence sample matrix are subjected to max pooling and average pooling respectively. The max pooling and average pooling results are concatenated, followed by convolution and nonlinear activation to obtain a spatial correlation matrix. This spatial correlation matrix is then multiplied by the input features of the attention mechanism to obtain an attention-enhanced spatial feature vector. .
[0037]
[0038]
[0039]
[0040]
[0041]
[0042] in, This is the spatial correlation matrix. For the original input feature tensor, For activation function, This is the spatial feature matrix after channel-dimensional compression. The kernel is a convolution, with compensation and padding set to 1. For feature splicing, The final value of the max-pooling feature map is obtained. The final value of the average pooling feature map. To obtain the final max-pooling feature map in The value at that location, In order to be in arrive Search for spatial coordinates in all channels The maximum value at that location, Indicates the first On each channel, the spatial coordinates are Specific characteristic values at the location, To obtain the final average pooling feature map in The value at that location, The channel index of the input tensor. This represents the total number of channels.
[0043] The spatial and temporal feature vectors are concatenated along the channel dimension to construct a spatiotemporal feature matrix, which is then input into a fully connected layer for nonlinear regression, outputting the predicted principal axis thermal error value at the current moment. The sequence sample matrix is divided into training and validation sets in an 8:2 ratio. Mean squared error is used as the loss function, and the network is iteratively trained using the Adam optimizer until the loss value converges.
[0044] To evaluate the effectiveness of the machine tool spindle thermal error model, multiple linear regression (MLR), long short-term memory neural network (LSTM), and convolutional neural network (CNN) models were selected as comparison models, and root mean square error (RMSE), mean absolute error (MAE), and maximum absolute error (E-max) were selected as performance metrics.
[0045] Root mean square error is :
[0046] The mean absolute error is :
[0047] The maximum absolute error is :
[0048] Under K6 operating conditions, the thermal error of the machine tool spindle thermal error model is -15 to 47 μm, with a maximum residual value of 4.9 μm. Figure 6 As shown in figure a, the maximum residual value of the LSTM model is 8.4 μm. Figure 6 As shown in b, the maximum residual value of the CNN model is 8.2 μm. Figure 6 As shown in c, the maximum residual value of the MLR model is 9.2 μm. Figure 6As shown in d, the machine tool spindle thermal error model can control the thermal error within ±5μm, reducing the error by 84%, and the prediction accuracy is better than the comparison model. According to the root mean square error and mean absolute error index, the model has the best fitting effect on the real error curve. This is because MLR has weak nonlinear fitting ability and is difficult to train high-dimensional data. Although LSTM and CNN have nonlinear learning ability, their prediction accuracy for the sudden change point of variable speed in the experiment is insufficient.
[0049] Example 2 This invention discloses a modeling system for spatiotemporal prediction of machine tool spindle thermal error based on ambient temperature sensing, comprising: an acquisition module, a weighting module, and a training module. The acquisition module acquires multi-source datasets and preprocesses them to obtain a sequence sample matrix. The weighting module performs spatial attention weighting on the initial spatial features in the sequence sample matrix to obtain attention-enhanced spatial feature vectors, and temporal attention weighting on the initial temporal features to obtain attention-enhanced temporal feature vectors. The spatial and temporal feature vectors are concatenated and subjected to nonlinear regression to predict the spindle thermal error at the current moment, thus constructing a spatiotemporal prediction model for machine tool spindle thermal error. The training module divides the sequence sample matrix into a training set and a validation set, and uses the training set to train the spatiotemporal prediction model for spindle thermal error until the loss value of the model converges on the validation set.
[0050] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
Claims
1. A modeling method for spatiotemporal prediction of machine tool spindle thermal error based on ambient temperature sensing, characterized in that, Includes the following steps: Obtain a multi-source dataset, and preprocess the multi-source dataset to obtain a sequence sample matrix; Spatial attention weighting is applied to the initial spatial features in the sequence sample matrix to obtain an attention-enhanced spatial feature vector. Temporal attention weighting is applied to the initial temporal features in the sequence sample matrix to obtain an attention-enhanced temporal feature vector. The spatial feature vector and the temporal feature vector are concatenated and nonlinearly regressed to predict the spindle thermal error at the current moment, thus constructing a spatiotemporal prediction model for machine tool spindle thermal error. The sequence sample matrix is divided into a training set and a validation set. The training set is used to train the spatiotemporal prediction model of the spindle thermal error until the loss value of the spatiotemporal prediction model of the machine tool spindle thermal error on the validation set converges.
2. The modeling method for spatiotemporal prediction of machine tool spindle thermal error based on ambient temperature sensing according to claim 1, characterized in that, The initial spatial features in the sequence sample matrix are spatially attention-weighted to obtain an attention-enhanced spatial feature vector, including: The initial spatial features in the sequence sample matrix are subjected to max pooling and average pooling respectively. The max pooling result and the average pooling result are concatenated, and then convolution and nonlinear activation are performed to obtain the spatial correlation matrix. The spatial correlation matrix is multiplied with the input features of the attention mechanism to obtain the attention-enhanced spatial feature vector.
3. The modeling method for spatiotemporal prediction of machine tool spindle thermal error based on ambient temperature sensing according to claim 1, characterized in that: The spatial feature vector of the attention enhancement is : in, This is the spatial correlation matrix. For initial spatial features, For activation function, This is the spatial feature matrix after channel-dimensional compression. For convolution kernel, For feature splicing, The final value of the max-pooled feature map. This represents the final value of the average pooling feature map.
4. The modeling method of the thermal error spatio-temporal prediction model for machine tool spindle based on environment temperature perception according to claim 1, characterized in that, The temporal features in the sequence sample matrix are weighted by temporal attention to obtain a temporal feature vector, including: The temporal features are transformed into a similarity matrix using a fully connected layer and a softmax layer. Based on the similarity matrix, the attention-enhanced temporal feature vectors are weighted to obtain the temporal feature vectors.
5. The modeling method for spatiotemporal prediction of machine tool spindle thermal error based on ambient temperature sensing according to claim 1, characterized in that: The attention-enhanced timing feature vector is : in, This is the index of the input sequence at the current time step. For the first The input feature vector at each time step, For the first The attention weight coefficients corresponding to each time step For normalized exponential functions, It is a non-linear activation function. The learnable weight matrix for the attention mechanism. For the first Each time step feature vector to be scored This is a learnable bias term.
6. The modeling method for spatiotemporal prediction of machine tool spindle thermal error based on ambient temperature sensing according to claim 1, characterized in that: Training the spatiotemporal prediction model of spindle thermal error using the training set also includes evaluating the spatiotemporal prediction model of spindle thermal error based on the root mean square error, mean absolute error, and maximum absolute error.
7. The modeling method for spatiotemporal prediction of machine tool spindle thermal error based on ambient temperature sensing according to claim 6, characterized in that: The root mean square error is : The mean absolute error is : The maximum absolute error is : in, For the sample size, This represents the actual thermal error. This is the predicted thermal error output by the machine tool spindle thermal error model.
8. The modeling method for spatiotemporal prediction of machine tool spindle thermal error based on ambient temperature sensing according to claim 1, characterized in that: The multi-source dataset consists of multi-source sensor data collected from the machine tool spindle, column, and slide under different ambient temperatures and rotational speeds.
9. The modeling method for spatiotemporal prediction of machine tool spindle thermal error based on ambient temperature sensing according to claim 8, characterized in that, The multi-source dataset is preprocessed to obtain a sequence sample matrix, including: The multi-source dataset is sequentially segmented and normalized according to a set time step to obtain a sequence sample matrix.
10. A modeling system for spatiotemporal prediction of machine tool spindle thermal error based on ambient temperature sensing, characterized in that, include: Acquisition module: used to acquire multi-source datasets and preprocess the multi-source datasets to obtain a sequence sample matrix; Weighting module: used to perform spatial attention weighting on the initial spatial features in the sequence sample matrix to obtain attention-enhanced spatial feature vectors, perform temporal attention weighting on the initial temporal features in the sequence sample matrix to obtain attention-enhanced temporal feature vectors, and concatenate the spatial feature vectors and temporal feature vectors and perform nonlinear regression to predict the spindle thermal error at the current moment and construct a spatiotemporal prediction model for machine tool spindle thermal error; Training module: used to divide the sequence sample matrix into training set and validation set, and use the training set to train the spatiotemporal prediction model of spindle thermal error until the loss value of the spatiotemporal prediction model of machine tool spindle thermal error on the validation set converges.