A weld seam detection and adaptive welding gun energy adjustment system and method
By identifying weld defects through image acquisition and machine learning models, and adjusting the welding torch energy output in real time, the problems of low efficiency and unsuitable energy regulation in traditional weld inspection are solved, achieving efficient and accurate welding quality control.
Patent Information
- Application Number
- CN202411789924.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-12-06
AI Technical Summary
Traditional weld inspection methods rely on manual visual inspection, which is inefficient and inaccurate. Furthermore, the welding torch energy adjustment cannot adapt to complex environments in real time, resulting in unstable welding quality.
It employs an image acquisition module, an image data processing module, a machine learning model, and an energy detection module to analyze weld feature data in real time. The machine learning model identifies weld defects and adjusts the welding torch energy output, and the display interface enables real-time monitoring and alarms.
It improves the accuracy and efficiency of weld inspection, achieves stability and safety in welding quality, and ensures real-time monitoring and optimal energy output in the welding process.
Smart Images

Figure CN119794647B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of welding control, in particular to a welding seam detection and adaptive welding gun energy adjustment system and method. BACKGROUND
[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 reliability of the product. Traditional welding seam detection methods mainly rely on manual visual inspection, simple instrument detection or experience-based judgment, which has low detection efficiency, low accuracy, and is difficult to monitor in real time, and is also easily affected 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 and cannot be adjusted in real time according to the welding seam state, making it difficult to adapt to complex welding environments. Therefore, there is an urgent need for a new technology to achieve efficient and accurate detection of welding seams and adaptive adjustment of welding gun energy. SUMMARY
[0003] The present application aims to provide a welding seam detection and adaptive welding gun energy adjustment system and method, which can analyze welding seam feature data in real time, automatically identify welding seam defects to improve the accuracy and efficiency of welding seam detection, and dynamically adjust the energy parameters of the welding gun according to the detection results, thereby improving the welding quality and efficiency.
[0004] To achieve the above-mentioned purpose, the present application proposes a welding seam detection and adaptive welding gun energy adjustment system, comprising:
[0005] An image acquisition module for real-time image acquisition of the welding seam during the welding process, and classification and labeling of the collected welding seam images;
[0006] An image data processing module for preprocessing the welding seam images to obtain clear welding seam images, the preprocessing including at least one of denoising, enhancement, and binarization processing;
[0007] A machine learning model for training based on the clear welding seam images, analyzing welding seam feature data in the welding seam images, extracting and identifying welding seam features, and obtaining predicted welding seam data;
[0008] An energy detection module for real-time detection of the energy output parameters of the welding gun, including current, voltage, and power;
[0009] A welding gun control module for adjusting the energy output parameters of the welding gun according to the predicted welding seam data;
[0010] A display interface for real-time display of welding seam detection results, welding gun energy output parameters, and system operation state data.
[0011] Further, the image acquisition module comprises a high-definition camera or a laser radar.
[0012] Further, the machine learning model adopts a convolutional neural network (CNN) for classification and detection of the weld image, the machine learning model adopts a deep learning algorithm, is trained based on the clear weld image, and identifies the type, size and shape of the weld by feature extraction and classification of the clear weld image, identifies defects in the weld, and predicts the weld quality.
[0013] Further, the machine learning model comprises an input layer, a plurality of convolutional layers, an activation layer, a plurality of pooling layers and a fully connected layer.
[0014] The input layer is used to receive the pre-processed clear weld image.
[0015] The convolutional layer is used to perform convolution operation by sliding the convolution kernel on the clear weld image to extract features in the clear weld image, the convolutional layer contains multi-level convolution kernels, and weight sharing is realized in the convolution process; the cross-correlation function is replaced by convolution operation, wherein is the j'th weight value of the i'th convolution kernel in the l'th layer, is the j'th convolved local region in the l'th layer, w is the width of the convolution kernel, and y l(i,j) is the output value at position (i, j) in the l'th layer.
[0016] The activation layer is used to take 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 dimension reduction sampling operation on the input data to realize dimension reduction of the convolutional neural network parameters when extracting features; the pooling layer is set to use maximum value pooling as the pooling function to obtain position-independent features, and the pooling function
[0018] is wherein a l(i,t) is the activation value of the t'th neural unit of the i'th mapping in the l'th layer. i and j represent the positions of the pooling window in the length and width directions 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 operation on the extracted feature vector, and the output of the end pooling layer is spread into a one-dimensional feature vector as the input of the fully connected layer.
[0020] Further, the welding gun control module is also used for real-time monitoring during the welding process of the weld, and an alarm signal is issued when abnormal welding quality or safety hazards are found.
[0021] This application also provides a method for weld inspection and adaptive welding torch energy adjustment, the method comprising:
[0022] Real-time image acquisition of welds during the welding process, and classification and labeling of the collected weld images;
[0023] The acquired weld seam images are preprocessed to obtain clear weld seam images. The preprocessing includes at least one of denoising, enhancement, and binarization.
[0024] A machine learning model is constructed, and the machine learning model is trained based on the clear weld image. The trained machine learning model analyzes the weld feature data in the weld image, extracts and identifies the weld features, and obtains the predicted weld data.
[0025] The energy output parameters of the welding torch are monitored in real time, including current, voltage, and power.
[0026] Adjust the energy output parameters of the welding torch based on the predicted weld data.
[0027] Furthermore, the construction of the machine learning model includes:
[0028] The machine learning model is configured to include an input layer, multiple convolutional layers, activation layers, multiple pooling layers, and a fully connected layer.
[0029] The input layer is used to receive pre-processed, clear weld images;
[0030] The convolutional layer is used to perform convolution operations by sliding convolution kernels on the clear weld seam image to extract features from the clear weld seam image. The convolutional layer contains multiple levels of convolution kernels, and weight sharing is achieved during the convolution process. A cross-correlation function is set in the convolutional layer. Replace convolution operation, where Let j' be the weight of the i-th convolutional kernel in the l-th layer. Let w be the width of the convolution kernel, and y be the local region of the j-th convolution in the l-th layer. l(i,j) Let represent the output value at position (i,j) in the l-th layer;
[0031] The activation layer is used to use ReLU as the activation function for intermediate hidden units to enhance the nonlinearity of the convolutional neural network;
[0032] The pooling layer is used to perform dimensionality reduction sampling on the input data, thereby reducing the dimensionality of the convolutional neural network parameters during feature extraction. The pooling layer employs max pooling as the pooling function to obtain position-independent features. Among them, a l(i,t)is the activation value of the t-th neuron of the i-th mapping in the l-th layer. i and j represent the position of the pooling window in the length and width directions, respectively, w is the width of the pooling window, and p l(i,j) is the maximum value of the pooling layer;
[0033] The full connection layer is used for a classification operation on the extracted feature vector, and the output of the end pooling layer is spread into a one-dimensional feature vector as the input of the full connection layer.
[0034] Further, the training of the machine learning model based on the clear weld image comprises:
[0035] A data set division step, which divides the clear weld image into a training set and a test set according to a preset proportion, wherein the training set is used to train the machine learning model to enable the machine learning model to learn the relationship between the features 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 training of the machine learning model is completed;
[0036] A target function selection step, which adopts a cross-entropy cost function as a target function, and obtains the parameters of the trained logistic regression model by solving the optimal value of the target function;
[0037] An optimizer selection step, which selects an optimizer to update the weights of the machine learning model according to a loss function to gradually reduce the value of the loss function;
[0038] A training process step, which inputs the training set data into the machine learning model in batches, calculates the loss function value between the output predicted value of the machine learning model and the true label, updates the weights of the machine learning model using the selected optimizer, adjusts 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] A model evaluation step, which inputs the test set data into the trained machine learning model to obtain the classification or detection prediction result of the machine learning model on the weld images in the test set; analyzes and evaluates the classification or detection prediction result of the machine learning model on the weld images in the test set, analyzes the advantages and disadvantages of the machine learning model.
[0040] Further, in the target function selection step, the cross-entropy cost function is
[0041]
[0042] where y i is the true label, For model prediction probability, L is a loss value, L 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 existing in the sample.
[0043] Further, the training of the machine learning model based on the clear weld image further comprises:
[0044] The trained and evaluated machine learning model is deployed, and in the welding process of the weld, the deployed machine learning model is used to classify and detect the newly collected weld image in real time.
[0045] The welding seam detection and adaptive welding gun energy regulation system and method of the present application has the following beneficial effects:
[0046] 1. The present application adopts machine learning algorithm to detect the welding seam, which has the advantages of high detection accuracy, high efficiency, and can adapt to different welding conditions and materials.
[0047] 2. By real-time detection of the energy output of the welding gun, and using adaptive control algorithm to adjust the energy output of the welding gun, the best welding effect can be achieved, and the welding quality is improved.
[0048] 3. The display interface is used to display the welding seam detection result, the energy output parameter of the welding gun and the system running state data in real time, and has real-time monitoring and alarm function combined with the welding gun control module, which can ensure the safety and stability of the welding process.
[0049] The specific embodiments of the present application are disclosed in detail in the following description and drawings, which indicate the principles of the present application can be adopted. It should be understood that the embodiments of the present application are not limited in scope by the embodiments described, but include many changes, modifications and equivalents. BRIEF DESCRIPTION OF DRAWINGS
[0050] Figure 1 The structure schematic diagram of the welding seam detection and adaptive welding gun energy regulation system in the embodiment of the present application.
[0051] Figure 2 The training and prediction flowchart (CNN) of the machine learning model in the embodiment of the present application.
[0052] Figure 3 The training and prediction flowchart (PointNet++) of the machine learning model in the embodiment of the present application.
[0053] Figure 4 The control flowchart of the welding gun energy regulation module in the embodiment of the present application.
[0054] Figure 5A flow chart of the weld seam detection and adaptive welding gun energy adjustment method in the embodiments of the present application. DETAILED DESCRIPTION
[0055] In order to make the objects, technical solutions and advantages of the present application clearer and more comprehensible, the present application will be further described in detail below with reference to the drawings and embodiments. However, it should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the scope of the present application.
[0056] It should be noted that when an element is referred to as being "provided on" or "provided with" another element, it can be directly on the other element or there can be a middle element, and when an element is referred to as being "connected to" or "connected with" another element, it can be directly connected to the other element or there can be a middle element, and "fixedly connected" means fixed connection, and there are many ways of fixed connection, which are not the protection scope of the present application, and the terms "vertical", "horizontal", "left", "right" and similar expressions used herein are only for the purpose of illustration and do not represent the only implementation.
[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs, and the terms used herein in the specification are only for the purpose of describing specific embodiments and are not intended to limit the present application, and the term "and / or" used herein includes any and all combinations of one or more related listed items;
[0058] Embodiment 1
[0059] Please refer to the drawings in the description Figures 1-4 , the present application provides a kind of weld seam detection and adaptive welding gun energy adjustment system and method embodiment, the following specific embodiments of the present application are described in detail with a kind of weld seam detection and adaptive welding gun energy adjustment system and method.
[0060] As Figure 1 Shown, the weld seam detection and adaptive welding gun energy adjustment system in the embodiment includes image acquisition module, image data processing module, machine learning model, energy detection module, welding gun control module and display interface, wherein:
[0061] Image acquisition module, in the embodiment, image acquisition module includes high-definition camera, laser radar or other image acquisition equipment, to carry out real-time image acquisition to weld seam in welding process, wherein high-definition camera mainly acquires two-dimensional image, and laser radar can acquire three-dimensional point cloud data, and three-dimensional model of weld seam can be obtained by reconstruction.
[0062] An image data processing module is used in the embodiment to pre-process the collected weld images, including denoising, enhancement, binarization and other operations, to improve the quality and clarity of the images. Preferably, the collected images 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, and I filtered (x, y) is the pixel value of the image after filtering at coordinates (x, y).
[0065] The machine learning model uses a deep learning algorithm and is trained based on weld data. Through feature extraction and classification of weld images, it can identify the type, size, shape and other information of the weld, recognize defects such as pores, cracks and incomplete penetration in the weld, and predict the quality of the weld.
[0066] Preferably, as shown in Figure 2 In Example One, the machine learning model uses a convolutional neural network (CNN) for weld image classification and detection. The model includes multiple convolutional layers and pooling layers to extract multi-scale features of the weld image. 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 fusion features of the training data through convolutional and pooling layers, combine the features extracted from different channels into a one-dimensional vector through the fully connected layer, input them into the Softmax classifier for recognition, and finally optimize the network structure parameters using the BP backpropagation algorithm. The specific steps include:
[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 actual welding production processes, industrial detection equipment, etc.
[0070] S12 Data labeling: manually label the collected weld images.
[0071] S13 Data preprocessing: normalize the pixel values of the images to a specific interval to speed up model training and improve stability. To increase the size and diversity of the dataset and prevent model overfitting, data augmentation techniques can be applied.
[0072] S2. Constructing a CNN model.
[0073] S21 input layer: the function is to receive the pre-processed weld image data in the form of a tensor.
[0074] S22 convolution layer: the convolution operation is performed by sliding the convolution kernel on the image, and the local features in the image are automatically extracted. The convolution layer contains multiple convolution kernels, and weight sharing is realized in the convolution process, which can avoid overfitting caused by too many parameters and reduce the configuration required for model training. In this embodiment, the cross-correlation function is replaced by the convolution operation to avoid the reduction of index quantity caused by the flipping of the convolution kernel in back propagation:
[0075]
[0076] wherein, is the j'th weight value of the i'th convolution kernel in the l'th layer, is the j'th local region to be convolved in the l'th layer, w is the width of the convolution kernel, and y l(i,j) is the output value at position (i, j) in the l'th layer.
[0077] S23 activation layer: the role of introducing an activation function is to enhance the nonlinearity of the deep neural network model, similar to the effect of the hidden layer, thereby improving the robustness. When Sigmoid is used as the activation function, due to the large amount of work required for exponential operation, gradient disappearance and other problems are prone to occur during back propagation, which cannot adapt to the training of deep network. Preferably, RELU is used as the activation function of the intermediate hidden unit:
[0078] f(x) = max(0, x)
[0079] The convergence speed of the RELU function is faster than that of the Sigmoid and tanh functions, and the calculation cost is smaller, which can effectively alleviate the problem of gradient disappearance, has good one-sided inhibition and relatively wide excitation boundary, and the output of part of the neurons is 0, which can reduce the network sparsity, reduce the relative dependence of each parameter, and alleviate the overfitting phenomenon.
[0080] S24 pooling layer operation: the function is to perform down-sampling operation on the input data, and to realize network parameter dimension reduction while extracting features. Preferably, in this embodiment, the maximum value pooling is used as the pooling function to obtain the position-independent features:
[0081]
[0082] wherein, a l(i,t) is the activation value of the t'th neural unit of the i'th mapping in the l'th layer. i and j represent the positions of the pooling window in the length and width directions, respectively, w is the width of the pooling window, and p l(i,j) is the maximum value of the pooling layer.
[0083] S25 full connection layer: the classification operation is performed on the feature vector extracted by the filtering system, the output of the end pooling layer is spread into a one-dimensional feature vector as the input of the full connection layer, the RELU is used as the activation function of the hidden layer, and the output layer with the Softmax function as the activation function is fully connected.
[0084] S3. Model training.
[0085] S31: Divide the data set: divide the preprocessed weld image data set into a training set and a test set according to a certain proportion, wherein the training set is used to train the model to learn the relationship between the features of the weld image and the classification or detection target, and the test set is used to evaluate the performance of the model after the model training is completed.
[0086] S32: Select the objective function: the parameters of the trained logistic regression model are obtained 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 log-likelihood cost function and Softmax is very similar to the combination of cross-entropy and Sigmoid function, the cross-entropy cost function is preferably used in binary classification:
[0087]
[0088] wherein y i is the true label, is the model prediction probability. L is the loss value, representing the difference between the model prediction result and the true label, i is the class index, and N is the number of different classes in the sample.
[0089] S33: Select the optimizer: the role of the optimizer is to update the weights of the model according to the loss function, so as to gradually reduce the value of the loss function and make the prediction of the model more accurate. The stochastic gradient descent (SGD) and its variants can be selected.
[0090] S34: Training process: the training set data is input into the constructed CNN model in batches, and the loss function value between the output prediction value of the model and the true label is calculated; according to the loss function value, the selected optimizer is used to update the weights of the model, adjust the parameters of the model, so that the loss function value of the model on the training set gradually decreases; repeat the above process, after several training rounds, until the performance of the model on the training set reaches a relatively stable state or meets the pre-set stopping condition. Preferably, the stopping condition is that the loss function value is less than the set threshold.
[0091] S4. Model evaluation.
[0092] S41 Evaluation on the test set: input the test set data into the trained CNN model to obtain the classification or detection prediction results of the model on the test set images. For the weld detection task, the average precision (mAP) and other indicators can be calculated to evaluate the detection performance of the model.
[0093] S42 Analysis of evaluation results: according to the results of the evaluation indicators, analyze the advantages and disadvantages of the model. If the model performance is not ideal, consider adjusting the model architecture (such as increasing or decreasing the number of convolutional layers, fully connected layers, etc.), reselecting the loss function or optimizer, etc. to improve the model.
[0094] S5. Model deployment and application.
[0095] S51 Model deployment: deploy the trained and evaluated qualified CNN model to the actual weld detection system.
[0096] S52 Actual application: in the actual welding production process, use the deployed CNN model to classify and detect new collected weld images in real time. When detecting defects in the weld, an alarm can be sent out or appropriate measures can be taken (such as notifying the operator to repair, recording defect information, etc.) to ensure the welding quality.
[0097] It should be noted that, as Figure 3 indicated, the scheme of Embodiment Two can also be used. PointNet++ (density adaptive PointNet layer) can utilize neighborhoods at multiple scales to achieve robustness and detail capture. During training, with the help of random input loss, learning to adaptively weight the patterns detected at different scales, and combining multi-scale features according to the input data. The energy detection module can detect the energy output of the welding torch in real time, including current, voltage, power and other parameters, as control variables;
[0098] The welding torch control module adjusts the energy parameter output of the welding torch through the controller according to the output results of the image processing module and the energy detection module, using an adaptive control algorithm to achieve the best welding effect.
[0099] Preferably, in this embodiment, the welding torch control module adopts a fuzzy adaptive proportional-integral-derivative (PID) control method, which combines the advantages of fuzzy control and traditional PID control, and adjusts the gain online through fuzzy logic to achieve better control effect. The fuzzy processing is mainly aimed at the key data in the welding process. First, the welding deviation data, including the horizontal and vertical deviations of the weld position; second, the welding speed deviation; and finally, the welding torch energy adjustment, which adaptively adjusts the energy output according to different weld types and identification reference, in order to achieve better welding effect.
[0100] The welding torch control scheme includes an automatic tracking seam mode and a manual fine adjustment mode. Fuzzy processing can be controlled differently according to the data characteristics in different modes. In the automatic tracking seam mode, fuzzy PID control continuously adjusts the welding torch position according to the welding seam position deviation and the deviation change rate, and the welding seam type adjusts the welding torch actual output. The traditional PID controller equation is as follows:
[0101]
[0102] Where e(t) is the error signal, K p , K i , and K d are the proportional, integral, and derivative coefficients, respectively.
[0103] The proportional gain K p determines the response strength of the controller to the current error (the difference between the actual value and the set value). By adjusting K p , the response speed and stability of the system can be controlled. If the system reacts too slowly, K p can be increased, and if the system oscillates severely, K p can be reduced.
[0104] The integral gain K i is used to eliminate the steady-state error of the system. The integral part compensates the system by accumulating past errors, making the final error tend to zero. By adjusting K i , the steady-state error of the system can be reduced. If there is still error in the steady state of the system, K i can be increased, but if the system has long-term overshoot or fluctuation, K i can be reduced.
[0105] The derivative gain K d responds to the error change rate of the system. The derivative part predicts the trend of the error and makes pre-adjustment, thereby reducing the overshoot or oscillation of the system. By adjusting K d , the overshoot and oscillation of the system can be reduced. If the response process of the system is not smooth enough, K d can be increased, and if the system is too sensitive to disturbances, K d can be reduced.
[0106] As shown in FIG. Figure 4 , in fuzzy adaptive PID control, the PID parameters (K p , K i , K d) is no longer fixed, but dynamically adjusted through fuzzy logic. Fuzzy control is a control method based on fuzzy logic, which does not rely on accurate mathematical models but is based on experience or expert knowledge to design the controller. Fuzzy control system mainly includes three processes of fuzzification, fuzzy reasoning and defuzzification. Fuzzification is to convert precise input quantities (such as error e and error rate Δe) into fuzzy quantities, which is realized by defining fuzzy sets and membership functions; fuzzy reasoning is the process of reasoning according to fuzzy rules, where fuzzy rules are established based on expert experience or experimental data, and fuzzy reasoning engine is used to process fuzzy input and generate fuzzy output; defuzzification is to convert fuzzy output into precise output, which uses the maximum membership degree method to convert fuzzy output into precise ΔK p ,ΔK i ,ΔK d value, and then applies these adjustment values to the PID controller to update the controller parameters, finally controls the movement direction and speed of the welding gun and the output intensity, realizes the accurate control of the welding gun, and makes the welding gun accurately along the weld for welding operation.
[0107] The specific steps are as follows:
[0108] Step 1: Fuzzification: input error e(t) and error rate Δe(t) into the fuzzy controller to convert them into fuzzy quantities;
[0109] Step 2: Fuzzy reasoning: according to the fuzzy rule base, output fuzzy control quantities K p , K i and K d , which determine the adjustment range of PID parameters;
[0110] Step 3: Defuzzification: convert fuzzy control quantities into actual PID parameter adjustment quantities to update controller parameters and finally control the movement direction and speed of the welding gun and the output intensity.
[0111] The way to update the controller parameters is: 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, and when it finds abnormal welding quality or safety hazards, it will send an alarm signal in time to remind the operator to handle it.
[0113] The display interface in the embodiment includes a display screen with a good interactive interface and a data connection line, which are used for displaying the welding seam detection result, the welding gun energy adjustment state and the system running state in real time, so as to facilitate the operator to monitor and adjust.
[0114] Embodiment 2
[0115] Embodiment 2 comprises all the technical features of Embodiment 1, and has the same effects, and the content of Embodiment 1 can be specifically referred to.
[0116] Specifically, please refer to Figure 1 The application provides a welding seam detection and adaptive welding gun energy adjustment system, which comprises:
[0117] An image acquisition module is configured to acquire real-time images of the welding seam during the welding process and classify and label the collected welding seam images.
[0118] An image data processing module is configured to preprocess the welding seam images to obtain clear welding seam images, and the preprocessing comprises at least one of denoising, enhancement and binarization processing.
[0119] A machine learning model is configured to train based on the clear welding seam images, analyze welding seam feature data in the welding seam images, extract and identify welding seam features, and obtain predicted welding seam data.
[0120] An energy detection module is configured to detect energy output parameters of the welding gun in real time, and the energy output parameters comprise current, voltage and power.
[0121] A welding gun control module is configured to adjust the energy output parameters of the welding gun according to the predicted welding seam data.
[0122] A display interface is configured to display the welding seam detection result, the energy output parameters of the welding gun and system running state data in real time.
[0123] Further, the image acquisition module comprises a high-definition camera or a laser radar.
[0124] Further, the machine learning model adopts a convolutional neural network (CNN) for welding seam image classification and detection, and adopts a deep learning algorithm to train based on the clear welding seam images, to identify the type, size and shape of the welding seam, identify defects in the welding seam, and predict the welding seam quality by extracting and classifying features of the clear welding seam images.
[0125] Further, the machine learning model comprises an input layer, a plurality of convolutional layers, an activation layer, a plurality of pooling layers and a full connection layer.
[0126] The input layer is configured to receive the clear welding seam images after preprocessing.
[0127] The convolution layer is used for convolution operation by sliding the convolution kernel on the clear weld image to extract features in the clear weld image, and the convolution layer includes multi-level convolution kernels to realize weight sharing in the convolution process; the convolution layer is configured to use a cross-correlation function Replace the convolution operation, wherein is the j'th weight value of the i'th convolution kernel in the l'th layer, is the j'th local region to be convolved in the l'th layer, w is the width of the convolution kernel, and y l(i,j) is the output value at position (i, j) in the l'th 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 for dimensionality reduction sampling operation on the input data to realize parameter dimensionality reduction of the convolutional neural network when extracting features; the pooling layer is configured to use maximum value pooling as the pooling function to obtain position-independent features, and the pooling function is wherein a l(i,t) is the activation value of the t'th neural unit of the i'th map in the l'th layer. i and j represent the positions of the pooling window in the length and width directions, 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 for classification operation on the extracted feature vector, and the output of the end pooling layer is spread into a one-dimensional feature vector as the input of the fully connected layer.
[0131] Further, the welding gun control module is also used for real-time monitoring during the welding process, and an alarm signal is issued when welding quality abnormalities or safety hazards are found.
[0132] As Figure 5 shown, based on the above-described weld detection and adaptive welding gun energy adjustment system, the application also provides a weld detection and adaptive welding gun energy adjustment method, which comprises:
[0133] S10, real-time image acquisition of the weld during the welding process, and classification and labeling of the collected weld images;
[0134] S20, pre-processing of the collected weld images to obtain clear weld images, the pre-processing including at least one of denoising, enhancement, and binarization processing;
[0135] S30, constructing a machine learning model, training the machine learning model based on the clear weld image, the trained machine learning model analyzing the weld feature data in the weld image, extracting and identifying the weld feature, and obtaining the predicted weld data;
[0136] S40, detecting the energy output parameter of the welding gun in real time, the energy output parameter including current, voltage and power;
[0137] S50, adjusting the energy output parameter of the welding gun according to the predicted weld data.
[0138] Further, the construction of the machine learning model comprises:
[0139] The machine learning model comprises an input layer, a plurality of convolution layers, an activation layer, a plurality of pooling layers and a full connection layer;
[0140] The input layer is used to receive the preprocessed clear weld image;
[0141] The convolution layer is used to perform convolution operation by sliding the convolution kernel on the clear weld image, extract the features in the clear weld image, the convolution layer contains multi-level convolution kernel, and weight sharing is realized in the convolution process; the cross-correlation function is set in the convolution layer Replace the convolution operation, wherein is the j'th weight value of the i'th convolution kernel in the l'th layer, is the j'th convolved local region in the l'th layer, w is the width of the convolution kernel, and y l(i,j) is the output value at position (i, j) in the l'th layer;
[0142] The activation layer is used to take 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 dimension reduction sampling operation on the input data, and realizes dimension reduction of the convolutional neural network parameters when extracting features; the maximum value pooling is set as the pooling function in the pooling layer to obtain the position-independent features, and the pooling function is wherein a l(i,t) is the activation value of the t'th neural unit of the i'th mapping in the l'th layer. i and j represent the position of the pooling window in the length and width directions respectively, w is the width of the pooling window, and p l(i,j) is the maximum value of the pooling layer;
[0144] The full connection layer is used to perform classification operation on the extracted feature vector, and the output of the end pooling layer is spread into a one-dimensional feature vector as the input of the full connection layer.
[0145] Further, the training of the machine learning model based on the clear weld image comprises:
[0146] a data set division step of dividing the clear weld image into a training set and a test set according to a preset proportion, wherein the training set is used to train the machine learning model to learn the relationship between the features 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 training of the machine learning model is completed;
[0147] a target function selection step of selecting a cross-entropy cost function as a target function, and obtaining the parameters of the trained logistic regression model by solving the optimal value of the target function;
[0148] an optimizer selection step of selecting an optimizer to update the weights of the machine learning model according to the loss function to gradually reduce the value of the loss function;
[0149] a training process step of inputting the training set data into the machine learning model batch by batch, calculating the loss function value between the output predicted value of the machine learning model and the true label, updating the weights of the machine learning model by using the selected optimizer, 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] a model evaluation step of inputting the test set data into the trained machine learning model to obtain the classification or detection prediction result of the machine learning model on the weld image in the test set; analyzing and evaluating the classification or detection prediction result of the machine learning model on the weld image in the test set, analyzing the advantages and disadvantages of the machine learning model.
[0151] Further, in the target function selection step, the cross-entropy cost function is
[0152]
[0153] where y i is the true label, is the model prediction probability, L is the loss value, L represents the difference between the model prediction result and the true label, i is the class index, and N is the number of different classes in the sample.
[0154] Further, the training of the machine learning model based on the clear weld image comprises:
[0155] The trained and qualified machine learning model is deployed, and the deployed machine learning model is used for real-time classification and detection of newly collected weld seam images in the weld seam welding process.
[0156] The weld seam detection and adaptive welding gun energy adjustment system and method has the following beneficial effects:
[0157] 1. The present application adopts machine learning algorithm to detect the weld seam, which has the advantages of high detection accuracy, fast 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 seam detection results, the energy output parameters of the welding gun and the system running state data in real time, and has real-time monitoring and alarm functions combined with the welding gun control module, which can ensure the safety and stability of the welding process.
[0160] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modification, equivalent replacement or improvement made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method of weld detection and adaptive weld torch energy adjustment, comprising: The method comprises: Real-time image acquisition of the weld seam during the welding process of the weld seam, and classification and labeling of the collected weld seam images; Pretreatment of the collected weld seam images to obtain clear weld seam images, the pretreatment comprising at least one of denoising, enhancement, and binarization processing; Constructing a machine learning model, training the machine learning model based on the clear weld seam images, the trained machine learning model analyzing weld seam feature data in the weld seam image, extracting and identifying weld seam features, and obtaining predicted weld seam data; Real-time detection of energy output parameters of the welding torch, the energy output parameters including current, voltage, and power; Adjusting the energy output parameters of the welding torch according to the predicted weld seam data; The construction of the machine learning model comprises: Setting the machine learning model to include an input layer, multiple convolution layers, an activation layer, multiple pooling layers, and a fully connected layer; The input layer is used to receive the preprocessed clear weld seam images; The convolution layer is used for convolution operation by sliding a convolution kernel on the clear weld image to extract features in the clear weld image, and the convolution layer comprises multi-level convolution kernels to realize weight sharing in the convolution process; the cross-correlation function replaces the convolution operation, wherein is the j'th weight value of the i'th convolution kernel in the l'th layer, is the j'th local region to be convolved in the l'th layer, w is the width of the convolution kernel, and y l(i ,j) is an output value at position (i, j) in the l'th layer. The activation layer is used to use RELU as an activation function of an intermediate implicit unit to enhance the nonlinearity of the convolutional neural network; The pooling layer is used for dimension reduction sampling operation on input data, and realizes dimension reduction of convolutional neural network parameters when extracting features; the pooling layer is set to use maximum value pooling as a pooling function to obtain position-independent features, and the pooling function is Wherein, a l(i,t) is the activation value of the tth neural unit of the ith mapping in the lth layer; i and j represent the positions of the pooling window in the length and width directions respectively, w is the width of the pooling window, 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 the output of the terminal pooling layer is spread into a one-dimensional feature vector as the input of the fully connected layer; The training of the machine learning model based on the clear weld seam images comprises: A data set division step, which divides the clear weld seam images 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 to enable the machine learning model to learn the relationship between the features of the weld seam image and the classification or detection target, and the test set is used to evaluate the performance of the machine learning model after the training of the machine learning model is completed; The selecting target function step is to use a cross-entropy cost function as a target function, and to obtain parameters of a trained logistic regression model by solving an optimal value of the target function; the cross-entropy cost function is where y i is a real label, is a model prediction probability, L is a loss value, L represents a difference degree between a model prediction result and the real label, i is a category index, and N is a number of different categories existing in samples. An optimizer selection step, which selects an optimizer to update the weights of the machine learning model according to a loss function to gradually reduce the value of the loss function; A training process step, which inputs the training set data into the machine learning model batch by batch, calculates the loss function value between the output predicted value of the machine learning model and the true label, updates the weights of the machine learning model using the selected optimizer, adjusts the parameters of the machine learning model, and gradually reduces the loss function value of the machine learning model on the training set until the machine learning model converges; A model evaluation step, which inputs the test set data into the trained machine learning model to obtain the classification or detection prediction result of the machine learning model on the weld seam images in the test set, analyzes and evaluates the classification or detection prediction result of the machine learning model on the weld seam images in the test set, and analyzes the advantages and disadvantages of the machine learning model.
2. The method of weld detection and adaptive weld torch energy adjustment of claim 1, wherein: The training of the machine learning model based on the clear weld seam images further comprises: Deploying the trained and evaluated machine learning model, and using the deployed machine learning model to perform real-time classification and detection on newly collected weld seam images during the welding process of the weld seam.
3. A weld detection and adaptive weld torch energy adjustment system, characterized by, A system for implementing the weld seam detection and adaptive welding torch energy adjustment method of claim 1 or 2, the system comprising: The image acquisition module is configured to acquire real-time images of the weld in the welding process, and to classify and label the collected weld images. The image data processing module is configured to preprocess the weld images to obtain clear weld images, and the preprocessing includes at least one of denoising, enhancement, and binarization processing. The machine learning model is configured to train based on the clear weld images, analyze weld feature data in the weld images, extract and identify weld features, and obtain predicted weld data. The energy detection module is configured to detect energy output parameters of the welding torch in real time, and the energy output parameters include current, voltage, and power. The welding torch control module is configured to adjust the energy output parameters of the welding torch based on the predicted weld data. The display interface is configured to display the weld detection results, the energy output parameters of the welding torch, and system operation state data in real time.
4. A weld seam detection and adaptive weld torch energy adjustment system according to claim 3, wherein: The image acquisition module includes a high-definition camera or a laser radar.
5. A weld seam detection and adaptive weld torch energy adjustment system according to claim 3, wherein: The machine learning model uses a convolutional neural network (CNN) for weld image classification and detection, and uses a deep learning algorithm to train based on the clear weld images, extract features from the clear weld images, and classify and identify the type, size, and shape of the weld, identify defects in the weld, and predict weld quality.
6. A weld seam detection and adaptive weld torch energy adjustment system according to claim 5, wherein: 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 configured to receive the preprocessed clear weld images. The convolution layer is used for convolution operation by sliding a convolution kernel on the clear weld image to extract features in the clear weld image, and the convolution layer comprises multi-level convolution kernels to realize weight sharing in the convolution process; the cross-correlation function replaces the convolution operation, wherein is the j'th weight value of the i'th convolution kernel in the l'th layer, is the j'th local region to be convolved in the l'th layer, w is the width of the convolution kernel, and y l(i ,j) is an output value at position (i, j) in the l'th layer; The activation layer is configured to use RELU as an activation function of an intermediate hidden unit to enhance the nonlinearity of the convolutional neural network. The pooling layer is used for dimension reduction sampling operation on input data, and realizes dimension reduction of convolutional neural network parameters when extracting features; the pooling layer is set to use maximum value pooling as a pooling function to obtain position-independent features, and the pooling function is Wherein, a l(i,t) is the activation value of the tth neural unit of the ith mapping in the lth layer; i and j represent the positions of the pooling window in the length and width directions respectively, w is the width of the pooling window, p l(i,j) is the maximum value of the pooling layer. The fully connected layer is configured to perform classification operations on the extracted feature vectors, and to spread the output of the terminal pooling layer into a one-dimensional feature vector as the input of the fully connected layer.
7. A weld seam detection and adaptive weld torch energy adjustment system according to claim 3, wherein: The welding torch control module is also configured to monitor the welding process in real time, and to issue an alarm signal when welding quality abnormalities or safety hazards are found.
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