Rotating shaft thermal positioning error identification method and system based on neural network

Through the neural network-based method, the number of cluster clusters is automatically determined and the temperature sensitive points are screened, and the TPE-IndRNN model is constructed, which solves the problems of low accuracy and poor adaptability of the rotation axis thermal error modeling in the existing technology, and achieves a higher Thermal positioning error recognition accuracy and robustness of rotating shaft.

CN119106303APending Publication Date: 2024-12-10SHANGHAI JIAOTONG UNIV +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411137136.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

The existing rotary shaft thermal error modeling methods have low accuracy, are difficult to adapt to variable working conditions, cannot automatically determine the number of temperature sensitive points, and there are few researches on the thermal positioning error of the rotary shaft.

Method used

Using a neural network-based method, the number of cluster clusters is automatically determined by constructing random walking Laplace matrix and spectral clustering, temperature sensitive points are screened, and the TPE-IndRNN model is constructed, using the average absolute error and mean square error as evaluation. Indicators, complete identification of the thermal positioning error of the rotation axis.

Benefits of technology

It realizes automatic determination of the optimal cluster number and temperature sensitive points without relying on expert experience, improves the accuracy and robustness of the recognition of thermal positioning errors of the rotation axis, and can better adapt to complex working conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119106303A_ABST
    Figure CN119106303A_ABST
Patent Text Reader

Abstract

The invention provides a rotating shaft thermal positioning error identification method and system based on a neural network. The method comprises the following steps: S1, automatically determining the number of clusters; s2, constructing a random walk Laplacian matrix, and performing spectral clustering in combination with the number of clusters; s3, constructing an IndRNN deep learning neural network based on a spectral clustering result; s4, modeling based on an IndRNN deep learning neural network; and S5, enabling the model to complete the error identification of the thermal positioning of the rotating shaft. According to the temperature sensitive point selection strategy based on the atlas theory, the optimal clustering number can be automatically determined, uncertainty caused by human intervention is avoided, temperature sensitive points can be screened without depending on expert experience, the clustering process can be accelerated by constructing a new feature vector space through the spectral clustering algorithm, and the clustering efficiency is improved. Compared with a method of directly carrying out K-means clustering on original data, the method has the advantages that the robustness of spectral clustering is better, and the consistency of results is better.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of machine tool thermal error modeling, and in particular to a method and system for identifying thermal positioning errors of rotating axes based on a neural network, and in particular to a method and system for comprehensively modeling and identifying thermal positioning errors of rotating axes based on a neural network TPE-IndRNN based on deep learning. Background Art

[0002] Thermal error is one of the most important sources of error affecting machining accuracy, usually accounting for more than 50% of machining errors. Due to the significant thermal effects and relatively easy measurement methods, researchers have conducted more in-depth research on the spindle and linear axis of machine tools. In recent years, the identification of thermal errors in rotary axes has attracted more and more attention from researchers. However, research on the modeling of thermal errors in rotary axes is still lacking. On 5-axis machine tools, thermal errors can cause the average line of the rotary axis to change relative to the axis of the tool cutting point (TCP). Standard measurements are given in ISO 230-3, and many scholars have also proposed methods to identify thermal errors in rotary axes. For example, by machining test pieces and using R-Test tests, multiple thermal errors on the rotary axis are visually determined. Or the thermal position and orientation errors on the average line of the rotary axis are evaluated by step tests. Some scholars also evaluate the position of the two rotary axes relative to the cutting tool by machining hot test pieces, which allows visual identification of thermal errors without using any measuring equipment. Through the above identification methods, it is found that the thermal positioning error of the rotary axis is one of the error sources that accounts for a large proportion of the overall error.

[0003] However, unlike machine tool spindles and linear axes, there are few studies on thermal error modeling of rotary axes. For thermal error modeling of machine tool rotary axes, regression models and machine learning models are mostly used. For example, the optimal order of the thermal autoregressive model is automatically estimated through an adaptive algorithm to achieve thermal error modeling of machine tool rotary axes, or a thermal imager is used to obtain a thermal image of the rotary axis, and a prediction model is established by fitting the thermal error curve to a sine curve. Some researchers also use thermal power consumption to model the thermal error of the rotary axis by constructing a transfer function to establish a mapping between thermal effects and drive power consumption.

[0004] Existing rotating axis thermal error modeling methods have low accuracy. Traditional methods are difficult to adapt to changing operating conditions and cannot automatically determine the number of temperature sensitive points. There is also little research on the thermal positioning error of rotating axes. Summary of the invention

[0005] In view of the defects in the prior art, the purpose of the present invention is to provide a method and system for identifying thermal positioning errors of a rotating shaft based on a neural network.

[0006] A method for identifying thermal positioning errors of a rotating shaft based on a neural network is provided according to the present invention, comprising:

[0007] Step S1: Collect original temperature data and automatically determine the number of clusters;

[0008] Step S2: construct a random walk Laplace matrix and perform spectral clustering based on the number of clusters;

[0009] Step S3: construct an IndRNN deep learning neural network based on the results of spectral clustering;

[0010] Step S4: Establish a TPE-IndRNN model based on the IndRNN deep learning neural network;

[0011] Step S5: The TPE-IndRNN model uses the mean absolute error and the mean square error as evaluation indicators to complete the error identification of the thermal positioning of the rotating axis.

[0012] Preferably, step S1 includes the following sub-steps:

[0013] Step S1.1: Based on the original temperature data, construct a normalized Laplace matrix L:

[0014] L=D g -S;

[0015] Among them, D g is the degree matrix, S is the similarity matrix;

[0016] Step S1.2: Further construct the degree matrix D g And the similarity matrix S:

[0017]

[0018] Among them, Dist represents the adjacent distance under Euclidean distance, x i and x j Represent the eigenvectors of nodes i and j respectively, σ represents the Gaussian kernel, and the construction principle of the degree matrix is:

[0019]

[0020] Normalize the unnormalized Laplacian matrix Constructed as the normalized random walk Laplace matrix L rw , and obtain all its eigenvalues ​​and the eigenvectors corresponding to the eigenvalues; if the first k eigenvalues ​​λ of the graph Laplacian operator appear k is smaller than the preset range, but λ k+1 Greater than the preset range:

[0021]

[0022] Then k is the optimal number of clusters required.

[0023] Preferably, step S2 includes the following sub-steps:

[0024] Step S2.1: construct a random walk Laplace matrix and perform spectral clustering; use the obtained normalized random walk Laplace matrix and the number of clusters k as clustering input; construct a new eigenvector space V, use spectral clustering for the matrix V, and the clustering result of the matrix V is the clustering result of the initial temperature data;

[0025] Step S2.2: Screening temperature sensitive points based on Pearson product-moment correlation coefficient;

[0026] The Pearson product-moment correlation coefficient is used to measure the degree of correlation between the variables and thermal errors in each cluster. The expression of the Pearson product-moment correlation coefficient is:

[0027]

[0028] Among them, σ is the activation function; x i Represents each temperature series, y i Represents the thermal error sequence; the temperature sequence with the highest correlation coefficient is selected from each cluster and used as the temperature sensitive point.

[0029] Preferably, the IndRNN deep learning neural network is composed of multiple hidden layers spliced ​​together, and:

[0030] For an n-layer neural network, the hidden state of IndRNN is described as:

[0031] h n,t =o(w n x t +u n ⊙h n,t-1 +b n );

[0032] Among them, σ is the activation function; w n and u n They are the input weight and loop weight of the nth layer respectively; ⊙ represents the Hadamard product; each hidden state is only related to the current input x t and the hidden state h of the previous time step n,t-1 related to; n Represents the bias of the nth neuron.

[0033] Preferably, step S3 further includes performing hyperparameter optimization based on the TPE algorithm:

[0034] By building a probabilistic model to predict the performance of different hyperparameter configurations, the optimal hyperparameter combination can be selected;

[0035] Construct two probability distributions l(x) and g(x) to represent hyperparameter configurations with different performances, and update better hyperparameters by maximizing the following formula:

[0036]

[0037] Preferably, step S5 includes, in the model training part, using temperature data different from the training conditions as input, thermal error data as labels, using different feed speeds to verify the generalization of the TPE-IndRNN model, and using mean absolute error MAE and mean square error RMSE as evaluation indicators; the calculation formula of MAE in the verification part is:

[0038]

[0039] The calculation formula of RMSE is:

[0040]

[0041] Where n is the number of samples, is the regression model output, y i is the actual sample value.

[0042] A rotating shaft thermal positioning error identification system based on a neural network provided by the present invention comprises:

[0043] Module M1: collects the original temperature data and automatically determines the number of clusters;

[0044] Module M2: construct the random walk Laplace matrix and perform spectral clustering based on the number of clusters;

[0045] Module M3: Construct IndRNN deep learning neural network based on the results of spectral clustering;

[0046] Module M4: Establish TPE-IndRNN model based on IndRNN deep learning neural network;

[0047] Module M5: The TPE-IndRNN model uses mean absolute error and mean square error as evaluation indicators to complete the error identification of thermal positioning of the rotating axis.

[0048] Preferably, the module M1 includes the following submodules:

[0049] Module M1.1: Based on the original temperature data, construct a normalized Laplace matrix L:

[0050] L=D g -S;

[0051] Among them, D g is the degree matrix, S is the similarity matrix;

[0052] Module M1.2: Further construction of degree matrix D g And the similarity matrix S:

[0053]

[0054] Among them, Dist represents the adjacent distance under Euclidean distance, x i and x j Represent the eigenvectors of nodes i and j respectively, σ represents the Gaussian kernel, and the construction principle of the degree matrix is:

[0055]

[0056] Normalize the unnormalized Laplacian matrix Constructed as the normalized random walk Laplace matrix L rw , and obtain all its eigenvalues ​​and the eigenvectors corresponding to the eigenvalues; if the first k eigenvalues ​​λ of the graph Laplacian operator appear k is smaller than the preset range, but λ k+1 Greater than the preset range:

[0057]

[0058] Then k is the optimal number of clusters required.

[0059] Preferably, the module M2 includes the following submodules:

[0060] Module M2.1: Construct a random walk Laplace matrix and perform spectral clustering; use the obtained normalized random walk Laplace matrix and the number of clusters k as clustering input; construct a new eigenvector space V, use spectral clustering on the matrix V, and the clustering result of the matrix V is the clustering result of the initial temperature data;

[0061] Module M2.2: Screening of temperature sensitive points based on Pearson product-moment correlation coefficient;

[0062] The Pearson product-moment correlation coefficient is used to measure the degree of correlation between the variables and thermal errors in each cluster. The expression of the Pearson product-moment correlation coefficient is:

[0063]

[0064] Among them, x i Represents each temperature series, y i Represents the thermal error sequence; the temperature sequence with the highest correlation coefficient is selected from each cluster and used as the temperature sensitive point.

[0065] Preferably, the IndRNN deep learning neural network is composed of multiple hidden layers spliced ​​together, and:

[0066] For an n-layer neural network, the hidden state of IndRNN is described as:

[0067] h n,t =o(w n x t +u n ⊙h n,t-1 +b n );

[0068] Among them, σ is the activation function; w n and u n They are the input weight and loop weight of the nth layer respectively; ⊙ represents the Hadamard product; each hidden state is only related to the current input x t and the hidden state h of the previous time step n,t-1 related to; n Represents the bias of the nth neuron.

[0069] Preferably, the module M3 also includes performing hyperparameter optimization based on the TPE algorithm:

[0070] Predict the performance of different hyperparameter configurations by building a probabilistic model and select the optimal hyperparameter combination;

[0071] Construct two probability distributions l(x) and g(x) to represent hyperparameter configurations with different performances, and update better hyperparameters by maximizing the following formula:

[0072]

[0073] Preferably, the module M5 includes a model training part, using temperature data different from the training conditions as input, thermal error data as labels, using different feed speeds to verify the generalization of the TPE-IndRNN model, and using mean absolute error MAE and mean square error RMSE as evaluation indicators; the calculation formula of MAE in the verification part is:

[0074]

[0075] The calculation formula of RMSE is:

[0076]

[0077] Where n is the number of samples, is the regression model output, y i is the actual sample value.

[0078] Compared with the prior art, the present invention has the following beneficial effects:

[0079] 1. The temperature sensitive point selection strategy based on graph theory of the present invention can automatically determine the optimal number of clusters, avoiding the uncertainty caused by human intervention, and can also screen temperature sensitive points without relying on expert experience.

[0080] 2. The present invention adopts a combination of spectral clustering and correlation analysis to screen the optimal result in each cluster as the optimal temperature sensitive point. The spectral clustering algorithm can accelerate the clustering process by constructing a new feature vector space. In addition, compared with directly performing K-means clustering on the original data, spectral clustering is more robust and the consistency of the results is better.

[0081] 3. Compared with traditional neural network methods such as LSTM, GRU, BiLSTM, etc., the TPE-IndRNN algorithm of the present invention has the advantages of strong robustness, good generalization, strong nonlinear fitting ability and high prediction accuracy, and can better adapt to complex working conditions.

[0082] Other beneficial effects of the present invention will be explained in the specific implementation manner through the introduction of specific technical features and technical solutions. Through the introduction of these technical features and technical solutions, those skilled in the art should be able to understand the beneficial technical effects brought about by the technical features and technical solutions. BRIEF DESCRIPTION OF THE DRAWINGS

[0083] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0084] Figure 1 The present invention is a flow chart of the method.

[0085] Figure 2 A diagram of the instrumentation and machine tool configuration used for testing the present invention.

[0086] Figure 3 A further explanation diagram of the thermal error of the rotating shaft of the present invention.

[0087] Figure 4 This is a diagram of thermal positioning error under variable working conditions of the present invention.

[0088] Figure 5 This is a temperature sensor data diagram of the present invention.

[0089] Figure 6 It is the normalized Laplace matrix eigenvalue diagram of the present invention.

[0090] Figure 7 Comparison chart of the IndRNN model designed for the present invention and the traditional RNN model.

[0091] Figure 8It is a fitting diagram of the thermal positioning error of the rotating shaft of the present invention under different working conditions and different modeling models.

[0092] Fig. 9 It is a multivariate linear regression (MLR) thermal positioning error fitting diagram under a single working condition of the present invention.

[0093] Fig.10 These are the prediction graphs and residual graphs of different modeling models under variable operating conditions of the present invention. DETAILED DESCRIPTION

[0094] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.

[0095] Reference Figure 1 and Figure 3 As shown, a method for identifying thermal positioning errors of a rotating shaft based on a neural network comprises the following steps:

[0096] Step A, automatically determine the optimal number of clusters;

[0097] The specific calculation steps are as follows:

[0098] A1. Based on the original temperature data, a normalized Laplace matrix L is constructed. The principle is:

[0099] L=D g -S;

[0100] A2. According to the above formula, we need to further construct the degree matrix D g And the similarity matrix S, the construction principle of the similarity matrix is:

[0101]

[0102]

[0103] Among them, Dist represents the adjacent distance under Euclidean distance, x i and x j Represent the eigenvectors of nodes i and j respectively. The construction principle of the degree matrix is:

[0104]

[0105] Normalize the unnormalized Laplacian matrix Constructed as the normalized random walk Laplace matrix L rw, and obtain all its eigenvalues ​​and the eigenvectors corresponding to the eigenvalues. If the first k eigenvalues ​​λ of the graph Laplacian operator appear k Small enough, but k+1 Relatively large:

[0106] λ1,λ2,…,λ k ≈0;

[0107] λ k+1 >>λ k

[0108] Then k is the optimal number of clusters required.

[0109] Step B, constructing a random walk Laplacian matrix and performing spectral clustering;

[0110] The obtained normalized random walk Laplace matrix and the number of clusters k are used as clustering inputs. A new eigenvector space V is constructed, and then the spectral clustering method is used for the matrix V. The clustering result of the matrix V is the clustering result of the initial temperature data. The above process is the complete process of spectral clustering.

[0111] Step C, screening temperature sensitive points based on Pearson product-moment correlation coefficient;

[0112] The Pearson product-moment correlation coefficient is used to measure the degree of correlation between the variables and thermal errors in each cluster. The expression of the Pearson product-moment correlation coefficient is as follows:

[0113]

[0114] Among them, x i Represents each temperature series, y i Represents the thermal error sequence. The temperature sequence with the highest correlation coefficient is selected from each cluster as the temperature sensitive point.

[0115] Step D: Construct IndRNN deep learning neural network;

[0116] Build the IndRNN deep learning framework. IndRNN avoids the existence of gate structures and can improve the speed in parallel. For an n-layer neural network, the hidden state of IndRNN can be described as:

[0117] h n,t =σ(w n x t +u n ☉h n,t-1 +b n );

[0118] Among them, σ is the activation function; w n and u nare the input weight and loop weight of the nth layer respectively. ⊙ represents the Hadamard product, which means that the weights of each layer are independent. Each hidden state is only related to the current input x t and the hidden state h of the previous time step n,t-1 related to; n Represents the bias of the nth neuron.

[0119] Step E: Optimize hyperparameters based on TPE algorithm;

[0120] The TPE hyperparameter optimization algorithm is used to predict the performance of different hyperparameter configurations by building a probability model, and then select the optimal hyperparameter combination. It needs to build two probability distributions l(x) and g(x) to represent the hyperparameter configurations with better and worse performance respectively, and update the better hyperparameters by maximizing the following formula:

[0121]

[0122] Step F: Implement the TPE-IndRNN model using Python, including the establishment, training, and verification of the TPE-IndRNN model.

[0123] In the model verification part, a feed speed different from the training condition is used to verify the generalization of the TPE-IndRNN model, and the mean absolute error (MAE) and mean square error (RMSE) are used as evaluation indicators; the calculation formula of MAE in the verification part is:

[0124]

[0125] The calculation formula of RMSE is:

[0126]

[0127] Where n is the number of samples, is the regression model output, y i is the actual sample value.

[0128] The temperature sensitive point selection strategy based on graph theory of the present invention can automatically determine the optimal number of clusters, avoiding the uncertainty caused by human intervention, and can also screen temperature sensitive points without relying on expert experience. The optimal result in each cluster is screened as the optimal temperature sensitive point by combining spectral clustering and correlation analysis. The spectral clustering algorithm can accelerate the clustering process by constructing a new feature vector space. In addition, compared with directly performing K-means clustering on the original data, spectral clustering is more robust and the consistency of the results is better. Compared with traditional neural network methods such as LSTM, GRU, BiLSTM, etc., the TPE-IndRNN algorithm has the advantages of strong robustness, good generalization, strong nonlinear fitting ability and high prediction accuracy, and can better adapt to complex working conditions.

[0129] The above is a basic embodiment of the present invention. The technical solution of the present invention is further described below through a preferred embodiment.

[0130] Example 1

[0131] The TPE-IndRNN CNC machine tool rotating axis thermal positioning error modeling method based on deep learning involved in the present invention is mainly used to predict the thermal error generated during the machine tool processing process, and improve the processing accuracy and real-time compensation.

[0132] 1. The specific steps of thermal error modeling and prediction method based on deep learning TPE-IndRNN algorithm in this example include:

[0133] Step A: Based on the original temperature data, a normalized Laplace matrix L is constructed. The first eigenvalue of the graph Laplace matrix can express the geometric invariance of the graph, and its principle is:

[0134] L=D g -S;

[0135] Among them, according to the above formula, we need to further construct the degree matrix D g And the similarity matrix S, the construction principle of the similarity matrix is:

[0136]

[0137]

[0138] Where Dist represents the adjacent distance under Euclidean distance. In this example, the Gaussian kernel σ=1 is used to construct the similarity matrix S. Then the degree matrix is ​​constructed. The construction principle of the degree matrix is:

[0139]

[0140] Furthermore, the unnormalized Laplace matrix is ​​normalized, and the normalization process is:

[0141]

[0142] The above formula is used to construct the normalized random walk Laplace matrix L rw . And obtain all its eigenvalues ​​and the eigenvectors corresponding to the eigenvalues. If the first k eigenvalues ​​λ of the graph Laplacian operator appear k Small enough, but k+1 Relatively large:

[0143]

[0144] Then k is the optimal number of clusters required. The above steps are used to determine the optimal number of clusters k.

[0145] Reference Figure 5 As shown, the temperature data with a dimension of [16,10800] is used as input information, and the adjacency distance is solved to construct the adjacency matrix. Figure 6 As shown in , the dimension of the final output normalized random walk Laplacian matrix is ​​[16,16]. Its eigenvalues ​​are Figure 6 As shown in the figure, we can see that λ1,…,λ8≈0,λ9>>λ8, so the optimal number of clusters selected is 9.

[0146] Step B: Use the normalized random walk Laplace matrix and the number of clusters k obtained in the previous section as the input of clustering. Construct a new eigenvector space V, which consists of the eigenvectors corresponding to the minimum eigenvalues ​​of the normalized random walk Laplace matrix. Then, use spectral clustering on the matrix V. The clustering result of the matrix V is the clustering result of the initial temperature data. The above process is the complete process of spectral clustering.

[0147] Step C: The Pearson product-moment correlation coefficient is used to measure the degree of correlation between the variables in each cluster and the thermal error. The expression of the Pearson product-moment correlation coefficient is as follows:

[0148]

[0149] Among them, x i Represents each temperature series, y i Represents the thermal error sequence. The temperature sequence with the highest correlation coefficient is selected from each cluster as the temperature sensitive point. That is, the number of temperature sensors involved in the modeling is 9, and all of them have the highest correlation coefficient in each cluster.

[0150] Step D: Then build the IndRNN deep learning framework. IndRNN avoids the existence of gate structure and can improve the speed in parallel. For an n-layer neural network, the hidden state of IndRNN can be described as:

[0151] h n,t =σ(w n x t +u n ☉h n,t-1 +b n );

[0152] Reference Figure 7 As shown, where w n and u n are the input weight and loop weight of the nth layer respectively. ⊙ represents the Hadamard product, which means that the weights of each layer are independent. Each hidden state is only related to the current input x t and the hidden state h of the previous time step n,t-1 This means that IndRNN can better handle long sequences and can use non-saturated activation functions such as ReLU. To better illustrate the advantages of the IndRNN model, Figure 7 A comparison chart of IndRNN and traditional RNN neural network models is given.

[0153] Step E: In the model training part, the TPE hyperparameter optimization algorithm is used to predict the performance of different hyperparameter configurations by building a probability model, and then select the optimal hyperparameter combination. It needs to build two probability distributions l(x) and g(x) to represent the hyperparameter configurations with better and worse performance respectively, and update the better hyperparameters by maximizing the following formula:

[0154]

[0155] In the model verification part, a feed speed different from the training condition is used to verify the generalization of the TPE-IndRNN model, and the mean absolute error (MAE) and mean square error (RMSE) are used as evaluation indicators; the calculation formula of MAE in the verification part is:

[0156]

[0157] The calculation formula of RMSE is:

[0158]

[0159] Where n is the number of samples, is the regression model output, y i is the actual sample value.

[0160] 2. Case Study:

[0161] Reference Figure 2The equipment used is shown in the figure. This study takes the C-axis of the DMU five-axis machine tool as the research object, and uses a laser interferometer to measure the thermal positioning error of the rotating axis under different working conditions. Three complete thermal machine processes were measured, which were 1440deg / min, 2160deg / min and 2880deg / min. Two working conditions were used in modeling, and working condition data different from that used in modeling were used in prediction to verify the generalization ability of the model. Figure 4 The figure shows the thermal error measurement results. According to the experimental results, after a three-hour thermal cycle test, the thermal positioning error of the rotary axis ε CC The error range is [0,45μrad], and as the working load increases, the maximum value of the thermal error also increases. A total of 16 temperature sensors are arranged on the C-axis turntable and the surrounding temperature rise area. Taking the working condition of 2160deg / min as an example, the temperature measurement results are as follows Figure 5 shown.

[0162] Then, the temperature sensitive points are screened according to the collected data. Figure 5 The temperature data with the dimension [16,10800] shown in the figure is used as input information, and the adjacency distance is solved to construct the adjacency matrix. The dimension of the final output normalized random walk Laplace matrix is ​​[16,16]. Its eigenvalues ​​are as follows Figure 6 As shown in the figure, it can be seen that λ1,…,λ8≈0,λ9>>λ8, so the optimal number of clusters selected is 9. The obtained normalized random walk Laplace matrix and the number of clusters k are used as clustering input. A new eigenvector space is constructed, which is composed of the eigenvectors corresponding to the minimum eigenvalue of the normalized random walk Laplace matrix. That is, the matrix dimension of the eigenvector is The original temperature input data [16, 10800] is reduced in dimension and features are extracted to [16, 9]. Then, spectral clustering is used to cluster the matrix V. The clustering result of the matrix V is the clustering result of the initial temperature data.

[0163] According to step D, the network model is established, and the above model is built using Python language and Pytorch framework. The input of the model is 9-channel temperature data, and the output is thermal localization error data. Set the multi-layer IndRNN mode and use the fully connected weights to process the input time series. Finally, it is mapped to thermal error data through the convolution layer. The Adam optimizer is used to update the loss function, and the loss function uses the MSE loss commonly used for regression problems. Then, according to the TPE hyperparameter optimization algorithm in step E, the performance of different hyperparameter configurations is predicted by building a probability model, and then the optimal hyperparameter combination is selected. First, the hyperparameter optimization space is defined, and the following hyperparameters are optimized: learning rate, number of network layers, hidden layer size, single time step, and batch size. Then, the Bayesian model is used to estimate the relationship between hyperparameters and model performance and update the direction of hyperparameter optimization. The optimization process iterates 200 times to find the optimal model. The optimized results are: learning rate 0.001, number of loop layers 1, hidden layers 18, time step 240, batch size 512.

[0164] The length of the temperature data selected by spectral clustering and correlation analysis is [10800,9]. The thermal error data is linearly interpolated to make the thermal error data and the temperature data have the same dimension. That is, the dimension of the input matrix is ​​[10800,10]. During training, the temperature data is used as input and the thermal error data is used as labels. The input data is preprocessed and divided into small batches. The input of each small batch is [time step, batch size, input dimension (240,512,9)], and the dimension entering the hidden layer is [240,512,18]. After that, an independent (Ind) recurrent process is performed for the input of a single time step, and the dimension is [512,18]. The output of the hidden layer is the hidden state of the last time step [240,512,18]. The output of the hidden layer is batch normalized to accelerate model training and convergence. Finally, it is mapped to the thermal error data [512,1] through the convolution layer.

[0165] In order to verify the modeling and prediction accuracy of the proposed TPE-IndRNN model, the experimental data was used for modeling. In order to further verify the performance of the model, it was compared with different models, namely MLR, LSTM, TPE-GRU and TPE-BiLSTM. The data of the rotating shaft thermal cycle conditions of 1440deg / min and 2880deg / min were used to train and establish the neural network model. Since the MLR model cannot be trained under different working conditions, the data of the 2880deg / min working condition was used to train it. The neural network modeling results are shown in Figure 2. Figure 8 The MLR modeling results are shown in Fig. 9 As shown, the formula is as follows:

[0166] y=-75.0T1+17.9T2+72.0T8-58.1T9+45.7T 14 +5.1T 16 -0.3;

[0167] T1 to T16 represent the temperature measurement points. From the modeling results, it can be seen that the model fitting ability after training has a good effect. In order to verify the generalization ability and robustness of the model, the data of the thermal engine condition 2160deg / min is used for prediction. Fig. 9 This is the prediction result under the rotating shaft thermal cycle condition of 2160deg / min, which reflects the prediction ability and generalization ability of the model under conditions different from the modeling conditions. In order to visualize and intuitively predict the effect, Fig.10 The residual distribution of each model is shown. It can be seen from the figure that MLR cannot predict thermal errors under variable working conditions. Since LSTM and GRU have similar performance, the prediction results are better after hyperparameter optimization. However, all comparison models are inferior to the prediction accuracy of IndRNN. This shows that the IndRNN proposed in this study can not only fit the thermal error well during the training process, but also accurately predict the change of thermal error under variable working conditions. It has better prediction ability and generalization ability.

[0168] Table 1 gives the specific values. From the data in Table 1, it can be seen that the IndRNN model proposed in this study has the best prediction ability and the smallest mean absolute error. It should be noted that due to the different hyperparameters of different training models, it is impossible to compare the training time under the same conditions. According to existing literature, IndRNN has no gate structure, and can perform parallel operations. For time series with lengths of 256, 512, and 1024. A single-layer IndRNN is 4.3, 7.6, and 12.9 times faster than a single-layer LSTM.

[0169] Table 1 Comparison of prediction indicators of different models

[0170]

[0171] By comparing the prediction curve of the IndRNN neural network model with the prediction curve of the comparative neural network, and analyzing Table 1, it can be obtained that the IndRNN model has higher prediction ability and smaller maximum residual error and MAE, so IndRNN has higher prediction accuracy and generalization ability than traditional models such as MLR, LSTM, GRU, and BiLSTM.

[0172] Conclusion

[0173] This study proposed a thermal error modeling method for the rotary axis of a five-axis machine tool. First, the automatic screening of temperature sensitive points was achieved by constructing a graph Laplacian matrix and spectral clustering. The randomness and uncertainty of artificially determining temperature sensitive points were avoided. Then, the IndRNN model was constructed based on deep learning, and the hyperparameters of the neural network were optimized by TPE. Finally, by comparing with the MLR, LSTM, TPE-GRU and BiLSTM models, the prediction accuracy of the TPE-IndRNN model and its generalization ability under variable working conditions were demonstrated. The main conclusions are as follows:

[0174] 1. Construct the graph Laplacian matrix and use spectral clustering to screen temperature sensitive points. The number of sensitive points can be automatically determined and clustered, avoiding the randomness and uncertainty of manual screening.

[0175] 2. Compared with traditional LSTM, GRU and other models, the IndRNN model used can be trained in parallel and has a faster training speed.

[0176] 3. The IndRNN model used has been proven to be able to handle longer time series. It also has better generalization capabilities under variable operating conditions and higher prediction accuracy.

[0177] The present invention also provides a rotating shaft thermal positioning error identification system based on a neural network. The rotating shaft thermal positioning error identification system based on a neural network can be implemented by executing the process steps of the rotating shaft thermal positioning error identification method based on a neural network, that is, those skilled in the art can understand the rotating shaft thermal positioning error identification method based on a neural network as a preferred implementation of the rotating shaft thermal positioning error identification system based on a neural network.

[0178] Specifically, a rotating axis thermal positioning error identification system based on a neural network includes:

[0179] Module M1: collects the original temperature data and automatically determines the number of clusters;

[0180] Module M2: construct the random walk Laplace matrix and perform spectral clustering based on the number of clusters;

[0181] Module M3: Construct IndRNN deep learning neural network based on the results of spectral clustering;

[0182] Module M4: Establish TPE-IndRNN model based on IndRNN deep learning neural network;

[0183] Module M5: The TPE-IndRNN model uses mean absolute error and mean square error as evaluation indicators to complete the error identification of thermal positioning of the rotating axis.

[0184] The module M1 includes the following submodules:

[0185] Module M1.1: Based on the original temperature data, it is constructed into a normalized Laplace matrix L:

[0186]

[0187] Among them, D g is the degree matrix, S is the similarity matrix;

[0188] Module M1.2: Further construction of degree matrix D g And the similarity matrix S:

[0189]

[0190] Among them, Dist represents the adjacent distance under Euclidean distance, x i and x j Represent the eigenvectors of nodes i and j respectively, σ represents the Gaussian kernel, and the construction principle of the degree matrix is:

[0191]

[0192] Normalize the unnormalized Laplacian matrix Constructed as the normalized random walk Laplace matrix L rw , and obtain all its eigenvalues ​​and the eigenvectors corresponding to the eigenvalues; if the first k eigenvalues ​​λ of the graph Laplacian operator appear k is smaller than the preset range, but λ k+1 Greater than the preset range:

[0193]

[0194] Then k is the optimal number of clusters required.

[0195] The module M2 includes the following submodules:

[0196] Module M2.1: Construct a random walk Laplace matrix and perform spectral clustering; use the obtained normalized random walk Laplace matrix and the number of clusters k as clustering input; construct a new eigenvector space V, use spectral clustering on the matrix V, and the clustering result of the matrix V is the clustering result of the initial temperature data;

[0197] Module M2.2: Screening of temperature sensitive points based on Pearson product-moment correlation coefficient;

[0198] The Pearson product-moment correlation coefficient is used to measure the degree of correlation between the variables and thermal errors in each cluster. The expression of the Pearson product-moment correlation coefficient is:

[0199]

[0200] Among them, x i Represents each temperature series, y i Represents the thermal error sequence; the temperature sequence with the highest correlation coefficient is selected from each cluster and used as the temperature sensitive point.

[0201] The IndRNN deep learning neural network is composed of multiple hidden layers spliced ​​together, and:

[0202] For an n-layer neural network, the hidden state of IndRNN is described as:

[0203] h n,t =σ(w n x t +u n ⊙h n,t-1 +b n );

[0204] Among them, σ is the activation function; w n and u n They are the input weight and loop weight of the nth layer respectively; ⊙ represents the Hadamard product; each hidden state is only related to the current input x t and the hidden state h of the previous time step n,t-1 related to; n Represents the bias of the nth neuron.

[0205] The module M3 also includes hyperparameter optimization based on the TPE algorithm:

[0206] Predict the performance of different hyperparameter configurations by building a probabilistic model and select the optimal hyperparameter combination;

[0207] Construct two probability distributions l(x) and g(x) to represent hyperparameter configurations with different performances, and update better hyperparameters by maximizing the following formula:

[0208]

[0209] The module M5 includes a model training part, using temperature data different from the training conditions as input, thermal error data as labels, using different feed speeds to verify the generalization of the TPE-IndRNN model, and using mean absolute error MAE and mean square error RMSE as evaluation indicators; the calculation formula of MAE in the verification part is:

[0210]

[0211] The calculation formula of RMSE is:

[0212]

[0213] Where n is the number of samples, is the regression model output, y i is the actual sample value.

[0214] Those skilled in the art know that, in addition to realizing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code, it is entirely possible to realize the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be regarded as structures within the hardware component; the devices, modules, and units for realizing various functions can also be regarded as both software modules for realizing the method and structures within the hardware component.

[0215] In the description of the present application, it should be understood that the terms "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.

[0216] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.

Claims

1. A method for identifying thermal positioning errors of a rotating axis based on a neural network, characterized in that: include: Step S1: Collect original temperature data and automatically determine the number of clusters; Step S2: construct a random walk Laplace matrix and perform spectral clustering based on the number of clusters; Step S3: construct an IndRNN deep learning neural network based on the results of spectral clustering; Step S4: Establish a TPE-IndRNN model based on the IndRNN deep learning neural network; Step S5: The TPE-IndRNN model uses the mean absolute error and the mean square error as evaluation indicators to complete the error identification of the thermal positioning of the rotating axis.

2. The method for identifying thermal positioning errors of a rotating shaft based on a neural network according to claim 1, characterized in that: The step S1 comprises the following sub-steps: Step S1.1: Based on the original temperature data, construct a normalized Laplace matrix L: L=D g -S; Among them, D g is the degree matrix, S is the similarity matrix; Step S1.2: Further construct the degree matrix D g And the similarity matrix S: Among them, Dist represents the adjacent distance under Euclidean distance, x i and x j Represent the eigenvectors of nodes i and j respectively, σ represents the Gaussian kernel, and the construction principle of the degree matrix is: Normalize the unnormalized Laplacian matrix Constructed as the normalized random walk Laplace matrix L rw , and obtain all its eigenvalues ​​and the eigenvectors corresponding to the eigenvalues; if the first k eigenvalues ​​λ of the graph Laplacian operator appear k is smaller than the preset range, but λ k+1 Greater than the preset range: Then k is the optimal number of clusters required.

3. The method for identifying thermal positioning errors of a rotating shaft based on a neural network according to claim 2, characterized in that: The step S2 comprises the following sub-steps: Step S2.1: construct a random walk Laplace matrix and perform spectral clustering; use the obtained normalized random walk Laplace matrix and the number of clusters k as clustering input; construct a new eigenvector space V, use spectral clustering for the matrix V, and the clustering result of the matrix V is the clustering result of the initial temperature data; Step S2.2: Screening temperature sensitive points based on Pearson product-moment correlation coefficient; The Pearson product-moment correlation coefficient is used to measure the degree of correlation between the variables and thermal errors in each cluster. The expression of the Pearson product-moment correlation coefficient is: Among them, x i Represents each temperature series, y i Represents the thermal error sequence; the temperature sequence with the highest correlation coefficient is selected from each cluster and used as the temperature sensitive point.

4. The method for identifying thermal positioning errors of a rotating shaft based on a neural network according to claim 1, characterized in that: The IndRNN deep learning neural network is composed of multiple hidden layers spliced ​​together, and: For an n-layer neural network, the hidden state of IndRNN is described as: h n,t =σ(w b x e +u n ⊙h n,t-1 +b b ); Among them, σ is the activation function; w n and u n They are the input weight and loop weight of the nth layer respectively; ⊙ represents the Hadamard product; each hidden state is only related to the current input x t and the hidden state h of the previous time step n,t-1 related to; n Represents the bias of the nth neuron.

5. The method for identifying thermal positioning errors of a rotating shaft based on a neural network according to claim 4, characterized in that: The step S3 also includes performing hyperparameter optimization based on the TPE algorithm: By building a probabilistic model to predict the performance of different hyperparameter configurations, the optimal hyperparameter combination can be selected; Construct two probability distributions l(x) and g(x) to represent hyperparameter configurations with different performances, and update better hyperparameters by maximizing the following formula:

6. The method for identifying thermal positioning errors of a rotating shaft based on a neural network according to claim 5, characterized in that: The step S5 includes, in the model training part, using temperature data different from the training conditions as input, thermal error data as labels, using different feed speeds to verify the generalization of the TPE-IndRNN model, and using mean absolute error MAE and mean square error RMSE as evaluation indicators; the calculation formula of MAE in the verification part is: The calculation formula of RMSE is: Where n is the number of samples, is the regression model output, y i is the actual sample value.

7. A rotating axis thermal positioning error identification system based on neural network, characterized in that: include: Module M1: collects the original temperature data and automatically determines the number of clusters; Module M2: construct the random walk Laplace matrix and perform spectral clustering based on the number of clusters; Module M3: Construct IndRNN deep learning neural network based on the results of spectral clustering; Module M4: Establish TPE-IndRNN model based on IndRNN deep learning neural network; Module M5: The TPE-IndRNN model uses mean absolute error and mean square error as evaluation indicators to complete the error identification of thermal positioning of the rotating axis.

8. The neural network-based rotating shaft thermal positioning error identification system according to claim 7, characterized in that: The module M1 includes the following submodules: Module M1.1: Based on the original temperature data, construct a normalized Laplace matrix L: L=D g -S; Among them, D g is the degree matrix, S is the similarity matrix; Module M1.2: Further construction of degree matrix D g And the similarity matrix S: Among them, Dist represents the adjacent distance under Euclidean distance, x i and x j Represent the eigenvectors of nodes i and j respectively, σ represents the Gaussian kernel, and the construction principle of the degree matrix is: Normalize the unnormalized Laplacian matrix Constructed as the normalized random walk Laplace matrix L rw , and obtain all its eigenvalues ​​and the eigenvectors corresponding to the eigenvalues; if the first k eigenvalues ​​λ of the graph Laplacian operator appear k is smaller than the preset range, but λ k+1 Greater than the preset range: Then k is the optimal number of clusters required.

9. The neural network-based rotating shaft thermal positioning error identification system according to claim 8, characterized in that: The module M2 Includes the following submodules: Module M2.1: Construct a random walk Laplace matrix and perform spectral clustering; use the obtained normalized random walk Laplace matrix and the number of clusters k as clustering input; construct a new eigenvector space V, use spectral clustering on the matrix V, and the clustering result of the matrix V is the clustering result of the initial temperature data; Module M2.2: Screening of temperature sensitive points based on Pearson product-moment correlation coefficient; The Pearson product-moment correlation coefficient is used to measure the degree of correlation between the variables and thermal errors in each cluster. The expression of the Pearson product-moment correlation coefficient is: Among them, x i Represents each temperature series, y i Represents the thermal error sequence; the temperature sequence with the highest correlation coefficient is selected from each cluster and used as the temperature sensitive point.

10. The neural network-based rotating shaft thermal positioning error identification system according to claim 7, characterized in that: The IndRNN deep learning neural network is composed of multiple hidden layers spliced ​​together, and: For an n-layer neural network, the hidden state of IndRNN is described as: h n,t =σ(w n x t +u n ⊙h n,t-1 +b n ); Among them, σ is the activation function; w n and u n They are the input weight and loop weight of the nth layer respectively; ⊙ represents the Hadamard product; each hidden state is only related to the current input x t and the hidden state h of the previous time step n,t-1 Related to; n Represents the bias of the nth neuron.

Citation Information

Patent Citations

  • MSTGCN-A thermal error modeling prediction method and system based on deep learning

    CN116882289A