A method and system for optimizing process parameters of oscillating scanning laser electric arc hybrid welding
By combining orthogonal experiments, BP neural networks, and TD3 algorithms, the welding process parameters of aluminum alloys were optimized, solving the problems of low precision and insufficient intelligence in existing technologies, and achieving a high-efficiency improvement in welding quality.
Patent Information
- Application Number
- CN202311556070.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-17
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2043-11-17
AI Technical Summary
Existing methods for optimizing aluminum alloy welding process parameters suffer from low accuracy, low level of intelligence, and difficulty in effectively solving weld quality problems, especially in multi-objective optimization.
The process parameter set is obtained by using the orthogonal experimental control variable method. The welding quality prediction model is optimized by BP neural network and DE algorithm. The optimal process parameters are output by combining TD3 algorithm for reinforcement learning.
It improved welding quality, optimized welding process parameters, enhanced the overall performance of welding, and provided a reliable reference for welding quality.
Smart Images

Figure CN117483956B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent manufacturing technology, and in particular to a method and system for optimizing process parameters of oscillating scanning laser arc hybrid welding. Background Technology
[0002] Aluminum alloys are one of the important lightweight structural metal materials. Due to their high strength, light weight and strong corrosion resistance, they are widely used in automobile manufacturing, shipbuilding, aerospace and other fields. Laser welding has the advantages of low heat input, high productivity, flexible manufacturing and easy automation, and is a very promising aluminum alloy welding technology.
[0003] Aluminum alloy laser welding suffers from high porosity due to the large depth-to-width ratio and the difficulty in escaping bubbles caused by pinhole instability. Laser oscillation scanning welding, a novel laser welding technology, utilizes the rotation of a galvanometer to control the high-speed, regular oscillation of the laser beam, stirring the molten pool with a specific trajectory and cycle to improve welding characteristics. Numerous studies have shown that beam oscillation alters the temperature field distribution and heat and mass transfer characteristics of the molten pool, improving weld formation quality, reducing spatter, and suppressing defects such as porosity and cracks. However, weld quality is typically influenced by various factors, including laser oscillation mode, laser power, welding speed, defocusing amount, oscillation frequency, oscillation amplitude, and shielding gas. Because the relationship between process parameters and weld quality is a complex nonlinear mapping, often dependent on specific experimental results, applying it to various practical situations is not easy. Traditional welding process design still suffers from complex processes and reliance on experience, often leading to difficulties in developing improved welding processes, low efficiency in program development, and poor product quality. In traditional manufacturing, quality management typically still relies on a static screening process involving planning, post-production inspection, and quality statistical reports. When production processes fail to meet quality requirements, significant costs are wasted, and improvements are difficult to implement. Therefore, such process management methods are considered outdated. Excellent welding processes are a prerequisite for improving production efficiency and ensuring production quality. Thus, intelligent optimization methods for welding process improvement have long been a key area of focus for technological advancement.
[0004] Current methods for optimizing welding process parameters mainly employ traditional optimization methods, such as response surface methodology, statistical methods, and Taguchi method. These methods can easily analyze the relationship between process parameters and weld quality, but their optimization accuracy is low and they cannot obtain effective optimal process parameters. They are particularly inadequate when dealing with multi-objective optimization problems. Summary of the Invention
[0005] This invention provides a method and system for optimizing process parameters of oscillating scanning laser arc hybrid welding, which solves the defects of existing optimization methods for aluminum alloy welding process parameters, namely low accuracy and low level of intelligence.
[0006] In a first aspect, the present invention provides a method for optimizing process parameters of oscillating scanning laser-arc hybrid welding, comprising:
[0007] A set of process parameters for oscillating scanning laser-arc hybrid welding was obtained, and an oscillating scanning laser-arc hybrid welding experiment was conducted on the set of process parameters using the orthogonal experimental control variable method to obtain the welding test results.
[0008] The welding test results are post-processed to output a training dataset;
[0009] A BP neural network structure is constructed, the DE algorithm is used to optimize the BP neural network structure, and the optimized BP neural network structure is trained using the training dataset to obtain a laser welding quality prediction model.
[0010] Using the porosity and welding defects of the welded sample as optimization objectives, the TD3 algorithm is used to perform reinforcement learning on the output results of the laser welding quality prediction model to output the optimal process parameters.
[0011] According to the present invention, a method for optimizing process parameters of oscillating scanning laser-arc hybrid welding is provided, which involves obtaining a set of process parameters for oscillating scanning laser-arc hybrid welding, conducting oscillating scanning laser-arc hybrid welding experiments on the set of process parameters using the orthogonal experimental control variable method, and obtaining welding test results, including:
[0012] The surface defects and porosity of the weld are used to characterize the weld formation quality. Laser power, welding speed, oscillation amplitude, oscillation frequency and wire feed speed are selected as the set of process parameters.
[0013] The orthogonal experimental control variable method is used to conduct a preset number of oscillating scanning laser-arc hybrid welding tests on the set of process parameters, and the welding test results are output.
[0014] According to the present invention, an optimization method for oscillating scanning laser-arc hybrid welding process parameters is provided, which performs post-test processing on the welding test results and outputs a training dataset, including:
[0015] Using the set of process parameters as test input and the porosity and welding defects of the welded sample as test output, an initial training dataset is obtained, wherein the porosity of the welded sample is obtained by X-ray flaw detection of the welded sample.
[0016] The initial training dataset is normalized to obtain the training dataset.
[0017] According to the present invention, a method for optimizing process parameters of oscillating scanning laser-arc hybrid welding is provided, which constructs a BP neural network structure, optimizes the BP neural network structure using the differential evolution (DE) algorithm, and trains the optimized BP neural network structure using the training dataset to obtain a laser welding quality prediction model, including:
[0018] Determine the number of input nodes and the number of output nodes in the BP neural network structure;
[0019] The parameters to be optimized in the BP neural network structure are determined to include the number of hidden layer nodes, activation function, optimizer, and learning rate.
[0020] The parameters to be optimized are used as the decision vector of the DE algorithm, and the average value of the ten-fold cross-validation mean square error of the BP neural network structure is used as the optimization objective of the fitness function. The optimal hyperparameter combination is solved iteratively through the evolution of the DE algorithm to obtain the optimized BP neural network structure.
[0021] The training dataset is divided into a training set and a test set according to a preset ratio. The optimized BP neural network structure is trained to output the laser welding quality prediction model.
[0022] According to the present invention, a method for optimizing process parameters of oscillating scanning laser-arc hybrid welding is provided, wherein the parameter to be optimized is used as the decision vector of the DE algorithm, and the average value of the ten-fold cross-validation mean squared error of the BP neural network structure is used as the optimization objective of the fitness function, including:
[0023]
[0024] Where, x n Let X represent the decision variables, where x1 represents the activation function, x2 represents the number of hidden layer nodes, x3 represents the optimizer, x4 represents the learning rate, Y(X) represents the target vector, and X represents the decision variables. y (X) represents the target fitness function;
[0025] Furthermore, the average of the mean squared errors of the 10-fold cross-validation is used as the target fitness function F. y (X):
[0026]
[0027] Where n is the number of outputs during testing, i and j are the number of different batches for cross-validation, and x is the expected output. This is for predicting the output.
[0028] According to the present invention, an optimization method for oscillating scanning laser-arc hybrid welding process parameters is provided, which iteratively solves for the optimal hyperparameter combination through the DE algorithm to obtain the optimized BP neural network structure, including:
[0029] A random set of individuals is generated as the initial population, using any parameter within the range of the hyperparameter values of the BP neural network structure as the population individuals.
[0030] Calculate the fitness function for each individual in the population, divide and shuffle the training dataset according to the requirement of 10 cross-validations, calculate the mean squared error on the average validation set, evaluate the fitness of each individual in the population using the fitness function, and determine individuals with fitness higher than the preset value as parent individuals.
[0031] For each parent individual, two other individuals are randomly selected and linearly combined to generate mutated individuals:
[0032]
[0033] Where r1, r2, and r3 are integers randomly selected from 1 to NP, NP is the number of individuals in the population, F represents the mutation proportion factor, and V i Let represent the newly generated i-th vector, and g represent the newly generated carrier.
[0034] Cross over the mutated individual with its corresponding parent individual to generate offspring individuals:
[0035] U i,j+1 =(U 1i,g+1 U 2i,g+1 ,…,U Di,g+1 )
[0036]
[0037] Where CR represents the crossover probability, the larger the CR value, the greater the probability of crossover, d rand It is a random integer from 1 to d, where d is the dimension of the variable gene pool;
[0038] A fitness function is used to compare offspring individuals with parent individuals, and individuals with better fitness are selected as the next generation of the population.
[0039] If the preset iteration termination condition is met, the fitness function of each individual in the population is calculated, and the next iteration continues until the optimal individual is determined, and the optimized BP neural network structure is output.
[0040] According to the present invention, an optimization method for process parameters of oscillating scanning laser-arc hybrid welding is provided, which uses the TD3 algorithm to perform reinforcement learning on the output results of the laser welding quality prediction model, including:
[0041] Obtain the output results of the reinforcement learning environment and the laser welding quality prediction model;
[0042] The TD3 algorithm is used to train and update the output results in the reinforcement learning environment.
[0043] According to the present invention, an optimization method for oscillating scanning laser-arc hybrid welding process parameters is provided, which obtains a reinforcement learning environment, including:
[0044] Set the state space to the range of process parameters;
[0045] Determine the size of the state space, and set the action space to a preset percentage of the size of the state space;
[0046] The reward function is determined as the difference between the output in the current state and the state before the current state;
[0047]
[0048] r t =E t -E t+1
[0049] Among them, O porosity represents porosity, w1, w2, w3 are weighting coefficients, p1, p2, p3 represent the three possible values of the classification output, E represents the quality evaluation value of the weld, t represents the current time step of the agent in the environment, and t+1 represents the subsequent time step after the current operation is performed.
[0050] According to the present invention, an optimization method for oscillating scanning laser-arc hybrid welding process parameters is provided, wherein the TD3 algorithm is used to train and update the output results in the reinforcement learning environment, including:
[0051] Step S1: Initialize three neural networks, including two Actor networks and one Critic network;
[0052] Step S2: Create an experience replay buffer to store the experience data sampled by the agent in the environment;
[0053] Step S3: Using a random strategy or an initial strategy, interact with the environment to collect experience data and store the experience data in the experience replay buffer.
[0054] Step S4: Based on the current state and the Actor network, select an action and execute it in the environment;
[0055] Step S5: Randomly sample a batch of experience data from the experience replay buffer and update the Critic network;
[0056] Step S6: Calculate the loss function of the Critic network, make the loss function of the Critic network approximate the target Q value, and update the parameters of the Critic network using the gradient descent method.
[0057] Step S7: Maximize the output of the Critic network by updating the strategy of the Actor network;
[0058] Step S8: Using a soft update method, the target network parameters of the Critic network and Actor network are slowly updated to the current network parameters;
[0059] Repeat steps S3 to S8 until the preset training stop condition is met.
[0060] Secondly, the present invention also provides an oscillating scanning laser-arc hybrid welding process parameter optimization system, comprising:
[0061] The test module is used to obtain the set of process parameters for oscillating scanning laser arc hybrid welding, and to conduct oscillating scanning laser arc hybrid welding tests on the set of process parameters using the orthogonal experimental control variable method to obtain the welding test results.
[0062] The post-processing module is used to perform post-test processing on the welding test results and output a training dataset.
[0063] The training module is used to construct a BP neural network structure, optimize the BP neural network structure using the DE algorithm, and train the optimized BP neural network structure using the training dataset to obtain a laser welding quality prediction model.
[0064] The optimization module is used to perform reinforcement learning on the output results of the laser welding quality prediction model with the porosity and welding defects of the welding sample as optimization targets, and output the optimal process parameters.
[0065] The method and system for optimizing process parameters in oscillating scanning laser-arc hybrid welding provided by this invention embeds a BP neural network prediction model improved by DE algorithm into the reward acquisition of a Markov decision process of reinforcement learning, and uses TD3 algorithm to explore, learn and optimize the rules in this black box model. This solves the problem of comprehensive optimization of process parameters in oscillating scanning laser-arc hybrid welding, provides a reliable reference for welding process optimization, and effectively improves the quality of welding. Attached Figure Description
[0066] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0067] Figure 1 This is one of the flowcharts illustrating the method for optimizing process parameters of oscillating scanning laser-arc hybrid welding provided by the present invention;
[0068] Figure 2 This is the second flowchart illustrating the method for optimizing process parameters of oscillating scanning laser-arc hybrid welding provided by the present invention.
[0069] Figure 3 This is a topology diagram of the BP neural network provided by the present invention;
[0070] Figure 4 This is a topology diagram of the actor-critic network in the TD3 algorithm provided by this invention;
[0071] Figure 5 This is a schematic diagram of the oscillation scanning laser-arc hybrid welding process parameter optimization system provided by the present invention;
[0072] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0073] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0074] To address the shortcomings of existing aluminum alloy welding process parameter optimization techniques, this invention establishes a black-box model for predicting welding process quality using a Differential Evolution-Back Propagation (DE-BP) neural network, based on the high-dimensional nonlinear mapping relationship between welding process parameters and welding process quality. Furthermore, according to the weld performance optimization objective, a surrogate model that obtains the optimal parameters is trained by combining Twin Delayed Deep Deterministic policy gradient (TD3) reinforcement learning with the DE-BP network.
[0075] Figure 1 This is one of the flowcharts illustrating the method for optimizing process parameters of oscillating scanning laser-arc hybrid welding provided in this embodiment of the invention, such as... Figure 1 As shown, it includes:
[0076] Step 100: Obtain the set of process parameters for oscillating scanning laser arc hybrid welding, and conduct oscillating scanning laser arc hybrid welding experiments on the set of process parameters using the orthogonal experimental control variable method to obtain welding test results;
[0077] Step 200: Perform post-test processing on the welding test results and output the training dataset;
[0078] Step 300: Construct a BP neural network structure, optimize the BP neural network structure using the DE algorithm, and train the optimized BP neural network structure using the training dataset to obtain a laser welding quality prediction model;
[0079] Step 400: Using the porosity and welding defects of the welded sample as optimization targets, the TD3 algorithm is used to perform reinforcement learning on the output results of the laser welding quality prediction model to output the optimal process parameters.
[0080] Specifically, such as Figure 2 As shown, the embodiment of the present invention employs an oscillating scanning laser-arc hybrid welding process parameter optimization method based on DE-BP neural network and TD3 reinforcement learning, including:
[0081] First, a preliminary analysis was conducted on the process parameters that affect the quality indicators of oscillating scanning laser arc hybrid welding. An orthogonal process test scheme was designed and clarified, and oscillating scanning laser arc hybrid welding tests were carried out.
[0082] Secondly, the welding test results are post-processed using testing methods to obtain a dataset of oscillating scanning laser arc hybrid welding process parameters and quality.
[0083] Then, prepare the training data, initially determine the structure of the BP neural network, use the hyperparameters that the BP neural network can optimize as the decision vector of the DE differential evolution algorithm, use the average value of the ten-fold cross-validation mean square error of the BP neural network as the optimization objective of the fitness function, continuously iterate through DE differential evolution to solve the optimal combination of hyperparameters, and train the neural network model.
[0084] Finally, the porosity and welding defects of the oscillating scanning laser-arc composite welding specimen were used as optimization targets. The reinforcement learning environment was determined, and the results of the neural network prediction model were weighted as the reward for reinforcement learning. The state and action of reinforcement learning were expressed by the change of process parameter combination values. The TD3 algorithm was used to continuously explore and train in the set environment, and finally the optimal process parameters were output. The obtained optimal solution parameters were verified by field experiments.
[0085] This invention solves the problem of comprehensive optimization of process parameters in oscillating scanning laser-arc hybrid welding by embedding a BP neural network prediction model improved by DE algorithm into the reward acquisition of Markov decision process of reinforcement learning, and using TD3 algorithm to explore, learn and optimize the rules in this black box model. It provides a reliable reference for welding process optimization and effectively improves the quality of welding.
[0086] Based on the above embodiments, a set of process parameters for oscillating scanning laser-arc hybrid welding is taken, and an orthogonal experimental control variable method is used to conduct oscillating scanning laser-arc hybrid welding experiments on the set of process parameters to obtain welding test results, including:
[0087] The surface defects and porosity of the weld are used to characterize the weld formation quality. Laser power, welding speed, oscillation amplitude, oscillation frequency and wire feed speed are selected as the set of process parameters.
[0088] The orthogonal experimental control variable method is used to conduct a preset number of oscillating scanning laser-arc hybrid welding tests on the set of process parameters, and the welding test results are output.
[0089] Specifically, in this embodiment of the invention, the specific operation of the experimental design is as follows: select welding surface defects (incomplete penetration and burn-through) and porosity (the ratio of pore area to film projection area in X-ray nondestructive testing) in production to characterize the weld formation quality, select laser power, welding speed, oscillation amplitude, oscillation frequency and wire feed speed as key process parameters, and design 100 sets of experiments using the controlled variable method.
[0090] For example, the test material used was 5A06 aluminum alloy, 1.5 mm thick, with a T-shaped welded joint. The surface anti-rust paint was removed by machining. The surface of the specimen was cleaned with acetone to prevent oil and oxide film contamination of the weld. Oscillating scanning laser-arc hybrid welding was employed, with the laser beam scanning controlled by a galvanometer, and the scanning trajectory being circular. The process parameters for oscillating scanning laser-arc hybrid welding were adjustable as follows: laser power 0.5-4.2 kW; welding speed 1-4 m / min; defocusing amount 0 mm; oscillation amplitude 0-1 mm; oscillation frequency 1-200 Hz; wire feed speed 2-6 m / min; constant gas flow rate 20 g / min; weld length 80 mm; wire spacing 2 mm; and 99.999% argon as the shielding gas. The test results are shown in Table 1.
[0091] Table 1
[0092]
[0093]
[0094] Based on the above embodiments, the welding test results are post-processed to output a training dataset, including:
[0095] Using the set of process parameters as test input and the porosity and welding defects of the welded sample as test output, an initial training dataset is obtained, wherein the porosity of the welded sample is obtained by X-ray flaw detection of the welded sample.
[0096] The initial training dataset is normalized to obtain the training dataset.
[0097] Specifically, in this embodiment of the invention, the inputs to the oscillation scanning laser-arc hybrid welding process parameter dataset are: laser power, welding speed, oscillation amplitude, oscillation frequency, and wire feed speed. The outputs are porosity and surface defects, wherein the porosity is obtained by X-ray flaw detection of the welded sample. The input dataset is normalized before training the model.
[0098] Based on the above embodiments, a BP neural network structure is constructed, and the differential evolution (DE) algorithm is used to optimize the BP neural network structure. The optimized BP neural network structure is trained using the training dataset to obtain a laser welding quality prediction model, including:
[0099] Determine the number of input nodes and the number of output nodes in the BP neural network structure;
[0100] The parameters to be optimized in the BP neural network structure are determined to include the number of hidden layer nodes, activation function, optimizer, and learning rate.
[0101] The parameters to be optimized are used as the decision vector of the DE algorithm, and the average value of the ten-fold cross-validation mean square error of the BP neural network structure is used as the optimization objective of the fitness function. The optimal hyperparameter combination is solved iteratively through the evolution of the DE algorithm to obtain the optimized BP neural network structure.
[0102] The training dataset is divided into a training set and a test set according to a preset ratio. The optimized BP neural network structure is trained to output the laser welding quality prediction model.
[0103] Specifically, the BP neural network structure constructed in the embodiments of the present invention is as follows: Figure 3 As shown, the input layer takes welding speed, oscillation frequency, oscillation amplitude, laser power, and wire feed speed as inputs, while the output layer outputs porosity and welding defects (including good rate, incomplete penetration rate, and burn-through rate). Since the penetration coefficient is a value between 0 and 1, the sigmoid activation function is chosen. For porosity values between 0 and 100, ReLU is chosen as the activation function. The hidden layer activation function is undetermined and used as an adjustable hyperparameter. To save time, the training epoch is set to 1000. The model has four adjustable parameters: the hidden layer activation function, the number of hidden layer neurons, the backpropagation optimizer, and the learning rate. Traditional grid search and manual parameter trial are time-consuming; therefore, the DE algorithm is used to optimize these four variables. The evaluation criterion, as described in the specification, is the average of the mean squared errors of the 10-fold cross-validation, aiming to improve the network's generalization ability and reduce the impact of small samples on overfitting. The final model achieves an R² score of 0.883 on the test set and 0.973 on the training set.
[0104] The mathematical model for the optimization task of the DE evolutionary algorithm is shown in the following equation:
[0105]
[0106] Where, x n Let X represent the decision variables, where x1 represents the activation function, x2 represents the number of hidden layer nodes, x3 represents the optimizer, x4 represents the learning rate, Y(X) represents the target vector, and X represents the decision variables. y (X) represents the target fitness function;
[0107] The average of the mean squared errors of the 10-fold cross-validation is used as the target fitness function F. y (X):
[0108]
[0109] Where n is the number of outputs during testing, i and j are the number of different batches for cross-validation, and x is the expected output. This is for predicting the output.
[0110] It should be noted that each iteration of the evolutionary algorithm requires building a neural network for the individuals in the population and calculating the error value. Finally, the optimal decision variable obtained by the evolutionary algorithm is used to divide the training dataset of the BP neural network into a training set and a test set according to a 4:1 ratio, and the neural network is trained to verify the error.
[0111] Based on the above embodiments, the specific steps of improving the BP neural network using the DE evolution algorithm in this embodiment of the invention include:
[0112] (1) Determine the neural network input and normalize it, and determine the number of network input and output nodes based on the input and output;
[0113] (2) Determine the neural network input and normalize it, and determine the number of network input and output nodes based on the input and output;
[0114] (3) Initialize the population by randomly generating a set of individuals as the initial population. The individuals in the population are a combination of parameters within the range of values of the neural network hyperparameters.
[0115] (4) Selection operation: Calculate the fitness function for each individual, i.e., construct the neural network according to the individual's decision variables, divide and shuffle the dataset according to the requirement of 10 cross-validations for training, and solve for the average squared error on the validation set. Use the fitness function to evaluate the fitness of each individual and select individuals with higher fitness as parents;
[0116] (5) Mutation operation: For each parent individual, a mutated individual is generated by linearly combining two other randomly selected individuals:
[0117]
[0118] Where r1, r2, and r3 are integers randomly selected from 1 to NP, NP is the number of individuals in the population, F represents the mutation proportion factor, and V i Let represent the newly generated i-th vector, and g represent the newly generated carrier.
[0119] (6) Crossover operation: Crossover operation is performed between the mutated individual and the corresponding parent individual to produce offspring:
[0120] U i,j+1 =(U 1i,g+1 U 2i,g+1 ,…,U Di,g+1 )
[0121]
[0122] Where CR represents the crossover probability, the larger the CR value, the greater the probability of crossover, d rand It is a random integer from 1 to d, where d is the dimension of the variable gene pool; the crossover operation here helps maintain the diversity of the population and ensures that at least one dimension of the gene comes from the mutation operation.
[0123] (7) Select offspring, compare the fitness function with the corresponding parent generation, and select individuals with better fitness as the next generation population;
[0124] (8) Determine the termination condition and check whether the termination condition is met. If the predetermined number of iterations is reached or a satisfactory solution is found, return to step (4) to continue iterating if the termination condition is not met.
[0125] (9) Repeat the above steps to gradually optimize the individuals in the population, find the optimal individual, and output the neural network model corresponding to that individual.
[0126] Based on the above embodiments, the TD3 algorithm is used to perform reinforcement learning on the output results of the laser welding quality prediction model, including:
[0127] Obtain the output results of the reinforcement learning environment and the laser welding quality prediction model;
[0128] The TD3 algorithm is used to train and update the output results in the reinforcement learning environment.
[0129] Specifically, in this embodiment of the invention, the TD3 algorithm is used for reinforcement learning tasks, and the TD3 topology is as follows: Figure 4 As shown.
[0130] First, obtain a reinforcement learning environment. The specific steps are as follows:
[0131] The state space is set as the range of values for the process parameters. Its mathematical model expression is as follows:
[0132] s t ={p t ,v t ,r t ,f t ,s t}∈S
[0133] Among them, s t p represents the state of the intelligent agent in the environment at time t. t ,v t ,r t ,f t ,s t These are parameters such as power, speed, amplitude, and frequency at that time.
[0134] The action space is set to be one-five-hundredth the size of the state space. Each action is equivalent to changing the process parameter value within the action space once in the original state. Its mathematical model expression is as follows:
[0135] a t ={Δp t ,Δv t ,Δr t ,Δf t ,Δs t}
[0136] The reward function is set as the weighted difference between the predicted output of the DE-BP neural network in the current state and the previous state. The mathematical expression of the reward function is as follows:
[0137]
[0138] r t =E t -E t+1
[0139] O porosity The value represents porosity, w1, w2, and w3 are weighting coefficients, p1, p2, and p3 represent the three possible values for the classification output, and E represents the quality evaluation value of the weld. The current time step of the agent in the environment is denoted as t, and t+1 represents the subsequent time step after executing the current operation.
[0140] Furthermore, the TD3 training algorithm is used for training and updates, including:
[0141] (1) Initialization: Initialize three neural networks: two Actor networks and four Critic networks. There are also some hyperparameters, such as learning rate and target network update frequency.
[0142] (2) Experience replay buffer: Create an experience replay buffer to store the experience data sampled by the agent in the environment.
[0143] (3) Interact with random policies in the environment: Use random policies or initial policies to interact with the environment, collect experience data, and store the data in the experience replay buffer.
[0144] (4) Execute actions: Select actions and execute them in the environment based on the current state and actor network.
[0145] (5) Experience replay: Randomly sample a batch of experience data from the experience replay buffer to update the Critic network.
[0146] (6) Update the Critic network: Calculate the loss function of the Critic network to approximate the target Q value. Use gradient descent to update the parameters of the Critic network.
[0147] (7) Delayed Actor Network Update: Maximize the output of the Critic network by updating the Actor network. Since TD3 uses two Critic networks, the Actor network update can be delayed, i.e., the Actor network is updated only after the Critic network has been updated several times.
[0148] (8) Update the target network: Use a soft update method to slowly update the target network parameters of Critic and Actor to the current network parameters to stabilize the training.
[0149] (9) Repeat the training steps: Repeat steps (3) to (8) until the predetermined number of training rounds is reached or the stopping condition is met.
[0150] It should be noted that in step (4), randomized testing is used in the early stage of the training process, and the selected action is trained after a certain amount of prior knowledge is obtained.
[0151] The mathematical model of strategy μ(s) in steps (6) and (7) is as follows:
[0152] Qπ(s t ,a t )=Eπ[G t |s t =s,a t =a]
[0153]
[0154] μ(s) = arg max a Q(s,a)
[0155] Among them, G t It is the cumulative reward from time step T to the end of the loop. The discount factor γ essentially determines whether reinforcement learning cares about the reward relative to the near future, and in this embodiment of the invention, it is set to 1.
[0156] In this embodiment of the invention, reinforcement learning tasks are typically described using a Markov Decision Process (MDP): the machine is in an environment E, with a state space S, where each state is a description of the environment as perceived by the machine, and the actions the machine can take constitute the action space A. If an action is performed on the current state s, the latent transition function P will cause the environment to transition from the current state to another state with a certain probability. Simultaneously with the transition to another state, the environment will feed back a reward r to the machine according to the latent reward function R. In summary, the reinforcement learning task corresponds to the quadruple E = ...<S,A,P,R> ,in The state transition probability is specified. A reward is specified; in other applications, the reward function may only be related to state transitions, i.e. This invention utilizes the actor-critic network in TD3 to learn the patterns of porosity and weld penetration changes caused by process parameters, enabling it to find the optimal process parameters. The TD3 agent acts as software adjusting welding process variables within the environment. The agent's state space is set as a five-dimensional continuous space defined by the process parameters: laser power: 0.5-4.2kW; welding speed: 1-4m / min; oscillation amplitude: 0-1mm; oscillation frequency: 1-200Hz; wire feed speed: 2-6m / min. These parameters need to be normalized when stored in the replay buffer to ensure the stability of the training process. To prevent the action space from being too small to fully explore the space, and also to prevent it from being too large to cause convergence difficulties, the action space was selected based on testing as follows: laser power: -0.0074~0.00074kW; welding speed: -0.006~0.006m / min; oscillation amplitude: -0.002~0.002mm; oscillation frequency: -0.4~0.4Hz; wire feed speed: -0.008~0.008m / min, which is -1 / 500 to 1 / 500 of the state space size. However, in actual programming, to prevent the gradient from vanishing during training due to large differences in the magnitude of data across dimensions, thus causing the training output to always approach the critical value, the action space value for each dimension was set to -1 to 1, and multiplied by the original value in the step function of the environment to restore it. The initial position of each episode of the agent was set as the midpoint of the state space. The optimization aims to obtain a lower porosity and reduce defects. In the reward design, w1, w2, and w3 are 10, -5, and -10, respectively. Other hyperparameter settings for the TD3 algorithm are shown in Table 2.
[0157] Table 2
[0158]
[0159] Understandably, in 100 training cycles, each cycle consists of 500 steps. The first 400 steps involve random actions for exploration, while the last 100 steps are based on the network's output actions. The update interval between the original network and the target network in the actor / critic network is 3. The finally trained agent undergoes a test cycle, and the final state after 500 steps represents the final optimization result. This result is then used for comparative experiments.
[0160] The oscillating scanning laser arc hybrid welding process parameter optimization system provided by the present invention is described below. The oscillating scanning laser arc hybrid welding process parameter optimization system described below and the oscillating scanning laser arc hybrid welding process parameter optimization method described above can be referred to in correspondence with each other.
[0161] Figure 5 This is a schematic diagram of the oscillation scanning laser-arc hybrid welding process parameter optimization system provided in an embodiment of the present invention, as shown below. Figure 5 As shown, it includes: an experimental module 51, a post-processing module 52, a training module 53, and an optimization module 54, wherein:
[0162] The experimental module 51 is used to acquire the set of process parameters for oscillating scanning laser-arc hybrid welding, and to conduct oscillating scanning laser-arc hybrid welding experiments on the set of process parameters using the orthogonal experimental control variable method to obtain welding test results; the post-processing module 52 is used to perform post-processing on the welding test results and output a training dataset; the training module 53 is used to construct a BP neural network structure, optimize the BP neural network structure using the DE algorithm, and train the optimized BP neural network structure using the training dataset to obtain a laser welding quality prediction model; the optimization module 54 is used to perform reinforcement learning on the output results of the laser welding quality prediction model using the TD3 algorithm with the porosity and welding defects of the welding sample as optimization targets, and output the optimal process parameters.
[0163] Figure 6 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 6As shown, the electronic device may include a processor 610, a communication interface 620, a memory 630, and a communication bus 640, wherein the processor 610, the communication interface 620, and the memory 630 communicate with each other through the communication bus 640. The processor 610 can call logical instructions in the memory 630 to execute an optimization method for oscillating scanning laser-arc hybrid welding process parameters. This method includes: acquiring a set of process parameters for oscillating scanning laser-arc hybrid welding; conducting oscillating scanning laser-arc hybrid welding experiments on the set of process parameters using the orthogonal experimental control variable method to obtain welding experiment results; performing post-processing on the welding experiment results to output a training dataset; constructing a BP neural network structure; optimizing the BP neural network structure using the DE algorithm; training the optimized BP neural network structure using the training dataset to obtain a laser welding quality prediction model; and using the porosity and welding defects of the welding sample as optimization targets, performing reinforcement learning on the output results of the laser welding quality prediction model using the TD3 algorithm to output the optimal process parameters.
[0164] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0165] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0166] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0167] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for optimizing process parameters in oscillating scanning laser-arc hybrid welding, characterized in that, include: A set of process parameters for oscillating scanning laser-arc hybrid welding was obtained, and an oscillating scanning laser-arc hybrid welding experiment was conducted on the set of process parameters using the orthogonal experimental control variable method to obtain the welding test results. The welding test results are post-processed to output a training dataset; A backpropagation BP neural network structure is constructed, and the differential evolution (DE) algorithm is used to optimize the BP neural network structure. The optimized BP neural network structure is trained using the training dataset to obtain a laser welding quality prediction model. Using the porosity and welding defects of the welded sample as optimization objectives, the dual-delay depth deterministic gradient TD3 algorithm is used to reinforce the output of the laser welding quality prediction model to output the optimal process parameters. The specific process of reinforcement learning in the TD3 algorithm includes: in a preset reinforcement learning environment, the range of values of the process parameters is used as the state space, a preset proportion of the state space size is used as the action space, and the reward function constructed based on the output of the laser welding quality prediction model is used as the learning target. The state space and action space are explored and learned through the actor critic network, and the optimized process parameter values are output after training is completed. The output of the laser welding quality prediction model is reinforced using the TD3 algorithm, including: Obtain the output results of the reinforcement learning environment and the laser welding quality prediction model; The TD3 algorithm is used to train and update the output results in the reinforcement learning environment. Obtaining a reinforcement learning environment includes: Set the state space to the range of process parameters; Determine the size of the state space, and set the action space to a preset percentage of the size of the state space; The reward function is determined as the difference between the output in the current state and the state before the current state; in, Represents porosity. These are the weighting coefficients. The three possible values for the classification output are: E represents the quality evaluation value of the weld, t represents the current time step of the agent in the environment, and t+1 represents the subsequent time step after the current operation is performed. The TD3 algorithm is used to train and update the output results in the reinforcement learning environment, including: Step S1: Initialize three neural networks, including two actor networks and one critic network; Step S2: Create an experience replay buffer to store the experience data sampled by the agent in the environment; Step S3: Using a random strategy or an initial strategy, interact with the environment to collect experience data and store the experience data in the experience replay buffer. Step S4: Based on the current state and the Actor network, select an action and execute it in the environment; Step S5: Randomly sample a batch of experience data from the experience replay buffer and update the Critic network; Step S6: Calculate the loss function of the Critic network, make the loss function of the Critic network approximate the target Q value, and update the parameters of the Critic network using the gradient descent method. Step S7: Update the strategy of the Actor network to maximize the output of the Critic network; Step S8: Using a soft update method, the target network parameters of the Critic network and Actor network are slowly updated to the current network parameters; Repeat steps S3 to S8 until the preset training stop condition is met.
2. The method for optimizing process parameters of oscillating scanning laser-arc hybrid welding according to claim 1, characterized in that, A set of process parameters for oscillating scanning laser-arc hybrid welding was obtained. An orthogonal experimental control variable method was used to conduct oscillating scanning laser-arc hybrid welding experiments on the set of process parameters to obtain welding test results, including: The surface defects and porosity of the weld are used to characterize the weld formation quality. Laser power, welding speed, oscillation amplitude, oscillation frequency and wire feed speed are selected as the set of process parameters. The orthogonal experimental control variable method is used to conduct a preset number of oscillating scanning laser-arc hybrid welding tests on the set of process parameters, and the welding test results are output.
3. The method for optimizing process parameters of oscillating scanning laser-arc hybrid welding according to claim 1, characterized in that, The welding test results are post-processed to output a training dataset, including: Using the set of process parameters as test input and the porosity and welding defects of the welded sample as test output, an initial training dataset is obtained, wherein the porosity of the welded sample is obtained by X-ray flaw detection of the welded sample. The initial training dataset is normalized to obtain the training dataset.
4. The method for optimizing process parameters of oscillating scanning laser-arc hybrid welding according to claim 1, characterized in that, A BP neural network structure is constructed, and the differential evolution (DE) algorithm is used to optimize the BP neural network structure. The optimized BP neural network structure is then trained using the training dataset to obtain a laser welding quality prediction model, including: Determine the number of input nodes and the number of output nodes in the BP neural network structure; The parameters to be optimized in the BP neural network structure are determined to include the number of hidden layer nodes, activation function, optimizer, and learning rate. The parameters to be optimized are used as the decision vector of the DE algorithm, and the average value of the ten-fold cross-validation mean square error of the BP neural network structure is used as the optimization objective of the fitness function. The optimal hyperparameter combination is solved iteratively through the evolution of the DE algorithm to obtain the optimized BP neural network structure. The training dataset is divided into a training set and a test set according to a preset ratio. The optimized BP neural network structure is trained to output the laser welding quality prediction model.
5. The method for optimizing process parameters of oscillating scanning laser-arc hybrid welding according to claim 4, characterized in that, The parameters to be optimized are used as the decision vector of the DE algorithm, and the average value of the ten-fold cross-validation mean squared error of the BP neural network structure is used as the optimization objective of the fitness function, including: in, Let represent the decision variables, where This represents the activation function. This represents the number of hidden layer nodes. Indicates the optimizer, Indicates the learning rate. Represents the target vector. Represents decision variables, Represented as the target fitness function; Furthermore, the average of the mean squared errors of the 10-fold cross-validation is used as the target fitness function. : in, To output the number of items during testing. These represent the number of different batches for cross-validation. This is the expected output. This is for predicting the output.
6. The method for optimizing process parameters of oscillating scanning laser-arc hybrid welding according to claim 4, characterized in that, The optimized BP neural network structure is obtained by iteratively solving for the optimal hyperparameter combination through the DE algorithm, including: A random set of individuals is generated as the initial population, using any parameter within the range of the hyperparameter values of the BP neural network structure as the population individuals. Calculate the fitness function for each individual in the population, divide and shuffle the training dataset according to the requirement of 10 cross-validations, calculate the mean squared error on the average validation set, evaluate the fitness of each individual in the population using the fitness function, and determine individuals with fitness higher than the preset value as parent individuals. For each parent individual, two other individuals are randomly selected and linearly combined to generate mutated individuals: Where r1, r2, and r3 are randomly selected integers from 1 to NP, NP is the number of individuals in the population, F represents the mutation rate factor, and V i Let represent the newly generated i-th vector, and g represent the newly generated carrier. Cross over the mutated individual with its corresponding parent individual to generate offspring individuals: Where CR represents the crossover probability, the larger the CR value, the greater the probability of crossover, d rand It is a random integer from 1 to d, where d is the dimension of the variable gene pool; A fitness function is used to compare offspring individuals with parent individuals, and individuals with better fitness are selected as the next generation of the population. If the preset iteration termination condition is met, the fitness function of each individual in the population is calculated, and the next iteration continues until the optimal individual is determined, and the optimized BP neural network structure is output.
7. A system for optimizing process parameters of oscillating scanning laser-arc hybrid welding, based on the method for optimizing process parameters of oscillating scanning laser-arc hybrid welding as described in any one of claims 1 to 6, characterized in that, include: The test module is used to obtain the set of process parameters for oscillating scanning laser arc hybrid welding, and to conduct oscillating scanning laser arc hybrid welding tests on the set of process parameters using the orthogonal experimental control variable method to obtain the welding test results. The post-processing module is used to perform post-test processing on the welding test results and output a training dataset. The training module is used to construct a BP neural network structure, optimize the BP neural network structure using the DE algorithm, and train the optimized BP neural network structure using the training dataset to obtain a laser welding quality prediction model. The optimization module is used to perform reinforcement learning on the output results of the laser welding quality prediction model with the porosity and welding defects of the welding sample as optimization targets, and output the optimal process parameters.
Citation Information
Patent Citations
SMT printing parameter optimization method based on industrial big data
CN110427593A
Welding process parameter optimization method based on a BP neural network
CN111046609A
Electric arc additive remanufacturing welding parameter-weld bead size forward and inverse neural network prediction model
CN114799415A