A method, system and computer-readable storage medium for predicting lap joint welding quality defects
By adding weld offset labels and feature extraction in welding quality inspection, combined with gradient boosting tree and decision tree models, the problem of misjudgment caused by weld center offset in welding quality inspection is solved, and the accuracy and accuracy of welding quality prediction are improved. Defect identification capabilities.
Patent Information
- Application Number
- CN202010923517.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-04
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2040-09-04
AI Technical Summary
Existing welding quality inspection methods are prone to misjudgment of welding defects when the center of the weld seam deviates, resulting in stable fluctuations in welding parameters but failure to detect welding defects in time.
By adding the prediction label of the weld offset wire center in the electrical parameter data, and using Hilbert transform, gradient boosting tree and decision tree models for feature extraction and model training, the beginning and end of the arc affected by arc starting and closing are deleted. Ending data, step-by-step prediction of weld center offset and welding quality defects.
It significantly improves the accuracy of welding quality prediction, reduces misjudgments of welding defects, and enhances the ability to identify welding quality defects.
Smart Images

Figure CN112270335B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial welding product quality detection, and in particular to a method, system and computer-readable storage medium for predicting lap joint welding quality defects. Background Art
[0002] With the rapid development of manufacturing technology, welding manufacturing automation and intelligence have become an inevitable trend. Because welding robots have the advantages of strong versatility and working reliability, they have become the main means of modernization of welding automation technology. If there are serious welding defects in the welding joint, it may cause partial structural fractures in harsh environments, and even cause major accidents. The main problem in the quality of welding products is the defects in the quality of the welds. Therefore, welding quality inspection is particularly important to detect welding defects as early as possible, make an objective evaluation of the quality of welding joints, and limit welding defects to a certain range to ensure equipment safety and the safety of life and property.
[0003] At present, weld quality defect detection is mainly based on the characteristic changes of electrical parameters such as welding current and voltage. When the electrical parameters are relatively stable, the welding quality is considered to be good. However, in actual processes, when the weld center deviates greatly from the wire center, the welding parameter fluctuations are also relatively stable, which will lead to misjudgment of welding defects. Summary of the invention
[0004] In response to the above technical problems, the present invention aims to provide a method for predicting the welding quality defects of lap joints, which deletes the untrusted data at the beginning and end of welding caused by arc starting and arc ending control, and adds a prediction label of the weld offset from the center of the welding wire on the basis of electrical parameters, thereby greatly improving the accuracy of welding quality prediction.
[0005] In order to solve the above technical problems, the present invention provides a method for predicting welding quality defects of lap joints, which method comprises the following steps:
[0006] 1) Training database collection module: The arc voltage and welding current data of the welding robot are collected through the industrial gateway, and the center of the weld is manually labeled when it is offset from the center of the welding wire. When it is biased to the upper plate, it is recorded as a=1, when it is biased to the lower plate, it is recorded as a=2, and when there is no deviation, it is recorded as a=0. At the same time, the welding quality is manually labeled. When there is a welding defect, it is recorded as y=1, otherwise it is recorded as y=0. All data and labels are used as training libraries;
[0007] 2) Data valid window selection and feature extraction module: extract the effective window of the collected arc voltage and welding current data, delete the beginning and ending data affected by arc starting and arc ending, use the Hilbert transform method to calculate the time variation, and perform mean, standard deviation, coefficient of variation, kurtosis, first-order difference mean, shape factor, crest factor, gap coefficient, pulse factor, front and rear window average value processing on the real and complex values of the electrical parameters in the effective window, and extract the features of the Pearson correlation coefficient of the front and rear windows;
[0008] 3) Weld offset model training module: The extracted features and weld center offset wire center labels are trained using a gradient boosting tree to perform a three-classification model;
[0009] 4) Welding quality defect training module: In addition to using the maximum and minimum standardization for the extracted 44 features, a prediction label is added to determine whether the weld center is offset from the wire center. The features are then filtered using L1 regularization and recursive feature elimination. Finally, features without multicollinearity are obtained. The decision tree model is used for training based on the welding quality labels.
[0010] 5) Welding quality prediction module: The arc voltage and welding current data of the welding robot are collected in real time through the industrial gateway, and window extraction and corresponding feature transformation and extraction are performed. The model is used to predict whether the weld center is offset from the wire center. The prediction result is used as a feature and substituted into the welding quality prediction model.
[0011] In view of the fact that selecting a suitable data valid window has a great influence on the accuracy of the detection algorithm found in actual applications, the step 2) data valid window extraction is optimized as follows, and the specific steps are:
[0012] 2.1) Sort the electrical parameter data of a weld seam from small to large in time series, and use the method of backfilling adjacent points for missing sampling points. The number of statistical points is N, and the initial effective window is [0, N-1];
[0013] 2.2) Front window selection: Starting from the start time of the effective window, calculate the effective window except the current sampling point and the mean of sampling points i+1, i+2, i+3 and standard deviation σ, we get the threshold If sampling point i is not within the threshold, but sampling points i+1, i+2, i+3 are all within the threshold, the effective window is updated to [i+1, N-1]; if sampling point i and sampling points i+1, i+2, i+3 are all within the threshold and the value of point i is equal to the mean If the range does not exceed 1 / 3 of the entire threshold range, the valid window is updated to [i, N-1]; otherwise, continue to select the valid window; let the valid front window number at this time be i * ;
[0014] 2.3) Rear window selection: From the valid window [i * ,N-1] end time, calculate the effective window in turn except the current sampling point and the average of the values of the next four sampling points j-1, j-2, j-3, j-4 and standard deviation σ′, we get the threshold If the value of sampling point j is not within the threshold, but the values of j-1, j-2, j-3, and j-4 are all within the threshold, then the effective window is updated to [i * ,j-1]; if sampling point j and sampling points j-1, j-2, j-3, j-4 are within the threshold and the value of sampling point j is equal to the mean If the range does not exceed 1 / 3 of the entire threshold range, the effective window is updated to [i * ,j]; otherwise continue to select; let the valid rear window number at this time be j * ;
[0015] 2.4) Re-update the front window sequence number: According to 2.2) and 2.3), the effective window is [i * ,j * ], calculate the mean of the effective window and standard deviation σ * , the effective threshold If the number of samples deleted in the current window is greater than the preset ratio of data points, the sampling points are calculated in sequence. Is the value of within the threshold If the value is within the threshold, continue; otherwise, find the first data point l that does not satisfy * , then stop, and the effective window is [l * +1,j * ]; When the number of samples deleted in the current window does not exceed the preset proportion of data points, the sampling points are calculated in sequence The values of l+1, l+2, and l+3 are taken into consideration. Find the first sampling point where the values of these four points are within the valid threshold, then stop. Set the valid front window number to l * , then the effective window is [l * ,j * ]; let the effective front window number at this time be t * ;
[0016] 2.5) Re-update the rear window sequence number: When the number of samples deleted from the rear window is greater than the preset proportion of data points, the sampling points are calculated in sequence Is the value of within the effective threshold? If so, continue; otherwise, find the first data point k that does not satisfy * , then stop, and the effective rear window number is k * -1, then the effective window is [t * ,k* -1]; when the number of samples deleted in the rear window does not exceed the preset proportion of data points, the sampling points are calculated in sequence The value of and the values of the next four points k-4, k-3, k-2, k-1, find the first five points whose values are within the valid threshold, then stop, and the valid front window number is k * , then the effective window is [t * ,k * ]; let the effective front window number at this time be T * ;
[0017] 2.6) Determine the effective window: Apply 2.1)-2.5) to the voltage and current data respectively, let the voltage effective window be [v, V], and the current effective window be [i, I], then the final effective window is [max(i, v), min(I, V)];
[0018] Compared with the prior art, the implementation effects of the present invention are as follows:
[0019] The present invention proposes a method for predicting lap joint welding quality defects, which effectively deletes untrusted data caused by arc starting and arc ending control at the beginning and end of welding. The prediction of lap joint welding quality defects is divided into two steps. First, it is predicted whether the weld center offsets the welding wire center, and then the label of whether the predicted weld center offsets the welding wire center is used as the main feature for predicting welding quality defects. The welding defect features caused by the offset are added to effectively enhance the recognition ability of welding quality defects. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is a flow chart of the effective window extraction method of electrical parameter time series data of the present invention;
[0021] Figure 2 A comparison diagram of voltage data in an effective window determined by using the prior art and the method of the present invention;
[0022] Figure 3 A comparison diagram of current data in an effective window determined by using the prior art and the method of the present invention. DETAILED DESCRIPTION
[0023] The present invention is further explained below in conjunction with the accompanying drawings and specific examples:
[0024] In addition to the electrical parameters collected by the arc industrial gateway, this method also adds a prediction label of the weld center offset from the wire center as the main feature of the welding quality defect, thereby improving the accuracy of manual weld quality detection.
[0025] The present invention discloses a method for predicting welding quality defects of lap joints, and the specific steps are as follows: first, welding electrical parameters and quality defect labels in the actual welding production process and labels of the weld center offsetting the welding wire center are collected as a training library. Secondly, the effective window is extracted for the collected time series data of the electrical parameters, the extracted data is subjected to Hilbert transform, and feature extraction is performed on the real value and complex value of the electrical parameters respectively. Thirdly, a gradient boosting tree is used to learn whether the sample weld center offsets the welding wire center. From this, the predicted label of whether the weld center offsets the welding wire center is used as a feature, and the recursive feature elimination method in the maximum and minimum normalization and packaging method is used to select features, and a decision tree model is used to classify welding quality defects. Finally, the welding electrical parameters are collected in real time, and window extraction and corresponding feature transformation and extraction are performed. The model prediction of whether the weld center offsets the welding wire center is substituted, and the prediction result is used as a feature and substituted into the welding quality prediction model to obtain whether the welding quality is defective. The present invention divides the prediction of lap joint welding quality defects into two steps: first, predicting whether the weld center is offset from the welding wire center, and then using the label of whether the predicted weld center is offset from the welding wire center as the main feature for predicting welding quality defects. The welding defect features caused by the offset are added, which significantly improves the accuracy of welding quality defect prediction.
[0026] Example 1
[0027] like Figure 1 The figure is a schematic flow chart of a method for predicting weld offset according to the present invention.
[0028] The method for predicting weld offset described in the present invention comprises the following steps:
[0029] 1) Training database collection module: 210 pieces of arc voltage and welding current data of welding robots are collected through the industrial gateway. The center of the weld is manually labeled when it is offset from the center of the welding wire. When it is offset from the upper plate, it is recorded as a=1, when it is offset from the lower plate, it is recorded as a=2, and when there is no offset, it is recorded as a=0. At the same time, the welding quality is manually labeled. When there is a welding defect, it is recorded as y=1, otherwise it is recorded as y=0. All data and labels are used as training libraries;
[0030] 2) Extract data effective windows and features: Extract effective windows of the collected arc voltage and welding current data according to their own data characteristics, and delete the beginning and ending data affected by arc starting and arc ending.
[0031] 2.1) Sort the electrical parameter data of a weld seam in ascending order according to the time series. For missing sampling points, fill in the adjacent points backwards. The number of statistical points is N, and the initial effective window is [0, N-1].
[0032] 2.2) Front window selection: Starting from the start time of the effective window, calculate the effective window except the current sampling point and the mean of sampling points i+1, i+2, i+3 and standard deviation σ, we get the threshold If sampling point i is not within the threshold, but sampling points i+1, i+2, i+3 are all within the threshold, the effective window is updated to [i+1, N-1]; if sampling point i and sampling points i+1, i+2, i+3 are all within the threshold and the value of point i is equal to the mean If the range does not exceed 1 / 3 of the entire threshold range, the valid window is updated to [i, N-1]; otherwise, continue to select the valid window; let the valid front window number at this time be i * .
[0033] 2.3) Rear window selection: From the valid window [i * ,N-1] end time, calculate the effective window in turn except the current sampling point and the average of the values of the next four sampling points j-1, j-2, j-3, j-4 and standard deviation σ′, we get the threshold If the value of sampling point j is not within the threshold, but the values of j-1, j-2, j-3, and j-4 are all within the threshold, then the effective window is updated to [i * ,j-1]; if sampling point j and sampling points j-1, j-2, j-3, j-4 are within the threshold and the value of sampling point j is equal to the mean If the range does not exceed 1 / 3 of the entire threshold range, the effective window is updated to [i * ,j]; otherwise continue to select; let the valid rear window number at this time be j * .
[0034] 2.4) Re-update the front window sequence number: According to 2.2) and 2.3), the effective window is [i * ,j * ], calculate the mean of the effective window and standard deviation σ * , the effective threshold If the number of samples deleted in the current window is greater than the preset proportion of data points, which is 5% of the total samples in this example, the sampling points are calculated in sequence. Is the value of within the threshold If the value is within the threshold, continue; otherwise, find the first data point l that does not satisfy * , then stop, and the effective window is [l * +1,j * ]; When the number of samples deleted in the current window does not exceed 5% of the data points, the sampling points are calculated in sequence The values of l+1, l+2, and l+3 are taken into consideration. Find the first sampling point where the values of these four points are within the valid threshold, then stop. Set the valid front window number to l * , then the effective window is [l * ,j * ]; let the effective front window number at this time be t * .
[0035] 2.5) Re-update the rear window sequence number: When the number of samples deleted from the rear window is greater than 5% of the data points, the sampling points are calculated in sequence Is the value of within the effective threshold? If so, continue; otherwise, find the first data point k that does not satisfy * , then stop, and the effective rear window number is k * -1, then the effective window is [t * ,k * -1]; when the number of samples deleted in the rear window does not exceed 5% of the data points, the sampling points are calculated in sequence The value of and the values of the next four points k-4, k-3, k-2, k-1, find the first five points whose values are within the valid threshold, then stop, and the valid front window number is k * , then the effective window is [t * ,k * ]; let the effective front window number at this time be T * .
[0036] 2.6) Determine the effective window: Apply 2.1)-2.5) to the voltage and current data respectively. Let the voltage effective window be [v, V] and the current effective window be [i, I]. The final effective window is [max(i, v), min(I, V)].
[0037] like Figure 2 and Figure 3 As shown in the figure, the box is the untrusted data window that is screened out due to arc starting and arc ending control. It can be seen from the figure that the deleted samples are significantly different from the normal samples in distribution, so this method is considered to be more effective.
[0038] Since the input arc voltage and welding current are always provided at a single frequency, the Hilbert transform method is used to calculate the time variation, and the following feature extraction is performed on the real and complex values of the electrical parameters within the extracted effective window:
[0039] ① Mean
[0040] ②Standard deviation
[0041] ③ Coefficient of variation
[0042] ④ Kurtosis
[0043] ⑤First-order difference mean
[0044] ⑥Form Factor
[0045] ⑦Crest Factor
[0046] ⑧ Clearance coefficient
[0047] ⑨ Pulse Factor
[0048] ⑩ Average value of front and rear windows (the first half of the data is the front window, and the second half of the data is the rear window)
[0049] 11 Pearson correlation coefficient of front and back windows
[0050] 3) Weld offset model training: The extracted features and the weld center offset wire center label are trained with a gradient boosting tree for a three-classification model. After we build the gradient boosting tree, when a new sample is sent, we use the existing multiple decision tree logic to judge the new information structure, and finally perform a fusion calculation to obtain the predicted label of the sample and save the model of whether the weld center is offset from the wire center.
[0051] 4) Welding quality defect training: perform 2) feature extraction on the electrical parameters of the 210 samples in the training library and 3) label prediction on whether the weld center is offset from the wire center. Perform stratified sampling on the obtained samples and divide them into training samples and verification samples at a ratio of 8:2. There are 168 training samples and 42 verification samples in total. Calculate the 1% and 99% quantiles of the electrical parameter features, set the values less than the 1% quantile to 0, and set the values greater than the 99% quantile to 1. Use maximum and minimum normalization for data points between the 1% and 99% quantiles as new training sample data and record the 1% and 99% quantiles of each feature. Use L1 regularization and recursive feature elimination to select features for the training samples to eliminate multicollinearity, and delete 14 useful features. Use the screened features and label features,
[0052] The Gini index is used to divide the node data set and build a decision tree model. After we build the decision tree, when a new sample is sent, we use the existing decision tree logic to judge the new information structure. When the content of the sample is consistent with the decision tree, it enters the next branch for judgment, and obtains the classification result through the leaf node, and saves the welding quality defect model. In order to prove the effectiveness of this method, the same training data is used, and only the selected electrical parameter features are used for welding quality defect training. On the validation set, its accuracy is 15% higher than that of the decision tree model that adds the prediction label of the weld center offset wire center in addition to the addition of electrical parameter features.
[0053] 5) Welding quality prediction module: The arc voltage and welding current data of the welding robot are collected in real time through the industrial gateway, and window extraction and corresponding feature transformation and extraction are performed. The data are substituted into the weld offset model for prediction, and the prediction results are used as features. Finally, they are substituted into the welding quality prediction model. If the classification result obtained is 1, indicating that a weld offset has occurred, a reminder is given for manual review. For samples with incorrect predictions, they are re-used as training libraries to enrich step 1), and feature selection and tree model construction are re-performed, namely steps 2)-4).
[0054] A method for improving the prediction of lap joint welding quality defects proposed in this embodiment effectively deletes untrusted data caused by arc starting and arc ending control at the beginning and end of welding. The prediction of lap joint welding quality defects is divided into two steps. First, it is predicted whether the weld center offsets the welding wire center, and then the label of whether the predicted weld center offsets the welding wire center is used as the main feature for predicting welding quality defects. The welding defect characteristics caused by the offset are added to effectively enhance the recognition ability of welding quality defects.
[0055] Example 2
[0056] This embodiment discloses a system for predicting welding quality defects of lap joints, the system comprising:
[0057] A training database module, wherein the training database module contains arc voltage and welding current data of the welding robot collected through the industrial gateway, the training data module includes label data of the situation where the weld center is offset from the welding wire center, and label data of welding quality, and the training data module also includes all electrical parameter data;
[0058] A data effective window and feature extraction module, wherein the data effective window and feature extraction module extracts the collected arc voltage and welding current data according to the effective window, deletes the beginning and ending data affected by arc starting and arc ending, calculates the time variation using the Hilbert transform method, and extracts the features of the parameters in the effective window respectively;
[0059] A weld offset model training module, wherein the weld offset model training module trains a gradient boosting tree classification model on the extracted features and weld center offset welding wire center labels;
[0060] A welding quality defect training module, wherein the welding quality defect training module uses maximum and minimum standardization to eliminate the influence of inconsistent dimensions, and then uses L1 regularization and recursive feature elimination method to screen features, and finally obtains features without multicollinearity, and uses a decision tree model for training according to welding quality labels;
[0061] A welding quality defect prediction module collects arc voltage and welding current data of the welding robot in real time through an industrial gateway, performs window extraction and corresponding feature transformation and extraction, substitutes the data into the training weld offset model for prediction, and then substitutes the prediction result as a feature into the welding quality prediction model to calculate the prediction result of the welding quality defect.
[0062] Wherein, the data valid window and feature extraction module include:
[0063] An initial window statistics unit, wherein the initial window statistics unit sorts the electrical parameter data of a weld seam from small to large in time series, and adopts a method of backfilling adjacent points for missing sampling points, and counts the number of statistical points N, then the initial effective window is [0, N-1];
[0064] Front window selection unit: Starting from the start time of the effective window, calculate the effective window except the current sampling point and the mean of other sampling points other than sampling points i+1, i+2, i+3 and standard deviation σ, we get the threshold If sampling point i is not within the threshold, but sampling points i+1, i+2, i+3 are all within the threshold, the effective window is updated to [i+1, N-1]; if sampling point i and sampling points i+1, i+2, i+3 are all within the threshold and the value of point i is equal to the mean If the range does not exceed 1 / 3 of the entire threshold range, the valid window is updated to [i, N-1]; otherwise, continue to select the valid window; let the valid front window number at this time be i * ;
[0065] Rear window selection unit: From the effective window [i * ,N-1] end time, calculate the effective window in turn except the current sampling point and the mean of the four sampling points before this sampling point, except j-1, j-2, j-3, and j-4 and standard deviation σ′, we get the threshold If the value of sampling point j is not within the threshold, but the values of j-1, j-2, j-3, and j-4 are all within the threshold, then the effective window is updated to [i * ,j-1]; if sampling point j and sampling points j-1, j-2, j-3, j-4 are within the threshold and the value of sampling point j is equal to the mean If the range does not exceed 1 / 3 of the entire threshold range, the effective window is updated to [i * ,j]; otherwise continue to select; let the valid rear window number at this time be j * ;
[0066] Re-update the front window sequence number unit: According to 2.2) and 2.3), the effective window is [i* ,j * ], calculate the mean of the effective window and standard deviation σ * , the effective threshold If the number of samples deleted in the current window is greater than the preset ratio of data points, the sampling points are calculated in sequence. Is the value of within the threshold If the value is within the threshold, continue; otherwise, find the first data point l that does not satisfy * , then stop, and the effective window is [l * +1,j * ]; When the number of samples deleted in the current window does not exceed the preset proportion of data points, the sampling points are calculated in sequence The values of l+1, l+2, and l+3 are taken into consideration. Find the first sampling point where the values of these four points are within the valid threshold, then stop. Set the valid front window number to l * , then the effective window is [l * ,j * ]; let the effective front window number at this time be t * ;
[0067] Re-update unit: When the number of samples deleted from the rear window is greater than the preset proportion of data points, the sampling points are calculated in sequence Is the value of within the effective threshold? If so, continue; otherwise, find the first data point k that does not satisfy * , then stop, and the effective rear window number is k * -1, then the effective window is [t * ,k * -1]; when the number of samples deleted in the rear window does not exceed the preset proportion of data points, the sampling points are calculated in sequence The value of and the values of the next four points k-4, k-3, k-2, k-1, find the first five points whose values are within the valid threshold, then stop, and the valid front window number is k * , then the effective window is [t * ,k * ]; let the effective front window number at this time be T * ;
[0068] Determine the effective window unit: execute the above units for the voltage and current data respectively, let the voltage effective window be [v, V], the current effective window be [i, I], then the final effective window is [max(i, v), min(I, V)].
[0069] The features within the effective window in the welding quality defect training module include: mean, standard deviation, coefficient of variation, kurtosis, first-order difference mean, shape factor, crest factor, gap coefficient, pulse factor, front and rear window averages, and front and rear window Pearson correlation coefficients of real and complex values of electrical parameters.
[0070] The full amount of features in the welding quality defect training module includes: all features within the effective window and labels predicted by the weld offset model.
[0071] A system for improving the prediction of lap joint welding quality defects proposed in this embodiment is a system for improving accuracy. Compared with the existing welding quality defect prediction system, it has one more nested module and the accuracy is greatly improved. It effectively deletes the untrusted data at the beginning and end of welding caused by arc starting and arc ending control. The prediction of lap joint welding quality defects is divided into two steps. First, it predicts whether the weld center offsets the welding wire center, and then the label of whether the predicted weld center offsets the welding wire center is used as the main feature for predicting welding quality defects. The welding defect characteristics caused by the offset are added to effectively enhance the recognition ability of welding quality defects.
[0072] The above content is a detailed description of the present invention in combination with specific embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art of the present invention, without departing from the concept of the present invention, several simple deductions or substitutions can be made, which should be regarded as falling within the scope of protection of the present invention.
Claims
1. A method for predicting lap joint welding quality defects, characterized in that: The steps include: 1) Collect training database: collect arc voltage and welding current data of welding robot, label the situation of weld center offset from welding wire center and welding quality, and use all electrical parameter data and labels as training database; 2) Extracting data effective window and features: Extracting effective window from the collected arc voltage and welding current data, using Hilbert transform method to calculate time variation, and extracting features from parameters within the effective window respectively; 3) Weld seam offset model training: The extracted features and the labels of the weld center offset from the wire center are trained using the gradient boosting tree algorithm for a three-classification model. After the gradient boosting tree is constructed, when a new sample is generated, multiple decision trees are used to judge the new sample information structure. Finally, a fusion calculation is performed to obtain a predicted label of whether the sample has a weld seam offset, and the weld seam offset model is saved; 4) Training welding quality defect model: After unifying the dimensions, use L1 regularization and recursive feature elimination method to screen all features, and finally obtain features without multicollinearity. According to the welding quality labels, use the decision tree model for training; 5) Predicting welding quality defects: Collecting arc voltage and welding current data of the welding robot, performing window extraction and corresponding feature transformation and extraction, substituting into the weld offset model for prediction, and then substituting the prediction results as features into the welding quality prediction model to calculate the prediction results of welding quality defects.
2. The method for predicting lap joint welding quality defects according to claim 1, characterized in that: The steps of extracting the valid data window in step 2) are as follows: 2.1) Sort the electrical parameter data of a weld seam from small to large in time series, and use the method of backfilling adjacent points for missing sampling points. The number of statistical points is N, and the initial effective window is [0, N-1]; 2.2) Front window selection: Starting from the start time of the valid window, the mean of other sampling points in the valid window except the current sampling point is calculated in sequence. and standard deviation σ, to obtain a first threshold, and to update the effective front window according to the distribution of the sampling points within the first threshold; 2.3) Back window selection: Calculate the mean of the other sampling points in the valid window except the current sampling point and the 4 sampling points before the sampling point. and standard deviation σ′, to obtain a second threshold, and to update the effective rear window according to the distribution of the sampling points within the second threshold; 2.4) Re-update the front window sequence number: According to step 2.2) and step 2.3), the effective window is obtained and the mean of the effective window is calculated. and standard deviation σ * , obtain the effective threshold, and re-update the effective front window according to the size of the number of samples deleted from the current window and the preset proportion of data points, and the size relationship between the sampling points and the effective threshold; 2.5) Re-updating the rear window sequence number: re-updating the effective rear window according to the number of samples deleted from the current window and the preset proportion of data points, and judging the size relationship between the sampling point and the effective threshold; 2.6) Determine the effective window: Process the voltage and current data using steps 2.1)-2.5) respectively, setting the voltage effective window to [v, V] and the current effective window to [i, I]. The final effective window is [max(i, v), min(I, V)].
3. A method for predicting lap joint welding quality defects according to claim 2, characterized in that: The specific process of step 2.2 is as follows: Starting from the start time of the effective window, calculate the effective window except the current sampling point and the mean of other sampling points other than sampling points i+1, i+2, i+3 and standard deviation σ, we get the first threshold If sampling point i is not within the first threshold, but sampling points i+1, i+2, i+3 are all within the first threshold, the effective window is updated to [i+1, N-1]; if sampling point i and sampling points i+1, i+2, i+3 are all within the first threshold and the value of point i is equal to the mean If the range does not exceed 1 / 3 of the entire threshold range, the valid window is updated to [i, N-1]; otherwise, continue to select the valid window; let the valid front window number at this time be i * .
4. The method for predicting lap joint welding quality defects according to claim 2, characterized in that: The specific process of step 2.3 is: from the effective window [i * ,N-1] end time, calculate the effective window in turn except the current sampling point and the mean of the four sampling points before this sampling point, except j-1, j-2, j-3, and j-4 and standard deviation σ′, we get the second threshold If the value of sampling point j is not within the second threshold, but the values of j-1, j-2, j-3, and j-4 are all within the second threshold, the effective window is updated to [i * ,j-1]; If sampling point j and sampling points j-1, j-2, j-3, j-4 are within the second threshold and the value of sampling point j is equal to the mean If the range does not exceed 1 / 3 of the entire threshold range, the effective window is updated to [i * ,j]; otherwise continue to select; let the valid rear window number at this time be j * .
5. The method for predicting lap joint welding quality defects according to claim 2, characterized in that: The specific process of step 2.4 is as follows: According to 2.2) and 2.3), the effective window is [i * ,j * ], calculate the mean of the effective window and standard deviation σ * , the effective threshold If the number of samples deleted in the current window is greater than the preset ratio of data points, the sampling points are calculated in sequence. Is the value within the effective threshold? If the value is within the valid threshold, continue; Otherwise, find the first data point l that does not satisfy * , then stop, and the effective window is [l * +1,j * ]; When the number of samples deleted in the current window does not exceed the preset proportion of data points, the sampling points are calculated in sequence The values of l+1, l+2, and l+3 are taken into consideration. Find the first sampling point where the values of these four points are within the valid threshold, then stop. Set the valid front window number to l * , then the effective window is [l * ,j * ]; let the effective front window number at this time be t * .
6. A method for predicting lap joint welding quality defects according to claim 2, characterized in that: The specific process of step 2.5 is as follows: When the number of samples deleted in the back window is greater than the preset proportion of data points, the sampling points are calculated in sequence Whether the value of is within the effective threshold, if the value is within the threshold, continue; Otherwise, find the first data point k that does not satisfy * , then stop, and the effective rear window number is k * -1, then the effective window is [t * ,k * -1]; when the number of samples deleted in the rear window does not exceed the preset proportion of data points, the sampling points are calculated in sequence The value of and the values of the next four points k-4, k-3, k-2, k-1, find the first five points whose values are within the valid threshold, then stop, and the valid front window number is k * , then the effective window is [t * ,k * ]; let the effective front window number at this time be T * .
7. A method for predicting lap joint welding quality defects according to claim 1 or 2, characterized in that: In step 2), feature extraction is performed on the parameters in the effective window respectively, and the features in the effective window include: mean, standard deviation, coefficient of variation, kurtosis, first-order difference mean, shape factor, crest factor, gap coefficient, pulse factor, front and rear window averages, and front and rear window Pearson correlation coefficients of the real and complex values of the electrical parameters.
8. The method for predicting lap joint welding quality defects according to claim 3, characterized in that: Step 4) training a welding quality defect model, wherein the full features include: all features within the effective window and labels predicted by the weld offset model.
9. A system for predicting lap joint welding quality defects, characterized in that: The system comprises: A training database module, wherein the training database module contains arc voltage and welding current data of the welding robot collected through the industrial gateway, the training database module includes label data of the situation where the weld center is offset from the welding wire center, and label data of welding quality, and the training database module also includes all electrical parameter data; A data effective window and feature extraction module, wherein the data effective window and feature extraction module extracts the collected arc voltage and welding current data according to the effective window, deletes the beginning and ending data affected by arc starting and arc ending, calculates the time variation using the Hilbert transform method, and extracts the features of the parameters in the effective window respectively; A weld offset model training module, wherein the weld offset model training module uses a gradient boosting tree algorithm to train a three-classification model for the extracted features and the label of the weld center offsetting the welding wire center. After the gradient boosting tree is constructed, when a new sample is generated, multiple decision trees are used to judge the new sample information structure, and finally a fusion calculation is performed to obtain a prediction label of whether the sample has a weld offset, and the weld offset model is saved; A welding quality defect training module, wherein the welding quality defect training module uses maximum and minimum standardization to eliminate the influence of inconsistent dimensions, and then uses L1 regularization and recursive feature elimination method to screen features, and finally obtains features without multicollinearity, and uses a decision tree model for training according to welding quality labels; A welding quality defect prediction module collects arc voltage and welding current data of the welding robot in real time through an industrial gateway, performs window extraction and corresponding feature transformation and extraction, substitutes the data into the weld offset model for prediction, and then substitutes the prediction result as a feature into the welding quality prediction model to calculate the prediction result of the welding quality defect.
10. A computer-readable storage medium storing computer-executable instructions, characterized in that: The computer executable instructions are used to execute the method for predicting lap joint welding quality defects as described in any one of claims 1 to 8.
