Virtual trial cutting process optimization method based on genetic algorithm
By combining genetic algorithms with virtual trial cutting simulation, the process optimization method solves the problem of relying on manual experience in traditional process planning, realizes efficient and low-loss processing of complex geometric structures, and achieves global optimization of accuracy and efficiency.
Patent Information
- Application Number
- CN202610091922.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-23
- Publication Date
- 2026-02-24
AI Technical Summary
Traditional process planning methods rely on manual experience in the precision machining of complex geometries, resulting in long development cycles, high material consumption, and difficulty in achieving global optimization of cutting efficiency and accuracy, thus failing to meet the high-end machining needs of modern manufacturing.
A virtual trial cutting process optimization method based on genetic algorithm is adopted. Through gene encoding and geometric-physical-control co-simulation model, the process parameters are automatically optimized, reducing the dependence on actual trial cutting. Combined with roulette wheel, crossover and mutation operations, the global optimal solution is gradually approached.
It significantly shortens the process planning cycle, reduces material loss, achieves multi-objective collaborative optimization of processing accuracy, efficiency and load, and improves the automation level and globality of parameter optimization.
Smart Images

Figure CN121560002A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of CNC machining process optimization, and more specifically, to a virtual trial cutting process optimization method based on genetic algorithms. Background Technology
[0002] In the field of mechanical manufacturing, especially in the precision machining of complex geometric structures such as integral bladed disks for aero engines, the process planning stage has long relied on computer-aided manufacturing software and manual setting of cutting parameters by engineers. This traditional model faces multiple technical bottlenecks: First, engineers need to repeatedly conduct trial cuts on actual machine tools to verify the feasibility of combinations of parameters such as cutting depth and feed rate, resulting in a significant extension of the development cycle and a large amount of raw material waste; second, the cutting process involves complex coupling relationships between multiple dimensions of parameters such as spindle speed and cutting width, and human experience is insufficient to achieve global optimization of cutting efficiency while meeting strict machining accuracy requirements, making the quality of the process path highly dependent on the individual skill level of the operators; third, existing AI-based parameter-assisted selection schemes still cannot be separated from actual trial cut verification and must rely on historical machining data for model training, failing to solve the problems of trial cut dependence and experience limitations in the process planning process. These shortcomings make traditional process planning methods significantly inadequate in terms of cost control, time efficiency, and quality stability, making it difficult to meet the urgent needs of modern high-end manufacturing for high-precision and high-efficiency machining of complex components.
[0003] To address the aforementioned issues, existing technologies urgently need improvement. Summary of the Invention
[0004] In view of this, the present invention provides a virtual trial cutting process optimization method based on genetic algorithm, which has the advantages of reducing dependence on actual trial cutting, shortening process planning cycle, reducing material loss, and achieving multi-objective synergistic optimization of processing accuracy, efficiency and load.
[0005] This invention provides a virtual trial cutting process optimization method based on a genetic algorithm, comprising the following steps: S1. Genetically encode the process parameters to be optimized and randomly generate an initial population containing multiple process schemes; each process scheme corresponds to a set of gene codes; each set of gene codes corresponds to a complete and unique set of process parameter settings; through predefined process parameter-CAM instruction mapping rules, each set of process parameter settings corresponds to a unique CAM processing path. S2. Construct a geometric-physical-control co-simulation world model; S3. Input the multiple gene codes from the initial population into the geometric-physical-control co-simulation world model, perform virtual trial cutting according to the CAM processing path corresponding to each gene code, and output the fitness of each process scheme. S4. Based on the fitness of each process scheme, perform selection, crossover, and mutation operations on the initial population to generate a new generation population; S5. Input the multi-group gene codes from the new generation population into the geometric-physical-control co-simulation world model, repeat steps S3 and S4 until the preset number of iterations is reached, and evaluate and select the process scheme with the highest fitness from the last generation population as the final process planning result.
[0006] In one optional implementation, in step S1, the process parameters include enumerated parameters and floating-point parameters; wherein, the enumerated parameters include, but are not limited to, cutting modes; and the floating-point parameters include, but are not limited to, spindle speed, feed rate, depth of cut, and width of cut.
[0007] In an optional implementation, S3 further includes: During the virtual trial cutting process, the cutting state data output by the geometry-physics-control co-simulation world model is monitored in real time; based on the comparison between the cutting state data and the preset safety threshold, the type of the current area is determined; the type includes dangerous areas and safe areas; When a dangerous area is identified, the feed rate is reduced according to the first preset adjustment function; when a safe area is identified, the feed rate is increased according to the second preset adjustment function.
[0008] In one optional implementation, S4 specifically includes: S41. Based on the fitness of each process scheme, a number of target process schemes are selected from the initial population using the roulette wheel method. S42. Using the populations corresponding to multiple target process schemes as parents, randomly select two or more coding sites of the target process schemes from the parents and perform gene segment crossover to generate offspring. S43. Perform mutation operation on the offspring with a preset mutation probability to obtain a new offspring, and replace the process scheme with the lowest fitness in the initial population with the process scheme in the new offspring to obtain a new generation population.
[0009] In an alternative implementation, in S43, the mutation operation includes: For the encoding of enumeration class parameters, mutation is performed by randomly selecting new values; For the encoding of floating-point parameters, a mutation method is adopted to generate new values based on the current value and according to a normal distribution.
[0010] In one optional implementation, the fitness calculation expression is:
[0011] in, For machining accuracy; For processing efficiency; For processing load; The machining accuracy The value ranges from 0 to 1, and the value decreases as the number of out-of-tolerance points identified in the virtual trial cut increases. The processing efficiency This is the reciprocal of the total processing time for the virtual trial cut; The processing load The result is calculated based on a weighted combination of multiple factors, including but not limited to maximum cutting force, tool wear rate, and chatter risk.
[0012] In one optional implementation, in step S41, the roulette wheel betting method is specifically implemented as follows: For each process option in the current population, the probability of it being selected is... P k The calculation formula is:
[0013] in, The suitability of the selected process solution This is the sum of the fitness of all process schemes in the current population.
[0014] As can be seen from the above, the virtual trial cutting process optimization method based on genetic algorithm provided in this application realizes virtual trial cutting verification by constructing a geometric-physical-control co-simulation world model, and combines genetic algorithm to perform multi-generation iterative optimization of process parameters. This effectively avoids the dependence on actual machine tool trial cutting in traditional process planning, significantly improves the automation level and globality of parameter optimization, and has the advantages of reducing dependence on actual trial cutting, shortening process planning cycle, reducing material loss, and achieving multi-objective co-optimization of processing accuracy, efficiency and load. Attached Figure Description
[0015] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0016] Figure 1 This is a flowchart illustrating a virtual trial cutting process optimization method based on a genetic algorithm according to an embodiment of the present invention. Figure 2 This is a diagram illustrating the initial population generation process according to an embodiment of the present invention; Figure 3 This is a diagram of the virtual trial cutting process of the geometry-physics-control co-simulation world model according to an embodiment of the present invention; Figure 4 yes Figure 3 A magnified view of a portion of the virtual test cutting process in the virtual test cutting diagram; Figure 5 yes Figure 3 A magnified view of the virtual measurement of processing quality in the virtual trial cutting process diagram; Figure 6 This is a diagram illustrating the mutation and crossover process according to an embodiment of the present invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] like Figure 1 As shown in the figure, this application proposes a virtual trial cutting process optimization method based on genetic algorithm, including the following steps: Step S1: Genetically encode the process parameters to be optimized, and randomly generate an initial population containing multiple process schemes; each process scheme corresponds to a set of gene codes; each set of gene codes corresponds to a complete and unique set of process parameter settings; each set of process parameter settings generates a unique CAM machining path through predefined process parameter-CAM instruction mapping rules (e.g., automatically calling the corresponding tool path generation algorithm based on parameters such as cutting mode, cutting depth, and cutting width), such as... Figure 2 As shown.
[0019] As an example, the execution of a mapping rule may include: S11. Based on the cutting pattern in the process parameter settings, match the corresponding target algorithm from multiple predefined toolpath generation algorithms; S12. Input the cutting depth and cutting width in the process parameter settings into the target algorithm, and calculate the corresponding tool center geometric motion trajectory according to the geometric kinematic equation contained in the target algorithm. S13. Assign the spindle speed and feed rate in the process parameter settings to the geometric motion trajectory of the tool center, and convert them into a standard G-code instruction sequence that can be executed by the machine tool according to the post-processing rules preset for the target CNC machine tool, thereby obtaining a unique CAM machining path.
[0020] Step S2: Construct a geometry-physics-control co-simulation world model.
[0021] The geometry-physics-control co-simulation world model is a self-built integrated simulation system constructed through secondary development of commercial simulation platforms (such as Siemens NX, Dassault Systèmes SIMULIA, etc.). This model includes at least: a geometry simulation module for simulating the geometry, relative motion, and material removal process of the workpiece and tool; a physics simulation module for calculating physical effects such as cutting forces, vibrations, and thermal deformation during the cutting process; and a control simulation module for simulating the interpolation, servo response, and other control behaviors of the CNC system. These three modules are coupled in real-time through a data interface, forming a virtual trial-cutting environment that comprehensively reflects the interactions of geometry, physics, and control in actual machining.
[0022] Step S3: Input the multiple gene codes from the initial population into the geometric-physical-control co-simulation world model, perform virtual trial cutting according to the CAM processing path corresponding to each gene code, and output the fitness of each process scheme, such as... Figures 3-5 As shown.
[0023] Step S4: Based on the fitness of each process scheme, perform selection, crossover, and mutation operations on the initial population to generate a new generation population.
[0024] Step S5: Input the multi-group gene codes from the new generation population into the geometric-physical-control co-simulation world model, repeat steps S3 and S4 until the preset number of iterations is reached, and evaluate and select the process scheme with the highest fitness from the last generation population as the final process planning result.
[0025] The innovation of this application lies in the deep integration of genetic algorithms and virtual trial-cutting simulation to construct a closed-loop optimization system, fundamentally avoiding the process of repeated manual trial-cutting. Specifically, by converting complex process parameters into gene-encoded forms and combining them with a collaborative simulation model for virtual trial-cutting, automated optimization of process parameters is achieved. Simultaneously, through iterative selection, crossover, and mutation operations, the system gradually approaches the global optimum, thus solving the problems of high time costs, material waste, and difficulty in achieving optimal cutting efficiency while ensuring machining accuracy, which are inherent in traditional process planning that rely on manual experience to set parameters and involve repeated trial-cutting verification.
[0026] The working principle of this application embodiment is as follows: First, the process parameters to be optimized are genetically encoded, and an initial population containing multiple process schemes is randomly generated. Each process scheme corresponds to a set of genetic codes, each set of genetic codes corresponds to a complete and unique set of process parameter settings, and each set of process parameter settings generates a unique CAM machining path. In this way, complex process parameters are transformed into a computable form, laying the foundation for subsequent automated evaluation and optimization, while the diverse initial population ensures broad coverage of the search space. Furthermore, a geometry-physics-control co-simulation world model is constructed. This model can comprehensively simulate the geometry, physical phenomena, and control system behavior in the actual cutting process, thereby predicting the machining effect without actual machine tool trial cutting, significantly reducing time and material costs. Next, multiple sets of genetic codes from the initial population are input into the simulation model, and virtual trial cutting is performed according to the CAM machining path corresponding to each set of genetic codes, and the fitness of each process scheme is output. Fitness, as a quantitative indicator, objectively reflects the comprehensive performance of the process scheme in terms of machining accuracy, efficiency, and load, replacing the traditional subjective judgment method that relies on human experience. Based on the fitness of each process scheme, selection, crossover, and mutation operations are performed on the initial population to generate a new generation. Selection prioritizes high-fitness schemes, crossover generates new schemes through gene fragment exchange, and mutation introduces random variations to prevent premature convergence to local optima, collectively driving the population towards a better solution. Finally, multiple sets of gene codes from the new generation are input back into the simulation model, and virtual trial cutting and optimization operations are repeated until a preset number of iterations is reached. The process scheme with the highest fitness is selected from the final generation as the final process planning result. Thus, through the closed-loop optimization system described above, the optimal combination of cutting parameters is automatically found while ensuring machining accuracy. This fundamentally solves the problems of high time costs, material waste, and difficulty in balancing accuracy and efficiency caused by reliance on manual experience and repeated trial cutting verification in traditional process planning.
[0027] In one optional implementation, in step S1, the process parameters include enumerated parameters and floating-point parameters; wherein, the enumerated parameters include, but are not limited to, the cutting mode; and the floating-point parameters include, but are not limited to, the spindle speed, the feed rate, the depth of cut, and the width of cut.
[0028] Specifically, process parameters refer to various control variables that need to be set during the machining process, directly affecting the machining effect and efficiency. In practical applications, process parameters can be divided into two categories: enumerated parameters and floating-point parameters. Enumerated parameters are parameters with discrete value characteristics, such as the cutting mode, whose possible values are limited options such as spiral or reciprocating. This classification method ensures that subsequent mutation operations only randomly switch within a preset range, avoiding the generation of invalid process states. Floating-point parameters, on the other hand, are parameters with continuously changing characteristics, such as spindle speed, feed rate, depth of cut, and width of cut. These parameters support normal distribution perturbation centered on the current value during mutation, thereby achieving fine exploration of the parameter space. Through the above classification design, the genetic code can truly reflect the engineering constraints of process parameters and significantly improve the search guidance of genetic algorithms in complex parameter combinations.
[0029] Specifically, in the gene encoding and initial population generation stages, the explicit differentiation of process parameters effectively solves the problems of encoding distortion and search efficiency caused by the conflation of parameter characteristics. In actual operation, process parameters are first classified according to their physical nature. For enumeration-type parameters such as cutting modes, mutation operations are performed by directly and randomly selecting new values. This method can efficiently explore the optimal solution within a limited set of discrete options. For floating-point-type parameters such as spindle speed, feed rate, depth of cut, and width of cut, mutation operations are performed by generating new values centered on the current value according to a normal distribution. This method allows for a fine search near the current optimal solution while maintaining a certain level of exploration capability, avoiding getting trapped in local optima. Furthermore, this differentiated processing not only improves the accuracy of the encoding strategy but also lays a precise parameter expression foundation for virtual trial cutting optimization, thereby significantly improving the applicability and robustness of genetic algorithms in complex process optimization problems.
[0030] Through the above technical solutions, the classification design of process parameters makes gene encoding closer to actual physical meaning, avoiding information loss or unnatural quantification problems caused by uniform encoding in traditional methods. At the same time, this solution, through targeted mutation strategies, ensures effective exploration of the parameter space while improving the algorithm's convergence speed and the probability of finding the global optimum, thus providing a more efficient and reliable optimization method for process planning of complex components.
[0031] In an optional implementation, step S3 further includes: During the virtual trial cutting process, the cutting state data output by the geometry-physics-control co-simulation world model is monitored in real time; based on the comparison between the cutting state data and the preset safety threshold, the type of the current area is determined; the type includes dangerous areas and safe areas; When a dangerous area is identified, the feed rate is reduced according to the first preset adjustment function; when a safe area is identified, the feed rate is increased according to the second preset adjustment function.
[0032] Specifically, the virtual trial cutting process refers to the process of simulating machining processes using a geometric-physical-control co-simulation world model, with the aim of evaluating the suitability of each process scheme. The danger zone can be understood as the area where excessive cutting forces or high chatter risk are detected during virtual trial cutting; these areas may lead to tool overload or surface defects. The safe zone refers to the area with stable cutting conditions and sufficient allowance, possessing the potential to increase the feed rate. The first and second preset adjustment functions can be predefined based on the process optimization objectives.
[0033] Specifically, during virtual trial cutting, the system monitors cutting status data in real time, such as cutting force and chatter risk, and dynamically adjusts the feed rate based on this data. When excessive cutting force or chatter risk is detected in a certain area, the system identifies the current area as a danger zone. Based on the degree to which the current cutting force or chatter risk exceeds the maximum allowable threshold, the system calculates and reduces the feed rate of the current area in real time according to a first preset adjustment function to ensure the safety of the tool and workpiece. Simultaneously, when the cutting conditions in a certain area are relatively conservative and there is room for efficiency improvement, the system identifies the current area as a safe zone. Based on the margin of cutting conditions or efficiency below the threshold, the system calculates and increases the feed rate of the current area in real time according to a second preset adjustment function to fully utilize machine tool performance and shorten machining time. This dynamic adjustment mechanism transforms virtual trial cutting from a passive verification process to an active optimization process, enabling a dynamic balance between accuracy and efficiency without the need for actual trial cutting.
[0034] The first preset adjustment function can be set as follows:
[0035] in, The adjusted feed rate; Original feed rate; Preset safety threshold; This is the cutting status data.
[0036] The second preset adjustment function can be set to operate within the limits of the machine tool's maximum feed rate and to ensure machining accuracy, based on... - The feed rate can be increased linearly or non-linearly to optimize machining efficiency.
[0037] Furthermore, the aforementioned dynamic adjustment mechanism is closely integrated with the iterative process of the genetic algorithm. In each generation of the virtual cutting trial, by dynamically adjusting the feed rate, the fitness of each process scheme can be more accurately evaluated, thus providing more precise basic data for subsequent selection, crossover, and mutation operations. This approach not only solves the problem that static virtual cutting cannot simultaneously achieve both processing accuracy and efficiency, but also significantly improves the efficiency of the optimization process and the reliability of the results.
[0038] Through the above technical solution, the virtual trial cutting process can dynamically adjust the feed speed according to the real-time simulation results, effectively avoiding tool damage in dangerous areas and low efficiency in safe areas, and achieving the global optimal balance between machining accuracy and efficiency.
[0039] In one optional implementation, step S4 specifically includes: S41. Based on the fitness of each process scheme, multiple target process schemes are selected from the initial population using the roulette wheel method.
[0040] S42. Using the populations corresponding to multiple target process schemes as the parent generation, randomly select multiple coding sites of two or more target process schemes from the parent generation and perform gene segment crossover to generate offspring, such as... Figure 6 The cross-operation process is shown.
[0041] S43. Perform mutation operations on the offspring with a preset mutation probability to obtain new offspring, and replace the process scheme with the lowest fitness in the initial population with the process scheme in the new offspring to obtain a new generation population, such as... Figure 6 The mutation operation process is shown.
[0042] Roulette wheel selection is a selection mechanism based on fitness ratios, which can be implemented using a formula. The purpose of this approach is to ensure that the selection probability is directly related to the quality of the proposed solutions, while preserving a small selection opportunity for low-fitness solutions to maintain diversity. Gene crossover refers to the process of gene recombination at multiple coding sites. This can be achieved by randomly selecting multiple locations and exchanging gene segments between parents, aiming to effectively integrate the characteristics of different excellent solutions and enhance the innovation and diversity of offspring solutions. The preset mutation probability is a parameter set to introduce randomness into the offspring. It can be flexibly adjusted according to actual needs, aiming to prevent premature convergence and ensure the continuous improvement of the overall population quality by selectively replacing the worst individuals.
[0043] Specifically, the above scheme operates as follows: First, in the selection phase, based on the fitness of each process scheme, a roulette wheel algorithm is used to calculate the probability of each individual being selected. This mechanism ensures that individuals with higher fitness have a greater probability of being selected, thereby driving the population to evolve towards a better solution. Simultaneously, individuals with low fitness still have a chance to be retained, preventing the population from prematurely converging to a local optimum. Second, in the crossover phase, multiple coding sites are randomly selected from the parents for gene segment crossover, overcoming the limitations of single-point crossover and allowing gene recombination at multiple locations simultaneously. This significantly improves the diversity and innovation of offspring schemes, especially when dealing with complex process parameters, enabling a more thorough exploration of the solution space. Finally, in the mutation phase, offspring are mutated with a preset mutation probability, and the process scheme with the lowest fitness in the initial population is replaced by a new offspring. This introduces necessary randomness to prevent the algorithm from getting trapped in local optima, while replacing the worst individual ensures the overall quality of the population continuously improves. This design allows the algorithm to efficiently drive the population to evolve towards the global optimum during the iteration process.
[0044] The above technical solutions solve the problems of lack of scientific mechanism in selection operation, support for single-point exchange in crossover operation, and unclear strategies for mutation operation and individual replacement, and significantly improve the search efficiency and global optimization capability of genetic algorithm in process optimization.
[0045] In one alternative implementation, step S43 includes the mutation operation: For the encoding of enumeration class parameters, mutation is performed by randomly selecting new values; For the encoding of floating-point parameters, a mutation method is adopted to generate new values based on the current value and according to a normal distribution.
[0046] Specifically, enumerated parameters refer to process parameters with discrete and finite options. Mutation can be achieved by randomly selecting new values directly from a preset set of options. This approach aims to ensure that the mutation results always remain within the range of feasible options, avoiding invalid values or quantization errors that may arise from continuous mutation, thereby improving the targeting and feasibility of parameter adjustments. Floating-point parameters refer to process parameters that are continuously changing. Mutation can be achieved by randomly generating new values based on the current value and using a normal distribution. This approach aims to maintain the local continuity of the solution while utilizing the characteristics of the normal distribution to balance fine-grained search and random exploration within small fluctuations around the current solution. This prevents stability degradation caused by large jumps and avoids premature convergence to local optima, thereby enhancing global optimization capabilities.
[0047] Specifically, the above scheme effectively addresses the limitations of a uniform mutation method in complex process parameter spaces by implementing differentiated mutation strategies for different types of process parameters. In actual operation, the system first determines whether a process parameter is enumerated or floating-point based on its type. For enumerated parameters, the system randomly selects a new value from a predefined finite set of options as the mutation result. This process ensures that the mutated parameter always conforms to the actual process requirements, avoiding the generation of invalid values. For floating-point parameters, the system generates a new parameter value centered on the current value according to a normal probability density function. This approach introduces a moderate degree of randomness while maintaining local continuity, enabling fine-grained searching within a small range while retaining a certain degree of global exploration capability. By employing appropriate mutation mechanisms for different types of parameters, the search efficiency of the genetic algorithm in complex process parameter spaces is significantly improved, and the algorithm's robustness and adaptability are enhanced, enabling it to more efficiently cover the parameter space and quickly converge to the global optimum.
[0048] In summary, the above-mentioned scheme solves the problems of insufficient parameter space coverage, slow convergence speed, and easy getting trapped in local optima that may be caused by the traditional uniform mutation strategy by differentiating the mutation operations of enumeration class and floating-point class parameters. It provides a more efficient and reliable solution for optimizing complex process parameters.
[0049] In one alternative implementation, the fitness calculation expression is:
[0050] in, For machining accuracy; For processing efficiency; For processing load; Machining accuracy The value ranges from 0 to 1, and the value decreases as the number of out-of-tolerance points identified in the virtual trial cut increases. Processing efficiency This is the reciprocal of the total processing time for the virtual trial cut; Processing load The result is calculated based on a weighted combination of multiple factors, including but not limited to maximum cutting force, tool wear rate, and chatter risk.
[0051] Specifically, machining accuracy This refers to a key indicator for evaluating workpiece surface quality during virtual trial cutting. It can be achieved by counting the number of out-of-tolerance points and combining this with a preset attenuation function. Its purpose is to ensure that high-precision solutions receive higher weight in fitness evaluations, avoiding evaluation biases caused by relying solely on empirical thresholds. Among these, processing efficiency... This can be understood as a quantitative indicator directly related to processing time. Specifically, it can be achieved by recording the total time consumed during a virtual trial cut and calculating its reciprocal. This design naturally makes the algorithm tend to favor solutions that shorten processing time during optimization. In practical applications, processing load... Specifically, a multi-factor integrated approach is used to evaluate the stability and safety requirements during the machining process. For example, a weighted combination calculation method can be used, which includes the maximum cutting force, tool wear rate, and chatter risk. The aim is to ensure that the optimized solution is not only highly efficient and precise, but also effectively extends tool life and reduces machining risks.
[0052] Specifically, the fitness function design effectively solves the balance problem in multi-objective optimization by comprehensively considering three key dimensions: machining accuracy, efficiency, and load. During the virtual trial cutting process, the system first calculates the machining accuracy based on the number of out-of-tolerance points. At the same time, the total processing time is recorded to determine the processing efficiency. The processing load was calculated using a multi-factor weighted calculation. Based on this, the three indicators are integrated into a product to form the final fitness value F, which mandates that each indicator must reach a reasonable level, as a significant decrease in any indicator will lead to a substantial reduction in the overall fitness. This design allows the genetic algorithm to automatically find the globally optimal balance point between accuracy, efficiency, and load during the iteration process, thus avoiding the suboptimal solution problem caused by optimizing a single indicator in traditional methods. Furthermore, by directly linking machining accuracy with the number of out-of-tolerance points, linking machining efficiency with time consumption, and combining machining load with multi-factor stability requirements, a complete evaluation system is formed to ensure that the final process scheme achieves efficient and stable machining while guaranteeing machining quality.
[0053] In one optional implementation, in step S41, the roulette wheel betting method is specifically implemented as follows: For each process option in the current population, the probability of it being selected is... P k The calculation formula is:
[0054] in, The suitability of the selected process solution This is the sum of the fitness of all process schemes in the current population.
[0055] Specifically, roulette wheel selection is a probability-based selection method that can be implemented using a fitness-proportional allocation approach. Its purpose is to ensure that the selection process is strictly proportional to the individual's fitness, thereby improving the reliability and efficiency of the genetic algorithm's optimization process. The probability of being selected is... P kThis can be understood as the proportion of the fitness of a single process scheme to the total fitness of the population, which is expressed by the formula... Precise calculations are performed, avoiding subjective or erroneous implementation methods. In practical applications, fitness... It can be a comprehensive quantitative result of indicators such as machining accuracy, machining efficiency and machining load, with the aim of comprehensively balancing multiple optimization objectives.
[0056] Specifically, in the selection phase, the first step is to calculate the sum of the fitness of all process schemes in the current population. Then, based on the adaptability of each process scheme Using the formula The probability of each option being selected is calculated. This process ensures that options with higher fitness have a higher selection probability, while preserving some selection opportunities for options with lower fitness, thereby maintaining population diversity and preventing premature convergence to local optima. Furthermore, the introduction of this formula makes the selection operation more standardized and precise, reducing selection bias caused by implementation inconsistencies and guaranteeing the accuracy and repeatability of the genetic algorithm's selection operation.
[0057] The above technical solution solves the selection bias problem caused by the lack of specific probability calculation formulas, significantly improving the convergence speed and reliability of optimization results of genetic algorithms. Furthermore, this solution, combined with virtual trial cutting, crossover, and mutation operations, forms a complete technical system that can effectively optimize the search efficiency in complex process parameter spaces and achieve a balance between accuracy, efficiency, and workload in multi-objective optimization.
[0058] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A virtual trial cutting process optimization method based on genetic algorithm, characterized in that, Includes the following steps: S1. Genetically encode the process parameters to be optimized and randomly generate an initial population containing multiple process schemes; each process scheme corresponds to a set of gene codes; each set of gene codes corresponds to a complete and unique set of process parameter settings; through predefined process parameter-CAM instruction mapping rules, each set of process parameter settings corresponds to a unique CAM processing path. S2. Construct a geometric-physical-control co-simulation world model; S3. Input the multiple gene codes from the initial population into the geometric-physical-control co-simulation world model, perform virtual trial cutting according to the CAM processing path corresponding to each gene code, and output the fitness of each process scheme. S4. Based on the fitness of each process scheme, perform selection, crossover, and mutation operations on the initial population to generate a new generation population; S5. Input the multi-group gene codes from the new generation population into the geometric-physical-control co-simulation world model, repeat steps S3 and S4 until the preset number of iterations is reached, and evaluate and select the process scheme with the highest fitness from the last generation population as the final process planning result.
2. The method according to claim 1, characterized in that, In S1, the process parameters include enumerated parameters and floating-point parameters; wherein, the enumerated parameters include, but are not limited to, cutting modes; and the floating-point parameters include, but are not limited to, spindle speed, feed rate, depth of cut, and width of cut.
3. The method according to claim 1, characterized in that, S3 further includes: During the virtual trial cutting process, the cutting state data output by the geometry-physics-control co-simulation world model is monitored in real time; based on the comparison between the cutting state data and the preset safety threshold, the type of the current area is determined; the type includes dangerous areas and safe areas; When a dangerous area is identified, the feed rate is reduced according to the first preset adjustment function; when a safe area is identified, the feed rate is increased according to the second preset adjustment function.
4. The method according to claim 2, characterized in that, S4 specifically includes: S41. Based on the fitness of each process scheme, a number of target process schemes are selected from the initial population using the roulette wheel method. S42. Using the populations corresponding to multiple target process schemes as parents, randomly select two or more coding sites of the target process schemes from the parents and perform gene segment crossover to generate offspring. S43. Perform mutation operation on the offspring with a preset mutation probability to obtain a new offspring, and replace the process scheme with the lowest fitness in the initial population with the process scheme in the new offspring to obtain a new generation population.
5. The method according to claim 4, characterized in that, In S43, the mutation operation includes: For the encoding of enumeration class parameters, mutation is performed by randomly selecting new values; For the encoding of floating-point parameters, a mutation method is adopted to generate new values based on the current value and according to a normal distribution.
6. The method according to claim 1, characterized in that, The expression for calculating the fitness is: ; in, For machining accuracy; For processing efficiency; For processing load; The machining accuracy The value ranges from 0 to 1, and the value decreases as the number of out-of-tolerance points identified in the virtual trial cut increases. The processing efficiency This is the reciprocal of the total processing time for the virtual trial cut; The processing load The result is calculated based on a weighted combination of multiple factors, including but not limited to maximum cutting force, tool wear rate, and chatter risk.
7. The method according to claim 4, characterized in that, In S41, the roulette wheel betting method is specifically implemented as follows: For each process option in the current population, the probability of it being selected is... P k The calculation formula is: ; in, The suitability of the selected process solution This is the sum of the fitness of all process schemes in the current population.
Citation Information
Patent Citations
Vehicle engine body machining process path optimization method based on improved genetic algorithm
CN111259506A
Process parameter data determination method and device, electronic equipment and storage medium
CN119692154A
Self-adaptive optimization method for process parameters of process forming scheduling workshop
CN121276998A
Intelligent numerical control machining programming system and method for aircraft structural parts
WO2015096511A1