Weld-Quality Prediction Algorithm Based on Multiple Models Using Process Signals in Resistance Spot Welding

: An efﬁcient nondestructive testing method of resistance spot weld quality is essential in evaluating the weld quality of all welded joints in the automotive components of a car body production line. This study proposes a quality prediction algorithm for resistance spot welding that can predict the geometrical and physical properties of a spot-welded joint and evaluate weld quality based on quality acceptance criteria. To this end, four statistical models that predict the main geometrical and physical properties of a spot-welded joint, including tensile shear strength, indentation depth, expulsion occurrence, and failure mode, were estimated based on material information, dynamic resistance, and electrode displacement signals. The signiﬁcance of the estimated models was then veriﬁed through an analysis of variance. The prediction accuracies of the models were 94.3%, 93.4%, 97.5%, and 85.0% for the tensile shear strength, indentation depth, expulsion occurrence, and failure modes, respectively. A weld quality evaluation methodology that can predict the properties of a spot-welded joint and evaluate the overall quality requirements based on authorized welding standards was proposed using the four statistical models. the nugget and indentation depth at times cross section images. After the beta peak of dynamic resistance, the workpiece stack-up is softened by melting. The area of the molten portion widens, and the displacement gradually decreases to feature point B, which is the welding end point [8,21]. After point B, a sharp decrease in displacement is observed until feature point C, at which the hold time ends due to the cooling and pressurization of the welded part. Point D in the dynamic resistance waveform represents the value of the dynamic resistance corresponding to point B, the end time of welding. Point D has a high correlation with the average value of the dynamic resistance and the area under the dynamic resistance waveform, which are also signiﬁcant features for predicting weld quality [22,23].


Introduction
Resistance spot welding is the main joining method used in the assembly of automobile parts. This technique has the advantage of high productivity compared to other welding processes. As the welded parts used in car bodies directly affect the stiffness and collision safety of the vehicles, it is important to improve the quality and maintain the uniformity of the weld. The tensile shear strength, indentation depth, expulsion occurrence, and failure mode are properties of a welded joint that affect the quality of welded parts [1][2][3][4]. Therefore, a quality inspection of these properties should be performed after the resistance spot welding process. The quality requirements of a welded joint are evaluated either using non-destructive testing (NDT) or destructive testing (DT). NDT is generally performed through visual inspection and ultrasonic inspection of assembly lines [5][6][7]. These NDT methods require an additional inspection process because they involve direct measurement or inspection by an operator. This leads to reduced productivity and requires a considerable amount of time. Quality inspection metrics such as the strength and failure mode of the weld can be evaluated using the DT method [8]. However, DT quality inspection of finished products is not possible because the DT method must be carried out by destroying the finished products. Therefore, technological development is required to address these problems. Currently, quality inspection is performed using an NDT method, such as the analysis of the welding signal measured during the welding process. Although the NDT method based on dynamic resistance, power, current, voltage, and image data has been developed and applied, it is not widely applied in the field because there is a limit to its accuracy and therefore its ability to meet the requirements [5]. In addition, because most of the previous research on the NDT method has focused on inspecting only one or two weld quality metrics, a method that can predict the overall weld quality metrics, including tensile shear strength, indentation depth, expulsion occurrence, and failure mode, is an improvement.
For the development of weld quality prediction technology, research on quality prediction and inspection using electrode displacement of resistance spot welding, dynamic resistance signal, acoustic emission, etc., is being actively conducted. Zhang et al. [9] predicted the tensile shear strength of a spot-welded joint of a mild steel plate with a multiple linear regression model that used parameters extracted from electrode displacement curves with a DA-5 DC transformer displacement transducer to measure the electrode displacement. Yu [10,11] conducted research on a technology that can monitor the weld process and quality of resistance spot welding of automotive steel sheets, including SGACEN, DP980, and CP1180, based on a welding power signal. Hwang et al. [12] carried out research on the prediction of the resistance spot weld quality of a DP780 steel sheet using an adaptive resonance theory artificial neural network. Zhang et al. [13] developed a method to obtain a continuous dynamic reactance signal and conducted a study to predict the tensile shear strength and nugget diameter of a spot-welded joint of an uncoated low-carbon steel sheet by using a radial basis function (RBF) neural network utilizing such a signal. Xia et al. [14] reported a method to quantitatively measure the amount of expulsion occurrence and conducted a study to predict it, using the electrode force and displacement during resistance spot welding of BUSD, BLD, St37-2G, and DP590 steel sheets. Choi et al. [15] conducted a study to predict the tensile shear strength, nugget diameter, and failure mode of a spot-welded joint of 980 MPa grade cold-rolled steel sheets by using a convolutional neural network (CNN) processing heat trace images of the surface appearance of welds. Dejans et al. [16] conducted a study to observe the nugget growth and predict the nugget size of low-carbon steel sheets by monitoring the acoustic emission during resistance spot welding. Kim et al. [17] predicted the indentation depth of a spot-welded joint of SPFC590, SPFC780Y, and SPFC980Y steel sheets based on a regression model using an electrode displacement signal. Although predictive research on each quality metric is being actively conducted, research encompassing all quality metrics, that is, geometrical and physical properties of a spot-welded joint, such as tensile shear strength, indentation depth, expulsion occurrence, and failure mode, is insufficient.
A quality prediction algorithm for the resistance spot welding process that can predict the geometrical and physical properties of a spot-welded joint and evaluate weld quality in accordance with quality acceptance criteria is proposed in this study. For this purpose, four statistical models that predict the main geometrical and physical properties of a spot-welded joint, including the four mentioned above, were estimated based on material information, dynamic resistance, and electrode displacement signals. The significance of the estimated models was verified using an analysis of variance. The prediction accuracies of the models were 94.3%, 93.4%, 97.5%, and 85.0% for the tensile shear strength, indentation depth, expulsion occurrence, and failure modes, respectively. A weld quality evaluation methodology that can predict the properties of a spot-weld joint and judge the overall quality requirements in accordance with authorized welding standards was proposed using the four statistical models.

Materials
In this study, 590, 780, and 980 MPa grade uncoated steel sheets and 980 MPa grade galvanized (GI) steel sheets and galvannealed (GA) steel sheets were used. Table 1 presents the material grade, thickness, tensile strength, and yield strength of the test materials. The test coupon was prepared to a size of 100 mm × 30 mm, and the tensile shear test specimen was welded with it with an overlap of 30 mm. A Cu-Cr dome-type electrode (cap tip) with a tip diameter of 6 mm and a tip radius of 40 mm was used, and the upper and lower cap tips were conditioned by making 50 welds prior to the experiment.

Experimental Setup
The experiments were carried out with a medium frequency direct current (MFDC) resistance spot welding machine, which has a control frequency of 1.0 kHz and a maximum current of 20.0 kA. The welding gun used in the experiments can be set up with a maximum load of 6.0 kN. The equipment used in the resistance spot welding experiment is shown in Figure 1. A Rogowski coil was used to measure the welding current, and the welding voltage was measured using the NI9229 (NATIONAL INSTRUMENTS Corp., Austin, TX, USA) voltage measurement module of National Instruments. Electrode displacement was measured using a linear variable displacement transducer (LVDT). Figure 1b shows the system through which the welding process signal (electrode displacement, current, and voltage) was received by the computer during the welding process. The LVDT used to measure the electrode displacement performs a pneumatic-type displacement measurement up to 10 mm, and the FP50L (MARPOSS GmbH, Hannover, Germany) product with an error of 2-35 µm depending on the height of the sensor was used. The welding current can be measured from 0-15,000 A, and the welding voltage can be measured from −60 to 60 V. The inverter control frequency of the MFDC inverter RSW machine used in the experiment was 1.0 kHz, and pulse width modulation (PWM) control was performed once every half cycle (0.5 ms). Since the welding signal was measured at a sampling rate of 50 kHz, current, voltage, and dynamic resistance were calculated using 25 data per 0.5 ms from raw data of current and voltage. As welding was performed in constant current control (CCC) mode, the average value algorithm was used to calculate welding current and voltage using 25 current and voltage data per 0.5 ms [18]. The dynamic resistance was calculated by dividing the average voltage by the average current every 0.5 ms, as shown in Equation (1).
The electrode displacement was also measured at the same sampling rate as the electrical signal and calculated at the same frequency period to synchronize with the current and voltage signals. The waveforms of the measured electrode displacement and the dynamic resistance signals are shown in Figure 2.

Experimental Procedure
Experiments were conducted according to changes in the welding current and welding time, which are the main process parameters for resistance spot welding. The experimental conditions are listed in Table 2. Expulsion occurrence was investigated through visual inspection by operators or cross-sectional observation of welds. The indentation depth of the welds was measured using a micrometer as the difference between the base metal thickness and the thickness at the center of the welded joint. The tensile shear strength was measured using a universal testing machine with a maximum load of 5000 kg at a tensile test speed of 10 mm/min. After the tensile test, the failure mode of the welded joint was visually checked by the operators. Figure 3 shows the measured electri-

Experimental Procedure
Experiments were conducted according to changes in the welding cu ing time, which are the main process parameters for resistance spot weldi mental conditions are listed in Table 2. Expulsion occurrence was invest visual inspection by operators or cross-sectional observation of welds. T depth of the welds was measured using a micrometer as the difference be

Experimental Procedure
Experiments were conducted according to changes in the welding current and welding time, which are the main process parameters for resistance spot welding. The experimental conditions are listed in Table 2. Expulsion occurrence was investigated through visual inspection by operators or cross-sectional observation of welds. The indentation depth of the welds was measured using a micrometer as the difference between the base metal thickness and the thickness at the center of the welded joint. The tensile shear strength was measured using a universal testing machine with a maximum load of 5000 kg at a tensile test speed of 10 mm/min. After the tensile test, the failure mode of the welded joint was visually checked by the operators. Figure 3 shows the measured electrical signals, stressstrain curve obtained from a tensile test, indentation depth measurement, cross-sectional image of a spot-welded joint, and failure modes after the tensile shear test.

Regression Model 2.4.1. Polynomial Regression Model
Regression analysis is a statistical method that describes the functional relationship between a dependent variable and one or more independent variables. In linear regression analysis, a mathematical relationship between a continuous dependent variable and an independent variable is usually derived by assuming that the relationship is linear. However, if the relationship between the dependent variable and the independent variable is not linear, a large error will occur if a linear regression model is used. In addition, because effect modification, where the effect of one variable is changed by another variable, must be considered in the linear regression model, the polynomial regression model was used to estimate the predictive model of the continuous variables, that is, tensile shear strength and indentation depth. The polynomial regression model can be expressed as where m is the degree of the polynomial, which is also considered the degree of the regression model [19].

Logistic Regression Model
When the dependent variable is a categorical variable, linear regression analysis cannot be applied to deal with discontinuous variables, such as success/failure and good/defective. Logistic regression analysis is a generalized linear regression model used to predict functional relationships between variables by using a discrete dependent variable and one or more independent variables. In this study, a logistic regression model was used to estimate the predictive model of expulsion occurrence and failure mode, which are categorical variables. The logistic regression model can be expressed as Taking the antilog of Equation (3) on both sides, we derive an equation to predict the probability of occurrence of the outcome of interest as follows: (4) where π is the probability of the outcome of interest or "event", α is the Y intercept, β is the regression coefficient, and e = 2.71828 is the base of the system of natural log. X can be categorical or continuous, but the dependent variable is always categorical [20]. Figure 4 shows the feature points selected from the electrode displacement and dynamic resistance waveforms for the development of the welding quality prediction models. Three feature points A, B, and C were selected from the electrode displacement waveform, as shown in Figure 4a to express the electrode displacement characteristics based on the electrode force, thermal expansion, and cooling of the weld. To express the characteristics of the dynamic resistance waveform, the average resistance, area under the dynamic resistance waveform, and feature point D were selected, as shown in Figure 4b. Feature point A is the maximum point of the LVDT electrode displacement waveform, feature point B is the displacement point when the welding current is terminated, and feature point C is the displacement point when the holding time ends. It is observed that the electrode displacement rapidly grows to feature point A due to the expansion of the nugget in the initial stage of welding and reaches the maximum displacement value. Figure 5 shows the electrode displacement and dynamic resistance waveforms according to the welding time, and the nugget diameter and indentation depth at welding times 1 to 6 are shown with cross section images. After the beta peak of dynamic resistance, the workpiece stack-up is softened by melting. The area of the molten portion widens, and the displacement gradually decreases to feature point B, which is the welding end point [8,21]. After point B, a sharp decrease in displacement is observed until feature point C, at which the hold time ends due to the cooling and pressurization of the welded part. Point D in the dynamic resistance waveform represents the value of the dynamic resistance corresponding to point B, the end time of welding. Point D has a high correlation with the average value of the dynamic resistance and the area under the dynamic resistance waveform, which are also significant features for predicting weld quality [22,23]. are shown with cross section images. After the beta peak of dynamic resistance, the workpiece stack-up is softened by melting. The area of the molten portion widens, and the displacement gradually decreases to feature point B, which is the welding end point [8,21]. After point B, a sharp decrease in displacement is observed until feature point C, at which the hold time ends due to the cooling and pressurization of the welded part. Point D in the dynamic resistance waveform represents the value of the dynamic resistance corresponding to point B, the end time of welding. Point D has a high correlation with the average value of the dynamic resistance and the area under the dynamic resistance waveform, which are also significant features for predicting weld quality [22,23].    Table 3 lists the 11 independent variables used to estimate the weld quality models. The independent variables include those representing both the material information and feature points, as shown in Figure 4. The presence or absence of coating, the thickness of the material, and the tensile strength of the test material, are basic data about the material and are denoted as x 1 , x 2 , and x 3 . The five independent variables, x 4~x8 , describe the feature points shown in Figure 4a. The displacement value and time corresponding to point A are denoted as x 4 and x 7 , respectively, and those corresponding to point B are denoted as x 5 and x 8 , respectively. The displacement value at point C is denoted as x 6 , and the time corresponding to point C is excluded from the independent variables because the hold time is fixed at 167 ms. The three independent variables, x 9~x11 , describe the feature points shown in Figure 4b. The average of the dynamic resistance waveform is represented by x 9 , the area by x 10 , and the dynamic resistance value at point D by x 11 .     Table 4 presents the results of the correlation analysis between the four dependent variables (expulsion occurrence, failure mode, indentation depth, and tensile shear strength) and 11 independent variables (x 1~x11 ). As a small value of the correlation coefficient indicates that the relationship between the two variables is not significant, independent variables with a small correlation coefficient were excluded from estimating the model. For the first case, which is the prediction model for expulsion occurrence, x 1 , x 2 and x 3 had small correlation coefficients and the other independent variables had relatively large corre-lation coefficients. This may be because the waveforms of both the electrode displacement and dynamic resistance signals rapidly decrease with the occurrence of expulsion [14]. Therefore, expulsion occurrence can be predicted using the independent variables that represent the electrode displacement and dynamic resistance waveforms. For the second case, which is the prediction model for the failure mode, x 2 , x 3 , x 4 , x 6 , x 7 , x 9 , x 10 , and x 11 had relatively large correlation coefficients. For the third case, which is the prediction model for the indentation depth, x 5 , x 6 , x 7 , x 9 , x 10 , and x 11 had relatively large correlation coefficients. In particular, the indentation depth showed the highest correlation with x 6 , indicating the electrode displacement at the end of pressurization by the electrode force, because x 6 indicates the amount of compression of the test materials [20]. The result of this analysis shows that the material properties of the test steel sheets do not significantly affect the indentation depth. For the last case, which is the prediction model for the tensile strength, x 2 , x 3 , x 4 , x 6 , x 7 , x 9 , x 10 , and x 11 had relatively large correlation coefficients. Because the tensile shear strength of the weld is affected by the thickness and strength of the material, a high correlation is shown in x 2 and x 3 . As x 4 and x 6 increase with the increasing welding current while x 7 decreases, they greatly affect the tensile shear strength of the weld [24].

Prediction Model for Expulsion Occurrence
A logistic regression model was used to estimate the prediction model for expulsion occurrence. The expulsion occurrence prediction model is given by Equation (5). E is the probability of an expulsion occurrence. For the dependent variable, the case wherein expulsion occurred was set to 1, and the case wherein expulsion did not occur was set to 0. The independent variables that were insignificant in the correlation analysis were removed, and the remaining variables (x 4 -x 11 ) were used for the prediction model. The relationship between the independent variables and the dependent variable was estimated using the backward elimination stepwise regression method. The results of the model estimation and coefficient analyses are presented in Table 5. The Hosmer-Lemeshow goodness-of-fit test of the model yielded a result of 0.167, implying that the estimated model is suitable for predicting expulsion occurrence. As a result of the coefficient analysis in Table 5, all p values were less than 0.05, indicating that the estimated model could significantly explain the expulsion occurrence. E = e X 1 + e X , X = −13.54 + 0.0.618x 5 0.0911x 6 − 0.0317x 7 (5)

Prediction Model for Failure Mode
The prediction model for the failure mode was also estimated using a logistic regression model. The failure mode prediction model is shown in Equation (6). F is the probability of the failure mode. As for the dependent variable, the case wherein button failure occurred was set to 1, and the case wherein interfacial failure occurred was set to 0. The independent variables that were insignificant in the correlation analysis were removed, and the remaining variables (x 2 " x 6, x 7 x 9 , x 10 , x 11 ) were used for the prediction model. The prediction model was also estimated using the backward elimination stepwise regression method. The results of the model estimation and coefficient analyses are presented in Table 6. The Hosmer-Lemeshow goodness-of-fit test of the model yielded a result of 0.178, indicating the suitability of the estimated model for the failure mode prediction. As all the p values were less than 0.05, the estimated model could significantly explain the failure mode.

Prediction Model for Indentation Depth
A polynomial regression model was used to estimate the prediction model for indentation depth. The indentation depth prediction model is given by Equation (7). I represents the predicted value of the indentation depth. The dependent variable (indentation depth) was set as a continuous value. The independent variables that were not significant in the correlation analysis were removed and the remaining variables (x 5 , x 6 , x 7 , x 9 , x 10 , x 11 ) were used for the prediction model. The prediction model was also estimated using the backward elimination stepwise regression method. Table 7 presents the results of the analysis of variance (ANOVA). The coefficient of determination (R 2 ) for the estimated model was 93%. The p value of the model was 0.000, indicating that the dependent variable (indentation depth) could be significantly explained by the model. I = −245 + 5.170x 5 + 5.833x 6 + 0.696x 7 + 1257.000x 9 + 0.081x 10 − 1214.000x 11 − 0.008x 5 2 − 0.008x 6 2 − 0.017x 5 ·x 6 − 0.005x 5 ·x 7 − 5.170x 5 ·x 11 − 0.004x 6 ·x 7 − 5.486x 6 ·x 9 + 69.000x 9 2 − 6.070x 9 ·x 10 + 7.180x 10 ·x 11 (7)

Weld Quality Prediction Using Prediction Models
After performing 80 new welds, 80 input variable data were obtained. Tables 9 and 10, Figure 6a,b show the results of applying each input data to the prediction model obtained in Section 3.3. The prediction results for the expulsion occurrence, failure mode, indentation depth and tensile shear strength were 97.5%, 85.0%, 91.9%, and 94%, respectively. In the expulsion occurrence prediction result, condition positive means that expulsion did not occur and condition negative means that expulsion occurred. In addition, in the failure mode prediction result, the condition positive is interfacial failure and the condition negative is button failure. In both graphs in Figure 5, the x-axis represents the predicted value and the y-axis represents the actual value.

Weld Quality Evaluation Algorithm
A prediction algorithm for weld quality was developed based on multiple models, namely, the four regression models for quality prediction discussed in Section 3.3. The weld quality was evaluated based on the weld quality specifications, including the welding quality standards [25,26]. Table 11 presents the weld quality criteria used in this study. Figure 7 illustrates a schematic of the weld quality prediction algorithm based on multiple models. This algorithm begins by measuring the welding signals, welding voltage, current, and electrode displacement. Next, the measured signals are processed, and the processed signals, that is, the features in Table 3, are passed on to each of the four models as the input to the model. Each quality prediction model calculates the predicted value of

Weld Quality Evaluation Algorithm
A prediction algorithm for weld quality was developed based on multiple models, namely, the four regression models for quality prediction discussed in Section 3.3. The weld quality was evaluated based on the weld quality specifications, including the welding quality standards [25,26]. Table 11 presents the weld quality criteria used in this study. Figure 7 illustrates a schematic of the weld quality prediction algorithm based on multiple models. This algorithm begins by measuring the welding signals, welding voltage, current, and electrode displacement. Next, the measured signals are processed, and the processed signals, that is, the features in Table 3, are passed on to each of the four models as the input to the model. Each quality prediction model calculates the predicted value of each quality metric, and the predicted value is sent to the quality evaluation part, as depicted in Figure 7. Finally, the quality evaluation part uses the four predicted values to determine the overall weld quality based on the quality criterion in Table 11. In addition, the quality prediction results of the individual quality metrics were managed, enabling detailed quality control as well as overall quality.

Conclusions
In this study, a weld quality prediction model was estimated using a polynomial regression model and logistic regression model based on the parameters of the material information and welding process signal (electrode displacement and dynamic resistance) information. The results of this study can be summarized as follows: (1) Features were extracted from the material information, electrode displacement waveform, and dynamic resistance waveform as inputs to the weld quality prediction models for expulsion occurrence, failure mode, indentation depth, and tensile shear strength. The effects of the features on the outputs of the models were analyzed using a correlation analysis.
(2) The models were estimated through backward elimination using polynomial regression models and logistic regression models, and the prediction accuracies of the models were 94.3%, 93.4%, 97.5%, and 85.0% for the tensile shear strength, indentation depth, expulsion, and failure mode, respectively.
(3) An algorithm for predicting the overall weld quality was developed based on multiple models and weld quality standards.
The results of this study contribute to the knowledge of automation techniques of weld quality inspection. The study findings are expected to be particularly beneficial in the automobile industry because they indicate the feasibility of automatic prediction of the quality of resistance spot welding for tensile shear strength, depth indentation, expulsion occurrence, and failure modes. In the future, we intend to further improve the models by building a database for various materials, thicknesses, and coatings, and by applying machine learning algorithms such as deep neural networks and CNNs. Funding: This study has been conducted with the support of the Korea Institute of Industrial Technology as "The dynamic parameter control based smart welding system module development for the complete joint penetration weld (kitech EH-21-0003).