Five-axis machining center real-time thermal error compensation system based on digital twinning and medium
The real-time thermal error compensation system of five-axis machining centers constructed through digital twin technology solves the problems of model mismatch and strong data dependence in the existing technology, realizes thermal error prediction and real-time compensation under different working conditions, and improves machining accuracy and stability.
Patent Information
- Application Number
- CN202511005681.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-07-22
AI Technical Summary
The thermal error compensation technology of the existing five-axis machining centers has problems such as model mismatch, strong data dependence, high deployment cost and compensation lag, making it difficult to adapt to the dynamic thermal characteristics of the machine tool in different seasons and working conditions, resulting in a decrease in machining accuracy.
The real-time thermal error compensation system of five-axis machining center based on digital twins is adopted to obtain physical measured data through the data acquisition unit. The digital twin processing unit constructs a set of models and performs data assimilation. It combines deep reinforcement learning and ensemble Kalman filtering algorithm to generate prospective compensation instructions, and adjusts the position and attitude of the tool center point in real time.
The control accuracy of real-time thermal error compensation for five-axis machining centers is improved, the robustness and applicability of the system are enhanced, and the changes in thermal errors under different working conditions are adapted to the risk of overcompensation is reduced, and the stability and accuracy of processing are improved.
Smart Images

Figure CN120508042A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of CNC machine tools, and in particular to a real-time thermal error compensation system and medium for a five-axis machining center based on digital twins. Background Art
[0002] Five-axis linkage machining centers are key equipment in high-end manufacturing fields such as aerospace, military industry, and precision molds. Their machining accuracy directly determines the performance and quality of core components. However, during the machining process, the machine tool's motor, spindle, ball screw and other heat sources will generate a large amount of heat, causing thermal deformation of the machine tool structure, and then causing the position and posture of the tool center point relative to the workpiece to shift. This shift is the thermal error.
[0003] At present, compensation technologies for thermal errors are mainly divided into two categories: passive control and active compensation. Passive control suppresses heat sources by improving the machine tool structure design, using low thermal expansion coefficient materials or forced cooling, but it is costly and difficult to completely eliminate thermal deformation. Active compensation uses the idea of "error modeling-real-time compensation" to establish a thermal error prediction model using temperature sensor data, and outputs compensation instructions in real time in the CNC system to adjust the servo axis position to offset thermal errors.
[0004] Traditional active compensation methods, such as multivariate linear regression and neural networks, have improved machining accuracy to a certain extent, but they still have the following bottlenecks: (1) Model mismatch problem: Once the traditional model is established, its parameters are relatively fixed, which makes it difficult to adapt to the changes in the dynamic thermal characteristics of the machine tool in different seasons and different processing conditions, resulting in a decrease in the accuracy of the model in long-term application.
[0005] (2) Strong data dependence and high deployment cost: Establishing a high-precision model usually requires a large amount of long-term experimental data, and each machine tool needs to independently carry out a tedious modeling process, resulting in a long implementation cycle and high cost.
[0006] (3) Compensation lag: Existing compensation systems are mostly “passive response”, that is, they predict and compensate for the current error based on the currently detected temperature. They lack the ability to predict future thermal trends and have poor compensation effects when working conditions change drastically.
[0007] To this end, a real-time thermal error compensation system and medium for a five-axis machining center based on digital twins are proposed. Summary of the Invention
[0008] The purpose of the present invention is to provide a real-time thermal error compensation system and medium for a five-axis machining center based on digital twins, which is used to improve the control accuracy of the real-time thermal error compensation of the five-axis machining center. First, a data acquisition unit is used to obtain physical measured data in real time; then, a digital twin processing unit constructs a model set to characterize the thermal dynamic behavior of the five-axis machining center, where the model set is composed of multiple virtual thermal model members; then, the physical measured data is integrated into the model set through a data assimilation algorithm to dynamically correct the state of each model member and predict the thermal error of the machine tool; the forward-looking compensation decision unit receives the thermal error prediction result output by the digital twin processing unit and generates a forward-looking compensation instruction; finally, the compensation execution unit sends the forward-looking compensation instruction to the numerical control system of the five-axis machining center for real-time adjustment; the present invention can improve the control accuracy of the real-time thermal error compensation of the five-axis machining center.
[0009] To achieve the above object, the present invention provides the following technical solutions: The real-time thermal error compensation system for a five-axis machining center based on digital twins includes: The data acquisition unit is placed on the five-axis machining center and is used to obtain physical measured data including machine tool temperature data and operating condition data in real time; a digital twin processing unit, communicating with the data acquisition unit, and internally constructing a model set for characterizing the thermal dynamic behavior of the five-axis machining center, the model set consisting of multiple virtual thermal model members; the digital twin processing unit is used to continuously integrate the physical measured data into the model set through a data assimilation algorithm to dynamically correct the state of each model member and predict the thermal error of the machine tool; a forward-looking compensation decision unit, configured to receive a thermal error prediction result output by the digital twin processing unit and generate a forward-looking compensation instruction for offsetting the expected thermal error based on the prediction result; The compensation execution unit is used to send the forward-looking compensation instruction to the numerical control system of the five-axis machining center to adjust the position and / or posture of the tool center point in real time.
[0010] Furthermore, the operating condition data includes but is not limited to spindle speed, spindle load, feed speed of each axis, servo motor load of each axis, cutting parameters, coolant temperature and ambient temperature. The operating condition data is used to characterize the operating status of the five-axis machining center and its thermal influencing factors.
[0011] Furthermore, the virtual thermal model members in the model set include multiple model instances, and the model types are divided into the following two cases: a finite element physical model constructed based on the three-dimensional geometry and thermodynamic principles of the machine tool, which is used to provide basic thermal dynamic response calculations; and a data-driven correction model trained based on historical operating data, which is used to output compensation values for the prediction results of the finite element physical model.
[0012] Furthermore, the digital twin processing unit continuously integrates the physical measured data into the model set through a data assimilation algorithm to dynamically correct the state of each model member and predict the thermal error of the machine tool. The process includes: At each time step, each virtual thermal model member in the model set is driven to independently predict the thermal state of the machine tool at the next moment based on its current state and the operating condition data; the thermal state of the machine tool includes but is not limited to temperature distribution, thermal deformation, and thermal error prediction value; When the actual temperature value of the machine tool at the next moment is obtained, the ensemble Kalman filter algorithm is used to compare the actual temperature value of the machine tool with the predicted state value of the model set, and a correction value is calculated based on the comparison result to update the state of each model member one by one; Based on the updated model set prediction state, the thermal error prediction value of the machine tool is obtained.
[0013] Furthermore, the prediction variance is extracted from the thermal error prediction value and its probability distribution of each model member as an uncertainty indicator; the mean square error between the predicted value and the measured value of each model member is calculated and recorded as the historical prediction error, and the error statistics are updated based on the sliding window; the confidence score is calculated by combining the prediction variance and the historical error; and the confidence score is passed to the forward-looking compensation decision unit to optimize the compensation instruction generation.
[0014] Furthermore, the forward-looking compensation decision unit includes a deep reinforcement learning agent for constructing a policy network; the policy network takes the state vector extracted from the digital twin processing unit to characterize the current and future thermal trends of the machine tool as state input, and maps it into the forward-looking compensation instruction for offsetting the expected thermal error.
[0015] Furthermore, the state vector of each model member predicted by the digital twin processing unit is multiplied by the corresponding confidence score to generate a weighted state vector; the weighted state vector is obtained by weighted average fusion; wherein, the confidence score is calculated during the processing of the digital twin processing unit; the weighted state vector is input into the strategy network to generate a compensation action vector.
[0016] Furthermore, the network parameters of the policy network are determined by performing offline iterative training in the virtual environment formed by the digital twin processing unit, and the training process includes: The deep reinforcement learning agent generates and executes a compensatory action sequence in a virtual environment; The digital twin processing unit uses the compensation action sequence to deduce the evolution result of the thermal error of the machine tool within a period of time in the future; The deep reinforcement learning agent calculates a reward value based on the evolution result of the machine tool thermal error, and uses a gradient optimization algorithm to update the network parameters of the policy network based on the reward value.
[0017] Furthermore, the forward-looking compensation decision unit further includes a compensation strategy adjustment module. The process of the compensation strategy adjustment module adjusting the forward-looking compensation instruction includes: Obtain the probability distribution generated by the ensemble Kalman filter algorithm for thermal error prediction and extract the variance from it as a risk metric; Convert the risk measurement indicator into a constraint parameter according to a preset mapping rule; The constraint parameters are used to post-process the forward-looking compensation instruction output by the forward-looking compensation decision unit to obtain a final compensation instruction; the post-processing operation includes limiting the maximum amplitude of the instruction and smoothing its time change rate.
[0018] Furthermore, a multi-objective optimization algorithm is introduced in the post-processing process, which comprehensively considers compensation accuracy, instruction smoothness and system response speed, and dynamically generates optimal constraint parameters. Among them, the objective function is set to minimize the thermal error residual after compensation, minimize the time change rate of the compensation instruction, minimize the delay of the compensation instruction, and minimize the gap between the confidence score and the threshold. Then, the original compensation instruction is post-processed using the constraint parameters after multi-objective optimization.
[0019] Compared with the prior art, the present invention has the following beneficial effects: 1. By utilizing the finite element physical model to provide accurate basic thermal dynamic response calculations, and combining it with a data-driven correction model to compensate for the finite element model prediction results, the thermal dynamic behavior of the five-axis machining center can be fully characterized. The combination of models can adapt to changes in thermal errors under different machining conditions, enhancing the robustness and applicability of the system. By integrating physical measured data and operating condition data in real time, the status of the virtual thermal model members is dynamically updated, enabling the model to adapt to changes in the thermal dynamic behavior of the machine tool under different working conditions. The ensemble Kalman filter algorithm is used to correct the predicted status, thereby improving the accuracy and reliability of thermal error prediction.
[0020] 2. By using the state vector provided by the digital twin processing unit as the input of the deep reinforcement learning agent, forward-looking compensation instructions are generated in real time, which can predict the future evolution trend of the machine tool thermal error in advance; the policy network containing the agent is trained offline in the digital twin virtual environment, calculates the reward value based on the thermal error evolution results, and uses the gradient optimization algorithm to update the parameters, so that the compensation instructions can adapt to different machine tool characteristics, processing conditions and environmental changes.
[0021] 3. By extracting the probability distribution variance of thermal error prediction as a risk metric, constraint parameters are generated to limit the maximum amplitude or smooth time rate of change of compensation instructions, thereby avoiding machining instability caused by over-compensation or sudden changes in instructions. Post-processing operations optimize forward-looking compensation instructions, making them smoother and more controllable, thereby improving the stability of compensation and the reliability of machining accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 Schematic diagram of the structure of the real-time thermal error compensation system for a five-axis machining center based on digital twins of the present invention; Figure 2 Schematic diagram of the implementation flow of the ensemble Kalman filter algorithm of the present invention; Figure 3 This is a flow chart of the implementation method of the real-time thermal error compensation system for a five-axis machining center based on digital twins of the present invention. DETAILED DESCRIPTION
[0023] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0024] See also Figures 1 to 3 The present invention provides a real-time thermal error compensation system and medium for a five-axis machining center based on digital twins. The technical solution is as follows:
[0025] Example 1: In order to improve the control accuracy of thermal error compensation of a five-axis machining center, a certain enterprise uses the real-time thermal error compensation system of a five-axis machining center based on digital twin proposed by this invention. The structure of the system is as follows: Figure 1 As shown, including: The data acquisition unit is placed on the five-axis machining center and is used to obtain physical measured data including machine tool temperature data and operating condition data in real time; Furthermore, the temperature data of the machine tool is collected and obtained through a temperature sensor; the operating condition data is obtained by first establishing communication between the data acquisition unit and the CNC system and programmable logic controller of the machine tool using an interface protocol, and then reading the data in real time through the communication channel; Furthermore, the operating condition data includes but is not limited to spindle speed, spindle load, feed speed of each axis, servo motor load of each axis, cutting parameters, coolant temperature and ambient temperature. The operating condition data is used to characterize the operating status of the five-axis machining center and its thermal influencing factors; Furthermore, the physical measured data needs to be preprocessed before being input into subsequent units for processing, including time alignment, outlier processing, denoising and normalization. Time alignment is achieved by combining timestamps with network time protocols to ensure that temperature data and operating condition data are strictly aligned in time. The outlier processing process is to first identify outliers using the Z-Score statistical method and then use the interpolation method to fill in the outliers. The denoising process uses the median filter method. The normalization process normalizes the data range to between [0, 1] to meet the input requirements of the subsequent model.
[0026] By collecting a variety of operating condition data and machine tool temperature data, rich input information can be provided for the digital twin model, thereby improving the accuracy of thermal error prediction. At the same time, the diversity of operating condition data can enhance the model's adaptability to dynamic conditions, thereby improving the control accuracy of real-time thermal error compensation of the five-axis machining center.
[0027] The digital twin processing unit communicates with the data acquisition unit and internally builds a model set to characterize the thermal dynamic behavior of the five-axis machining center. The model set is composed of multiple virtual thermal model members. The digital twin processing unit is used to continuously integrate physical measured data into the model set through a data assimilation algorithm to dynamically correct the status of each model member and predict the thermal error of the machine tool. Furthermore, the virtual thermal model members in the model set include multiple model instances. The model types are mainly divided into the following two cases: finite element physical models constructed based on the three-dimensional geometry and thermodynamic principles of the machine tool to provide basic thermal dynamic response calculations; and data-driven correction models trained based on historical operating data to output compensation values for the prediction results of the finite element physical model; Furthermore, the process of constructing a finite element physical model based on the three-dimensional geometry and thermodynamic principles of the machine tool includes: creating a three-dimensional geometric model in finite element software based on the structure of the five-axis machining center; defining the material thermophysical parameters of each machine tool component, such as thermal conductivity, specific heat capacity, density, and thermal expansion coefficient; setting boundary conditions for the heat source power and convection heat transfer coefficient; and using finite element software to solve the temperature field and thermal deformation based on the heat conduction model and thermal-structural coupling analysis, and outputting the thermal error prediction value. Furthermore, the data-driven correction model uses a long short-term memory network. The model input is the historical operating condition data and key point temperatures over a period of time, and the output is the correction value of the finite element physical model's prediction result at the next moment. The model is trained by using historical operating data, including historical operating conditions, historical key point temperatures, and the corresponding finite element physical model prediction values. The model parameters are optimized using the mean square error loss function, and dropout and L2 regularization are used during the training process to prevent overfitting of the model. Furthermore, the model set has a total of 50 virtual thermal model members, each of which is composed of a finite element physical model instance paired with a data-driven correction model instance. Fifty finite element physical model instances with different parameters are generated by performing Monte Carlo random sampling on the uncertainty parameters in the finite element physical model. The uncertainty parameters are set as the convective heat transfer coefficients of different parts. The data-driven correction model instances are obtained by training with 50 different training subsets. Then, finite element physical model instances with large thermal error prediction deviations are preferentially paired with data-driven correction model instances with high correction capabilities. Furthermore, data from multiple five-axis machining centers is collected to form a cross-machine dataset. Based on the shared data pool, a domain adaptive neural network is used to train a universal data-driven correction model. By utilizing the finite element physical model to provide accurate basic thermal dynamic response calculations, and combining it with a data-driven correction model to compensate for the finite element model prediction results, the thermal dynamic behavior of the five-axis machining center can be fully characterized. The combination of models can adapt to changes in thermal errors under different machining conditions and enhance the robustness and applicability of the system.
[0028] Furthermore, the digital twin processing unit continuously integrates physical measured data into the model set through a data assimilation algorithm to dynamically correct the status of each model member and predict the thermal error of the machine tool. The process includes: At each time step, each virtual thermal model member in the driving model set independently predicts the thermal state of the machine tool at the next moment based on its current state and operating condition data; the thermal state of the machine tool includes but is not limited to temperature distribution, thermal deformation, and thermal error prediction value; When the actual temperature value of the machine tool at the next moment is obtained, the ensemble Kalman filter algorithm is used to compare the actual temperature value of the machine tool with the predicted state value of the model set, and a correction value is calculated based on the comparison result to update the state of each model member one by one; Based on the updated model set prediction state, the thermal error prediction value of the machine tool is obtained; Furthermore, the state vector of each model member is defined as the thermal state of the machine tool, and the observation vector is defined as the measured temperature value of the machine tool; a state transition model and an observation model are defined; Furthermore, the state transition model obtains the current state vector by applying a nonlinear state transfer function to the state vector at the previous moment, the operating condition data at the current moment, and noise that follows a normal distribution. The nonlinear state transfer function is implemented by a finite element physical model and a data-driven correction model. Furthermore, the observation model maps the state vector at the current moment to the observation vector at the current moment by using the observation matrix and the observation noise that obeys the normal distribution; Furthermore, the implementation process of the ensemble Kalman filter algorithm is as follows Figure 2 As shown, it specifically includes: inputting each model member into the state transition model to obtain a predicted state set, and calculating the predicted state mean and predicted state covariance based on the predicted state set; when the actual temperature measurement value of the machine tool at the next moment is obtained, applying the observation model to the predicted state of each model member, and calculating the observation mean, observation covariance and state-observation covariance based on the observation vector of each model member; obtaining the Kalman gain based on the observation covariance and the state-observation covariance, and using the Kalman gain and the observation residual to update the current state of each model member, and outputting the updated state set; based on the updated state set, obtaining the thermal error prediction value through mean operation; Furthermore, the prediction variance is extracted from the thermal error prediction value and its probability distribution of each model member as an uncertainty indicator; the mean square error between the predicted value and the measured value of each model member is calculated and recorded as the historical prediction error, and the error statistics are updated based on the sliding window; the prediction variance and historical error are combined to calculate the confidence score; the confidence score is passed to the forward-looking compensation decision-making unit to optimize the compensation instruction generation, reduce the over-compensation risk, and further improve the accuracy of compensation control.
[0029] By integrating physical measured data and operating condition data in real time and dynamically updating the status of virtual thermal model members, the model can adapt to the changes in the thermal dynamic behavior of the machine tool under different working conditions. The ensemble Kalman filter algorithm is used to correct the predicted state, thereby improving the accuracy and reliability of thermal error prediction, thereby improving the control accuracy of real-time thermal error compensation of the five-axis machining center.
[0030] A forward-looking compensation decision unit is used to receive the thermal error prediction result output by the digital twin processing unit and generate a forward-looking compensation instruction for offsetting the expected thermal error based on the prediction result; Furthermore, the forward-looking compensation decision-making unit includes a deep reinforcement learning agent that is used to build a policy network. The policy network takes the state vector extracted from the digital twin processing unit, which is used to represent the current and future thermal trends of the machine tool, as state input and maps it into forward-looking compensation instructions for offsetting the expected thermal error. Furthermore, the state space of deep reinforcement learning is composed of state vectors, including temperature distribution, thermal error prediction value, and working condition state; the action space is composed of compensation value vectors related to tool center point parameters; Furthermore, the policy network is a deep fully connected network that takes as input the state vector of the machine tool’s current and future thermal trends extracted from the digital twin processing unit, and then outputs a vector of compensation values over a period of time, forming a sequence of compensation actions; Furthermore, the network parameters of the policy network are determined by offline iterative training in the virtual environment formed by the digital twin processing unit. The training process includes: Deep reinforcement learning agents generate and execute compensatory action sequences in virtual environments; The digital twin processing unit uses the compensation action sequence to deduce the evolution of the machine tool thermal error in the future; The deep reinforcement learning agent calculates the reward value based on the evolution of the machine tool's thermal error and uses a gradient optimization algorithm to update the network parameters of the policy network based on the reward value. Furthermore, during training, the deep reinforcement learning agent inputs the state vector into the policy network, adopts a probabilistic strategy, outputs the mean and variance of the compensation action, and then generates a compensation action sequence through random sampling to encourage exploration during training. Next, the compensation action sequence is input into the virtual environment to simulate the behavior of the machine tool CNC system after execution, and the state changes after the action is executed are recorded. The digital twin processing unit uses the compensated state vector as input to predict the state and residual thermal error at the next moment. Furthermore, the state vector of each model member predicted by the digital twin processing unit is multiplied by the corresponding confidence score to generate a weighted state vector; a weighted state vector is obtained through weighted averaging fusion; wherein the confidence score is calculated during the processing of the digital twin processing unit; the weighted state vector is input into the deep reinforcement learning policy network to generate a compensation action vector; by prioritizing the use of high-confidence states for compensation prediction, the reliability of compensation instructions can be enhanced and the risk of over-compensation can be reduced; Furthermore, the reward function is constructed as a weighted sum of the inverse of the square norm of the residual thermal error and the inverse of the square norm of the compensation change value; where the compensation change value represents the difference between the action vector at the current moment and the action vector at the previous moment; Furthermore, in the inference stage, the policy network directly outputs the determined compensation action vector as a forward-looking compensation instruction for real-time thermal error compensation.
[0031] By using the state vector provided by the digital twin processing unit as the input of the deep reinforcement learning agent, forward-looking compensation instructions are generated in real time, which can predict the future evolution trend of the machine tool thermal error in advance; the policy network containing the agent is trained offline in the digital twin virtual environment, calculates the reward value based on the thermal error evolution results, and uses the gradient optimization algorithm to update the parameters, so that the compensation instructions can adapt to different machine tool characteristics, processing conditions and environmental changes.
[0032] Furthermore, the forward-looking compensation decision unit further includes a compensation strategy adjustment module. The process of adjusting the forward-looking compensation instruction by the compensation strategy adjustment module includes: Obtain the probability distribution generated by the ensemble Kalman filter algorithm for thermal error prediction and extract the variance from it as a risk metric; According to the preset mapping rules, the risk measurement indicators are converted into constraint parameters; The forward-looking compensation instruction output by the forward-looking compensation decision unit is post-processed using constraint parameters to obtain a final compensation instruction; the post-processing operation includes limiting the maximum amplitude of the instruction and smoothing its time change rate; Furthermore, an exponential decay function is used to map the risk metric into a risk adjustment factor, which is used to adjust the original compensation instruction. The decay coefficient in the exponential decay function is used to adjust the sensitivity to risk. The original compensation instruction output by the deep reinforcement learning agent is multiplied by the risk adjustment factor to obtain the final compensation instruction. Furthermore, based on real-time operating condition data, a dynamic adjustment coefficient of the attenuation coefficient is calculated using a predefined mapping function, which can be a linear or sigmoid function. The dynamic adjustment coefficient is applied to the attenuation coefficient in the exponential attenuation function to dynamically adjust the risk sensitivity under complex operating conditions, thereby balancing compensation accuracy and system stability. Furthermore, a multi-objective optimization algorithm is introduced in the post-processing process, which comprehensively considers compensation accuracy, instruction smoothness and system response speed, and dynamically generates optimal constraint parameters. Among them, the objective function is set to minimize the thermal error residual after compensation, minimize the time change rate of the compensation instruction, minimize the delay of the compensation instruction, and minimize the gap between the confidence score and the threshold. Then, the original compensation instruction is post-processed using the constraint parameters after multi-objective optimization, which can balance accuracy, stability and real-time performance and enhance system adaptability.
[0033] By extracting the probability distribution variance of thermal error prediction as a risk metric, constraint parameters are generated to limit the maximum amplitude or smooth time rate of change of compensation instructions, thereby avoiding machining instability caused by over-compensation or sudden changes in instructions. Post-processing operations optimize forward-looking compensation instructions, making them smoother and more controllable, thereby improving the stability of compensation and the reliability of machining accuracy.
[0034] The compensation execution unit is used to send forward-looking compensation instructions to the CNC system of the five-axis machining center to adjust the position and / or posture of the tool center point in real time.
[0035] This embodiment proposes a real-time thermal error compensation system for a five-axis machining center based on digital twins. First, a data acquisition unit is used to acquire physical measured data in real time. Then, a digital twin processing unit constructs a model set to characterize the thermal dynamic behavior of the five-axis machining center, where the model set consists of multiple virtual thermal model members. Next, a data assimilation algorithm is used to integrate the physical measured data into the model set to dynamically correct the state of each model member and predict the thermal error of the machine tool. A forward-looking compensation decision unit receives the thermal error prediction results output by the digital twin processing unit and generates forward-looking compensation instructions. Finally, a compensation execution unit sends the forward-looking compensation instructions to the CNC system of the five-axis machining center for real-time adjustment. The present invention can improve the control accuracy of real-time thermal error compensation of the five-axis machining center.
[0036] Example 2: As an embodiment of the present invention, refer to Figure 3 , an implementation method of a real-time thermal error compensation system for a five-axis machining center based on digital twins, including: Real-time acquisition of physical measurement data including machine tool temperature data and operating condition data; Through data assimilation algorithms, physical measured data is continuously integrated into the model set to dynamically correct the status of each model member and predict the thermal error of the machine tool; the model set consists of multiple virtual thermal model members; Furthermore, the virtual thermal model members in the model set include multiple model instances. The model types are divided into the following two cases: finite element physical models constructed based on the three-dimensional geometry and thermodynamic principles of the machine tool to provide basic thermal dynamic response calculations; and data-driven correction models trained based on historical operating data to output compensation values for the prediction results of the finite element physical model; Furthermore, the process of continuously integrating the physical measured data into the model set through a data assimilation algorithm to dynamically correct the state of each model member and predict the thermal error of the machine tool includes: At each time step, each virtual thermal model member in the driving model set independently predicts the thermal state of the machine tool at the next moment based on its current state and operating condition data; the thermal state of the machine tool includes but is not limited to temperature distribution, thermal deformation, and thermal error prediction value; When the actual temperature value of the machine tool at the next moment is obtained, the ensemble Kalman filter algorithm is used to compare the actual temperature value of the machine tool with the predicted state value of the model set, and a correction value is calculated based on the comparison result to update the state of each model member one by one; Based on the updated model set prediction state, the thermal error prediction value of the machine tool is obtained.
[0037] Based on the thermal error prediction results, deep reinforcement learning is used to generate forward-looking compensation instructions to offset the expected thermal error, and a compensation strategy adjustment module is used to adjust the forward-looking compensation instructions; Furthermore, the process of adjusting the forward-looking compensation instruction using the compensation strategy adjustment module includes: Obtain the probability distribution generated by the ensemble Kalman filter algorithm for thermal error prediction and extract the variance from it as a risk metric; According to the preset mapping rules, the risk measurement indicators are converted into constraint parameters; The forward-looking compensation instruction output by the forward-looking compensation decision unit is post-processed using constraint parameters to obtain the final compensation instruction; the post-processing operation includes limiting the maximum amplitude of the instruction and smoothing its time change rate.
[0038] The following is a comparison of the compensation adjustment results for the X-axis position offset, Y-axis position offset, and tool attitude angle. The processing process includes: using deep reinforcement learning to map the model ensemble predicted state into initial compensation instructions, such as an X-axis offset of 50 μm, a Y-axis offset of 60 μm, and a tool attitude angle of 2 mrad; obtaining the thermal error prediction probability distribution generated by the ensemble Kalman filter, extracting its variance as a risk metric, and using an exponential decay function to calculate the corresponding risk adjustment factors (0.6703, 0.5488, and 0.7788); and multiplying the initial compensation instructions by the corresponding risk adjustment factors to obtain the adjusted compensation instructions, as shown in Table 1.
[0039] The forward-looking compensation instructions are sent to the CNC system of the five-axis machining center to adjust the position and / or posture of the tool center point in real time.
[0040] Table 1. Comparison results of compensation adjustment
[0041] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. Real-time thermal error compensation system for five-axis machining center based on digital twin, characterized by: include: The data acquisition unit is placed on the five-axis machining center and is used to obtain physical measured data including machine tool temperature data and operating condition data in real time; a digital twin processing unit, communicating with the data acquisition unit, and internally constructing a model set for characterizing the thermal dynamic behavior of the five-axis machining center, the model set consisting of multiple virtual thermal model members; the digital twin processing unit is used to continuously integrate the physical measured data into the model set through a data assimilation algorithm to dynamically correct the state of each model member and predict the thermal error of the machine tool; a forward-looking compensation decision unit, configured to receive a thermal error prediction result output by the digital twin processing unit and generate a forward-looking compensation instruction for offsetting the expected thermal error based on the prediction result; The compensation execution unit is used to send the forward-looking compensation instruction to the numerical control system of the five-axis machining center to adjust the position and / or posture of the tool center point in real time.
2. The real-time thermal error compensation system for a five-axis machining center based on digital twin according to claim 1 is characterized in that: The operating condition data includes but is not limited to spindle speed, spindle load, feed speed of each axis, servo motor load of each axis, cutting parameters, coolant temperature and ambient temperature. The operating condition data is used to characterize the operating status of the five-axis machining center and its thermal influencing factors.
3. The real-time thermal error compensation system for a five-axis machining center based on digital twin according to claim 1 is characterized in that: The virtual thermal model members in the model set include multiple model instances, and the model types are divided into the following two cases: a finite element physical model constructed based on the three-dimensional geometry and thermodynamic principles of the machine tool, which is used to provide basic thermal dynamic response calculations; and a data-driven correction model trained based on historical operating data, which is used to output compensation values for the prediction results of the finite element physical model.
4. The real-time thermal error compensation system for a five-axis machining center based on digital twin according to claim 1 is characterized in that: The digital twin processing unit continuously integrates the physical measured data into the model set through a data assimilation algorithm to dynamically correct the state of each model member and predict the thermal error of the machine tool. The process includes: At each time step, each virtual thermal model member in the model set is driven to independently predict the thermal state of the machine tool at the next moment based on its current state and the operating condition data; the thermal state of the machine tool includes but is not limited to temperature distribution, thermal deformation, and thermal error prediction value; When the actual temperature value of the machine tool at the next moment is obtained, the ensemble Kalman filter algorithm is used to compare the actual temperature value of the machine tool with the predicted state value of the model set, and a correction value is calculated based on the comparison result to update the state of each model member one by one; Based on the updated model set prediction state, the thermal error prediction value of the machine tool is obtained.
5. The real-time thermal error compensation system for a five-axis machining center based on digital twin according to claim 4 is characterized in that: The prediction variance is extracted from the thermal error prediction value and its probability distribution of each model member as an uncertainty indicator; the mean square error between the predicted value and the measured value of each model member is calculated and recorded as the historical prediction error, and the error statistics are updated based on the sliding window; the prediction variance and historical error are combined to calculate the confidence score; and the confidence score is passed to the forward-looking compensation decision unit to optimize the compensation instruction generation.
6. The real-time thermal error compensation system for a five-axis machining center based on digital twin according to claim 1 is characterized in that: The forward-looking compensation decision unit includes a deep reinforcement learning agent for constructing a policy network; the policy network takes the state vector extracted from the digital twin processing unit to characterize the current and future thermal trends of the machine tool as state input, and maps it into the forward-looking compensation instruction for offsetting the expected thermal error.
7. The real-time thermal error compensation system for a five-axis machining center based on digital twin according to claim 6 is characterized in that: The state vector of each model member predicted by the digital twin processing unit is multiplied by the corresponding confidence score to generate a weighted state vector; the weighted state vector is obtained by weighted average fusion; wherein, the confidence score is calculated during the processing of the digital twin processing unit; the weighted state vector is input into the policy network to generate a compensation action vector.
8. The real-time thermal error compensation system for a five-axis machining center based on digital twin according to claim 6 is characterized in that: The network parameters of the policy network are determined by performing offline iterative training in the virtual environment formed by the digital twin processing unit. The training process includes: The deep reinforcement learning agent generates and executes a compensatory action sequence in a virtual environment; The digital twin processing unit uses the compensation action sequence to deduce the evolution result of the thermal error of the machine tool within a period of time in the future; The deep reinforcement learning agent calculates a reward value based on the evolution result of the machine tool thermal error, and uses a gradient optimization algorithm to update the network parameters of the policy network based on the reward value.
9. The real-time thermal error compensation system for a five-axis machining center based on digital twin according to claim 1, characterized in that: The forward-looking compensation decision unit further includes a compensation strategy adjustment module. The process of adjusting the forward-looking compensation instruction by the compensation strategy adjustment module includes: Obtain the probability distribution generated by the ensemble Kalman filter algorithm for thermal error prediction and extract the variance from it as a risk metric; Convert the risk measurement indicator into a constraint parameter according to a preset mapping rule; The constraint parameters are used to post-process the forward-looking compensation instruction output by the forward-looking compensation decision unit to obtain a final compensation instruction; the post-processing operation includes limiting the maximum amplitude of the instruction and smoothing its time change rate.
10. The real-time thermal error compensation system for a five-axis machining center based on digital twin according to claim 9, characterized in that: A multi-objective optimization algorithm is introduced in the post-processing process, which comprehensively considers compensation accuracy, instruction smoothness, and system response speed to dynamically generate optimal constraint parameters. The objective function is set to minimize the thermal error residual after compensation, minimize the time change rate of the compensation instruction, minimize the delay of the compensation instruction, and minimize the gap between the confidence score and the threshold. The original compensation instruction is then post-processed using the constraint parameters after multi-objective optimization.
11. A storage medium having computer program instructions stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the real-time thermal error compensation system for a five-axis machining center based on digital twins as described in any one of claims 1 to 10 are implemented.
Citation Information
Patent Citations
Numerical control machine tool feed shaft thermal error monitoring method based on digital twinning
CN110968038A
Machine tool thermal error self-learning prediction model modeling method and machine tool thermal error control method based on digital twinning
CN113051831A
Numerical control machine tool machining precision intelligent control method based on digital twinning
CN117608238A
Contour error prediction compensation control method for high-precision complex aluminum component machining
CN118897511A
Method and system for producing non-standard precision parts
CN119167551A
Cited By
Dynamic error real-time compensation method and system for heavy-load vertical machining center
CN120762349A
PLC-based textile processing progress automatic tracking system
CN121115652A
A system for automatically tracking the progress of textile processing based on plc
CN121115652B
Intelligent factory fault prediction self-repairing system based on digital twinning and deep reinforcement learning
CN121143258A
Intelligent factory fault prediction self-repair system based on digital twin and deep reinforcement learning
CN121143258B