Numerical control machining parameter optimization method based on multi-objective artificial bionicle optimization

CN122902419APending Publication Date: 2026-10-13NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610983968.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-02
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

然而,这些算法在实际应用中仍存在以下不足:一是算法收敛速度与种群多样性之间的平衡难以有效控制,容易导致种群过早收敛于局部帕累托前沿;二是在处理具有复杂非线性耦合关系的多目标优化问题时,现有算法在帕累托前沿的分布均匀性方面表现欠佳;三是部分算法采用单一精英个体引导种群更新方向,引导信息有限,限制了搜索效率的进一步提升

Benefits of technology

1.本发明无需对数控机床硬件进行改造,仅通过优化工艺参数即可在现有设备条件下实现能耗降低、效率提升和加工质量改善,具有投资成本低、实施灵活、适用范围广的特点,可适配数控车削等多种加工场景。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122902419A_ABST
    Figure CN122902419A_ABST
Patent Text Reader

Abstract

The application discloses a numerical control machining parameter optimization method based on multi-target artificial native animal optimization, and belongs to the technical field of numerical control machining process parameter optimization. In view of the problems of the existing process parameters depending on experience configuration, the slow convergence speed of the traditional multi-target optimization algorithm and the uneven distribution of the Pareto frontier, the application takes the spindle speed, the feed speed and the cutting depth as optimization variables, establishes a multi-target optimization model for energy-saving, efficient and high-quality turning machining, introduces the non-dominated sorting, the external archive and the crowding distance mechanism on the basis of the artificial native animal optimization algorithm, designs a multi-leader optimal selection guide strategy, and realizes the multi-target collaborative optimization of the process parameters. The application does not need to transform the machine tool hardware, is superior to the classical algorithm in the normalized hyper volume and the distribution index, reduces the machining power after optimization, improves the surface roughness, and can significantly reduce the energy consumption and improve the machining quality while guaranteeing the machining efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of CNC machining process parameter optimization technology. It involves using multi-objective optimization algorithms to coordinately optimize process parameters such as spindle speed, feed rate and depth of cut in CNC machining. This achieves reduced machining energy consumption, improved machining efficiency and improved machining quality without modifying the CNC machine tool hardware. In particular, it is a CNC machining parameter optimization method based on multi-objective artificial protozoan optimization. Background Technology

[0002] Numerical control (NC) machining, as a high-precision and high-efficiency automated machining technology, has been widely applied in high-end manufacturing fields such as aerospace, automobile manufacturing, and mold processing. Its machining performance is closely related to the rational configuration of process parameters. In actual production, to avoid machining anomalies caused by uncertainties, process engineers often use empirical methods or consult cutting manuals to determine a set of constant machining parameters to ensure that the machining conditions remain within a safe range. While this parameter setting method has certain advantages in ensuring process stability, it objectively limits the full utilization of machine tool machining performance, making it difficult to achieve the optimal balance between energy consumption, efficiency, and quality. Therefore, conducting systematic optimization research on process parameters and exploring the intrinsic relationship between machining parameters and machining performance has significant theoretical and practical value for reducing energy consumption, improving efficiency, and enhancing product quality in NC machining.

[0003] Currently, research on optimizing CNC machining process parameters can be divided into two categories from a technical perspective. The first category focuses on improving the performance of the machine tool itself. This involves improving the design of the mechanical structure, drive system, and auxiliary units to reduce energy consumption, increase machining efficiency, or ensure machining accuracy at the hardware level. For example, in terms of energy efficiency, measures such as spindle system optimization, lightweight structural design, and auxiliary unit energy management reduce energy consumption; in terms of efficiency improvement, methods such as increasing the maximum spindle speed and adopting linear motor drive technology shorten machining time; and in terms of quality assurance, techniques such as error modeling and compensation and spindle thermal characteristic optimization improve machining accuracy. This type of research lays the foundation for fundamentally improving machine tool performance, but its results are highly dependent on the research and development and manufacturing of new equipment, resulting in long application cycles and high costs. The second category of research focuses on optimization at the process and operational strategy level. By revealing the intrinsic relationship between machining parameters and machining performance, predictive models are constructed to optimize process parameters under existing equipment conditions. Compared to hardware-level improvements, this type of method does not require modifications to the device itself, and has significant advantages such as low investment cost, flexible implementation, and wide applicability. Therefore, it has become the mainstream research direction.

[0004] In process parameter optimization research, three core indicators—machining energy consumption, machining efficiency, and machining quality—must be considered simultaneously. However, these three indicators exhibit typical conflicting relationships: reducing machining energy consumption requires controlling spindle speed, feed rate, and depth of cut, but this reduces material removal rate, thus affecting machining efficiency; improving machining efficiency requires increasing feed rate and depth of cut, but this leads to increased machining power and deteriorated surface roughness; improving machining quality requires increasing spindle speed and controlling feed rate, but this increases idle power and may reduce efficiency. One-sidedly pursuing the optimization of one objective often affects other objectives. Therefore, to overcome the limitations of single-objective optimization, multi-objective optimization methods are widely used in the optimization of CNC machining parameters. Common multi-objective optimization algorithms include Non-Dominated Sorting Genetic Algorithm (NSGA-II), Decomposition-Based Multi-Objective Evolutionary Algorithm (MOEA / D), and Multi-Objective Particle Swarm Optimization Algorithm (MOPSO). However, these algorithms still have the following shortcomings in practical applications: First, it is difficult to effectively control the balance between the algorithm's convergence speed and population diversity, which can easily lead to the population converging prematurely to a local Pareto front; second, when dealing with multi-objective optimization problems with complex nonlinear coupling relationships, existing algorithms perform poorly in terms of the uniformity of Pareto front distribution; third, some algorithms use a single elite individual to guide the population update direction, which limits the guidance information and restricts further improvement in search efficiency.

[0005] Artificial Protozoan Optimization (APO) is a novel metaheuristic optimization algorithm inspired by the survival behaviors of protozoa in nature, such as foraging, hibernation, and reproduction. It effectively solves single-objective optimization problems through the synergistic effect of multiple behavioral patterns, demonstrating good performance in single-objective optimization. However, the original design of the APO algorithm is geared towards single-objective optimization problems, guiding population evolution through a single optimal solution, making it difficult to directly handle multi-objective optimization scenarios with multiple conflicting objectives. Currently, there are no effective technical solutions for extending the APO algorithm into a multi-objective optimization framework and successfully applying it to multi-objective optimization of CNC machining process parameters. Therefore, designing a reasonable and effective multi-objective extension mechanism and population guidance strategy based on the APO algorithm to meet the requirements of multi-objective optimization of CNC machining process parameters in terms of convergence, diversity, and distribution uniformity is an urgent technical problem to be solved. Summary of the Invention

[0006] The purpose of this invention is to overcome the shortcomings of the prior art and provide a CNC machining parameter optimization method based on multi-objective artificial protozoan optimization. By establishing a multi-objective optimization model for energy-saving, efficient, and high-quality CNC machining, and introducing non-dominated sorting, external archives, crowding distance, and multi-leader selection guidance strategies on the basis of artificial protozoan optimizer, a multi-objective optimization of process parameters with fast convergence speed, uniform Pareto front distribution, and excellent solution set comprehensive performance is achieved.

[0007] To achieve the above objectives, the present invention provides the following technical solution: I. A Method for Optimizing CNC Machining Parameters Based on Multi-Objective Artificial Protozoa Optimization Includes the following steps: S1. Construction of Multi-Objective Optimization Model: After the inherent parameters of the CNC machining device are determined, the spindle speed is used as the primary objective. Feed rate and depth of cut To optimize the variables, a multi-objective optimization model for energy-saving, efficient, and high-quality turning was established, with machining power, the reciprocal of material removal rate, and surface roughness as optimization objectives. Spindle speed constraints, feed rate constraints, depth of cut constraints, maximum power constraints, and maximum surface roughness constraints were set.

[0008] Specifically, it includes: S1.1 Determination of Optimization Variables: After determining the inherent parameters of the CNC machining device, such as the tool diameter D and the workpiece diameter d, the spindle speed is used as the optimization variable. Feed rate and depth of cut To optimize variables, use express.

[0009] S1.2 Construction of the objective function for processing power: Processing power As the objective function for energy consumption optimization, the idle power... Cutting power and additional load power It consists of three parts, as shown in the following formula:

[0010] No-load power With spindle speed The relationship is a quadratic function, as shown in the following equation:

[0011] Among them, coefficient , and The data were obtained by fitting the spindle idling test data using the least squares method.

[0012] Cutting power The energy consumed to overcome the cutting force during material removal is the energy expended by the cutting force. With cutting speed The product is obtained as follows:

[0013] Among them, cutting speed Cutting force Based on the spindle speed n and feed rate Depth of cut The parameters are obtained by empirical formulas, namely:

[0014] Additional load power Taken as a linear function of cutting power, i.e. The additional load factor The value ranges from 0.15 to 0.25, representing the additional power loss caused by factors such as friction and vibration. S1.3 Construction of the processing efficiency objective function: based on material removal rate The reciprocal of is used as the objective function for optimizing processing efficiency, i.e. Material removal rate Defined as the volume of material removed from the workpiece per unit time, as follows:

[0015] Material removal rate varies with feed rate and cutting depth As it increases, its reciprocal increases. To minimize the objective.

[0016] S1.4 Construction of the machining quality objective function: based on surface roughness As the objective function for optimizing processing quality, Surface roughness It refers to the microscopic unevenness of the machined surface, characterized by tiny peaks and valleys. A smaller value indicates a smoother surface and better wear resistance, fatigue strength, and fit of the workpiece. A quadratic polynomial model is used to fit the spindle speed. Feed rate and depth of cut With surface roughness The nonlinear relationship between them is as follows:

[0017] in, These are model-related parameters.

[0018] S1.5 Multi-objective Optimization Model Construction: The above processing power The reciprocal of the material removal rate and surface roughness The problem consists of three optimization objectives, all of which are minimized, thus constituting a multi-objective optimization problem. There is a conflict among the three objectives—reducing machining power requires controlling the spindle speed. Feed rate and depth of cut However, this will reduce the material removal rate and thus affect processing efficiency; increasing the material removal rate requires increasing the feed rate. and depth of cut However, this will lead to increased machining power and worsened surface roughness; improving surface roughness requires increasing the spindle speed. And control the feed rate However, this will increase idle power and may reduce efficiency—therefore, a multi-objective optimization method is needed for coordinated optimization, as it is impossible to optimize all three objectives simultaneously through single-objective optimization.

[0019] S1.6 Constraint Setting: The selection of machining parameters is constrained by the limitations of the CNC machine tool itself and the requirements of the machining process, specifically including: spindle speed constraint. ,in and These represent the minimum and maximum allowable rotational speeds for machining; feed rate constraints. ,in and These represent the minimum and maximum allowable feed rates for machining; depth of cut constraints. ,in and These are the minimum and maximum depths of cut allowed for machining, respectively; maximum power constraint. , This indicates that the power consumed during processing cannot exceed the maximum power that the machine tool can provide; maximum surface roughness constraint. , This means that the surface roughness of the machined workpiece must be less than the maximum allowable surface roughness value.

[0020] S2. Population Initialization and Iteration Parameter Setting: Setting the Population Size and maximum number of iterations Within the range of optimization variable values, the population is randomly initialized, and the three objective function values ​​of processing power, reciprocal of material removal rate and surface roughness for each individual are calculated. The initial population is then sorted in a non-dominated manner, and the non-dominated solutions are stored in an external file.

[0021] Specifically, it includes: S2.1 Algorithm Parameter Settings: Set Population Size Maximum number of iterations Leader pool size and maximum capacity of external files Among them, population size Determines the number of individuals participating in the search in each iteration, and the maximum number of iterations. Determine the algorithm termination condition and the size of the leader pool. The number of elite solutions in a multi-leader meritocracy strategy, and the maximum capacity of external archives. Determine the upper limit for the number of non-dominated solutions to store.

[0022] S2.2 Population Initialization: At the spindle speed Feed rate and depth of cut Randomly generated within their respective value ranges Each individual satisfies the constraints described in step S1, and each individual is represented as a set of process parameter vectors. .

[0023] S2.3 Initial Objective Function Calculation: For each individual in the initial population According to the processing power objective function, processing efficiency objective function and processing quality objective function described in step S1, calculate the three objective function values ​​of processing power, the reciprocal of material removal rate and surface roughness respectively.

[0024] S2.4 Non-dominated sorting and external archive initialization: For all individuals in the initial population, perform non-dominated sorting according to the Pareto dominance relation to find all non-dominated solutions that are not dominated by any other individual; store these non-dominated solutions as the initial Pareto front in the external archive to complete the initialization of the external archive; the Pareto dominance relation is defined as: for two solutions and ,like Non-inferior in all objectives And it is strictly superior to at least one objective. Then it is called Dominate .

[0025] S3. Population update based on artificial protozoan optimization algorithm: For each individual in the current population, select to enter the dormant, reproductive or foraging state according to the preset probability distribution; in the dormant state, the individual is randomly reborn in the search space; in the reproductive state, the individual is subjected to random perturbation to conduct local search; in the foraging state, it is further divided into autotrophic mode and heterotrophic mode; in the autotrophic mode and heterotrophic mode, the multi-leader selection guidance strategy is triggered with a preset probability, and the random reference individual or nearby position in the original update formula is replaced with the elite solution selected from the external archive, generating multiple candidate positions and determining the new position through Pareto dominance relationship.

[0026] Specifically, it includes: S3.1 Behavioral State Selection: For each individual in the current population According to a preset probability distribution, each animal chooses to enter a dormant, breeding, or foraging state; where the dormant probability is denoted as... The reproduction probability is denoted as The probability of foraging is .

[0027] S3.2 Dormant State Update: Individuals are randomly reborn within the search space, and the update formula is:

[0028] in, and These are the upper and lower bounds of the optimization variable, respectively. Let [a] be a random vector uniformly distributed in the interval [0,1]. This represents the Hadamard product (i.e., element-wise multiplication). The sleep mechanism allows individuals to jump to any position in the search space, enhancing the algorithm's global exploration capability.

[0029] S3.3 Reproductive Status Update: Updates the individual's reproductive status. New individuals are generated by applying random perturbations, and the update formula is:

[0030] in, This is a breeding mapping vector, whose elements are randomly set to 0 or 1, controlling whether or not each optimization variable is updated; through the breeding mapping vector... By controlling whether or not each optimization variable is updated, a fine-grained search can be achieved within a local range, enhancing the algorithm's local exploitation capabilities.

[0031] S3.4 Foraging Status Update: Foraging status is divided into autotrophic mode and heterotrophic mode, updated probabilistically. Choose the self-sustaining mode based on probability. Choose heterotrophic mode, where With the number of iterations Decreasing; in both self-sufficiency and heterogeneity modes, a multi-leader selection strategy is triggered with a preset probability. This strategy relies on a leadership pool composed of elites selected from external archives.

[0032] S3.4.1 Leader Pool Construction: At the beginning of each iteration, all non-dominated solutions stored in the external archive are sorted by non-dominated order, dividing the solutions into multiple Pareto front levels. For individuals on the same front, they are sorted according to three target dimensions: processing power, the reciprocal of material removal rate, and surface roughness. The crowding distance of each dimension is calculated and normalized to obtain the crowding distance of the individual. The crowding distance of boundary individuals is set to infinity. The leader pool with the lowest non-dominated level and the largest crowding distance is selected. The elite are decomposed into a leadership pool.

[0033] S3.4.2 Self-Supporting Mode Update: In self-supporting mode, updates are based on probability. Triggering a multi-leader merit-based guidance strategy, based on probability. They employ primitive autotrophic foraging mechanisms.

[0034] The primitive autotrophic foraging mechanism involves individuals moving towards randomly selected companion individuals from the population, and incorporating the influence of neighbors to determine the update direction. The update formula is:

[0035] in, The foraging factor decreases with the number of iterations; For the number of iterations, This represents the maximum number of iterations. Individuals randomly selected from the population; For the number of neighbors; and The neighbor pairs are randomly selected, with indices less than and greater than the current individual, respectively; weighting factor ; This is a foraging mapping vector that controls whether or not each dimension is updated.

[0036] When a multi-leader selection strategy is triggered, in each iteration, the non-dominated solutions in the external archives are first sorted by non-dominated order and crowding distance is calculated. The solution with the lowest non-dominated level and the largest crowding distance is selected. The elite are deconstructed into a leadership pool. For individuals in a foraging state, probability is used. The leader-led model is adopted, which incorporates the random companions in the original autotrophic foraging mechanism formula. Replace with elite solutions from the leadership pool ,generate There are 1 candidate solutions, and the formula is:

[0037] The objective function values ​​for all candidate solutions are then calculated, and the optimal solution is selected as the new position based on the Pareto dominance relationship. If none of the candidate solutions dominate the original individual, the original position is retained.

[0038] S3.4.3 Heterogeneous Mode Update: In heterogeneous mode, probability is used to... Triggering a multi-leader merit-based guidance strategy, based on probability. They employ primitive heterotrophic foraging mechanisms.

[0039] In the primitive heterotrophic mechanism, individuals move towards randomly generated locations near themselves, and the update direction is formed by combining the influence of neighbors. The update formula is:

[0040] in, and For neighbor pairs selected by sorted index, weight factor .

[0041] When a multi-leader selection strategy is triggered, in each iteration, the non-dominated solutions in the external archives are first sorted by non-dominated order and crowding distance is calculated. The solution with the lowest non-dominated level and the largest crowding distance is selected. The elite are deconstructed into a leadership pool. For individuals in a foraging state, probability is used. Adopting a leadership-guided model, the nearby location in the primitive heterotrophic foraging mechanism formula is... Replace with elite solutions from the leadership pool ,generate There are 1 candidate solutions, and the formula is:

[0042] Leadership guidance probability With the number of iterations The algorithm linearly increases from the initial value to the final value, achieving a smooth transition from exploration to development; foraging factor. With the number of iterations Decreasing order is used to balance global exploration with local development; neighbor pairs are randomly selected from the population to increase the diversity of search directions.

[0043] S3.4.4 Selection of candidate solutions: Based on the candidate solutions generated in step S3.4.2 or S3.4.3 under the leader strategy condition... For each candidate solution, calculate the values ​​of three objective functions: processing power, the reciprocal of material removal rate, and surface roughness. Compare each candidate solution with the current individual solution. Compare Pareto dominance relationships—if there exists a relationship that can dominate the current individual. If there are no candidate solutions, then the candidate solution with the largest crowding distance is selected as the new position; if none of the candidate solutions can dominate the current individual... And the current individual If the current individual cannot control all candidate solutions, then the candidate solution with the closest crowding distance to the current individual is selected as the new position; if all candidate solutions are controlled by the current individual... If a dominant species is retained in its original position, it will prevent the population from degenerating during the iteration process.

[0044] S4. External File Update and Population Maintenance: Calculate the three objective function values ​​of the new individual after boundary constraint processing. Compare the Pareto dominance relationship between the new individual and the original individual. If the new individual dominates the original individual, replace the original individual with the new individual. Merge all non-dominated solutions in the current population with the external file and remove individuals dominated by other solutions. When the number of solutions in the external file exceeds the preset maximum value, remove the most crowded solutions one by one according to the crowding distance to maintain the uniformity of the Pareto front distribution.

[0045] Specifically, it includes: S4.1 New Individual Boundary Constraint Processing: Processing the new individuals generated in step S3 According to the spindle speed constraints, feed rate constraints, and depth of cut constraints set in step S1, boundary checks and corrections are performed, and variable values ​​that exceed the constraint range are adjusted to the nearest boundary value to ensure that all new individuals are within the feasible domain.

[0046] S4.2 Individual Replacement Judgment: Calculate the new individual after boundary constraint processing. The three objective function values ​​will determine the new individual. With the original individual Perform Pareto dominance comparisons; if the new individual dominates the original individual, then replace the original individual with the new individual in the next generation of the population; otherwise, retain the original individual to ensure that the population is monotonically non-degenerate during the iteration process.

[0047] S4.3 External File Merging and Redundancy Removal: Merge all non-dominated solutions in the current population with the external files, sort the merged solution set according to Pareto dominance, and remove individuals dominated by other solutions.

[0048] S4.4 External File Crowded Distance Pruning: When the number of solutions in the external file exceeds the preset maximum value after redundancy removal. At that time, calculate the crowding distance of all solutions in the archive, and successively eliminate the most crowded solutions in ascending order of crowding distance until the archive size is restored to normal. The crowding distance is calculated as follows: individuals on the same Pareto front are sorted according to each objective dimension, and the normalized sum of the distances between adjacent individuals on each objective dimension is the crowding distance of that individual. The crowding distance of the boundary solution is set to infinity to ensure the uniformity of the Pareto front distribution and the integrity of the boundary.

[0049] S5. Iteration Termination Judgment and Optimal Solution Output: Determine whether the current iteration count has reached the maximum iteration count. If the target is not reached, return to step S3 to proceed to the next generation update; if the target is reached, terminate the iteration and output the Pareto front solution set from the external file as the multi-objective optimization result of the CNC machining process parameters, so that process engineers can make trade-offs between energy consumption, efficiency and quality according to the machining requirements. At the same time, after outputting the Pareto front solution set, performance verification is performed to ensure that the convergence and distribution uniformity of the optimization results meet the requirements.

[0050] After outputting the Pareto front solution set, the optimization results are evaluated using three metrics: normalized hypervolume NHV, spread distribution, and coverage C-metric. Normalized hypervolume NHV: First, linearly normalize each objective function value to... The dimensionless effect is eliminated in the interval, and then the hypervolume enclosed between the Pareto front and the reference point is calculated; the larger the NHV value, the better the overall performance of the convergence and diversity of the solution set.

[0051] Spread: measures the uniformity of distances between adjacent solutions on the Pareto front; the smaller the spread value, the more uniformly the solution set is distributed on the Pareto front.

[0052] Coverage C-metric: Used to compare the dominance relationship between two Pareto front solution sets, assuming... This represents the proportion of the solution set of algorithm B that is dominated by the solution set of algorithm A. A larger value indicates that the solution set of algorithm A has a stronger dominance over the solution set of algorithm B. This index is suitable for pairwise comparisons between different algorithms.

[0053] II. Optimization Device for CNC Machining Process Parameters Based on Multi-Objective Artificial Protozoa Optimization Specifically, it includes: The model building module is used to determine the spindle speed after the inherent parameters of the CNC machining device are determined. Feed rate and depth of cut To optimize the variables, a multi-objective optimization model for energy-saving, high-efficiency, and high-quality turning was established with machining power, the reciprocal of material removal rate, and surface roughness as optimization objectives. Spindle speed constraints, feed rate constraints, depth of cut constraints, maximum power constraints, and maximum surface roughness constraints were set.

[0054] The population initialization module is used to set the population size. and maximum number of iterations Within the range of optimization variable values, the population is randomly initialized, the three objective function values ​​for each individual are calculated, the initial population is non-dominated and sorted, and the non-dominated solutions are stored in an external archive.

[0055] The population update module is used to select each individual in the current population to enter a dormant, reproductive, or foraging state according to a preset probability distribution. In the dormant state, individuals are randomly reborn in the search space. In the reproductive state, individuals are subjected to random perturbations for local search. In the foraging state, individuals are further divided into autotrophic and heterotrophic modes. In the autotrophic and heterotrophic modes, a multi-leader selection strategy is triggered with a preset probability to replace the random reference individuals or nearby positions in the original update formula with elite solutions selected from external archives, generating multiple candidate positions and selecting the new position through Pareto dominance.

[0056] The archive maintenance module is used to calculate the three objective function values ​​of the new individual, compare the Pareto dominance relationship between the new individual and the original individual to determine whether to replace it, merge all non-dominated solutions in the current population with the external archive, remove dominated solutions, and remove redundant solutions based on the crowding distance when the size of the external archive exceeds the preset maximum value.

[0057] The iteration and output module is used to determine whether the current iteration count has reached the maximum iteration count. If the target is not reached, return to the population update module to enter the next generation update; if the target has been reached, terminate the iteration and output the Pareto front solution set in the external archive as the multi-objective optimization result of the CNC machining process parameters.

[0058] III. Electronic Equipment It includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the CNC machining parameter optimization method based on multi-objective artificial protozoan optimization as described above.

[0059] IV. Non-transitory computer-readable storage media It stores a computer program, which, when executed by a processor, implements the CNC machining parameter optimization method based on multi-objective artificial protozoan optimization as described above.

[0060] Compared with existing technologies, this invention provides a method for optimizing CNC machining parameters based on multi-objective artificial protozoa optimization, which has the following beneficial effects: 1. This invention does not require modification of CNC machine tool hardware. It can reduce energy consumption, improve efficiency and improve processing quality under existing equipment conditions by simply optimizing process parameters. It has the characteristics of low investment cost, flexible implementation and wide applicability, and can be adapted to various processing scenarios such as CNC turning.

[0061] 2. This invention introduces non-dominated sorting, external archives, and crowding distance mechanisms on the basis of the artificial protozoan optimizer framework, thereby effectively extending the single-objective algorithm to a multi-objective optimization framework, enabling the algorithm to simultaneously handle three conflicting optimization objectives: processing energy consumption, efficiency, and quality.

[0062] 3. The multi-leader selection strategy designed in this invention selects multiple elite solutions with low non-dominance levels and large crowding distances from external archives to form a leader pool. Individuals generate candidate positions sequentially towards each leader in autotrophic and heterotrophic foraging modes and select the best position based on Pareto dominance. This strategy enables the population to absorb guidance information from multiple elite solutions simultaneously, accelerating convergence while maintaining population diversity. It effectively overcomes the defect of premature convergence caused by single-elite guidance and significantly improves the overall performance of the algorithm.

[0063] 4. This invention enables the algorithm to dynamically balance global search and local exploration through the synergistic effect of three behaviors: dormancy, reproduction, and foraging. Dormancy enhances global exploration capabilities through random rebirth, escaping local optima; reproduction achieves refined local search through random perturbation; and foraging, combined with multi-leader guidance, achieves efficient convergence. The synergy of these three behaviors ensures the algorithm's robustness in complex multi-objective optimization problems.

[0064] 5. This invention introduces a mechanism combining Pareto dominance judgment and crowding distance-assisted selection in the selection of candidate solutions, so that individuals always maintain the correct direction of multi-objective optimization in the process of learning from elite solutions: prioritizing the improvement of solution quality through dominance relations, and maintaining the uniformity of population distribution through crowding distance when there are no dominance relations, so as to avoid population degradation during the iteration process.

[0065] 6. This invention outperforms classic multi-objective optimization algorithms such as NSGA-II, MOPSO, and MOEA / D in both normalized hypervolume and distribution performance metrics; and shows a significant dominant advantage over MOPSO and MOEA / D in coverage metrics. The optimized processing parameters achieve significant results in reducing processing power and improving surface roughness compared to empirical parameters, while maintaining a reasonable material removal rate, fully validating the practical engineering value of this invention. Attached Figure Description

[0066] Figure 1 This is a flowchart of the CNC machining parameter optimization method based on multi-objective artificial protozoan optimization according to the present invention; Figure 2 This is a schematic diagram of a multi-objective artificial protozoan optimization algorithm according to an embodiment of the present invention; Figure 3 This is a Pareto front plot obtained from CNC machining process parameter optimization based on multi-objective artificial protozoan optimization, according to an embodiment of the present invention. Detailed Implementation

[0067] The present invention will be further described in detail below with reference to specific embodiments. It should be understood that the following embodiments are for illustrative purposes only and are not intended to limit the scope of the invention.

[0068] Please see Figure 1-3 This invention discloses a method, apparatus, and electronic device for optimizing CNC machining parameters based on multi-objective artificial protozoan optimization. By establishing a multi-objective optimization model for energy-saving, efficient, and high-quality CNC machining, and by extending and improving the artificial protozoan optimizer framework, multi-objective collaborative optimization of CNC machining process parameters is achieved. The overall process of this invention is as follows: Figure 1 As shown, it includes five main steps, S1 to S5, and their execution order.

[0069] In CNC turning, the main process parameters include spindle speed. Feed rate and depth of cut Therefore, this invention uses the spindle speed... Feed rate and depth of cut As an optimization variable.

[0070] Optimization targets include processing power The reciprocal of the material removal rate and surface roughness Three conflicting indicators.

[0071] Processing power The energy consumption level of a machine tool under cutting conditions is reflected by its no-load power. Cutting power and additional load power It consists of three parts, and the formula is as follows:

[0072] No-load power With spindle speed The relationship is a quadratic function, as shown in the following equation:

[0073] Among them, coefficient , and The data were obtained by fitting the spindle idling test data using the least squares method.

[0074] Cutting power Due to cutting force With cutting speed The product is obtained as follows:

[0075] Among them, cutting speed Cutting force Based on the spindle speed n and feed rate Depth of cut The parameters are obtained by empirical formulas, namely:

[0076] Additional load power Taken as a linear function of cutting power, i.e. The additional load factor The value ranges from 0.15 to 0.25, representing the additional power loss caused by friction and vibration.

[0077] Material removal rate Defined as the volume of material removed from the workpiece per unit time, as follows:

[0078] Material removal rate varies with feed rate and cutting depth As it increases, its reciprocal increases. To minimize the objective.

[0079] The reciprocal of the material removal rate As the objective function for optimizing processing efficiency, the smaller its value, the higher the processing efficiency.

[0080] Surface roughness It refers to the microscopic unevenness of the machined surface, characterized by tiny peaks and valleys. A smaller value indicates a smoother surface and better wear resistance, fatigue strength, and fit of the workpiece. A quadratic polynomial model is used to fit the spindle speed. Feed rate and depth of cut With surface roughness The nonlinear relationship between them is as follows:

[0081] in, These are model-related parameters.

[0082] The above three objectives are all minimized, constituting a multi-objective optimization problem. ,in There is a typical conflict among the three objectives: reducing machining power requires controlling the spindle speed. Feed rate and depth of cut However, this will reduce the material removal rate and thus affect processing efficiency; increasing the material removal rate requires increasing the feed rate. and depth of cut However, this will lead to increased machining power and worsened surface roughness; improving surface roughness requires increasing the spindle speed. And control the feed rate However, this will increase idle power and may reduce efficiency; therefore, a multi-objective optimization method is needed for coordinated optimization, as it is impossible to achieve the optimal results for all three objectives simultaneously through single-objective optimization.

[0083] Constraints are set according to the specific machine tool and machining requirements, including: spindle speed constraints. ,in and These represent the minimum and maximum allowable rotational speeds for machining; feed rate constraints. ,in and These represent the minimum and maximum allowable feed rates for machining; depth of cut constraints. ,in and These are the minimum and maximum depths of cut allowed for machining, respectively; maximum power constraint. , This indicates that the power consumed during processing cannot exceed the maximum power that the machine tool can provide; maximum surface roughness constraint. , This means that the surface roughness of the machined workpiece must be less than the maximum allowable surface roughness value.

[0084] At the algorithm implementation level, the algorithm parameters are first set. Population size. Determines the number of individuals participating in the search in each iteration, and the maximum number of iterations. Determine the algorithm termination condition and the size of the leader pool. The number of elite solutions in a multi-leader meritocracy strategy, and the maximum capacity of external archives. The upper limit for the number of non-dominated solutions to be stored is determined. In this embodiment, it is set... , , , .

[0085] The detailed flowchart of the multi-objective artificial protozoan optimization algorithm of this invention is as follows: Figure 2 The diagram illustrates the complete iterative process, from population initialization, leader pool construction, behavioral state selection, population updating (including three behaviors: hibernation, reproduction, and foraging, as well as a multi-leader selection strategy), to external file maintenance and iteration termination determination. The specific workflow is as follows: Initialization: Set population size Maximum number of iterations Number of leaders Parameters are set, the population is randomly initialized, the objective function value is calculated, and the external file is initialized to empty. During population initialization, the spindle speed is... Feed rate and depth of cut Randomly generated within their respective value ranges Each of the individuals satisfying the above constraints is represented as a set of process parameter vectors. For each individual in the initial population The processing power, the reciprocal of the material removal rate, and the surface roughness were calculated as three objective function values, respectively.

[0086] Initial Non-Dominated Sort: The initial population is sorted using the non-dominated sorting algorithm, and the non-dominated solutions are stored in the external archive. For all individuals in the initial population, a non-dominated sort is performed according to the Pareto dominance relation, and the non-dominated solutions are stored in the external archive, completing the initialization of the external archive. The Pareto dominance relation is defined as: for two solutions... and ,like Non-inferior in all objectives And it is strictly superior to at least one objective. Then it is called Dominate .

[0087] Enter the main loop iteration. Each iteration includes the following steps: The first step is behavioral state selection. This involves selecting the behavioral state for each individual in the current population. According to a preset probability distribution, each animal chooses to enter a dormant, breeding, or foraging state. The dormant probability is denoted as... The reproduction probability is denoted as The probability of foraging is In this embodiment, , , .

[0088] The second step is to update the individual based on the selected status.

[0089] If an individual enters a dormant state, it will randomly respawn within the search space, and the update formula is:

[0090] in, and These are the upper and lower bounds of the optimization variable, respectively. Let [a] be a random vector uniformly distributed in the interval [0,1]. This represents the Hadamard product (i.e., element-wise multiplication). The sleep mechanism allows individuals to jump to any position in the search space, enhancing the algorithm's global exploration capability and helping the population escape local optima.

[0091] If an individual enters the reproductive state, a random perturbation is applied to generate a new individual, and the update formula is:

[0092] in, This is a breeding mapping vector, whose elements are randomly set to 0 or 1, controlling whether or not each optimization variable is updated; through the breeding mapping vector... By controlling whether or not each optimization variable is updated, a fine-grained search can be achieved within a local range, enhancing the algorithm's local exploitation capabilities.

[0093] If an individual enters a foraging state, it is further divided into autotrophic and heterotrophic modes. This is based on probability. Choose the self-sustaining mode based on probability. Choose heterotrophic mode, where With the number of iterations Decreasing the pace allows for a smooth transition from global exploration to local development.

[0094] Before implementing autotrophic and heterotrophic models, a leader pool construction step is performed. Leader pool construction is an important operation at the beginning of each iteration: all non-dominated solutions stored in the external archive are sorted by non-dominated order, dividing the solutions into multiple Pareto front levels; for individuals on the same front, they are sorted according to three target dimensions: processing power, the reciprocal of material removal rate, and surface roughness; the crowding distance of each dimension is calculated and normalized to obtain the crowding distance of the individual; the crowding distance of boundary individuals is set to infinity; the leader pool is selected with the lowest non-dominated level and the largest crowding distance. The elite solutions constitute the leadership pool. Non-dominated hierarchy is used to ensure that the leadership solutions are located near the optimal frontier, while the diversity of leadership solutions is ensured by a selection strategy that maximizes crowding distance.

[0095] In the self-sustaining model, probability is used. Triggering a multi-leader merit-based guidance strategy, based on probability. The primitive autotrophic foraging mechanism is implemented. This mechanism involves individuals moving towards randomly selected companion individuals from the population, and incorporating the influence of the selected neighbors to determine the update direction. The update formula is:

[0096] in, The foraging factor decreases with the number of iterations; For the number of iterations, This represents the maximum number of iterations. Individuals randomly selected from the population; For the number of neighbors; and The neighbor pairs are randomly selected, with indices less than and greater than the current individual, respectively; weighting factor ; This is a foraging mapping vector that controls whether or not each dimension is updated.

[0097] When a multi-leader selection strategy is triggered, in each iteration, the non-dominated solutions in the external archives are first sorted by non-dominated order and crowding distance is calculated. The solution with the lowest non-dominated level and the largest crowding distance is selected. The elite are deconstructed into a leadership pool. For individuals in a foraging state, probability is used. The leader-led model is adopted, which incorporates the random companions in the original autotrophic foraging mechanism formula. Replace with elite solutions from the leadership pool ,generate There are 1 candidate solutions, and the formula is:

[0098] In heterotrophic mode, the probability is also used. Triggering a multi-leader merit-based guidance strategy, based on probability. The primitive heterotrophic foraging mechanism is implemented. This mechanism involves individuals moving towards randomly generated locations near themselves, and the update direction is determined by combining the influence of neighbor pairs selected by sorted index. The update formula is:

[0099] in, and For neighbor pairs selected by sorted index, weight factor .

[0100] When a multi-leader selection strategy is triggered, in each iteration, the non-dominated solutions in the external archives are first sorted by non-dominated order and crowding distance is calculated. The solution with the lowest non-dominated level and the largest crowding distance is selected. The elite are deconstructed into a leadership pool. For individuals in a foraging state, probability is used. Adopting a leadership-guided model, the nearby location in the primitive heterotrophic foraging mechanism formula is... Replace with elite solutions from the leadership pool ,generate There are 1 candidate solutions, and the formula is:

[0101] Leadership guidance probability With the number of iterations The algorithm linearly increases from the initial value to the final value, achieving a smooth transition from exploration to development; foraging factor. With the number of iterations Decreasing order is used to balance global exploration with local development; neighbor pairs are randomly selected from the population to increase the diversity of search directions.

[0102] The third step is to select the best candidate solution. This involves selecting the best solution from the candidate solutions generated under the leader strategy conditions within the aforementioned self-sustaining or heterogeneous models. For each candidate solution, calculate the values ​​of three objective functions: processing power, the reciprocal of material removal rate, and surface roughness. Compare each candidate solution with the current individual... Compare Pareto dominance relationships: If there exists a relationship that can dominate the current individual... If no candidate solution can dominate the current individual, then the candidate solution with the largest crowding distance is selected as the new position, ensuring the superiority of replacement while maintaining the uniformity of the frontier distribution; if none of the candidate solutions can dominate the current individual... And the current individual If the current individual cannot control all candidate solutions, then the candidate solution with the closest crowding distance to the current individual is selected as the new position; if all candidate solutions are controlled by the current individual... If a dominant species is retained in its original position, it will prevent the population from degenerating during the iteration process.

[0103] Step 4: External File Update and Population Maintenance. For the new individuals generated in the previous steps, boundary checks and corrections are performed according to the aforementioned spindle speed, feed rate, and depth of cut constraints. Variable values ​​exceeding the constraint range are adjusted to the nearest boundary value, ensuring all new individuals are within the feasible region. The three objective function values ​​of the new individuals after boundary constraint processing are calculated. The Pareto dominance relationship is compared between the new individuals and the original individuals: if the new individual dominates the original individual, it replaces the original individual in the next generation of the population; otherwise, the original individual is retained, ensuring the population is monotonically non-degenerate during iteration. All non-dominated solutions in the current population are merged with the external file. Based on the Pareto dominance relationship, the merged solution set is sorted for non-domination, and individuals dominated by other solutions are removed. When the number of solutions in the external file after redundancy removal exceeds a preset maximum value... At this point, the crowding distance of all solutions in the archive is calculated. The crowding distance is calculated by sorting individuals on the same Pareto front according to each objective dimension, and the normalized sum of the distances between adjacent individuals in each objective dimension is the crowding distance of that individual. The crowding distance of the boundary solutions is set to infinity. The most crowded solutions are successively eliminated in ascending order of crowding distance until the archive size is restored to the maximum. This is to ensure the uniformity of the Pareto front distribution and the integrity of its boundaries.

[0104] Iteration Termination: Repeat the above iterative process, with each iteration sequentially performing behavior state selection, individual update, candidate solution selection, external archive update, and population maintenance. Determine if the current iteration count has reached the maximum iteration count. If the target is not reached, the iteration proceeds to the next generation; if the target is reached, the iteration terminates. After the iteration ends, the Pareto front solution set from the external archive is output as the multi-objective optimization result of the CNC machining process parameters. This solution set exhibits a clear surface distribution in the three-dimensional target space, allowing process engineers to weigh energy consumption, efficiency, and quality according to actual machining requirements.

[0105] To verify the effectiveness of the method of this invention, experiments were conducted based on a publicly available dataset. The experiments on the publicly available dataset focused on turning machining, with the workpiece material being AISI H13 hot work die steel and a workpiece diameter d = 90 mm. The optimization variable was the spindle speed. Feed rate and depth of cut Their value ranges are respectively , , The no-load power coefficient in the objective function was obtained using the least squares method from spindle idle experimental data. The coefficients in the machining power and surface roughness formulas were obtained based on nonlinear regression of historical cutting experimental data. The results are as follows:

[0106]

[0107] To verify the effectiveness of the MOAPO algorithm presented in this paper, three classic multi-objective optimization algorithms were selected for comparison: Non-dominated sorting genetic algorithm (NSGA-II), multi-objective particle swarm optimization algorithm (MOPSO), and decomposition-based multi-objective evolutionary algorithm (MOEA / D). All algorithms used the same population size ( ) and maximum number of iterations ( They all share the same objective function and constraints. The specific parameter settings for each algorithm are as follows: NSGA-II: Simulated Binary Crossover Probability Polynomial mutation probability Cross-distribution index Variation distribution index .

[0108] MOPSO: Inertia Weight Individual learning factor Social learning factor The speed limit is 20% of the variable range, and the external file capacity is 500.

[0109] MOEA / D: Number of neighbors The probability of choosing a neighboring generation as the parent generation The maximum number of neighbors that a child can replace. The crossover and mutation parameters are the same as those in NSGA-II.

[0110] MOAPO (Article): Maximum Dormancy / Reproduction Ratio Neighbors' number Leader pool size The external file capacity is 500, and the probability of leadership guidance increases linearly with iteration: The probability of autotrophy / heterotrophy decreases with iteration: .

[0111] Performance evaluation employs three metrics: normalized hypervolume NHV, spread distribution, and coverage C-metric. Normalized hypervolume NHV is first linearly normalized to the values ​​of each objective function. After eliminating the influence of dimensions in the interval, the hypervolume enclosed between the Pareto front and the reference point is calculated. A larger NHV value indicates better overall convergence and diversity of the solution set. Spread measures the consistency of distances between adjacent solutions on the Pareto front; a smaller spread value indicates a more uniform distribution of the solution set on the Pareto front. The C-metric is used to compare the dominance relationship between solution sets of two Pareto fronts. This represents the proportion of the solution set of algorithm B that is dominated by the solution set of algorithm A. The larger the value, the stronger the dominance of the solution set of algorithm A over the solution set of algorithm B.

[0112] Figure 3 The Pareto front (3D scatter plot) obtained from running the MOAPO algorithm is shown. The three objectives are processing power. (kW), the reciprocal of material removal rate ( and surface roughness ( As can be seen from the figure, the Pareto solution set exhibits a distinct curved distribution in the target space, and the distribution of the solution set is relatively uniform, indicating that MOAPO can effectively approximate the real Pareto front and maintain good diversity.

[0113] Table 1 lists the comparison results of HV and Spread metrics between three common multi-objective optimization algorithms and the algorithm in this paper.

[0114] Table 1 Comparison of performance metrics of each algorithm

[0115] As shown in Table 1, the proposed MOAPO algorithm achieves relatively optimal results in both Normalized Hypervolume (NHV) and Spread metrics. MOAPO has the highest NHV value, indicating that its solution set performs better than the comparative algorithms in terms of convergence and diversity. Simultaneously, MOAPO has the lowest Spread value, indicating the best uniformity of its Pareto front distribution, with no obvious clustering or missing boundary phenomena in the solution set. Overall, MOAPO demonstrates a certain advantage in overall performance on this problem, particularly in terms of the uniformity of solution set distribution.

[0116] To further analyze the dominance relationships among the Pareto fronts obtained by different algorithms, the coverage (C-metric) was calculated. Table 2 shows the pairwise coverage matrices between the four algorithms.

[0117] Table 2 Coverage (C-metric) Matrix

[0118] As shown in Table 2, the coverage comparison results reveal that the proposed MOAPO algorithm exhibits dominance over the solution sets of all compared algorithms (NSGA-II, MOPSO, and MOEAD). Specifically, the dominance ratios for NSGA-II, MOPSO, and MOEAD reach 7.4%, 9.2%, and 12.6%, respectively, while the dominance ratios in the reverse direction are all below 2.5%. This indicates that MOAPO outperforms NSGA-II, MOPSO, and MOEAD in convergence when solving multi-objective optimization problems for CNC machining parameters. This result fully validates the effectiveness and competitiveness of the proposed algorithm in solving multi-objective optimization problems for CNC machining parameters.

[0119] To verify the practical application value of the optimization model presented in this paper, the optimal compromise solution obtained by the MOAPO algorithm is compared with the empirical default machining parameters. The default parameters are selected based on factory experience or cutting manuals, while the optimized parameters adopt the optimal solution recommended by MOAPO, as shown in Table 3.

[0120] Table 3 Comparison of data before and after optimization

[0121] As shown in Table 3, although the material removal rate is reduced by using the optimized process parameters proposed in this paper, the surface roughness is significantly improved, and the processing power is reduced. This indicates that the MOAPO algorithm can effectively reduce energy consumption and improve processing quality while ensuring processing efficiency, thus verifying the practical engineering value of the optimized model proposed in this paper.

[0122] The proposed method for optimizing CNC machining parameters based on multi-objective artificial protozoan optimization extends the single-objective APO algorithm into a multi-objective optimization framework by introducing non-dominated sorting, external archives, and crowding distance mechanisms on the basis of the artificial protozoan optimizer framework. Furthermore, a multi-leader selection guidance strategy is designed to achieve multi-objective collaborative optimization of CNC machining process parameters. Compared to traditional process parameter setting methods that rely on empirical parameters or single-objective optimization, this invention makes targeted improvements in optimization model construction, population update mechanism, and multi-objective extension strategy, significantly enhancing the convergence, diversity, and distribution uniformity of the Pareto front. This effectively reduces energy consumption and improves machining quality while ensuring machining efficiency.

Claims

1. A method for optimizing CNC machining parameters based on multi-objective artificial protozoan optimization, characterized in that, Includes the following steps: S1. Construction of multi-objective optimization model: After the inherent parameters of the CNC machining device are determined, optimization variables and optimization objectives are set, and a multi-objective optimization model for energy-saving, efficient and high-quality turning is established, and constraints are set. S2. Population Initialization and Iteration Parameter Setting: Setting the Population Size and maximum number of iterations Within the range of optimization variable values, the population is randomly initialized, and the three objective function values ​​of processing power, reciprocal of material removal rate and surface roughness for each individual are calculated. The initial population is then sorted in a non-dominated manner, and the non-dominated solutions are stored in an external file. S3. Population update based on artificial protozoan optimization algorithm: Individuals in the population are selected to be in a dormant, reproductive or foraging state according to a preset probability: random rebirth during dormancy, local perturbation search during reproduction, foraging is divided into autotrophic and heterotrophic modes and multi-leader selection guidance is triggered by a preset probability, candidate positions are generated by replacing random references with external archive elite solutions, and new positions are determined by Pareto dominance selection. S4. External File Update and Population Maintenance: Process the boundary constraints of new individuals and calculate the target value. If a new individual dominates an existing individual, it is replaced. Merge non-dominated solutions of the population with external files, remove dominated solutions, and remove redundant solutions according to the crowding distance when the population is overcrowded to maintain frontier uniformity. S5. Iteration Termination Judgment and Optimal Solution Output: Determine whether the current iteration count has reached the maximum iteration count. If the target is not reached, return to step S3 to proceed to the next generation update; if the target is reached, terminate the iteration and output the Pareto front solution set from the external file as the multi-objective optimization result of the CNC machining process parameters, so that process engineers can make trade-offs between energy consumption, efficiency and quality according to the machining requirements. At the same time, after outputting the Pareto front solution set, performance verification is performed to ensure that the convergence and distribution uniformity of the optimization results meet the requirements.

2. The method for optimizing CNC machining parameters based on multi-objective artificial protozoan optimization according to claim 1, characterized in that, In step S1, the construction of the multi-objective optimization model specifically includes: S1.1 Determination of Optimization Variables: After determining the inherent parameters of the tool diameter D and workpiece diameter d of the CNC machining device, the spindle speed is used as the optimization variable. Feed rate And the cutting depth ap is the optimization variable, using express; S1.2 Construction of the objective function for processing power: Processing power As the objective function for energy consumption optimization, the idle power... Cutting power and additional load power It consists of three parts, as shown in the following formula: No-load power With spindle speed The relationship is a quadratic function, as shown in the following equation: Among them, coefficient , and The data were obtained by fitting the spindle idling test data using the least squares method. Cutting power The energy consumed to overcome the cutting force during material removal is the energy expended by the cutting force. With cutting speed The product is obtained as follows: Among them, cutting speed Cutting force Based on the spindle speed n and feed rate Depth of cut The parameters are obtained by empirical formulas, namely: Additional load power Taken as a linear function of cutting power, i.e. The additional load factor The value ranges from 0.15 to 0.25, representing the additional power loss caused by friction and vibration. S1.3 Construction of the processing efficiency objective function: based on material removal rate The reciprocal of is used as the objective function for optimizing processing efficiency, i.e. Material removal rate Defined as the volume of material removed from the workpiece per unit time, as follows: Material removal rate varies with feed rate and cutting depth As it increases, its reciprocal increases. To minimize the objective; S1.4 Construction of the machining quality objective function: based on surface roughness As the objective function for optimizing processing quality, The spindle speed was fitted using a quadratic polynomial model. Feed rate and depth of cut With surface roughness The nonlinear relationship between them is as follows: in, These are model-related parameters; S1.5 Multi-objective Optimization Model Construction: The above processing power The reciprocal of the material removal rate and surface roughness The problem consists of three optimization objectives, all of which are minimized, thus constituting a multi-objective optimization problem. There are conflicts among the three objectives, requiring a multi-objective optimization method for coordinated optimization. S1.6 Constraint Setting: The selection of machining parameters is constrained by the limitations of the CNC machine tool itself and the requirements of the machining process, specifically including: spindle speed constraint. Feed rate constraint Cutting depth constraint Maximum power constraint Maximum surface roughness constraint .

3. The method for optimizing CNC machining parameters based on multi-objective artificial protozoan optimization according to claim 1, characterized in that, In step S2, the population initialization and iteration parameter setting specifically includes: S2.1 Algorithm Parameter Settings: Set Population Size Maximum number of iterations Leader pool size and maximum capacity of external files ; S2.2 Population Initialization: At the spindle speed Feed rate and depth of cut Randomly generated within their respective value ranges Each individual satisfies the constraints described in step S1, and each individual is represented as a set of process parameter vectors. ; S2.3 Initial Objective Function Calculation: For each individual in the initial population According to the processing power objective function, processing efficiency objective function and processing quality objective function described in step S1, calculate the three objective function values ​​of processing power, the reciprocal of material removal rate and surface roughness respectively; S2.4 Non-dominated sorting and external archive initialization: For all individuals in the initial population, perform non-dominated sorting according to the Pareto dominance relation to find all non-dominated solutions that are not dominated by any other individual; store these non-dominated solutions as the initial Pareto front in the external archive to complete the initialization of the external archive; the Pareto dominance relation is defined as: for two solutions and ,like Non-inferior in all objectives And it is strictly superior to at least one objective. Then it is called Dominate .

4. The method for optimizing CNC machining parameters based on multi-objective artificial protozoan optimization according to claim 1, characterized in that, In step S3, the population update based on the artificial protozoan optimization algorithm specifically includes: S3.1 Behavioral State Selection: For each individual in the current population According to a preset probability distribution, each animal chooses to enter a dormant, breeding, or foraging state; where the dormant probability is denoted as... The reproduction probability is denoted as The probability of foraging is ; S3.2 Dormant State Update: Individuals are randomly reborn within the search space, and the update formula is: in, and These are the upper and lower bounds of the optimization variable, respectively. Let [a] be a random vector uniformly distributed in the interval [0,1]. Represents the Hadamard product; S3.3 Reproductive Status Update: Updates the individual's reproductive status. New individuals are generated by applying random perturbations, and the update formula is: in, This is a reproduction mapping vector, whose elements are randomly set to 0 or 1 to control whether each optimization variable is updated. S3.4.1 Leader Pool Construction: At the beginning of each iteration, all non-dominated solutions stored in the external archive are sorted by non-dominated order, dividing the solutions into multiple Pareto front levels. For individuals on the same front, they are sorted according to three target dimensions: processing power, the reciprocal of material removal rate, and surface roughness. The crowding distance of each dimension is calculated and normalized to obtain the crowding distance of the individual. The crowding distance of boundary individuals is set to infinity. The leader pool with the lowest non-dominated level and the largest crowding distance is selected. The elite are decomposed into a leadership pool.

5. The method for optimizing CNC machining parameters based on multi-objective artificial protozoan optimization according to claim 4, characterized in that, Step S3 also includes updating the foraging status: the foraging status is divided into autotrophic mode and heterotrophic mode, with probability... Choose the self-sustaining mode based on probability. Choose heterotrophic mode, where With the number of iterations Decreasing; in both self-sufficiency and heterogeneity modes, a multi-leader selection strategy is triggered with a preset probability. In the self-sustaining model, probability is used. Triggering a multi-leader merit-based guidance strategy, based on probability. The primitive autotrophic foraging mechanism is implemented; the primitive autotrophic foraging mechanism involves individuals moving towards companion individuals randomly selected from the population, and combining the influence of neighbors to form the update direction. The update formula is: in, The foraging factor decreases with the number of iterations; For the number of iterations, This represents the maximum number of iterations. Individuals randomly selected from the population; For the number of neighbors; and The neighbor pairs are randomly selected, with indices less than and greater than the current individual, respectively; weighting factor ; This is a foraging mapping vector that controls whether or not each dimension is updated. When a multi-leader selection strategy is triggered, the random companions in the original autotrophic foraging mechanism formula will be... Replace with elite solutions from the leadership pool ,generate There are 1 candidate solutions, and the formula is: In heterotrophic mode, based on probability Triggering a multi-leader merit-based guidance strategy, based on probability. The primitive heterotrophic foraging mechanism is implemented; the primitive heterotrophic foraging mechanism involves individuals moving towards randomly generated locations near themselves, and the update direction is formed by combining the influence of neighbors selected by sorted index. The update formula is: in, and For neighbor pairs selected by sorted index, weight factor ; When a multi-leader selection strategy is triggered, in each iteration, the non-dominated solutions in the external archives are first sorted by non-dominated order and crowding distance is calculated. The solution with the lowest non-dominated level and the largest crowding distance is selected. The elite are deconstructed into a leadership pool. For individuals in a foraging state, probability is used. Adopting a leadership-guided model, the nearby location in the primitive heterotrophic foraging mechanism formula is... Replace with elite solutions from the leadership pool ,generate There are 1 candidate solutions, and the formula is: Leadership guidance probability With the number of iterations The foraging factor increases linearly from its initial value to its final value. With the number of iterations Decreasing, neighbor pairs are randomly selected from the population.

6. The method for optimizing CNC machining parameters based on multi-objective artificial protozoan optimization according to claim 5, characterized in that, Step S3 also includes candidate solution selection: selecting the best candidate solution generated in the self-sustaining or heterogeneous modes under the multi-leader selection guidance strategy. For each candidate solution, calculate the values ​​of three objective functions: processing power, the reciprocal of material removal rate, and surface roughness. Compare each candidate solution with the current individual solution. Compare Pareto dominance relationships: If there exists a relationship that can dominate the current individual... If there are candidate solutions, then the candidate solution with the largest crowding distance is selected as the new location; If none of the candidate solutions can dominate the current individual And the current individual If it cannot control all candidate solutions, then the candidate solution with the closest crowding distance to the current individual is selected as the new position; If all candidate solutions are accepted by the current individual If it is in control, it will remain in its original position.

7. The method for optimizing CNC machining parameters based on multi-objective artificial protozoan optimization according to claim 1, characterized in that, In step S4, the external file update and population maintenance specifically include: S4.1 New Individual Boundary Constraint Processing: Processing the new individuals generated in step S3 According to the spindle speed constraints, feed rate constraints, and depth of cut constraints set in step S1, boundary checks and corrections are performed, and variable values ​​that exceed the constraint range are adjusted to the nearest boundary value to ensure that all new individuals are within the feasible domain. S4.2 Individual Replacement Judgment: Calculate the new individual after boundary constraint processing. The three objective function values ​​will determine the new individual. With the original individual Perform Pareto dominance comparison; if the new individual dominates the original individual, then replace the original individual with the new individual and enter the next generation of the population; otherwise, retain the original individual to ensure that the population is monotonically non-degenerate during the iteration process; S4.3 External File Merging and Redundancy Removal: Merge all non-dominated solutions in the current population with the external files, sort the merged solution set according to Pareto dominance, and remove individuals dominated by other solutions. S4.4 External File Crowded Distance Pruning: When the number of solutions in the external file exceeds the preset maximum value after redundancy removal. At that time, calculate the crowding distance of all solutions in the archive, and successively eliminate the most crowded solutions in ascending order of crowding distance until the archive size is restored to normal. .

8. The method for optimizing CNC machining parameters based on multi-objective artificial protozoan optimization according to claim 1, characterized in that, In step S5, the iteration termination judgment and optimal solution set output include: Determine if the current iteration count has reached the maximum iteration count. If the target is not reached, return to step S3 to enter the next generation update; if the target is reached, terminate the iteration and output the Pareto front solution set in the external file as the multi-objective optimization result of the CNC machining process parameters. After outputting the Pareto front solution set, a normalized hypervolume is used. Distribution and coverage Three metrics are used to evaluate the performance of the optimization results: normalized hypervolume. First, the objective function values ​​are linearly normalized to... After eliminating the influence of dimensions in the interval, the hypervolume enclosed between the Pareto front and the reference point is calculated; distribution To measure the consistency of distances between adjacent solutions on the Pareto front; coverage. To compare the dominance relationship between the solution sets of two Pareto fronts, This represents the proportion of the solution set of algorithm B that is dominated by the solution set of algorithm A.

9. A parameter optimization device, employing the CNC machining parameter optimization method based on multi-objective artificial protozoan optimization as described in any one of claims 1-8, characterized in that, Specifically, it includes: The model building module is used to determine the spindle speed after the inherent parameters of the CNC machining device are determined. Feed rate and depth of cut To optimize the variables, a multi-objective optimization model for energy-saving, high-efficiency, and high-quality turning was established with machining power, the reciprocal of material removal rate, and surface roughness as optimization objectives. Spindle speed constraints, feed rate constraints, depth of cut constraints, maximum power constraints, and maximum surface roughness constraints were set. The population initialization module is used to set the population size. and maximum number of iterations Within the range of optimization variable values, the population is randomly initialized, the three objective function values ​​for each individual are calculated, the initial population is sorted non-dominated, and the non-dominated solutions are stored in an external archive. The population update module is used to select each individual in the current population to enter a dormant, reproductive, or foraging state according to a preset probability distribution. In the dormant state, individuals are randomly reborn in the search space. In the reproductive state, individuals are subjected to random perturbations for local search. In the foraging state, individuals are further divided into autotrophic and heterotrophic modes. In the autotrophic and heterotrophic modes, a multi-leader selection strategy is triggered with a preset probability to replace the random reference individuals or nearby positions in the original update formula with elite solutions selected from external archives, generating multiple candidate positions and selecting the new position through Pareto dominance. The archive maintenance module is used to calculate the three objective function values ​​of the new individual, compare the Pareto dominance relationship between the new individual and the original individual to determine whether to replace it, merge all non-dominated solutions in the current population with the external archive, remove dominated solutions, and remove redundant solutions based on the crowding distance when the size of the external archive exceeds the preset maximum value. The iteration and output module is used to determine whether the current iteration count has reached the maximum iteration count. If the target is not reached, return to the population update module to enter the next generation update; if the target has been reached, terminate the iteration and output the Pareto front solution set in the external archive as the multi-objective optimization result of the CNC machining process parameters.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the CNC machining parameter optimization method based on multi-objective artificial protozoan optimization as described in any one of claims 1 to 8.