A temperature advance prediction method for water-cooled electric spindle based on deep learning algorithm
Through the advanced prediction method of water-cooled electric spindle temperature based on deep learning algorithm, the problem of hysteresis of the electric spindle temperature prediction is solved, and the advanced prediction of the temperature changes of the electric spindle is achieved, which improves the processing accuracy and service life.
Patent Information
- Application Number
- CN202510014224.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2045-01-06
AI Technical Summary
The prior art is difficult to achieve advanced prediction of the electric spindle temperature, resulting in hysteresis of error compensation, affecting processing accuracy and service life.
The water-cooled electric spindle temperature advance prediction method is adopted based on deep learning algorithm. By setting a temperature sensor on the surface of the electric spindle, data is collected and temperature advance prediction network is trained, including the working condition characteristic classification module and the temperature advance prediction module, the advance prediction of the temperature change of the electric spindle is realized.
It realizes advanced prediction of temperature changes of water-cooled electric spindles, improves real-time error compensation, reduces processing errors caused by temperature changes, and extends the service life of the electric spindles.
Smart Images

Figure CN119415895B_ABST
Abstract
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 advanced temperature prediction of a water-cooled 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 electric spindles are the effects of temperature changes caused by factors such as motor heating and friction heating during operation on their performance. These characteristics are crucial to the accuracy, stability and service life of electric spindles. Specifically, the thermal characteristics of electric spindles mainly include heat generation and heat dissipation mechanisms, temperature rise, thermal deformation and other thermal related characteristics. During high-speed operation, there are two main sources of heat generation for electric spindles: 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-cooled electric spindle designs cooling water channels on the electric spindle housing and uses a compressor to circulate cooling water to achieve heat dissipation and cooling of the electric spindle. Although the water cooling system has high cooling efficiency, during high-speed operation, the heat generated by the electric spindle is often greater than the heat dissipation effect of the cooling water, 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 temperature change or 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 a method for advanced temperature prediction of a water-cooled electric spindle based on a deep learning algorithm to improve the performance and processing quality of the electric spindle.
[0007] Technical Solution
[0008] In order to solve the technical problem, the present invention provides the following technical solution: a method for predicting the temperature of a water-cooled electric spindle in advance based on a deep learning algorithm, comprising the following steps: S1, setting a plurality of temperature sensors on the surface of the water-cooled electric spindle; S2, starting the water-cooled electric spindle, collecting to Collect the temperature data of the water-cooled electric spindle and the start and stop status of the compressor at all times; to The temperature data of the water-cooled electric spindle at the moment; S3, repeat step S2 several times to obtain multiple sets of corresponding data; S4, use the data obtained in step S3 to train the temperature advance prediction network; S5, collect to The temperature data of the water-cooled electric spindle at each moment is input into the temperature advance prediction network to obtain to Predicted value of the temperature of the water-cooled electric spindle at this moment.
[0009] In some embodiments, the temperature advance prediction network is composed of an operating condition feature classification module and a temperature advance prediction module; the operating condition feature classification module is composed of a support vector machine algorithm and a Platt scaling algorithm in series; the temperature advance prediction module is composed of two neural networks, the two neural networks are arranged in parallel, and both neural networks receive to The temperature data collected by the temperature sensor at each moment, and the output values of the two neural networks are added proportionally according to the predicted values of the working condition feature classification module, and the output to Predicted value of the temperature of the water-cooled electric spindle at this moment.
[0010] In some embodiments, the input value of the operating condition feature classification module is the temperature data collected by the temperature sensor, and the output value is in the range of A sequence of floating point numbers.
[0011] In some embodiments, each neural network in the temperature advance prediction module is composed of a temporal convolutional network (TCN) and a fully connected network in series, and the output of each fully connected network is a sequence of the same dimension as the input value of the temporal convolutional network. The corresponding elements of the output values of the two neural networks are added in proportion according to the predicted values of the working condition feature classification module, and the calculation formula is: , where Represents the output value of the working condition feature classification module, represents the output value of the first neural network, Represents the output value of the second neural network.
[0012] In some embodiments, the training steps of the temperature advance prediction network are: S401, define to The temperature data of the water-cooled electric spindle at the moment is the training data, and the definition to The start and stop status of the compressor at each moment is the label data, and the working condition feature classification module is trained; S402, definition to The temperature data of the water-cooled electric spindle at the moment is the training data, and the definition to The temperature data of the water-cooled electric spindle at each moment is used as the label data to train the temperature advance prediction module.
[0013] In some embodiments, in the training condition feature classification module, the key parameters of the vector machine are set as follows: the loss function is a cross entropy loss function, and the mathematical expression of the cross entropy loss function is: , where represents the number of samples, Indicates The real state value of the compressor in the sample, the real state value includes 0 or 1, Indicates The predicted state of the compressor in samples, the predicted state includes 0 or 1.
[0014] In some embodiments, in the training temperature advance prediction module, the loss function of the key parameter is the mean square error, and the mathematical expression of the mean square error loss function is: , where MSE stands for mean square error, represents the number of samples, Indicates The measured temperature value of the water-cooled electric spindle in the sample, Indicates Predicted temperature values of water-cooled electric spindles in samples.
[0015] Beneficial Effects
[0016] Compared with the prior art, the advantages of the present invention are: 1. It can predict the temperature change of the water-cooled electric spindle in the future time period according to the temperature change curve of the water-cooled electric spindle in the current time period. This advanced temperature prediction capability is crucial to achieve real-time anti-compensation of thermal errors of the water-cooled electric spindle, which helps to adjust the working state of the water-cooled electric spindle in advance and reduce the processing errors caused by temperature changes.
[0017] 2. The present invention introduces a working condition feature classification module to learn and predict the start and stop status of the compressor, and introduces a time domain convolutional network (TCN) to learn the complex patterns and trends of the temperature changes of the water-cooled electric spindle. It can better process the time series data of the temperature, understand and predict the temperature changes of the water-cooled electric spindle, thereby improving the accuracy of the advance prediction of the water-cooled electric spindle temperature. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] 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.
[0019] Figure 1 This is a diagram of the temperature advance prediction network architecture of the present invention. DETAILED DESCRIPTION
[0020] The present application is described in detail below with reference to the accompanying drawings and specific embodiments.
[0021] 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.
[0022] 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.
[0023] 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.
[0024] 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.
[0025] The technical solutions provided by various embodiments of the present application are described below in conjunction with the accompanying drawings.
[0026] See also Figure 1 In this embodiment: a method for predicting the temperature of a water-cooled electric spindle in advance based on a deep learning algorithm comprises the following steps: S1, setting a plurality of temperature sensors (the number is ≥ 1) on the surface of the water-cooled electric spindle; S2, starting the water-cooled electric spindle, collecting to Collect the temperature data of the water-cooled electric spindle and the start and stop status of the compressor at all times; to The temperature data of the water-cooled electric spindle at the moment; S3, repeat step S2 several times to obtain multiple sets of corresponding data; S4, use the data obtained in step S3 to train the temperature advance prediction network; S5, collect to The temperature data of the water-cooled electric spindle at each moment is input into the temperature advance prediction network to obtain to Predicted value of the temperature of the water-cooled electric spindle at this moment.
[0027] In some embodiments, the temperature advance prediction network is composed of an operating condition feature classification module and a temperature advance prediction module; the operating condition feature classification module is composed of a support vector machine algorithm and a Platt scaling algorithm in series; the temperature advance prediction module is composed of two neural networks, the two neural networks are arranged in parallel, and both neural networks receive to The temperature data collected by the temperature sensor at each moment, and the output values of the two neural networks are added proportionally according to the predicted values of the working condition feature classification module, and the output to Predicted value of the temperature of the water-cooled electric spindle at this moment.
[0028] It should be pointed out that the operating condition feature classification module predicts the start and stop status of the compressor by receiving temperature data collected by the temperature sensor.
[0029] In some embodiments, the input value of the operating condition feature classification module is the temperature data collected by the temperature sensor, and the output value is in the range of A sequence of floating point numbers.
[0030] It should be pointed out that: the closer the floating point number is to 1, the higher the probability of the compressor starting at the current moment is, and conversely, the closer the floating point number is to 0, the lower the probability of the compressor starting at the current moment is.
[0031] In some embodiments, each neural network in the temperature advance prediction module is composed of a temporal convolutional network (TCN) and a fully connected network in series, and the output of each fully connected network is a sequence of the same dimension as the input value of the temporal convolutional network. The corresponding elements of the output values of the two neural networks are added in proportion according to the predicted values of the working condition feature classification module, and the calculation formula is: , where Represents the output value of the working condition feature classification module, represents the output value of the first neural network, Represents the output value of the second neural network.
[0032] In some embodiments, the training steps of the temperature advance prediction network are: S401, define to The temperature data of the water-cooled electric spindle at the moment is the training data, and the definition to The start and stop status of the compressor at each moment is the label data, and the working condition feature classification module is trained; S402, definition to The temperature data of the water-cooled electric spindle at the moment is the training data, and the definition to The temperature data of the water-cooled electric spindle at each moment is used as the label data to train the temperature advance prediction module.
[0033] It should be pointed out that when training the operating condition feature classification module and the temperature advance prediction module, the operating condition feature classification module is trained first and then the temperature advance prediction module is trained, and when training the operating condition feature classification module, the support vector machine part in the operating condition feature classification module is trained separately first.
[0034] In some embodiments, in the training condition feature classification module, the key parameters of the vector machine are set as follows: the loss function is a cross entropy loss function, and the mathematical expression of the cross entropy loss function is: , where represents the number of samples, Indicates The real state value of the compressor in the sample, the real state value includes 0 or 1, Indicates The predicted state of the compressor in samples, the predicted state includes 0 or 1.
[0035] In some embodiments, in the training temperature advance prediction module, the loss function of the key parameter is the mean square error, and the mathematical expression of the mean square error loss function is: , where MSE stands for mean square error, represents the number of samples, Indicates The measured temperature value of the water-cooled electric spindle in the sample, Indicates Predicted temperature values of water-cooled electric spindles in samples.
[0036] Specific workflow:
[0037] A1. Choose a water-cooled electric spindle and install multiple PT100 thermal resistance temperature sensors on its surface as needed to detect the temperature of the electric spindle shell;
[0038] A2. Turn on the water-cooled electric spindle and set the speed of the water-cooled electric spindle to 12000rpm;
[0039] A3. Collect the temperature data of the electric spindle and the working status of the compressor every 5 seconds, collect data for 180 minutes in total, and obtain 2160 sets of data;
[0040] A4. Use the 2160 sets of collected data to train the working condition feature classification module. Take the temperature data of the electric spindle as the training data, and the working status of the compressor as the label data. 1 represents the compressor starting, and 0 represents the compressor stopping. Set the key parameters of the support vector machine as follows: the penalty coefficient C is 0.09, the kernel function is the radial basis function (RBF), the kernel function coefficient gamma is 1, the error convergence condition is 0.001, the loss function is the cross entropy loss function, and the mathematical expression of the cross entropy loss function is: , where represents the number of samples, Indicates The real state value of the compressor in the sample, the real state value includes 0 or 1, Indicates The predicted state of the compressor in the sample, the predicted state includes 0 or 1;
[0041] 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 electric spindle temperature data as training data, and the last 60 groups of electric spindle 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, convolution kernel size is 3, where , where represents the number of samples, Indicates The measured temperature value of the water-cooled electric spindle in the sample, Indicates The predicted temperature value of the water-cooled electric spindle in the samples;
[0042] A6. Set the speed of the water-cooled electric spindle as needed (it can be 9000rpm, 15000rpm and 18000rpm), collect the temperature value of the thermal resistance temperature sensor every 5 seconds, collect the data for 180 minutes, and obtain 2160 sets of data; divide the collected data into 36 parts in chronological order, each containing 60 sets of data; input the collected temperature data into the temperature advance prediction network in sequence, obtain the predicted value of the advance temperature of the water-cooled electric spindle, and then compare the predicted value with the measured value of the thermal resistance temperature sensor to test the temperature advance prediction effect of this method;
[0043] A7. Establish a mapping relationship between the temperature and thermal error of the water-cooled electric spindle, realize the advance prediction of the thermal error of the water-cooled electric spindle according to the temperature advance prediction result, and further realize the anti-compensation of the thermal error of the water-cooled electric spindle.
[0044] 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.
[0045] 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 the temperature of a water-cooled electric spindle based on a deep learning algorithm, characterized in that: The following steps are involved: S1. Arrange a plurality of temperature sensors on the surface of the water-cooled electric spindle; S2, start the water-cooled electric spindle, collect to The temperature data of the water-cooled electric spindle and the start and stop status of the compressor at the moment; to Temperature data of the water-cooled electric spindle at the moment; S3, repeating step S2 several times to obtain multiple sets of corresponding data; S4, using the data obtained in step S3 to train a temperature advance prediction network; S5. Collection to The temperature data of the water-cooled electric spindle at the moment is input into the temperature advance prediction network to obtain to The predicted value of the temperature of the water-cooled electric spindle at the time; The temperature advance prediction network is composed of an operating condition feature classification module and a temperature advance prediction module; the operating condition feature classification module is composed of a support vector machine algorithm and a Platt scaling algorithm in series; the temperature advance prediction module is composed of two neural networks, the two neural networks are arranged in parallel, and both of the two neural networks receive to The temperature data collected by the temperature sensor at the moment, and the output values of the two neural networks are added in proportion according to the predicted values of the working condition feature classification module, and the output to The predicted value of the temperature of the water-cooled electric spindle at the time.
2. According to claim 1, a method for advanced prediction of water-cooled electric spindle temperature based on deep learning algorithm is characterized in that: The input value of the working condition feature classification module is the temperature data collected by the temperature sensor, and the output value is in the range of A sequence of floating point numbers.
3. The method for advanced prediction of water-cooled electric spindle temperature based on deep learning algorithm according to claim 2 is characterized in that: Each neural network in the temperature advance prediction module is composed of a temporal convolutional network (TCN) and a fully connected network in series, and the output of each fully connected network is a sequence of the same dimension as the input value of the temporal convolutional network. The corresponding elements of the output values of the two neural networks are added in proportion according to the predicted values of the operating condition feature classification module. The calculation formula is: , where represents the output value of the working condition feature classification module, represents the output value of the first neural network, Represents the output value of the second neural network.
4. The method for predicting the temperature of a water-cooled electric spindle based on a deep learning algorithm according to claim 1, characterized in that: The training steps of the temperature advance prediction network are: S401. Definition to The temperature data of the water-cooled electric spindle at the time is the training data, and the definition to The start / stop state of the compressor at the moment is used as label data to train the operating condition feature classification module; S402, Definition to The temperature data of the water-cooled electric spindle at the time is the training data, and the definition to The temperature data of the water-cooled electric spindle at a certain moment is used as label data to train the temperature advance prediction module.
5. The method for advanced prediction of water-cooled electric spindle temperature based on deep learning algorithm according to claim 4 is characterized in that: Regarding the training of the working condition feature classification module, the key parameters of the vector machine are set as follows: the loss function is the cross entropy loss function, and the mathematical expression of the cross entropy loss function is: , In the formula, represents the number of samples, Indicates The real state value of the compressor in the sample, the real state value includes 0 or 1, Indicates The predicted state of the compressor in samples, the predicted state includes 0 or 1.
6. The method for advanced prediction of water-cooled electric spindle temperature based on deep learning algorithm according to claim 4 is characterized in that: Regarding the training of the temperature advance prediction module, the loss function of the key parameters is the mean square error. The mathematical expression of the mean square error loss function is: , Where MSE represents the mean square error, represents the number of samples, Indicates The measured temperature value of the water-cooled electric spindle described in the sample is Indicates The predicted temperature values of the water-cooled electric spindle described in the sample.