Numerical control machine tool key part temperature prediction method based on multi-mode deep learning

Through the multimodal deep learning method, the temperature prediction of key parts of CNC machine tools is performed using LSTM and fully connected network model, which solves the problems of low accuracy and poor real-time performance in the existing technology, and achieves high-precision temperature prediction and thermal deformation compensation.

CN120012603AActive Publication Date: 2025-05-16UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510183898.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-19
Publication Date
2025-05-16
Estimated Expiration
2045-02-19

AI Technical Summary

Technical Problem

The existing CNC machine tools have a temperature prediction method that relies on a single data source, has low accuracy and is difficult to achieve real-time prediction, and cannot fully utilize the interactive characteristics of multimodal data.

Method used

Using a multimodal deep learning method, multimodal information such as temperature data, environmental data, processing process parameters, etc. is integrated, time series features are extracted through the LSTM deep learning model, and combined with the full-connected network to process the environment and process data, to achieve high-precision temperature prediction and thermal deformation compensation.

Benefits of technology

It improves the accuracy and robustness of temperature prediction, realizes high-precision real-time temperature prediction and thermal deformation compensation at all positions of the machine tool, and improves processing accuracy and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120012603A_ABST
    Figure CN120012603A_ABST
Patent Text Reader

Abstract

The invention discloses a numerical control machine tool key part temperature prediction method based on multi-modal deep learning, and the method comprises the steps: designing a multi-modal LSTM deep learning model which combines time sequence data, environment parameters and machining process parameters, employing LSTM to extract time sequence features, processing the environment and process data through a full-connection network, and carrying out the prediction of the temperature of a key part of a numerical control machine tool. And integrating the multi-modal features in a fusion layer, and finally generating an accurate prediction result for guiding the temperature control operation of the machine tool and performing SHAP value analysis. The method is suitable for predicting the temperature change of the key part in the numerical control machine tool in the non-constant-temperature environment, the machining precision of the machine tool can be improved, real-time error compensation is achieved, modeling and prediction are conducted by means of various sensor data, environment information and machining process parameter data in combination with the deep learning technology, the prediction precision is improved, and meanwhile the real-time error compensation is achieved. And the method can be widely applied to the fields of industrial equipment process control temperature prediction regulation and control and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of CNC machine tools, and specifically relates to a method for predicting the temperature of key parts of CNC machine tools based on multimodal deep learning. Background Art

[0002] In modern manufacturing, CNC machine tools are core processing equipment, and their performance and processing accuracy play a decisive role in product quality and production efficiency. During the processing of machine tools, due to the combined effects of internal heat sources and external environmental temperature changes, the key parts of the machine tools (such as spindles, tools, etc.) will generate different degrees of heat due to long-term operation, and the mechanical structure will produce thermal deformation, resulting in thermal deformation of the machine tools and reduced processing accuracy. Thermal error is the largest error source of precision processing machinery such as CNC machine tools, accounting for 40%-70% of the total error. By predicting the temperature of key parts, the temperature change trend of each component of the machine tool can be predicted in advance, so as to more accurately calculate the resulting thermal deformation, and then perform corresponding deformation compensation, effectively reduce thermal errors, and improve processing accuracy. Therefore, achieving accurate prediction of the temperature of key parts of CNC machine tools is of great practical significance for optimizing processing technology, improving processing quality, and extending equipment life. Existing methods for predicting the temperature of key parts of machine tools have many shortcomings. They usually rely on simple physical modeling or single sensor data, with low accuracy and difficult to predict in real time. In terms of model accuracy, the prediction error is large, and it is difficult to characterize complex nonlinear relationships. In terms of data processing, it is difficult to select temperature-sensitive points and information feature extraction is insufficient. In terms of practicality, the test cost is high, the adaptability is poor, and the real-time performance is insufficient. These shortcomings limit its application in high-precision machining. The application of multi-source data fusion in machine tool temperature prediction has become a research hotspot. It integrates multiple data sources, such as temperature, vibration, current and voltage, and combines advanced data analysis and machine learning algorithms to significantly improve the prediction accuracy. Compared with the existing prediction model with single data structure information input, the information acquisition is more comprehensive and the error is significantly reduced. Therefore, how to accurately predict temperature through multimodal data (including temperature, environment, processing technology and other information) has become a key technology to improve machine tool processing accuracy.

[0003] The document "Yu-Chi Liu, Kun-Ying Li, Yao-Cheng Tsai. Prediction of thermal error of CNC machine tool spindle based on LSTM deep learning. Applied Sciences (IF 2.5) Pub Date: 2021-06-11" proposes a key temperature point selection algorithm and thermal error estimation method for machine tool spindle displacement. This method performs well in spindle thermal displacement experiments with different temperature changes, but the LSTM model requires a large amount of historical data for training to ensure the accuracy and generalization ability of the model. In addition, the training process of the model may be time-consuming and have certain requirements on computing resources. The document "Chen Geng, Guo Shijie, Ding Qiangqiang, et al. SHO-LSTM prediction modeling of thermal error of CNC lathe spindle. Engineering Science and Technology, 2024, 56(2): 277-288." proposes a method for predicting thermal error of precision lathe spindle using the hippocampus optimization algorithm (SHO) to optimize the time series prediction network (LSTM). Although this method improves the selection accuracy of temperature measurement points through the optimization algorithm, the optimization process is relatively complex and the computational cost is high. In addition, the hyperparameter tuning of the LSTM model requires a lot of experiments and experience to find the optimal model structure and parameters, which increases the difficulty of model development and debugging.

[0004] In summary, the existing technologies have the following main problems: (1) Single data source: Existing methods usually rely only on single temperature sensor data, ignoring the influence of environmental and process parameters. (2) Non-real-time: Existing methods usually rely on offline analysis or empirical models and cannot provide real-time temperature prediction. (3) Low prediction accuracy: Existing models do not fully utilize the interactive characteristics of multimodal data, resulting in limited prediction accuracy. Summary of the invention

[0005] To solve the above technical problems, the present invention provides a temperature prediction method for key parts of CNC machine tools based on multimodal deep learning. By integrating multimodal information such as temperature data, environmental data, and processing parameters, the accuracy and robustness of temperature prediction are improved, and high-precision real-time temperature prediction and thermal deformation compensation at each position of the machine tool can be achieved, thereby improving the processing accuracy and stability of the machine tool.

[0006] The technical solution adopted by the present invention is: a method for predicting the temperature of key parts of CNC machine tools based on multimodal deep learning, and the specific steps are as follows:

[0007] S1, collect experimental data and perform preprocessing;

[0008] By arranging multiple temperature sensors at key positions of CNC machine tools according to actual conditions, the temperature change data is collected. At the same time, the workshop environment parameters and processing technology parameters are collected. The collected temperature, environment and processing technology parameter data are preprocessed, and the data features and target values ​​are extracted through the sliding window method. The time series data is converted into a format suitable for deep learning model input.

[0009] Among them, the key parts of the CNC machine tool include: spindle, guide rail, lead screw, bearing, motor, and tool tip; the workshop environmental parameters include: temperature, humidity, air flow rate, and the environmental data are collected through independent sensors; the processing parameters are obtained from the CNC control system, including: motor power, motor current, spindle speed, feed speed, cutting depth; the preprocessing includes: data alignment, normalization, and missing value filling.

[0010] S2. Build a multimodal LSTM deep learning model and train the model;

[0011] S3. Based on step S2, the trained model is deployed to the CNC machine tool control system, data is collected and input in real time, temperature prediction is performed, and thermal deformation compensation is performed according to the prediction results to improve the machining accuracy of the machine tool;

[0012] S4. Use the SHAP framework to interpret the model and clarify the contribution of eigenvalues.

[0013] Furthermore, the step S1 is specifically as follows:

[0014] S11, collect experimental data;

[0015] Temperature sensors are installed in the machine tool and workshop to collect the temperature of key parts of the machine tool and the environment, force sensors are used to collect load data at the tool tip, CNC control systems are used to collect processing parameter data, and testing instruments are placed to collect humidity and wind speed data in the workshop.

[0016] S12, data alignment;

[0017] Align timestamps and integrate data from different tables onto the same timeline to ensure temporal consistency of features and target variables.

[0018] S13, missing value processing and normalization;

[0019] First, forward filling is performed to fill the missing values ​​of the current row with the non-missing values ​​of the previous row. The expression is as follows:

[0020]

[0021] Among them, x i Represents the i-th data.

[0022] Then use the Min-Max operation to normalize the temperature data to the [0,1] interval. The expression is as follows:

[0023]

[0024] Where x represents the original data value, min(x) represents the minimum value in the data set, max(x) represents the maximum value in the data set, and x′ represents the normalized data value.

[0025] S14. Extract data features and target values ​​through the sliding window method, and convert the time series data into a format suitable for deep learning model input;

[0026] First, the input features and target values ​​are extracted, that is, the input feature matrix X and target value y are generated from the original data, as well as the feature construction of the time series data.

[0027] The input feature matrix X is obtained by removing all columns from the last column of the data normalized in step S13. Each row represents all input features at a certain time point, including environmental features and process features. The target value y is obtained by taking the last column of the data normalized in step S13 as the target value. Each target value y i Corresponding to a row x' in the input feature matrix i .

[0028] Wherein, the target value includes: temperature value.

[0029] Then the time series features are constructed. The time series task requires encoding time dependencies into features, so the code constructs the time series features through sliding windows.

[0030] Among them, the length of the sliding window is L, and each time it slides one time step, the calculation expression is as follows:

[0031]

[0032] in, represents the i-th time series sample, x' j ∈R n represents a row of the original feature matrix, that is, the n features of the j-th time step, and R represents a real number matrix consisting of L rows and n columns.

[0033] Input feature matrix X generated by sliding window seq is a 3D tensor with shape (N, L, n).

[0034] Among them, N = len(data) - L represents the number of sequence samples, L represents the length of each sequence, and n represents the number of features in each time step.

[0035] Then the target value y seq is the target value of the next time step of the sliding window, The prediction target corresponding to the i-th time series sample is expressed as follows:

[0036]

[0037] Furthermore, the step S2 is specifically as follows:

[0038] S21. Build a multimodal LSTM deep learning model;

[0039] The multimodal LSTM deep learning model is a multi-input neural network model that combines time series features and static features, including: LSTM layer, fully connected layer. The model reduces the dimension of environmental features and processing features through separate fully connected layers, and the feature dimension is changed from the original size to 32. Then, the time series features output by the LSTM layer are spliced ​​with the static features, and further processed through the fully connected layer and Dropout to output the temperature value prediction of key parts.

[0040] The LSTM layer is used to extract time series features, output the hidden state of the last time step, capture time dependency, and includes n' neurons. The fully connected layer processes static features and includes: input layer, hidden layer, and output layer.

[0041] S22, training the model constructed in step S21;

[0042] The experimental data preprocessed in step S1 is divided into a training set and a test set according to the actual situation. The training set is used for model training. The model uses mean square error MSE as the loss function and uses the Adam optimizer for model training. If the loss function tends to be stable after multiple iterations, the model is considered to have converged and training is stopped.

[0043] The model performance is evaluated by the test set, and the model evaluation indicators include: root mean square error RMSE and mean absolute error MAE.

[0044] The loss function is the mean square error MSE, and the calculation expression is as follows:

[0045]

[0046] Among them, y' i Indicates the actual value, Represents the predicted value, n0 represents the number of samples, and θ represents the parameters of the model.

[0047] Furthermore, the step S3 is specifically as follows:

[0048] First, the real-time temperature data of key parts are input into the LSTM layer, and time series features are extracted by forward propagation. Then, the long short-term memory network LSTM is used to process the temperature sensor data and equipment status data to capture time-dependent characteristics.

[0049] Then, the static features are processed through the fully connected layer, that is, the environmental data and processed data are processed using the fully connected neural network FCN to complete static dimensionality reduction.

[0050] The static features are reduced to 32 dimensions through a separate fully connected layer, and the expression is as follows:

[0051] env_out = ReLU(W env env_input+b env )

[0052] process_out = ReLU(W process process_input+b process )

[0053] Among them, W env , W process represents the weight matrix, b env , b process Indicates bias.

[0054] The input layer in the fully connected layer receives time series data, environmental data, and processed data respectively, and then inputs them into the hidden layer, and uses splicing or attention mechanism to fuse multimodal data to enhance the sensitivity of the model to different data sources.

[0055] Among them, the splicing time series data, environmental data, and processing data are expressed as follows:

[0056] merged∈R batch_size×(64+32+32)

[0057] Finally, full connection processing is performed, and the predicted temperature of the key parts of the CNC machine tool is output through the output layer regression network to complete the temperature prediction. According to the predicted temperature value, the tool path is adjusted or thermal deformation is compensated to ensure the processing accuracy.

[0058] Among them, the full connection processing is as follows:

[0059] The first layer performs linear transformation of the data and activates it: α = Relu (W1 merged + b1), that is, the dimension is reduced to 64 dimensions, the activation function is ReLU, and some neurons are randomly discarded through Dropout to prevent overfitting.

[0060] The second layer multiplies the output of the first layer by the weight W2 of the second layer and adds the bias b2 to get the final output: output = W2·α+b2.

[0061] Among them, W1 and W2 represent weight matrices, and b1 and b2 represent biases.

[0062] Furthermore, the step S4 is specifically as follows:

[0063] Model explanation Using the SHAP framework, we first integrate the various input features of the multimodal LSTM deep learning model into a matrix X test_combined . Time series feature X test_tensor is expanded into a two-dimensional matrix, each row is a sample. test_env and processing feature X test_process After directly splicing to the time series feature, the expression is as follows:

[0064]

[0065] Among them, N1 represents the number of samples, d time Represents the dimension of time series features, d env The dimension representing the environmental characteristics, d process Indicates the dimension of the machining feature.

[0066] Then use KMeans to cluster the test set data and select representative data points as background data. The clustered background data is used in the SHAP interpreter. Define the SHAP interpreter and convert X test_combined It is decomposed into three parts: time series, environmental characteristics and process characteristics.

[0067] Then calculate the SHAP value, SHAP value The expression is defined as follows:

[0068]

[0069] Among them, F represents the feature set, S represents the feature subset, v(S) represents the model prediction value using the feature subset S, and M represents the entire feature set, including all possible features.

[0070] Beneficial effects of the present invention: The method of the present invention designs a multimodal LSTM deep learning model that combines time series data, environmental parameters and processing technology parameters, uses LSTM to extract time series features, and processes environmental and process data separately through a fully connected network, and then integrates the multimodal features in the fusion layer, and finally generates accurate prediction results for guiding machine tool temperature control operations. It can also perform SHAP value analysis to help users understand the contribution of each feature to the prediction results. The method of the present invention is suitable for predicting temperature changes in key parts of CNC machine tools in non-constant temperature environments, can improve machine tool processing accuracy and achieve real-time error compensation, and uses a variety of sensor data, environmental information and processing technology parameter data, combined with deep learning technology for modeling and prediction. While improving the prediction accuracy, it significantly enhances the transparency and credibility of the model, and can also be widely used in other fields such as industrial equipment process control temperature prediction and control.

[0071] The method of the present invention has the advantages of high precision, real-time performance, strong adaptability, ability to reduce thermal deformation errors, and easy deployment. Through the fusion of multimodal data, it can comprehensively consider the environment, temperature and process parameters, significantly improve the accuracy of temperature prediction, and the model can obtain the temperature data and process parameters of the machine tool in real time, perform dynamic prediction and temperature compensation, and can cope with temperature changes in different machine tools and different working conditions. It has strong generalization ability, and through real-time temperature prediction and thermal deformation compensation, it can significantly reduce the processing error caused by thermal deformation and improve the processing accuracy of the machine tool. The trained model can be easily deployed to the relevant control system of the CNC machine tool, which is convenient for practical application. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] Figure 1 This is a flow chart of a method for predicting temperature of key parts of CNC machine tools based on multimodal deep learning of the present invention.

[0073] Figure 2 This is a structural diagram of a multi-modal (Multi-source data) LSTM deep learning model in an embodiment of the present invention.

[0074] Figure 3 This is a comparison chart of the prediction results of the multimodal LSTM deep learning model, LSTM model, and CNN-LSTM model in an embodiment of the present invention.

[0075] Figure 4 This is an error diagram of the predicted temperature and the actual temperature in the actual application of the multimodal LSTM deep learning model in an embodiment of the present invention. DETAILED DESCRIPTION

[0076] The method of the present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0077] like Figure 1As shown, a flow chart of a method for predicting the temperature of key parts of a CNC machine tool based on multimodal deep learning of the present invention, the specific steps are as follows:

[0078] S1, collect experimental data and perform preprocessing;

[0079] This embodiment adopts a certain brand of CNC gantry machine tool. By arranging multiple PT100 temperature sensors at key positions of the CNC machine tool according to actual conditions, the temperature change data is collected. At the same time, the workshop environment parameters and processing technology parameters are collected. The collected temperature, environment and processing technology parameter data are preprocessed, and the data features and target values ​​are extracted through the sliding window method, and the time series data is converted into a format suitable for deep learning model input.

[0080] Among them, the key parts of the CNC machine tool include: spindle, guide rail, lead screw, bearing, motor, and tool tip; the workshop environmental parameters include: temperature, humidity, air flow rate, and the environmental data are collected through independent sensors; the processing parameters are obtained from the CNC control system, including: motor power, motor current, spindle speed, feed speed, cutting depth; the preprocessing includes: data alignment, normalization, and missing value filling.

[0081] S2. Build a multimodal LSTM deep learning model and train the model;

[0082] S3. Based on step S2, the trained model is deployed to the CNC machine tool control system, data is collected and input in real time, temperature prediction is performed, and thermal deformation compensation is performed according to the prediction results to improve the machining accuracy of the machine tool;

[0083] S4. Use the SHAP framework to interpret the model and clarify the contribution of eigenvalues.

[0084] In this embodiment, the step S1 is specifically as follows:

[0085] S11, collect experimental data;

[0086] Temperature sensors are installed in the machine tool and workshop to collect the temperature of key parts of the machine tool and the environment, force sensors are used to collect load data at the tool tip, CNC control systems are used to collect processing parameter data, and testing instruments are placed to collect humidity and wind speed data in the workshop.

[0087] S12, data alignment;

[0088] Since data is collected from different sources, their sampling frequencies and timestamps may not be completely consistent. Therefore, it is necessary to align the timestamps and integrate the data in different tables onto the same timeline to ensure the temporal consistency of each feature and target variable.

[0089] S13, missing value processing and normalization;

[0090] In data analysis, missing values ​​can cause the model to fail to learn correctly or training failure, so they need to be processed. Forward filling is to fill the missing values ​​of the current row with the non-missing values ​​of the previous row. The expression is as follows:

[0091]

[0092] Among them, x i Represents the i-th data.

[0093] Then use the Min-Max operation to normalize the temperature data to the [0,1] interval. The expression is as follows:

[0094]

[0095] Where x represents the original data value, min(x) represents the minimum value in the data set, max(x) represents the maximum value in the data set, and x′ represents the normalized data value.

[0096] S14. Extract data features and target values ​​through the sliding window method, and convert the time series data into a format suitable for deep learning model input;

[0097] First, the input features and target values ​​are extracted, that is, the input feature matrix X and target value y are generated from the original data, as well as the feature construction of the time series data.

[0098] The input feature matrix X is obtained by removing all columns from the last column of the data normalized in step S13. Each row represents all input features at a certain time point, including environmental features and process features. The target value y is obtained by taking the last column of the data normalized in step S13 as the target value. Each target value y i Corresponding to a row x' in the input feature matrix i .

[0099] Wherein, the target value includes: temperature value.

[0100] Then the time series features are constructed. The time series task requires encoding time dependencies into features, so the code constructs the time series features through sliding windows.

[0101] Among them, the length of the sliding window is L, and each time it slides one time step, the calculation expression is as follows:

[0102]

[0103] in, represents the i-th time series sample, x' j ∈R nrepresents a row of the original feature matrix, that is, the n features of the j-th time step, and R represents a real number matrix consisting of L rows and n columns.

[0104] Input feature matrix X generated by sliding window seq is a 3D tensor with shape (N, L, n).

[0105] Among them, N = len(data) - L represents the number of sequence samples, L represents the length of each sequence, and n represents the number of features in each time step.

[0106] Then the target value y seq is the target value of the next time step of the sliding window, The prediction target corresponding to the i-th time series sample is expressed as follows:

[0107]

[0108] In this embodiment, step S2 is specifically as follows:

[0109] S21. Build a multimodal LSTM deep learning model;

[0110] like Figure 2 As shown, the multimodal LSTM deep learning model is a multi-input neural network model that combines time series features and static features, including: LSTM layer, fully connected layer. The model reduces the dimension of environmental features and processing features through separate fully connected layers, and the feature dimension is changed from the original size to 32. Then, the time series features output by the LSTM layer are spliced ​​with the static features, and further processed through the fully connected layer and Dropout to output the temperature value prediction of key parts.

[0111] in, Figure 2 Medium t ,i t , O t Represent the activation values ​​of the forget gate, input gate, and output gate respectively, C t and h t Represent memory unit and hidden state respectively, σ represents Sigmoid activation function, and tanh represents hyperbolic tangent function.

[0112] The LSTM layer is used to extract time series features, output the hidden state of the last time step, capture time dependency, and includes n' neurons. The fully connected layer processes static features and includes: input layer, hidden layer, and output layer.

[0113] S22, training the model constructed in step S21;

[0114] In this embodiment, the experimental data pre-processed in step S1 is divided into a training set and a test set at a ratio of 8:2 (the division ratio is set according to the actual situation), and the training set is used for model training. The model uses mean square error (MSE) as the loss function, and the Adam optimizer is used for model training. If the loss function tends to be stable after multiple iterations, the model is considered to have converged and training is stopped.

[0115] The model performance is evaluated by a test set, and the model evaluation indicators include root mean square error (RMSE) and mean absolute error (MAE).

[0116] The loss function is the mean squared error (MSE), which is calculated as follows:

[0117]

[0118] Among them, y' i Indicates the actual value, Represents the predicted value, n0 represents the number of samples, and θ represents the parameters of the model.

[0119] In this embodiment, step S3 is specifically as follows:

[0120] First, the real-time temperature data of key parts are input into the LSTM layer, and time series features are extracted by forward propagation. Then, the temperature sensor data and equipment status data are processed using a long short-term memory network (LSTM) to capture time-dependent features.

[0121] Then, the static features are processed through the fully connected layer, that is, the environmental data (workshop environmental parameters) and processing data (processing technology parameters) are processed using a fully connected neural network (FCN) to complete static dimensionality reduction.

[0122] Static features (environment and processing data) are reduced to 32 dimensions through a separate fully connected layer, expressed as follows:

[0123] env_out = ReLU(W env env_input+b env )

[0124] process_out = ReLU(W process process_input+b process )

[0125] Among them, W env , W process represents the weight matrix, b env , b process Indicates bias.

[0126] The input layer in the fully connected layer receives time series data, environmental data, and processed data respectively, and then inputs them into the hidden layer, and uses splicing or attention mechanism to fuse multimodal data to enhance the sensitivity of the model to different data sources.

[0127] Among them, the splicing time series data, environmental data, and processing data are expressed as follows:

[0128] merged∈R batch_size×(64+32+32)

[0129] Finally, full connection processing is performed, and the predicted temperature of the key parts of the CNC machine tool is output through the output layer regression network to complete the temperature prediction. According to the predicted temperature value, the tool path is adjusted or thermal deformation is compensated to ensure the processing accuracy.

[0130] Among them, the full connection processing is as follows:

[0131] The first layer performs linear transformation of the data and activates it: α = Relu (W1 merged + b1), that is, the dimension is reduced to 64 dimensions, the activation function is ReLU, and some neurons are randomly discarded through Dropout to prevent overfitting.

[0132] The second layer multiplies the output of the first layer by the weight W2 of the second layer and adds the bias b2 to get the final output: output = W2·α+b2.

[0133] Among them, W1 and W2 represent weight matrices, and b1 and b2 represent biases.

[0134] In this embodiment, step S4 is specifically as follows:

[0135] The model explanation uses the SHAP framework, which is a game theory-based tool for explaining the output of machine learning models. First, the various input features of the multimodal LSTM deep learning model are integrated into a matrix X test_combined . Time series feature X test_tensor is expanded into a two-dimensional matrix, each row is a sample. test_env and processing feature X test_process After directly splicing to the time series feature, the expression is as follows:

[0136]

[0137] Among them, N1 represents the number of samples, d time Represents the dimension of time series features, d env The dimension representing the environmental characteristics, d process Indicates the dimension of the machining feature.

[0138] Then use KMeans to cluster the test set data and select representative data points as background data to reduce computational complexity. The clustered background data is used in the SHAP interpreter to reduce the amount of computation without losing interpretability. Define the SHAP interpreter and transform X test_combined It is decomposed into three parts: time series, environmental characteristics and process characteristics.

[0139] Then calculate the SHAP value, which is used to calculate the marginal contribution of each feature to the prediction result and generate an explanatory score indicating the importance of the feature. The expression is defined as follows:

[0140]

[0141] Among them, F represents the feature set, S represents the feature subset, v(S) represents the model prediction value using the feature subset S, and M represents the entire feature set, including all possible features.

[0142] This embodiment is further verified by simulation. Figure 3 As shown, the multimodal LSTM deep learning model of the present invention is used to predict temperature with the existing LSTM neural network and CNN-LSTM neural network which only consider temperature data as input, and the root mean square error (RMSE), mean absolute error (MAE) and mean percentage error (MAPE) are used for evaluation and comparison. The comparison results are shown in Table 1.

[0143] Table 1

[0144]

[0145] Depend on Figure 3 As shown in Table 1, the multimodal LSTM deep learning model of the present invention has good MAE, RMSE and R 2 , indicating that it has high accuracy and good model fitting effect in temperature prediction tasks. And because multimodal data input is used in the modeling process, the excellent performance of the model also proves its strong generalization performance and robustness in temperature prediction.

[0146] like Figure 4 As shown, this embodiment actually applies the multimodal LSTM deep learning model of the method of the present invention, predicts the temperature of the key parts of the machine tool through the prediction model and compares it with the actual value. It shows that the prediction result of the multimodal LSTM deep learning model of the method of the present invention has a high degree of fit with the actual data and a small relative error.

[0147] In summary, the method of the present invention makes full use of the association between various types of data such as multi-point temperature sensor data, environmental parameters, and processing parameters, and realizes high-precision temperature prediction through the combination of multimodal data fusion and deep learning model. It uses LSTM network to extract time series features, and processes environmental and process data through independent fully connected networks, and integrates multi-source information in the feature fusion layer, thereby effectively improving the prediction performance. The introduction of SHAP value analysis enhances the interpretability of the model, allowing users to intuitively understand the contribution of each feature to the prediction results. Combined with GPU acceleration and optimized data preprocessing process, it has good scalability while ensuring efficient calculation.

[0148] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.

Claims

1. A temperature prediction method for key parts of CNC machine tools based on multimodal deep learning, the specific steps are as follows: S1, collect experimental data and perform preprocessing; By arranging multiple temperature sensors at key parts of CNC machine tools according to actual conditions, collecting temperature change data, workshop environment parameters and processing technology parameters, and then preprocessing the collected temperature, environment and processing technology parameter data, and extracting data features and target values ​​through the sliding window method, the time series data is converted into a format suitable for deep learning model input; in, The key parts of the CNC machine tool include: spindle, guide rail, lead screw, bearing, motor, tool tip; the workshop environment parameters include: temperature, humidity, air flow rate, and the environmental data are collected by independent sensors; the processing parameters are obtained from the CNC control system, including: motor power, motor current, spindle speed, feed speed, cutting depth; the preprocessing includes: data alignment, normalization, missing value filling; S2. Build a multimodal LSTM deep learning model and train the model; S3. Based on step S2, the trained model is deployed to the CNC machine tool control system, data is collected and input in real time, temperature prediction is performed, and thermal deformation compensation is performed according to the prediction results to improve the machining accuracy of the machine tool; S4. Use the SHAP framework to interpret the model and clarify the contribution of eigenvalues.

2. According to claim 1, a method for predicting the temperature of key parts of a CNC machine tool based on multimodal deep learning is characterized in that: The step S1 is specifically as follows: S11, collecting experimental data; Temperature sensors are installed in the machine tool and workshop to collect the temperature of key parts of the machine tool and the environment, force sensors are used to collect the load data at the tool tip, the CNC control system is used to collect the processing parameter data, and testing instruments are placed to collect the humidity and wind speed data in the workshop; S12, data alignment; Align timestamps and integrate data from different tables into the same timeline to ensure the temporal consistency of each feature and target variable; S13, missing value processing and normalization; First, forward filling is performed to fill the missing values ​​of the current row with the non-missing values ​​of the previous row. The expression is as follows: Among them, x i Represents the i-th data; Then use the Min-Max operation to normalize the temperature data to the [0,1] interval. The expression is as follows: Where x represents the original data value, min(x) represents the minimum value in the data set, max(x) represents the maximum value in the data set, and x′ represents the normalized data value; S14. Extract data features and target values ​​through the sliding window method, and convert the time series data into a format suitable for deep learning model input; First, extract input features and target values, that is, generate input feature matrix X and target value y from the original data, and construct features of time series data; The input feature matrix X is obtained by removing all columns from the last column of the data normalized in step S13. Each row represents all input features at a certain time point, including environmental features and process features. The target value y is obtained by taking the last column of the data normalized in step S13 as the target value. Each target value y i Corresponding to a row x' in the input feature matrix i ; Wherein, the target value includes: temperature value; Then, the time series feature is constructed. The time series task requires encoding time dependencies into features, so the code constructs the time series features through sliding windows. Among them, the length of the sliding window is L, and each time it slides one time step, the calculation expression is as follows: in, represents the i-th time series sample, x' j ∈R n represents a row of the original feature matrix, that is, the n features of the jth time step, and R represents a real number matrix consisting of L rows and n columns; Input feature matrix X generated by sliding window seq is a three-dimensional tensor with shape (N, L, n); Where N = len(data) - L represents the number of sequence samples, L represents the length of each sequence, and n represents the number of features at each time step; Then the target value y seq is the target value of the next time step of the sliding window, The prediction target corresponding to the i-th time series sample is expressed as follows:

3. The method for predicting the temperature of key parts of a CNC machine tool based on multimodal deep learning according to claim 1 is characterized in that: The step S2 is specifically as follows: S21. Build a multimodal LSTM deep learning model; The multimodal LSTM deep learning model is a multi-input neural network model that combines time series features and static features, including: an LSTM layer and a fully connected layer; the model reduces the dimension of environmental features and processing features through separate fully connected layers, and the feature dimension is changed from the original size to 32, and then the time series features output by the LSTM layer are spliced ​​with the static features, and further processed through the fully connected layer and Dropout to output the temperature value prediction of the key parts; The LSTM layer is used to extract time series features, output the hidden state of the last time step, capture time dependency, and includes n' neurons; the fully connected layer processes static features, including: input layer, hidden layer, and output layer; S22, training the model constructed in step S21; The experimental data preprocessed in step S1 is divided into a training set and a test set according to the actual situation, and the training set is used for model training. The model uses mean square error MSE as the loss function, and the Adam optimizer is used for model training. If the loss function tends to be stable after multiple iterations, the model is considered to have converged and training is stopped. The model performance is evaluated by the test set, and the model evaluation indicators include: root mean square error RMSE and mean absolute error MAE; The loss function is the mean square error MSE, and the calculation expression is as follows: Among them, y' i Indicates the actual value, Represents the predicted value, n0 represents the number of samples, and θ represents the parameters of the model.

4. The method for predicting the temperature of key parts of a CNC machine tool based on multimodal deep learning according to claim 1 is characterized in that: The step S3 is specifically as follows: First, the key parts temperature data collected in real time is input into the LSTM layer, and the time series features are extracted by forward propagation. Then, the temperature sensor data and equipment status data are processed using the long short-term memory network LSTM to capture the time-dependent features. Then, the static features are processed through the fully connected layer, that is, the environmental data and processing data are processed using the fully connected neural network FCN to complete the static dimensionality reduction; The static features are reduced to 32 dimensions through a separate fully connected layer, and the expression is as follows: env_out=ReLU(W env ·env_input+b env ) process_out=ReLU(W process ·process_input+b process ) Among them, W env , W process represents the weight matrix, b env 、b process Indicates bias; The input layer in the fully connected layer receives time series data, environmental data, and processed data respectively, and then inputs them into the hidden layer, and uses splicing or attention mechanism to fuse multimodal data to enhance the sensitivity of the model to different data sources; Among them, the splicing time series data, environmental data, and processing data are expressed as follows: merged∈R batch_size×(64+32+32) Finally, full connection processing is performed to output the predicted temperature of the key parts of the CNC machine tool through the output layer regression network to complete the temperature prediction. According to the predicted temperature value, the tool path is adjusted or thermal deformation is compensated to ensure the processing accuracy; Among them, the full connection processing is as follows: The first layer performs linear transformation and activation on the data: α = Relu (W1 merged + b1), which means the dimension is reduced to 64 dimensions. The activation function is ReLU, and some neurons are randomly discarded through Dropout to prevent overfitting. The second layer multiplies the output of the first layer by the weight W2 of the second layer and adds the bias b2 to get the final output: output = W2 · α + b2; Among them, W1 and W2 represent weight matrices, and b1 and b2 represent biases.

5. The method for predicting the temperature of key parts of a CNC machine tool based on multimodal deep learning according to claim 1 is characterized in that: The step S4 is specifically as follows: Model explanation Using the SHAP framework, we first integrate the various input features of the multimodal LSTM deep learning model into a matrix X test_combined ; Time series feature X test_tensor Expanded into a two-dimensional matrix, each row is a sample; environmental feature X test_env and processing feature X test_process After directly splicing to the time series feature, the expression is as follows: Among them, N1 represents the number of samples, d time Represents the dimension of time series features, d env The dimension representing the environmental characteristics, d process Represents the dimension of the machining feature; Then use KMeans to cluster the test set data and select representative data points as background data. The clustered background data is used in the SHAP interpreter. Define the SHAP interpreter and convert X test_combined Decomposed into three parts: time series, environmental characteristics and process characteristics; Then calculate the SHAP value, SHAP value The expression is defined as follows: Among them, F represents the feature set, S represents the feature subset, v(S) represents the model prediction value using the feature subset S, and M represents the entire feature set, including all possible features.

Citation Information

Patent Citations

  • Main shaft thermal error modeling method, prediction method and modeling system

    CN114019909A

  • Control method and device for air conditioner in machine room, storage medium and electronic equipment

    CN117545240A

  • Intelligent integrated modular cabinet control method, system, equipment and medium

    CN119322683A

  • Bearing heat treatment result prediction method based on deep learning

    CN119416112A

  • Intelligent decision support method for maritime safety information based on multimodal fusion network

    JP7623060B1