## 2 Proposed Methodology
### Unsupervised Feature Extraction by CNN  
Convolutional neural networks (CNNs) are artificial neural networks that incorporate convolution (in fact, cross correlation) operations. By using the convolution operations, the spatial information of the 2D data can be preserved. The initial layers of convolutional neural networks learn low-level features, such as edges, while the deeper layers learn more complicated features, such as shape-CNN has shown excellent performance in the area of image recognition. Pre-trained CNNs contain informative features of an image. Therefore, pretrained CNNs can be used for unsupervised feature extraction ([PERSON] et al., 2019; [PERSON] et al., 2020).  
For unsupervised feature extraction, first, a proper CNN architecture should be determined. The complexity of a pretrained CNN is associated with the number of features that can be extracted from images converted from resistance spot welding waveforms. If the complexity is too low, relevant features cannot be captured. If the complexity is too high, unnecessary computational resources can be wasted. For example, CNNs can be implemented by modifying LeNet-5 ([PERSON] et al., 2019). As illustrated in Figure 13, the CNN architecture consists of two convolution layers and two fully connected layers. The kernel sizes of the convolution layers in this example were \(1\times 1\), \(3\times 3\). The activation function was a rectified linear unit (ReLU). The CNN architecture can be pretrained using the RP images of the dynamic resistance waveforms from resistance spot welding machines with healthy electrode tips. When the pretrained CNN becomes available, the activation maps of the last convolutional layer are used for unsupervised feature extraction. Only the information from the activation maps of the pretrained CNN is used to assess the health condition of the welding electrode tips. The specific procedures are described in Section 2.3.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Method** & \(f_{1}(x)\) & \(f_{2}(x)\) & \(f_{3}(x)\) & \(f_{2}(x)+\omega(x)\) & \(f_{2}(x)+2\omega(x)\) \\ \hline Original RP & 71.93\% & 86.97\% & 93.68\% & 87.73\% & 89.51\% \\ Proposed RP & 14.17\% & 36.41\% & 59.23\% & 36.50\% & 36.39\% \\ \hline \hline \end{tabular}
\end{table}
Table 2: Comparison of yellow area ratio for a simulated dynamic resistance waveform.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Pattern** & **Meaning** \\ \hline Homogeneity & The process is stationary. \\ Fading to the upper left and lower right corners & Nonstationary data; contains a trend or a drift. \\ Disruptions (White bands) & Nonstationary data; some states are rare or far from the normal. \\ Periodic/quasi-periodic patterns & Cyclicities in the process \\ Single isolated points & Strong fluctuation in the process \\ Diagonal lines (parallel to the LOI) & State evolution is similar at different epochs. \\ Diagonal lines (orthogonal to the LOI) & State evolution is similar at different times but with reverse time. \\ Vertical and horizontal lines/clusters & Some states do not change. \\ Long bowed line structures & State evolution is similar at different epochs but with different velocity. \\ \hline \hline \end{tabular}
\end{table}
Table 3: Typical pattern in RPs and meanings ([PERSON] et al., 2018).