1. Introduction
Resistance spot welding (RSW) is a manufacturing process that joins two metallic materials by applying high current generating heat and pressure to the components to create the welding spot. The RSW process is known for its high precision and repeatability, ensuring consistent quality and obtaining a solid and durable joint [
1,
2].
This process is widely used in the automotive and aerospace industries, as well as various manufacturing applications, due to its low cycle time, low operating cost, ease of implementation, and flexibility with respect to adapting to different combinations of materials such as steel, aluminium, and titanium, among others [
1]. Consequently, it is essential to ensure the quality of the joints in the resistance welding process since a malfunction can represent a risk to the end user as the assembly fails to fulfill its mechanical and functional requirements. This production error can have severe safety implications when manufacturing medical products or aerospace assemblies.
The mechanical strength evaluation obtained from the RSW process can use destructive or non-destructive testing. Destructive tests (DTs) such as pull, chisel, peeling, and tensile tests quantify the mechanical strength obtained from the joint but modify the physical properties of the components. Therefore, only a sample from an Acceptable Quality Level (AQL), not 100% of the parts [
1,
3], was tested. International standards such as AWS 8.9M-2012 [
4], ISO 15614-12:2021 [
5], and ISO 10447:2015 [
6] regulate these methods. Although DT is more accurate and gives more information about the RSW quality, this process takes time, generates high costs [
7,
8], and cannot evaluate every welded piece.
On the other hand, non-destructive testing (NDT) is the preferred option in characterizing the welding joints since its evaluation “does not alter physical, chemical, mechanical, or dimensional properties and can be applied at any process stage” [
9]. NDT offers a good solution in an automated environment to evaluate RSW quality quickly and in a cost-effective manner. However, the industry still uses human experts, which is a source of uncertainty in evaluation [
10] because it is costly to integrate the methods researched in a laboratory environment into a real-life manufacturing environment [
11].
Multiple studies have investigated the materials’ local mechanical properties, correlating the material response to an external force without altering the weld; for example, ref. [
12] uses vibratory stress relief to evaluate dissimilar steel welding quality, ref. [
13] applies residual stresses to evaluate cruciform weld joints. The work of [
14] correlates the local mechanical properties of the welded material with triangulated 3D image information.
The most common approaches to reduce time loss in production associated with quality inspections are preventing the creation of defective parts (during the process) and identifying faulty parts (after the process) [
11]. For precluding, the welding systems continuously monitor its parameters to identify anomalies. For identification, the experts evaluate and categorize the resulting product as acceptable or defective.
The input settings of the process define the properties of the RSW, where the parameters of electrode pressure, current, and welding time play a fundamental role. The quality of the weld is highly dependent on the accuracy and control of these parameters [
15]. The welding time and current cause temperature distribution in the weld zone and melting point growth, and applying electrode pressure ensures proper contact between the welded parts [
16]. It is essential to have a system that continuously monitors their evolution over time as most of these parameters vary during the melting point formation [
17]. The monitoring allows the identification of any anomaly during the process.
The investigation presented in [
18] implemented a real-time system based on wavelet threshold analysis to monitor and validate the temperature field within a virtual environment. They report high precision, although they took into consideration only one parameter. The work of [
19] observed that the displacement of the electrode (DE) recorded with a camera can help predict the input parameters, nugget size, and strength. However, the camera has to be placed in a fixed position relative to the electrodes to observe the displacement. Ref. [
20] correlated the indentation displacement with the nugget growth, expulsion, and diameter, but they did not associate the results with the mechanical strength of the piece. The research of [
21] was able to cluster dynamic resistance curves (DRCs), but their results strictly depend on the electrodes’ wear status. The approach of [
22] predicts the quality using machine learning models trained on information about the production containing time series data (e.g., current, voltage, or resistance) and single features (e.g., wear count or operating status information). Their work predicts with minor errors the future piece, though they cannot manage random changes, and the quality is not only influenced by the linear wearing effects.
Although online methods can offer a large amount of information to predict the weld’s quality accurately, they are costly to implement, and the latency can affect the results. Also, the published methods can only predict the quality of the upcoming pieces.
There are multiple approaches to identifying faulty pieces in the production line. Ultrasonic testing is the most widely used non-destructive testing in the automotive industry, but its accuracy depends on the user’s skills [
3]. Authors of [
23] proposed a machine learning model for the ultrasonic test classification in the RSW process, applying classification and regression tree (CART) and Random Forest techniques as pattern-recognition tools. They classified the welding spots into four categories: good weld, undersized weld, stick weld, and no weld. Although it is considered the most accurate evaluation method [
24], it is limited to the ultrasonic beam orientation as it has to be perpendicular to the tested surface [
25]. Also, it is challenging to apply restricted irregular surfaces [
24], and a skilled operator is needed to interpret the signals.
Another popular non-destructive testing method is thermal imaging, which determines the quality of the RSW joint by estimating the area of the welding spot nugget. This method ensures an effective joint of the components and ensures quality.
The work of [
26] used thermal images to determine the welding nugget diameter, using the color gradients for the calculation of the dimension and verifying with a visual inspection, obtaining a difference of 22% compared to the naked eye measurement of the melting point. However, the setup of their lock-in technique can be time-consuming and more expensive compared to other thermographic techniques.
To determine the quality of dissimilar dual-phase (DP) 600 and series 300 stain steel (AISI 304), ref. [
27] used thermal images obtained during the RSW to train a Convolutional Neural Network (CNN). Even though they report 97.3%, they used the dataset of [
28] only, classifying the weld quality.
For the RSW process evaluation, ref. [
7] presented a model using CNN and a thermal imaging camera to predict the size and shape of the melting area. The model consisted of two steps: (1) reduce the noise of the videos taken by a thermographic camera, and (2) develop a 2D CNN model to detect the adequate start time of each video and the weld center for segmentation and weld size detection. They also identified that the reflection property of dissimilar weld materials is the leading cause of the variation in prediction. Although they report desirable accuracy, they only evaluate the nugget shape based on the thermal images.
Since surface defects contain features related to the joint’s mechanical performance, ref. [
3] proposed image analysis based on vision and image-processing systems to determine the surface quality during welding.
While [
29] established a correlation between visual information and the welding parameters, investigating the cathode anode surface on the welding discharge using high-speed cameras, the authors of [
30] used the pull-off strength, nugget diameter, and fracture mode for prediction utilizing the heat trace in an image of the weld surface with a CNN algorithm. However, accurate predictions require controlling illumination, distance, and image angle. In addition, electrode contamination and misalignment affected its performance as the surface heat trace depends on heat-transfer conditions. In addition, they are only able to predict good-quality welding.
For position detection and spot welding quality, ref. [
3] proposed a CNN MobileNetV3 lightweight network. Also, they introduced a data-augmentation technique for the training process, which randomly picks, organizes, and merges four into one image and evaluates all four images at once, making the network training more robust. They detect multiple nuggets accurately but can only distinguish between good and bad quality.
Finally, ref. [
2] proposed a multiscale CNN model with an attention mechanism called AcmNet for the classification of solder spots into seven types: normal, copper adhesion, edge, overlap, mutilation, splash, and twist. Even though they report high accuracy, their model can categorize only the final quality but cannot suggest possible changes in the setup parameters.
To evaluate the relation between the mechanical properties, such as mechanical strength, and the variation of input parameters, ref. [
15] monitored the current, voltage, electrical resistance, and electrode pressure during the exploration of the feasibility of welding two steel materials, Quenching and Partitioning (Q&P) and Transformation-Induced Plasticity (TRIP). They reported that welding current, electrode force, and welding time were key parameters influencing weld quality. However, they can estimate this through expensive adjustments to the machinery.
To estimate the influence of polarity on a resistance welding machine, ref. [
28] conducted a study by recording voltage and current parameters using a Rogowski coil. Additionally, they used a thermographic camera to record the temperature. They calculated the influence of two polarities on the surface appearance, fusion diameter, and the failure modes measured with a pull-out test. Interfacial failure (IF) occurs when there is a break in the weld zone, and pull-out failure (PF) mode where the break occurs in the base material adjacent to the fusion zone. The results also show no significant correlation between the nugget diameter and the welding time.
A Random Forest model classified the weld quality into three categories (cold welds, expulsion, and good welds) in the work of [
31] by capturing electrical parameters such as voltage, current, and dynamic resistance calculation. They successfully connected the process parameters with the results; however, their model’s accuracy indicates that there is still a need for a human expert during the evaluation.
For weld quality estimation, ref. [
32] proposed a method utilizing the current, voltage, and dynamic resistance parameters obtained during the process. These input parameters are converted into images and then processed using a CNN. Sensors recorded the voltage, current, and clamping force during welding. Then, they calculated the dynamic resistance based on the voltage’s instantaneous values and the sensor’s sampling period during the cycle. The reported accuracy in this work is 98%, but in some cases, it was overfitting.
Similarly, ref. [
33] proposed an in-line system monitoring current and voltage. The model classified the weld quality during the current signal analysis into three categories: bad welds, good welds, and metal expulsion welds. Then, these signals served as input to an artificial neural network and regression model. The presented model can predict the nugget size and quality based on current and voltage. However, it cannot predict the hidden structural characteristics.
Finally, ref. [
34] monitored the current and voltage parameters to determine the mechanical resistance. They also explored the relationship between electrode pressure and dynamic resistance. According to the report, the electrode pressure affects the initial peak of the dynamic resistance. In the study, two regression models and a neural network predicted the melt diameter from the dynamic resistance, and a principal component analysis (PCA) reduced dimensionality and computational cost. However, they failed to explain the dataset characteristics they used as input information.
Moreover, the works of [
33,
34] use a Rogowski coil, a popular choice for measuring high-current applications with a lower limit of 1.0 kA and an upper limit of 2.4 kA. However, these coils are susceptible to external magnetic fields, which affects measurement accuracy—compared to current transformers that are less sensitive to external magnetic interference [
35], making them a more reliable option in environments with high electromagnetic activity. Also, Rogowski coils can have other drawbacks in high-frequency applications, limiting their versatility and accuracy in these scenarios. They also require an integrator circuit for signal conditioning, which increases the system’s complexity.
The works mentioned above primarily focused on the force parameter assigned as input when recording electrode force. While this approach helps monitor and control the force applied in the operation, it overlooks the potential of real-time force measurements during the operation. Furthermore, the examined computer vision articles utilize CNN to evaluate and categorize the weld quality using only the visual outcome of the nugget. These approaches lose the opportunity to connect the input variables of the RSW process with the result images due to the complex nature of the experiment setup.
This study proposes a non-destructive RSW evaluation framework using computer vision and machine learning models to connect the welding spot’s mechanical characteristics and process parameters with the nugget’s image information. The trained models have practical applications in welding and manufacturing, as the automated process requires cheap and continuous quality monitoring and feedback systems. The proposed framework can train models that not only classify the quality of the welded nugget but also provide valuable insights into the welding process parameters using only image information. A spot welding test bench was assembled and used for the dataset generation, where the system continuously monitors the applied force and current over the welding spot’s formation. This work proposes six machine-learning models to correlate thermal and visible images with the process parameters. These models use CNNs to classify the fusion quality and predict the welding spot’s mechanical characteristics and process parameters.