Method for predicting thermal error of high-speed motorized spindle

By introducing the IFAOA algorithm to optimize the GRU network, the problems of high computational complexity and insufficient prediction accuracy in the prediction of electrical spindle thermal error are solved, and higher thermal error prediction accuracy and robustness are achieved, which is suitable for the precise control of thermal errors of high-speed electrical spindles.

CN120579155APending Publication Date: 2025-09-02HARBIN UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510532604.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2025-09-02

AI Technical Summary

Technical Problem

The existing GRU network has high computational complexity, slow training speed, and insufficient prediction accuracy, making it difficult to effectively control thermal errors.

Method used

The information fusion average optimization algorithm (IFAOA) was introduced to improve the GRU network, optimize the temperature measurement points through K-mean clustering and Pearson coefficient method, and combine the GRU neural network to optimize its parameters to improve prediction accuracy and robustness.

Benefits of technology

It achieves higher thermal error prediction accuracy and better robustness, reduces computational complexity, and improves the prediction performance and stability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120579155A_ABST
    Figure CN120579155A_ABST
Patent Text Reader

Abstract

The invention discloses a high-speed motorized spindle thermal error prediction method, and belongs to the technical field of high-speed motorized spindles. Comprising the following steps: S3, setting the number of layers of the GRU neural network and the number of neurons in each layer; s4, inputting training set data, setting the maximum population number, and generating an initial population; s5, optimizing the GRU neural network through an information fusion average optimization algorithm; s6, importing the test set into the GRU neural network model optimized by the information fusion average optimization algorithm, training, and predicting the test set; s7, taking an error between a prediction result of the GRU neural network model and a true value, precision, a decision coefficient, a mean absolute error and a root-mean-square error as prediction evaluation indexes; and S8, evaluating the performance and prediction accuracy of the optimized GRU neural network model by calculating a prediction evaluation index between a prediction result and a true value. Compared with an original GRU thermal error prediction model, the IFAOA-GRU thermal error prediction model provided by the invention has higher thermal error prediction precision and better robustness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of high-speed electric spindles, and particularly relates to a method for predicting thermal errors of high-speed electric spindles. Background Art

[0002] High-speed electric spindles are a key factor affecting machine tool machining accuracy and efficiency. Due to their compact internal structure and poor heat dissipation, they are prone to rapid temperature increase during long-term operation, leading to severe thermal deformation. Research has shown that thermal errors in electric spindles can account for up to 70% of total machine tool errors. Therefore, controlling thermal errors has become a core task for improving machine tool accuracy. Currently, the main methods for addressing thermal errors include prevention, control, and compensation. Prevention and control methods focus on reducing thermal errors, but their effectiveness for errors that have already occurred is limited. Compensation methods, however, are widely used because they can effectively address existing errors by predicting thermal errors and implementing corresponding compensation strategies. The effectiveness of compensation methods directly depends on the accuracy of the prediction model.

[0003] As a simplified version of LSTM, the Gated Recurrent Unit (GRU) network has lower computational complexity and faster training speed. Although its ability to capture long-term dependencies is slightly weaker, this problem is alleviated by combining it with the Information Fusion Average Optimization Algorithm (IFAOA). This allows for more efficient adjustment of the parameters of the gated unit, improving model performance and making it particularly suitable for thermal error prediction.

[0004] Although GRU performs well in information processing, the calculation of its gating units and state vectors is still relatively complex. Summary of the Invention

[0005] In order to further optimize the structure and provide a method for thermal error prediction of a high-speed electric spindle, the present invention introduces the IFAOA algorithm to improve the GRU, and on this basis establishes an IFAOA-GRU electric spindle thermal error prediction model, which can reduce the complexity of the calculation and improve the thermal error prediction accuracy.

[0006] The technical solution adopted by the present invention is:

[0007] A method for predicting thermal errors of a high-speed electric spindle, characterized by comprising the following steps:

[0008] S1: Build an experimental platform, arrange temperature and displacement measurement points, and obtain real-time temperature data and thermal displacement data of the electric spindle at multiple positions at different speeds;

[0009] S2: The data of multiple temperature measurement points obtained in S1 are optimized into four optimal measurement points using K-means clustering and Pearson coefficient method;

[0010] S3: According to the experiment, set the number of layers and the number of neurons in each layer of the GRU neural network, and initialize the weight parameters, threshold parameters and hidden state values;

[0011] S4: Input the training set data, set the maximum population size, and randomly generate information individuals as the initial population; each information individual represents a set of GRU neural network parameters, and start optimizing the gated unit neural network parameters; and set the termination condition, that is, the maximum number of iterations;

[0012] S5: Optimize the GRU neural network through the information fusion average optimization algorithm;

[0013] S6: Import the test set into the GRU neural network model optimized by the information fusion average optimization algorithm, use the training set to train the GRU neural network model optimized by the information fusion average optimization algorithm, and make predictions on the test set;

[0014] S7: The error, accuracy, coefficient of determination, mean absolute error and root mean square error between the prediction results of the GRU neural network model and the true value are used as prediction evaluation indicators;

[0015] S8: Evaluate the performance and prediction accuracy of the optimized GRU neural network model by calculating the prediction evaluation index between the prediction results and the true value.

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

[0017] The present invention proposes a new GRU optimization scheme, which can be applied to the field of electric spindle thermal error modeling; the IFAOA-GRU thermal error prediction model proposed in the present invention has higher thermal error prediction accuracy and better robustness than the original GRU thermal error prediction model. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 This is a simplified diagram of the GRU neural network structure process;

[0019] Figure 2 It is the flow chart of the information fusion average optimization algorithm;

[0020] Figure 3 This is a diagram of the process of optimizing the GRU neural network using the information fusion average optimization algorithm;

[0021] Figure 4 This is a schematic diagram of the temperature measurement point distribution on the test bench. DETAILED DESCRIPTION

[0022] In order to better understand the purpose, structure and function of the present invention, the present invention is further described in detail below with reference to the accompanying drawings.

[0023] The method provided by the present invention is a new method for modeling thermal errors of an electric spindle based on an information fusion average optimization algorithm to optimize a gated recurrent unit neural network.

[0024] Taking the electric spindle speed, temperature, and thermal elongation at 4000 rpm as data, and predicting the thermal elongation at 2000 rpm and 6000 rpm as an example, the IFAOA-optimized GRU neural network spindle thermal error modeling method includes the following steps:

[0025] (1) Build the experimental platform and arrange the temperature and displacement measurement points. The detailed locations are shown in Table 1 and Figure 4 As shown (where 1 is the T1 measurement point, 2 is the T2 measurement point, 3 is the T3 measurement point, 4 is the T4 measurement point, 5 is the T5 measurement point, 6 is the T6 measurement point, 7 is the T7 measurement point, 8 is the T8 measurement point, 9 is the T9 measurement point, and 10 is the T10 measurement point),

[0026] The real-time temperature data and spindle thermal displacement data are obtained at speeds of 2000 rpm, 4000 rpm, and 6000 rpm respectively.

[0027] Table 1 Measurement point code and deployment location details

[0028]

[0029]

[0030] (2): The data of the 10 temperature measurement points obtained in step 1 are optimized into 4 optimal measurement points using K-means clustering and Pearson coefficient method, which effectively reduces the covariance and correlation between temperature variables, thereby improving the accuracy of the subsequent prediction model;

[0031] (3): According to the experiment, set the number of layers and the number of neurons in each layer of the GRU neural network, and initialize the weight parameters, threshold parameters and hidden state values;

[0032] (4): Input the training set data, set the maximum population size, and randomly generate information individuals as the initial population; each information individual represents a set of GRU neural network parameters, and start optimizing the gated unit neural network parameters; and set the termination optimization condition, that is, the maximum number of iterations.

[0033] (5): Calculate the fitness function of each information individual, evaluate the information solution according to the fitness function, and select the optimal information solution, the suboptimal information solution, and the worst information solution respectively.

[0034] (6): Then randomly select three information solutions to perform the update rule phase, use the mean rule (MR) to create new information from the selected six information solutions, and add the convergence acceleration part (CA) to the update rule operator to improve the global search capability, and finally obtain two information;

[0035] (7): In the information fusion stage, the two pieces of information obtained in step 6 are fused to obtain an optimized new information;

[0036] (8): Enter the local search phase, add the local search rules to the optimized new information obtained in step 7 to avoid the phenomenon of local optimal solution;

[0037] (9): Determine whether the maximum number of information has been reached. If so, determine whether the maximum number of iterations has been reached. Otherwise, proceed to step 6 again. Determine whether the algorithm has reached the maximum number of iterations. If so, output the global optimal information and obtain the optimal parameters of GRU. Otherwise, proceed to step 5 again.

[0038] (10): Import the test set into the GRU neural network model optimized by the information fusion average optimization algorithm, use the training set to train the GRU neural network model optimized by the information fusion average optimization algorithm, and predict the test set;

[0039] (11): The error, accuracy, coefficient of determination, mean absolute error and root mean square error between the prediction results of the GRU neural network model and the true value are used as prediction evaluation indicators;

[0040] (12): The performance and prediction accuracy of the optimized GRU neural network model are evaluated by calculating the prediction evaluation index between the prediction results and the true value.

[0041] The core of GRU (Gated Recurrent Unit) is its update and reset gates, which are used to regulate information flow and memory retention. The update gate uses the Sigmoid function to control the degree of mixing of the current input with the previous memory: when the output is close to 1, the model retains more current information; when the output is close to 0, the model ignores more current information. On the other hand, the reset gate uses the Sigmoid function to decide how to combine the current input with the hidden state of the previous time step, and thus decide how much past information needs to be forgotten. This function is essential in cases where environmental conditions change rapidly, such as when the temperature fluctuates violently, so that the model can discard old states that are no longer relevant and use new input information to update the current memory state. In this way, GRU can effectively process the time series characteristics of the input data and optimize the response speed and prediction accuracy of the model. Figure 1As shown in the structure diagram, when using a gated recurrent unit (GRU) network to perform tasks such as motorized spindle thermal error prediction, the entire network implementation can be divided into five main parts, each with different functions and responsibilities. The following will detail each part and its role in the entire network:

[0042] (1) Input and output definitions:

[0043] Input x t : At each time step t, input x t It is the temperature data from the high-speed electric spindle.

[0044] Output h t : Thermal elongation value, which is the target variable to be predicted.

[0045] (2) Reset gate

[0046] Function: The reset gate determines how much past information needs to be forgotten. This is very important for the model, especially when the temperature changes rapidly. The old state may no longer be relevant and needs to be replaced by new input.

[0047] calculate:

[0048] r t =σ(x t w xr +h t-1 w hr +b r ) (1)

[0049] Where r t is the reset gate output, h t-1 is the hidden state output of the previous moment, x t is the current input, w xr and w hr is the weight matrix of the reset gate, b r is the reset gate threshold, and σ is the sigmoid function.

[0050] (3) Update Gate

[0051] Function: The update gate determines how much previous information is passed to the current state, helping the model strike a balance between retaining long-term dependencies and accepting new information.

[0052] calculate:

[0053] z t =σ(x t w xz +h t-1 w hz +b z ) (2)

[0054] Where zt is the update gate output, h t-1 is the hidden state output of the previous moment, x t is the current input, w xz and w hz is the weight matrix of the reset gate, b z is the reset gate threshold, and σ is the sigmoid function.

[0055] (4) Candidate hidden states:

[0056] Role: The candidate hidden state is responsible for creating a new state that contains all the information that may become the next hidden state.

[0057] calculate:

[0058] h t °=tanh(x t w xh +w hh (r t ⊙h t-1 )+b h ) (3)

[0059] Where h t ° is the candidate hidden state output, r t is the reset gate output, h t-1 is the hidden state output of the previous moment, ⊙ represents element-by-element multiplication, x t is the current input, w xh and w hh is the weight matrix of the reset gate, b h is the reset gate threshold, and tanh is the hyperbolic tangent activation function.

[0060] (5) Hidden state output:

[0061] Function: This step includes updating the current hidden state h t , the output of the update gate is based on the previous hidden state h t-1 and the current candidate hidden state h t °Adjustment.

[0062] calculate:

[0063]

[0064] Where h t Hidden state output, z t is the update gate output, h t-1 is the hidden state output of the previous moment, ⊙ represents element-by-element multiplication, h t ° is the candidate hidden state output.

[0065] like Figure 4 As shown in Figure 2, the optimization process of the information fusion average optimization algorithm (IFAOA) is as follows:

[0066] The first stage: determine the individual optimal information solution, suboptimal information solution and worst information solution according to the relevant fitness value;

[0067] After initialization or before starting the next action, the root fitness function is required to evaluate the initial information population. By calculating the fitness function of each individual, the optimal information solution, the suboptimal information solution, and the worst information solution can be determined.

[0068] The mathematical description of information population initialization is as follows:

[0069]

[0070] Among them, x i,j g Represents the generated information group, where i=1,2,3,....,V p , g is the current number of iterations, dim is the dimension of the search space, F IFAOA (x i g ) represents x i g Fitness value, p(x i,j g ) is the probability distribution of the j-th dimension.

[0071] Phase 2: Update rules

[0072] Before updating, three information solutions are randomly selected. Then, in the update rule phase, the IFAOA algorithm uses the mean rule (MR) and convergence acceleration (CA) techniques to optimize the direction and amplitude of the information, generating new information with more accurate direction and higher efficiency. The core of this step is to adjust the geometric properties of the information to bring it closer to the optimization target, thereby improving the overall performance of the algorithm.

[0073] The mean rule (MR) formula is as follows:

[0074]

[0075] Where WM1 i g is the weighted average of random solutions, WM2 i g is the weighted average of the optimal solution, δ=2β×rand-β, β=2e^-4(g / Maxg), g is the current number of iterations, Maxg is the maximum number of iterations, w1, w2 and w3 are weight functions, r represents a random number in [0,0.5], γ is a small constant, and x bs 、xbt and x ws They represent the optimal solution, suboptimal solution and worst solution of the g-th iteration, respectively, x a 、x b and x c are three randomly selected information solutions, and rand is a standard normal distribution random value.

[0076] The convergence acceleration (CA) formula is as follows:

[0077]

[0078] Where randa is another random value from the standard normal distribution.

[0079] Then we can get the summary formula of the update rule:

[0080]

[0081] Where x i g For information individuals, α=2e^-4(g / Maxg).

[0082] By expanding formula (11) in detail, we can obtain the main formula of the update rule:

[0083]

[0084]

[0085] Among them, z1 i g and z2 i g These are two updated information obtained using the update rules.

[0086] The third stage: information fusion stage

[0087] In the information fusion phase, the algorithm combines the multiple information generated in the previous phase. It uses specific algorithmic logic to fuse this information to improve the diversity and quality of the solution. The purpose of information fusion is to combine the advantages of each information and improve the comprehensiveness and robustness of the solution by fusing solutions from different directions. The IFAOA algorithm uses the following formula to combine the z1 in the previous phase i g and z2 i g Synthesize a new message:

[0088]

[0089] Among them, u i gis the new information obtained by the g-th iterative information fusion; u = 0.05×randa.

[0090] Phase 4: Local Search Phase

[0091] During the local search phase, the IFAOA algorithm uses a sophisticated search strategy to identify and avoid potential local optima, ensuring a significantly increased likelihood of achieving global optimality. This phase is crucial to the overall performance of the algorithm, as it directly impacts the quality and practicality of the final optimization results. The local search strategy improves the effectiveness of the global search by carefully exploring local regions in the solution space, preventing the algorithm from falling into suboptimal solutions. IFAOA uses a local search rule to avoid local optimality, executing Equation 15 only when rand < 0.5. The specific formula is as follows:

[0092]

[0093] In the formula x avg =(x a +x b +x c ) / 3; when k≤0.5, the values ​​of j1 and j2 are both 1; when k>0.5, j1=2rand, j2=rand, and R and k are random numbers between 0 and 1.

[0094] The information fusion average optimization algorithm optimizes the GRU neural network process as follows Figure 4 As shown:

[0095] The training set and test set data are imported into the IFAOA-GRU electric spindle thermal error prediction model. The IFAOA optimization algorithm will determine the initial values ​​of each weight parameter, bias parameter and hidden state of the GRU neural network through layer-by-layer iteration based on the training set and test set data, and output the optimal solution; finally, the training set and test set data are applied to the optimized GRU neural network for regression prediction and the prediction results and evaluation indicators are output to complete the regression prediction task.

[0096] When evaluating the thermal error prediction model, based on data from the optimal temperature point, 4000 rpm was selected as the training set, and 2000 rpm and 6000 rpm were selected as the test sets. Prediction results show that the IFAOA-GRU model outperforms the WCA-GRU and GRU models in key performance metrics. Specifically, at 2000 rpm, the thermal error prediction accuracy of the IFAOA-GRU, WCA-GRU, and GRU models was 95.5%, 91.5%, and 88.4%, respectively. At a higher speed of 6000 rpm, the prediction accuracies of these models were 95.9%, 91.7%, and 89.3%, respectively. Furthermore, the IFAOA-GRU model achieved lower MAE and RMSE values ​​under both conditions. When examining the stability of the thermal error prediction model, the residual fluctuation of the IFAOA-GRU model was generally maintained within 5 μm, with smooth fluctuations and small amplitudes. In contrast, the residual errors of the WCA-GRU and GRU models generally fluctuate within 8μm, and these fluctuations are quite dramatic, potentially leading to unstable performance in practical applications. In summary, the IFAOA-GRU model performs well in terms of prediction accuracy and offers significant advantages in terms of stability. These characteristics make the IFAOA-GRU model an ideal choice for thermal error prediction in high-speed motorized spindles, effectively improving performance optimization and operational stability.

[0097] It will be understood that the present invention is described by way of some embodiments, and it will be appreciated by those skilled in the art that various changes or equivalent substitutions may be made to these features and embodiments without departing from the spirit and scope of the present invention. In addition, under the teachings of the present invention, these features and embodiments may be modified to adapt to specific circumstances and materials without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are intended to be protected by the present invention.

Claims

1. A method for predicting thermal errors of a high-speed electric spindle, characterized by: The following steps are involved: S1: Build an experimental platform, arrange temperature and displacement measurement points, and obtain real-time temperature data and thermal displacement data of the electric spindle at multiple positions at different speeds; S2: The data of multiple temperature measurement points obtained in S1 are optimized into four optimal measurement points using K-means clustering and Pearson coefficient method; S3: According to the experiment, set the number of layers and the number of neurons in each layer of the GRU neural network, and initialize the weight parameters, threshold parameters and hidden state values; S4: Input the training set data, set the maximum population size, and randomly generate information individuals as the initial population; each information individual represents a set of GRU neural network parameters, and start optimizing the gated unit neural network parameters; and set the termination condition, that is, the maximum number of iterations; S5: Optimize the GRU neural network through the information fusion average optimization algorithm; S6: Import the test set into the GRU neural network model optimized by the information fusion average optimization algorithm, use the training set to train the GRU neural network model optimized by the information fusion average optimization algorithm, and make predictions on the test set; S7: The error, accuracy, coefficient of determination, mean absolute error and root mean square error between the prediction results of the GRU neural network model and the true value are used as prediction evaluation indicators; S8: Evaluate the performance and prediction accuracy of the optimized GRU neural network model by calculating the prediction evaluation index between the prediction results and the true value.

2. The method for predicting thermal errors of a high-speed electric spindle according to claim 1, wherein: The optimization process of S5 is as follows: S51: Calculate the fitness function of each information individual, evaluate the information solution according to the fitness function, and select the optimal information solution, the suboptimal information solution, and the worst information solution respectively; S52: Perform the update rule phase, take the information solution obtained in S51, and then randomly select three information solutions to perform the update rule phase, and finally obtain two pieces of information; S53: performing information fusion phase, merging the two pieces of information obtained in S52 to obtain an optimized new piece of information; S54: Entering the local search phase, adding the optimized new information obtained in S53 to the local search rules; S55: Determine whether the maximum number of information has been reached. If so, determine whether the maximum number of iterations has been reached. Otherwise, proceed to S52 again. Determine whether the algorithm has reached the maximum number of iterations. If so, output the global optimal information and obtain the optimal parameters of GRU. Otherwise, proceed to S51 again.

3. The method for predicting thermal errors of a high-speed electric spindle according to claim 2, wherein: The specific method of selecting the optimal information solution, the suboptimal information solution, and the worst information solution in S51 is as follows: The mathematical description of information population initialization is as follows: Among them, x i,j g Represents the generated information group, where i=1,2,3,....,V p , g is the current number of iterations, dim is the dimension of the search space, F IFAOA (x i g ) represents x i g Fitness value, p(x i,j g ) is the probability distribution of the j-th dimension.

4. The method for predicting thermal errors of a high-speed electric spindle according to claim 3, wherein: The calculation method of the population update rule in S52 is as follows: Randomly select three information solutions from S51 to perform the update rule phase, use the mean rule to create new information from the selected six information solutions, and add a convergence acceleration part to the update rule operator to improve the global search capability, and finally obtain two pieces of information; The mean rule formula is as follows: Where WM1 i g is the weighted average of random solutions, WM2 i g is the weighted average of the optimal solution, δ=2β×rand-β, β=2e^-4(g / Maxg), g is the current number of iterations, Maxg is the maximum number of iterations, w1, w2 and w3 are weight functions, r represents a random number in [0,0.5], γ is a small constant, and x bs 、x bt and x ws They represent the optimal solution, suboptimal solution and worst solution of the g-th iteration, respectively, x a 、x b and x c are three randomly selected information solutions, and rand is a standard normal distribution random value; The convergence acceleration formula is as follows: Where, randa is another random value of the standard normal distribution; The summary formula of the update rule is: Where x i g For information individuals, α=2e^-4(g / Maxg); Expanding formula (11) in detail, we can obtain the main formula of the update rule: Among them, z1 i g and z2 i g These are two updated information obtained using the update rules.

5. The method for predicting thermal errors of a high-speed electric spindle according to claim 4, characterized in that: The model of the information fusion stage in S53 is: The IFAOA algorithm converts the z1 of the previous stage into i g and z2 i g Synthesize a new message: Among them, u i g is the new information obtained by the g-th iterative information fusion; u = 0.05×randa.

6. The method for predicting thermal errors of a high-speed electric spindle according to claim 5, characterized in that: In the local search phase of S54, Formula 15 is executed only when rand < 0.

5. The specific formula is as follows: Where, x avg =(x a +x b +x c ) / 3; when k≤0.5, the values ​​of j1 and j2 are both 1; when k>0.5, j1=2rand, j2=rand, and R and k are random numbers between 0 and 1.