1 Introduction

The automotive, shipbuilding, chemical, and biomedical industries all heavily rely on resistance spot welding. Given its benefits of high productivity, low cost, and high efficiency, it is regarded as a promising welding technique [1,2,3]. Resistance spot welding, as all knows, it’s a complex thermal-electrical process including thermal, electrical, mechanical, as well as metallurgical elements. The quality of the welding stays greatly impacted by noise, mistakes, and different process circumstances [4]. As a result, a variety of factors and their interactions affect welding quality. Acquiring good welding quality during practical production is a difficult undertaking for experienced operators to choose the right combinations of process parameters. It is now important to investigate a practical method for welding process parameter references in order to ensure as well as maximize the quality of the weld. This technique has great theoretical and practical relevance [5]. A few literature papers have been written about the process of modeling welding and developing mathematical models that establish a relationship between technological parameters and welding quality. These models make use of the Taguchi technique, response surface methodology, grey relational analysis, and soft computing [6,7,8,9,10].

Several destructive and non-destructive approaches utilized to measure and manage the welding quality [11, 12]. Destructive examination techniques, including tensile shear testing and peel testing, are often used after welding and have a high degree of dependability in separating unqualified and expelled welds from all welding samples. Nevertheless, its poor productivity, offline control feature, and installation expense make it unsuitable as an evaluation technique for industrial output. On the other hand, the nondestructive examination approach uses a variety of procedure factors throughout the welding procedure to assess the welding process’s quality [13]. Several studies have processed and examined mechanical, electrical, online, ultrasonic, offline, and ultrasonic data to elucidate the links between the signals and welding quality [14]. These signals may be utilized to monitor and evaluate the welding quality as the majority of their components change as the welding nugget forms and develops during the course of the welding operation.

On the other hand, sometimes, unqualified welds with incorrect welding process parameter combinations may also be used in the manufacturing line. An undersized nugget, for instance, with inadequate mechanical performance may result in catastrophic structural collapse [15]. Conversely, expulsion is the expulsion of melted metal from metal sheet edges or from electrodes to metal sheet interfaces. This causes a severe defect where the welding strength is destroyed due to inadequate nugget volume [16]. Additionally, because of the very high temperature dispersion throughout the electrode surface, it shortens the electrode life. As a result, ensuring the uniformity of welding quality in welding production lines is crucial.

Since the artificial neural network can suit the complex nonlinear mapping connection, it is typically used to describe the welding process [17]. Zhao et al. [18] employed deuce regression methods and an artificial neural network model to calculate the welding quality of TC2 titanium alloy with a thickness of 0.4 mm. The study by Zhou et al. [19] investigated predictive quality monitoring in RSW using machine learning in conjunction have subject-matter knowledge. Then, they mostly disregarded the notion that welding is an ongoing process with predictable dynamics and production cycles triggered by maintenance, seeing welding operations as singular events. In addition, it has been common practice in the industrial sector to ignore model clarification based on technical skill, that is a substantial as well as pervasive repetition. Zhao et al. [20] examined 20 pertinent variables that were derived from the dynamic resistance signal of the welding process in order to explore the link between active resistance, welding quality, and welding parameters using the step-by-step regression approach. The qualifying qualities were then included into mathematical models that were created later. Dai et al. [21] have examined a quality evaluation system depend on dynamic resistance (DR) signals in an effort to precisely forecast welding quality. The suggested method blends welding procedure constancy with deep learning methods.

2 Materials and methodology

2.1 Materials

Cold-rolled JSC980YL steel having a thickness of 1.6 mm was employed in this experiment. Table 1 displays the chemical compositions of the ferrite-martensite dual-phase steel, JSC980YL. The RSW experiments were achieved using Cu-Cr dome radius electrodes with a surface diameter of 8.0 mm. Initial investigate was done to see how nugget growth would change when welding current increased from 4.5 kA to 10.0 kA, as shown in Fig. 1. The welding schedules are tabulated in Table 2. The joints were subsequently made using tierce welding currents: 5.0 kA, 6.5 kA, and 8.5 kA, which resembled to a petite nugget, a nugget have a diameter of \(4\sqrt t\) (t denotes sheet thickness), and an expanded nugget without ejection, respectively. It’s crucial to keep in mind that the selection of these welding currents aims to induce differences in failure mode and weld form.

Fig. 1
figure 1

Graph representation of diameter of nuggets in relation to welding current

Table 1 JSC980YL steel’s nominal chemical composition (wt%)
Table 2 Schedules for welding

The tensile shear test specimen was fabricated to a dimension of 100 mm by 30 mm and then welded to the test coupon with a 30 mm overlap. 50 welds were produced to condition the top and lower cap tips of a Cu-Cr dome-type electrode (cap tip) prior to the experiment. The electrode had a 40 mm tip radius and a 6 mm tip diameter.

2.2 Experimental setup

The testing was done using medium frequency direct current (MFDC) RSW equipment with a control frequency of 1.0 kHz and an extreme current of 20.0 kA. The welding gun utilized in the testing can withstand an extreme load of 6.0 kN. The National Instruments NI9229 voltage measurement module (NATIONAL INSTRUMENTS Corp., Austin, TX, USA) was used to measure the welding voltage, and a Rogowski coil was used to measure the welding current. The electrode movement was determined utilizing a linear variable displacement transducer (LVDT). Fig. 2 depicts the method that enabled the computer to receive the signal for the welding process, which comprised electrode movement, current, and voltage. The LVDT utilized to measure the electrode displacement is the FP50L device, which has an error of 2–35 based on the height of the sensor and does pneumatic-type movement measurements up to 10 mm. Both the welding voltage (between − 0 and 60 V) and welding current (between 0 and 15,000 A) may be detected. The MFDC inverter RSW machine utilized in the research featured a pulse width modulation (PWM) manage that was achieved once per half cycle and an inverter control frequency of 1.0 kHz (0.5 ms). The untreated current and voltage data were utilized to calculate the voltage, current, and dynamic resistance utilizing 25 data points every 0.5 ms, with the welding signal sampled at a rate of 50 kHz. Since the welding was being done in constant current control (CCC) mode, the welding current and voltage were determined using the average value approach utilizing 25 voltage and current data every 0.5 ms. The active resistance was measured using Eq. (1) by dividing the median voltage by the median current each 0.5 ms.

$$R=\frac{V}{I}$$
(1)

The electrode movement likewise estimated at the similar frequency period and recorded at the similar sample degree as the electrical signal in order to maintain synchronization with the voltage and current signals. The dynamic resistance signals and the electrode displacement waveforms are shown in Fig. 3 respectively.

Fig. 2
figure 2

(a) Resistance spot welding machine and (b) Diagrammatic representation of the RSW process’s monitoring system

Fig. 3
figure 3

Dynamic resistance and electrode displacement waveforms during the welding process

2.3 Methodology

2.3.1 Process parameter prediction using a neuro-fuzzy control system

In this work, the resistance spot welding weld strength was predicted using the NFCS model. NFCS has a reputation for being a useful model for dynamic, time-varying processes that are uncertain or nonlinear. Every neuron in the structure of this multilayer feedforward system must perform its job in response to received signals. It can be utilized to map a collection of rules to a set of output characteristics, a set of output characteristics to an output Membership function (MF), an output MF to a single choice related to the output, and an output MF to a set of if-then rules. The functions of each NFCS layer are specific to the computation of the input-output parameter sets [22]. The function is explained as follows for each layer:

Layer 1

The adaptive type nodes at this layer serve the following purposes.

$${L_1}O={\alpha _X}\left( r \right)$$
(2)
$${L_2}O={\alpha _Y}\left( r \right)$$
(3)

where X or Y are the fuzzy values associated with the node (such as huge, small, etc.) and r and s are the inputs to the first group. Put otherwise, \({L_1}O\) is the degree of r and s’s membership at X and Y. It is possible to think about membership functions as several functions, including welding current, welding time, electrode force, and steel thickness.

Layer 2

The output of every fixed node in this layer, \(\prod\)which is termed, equals the product of the input signals.

Layer 3

In this layer, every node is a fixed node that splits each input into its total input.

$${L_{3,n}}={\bar {w}_n}=\frac{{{w_n}}}{{\sum\limits_{{m=1}}^{x} {{w_m}} }}\,\,n=1,2$$
(4)

Layer 4

This layer consists of adaptive nodes, each of whose output is equivalent to:

$${L_{4,n}}={\bar {w}_n}{g_n}={\bar {w}_n}\left( {{a_n}r+{b_n}s+{c_n}} \right)\,;\,\,n=1,2$$
(5)

Layer 5

This layer’s simple node is a fixed node named\(\sum\), and it computes the final output by adding the signals that enter it.

$${L_{5,n}}=\sum\limits_{n} {{{\bar {w}}_n}{g_n}} =\frac{{\sum\limits_{n} {{w_n}{g_n}} }}{{\sum\limits_{n} {{w_n}} }}\,;\,\,n=1,2$$
(6)

NFCS needs to meet several requirements in order to support Sugeno-type systems:

  • be Sugeno-type first- or zeroth-order systems.

  • possess a solitary output that is the result of weighted average defuzzification. Every output MF needs to have the same type and be constant or linear.

  • Do not share any rules. The output MFs of different rules cannot be shared; that is, there must be an equal number of outputs MFs for every rule.

  • Assign a single weight to every rule.

All of the data falls between zero and one in this sense. Two categories should be created out of all the available data: training data and test data. One-third of the data are chosen for testing and two-thirds are designated for training in this study. The data was chosen in an entirely random manner. The NFCS model is trained using training data, and it is validated using test data. The kind of membership functions and the number of them in each entry, together with the number of repetitions in the training phase, are the most crucial design parameters in the neural fuzzy model that must be chosen to obtain the greatest accuracy. The quantity of input parameters is the primary limitation in the development of the NFCS model. If NFCS inputs surpass five, it will not be able to develop model output in relation to inputs and will increase the number of rules and computing time. The network’s accuracy, dependability, and error rate can all be improved by making the four required changes in order to identify the most significant NFCS model. The number of membership functions, MF types (welding current, welding time, electrode force, and steel thickness), MF types (tensile shear strength) for the output, optimization techniques (hybrid or back-propagation), and epoch counts are some examples of these settings.

Following simulations and modelling, it was shown that better results are obtained when Gaussian membership functions are utilized in all inputs. Additionally, a more accurate model will be provided when there are two membership functions in each of the four inputs. It was also noted during the design phase that a post-error technique is the best training algorithm for the neural fuzzy model, and that using the hybrid method might result in overlearning and unsatisfactory outcomes. Using data retrieved from studies, the minimal error of the test phase is used to establish the proper number of repetitions in the training phase. The best results for the current model are obtained after 15,000 repeats. The NFCS model’s basic layout and specifications are shown in Fig. 4. Taking into account the two membership functions, Fig. 4 illustrates that there will be 24 rules for every entry. The membership functions for the four inputs are shown in Fig. 5(a) and (b) both before and after training.

Fig. 4
figure 4

Structure of Neuro fuzzy spot-welding model

Fig. 5
figure 5

Membership functions related to (a) Pre-training model inputs and (b) inputs after training

3 Results and discussion

The trials carried out by Darwish et al. provided the data utilized in this investigation [23] is tabulated in Table 3.

He tried aluminum plates with thicknesses of 0.5, 1, 1/5, 2, and 2.5 mm in his experiments. Since the electrical resistance of plates with thicknesses of 0.5 and 2.5 mm was first identified, the electrical resistance of plates with thicknesses of 1, 1/5, and 2 may be ascertained using the linear relationship between them, hence facilitating the computation of welding energy consumption.

Table 3 Spot welding laboratory data [23]

The primary design factors under investigation in this work are the welding duration, electrode force, and current intensity. It is preferable to acquire any other three parameters by picking any thickness since the sheet’s thickness is fixed and depends upon the manner in which the parameter is applied, making it unsuitable for use as a design parameter. As said, optimization aims to increase strength while using less energy. As such, we need to work together to achieve two objectives. Determine the welding strength using the NFCS model; however, the energy required is determined by calculating the electrical power used. Power, time, and current are among the design factors in Eq. (7), along with R, since the electrical resistance of aluminium varies with plate thickness. Table 4 lists the plates’ electrical resistance for a range of thicknesses.

$$P=R * {\left[ I \right]^2} * T$$
(7)
Table 4 Aluminium plate resistance at varying thicknesses

Table 5 displays the optimization results for a plate with a thickness of 0.5 mm from both the current work and the work completed in reference 1. The findings show that in addition to improving the weld strength, the derived ideal parameters also greatly decreased the amount of energy used.

Table 5 After optimization, the thickness is 0.5 mm

Reducing test and training errors during model training is seen in Fig. 6. The Root mean square error (RMSE) is the error shown in this graphic. According to the figure, the test error is 0.0041 and the training error for the normalized output is identical to 0.0061 after 15,000 repetitions. These numbers may be multiplied by 1357.3, the maximum strength, to get the root mean of the square error. Given the magnitude of the output number, the test phase’s result, which is 59.85 N, is modest compared to the training value of 8.279 N. Nevertheless, it can be concluded that the model performed an excellent job of estimating the real values. The NFCS model’s output and the real data values for the training and test phases of the modelling process are shown in Fig. 7(a) and (b). Ten times as many populations as there are design parameters (30) and 100 repetitions each population. For a thickness of 0.5 mm, Fig. 8 illustrates how the cost function was reduced throughout the optimization process. As a result, this model will be used to maximize spot welding strength while minimizing energy consumption by optimizing the welding settings.

Fig. 6
figure 6

Error pertaining to the test and training phases

Fig. 7
figure 7

Comparison analysis of real values and model output for (a) Training data and Testing data (b) Allowable Quality Limit

Fig. 8
figure 8

During the optimization process, the cost function shifts

3.1 Prediction model for tensile shear strength (TSS) utilizing NFCS method

The estimation of the TSS prediction model likewise made use of the backward removal strategy of the multinomial regression method. The TSS prediction method is shown in equ.8. displays the anticipated value for the TSS. The prediction model was constructed using the independent variables \(\left( {{i_2},{i_3},{i_4},{i_6},{i_7},{i_8},{i_9},{i_{10}},{i_{11}}} \right)\)that remained after the correlation analysis eliminated those that proved to be unimportant. The findings of the analysis of variance (ANOVA) are shown in Table 6. The calculated model’s coefficient of determination\(\left( {{R^2}} \right)\) was 97.02%. Tensile shear strength, the dependent variable, may be substantially explained by the estimated model, according to the model’s value of 0.000.

$${S_{Ts}} = - 42.37 + 240.668{i_2} - 0.214{i_3} - 0.006{i_4} -$$
$$0.04{i_5}\;0.045{i_6} - 0.01{i_7} - 13.100{i_9} + 0.006{i_{10}}$$
$$- 4.550{i_{11}} - 121.870i_2^2 - 0.0003i_4^2\;68.000i_9^2$$
$$+ 0.201i_2^{} * {i_3} - 0.046{i_2}{i_6} - 92.460{i_2}{i_9} -$$
$$0.00003{i_3}{i_7} - 0.0025{i_3}{i_{11}} + 0.182{i_4}{i_9} +$$
$$0.254{i_6}{i_9} + 0.089{i_6}{i_{11}} - 0.0001{i_7}{i_{10}}$$
$$+ o.215{i_7}{i_{11}}$$
(8)
Table 6 ANOVA of the TSS prediction model

3.2 Predicting weld quality using prediction models

Following the acquisition of 80 fresh welds, 80 input variable data were attained. Tables 5, 6, 7 and 8, it was projected that 97.5%, 85.0%, 91.9%, and 94% of the total will experience the ejection incidence, failure mechanism, indentation depth, and tensile shear strength, respectively. Fig. 9 shows the confusion matrix of the proposed forecast model. Expulsion did not occur, according to the expulsion circumstance prediction outcomes condition optimistic, yet expulsion happened, according to condition harmful. Additionally, in the misstep mode forecast outcome, interfacial failure is the condition optimistic and button failure is the condition harmful.

Table 7 Confusion matrix for the expulsion event prediction outcome
Fig. 9
figure 9

Confusion matrix of the proposed prediction model

Table 8 Failure mode prediction outcome confusion matrix

In Fig. 10’s two graphs, the x-axis denotes the forecasted rate, while the y-axis displays the original value in which the neuro fuzzy controller is predicts the indentation depth and the TSS.

Fig. 10
figure 10

Comparison of the actual value with the expected rate (a) indentation depth; (b) tensile shear strength

4 Conclusion

In this research integrating crucial input parameters, including welding current (12,455 A), electrode force (1651.2 N), steel thickness (0.5 mm), welding time (72 ms), and tensile shear strength (594 N), the NFCS yielded impressive outcomes that it significantly reduces the energy consumption to 5253.8 J, marking a substantial improvement over the reference study’s energy expenditure of 26,000 J. Concurrently, the NFCS elevated the tensile strength of the weld to 594 N, surpassing the reference study’s result of 350 N. These findings highlight the NFCS as a cost-effective and efficient technology for bolstering RSW weld quality in industrial settings. In summary, the NFCS stands as a promising innovation for the manufacturing industry, offering the potential to improve weld quality, reduce energy consumption, and improved the prediction accuracy of quality in resistance spot welding is 98.2%. In future, NFCS will be used to predict the compressive strengths of the resistance spot welding.