Process parameter optimization method and device and electronic equipment
By combining optimization and prediction models, the system automatically searches for combinations of process parameters, solving the problem of relying on human experience in selecting process parameters and improving the efficiency of CNC machining and equipment utilization.
Patent Information
- Application Number
- CN202511081692.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-04
- Publication Date
- 2025-11-28
AI Technical Summary
In existing CNC machining technology, the selection of process parameters relies on the experience of process engineers, which makes it impossible to quickly and accurately determine the optimal or near-optimal combination of process parameters, resulting in low machining efficiency and high costs.
By combining optimization and prediction models, multiple iterative optimization processes are performed to automatically and intelligently search for combinations of process parameters that meet the constraints. The prediction model is then used to quickly determine the target solution based on multiple mutually exclusive process indicators.
It achieves automated and intelligent searching of process parameter combinations, overcomes the limitations of human experience, improves processing efficiency and equipment utilization, and finds the optimal balance point among multiple process indicators.
Smart Images

Figure CN121031287A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of material numerical control machining, and in particular to a process parameter optimization method and device and electronic equipment. BACKGROUND
[0002] Numerical control machining technology is a representative technology of modern manufacturing industry, which is based on computer integrated manufacturing technology, numerical control machine tool technology and machining technology, and realizes automatic processing of products. In the numerical control machining process, the selection of process parameters is a key link for formulating part machining process, and its rationality directly affects the quality, production efficiency and processing cost of the final product. At present, the traditional CAD / CAM system usually needs process programming personnel to manually set various process parameters to automatically generate numerical control machining programs. However, the quality of the program generated in this mode is highly dependent on the personal technical level and experience of the process personnel.
[0003] With the increasing complexity of the structure of the parts to be machined, it is often difficult to quickly and accurately determine the optimal or near-optimal process parameter combination according to the process indicators based on the personal experience of the process personnel or by consulting the cutting manual, especially when there are multiple process indicators and they have mutual exclusive relationship. For the consideration of machining safety and reliability, the process personnel usually tend to choose overly conservative process parameters, and basically remain unchanged in the entire machining process. Although this practice guarantees the machining stability, it seriously limits the machining efficiency of the numerical control machine tool, resulting in low equipment utilization, difficult improvement of machining efficiency, high production cost, and inability to fully exert the potential of high speed and high precision of modern numerical control machine tools. SUMMARY
[0004] The present application provides a process parameter optimization method, device and electronic equipment, which is used to solve the problem that the process parameters cannot be accurately determined according to the process indicators in the related art.
[0005] In a first aspect, an embodiment of the present application provides a process parameter optimization method, which comprises: obtaining a first population after initialization, the first population comprising N first solutions, wherein each first solution represents a combination of A process parameters, and the combination satisfies a preset machining constraint condition, N and A are both positive integers greater than 1; inputting the first population into a constructed optimization model to perform X times of iterative optimization processing, and obtaining X target populations corresponding to the X times of iterative optimization processing; for each target population, determining a target solution from the target population by using a constructed prediction model, the prediction model taking the A industrial parameters as independent variables, and the prediction model taking B process indicators mutually exclusive with each other as dependent variables, X is a positive integer greater than 1, and B is a positive integer. According to the X target solutions, a target image corresponding to the X target solutions is generated, and any point on the target image represents a set of A process parameter values and B predicted process index values corresponding to the A process parameter values.
[0006] Optionally, the first population is input into the constructed optimization model, X times of iterative optimization processing are performed, and X target populations corresponding to the X times of iterative optimization processing are obtained, including: For t-th, t = 1, 2,..., X, of the X times of iterative optimization processing, the following steps are performed: It is judged whether the generated random number is less than a preset first threshold value; If the random number is less than the first threshold value, an update operation is performed on the first population by the optimization model, a second population including N second solutions is generated, the numerical values of the N second solutions are different from the numerical values of the N first solutions, and the second population is input into the prediction model; If the random number is not less than the first threshold value, the first population is input into the prediction model; The prediction model calculates, for each of the N second solutions or the N first solutions, B first process index predicted values corresponding to the second solution or the first solution by using the prediction model, and calculates the fitness of each second solution or first solution according to a preset fitness evaluation criterion and the B first process index predicted values. The optimization model generates a third population including N third solutions by crossing around a candidate solution with the highest fitness in the N first solutions or the N second solutions, and takes the third population as the target population of the current t-th iterative optimization processing.
[0007] Optionally, for each target population, a target solution is determined from the target population by using the constructed prediction model, including: For each third solution in the target population, the prediction model is used to calculate B second process index predicted values corresponding to the third solution; According to the fitness evaluation criterion and the B second process index predicted values, the fitness of each third solution is calculated; From the N third solutions of the target population, a third solution with the highest fitness is selected as the target solution of the current t-th iteration.
[0008] Optionally, after the third solution with the highest fitness is selected from the N third solutions of the target population as the target solution of the current t-th iteration, the method further includes: adjusting the size of N according to the size of t through the optimization model, and adjusting t to t+1 to perform next iteration optimization processing until X times of iteration optimization processing is completed.
[0009] Optionally, the updating operation on the first population is performed by the optimization model to generate a second population including N second solutions, comprising: updating the first population to a first intermediate population by the optimization model; if t corresponding to the first population is not greater than a second threshold, generating a first opposite population opposite to the first intermediate population by the optimization model; determining N intermediate solutions from the first intermediate population and the first opposite population by the optimization model and the prediction model, and adjusting t to t+1 until t is greater than the second threshold, and taking the N intermediate solutions as the second population; if t corresponding to the first population is greater than a first threshold, taking the first intermediate population as the second population.
[0010] Optionally, the first opposite population opposite to the first intermediate population is generated by the optimization model, comprising: generating an opposite solution corresponding to each solution in the first intermediate population by an adaptive reverse learning strategy based on Levy flight random numbers, and taking N opposite solutions as the first opposite population.
[0011] Optionally, the process parameters are cutting parameters, and the process indicators include surface roughness and processing time.
[0012] Optionally, the initialization process of the first population comprises the following steps: inputting the value range and constraint conditions of multiple process parameters into the optimization model; the optimization model randomly generates an initial population including N initial solutions, and an initial opposite population opposite to the initial population; determining N first solutions from the initial population and the initial opposite population by the optimization model as the first population.
[0013] In a second aspect, an embodiment of the present application provides a process parameter optimization device, which comprises: an acquisition module configured to acquire a first population after initialization, the first population including N first solutions, wherein each first solution represents a combination of a group of A process parameters, and the combination satisfies a preset machining constraint condition, and N and A are positive integers greater than 1; an iteration module configured to input the first population into an optimization model constructed to perform X times of iteration optimization processing to obtain X target populations corresponding to the X times of iteration optimization processing. determining module configured to determine, for each of the target populations, a target solution from the target population by using the constructed prediction model, the prediction model having the A industrial parameters as independent variables, the prediction model having B process indexes mutually exclusive from each other as dependent variables, X being a positive integer greater than 1, and B being a positive integer; generating module configured to generate a target image corresponding to the X target solutions according to the X target solutions, any point on the target image representing a set of A process parameter values and B predicted process index values corresponding to the A process parameter values.
[0014] In a third aspect, an electronic device is provided, which includes a processor and a memory. The memory stores programs or instructions running on the processor. When the programs or instructions are executed by the processor, the steps of the method according to the first aspect are implemented.
[0015] According to the method for optimizing process parameters provided by the embodiment of the present application, the method includes the following steps: obtaining a first population after initialization, the first population including N first solutions, wherein each first solution represents a combination of A process parameters, and the combination satisfies a preset processing constraint condition, N and A are both positive integers greater than 1; inputting the first population into a constructed optimization model to perform X times of iterative optimization processing to obtain X target populations corresponding to the X times of iterative optimization processing; determining, for each of the target populations, a target solution from the target population by using a constructed prediction model, the prediction model having the A industrial parameters as independent variables, the prediction model having B process indexes mutually exclusive from each other as dependent variables, X being a positive integer greater than 1, and B being a positive integer; and generating a target image corresponding to the X target solutions according to the X target solutions, any point on the target image representing a set of A process parameter values and B predicted process index values corresponding to the A process parameter values. Through the optimization model, the population including multiple process parameter combinations is subjected to multiple iterative optimization processing, and the prediction model is used to quickly determine a target solution from the process parameter combinations according to multiple process indexes, so that the process parameter combination satisfying the constraint condition can be automatically and intelligently searched, and the problem that the process parameters cannot be accurately determined according to the process indexes due to the limitation and conservativeness of artificial experience is effectively overcome. Moreover, the prediction model simultaneously considers B mutually exclusive process indexes, so that the process parameters achieving the best balance point between the multiple process indexes can be found by the process personnel through collaborative optimization of the mutually restrictive targets. BRIEF DESCRIPTION OF DRAWINGS
[0016] In order to make the technical solutions in the embodiments of the present application or the prior art clearer, the accompanying drawings needed in the embodiments or prior art description will be briefly introduced. Obviously, the accompanying drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor.
[0017] Figure 1 The flow of the process parameter optimization method provided by the embodiment of the present application is shown; Figure 2 The concept of the process parameter optimization method provided by the embodiment of the present application is shown; Figure 3 The concept of another process parameter optimization method provided by the embodiment of the present application is shown; Figure 4 The concept of the construction process of a prediction model provided by the embodiment of the present application is shown; Figure 5 The visualization result of a target solution provided by the embodiment of the present application is shown; Figure 6 The structure of the process parameter optimization device provided by the embodiment of the present application is shown. DETAILED DESCRIPTION
[0018] As described in the background, the numerical control machining technology is a representative technology of modern manufacturing industry, which is based on computer integrated manufacturing technology, numerical control machine tool technology and mechanical processing technology, and realizes automatic processing of products. In the numerical control machining process, the selection of process parameters is a key link for formulating part machining process, and its rationality directly affects the quality, production efficiency and processing cost of the final product. At present, the traditional CAD / CAM system usually needs process programming personnel to manually set various process parameters, so as to automatically generate numerical control machining program. However, the quality of the program generated in this mode is highly dependent on the personal technical level and experience of the process personnel.
[0019] With the increasing complexity of the structure of the parts to be machined, it is often difficult to quickly and accurately determine the optimal or near-optimal process parameter combination according to the process indicators only by the personal experience of the process personnel or by consulting the cutting manual, especially when there are multiple process indicators and they have mutual exclusive relationship. For the consideration of machining safety and reliability, the process personnel usually tend to choose overly conservative process parameters, and basically remain unchanged in the whole machining process. Although this practice guarantees the machining stability, it seriously limits the machining efficiency of the numerical control machine tool, resulting in low equipment utilization, difficult improvement of machining efficiency, high production cost and inability to fully exert the potential of high speed and high precision of modern numerical control machine tools.
[0020] According to the process parameter optimization method provided by the embodiment of the application, the method comprises the following steps: obtaining a first population after initialization, the first population comprising N first solutions, wherein each first solution represents a combination of A process parameters, and the combination satisfies a preset processing constraint condition, N and A are positive integers greater than 1; inputting the first population into a constructed optimization model, performing X times of iterative optimization processing, and obtaining X target populations corresponding to the X times of iterative optimization processing; for each target population, determining a target solution from the target population by using a constructed prediction model, the prediction model taking the A industrial parameters as independent variables, the prediction model taking B process indexes mutually exclusive from each other as dependent variables, X is a positive integer greater than 1, and B is a positive integer; and generating a target image corresponding to the X target solutions according to the X target solutions, wherein any point on the target image represents a group of A process parameter values and B predicted process index values corresponding to the A process parameter values. By performing multiple iterative optimization on the population comprising multiple process parameter combinations by using the optimization model, and quickly determining the target solution from the process parameter combinations according to multiple process indexes by using the prediction model, the process parameter combination satisfying the constraint condition can be automatically and intelligently searched, and the problem that the process parameters cannot be accurately determined according to the process indexes due to the limitation and conservatism of artificial experience is effectively overcome. Moreover, the prediction model simultaneously considers the B mutually exclusive process indexes, can perform collaborative optimization on these mutually restrictive targets, and helps the process personnel to find the process parameter scheme achieving the best balance point among multiple process indexes.
[0021] In the following, the technical solutions of the application and how the technical solutions of the application solve the above technical problems will be described in detail with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described again in some embodiments. In the following, the embodiments of the application will be described with reference to the drawings.
[0022] It should be understood that the process parameter optimization method provided by the embodiments of the application can be executed by a target device. The target device can be an electronic device or multiple electronic devices cooperating with each other. The electronic device can be a server, such as a physical server, a server cluster composed of multiple servers, and a cloud server capable of cloud computing.
[0023] Figure 1 The flow of the process parameter optimization method provided by the embodiment of the application is shown. As shown in Figure 1 The process parameter optimization method provided by the embodiment of the application comprises steps 110 to 140.
[0024] In step 110, a first population initialized is obtained, the first population comprising N first solutions, wherein each first solution represents a combination of A process parameters, and the combination satisfies a preset machining constraint condition, and N and A are positive integers greater than 1.
[0025] In the embodiment of the present application, the population refers to a set composed of a plurality of solutions (individuals), and accordingly the first population can be a set of N first solutions. The process parameters can be cutting parameters, and specifically, the A process parameters can include spindle speed, feed speed and cutting depth. The preset machining constraint condition is used to limit the solution space and ensure that the obtained solution is feasible in practice, and can include machine tool constraints and tool constraints, wherein the machine tool constraints include the spindle speed, feed speed and cutting power range of the machine tool, and the tool constraints include tool life, cutting force and chip thickness.
[0026] In step 120, the first population is input into the constructed optimization model, X times of iterative optimization processing are performed, and X target populations corresponding to the X times of iterative optimization processing are obtained.
[0027] In the embodiment of the present application, the optimization model can be any population iterative optimization model, and can search for an optimal solution in the population by simulating natural selection and evolution mechanisms. For example, the optimization model can be a spider wasp optimization algorithm (SWO), which simulates the hunting, nesting and mating behaviors of female spider wasps, has various unique update strategies, and is suitable for solving high-dimensional, large-space, discrete nonlinear optimization problems. The SWO algorithm mainly consists of spider wasp population initialization, evaluation of population fitness values, updating of spider wasp individuals, elite retention strategy and accelerated convergence. The SWO algorithm initializes the population, evaluates the fitness of individuals, updates the position of individuals and the search space range, generates the next generation population by using the elite retention strategy, accelerates the convergence, gradually optimizes the individuals, and finally converges to the optimal solution of the problem or reaches the maximum preset iteration number. X is the maximum preset iteration number.
[0028] In the embodiment of the present application, in order to better determine the solutions of the B process indicators, the corresponding target population can be recorded each time the iterative optimization processing is performed, and step 130 can be performed on the X target populations.
[0029] In step 130, for each target population, a target solution is determined from the target population by using a constructed prediction model, the prediction model taking the A industrial parameters as independent variables, the prediction model taking B mutually exclusive process indicators as dependent variables, X is a positive integer greater than 1, and B is a positive integer.
[0030] In the embodiment of the present application, the A process parameters can be cutting parameters, specifically including spindle speed, feed speed, and cutting depth, and the B process indexes that are mutually exclusive can include surface roughness and machining time (the shorter the machining time, the higher the surface roughness; the longer the machining time, the lower the surface roughness). The A process parameters can be input into the prediction model to predict the surface roughness and machining time corresponding to the A process parameters through the prediction model.
[0031] In the embodiment of the present application, for each target population, the prediction model can be used to predict the process index value of each solution in the target population, and the fitness of each solution can be determined according to the process index value, and the solution with the highest fitness can be selected as the target solution. The target solution can represent the best cutting parameter combination under the current combination of surface roughness and machining time.
[0032] In step 140, a target image corresponding to the X target solutions is generated according to the X target solutions, and any point on the target image represents a set of A process parameter values and B predicted process index values corresponding to the A process parameter values.
[0033] In the embodiment of the present application, the spindle speed, feed speed, and cutting depth are used as decision variables (i.e., independent variables of the prediction model), and the surface roughness and machining time output by the prediction model are used as double objective functions, and a plurality of optimal solutions satisfying the constraint conditions are obtained through a plurality of rounds of iterative search of the optimization model. Each optimal solution is neither better nor worse than the other between the two objectives, forming a typical Pareto optimal solution set. The horizontal axis of the target image can be the machining time, and the vertical axis of the image can be the surface roughness, and each point represents an optimal result (i.e., B predicted process index values corresponding to A process parameter values) under a cutting parameter combination (i.e., A process parameter values).
[0034] Figure 2 The concept of a process parameter optimization method provided by an embodiment of the present application is shown. As shown in Figure 2 In the embodiment of the present application, the initialization process of the first population includes the following steps: inputting the value range and constraint conditions of a plurality of process parameters into the optimization model; the optimization model randomly generates an initial population including N initial solutions and an initial opposite population opposite to the initial population; and the optimization model determines N first solutions from between the initial population and the initial opposite population as the first population.
[0035] In the embodiment of the present application, before the optimization model solves and optimizes the model, a set of initial solutions is randomly generated in the value range of the process parameters, that is, in the feasible region space of the solution, and the set of initial solutions is used as the starting point of the algorithm for evolution and search. The specific generation method of an initial solution can be shown in the following formula (1): (1)
[0036] in, Representing the first in the population individual, This represents an initial solution. This represents the minimum value within the feasible region. Represents the maximum value of the feasible region. This represents a random number between 0 and 1.
[0037] In this embodiment of the invention, the adaptive back learning strategy can generate complementary individuals based on the minimum and maximum values in the current population, while introducing random numbers to further expand the search range and avoid getting trapped in local optima. This strategy can improve the quality of complementary individuals and has better adaptability and convergence in non-stationary, nonlinear, and discrete problems compared to the original back learning strategy. However, in this strategy, uniformly distributed random numbers are used to generate complementary solutions, but uniformly distributed random numbers lack the ability to search in high-dimensional spaces and have poor simulation capabilities in handling complex optimization problems. This embodiment of the invention uses formula (2) described below to generate complementary solutions. In the adaptive back learning strategy, Lévy flight is introduced to replace the uniform distribution in generating random numbers. The random numbers generated by Lévy flight follow a long-tailed distribution. Unlike the common uniform normal distribution, the long-tailed distribution has a larger variance, which helps the algorithm explore further regions in the search space, prevents the algorithm from getting trapped in local optima too early, and increases the chance of escaping local optima to find the global optimum. The optimization model generates an initial opposing population that is opposite to the initial population. This can be achieved by introducing the Lévy Flight Improved Adaptive Backward Learning (LOBL) strategy to generate opposing solutions. The initial opposing population includes the opposing solutions corresponding to the N initial solutions. Specifically, the Lévy Flight Improved Adaptive Backward Learning (LOBL) strategy can be expressed as shown in the following formula (2): (2)
[0038] in, This represents the opposite solution to an initial solution. The random number for the Levi flight is shown in formula (3) below. This represents the maximum value of the initial solutions that actually exist in the initial population. It is the minimum value of the initial solutions that actually exist in the initial population.
[0039] In this embodiment of the invention, the Levi flight random number is shown in the following formula (3): (3)
[0040] in, The variance and mean of the random numbers generated by the Lévy distribution are used to determine the variance and mean of the random numbers generated in this embodiment of the invention. Take 1, flight index representing the Levy flight, generally take 1.5, As shown in the following formula (4), As shown in the following formula (5).
[0041] (4)
[0042] (5)
[0043] Wherein, Indicates generating a random number subject to the standard normal distribution (mean 0, standard deviation 1), Is the step length scaling factor of the Levy flight, and its calculation formula is shown in formula (6).
[0044] (6)
[0045] Wherein, Represent the gamma function.
[0046] In the embodiment of the application, the optimization model can determine N first solutions as the first population from the initial population and the initial opposite population by a selection strategy, for example, a greedy strategy. Specifically, for each solution in the initial population and the initial opposite population, a prediction model can be used to calculate a prediction value corresponding to each solution, and according to a mapping relationship between the prediction value and the fitness, a fitness value corresponding to each solution can be determined according to the prediction value corresponding to each solution. According to a predetermined fitness evaluation criterion, for example, selecting a solution with high fitness or selecting a solution with low fitness, each solution is sorted according to the fitness value of each solution, and N first solutions are determined as the first population. In the embodiment of the application, in order to select process parameters more suitable for multiple process indicators, the smaller the prediction value of the solution obtained by the prediction model, the higher the fitness of the solution, and the more suitable the solution is for the prediction model. That is, the N initial solutions and the prediction values of the N initial opposite solutions are sorted from low to high, the first N solutions are selected as the first solutions, and the set of N first solutions is taken as the first population.
[0047] In the embodiment of the application, as shown in Figure 2 Step 120 can be implemented by the following steps: for the t-th iteration optimization processing in the X times of iteration optimization processing, t = 1, 2,..., X, the following steps are performed: generating a random number In formula (1), determining whether the generated random number Is less than a predetermined first threshold value, and the first threshold value can be 0.7 or any value.
[0048] In the embodiment of the application, if the random number If the value of the random number is less than the first threshold, the first population is updated using the optimization model to generate a second population containing N second solutions, the values of the N second solutions being different from the values of the N first solutions, and the second population is input into the prediction model; if the random number is not less than the first threshold, the first population is input into the prediction model.
[0049] In this embodiment of the invention, the prediction model can be set within the optimization model. The optimization model can use the output value of the prediction model as the evaluation criterion to obtain the target population through an elite retention strategy. Specifically, after inputting the second population or the first population into the prediction model, if the first population is input into the prediction model, the following steps apply to the first population; that is, the third population is the population after iterative optimization of the first population. If the second population is input into the prediction model, the following steps apply to the second population; that is, the third population is the population after iterative optimization of the second population. For each of the N second solutions or N first solutions, the prediction model calculates B predicted values of the first process indicators corresponding to the second solution or the first solution using the prediction model. Based on a preset fitness evaluation criterion and the B predicted values of the first process indicators, the fitness of each second solution or the first solution is calculated. Specifically, a preset fitness evaluation mapping relationship can be used to determine the fitness of each second solution or the first solution based on the B predicted values of the first process indicators. For example, the lower the predicted value of the first process indicator, the higher the fitness.
[0050] In this embodiment of the invention, the optimization model obtains the target population around the candidate solution with the highest fitness among the N first solutions or the N second solutions through an elite retention strategy, and cross-generates a third population including N third solutions, and uses the third population as the target population for the current t-th iteration of optimization. Specifically, the third solution can be generated by cross-generation using the following formula (7): (7)
[0051] Among them, the left side of formula (7) The third solution obtained by continuously updating and iterating the initial solution is the right-hand side of formula (7). As a candidate solution, Crossover Crossover rate (CR) is applied to... and The uniform crossover operator between them is typically 0.5. The calculation formula is shown in formula (8) below: (8)
[0052] Among them, in formula (4) For the candidate solutions on the right side of formula (7), a base number representing a natural logarithm function, and two numbers randomly generated according to a normal distribution, a calculation formula of is shown in the following formula (9), a calculation formula of is shown in the following formula (10).
[0053] (9)
[0054] (10)
[0055] wherein, , and are three random first solutions (or a random second solution) in N first solutions (or N second solutions), and , is a prediction model in a specific optimization problem.
[0056] In the embodiment of the present application, since the population algorithm generally starts searching for an optimal solution from a random point, the uncertainty is strong, and is easily affected by a local optimal solution, limiting the search speed and calculation accuracy of the algorithm. Some scholars have proposed a reverse learning strategy based on population individuals. The principle is to consider the opposite individual of each individual when generating a new individual each time, calculate the fitness values of the two individuals, use the prediction value of the prediction model as the evaluation standard according to the steps described above, and use the greedy strategy to retain the better individual to the population.
[0057] In the embodiment of the present application, as Figure 2As shown, the step of generating the second population including N second solutions by performing an updating operation on the first population by the optimization model can include: updating the first population to a first intermediate population by the optimization model using formula (1). If the t corresponding to the first population is not greater than the second threshold, generating the opposite solution corresponding to each solution in the first intermediate population by the optimization model using the adaptive reverse learning strategy based on the Levy flight random number through formula (2) above, and taking N opposite solutions as the first opposite population. Finally, determining N intermediate solutions from the first intermediate population and the first opposite population by the optimization model and the prediction model, and adjusting t to t+1 until t is greater than the second threshold, and taking N intermediate solutions as the second population. Specifically, the optimization model can determine N intermediate solutions from the first intermediate population and the first opposite population as the second population by a greedy strategy. Specifically, for each solution in the first intermediate population and the first opposite population, the prediction model can be used to calculate the prediction value corresponding to each solution, and the fitness value corresponding to each solution can be obtained according to the mapping relationship between the prediction value and the fitness. According to the preset fitness evaluation criterion, the fitness values of each solution are sorted to determine N intermediate solutions as the second population, and t is adjusted to t+1. The opposite population is generated by repeating the use of formula (2) and the intermediate solutions in the second population are updated by the greedy strategy, so that when the final t reaches the second threshold, the values of the solutions in the second population enter the next step, and the second population is optimized to the target population by the elite strategy.
[0058] In the embodiment of the present application, if the t corresponding to the first population is greater than the second threshold, the first intermediate population is taken as the second population, and the values of the solutions in the second population are input into the next step to optimize the second population to the target population by the elite strategy.
[0059] In the embodiment of the present application, after the target population is obtained by performing the elite reservation strategy through the above steps, as shown in Figure 2 Step 130 can include: for each third solution in the target population, calculating B second process index prediction values corresponding to the third solution by using the prediction model; calculating the fitness of each third solution according to the fitness evaluation criterion and the B second process index prediction values; and selecting the third solution with the highest fitness from the N third solutions in the target population as the target solution of the current t-th iteration.
[0060] In the embodiment of the present application, the preset fitness evaluation criterion can include the selection criteria and the mapping relationship between the fitness and the predicted value. For each third solution in the target population, the B second process index predicted values (the predicted values are the B second process index predicted values) corresponding to each third solution can be calculated by using the prediction model, and the fitness value corresponding to each third solution can be obtained according to the B second process index predicted values corresponding to each third solution according to the mapping relationship between the fitness and the predicted value. According to the selection criteria in the preset fitness evaluation criterion, for example, selecting the solution with high fitness or selecting the solution with low fitness, the third solution with the lowest B second process index predicted value, that is, the highest fitness value, can be selected as the target solution of the current tth iteration.
[0061] In the embodiment of the present application, as shown in step 130, after selecting the third solution with the highest fitness from the N third solutions of the target population as the target solution of the current tth iteration, the method further comprises: adjusting the size of N according to the size of t by using the following formula (11) through the optimization model, and adjusting t to t+1 to perform the next iteration optimization processing, judging whether the newly generated random number is less than the first threshold value, gradually obtaining the target population, determining the target solution, until the Xth iteration optimization processing is completed, and obtaining X target solutions. Figure 2
[0062] (11)
[0063] wherein represents the population size after acceleration convergence, is the population size before the last iteration, is the minimum population size used in different stages of the optimization process to avoid falling into a local minimum value, The calculation formula of is shown in the following formula (12).
[0064] (12)
[0065] wherein is the current iteration number, is the maximum iteration number in the SWO algorithm optimization process, that is, X.
[0066] In the embodiment of the present application, after completing the cutting parameter modeling and multi-objective optimization, in order to improve the engineering application and interaction of the model, the embodiment of the present application further provides a graphical user interface (GUI) based on the PyQt framework, which is used to realize the intelligent prediction and optimization function of the titanium alloy numerical control milling process parameters. The interface integrates model calling, optimization calculation, parameter verification and result display modules, and provides an intuitive and convenient process parameter decision support tool for operators. The overall structure of the interface is divided into four functional areas: 1. Input area: used for manually setting or importing cutting parameters such as spindle speed, feed rate, and cutting depth. The system has a built-in parameter range verification mechanism to ensure that the input values are within the device's capability range and prevent illegal operations.
[0067] 2. Button area: integrates multiple function buttons, including surface roughness and machining time prediction buttons, multi-objective optimization buttons, and parameter reset, data import and export functions. Clicking the button can call the trained prediction model or optimization model.
[0068] 3. Result display area: outputs the model prediction results (surface roughness and machining time) or the optimal cutting parameter combination obtained by the optimization algorithm in text form, making it easy for users to intuitively obtain feedback information.
[0069] 4. Visualization area: uses Matplotlib embedded charts to realize graphical visualization functions, supporting real-time drawing of Pareto frontier graphs, target function change curves, and other optimization result graphs to help users understand the performance trade-off relationship under different parameter combinations.
[0070] In addition, the interface has perfect parameter range verification, real-time drawing, and abnormal input processing mechanisms, and can be extended to integrate additional functions such as parameter recommendation, historical record management, and result export, enhancing the flexibility and practicality of the system. Through this system, process personnel can quickly complete the optimization configuration of titanium alloy CNC machining parameters without the need to deeply understand the details of the model and algorithm, improving machining quality and efficiency.
[0071] Figure 3 Another process parameter optimization method provided by an embodiment of the application is shown. As shown in FIG. 6, the process parameter optimization method provided by the embodiment of the application includes the following steps. Figure 3As shown, in the embodiment of the present application, before using the prediction model, the prediction model can be constructed first. First, a numerical control machining process test of titanium alloy material is designed to study the influence of different cutting parameters on the machining surface quality and machining efficiency. The size of the selected titanium alloy sample can be: length 330 mm, width 270 mm, thickness 25 mm, which is a representative size of aerospace engineering application. The machining tool adopts a hard alloy blade of LNMU0303ZERMSQM8020S specification, which meets the high-strength machining requirements of titanium alloy. The spindle speed range is selected as 1000-3000 r / min, the feed speed range is selected as 500-1500 mm / min, and the cutting depth range is selected as 0.04-0.2 mm. A reasonable test plan is formulated according to these parameter ranges. The experimental scheme is designed by using the orthogonal test method, and the machining test is carried out to ensure the balance and representativeness of each factor combination. During each test process, the cutting parameters, tool parameters, machining duration and surface roughness (Ra value) of the workpiece after machining are recorded in detail to provide reliable data support for subsequent prediction model establishment and optimization analysis. In the embodiment of the present application, the cutting parameters (spindle speed, feed speed, cutting depth) are taken as independent variables, and the titanium alloy surface roughness and machining time after machining are taken as dependent variables. The abnormal value test and normalization processing are performed on the orthogonal test data to eliminate the influence between different dimensions and improve the stability and prediction accuracy of the model. In the embodiment of the present application, the gradient boosting decision tree algorithm (XGBoost) can be introduced to construct a multi-input multi-output regression prediction model for numerical control milling process as the prediction model described above. The model can effectively learn the nonlinear mapping relationship between the cutting parameters and the machining surface response, and realize high-precision prediction of the surface roughness and machining time under unknown parameter combinations.
[0072] In the embodiment of the present application, Figure 4 The construction process of the prediction model provided by the embodiment of the present application is shown. As Figure 4 As shown, the abnormal values contained in the data set are detected by using the binning method, and the abnormal values are replaced by the mean value of the corresponding machining features to obtain the preprocessed data set.
[0073] Value>QU+1.5IQR or Value<QL-1.5IQR Wherein, value represents the abnormal value in each machining feature data, which is the data outside the interval of QU+1.5IQR and QL-1.5IQR, QU represents the upper quartile of each machining feature data, QL represents the lower quartile of each machining feature data, and IQR represents the interquartile range of each machining feature data, that is, IQR=QU-QL.
[0074] The data set is mapped to [0, 1] by linear normalization, so as to eliminate the influence of dimensional or distribution difference on the model and improve the convergence speed and accuracy of the algorithm.
[0075]
[0076] The gradient decision tree algorithm (Xgboost) is a strong learner constructed by integrating multiple weak learners, which corrects the residual error of the previous model by iteratively training a new model, and finally sums up the prediction results of all models. The algorithm is often recommended as a prediction model in machine learning and is widely used. XGBoost can deeply mine the relationship between process parameters and machining features, effectively utilize the value of machining workpiece data, and make the prediction model have high accuracy. Using a machining feature prediction model with high accuracy can not only avoid using complex formulas to express the relationship between process parameters and machining features, but also can import the designed cutting parameters.
[0077] The prediction model predicts the machining features of the parts to be machined, and realizes the early warning of future abnormal data. The core innovation of the gradient decision tree algorithm lies in the fine design of the objective function, including the loss function and the regularization term. As shown in the following formula:
[0078] In the formula, L is a loss function (for example: mean square error MSE or cross entropy Logloss, etc.), is a regularization term, which is used to control the complexity of the model and prevent overfitting.
[0079]
[0080] In the formula, T is the leaf node tree of the tree, w is the leaf weight (output value) is the penalty coefficient.
[0081] In order to improve the fitting accuracy and generalization performance of the prediction model for the surface roughness of titanium alloy and the machining time, the grid search algorithm (Grid Search) is further introduced to optimize the XGBoost model. By traversing all predefined parameter combinations, the model performance is trained and evaluated one by one to ensure that the optimal hyperparameter configuration is obtained, so as to build a multiple-input multiple-output regression prediction model with high robustness and generalization ability. The specific XGBoost hyperparameter settings are as follows: 1. n_estimators (number of weak learners): The value range is set to [50, 100, 200], which is used to control the complexity of the model and prevent underfitting and overfitting.
[0082] 2. learning_rate (learning rate): set to [0.01, 0.05, 0.1, 0.2], used to control the magnitude of model updates in each iteration, smaller learning rate improves stability but increases training time.
[0083] 3. max_depth (maximum depth of the tree): set to [3, 5, 7, 9], this parameter determines the maximum splitting depth of each tree, affecting the complexity of the model.
[0084] 4. min_child_weight (minimum sample weight and leaf node): set to [1, 3, 5], this parameter controls whether to further split a leaf node, thereby suppressing overfitting.
[0085] 5. subsample (sample sampling ratio): set to [0.6, 0.8, 1.0], used to control the proportion of randomly sampled samples when building each tree, preventing the model from over-relying on the training set.
[0086] 6. colsample_bytree (column sampling ratio): set to [0.6, 0.8, 1.0], representing the proportion of randomly selected features when building each tree, which helps to reduce the correlation between features.
[0087] 7. gamma (minimum split loss): set to [0, 0.1, 0.3, 0.5], this parameter represents the minimum loss function decrease required for node splitting, which helps to reduce unnecessary splitting.
[0088] 8. reg_alpha (L1 regularization coefficient) and reg_lambda (L2 regularization coefficient): set to [0, 0.1, 0.5] and [1, 5, 10] respectively, used to improve the anti-overfitting ability of the model.
[0089] In the grid search process, five-fold cross-validation is used to evaluate each set of parameter combinations, with mean square error (MSE) and coefficient of determination (R²) as the main evaluation indicators, and the parameter combination with the best comprehensive performance in roughness and processing time prediction is finally selected as the final configuration of the model. Thus, the objective function in the prediction model is determined as:
[0090] where and are the output values of the gradient boosting decision tree prediction model.
[0091] In the embodiments of the present application, in order to better understand the optimization method of the process parameters described above, examples are now given. It should be understood that the examples are not limiting. The embodiments of the present application also provide a pseudo code of the LOBL-SWO algorithm, as follows: Input: , , CR, TR,
[0092] Output:
[0093] Initialize N female wasps,
[0094] LOBL generates opposing populations
[0095] Calculate the values of individual fitness in and and select thebest individuals to be retained to obtain the new population
[0096] Evaluate each and finding the one with the best fitness in
[0097] %% the current function evaluation while
[0098] r: generating a random number between 0 and 1 if % The LOBL-SWO algorithm in which SWO updates
[0099] for
[0100] The detailed update process for can be found in reference (Abdel-Basset et al 2023) if
[0101] LOBL generates opposing populations
[0102] Calculate the values of individual fitness in and and select thebest individuals to be retained to obtain the new population
[0103] End if ; End for Else %% Elite etention strategies for
[0104] Applying ; End for End if Applying Memory Saving Updating N In an embodiment of the invention, the pseudo code representation as provided above. The number of solutions N and the minimum value of N in each iteration , the calculation parameters CR, TR and the maximum number of loops (X described above) is input into the algorithm. Population initialization is performed by the prediction model to generate an initial population and an initial opposite population, and a first population is selected from the initial population and the initial opposite population using a greedy strategy and the prediction model, and initialization is completed. Enter the loop until the termination condition is met (reach the maximum number of iterations, and generate a target image using X target solutions). In each loop, the following steps are performed: generate a random number r∈[0, 1], if r is less than a first threshold, update each individual using SWO by the optimization model to obtain a first intermediate population, and further if t is less than a second threshold, generate a first opposite population, and select N solutions from the first intermediate population and the first opposite population using a greedy strategy and the prediction model to obtain a second population, and perform the next loop until t is not less than the second threshold, input the tthsecond population into the elitist strategy. The second population (r is less than the first threshold) or the first population (r is not less than the first threshold) is input into the elitist strategy, the fitness is calculated using the output value of the prediction model, and the target population is obtained by performing a simple operation (which may be to retain the current optimal or use other elitist strategies) on each individual using the elitist strategy. Then, the target solution of this loop is determined from the target population using the prediction model, and the application memory is saved to record the current optimal solution. Finally, the size of N is updated.
[0105] In the embodiment of the present application, each solution represents a set of titanium alloy numerical control milling cutting parameter combinations, which consists of three variables: spindle speed, feed speed, and cutting depth. After initialization, the population evolves in iterations and gradually approaches the optimal solution.
[0106] The decision variables are cutting parameters, namely spindle speed, feed speed, and cutting depth, and their value ranges can include: spindle speed n∈[1000, 3000] r / min; feed speed f∈[500, 1500] mm / min; cutting depth a∈[0.04, 0.2] mm.
[0107] In the embodiment of the present application, the constraint conditions are machine tool constraints and tool constraints, wherein the machine tool constraints include the spindle speed (n), the feed speed (F), and the cutting power (P c ) range of the machine tool. Specifically, ; ; , is the cutting force, is the cutting speed, is the efficiency. The tool constraints include tool life (T), cutting force (Fc), and chip thickness ( h) . Tool life: to avoid excessive wear, it is necessary to satisfy (constrain cutting parameters by the modified Taylor formula); cutting force ( Fc ) Limitation: prevent tool breakage or deformation Since the surface roughness Ra and the machining time Time are conflicting targets in the optimization of milling parameters, the surface roughness and the machining time cannot be simultaneously minimized in a variable range by optimizing the cutting parameters.
[0108] In the embodiments of the present application, Figure 5 A visualization result of a target solution provided by the embodiments of the present application is shown, which shows the trade-off relationship between different process indicators. As shown in Figure 5 , the horizontal axis of the target image can be the machining time, and the vertical axis of the image is the surface roughness. Each point represents an optimal result (i.e., B predicted process indicator values corresponding to A process parameter values) under a combination of cutting parameters (i.e., A process parameter values). Along the front surface, a trend of "increasing machining time as the roughness decreases" is presented. Decision makers can select a combination of cutting parameters that meets the specific roughness condition with the shortest machining time on the target image in Figure 5 , or further compress the machining time under the premise of allowing a slightly higher roughness, to achieve personalized and intelligent process decision support.
[0109] Figure 6 The structure of a process parameter optimization device provided by the embodiments of the present application is shown. As shown in Figure 6 , the device 600 includes: An acquisition module 610 is configured to acquire a first population after initialization, the first population including N first solutions, wherein each first solution represents a combination of A process parameters, and the combination meets a preset machining constraint condition, N and A are both positive integers greater than 1. An iteration module 620 is configured to input the first population into a constructed optimization model, perform X times of iteration optimization processing, and obtain X target populations corresponding to the X times of iteration optimization processing. A determination module 630 is configured to determine, for each target population, a target solution from the target population by using a constructed prediction model, the prediction model taking the A industrial parameters as independent variables, and the prediction model taking B process indicators mutually exclusive from each other as dependent variables, X is a positive integer greater than 1, and B is a positive integer. A generation module 640 is configured to generate a target image corresponding to the X target solutions according to the X target solutions, and any point on the target image represents a combination of A process parameter values and B predicted process indicator values corresponding to the A process parameter values.
[0110] The embodiment of the present application also provides an electronic device, comprising a processor and a memory, wherein the memory stores a program or instructions which are run on the processor, and the program or instructions are executed by the processor to realize the steps of the method as described above.
[0111] In the exemplary embodiments, a non-transitory computer readable storage medium comprising instructions, such as a memory comprising instructions, is also provided, wherein the instructions are executable by a processor of an apparatus to complete the above method. For example, the non-transitory computer readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc. The non-transitory computer readable storage medium, when the instructions in the storage medium are executed by the processor of the electronic device, enables the electronic device to execute the method as described above.
[0112] The embodiment of the present application also provides a computer program product, comprising a computer program which is executed by a processor to realize the method as described above.
[0113] In the above description, the technical details such as the configuration of each layer are not described in detail. However, those skilled in the art should understand that the layers, regions, etc. with desired shapes can be formed by various technical means. In addition, those skilled in the art can also design methods which are not exactly the same as the above-described methods in order to form the same structure. In addition, although each embodiment is described above, this does not mean that the measures in each embodiment cannot be used advantageously in combination.
[0114] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications to the embodiments once they know the basic inventive concept. Therefore, the appended claims are intended to be interpreted as including all the preferred embodiments and all the changes and modifications falling within the scope of the present application.
[0115] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.
Claims
1. A method for optimizing process parameters, characterized in that, The method includes: Obtain the first population after initialization. The first population includes N first solutions, where each first solution represents a combination of A process parameters, and the combination satisfies a preset processing constraint condition. N and A are both positive integers greater than 1. The first population is input into the constructed optimization model and subjected to X iterations of optimization to obtain X target populations that correspond one-to-one with the X iterations of optimization. For each target population, the target solution is determined from the target population using the constructed prediction model. The prediction model uses A industrial parameters as independent variables and B mutually exclusive process indicators as dependent variables. X is a positive integer greater than 1, and B is a positive integer. Based on the X target solutions, a target image corresponding to the X target solutions is generated. Any point on the target image represents a set of A process parameter values and B predicted process index values corresponding to the A process parameter values.
2. The method according to claim 1, characterized in that, The step of inputting the first population into the constructed optimization model and performing X iterations of optimization processing to obtain X target populations corresponding one-to-one with the X iterations of optimization processing includes: For the t-th iteration of the X iteration optimization process, where t=1, 2, ..., X, the following steps are performed: Determine whether the generated random number is less than a preset first threshold; If the random number is less than the first threshold, the first population is updated by the optimization model to generate a second population including N second solutions. The values of the N second solutions are different from the values of the N first solutions. The second population is then input into the prediction model. If the random number is not less than the first threshold, the first population is input into the prediction model; For each of the N second solutions or N first solutions, the prediction model calculates the predicted values of B first process indicators corresponding to the second solution or the first solution. Based on the preset fitness evaluation criteria and the predicted values of the B first process indicators, the fitness of each second solution or the first solution is calculated. The optimization model generates a third population consisting of N third solutions by cross-referencing the candidate solutions with the highest fitness among the N first solutions or the N second solutions, and uses the third population as the target population for the current t-th iteration optimization process.
3. The method according to claim 2, characterized in that, The step of performing an update operation on the first population using the optimization model to generate a second population comprising N second solutions includes: The first population is updated to a first intermediate population using the optimization model; If t corresponding to the first population is not greater than the second threshold, a first opposing population that is opposite to the first intermediate population is generated through the optimization model. The optimization model and the prediction model are used to determine N intermediate solutions between the first intermediate population and the first opposing population, and t is adjusted to t+1 until t is greater than the second threshold. The N intermediate solutions are then used as the second population. If t corresponding to the first population is greater than the second threshold, the first intermediate population is used as the second population.
4. The method according to claim 3, characterized in that, The step of generating a first opposing population that is opposite to the first intermediate population through the optimization model includes: An adaptive reverse learning strategy based on Lévy flight random numbers is used to generate the opposite solution for each solution in the first intermediate population, and N opposite solutions are used as the first opposite population.
5. The method according to claim 2, characterized in that, For each target population, determining the target solution from the target population using the constructed prediction model includes: For each third solution within the target population, the prediction model is used to calculate the predicted values of B second process indicators corresponding to the third solution; The fitness of each third solution is calculated based on the fitness evaluation criteria and the predicted values of the B second process indicators. From the N third solutions of the target population, the third solution with the highest fitness is selected as the target solution for the current t-th iteration.
6. The method according to claim 5, characterized in that, After selecting the third solution with the highest fitness from the N third solutions of the target population as the target solution for the current t-th iteration, the method further includes: The optimization model adjusts the size of N according to the size of t, and then adjusts t to t+1 to perform the next iteration optimization process, until the X iteration optimization process is completed.
7. The method according to claim 1, characterized in that, The process parameters are cutting parameters, and the process indicators include surface roughness and machining time.
8. The method according to claim 1, characterized in that, The initialization process of the first population includes the following steps: Input the value ranges and constraints of multiple process parameters into the optimization model; The optimization model randomly generates an initial population including N initial solutions and an initial opposing population that is opposed to the initial population; The optimization model determines N first solutions from the initial population and the initial opposing population as the first population.
9. A device for optimizing process parameters, characterized in that, The device includes: The acquisition module is used to acquire the first population after initialization. The first population includes N first solutions, where each first solution represents a combination of A process parameters, and the combination satisfies a preset processing constraint condition. N and A are both positive integers greater than 1. The iteration module is used to input the first population into the constructed optimization model, perform X iterations of optimization processing, and obtain X target populations that correspond one-to-one with the X iterations of optimization processing. The determination module is used to determine the target solution from the target population using the constructed prediction model for each target population. The prediction model uses A industrial parameters as independent variables and B mutually exclusive process indicators as dependent variables. X is a positive integer greater than 1, and B is a positive integer. The generation module is used to generate target images corresponding to the X target solutions based on the X target solutions. Any point on the target image represents a set of A process parameter values and B predicted process index values corresponding to the A process parameter values.
10. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that run on the processor, the program or instructions which, when executed by the processor, implement the steps of the method as described in any one of claims 1-8.