A machine tool thermal error modeling method based on multi-source heterogeneous temperature feature fusion
By fusing multi-source heterogeneous temperature features, combining one-dimensional and two-dimensional temperature data, using LSTM and CNN to extract features, and utilizing KAN network and self-attention layer for prediction, the problem of temperature field information loss in traditional methods is solved, and accurate prediction of machine tool thermal errors and efficient modeling are achieved.
Patent Information
- Application Number
- CN202511263471.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-05
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-09-05
AI Technical Summary
Traditional thermal error modeling methods rely on single-point temperature data, which leads to the loss of temperature field information and makes it difficult to fully perceive the machine tool temperature field, thus limiting the prediction accuracy of thermal error models.
A multi-source heterogeneous temperature feature fusion method is adopted, which combines one-dimensional temperature data and two-dimensional temperature field infrared images. Features are extracted by LSTM and CNN, and feature fusion and prediction are performed by KAN network and self-attention layer to construct MHDFTEM model.
It achieves accurate prediction of machine tool thermal errors, improves the prediction accuracy and robustness of the model, and reduces the mean absolute error and root mean square error.
Smart Images

Figure CN120763871B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of CNC machine tool error compensation, specifically involving a machine tool thermal error modeling method based on the fusion of multi-source heterogeneous temperature features. Background Technology
[0002] As core equipment in modern manufacturing, CNC machine tools directly impact product quality through their machining accuracy. Machine tool thermal error is a key factor affecting its accuracy and stability. Thermal error modeling and compensation technology is an important means to reduce machine tool thermal error and improve its accuracy, but its modeling accuracy depends on a comprehensive and accurate perception of the machine tool's temperature field information. Traditional thermal error compensation methods mainly rely on temperature sensors to collect one-dimensional temperature data, which can only reflect temperature field information at a single point, resulting in information loss. Furthermore, in actual industrial scenarios, the complex wiring of temperature sensors and the difficulty in installing them in some key locations prevent the deployment of a large number of sensors in critical machine tool parts, leading to incomplete overall temperature information collection and limiting the predictive accuracy of the thermal error model. Summary of the Invention
[0003] The purpose of this invention is to provide a thermal error modeling method based on the fusion of multi-source heterogeneous temperature features; by acquiring two-dimensional temperature field information of key parts of machine tools through infrared images, non-contact monitoring of the thermal distribution of key machine tool components is achieved; and by fusing with one-dimensional time-series data acquired by sensors, comprehensive temperature field information is obtained, enabling accurate prediction of machine tool thermal errors.
[0004] To achieve the above objectives, the present invention adopts the following technical solution:
[0005] A method for modeling machine tool thermal errors based on the fusion of multi-source heterogeneous temperature features includes the following steps:
[0006] Step 1: Collect one-dimensional temperature data of the machine tool spindle, two-dimensional infrared images of the temperature field of the machine tool spindle box, column and bed, and machine tool thermal error;
[0007] Step 2: Construct a one-dimensional temperature rise time series feature extraction module; used to extract one-dimensional temperature rise time series features from the one-dimensional temperature data;
[0008] Step 3: Construct a two-dimensional infrared image feature extraction module; used to extract two-dimensional temperature field spatial features from the two-dimensional temperature field infrared image;
[0009] Step 4: Construct a feature fusion layer; used to fuse the one-dimensional temperature rise time-series features and the two-dimensional temperature field spatial features, and to encode the fused features at different time steps;
[0010] Step 5: Construct the KAN layer; used to perform learnable high-order nonlinear transformations on the encoded features;
[0011] Step 6: Construct a self-attention layer and a prediction output layer; adjust the time step weights using the self-attention layer, and extract the last column of the self-attention layer output as the content vector at time t. Predicting thermal errors using the output of fully connected layers. , Let T be the output layer weight matrix, and T be the transpose of the matrix. This is a bias term.
[0012] Furthermore, in step 1, a temperature sensor is installed on the machine tool spindle to collect one-dimensional temperature data; an eddy current displacement sensor is used to simultaneously measure the machine tool thermal error; and an infrared camera is used to collect two-dimensional temperature field infrared images of the machine tool spindle box, column, and bed.
[0013] Furthermore, in step 2, the one-dimensional temperature rise time series feature extraction module is constructed using two stacked LSTM networks with the same number of units.
[0014] Furthermore, in step 2, the Lasso regression method is used to screen out temperature-sensitive points from the one-dimensional temperature data.
[0015] Furthermore, in step 3, the two-dimensional infrared image feature extraction module is constructed using a two-layer CNN network and an adaptive average pooling layer.
[0016] The present invention has the following beneficial effects:
[0017] (1) During the data acquisition phase, one-dimensional and two-dimensional temperature data are acquired simultaneously, overcoming the limitations of traditional methods that rely solely on single-point temperature data and providing more comprehensive temperature field information.
[0018] (2) In the feature extraction stage, LSTM and CNN are used to process one-dimensional and two-dimensional data respectively; LSTM can effectively capture the temporal features of one-dimensional temperature data, while CNN can extract the spatial features of two-dimensional temperature field; comprehensively describing the temperature distribution state of the machine tool.
[0019] (3) The feature fusion and encoding stage fuses two different dimensions of features and encodes different time steps; it realizes the effective fusion of multi-source heterogeneous data and provides a foundation for subsequent modeling.
[0020] (4) The introduction of the KAN network enables the model to have a learnable high-order nonlinear activation function, which enhances the model's ability to learn complex temperature field changes.
[0021] (5) The self-attention mechanism enables the model to adaptively adjust the weights at different time steps, further improving the model's ability to process time-series data; finally, the thermal error prediction results are output through the linear layer, realizing the accurate mapping from multi-source heterogeneous temperature data to thermal errors. This improves the prediction accuracy and robustness of the thermal error model. Attached Figure Description
[0022] Figure 1 This is a schematic diagram of the MHDFTEM structure of the present invention.
[0023] Figure 2 This is a schematic diagram showing the prediction results of the MHDFTEM of this invention and the traditional model.
[0024] Figure 3 This is a schematic diagram of the predicted residuals of the MHDFTEM of this invention and the traditional model.
[0025] Figure 4 This is a schematic diagram of the MHDFTEM of the present invention and the MAE and RMSE of the traditional model. Detailed Implementation
[0026] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0027] like Figure 1 As shown in the figure, this embodiment discloses a machine tool thermal error modeling method based on multi-source heterogeneous temperature feature fusion, which includes the following steps:
[0028] Step 1: Collect temperature data, infrared images of the temperature field, and machine tool thermal errors;
[0029] Several PT100 temperature sensors were arranged on the machine tool spindle. An experimental speed spectrum was designed and the machine tool was run accordingly. A set of one-dimensional temperature data was collected every three minutes. The thermal error of the machine tool was measured synchronously using an eddy current displacement sensor.
[0030] Two-dimensional temperature field infrared images of the machine tool spindle box, column, and bed are acquired by an infrared camera to monitor the target temperature distribution in real time, and a set of two-dimensional temperature field infrared images is saved every three minutes.
[0031] The two-dimensional temperature field infrared image is preprocessed. The preprocessing refers to first filtering out non-target areas to obtain the input image, then performing grayscale processing on the input image, and using the input image to subtract the initial image to obtain dynamic image features reflecting the temperature field changes.
[0032] Step 2: Construct a one-dimensional temperature rise time series feature extraction module;
[0033] Temperature-sensitive points are selected from one-dimensional temperature data, and the temperature rise time-series features of these points are extracted. In this embodiment, the Lasso regression method is used to select temperature-sensitive points of the machine tool spindle; MSE is used as the loss function. ,in, For the regression coefficient vector, For the i-th temperature data in a one-dimensional temperature dataset, This represents the total number of one-dimensional temperature data points. Let be the thermal error of the i-th machine tool.
[0034] To improve the sparsity and generalization ability of the model, an additional feature is introduced into the objective function. Norm regularization term, optimization objective is: The regularization parameter This involves balancing model complexity and sparsity. The optimal model is selected through cross-validation. The values and some regression coefficients are compressed to zero, thus achieving the screening of temperature-sensitive points; finally, m temperature-sensitive points {T1, T2, ..., T...} are selected. m This lays the data foundation for subsequent machine tool thermal error modeling.
[0035] This embodiment uses a two-layer LSTM network with the same number of units to construct a one-dimensional temperature rise time series feature extraction module, and uses the one-dimensional temperature rise time series feature extraction module for temperature sensitive points {T1,T2,...,T... m One-dimensional temperature rise time series characteristics in}.
[0036] Step 3: Construct a two-dimensional infrared image feature extraction module;
[0037] This embodiment uses a two-layer CNN network and an adaptive average pooling layer to construct a two-dimensional infrared image feature extraction module. The CNN network includes a convolutional layer, an activation function σ, and a pooling layer.
[0038] The two-dimensional infrared image feature extraction module first extracts features and maps them to different dimensions. Then, it flattens the feature map into a one-dimensional feature vector and performs a linear transformation on the flattened feature tensor to output the two-dimensional temperature field spatial features.
[0039] Step 4: Construct the feature fusion layer;
[0040] The one-dimensional temperature rise time series feature and the two-dimensional temperature field spatial feature are fused, and the fused feature is encoded at different time steps to output the coded fused feature;
[0041] Coding fusion features H represents a one-dimensional temperature rise time series characteristic. It represents the spatial characteristics of a two-dimensional temperature field. Indicates the fused feature L at time step and dimensions The timing code value on.
[0042] Step 5: Construct the KAN layer;
[0043] Two Kolmogorov-Arnold networks are stacked to construct a KAN layer, which performs a learnable high-order nonlinear transformation on the encoded fusion features.
[0044] Step 6: Construct the self-attention layer and the output prediction layer;
[0045] By adjusting the time step weights using a self-attention layer, the last column of the self-attention layer's output is extracted as the content vector at time t. Predicting thermal errors using the output of fully connected layers. , Let T be the output layer weight matrix, and T be the transpose of the matrix. This is a bias term.
[0046] This embodiment ultimately establishes a machine tool thermal error model based on the fusion of multi-source heterogeneous temperature characteristics, such as... Figure 1 As shown, it is abbreviated as MHDFTEM.
[0047] Using the same temperature data, comparative thermal error models were constructed based on traditional modeling methods, including Long Short-Term Memory (LSTM), Gated Recurrent Unit (GRU), Recurrent Neural Network (RNN), and Backpropagation Neural Network (BPNN); the prediction results are as follows. Figure 2 As shown; the MHDFTEM thermal error model proposed in this embodiment has the best prediction effect, with prediction residuals ranging from -3 to +6 μm. Figure 3 As shown; the mean absolute error (MAE) and root mean square error (RMSE) of each model are as follows: Figure 4 As shown, the mean absolute error (MAE) and root mean square error (RMSE) of the MHDFTEM thermal error model are only 1.90 μm and 2.50 μm, respectively. Compared with the comparative thermal error models based on traditional modeling methods such as LSTM, GRU, RNN, and BPNN, the MAE is reduced by 33%, 38%, 52%, and 61%, and the RMSE is reduced by 28%, 32%, 46%, and 58%, respectively. This verifies the effectiveness and superiority of the thermal error modeling method proposed in this embodiment.
[0048] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for modeling machine tool thermal errors based on the fusion of multi-source heterogeneous temperature features, characterized in that, Includes the following steps: Step 1: Collect one-dimensional temperature data of the machine tool spindle, two-dimensional infrared images of the temperature field of the machine tool spindle box, column and bed, and machine tool thermal error; Step 2: Construct a one-dimensional temperature rise time series feature extraction module; Used to extract one-dimensional temperature rise time series features from the one-dimensional temperature data; The one-dimensional temperature rise time series feature extraction module is constructed by stacking two layers of LSTM network with the same number of units; Step 3: Construct a two-dimensional infrared image feature extraction module; used to extract two-dimensional temperature field spatial features from the two-dimensional temperature field infrared image; The two-dimensional infrared image feature extraction module is constructed using a two-layer CNN network and an adaptive average pooling layer. Step 4: Construct the feature fusion layer; This is used to fuse the one-dimensional temperature rise time-series features and the two-dimensional temperature field spatial features, and to encode the fused features at different time steps. Step 5: Construct the KAN layer; used to perform learnable high-order nonlinear transformations on the encoded features; Step 6: Construct a self-attention layer and a prediction output layer; adjust the time step weights using the self-attention layer, and extract the last column of the self-attention layer output as the content vector at time t. ; Predicting thermal errors using fully connected layer output , Let T be the output layer weight matrix, and T be the transpose of the matrix. This is a bias term.
2. The machine tool thermal error modeling method based on multi-source heterogeneous temperature feature fusion according to claim 1, characterized in that, In step 1, a temperature sensor is installed on the machine tool spindle to collect one-dimensional temperature data; an eddy current displacement sensor is used to simultaneously measure the thermal error of the machine tool spindle; and an infrared camera is used to collect two-dimensional temperature field infrared images of the machine tool spindle box, column, and bed.
3. The machine tool thermal error modeling method based on multi-source heterogeneous temperature feature fusion according to claim 1, characterized in that, In step 2, the Lasso regression method is used to screen out temperature-sensitive points from the one-dimensional temperature data, and then the one-dimensional temperature rise time series features are extracted from the temperature-sensitive points.
Citation Information
Patent Citations
Numerical control machine tool spindle thermal error modeling method considering dynamic cooling effect
CN119937460A
Machine tool thermal error prediction method based on multi-modal deep learning and domain adaptation
CN120234592A