## 5 Defect Detection Using ML Techniques and Sensors  
### Acoustic Emission  
Acoustic-based monitoring has been used to monitor welding defects for decades [94]; it has shown proficiency in detecting phase transformation, cracks formation, surface defects, and plasma formation. In addition, the ML algorithms can efficiently classify and detect different defects in welded meltpools [117]. Recently, some studies focused on how to use AE sensors to monitor the conditions of L-PBF processes. However, the potential of using ML algorithms for fast detection and decision-making and control of the L-PBF is still a novel field that needs more conclusive research. Figure 14: Visual representation of k-fold cross-validation. An essential aspect in quantifying and characterizing acoustic emission signatures is the domain they are analyzed in. Time, frequency, and time-frequency domain are the three common approaches used in AE signals analysis. [PERSON] et al. [108] compared the three different domains for different melting conditions of 316L laser tracks using an L-PBF process. A PAC AM41 sensor was used to detect the airborne signals by attaching them to the sidewalls of the build chamber. Four conditions were tested, balling, lack of fusion, no pores, and keyholes, by varying the scan speed and laser power. The authors compared PCA and t-SNE to the collected dataset and proved that t-SNE is a practical feature reduction method for clustering and classification purposes. T-SNE provided better visualization and grouping for the AE signals collected during the different melting conditions. Another comparison between the time domain and frequency domain was performed by [PERSON] et al. [118], using combinations of different ML algorithms to the time and frequency domain of the collected AE signal during the L-PBF process. The acoustic sensor was a PCB microphone fixed at 30\({}^{\circ}\) over the platform attached to the chamber's walls. Five different melt states were tested: balling, slightly balling, normal, and slightly overheating; these were obtained by different laser scan speeds and power combinations. Three different ML algorithms were applied: deep belief neural (DBN) networks, multilayer perceptron (MLP), and support vector machines (SVM). The AE input was tested in three different domains: time domain, frequency domain, and denoised frequency domain. The training sample was 60% of the data, and 40% of the data was used for testing, and were randomly separated before the classification process. Although using the time domain yielded lower classification accuracy for defects, it is recommended to use it if fast decision-making and online control of the LPBF process is going to be applied. A fiber Bragg grating AE sensor to detect the airborne signals by attaching the sensor to the inside wall of the build chamber 20 cm away from the build plate was utilized by [PERSON] et al. [119]. A standard wavelet packet transform (WPT) was used to extract the frequency bands of the raw AE signals, and signals were analyzed in the time-frequency domain in the form of spectrograms, as illustrated in Figure 15a represents the AE signal collected in the time domain, while Figure 15b represents the spectrogram of the AE signal in the time-frequency domain. A CNN was used to classify the AE signals collected from parts at different density levels. This method was able to classify the different quality levels between 79-84% accuracy. The same research group tested the use of SCNN on the same AE signals; the accuracy was slightly improved to 83-89% when using a fixed running window to analyze the time-frequency domain [120]. The long and short running window approach was again tested with SCNN and resulted in higher classification accuracy (78-91%) than other classifiers (CNN, Xception, ResNet). The same AE signals were classified using an RL approach to minimize the time needed for training and data labeling. The accuracy of classification was, however, limited to 74-82% [114].