Machine tool thermal error prediction method based on multi-modal deep learning and domain adaptation
Through multimodal deep learning and domain adaptation technology, combined with infrared images and machine tool multi-source data, the problems of single data sources and poor generalization of the model in the existing thermal error prediction methods are solved, and high-precision thermal error prediction and cross-working adaptation are achieved.
Patent Information
- Application Number
- CN202510720012.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2045-05-30
AI Technical Summary
The existing thermal error prediction methods have a single source of data, and it is difficult to capture complex thermal error generation relationships, resulting in limited prediction accuracy and poor generalization of the model.
Using a multimodal deep learning method, combining the spatiotemporal features of infrared images and machine tool multi-source data, the infrared image feature extraction module, spatiotemporal feature extraction module and multimodal feature fusion module are constructed, and the model generalization is improved by using domain adaptation technology to perform thermal error prediction.
It realizes non-contact and global perception of the thermal state of the machine tool, significantly improves the accuracy of thermal error prediction and the generalization ability of the model under different operating conditions, and enhances robustness.
Smart Images

Figure CN120234592A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of thermal error prediction of numerically controlled machine tools, and particularly to a machine tool thermal error prediction method based on multi-modal deep learning and domain adaptation. Background Art
[0002] In the field of modern precision manufacturing, the machining error (i.e., thermal error) caused by the thermal deformation of numerically controlled machine tools is one of the main factors affecting machining accuracy. During the operation of the machine tool, the heat generated by the spindle, motor, guide rail, cutting process, etc. will cause the thermal expansion and deformation of the machine tool structural components, change the relative position between the tool and the workpiece, and thus generate thermal errors. In order to improve the machining accuracy of the machine tool, accurate prediction and compensation of thermal errors are required.
[0003] In the existing thermal error prediction methods, most of them use the method of arranging temperature sensors at key heat-generating parts of the machine tool to obtain temperature data. For example, the Chinese patent document with the publication number CN119472503A discloses a machine tool overall real-time thermal error compensation method based on CNN-BIGRU-A, which arranges temperature sensors by analyzing the thermally sensitive areas of the machine tool spindle and transmission shaft to obtain historical temperature data. However, this method has a single data source, limited prediction accuracy, and challenges in analyzing accurate thermally sensitive points of the machine tool. Another Chinese patent document with the publication number CN119668191A discloses a machine tool thermal error modeling method based on time convolutional network and transfer learning, which also uses the method of arranging temperature sensors at key heat-generating parts of the machine tool to collect data.
[0004] Most of the existing thermal error prediction methods face challenges such as single data source and difficult analysis of thermally sensitive points, making it difficult to capture the complex relationship of thermal error generation, resulting in limited thermal error prediction accuracy and also limiting the generalization of the model. Therefore, there is an urgent need for a new thermal error prediction method that can utilize multi-source data and avoid complex contact measurements. Summary of the Invention
[0005] The present invention provides a machine tool thermal error prediction method based on multi-modal deep learning and domain adaptation, which can perform thermal error prediction by using the rich temperature field information of infrared images and the complex spatio-temporal characteristics of multi-source machine tool data, and at the same time use the domain adaptation method to improve the generalization of the model and the accuracy of prediction.
[0006] A machine tool thermal error prediction method based on multi-modal deep learning and domain adaptation includes the following steps: (1)Construct an infrared image feature extraction module. This module processes the input infrared image data based on the pre-trained ConvNeXt model to obtain a thermal feature map, performs downsampling on the thermal feature map, captures temporal dependencies based on the multi-head self-attention mechanism, and finally obtains low-dimensional thermal features based on multi-layer 1D convolution. ; (2)Construct a spatio-temporal feature extraction module. This module extracts spatio-temporal features from current and power data based on a spatio-temporal convolutional network and the multi-head self-attention mechanism. ; (3)Construct a multi-modal feature fusion module. This module maps the low-dimensional thermal features and spatio-temporal features to the same-dimensional space and then performs deep feature fusion to obtain fused features. ; (4)Construct a thermal error predictor. Using the fused features as input, perform thermal error prediction and calculate the prediction loss of the thermal error. (5)Collect the machine tool operation data from different working conditions as the source domain and the target domain respectively. The machine tool operation data includes the infrared image data of the machine tool spindle and the current, power, and thermal error data of the machine tool. Process the machine tool operation data in the source domain and the target domain through steps (1) to (4) simultaneously to obtain the fused features in the source domain, the fused features in the target domain, and the thermal error prediction loss in the source domain. (6)Input the fused features in the source domain and the target domain into a deep transfer learning module constructed based on the DTW distance to calculate the domain alignment loss between the source domain and the target domain. And comprehensively construct a total loss function based on the thermal error prediction loss in the source domain and the domain alignment loss, and jointly optimize each module and the thermal error predictor. (7)After the optimization is completed, input the fused features in the target domain into the thermal error predictor to obtain the machine tool thermal error.
[0007] In step (1), after performing downsampling on the thermal feature map and capturing temporal dependencies based on the multi-head self-attention mechanism, it specifically includes: Perform downsampling on the thermal feature map using global average pooling, add positional encoding and layer normalization to the obtained pooled features to obtain the normalized pooled features. ; Then use the multi-head self-attention mechanism to capture the temporal dependency relationship in the normalized pooled features and construct a residual connection to obtain the output features of the residual connection. ; Normalize the output features of the residual connection in the dimension to obtain the normalized output features. , is the number of channels of the thermal feature map.
[0008] In step (1), based on multi-layer 1D convolution, the normalized output features are gradually reduced in dimension to obtain low-dimensional thermal features .
[0009] The specific process of step (2) is as follows: Based on the fully connected layer, preliminary feature mapping is performed on the current and power data input to the spatio-temporal feature extraction module to obtain high-dimensional features ; Based on the temporal convolutional network, spatio-temporal features are extracted from the high-dimensional features , and the temporal dependence relationship is further captured based on the multi-head self-attention mechanism including residual connections to obtain the spatio-temporal features of current and power .
[0010] The specific process of step (3) is as follows: Based on the fully connected layer, the low-dimensional thermal features and the spatio-temporal features are mapped to the same-dimensional space; Based on the cross-attention mechanism, information complementarity between the low-dimensional thermal features and the spatio-temporal features in the same-dimensional space is achieved; Based on dynamic gating fusion, the low-dimensional thermal features and the spatio-temporal features after information complementarity are fused to obtain the fused features .
[0011] In step (4), based on GRU, the temporal information in the fused features is aggregated, and then the thermal error is predicted through the fully connected layer.
[0012] In step (4), the mean squared error is used to calculate the prediction loss of the thermal error, and its expression is: ; In the formula, is the source domain batch size; is the true thermal error of the th sample in the source domain, which is obtained by collecting the machine tool operation data; is the corresponding predicted thermal error, represents the prediction loss of the thermal error.
[0013] In step (6), the DTW distance represents the similarity between two time series, and the domain alignment loss represents the average DTW distance between the source domain fused feature sequence and the target domain fused feature sequence. The expression of this process is: ; In the formula, is the batch size, and respectively represent the th source domain fusion feature sequence and target domain fusion feature sequence in this batch, is the DTW distance calculation function, represents the domain alignment loss.
[0014] Compared with the prior art, the present invention has the following beneficial effects: 1. The present invention deeply integrates the temperature field information of the machine tool provided by the infrared thermal image and the spatio-temporal features in the multi-source data (such as current, power) generated by the machine tool itself. This combination method realizes non-contact and global perception of the thermal state of the machine tool, significantly reduces the complexity of traditional data acquisition relying on contact temperature sensors, and avoids the problem of pre-analysis of complex thermal sensitive points of the machine tool. By integrating rich information from different modalities, it provides more comprehensive input for thermal error prediction.
[0015] 2. The present invention constructs a parallel feature extraction module for infrared images and time series data, which can extract deep and representative features from each modality data. Further, by introducing a cross-attention mechanism and a dynamic gating fusion network, deep interaction and information complementarity between different modality features are realized. This refined feature fusion strategy can more effectively capture the complex non-linear relationship between thermal errors and multi-source data.
[0016] 3. The present invention improves the cross-condition generalization ability of the model based on the domain adaptation mechanism. Aiming at the problem that the thermal characteristics and data distribution of the machine tool may change under different working conditions, by constructing a deep transfer learning module based on DTW distance, the data features from different working conditions (source domain and target domain) are aligned. This domain adaptation mechanism effectively reduces the problem of model performance degradation under different operating conditions, and significantly enhances the generalization ability and robustness of the thermal error prediction model when facing unknown or working states different from the training environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a flowchart of a machine tool thermal error prediction method based on multi-modal deep learning and domain adaptation according to an embodiment of the present invention.
[0018] Figure 2 is a flowchart of the working process of the infrared image feature extraction module in an embodiment of the present invention.
[0019] Figure 3 is a flowchart of the working process of the spatio-temporal feature extraction module in an embodiment of the present invention.
[0020] Figure 4This is the workflow diagram of the multi-modal feature fusion module and the thermal error predictor in the embodiments of the present invention. Detailed implementation manners
[0021] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be noted that the following embodiments are intended to facilitate the understanding of the present invention and do not limit it in any way.
[0022] As Figure 1 shown, a machine tool thermal error prediction method based on multi-modal deep learning and domain adaptation includes the following steps: During the operation of the machine tool, the infrared image data of the machine tool spindle is continuously collected by an infrared imager at a set sampling frequency; through the customized development of the machine tool numerical control system, the numerical control system can be made to be responsible for transmitting the machine tool current and power data as a slave port, and the PC can be made to be responsible for collecting data as a master port; through the data interaction program written on the PC side, it can be ensured that the infrared images, current, and power data are synchronously collected at the same sampling frequency.
[0023] Construct an infrared image feature extraction module, process the input infrared image data based on the pre-trained ConvNeXt model to obtain a thermal feature map, then obtain the pooled features through global average pooling and dimensional compression, add positional encoding and layer normalization to the pooled features, capture the temporal dependencies in the feature sequence based on the multi-head self-attention mechanism including residual connections, and finally gradually reduce the dimensions of the multi-dimensional thermal features through multi-layer 1D convolution to obtain low-dimensional thermal features.
[0024] Construct a spatio-temporal feature extraction module, initially extract the spatio-temporal features in the current and power data based on a temporal convolutional network, and then further capture the temporal dependencies in the feature sequence based on a multi-head self-attention mechanism similar to that in the infrared image feature module including residual connections to obtain the spatio-temporal features of the current and power data.
[0025] Map the features obtained by parallel processing of the above two modules to the same dimensional space through a fully connected layer, construct a multi-modal feature fusion module, realize information complementarity between feature sequences based on the cross-attention mechanism, and realize deep fusion of features based on the dynamic gating mechanism.
[0026] Construct a thermal error predictor, and predict the thermal error based on the GRU model according to the fused features.
[0027] Collect data under different working conditions, which are divided into the source domain and the target domain. The source domain data and the target domain data go through the same feature extraction and feature fusion processes to obtain the source domain fusion features and the target domain fusion features. Among them, the source domain fusion features are input into the thermal error predictor for thermal error prediction, and the corresponding thermal error is calculated to predict the loss. A transfer learning module based on the DTW distance is constructed to calculate the domain alignment loss between the source domain fusion features and the target domain fusion features.
[0028] The total loss function is obtained by combining the prediction loss and the domain alignment loss, and the model is jointly optimized; after optimization, the target domain fusion features are input into the thermal error predictor for thermal error prediction.
[0029] Specifically, the infrared image feature extraction module in the embodiment of the present invention is as Figure 2 shown, and includes the following steps: S101. Process the infrared image data based on the pre-trained ConvNeXt model to obtain a high-dimensional thermal feature map.
[0030] Specifically, the input infrared image data is in the following form: ; In the formula, is the input infrared image data, is the batch size, is the time step, is the height of the image, is the width of the image, is the number of channels. The construction of this five-dimensional input data can effectively integrate the batch size, time series information, and spatial and channel features, providing a structured input format for subsequent deep learning model processing and supporting in-depth analysis of the spatio-temporal features of infrared image sequences.
[0031] Specifically, the expression for obtaining the thermal feature map by processing the input data based on the pre-trained ConvNeXt is as follows: ; In the formula, is the output thermal feature map, is the height of the thermal feature map, is the width of the thermal feature map, is the number of channels of the thermal feature map. ConvNeXt is a pure convolutional neural network designed by referring to Swin Transformer, which has good effects and low complexity. After pre-training, it can effectively extract infrared image features and does not participate in parameter updates during the subsequent model training process.
[0032] S102. Compress the thermal feature map through global average pooling to obtain the pooled features.
[0033] Specifically, the algorithm for global average pooling is as follows: ; ; In the formula, is the pooled feature, 、 、 are the indices of batch, time step, and channel, and their value ranges are from 0 to and from 0 to and from 0 to , ensuring that each frame of the feature map is pooled. Global average pooling calculates the average value for each channel to obtain a one-dimensional vector with the same number of channels, representing the average activation value on the corresponding channel. It can be regarded as the global statistical feature of each channel. This pooled feature can participate in subsequent steps of temporal feature extraction and feature condensation as a multi-dimensional thermal feature.
[0034] S103. Add positional encoding to the pooled feature and perform layer normalization.
[0035] Specifically, the expression for adding positional encoding is: ; In the formula, is the learnable positional encoding, is the pooled feature after adding positional encoding. Positional encoding is used to indicate the positional relationship between multi-dimensional thermal features, facilitating subsequent capture of more accurate temporal dependence relationships based on the multi-head self-attention mechanism.
[0036] Specifically, the algorithm for performing layer normalization is: ; In the formula, (*) is the layer normalization function, and are respectively on the dimension, the mean and variance, and are learnable parameters, is the normalized pooled feature. This layer normalization maps the data of multi-dimensional thermal features on the dimension to between 0 and 1, which can accelerate training, stabilize model convergence, and reduce the problems of gradient vanishing or gradient explosion.
[0037] S104. Extract the temporal dependence relationships in the thermal features based on the multi-head self-attention mechanism with residual connections.
[0038] Specifically, the expression of the multi-head self-attention mechanism process with residual connections is as follows: ; ; ; ; ; ; In the formula, the multi-head self-attention mechanism splits heads, , , are the query matrix, key matrix, and value matrix of the th head respectively, , , are the weight matrices of the query matrix, key matrix, and value matrix respectively, is the attention output of the th head, is the scaling factor, is matrix concatenation, is the output weight matrix, is the output feature of the multi-head attention mechanism, is the output feature of the residual connection, is 's normalized feature in dimension .
[0039] Specifically, this multi-head self-attention mechanism aims to capture the dependencies of the infrared image sequence in the time dimension. By calculating the similarity between the query (Q), key (K), and value (V) matrices, the model can dynamically assign different attention weights to each time step in the sequence, thus focusing on the feature information most relevant to the current time step. The design of multiple heads allows the model to learn different attention patterns in parallel in different representation subspaces, enhancing the model's ability to capture complex time dependencies. The residual connection adds the output of the attention mechanism to the original input, helping to alleviate the vanishing gradient problem in deep networks and making it easier for the model to learn the identity mapping and retain the original information. Subsequently, layer normalization normalizes the features after the residual connection, stabilizing the training process and accelerating the model convergence. This series of operations enables the model to effectively extract the deep dynamic information related to thermal errors from the temporal features of infrared images, laying a foundation for subsequent feature fusion and prediction.
[0040] S105. Gradually compress the features based on multi-layer 1D convolution to obtain low-dimensional thermal features.
[0041] Specifically, the expression of the multi-layer 1D convolution process is: ; ; In the formula, is the multi-layer 1D convolution function, is the low-dimensional thermal feature.
[0042] Specifically, contains layers of 1D convolution networks, and the algorithm for each layer is: ; In the formula, represents the output of the th layer, is the 1D convolution kernel of the th layer, represents the convolution operation, is the bias term of the th layer, is the Sigmoid function. The multi-layer 1D convolution concentrates the thermal features, which can reduce the computational complexity of the subsequent model and also reduce the problem of feature information loss caused by one-step dimensionality reduction.
[0043] Specifically, the spatio-temporal feature extraction module in the embodiment of the present invention is as Figure 3 shown and includes the following steps: S201. Perform preliminary feature mapping on the current and power data based on the fully connected layer.
[0044] Specifically, the expression of this process is: ; ; In the formula, is the input current and power data, (*) is the fully connected layer, is the high-dimensional feature after preliminary feature mapping. This process can extract the potential patterns in the current and power data and provide a higher information density input for the subsequent spatio-temporal feature extraction based on the temporal convolutional network.
[0045] S202. Extract spatio-temporal features from the preliminarily mapped features based on the temporal convolutional network.
[0046] Specifically, the expression of this process is: ; In the formula, (*) is the temporal convolutional network, which includes multiple causal and dilated convolutional blocks with residual connections, Are the features output by the temporal convolutional network.
[0047] Specifically, the temporal convolutional network ensures that the model only depends on the information of the current and historical time steps through causal convolution, which is suitable for time series modeling; dilated convolution captures dependencies within a longer time range by expanding the receptive field. This process provides rich spatio-temporal context information for the subsequent multi-head self-attention mechanism, enhancing the model's ability to capture dynamic features related to thermal errors.
[0048] S203. Further capture temporal dependencies based on the multi-head self-attention mechanism with residual connections.
[0049] Specifically, the expression of this process is: ; In the formula, Is the multi-head self-attention mechanism with residual connections, similar to the process of S104 in the infrared image feature extraction module. Are the spatio-temporal features of current and power.
[0050] Specifically, the multi-modal feature fusion module and the thermal error predictor in the embodiments of the present invention are as Figure 4 Shown, including the following steps: S301. Map the thermal features and the current power features to the same-dimensional space based on the fully connected layer.
[0051] Specifically, the expression of this process is: ; ; In the formula, And Are respectively the fully connected layers that map And To the same-dimensional space. And Are the thermal features and the current and power features in the same-dimensional space. This mapping process ensures the dimensional consistency of different modal features, providing comparable feature representations for the subsequent cross-attention mechanism and dynamic gating fusion. The application of the fully connected layer not only retains the core information of each modal feature but also enhances the feature expression ability through non-linear transformation, laying a foundation for the deep fusion of multi-modal features.
[0052] S302. Achieve information complementarity between the thermal features and the current power features based on the cross-attention mechanism.
[0053] Specifically, the expression of the cross-attention mechanism is: ; ; In the formula, and are respectively attention and attention of the multi-head attention mechanism, whose key matrix and value matrix respectively come from another modality. and are the outputs of the cross-attention mechanism. Through the attention distribution across modalities, this process realizes the information complementarity between the infrared image features and the current and power features, enhances the semantic richness of the features, and provides a more comprehensive feature representation for the subsequent dynamic gating fusion.
[0054] S303. Achieve the deep fusion of thermal features and current-power features based on the dynamic gating fusion mechanism.
[0055] Specifically, the expression of the dynamic gating fusion mechanism is: ; ; ; ; In the formula, is the hyperbolic tangent activation function, , , are all fully connected layers, is the Sigmoid activation function, is the fusion weight matrix, represents element-wise multiplication, is the fusion feature.
[0056] Specifically, the dynamic gating fusion mechanism respectively performs feature transformation on and through the fully connected layers and , and introduces a non-linear mapping using the activation function to generate an intermediate feature representation. Subsequently, the fully connected layer combines the features of and to generate the fusion weight matrix , and constrains it within the range of [0,1] through the Sigmoid activation function. The weight matrix dynamically adjusts the contribution degrees of and in an element-wise multiplication manner, and finally generates the fusion feature This process realizes the deep fusion of infrared image features with current and power features through adaptive weight allocation, providing a comprehensive and efficient feature representation for subsequent thermal error prediction.
[0057] S304. Predict the thermal error based on the GRU model according to the fused features.
[0058] Specifically, the expression of this process is: ; ; In the formula, is the GRU model, is the fully connected layer for outputting the predicted value, is the output of the GRU model, is the predicted thermal error value, means taking the hidden layer of the last time step of the GRU output for prediction.
[0059] Specifically, in the present invention, the deep transfer learning module constructed based on the DTW distance uses the average DTW distance between the source domain features and the target domain features as the domain alignment loss, and the expression of this process is: ; In the formula, is the batch size, and respectively represent the th source domain feature sequence and target domain feature sequence in this batch, is the DTW distance calculation function, represents the domain alignment loss.
[0060] Specifically, constructing the DTW distance calculation function includes the following steps: Calculate the local cost, which is calculated using the squared Euclidean distance between two feature vectors. The algorithm is: ; In the formula, represents the th element of sequence and the th element of sequence , where , and each element in the sequence is -dimensional vector.
[0061] Calculate the cumulative cost and construct the cumulative cost matrix, which is filled according to the following recurrence relation: ; Wherein, represents the minimum cumulative cost required for optimal time warping alignment of the subsequence of sequence with the subsequence of sequence ; The value ranges of and are both from 1 to . The calculation of this recurrence relation needs to follow the preset boundary conditions as follows: ; ; ; ; After determining the DTW distance and constructing the cumulative cost matrix, the DTW distance between sequence and is the element value in the lower right corner of this matrix, as follows: ; Specifically, the algorithm for calculating the source domain prediction loss using the mean squared error is: ; Wherein, is the source domain batch size, is the true thermal error of the -th sample in the source domain, is the corresponding predicted thermal error, represents the prediction loss.
[0062] Specifically, the total loss function that combines the prediction loss and the domain alignment loss is: ; Wherein, is the total loss function, are learnable parameters. Based on the total loss function, the Adam optimizer is used to iteratively optimize the model parameters. The Adam optimizer combines the advantages of the momentum method and the adaptive learning rate, and effectively accelerates the convergence process of gradient descent by calculating the exponential moving averages of the first-order momentum and the second-order momentum of the gradient.
[0063] In this embodiment, by deeply integrating the spatio-temporal features of infrared thermal images and multi-source data of machine tools, the accuracy and generalization ability of thermal error prediction are significantly improved. This method uses a parallel feature extraction module to mine deep features from infrared images and time series data, and realizes deep interaction and information complementarity between features through a cross-attention mechanism and a dynamic gating fusion network, effectively capturing the complex non-linear relationship between thermal errors and multi-source data, thereby improving the accuracy of prediction. At the same time, the model introduces a deep transfer learning module based on DTW distance to achieve the alignment of data features under different working conditions, enhancing the adaptability and robustness of the model under unknown or changing working conditions, and reducing the limitations of the performance degradation of traditional methods when the working conditions change.
[0064] The above-described embodiments have detailed the technical solutions and beneficial effects of the present invention. It should be understood that the above are only specific embodiments of the present invention and are not used to limit the present invention. Any modifications, supplements, and equivalent replacements made within the scope of the principles of the present invention shall be included within the protection scope of the present invention.
Claims
1. A machine tool thermal error prediction method based on multi-modal deep learning and domain adaptation, characterized in that It includes the following steps: (1) Construct an infrared image feature extraction module. This module processes the input infrared image data based on the pre-trained ConvNeXt model to obtain a thermal feature map, performs downsampling operations on the thermal feature map, captures temporal dependencies based on the multi-head self-attention mechanism, and finally obtains low-dimensional thermal features based on multi-layer 1D convolutions. ; (2)Construct a spatio-temporal feature extraction module, which extracts spatio-temporal features in current and power data based on a spatio-temporal convolutional network and a multi-head self-attention mechanism ; (3) Construct a multi-modal feature fusion module, which maps low-dimensional thermal features and spatio-temporal features to the same dimensional space and then performs deep feature fusion to obtain fused features ; (4) Construct a thermal error predictor to fuse features As the input, perform thermal error prediction and calculate the prediction loss of the thermal error; (5) Collect the machine tool operation data from different working conditions as the source domain and the target domain respectively. The machine tool operation data includes the infrared image data of the machine tool spindle and the current, power, and thermal error data of the machine tool. The machine tool operation data of the source domain and the target domain are simultaneously processed through steps (1) to (4) to obtain the fusion features of the source domain, the fusion features of the target domain, and the thermal error prediction loss of the source domain; (6) Input the fusion features of the source domain and the target domain into the deep transfer learning module constructed based on the DTW distance to calculate the domain alignment loss between the source domain and the target domain. And a total loss function is constructed by integrating the thermal error prediction loss of the source domain and the domain alignment loss, and the various modules and the thermal error predictor are jointly optimized; (7) After the optimization is completed, input the fusion features of the target domain into the thermal error predictor to obtain the machine tool thermal error.
2. The machine tool thermal error prediction method based on multi-modal deep learning and domain adaptation according to claim 1, wherein In step (1), after performing downsampling operation on the thermal feature map, the temporal dependence is captured based on the multi-head self-attention mechanism, specifically including: Perform downsampling operation on the thermal feature map using global average pooling, and add positional encoding and layer normalization to the obtained pooled features to obtain the normalized pooled features ; Then, the multi-head self-attention mechanism is used to capture the temporal dependence relationship in the normalized pooling features, and a residual connection is constructed to obtain the output features of the residual connection ; ; The output features of the residual connection are normalized in dimension to obtain the normalized output features , where is the number of channels of the heat feature map.
3. The machine tool thermal error prediction method based on multi-modal deep learning and domain adaptation according to claim 2, characterized in that, In step (1), based on multi-layer 1D convolution, the dimensionality of the normalized output features is gradually reduced to obtain low-dimensional thermal features . 4. The machine tool thermal error prediction method based on multi-modal deep learning and domain adaptation according to claim 1, characterized in that, The specific process of step (2) is: Based on the fully connected layer, the current and power data of the input spatio-temporal feature extraction module are subjected to preliminary feature mapping to obtain high-dimensional features ; High-dimensional features based on a temporal convolutional network Extract spatio-temporal features, and further capture temporal dependencies based on a multi-head self-attention mechanism with residual connections to obtain spatio-temporal features of current and power 。 5. The machine tool thermal error prediction method based on multi-modal deep learning and domain adaptation according to claim 1, characterized in that, The specific process of step (3) is: Based on the fully connected layer, map low-dimensional thermal features and spatio-temporal features to the same dimensional space; Realize the information complementarity of low-dimensional thermal features and spatio-temporal features in the same dimensional space based on the cross-attention mechanism and spatio-temporal features ; Based on dynamic gating fusion, fuse the low-dimensional thermal features with complementary information and spatio-temporal features to obtain fused features .
6. The machine tool thermal error prediction method based on multi-modal deep learning and domain adaptation according to claim 1, characterized in that In step (4), based on GRU, aggregate the temporal information in the fused feature , and then predict the thermal error through a fully connected layer.
7. The machine tool thermal error prediction method based on multi-modal deep learning and domain adaptation according to claim 1, characterized in that In step (4), the mean square error is used to calculate the prediction loss of the thermal error, and its expression is: ; In the formula, is the source domain batch size; is the true thermal error of the th sample in the source domain; is the corresponding predicted thermal error, represents the prediction loss of the thermal error.
8. The machine tool thermal error prediction method based on multi-modal deep learning and domain adaptation according to claim 1, wherein, In step (6), the DTW distance represents the similarity between two time series, and the domain alignment loss represents the average DTW distance between the source domain fusion feature sequence and the target domain fusion feature sequence. The expression of this process is: ; Wherein, is the batch size, and respectively represent the th source domain fusion feature sequence and target domain fusion feature sequence in this batch, is the DTW distance calculation function, represents the domain alignment loss.
Citation Information
Patent Citations
CNN-BIGRU-A-based gantry machine tool overall real-time thermal error compensation method
CN119472503A
Machine tool spindle Z-direction thermal deformation prediction method based on multi-source heterogeneous information fusion
CN115526424A
Main shaft thermal error prediction method and device based on multi-source heterogeneous data
CN116010903A
High-speed precision machine tool small sample thermal error prediction method and compensation system based on spatial-temporal feature interactive fusion network
CN118917177A
Machine tool thermal error modeling method based on time convolutional network and transfer learning
CN119668191A
Cited By
Machine tool thermal error modeling method based on multi-source heterogeneous temperature feature fusion
CN120763871A
A machine tool thermal error modeling method based on multi-source heterogeneous temperature feature fusion
CN120763871B
Numerical control system thermal error intelligent compensation method based on multi-source temperature sensing
CN120802837A
Intelligent compensation method for thermal error of numerical control system based on multi-source temperature sensing
CN120802837B
Double-spindle thermal error prediction method fusing expansion convolution and domain self-adaption
CN122110898A