TC4 titanium alloy drilling process parameter multi-objective optimization method based on machine learning
By applying a multi-objective optimization method based on machine learning in TC4 titanium alloy drilling, combining the extreme learning machine and improved whale optimization algorithm, the drilling process parameters are optimized, and the problem of difficulty in optimizing multiple targets at the same time in the existing technology is solved, and the problem of improving the improvement of multiple targets is improved. The processing efficiency and reduce the energy consumption of the machine tool.
Patent Information
- Application Number
- CN202411481166.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-02-14
AI Technical Summary
The prior art is difficult to simultaneously optimize surface roughness, outlet burr height, energy consumption and material removal rate during the drilling process of TC4 titanium alloy, resulting in low processing efficiency and high machine tool energy consumption.
A multi-objective optimization method based on machine learning is adopted, combining the extreme learning machine (ELM) and the improved whale optimization algorithm (IWOA), a multi-objective optimization model is built and the drilling process parameters are optimized.
The accuracy and generalization ability of process parameter optimization are significantly improved, and the effect of reducing surface roughness, outlet burr height and energy consumption while improving material removal rate is achieved.
Smart Images

Figure CN119442867A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of mechanical processing, and specifically relates to a multi-objective optimization method for TC4 titanium alloy drilling process parameters based on machine learning. Background Art
[0002] TC4 titanium alloy (Ti-6Al-4V) is a typical titanium alloy with α and β phase structures. It has many characteristics such as good plasticity and toughness, high strength and hardness, high temperature resistance and good biocompatibility. Therefore, it is widely used in a series of important fields such as aerospace, biomedicine, nuclear power chemical industry and military. In addition, the processing of TC4 titanium alloy parts often includes hole processing. According to relevant statistics, among mechanical parts, the proportion of parts with holes accounts for about 50%-80%. Therefore, it is particularly necessary to carry out drilling research on TC4 titanium alloy.
[0003] Due to the inherent characteristics of TC4 titanium alloy such as high hardness and low thermal conductivity, it is very easy to produce high surface roughness and high outlet burr during drilling. Studies have shown that in the drilling process of TC4 titanium alloy, the selection of reasonable process parameters can effectively control the surface roughness and outlet burr height of the workpiece. However, when selecting process parameters, due to the lack of unified industry standards, the traditional method is usually to adjust the parameters through the experience accumulated by technicians or continuous trial cutting. This method not only makes the surface roughness and outlet burr height of the processed workpiece less than ideal, but also makes the entire processing process inefficient and the energy consumption of the machine tool increases accordingly. In addition, most of the current studies on the optimization model of TC4 titanium alloy drilling process parameters only take a single target (such as drilling surface roughness or outlet burr height) as the optimization object, and few studies can take multiple targets (such as surface roughness, outlet burr height, energy consumption and material removal rate) into consideration as optimization objects to achieve the optimization of process parameters. In view of this, strengthening the research on optimization of process parameters for drilling TC4 titanium alloy is of great significance to promoting the development and application of TC4 titanium alloy in cutting-edge fields. Summary of the invention
[0004] The purpose of the present invention is to provide a multi-objective optimization method for TC4 titanium alloy drilling process parameters based on machine learning in response to the shortcomings of current domestic and foreign research on the optimization method of TC4 titanium alloy drilling process parameters. The method takes surface roughness, energy consumption, exit burr height and material removal rate as optimization targets, and uses the data generated by the TC4 titanium alloy drilling experiment to train the machine learning model, and establishes the fitness function of the swarm intelligence optimization algorithm based on the trained model. An algorithm (ELM-IWOA) combining the extreme learning machine (ELM) with the improved whale optimization algorithm (IWOA) is proposed, which aims to optimize the drilling process parameters of TC4 titanium alloy.
[0005] To achieve the above-mentioned purpose, the technical solution of the present invention is: a multi-objective optimization method for TC4 titanium alloy drilling process parameters based on machine learning, and an algorithm ELM-IWOA is proposed to optimize the drilling process parameters of TC4 titanium alloy by combining an extreme learning machine ELM with an improved whale optimization algorithm IWOA; in the ELM stage, the spindle speed and feed speed are used as the input of ELM, and the surface roughness, energy consumption, outlet burr height and material removal rate of TC4 are used as outputs to construct a multi-objective optimization model that reduces surface roughness, outlet burr height and energy consumption while improving the material removal rate; in the IWOA stage, the constructed multi-objective optimization model is solved by IWOA to output the optimal TC4 titanium alloy drilling process parameters.
[0006] The method comprises the following steps:
[0007] Step S1, using the full factorial experimental method to design an experimental scheme for TC4 titanium alloy drilling; the experimental scheme first uses the spindle speed and feed speed as factors, and divides the levels according to the constraints of each factor; secondly, according to the designed experimental scheme, the TC4 titanium alloy drilling experiment is carried out, and after the drilling process, the optimization targets obtained from each group of experiments, namely, surface roughness, exit burr height, material removal rate and energy consumption, are measured and calculated; finally, the spindle speed and feed speed are normalized, and the normalized data and the optimization targets obtained by measurement and calculation together constitute a data set D;
[0008] Step S2: Divide the data set D into K training sets and test sets using the K-fold cross-validation method;
[0009] Step S3, first substitute the training set into the ELM model for training, and use the test set to select the ELM model with the highest accuracy; secondly, build a multi-objective optimization model based on the selected ELM model; finally, use the IWOA algorithm to solve the multi-objective optimization model and output the optimal TC4 titanium alloy drilling process parameters.
[0010] The present invention also provides a multi-objective optimization system for TC4 titanium alloy drilling process parameters based on machine learning, including a memory, a processor, and computer program instructions stored in the memory and capable of being executed by the processor. When the processor executes the computer program instructions, the method steps described above can be implemented.
[0011] The present invention also provides a computer-readable storage medium, on which computer program instructions that can be executed by a processor are stored. When the processor executes the computer program instructions, the method steps described above can be implemented.
[0012] Compared with the prior art, the present invention has the following beneficial effects:
[0013] (1) In terms of optimization objectives, the present invention is characterized in that surface roughness, outlet burr height, material removal rate and energy consumption are simultaneously used as optimization objectives, providing a multi-objective optimization method for process parameters. Compared with the traditional single-objective optimization method, this feature can significantly improve the accuracy and generalization ability of process parameter optimization.
[0014] (2) In terms of algorithm construction, the present invention is characterized by improving the population initialization method, fitness function and whale position update method of the WOA swarm intelligence optimization algorithm. Compared with the native WOA algorithm, this feature can effectively improve the problems of insufficient stability, slow convergence speed and easy falling into the local optimal solution of the native algorithm, thereby better realizing the optimization of process parameters. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 This is the ELM-IWOA algorithm training flow chart;
[0016] Figure 2 It is a schematic diagram of the connection between the input layer and the hidden layer;
[0017] Figure 3 It is the iterative convergence diagram of the ELM-WOA algorithm;
[0018] Figure 4 It is the iterative convergence diagram of the ELM-IWOA algorithm. DETAILED DESCRIPTION
[0019] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings.
[0020] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.
[0021] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0022] The present invention provides a multi-objective optimization method for TC4 titanium alloy drilling process parameters based on machine learning, and proposes an algorithm ELM-IWOA that combines an extreme learning machine ELM with an improved whale optimization algorithm IWOA to optimize the TC4 titanium alloy drilling process parameters; in the ELM stage, the spindle speed and feed speed are used as the input of the ELM, and the surface roughness, energy consumption, outlet burr height and material removal rate of TC4 are used as outputs to construct a multi-objective optimization model that reduces the surface roughness, outlet burr height and energy consumption while improving the material removal rate; in the IWOA stage, the constructed multi-objective optimization model is solved using IWOA to output the optimal TC4 titanium alloy drilling process parameters. The following steps are included:
[0023] Step S1, using the full factorial experimental method to design an experimental scheme for TC4 titanium alloy drilling; the experimental scheme first uses the spindle speed and feed speed as factors, and divides the levels according to the constraints of each factor; secondly, according to the designed experimental scheme, the TC4 titanium alloy drilling experiment is carried out, and after the drilling process, the optimization targets obtained from each group of experiments, namely, surface roughness, exit burr height, material removal rate and energy consumption, are measured and calculated; finally, the spindle speed and feed speed are normalized, and the normalized data and the optimization targets obtained by measurement and calculation together constitute a data set D;
[0024] Step S2: Divide the data set D into K training sets and test sets using the K-fold cross-validation method;
[0025] Step S3, first substitute the training set into the ELM model for training, and use the test set to select the ELM model with the highest accuracy; secondly, build a multi-objective optimization model based on the selected ELM model; finally, use the IWOA algorithm to solve the multi-objective optimization model and output the optimal TC4 titanium alloy drilling process parameters.
[0026] The following is the specific implementation process of the present invention.
[0027] like Figure 1 As shown, the present invention provides a multi-objective optimization of TC4 titanium alloy drilling process parameters based on machine learning (ELM-IWOA in this example), including the following steps:
[0028] Step S1, an experimental scheme for TC4 titanium alloy drilling is designed by using the full factorial experimental method; the experimental scheme first takes the spindle speed and feed speed as factors, and divides them horizontally according to the constraints of each factor; secondly, according to the designed experimental scheme, a TC4 titanium alloy drilling experiment is carried out, and the optimization objectives (surface roughness, exit burr height, material removal rate and energy consumption) obtained from each group of experiments are measured and calculated after the drilling process; finally, the spindle speed and feed speed are normalized, and the normalized data and the optimization objectives obtained by measurement and calculation together constitute a data set D for subsequent algorithm training and construction.
[0029] S1.1, spindle speed n z , feed speed v f As factors, the factors are divided horizontally according to the constraints of each factor, and then the full factorial experimental scheme is designed. The constraints of each factor are as follows:
[0030] n min ≤n z ≤n max (1)
[0031] v min ≤v f ≤v max (2)
[0032] Among them, n min 、n max is the spindle speed n z The minimum and maximum values of v min 、v max is the feed speed v f The minimum and maximum values of ;
[0033] S1.2. According to the designed full-factor experimental plan, a TC4 titanium alloy drilling experiment was carried out, and after the experiment, the drilling surface roughness, exit burr height, material removal rate and energy consumption of TC4 titanium alloy were measured and calculated.
[0034] S1.3, perform Min-max normalization on the spindle speed and feed speed, and use the normalized data and the optimization target obtained by measurement and calculation to form a data set D. The calculation formula of the Min-max method is as follows:
[0035]
[0036] Where, X n represents the normalized value, which is between [0,1]; X represents the initial value of the current sample data point; X min represents the minimum value in the initial sample data set; X max Represents the maximum value in the initial sample data set.
[0037] Step S2: To improve the generalization ability and accuracy of the model, the present invention uses the K-fold cross-validation method to divide the data set D into K training sets and test sets. The details are as follows:
[0038] S2.1. Divide the data set D into K (K>1) samples with a capacity of mutually exclusive subsets of, where len(D) represents the total number of samples in the data set D; The round-up symbol.
[0039] S2.2. Choose any mutually exclusive subset as the test set D v , the union of the remaining K-1 mutually exclusive subsets is used as the training set D t .
[0040] S2.3. Repeat the above steps K times to obtain K test sets, denoted as D v =[D v1 ,D v2 ,…,D vK ], get K training sets, denoted as D t =[D t1 ,D t2 ,…,D tK In order to facilitate the description of the subsequent algorithm construction, the present invention takes the training set D t1 Train the ELM-IWOA algorithm and record it as D t1 ={(x i ,y i ),1≤i≤N}, where x i represents the feature vector; y i Represents the target vector; N represents the total number of samples in the training set.
[0041] Step S3, in order to realize the construction of the final optimization algorithm, the present invention first substitutes the training set into the ELM model for training, and uses the test set to select the ELM model with the highest accuracy; secondly, a multi-objective optimization model is constructed based on the selected ELM model; finally, the IWOA algorithm designed by the present invention is used to solve the multi-objective optimization model and output the optimal process parameter combination.
[0042] S3.1. Initialize the network parameters of the ELM model: First, determine the number of neurons in the input layer, hidden layer, and output layer according to the number of selected features and specific task requirements. The number of neurons in the input layer directly corresponds to the number of selected features, which is set to p here; the number of neurons in the output layer directly corresponds to the number of training set targets, which is the target vector y iThe number of features in is set as q here; the number of hidden layer neurons is gradually increased or decreased according to the empirical formula or multiple experiments until the best performance model is obtained, which is set as L here. Then the weight matrix w connecting the input layer neurons to the hidden layer neurons is randomly initialized (hs) And the bias b of each hidden neuron (s) , where 1≤h≤p, 1≤s≤L. The weight matrix w (hs) The composition of is shown in formula (4), and the connection diagram between the input layer neurons and the hidden layer neurons is shown in Figure 2 shown.
[0043]
[0044] In the formula, Represents the connection weight between the pth input layer neuron and the Lth hidden layer neuron.
[0045] S3.2. Calculation of hidden layer output of ELM model: Taking into account the advantages and disadvantages of various activation functions and the training effect of the algorithm proposed in the present invention, the present invention selects the Tanh function to perform nonlinear transformation calculation on the hidden layer output matrix. The mathematical expression of the Tanh function is shown in formula (5).
[0046]
[0047] After selecting the activation function, the initialized weight w (hs) and bias b (s) After calculation by the activation function, the output matrix H(x) of the hidden layer is obtained, and its formula is shown in formula (6).
[0048]
[0049] In the formula, is the threshold of the Lth hidden layer neuron; g(x) is the activation function Tanh function of the hidden layer.
[0050] S3.3. Calculation of the optimal weight of the output layer of the ELM model: After the output matrix H(x) of the hidden layer is calculated, assuming that the output layer weight matrix is β (so) , 1≤o≤q, then the output matrix F of the ELM algorithm can be calculated by formula (7): c The calculation formula is as follows:
[0051]
[0052] Express the above formula in matrix form:
[0053] F c =H(x)β (so) (8)
[0054] Among them, the output matrix F of ELM c It can be expressed as:
[0055]
[0056] The weight matrix β of the output layer (so) It can be expressed as:
[0057]
[0058] In the formula Represents the output value of the qth output neuron corresponding to the Nth sample input of the ELM algorithm; Represents the output weight of the qth output neuron corresponding to the Lth hidden layer neuron of the ELM algorithm.
[0059] In the ELM algorithm, in order to train a network model with ideal effect, it is necessary to obtain a So that the following formula holds:
[0060]
[0061] Since the ELM algorithm is different from the traditional neural network based on the gradient descent method to update the model parameters multiple times, it (hs) and hidden layer threshold b (s) After random initialization, the output matrix H(x) of the hidden layer is also determined. Therefore, the training of the ELM model can actually be equivalent to training H(x)β (so) =y (io) Solve its least squares solution The process of least squares solution The calculation formula is as follows:
[0062]
[0063] In the formula, H + represents the Moore–Penrose generalized inverse matrix of the matrix H; y (io) is the target value matrix of the training set input to the model.
[0064] S3.4. Determination of the final ELM model: After the weight calculation of the output layer is completed, the training of the ELM model is completed, and the model can be expressed as follows:
[0065]
[0066] In order to select the model with the best training effect, K training sets D t1 ,D t2 ,…,DtK The ELM models are introduced in turn for training, and K ELM models E1, E2, …, E K ; Then use the corresponding test set D v1 ,D v2 ,…,D vK For ELM models E1, E2, …, E K Perform fitting tests to obtain the accuracy A of each model z , record A z =[A1,A2,…,A K ]; Accuracy A z The calculation expression is as follows:
[0067]
[0068] In the formula, c represents the number of test set data; f i Indicates that the i-th data is substituted into the ELM model to obtain the output value; y i Indicates the label value of the i-th data in the test set.
[0069] Finally, the accuracy of each model is compared, and the model with the highest accuracy is selected as the final model to continue the subsequent algorithm construction.
[0070] To facilitate the description of the subsequent algorithm construction, the final model is recorded as E z .
[0071] S3.5. Construction of a multi-objective comprehensive evaluation function: The present invention uses geometric analysis to construct a multi-objective comprehensive evaluation function. Compared with the traditional weighted average method, the geometric analysis method can more comprehensively evaluate the pros and cons of the scheme, avoiding the deviation of focusing on a single goal and ignoring other important goals; it can more intuitively see the performance of different schemes in each target dimension and their distance from the ideal point; finally, it is easier to implement and understand than the evaluation method that relies on complex mathematical models, which helps to improve the practicality and popularity of the algorithm. The specific implementation of the ELM model combined with the geometric analysis method to construct a multi-objective comprehensive evaluation function is as follows:
[0072] From step S3.1, we know that the input data set has q targets. First, assume that there are ρ positive targets (i.e., the larger the value, the better) and σ negative targets (i.e., the smaller the value, the better). Secondly, the maximum value of each target in all schemes is recorded as α, and the minimum value is recorded as γ. Furthermore, the final ELM model E z Based on the output results, the evaluation metric value η of the positive target is calculated separately θ (x) and the evaluation metric of the negative target The specific calculation formula is as follows:
[0073] For the positive target, the calculation formula of its evaluation metric value is shown in formula (15):
[0074]
[0075] In the formula, E zθ Representation Model E z The value of the θth positive target in the output value; α θ is the maximum value of the θth positive target; γ θ is the minimum value of the θth forward target.
[0076] For negative targets, the calculation formula of its evaluation metric value is shown in formula (16):
[0077]
[0078] In the formula, Representation Model E z Output value The value of a negative target; For the The maximum value of negative targets; For the The minimum value of a negative target.
[0079] Finally, the geometric mean method is used to substitute the calculated target evaluation metric values into the calculation formula to form a multi-objective comprehensive evaluation function. Further, this function is used as the fitness function of the improved WOA algorithm to improve its poor stability. The calculation formula of the multi-objective comprehensive evaluation function is shown in formula (17):
[0080]
[0081] In this calculation formula, the calculation result reflects the quality of the whale individuals in the input model: if the calculation result is close to 1, it means that the input whale individuals are better individuals, and if the calculation result is close to 0, it means that the input whale individuals are worse individuals.
[0082] S3.6. Establishment of a multi-objective optimization model: After the multi-objective comprehensive evaluation function is constructed, the present invention establishes a multi-objective optimization model based on formula (17). The model is specifically shown in formula (18):
[0083]
[0084] In the formula, represents the maximization of multi-objective comprehensive evaluation function; x N represents the Nth optimization variable; x Nmin ≤x N ≤x NmaxRepresents the constraint range of the Nth optimization variable.
[0085] S3.7. Initialize the whale population based on the reverse learning strategy: First, randomly initialize a whale population of size Q, which contains multiple whale individuals, each of which represents a possible solution in the search space; second, set the maximum number of iterations to T, and the whale position dimension is set to p according to the number of features of the feature vector of the input data set; then, initialize the upper bounds u of the whale position dimensions. b and the lower bound l b ; Finally, for each whale individual in the initial population, the corresponding reverse individual is calculated based on the reverse learning strategy, and the calculated reverse individual is merged with the original population to form a new population, and the first Q whale individuals with the best fitness value are selected from the population as the new initial whale population. The calculation formula of the reverse learning strategy is shown in formula (19):
[0086]
[0087] In the formula, Represents the value of the i-th whale in the h-th dimension based on the reverse learning strategy; represents the upper and lower bounds of the constraints specified for the h dimension; Represents the original value of the i-th whale in the h-th dimension.
[0088] S3.8. Evaluation of whale population: In order to improve the stability of the algorithm, the present invention applies the multi-objective comprehensive evaluation function (17) established in step S3.5 to the improved whale optimization algorithm, and uses it as the fitness function of the improved whale optimization algorithm to evaluate the individuals of the whale population.
[0089] Each individual whale is brought into the fitness function for calculation to obtain its fitness value, and the fitness value of each individual whale is sorted, and the individual whale with the largest fitness value is selected, and its position vector is regarded as the position vector of the current best candidate whale.
[0090] S3.9. Update of whale position based on adaptive weight: In order to improve the accuracy of the algorithm and enhance the search capability of the algorithm, the present invention proposes an adaptive weight update of whale position. The calculation formula of the adaptive weight is shown in formula (20).
[0091]
[0092] Where K represents the adaptive weight; t d is the current iteration number; T is the maximum iteration number.
[0093] In the whale optimization algorithm, each individual whale updates its position in three ways, as follows:
[0094] 1) Encirclement and predation
[0095] When hunting, whales first locate the target prey and then surround it. Because the best individual whale position, i.e. the prey position, is not known, the best candidate whale position is selected as the target prey position and then surrounded. The mathematical expression of this process is as follows:
[0096] D=|C*X * (t d )-X(t d )| (21)
[0097] X(t d +1) = K*X * (t d )-A*D (22)
[0098] Where K represents the adaptive weight; X * (t d ) represents the position vector of the current best candidate whale; X(t d ) is the current whale individual position vector; t d represents the current iteration number; D represents the distance between the current whale individual position and the best candidate whale position; X(t d +1) represents the updated position vector of the individual whale; A and C are coefficient vectors; the calculation expressions of A and C are as follows:
[0099] A=2a*r1-a (23)
[0100] C=2*r2 (24)
[0101] Where a is the convergence variable, which decreases linearly from 2 to 0 during the entire iteration; r1 and r2 are both vectors composed of random variables that obey a uniform distribution in the interval [0,1].
[0102] 2) Bubble Net Predation
[0103] There are two main ways for whales to hunt: bubble net hunting and encirclement hunting. When using bubble net hunting, the position between the whale and the target prey is updated in a spiral manner, and its mathematical expression is as follows:
[0104] X(t d +1)=D'*e bxl *cos(2*π*l)+k*X * (t d ) (25)
[0105] D'=|X * (td )-X(t d )| (26)
[0106] Where D' represents the distance between the current whale individual position and the current best candidate whale individual position; b x Represents the parameter used to specify the spiral shape. Generally, the value selected for this parameter is a constant 1; l is a random number in [-1,1].
[0107] As mentioned above, whales have two ways of hunting. Therefore, the whale algorithm will use a randomly generated probability number p of the hunting mechanism in [0,1] to determine the hunting mechanism probability. g To determine the predation method; when p g ≥0.5, bubble net is used for predation. g When |A|<1, encirclement predation is adopted, and its mathematical expression is as follows:
[0108]
[0109] 3) Searching for prey
[0110] When p g When |A|≥1, the current whale will swim to a random whale so that the whale's search range can be expanded to capture the best target prey. The mathematical expression of this search process is as follows:
[0111] X(t d +1) = K*X rand (t d )-A*D” (28)
[0112] Where, X rand (t d ) represents the position of a random whale individual; D” represents the distance between the current whale individual position and the random whale individual position, and its calculation expression is as follows:
[0113] D”=|C*X rand (t d )-X(t d )| (29)
[0114] The above whale position update behavior is expressed in mathematical expressions as follows:
[0115]
[0116] S3.10, Iteration terminates and outputs the optimal result: When the number of iterations t d When the number of iterations is greater than the set maximum number of iterations T, the whale individual with the largest fitness value among all whale individuals is located at position X * Output, at this time X* The dimensions at each position represent the optimal values of all the features of the data in the dataset, and the ELM-IWOA algorithm training is terminated.
[0117] Implementation Example
[0118] This implementation example is to drill a TC4 titanium alloy plate with a length of 100mm, a width of 100mm, and a thickness of 5mm on a VMC850 vertical machining center using a carbide steel drill with a diameter of 6mm. First, A and B are used to represent the two factors of spindle speed and feed speed respectively; secondly, the spindle speed range when drilling TC4 titanium alloy is set to the commonly used range of 800r / min to 2000r / min, and the feed speed range is set to the commonly used range of 50mm / min to 200mm / min; then, each factor is divided into 4 levels, and the level numbers are represented by 1 to 4; finally, the number of each experiment is represented by 1 to 16. The specific full factor level division table and full factor experiment table are shown in Table 1 and Table 2 respectively.
[0119] Table 1. Division of all factor levels
[0120]
[0121] Table 2 Full factorial experiment table
[0122]
[0123]
[0124] After designing the experimental plan, the TC4 titanium alloy drilling experiment was carried out according to the plan, and after the experiment, the four optimization targets (surface roughness, exit burr height, material removal rate and energy consumption) were measured and calculated, and finally the experimental results were recorded. The specific experimental results are shown in Table 3.
[0125] Table 3 TC4 titanium alloy drilling test results
[0126]
[0127]
[0128] After obtaining the experimental results of the TC4 titanium alloy drilling experiment, the experimental data was used as a data set to train the ELM-IWOA algorithm and the ELM-WOA algorithm respectively; then, the TC4 titanium alloy was drilled using the process parameters optimized by the two algorithms; finally, the effectiveness of the constructed ELM-IWOA algorithm was verified by comparing the optimization results of the ELM-IWOA algorithm and the ELM-WOA algorithm.
[0129] (1) Specific parameter settings
[0130] In the specific algorithm parameter setting, first, multiple experiments were conducted to find that when 5-fold cross validation was used, the model had both lower variance and bias, so the K-fold cross validation fold was K=5; secondly, the generation range of the weights of the input layer neurons connecting the hidden layer neurons of ELM was set to -1≤w (hs) ≤1, the generation range of each hidden neuron bias is set to -0.4≤b (s) ≤0.4 to increase the diversity of the model; then, the number of neurons in the input layer is set to 2, corresponding to the spindle speed n z and feed speed v f For these two characteristic variables, the number of neurons in the output layer is set to 4, which are the four objectives of material removal rate, outlet burr height, surface roughness and energy consumption. After repeated experiments, the number of neurons in the hidden layer is set to 4; finally, the population size of the WOA algorithm is set to Q = 100, the maximum number of iterations T = 100, and the position dimension of the whale is 2, representing the spindle speed n z and feed speed v f These two characteristic variables set the upper and lower limits of the whale's position dimensions according to the experimental design, which are l b1 =800,u b1 =2000,l b2 =50,u b2 =200.
[0131] (2) Establishment of optimization model
[0132] Using the 5-fold cross validation method, the normalized data set is divided into a test set and a training set. The ELM model is trained with different training sets in turn to obtain 5 ELM models, and the corresponding test sets are used to calculate their accuracy. The accuracy of each ELM model is shown in Table 4.
[0133] Table 4. Test set accuracy of each ELM model
[0134]
[0135] As shown in Table 4, model 2 has the best accuracy, so model 2 is selected as the final ELM model. Furthermore, based on the output results of model 2, a multi-objective comprehensive evaluation function η(x) is formed, and then η(x) is used as the fitness function of the WOA algorithm. The specific calculation formula of the η(x) function in this example is:
[0136]
[0137] Where η θ(x) is the evaluation metric value of the positive target. In this example, there is a positive target, which is the material removal rate of TC4 titanium alloy; is the evaluation metric value of the negative target. In this example, there are three negative targets, namely, the drilling surface roughness, exit burr height and energy consumption of TC4 titanium alloy.
[0138] Then, a multi-objective optimization model of TC4 titanium alloy drilling process parameters was constructed to improve the material removal rate while reducing the surface roughness, exit burr height and energy consumption. The model can be expressed as follows:
[0139]
[0140] In the formula, represents the maximization of the multi-objective comprehensive evaluation function; x1 and x2 are optimization variables, which respectively represent the spindle speed and feed speed in this example.
[0141] (3) Optimization results
[0142] Optimization results of the ELM-WOA algorithm: The process parameters (spindle speed, feed speed) are optimized using the ELM-WOA algorithm. The optimized spindle speed and feed speed combination is shown in Table 5. The TC4 titanium alloy is drilled using this process parameter combination, and the measured values of each target are shown in Table 6. The iterative convergence process of the ELM-WOA algorithm is shown in Figure 3 shown.
[0143] Table 5 Process parameter results obtained by ELM-WOA algorithm optimization
[0144]
[0145] Table 6 ELM-WOA algorithm optimization measured results
[0146]
[0147] Optimization results of the ELM-IWOA algorithm: The process parameters (spindle speed, feed speed) are optimized using the ELM-IWOA algorithm. The optimized spindle speed and feed speed combination is shown in Table 7. The TC4 titanium alloy is drilled using this process parameter combination, and the measured values of each target are shown in Table 8. The iterative convergence process of the ELM-IWOA algorithm is shown in Table 8. Figure 4 shown.
[0148] Table 7 Process parameter results obtained by ELM-IWOA algorithm optimization
[0149]
[0150] Table 8 ELM-IWOA algorithm optimization measured results
[0151]
[0152] Comparing the measured results in Table 6 and Table 8, we can see that compared with the TC4 titanium alloy workpiece processed under the process parameters optimized by the ELM-IWOA algorithm, the energy consumption of the TC4 titanium alloy workpiece processed under the process parameters optimized by the ELM-WOA algorithm increased by 4.22%, but the surface roughness decreased by 10.90%, the outlet burr height decreased by 6.03%, and the material removal rate increased by 11.30%. Figure 3 and Figure 4 It can be seen from the iterative convergence diagrams of the two algorithms that the ELM-IWOA algorithm reaches convergence at 24 iterations, while the ELM-WOA algorithm reaches convergence at 30 iterations, and the fitness function value of 0.914 when ELM-IWOA converges is closer to 1 than the fitness function value of 0.884 when ELM-WOA converges, indicating a better optimization effect. The comparison results between the ELM-IWOA algorithm and the ELM-WOA algorithm show that the ELM-IWOA algorithm can more effectively optimize the multi-objective process parameters for drilling TC4 titanium alloy.
[0153] The present invention also provides a multi-objective optimization system for TC4 titanium alloy drilling process parameters based on machine learning, including a memory, a processor, and computer program instructions stored in the memory and capable of being executed by the processor. When the processor executes the computer program instructions, the method steps described above can be implemented.
[0154] The present invention also provides a computer-readable storage medium, on which computer program instructions that can be executed by a processor are stored. When the processor executes the computer program instructions, the method steps described above can be implemented.
[0155] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0156] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0157] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0158] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0159] The above is only a preferred embodiment of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosed technical content to change or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.
Claims
1. A multi-objective optimization method for TC4 titanium alloy drilling process parameters based on machine learning, characterized in that: An algorithm ELM-IWOA was proposed to optimize the drilling process parameters of TC4 titanium alloy by combining the extreme learning machine ELM with the improved whale optimization algorithm IWOA. In the ELM stage, the spindle speed and feed speed were used as the input of ELM, and the surface roughness, energy consumption, exit burr height and material removal rate of TC4 were used as outputs. A multi-objective optimization model was constructed to improve the material removal rate while reducing the surface roughness, exit burr height and energy consumption. In the IWOA stage, the constructed multi-objective optimization model was solved by IWOA to output the optimal TC4 titanium alloy drilling process parameters.
2. The multi-objective optimization method for TC4 titanium alloy drilling process parameters based on machine learning according to claim 1 is characterized in that: The steps include: Step S1, using the full factorial experimental method to design an experimental scheme for TC4 titanium alloy drilling; the experimental scheme first uses the spindle speed and feed speed as factors, and divides the levels according to the constraints of each factor; secondly, according to the designed experimental scheme, the TC4 titanium alloy drilling experiment is carried out, and after the drilling process, the optimization targets obtained from each group of experiments, namely, surface roughness, exit burr height, material removal rate and energy consumption, are measured and calculated; finally, the spindle speed and feed speed are normalized, and the normalized data and the optimization targets obtained by measurement and calculation together constitute a data set D; Step S2: Divide the data set D into K training sets and test sets using the K-fold cross-validation method; Step S3, first substitute the training set into the ELM model for training, and use the test set to select the ELM model with the highest accuracy; secondly, build a multi-objective optimization model based on the selected ELM model; finally, use the IWOA algorithm to solve the multi-objective optimization model and output the optimal TC4 titanium alloy drilling process parameters.
3. The multi-objective optimization method for TC4 titanium alloy drilling process parameters based on machine learning according to claim 2 is characterized in that: Step S1 specifically includes: S1.1, spindle speed n z , feed speed v f As factors, the levels are divided according to the constraints of each factor, and then the full factorial experimental plan is designed; the constraints of each factor are as follows: n min ≤n z ≤n max in min ≤in f ≤in max Among them, n min 、n max is the spindle speed n z The minimum and maximum values of v min 、v max is the feed speed v f The minimum and maximum values of ; S1.
2. According to the designed full-factor experimental scheme, a TC4 titanium alloy drilling experiment was conducted, and after the experiment, the optimization targets of TC4 titanium alloy drilling, namely, surface roughness, exit burr height, material removal rate and energy consumption, were measured and calculated; S1.3, the spindle speed and feed speed are normalized to Min-max, and the normalized data and the optimization target obtained by measurement calculation together constitute the data set D.
4. The multi-objective optimization method for TC4 titanium alloy drilling process parameters based on machine learning according to claim 3 is characterized in that: The calculation formula of the Min-max method is as follows: In the formula, X n represents the normalized value, which is between [0,1]; X represents the initial value of the current sample data point; X min represents the minimum value in the initial sample data set; X max Represents the maximum value in the initial sample data set.
5. The multi-objective optimization method for TC4 titanium alloy drilling process parameters based on machine learning according to claim 2 is characterized in that: Step S2 specifically includes: S2.
1. Divide the data set D into K (K>1) samples with a capacity of mutually exclusive subsets of, where len(D) represents the total number of samples in the data set D; is the rounding symbol; S2.
2. Choose any mutually exclusive subset as the test set D v , the union of the remaining K-1 mutually exclusive subsets is used as the training set D t ; S2.
3. Repeat step S2.2 K times to obtain K test sets, denoted as D v =[D v1 ,D v2 ,…,D vK ], get K training sets, denoted as D t =[D t1 ,D t2 ,…,D tK ], D ti ={(x i ,y i ),1≤i≤N}, where x i represents the feature vector; y i Represents the target vector; N represents the total number of samples in the training set.
6. The multi-objective optimization method for TC4 titanium alloy drilling process parameters based on machine learning according to claim 5 is characterized in that: In step S3, the specific process of substituting the training set into the ELM model for training and using the test set to select the ELM model with the highest accuracy is as follows: S3.
1. Initialize the network parameters of the ELM model: First, determine the number of neurons in the input layer, hidden layer, and output layer according to the number of selected features and task requirements; the number of neurons in the input layer directly corresponds to the number of selected features, set to p; the number of neurons in the output layer directly corresponds to the number of training set targets, that is, the target vector y i The number of features in is set to q; the number of hidden layer neurons is set to L; then the weight matrix w connecting the input layer neurons to the hidden layer neurons is randomly initialized (hs) And the bias b of each hidden neuron (s) , where 1≤h≤p, 1≤s≤L; weight matrix w (hs) The composition is shown below: In the formula, represents the connection weight between the pth input layer neuron and the Lth hidden layer neuron; S3.
2. Calculation of hidden layer output of ELM model: Tanh function is used to perform nonlinear transformation calculation on the hidden layer output matrix; the mathematical expression of Tanh function is shown as follows: After selecting the activation function, the initialized weight matrix w (hs) and bias b (s) After calculation by the activation function, the output matrix H(x) of the hidden layer is obtained, and its formula is shown as follows: In the formula, is the threshold of the Lth hidden layer neuron; g(x) is the activation function Tanh function of the hidden layer; S3.
3. Calculation of the optimal weight of the output layer of the ELM model: After the output matrix H(x) of the hidden layer is calculated, assuming that the output layer weight matrix is β (so) , 1≤o≤q, then the output matrix F of the ELM model is calculated by the following formula: c : Express the above formula in matrix form: F c =H(x)β (so) Among them, the output matrix F of ELM c It is expressed as: The weight matrix β of the output layer (so) It is expressed as: In the formula Represents the output value of the qth output neuron corresponding to the Nth sample input of the ELM model; Represents the output weight of the qth output neuron corresponding to the Lth hidden layer neuron of the ELM model; In the ELM model, in order to train a network model with ideal effect, we need to obtain a So that the following formula holds: The training of the ELM model is equivalent to training H(x)β (so) =y (io) Solve its least squares solution The process of least squares solution The calculation formula is as follows: In the formula, H + represents the Moore–Penrose generalized inverse matrix of the matrix H; y (io) is the target value matrix of the training set input into the model; S3.
4. Determination of the final ELM model: After the weight calculation of the output layer is completed, the training of the ELM model is completed. The ELM model is expressed as follows: The K training sets D t1 ,D t2 ,…,D tK The ELM models are introduced in turn for training, and K ELM models E1, E2, …, E K ; Then use the corresponding test set D v1 ,D v2 ,…,D vK For ELM models E1, E2, …, E K Perform fitting tests to obtain the accuracy A of each model z , remember A z =[A1,A2,…,A K ]; Accuracy A z The calculation expression is as follows: In the formula, c represents the number of test set data; f i Indicates that the i-th data is substituted into the ELM model to obtain the output value; y i Represents the label value of the i-th data in the test set; Finally, the accuracy of each model is compared, and the ELM model with the highest accuracy is selected. z .
7. The multi-objective optimization method for TC4 titanium alloy drilling process parameters based on machine learning according to claim 6 is characterized in that: In step S3, the specific process of constructing a multi-objective optimization model based on the selected ELM model is as follows: S3.
5. Construction of multi-objective comprehensive evaluation function: The ELM model combined with geometric analysis method is used to construct a multi-objective comprehensive evaluation function, as follows: The input data set has q targets. First, assume that there are ρ positive targets and σ negative targets. Second, the maximum value of each target in all schemes is recorded as α, and the minimum value is recorded as γ. z Based on the output results, the evaluation metric value η of the positive target is calculated separately θ (x) and the evaluation metric of the negative target The specific calculation formula is as follows: For the positive target, the calculation formula of its evaluation metric value is as follows: In the formula, E zθ Representation Model E z The value of the θth positive target in the output value; α θ is the maximum value of the θth positive target; γ θ is the minimum value of the θth forward target; For negative targets, the calculation formula for the evaluation metric is as follows: In the formula, Representation Model E z Output value The value of a negative target; For the The maximum value of negative targets; For the The minimum value of negative targets; Finally, the geometric mean method is used to substitute the calculated target evaluation metric values into the calculation formula of the multi-objective comprehensive evaluation function to form a multi-objective comprehensive evaluation function. The calculation formula of the multi-objective comprehensive evaluation function is shown as follows: In the above formula, the calculation result reflects the quality of the whale individuals in the input model: if the calculation result is close to 1, it means that the input whale individuals are better individuals, and if the calculation result is close to 0, it means that the input whale individuals are worse individuals; S3.
6. Establishment of multi-objective optimization model: After the multi-objective comprehensive evaluation function is constructed, a multi-objective optimization model is established based on the following formula, as shown in the following formula: In the formula, represents the maximization of multi-objective comprehensive evaluation function; x N represents the Nth optimization variable; x Nmin ≤x N ≤x Nmax Represents the constraint range of the Nth optimization variable.
8. The multi-objective optimization method for TC4 titanium alloy drilling process parameters based on machine learning according to claim 7 is characterized in that: In step S3, the specific process of solving the multi-objective optimization model using the IWOA algorithm is as follows: S3.
7. Initialize the whale population based on the reverse learning strategy: First, randomly initialize a whale population of size Q, which contains multiple whale individuals, each of which represents a possible solution in the search space; second, set the maximum number of iterations to T, and the whale position dimension to p according to the number of features of the feature vector of the input data set; then, initialize the upper bounds u of the whale position dimensions. b and the lower bound l b ; Finally, for each whale individual in the initial population, the corresponding reverse individual is calculated based on the reverse learning strategy, and the calculated reverse individual is merged with the original population to form a new population, and the first Q whale individuals with the best fitness value are selected from the population as the new initial whale population; the calculation formula of the reverse learning strategy is shown as follows: In the formula, Represents the value of the i-th whale in the h-th dimension based on the reverse learning strategy; represents the upper and lower bounds of the constraints specified for the h dimension; Represents the original value of the i-th whale in the h-th dimension; S3.8, evaluation of whale population: applying the multi-objective comprehensive evaluation function established in step S3.5 to the improved whale optimization algorithm, using it as the fitness function of the improved whale optimization algorithm to evaluate the individuals of the whale population; Each individual whale is brought into the fitness function for calculation to obtain the fitness value, and the fitness value of each individual whale is sorted, and the individual whale with the largest fitness value is selected, and its position vector is regarded as the position vector of the current best candidate whale; S3.
9. Whale position update based on adaptive weight: An adaptive weight is proposed to update the whale position. The calculation formula of the adaptive weight is shown as follows: In the formula, K represents the adaptive weight; t d is the current number of iterations; T is the maximum number of iterations; In the whale optimization algorithm, each individual whale updates its position in three ways, as follows: (1) Encirclement and predation When hunting, whales first locate the target prey and then surround it. Because the best individual whale position, i.e. the prey position, is not known, the best candidate whale position is selected as the target prey position and then surrounded. The mathematical expression of this process is as follows: D=|C*X * (t d )-X(t d )| X(t d +1)=K*X * (t d )-A*D Where K represents the adaptive weight; X * (t d ) represents the position vector of the current best candidate whale; X(t d ) is the current whale individual position vector; t d Indicates the current iteration number; D represents the distance between the current whale individual position and the best candidate whale position; X(t d +1) represents the updated position vector of the individual whale; A and C are coefficient vectors; the calculation expressions of A and C are as follows: A=2a*r1-a C=2*r2 Where a is the convergence variable, which decreases linearly from 2 to 0 during the entire iteration; r1 and r2 are both vectors composed of random variables that obey a uniform distribution in the interval [0,1]; (2) Bubble net predation The whale's hunting methods include bubble net hunting and encirclement hunting. When using bubble net hunting, the position between the whale and the target prey is updated in a spiral manner. The mathematical expression is as follows: D'=|X * (t d )-X(t d )| Where D' represents the distance between the current whale individual position and the current best candidate whale individual position; b x It represents the parameter used to specify the spiral shape. The value of this parameter is a constant 1. l is a random number in the range of [-1,1]. The whale algorithm uses a predation mechanism probability number p randomly generated in [0,1] g To determine the predation method; when p g ≥0.5, bubble net is used for predation. g When |A|<1, encirclement predation is adopted, and its mathematical expression is as follows: (3) Searching for prey When p g When |A|≥1, the current whale individual will swim to a random whale individual so as to expand the whale's search range and capture the best target prey; the mathematical expression of this search process is as follows: X(t d +1)=K*X rand (t d )-A*D” Where, X rand (t d ) represents the position of a random whale individual; D” represents the distance between the current whale individual position and the random whale individual position, and its calculation expression is as follows: D”=|C*X rand (t d )-X(t d )| The whale position update behavior is expressed in a unified mathematical expression as follows: S3.10, Iteration terminates and outputs the optimal result: When the number of iterations t d When the number of iterations is greater than the set maximum number of iterations T, the whale individual with the largest fitness value among all whale individuals is located at position X * Output, at this time X * The dimensions at each position represent the optimal values of all the features of the data in the dataset, and the ELM-IWOA algorithm training is terminated.
9. A multi-objective optimization system for TC4 titanium alloy drilling process parameters based on machine learning, characterized in that: The method comprises a memory, a processor and computer program instructions stored in the memory and executable by the processor. When the processor executes the computer program instructions, the method steps as claimed in any one of claims 1 to 8 can be implemented.
10. A computer-readable storage medium storing computer program instructions that can be executed by a processor, wherein when the processor executes the computer program instructions, the method steps according to any one of claims 1 to 8 can be implemented.