A method for advanced prediction of thermal errors of electric spindles based on deep learning algorithm

By setting sensors on the electric spindle and using deep learning algorithm to train the thermal error advance prediction network, the problem of thermal error prediction of the electric spindle is solved, high-precision advance prediction and error compensation are achieved, and processing accuracy and stability are improved.

CN119270767BActive Publication Date: 2025-03-14ZHEJIANG ADVANCED CNC MASCH TOOL TECH INNOVATION CENT CO LTD

Patent Information

Application Number
CN202411818540.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-03-14
Estimated Expiration
2044-12-11

AI Technical Summary

Technical Problem

The prior art is difficult to effectively predict and compensate for thermal errors of the electric spindle, resulting in a reduction in machining accuracy.

Method used

The thermal error advance prediction method of the electrical spindle based on deep learning algorithm is adopted. By setting a temperature sensor and a displacement sensor on the surface of the electrical spindle, data is collected and thermal error advance prediction network is trained to achieve the thermal error advance prediction of the thermal error.

Benefits of technology

High-precision advance prediction of thermal error of the electric spindle is achieved, allowing the system to take compensation measures before the error occurs, significantly improving the machining accuracy and stability of the electric spindle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119270767B_ABST
    Figure CN119270767B_ABST
Patent Text Reader

Abstract

The present invention provides a method for predicting the thermal error of an electric spindle in advance based on a deep learning algorithm. The method collects the surface temperature and the displacement data of the electric spindle by arranging multiple temperature sensors and displacement sensors on the surface of the electric spindle, and trains a thermal error prediction network composed of a time domain convolution network, a gated loop network, and a fully connected network to achieve the thermal error prediction of the electric spindle in advance. The present invention adopts a thermal error prediction network to predict the advance amount of the thermal error of the electric spindle, and can compensate before the error occurs, thereby improving the machining accuracy and the stability of the electric spindle. At the same time, the thermal error prediction network adopts a multi-way parallel neural network and a fully connected network design, which enhances the adaptability and robustness of the model and provides a flexible solution for electric spindles of different types and specifications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of high-end machine tool spindle precision control, and in particular to a method for advance prediction of thermal errors of an electric spindle based on a deep learning algorithm. Background Art

[0002] CNC machine tools are the "industrial mother machines" of industrial processing and are important equipment for achieving ultra-high-speed precision processing. As the core equipment for directly processing workpieces on CNC machine tools, the performance of high-speed precision electric spindles greatly affects the processing accuracy of CNC machine tools. The thermal characteristics of the electric spindle are the effects of temperature changes caused by factors such as motor heating and friction heating during operation on its performance. These characteristics are crucial to the accuracy, stability and service life of the electric spindle. Specifically, the thermal characteristics of the electric spindle mainly include heat generation and heat dissipation mechanisms, temperature rise, thermal deformation and other thermal-related characteristics. During high-speed operation, the electric spindle has two main sources of heat generation: one is the heat generated by the electromagnetic loss of the stator and rotor of the built-in shellless motor; the other is the heat generated by the friction between the internal rolling elements and the inner and outer rings of the bearings when the bearings rotate at high speed. The generation of these heats will cause the temperature of the electric spindle to rise, which in turn affects its accuracy and stability.

[0003] In order to effectively control the temperature of the electric spindle, three cooling methods are usually used: water cooling, air cooling, and oil cooling. The water cooling system removes heat through circulating water, has high cooling efficiency, and is suitable for high-power and high-speed electric spindles; the air cooling system uses fans or natural wind for cooling, which is simple to maintain, but the cooling effect is relatively weak; the oil cooling system cools through circulating oil, has good thermal conductivity and stability, and is suitable for high-precision and high-reliability processing environments. However, during high-speed operation, the heat generated by the electric spindle is often greater than the heat dissipation effect, resulting in thermal errors in the electric spindle due to temperature rise, thereby reducing processing accuracy.

[0004] In order to improve the machining accuracy, the prediction and compensation of the thermal error of the electric spindle becomes particularly important. At present, the thermal error of the electric spindle is usually calculated by establishing a mapping relationship between temperature data and thermal error. This method can provide a theoretical basis for error compensation. However, the error compensation of the electric spindle has a lag. In order to compensate the error more effectively, it is necessary to predict the temperature of the electric spindle in advance. By predicting the thermal error of the electric spindle in advance, measures can be taken in advance for anti-compensation, thereby further improving the machining accuracy and the service life of the electric spindle. The research and application of this advance prediction and anti-compensation technology is of great significance to improving the performance and machining quality of the electric spindle. Summary of the invention

[0005] Technical issues to be solved

[0006] In view of this, an embodiment of the present specification provides an electric spindle thermal error advance prediction method based on a deep learning algorithm to improve the electric spindle machining accuracy and stability.

[0007] Technical Solution

[0008] In order to solve the technical problem, the present invention provides the following technical solution: a method for predicting the thermal error of an electric spindle in advance based on a deep learning algorithm, the method comprising the following steps: S1, setting a plurality of temperature sensors on the surface of the electric spindle, and setting a displacement sensor for detecting axial deformation at the spindle end of the electric spindle; S2, starting the electric spindle, collecting to The temperature data of the electric spindle at all times is collected. to The temperature data of the electric spindle and the axial displacement data of the spindle end at the moment; and the axial displacement data is collected using the Holt-Winster seasonal index; S3, repeat step S2 several times to obtain corresponding data; S4, use the corresponding data obtained in step S3 to train the thermal error advance prediction network; S5, collect to The temperature data of the electric spindle at the moment is input into the thermal error advance prediction network to obtain to The predicted thermal error data of the electric spindle at the moment; S6, through the adaptive online update module, to The actual axial displacement data of the spindle end at the time to The predicted thermal error data of the thermal error advance prediction network at each moment is compared to calculate the prediction error; the parameters of the thermal error advance prediction network are fine-tuned online using the incremental learning method according to the prediction error, and the data update range is limited by the sliding window mechanism; the temperature data is time-related multidimensional data, and the data dimension is consistent with the number of temperature sensors and has a one-to-one correspondence; the thermal error advance prediction network is connected in series with a multi-way parallel neural network and a single fully connected network, and the number of neural networks in the multi-way parallel neural network is equal to the number of temperature sensors; in the multi-way parallel neural network, each neural network receives a temperature sensor collected to The temperature data at each moment is then processed and the results are input into the fully connected network to output to Prediction value of thermal error of the electric spindle at time.

[0009] In some embodiments, a multi-way parallel neural network, each of which is composed of a time-domain convolutional network, a fully connected network, and a gated recurrent unit network connected in series.

[0010] In some embodiments, the time domain convolution network and the fully connected network form a temperature advance prediction module, and the gated recurrent unit network and the subsequent fully connected network form a thermal error prediction module; the training steps of the thermal error advance prediction network are: S401, define to The temperature data of the electric spindle at time is the training data, and the definition to The temperature data of the electric spindle at the moment is the label data, and the temperature advance prediction module is trained; S402, define to The temperature data of the electric spindle at time is the training data, and the definition to The axial displacement data of the spindle end at the moment is used as the label data to train the thermal error prediction module.

[0011] In some embodiments, the network parameter fine-tuning process of the adaptive online update module in step S6 includes the following steps: S601, measuring to The temperature data of the electric spindle at time is input into the thermal error advance prediction network to obtain to Predicted thermal error data of the electric spindle at the moment, measured to The actual axial displacement data of the spindle end at the moment; S602, at to During the time period, the sliding window mechanism is used to select Looking back to the most recent data points as the basis for updating, , calculate the prediction error for each point in the window ; , where is the model prediction result of the i-th sample, is the actual displacement data of the i-th sample, is the threshold parameter, ; S603, using incremental learning method to update the parameters in the thermal error advance prediction network; S604, each interval Evaluate the prediction accuracy of the updated thermal error advance prediction network. If the mean error of the current model parameter prediction is greater than the mean error before the update, roll back to the model parameters before the update.

[0012] In some embodiments, the window size in the adaptive online update module Dynamic adjustment according to operating conditions, the adjustment rules are: ,

[0013] , , where , and They correspond to the maximum value, minimum value and initial window size of the window respectively. , is the regulating factor, is the average loss of data points in the sliding window, is the number of data points, is the standard deviation of the prediction error within the sliding window.

[0014] In some embodiments, the specific content of step S603 is as follows: using the prediction error of each data point in the sliding window , calculate the gradient of the model parameters And dynamically update the learning rate: , where Represents the model parameters, according to the gradient and learning rate , update the model parameters, and use the gradient update rule as follows: , adjust the learning rate through the dynamic learning rate mechanism , the specific update rules are: , where is the initial learning rate, Refers to the benchmark error value obtained based on historical data statistics, calculated by the following formula: ; , where is the learning rate dynamic adjustment coefficient, is the initial adjustment factor.

[0015] Beneficial Effects

[0016] Compared with the prior art, the advantages of the present invention are: 1. The present invention utilizes deep learning technology, especially time-domain convolutional networks and gated recurrent networks, to achieve high-precision prediction of temperature changes and thermal errors of the electric spindle during operation, providing strong data support for real-time error compensation during the machining process.

[0017] 2. The present invention uses deep learning technology to predict the thermal error of the electric spindle in advance, allowing the system to take measures to compensate before the error occurs. This forward-looking error management strategy significantly improves the machining accuracy and stability of the electric spindle, and reduces the machining error caused by temperature changes.

[0018] 3. The present invention can process data from multiple temperature sensors simultaneously by constructing a multi-way parallel neural network and a fully connected network, thereby enhancing the adaptability and robustness of the model to different working conditions and environmental changes. This design not only improves the reliability of the system, but also provides a flexible solution for electric spindles of different types and specifications.

[0019] 4. The present invention introduces an adaptive online update module, which can dynamically adjust the parameters of the model when the working conditions and environment of the electric spindle change, so as to always maintain a high-precision prediction effect. Through real-time data-driven online fine-tuning and dynamic learning rate mechanism, the model not only has excellent adaptability under different operating conditions, but also can effectively reduce errors and significantly improve processing accuracy and system stability. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 This is a diagram of the network architecture of thermal error advance prediction of the present invention;

[0022] Figure 2 This is a flow chart of the adaptive online update module of the present invention. DETAILED DESCRIPTION

[0023] The present application is described in detail below with reference to the accompanying drawings and specific embodiments.

[0024] The following describes the implementation methods of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The present application can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that, in the absence of conflict, the following embodiments and the features in the embodiments can be combined with each other. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work belong to the scope of protection of the present application.

[0025] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein can be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present application, it should be understood by those skilled in the art that an aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number and aspect described herein can be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein can be used to implement this device and / or practice this method.

[0026] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application. The illustrations only show the components related to the present application rather than being drawn according to the number, shape and size of the components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.

[0027] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the examples can be practiced without these specific details.

[0028] The technical solutions provided by various embodiments of the present application are described below in conjunction with the accompanying drawings.

[0029] See also Figure 1-2 In this embodiment: a method for predicting the thermal error of an electric spindle in advance based on a deep learning algorithm, the method for predicting the thermal error of an electric spindle in advance comprises the following steps:

[0030] S1. A number of temperature sensors (number ≥ 2) are arranged on the surface of the electric spindle, and a displacement sensor for detecting axial deformation is arranged at the spindle end of the electric spindle;

[0031] S2, start the electric spindle, collect to The temperature data of the electric spindle at all times is collected. to The temperature data of the electric spindle and the axial displacement data of the spindle end at each moment; and the axial displacement data is collected using the Holt-Winster seasonal index;

[0032] S3, repeat step S2 several times to obtain multiple sets of corresponding data;

[0033] S4, using the corresponding data obtained in step S3 to train a thermal error advance prediction network;

[0034] S5. Collection to The temperature data of the electric spindle at the moment is input into the thermal error advance prediction network to obtain to Predicted thermal error data of the electric spindle at the moment;

[0035] S6, through the adaptive online update module, to The actual axial displacement data of the spindle end at the time to The predicted thermal error data of the thermal error advance prediction network at each moment are compared to calculate the prediction error. The parameters of the thermal error advance prediction network are fine-tuned online using an incremental learning method based on the prediction error, and the data update range is limited by a sliding window mechanism.

[0036] Temperature data is time-related multidimensional data, and the data dimension is consistent with the number of temperature sensors and corresponds one to one. The thermal error advance prediction network is connected in series with a multi-way parallel neural network and a single fully connected network. The number of neural networks in the multi-way parallel neural network is equal to the number of temperature sensors. In the multi-way parallel neural network, each neural network receives a temperature sensor. to The temperature data at each moment is then processed and the results are input into the fully connected network to output to Prediction value of thermal error of the electric spindle at time.

[0037] In some embodiments, a multi-way parallel neural network, wherein each neural network is composed of a time domain convolutional network, a fully connected network, and a gated recurrent unit network connected in series in sequence, the time domain convolutional network and the fully connected network constitute a temperature advance prediction module, and the gated recurrent unit network and the subsequently connected fully connected network constitute a thermal error prediction module; the training steps of the thermal error advance prediction network are:

[0038] S401. Definition to The temperature data of the electric spindle at time is the training data, and the definition to The temperature data of the electric spindle at the moment is used as label data to train the temperature advance prediction module;

[0039] S402, Definition to The temperature data of the electric spindle at time is the training data, and the definition to The axial displacement data of the spindle end at the moment is used as the label data to train the thermal error prediction module.

[0040] In some embodiments, the network parameter fine-tuning process of the adaptive online update module in step S6 includes the following steps:

[0041] S601, Measurement to The temperature data of the electric spindle at time is input into the thermal error advance prediction network to obtain to Predicted thermal error data of the electric spindle at the moment, measured to The actual axial displacement data of the spindle end at the moment;

[0042] S602, in to During the time period, the sliding window mechanism is used to select Looking back to the most recent data points as the basis for updating, , calculate the prediction error for each point in the window ; , where is the model prediction result of the i-th sample, is the actual displacement data of the i-th sample, is the threshold parameter, ; Window size in adaptive online update module Dynamic adjustment according to operating conditions, the adjustment rules are: , , , where , and is the maximum value, minimum value and initial window size of the window, , is the regulating factor, is the average loss of data points in the sliding window, is the number of data points, is the standard deviation of the prediction error within the sliding window;

[0043] It should be pointed out that: W is the number of data points, and the number of data point units constitutes the window size.

[0044] S603, using the incremental learning method to update the parameters in the thermal error advance prediction network, using the prediction error of each data point in the sliding window , calculate the gradient of the model parameters And dynamically update the learning rate: , where Represents the model parameters, according to the gradient and learning rate , update the model parameters, and use the gradient update rule as follows: , adjust the learning rate through the dynamic learning rate mechanism , the specific update rules are: , where is the initial learning rate, Refers to the benchmark error value obtained based on historical data statistics, calculated by the following formula: ; , where is the learning rate dynamic adjustment coefficient, is the initial adjustment coefficient, which is set to 1.0 by default;

[0045] S604, each interval Evaluate the prediction accuracy of the updated thermal error advance prediction network. If the mean error of the current model parameter prediction is greater than the mean error before the update, roll back to the model parameters before the update.

[0046] Specific workflow:

[0047] A1. Construct the optimal combination method of the temperature measurement points of the electric spindle, select the best combination of measurement points with the lowest collinearity and the highest accuracy, and set three PT100 thermal resistance temperature sensors on the surface of the electric spindle shell according to the best combination of measurement points to detect the temperature of the electric spindle shell; set a CPL230-C8 capacitive displacement sensor at the end of the electric spindle to detect the axial displacement of the electric spindle;

[0048] A2. Establish a thermal error advance prediction network, which consists of three parallel neural networks and a fully connected network in series at the end; in the three parallel neural networks, the input data of each network is the temperature acquisition data of a PT100 thermal resistor temperature sensor; the output data of the fully connected network in series at the end is the advance predicted electric spindle thermal error data; in the three parallel neural networks, each neural network is composed of a time domain convolution network, a fully connected network and a gated recurrent unit network connected in series in sequence; among them, the time domain convolution network and the fully connected network constitute a temperature advance prediction module, and the gated recurrent unit network and the fully connected network connected subsequently constitute a thermal error prediction module;

[0049] A3. Start the electric spindle and set the speed of the electric spindle to 12000rpm;

[0050] A4. Collect the temperature data and the end displacement data of the electric spindle every 5 seconds, collect data for 180 minutes in total, and obtain 2160 sets of data; use the Holt-Winster seasonal exponential smoothing to collect the end displacement data of the electric spindle;

[0051] A5. Divide the collected data into 18 parts in chronological order, each containing 120 groups of data; for each part of data, take the first 60 groups of temperature data as training data, and the last 60 groups of temperature data as label data; train the temperature advance prediction module, and set the key parameters of the temperature advance prediction module as follows: learning rate is 0.0001, number of iterations is 100, loss function is mean square error (MSE), expansion coefficient is 2, and convolution kernel size is 3;

[0052] A6. Divide the collected data into 36 parts in chronological order, each containing 60 sets of data; take the temperature data of the electric spindle as training data, the end displacement data of the electric spindle as label data, and train the thermal error prediction module; set the key parameters of the thermal error prediction module as follows: the learning rate is 0.0001, the number of iterations is 100, and the loss function is the mean square error (MSE);

[0053] A7. Set the speed of the electric spindle as needed (it can be 9000rpm, 15000rpm and 18000rpm), collect the temperature value of the thermistor temperature sensor every 5 seconds, and after accumulating 60 sets of temperature data, input them into the thermal error advance prediction network to predict the thermal error of the electric spindle.

[0054] A8. Through the adaptive online update module, the real-time collected temperature data and the end displacement data of the electric spindle are compared with the prediction results to calculate the prediction error. The incremental learning method is used to fine-tune the parameters in the thermal error advance prediction network. The specific adjustments include dynamically adjusting the learning rate and limiting the update range, and the parameters are updated only based on the data in the most recent time window.

[0055] A9. According to the thermal error results after advance prediction and adaptive online update module optimization, the electric spindle operating parameters are adjusted in real time to achieve anti-compensation of the electric spindle thermal error and ensure machining accuracy and stability.

[0056] The same and similar parts between the various embodiments in this specification can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0057] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for predicting thermal errors of electric spindles based on deep learning algorithm, characterized in that: The electric spindle thermal error advance prediction method comprises the following steps: S1. Arrange a plurality of temperature sensors on the surface of the electric spindle, and arrange a displacement sensor for detecting axial deformation at the spindle end of the electric spindle; S2, start the electric spindle, collect to The temperature data of the electric spindle at the moment is collected to The temperature data of the electric spindle and the axial displacement data of the spindle end at each time; and the axial displacement data is collected using the Holt-Winster seasonal index; S3, repeat step S2 several times to obtain corresponding data; S4, using the corresponding data obtained in step S3 to train a thermal error advance prediction network; S5. Collection to The temperature data of the electric spindle at the moment is input into the thermal error advance prediction network to obtain to Predicted thermal error data of the electric spindle at a certain moment; S6, through the adaptive online update module, to The actual axial displacement data of the spindle end at the time to The predicted thermal error data of the thermal error advance prediction network at each moment is compared to calculate the prediction error; the parameters of the thermal error advance prediction network are fine-tuned online using an incremental learning method according to the prediction error, and the data update range is limited by a sliding window mechanism; the temperature data is time-related multidimensional data, and the data dimension is consistent with the number of temperature sensors and has a one-to-one correspondence; the thermal error advance prediction network is formed in series with a multi-way parallel neural network and a single fully connected network, and the number of neural networks in the multi-way parallel neural network is equal to the number of temperature sensors; in the multi-way parallel neural network, each neural network receives a temperature sensor collected to The temperature data at each moment is then processed and the result is input into the fully connected network to output to The predicted value of thermal error of the electric spindle at the time; The multi-way parallel neural network, wherein each way of the neural network is formed by sequentially connecting a time domain convolutional network, a fully connected network and a gated recurrent unit network in series; The time domain convolution network and the fully connected network form a temperature advance prediction module, and the gated recurrent unit network and the subsequently connected fully connected network form a thermal error prediction module; the training steps of the thermal error advance prediction network are: S401, define to The temperature data of the electric spindle at the time is the training data, and the definition to The temperature data of the electric spindle at the moment is the label data, and the temperature advance prediction module is trained; S402, define to The temperature data of the electric spindle at the time is the training data, and the definition to The axial displacement data of the spindle end at the moment is used as label data to train the thermal error prediction module; The network parameter fine-tuning process of the adaptive online update module in step S6 includes the following steps: S601, measuring to The temperature data of the electric spindle at time t is input into the thermal error advance prediction network to obtain to The predicted thermal error data of the electrospindle at the moment is measured to The actual axial displacement data of the spindle end at the time; S602, to During the time period, the sliding window mechanism is used to select Looking back to the most recent data points as the basis for updating, , calculate the prediction error for each point in the window ; , where is the model prediction result of the i-th sample, is the actual displacement data of the i-th sample, is the threshold parameter, ; S603, using incremental learning method to update the parameters in the thermal error advance prediction network; S604, each interval The prediction accuracy of the updated thermal error advance prediction network is evaluated. If the error mean of the current model parameter prediction is greater than the error mean before the update, the model parameters are rolled back to the model parameters before the update.

2. The method for advanced prediction of thermal error of an electric spindle based on a deep learning algorithm according to claim 1, characterized in that: The window size in the adaptive online update module Dynamic adjustment according to operating conditions, the adjustment rules are: , , , In the formula, , and They correspond to the maximum value, minimum value and initial window size of the window respectively. , is the regulating factor, is the average loss of data points in the sliding window, is the number of data points, is the standard deviation of the prediction error within the sliding window.

3. The method for advanced prediction of thermal error of an electric spindle based on a deep learning algorithm according to claim 1, characterized in that: The specific content of step S603 is as follows: Use the prediction error for each data point in the sliding window , calculate the gradient of the model parameters And dynamically update the learning rate: , In the formula, Represents the model parameters, according to the gradient and learning rate , update the model parameters, and use the gradient update rule as follows: , Adjust the learning rate through a dynamic learning rate mechanism , the specific update rules are: , In the formula, is the initial learning rate, Refers to the benchmark error value obtained based on historical data statistics, calculated by the following formula: , , In the formula, is the dynamic adjustment coefficient of the learning rate, is the initial adjustment factor.

Citation Information

Patent Citations

  • Deep learning-based numerical control machine tool spindle thermal error modeling method

    CN108363870A

  • Life searching method and system based on multi-sensor fusion

    CN110007366A

  • Numerical control machine tool spindle thermal error modeling method based on multivariate universe optimization

    CN117289652A

Cited By

  • A high-speed electric spindle thermal error prediction method and system based on a polynomial regression and LSTM hybrid model

    CN122528617A