A method for optimizing process parameters of aluminum alloy friction stir welding
Through the combination of multi-feature subset collaborative network and improved genetic algorithm, the problem of low overfitting and convergence efficiency in the optimization of friction stir welding process parameters of aluminum alloy is solved, and more accurate welding joint quality prediction and process parameter optimization are achieved.
Patent Information
- Application Number
- CN202411607757.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-11-12
AI Technical Summary
The existing aluminum alloy friction stir welding process parameter optimization method has overfitting problems, resulting in poor generalization capabilities of the model and difficulty in accurately predicting the quality of the welded joints. At the same time, the convergence efficiency of traditional optimization algorithms is low, making it difficult to find the optimal process parameter combination.
The multi-eigen subset collaborative network is used to divide the process parameters into multiple feature subsets, and a subnet is built for each feature subset. At the same time, a main network outputs the weight of the subnet. The process parameters are optimized in combination with improved genetic algorithms, and the genetic algorithm accelerates convergence efficiency and global optimal search capabilities through adaptive mutation strategies and selective mutations.
The accuracy of quality prediction of welding joints and the accuracy of process parameter optimization are improved, and the practical application effect of aluminum alloy friction stir welding process parameter optimization is significantly improved.
Smart Images

Figure CN119140977B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of optimization of stir friction welding process parameters, and in particular to a method for optimizing stir friction welding process parameters of aluminum alloys. Background Art
[0002] Aluminum alloy friction stir welding process parameter optimization refers to adjusting and improving various parameters in the friction stir welding process to find the best combination of process parameters, thereby improving the strength, appearance and consistency of the welded joint, while improving the welding efficiency and the overall performance of the aluminum alloy structural parts. However, the existing aluminum alloy friction stir welding process parameter optimization methods have the following problems:
[0003] (1) Due to the high experimental cost of aluminum alloy friction stir welding and the difficulty in obtaining a large amount of data, the existing method of optimizing process parameters using neural networks is prone to overfitting, resulting in poor generalization ability of the model and difficulty in accurately predicting the quality of the welded joint;
[0004] (2) Due to the large variation range of process parameters and high precision requirements of aluminum alloy stir friction welding, the traditional optimization algorithm has a low convergence efficiency in finding the optimal process parameter combination, making it difficult to obtain the optimal solution for the process parameter combination, which in turn leads to poor prediction of the quality of the welded joint. Summary of the invention
[0005] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides a method for optimizing the process parameters of aluminum alloy stir friction welding. Due to the high experimental cost of aluminum alloy stir friction welding and the difficulty in obtaining a large amount of data, the existing method of optimizing process parameters using neural networks is prone to overfitting problems, resulting in poor generalization ability of the model and difficulty in accurately predicting the quality of welded joints. The present invention uses a multi-feature subset collaborative network to divide the process parameters into multiple feature subsets, and constructs a subnetwork for each feature subset, while constructing a main network to output the weight of the subnetwork, implicitly increasing the number of training samples and improving the accuracy of the prediction results of the welded joint quality; due to the large range of process parameters variation and high precision requirements for aluminum alloy stir friction welding, the traditional optimization algorithm has a low convergence efficiency when finding the optimal process parameter combination. , it is difficult to obtain the optimal solution of process parameter combination, which leads to the problem of poor prediction effect on welding joint quality. The present invention combines the prediction results of multi-feature subset collaborative network and optimizes the process parameters using improved genetic algorithm. The improved genetic algorithm specifically improves the crossover and mutation parts in the traditional genetic algorithm. In the crossover operation, the tensile strength of the welding joint is used as the fitness, and the crossover offspring is selected based on the fitness. In the mutation operation, the mutation rate is adjusted through the adaptive mutation strategy, and the genes of the offspring are selectively mutated, which accelerates the convergence efficiency and improves the search ability of the global optimal process parameter combination, significantly improving the accuracy and practical application effect of the optimization of aluminum alloy stir friction welding process parameters.
[0006] The technical solution adopted by the present invention is as follows: The present invention provides a method for optimizing process parameters of aluminum alloy friction stir welding, and the specific steps are as follows:
[0007] Step S1: Acquire experimental data, each set of experimental data includes process parameters in the aluminum alloy friction stir welding process and the corresponding tensile strength of the welded joint;
[0008] Step S2: using a multi-feature subset collaborative network to learn the relationship between process parameters and the tensile strength of the welded joint, the multi-feature subset collaborative network specifically includes a main network and several sub-networks, wherein the main network generates the weight of each sub-network, and the sub-network predicts the tensile strength of the welded joint corresponding to the process parameters;
[0009] Step S3: Use multi-feature subset collaborative network and improved genetic algorithm to find the optimal process parameter combination.
[0010] Furthermore, the step S2 specifically includes:
[0011] Step S21: constructing feature subsets: randomly selecting one to all items from the process parameters to form n different combinations, each combination being a feature subset, thereby constructing n feature subsets;
[0012] Step S22: using a binary mask to represent the feature subset: each feature subset is represented by a string of numbers consisting of 0 and 1, each bit of the number represents whether the parameter of the corresponding item of the process parameter is selected, and the selected item is represented by 1, and the unselected item is represented by 0;
[0013] Step S23: construct n subnetworks: construct a subnetwork for each feature subset, and for each subnetwork, multiply the binary mask of the corresponding feature subset by the process parameter part of the experimental data, and use the product result as the input data of the subnetwork. The subnetwork outputs the prediction result of the tensile strength of the welded joint, and the weight of the subnetwork is obtained through the main network;
[0014] Step S24: construct the main network: the main network receives the binary mask of each feature subset and outputs the weight of the corresponding sub-network;
[0015] Step S25: using experimental data to train a multi-feature subset collaborative network: the total loss value of the multi-feature subset collaborative network is the average value of the sum of the loss values of all sub-networks, the loss value of each sub-network is the mean square error between the predicted tensile strength of the welded joint and the actual value, and the weight of the main network is optimized using the gradient descent method;
[0016] Step S26: Predict the tensile strength of the welded joint using the trained multi-feature subset collaborative network: input the process parameters, and the predicted value of the tensile strength of the welded joint is the average value of the prediction results of all sub-networks.
[0017] Furthermore, the step S3 specifically includes:
[0018] Step S31: Initialize the population: define the mutation rate, define the value range of each parameter in the process parameters, randomly generate the initial population within the value range, each individual represents a candidate solution for a set of process parameters, and perform chromosome encoding on the individuals;
[0019] Step S32: Evaluate fitness: Use the multi-feature subset collaborative network to predict the tensile strength of the welded joint corresponding to each individual, and use the tensile strength of the welded joint as the objective function to calculate the fitness;
[0020] Step S33: using the roulette wheel method to select individuals to enter the next generation according to fitness;
[0021] Step S34: Improved crossover operation: Randomly select two individuals from the individuals entering the next generation as parents, traverse all positions within the chromosome length of the individual, use each position as a crossover point to generate candidate individuals, use a multi-feature subset collaborative network to calculate the fitness of the candidate individuals, and select the candidate individual with the highest fitness as the offspring individual of the parent;
[0022] Step S35: Improve the mutation operation: Use an adaptive mutation strategy to adjust the mutation rate, traverse all positions within the chromosome length of the offspring individual, generate a random number, and when the random number is less than the mutation rate, mutate the gene at the position to obtain a mutant individual;
[0023] Step S36: updating the optimal solution according to the fitness of the offspring individuals and the mutant individuals;
[0024] Step S37: define the number of iterations and the fitness threshold, and repeat steps S33 to S36 until the number of iterations is reached or the fitness of the optimal solution reaches the fitness threshold.
[0025] The specific steps of using the adaptive mutation strategy to adjust the mutation rate in step S35 are as follows:
[0026] Step D1: Establish a fitness history record list for each individual. At the end of each iteration, add the fitness of the individual in the current iteration to its fitness history record list;
[0027] Step D2: Calculate the exponential smoothing value of each fitness in the fitness history list. The calculation formula of the exponential smoothing value is as follows:
[0028] ;
[0029] in, and Respectively represent Second and The exponential smoothing value of fitness at the iteration, Indicates The fitness of the iteration, represents the smoothing coefficient;
[0030] Step D3: Calculate the average change rate of the last k exponential smoothing values in the fitness history record list, define the mutation change rate, when the average change rate is negative, the new change rate = (1 + mutation change rate) × change rate, when the average change rate is greater than or equal to 0, the new change rate = (1 - mutation change rate) × change rate, and replace the change rate with the new change rate.
[0031] The beneficial results achieved by the present invention using the above scheme are as follows:
[0032] (1) The experimental cost of aluminum alloy stir friction welding is high, and it is difficult to obtain a large amount of data. Therefore, the existing method of optimizing process parameters using neural networks is prone to overfitting problems, resulting in poor generalization ability of the model and difficulty in accurately predicting the quality of welded joints. The present invention uses a multi-feature subset collaborative network to learn the relationship between process parameters and the tensile strength of welded joints. The multi-feature subset collaborative network divides the process parameters into multiple feature subsets, and constructs a subnetwork for each feature subset. At the same time, a main network is constructed to output the weight of the subnetwork. This method of constructing multiple feature subsets and the main network and subnetwork working together implicitly increases the number of training samples and improves the accuracy of the prediction results of welded joint quality.
[0033] (2) In view of the large variation range of process parameters and high precision requirements of aluminum alloy stir friction welding, the traditional optimization algorithm has a low convergence efficiency when finding the optimal process parameter combination, and it is difficult to obtain the optimal solution of the process parameter combination, which leads to the problem of poor prediction effect on the quality of the welded joint. The present invention combines the prediction results of the multi-feature subset collaborative network and uses an improved genetic algorithm to optimize the process parameters. The improved genetic algorithm specifically improves the crossover and mutation parts in the traditional genetic algorithm. In the crossover operation, the tensile strength of the welded joint is used as the fitness, and the crossover offspring is selected based on the fitness. In the mutation operation, the mutation rate is adjusted through an adaptive mutation strategy, and the genes of the offspring are selectively mutated. This accelerates the convergence efficiency and improves the search ability of the global optimal process parameter combination, significantly improving the accuracy and practical application effect of the optimization of the process parameters of aluminum alloy stir friction welding. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a flow chart of a method for optimizing process parameters of aluminum alloy friction stir welding;
[0035] Figure 2 This is the architecture diagram of the multi-feature subset collaborative network;
[0036] Figure 3 This is the architecture diagram of the sub-network.
[0037] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. DETAILED DESCRIPTION
[0038] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0039] Example 1, see Figure 1 , Figure 1 Flow chart of a method for optimizing process parameters of aluminum alloy friction stir welding. In this embodiment, the method includes the following steps:
[0040] Step S1: Acquire experimental data, each set of experimental data includes process parameters and corresponding tensile strength of welded joints during aluminum alloy friction stir welding, and the process parameters specifically include welding rotation speed, welding speed and axial force;
[0041] Step S2: using a multi-feature subset collaborative network to learn the relationship between process parameters and the tensile strength of the welded joint, the multi-feature subset collaborative network specifically includes a main network and several sub-networks, wherein the main network generates the weight of each sub-network, and the sub-network predicts the tensile strength of the welded joint corresponding to the process parameters;
[0042] Step S3: Use multi-feature subset collaborative network and improved genetic algorithm to find the optimal process parameter combination.
[0043] The code in this embodiment is written in Python, the development platform is PyCharm, and the Pytorch deep learning development framework is used to model the multi-feature subset collaborative network.
[0044] Example 2, see Figure 2 and Figure 3 , Figure 2 This is the architecture diagram of the multi-feature subset collaborative network. Figure 3 : is an architecture diagram of a sub-network. Based on the above embodiment, this embodiment implements a multi-feature subset collaborative network. In this embodiment, the method includes the following steps:
[0045] Step S21: constructing feature subsets: arbitrarily selecting one item to the total number of items from the process parameters. In this embodiment, there are 3 process parameters, so 7 different combinations can be formed, each combination is a feature subset, so as to construct 7 feature subsets. The 7 feature subsets in this embodiment are specifically: {welding speed}, {welding speed}, {axial force}, {welding speed, welding speed}, {welding speed, axial force}, {welding speed, axial force}, {welding speed, welding speed, axial force};
[0046] Step S22: using a binary mask to represent the feature subset: each feature subset is represented by a string of numbers consisting of 0 and 1, each bit of the number represents whether the parameter of the corresponding item of the process parameter is selected, the selected item is represented by 1, and the unselected item is represented by 0. The binary masks of the seven feature subsets are 100, 010, 001, 110, 101, 011, and 111 respectively;
[0047] Step S23: construct n subnetworks: construct a subnetwork for each feature subset. In this embodiment, 7 subnetworks are constructed. For each subnetwork, the binary mask of the corresponding feature subset is multiplied by the process parameter part of the experimental data, that is, the selected parameters are retained and the unselected parameters are removed. The product result is used as the input data of the subnetwork. The subnetwork outputs the prediction result of the tensile strength of the welded joint. The weight of the subnetwork is obtained through the main network. The architecture of each subnetwork in this embodiment is consistent, and they are all fully connected neural networks, including an input layer, a hidden layer and an output layer. The hidden layer contains 32 neurons;
[0048] Step S24: constructing a main network: the main network receives the binary mask of each feature subset and outputs the weight of the corresponding sub-network. The main network of this embodiment is a fully connected neural network, including an input layer, 3 hidden layers and an output layer. The 3 hidden layers contain 128, 128 and 64 neurons respectively.
[0049] Step S25: using experimental data to train a multi-feature subset collaborative network: the total loss value of the multi-feature subset collaborative network is the average value of the sum of the loss values of all sub-networks, the loss value of each sub-network is the mean square error between the predicted tensile strength of the welded joint and the actual value, and the weight of the main network is optimized using the gradient descent method;
[0050] Step S26: Predict the tensile strength of the welded joint using the trained multi-feature subset collaborative network: input the process parameters, and the predicted value of the tensile strength of the welded joint is the average value of the prediction results of all sub-networks.
[0051] Embodiment 3: Based on the above embodiment, this embodiment realizes finding the optimal process combination. In this embodiment, the method includes the following steps:
[0052] Step S31: Initialize the population: define the mutation rate, define the value range of each parameter in the process parameters, randomly generate the initial population within the value range, each individual represents a candidate solution of a set of process parameters, and perform chromosome encoding on the individuals. In this embodiment, the initial population size is 50, the mutation rate is defined as 0.02, and the value ranges of welding rotation speed, welding speed and axial force are 1000-2100r / min, 800-2400mm / min and 5-40kN respectively;
[0053] Step S32: Evaluate fitness: Use the multi-feature subset collaborative network to predict the tensile strength of the welded joint corresponding to each individual, and use the tensile strength of the welded joint as the objective function to calculate the fitness;
[0054] Step S33: using the roulette wheel method to select individuals to enter the next generation according to fitness;
[0055] Step S34: Improved crossover operation: Randomly select two individuals from the individuals entering the next generation as parents, traverse all positions within the chromosome length of the individual, use each position as a crossover point to generate candidate individuals, use a multi-feature subset collaborative network to calculate the fitness of the candidate individuals, and select the candidate individual with the highest fitness as the offspring individual of the parent;
[0056] Step S35: Improve the mutation operation: Use an adaptive mutation strategy to adjust the mutation rate, traverse all positions within the chromosome length of the offspring individual, generate a random number, and when the random number is less than the mutation rate, mutate the gene at the position to obtain a mutant individual. The value range of the random number in this embodiment is between 0 and 1.
[0057] Step S36: updating the optimal solution according to the fitness of the offspring individuals and the mutant individuals;
[0058] Step S37: define the number of iterations and the fitness threshold, and repeat steps S33 to S36 until the number of iterations is reached or the fitness of the optimal solution reaches the fitness threshold.
[0059] Embodiment 4: Based on the above embodiment, this embodiment uses an adaptive mutation strategy to adjust the mutation rate. In this embodiment, the method includes the following steps:
[0060] The specific steps of using the adaptive mutation strategy to adjust the mutation rate in step S35 are as follows:
[0061] Step D1: Establish a fitness history record list for each individual. At the end of each iteration, add the fitness of the individual in the current iteration to its fitness history record list;
[0062] Step D2: Calculate the exponential smoothing value of each fitness in the fitness history list. The calculation formula of the exponential smoothing value is as follows:
[0063] ;
[0064] in, and Respectively represent Second and The exponential smoothing value of fitness at the iteration, Indicates The fitness of the iteration, Represents the smoothing coefficient. In this embodiment The value is 0.3;
[0065] Step D3: Calculate the average change rate of the last k exponential smoothing values in the fitness history record list, define the mutation change rate, when the average change rate is negative, the new change rate = (1 + mutation change rate) × change rate, when the average change rate is greater than or equal to 0, the new change rate = (1-mutation change rate) × change rate, use the new change rate to replace the change rate, in this embodiment, the value of k is 5, the mutation change rate is set to 0.2, and the specific formula for the average change rate is:
[0066] ;
[0067] in, represents the average rate of change, and Respectively represent Second and The exponentially smoothed value of the fitness at the iteration, and The last exponentially smoothed value in the fitness history list.
Claims
1. A method for optimizing process parameters of aluminum alloy friction stir welding, characterized in that: The following steps are involved: Step S1: Acquire experimental data, each set of experimental data includes process parameters in the aluminum alloy friction stir welding process and the corresponding tensile strength of the welded joint; Step S2: using a multi-feature subset collaborative network to learn the relationship between process parameters and the tensile strength of the welded joint, the multi-feature subset collaborative network specifically includes a main network and several sub-networks, wherein the main network generates the weight of each sub-network, and the sub-network predicts the tensile strength of the welded joint corresponding to the process parameters; Step S3: finding the optimal process parameter combination by using a multi-feature subset collaborative network and an improved genetic algorithm; The step S2 specifically includes: Step S21: constructing feature subsets: randomly selecting one to all items from the process parameters to form n different combinations, each combination being a feature subset, thereby constructing n feature subsets; Step S22: using a binary mask to represent the feature subset; Step S23: construct n subnetworks: construct a subnetwork for each feature subset, and for each subnetwork, multiply the binary mask of the corresponding feature subset by the process parameter part of the experimental data, and use the product result as the input data of the subnetwork. The subnetwork outputs the prediction result of the tensile strength of the welded joint, and the weight of the subnetwork is obtained through the main network; Step S24: construct the main network: the main network receives the binary mask of each feature subset and outputs the weight of the corresponding sub-network; Step S25: using experimental data to train a multi-feature subset collaborative network; Step S26: using the trained multi-feature subset collaborative network to predict the tensile strength of the welded joint; The step S3 specifically includes: Step S31: Initialize the population: define the mutation rate, define the value range of each parameter in the process parameters, randomly generate the initial population within the value range, each individual represents a candidate solution for a set of process parameters, and perform chromosome encoding on the individuals; Step S32: Evaluate fitness: Use the multi-feature subset collaborative network to predict the tensile strength of the welded joint corresponding to each individual, and use the tensile strength of the welded joint as the objective function to calculate the fitness; Step S33: using the roulette wheel method to select individuals to enter the next generation according to fitness; Step S34: Improved crossover operation: Randomly select two individuals from the individuals entering the next generation as parents, traverse all positions within the chromosome length of the individual, use each position as a crossover point to generate candidate individuals, use a multi-feature subset collaborative network to calculate the fitness of the candidate individuals, and select the candidate individual with the highest fitness as the offspring individual of the parent; Step S35: Improve the mutation operation: Use an adaptive mutation strategy to adjust the mutation rate, traverse all positions within the chromosome length of the offspring individual, generate a random number, and when the random number is less than the mutation rate, mutate the gene at the position to obtain a mutant individual; Step S36: updating the optimal solution according to the fitness of the offspring individuals and the mutant individuals; Step S37: define the number of iterations and the fitness threshold, and repeat steps S33 to S36 until the number of iterations is reached or the fitness of the optimal solution reaches the fitness threshold; The specific steps of using the adaptive mutation strategy to adjust the mutation rate in step S35 are as follows: Step D1: Establish a fitness history record list for each individual. At the end of each iteration, add the fitness of the individual in the current iteration to its fitness history record list; Step D2: Calculate the exponential smoothing value of each fitness in the fitness history list; Step D3: Calculate the average change rate of the last k exponential smoothing values in the fitness history list, define the mutation change rate, when the average change rate is negative, the new change rate = (1 + mutation change rate) × change rate, when the average change rate is greater than or equal to 0, the new change rate = (1 - mutation change rate) × change rate, and replace the change rate with the new change rate; In step S25, the multi-feature subset collaborative network is trained using experimental data as follows: the loss value of each sub-network is the mean square error between the predicted tensile strength of the weld joint and the actual value, the total loss value of the multi-feature subset collaborative network is the average of the sum of the loss values of all sub-networks, and the weights of the main network are optimized using the gradient descent method.
2. The method for optimizing process parameters of aluminum alloy friction stir welding according to claim 1, characterized in that: In step S22, the feature subset is represented by a binary mask as follows: each feature subset is represented by a string of numbers consisting of 0 and 1, and each bit of the number represents whether the parameter of the corresponding item of the process parameter is selected, and the selected item is represented by 1, and the unselected item is represented by 0.
3. The method for optimizing process parameters of aluminum alloy friction stir welding according to claim 2, characterized in that: In step S26, the method of using the trained multi-feature subset collaborative network to predict the tensile strength of the welded joint is as follows: inputting process parameters, the predicted value of the tensile strength of the welded joint is the average value of the prediction results of all sub-networks.
Citation Information
Patent Citations
Laser welding process parameter optimization method based on Bagging integrated prediction model and particle swarm optimization algorithm
CN110405343A
Integrated neural network PM2.5 prediction method based on clustering
CN111340292A
Neural network architecture based on evolutionary algorithm
CN117273080A