A method and system for evaluating the quality of resistance spot welding of automobile body parts
By utilizing dynamic resistance data and a lightweight convolutional neural network on the new energy vehicle production line, resistance spot welding features are automatically extracted, solving the problems of high cost and limited feature extraction in existing detection methods, and achieving high-precision resistance spot welding quality assessment and real-time detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SOUTH CHINA UNIV OF TECH
- Filing Date
- 2023-06-13
- Publication Date
- 2026-05-01
AI Technical Summary
Existing methods for inspecting the quality of resistance spot welding on automobile bodies suffer from high costs, reliance on manual feature extraction, untimely inspection results, and difficulty in applying them to actual production lines. Furthermore, traditional deep learning models have limitations in feature extraction and data mining.
An end-to-end deep learning model is adopted, which utilizes dynamic resistance data in the spot welding process. Features are automatically extracted through a lightweight one-dimensional convolutional neural network, and combined with data augmentation technology, to achieve high-precision evaluation of spot welding quality. A front-end interface is built for real-time display and recording.
This technology enables low-cost, high-precision resistance spot welding quality inspection on new energy vehicle production lines, improving the automation and intelligence of inspection, ensuring weld quality, and providing an example of deep learning application in industrial production.
Smart Images

Figure CN116921910B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of defect detection in industrial production processes, and in particular to a method and system for evaluating the quality of resistance spot welding of automotive body parts. Background Technology
[0002] In the automotive manufacturing industry, resistance spot welding is an important method for connecting thin-plate structural components in the car body. It is understood that a car body has approximately 5,000 weld points, of which over 95% are generated by resistance spot welding. Since the welded components used in the car body directly affect the vehicle's rigidity and crash safety, the quality of these weld points is a crucial prerequisite for overall vehicle quality compliance. Currently, most weld point inspection methods are destructive or semi-destructive, or require additional inspection equipment, resulting in drawbacks such as being time-consuming and labor-intensive, having slow feedback, and relying on experience and skill for inspection effectiveness.
[0003] Many researchers have collected various types of data during the welding process, such as acoustic signals, electrical signals, displacement signals, heat source signals, and image data, and analyzed the correlation between these welding process data and spot weld quality. Most studies show that different quality types of welds are reflected to some extent in the corresponding welding process data, which provides feasibility for researching data-driven methods for evaluating the quality of automotive body spot welds and applying this method to actual production lines. Although various types of spot weld process data can reflect changes in the welding process to some extent, collecting certain signals means that the corresponding sensors must be installed on electrode supports or in appropriate positions at the workstation, or that the actual production equipment needs to be modified to some extent. This is not a problem in a laboratory environment, but it presents some difficulties in a production environment. Mass modification is expensive, making it difficult to apply to existing production lines.
[0004] Furthermore, some researchers' studies on spot welding quality assessment methods based on shallow machine learning models require intermediate steps such as manual feature extraction, feature analysis and selection, and feature dimensionality reduction of the welding process data. This method suffers from insufficient feature information mining; in other words, manually extracted features are limited, and expert-experienced features often cannot accurately and comprehensively describe the external and internal characteristics of data changes. Moreover, feature engineering and model optimization are separate processes, making it difficult to obtain a globally optimal solution. This means the model's fitting ability cannot be fully realized, as the quality of the initial feature extraction directly impacts the model's classification performance.
[0005] Tong Xing et al. disclosed a method for constructing a resistance spot welding quality evaluation model based on small sample data in Chinese invention patent CN115618287A. This method constructs an attention mechanism model for resistance spot welding quality evaluation, and achieves the evaluation of spot welding quality by adjusting the average threshold through multiple training iterations. The input of this model is the dynamic resistance initial value, inflection point value, end value, time difference, etc. extracted through experience. Such a method has problems such as cumbersome manual feature extraction steps and difficulty in verifying the effectiveness of features. In addition, the model's function is relatively limited, only evaluating the probability of defect occurrence, without fully exploring the inherent information of the data for application. Summary of the Invention
[0006] To address at least one of the problems existing in current technologies, this invention provides a method for evaluating the quality of resistance spot welding of automotive body components. This method effectively utilizes dynamic resistance data generated during the spot welding process without requiring additional equipment. It combines an end-to-end deep learning model algorithm, using raw data as input and spot weld quality type as output. This automatically extracts deep characterization features reflecting spot weld quality results from dynamic resistance data, avoiding complex processes such as feature extraction and analysis. This achieves high detection accuracy and solves the problems of high detection costs and significant limitations of manual feature extraction in traditional detection methods. It further ensures the spot welding quality of key weld points in new energy vehicle bodies and improves the automation and intelligence of spot weld quality inspection. This invention demonstrates the promising application prospects of deep learning algorithms in the industrial field and provides new ideas for the further application of deep learning algorithms in engineering practice.
[0007] To achieve the objective of this invention, a method for evaluating the quality of resistance spot welding of automotive body components is proposed, comprising the following steps:
[0008] S1: Using existing equipment and process parameters in the new energy vehicle production workshop, welding experiments were conducted on thin sheet metal parts made of the same material as key parts of the vehicle body. The data recording function was enabled in the host computer of the welding equipment to obtain a total of 5 types of weld point data files.
[0009] S2: Based on the spot welding results, the data files are categorized, and then all data files are parsed to obtain the voltage and current data corresponding to each quality type of weld point. The dynamic resistance data is calculated, and the data is normalized. Preferably, the data is divided into a training set and a test set in a 7:3 ratio.
[0010] S3: Based on the relatively simple data structure of spot welding dynamic resistance, a lightweight one-dimensional convolutional neural network model is built in the PyTorch framework. It is trained using training set data and tested using test set data.
[0011] S4: Use data augmentation methods to expand the dataset and optimize the model's classification performance on the test set.
[0012] S5: Input the test data into the trained and optimized spot weld quality assessment model to obtain the corresponding spot weld quality assessment results.
[0013] Furthermore, it also includes the following steps: using PyQt to build a front-end interface, embedding the model interface into the software module, and realizing the real-time display of the dynamic resistance curve of the body spot welding, as well as the display and statistical recording of the spot welding quality assessment results.
[0014] Compared with the prior art, the present invention can achieve at least the following beneficial effects:
[0015] (1) Based on the existing equipment of the new energy vehicle production line, this invention selects to study the dynamic resistance data in the resistance spot welding process of the vehicle body. The electrical signals in the spot welding process have the advantages of low acquisition cost, easy real-time acquisition and high quality correlation.
[0016] (2) This invention studies the correlation between dynamic resistance data of spot welding and spot welding quality in actual production scenarios, explores new algorithm models to achieve higher precision spot welding quality detection effect, and applies the research content to engineering practice.
[0017] (3) Features are automatically extracted using the convolution feature extractor in the constructed spot welding quality assessment model, and finally the mapping of data features to real results is realized. Attached Figure Description
[0018] Figure 1 This is a schematic diagram of the resistance change stages during the resistance spot welding process of an automobile body.
[0019] Figure 2 This is a schematic diagram of typical dynamic resistance curves corresponding to the five quality types of solder joints.
[0020] Figure 3 This is a schematic diagram of a spot welding quality evaluation model based on a one-dimensional convolutional neural network built in an embodiment of the present invention.
[0021] Figure 4 This is a schematic diagram of the initial training process of building the model in an embodiment of the present invention.
[0022] Figure 5 This is a schematic diagram of the overall classification evaluation result of the model after data augmentation in an embodiment of the present invention.
[0023] Figure 6 This is a schematic diagram of the confusion matrix of the classification and evaluation results of weld points of various quality types in an embodiment of the present invention.
[0024] Figure 7This is a schematic diagram of the front-end interface of the spot welding quality assessment model built by this invention. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
[0026] Step 1: Use on-site spot welding equipment and actual processing parameters to obtain welds of various quality types.
[0027] In some embodiments of this invention, the research object is the resistance spot welding process in the welding workshop of new energy vehicle production, and the key work station selected is the side panel of the car body mast pillar. This part of the car body is composed of three layers of thin plates: the middle layer is galvanized sheet material DC07E+Z, and the outer layer is cold-rolled duplex steel HC420 / 780dp. The thickness of HC420 / 780dp is 1.4mm, and the thickness of DC07E+Z is 0.7mm. In other embodiments, the selected key body part can also be other parts, such as the outer frame of the door, the base assembly, etc.
[0028] In actual production, there are relatively few defective weld points on the car body, and they are difficult to count in real time. In some embodiments of this invention, in order to quickly obtain data on various defect types, 12 sets of three-layer plate sample parts with dimensions of 625mm*100mm were additionally prepared. The material and thickness of the sample parts were consistent with the thin plate parts of the mast pillar. Welding experiments were conducted using a welding robot on site and the actual welding parameters used. The spot welding equipment used on the workshop production line is a medium-frequency inverter DC welding equipment manufactured by Bosch. Voltage and current sensors are installed at both ends of the welding torch, and the data is transmitted to the controller via cables. During resistance spot welding using this equipment, the resistance value of the plate will undergo the following process: Figure 1 The diagram shows five stages, with the controller recording resistance changes during stages 2, 3, and 4, the three main welding stages. By connecting to the controller using the BOS6000 software on a host computer and enabling the data logging function, real-time welding voltage and current data can be obtained. Excluding non-critical welding stages such as pressurization and preheating, the controller records 470 data points for each weld joint within a 200ms welding time; therefore, each sample data point is 470 bytes long.
[0029] For a three-layer metal plate with a total thickness of 3.5mm, standard parameter settings used during production line operation were employed: current of 8kA and pressure of 2.5kN. Experimental groups 1 and 2 used the controlled variable method to change the voltage and current to obtain data on the four main weld point types: normal, penetration, spatter, and cold weld. To obtain defect data related to weld point deviation from the workpiece due to robot pose accuracy errors or vehicle body deformation in actual production, the distance parameter between the center point of the welding electrode cap and the edge of the plate was manually adjusted, as shown in Table 1 below. Through the above experiments, this embodiment obtained data on 5 types of weld points, totaling 240 weld points, with quantities of 56, 62, 32, 46, and 29 respectively, and types of normal, spatter, penetration, cold weld, and weld nugget deviation.
[0030] Table 1. Parameters of the spot welding experiment
[0031]
[0032] Step 2: Based on the spot welding results, classify the data files, parse all data files to obtain the voltage and current data corresponding to each quality type of weld point, calculate the dynamic resistance data, and perform data preprocessing and dataset division.
[0033] The voltage and current data for each solder joint are stored locally in .rui format files, with the file content stored in Extensible Markup Language (XML). In the .rui format file recording voltage and current signal data, the root element is named "UIRDATA". Current and voltage data are recorded in multiple elements named "DATA_SET1" and "DATA_SET2" under the root element, respectively. These elements contain the voltage and current data values, without additional attributes or child nodes. Additionally, nodes named "IMAX" and "UMAX" record the maximum values of current and voltage. After determining the data storage location, a script written in Python was used to parse the .rui data file, and the dynamic resistance data can be obtained through simple proportional calculations. In some embodiments of this invention, dynamic resistance curves corresponding to five solder joints of different quality types were randomly selected and plotted, such as... Figure 2 As shown, the resistance curves of solder joints of different quality types exhibit different trends.
[0034] To train and test the model, the dynamic resistance data obtained from the experiments were preprocessed. First, all raw data were normalized using the Min-Max method, which calculates the following formula for each dimension of the raw samples:
[0035]
[0036] In the formula, x represents the resistance value of a certain dimension of all samples, and x′ represents the resistance value of a certain dimension after sample normalization. Then, in some embodiments of the present invention, the dynamic resistance data of solder joints of each quality type are divided in a 7:3 ratio and placed into the training set and the test set respectively, and the data is randomly shuffled before the division.
[0037] Step 3: Build a lightweight one-dimensional convolutional neural network model as a spot welding quality assessment model, train it using training set data, and test it using test set data.
[0038] The dynamic resistance data of the automotive body spot welding process studied in this invention does not exhibit obvious periodicity; therefore, the data characteristics are mainly amplitude variation within the time domain. Furthermore, the length of the original data samples (e.g., 470 as mentioned earlier) is simpler in structure compared to two-dimensional image data and one-dimensional time-series data such as bearing vibration. Therefore, this invention designs a lightweight one-dimensional convolutional neural network architecture, and the proposed spot welding quality assessment model structure is as follows: Figure 4 As shown.
[0039] The spot welding quality assessment model comprises four convolutional feature extractors and four fully connected layers. The input layer has an input data dimension of 1x470 (the length of the original data sample). The first convolutional layer has a kernel size of 45, three kernels, and a stride of 1, resulting in an output dimension of 3x426. Then, a max-pooling layer with a kernel size and stride of 2 halves the feature map size to 3x213. Similarly, multiple convolutions and max-pooling operations result in a final pooling layer with an output dimension of 8x22. A flattening layer concatenates the multi-channel feature map matrix obtained from this convolution, yielding a 1x176 output vector, which serves as the input to the fully connected layer. After three more fully connected layers with dimension adjustments, a 5-dimensional feature vector is obtained, which serves as the input to the softmax layer.
[0040]
[0041] In the formula z i Let be the output value of the i-th node, and C be the number of output nodes, which is also the number of categories. The final network output is a 5-dimensional vector representing the probability of each category.
[0042] In addition to the basic components of the network mentioned above, an activation function (ReLU) is added after each convolutional layer and fully connected layer to increase the model's non-linear mapping capability. Furthermore, BatchNorm layers and Dropout layers are added to prevent overfitting and improve the model's generalization ability. Specific network structure parameters are shown in Table 2.
[0043] Table 2. Specific structural parameters of one-dimensional convolutional neural networks
[0044]
[0045]
[0046] In this invention, to effectively establish the mapping relationship between deep characterization features and weld quality, and to guide the iterative optimization process of the constructed spot weld quality assessment model, the cross-entropy loss function is used to calculate the forward propagation loss value. The forward propagation loss function is expressed as follows:
[0047]
[0048] In the formula, h θ (x m This represents the output result of a single sample, which can be calculated as follows:
[0049]
[0050] In the formula, N c and N f These represent the number of blocks in the convolutional feature extractor and the number of fully connected layers, respectively. c Let l represent the c-th convolutional layer. f This indicates the f-th fully connected layer. θ and θ represent the bias parameters in the convolution operator and the fully connected layer, respectively. L2 regularization can be used to adjust the parameters for optimization. M represents the number of samples in the batch, z real x represents the true label corresponding to the sample. m ω represents the output vector of a multilayer fully connected network. ij x represents the computational weights from the i-th neuron in the previous layer to the j-th neuron in the next layer during the convolution calculation. i This represents the input value of the i-th neuron.
[0051] For the optimization of the network model, this invention conducted comparative experiments using various optimizers. In some embodiments of this invention, the Adam algorithm was selected to optimize the model parameters.
[0052] An algorithm model was written based on PyTorch, one of the open-source deep learning frameworks. Relevant algorithm modules were selected, and the model was trained and tested on a device with a GPU model of GTX3050.
[0053] The number of training iterations was set to 200, the initial learning rate to 0.0005, and the batch size to 8. To reduce the training error caused by random initialization of model parameters, five training iterations were performed, and the median value was selected as the final result. The overall classification accuracy of the spot welding quality assessment model proposed in this invention varies between the training and test sets as follows: Figure 5 As shown, after approximately 60 iterations, the accuracy on both the training and test sets tended to stabilize, with the final model achieving a stable accuracy of 97.43% on the training set and 91.30% on the test set. This indicates that the proposed one-dimensional convolutional network model can fit the training set well; however, due to the limited amount of data, the model's generalization ability is lacking.
[0054] Step 4: Use data augmentation methods to expand the dataset and optimize the classification performance of the spot welding quality assessment model on the test set.
[0055] Deep learning networks typically require a large amount of data, but in real-world scenarios, weld defects are sporadic and infrequent, resulting in potentially insufficient data. In some embodiments of this invention, Gaussian white noise is added to expand the dataset, which aligns with the reality that electromagnetic interference or equipment aging during welding production can interfere with data acquisition quality. Signal-to-noise ratio (SNR) is the ratio of normal signal power to noise signal power (in dB). A higher SNR indicates a greater relative power between the signal and noise, signifying better data quality. The formula is as follows:
[0056]
[0057] P s P represents the power of the signal. n The power of the noise, x 2 (t) represents the square of the signal amplitude, n 2 (t) represents the square of the noise amplitude value.
[0058] In some embodiments of the present invention, the specific operation of data augmentation is as follows: First, the original data is shuffled and divided into a training set and a test set in a 7:3 ratio, with the dataset fixed; then, Gaussian white noise is added to the training set data, and the data is added to the training set. Different SNR values are set for data augmentation, and the model proposed in this invention is trained using the data-augmented training set. Each experiment is trained three times, and the highest accuracy value is recorded. It was found that the best augmentation effect occurs when the SNR is 10dB. At this point, the changes in the overall classification accuracy of the spot welding quality assessment model designed in this invention on the training set and the test set, as well as the confusion matrix of the classification results on the test set, are as follows: Figure 6 and Figure 7 As shown. By Figure 6 and Figure 7 As can be seen, after data augmentation, the accuracy of the spot welding quality assessment model built in this invention is improved, and the model's generalization ability is enhanced. The overall classification accuracy of the trained model on the training set and the test set is 97.43% and 95.65%, respectively.
[0059] Step 5: Use PyQt to build the front-end interface, embed the model interface into the software module, and realize the real-time display of the dynamic resistance curve of the body spot welding, the display and statistical recording of the spot welding quality assessment results.
[0060] The software interface developed in this study is as follows: Figure 7 As shown, real-time monitoring of the spot welding process is implemented using built-in PyQt modules, displaying the resistance curve. It also allows for easy calling of pre-trained resistance spot welding quality assessment models for evaluation, displaying the results on the interface. Furthermore, basic functions such as report recording, exporting, and window prompts for defective weld points are implemented.
[0061] This invention also provides a resistance spot welding quality assessment system for new energy vehicle body components based on convolutional neural networks, used to implement the method provided in the foregoing embodiments. The system includes the following modules:
[0062] The raw data acquisition module is used to conduct welding experiments on thin sheet metal parts made of the same material as key parts of the car body using existing equipment and process parameters in the automobile production workshop. The data recording function is opened in the host computer of the welding equipment to obtain weld point data files of different quality types.
[0063] The data processing module is used to classify data files according to the spot welding results, parse all data files to obtain the voltage and current data corresponding to each quality type of weld point, calculate the dynamic resistance data, and preprocess the dynamic resistance data.
[0064] The spot welding quality assessment model training module is used to train and optimize a one-dimensional convolutional neural network model.
[0065] The detection module is used to input the data to be tested into the trained and optimized spot weld quality assessment model to obtain the corresponding spot weld quality assessment results.
[0066] The system provided has the same beneficial effects as the method described above.
[0067] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for evaluating the quality of resistance spot welding of automotive body parts, characterized in that, Includes the following steps: Welding experiments were conducted on thin sheet metal parts made of the same material as key parts of the car body using existing equipment and process parameters in the automobile production workshop. The data recording function was enabled in the host computer of the welding equipment to obtain weld point data files of different quality types. Based on the spot welding results, the data files are categorized, all data files are parsed to obtain the voltage and current data corresponding to each quality type of weld point, the dynamic resistance data is calculated, and the dynamic resistance data is preprocessed: A lightweight one-dimensional convolutional neural network model was built as a spot welding quality assessment model, and the one-dimensional convolutional neural network model was trained and optimized. Input the test data into the trained and optimized spot weld quality assessment model to obtain the corresponding spot weld quality assessment results; The one-dimensional convolutional neural network model includes multiple convolutional feature extractors, flattening layers, multiple fully connected layers, and a softmax layer. The convolutional feature extractors are used to automatically extract high-level hidden space features from the original data; the flattening layers are used to concatenate the multi-channel feature mapping matrices obtained from convolution; the multiple fully connected layers form a perceptron, which maps the features calculated by convolution to the label space of the samples and performs dimensionality integration and reduction; the softmax layer is used to map the network output to real numbers between 0 and 1, that is, to display the results in the form of probabilities. In a one-dimensional convolutional neural network model, the cross-entropy loss function, suitable for multi-class classification tasks, is used as the loss value for forward propagation. The forward propagation loss function is expressed as follows: In the formula, The output result for a single sample can be calculated as follows: In the formula, and These represent the number of blocks in the convolutional feature extractor and the number of fully connected layers, respectively. Indicates the first Convolutional layers, Indicates the first Fully connected layer and These represent the bias parameters in the convolution operator and the bias parameters in the fully connected layer, respectively. Regularization can be used to adjust parameters for optimization. Indicates the number of samples in the batch. This represents the true label corresponding to the sample. This represents the output vector of a multilayer fully connected network. This indicates the first convolutional layer in the previous layer during the convolution calculation process. The neurons are transferred to the next layer. The weights of each neuron are calculated. Indicates the first The input value of each neuron.
2. The method for evaluating the quality of resistance spot welding of automotive body parts according to claim 1, characterized in that, The quality types include normal, penetration, spatter, poor weld, and weld nugget deviation.
3. The method for evaluating the resistance spot welding quality of automotive body parts according to claim 1, characterized in that, The voltage and current data for each solder joint are stored locally, and the file content is stored in Extensible Markup Language.
4. The method for evaluating the quality of resistance spot welding of automotive body parts according to claim 1, characterized in that, The preprocessing includes normalizing the acquired raw dynamic resistance data and dividing it into training and test sets.
5. The method for evaluating the quality of resistance spot welding of automotive body parts according to claim 1, characterized in that, In a one-dimensional convolutional neural network model, activation functions are added after each convolutional layer and after a fully connected layer to increase the model's non-linear mapping capability.
6. The method for evaluating the quality of resistance spot welding of automotive body parts according to claim 1, characterized in that, When training and optimizing a one-dimensional convolutional neural network model, the original dataset is augmented using data augmentation, and the model parameters are optimized using the Adam algorithm.
7. A method for evaluating the quality of resistance spot welding of automotive body parts according to any one of claims 1-6, characterized in that, It also includes the following steps: building a front-end interface, embedding the spot welding quality assessment model interface into the software module, realizing real-time display of the dynamic resistance curve of the body spot welding, and displaying and statistically recording the spot welding quality assessment results.
8. A quality assessment system for resistance spot welding of new energy vehicle body components based on convolutional neural networks, characterized in that, A method for implementing any one of claims 1-7 includes the following modules: The raw data acquisition module is used to conduct welding experiments on thin sheet metal parts made of the same material as key parts of the car body using existing equipment and process parameters in the automobile production workshop. The data recording function is opened in the host computer of the welding equipment to obtain weld point data files of different quality types. The data processing module is used to classify data files according to the spot welding results, parse all data files to obtain the voltage and current data corresponding to each quality type of weld point, calculate the dynamic resistance data, and preprocess the dynamic resistance data. The spot welding quality assessment model training module is used to train and optimize a one-dimensional convolutional neural network model. The detection module is used to input the data to be tested into the trained and optimized spot weld quality assessment model to obtain the corresponding spot weld quality assessment results.
Citation Information
Patent Citations
Construction method of resistance spot welding quality evaluation model based on small sample data
CN115618287A
Vehicle body welding spot quality detection method and system based on dynamic resistance signal
CN114813838A