Laser welding parameter self-adaptive optimization method based on machine learning

By establishing a deep neural network and Markov decision-making process to optimize laser welding parameters, the shortcomings of traditional laser welding quality judgment and parameter optimization are solved, real-time accurate prediction of welding quality and adaptive adjustment of parameters are achieved, and the stability and efficiency of welding are improved.

CN120406181AActive Publication Date: 2025-08-01LANZHOU UNIVERSITY OF TECHNOLOGY

Patent Information

Application Number
CN202510926022.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-07
Publication Date
2025-08-01
Estimated Expiration
2045-07-07

AI Technical Summary

Technical Problem

The quality judgment of traditional laser welding relies on manual experience or simple algorithms, resulting in poor real-time and low accuracy, making it difficult to accurately extract the spatial characteristics of the welding image, and dynamic feedback of welding quality; the optimization of existing laser welding parameters cannot adapt to the gap changes of metal parts and the difference in thermal conductivity of materials, resulting in unstable welding strength, high energy consumption, and difficulty in balancing the relationship between welding speed and quality, and it is easy to have bead width deviation and weld continuity.

Method used

Establish a deep neural network as a bead width prediction model, extract welding image features through convolutional layer and pooling layer, and combine it with a stochastic gradient descent algorithm for training; introduce Markov decision-making process and SAC algorithm, and use neural Q network to optimize welding strategies, reduce cumulative errors through a spatial discount mechanism, and realize adaptive adjustment of welding speed.

Benefits of technology

Real-time accurate prediction of welding quality and dynamic adjustment of parameters are achieved, the accumulated welding error is reduced, the application range of laser welding is expanded, and the needs of high-precision welding are met.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120406181A_ABST
    Figure CN120406181A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of parameter self-adaptive control, and particularly discloses a laser welding parameter self-adaptive optimization method based on machine learning, and the method comprises the steps of hardware equipment configuration, weld bead width prediction and laser welding parameter optimization. According to the scheme, a deep neural network is established as a weld bead width prediction model, a Markov decision process is established, a discount factor is introduced, an SAC algorithm is adopted to maximize an entropy regularization reinforcement learning target, a neural Q network is utilized as a function approximator, Q function parameters are optimized by minimizing Bellman residual errors, and a weld bead width prediction result is obtained. And a loss function is defined through KL divergence to optimize welding strategy parameters, a weld joint square error minimization formula is rewritten into a space discount form, the weld bead length and the laser position serve as variables, an integral award function is defined in combination with the instantaneous welding speed, the influence of accumulated errors is reduced through a space discount mechanism, and space self-adaptive adjustment of the welding speed is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of parameter adaptive control, and specifically refers to a method for adaptively optimizing laser welding parameters based on machine learning. Background Art

[0002] The adaptive optimization of laser welding parameters is to automatically adjust and optimize the welding parameters according to factors such as the material properties of the welding object, the requirements of the welding joint, and the real-time state during the welding process, so as to find the best parameter combination. Traditional welding quality judgment mainly relies on manual experience or simple algorithms, resulting in poor real-time performance and low accuracy of quality judgment, and it is difficult to accurately extract the spatial features of the welding image and dynamically feedback the welding quality. At the same time, the existing laser welding parameter optimization uses a fixed parameter table or a trial-and-error method, which cannot adapt to working conditions such as the change of the gap between metal parts and the difference in material thermal conductivity, resulting in unstable welding strength, high energy consumption, and it is difficult to balance the relationship between welding speed and quality, and it is easy to have a large deviation in the width of the weld bead and poor weld seam continuity, resulting in cumulative errors during long-weld welding. Summary of the Invention

[0003] In view of the above situation, to overcome the defects of the prior art, the present invention provides a method for adaptively optimizing laser welding parameters based on machine learning. Aiming at the problems that traditional welding quality judgment mainly relies on manual experience or simple algorithms, resulting in poor real-time performance and low accuracy of quality judgment, and it is difficult to accurately extract the spatial features of welding images and dynamically feedback welding quality, this solution establishes a deep neural network as a weld bead width prediction model, uses convolutional layers and pooling layers to extract spatial features such as the shape of the weld bead and the relative position of metal parts in the welding image of metal parts, then fuses the features through fully connected layers, combines the stochastic gradient descent algorithm to train the model, realizes the real-time and accurate prediction of the weld bead width, converts the image features into a quantitative quality judgment basis, avoids manual subjective errors, and provides a reliable feedback basis for dynamic parameter adjustment; Aiming at the problems that existing laser welding parameter optimization uses a fixed parameter table or a trial-and-error method, which cannot adapt to working conditions such as changes in the gap between metal parts and differences in material thermal conductivity, resulting in unstable welding strength, high energy consumption, and difficulty in balancing the relationship between welding speed and quality, and prone to large deviations in weld bead width and poor weld seam continuity, resulting in cumulative errors during long weld seam welding, this solution establishes a Markov decision process and introduces a discount factor, uses the SAC (Soft Actor-Critic) algorithm to maximize the entropy-regularized reinforcement learning objective, uses a neural Q-network as a function approximator, optimizes the Q-function parameters by minimizing the Bellman residual, and defines the loss function with KL divergence to optimize the welding strategy parameters, rewrites the weld seam mean square error minimization formula into a spatial discount form, takes the weld bead length and laser position as variables, combines the instantaneous welding speed to define an integral reward function, and reduces the influence of cumulative errors through the spatial discount mechanism, realizes the spatial adaptive adjustment of the welding speed, meets the quality requirements of high-precision welding scenarios, and expands the application range of laser welding.

[0004] The technical solution adopted by the present invention is as follows: The present invention provides a method for adaptively optimizing laser welding parameters based on machine learning. The method for adaptively optimizing laser welding parameters based on machine learning specifically includes the following steps:

[0005] Step S1: Configure hardware devices, including a laser generator, a motion controller, a near-infrared camera, and a position encoder. The laser generator is used to emit welding laser, the motion controller is used to control the movement of the laser generator, the near-infrared camera is used to obtain the welding image of metal parts in real time, and the position encoder is used to record the solder joint coordinates.

[0006] Step S2: Weld bead width prediction. Denote the center line between two metal parts as the central axis. Assume that the laser line is aligned with the central axis, and predict the weld bead width through the welding image of metal parts to judge the laser welding quality.

[0007] Step S3: Optimizing laser welding parameters, establishing a Markov decision process and introducing a discount factor into the Markov decision process, and achieving the optimal welding strategy by controlling the laser welding speed.

[0008] Furthermore, step S2, weld bead width prediction, specifically comprises: establishing and initializing a deep neural network as a weld bead width prediction model, using a stochastic gradient descent algorithm to train the weld bead width prediction model, the weld bead width prediction model outputting a predicted weld bead width, using the convolution layer and pooling layer of the deep neural network to extract spatial features from the metal part welding image, the spatial features including the weld bead shape and the relative position of the metal parts, and using the fully connected layer of the deep neural network to fuse the spatial features of the metal part welding image to obtain a fused feature. The convolution operation process of the convolution layer is as follows: ;

[0009] Where, is the first feature map output by the convolutional layer. Row, No. The element value of the column, The convolution kernel representing the convolution operation is × , and Both are correct The traversal, is the convolution kernel Row, No. The column weight parameter, It is the first Row, No. The pixel value of .

[0010] Furthermore, step S3, optimizing laser welding parameters, specifically includes the following steps:

[0011] Step S31: defining a reinforcement learning model as a parameter optimization model through a Markov decision process, wherein the Markov process includes a state space, an action space, an unknown transition probability density of the next state, and a reward value. The state space includes the weld bead width, the metal part gap width, the current welding speed, the laser power, the spot diameter, and the position increment of the previous time step. The action space includes the laser power increment and the spot diameter increment. The goal of the parameter optimization model is to determine the optimal welding strategy that maximizes the reward value.

[0012] Step S32: Use the SAC algorithm to maximize the entropy-regularized reinforcement learning objective, balance the sum of reward values and the randomness of the welding strategy, use a neural Q-network as a function approximator for the welding strategy, collect states, actions, and reward values from the replay buffer to form a sampling data set, and use the sampling data set to train the parameter optimization model to minimize the residual between the currently estimated Q-function in the neural Q-network and the target Q-function based on the Bellman equation, and optimize the network parameters of the Q-function. The formula used is as follows: ;

[0013] In the formula, is the Bellman residual, Q is the currently estimated Q-function, are the network parameters of the Q-function, is the expectation, is the target Q-function based on the Bellman equation, is the network parameters of the function, is the discrete time step, is the action at time, is the state at time. Among them, the calculation method of the target Q-function based on the Bellman equation is as follows: ;

[0014] In the formula, is the reward value at time, is the time discount factor, is the position of the laser line at time, is the target state value function, The calculation method of is as follows: ;

[0015] In the formula, is the welding temperature parameter, is the welding strategy parameter, is the parameterized welding strategy function;

[0016] Step S33: Define the loss function of the parameter optimization model as the KL divergence between the welding strategy and the optimal strategy of the corresponding Q-function, and optimize the welding strategy parameters by minimizing the loss function. The formula used is as follows: ;

[0017] In the formula, is the policy loss function;

[0018] Step S34: Rewrite the squared error minimization formula of the weld seam into a spatially discounted form, and the formula used is as follows: ;

[0019] In the formula, is the length of the weld bead, is the total time length, is the center line between two metal parts, that is, the central axis, is when the time is the position where the laser is located, is at the error between the target weld bead width and the actual weld bead width, and are respectively for and integrals, is at the instantaneous welding speed at this time;

[0020] Step S35: Define a reward function through the squared error minimization formula of the weld seam, and the formula used is as follows: ;

[0021] In the formula, is the integral reward function.

[0022] The beneficial effects obtained by the present invention by adopting the above solution are as follows:

[0023] (1) Aiming at the technical problems that the traditional welding quality judgment mainly relies on manual experience or simple algorithms, resulting in poor real-time performance and low accuracy of quality judgment, and it is difficult to accurately extract the spatial features of the welding image and cannot dynamically feedback the welding quality, this solution establishes a deep neural network as a weld bead width prediction model, uses convolutional layers and pooling layers to extract spatial features such as the weld bead shape and the relative position of metal parts in the welding image of metal parts, then fuses the features through fully connected layers, and combines the stochastic gradient descent algorithm to train the model to achieve real-time and accurate prediction of the weld bead width, converts the image features into a quantitative quality judgment basis, avoids manual subjective errors, and provides a reliable feedback basis for dynamic parameter adjustment;

[0024] (2)In view of the fact that the existing optimization of laser welding parameters uses a fixed parameter table or a trial-and-error method, which cannot adapt to working conditions such as the change of the gap between metal parts and the difference in material thermal conductivity, resulting in unstable welding strength, high energy consumption, and difficulty in balancing the relationship between welding speed and quality. It is prone to large deviations in bead width and poor weld continuity, leading to cumulative errors during long-weld welding. Through the establishment of a Markov decision process and the introduction of a discount factor, this solution adopts the SAC (Soft Actor-Critic) algorithm to maximize the entropy-regularized reinforcement learning objective. It uses a neural Q-network as a function approximator, optimizes the Q-function parameters by minimizing the Bellman residual, and defines a loss function with KL divergence to optimize the welding strategy parameters. The weld square error minimization formula is rewritten in a spatially discounted form, with the bead length and laser position as variables, and an integral reward function is defined in combination with the instantaneous welding speed. Through the spatial discount mechanism, the influence of cumulative errors is reduced, realizing the spatially adaptive adjustment of welding speed, meeting the quality requirements of high-precision welding scenarios, and expanding the application range of laser welding. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 FIG. is a step connection diagram of an adaptive optimization method for laser welding parameters based on machine learning provided by the present invention.

[0026] The drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the present invention, and do not constitute a limitation to the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0027] 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 a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0028] Example 1: Refer to Figure 1 , this embodiment provides an adaptive optimization method for laser welding parameters based on machine learning. The adaptive optimization method for laser welding parameters based on machine learning specifically includes the following steps:

[0029] Step S1: Configure the hardware devices, including a laser generator, a motion controller, a near-infrared camera, and a position encoder. The laser generator is used to emit welding laser, the motion controller is used to control the movement of the laser generator, the near-infrared camera is used to obtain real-time welding images of metal parts, and the position encoder is used to record the coordinates of the welding points.

[0030] Step S2: Weld bead width prediction. Denote the center line between two metal parts as the central axis. Assume that the laser line is aligned with the central axis, and predict the weld bead width through the metal part welding image to judge the laser welding quality;

[0031] Step S3: Optimization of laser welding parameters. Establish a Markov decision process and introduce a discount factor in the Markov decision process. Achieve the optimal welding strategy by controlling the laser welding speed.

[0032] Example 2. Refer to Figure 1 , this example is based on the above example. For step S2, the weld bead width prediction is specifically as follows: Establish and initialize a deep neural network as the weld bead width prediction model, and use the stochastic gradient descent algorithm to train the weld bead width prediction model. The weld bead width prediction model outputs the predicted weld bead width. Use the convolutional layer and pooling layer of the deep neural network to extract spatial features from the metal part welding image. The spatial features include the weld bead shape and the relative position of the metal parts. Use the fully connected layer of the deep neural network to fuse the spatial features of the metal part welding image to obtain the fused features. The convolution operation process of the convolutional layer is as follows: ;

[0033] In the formula, is the element value of the -th row and the -th column in the feature map output by the convolutional layer. represents that the convolution kernel of the convolution operation is × , and both traverse . is the weight parameter of the -th row and the -th column in the convolution kernel. is the pixel value of the -th row and the -th column in the metal part welding image.

[0034] Example 3. Refer to Figure 1 , this example is based on the above example. In step S3, the optimization of laser welding parameters specifically includes the following steps:

[0035] Step S31: Define a reinforcement learning model as a parameter optimization model through a Markov decision process. The Markov process includes a state space, an action space, an unknown transition probability density of the next state, and a reward value. The state space includes the bead width, the gap width of the metal parts, the current welding speed, the laser power, the spot diameter, and the position increment at the previous time step. The action space includes the laser power increment and the spot diameter increment. The goal of the parameter optimization model is to determine the optimal welding strategy that maximizes the reward value.

[0036] Step S32: Use the SAC algorithm to maximize the entropy-regularized reinforcement learning objective, balance the sum of the reward values and the randomness of the welding strategy, use a neural Q-network as a function approximator of the welding strategy, collect the states, actions, and reward values from the replay buffer to form a sampling data set, use the sampling data set to train the parameter optimization model, minimize the residual between the currently estimated Q-function in the neural Q-network and the target Q-function based on the Bellman equation, and optimize the network parameters of the Q-function. The formula used is as follows: ;

[0037] In the formula, is the Bellman residual, Q is the currently estimated Q-function, is the network parameter of the Q-function, is the expectation, is the target Q-function based on the Bellman equation, is the network parameter of the function, is at the action at time is at the state at time ;

[0038] In the formula, is the reward value at time is the time discount factor, is at the position of the laser line at time is the target state value function, The calculation method of ;

[0039] In the formula, is the welding temperature parameter, is the welding strategy parameter, is the parameterized welding strategy function;

[0040] Step S33: Define the loss function of the parameter optimization model as the KL divergence between the welding strategy and the optimal strategy of the corresponding Q function, and optimize the welding strategy parameters by minimizing the loss function. The formula used is as follows: ;

[0041] In the formula, is the policy loss function;

[0042] Step S34: Rewrite the squared error minimization formula of the weld seam into a spatially discounted form. The formula used is as follows: ;

[0043] In the formula, is the bead length, is the center line between two metal parts, that is, the central axis, is the position where the laser is located at time , is at the error between the target bead width and the actual bead width, and are the integrals of and respectively, is the instantaneous welding speed at time ;

[0044] Step S35: Define the reward function through the squared error minimization formula of the weld seam. The formula used is as follows: ;

[0045] In the formula, is the integral reward function.

[0046] Embodiment 4. This embodiment is based on the above embodiments. In Embodiment 2, a deep neural network is established and initialized as a bead width prediction model. In specific implementation, the convolutional layer of the deep neural network has 4 layers, and the convolutional kernels are 5×5, 3×3, 3×3, and 3×3 respectively. A 2×2 max-pooling layer is connected after each convolution layer. The fully connected layer has 2 layers. The number of neurons in the first fully connected layer is 100, and the number of neurons in the second fully connected layer is 64.

[0047] It should be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device.

[0048] Although the embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the present invention, and the scope of the present invention is defined by the appended claims and their equivalents.

[0049] The above description of the present invention and its embodiments is not restrictive. What is shown in the drawings is only one of the embodiments of the present invention, and the actual structure is not limited thereto. Generally speaking, if those of ordinary skill in the art are inspired by it and design, without creative efforts, structural modes and embodiments similar to the technical solution without departing from the purpose of the present invention, they shall fall within the protection scope of the present invention.

Claims

1. A method for adaptive optimization of laser welding parameters based on machine learning, characterized in that, Specifically, it includes the following steps: Step S1: Configure the hardware devices, which include a laser generator, a motion controller, a near-infrared camera, and a position encoder. The laser generator is used to emit welding laser, the motion controller is used to control the movement of the laser generator, the near-infrared camera is used to obtain the metal part welding image in real time, and the position encoder is used to record the solder joint coordinates; Step S2: Predict the bead width. Denote the center line between two metal parts as the central axis. Assume that the laser line is aligned with the central axis, and judge the laser welding quality by predicting the bead width through the metal part welding image; Step S3: Optimize the laser welding parameters. Establish a Markov decision process and introduce a discount factor in the Markov decision process, and achieve the optimal welding strategy by controlling the laser welding speed.

2. The adaptive optimization method for laser welding parameters based on machine learning according to claim 1, characterized in that For Step S2, the bead width prediction is specifically as follows: Establish and initialize a deep neural network as the bead width prediction model, and use the stochastic gradient descent algorithm to train the bead width prediction model. The bead width prediction model outputs the predicted bead width.

3. A method for adaptively optimizing laser welding parameters based on machine learning according to claim 2, characterized in that, For Step S3, the laser welding parameter optimization specifically includes the following steps: Step S31: Define a reinforcement learning model as the parameter optimization model through the Markov decision process. The Markov process includes a state space, an action space, an unknown transition probability density of the next state, and a reward value. The goal of the parameter optimization model is to determine the optimal welding strategy that maximizes the reward value; Step S32: Use the SAC algorithm to maximize the entropy-regularized reinforcement learning objective, balance the sum of the reward values and the randomness of the welding strategy, use the neural Q-network as the function approximator of the welding strategy, collect the states, actions, and reward values from the replay buffer to form a sampling data set, use the sampling data set to train the parameter optimization model, minimize the residual between the currently estimated Q function in the neural Q-network and the target Q function based on the Bellman equation, and optimize the network parameters of the Q function; Step S33: Define the loss function of the parameter optimization model as the KL divergence between the welding strategy and the optimal strategy of the corresponding Q function, and optimize the welding strategy parameters by minimizing the loss function; Step S34: Rewrite the mean squared error minimization formula of the weld seam into a spatially discounted form, and the formula used is as follows: ; In the formula, is the bead length, is the total time length, is the center line between two metal parts, i.e., the central axis, is the position where the laser is located at time is the time discount factor, is at the error between the target bead width and the actual bead width; and are the integrals of and respectively, is the instantaneous welding speed at ​​ Step S35: Define the reward function through the mean squared error minimization formula of the weld seam, and the formula used is as follows: ; In the formula, is the integral reward function.

Citation Information

Patent Citations

  • Reinforcement learning-based welding parameter determination method and welding method, and device

    CN109031954A

  • Weld joint forming prediction method based on complementary two-channel convolutional neural network

    CN113838050A

  • Metal cladding layer forming quality optimization method based on CMT additive remanufacturing

    CN115945698A

  • Laser welding planning method, device and equipment based on automatic positioning

    CN118875491A

  • Method for identifying welding seam by CO2 welding automatic trolley

    CN119187777A

Cited By

  • Laser welding robot defect detection method and system based on visual guidance

    CN120997159A