Data Treatment of In Situ Monitoring Systems in Selective Laser Melting Machines

Quality assurance of the final build part in laser‐powder bed fusion (L‐PBF) is greatly influenced by the various process steps such as powder handling, powder bed spreading, and laser‐material interaction. Each process step is interlinked to each other and can affect the overall behavior of the succeeding steps. Therefore, it is vital to monitor each step individually, post‐process, and establish a link among the data to develop an approach to quantify the defects via inline monitoring. This study focuses on using pre‐ and post‐exposure powder bed image data and in situ melt pool monitoring (MPM) data to monitor the build's overall quality. Two convolutional neural networks have been trained to treat the pre and post‐exposure images with a trained accuracy of 93.16% and 96.20%, respectively. The supervised machine‐learning algorithm called “support vector machine” is used to classify and post‐process the photodiodes data obtained from the MPM. A case study on “benchmark part” is presented to check the proposed algorithms' overall working and detect abnormalities at three different process steps (pre and post‐exposure, MPM) individually. This study shows the potential of machine learning approaches to improve the overall reliability of the (L‐PBF) process by inter‐linking the different process steps.


Introduction
Recently, additive manufacturing (AM) has observed tremendous growth in various industries such as aerospace, biomedical, automotive, energy, and tooling due to its capability to manufacture complex parts with ease. According to Wohler's report of 2019, the metal AM industry has shown record growth with an increase of 41.9%. [1] The reported growth indicates that the AM industry has significant potential in patient-specific medical implants, lightweight components for the aerospace and automotive sector, which eventually reduced fuel consumption. However, the process repeatability and reliability remain a significant concern in AM. [2] Therefore, the need for implementing in situ or realtime monitoring sensors is inevitable.
Laser-powder bed fusion (L-PBF) also, commonly known as selective laser melting (SLM) or direct laser melt sintering (DMLS), is one of the many AM techniques. L-PBF uses the metal powder material deposited in a layer-by-layer fashion to create a 3D model from a digital computer-aided design (CAD). After each powder recoating layer, the laser fuses the metal powder material selectively for that specific layer; afterward, the next new layer of powder is uniformly distributed by the recoater. The process repeats until the whole 3D model is manufactured. The total manufacturing time can vary from hours to days, based on the part's geometrical features. Despite tremendous technological advancements in developing the latest commercial L-PBF systems, the process reliability and repeatability still need to materialize. Thus, the L-PBF process has many input parameters that can significantly influence the part's overall quality. [3][4][5] For instance, Van Elsen has listed at least 50 parameters that can affect the final part quality. [6] The expensive and time-consuming nondestructive techniques (NDTs), such as computed tomography (CT), are used to check the overall part health and quantify the defects. [6] Therefore, to improve the comprehensive quality assurance and monitor the process in real time, active research is directed on using in situ sensors based on real-time monitoring, data analytics, and process control. The overall thrust has been developing the models with hardware and data analytics techniques to isolate the type, location, and severity of the defects in real time. [7] The final aim can be achieved by developing a closed feedback control loop to mitigate these defects inline. In the literature, different means of measurement, such as infrared thermography, pyrometry, optical spectroscopy, ultrasonic sensors, and so on, are reported to monitor the L-PBF process. [8,9] Considering the subject's vast scope, we focus mainly on reviewing the recent development in fault detection in the L-PBF process using machine learning (ML) based on sensors' responses.
A large scale of data being generated with an increase in the number of sensors used to monitor the process. An extensive set of data also poses a significant challenge related to storage and postprocessing. ML is an alternative way to cope with the challenges mentioned earlier. Furthermore, ML can postprocess the data in real time. Many powerful and sophisticated ML models have been developed with advanced hardware in the last decade, P. Yadav Quality assurance of the final build part in laser-powder bed fusion (L-PBF) is greatly influenced by the various process steps such as powder handling, powder bed spreading, and laser-material interaction. Each process step is interlinked to each other and can affect the overall behavior of the succeeding steps. Therefore, it is vital to monitor each step individually, post-process, and establish a link among the data to develop an approach to quantify the defects via inline monitoring. This study focuses on using pre-and post-exposure powder bed image data and in situ melt pool monitoring (MPM) data to monitor the build's overall quality. Two convolutional neural networks have been trained to treat the pre and post-exposure images with a trained accuracy of 93.16% and 96.20%, respectively. The supervised machine-learning algorithm called "support vector machine" is used to classify and post-process the photodiodes data obtained from the MPM. A case study on "benchmark part" is presented to check the proposed algorithms' overall working and detect abnormalities at three different process steps (pre and post-exposure, MPM) individually. This study shows the potential of machine learning approaches to improve the overall reliability of the (L-PBF) process by inter-linking the different process steps.
capable of identifying complex nonlinear relationships from massive data. [10][11][12][13] Ideally, ML approaches can be divided into three subgroups: supervised, semisupervised, and unsupervised approaches. Supervised ML requires a labeled dataset to train the specific model. In other words, each training data point has a label, e.g., "good" and "bad," and users must know the ground truth of the training dataset before learning. In many applications such as AM, sometimes, it is a very costly and laborious task to understand the data points' labels, whereas in the unsupervised ML approach, there is no prior requirement of the labels for the training dataset. The algorithm tries to find a pattern based on some relationships among the dataset. As the name suggests, the semisupervised learning approach uses a combination of supervised and unsupervised approaches at the same time. In other words, it requires both labeled and unlabeled datasets. This approach can be helpful where obtaining the ground truth dataset is a very challenging task. [14][15][16][17] Abdelrahman et al. proposed in situ flaw detection using a layerwise optical imaging system that captures the powder bed's images before and postprinting in the L-PBF process. The images were captured in different lighting conditions to enhance the chances of flaw detection. The proposed approach showed a sensitivity of 91.5% and specificity of 84%. [18] Scime and Beuth used a visible range optical camera to capture the powder bed images, which were then used to detect powder bed flaws, such as "part hopping," part failure, streaking, super-elevation, and so on, by using computer vision and ML approaches. In their earlier work, they have proposed an ML algorithm called "bag of words" to classify the flaws mentioned earlier with an accuracy ranging from 65% to 99%. [19] Their recent work has proposed a multiscale convolutional neural network (CNN) based using a transfer learning approach, which showed an accuracy of 72.7%. [20] Okaro et al. developed a semisupervised model using photodiode data to classify the finished parts based on their mechanical properties. The reported model showed an accuracy of 77%. [21] Gobert et al. proposed a supervised ML approach based on the layerwise in situ images captured using a digital single-lens reflex camera. The proposed supervised ML approach was able to predict cracking, porosity, and lack of fusion defects with a reported accuracy of 85%. The anticipated ML results were matched with the CT scan results as well. [22] Ye et al. and Schevchik et al. used an acoustic signals-based ML model for defect detection. The proposed model showed an accuracy of 70% on raw data and 93% for the Fourier transform processed data. [23,24] Khanzadeh et al. compared different supervised ML approaches for the melt pool monitoring (MPM) images. The k-nearest neighbor algorithm showed the best results with an accuracy of 98% to label melt pool signatures as regular melt pools or pores. [25] Yuan et al. developed a CNN model to monitor the single deposited tracks' quality using coaxial high-speed video camera data. The training dataset was prelabeled using the offline characterization techniques such as macroscopic analysis of the deposited tracks, which was further used to predict the deposited consistency using a trained CNN model. [26] Imani et al. fabricated cylindrical samples with varying power, scanning speed, and hatch distance to induce varied samples' varied porosity. The obtained samples were quantified for the distribution of the porosity using CT. In parallel, the parts' in situ images were analyzed using the spectral graph approach, and extracted features were further used as input for ML algorithms. [27] Recently, Williams et al. developed a deep learning (DL) model called densely connected convolutional block architecture for multimodal image regression (DCB-MIR) to detect defects such as porosity and geometric deviations in titanium and Inconel parts. They have used the optical image derived from the acoustic velocity maps as the proposed model's input data. Williams et al. proposed a cosine similarity ranging from 25% to 60% between optical signature and optical micrographs derived from DCB-MIR. [28] Clijsters et al. proposed a novel data analytics method to check the quality of the parts in the L-PBF process. The melt pool signatures were captured with a combination of nearinfrared range CMOS camera and photodiode. Later, a mapping algorithm was modeled to capture the phenomena such as overheating, detection of the pore in 2D space, and 3D space based on the data from both sensors. [29] Recently, Chen et al. studied the effect of recoating orientation, hatching pattern, height, and width on the roughness of the thin-wall structures by using a model based on the CT images and CAD of the part. [30] ML techniques have recently gained much attention from many AM field researchers due to their easy applicability and versatile nature to solve the problems related to postprocessing of the in situ data in the AM process. The use of ML approaches in L-PBF processes is summarized in the study by Yadav et al. [8] Before proceeding further, it shall be essential to discuss the challenges associated with the ML approaches in the AM process, especially with L-PBF, which are as follows: 1) The artificial neural networks (ANNs) predominately work on a large set of the labeled training dataset, which is a very challenging and laborious task in the L-PBF process. It is very challenging to quantify and detect defects in the captured in situ data and often requires expensive and time-consuming techniques such as CT for quantification of the defects.
Another challenge associated to the ML approaches developed for L-PBF process is that the provided solutions tend to be a part, geometry, and material specific. 2) The multiscale nature of the L-PBF process defects is another major challenge. The defects, such as internal porosity, can be <100 μm, whereas the geometric distortion can be >1 mm. Therefore, it not feasible to use one type of sensor to detect all types of defects. With an increasing number of sensors, there is multiplication in data generation, eventually increasing postprocessing complexity. 3) The defects are also linked with the different steps in the process itself. Therefore, it is vital to monitor the process at all possible levels such as powder health, powder spread quality, postexposure quality, monitoring while printing, final part health, and so on. All steps are interlinked with each other. Therefore, overall monitoring will improve the quality assurance and reliability of the process.
This study focuses on using a combination of ML and DL algorithms to monitor the L-PBF process at three different stages, i.e., preexposure step, postexposure step, and exposure ( Figure 1). We have used two separate CNN models for treating the preand postexposure images captured using layer control system (LCS) and a support vector machine (SVM) classifier to postprocess the photodiodes data obtained from MPM. We present a case study on "benchmark part" to check the robustness of the proposed algorithms. This study serves as the initial step to discuss the possibilities of interlinking the different monitoring steps via postprocessing of the data and improving the confidence interval regarding the product health. The working principle of CNN models and SVM classifier can be found in the Supporting Information.

Materials and Methods
The gas atomized AlSi7Mg0.6 spherical powder supplied by SLM solutions was used to print specimens with varying process parameters. The particle size distribution was 20-63 μm with a mean diameter of 41.88 μm as specified by the supplier. The powder's apparent density was 1.53 g cm À3 , and the chemical composition of the as-received powder is shown in Table 1.
The commercial SLM 280 HL (SLM Solutions Group AG, Lübeck, Germany) equipped with 700 W twin continuous wave (CW) ytterbium fiber lasers with an emitting wavelength of 1070 nm and a spot diameter of 115 μm was used for printing. The build envelope volume is 280 Â 280 Â 365 mm 3 , and the build chamber was maintained in the Ar gas environment with an oxygen level below 0.1%. The aluminum base plate was preheated to 150 C before printing to reduce thermal stresses in part. [31] The SLM 280 HL machine is also equipped with the in situ monitoring devices called "MPM," which consists of two on-axis photodiodes to monitor the melt pool, and LCS to check the powder bed spreading. The specifications and working principles are discussed in Section 2.3 and 2.4, respectively.

Part Geometry and Process Parameters
To prepare a training dataset for the CNN models (CNN 1: for preexposure images, CNN 2: for postexposure images) and SVM classifier (for MPM), a balanced dataset comprising an equal number of each label is necessary. An artificial drift is introduced in the samples to obtain the balanced ground-truth dataset of each label. Therefore, the unique geometrical specimens were printed, as shown in Figure 2. The process parameters shown in Table 2 were varied to obtain varied volumetric energy density in the range of 40-73 J mm À3 for each shown geometry: it thus makes it possible to generate drifts in the parts. A total of 81 samples were fabricated, combining varied parameters as (shown in Table 2) follows: we have printed two sets of three parts (Figure 2a-c) with varying power, i.e., 300, 350, and 400 W, and scanning velocity, i.e., 1200, 1400, 1650, and 1900 mm s À1 . We also printed the one set of three parts (Figure 2a-c) by keeping optimized power, i.e., 350 W, and scanning velocity, i.e.,   www.advancedsciencenews.com www.aem-journal.com 1650 mm s À1 , but varying the hatch distances, i.e., 0.13, 0.26, and 0.52 mm. The overhang samples (Figure 2a,b) with an overhang of 5 mm was printed without any support structure. No downskin parameters were used for the overhang layer. As sometimes, due to bad powder spreading, the powder bed is nonuniform, this creates differences in the distribution of the powder in different areas. Then, in the next passes of recoating, the areas lacking powder can be uniformly covered. These phenomena generate layers with variations in thickness depending on the areas, which can be used to simulate lack of fusion. [32] Therefore, to simulate a lack of fusion samples, an internal cuboid type groove with dimensions 10 Â 8 Â 0.09 mm 3 was printed ( Figure 2c). The groove's thickness was set to 0.09 mm, i.e., three times the layer thickness of 30 μm. Indeed, based on trial and error method, it was noted that the thickness of 0.09 mm was able to create variations in thickness depending on the areas on some layers, which allow to simulate fusion defects in the final part. For testing the CNN models and SVM classifier, a case study part called "benchmark part," shown in Figure 2 d, was printed with optimized process parameters (marked in italics in Table 2). The optimized parameters are selected based on the density level (>99.99%) using the trial and error method.

MPM System
The coaxial MPM system installed on the commercial machine SLM 280 HL was used to collect thermal emissions from the melt pool formed due to laser-powder interaction. The melt pool systems are coaxial systems, which means it is in the laser path's alignment and collects the real-time emissions from the laser path at an acquisition frequency of 100 kHz. The MPM module consists of two photodiodes with different sensitive areas. The spectral range of the photodiodes cannot be revealed due to confidentiality issues. However, both the photodiodes capture the thermal emission in the near-infrared region. The schematic diagram of the MPM system is shown in Figure 3. Only the emissions traveling perpendicular to the build platform are considered. The thermal radiations follow the same path as the laser and are directed into the MPM module with a semitransparent mirror, which does not allow laser wavelength to pass. The signal is split into two different spectral ranges and captured, respectively, by the two photodiodes. The received signal is forwarded to associated analog-to-digital convertors (ADCs) and provided in a field-programmable gate array (FPGA) by the individual photodiodes. The captured thermal emissions from photodiodes 1 and 2 are stored along with the x/y-coordinates (16-bit). The values are stored parallel with the laser on/off signal from FPGA to personal computer in every 10 μs. All the data are stored for every layer in a data file, accessed as 2D representation in MPM software provided by the SLM solutions. [33] The new file is created automatically for each layer after the complete exposure. For this work, no additional modifications are made to the installed hardware.

LCS
The LCS installed on SLM 280 HL includes a visible range camera that captures each layer's images for pre-and postexposure. The chamber is illuminated with LEDs from the build chamber's sidewalls to maintain uniformity of light distribution on the overall build plate. The camera is placed outside on top of the build chamber at a specific angle of 65 w.r.t. normal direction of the build plate, as shown in Figure 3. The geometric correction of the captured images is performed by the machine supplier for the installed equipment. The camera captures a JPEG image of 1500 Â 1460 px 2 size covering an area of 280 Â 280 mm 2 of the build plate and neighboring region outside of the build plate that needed to be cropped before processing. The camera has a pixel size of 4.4 μm and a lens focal length of 9 mm.

Definitions
This section elaborates the definitions of the keywords used in this study in context to postprocessing of powder bed images and MPM data.

OK
The "OK" label is used for the block (image patch), free from other considered anomalies, such as recoater streaking, uneven powder spread, part hopping, and part overheating.

Uneven Powder Spread
The "uneven powder spread" indicates the areas with nonuniformity in powder spread. Nonuniformity during powder spreading leads to step-like feature in the powder bed spread, as shown in Figure 5c. Such anomaly can be caused due to recoater silicon lip failure, lack of powder in the recoater hob, and blockage in powder delivery system.

Part Overheating or Local Overheating
The "part overheating or local overheating" is the area of the part which is distorted due to poor heat conductivity. The poor heat flow phenomenon is linked to the lack of proper support structures beneath the part which, in turn, linked to the difference in heat conductivity in a bulk and powder material. [34] Based on simulations, Yang et al. reported that the overhanging surfaces are prone to overheating. [35] This anomaly is considered only for the postexposure images. www.advancedsciencenews.com www.aem-journal.com

Part Hopping
The area of the part which is above the powder spread and not fully covered by the powder spread is termed "part hopping." This anomaly is considered only for the preexposure images.
In the context of this study, the part hopping serves as crossvalidation criteria for the anomaly "part overheating" in the postexposure images.

Recoater Streaking
Recoater streaking is the horizontal lines observed in the powder bed images due to distortion of the soft silicon lip of the recoater.
Recoater streaking is detected in pre-and postexposure images.

Hotspot
The layer's area is termed as "hotspot," which has higher thermal counts than the rest of the layer. These hotspots are the most probable areas of causing drift in the final part. [36] 3.

Drift Layer
The layers which comprise the hotspots mentioned earlier are termed as "drift layer." Identifying hotspots and labeling the layers as "drift layer" was done manually suing MPM viewer provided by SLM solutions.

No-Drift Layer
The absence of the hotspots in the respective layers is defined as "no-drift layer."

Image Preprocessing
The captured raw images (1500 Â 1460 px 2 ) possess difficulties such as inhomogeneity in light intensity. Therefore, they cannot be used directly for CNN operations. As the camera and environment conditions remain unchanged for all the captured images, the same homogeneity correction factor can be used for all images. For light intensity homogenization, we have used the in-built functions of MATLAB called "imcomplement" and www.advancedsciencenews.com www.aem-journal.com "imreducehaze". [37][38][39] For our studies, we have used the maximum haze value of 1, which removes the maximum haze from the image. First, the captured raw image was converted to a grayscale image to reduce the operation's complexity and our CNN model's requirement. The grayscale image was then complemented, which means it inverts the pixel values. In other words, the black is converted into white and vice versa. Then the "imreducehaze" function was used on the complemented image (Equation (1)) where IðxÞ is the observed intensity; JðxÞ is the scene radiation; LðxÞ is the atmospheric light; and TðxÞ is the transmission map of the light reaching the camera. Dezhaing operation estimates the scene radiation JðxÞ by estimating the TðxÞ and LðxÞ, which is given by Equation (2) JðxÞ ¼ ðIðxÞ À AÞ=ðmaxðTðxÞ, Tð0Þ þ AÞ The dehazing function involves steps as follows: 1) The atmospheric light (L(x)) is estimated using a dark channel; 2) The transmission map (T(x)) is estimated; 3) Refinement of the estimated transmission map (T(x)); 4) Restoration of the image; and 5) Perform contrast enhancement on the restored image. Figure 4 shows an example of a raw image and image after preprocessing operation. It can be observed that even after the preprocessing operation, the light intensity is not entirely homogenized at the edges. Therefore, we do not take into consideration the edges for CNN operation and start the algorithm only for an area of 1000 Â 1000 px 2 as marked in the red rectangle box. The dimensions of the region of interest are selected intuitively; most of the time, parts are built at the build plate's center. Intentionally, cropping of the image is avoided to minimize the border effect and prevent operation padding, significantly affecting border patches results. If we consider the borders, it will not be possible to select the blocks with the same center as the sizes vary enormously. Secondly, the light intensity at the borders may also affect the accuracy of the overall model.

For Preexposure Images
Our study has considered four cases: the CNN network's detection features, which serve as the so-called "labels," as shown in Figure 5. Preexposure images can have critical information regarding the overall quality of the powder bed spreading. It shall be noted that the labels' selection is based on the visual inspection of the images, and only the most common human visually verified powder bed spread anomalies are considered, as presented in the following. "Recoater streaking" is the most common anomaly that occurs due to damage to the silicone lip due to part hopping (Figure 5b). Another critical anomaly called "incomplete spreading" or "uneven powder spreading" can also be captured by preexposure images (Figure 5c). It shall be noted that the preexposure image captures not only the powder spreading quality for a particular layer but also captures the information regarding the quality of printing in the preceding step. "Part hopping" is such an anomaly which is mainly influenced by the quality of printing in the previous step (Figure 5a). The fourth category, (Figure 5d,e) called "OK," represents the areas that are free from aforementioned anomalies. Figure 5d is the "OK" image for the case where there is no printed area underneath.
In contrast, Figure 5e shows the printed part covered with the powder layer.

Postexposure Images
Postexposure images can serve as the verification step and contain vital information about the part and powder's quality. In our study, we have considered the same cases as preexposure images for our labels. Instead of "part hopping," we have labeled it as the areas likely to an undergone overheating phenomenon, which leads to hopping in the next recoating step due to internal residual stresses. The labels are shown in Figure 6. For training the CNN models, a dataset of 500 images for each label was prepared for pre-and postexposure images. We have considered the most common anomalies, which does not mean these are the only www.advancedsciencenews.com www.aem-journal.com anomalies that occur during the process. Other anomalies such as spatter ejection and burnout areas are not considered due to the lack of artificial reproducibility of these anomalies for the CNN models' training.

MPM Anomalies
As explained in Section 2.3, the MPM system captures the thermal emissions during laser-powder interaction in the nearinfrared region. The captured thermal emissions layer shows the areas with higher thermal emissions values, termed as "hotspot regions." These hotspots regions are the highest potential areas of inducing defects in the final part. The same hypothesis is also confirmed by Mohr et al., where they showed the link between the porosity in the final part with the melt pool hotspot regions. [36] Therefore, in our study, we have termed layers with hotspots as "drift" and the layers with no hotspots as "no-drift." However, it is essential to highlight that the hotspots are the most probable areas of causing a defect. Still, it cannot be guaranteed that there will be a defect at that location due to the complexity of the L-PBF process itself.

Scale Variant of Anomalies in Pre-and Postexposure Cases
The scale of the detection area dramatically influences the detection of any particular anomaly. For example, as shown in Figure 7, if we take the scale of 20 Â 20 px 2 (case 1-red box) for uneven powder spread, it may not be detectable; similarly, if we consider 150 Â 150 px 2 (case 2-green box) for "part hopping," we may end up incorporating other anomalies such as "recoater streaking." Moreover, not all anomalies have the same spatial detection scale. Therefore, it is of great importance to choose the correct spatial scale of the described anomalies such as "part hopping," overheating, recoater streaking, and uneven powder spread. Therefore, in our study, we have chosen three different scales for the aforementioned anomalies based on the trial-error method. Scale 1, i.e., 20 Â 20 px 2 block, was set for "part hopping" and overheating, as this anomaly should be captured with as small as possible scale. The 20 Â 20 px 2 scale is a good compromise between the computational time and the proposed CNN model's accuracy. Scale 2, i.e., 75 Â 75 px 2 , was chosen for "recoater streaking," whereas scale 3, i.e., 150 Â 150 px 2 , was set for uneven powder spread. It is also noted that all three scale blocks were extracted from the same center, and also the scale 1 blocks were nonoverlapping, whereas the scale 2 and scale 3 are over overlapping blocks that stride with a step of the smallest block size.

Training CNN Models
The CNN training aims to find the optimal kernels for the given case. In our CNN model, we have used the standard loss function for regression predictions and cross-entropy loss, which is shown as Hðp, qÞ ¼ À P x qðxÞ log pðxÞ, where pðxÞ is the classification function from softmax operation corresponding to the input image used for classification operation and qðxÞ is the ground-truth label of that image. The minimization of loss function during training is the optimal criterion for the selection of optimal kernels. During training, kernel weights are recursively updated by using the training images. The prediction error gradient decides the updating of the weights for each layer backpropagated for that layer. It shows the direction of weight adjustment, which allows a steep decrease in prediction error. For our CNN model, we have utilized the stochastic gradient descent with momentum optimizer with an initial learning rate of 10 À3 for regression, batch  www.advancedsciencenews.com www.aem-journal.com size of 20, and maximum training epoch number of 100. L 2 regularization is applied to all the weights for suppressing overfitting. The regularization coefficient is set as 10 À3 . For both CNN models, i.e., CNN 1 and CNN 2, the best-fit settings are the same, which showed the highest training accuracy for both pre-and postexposure images. The reported training accuracy of CNN 1 and the CNN 2 models is 93.16% and 96.20% for pre-and postexposure images.

Training SVM Classifier
For this study, artificial drifts, i.e., overheating drift due to overhang and lack of fusion in the parts with special geometrical features (see Figure 6) and by the varying process, were created. The careful selection of the layers from the build parts (81 parts) and labeling it as "drift" and "no-drift" was performed by analyzing the layers in the MPM software provided by the SLM solutions and statistical analysis. For our study, we have chosen the mean and median of each layer as the input features. As we know, the mean and median measures the data's central tendency and gives us information regarding the data's skewness. Median is an important feature when the data have extreme values. It is also important to mention that other features such as standard deviation and root mean square for each layer were also studied. Still, SVM results were not satisfactory compared with mean and median. The drawback of choosing two points as the features per layer is that it compresses the whole layer data into two issues. Therefore, in the study, individual hotspots' exact location in a particular layer is not studied. A balanced labeled dataset of 170 data points, which comprises an equal number of "drift" and "no-drift" data points so that the biasing of the SVM model can be avoided, was prepared. The best-fitting parameters are to be selected for the SVM classifier to increase the classifier's success rate. A Bayesian optimization algorithm was used to find the best-suited hyperparameters for the model. A hyperparameter is an internal parameter of an algorithm that needs to be optimized. For example, in our case (SVM model), the box constraint, kernel function, and kernel scale are the hyperparameters. These parameters can significantly influence the performance of the algorithm. Thus, optimization of the hyperparameters is advisable. However, optimization is difficult and time-consuming. Therefore, Bayesian optimization is well suited for classification and regression algorithms in MML. The Bayesian optimization algorithm minimizes the objective function f(x) for x in a bounded domain. The f(x) can be scholastic or deterministic, which means it can return different results for the same point x.
The tenfold cross-validation of the optimized SVM classifier was performed on the training dataset. The whole dataset was partitioned into 70% and 30% subdatasets to cross-validate and check the SVM model's performance of different hyperparameters. The performance and accuracy % of the different hyperparameters are shown in Table 3. The linear SVM has the highest accuracy with a cross-validation success rate of 98.8 % and 99.2 % for photodiode 1 and photodiode 2, respectively. Figure 8 shows the labels of the trained linear SVM classifier for both photodiodes.

Labeling Test Images
Several conditions shall be imposed on the pre-and postlabeled data to minimize the probability of mislabeling, and the conditions are different for both pre-and postexposure images. As mentioned earlier, we extract three different scales (20 Â 20 px 2 , 75 Â 75 px 2 , 150 Â 150 px 2 ) blocks from the same center, leading to having three different labels for the same center. Therefore, it is necessary to take specific conditions for each block. The conditions for preexposure test images are as follows ( Figure 9): 1) Scale 1, i.e., 20 Â 20 px 2 block, will be extracted and passed through the trained CNN 1 model. If the scale 1 block overlaps with the part area and has labeled "part hopping," the program will skip the training operation for scale 2 and scale 3 for that specific center and proceed to another center. 2) In case the label is not "part hopping," the center will not save the predicted label for scale 1 for that center and will make a decision based on scale 2 and scale 3, which is decided by the decision matrix, as shown in Table 4. The reason for this particular condition is that, when the "part hopping" occurs, other anomalies cannot happen at the same center. However, when there is no "part hopping," then there could be "recoater streaking," "uneven powder spreading," and "OK" part labels.
The conditions for postexposure test images are as follows ( Figure 10): 1) After the exposure step, there is no powder in the part area. Therefore, it is impossible to have defects such as uneven powder spread and "recoater streaking" in that particular area. Thus, the scale 1 block, i.e., 20 Â 20 px 2 , will first pass to a precondition to check whether the block overlaps or intersects with the part area or not. If not, the scale 1 labels will not be predicted for that specific center as it is not in the part area. If yes, then the possible labels can be "part overheating" or "part OK." If the predicted label is other than "part overheating" and "part OK," the label will be marked as mislabeling. 2) If the scale 1 block does not intersect with the part area, then there can be labels related to powder anomalies, i.e., "recoater streaking," "uneven powder spreading," or "OK." Therefore, for that specific center, the labels will be predicted for scale 2 and scale 3, i.e., 75 Â 75 px 2 and 150 Â 150 px 2 . The final decision will be made based on the decision matrix, as shown in Table 4, like for the preexposure procedure. www.advancedsciencenews.com www.aem-journal.com

Confusion Matrices
The training dataset was divided into three subcategories, i.e., training set, validation set, and test set, with 60:20:20 ratios. The training process aims to fit the ML model to the training dataset. The training process's performance is evaluated by the validation set, which, in turn, can be used to find the best-fitted design parameters to obtain the highest validation accuracy. However, it is essential to note that the model may overfit or underfit the validation set and training set. Therefore, the ML model's actual performance is attributed to the testing dataset, and the confusion matrix evaluates the algorithm. The confusion matrix compares the ground truth labels with the predicted labels. In other words, the false-positive and false-negative attributes of the ML model are indicated by the confusion matrix representation. The confusion matrices for both cases, i.e., pre-and postexposure images, are shown in Figure 11, where the output class represents the ground-truth label. The target class denotes the predicted label. It is noticeable that the "uneven powder spread" and "OK" labels are the most difficult labels to predict for the trained CNN 1 model and often confused among each other.   Similarly, CNN 2, which predicts labels for postexposure images, is often confused in predicting "uneven powder spread" and "OK" labels. This inaccurate prediction of labels is due to the uneven spreading anomaly, which has a signature similar to a good powder bed.

Programming Environment
All the programming has been implemented using MATLAB R2020a software, which included the relevant add-on packages such as Image Processing Toolbox, Statistics Toolbox, and Deep Learning Toolbox. The system configuration used for implementation is as follows:

Results: Case Study
Our study performed the analysis on a so-called "benchmark part," used as a benchmark tool in material development in AM. Finding the best-fit process parameters is a time-consuming and costly step based on trial and error methods. Therefore, specific designs are used as a benchmark tool to find the best process parameters such as critical overhang angle, process settings (laser Power, hatch distance, layer thickness), border thickness,  www.advancedsciencenews.com www.aem-journal.com and so on. Knowledge of this angle is essential to position the supports correctly. Indeed, as we know, the critical overhang angle for Al alloys is 30 , so we can conclude that the benchmark part is prone to failure at some point due to the absence of supports. [40] Another important reason to choose this model as our case study part was that the part's failure could be confirmed via visual inspection without using costly CT techniques. It is then used to test the accuracy of our trained CNN model and SVM classifier. Validation of other defects such as porosities requires, on the contrary, expensive techniques such as CT.

CNN Models
The total 2582 images of the benchmark part were analyzed by our trained two CNN models for preexposure and postexposure images, respectively. The percentage of the predicted anomalies in a specific layer is calculated and plotted along with the building height to monitor the building part's overall quality. Figure 12a shows the anomalies percentage for the preexposure images. It can be observed that in the last layers of the build, there is a huge peak for all the anomalies ("part hopping," "recoater streaking," and "uneven powder spreading"). The "part hopping" anomaly percentage gradually starts to increase from layer 2400, whereas the recoating streaking and uneven powder spread anomalies occur after layer number 2543 and 2556. The theory can explain that the part hopping destroys the soft silicone lip used for the recoating. When the silicone lip's quality worsens, the recoater lines, also called "recoater streaking," start to occur on the powder bed. The center of the scale variant blocks (20Â 20 px 2 , 75 Â 75 px 2 , 150 Â 150 px 2 ) used as the input for the proposed CNN 1 model was saved to locate the location of the particular predicted anomalies in the specific layer, for example, the layer's raw image numbered 2579, and the location of predicted anomalies for that layer is shown in Figure 12b.
In our study, we used the postexposure analysis as the crossvalidation for the preexposure analysis results and to make a confident decision regarding the quality of a particular layer. The anomalies such as recoating streaking and uneven powder spread can be present in both cases, i.e., pre-and postexposure at the same location except for the printed area. "Part overheating" anomaly in the postexposure step due to lack of supports can also lead to "part hopping" anomaly in the preexposure step for www.advancedsciencenews.com www.aem-journal.com the next succeeding layers. As both the cases (pre-and postexposure) serve as the two different process steps and are interlinked, it is crucial to use both images for cross-validation and monitor the build quality. The percentage of the predicted anomalies concerning build height for postexposure images is shown in Figure 13a. Like the preexposure analysis step, the CNN 2 model predicted the highest percentage of all anomalies in the last layers. Similar to "part hopping," the "part overheating" anomaly starts to occur gradually from layer numbered 2121. The location of the individual predicted anomalies for layer number 2580 is shown in Figure 13b. The "part hopping" anomaly in preexposure images start to gradually increase from layer numbered 2400 (marked with a black arrow in Figure 12a, whereas the "part overheating" anomaly starts to appear from layer numbered 2121 (marked with a black arrow in Figure 13a) in postexposure images. Therefore, it can be concluded that the "part overheating" anomaly first reaches a limit before it starts to impact the recoating step. The given layer thickness is not enough to fully cover the overheating anomaly, and it starts to appear in the preexposure step as a "part hopping" anomaly.
It is also observed that the mislabel percentage also increases for the last layers in both cases. As shown in the confusion matrix (Figure 11), the proposed CNN models have high confusion probability for "OK" and "uneven powder spread" labels for both cases. As the "uneven powder spread" anomaly occurs only in the last layers, the mislabel percentage also increases in the previous layers.

SVM Classifier
The two linear SVM classifiers for photodiode 1 and photodiode 2, respectively, were trained on the certified training dataset, as discussed in Section 6.2. The mean and median of each layer was treated as the input features for the trained SVM classifiers. The SVM classifiers predicted the two class labels, i.e., "drift" and "no-drift," for each layer for the respective photodiode, as shown in Figure 14a  i.e., 2541 and 2561, were marked as drift layers for photodiode 1. These predicted last layers lead to failure of the part, as shown in Figure 14c. As presented in Section 2.3, the spectral detection range of both photodiodes is different. Therefore, it can be concluded that based on the type of material, one photodiode is more sensitive compared with another for specific materials, i.e., low and high melting materials.
We have used the MPM viewer installed on the SLM 280 HL system to verify the hotspots' presence in the predicted "drift" layers. The screenshot of the MPM viewer for layer number 2561 (which was predicted "drift" by both SVM classifiers also circled in red in Figure 14a,b) is shown in Figure 15. It can be observed that there are regions (marked in red) that have higher thermal emissions compared with the rest of the layer www.advancedsciencenews.com www.aem-journal.com for both photodiodes. These hotspots are the highest probable regions of producing defects in final parts. It is also noticeable that the hotspot regions in photodiode 1 (Figure 15a) are not evident as like for photodiode 2 (Figure 15b), which is because photodiode 2 spectral range is more sensitive to AlSi7Mg0.6 (low melting material). The building part layers predicted as drift layers for both photodiodes indicate a link between the powder spread quality and printed part quality. For example, in this particular layer, the preexposure image indicates the region of part hopping, which is because the powder was not uniformly spread over the whole part (marked by the green block in Figure 15c). As a result, the region which was not covered by the powder leads to overheating, i.e., predicted by the CNN model as marked by green boxes in Figure 15d. It shall be noted that the additional four rectangular bars were also printed along with the benchmark part, which is also visible in Figure 15c,d. These rectangular bars were printed for internal studies and are not included in this study. Therefore, it is vital to monitor each process step and establish a link between the different steps to improve the process's overall quality assurance. The confidence interval based on the different monitoring steps can separate good and bad parts from a batch of parts (in serial production case). It can serve as a decision to use other nondestructive techniques for good parts for quality assessment. It will save time and money by initially marginalizing the bad parts out of good parts.

Conclusion
Despite technological advancement in L-PBF systems over the last decade, the process's reliability and repeatability are a significant challenge due to uncertainties related to defects in the final parts. These defects can have a detrimental effect on the building part's performance, such as small porosities that can significantly degrade the final part's fatigue properties. The need for monitoring the process at each step is inevitable for building confidence about the final quality of the part. There are very few studies that have been focused on interlinking or monitoring the process at different steps.
Our study aims to monitor and postprocess the in situ data obtained at three different steps, i.e., pre-and postexposure, and during exposure. Pre-and postexposure images capture critical information regarding the powder bed spreading and printed layer quality. Therefore, both images were treated in an automated fashion using CNN models to detect the anomalies such as "part hopping/part overheating," "recoater streaking," and "uneven powder spreading." The scale variant of discussed anomalies is considered, and three different scales (20 Â 20 px 2 , 75 Â 75 px 2 , 150 Â 150 px 2 ) for each anomaly were chosen. Similarly, the MPM data were analyzed using the SVM classifier to classify the layers into "drift" and "no-drift." As the two photodiodes have different spatial detection limits, it was observed that photodiode 2 captures the drift occurring due to the presence of hotspots much efficiently than photodiode 1. A case study on "benchmark part" was done to check the proposed CNN model and SVM classifier's accuracy. It was noted that algorithms successfully predict the aforementioned anomalies for both cases.
The full potential of the installed in situ monitoring devices can only be realized by developing a closed-loop feedback control system by interlinking the individual signals from each process step. It will help to improve the overall quality assurance of the building part.

Supporting Information
Supporting Information is available from the Wiley Online Library or from the author.