A thermal error prediction method and system based on wfgn
By using a multi-domain fusion graph neural network based on WFGN to extract features through Fourier transform and wavelet transform, a thermal error prediction model is constructed. This solves the problem of insufficient prediction accuracy in traditional methods, achieves efficient and real-time thermal error compensation, and improves the quality and efficiency of CNC machine tool processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- DONGGUAN JIR FINE MACHINERY
- Filing Date
- 2025-07-16
- Publication Date
- 2026-07-07
AI Technical Summary
Traditional thermal error compensation methods lack sufficient prediction accuracy in CNC machine tool processing, making it difficult to achieve rapid response and affecting processing efficiency and product quality.
A multi-domain fusion graph neural network based on WFGN is adopted, and a thermal error prediction model is constructed through Fourier transform convolutional network, wavelet transform convolutional network and fully connected network, and temperature sequence data is used for learning and prediction.
It improves the accuracy and efficiency of thermal error prediction, achieves more real-time thermal error compensation, reduces processing errors, and improves part processing quality and production efficiency.
Smart Images

Figure CN120911257B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of CNC machining data processing technology, specifically a thermal error prediction method and system based on WFGN. Background Technology
[0002] In the field of modern, highly automated CNC machine tool processing, thermal error has become a key factor restricting the improvement of machining accuracy. Thermal error is mainly caused by the continuous changes in internal and external heat during the long-term operation of the machine tool. These heat changes may originate from the operation of the machine tool's motor, frictional heat generated during the cutting process, and fluctuations in the external ambient temperature. The accumulation and transfer of this heat causes minute dimensional and shape changes in various machine tool components, such as the bed, guideways, and cutting tools, which in turn adversely affect the dimensional and shape accuracy of the machined parts.
[0003] Traditional thermal error compensation methods typically rely on the accumulation of extensive field experimental data and the derivation of empirical formulas. However, this approach faces numerous challenges in practical applications. Firstly, it suffers from insufficient prediction accuracy. Due to the limitations of experimental data, the approximation of empirical formulas, and the lengthy time required for data collection and analysis, it is difficult to achieve rapid response during actual machining. This results in a failure to achieve both accurate prediction and rapid response, thus impacting machining efficiency and product quality. Therefore, finding a more accurate and efficient thermal error prediction method has become an urgent problem to be solved in the field of modern CNC machine tool processing. Summary of the Invention
[0004] The purpose of this invention is to provide a thermal error prediction method and system based on WFGN to solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the present invention provides the following technical solution:
[0006] A thermal error prediction method based on WFGN includes:
[0007] Step S1: Obtain the temperature sequence data of the target point and the error data generated during the processing of the parts. Preprocess the collected data and convert it into graph structure data.
[0008] Step S2: Construct a dataset using graph structure data, and divide the dataset into training set, validation set and test set according to a preset ratio;
[0009] Step S3: Construct a multi-domain fusion graph neural network, wherein the multi-domain fusion graph neural network includes a Fourier transform-based convolutional network for capturing global features, a wavelet transform-based convolutional network for capturing local features, and a fully connected network. The Fourier transform-based convolutional network, the wavelet transform-based convolutional network, and the fully connected network are connected through a feature fusion layer.
[0010] Step S4: Train the multi-domain fusion graph neural network using the training set and the validation set respectively to obtain the trained multi-domain fusion graph neural network; then test the trained multi-domain fusion graph neural network using the test set.
[0011] Step S5: After the multi-domain fusion graph neural network passes the test, it predicts the corresponding error result based on the temperature sequence data detected during part processing, and adjusts the part processing parameters according to the prediction result to reduce the error.
[0012] A further technical solution is provided, wherein the convolutional network based on Fourier transform includes Fourier convolutional layers, residual block layers, max pooling layers and inverse Fourier convolutional layers, the convolutional network based on wavelet transform includes four wavelet decomposition layers and a reconstruction layer, the fully connected network is a multilayer perceptron, and the fully connected network includes three fully connected layers and an output layer.
[0013] A further technical solution involves the Fourier convolutional layer obtaining the corresponding Laplacian feature matrix based on the adjacency matrix of the graph structure data. Based on the feature matrix and the input temperature sequence data, the Fourier transform result is calculated to compress the input data from (32, 256, 128) to (32, 64). The residual block layer is used to preserve data features, and the kernel size of the residual block layer is 3×3×3. The inverse Fourier convolutional layer restores the data dimension to 128 dimensions. The Fourier convolutional layer is represented by the following function:
[0014]
[0015] in It is the Hadamard product and It is a convolution filter. It is the characteristic matrix of the Laplace matrix. It is temperature series data.
[0016] A further technical solution is that the wavelet kernel size of the wavelet decomposition layer is 5×5, and the reconstruction layer is used to implement the inverse wavelet transform; the function representation of the wavelet decomposition layer is as follows:
[0017]
[0018] in For the corresponding scale parameters The target wavelet kernel function, where N is the number of corresponding nodes. These are the eigenvalues of the Laplace matrix of the graph signal.
[0019] Further technical solutions for step S1 include:
[0020] Step S11: Provide 16 temperature sensors, of which 7 temperature sensors are distributed along the central axis of the electric spindle, and another 7 temperature sensors are distributed at the water inlet and outlet of the front bearing, the water inlet and outlet of the motor, the front, middle and rear of the cooling jacket, and the remaining 2 temperature sensors measure the temperature of the worktable and the surrounding environment.
[0021] Step S12: Collect statistical data on the special expansion error of the electric spindle center axis;
[0022] Step S13: The time interval between the two temperature data measured by the temperature sensor is 1 minute. The sampled temperature data and error data are normalized.
[0023] A further technical solution, for training the multi-domain fusion graph neural network using the training set and the validation set respectively, includes using mean squared error as the loss function and RMSProp as the optimizer during the training process of the multi-domain fusion graph neural network, wherein the loss function is expressed as:
[0024]
[0025] Where n is the number of data points. It is the true value of the i-th data point. This is the predicted value for the i-th data point; then, the model parameters are updated using the backpropagation algorithm.
[0026] In a further technical solution, the multi-domain fusion graph neural network uses the advance correction unit function as the activation function for the Fourier convolutional layer, the inverse Fourier convolutional layer, the four wavelet decomposition layers, the reconstruction layer, and the fully connected layer.
[0027] A further technical solution is that the evaluation criteria for comparing the output data of the multi-domain fusion graph neural network with the actual data include mean absolute error and root mean square error. The mean absolute error refers to the average of the absolute values of the differences between the predicted and actual values; a smaller mean absolute error indicates better bias in the multi-domain fusion graph neural network. The root mean square error is the square root of the average of the squares of the differences between the predicted and actual values; a smaller root mean square error also indicates better bias in the multi-domain fusion graph neural network. The expression for the mean absolute error is:
[0028]
[0029] In the formula, MAE is the mean absolute error, and m is the number of data points. It is the true value of the i-th data point. It is the predicted value of the i-th data point;
[0030] The expression for the root mean square error is:
[0031]
[0032] In the formula, RMAE is the root mean square error, and m is the number of data points. It is the true value of the i-th data point. It is the predicted value of the i-th data point.
[0033] A further technical solution is that the explanatory power of the multi-domain fusion graph neural network for the total variation of the actual values is R², where the value of R² is between 0 and 1. The closer the R² value is to 1, the better the fit of the multi-domain fusion graph neural network to the data. The expression for R² is:
[0034]
[0035] In the formula, m is the number of data points. It is the true value of the i-th data point. It is the predicted value of the i-th data point.
[0036] A thermal error prediction system based on WFGN, comprising:
[0037] The data acquisition module acquires temperature sequence data of the target point and error data generated during part processing. It preprocesses the collected data and transforms it into graph structure data.
[0038] The data processing module uses graph-structured data to construct a dataset and divides the dataset into training, validation, and test sets according to a preset ratio.
[0039] The model building module constructs a multi-domain fusion graph neural network, wherein the multi-domain fusion graph neural network includes a convolutional network based on Fourier transform for capturing global features, a convolutional network based on wavelet transform for capturing local features, and a fully connected network. The convolutional network based on Fourier transform, the convolutional network based on wavelet transform, and the fully connected network are connected through a feature fusion layer.
[0040] The model training module trains the multi-domain fusion graph neural network using the training set and the validation set respectively to obtain the trained multi-domain fusion graph neural network; then it tests the trained multi-domain fusion graph neural network using the test set.
[0041] The model uses a module where the multi-domain fusion graph neural network, after passing a test, predicts the corresponding error results based on the temperature sequence data detected during part processing, and adjusts the part processing parameters based on the prediction results to reduce errors.
[0042] The beneficial effects of this invention are:
[0043] This invention utilizes deep learning technology, fusing Fourier transform convolutional networks, wavelet transform convolutional networks, and fully connected networks. By learning from input temperature sequence data and error data, it automatically predicts thermal errors generated under different machine tool processing temperatures, optimizing part processing technology and reducing the workload of manual process selection. It extracts global frequency features through Fourier transform and captures local multi-scale variation features through wavelet transform, then integrates these features via a fully connected network to output high-precision prediction results. This effectively improves the accuracy and efficiency of thermal error prediction using a multi-domain fusion graph neural network model. Compared to traditional methods, the multi-domain fusion graph neural network model significantly reduces data acquisition and processing time, achieves more real-time thermal error compensation, reduces processing errors, and improves part processing quality and production efficiency, making it particularly suitable for high-precision CNC machine tool processing scenarios.
[0044] Other features and advantages of the present invention will be described in detail in the following detailed description section. Attached Figure Description
[0045] Figure 1 : A flowchart of the thermal error prediction method based on WFGN of the present invention.
[0046] Figure 2 The flowchart of the thermal error prediction method based on WFGN of the present invention.
[0047] Figure 3 The structure diagram of the neural network model based on graph convolution of this invention is shown.
[0048] Figure 4 The diagram shows the predicted scoring results during the manufacturing process of the test set of this invention. Detailed Implementation
[0049] 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.
[0050] Please refer to Figure 1-4 ;
[0051] It is known that traditional thermal error compensation methods rely on a large amount of experimental data and empirical formulas. In practical applications, due to the limited coverage of experimental data, it is difficult to represent all processing scenarios. Furthermore, the empirical formulas are too simplified and cannot accurately describe the nonlinear and dynamic thermal error characteristics, resulting in low prediction accuracy. Due to the long time required for data acquisition and analysis, it is impossible to quickly generate compensation formulas, lacks dynamic adjustment capabilities, and is difficult to track changes in thermal error during the processing in real time, resulting in insufficient real-time performance.
[0052] Furthermore, existing thermal error compensation methods are difficult to eliminate when used. Even when using deep learning to process and extract data and learn to predict errors through deep learning algorithms, they still face problems such as low accuracy and poor real-time performance. This is because deep learning lacks explicit modeling of the physical characteristics of thermal errors and has a high demand for large amounts of high-quality training data. Thermal error data is often insufficient due to experimental costs and complex operating conditions, resulting in low prediction accuracy, model overfitting, or poor generalization ability. In addition, deep learning models have high computational complexity and a large number of parameters, and training and inference take a long time, making it difficult to meet the processing scenarios with high real-time requirements.
[0053] Therefore, this invention discloses a thermal error prediction method based on WFGN, aiming to accurately and efficiently predict thermal errors from design and manufacturing data through automatic learning; specifically, as shown in... Figure 1-2 ,include:
[0054] Step S1: Obtain the temperature sequence data of the target point and the error data generated during the processing of the parts. Preprocess the collected data and convert it into graph structure data.
[0055] Step S2: Construct a dataset using graph structure data. Specifically, the collected data is placed into a unified CSV file to form a dataset. Then, the dataset is divided into a training set, a validation set, and a test set according to a preset ratio. In this embodiment, the dataset is divided into the training set, the validation set, and the test set in a ratio of 7:2:1.
[0056] Step S3: Construct a multi-domain fusion graph neural network, which includes a Fourier transform-based convolutional network for capturing global features, a wavelet transform-based convolutional network for capturing local features, and a fully connected network. The Fourier transform-based convolutional network, the wavelet transform-based convolutional network, and the fully connected network are connected through a feature fusion layer.
[0057] Step S4: Train the multi-domain fusion graph neural network using the training set and validation set respectively to obtain the trained multi-domain fusion graph neural network; then test the trained multi-domain fusion graph neural network using the test set to check the training effect of the multi-domain fusion graph neural network model;
[0058] Step S5: After the multi-domain fusion graph neural network passes the test, it predicts the corresponding error results based on the temperature sequence data detected during part processing, and adjusts the part processing parameters according to the prediction results to reduce the error.
[0059] More specifically, by leveraging deep learning technology and fusing Fourier transform convolutional networks, wavelet transform convolutional networks, and fully connected networks, this method learns from input temperature sequence data and error data to automatically predict thermal errors generated under different machine tool processing temperatures. This optimizes the part processing technology, reduces the workload of manually selecting processing techniques, extracts global frequency features through Fourier transform, captures local multi-scale variation features through wavelet transform, and integrates the results through a fully connected network to output high-precision predictions. This effectively improves the accuracy and efficiency of the multi-domain fusion graph neural network model for thermal error prediction. Compared to traditional methods, the multi-domain fusion graph neural network model significantly reduces the time spent on data acquisition and processing, achieves more real-time thermal error compensation, reduces processing errors, and improves part processing quality and production efficiency. It is particularly suitable for high-precision CNC machine tool processing scenarios.
[0060] Furthermore, for step S1: including
[0061] Step S11: Provide 16 temperature sensors, of which 7 temperature sensors are distributed along the central axis of the electric spindle. More specifically, 1 temperature sensor is inside the front shaft, 1 temperature sensor is in the front bearing housing, 2 temperature sensors are on the side of the front bearing housing, 1 temperature sensor is on the flange surface of the front bearing housing, 1 temperature sensor is inside the rear bearing, and 1 temperature sensor is outside the rear bearing. The other 7 temperature sensors are distributed at the water inlet / outlet of the front bearing, the water inlet / outlet of the motor, and the front, middle, and rear of the cooling jacket. The remaining 2 temperature sensors measure the temperature of the worktable and the surrounding environment.
[0062] Step S12: Collect the special expansion error data of the electric spindle center shaft. The target variable represented by the error data needs to be measured by the part using professional tools to obtain thermal error data.
[0063] Step S13: The time interval between the two temperature data measured by the temperature sensor is 1 minute. The sampled temperature data and error data are normalized.
[0064] Furthermore, in embodiments of the present invention, the convolutional network based on Fourier transform includes a Fourier convolutional layer, a residual block layer, a max pooling layer, and an inverse Fourier convolutional layer; the convolutional network based on wavelet transform includes four wavelet decomposition layers and a reconstruction layer; and the fully connected network is a multilayer perceptron, which includes three fully connected layers and an output layer.
[0065] More specifically, in this multi-domain fusion graph neural network model structure, the Fourier convolutional layer obtains information from the adjacency matrix in the input graph structure data to perform Fourier transform. It first obtains the corresponding Laplacian matrix through the adjacency matrix, then calculates the feature matrix of the Laplacian matrix, and finally uses the feature matrix and the input temperature sequence data to calculate the Fourier transform result, compressing the input data from (32, 256, 128) to (32, 64). In addition, there is a residual block layer to preserve data features. The number of input and output channels of the residual block layer is the same as the number of input channels. A three-dimensional convolution is performed inside the residual block layer, with the convolution kernel set to a size of 3×3×3 and padding set to 1. Simultaneously, to ensure merging, the data dimension is reconstructed to (32, 64). The data is then input into a four-layer wavelet decomposition layer. The wavelet kernel used in the wavelet decomposition layer is 5×5. Wavelet transform and inverse wavelet transform are achieved through decomposition and reconstruction by the four-layer wavelet decomposition layer, thereby extracting sufficient local features. Then, inverse Fourier transform is performed to restore the data dimension to a 128-dimensional space. Finally, the features are inferred through three fully connected layers, including Fc1(128:64), Fc2(64:16), and Fc3(16:1). The prediction result is then output by the output layer.
[0066] In this embodiment, the multi-domain fusion graph neural network uses the advance correction unit function as the activation function for the Fourier convolutional layer, the inverse Fourier convolutional layer, four wavelet decomposition layers, the reconstruction layer, and the fully connected layer. The model is trained by using the mean squared error (MSE) as the loss function and the parameters are optimized by using RMSProp as the optimizer.
[0067] More specifically, in this embodiment, the activation function used in the multi-domain fusion graph neural network model is the Tanh function, expressed as:
[0068]
[0069] In the formula, e represents the base of the natural logarithm, x represents the input variable, and tanh(x) represents the activation function;
[0070] The Fourier convolutional layer of a multi-domain fusion graph neural network model can be represented by the following function:
[0071]
[0072] in It is the Hadamard product and It is a convolution filter. It is the characteristic matrix of the Laplace matrix. It is temperature series data.
[0073] The wavelet decomposition layer of the multi-domain fusion graph neural network model is represented by the following function:
[0074]
[0075] in For the corresponding scale parameters The target wavelet kernel function, where N is the number of corresponding nodes. These are the eigenvalues of the Laplace matrix of the graph signal.
[0076] The multi-domain fusion graph neural network model uses mean squared error (MSE) as the loss function to train the model, which is expressed as:
[0077]
[0078] Where n is the number of data points. It is the true value of the i-th data point. It is the predicted value of the i-th data point.
[0079] To better understand the construction of multi-domain fusion graph neural network models, such as Figure 2 As shown in this embodiment, the main algorithm flow of the multi-domain fusion graph neural network model is described.
[0080] like Figure 3 As shown, the multi-domain fusion graph neural network model utilizes a convolutional network based on Fourier transform to extract global and spatial features, and a convolutional network based on wavelet transform to extract local features. Residual block layers are added to the Fourier convolutional layers to preserve data information. After feature extraction, a series of fully connected layers are used to progressively reduce dimensionality, ultimately obtaining the prediction result. The multi-domain fusion graph neural network model improves training stability through mechanisms such as residual connections and batch normalization, and by combining local and global features, it is suitable for prediction tasks involving spatial and sequential data.
[0081] The specific process is as follows:
[0082] A1: Input: Training dataset train_loader, validation dataset validate_loader, test dataset test_loader. Total number of samples n, number of correct predictions correct, learning rate α, number of training iterations epochs, batch size.
[0083] Perform model initialization, with iterations t=1,2...T:
[0084] A2: Iterative training process:
[0085] a. For each epoch = 1, 2, ..., epochs:
[0086] i. Divide the training dataset train_loader into batches and perform batch training:
[0087] Iterate through each batch and input the data into the model for training.
[0088] Calculate the loss function output by the model:
[0089]
[0090] Where n is the number of data points. It is the true value of the i-th data point. It is the predicted value of the i-th data point;
[0091] Update model parameters using the backpropagation algorithm:
[0092]
[0093] ii. Evaluate model performance on the validation set:
[0094] Evaluate the model's performance for the current epoch using the validation dataset valid_loader.
[0095]
[0096] In the formula, "correct" represents the number of correct predictions, "total" represents the total number of samples in the validation set, and "Accuracy" represents the accuracy metric.
[0097] Furthermore, in order to improve the computational efficiency and practicality of the multi-domain fusion graph neural network model, residual connections are introduced in this embodiment to accelerate the convergence speed during training, ensure the stability of the multi-domain fusion graph neural network model in the network structure, and avoid the gradient vanishing problem.
[0098] In this embodiment, the evaluation criteria for comparing the output data of the multi-domain fusion graph neural network with the actual data include mean absolute error and root mean square error. Mean absolute error refers to the average of the absolute values of the differences between the predicted and actual values; a smaller mean absolute error indicates better bias in the multi-domain fusion graph neural network. The expression for mean absolute error is:
[0099]
[0100] In the formula, MAE is the mean absolute error, and m is the number of data points. It is the true value of the i-th data point. It is the predicted value of the i-th data point;
[0101] The root mean square error (RMSE) is the square root of the average of the squares of the differences between the predicted and actual values. A smaller RMSE indicates better performance of the multi-domain fusion graph neural network. The expression for the RMSE is:
[0102]
[0103] In the formula, RMAE is the root mean square error, and m is the number of data points. It is the true value of the i-th data point. It is the predicted value of the i-th data point;
[0104] Furthermore, in this embodiment, the mean absolute percentage error (MAPE) can also be used as a benchmark for comparing multi-domain fusion graph neural network models. The average of the ratios of the absolute values of the differences between predicted and actual values to the actual values is preferred; a smaller value is better. It is typically expressed as a percentage, and the expression is:
[0105]
[0106] In the formula, MAPE is the root mean square error, and m is the number of data points. It is the true value of the i-th data point. It is the predicted value of the i-th data point;
[0107] Furthermore, the degree to which the multi-domain fusion graph neural network explains the total variation of the actual values is denoted by R², where the value of R² is between 0 and 1. The closer the R² value is to 1, the better the fit of the multi-domain fusion graph neural network to the data. The expression for R² is:
[0108]
[0109] In the formula, m is the number of data points. It is the true value of the i-th data point. It is the predicted value of the i-th data point.
[0110] In this embodiment, during the training phase of the multi-domain fusion graph neural network, the root mean square propagation method (RMSProp) is used as the optimizer to determine the optimal weights. RMSProp offers fast convergence and is suitable for training complex models with high-dimensional data. In the main flow of this algorithm, a total of 1000 epochs were used, with a batch size of 32 and a learning rate of 10. -4 Finally, the trained model was tested on over 800 previously unseen test sets, and the experimental results are as follows: Figure 4 As shown.
[0111] This invention also discloses a thermal error prediction system based on WFGN, comprising:
[0112] The data acquisition module acquires temperature sequence data of the target point and error data generated during part processing. It preprocesses the collected data and transforms it into graph structure data.
[0113] The data processing module uses graph-structured data to construct a dataset and divides the dataset into training, validation, and test sets according to a preset ratio.
[0114] The model building module constructs a multi-domain fusion graph neural network, wherein the multi-domain fusion graph neural network includes a convolutional network based on Fourier transform for capturing global features, a convolutional network based on wavelet transform for capturing local features, and a fully connected network. The convolutional network based on Fourier transform, the convolutional network based on wavelet transform, and the fully connected network are connected through a feature fusion layer.
[0115] The model training module trains the multi-domain fusion graph neural network using the training set and the validation set respectively to obtain the trained multi-domain fusion graph neural network; then it tests the trained multi-domain fusion graph neural network using the test set.
[0116] The model uses a module where the multi-domain fusion graph neural network, after passing a test, predicts the corresponding error results based on the temperature sequence data detected during part processing, and adjusts the part processing parameters based on the prediction results to reduce errors.
[0117] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
[0118] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style of the specification is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A thermal error prediction method based on WFGN, characterized in that, include: Step S1: Obtain the temperature sequence data of the target point and the error data generated during the processing of the parts. Preprocess the collected data and convert it into graph structure data. In step S11: 16 temperature sensors are provided, of which 7 temperature sensors are distributed along the central axis of the electric spindle, and another 7 temperature sensors are distributed at the water inlet and outlet of the front bearing, the water inlet and outlet of the motor, the front, middle and rear of the cooling jacket, and the remaining 2 temperature sensors measure the temperature of the workbench and the surrounding environment. Step S2: Construct a dataset using graph structure data, and divide the dataset into training set, validation set and test set according to a preset ratio; Step S3: Construct a multi-domain fusion graph neural network, wherein the multi-domain fusion graph neural network includes a Fourier transform-based convolutional network for capturing global features, a wavelet transform-based convolutional network for capturing local features, and a fully connected network. The Fourier transform-based convolutional network, the wavelet transform-based convolutional network, and the fully connected network are connected through a feature fusion layer. The convolutional network based on Fourier transform includes Fourier convolutional layers, residual block layers, max pooling layers, and inverse Fourier convolutional layers. The convolutional network based on wavelet transform includes four wavelet decomposition layers and a reconstruction layer. The fully connected network is a multilayer perceptron, which includes three fully connected layers and an output layer. The Fourier convolutional layer obtains the corresponding Laplacian feature matrix based on the adjacency matrix of the graph structure data. Based on the feature matrix and the input temperature sequence data, it calculates the Fourier transform result, compressing the input data from (32, 256, 128) to (32, 64). The residual block layer is used to preserve data features, and the kernel size of the residual block layer is 3×3×3. The Fourier convolutional layer is represented by the following function: in It is the Hadamard product and It is a convolution filter. It is the characteristic matrix of the Laplace matrix. It is temperature series data; The data is input into a four-layer wavelet decomposition layer, using a 5×5 wavelet kernel. Wavelet transform and inverse wavelet transform are achieved through decomposition and reconstruction by the four-layer wavelet decomposition layer and the reconstruction layer, thereby extracting sufficient local features. Then, an inverse Fourier transform is performed to restore the data dimension to a 128-dimensional space. Inference is then performed through three fully connected layers: Fc1 (128:64), Fc2 (64:16), and Fc3 (16:1). The prediction result is output by the output layer. The wavelet kernel size of the wavelet decomposition layer is 5×5, and the reconstruction layer is used to implement the inverse wavelet transform; the function representation of the wavelet decomposition layer is as follows: in For the corresponding scale parameters The target wavelet kernel function, where N is the number of corresponding nodes. These are the eigenvalues of the Laplace matrix of the graphical signal; Step S4: Train the multi-domain fusion graph neural network using the training set and the validation set respectively to obtain the trained multi-domain fusion graph neural network; then test the trained multi-domain fusion graph neural network using the test set. Step S5: After the multi-domain fusion graph neural network passes the test, it predicts the corresponding error result based on the temperature sequence data detected during part processing, and adjusts the part processing parameters according to the prediction result to reduce the error; The evaluation criteria for comparing the output data of the multi-domain fusion graph neural network with the actual data include mean absolute error (MAE) and root mean square error (RMSE). The MAE is the average of the absolute values of the differences between the predicted and actual values; a smaller MAE indicates better bias in the multi-domain fusion graph neural network. The RMSE is the square root of the average of the squares of the differences between the predicted and actual values; a smaller RMSE also indicates better bias in the multi-domain fusion graph neural network. The expression for the MAE is: In the formula, MAE is the mean absolute error, and m is the number of data points. It is the true value of the i-th data point. It is the predicted value of the i-th data point; The expression for the root mean square error is: In the formula, RMAE is the root mean square error, and m is the number of data points. It is the true value of the i-th data point. It is the predicted value of the i-th data point.
2. The thermal error prediction method based on WFGN according to claim 1, characterized in that, For step S1: it also includes Step S12: Collect statistical data on the special expansion error of the electric spindle center axis; Step S13: The time interval between the two temperature data measured by the temperature sensor is 1 minute. The sampled temperature data and error data are normalized.
3. The thermal error prediction method based on WFGN according to claim 1, characterized in that, Training the multi-domain fusion graph neural network using the training set and the validation set respectively includes using mean squared error as the loss function and RMSProp as the optimizer during the training process. The loss function is expressed as follows: Where n is the number of data points. It is the true value of the i-th data point. This is the predicted value for the i-th data point; then, the model parameters are updated using the backpropagation algorithm.
4. The thermal error prediction method based on WFGN according to claim 1, characterized in that, The multi-domain fusion graph neural network uses the advance correction unit function as the activation function for the Fourier convolutional layer, the inverse Fourier convolutional layer, four wavelet decomposition layers, the reconstruction layer, and the fully connected layer.
5. The thermal error prediction method based on WFGN according to claim 1, characterized in that, The degree to which the multi-domain fusion graph neural network explains the total variation of the actual values is denoted by R², where R² is between 0 and 1. The closer the R² value is to 1, the better the multi-domain fusion graph neural network fits the data. The expression for R² is: In the formula, m is the number of data points. It is the true value of the i-th data point. It is the predicted value of the i-th data point.
6. A thermal error prediction system based on WFGN, characterized in that, Includes claim 1 above, and: a data acquisition module, which acquires temperature sequence data of the target point and error data generated during part processing, preprocesses the collected data, and converts the data into graph structure data; The data processing module uses graph-structured data to construct a dataset and divides the dataset into training, validation, and test sets according to a preset ratio. The model building module constructs a multi-domain fusion graph neural network, wherein the multi-domain fusion graph neural network includes a convolutional network based on Fourier transform for capturing global features, a convolutional network based on wavelet transform for capturing local features, and a fully connected network. The convolutional network based on Fourier transform, the convolutional network based on wavelet transform, and the fully connected network are connected through a feature fusion layer. The model training module trains the multi-domain fusion graph neural network using the training set and the validation set respectively to obtain the trained multi-domain fusion graph neural network; then it tests the trained multi-domain fusion graph neural network using the test set. The model uses a module where the multi-domain fusion graph neural network, after passing a test, predicts the corresponding error results based on the temperature sequence data detected during part processing, and adjusts the part processing parameters based on the prediction results to reduce errors.