Weld joint detection and self-adaptive welding gun energy adjusting system and method
Through real-time image acquisition and machine learning model analysis of weld characteristics, combined with adaptive control algorithms to adjust the welding torch energy, the efficiency and accuracy problems of traditional weld detection and welding torch energy adjustment are solved, and the welding quality and safety are improved.
Patent Information
- Application Number
- CN202411789924.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-06
AI Technical Summary
Traditional weld detection methods are inefficient and have low accuracy, and the welding torch energy adjustment cannot be adjusted according to the weld status in real time, resulting in unstable welding quality.
The image acquisition module is used to collect weld images in real time, analyze weld features through image data processing and machine learning models (such as convolutional neural networks), automatically identify defects, and detect the welding torch energy in real time through the energy detection module, and dynamically adjust the welding torch energy parameters using an adaptive control algorithm.
It improves the accuracy and efficiency of weld detection, achieves a stable improvement in welding quality, and ensures the safety and stability of the welding process through real-time monitoring and alarm.
Smart Images

Figure CN119794647A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of welding control, and in particular to a weld detection and adaptive welding gun energy regulation system and method. Background Art
[0002] In industrial production, welding is a key process step in the manufacturing process, and the quality of the weld directly affects the structural strength and safety and reliability of the product. Traditional weld detection methods mainly rely on manual visual inspection, simple instrument detection or empirical judgment, which have problems such as low detection efficiency, low accuracy, and difficulty in real-time monitoring. At the same time, they are also easily interfered by human factors, resulting in unstable welding quality. In addition, the energy adjustment of the welding gun during the welding process generally relies on preset parameters, which cannot be adjusted in real time according to the weld state and is difficult to adapt to complex welding environments. Therefore, there is an urgent need for a new technology to achieve efficient and accurate detection of welds and adaptive adjustment of welding gun energy. Summary of the invention
[0003] The present invention aims to provide a weld detection and adaptive welding gun energy adjustment system and method, which can automatically identify weld defects by real-time analysis of weld feature data to improve the accuracy and efficiency of weld detection, and dynamically adjust the energy parameters of the welding gun according to the detection results, thereby improving welding quality and efficiency.
[0004] In order to achieve the above object, the present invention proposes a weld detection and adaptive welding gun energy adjustment system, comprising:
[0005] An image acquisition module is used to acquire real-time images of the weld during the welding process and to classify and annotate the collected weld images;
[0006] An image data processing module, used for preprocessing the weld image to obtain a clear weld image, wherein the preprocessing includes at least one of denoising, enhancement, and binarization;
[0007] A machine learning model is used for training based on the clear weld image, analyzing weld feature data in the weld image, extracting and identifying weld features, and obtaining predicted weld data;
[0008] An energy detection module, used for real-time detection of energy output parameters of the welding gun, wherein the energy output parameters include current, voltage and power;
[0009] A welding gun control module, used for adjusting energy output parameters of the welding gun according to the predicted weld data;
[0010] The display interface is used to display the weld inspection results, welding gun energy output parameters and system operation status data in real time.
[0011] Furthermore, the image acquisition module includes a high-definition camera or a laser radar.
[0012] Furthermore, the machine learning model adopts a convolutional neural network (CNN) to classify and detect weld images. The machine learning model adopts a deep learning algorithm and is trained based on the clear weld images. By extracting and classifying features of the clear weld images, the type, size and shape of the welds are identified, defects in the welds are identified, and the weld quality is predicted.
[0013] Furthermore, the machine learning model includes an input layer, multiple convolutional layers, an activation layer, multiple pooling layers and a fully connected layer;
[0014] The input layer is used to receive the pre-processed clear weld image;
[0015] The convolution layer is used to perform a convolution operation by sliding a convolution kernel on the clear weld image to extract features in the clear weld image. The convolution layer includes a multi-level convolution kernel to achieve weight sharing during the convolution process. The cross-correlation function is set in the convolution layer. Replace the convolution operation, where is the j'th weight of the i-th convolution kernel in the l-th layer, is the jth convolved local area in the lth layer, w is the width of the convolution kernel, y l(i,j) represents the output value at position (i, j) in the lth layer;
[0016] The activation layer is used to use RELU as the activation function of the intermediate hidden unit to enhance the nonlinearity of the convolutional neural network;
[0017] The pooling layer is used to perform a dimensionality reduction sampling operation on the input data, and realize the dimensionality reduction of the convolutional neural network parameters when extracting features; the pooling layer is set to use maximum pooling as a pooling function to obtain features that are independent of position.
[0018] Number is Among them, a l(i,t) is the activation value of the tth neural unit in the i-th map in the l-th layer. i and j represent the position of the pooling window in length and width, respectively, w is the width of the pooling window, and p l(i,j) is the maximum value of the pooling layer;
[0019] The fully connected layer is used to perform classification operations on the extracted feature vectors, and spread the output of the terminal pooling layer into a one-dimensional feature vector as the input of the fully connected layer.
[0020] Furthermore, the welding gun control module is also used to perform real-time monitoring during the welding process of the weld, and to send out an alarm signal when abnormal welding quality or potential safety hazards are found.
[0021] The present application also provides a weld detection and adaptive welding gun energy adjustment method, the method comprising:
[0022] Collect real-time images of welds during welding and classify and annotate the collected weld images;
[0023] Preprocessing the collected weld image to obtain a clear weld image, wherein the preprocessing includes at least one of denoising, enhancement, and binarization;
[0024] Constructing a machine learning model, training the machine learning model based on the clear weld image, wherein the trained machine learning model analyzes weld feature data in the weld image, extracts and identifies weld features, and obtains predicted weld data;
[0025] Real-time detection of energy output parameters of the welding gun, wherein the energy output parameters include current, voltage, and power;
[0026] The energy output parameters of the welding gun are adjusted according to the predicted weld seam data.
[0027] Furthermore, the constructing of the machine learning model includes:
[0028] Setting the machine learning model to include an input layer, a plurality of convolutional layers, an activation layer, a plurality of pooling layers and a fully connected layer;
[0029] The input layer is used to receive the pre-processed clear weld image;
[0030] The convolution layer is used to perform a convolution operation by sliding a convolution kernel on the clear weld image to extract features in the clear weld image. The convolution layer includes a multi-level convolution kernel to achieve weight sharing during the convolution process. The cross-correlation function is set in the convolution layer. Replace the convolution operation, where is the j'th weight of the i-th convolution kernel in the l-th layer, is the jth convolved local area in the lth layer, w is the width of the convolution kernel, y l(i,j) represents the output value at position (i, j) in the lth layer;
[0031] The activation layer is used to use RELU as the activation function of the intermediate hidden unit to enhance the nonlinearity of the convolutional neural network;
[0032] The pooling layer is used to perform a dimensionality reduction sampling operation on the input data to achieve dimensionality reduction of the convolutional neural network parameters when extracting features; the pooling layer is set to use maximum pooling as a pooling function to obtain features that are independent of position, and the pooling function is Among them, a l(i,t)is the activation value of the tth neural unit in the i-th map in the l-th layer. i and j represent the position of the pooling window in length and width, respectively, w is the width of the pooling window, and p l(i,j) is the maximum value of the pooling layer;
[0033] The fully connected layer is used to perform classification operations on the extracted feature vectors, and spread the output of the terminal pooling layer into a one-dimensional feature vector as the input of the fully connected layer.
[0034] Further, the training of the machine learning model based on the clear weld image includes:
[0035] A data set division step is to divide the clear weld image into a training set and a test set according to a preset ratio, wherein the training set is used to train the machine learning model so that the machine learning model learns the relationship between the characteristics of the weld image and the classification or detection target, and the test set is used to evaluate the performance of the machine learning model after the machine learning model training is completed;
[0036] Select the objective function step, which is to use the cross entropy cost function as the objective function, and obtain the parameters of the training logistic regression model by solving the optimal value of the objective function;
[0037] Selecting an optimizer step, which is to select an optimizer to update the weight of the machine learning model according to the loss function to gradually reduce the value of the loss function;
[0038] The training process step includes inputting the training set data into the machine learning model batch by batch, calculating the loss function value between the output prediction value of the machine learning model and the true label, updating the weight of the machine learning model using the selected optimizer, and adjusting the parameters of the machine learning model so that the loss function value of the machine learning model on the training set gradually decreases until the machine learning model converges;
[0039] The model evaluation step is to input the test set data into the trained machine learning model to obtain the classification or detection prediction results of the machine learning model for the weld images in the test set; analyze and evaluate the classification or detection prediction results of the weld images in the test set based on the machine learning model, and analyze the advantages and disadvantages of the machine learning model.
[0040] Furthermore, in the step of selecting the objective function, the cross entropy cost function is
[0041]
[0042] Among them, y i is the true label, is the model prediction probability, L is the loss value, L represents the degree of difference between the model prediction result and the true label, i is the category index, and N is the number of different categories in the sample.
[0043] Furthermore, the training of the machine learning model based on the clear weld image also includes:
[0044] The trained and qualified machine learning model is deployed, and during the welding process, the newly collected weld images are classified and detected in real time using the deployed machine learning model.
[0045] The weld seam detection and adaptive welding gun energy adjustment system and method of the present invention have the following beneficial effects:
[0046] 1. The present invention adopts a machine learning algorithm to detect welds, which has the advantages of high detection accuracy, high efficiency, and adaptability to different welding conditions and materials.
[0047] 2. By real-time detection of the energy output of the welding gun and using an adaptive control algorithm to adjust the energy output of the welding gun, the best welding effect can be achieved and the welding quality can be improved.
[0048] 3. The display interface is used to display the weld inspection results, welding gun energy output parameters and system operation status data in real time. Combined with the welding gun control module, it has real-time monitoring and alarm functions to ensure the safety and stability of the welding process.
[0049] With reference to the following description and drawings, a specific embodiment of the present invention is disclosed in detail, indicating the manner in which the principle of the present invention can be adopted. It should be understood that the scope of the embodiment of the present invention is not limited thereby, and the embodiment of the present invention includes many changes, modifications and equivalents. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is a structural schematic diagram of the weld detection and adaptive welding gun energy adjustment system in the embodiment of the present application.
[0051] Figure 2 This is a training and prediction flowchart of the machine learning model in the embodiment of this application (CNN).
[0052] Figure 3 This is a training and prediction flowchart of the machine learning model in the embodiment of this application (PointNet++).
[0053] Figure 4 This is a control flow chart of the welding gun energy regulation module in the embodiment of the present application.
[0054] Figure 5This is a flow chart of the weld detection and adaptive welding gun energy adjustment method in an embodiment of the present application. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the present invention more clear, the present invention is further described in detail below through the accompanying drawings and embodiments. However, it should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the scope of the present invention.
[0056] It should be noted that when an element is referred to as being "disposed on, provided with" another element, it may be directly on the other element or there may also be a central element. When an element is considered to be "connected, connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. "Fixed connection" means a fixed connection. There are many ways of fixed connection, which are not within the scope of protection of this article. The terms "vertical", "horizontal", "left", "right" and similar expressions used in this article are for illustrative purposes only and do not represent the only implementation method.
[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs. The terms used in the specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.
[0058] Example 1
[0059] Please refer to the instruction manual Figure 1-4 The present invention provides an embodiment of a weld detection and adaptive welding gun energy regulation system and method. The following is a detailed description of a weld detection and adaptive welding gun energy regulation system and method of the present invention in conjunction with a specific embodiment.
[0060] like Figure 1 As shown, the weld detection and adaptive welding gun energy adjustment system in this embodiment includes an image acquisition module, an image data processing module, a machine learning model, an energy detection module, a welding gun control module and a display interface, wherein:
[0061] Image acquisition module. In this embodiment, the image acquisition module includes a high-definition camera, a laser radar or other image acquisition equipment, which is used to perform real-time image acquisition of the weld during the welding process. The high-definition camera mainly acquires two-dimensional images, while the laser radar can acquire three-dimensional point cloud data, and a three-dimensional model of the weld can be obtained through reconstruction.
[0062] Image data processing module, in this embodiment, the image data processing module is used to pre-process the collected weld image, including denoising, enhancement, binarization and other operations to improve the quality and clarity of the image. Preferably, the collected image can be denoised by a Gaussian filter:
[0063]
[0064] Where I(x,y) is the original image, σ is the standard deviation of the filter. x and y are the coordinates relative to the center of the filter, I filtered (x, y) is the pixel value of the filtered image at coordinate (x, y).
[0065] The machine learning model uses a deep learning algorithm and is trained based on weld data. It extracts and classifies features of weld images and identifies information such as the type, size, and shape of the weld. It can identify defects such as pores, cracks, and incomplete penetration in the weld and predict the quality of the weld.
[0066] Preferably, Figure 2 As shown, in Example 1, the machine learning model uses a convolutional neural network (CNN) to classify and detect weld images. The model includes multiple convolutional layers and pooling layers to extract multi-scale features of weld images. The final fully connected layer is used to output the state category of the weld (such as good, deviation, defect, etc.).
[0067] The basic working principle of CNN is to extract high-level signal fusion features from the training data through convolutional layers and pooling layers, and then use the fully connected layer to stretch the features extracted from different channels into a one-dimensional vector, which is then input into the Softmax classifier for recognition. Finally, the BP back-propagation algorithm is used to optimize the network structure parameters. Specifically, the following steps are included:
[0068] S1. Data collection and preprocessing.
[0069] S11 data collection: contains a large number of image datasets of different types of welds (such as normal welds, defective welds, etc.). Such images can come from photos taken during the actual welding production process, collection by industrial inspection equipment, etc.
[0070] S12 Data labeling: Manually label the collected weld images.
[0071] S13 data preprocessing: Normalize the pixel values of the image to a specific range to speed up model training and improve stability. At the same time, in order to increase the scale and diversity of the data set and prevent model overfitting, data augmentation technology can be applied.
[0072] S2. Build a CNN model.
[0073] S21 input layer: its function is to receive the weld image data that has been preprocessed and input in the form of tensor.
[0074] S22 convolution layer: The convolution operation is performed by sliding the convolution kernel on the image to automatically extract local features in the image. The convolution layer contains multi-level convolution kernels, which realize weight sharing during the convolution process, avoiding overfitting caused by too many parameters and reducing the configuration required for model training. In this embodiment, the cross-correlation function replaces the convolution operation to avoid the reduction of indexes caused by back-propagation flipping the convolution kernel:
[0075]
[0076] in, is the j'th weight of the i-th convolution kernel in the l-th layer, is the jth convolved local area in the lth layer, w is the width of the convolution kernel, y l(i,j) represents the output value at position (i, j) in the lth layer.
[0077] S23 activation layer: The role of introducing the activation function is to enhance the nonlinearity of the deep neural network model, similar to the effect of the hidden layer, thereby improving robustness. When Sigmoid is used as the activation function, it contains a large amount of exponential calculations and is prone to gradient disappearance during back propagation, which cannot adapt to the training of deep networks. Preferably, RELU is used as the activation function of the intermediate hidden unit:
[0078] f(x)=max(0,x)
[0079] Compared with the Sigmoid and tanh functions, the RELU function converges faster and has a lower computational cost. It can effectively alleviate the problem of gradient disappearance, has good unilateral inhibition and a relatively wide excitation boundary, and some of its neurons have an output of 0, which can reduce network sparsity, reduce the relative dependence of various parameters, and alleviate overfitting.
[0080] S24 pooling layer operation: It is used to downsample the input data, and realize the dimension reduction of network parameters while extracting features. Preferably, in this embodiment, maximum pooling is used as the pooling function to obtain position-independent features:
[0081]
[0082] Among them, a l(i,t) is the activation value of the tth neural unit in the i-th map in the l-th layer. i and j represent the position of the pooling window in length and width, respectively, w is the width of the pooling window, and p l(i,j) is the maximum value of the pooling layer.
[0083] S25 fully connected layer: classifies the feature vector extracted by the filtering system, spreads the output of the terminal pooling layer into a one-dimensional feature vector as the input of the fully connected layer, and fully connects the hidden layer using RELU as the activation function and the output layer using the Softmax function as the activation function.
[0084] S3. Model training.
[0085] S31 divides the data set: divides the preprocessed weld image data set into a training set and a test set according to a certain ratio, where the training set is used to train the model so that the model can learn the relationship between the characteristics of the weld image and the classification or detection targets, and the test set is used to evaluate the performance of the model after the model training is completed.
[0086] S32 Select objective function: Obtain the parameters of the training logistic regression model by solving the optimal value of the objective function. Since Softmax is used as the last layer, the log-likelihood cost function can be selected. Considering that the combination of the log-likelihood cost function and Softmax is very similar to the combination of the cross entropy and the Sigmoid function, it is preferred to use the cross entropy cost function in the binary classification:
[0087]
[0088] Among them, y i is the true label, is the model prediction probability. L is the loss value, which represents the difference between the model prediction result and the true label. i is the category index and N is the number of different categories in the sample.
[0089] S33 Select optimizer: The role of the optimizer is to update the weights of the model according to the loss function to gradually reduce the value of the loss function and make the model's prediction more accurate. Stochastic Gradient Descent (SGD) and its variants can be selected.
[0090] S34 training process: input the training set data batch by batch into the constructed CNN model, calculate the loss function value between the model's output prediction value and the true label; according to the loss function value, use the selected optimizer to update the model's weight, adjust the model's parameters, so that the model's loss function value on the training set gradually decreases; repeat the above process, after multiple training rounds, until the model's performance on the training set reaches a relatively stable state or meets a pre-set stop condition. Preferably, the stop condition is that the loss function value is less than a set threshold.
[0091] S4. Model evaluation.
[0092] S41 is evaluated on the test set: the test set data is input into the trained CNN model to obtain the classification or detection prediction results of the model for the test set images. For weld inspection tasks, indicators such as mean average precision (mAP) can be calculated to evaluate the detection performance of the model.
[0093] S42 Analyze the evaluation results: Analyze the advantages and disadvantages of the model based on the results of the evaluation indicators. If the model performance is not ideal, consider adjusting the model architecture (such as increasing or decreasing the number of convolutional layers and fully connected layers, etc.), reselecting the loss function or optimizer, and other measures to improve the model.
[0094] S5. Model deployment and application.
[0095] S51 Model deployment: Deploy the trained and evaluated CNN model to the actual weld inspection system.
[0096] S52 Practical application: In the actual welding production process, the deployed CNN model is used to classify and detect the newly collected weld images in real time. When defects in the weld are detected, an alarm can be issued in time or corresponding measures can be taken (such as notifying the operator to repair it, recording defect information, etc.) to ensure the welding quality.
[0097] It should be noted that if Figure 3 As shown, the solution of the second embodiment can also be adopted. PointNet++ (density adaptive PointNet layer) can use neighborhoods at multiple scales to achieve robustness and detail capture. During the training process, with the help of random input loss, learning is used to adaptively weight the patterns detected at different scales, and multi-scale feature combinations are performed based on the input data. Energy detection module, in this embodiment, the energy detection module can detect the energy output of the welding gun in real time, including parameters such as current, voltage, and power as control variables;
[0098] The welding gun control module uses an adaptive control algorithm to adjust the energy parameter output of the welding gun through the controller according to the output results of the image processing module and the energy detection module to achieve the best welding effect.
[0099] Preferably, in this embodiment, the welding gun control module adopts a fuzzy adaptive proportional integral differential (PID) control method, combining the advantages of fuzzy control and traditional PID control, and adjusting the gain online through fuzzy logic to achieve better control effect. The fuzzy processing is mainly aimed at key data in the welding process, first of all, welding deviation data, including lateral deviation and longitudinal deviation of weld position; secondly, welding speed deviation; and finally, welding gun energy regulation, adaptively adjusting energy output according to different weld types and identification references, in order to achieve better welding effect.
[0100] The welding gun control scheme includes automatic tracking weld mode and manual fine-tuning mode. Fuzzy processing can perform different controls according to the data characteristics in different modes. In the automatic tracking weld mode, fuzzy PID control continuously adjusts the welding gun position according to the weld position deviation and deviation change rate, and adjusts the actual output of the welding gun according to the weld type. The traditional PID controller equation is as follows:
[0101]
[0102] Where, e(t) is the error signal, K p , K i , K d are the proportional, integral, and differential coefficients respectively.
[0103] Proportional gain K p :Determines the controller's response to the current error (the difference between the actual value and the set value). By adjusting K p , can control the response speed and stability of the system. If the system responds too slowly, increase K p If the system oscillates severely, K can be reduced. p .
[0104] Integral gain K i :Used to eliminate the steady-state error of the system. The integral part compensates the system by accumulating past errors, making the final error approach zero. By adjusting K i , which can reduce the steady-state error of the system. If the system still has errors in the steady state, increase K i However, if the system has long-term overshoot or fluctuation, K can be reduced. i .
[0105] Differential gain K d :Respond to the error change rate of the system. The differential part predicts the error trend and pre-adjusts to reduce the overshoot or oscillation of the system. By adjusting K d , which can reduce the overshoot and oscillation of the system. If the response process of the system is not stable enough, you can increase K d If the system is too sensitive to interference, K can be reduced. d .
[0106] like Figure 4 As shown in the figure, in the fuzzy adaptive PID control, the PID parameter (K p ,K i ,K d) is no longer fixed, but is dynamically adjusted through fuzzy logic. Fuzzy control is a control method based on fuzzy logic. It does not rely on precise mathematical models but designs controllers based on experience or expert knowledge. Fuzzy control systems mainly include three processes: fuzzification, fuzzy reasoning, and defuzzification. Fuzzification is the process of converting precise input quantities (such as error e and error change rate Δe) into fuzzy quantities, which is achieved by defining fuzzy sets and membership functions; fuzzy reasoning is the process of reasoning based on fuzzy rules, in which fuzzy rules are established based on expert experience or experimental data, and fuzzy inputs are processed through fuzzy reasoning engines to generate fuzzy outputs; defuzzification is the process of converting fuzzy outputs into precise outputs, and the maximum membership method is used to convert fuzzy outputs into precise ΔK p ,ΔK i ,ΔK d Values are then applied to the PID controller to update the controller parameters, ultimately controlling the movement direction, speed and output intensity of the welding gun, achieving precise control of the welding gun so that the welding gun can accurately perform welding operations along the weld.
[0107] The specific steps are as follows:
[0108] Step 1: Fuzzification: Input the error e(t) and the error change rate Δe(t) into the fuzzy controller and convert them into fuzzy quantities;
[0109] Step 2: Fuzzy reasoning: According to the fuzzy rule base, output the fuzzy control quantity K p , K i and K d , these quantities determine the adjustment range of PID parameters;
[0110] Step 3: Defuzzification: Convert the fuzzy control quantity into the actual PID parameter adjustment quantity, update the controller parameters, and finally control the movement direction, speed and output intensity of the welding gun.
[0111] Update controller parameters by: K p =K p +ΔK p , K i =K i +ΔK i , K d =K d +ΔK d .
[0112] At the same time, the welding gun control module can also monitor and alarm the welding process in real time to ensure the safety and stability of the welding process. The detection and alarm system can monitor the welding process in real time. When abnormal welding quality or safety hazards are found, an alarm signal will be issued in time to remind the operator to deal with it.
[0113] In this embodiment, the display interface includes a display screen with a good interactive interface and a data connection line, which is used to display the weld inspection results, welding gun energy adjustment status and system operation status in real time, which is convenient for operators to monitor and adjust.
[0114] Example 2
[0115] Embodiment 2 includes all the technical features of Embodiment 1, and the corresponding effects are the same, and specific reference may be made to the contents of Embodiment 1.
[0116] For details, please refer to Figure 1 The present invention proposes a weld detection and adaptive welding gun energy adjustment system, comprising:
[0117] An image acquisition module is used to acquire real-time images of the weld during the welding process and to classify and annotate the collected weld images;
[0118] An image data processing module, used for preprocessing the weld image to obtain a clear weld image, wherein the preprocessing includes at least one of denoising, enhancement, and binarization;
[0119] A machine learning model is used for training based on the clear weld image, analyzing weld feature data in the weld image, extracting and identifying weld features, and obtaining predicted weld data;
[0120] An energy detection module, used for real-time detection of energy output parameters of the welding gun, wherein the energy output parameters include current, voltage and power;
[0121] A welding gun control module, used for adjusting energy output parameters of the welding gun according to the predicted weld data;
[0122] The display interface is used to display the weld inspection results, welding gun energy output parameters and system operation status data in real time.
[0123] Furthermore, the image acquisition module includes a high-definition camera or a laser radar.
[0124] Furthermore, the machine learning model adopts a convolutional neural network (CNN) to classify and detect weld images. The machine learning model adopts a deep learning algorithm and is trained based on the clear weld images. By extracting and classifying features of the clear weld images, the type, size and shape of the welds are identified, defects in the welds are identified, and the weld quality is predicted.
[0125] Furthermore, the machine learning model includes an input layer, multiple convolutional layers, an activation layer, multiple pooling layers and a fully connected layer;
[0126] The input layer is used to receive the pre-processed clear weld image;
[0127] The convolution layer is used to perform a convolution operation by sliding a convolution kernel on the clear weld image to extract features in the clear weld image. The convolution layer includes a multi-level convolution kernel to achieve weight sharing during the convolution process. The cross-correlation function is set in the convolution layer. Replace the convolution operation, where is the j'th weight of the i-th convolution kernel in the l-th layer, is the jth convolved local area in the lth layer, w is the width of the convolution kernel, y l(i,j) represents the output value at position (i, j) in the lth layer;
[0128] The activation layer is used to use RELU as the activation function of the intermediate hidden unit to enhance the nonlinearity of the convolutional neural network;
[0129] The pooling layer is used to perform a dimensionality reduction sampling operation on the input data to achieve dimensionality reduction of the convolutional neural network parameters when extracting features; the pooling layer is set to use maximum pooling as a pooling function to obtain features that are independent of position, and the pooling function is Among them, a l(i,t) is the activation value of the tth neural unit in the i-th map in the l-th layer. i and j represent the position of the pooling window in length and width, respectively, w is the width of the pooling window, and p l(i,j) is the maximum value of the pooling layer;
[0130] The fully connected layer is used to perform classification operations on the extracted feature vectors, and spread the output of the terminal pooling layer into a one-dimensional feature vector as the input of the fully connected layer.
[0131] Furthermore, the welding gun control module is also used to perform real-time monitoring during the welding process of the weld, and to send out an alarm signal when abnormal welding quality or potential safety hazards are found.
[0132] like Figure 5 As shown, based on the weld detection and adaptive welding gun energy adjustment system described above, the present application also provides a weld detection and adaptive welding gun energy adjustment method, the method comprising:
[0133] S10, collecting real-time images of the weld during the welding process, and classifying and labeling the collected weld images;
[0134] S20, preprocessing the collected weld image to obtain a clear weld image, wherein the preprocessing includes at least one of denoising, enhancement, and binarization;
[0135] S30, constructing a machine learning model, training the machine learning model based on the clear weld image, wherein the trained machine learning model analyzes weld feature data in the weld image, extracts and identifies weld features, and obtains predicted weld data;
[0136] S40, detecting energy output parameters of the welding gun in real time, wherein the energy output parameters include current, voltage, and power;
[0137] S50: adjusting energy output parameters of the welding gun according to the predicted weld data.
[0138] Furthermore, the constructing of the machine learning model includes:
[0139] Setting the machine learning model to include an input layer, a plurality of convolutional layers, an activation layer, a plurality of pooling layers and a fully connected layer;
[0140] The input layer is used to receive the pre-processed clear weld image;
[0141] The convolution layer is used to perform a convolution operation by sliding a convolution kernel on the clear weld image to extract features in the clear weld image. The convolution layer includes a multi-level convolution kernel to achieve weight sharing during the convolution process. The cross-correlation function is set in the convolution layer. Replace the convolution operation, where is the j'th weight of the i-th convolution kernel in the l-th layer, is the jth convolved local area in the lth layer, w is the width of the convolution kernel, y l(i,j) represents the output value at position (i, j) in the lth layer;
[0142] The activation layer is used to use RELU as the activation function of the intermediate hidden unit to enhance the nonlinearity of the convolutional neural network;
[0143] The pooling layer is used to perform a dimensionality reduction sampling operation on the input data to achieve dimensionality reduction of the convolutional neural network parameters when extracting features; the pooling layer is set to use maximum pooling as a pooling function to obtain features that are independent of position, and the pooling function is Among them, a l(i,t) is the activation value of the tth neural unit in the i-th map in the l-th layer. i and j represent the position of the pooling window in length and width, respectively, w is the width of the pooling window, and p l(i,j) is the maximum value of the pooling layer;
[0144] The fully connected layer is used to perform classification operations on the extracted feature vectors, and spread the output of the terminal pooling layer into a one-dimensional feature vector as the input of the fully connected layer.
[0145] Further, the training of the machine learning model based on the clear weld image includes:
[0146] A data set division step is to divide the clear weld image into a training set and a test set according to a preset ratio, wherein the training set is used to train the machine learning model so that the machine learning model learns the relationship between the characteristics of the weld image and the classification or detection target, and the test set is used to evaluate the performance of the machine learning model after the machine learning model training is completed;
[0147] Select the objective function step, which is to use the cross entropy cost function as the objective function, and obtain the parameters of the training logistic regression model by solving the optimal value of the objective function;
[0148] Selecting an optimizer step, which is to select an optimizer to update the weight of the machine learning model according to the loss function to gradually reduce the value of the loss function;
[0149] The training process step includes inputting the training set data into the machine learning model batch by batch, calculating the loss function value between the output prediction value of the machine learning model and the true label, updating the weight of the machine learning model using the selected optimizer, and adjusting the parameters of the machine learning model so that the loss function value of the machine learning model on the training set gradually decreases until the machine learning model converges;
[0150] The model evaluation step is to input the test set data into the trained machine learning model to obtain the classification or detection prediction results of the machine learning model for the weld images in the test set; analyze and evaluate the classification or detection prediction results of the weld images in the test set based on the machine learning model, and analyze the advantages and disadvantages of the machine learning model.
[0151] Furthermore, in the step of selecting the objective function, the cross entropy cost function is
[0152]
[0153] Among them, y i is the true label, is the model prediction probability, L is the loss value, L represents the degree of difference between the model prediction result and the true label, i is the category index, and N is the number of different categories in the sample.
[0154] Furthermore, the training of the machine learning model based on the clear weld image also includes:
[0155] The trained and qualified machine learning model is deployed, and during the welding process, the newly collected weld images are classified and detected in real time using the deployed machine learning model.
[0156] The weld seam detection and adaptive welding gun energy adjustment system and method of the present invention have the following beneficial effects:
[0157] 1. The present invention adopts a machine learning algorithm to detect welds, which has the advantages of high detection accuracy, high efficiency, and adaptability to different welding conditions and materials.
[0158] 2. By real-time detection of the energy output of the welding gun and using an adaptive control algorithm to adjust the energy output of the welding gun, the best welding effect can be achieved and the welding quality can be improved.
[0159] 3. The display interface is used to display the weld inspection results, welding gun energy output parameters and system operation status data in real time. Combined with the welding gun control module, it has real-time monitoring and alarm functions to ensure the safety and stability of the welding process.
[0160] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modification, equivalent substitution or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A weld detection and adaptive welding gun energy adjustment system, characterized in that: include: An image acquisition module is used to acquire real-time images of the weld during the welding process and to classify and annotate the collected weld images; An image data processing module, used for preprocessing the weld image to obtain a clear weld image, wherein the preprocessing includes at least one of denoising, enhancement, and binarization; A machine learning model is used for training based on the clear weld image, analyzing weld feature data in the weld image, extracting and identifying weld features, and obtaining predicted weld data; An energy detection module, used for real-time detection of energy output parameters of the welding gun, wherein the energy output parameters include current, voltage and power; A welding gun control module, used for adjusting energy output parameters of the welding gun according to the predicted weld data; The display interface is used to display the weld inspection results, welding gun energy output parameters and system operation status data in real time.
2. A weld detection and adaptive welding gun energy adjustment system according to claim 1, characterized in that: The image acquisition module includes a high-definition camera or a laser radar.
3. A weld detection and adaptive welding gun energy adjustment system according to claim 1, characterized in that: The machine learning model uses a convolutional neural network (CNN) to classify and detect weld images. The machine learning model uses a deep learning algorithm and is trained based on the clear weld images. By extracting and classifying features of the clear weld images, the type, size and shape of the welds are identified, defects in the welds are identified, and the quality of the welds is predicted.
4. A weld detection and adaptive welding gun energy adjustment system according to claim 3, characterized in that: The machine learning model includes an input layer, multiple convolutional layers, an activation layer, multiple pooling layers and a fully connected layer; The input layer is used to receive the pre-processed clear weld image; The convolution layer is used to perform a convolution operation by sliding a convolution kernel on the clear weld image to extract features in the clear weld image. The convolution layer includes a multi-level convolution kernel to achieve weight sharing during the convolution process. The cross-correlation function is set in the convolution layer. Replace the convolution operation, where is the j'th weight of the i-th convolution kernel in the l-th layer, is the jth convolved local area in the lth layer, w is the width of the convolution kernel, y l (i,j) represents the output value at position (i, j) in the lth layer; The activation layer is used to use RELU as the activation function of the intermediate hidden unit to enhance the nonlinearity of the convolutional neural network; The pooling layer is used to perform a dimensionality reduction sampling operation on the input data to achieve dimensionality reduction of the convolutional neural network parameters when extracting features; the pooling layer is set to use maximum pooling as a pooling function to obtain features that are independent of position, and the pooling function is Among them, a l(i,t) is the activation value of the tth neural unit in the i-th map in the l-th layer. i and j represent the position of the pooling window in length and width, respectively, w is the width of the pooling window, and p l(i,j) is the maximum value of the pooling layer; The fully connected layer is used to perform classification operations on the extracted feature vectors, and spread the output of the terminal pooling layer into a one-dimensional feature vector as the input of the fully connected layer.
5. A weld detection and adaptive welding gun energy adjustment system according to claim 1, characterized in that: The welding gun control module is also used to perform real-time monitoring during the welding process of the weld seam, and to send out an alarm signal when abnormal welding quality or potential safety hazards are found.
6. A weld detection and adaptive welding gun energy adjustment method, characterized in that: The method comprises: Real-time image acquisition of welds during welding process, and classification and annotation of collected weld images; Preprocessing the collected weld image to obtain a clear weld image, wherein the preprocessing includes at least one of denoising, enhancement, and binarization; Constructing a machine learning model, training the machine learning model based on the clear weld image, wherein the trained machine learning model analyzes weld feature data in the weld image, extracts and identifies weld features, and obtains predicted weld data; Real-time detection of energy output parameters of the welding gun, wherein the energy output parameters include current, voltage, and power; The energy output parameters of the welding gun are adjusted according to the predicted weld seam data.
7. A weld seam detection and adaptive welding gun energy adjustment method according to claim 6, characterized in that: The construction of the machine learning model includes: Setting the machine learning model to include an input layer, a plurality of convolutional layers, an activation layer, a plurality of pooling layers and a fully connected layer; The input layer is used to receive the pre-processed clear weld image; The convolution layer is used to perform a convolution operation by sliding a convolution kernel on the clear weld image to extract features in the clear weld image. The convolution layer includes a multi-level convolution kernel to achieve weight sharing during the convolution process. The cross-correlation function is set in the convolution layer. Replace the convolution operation, where is the j'th weight of the i-th convolution kernel in the l-th layer, is the jth convolved local area in the lth layer, w is the width of the convolution kernel, y l (i,j) represents the output value at position (i, j) in the lth layer; The activation layer is used to use RELU as the activation function of the intermediate hidden unit to enhance the nonlinearity of the convolutional neural network; The pooling layer is used to perform a dimensionality reduction sampling operation on the input data to achieve dimensionality reduction of the convolutional neural network parameters when extracting features; the pooling layer is set to use maximum pooling as a pooling function to obtain features that are independent of position, and the pooling function is Among them, a l(i,t) is the activation value of the tth neural unit in the i-th map in the l-th layer. i and j represent the position of the pooling window in length and width, respectively, w is the width of the pooling window, and p l(i,j) is the maximum value of the pooling layer; The fully connected layer is used to perform classification operations on the extracted feature vectors, and spread the output of the terminal pooling layer into a one-dimensional feature vector as the input of the fully connected layer.
8. A weld seam detection and adaptive welding gun energy adjustment method according to claim 6, characterized in that: The training of the machine learning model based on the clear weld image comprises: A data set division step is to divide the clear weld image into a training set and a test set according to a preset ratio, wherein the training set is used to train the machine learning model so that the machine learning model learns the relationship between the characteristics of the weld image and the classification or detection target, and the test set is used to evaluate the performance of the machine learning model after the machine learning model training is completed; Select the objective function step, which is to use the cross entropy cost function as the objective function, and obtain the parameters of the training logistic regression model by solving the optimal value of the objective function; Selecting an optimizer step, which is to select an optimizer to update the weight of the machine learning model according to the loss function to gradually reduce the value of the loss function; The training process step includes inputting the training set data into the machine learning model batch by batch, calculating the loss function value between the output prediction value of the machine learning model and the true label, updating the weight of the machine learning model using the selected optimizer, and adjusting the parameters of the machine learning model so that the loss function value of the machine learning model on the training set gradually decreases until the machine learning model converges; The model evaluation step is to input the test set data into the trained machine learning model to obtain the classification or detection prediction results of the machine learning model for the weld images in the test set; analyze and evaluate the classification or detection prediction results of the weld images in the test set based on the machine learning model, and analyze the advantages and disadvantages of the machine learning model.
9. A weld seam detection and adaptive welding gun energy adjustment method according to claim 8, characterized in that: In the step of selecting the objective function, the cross entropy cost function is Among them, y i is the true label, is the model prediction probability, L is the loss value, L represents the degree of difference between the model prediction result and the true label, i is the category index, and N is the number of different categories in the sample.
10. A weld seam detection and adaptive welding gun energy adjustment method according to claim 8, characterized in that: The training of the machine learning model based on the clear weld image further includes: The trained and qualified machine learning model is deployed, and during the welding process, the newly collected weld images are classified and detected in real time using the deployed machine learning model.
Citation Information
Patent Citations
Gait abnormality classification method based on deep convolution neural network
CN109770912A
Welding simulator virtual weld defect detection method based on deep learning
CN110675370A
Weld joint forming prediction method based on complementary two-channel convolutional neural network
CN113838050A
Building steel structure welding seam detection system and detection method thereof
CN118209554A
Robot welding seam identifying and tracking method based on deep learning
CN118514068A
Cited By
Laser welding quality monitoring method and system
CN120102574A
Soldering tin verification system and method, electronic equipment and storage medium
CN121649639A
Solder verification system, method, electronic device, and storage medium
CN121649639B