Machine tool machining parameter optimization method and system based on digital twinning
Through digital twin technology and neural network optimization algorithm, adaptive adjustment of CNC machine tool process parameters is achieved, solving the problems of many iterations of process parameter optimization and slow convergence speed in the existing technology, and improving machining accuracy and flexibility.
Patent Information
- Application Number
- CN202411366549.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-03
AI Technical Summary
During the processing process of existing CNC machine tools, the process parameter optimization algorithm has many iterations and the convergence speed is slow, making it difficult to meet the high-precision needs, and the control parameters cannot be adjusted according to the actual processing process, which affects the flexibility and efficiency of processing control.
Based on digital twin machine processing parameters optimization method, a digital twin model is established by obtaining real-time data, a parameter identification algorithm is used to optimize model parameters, a BP neural network prediction model is established, and a genetic algorithm is used to optimize the model structure to realize the self-contained process parameters of CNC machine tools. Adapt to adjustment.
It improves the machining accuracy and adaptability of CNC machine tools, can adjust control parameters in real time according to actual needs, and improves the flexibility and efficiency of component processing control.
Smart Images

Figure CN119247883A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of machine tool processing technology, and specifically to a machine tool processing parameter optimization method and system based on digital twin. Background Art
[0002] In the process of CNC machine tool processing, process parameters directly determine the quality of processed products, energy consumption of the processing process, processing efficiency, etc., and also determine the service life of the tool. At present, the setting of process parameters is generally based on manual experience, and then optimized. In order to reduce the energy consumption in the process of CNC machine tool processing, optimization algorithms are currently mainly used to optimize process parameters. Commonly used algorithms include simulated annealing algorithms, but this algorithm has problems such as too random parameter updates, resulting in too many iterations; and the end conditions are fixed and cannot be changed according to the actual convergence situation, resulting in a slow convergence speed, which is difficult to meet the high-precision requirements for optimizing process parameters.
[0003] The invention patent with announcement number CN117930787A discloses a method for optimizing process parameters of CNC machine tools, including: obtaining real-time process parameters and corresponding energy consumption of CNC machine tools based on a digital twin system; establishing a variety of black box models of energy consumption according to the process parameters and the corresponding energy consumption, and solving the black box model to obtain a mathematical model of the energy consumption of each part of the CNC machine tool; integrating the mathematical models of the energy consumption of each part into an energy consumption model for online prediction of the energy consumption of the CNC machine tool under the current process parameters.
[0004] The existing process parameter optimization method relies on digital twin technology to realize the interaction between the virtual platform and the actual CNC machine tool. It can obtain real-time data and monitor the status of the CNC machine tool. It can quickly optimize the process parameters and improve the convergence speed of the algorithm, thereby reducing the energy consumption of the CNC machine tool. However, this method only optimizes the working parameters of the machine tool before the CNC machine tool works. After the control parameters are set, the CNC machine tool will continue to use the same control parameters for CNC machining. During this process, the control parameters will not be adjusted. The complexity of the actual machining process is not taken into account, and the control parameters cannot be adjusted according to the complex and changeable situations in the machining process. It is not conducive to improving the flexibility of component machining control and component machining efficiency. Summary of the invention
[0005] In view of the shortcomings of the prior art, the present invention provides a machine tool processing parameter optimization method and system based on digital twins to solve the existing problems.
[0006] To achieve the above objectives, the present invention is implemented through the following technical solutions: a machine tool processing parameter optimization method based on digital twins, comprising the following steps:
[0007] S1: Obtain the machine tool model and the number of the workpiece to be processed, and based on the real-time processing data, obtain the real-time process parameters of the CNC machine tool and the corresponding various energy consumption data;
[0008] S2: According to the machine tool model, process parameters and corresponding energy consumption, the corresponding geometric model, mechanical kinematics model, energy consumption model and electromechanical coupling model are established, and the digital twin model of the CNC machine tool is obtained jointly;
[0009] S3: Use parameter identification algorithm to optimize the model parameters of the digital twin model, use the optimized digital twin model to simulate the machining process, and collect α groups of machining data;
[0010] S4: randomly select β groups from the α group data as the training sample data of the neural network, and the remaining data in the α group data as the performance test sample data, where α and β are both positive integers, and α>β;
[0011] S5: Establish an initial BP neural network prediction model P, use a genetic algorithm to optimize the structural parameters of the BP neural network prediction model P, and then normalize the β group data to train the BP neural network prediction model P1;
[0012] S6: Transmit the processing parameters optimized by the BP neural network prediction model P1 back to the CNC machine tool.
[0013] Preferably, the various energy consumptions in step S1 include process parameters regarding auxiliary system energy consumption, process parameters regarding main transmission system energy consumption, process parameters regarding feed system energy consumption, process parameters regarding cutting system energy consumption and process parameters regarding additional load energy consumption.
[0014] Preferably, in step S2, a 3D modeling software is used to establish a geometric model;
[0015] Use mechanical structure simulation software to connect the moving parts of the CNC machine tool, establish the relative motion relationship between the moving parts, and then obtain the mechanical kinematic model;
[0016] The servo motor part of the CNC machine tool is modeled using electrical co-simulation software to obtain an electromechanical coupling model.
[0017] Preferably, in step S3, when the CNC machine tool is processing, a variety of data acquisition devices are used to collect processing data in real time, and a parameter identification algorithm is used to identify the CNC machine tool parameters after preprocessing, and the model parameters of the digital twin model are optimized based on the CNC machine tool parameters.
[0018] Preferably, the genetic algorithm step S5 comprises:
[0019] A: The chromosomes are structured into control genes and parameter genes. The control genes are used to optimize the number of hidden layer nodes of the BP neural network prediction model P, and the parameter genes are used to optimize the connection weights and thresholds of the BP neural network prediction model P.
[0020] B: Set the fitness function:
[0021] f=a*f rmse +b*f rmse ,a,b∈(0,1);
[0022]
[0023] Among them, n is the number of training data samples, f rmse is the root mean square error of the training data, that is, the square root of the ratio of the square of the deviation between the predicted value and the true value to the number of training data samples n, y i is the actual value, is the predicted value; a, b are weights, a, b∈(0,1), Q(0) is the number of individuals in the original population, and Q(1) is the number of individuals in the optimized population;
[0024] C: Select the best individual to save the genetic algorithm, crossover and mutation, where the control gene and parameter gene use different encodings, the control gene encoding uses single-point crossover and basic mutation operators, and the parameter gene uses global arithmetic crossover and non-uniform mutation operators;
[0025] D: Set adaptive crossover probability:
[0026]
[0027] Among them, f avr is the average fitness of the population, f min is the minimum fitness of the population, f c is the fitness value of small crossover individuals, k1 and k2 are set to 1;
[0028] E: Set mutation probability:
[0029]
[0030] Among them, f m is the fitness value of the individual waiting for mutation, k3 and k4 are set to 0.5;
[0031] F: Normalized data:
[0032]
[0033] Among them, x i is the original data, u is the normalized data, x max 、xmin Maximum and minimum values of the original data, u max 、u min The upper and lower limits of the normalized data are respectively.
[0034] Preferably, the BP neural network prediction model P includes an input layer, an output layer and at least one hidden layer.
[0035] In step S5, after the training error accuracy of the BP neural network prediction model P1 is less than or equal to r, the remaining data in the input α group data is normalized and the performance of the BP neural network prediction model P1 is tested. When the training error accuracy is less than or equal to r, the BP neural network prediction model P1 is output.
[0036] The machine tool processing parameter optimization system based on digital twin includes:
[0037] A data acquisition module is used to obtain the overall structural parameters, operating status data, process parameters and corresponding energy consumption of the CNC machine tool to be controlled;
[0038] The model building module is used to establish a digital twin model and optimize the model parameters of the digital twin model using a parameter identification algorithm; it is also used to establish a subsequent initial BP neural network prediction model P and optimize the structural parameters of the BP neural network prediction model P using a genetic algorithm;
[0039] The model training module is used to simulate the machining process through the optimized digital twin model; it is also used to train the subsequent BP neural network prediction model P1;
[0040] An optimization processing module is used to control the corresponding CNC machine tool according to the processing parameters optimized by the BP neural network prediction model P1;
[0041] The storage module is used to store the data generated during the acquisition and construction process of the above modules.
[0042] Preferably, the system further comprises a memory, a processor and a computer program stored in the memory and executable on the processor.
[0043] Beneficial Effects
[0044] The present invention provides a method and system for optimizing machine tool processing parameters based on digital twins. Compared with the prior art, it has the following beneficial effects:
[0045] 1. The machine tool processing parameter optimization method and system based on digital twin generates a digital twin model of the CNC machine tool through the digital twin technology, adopts the parameter identification algorithm to optimize the model parameters of the digital twin model, establishes the initial BP neural network prediction model, and uses the genetic algorithm BP neural network prediction model for optimization and training. It can adaptively adjust the processing parameters of the CNC machine tool operating conditions, thereby improving the processing accuracy and adaptability of the entire CNC machine tool.
[0046] 2. The machine tool processing parameter optimization method and system based on digital twins obtains the operating status data reflecting the current operating status of the CNC machine tool, the component data reflecting the relevant information of the processed components, and the optimization control data reflecting the actual needs of the user. Based on these three, the trained machine tool optimization control model is used to automatically optimize and calculate to obtain the optimal target control parameters that can meet the actual needs of the user, thereby controlling the CNC machine tool. The control parameters of the CNC machine tool can be adjusted according to actual needs and considering the real-time processing status, which is beneficial to improving the flexibility of component processing control and the component processing effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is a schematic diagram of the method flow of the present invention;
[0048] Figure 2 It is a schematic diagram of system connection of the present invention;
[0049] Figure 3 It is a schematic diagram of the genetic algorithm flow of the present invention. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 creative work are within the scope of protection of the present invention.
[0051] See also Figure 1-3 , the present invention provides three technical solutions:
[0052] The first implementation method: a machine tool processing parameter optimization method based on digital twin, comprising the following steps:
[0053] S1: Obtain the machine tool model and the number of the workpiece to be processed, and based on the real-time processing data, obtain the real-time process parameters of the CNC machine tool and the corresponding various energy consumption data, including the process parameters about the energy consumption of the auxiliary system, the process parameters about the energy consumption of the main transmission system, the process parameters about the energy consumption of the feed system, the process parameters about the energy consumption of the cutting system, and the process parameters about the energy consumption of the additional load;
[0054] S2: According to the machine tool model, process parameters and corresponding energy consumption, the corresponding geometric model, mechanical kinematic model, energy consumption model and electromechanical coupling model are established, and the digital twin model of the CNC machine tool is obtained together. The geometric model is established using 3D modeling software; the moving parts of the CNC machine tool are connected using mechanical structure simulation software, and the relative motion relationship between the moving parts is established to obtain the mechanical kinematic model; the servo motor part of the CNC machine tool is modeled using electrical joint simulation software to obtain the electromechanical coupling model;
[0055] S3: using a parameter identification algorithm to optimize the model parameters of the digital twin model, using the optimized digital twin model to simulate the machining process, collecting α groups of machining data, and using a variety of data acquisition devices to collect machining data in real time when the CNC machine tool is machining. After preprocessing, the parameter identification algorithm is used to identify the CNC machine tool parameters, and the model parameters of the digital twin model are optimized based on the CNC machine tool parameters.
[0056] S4: randomly select β groups from the α group data as the training sample data of the neural network, and the remaining data in the α group data as the performance test sample data, where α and β are both positive integers, and α>β;
[0057] S5: Establish an initial BP neural network prediction model P, use a genetic algorithm to optimize the structural parameters of the BP neural network prediction model P, and then normalize the β group data to train the BP neural network prediction model P1. The BP neural network prediction model P includes an input layer, an output layer, and at least one hidden layer. After the training error accuracy of the BP neural network prediction model P1 is less than or equal to r, the remaining data in the α group data is input and normalized, and the performance of the BP neural network prediction model P1 is tested. When the training error accuracy is less than or equal to r, the BP neural network prediction model P1 is output;
[0058] S6: Transmit the processing parameters optimized by the BP neural network prediction model P1 back to the CNC machine tool.
[0059] In a second implementation manner, the genetic algorithm steps include:
[0060] A: The chromosomes are structured into control genes and parameter genes. The control genes are used to optimize the number of hidden layer nodes of the BP neural network prediction model P, and the parameter genes are used to optimize the connection weights and thresholds of the BP neural network prediction model P.
[0061] B: Set the fitness function:
[0062] f=a*f rmse +b*f rmse ,a,b∈(0,1);
[0063]
[0064] Among them, n is the number of training data samples, f rmse is the root mean square error of the training data, that is, the square root of the ratio of the square of the deviation between the predicted value and the true value to the number of training data samples n, y i is the actual value, is the predicted value; a, b are weights, a, b∈(0,1), Q(0) is the number of individuals in the original population, and Q(1) is the number of individuals in the optimized population;
[0065] C: Select the best individual to save the genetic algorithm, crossover and mutation, where the control gene and parameter gene use different encodings, the control gene encoding uses single-point crossover and basic mutation operators, and the parameter gene uses global arithmetic crossover and non-uniform mutation operators;
[0066] D: Set adaptive crossover probability:
[0067]
[0068] Among them, f avr is the average fitness of the population, f min is the minimum fitness of the population, f c is the fitness value of small crossover individuals, k1 and k2 are set to 1;
[0069] E: Set mutation probability:
[0070]
[0071] Among them, f m is the fitness value of the individual waiting for mutation, k3 and k4 are set to 0.5;
[0072] F: Normalized data:
[0073]
[0074] Among them, x i is the original data, u is the normalized data, x max 、x min Maximum and minimum values of the original data, u max 、u min The upper and lower limits of the normalized data are respectively.
[0075] In a third embodiment, the present invention further discloses a machine tool processing parameter optimization system based on digital twin, comprising:
[0076] A data acquisition module is used to obtain the overall structural parameters, operating status data, process parameters and corresponding energy consumption of the CNC machine tool to be controlled;
[0077] The model building module is used to establish a digital twin model and optimize the model parameters of the digital twin model using a parameter identification algorithm; it is also used to establish a subsequent initial BP neural network prediction model P and optimize the structural parameters of the BP neural network prediction model P using a genetic algorithm;
[0078] The model training module is used to simulate the machining process through the optimized digital twin model; it is also used to train the subsequent BP neural network prediction model P1;
[0079] An optimization processing module is used to control the corresponding CNC machine tool according to the processing parameters optimized by the BP neural network prediction model P1;
[0080] The storage module is used to store the data generated during the acquisition and construction process of the above modules.
[0081] It also includes a memory, a processor, and a computer program stored in the memory and run on the processor, and a communication interface, wherein the memory, the processor, and the communication interface are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these elements can be electrically connected to each other through one or more communication buses or signal lines. The memory can be used to store software programs and modules, and the processor executes various functional applications and data processing by executing the software programs and modules stored in the memory. The communication interface can be used to communicate signaling or data with other node devices.
[0082] In the embodiments provided in the present application, it should be understood that the disclosed methods, systems and methods can also be implemented in other ways. The method and system embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the methods, systems, methods and computer program products according to the multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0083] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0084] In one application scenario, a training model is used to predict the processing effects of different combinations of process parameters. During the processing, the process parameters are adjusted in real time to achieve the best processing effect. For example, feedback control, predictive control and other methods can be used to adjust parameters based on real-time collected data and established models. By analyzing and processing historical data, the configuration of process parameters can be further optimized to improve processing efficiency and quality. For example, data mining, machine learning and other technologies can be used to analyze historical data, extract rules and patterns, and adjust the process parameter configuration based on the analysis results.
[0085] Meanwhile, the contents not described in detail in this specification belong to the prior art known to those skilled in the art, and the model parameters of each electrical appliance are not specifically limited, and conventional equipment can be used.
[0086] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0087] Although 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 the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A machine tool processing parameter optimization method based on digital twins, characterized in that: The following steps are involved: S1: Obtain the machine tool model and the number of the workpiece to be processed, and based on the real-time processing data, obtain the real-time process parameters of the CNC machine tool and the corresponding various energy consumption data; S2: According to the machine tool model, process parameters and corresponding energy consumption, the corresponding geometric model, mechanical kinematics model, energy consumption model and electromechanical coupling model are established, and the digital twin model of the CNC machine tool is obtained jointly; S3: Use parameter identification algorithm to optimize the model parameters of the digital twin model, use the optimized digital twin model to simulate the machining process, and collect α groups of machining data; S4: randomly select β groups from the α group data as the training sample data of the neural network, and the remaining data in the α group data as the performance test sample data, where α and β are both positive integers, and α>β; S5: Establish an initial BP neural network prediction model P, use a genetic algorithm to optimize the structural parameters of the BP neural network prediction model P, and then normalize the β group data to train the BP neural network prediction model P1; S6: Transmit the processing parameters optimized by the BP neural network prediction model P1 back to the CNC machine tool.
2. The method for optimizing machine tool processing parameters based on digital twin according to claim 1, characterized in that: The various energy consumptions in step S1 include process parameters regarding auxiliary system energy consumption, process parameters regarding main transmission system energy consumption, process parameters regarding feed system energy consumption, process parameters regarding cutting system energy consumption, and process parameters regarding additional load energy consumption.
3. The method for optimizing machine tool processing parameters based on digital twin according to claim 1, characterized in that: In the step S2, a geometric model is established using 3D modeling software; Use mechanical structure simulation software to connect the moving parts of the CNC machine tool, establish the relative motion relationship between the moving parts, and then obtain the mechanical kinematic model; The servo motor part of the CNC machine tool is modeled using electrical co-simulation software to obtain an electromechanical coupling model.
4. The method for optimizing machine tool processing parameters based on digital twin according to claim 1, characterized in that: In step S3, when the CNC machine tool is processing, a variety of data acquisition devices are used to collect processing data in real time. After preprocessing, a parameter identification algorithm is used to identify the CNC machine tool parameters, and the model parameters of the digital twin model are optimized based on the CNC machine tool parameters.
5. The method for optimizing machine tool processing parameters based on digital twin according to claim 1, characterized in that: The step S5 genetic algorithm step comprises: A: The chromosomes are structured into control genes and parameter genes. The control genes are used to optimize the number of hidden layer nodes of the BP neural network prediction model P, and the parameter genes are used to optimize the connection weights and thresholds of the BP neural network prediction model P. B: Set the fitness function: f=a*f rmse +b*f rmse ,a,b∈(0,1); Among them, n is the number of training data samples, f rmse is the root mean square error of the training data, that is, the square root of the ratio of the square of the deviation between the predicted value and the true value to the number of training data samples n, y i is the actual value, is the predicted value; a, b are weights, a, b∈(0,1), Q(0) is the number of individuals in the original population, and Q(1) is the number of individuals in the optimized population; C: Select the best individual to save the genetic algorithm, crossover and mutation, where the control gene and parameter gene use different encodings, the control gene encoding uses single-point crossover and basic mutation operators, and the parameter gene uses global arithmetic crossover and non-uniform mutation operators; D: Set adaptive crossover probability: Among them, f avr is the average fitness of the population, f min is the minimum fitness of the population, f c is the fitness value of small crossover individuals, k1 and k2 are set to 1; E: Set mutation probability: Among them, f m is the fitness value of the individual waiting for mutation, k3 and k4 are set to 0.5; F: Normalized data: Among them, x i is the original data, u is the normalized data, x max 、x min Maximum and minimum values of the original data, u max 、u min The upper and lower limits of the normalized data are respectively.
6. The method for optimizing machine tool processing parameters based on digital twin according to claim 1, characterized in that: The BP neural network prediction model P includes an input layer, an output layer and at least one hidden layer.
7. The method for optimizing machine tool processing parameters based on digital twin according to claim 1, characterized in that: In step S5, after the training error accuracy of the BP neural network prediction model P1 is less than or equal to r, the remaining data in the input α group data is normalized and the performance of the BP neural network prediction model P1 is tested. When the training error accuracy is less than or equal to r, the BP neural network prediction model P1 is output.
8. The machine tool processing parameter optimization system based on digital twin is characterized by: include: A data acquisition module is used to obtain the overall structural parameters, operating status data, process parameters and corresponding energy consumption of the CNC machine tool to be controlled; The model building module is used to establish a digital twin model and optimize the model parameters of the digital twin model using a parameter identification algorithm; it is also used to establish a subsequent initial BP neural network prediction model P and optimize the structural parameters of the BP neural network prediction model P using a genetic algorithm; The model training module is used to simulate the machining process through the optimized digital twin model; it is also used to train the subsequent BP neural network prediction model P1; An optimization processing module is used to control the corresponding CNC machine tool according to the processing parameters optimized by the BP neural network prediction model P1; The storage module is used to store the data generated during the acquisition and construction process of the above modules.
9. The machine tool processing parameter optimization system based on digital twin according to claim 8, characterized in that: The system also includes a memory, a processor, and a computer program stored on the memory and executable on the processor.
Citation Information
Cited By
Abnormity detection method for magnesium-based alloy production raw material conveying system
CN119536187A
Machining parameter automatic optimization method and system for three-axis numerical control machine tool
CN120428655A
A machining parameter automatic optimization method and system for a three-axis numerical control machine tool
CN120428655B
Semi-autogenous mill steel consumption prediction and steel ball supplementing method based on digital twinning
CN120430145A
