Applications of Machine Learning in Process Monitoring and Controls of L-PBF Additive Manufacturing: A Review

: One of the main issues hindering the adoption of parts produced using laser powder bed fusion (L-PBF) in safety-critical applications is the inconsistencies in quality levels. Furthermore, the complicated nature of the L-PBF process makes optimizing process parameters to reduce these defects experimentally challenging and computationally expensive. To address this issue, sensor-based monitoring of the L-PBF process has gained increasing attention in recent years. Moreover, integrating machine learning (ML) techniques to analyze the collected sensor data has signiﬁcantly improved the defect detection process aiming to apply online control. This article provides a comprehensive review of the latest applications of ML for in situ monitoring and control of the L-PBF process. First, the main L-PBF process signatures are described, and the suitable sensor and speciﬁcations that can monitor each signature are reviewed. Next, the most common ML learning approaches and algorithms employed in L-PBFs are summarized. Then, an extensive comparison of the different ML algorithms used for defect detection in the L-PBF process is presented. The article then describes the ultimate goal of applying ML algorithms for in situ sensors, which is closing the loop and taking online corrective actions. Finally, some current challenges and ideas for future work are also described to provide a perspective on the future directions for research dealing with using ML applications for defect detection and control for the L-PBF processes.


Introduction
The unmatched ability of metal additive manufacturing (AM) to produce customized parts with complex geometries has led to increased demand for these processes. According to the ISO/ASTM 52900 international standard, the most adapted metal AM technologies are directed energy deposition (DED) and powder bed fusion (PBF). Both processes use a laser or an electron beam to selectively melt the metal and build the part in a layer-by-layer method. Powder bed fusion (PBF) processes include direct metal laser deposition (DMLS), selective laser sintering (SLS), selective laser melting (SLM), electron beam melting (EBM), and selective heat sintering (SHS) [1]. The laser powder bed fusion (L-PBF) process has better surface quality and higher dimensional accuracy than other metal AM processes [2].
The laser powder bed fusion (L-PBF) process produces complex geometries and lattice structures with high feature resolution [3,4]. Compared to conventional manufacturing processes, AM processes do not use expensive tooling or dies, which helps to reduce the lead time for parts manufactured using AM processes [5]. Moreover, L-PBF processes help reduce the need for assembly, thus decreasing the total number of parts in a single component [6]. The capabilities for weight reduction have been the main driver for aerospace industries to invest in L-PBF processes heavily [4]. Furthermore, the ability to customize implants to each patient-specific anatomy and produce a complex lattice structure was vital for the biomedical industry's interest in L-PBF parts [7]. In addition, the tools and dies industries have used the advantages of the L-PBF process to manufacture dies with conformal cooling channels, which significantly improves the performance of these components [8]. Instead of having traditional drilled cooling channels, the cooling channels are custom-made to each cavity, thus reducing cooling and cycle times and improving the overall process performance.
Despite the many technological developments that have taken place in L-PBF processes in the past 20 years, they still suffer from poor process repeatability [9,10]. Although some L-PBF components have already begun their certification routes, parts intended to be used in highly critical applications are still at the early stages of development and certifications [11]. Significant research effort has been directed towards experimentally optimizing the process parameters by understanding the process-structure-property relationships [12][13][14][15], while other research studies mainly focused on physics-based numerical models to predict the properties of the manufactured parts and attempt to prevent defects [16][17][18]. Both experimental and numerical efforts have laid a good foundation for enhancing the understanding of the process. However, these efforts are time-consuming and computationally expensive [19]. To face the challenges of poor repeatability of L-PBF processes, developing in situ monitoring systems and feedback control strategies has been a priority research interest [20]. The ultimate objective of applying in situ L-PBF process monitoring is developing closed-loop feedback systems [21] that would be able to detect defects in a suitable response time to take corrective action and eventually improve the parts' repeatability and reproducibility.
The development of sensor technologies has led to a significant increase in the amount and dimensionality of data collected during the L-PBF [22]. An operator will not be capable of manually screening and modeling the massive amount of data using statistical methods or a design of experiment approach. As such, a suitable approach to overcome the challenges in handling the L-PBF data is applying artificial intelligence (AI) solutions such as machine learning (ML) methods [23]. ML algorithms help identify patterns and regularities in large datasets with limited process knowledge. The models learn from data without the need for explicit programming and thus are suitable for in situ monitoring of L-PBF processes. Previous research reviewed the advantages of applying ML in general in manufacturing and highlighted its significance for monitoring and control applications [23][24][25]. The integration between ML algorithms and modern in situ sensors can provide an optimum solution for enhancing the quality of L-PBF processed parts to meet the requirements of critical applications.
Several review papers have been published in the area of in situ monitoring and control of metal AM processes. Some review articles focused mainly on sensors integration with L-PBF processes. For example, Everton et al. [20] focused on reporting efforts in monitoring and in situ metrology for metal additive manufacturing technologies. Yadav et al. [26] reviewed the types of process defects that can be monitored via process signatures. Other articles focused on the general application of ML algorithms in the additive manufacturing lifecycle. For example, Wang et al. [27] provide a state-of-the-art review on the applications of ML techniques in various AM technologies. The authors focus on three categories, namely, design for additive manufacturing, different processes, and production. The authors concluded that most of the literature focuses on design and engineering, while very limited research covers science and technology aspects. Therefore, the authors suggested some new ML application subfields in AM, such as microstructure characterization, new material development, and topology optimization.
Razvi et al. [22] identified the application of ML in the areas in the AM lifecycle, including design, process plan, build, postprocessing, and testing and validation. The authors identified that more research regarding in situ data fusion is needed, not just in terms of sensor data fusion, but also in correlating in situ and ex situ data. The authors also highlighted how ML models could be used in design for additive manufacturing to optimize the part mass, support structure, and build time. Meng et al. [19] focused on describing the ML algorithms and classifications in AM technology in general. Examples from supervised and unsupervised ML models were compared, and the application of using these models was highlighted. The authors recommended investing more effort in ML algorithms that would be suitable for AM processes, specifically active learning techniques.
It was found that limited review articles cover the application of ML for in situ monitoring and control of L-PBF processes [28]. In addition, as various research is published on the application of ML in monitoring the L-PBF process, there was a need to summarize and compare the relationships of different sensors and the most common ML algorithms used in this area. This study gives an overview of the need for in situ monitoring of L-PBF and how different sensors can monitor different process signatures. Furthermore, it highlights how ML algorithms can be used to assess the collected data and generate corrective signals to the process. This paper also classifies the ML algorithms used in L-PBF process monitoring according to sensor types and highlights the different process signatures that can be monitored in each case.
The article is organized as follows: first, an overview of the L-PBF process, process signatures, and defects are described. Then, a description of the different sensors that are integrated into the L-PBF machine is given. Then, a theoretical background on the different ML algorithms that can be applied for in situ monitoring and control of L-PBF is presented. Then, several examples of the application of ML algorithms for in situ monitoring and control from the literature are reviewed. Finally, the gaps in the literature and future research recommendations are discussed.

Overview of the L-PBF Process
The L-PBF process comprises a powder chamber and a build chamber placed on movable stages, as illustrated in Figure 1. The process is started by evacuating the chamber from oxygen and filling the chamber with inert gas, thus preventing heated metals from oxidation [29]. Then, the building platform is heated if required, and the first layer of powder is spread on the building platform using a recoater. This recoater can have different geometries (flat, round, or sharp) [30] and materials (ceramic, high-speed steel, or carbon fiber brush) [31]. Then, the laser starts scanning specific locations in the powder bed according to the part's geometry. As a result, the powder gains energy and starts transferring from a solid state to a liquid state, forming a small molten pool referred to as meltpool [32]. The cooling rate of this meltpool is around 10 3 -10 8 K/s. Therefore, the layer being melted cools down very rapidly, forming a fine uniform microstructure [12]. The build platform then moves one layer downwards, while the powder dispenser moves one layer upwards. The recoater then spreads a fresh layer of powder on the previously solidified layer, and the process repeats until the whole part is manufactured layer by layer. The following sections are dedicated to discussing the process parameters, the process signatures, and the most common defects resulting from the L-PBF process.

Process Parameters
The L-PBF process involves many process parameters that can be categorized as preprocessing, in-process, and postprocess parameters [13]. The process parameters can also be classified according to their sources, such as feedstock, equipment (hardware), design selection, and process [3]. The in-process parameters are of greater interest when in situ monitoring is involved. These parameters are usually combined in the equation of volumetric energy density (VED), as shown in Equation (1): where "P" is the laser power, "v" is the scan speed, "h" is the hatch distance, and "t" is the layer thickness of the powder. The VED defines the amount of energy delivered to the powder per volume. Therefore, it influences the melting mode and defect formation. Thus, VED can be regarded as a broad guideline for parameter selection, as it can be compared to the theoretical energy required to melt metallic powder effectively [30].

Process Signatures
The process signatures describe the dynamic characteristics of the melting and solidification process during the laser/powder interaction [33]. There are several classification methods for the L-PBF process signatures in the literature. Mani et al. [33] classified them into observable and derived signatures, while Grasso et al. [3] classified them according to their level of detail (size of the smallest feature). Figure 2 describes the four levels considered in this review article based on the level of details used for in situ monitoring for the L-PBF process. The signatures considered in this review article are meltpool, laser tracks, scanned layer, and powder bed. Meltpool sizes depend on many factors, such as laser power, laser type, and powder absorptivity, for example. The laser tracks size also depends on meltpool size, as they are essentially a combination of consecutive meltpool. The scanned layer and powder bed are usually measured across the build-plate dimension, which depends on the type and model of the L-PBF machine.
The meltpool is produced due to the laser interaction with the powder metal [34], illustrated in Figure 2a. The interaction occurring in this area is considered the lowest level of detail among the L-PBF process signatures. The meltpool shape, size, temperature, and stability depend on the VED delivered to the powder [34]. Plume and spatter are also considered characteristics of meltpool stability. Plume is generated when the meltpool surface temperature reaches a melting point. The metal partially evaporates and might alter the laser beam profile and affect the quality of the manufactured part [35]. It is also reported that as plume condenses, it might form nanoparticles ejected out of the meltpool [36]. Spatter is known to have a negative impact on the performance of metallic parts manufactured using L-PBF processes. Wang et al. [37] identified three types of spatter: metallic jet, droplet, and powder spatter. The high laser power causes the metallic jet spatter; it increases the meltpool instability, causing more liquid to be stricken out and leak out in the form of a spatter. Droplet spatter is attributed to the convection transport of the liquid or vaporized metal out of the meltpool [33], while the powder spatter is caused by nonmelted metal powder blown away due to the metallic vapor. Laser tracks are a combination of simultaneous meltpool coming together to form one scan vector of the part being printed. The laser track's size, temperature, and continuity highly affect the quality of the printed parts, as shown in Figure 2b [38]. The layerwise signature considers the printed part at a larger level of detail and can be divided into two partitions. The first partition is the scanned geometry, designating layers after the laser scans the geometry, as shown in Figure 2; this slice can be compared to the original geometry to check for errors. Besides this, the temperature can be monitored, as well as the surface quality. The second partition is related to the powder bed, after a fresh layer of powder is spread, as illustrated in Figure 2d. The errors related to the recoater include hopping, where the recoater has many chipped ends, and streaking, when parts of the debris are dragged by the recoater. In addition, the presence of debris on the surface might indicate the presence of a defect. The superelevation of melted parts may appear or incomplete powder spreading may occur.

Defects
The defects generated in the parts manufactured by L-PBF can be classified into three categories [39]: defects resulting from machine parameters, defects resulting from setup, and defects due to damage in the equipment or miscalibration. Another classification of defects includes the dimensional and surface quality defects and internal defects such as porosity and cracks. In this section, the different types of defects are discussed.

Dimensional Accuracy and Surface Quality
The factors affecting dimensional accuracy and surface quality are related to either the process parameters setting or the part's geometry. For example, the improper choice of slice thickness when preparing the design for printing will contribute to height errors and volume errors [40]. The staircase effect refers to the steplike feature present when the part's surface is approximated layer by layer for an angled surface [41]. The choice of laser process parameters [42] and scanning strategy [43] can contribute to any shrinkage, affecting dimensional accuracy. Curling is another defect, resulting from warping, and happens when a curl forms in the downward-facing area of a part that was supposed to be flat [44]. Curling is attributed to the uneven shrinkage between the top and bottom of the part being printed. Another defect that affects dimensional accuracy is the superelevated edge formation, as illustrated in Figure 3 [45]. These errors are related to high energy density or the presence of critical features [46]. The recoater can impact parts with curled surfaces and elevated edges, leading to its wear and chipping, which in turn will affect the powder spreading, causing powder hopping, as discussed in Section 2.2. Using in situ sensors to monitor the scanned geometry might help identify dimensional defects resulting from improper layer thickness choice or errors slicing the stereolithography (STL) files, while monitoring the powder bed might help identify defects related to curling, superelevation, and recoater-related errors. . Dimensional accuracy and surface defects in metal L-PBF parts: (a) distortion of a part caused by detachment from build plate/support [45], (b) staircase effect in up-facing and dross formation in down-facing surfaces [47].
One example of process parameter-related issues is the formation of balling droplets on the surface of printed parts. The balling phenomena are related to the formation of spheroidal drops due to the insufficient wetting of the previous layer and surface tension [29,48]. The formation of these balling phenomena indicates inadequate selection of process parameters or oxide film formation on the previously melted layer [49]. Remelting the surface or the laser tracks with balling formed on them might help improve the surface quality and dimensional accuracy required. Another phenomenon witnessed in laser tracks is called humping formation, which is related to bulge formation on laser tracks. Humping formation is affected by the surface tension and Rayleigh instability, and Marangoni shear force [50]. If the geometry contains parts that are not supported, these parts are referred to as overhanging features. In this case, the meltpool is surrounded by powder instead of the previously melted layer; it is easier for heat to diffuse to the loose powder, thus causing overheating and dross formation, as illustrated in Figure 3b [47], which affects the geometric dimensioning and tolerancing (GD&T) [51]. Sometimes the proper choice of part's orientation can mitigate errors related to overhanging features [52]. However, it is not always feasible to apply it on complicated parts [53]. Cooling during overhang takes longer due to the unconsolidated powder beneath; thus, monitoring meltpool temperature and eventually controlling it can help reduce errors related to overhanging features in L-PBF parts [54].

Porosity
The porosity formation mechanism and its undesirable effects have been investigated frequently in the literature [55][56][57]. The presence of porosity affects the mechanical integrity, especially the fatigue life of L-PBF parts [58]. Figure 4 illustrates the effect of process parameters choice on the type of porosity formed in an aluminum alloy manufactured by L-PBF [59]. Generally, porosity can be classified according to its geometry, spherical (gas-induced) and non-spherical (process-induced). Gas entrapped in powder particles during the gas atomization process contributes to gas-induced pores [60]. These spherical porosities can also be attributed to the vaporization of low melting point elements during the L-PBF process [61]. Process-induced porosity formation mechanisms are mainly attributed to a lack of fusion and keyholing [62,63]. The lack of fusion porosity is related to the insufficient overlap of successive meltpools [64,65]. Therefore, powder remains un-melted, causing a reduction in the overall density of the part. In contrast, the keyholing phenomena are caused due to the significantly higher laser beam power that causes the metal evaporation and leads to the formation of plasma [66]. This causes the laser beam to penetrate the melted part deeply and forms a vapor cavity within the part [67]. The porosity formation can be monitored by in situ temperature measurements and a proper understanding of how thermal history affects the formation mechanism.

Thermally Induced Cracks
The L-PBF process is governed by extremely fast cooling rates (around 10 8 K/s). Thus, a large temperature gradient occurs around the meltpool [68]. As a result, the meltpool size and the heat-affected zone are significantly smaller than the base plate and previously melted layers [69]. This leads to the creation of residual stresses, which affect the microand macrocracks formation, as illustrated in Figure 5 [70]. The crack formation depends on the L-PBF process parameters and the powder materials; in other words, different types of cracks may occur in different materials. For example, four different crack mechanisms were identified, similar to welding of Ni-based alloys [71]. DebRoy et al. [11] identified three types of cracks that can be observed in metal AM parts: solidification cracking, liquation cracking, and delamination. The solidification crack is observed along the grain boundaries and is usually attributed to shrinkage and thermal contraction. Liquation cracking is related to the presence of liquid films [56]. It is more common in alloys exhibiting hightemperature differences between the liquids and solidus, large meltpool size, or large thermal contractions. Delimitation occurs when the residual stresses at the layer interface exceed the yield strength of the alloy [72,73]. It may occur between the part and the build plate and may occur between two successive layers. Preheating the build plate might reduce the probability of crack and delimitation formation. However, sometimes the crack formation is attributed to the solidification sequence, not only L-PBF process parameters. Acoustic emission sensors can be beneficial in the online detection of cracks formation during the L-PBF of metals [74].

In Situ Sensors Used in the L-PBF Processes
As discussed in the previous section, many factors contribute to the defect generation in parts manufactured using the L-PBF process. Although, optimizing the process parameter is a promising approach to reduce the possibility of defect generation, it is costly to optimize these parameters experimentally, and computationally expensive to use numerical methods to predict defect formation. Therefore, one trending approach is to integrate in situ sensors to monitor the occurrence of these defects online. The most popular sensing strategies for defect detection in the L-PBF process include capturing photonic, electrical, sonic, and thermal signals. Commercial machines have integrated in situ sensors; however, most of them focus on data collection rather than data analysis [3]. This section gives an overview of the most common signal monitoring sensors used in the L-PBF process. These signals can be categorized into visual signals, temperature signals, spectrum signals, and acoustic signals.

Acoustic Sensors
Acoustic emission (AE) is a non-destructive evaluation method that has been employed for defect detection of manufactured parts for decades [75]. It has recently been applied for online monitoring of the welding process due to its ability to characterize and detect weld defects in real time [76]. Acoustic emission is "the generation of an elastic wave by the rapid change in the stress state of some regions in the material" [77]. This change can be related to microcracks formation, pores, evaporation dynamics, and temperature gradients [78]. These sensors can be fixed within the build plate to collect structure-borne acoustic emissions or along the build chamber walls to collect air-borne acoustic emissions, as shown in Figure 6 [79]. The working principle of the AE sensor used can be based on piezoelectric transducer (PZTs) or optical fiber sensors [80]. Generally, piezoceramic transducers are used to detect structure-borne acoustic emissions, while regular membrane microphones are used to detect airborne acoustic emissions. There is higher damping in the air than solid. Therefore, a broader frequency spectrum can be measured in solids [79].

Vision Sensors
The choice of imaging sensors to be integrated with the L-PBF process depends on the monitored process signature. For example, high-speed cameras can be employed to monitor the meltpool size and spatter formation during the L-PBF printing process [82]. To ensure proper data acquisition is collected along the path where the laser melts the powder, the camera can be connected to a dichroic mirror, a galvanometer scanner, and an F-theta lens, as illustrated in Figure 7a. In this case, the camera is considered on-axis, as it follows the laser path and only a small region is captured (meltpool region). In another example of monitoring the meltpool and spatter signature, the high-speed camera was installed off-axis, as illustrated in Figure 7b [83], which is relatively an easier setup. However, more image processing would be required to rectify the captured image and select the region of interest. To monitor scanned layer and powder bed signatures, digital single-lens reflex (DSLR) cameras are usually integrated with the L-PBF process. The DSLR is known to achieve the highest possible image quality [84]. It is common to use external light modules with DSLR cameras and acquire images before and after laser melting to increase the amount of data and, consequently, information obtained from the process [85].

Temperature Sensors
The fast cooling rate and temperature fields in the meltpool are critical to the quality of parts manufactured using the L-PBF process [88]. Temperature changes might cause metal phase variations that can influence the mechanical properties and induce defects in the fabricated parts. Monitoring the L-PBF process temperature while manufacturing the part can help understand the parts' thermal history [67]. The meltpool temperature profile influences the microstructure of the L-PBF parts and affects the defect formation in the parts [54]. Temperature sensors can be categorized into contact and noncontact devices. Contact devices such as thermocouples can be used to provide an estimate of the overall build platform temperature. However, special drilling holes must be machined in the build plate to install the thermocouple sensors, as shown in Figure 8 [89]. Thermocouples have a slow response time and might not be suitable for monitoring the small scale of meltpool. Noncontact thermal sensors are more common to use during L-PBF processes monitoring, especially if the main goal is to control the performance. . Different combinations of temperature sensors: a thermocouple drilled in the baseplate, an off-axis thermal camera to detect overall powder bed temperature and heat distribution, and a coaxial thermal camera to detect meltpool temperature [90].
Noncontact temperature measurement depends on electromagnetic radiation, as they are directly related to the fundamental nature of the process [53]. The key issue is to find the appropriate sensor that can detect the radiation from the processing zone without detecting back radiation from the laser beam itself. The L-PBF process irradiates a broad frequency of spectrum (UV to IR), and photodiodes can be employed to capture the radiation emitted during the melting process [91]. However, photodiodes are single-point sensors and can only provide little information about the spatial distribution of temperature [92]. Optical emission spectroscopy has been implemented in laser welding and directed energy deposition (DED) processes to monitor the process by correlating the collected with the defect formation [93]. If the spectrometer is installed coaxial to the laser beam, it can collect information from any point on the build plate [94]. Spectrometers were used to evaluate the temperature during the L-PBF process; however, compared to pyrometers, it was found to be slower in response and reproduced a large amount of data that might be hard to interpret [95].
A pyrometer measures the temperature of an object or surface from the thermal radiation emitted. It is similar to photodetectors because they absorb energy and measure the wave intensity at any wavelength. Although pyrometers are limited in their spatial resolution, installing them coaxially would also resolve the issue of monitoring the meltpool temperature over the total distance of the powder bed. Thermal cameras are different from visible light cameras as they observe infrared radiation over visible light. The thermal or infrared cameras capture the infrared energy from the meltpool and create an image related to temperature. The resolution of thermal cameras is usually lower than that of visible light cameras as the thermal detector sensors are larger in size. However, the setup and position of an infrared camera would be similar to that of the visible light cameras.

ML Techniques
Machine learning (ML) models are based on computer science studies where the machine is trained to perform tasks similar to computational learning and pattern recognition [96]. These artificial intelligence (AI) techniques allow the decision-making or predictions of output based on prior data (input) without the need for explicit programming [27]. Due to its versatility, ML is being applied in various fields such as manufacturing, computers and security, nuclear engineering, social media, and health [97]. Special consideration must be given to the data acquisition used in ML applications, whether related to AM applications or not. Even for the same application, different ML models can be applied depending on the input data. The following sections review the required data preprocessing for AM-related applications. Then, the most common learning approaches applied in the L-PBF process are discussed, and the objectives and applications of using them in the L-PBF process are highlighted. Finally, the most common assessment methods used to evaluate the performance of the models are presented.

Data Preprocessing
The success of ML techniques depends mainly on the quality of the data fed to the algorithm; if the data contains irrelevant information, it may result in inaccurate results. Thus, data preprocessing is essential in the ML process, especially for AM applications where a large dataset is created. Data preprocessing can help solve problems of data redundancy, missing data, and noisy data [98]. Applying a digital filter may be necessary for AE signals to separate high-and low-frequency signals related to background noise [99]. For welding, cladding, and AM applications, transforming into fast Fourier transform are common preprocessing methods, as illustrated in Figure 9. Lately, the use of spectrogram is also becoming a common approach [78]. Some preprocessing for pyrometers included the use of discrete Fourier transform as well [100]. Preprocessing for image sensors includes background removal, filtering, and cropping [101]. For example, if meltpool is being monitored, the meltpool area will be measured, and the spatter area will be isolated for further investigation. Solid knowledge and experience in the process are necessary to identify digital representations and features in data acquired through images [102]. For example, when the part superelevated, the edge of the part appears after the fresh powder has been recoated. An experienced operator can detect this error and differentiate between it and other common errors such as debris or recoater hopping. Another common approach is to use principal component analysis (PCA) as a data preprocessing tool. However, if not used carefully, important information might be lost and affect the accuracy of the results [19].

Learning Approach
The learning approach of ML models can be categorized into four categories: supervised learning, unsupervised learning, semi-supervised learning, and reinforcement learning [103]. The objective of applying such methods in defect detection is to either predict the occurrence/size of defects or classify signals coming from defective parts.

Supervised Learning
The supervised learning approach is a "task-driven approach"; it is carried out when certain goals are identified to be achieved from a specific input [104]. The algorithm is provided by two sets, a training set and a test set; the goal is "to learn from a set of labeled data in the training set so that it can identify unlabeled data from a test set with the highest possible accuracy" [27]. First, a cost function is calculated to determine the error between the predicted output and the actual output from the training set. Then, to validate the algorithm, an unseen data "test data" is used to evaluate the model's accuracy. The labels can be numerical or ordinal, taking the form of a predicted parameter in the case of a regression-based ML task or a class/grouping if the ML model is used as a classifier. This input-output pairing, inherent in supervised learning, allows an ML algorithm to be trained to analyze and correlate the input data related to its corresponding output, thus, enabling the ML model to establish a set of metrics to predict the output value of a new input data sample. However, this same reliance on a defined output makes supervised learning more susceptible to human error, as mislabeled data samples can be misinterpreted when training a model.
As most ML applications discussed in AM focus on predicting a target parameter or class, supervised learning remains predominant in the application of ML in AM. Data labeling is usually associated with using post-evaluation methods such as microcomputed tomography (microCT) in case of defects. In some cases, mechanical characterization tests are used to determine and label faulty parts and acceptable parts. Most of the time, the parts printed at certain process parameters or with specific defect levels are labeled manually by the operator to train the ML model.
Most of the supervised ML models used in analyzed sensor data collected from the L-PBF process can be categorized as regression or classification problems. Regression models are usually used in AM applications for process parameters optimization. In addition, regression models can sometimes be used for defect detection. For example, linear regression was used to investigate the LPBF process quality by monitoring spatter formation [86]. The authors used high-speed images, image segmentation, and feature extraction to estimate different statistical descriptions of the spatter formation during the LPBF process. The developed regression model was able to predict under-melting and over-melting conditions successfully. Linear regression models were also used to predict the probability of subsurface porosity formation [67]. Infrared images were acquired to detect the unnormalized surface temperature of parts being printed at different process conditions. Accurate predictions of the subsurface porosity from the thermal history of the parts being printed were obtained.
Classification tasks are used to differentiate between different groups of defects or quality levels. If infrared cameras or vision sensors are used, a convolution neural network can be used to separate different classes. For instance, Baumgartl et al. [105] proposed using a convolution neural network (CNN) to classify infrared images captured from delamination, spatters, and high-quality parts. The input, in this case, represents images acquired from the infrared camera for the parts being melted. The parts were printed at known process parameters that will induce specific conditions; the data labeling was performed manually in this case. Each input is regarded as a three-dimensional array; multiple small-filter kernels are applied to the image array. The convolutional layers combine several layers such as activation, batch normalization, and pooling layers to extract useful features from raw data and classify them into specific target classes. As illustrated in Figure 10, the output is to associate each layer of the parts printed to three different classes: accepted, metal splatters, or delamination. Figure 10. Example of a typical convolutional neural network architecture [105]. The input, in this case, is the infrared images acquired (the color map represents the temperature of the layer). The CNN consists of multiple blocks of convolutional layers followed by pooling layers and one or more fully connected layers at the end for classification.

Unsupervised Learning
Contrary to supervised learning, unsupervised ML algorithms do not need an inputoutput pair to train a model successfully [98]. The most common task performed with unsupervised learning is classification through clustering analysis, where the input data is separated into groups based on their similarity. Unsupervised learning techniques are becoming popular, especially in the context of Big Data [23]. These methods are helpful when expert knowledge is not available or not required; it is also helpful with identifying outliers in manufacturing data [106]. The most common unsupervised learning tasks are clustering, feature learning, dimensionality reduction, and anomaly detection. Two common examples from the literature usually applied for L-PBF are K-means clustering and Gaussian mixture models (GMM) [107].
Clustering algorithms are among the most common unsupervised learning algorithms and are typically used for anomaly detection in AM applications. This method is usually helpful when used with a large amount of data and has the advantage of not requiring human interaction, and is, therefore, very convenient for defect detection. A clustering approach was applied to acoustic emission data collected during the L-PBF process. The ML model input was a series of AE signals collected during printing laser tracks at different melting conditions, namely under-melting, over-melting, keyholes, and balling conditions. The objective of the model was to classify the AE signals at each melting condition. Visualizing the data was made easier by applying a t-SNE clustering approach, as illustrated in Figure 11 [108]. The authors were able to group different melting conditions in specific regions on the 3D map, which can then be used for anomaly detection. A clustering approach using a hierarchical K-means and Gaussian mixture model was also used to classify AE signals related to pores and cracks [74].

Semi-supervised Learning
Semi-supervised learning combines supervised and unsupervised learning techniques, usually carried out to improve performance or mitigate risks. One example of a potential application of semi-supervised learning is when only a small subset of the training data can be labeled [109], especially useful in applications where obtaining labeled data is expensive or not feasible for the entire dataset. A semi-supervised approach was proposed by Okaro et al. [110] to classify L-PBF quality builds depending on the output of photodiodes. The photodiode, in this case, detects the thermal radiations from the meltpool, which represents the input of the ML model. Ultimate tensile strength was used to classify and label parts as faulty or acceptable. Instead of labeling all experiments, only part of the experiments was labeled to test the feasibility of the semi-supervised ML approach. The main objective was to classify faulty and high-quality parts, which was performed by applying a Gaussian mixture model. Monte Carlo simulations were used to analyze the ML model performance when changing the number of labeled data. Figure 12 illustrates the histogram of the proposed ML success rate as a function of a number of the labeled data points. It can be noted that when the number of data labeling reduces, the success rates are lower; however, the encouraging aspect is that the proposed ML model performance does not drop abruptly when reducing number of labeled points. This approach outperformed a supervised one because it reduced the computational capacity and resulted in high classification accuracy.

Reinforcement Learning
Reinforcement learning can be defined as "the learning of a mapping from situation to actions to maximize a scalar reward of reinforcement signal" [111]. The fundamental nature of this approach is that it can learn through interaction and by observing the consequence of the model actions. Rewards or penalties are given to alter its behavior and improve the model accuracy [112]. This approach is sometimes referred to as the "environmentdriven approach". It is a powerful tool that can help increase the automation and optimize the performance of sophisticated systems, but is not recommended for straightforward problems [113]. Wasmer et al. [114] were able to classify AE signals obtained during printing three quality level parts using the L-PBF process using a reinforcement learning ML method. The accuracy obtained was around 80%; however, higher accuracy rates are expected using a more advanced hardware setup. For example, the use of structure-borne, rather than airborne, AE sensors is thought to enhance prediction/classification accuracy. However, it is harder to install and set in the structure-borne sensors in the L-PBF machines.
Knaak et al. [115] proposed using reinforcement learning to predict the surface roughness of the L-PBF process. A higher dynamic range optical image setup was installed on the machine in a combination of convolutional neural networks. The main benefit of their proposed framework is that it can be integrated with a control system to optimize surface online, as illustrated in Figure 13 ultimately.

Classification Performance Assessment
Assessing if the ML model is working as intended or not is often performed by dividing the data into training, validating, and testing data. For example, a common issue when training supervised learning models, overfitting, occurs when a model is developed to fit the training dataset too closely and cannot make accurate predictions for new data. Two of the most common methods for avoiding overfitting in ML are the hold-out and k-fold cross-validation methods [12]. These split the data available into training and testing subsets to validate the model's prediction accuracy with data otherwise unknown to the model.
The hold-out method involves partitioning the dataset into a testing and training set. As the name suggests, the training set is used to train the ML model, where the testing set is used to validate its performance. The ratio of training versus testing data is usually 7:3. One limitation of this method is that the number of data samples available for testing is reduced, and the potential for an imbalance in data representation is also increased. The k-fold cross-validation method is similar to the hold-out method, where the dataset is partitioned into several subsets. With each iteration, one subset is used for testing, with the others used for training the model. This process is repeated until each subset has been left out once for testing and is visualized in Figure 14. The k-fold method's main advantage over the hold-out method is that the model can use all the available data for both training and testing.
The most common metrics by which the performance of any ML classifier is often assessed are precision, recall, and F1 score (or accuracy) [116]. Precision is defined as the ratio of true instances within a predicted class to the total number of instances predicted.

Precision =
True Instances Predicted Instances (2) In contrast, recall is the ratio of correct predictions of a specific class to the total number of instances in that class. Recall = True Instances Total Instances The F1 score represents the model's overall performance and is defined as the harmonic mean of the precision and recall, where a score of 1 implies perfect performance.
The alternative to precision calculating is accuracy, defined as the ratio of correct predictions overall predictions. However, it should be noted that this may not be a viable metric when the number of samples from each class is unbalanced. It is hard to suggest a learning approach that is superior to another when applying ML algorithms for L-PBF monitoring applications. On the one hand, supervised learning approaches are well suited when a huge amount of data is collected (which is the case in online monitoring) and proved efficient in learning accuracy and classifying monitored defects. On the other hand, unsupervised learning has the clear advantage of not labeling the data, thus saving the need for ex situ experiments. More research is required to investigate if semisupervised ML algorithms can be useful for the online monitoring of L-PBF processes. The semisupervised ML techniques could have the advantages of high classification accuracy and reducing the need to label all data. It is also important to understand which learning technique is suitable for which sensor is being used. The following section reviews the different ML algorithms used with different sensors to help answer the question of which ML algorithm is more suitable for monitoring L-PBF processes.

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.
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. Pandiyan 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 Ye 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 • 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 Wasmer 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]. Eschner et al. [76] tested structure-borne AE signals; a piezoceramic sensor was fixed under the build plate to monitor the L-PBF process. In total, 54 cubes were used for the experiment, and different density levels were obtained by changing the laser power, scan speed, and hatch speed. Three different part complexities were used to check if the AE signals will be affected by parts geometry, as illustrated in Figure 16. Short Fourier transform was applied to the raw AE data, and a spectrogram was obtained for each layer and specimen. The background noise was subtracted from all the spectrograms. Three different classes based on the number of specimens were identified. A multilayer perceptron (MLP), a typical ANN, was used to classify the AE signals. The input layer consisted of 12 million input neurons, two hidden layers with 64 and 32 neurons each, and a bottleneck strategy. The third and final layer consisted of three output neurons for the three different density classes. Sigmoid activation function was used for individual neurons and SoftMax for the output layer. Each training was set up for 100 epochs with early stopping based on the validation loss after each epoch. The classification accuracy of the proposed method resulted in classification accuracy between 76-86%; much lower prediction accuracy was achieved for complicated shapes.
Ghayoomi et al. [121] fixed a WSα AE sensor under the build plate to detect the structure-borne signals to monitor the L-PBF process of 316L. Three density levels were defined according to the internal defects: low-, medium-, and high-quality levels. The AE signals were collected, and an FFT was performed to transform them into the frequency domain. First, a K-means clustering was used to label the FFT signals, then a DBN with five layers was used to train 85% of the labeled data, and 15% were left for testing. The classification accuracy was between 70-91%. In a later publication [74], the author tested the AE monitoring of H13 tool steel for three different intentional conditions minimum defects, cracks only, and porosities and cracks. These conditions were obtained by changing only the laser power. Three different ML techniques were used to classify the data and detect the defects. First, a hierarchical K-means clustering was employed for labeling the data, followed by a supervised deep learning neural network (DBN) to match acoustic signal with defect type. Second, a principal component analysis (PCA) was used to reduce the dimensionality of the dataset. A Gaussian mixture model (GMM) was employed to enable fast defect detection suitable for online monitoring. Third, a variational autoencoder (VAE) approach was used to obtain a general signal feature that could be an input for the classifier. The developed VAE classifier successfully detected trends in 316L samples without the need for training and can serve as a general ML model to detect L-PBF defects for different materials Table 1 summarizes the key findings in the literature to date on applying AE sensors for L-PBF process monitoring. One of the main factors considered when using AE sensors for L-PBF monitoring is the AE sensor-like type and position in the build chamber. In addition, factors related to the print itself, such as materials, coupon shapes, and parameters, were chosen for testing. All these combined with the ML algorithm define the time and accuracy of the decision-making. It is important to note that most articles changed laser scan speed, and only a few changed the laser power. The accuracy of the ML model, defined as the ratio between accurate predictions and all predictions, is reported. It can be observed that the accuracy ratio varies with the change of ML model and the experiment tested in each case. It is worth noting that high classification accuracy is associated with either frequency domain or time-frequency domain.

Vision Sensor
In situ monitoring of the L-PBF layerwise is usually achieved using a digital singlelens reflex (DSLR) camera. An unsupervised approach is suggested by Scime et al. [123] for anomaly detection in the powder layer of the L-PBF process. In their study, the authors used images of powder beds as input in the ML model; the objective was to classify the different anomalies that may result in powder spreading. The six anomalies studied, recoater hopper, streaking, debris, superelevation, part failure, and incomplete spreading, are illustrated in Figure 17. The ML approach used is bag-of-key points (or words); the algorithm creates filter banks from the acquired images and clusters similar ones together. Different material types were analyzed, including Ti6Al4V (four powder types), AlSi10Mg, Inconel 718 (two powder types), stainless steel 316L, stainless steel 17-4, and a bronze alloy. The accuracy of the developed model was 95% for anomaly detection and 100% for anomaly-free detection. However, the algorithm has a relatively low accuracy of detecting recoater streaking (56%), attributed to a low number of training data, a small area, and the frequent colocation of this anomaly. The algorithm was applied on a Hamerschlag Hall model, using tensile bars and impeller blades to enhance parts orientation and detect potential overhang failure. Due to its relatively low computation burden, this approach might be practical in connecting it to a feedback control system. A supervised approach is more common for layerwise monitoring; Imani et al. [124] compared six different ML methods. The input of the model was layerwise images taken at different light schemes. The objective of the model was to classify parts printed at different quality levels. Ti6Al4V cylinder specimens were printed having different internal defects by manipulating the process parameters. Several ML algorithms were used to link the extracted features to the process parameters. It was found that using SVM with a combination of spectral graphs, theoretic features, and multi and lacunarity features results in the best classification accuracy of around 90%. Gobert et al. [85] demonstrated the effectiveness of using an ensemble classification scheme to detect the discontinuities in stainless-steel parts printed using the L-PBF process, as illustrated in Figure 18. The input images were again layerwise images taken at different light schemes; the objective of the ML algorithm is to classify if the layer contains anomaly or is defect-free. A microCT was used to label the data and identify the exact positions of defects within each layer. The accuracy of the classification increased to 85%, compared to 65% using individual flash modules. Snow et al. [125] used layerwise images as an input, and the objective of applying the ML algorithm was to classify parts as defective (contains flaw) or defect-free. The images were captured before and after laser exposure. The authors demonstrated that images taken post-laser melting were more valuable than those captured after powder recoating for defect detection. The authors also validated that CNN could detect flaws more accurately than NN due to its generalization ability of the dataset. The CNN architecture is shown in Figure 19. An optical microscope was used to identify the ground truth, with the images captured from the powder layer resembling the images captured using a microscope. Aminzadeh et al. [126] used 35 different combinations of process parameters to print Inconel 625 cubes. Three surface quality classes were identified according to the smoothness and visible porosities. The model input was layerwise images captured during the printing of the parts. A Bayesian classifier was developed and trained to distinguish between the different surface quality levels. The accuracy of the classier was around 90%.
Imani et al. [127] presented a novel methodology identifying the region of interest (ROI) in each layerwise image using deep learning convolutional neural network (DCNN). The model's input was layerwise images, and the objective was to predict process defects in L-PBF printed parts. In that case, the CAD slice for each layer represented the ground truth. Each layerwise ROI is partitioned into different subregions of interest to solve the problem of varying cross-sectional geometries. Afterward, spatial characterization is performed to provide critical information on the distribution of pixels in each ROI and ensure that the input to the DCNN is equal. The DCNN was able to classify defects with an accuracy of 92.50%. This approach emphasizes the importance of deep learning. In addition, the ground truth obtained from CAD files makes it easy to apply and prevents postprocessing data collection. A layerwise monitoring approach to detect build failure using a DCNN was also suggested by Gaikwad et al. [128]. X-ray computed tomography was used to obtain ground truth. The results indicate that the developed DCNN algorithm can predict process defects with 85-96% accuracy and, therefore, replace expensive postprocessing measurements. Similarly, Caggiano et al. [129] captured images layer by layer during the L-PBF process to detect defects that might result from different volumetric energy density input to Inconel 718 powder. Automatic feature learning and fusion were achieved, and a DCNN model recognizes the defects by the accuracy of 99% compared to visual words and the histogram of oriented gradients (HoG) approach. Table 2 summarizes some of the research that integrated DSLR cameras for in situ monitoring of the L-PBF process and ML applications. Most of the research applied supervised ML models, and recently, much research has started focusing on DCNN algorithms. The input for these models is layerwise images acquired during the printing process, and in some cases, these images are captured at different light schemes. The objectives are mostly to classify defective and nondefective parts. Sometimes, the images are captured before and after laser melting, i.e., before and after the fresh powder is spread. The above analysis has shown that images taken after laser melting contain important information. Furthermore, the supervised approach using DCNN is more employed when monitoring the scanned layer and powder bed signatures; it is expected to result in the highest classification accuracy in terms of layerwise monitoring.   The morphological changes in meltpool geometry were monitored by applying a supervised ML algorithm described by Scime et al. [101]. Four meltpool categories were defined: desirable, balling, under-melting, and keyholing porosity for Inconel 718 parts. The supervised ML algorithm used in this work was bag of words (BoW), often applied to computer vision problems. The training data and input of the ML model consists of frames of data captured by the high-speed camera during the experiment; the ground truth labels are the only human interaction in the process. The objective of the model was to classify meltpool related to keyholing porosity and balling instability. Another supervised approach, a linear regression model, was suggested by Repossini et al. [86] to understand the effect of process parameters on the spatter formation at different energy density levels by applying a logistic regression model. Three different conditions were tested: under-melting, regular, and over-melting. The logistic regression (LR) model was chosen because it can consider the ordinal nature of the dependent variable. Three LR models were compared; the first considered only laser heat zone, the second model considered laser heat zone and spatter descriptors, and the third model only considered the spatter descriptors. It was noted that models that included spatter descriptor information have better goodness of fit and fewer misclassification errors.
Meltpool and spatter monitoring are usually monitored by high-speed cameras and high resolution; when the camera is mounted coaxially, it is easier to track all the melpools during a single build plate. The only constraint would be the high amount of data and the storage capacity. Feature reduction using principal component analysis (PCA) is often used with images collected in situ during the L-PBF due to the large amount of data collected. For example, Zhang et al. [130] compared two classifiers, CNN and PCA-SVM. The main objective was to use the meltpool, plume, and spatter images to classify three different conditions in melt tracks: balling, continuous, and over-melting. The original image, as well as the extracted regions of interest, are shown in Figure 20. Various features were extracted to help with the classification models, for example, meltpool histogram features, plume intensity, plume orientation, mean spatter area, mean spatter velocity, and other features. CNN resulted in better classification accuracy of 92% compared to PCA-SVM methods.
Convolution neural networks (CNN) were investigated by Yuan et al. [131] to predict the continuity of L-PBF tracks. The input of the ML model was meltpool images acquired at different positions while printing, as illustrated in Figure 21. The melt tracks thickness was changed by changing the process parameters of the L-PBF process. Ex situ height maps analysis is used to obtain ground truth. For each track, the main objective is to measure the mean and standard deviation of track width and classify the continuity of the track. The proposed algorithm was able to classify track continuity with relatively high accuracy of 93%.  Fathizadan et al. [132] proposed using convolutional autoencoders (CAE) neural networks to process the meltpool images for anomaly detection, as shown in Figure 22 The proposed framework contains three main components. First, the CAE is used to process the meltpool images. Next, agglomerative clustering is performed to annotate the data, and then the control charting scheme is used to monitor the process stability and anomaly detection. Finally, Inconel 625 parts of 10 × 10 × 5 mm are built. The CAE results were compared to a neighboring-effect modeling method (NBEM), and an improvement in accuracy and precision and F1 score were noticed. The authors emphasize the capability of the CAE approach to obtain a set of intelligent features that can provide an in-depth description of meltpool data. High-speed cameras are required to capture enough details to detect the meltpool plume and spatter and correlate it with process parameters. Ye et al. [83] proposed applying a DBN ML algorithm to detect the quality of parts using the plume and spatter signature of 304L stainless-steel parts. The model input was a series of meltpool images acquired during the printing process. Five melting states were tested: over-melted, middle over-melted, normal melted, middle under-melted, and under-melted. These conditions were obtained by changing the volumetric energy density fed to the powder bed. The authors demonstrated that the feature extraction step could be skipped, and minimal image processing can result in high classification accuracy (83.40%) when using DBN ML algorithms. However, they showed that complex image processing and time-consuming feature extraction did not improve classification accuracy when CNN models were used.
A DBN was employed to predict the laser power value based on analyzing the meltpool images as an input to the model, as suggested by Kwon et al. [82]. The model objective was to classify and detect the defect formation during the printing of L-PBF. The monitoring of the meltpool was performed by reflecting the laser beam using a dichroic mirror and a galvanometer scanner. Seven specimens of 316L were produced at different laser power. The density of the parts was related to the sum of pixels intensity of the captured image. The authors compared two models; the first one, the ten hidden layers, and 360 nodes at all layers were used. In the second model, the number of layers and hidden nodes were varied (17,600 images for training + 2200 images for validation + 2200 images for test, resulting in a total of 22,000 images). The DBN with varying layers and nodes had a significantly higher accuracy rate. The authors suggest that a better classification can be obtained in higher laser power in general because the effect of blur images is not high. It was noted that the developed ML model works better as a classifier than a regression model. However, more input results and higher camera resolution are needed to enhance the classification results. Table 3 presents the ML algorithms used to integrate high-speed cameras with the L-PBF process for meltpool monitoring. It was observed that most experiments focused on analyzing laser tracks as the process signature. Installing the camera on-axis is a more complicated setup. However, it allows monitoring the meltpool as it moves from one position to the other. Although installing the camera off-axis is easier, image processing such as correction and identifying the region of interest is required. Therefore, it is expected that using an on-axis camera with a supervised learning approach such as CNN might result in the highest classification accuracy when monitoring the meltpool of the L-PBF process. Table 3. Machine learning application of in situ monitoring of L-PBF processes meltpool using high-speed cameras.

Temperature Sensors
The most common temperature sensors used for L-PBF process monitoring reported in the literature are photodiodes, pyrometers, and infrared cameras. The use of three photodiodes and ML algorithms were employed by Jayasinghe et al. [133] to investigate the feasibility of predicting the density of parts manufactured using the L-PBF process. The ML model used the input from photodiodes which detected radiations from the meltpool while printing. The authors used singular value decomposition (SVD) to extract the essential features from the large dataset collected by the photodiode. An unsupervised approach (K-means and Gaussian mixture model) and a supervised approach (Gaussian process) were compared to predict the build density of the manufactured parts. An accuracy as high as 93% was achieved using K-means and GMM. The density could be predicted with a relatively low root mean square (RMS) error of 3.65% using the Gaussian process, as illustrated by Figure 23. The high accuracy of their developed model was attributed to the high sample rate of the photodiodes. Moreover, as these sensors are more cost-efficient than cameras, this approach offers a feasible methodology integrated with commercial L-PBF processes. Features extraction on pyrometer data was investigated by Zouhri et al. [134]. A pyrometer was used to link the optical signal collected during the L-PBF process with the manufactured part's density. The pyrometer was installed coaxial to the laser, and the authors compared it to ML models to classify parts printed at different density levels. First, the authors extracted the features from the collected data, and SVM and MLP classifiers were then used. The second approach, a deep learning model with a 1D-CNN, was used to eliminate the need for feature extraction. The results have shown that the feature extraction before classification improves accuracy, around 90% compared to 80%. The authors also highlighted that the statistical feature extraction approach is a fast response method and will not affect the classification time.
On the other hand, Mahatao et al. [100] found that cleaning the pyrometer data did not impact their accuracy results. Parts with intentional defects were printed, and two pyrometers were installed off-axis to collect temperature data of each scan vector per layer per part. A classification accuracy between 92-94% was achieved using K-nearest neighboring model. In addition, some approaches, such as the approximate nearest neighbor and conservative redundancy removals, were applied to speed up the computation time.
One limitation of using single-wavelength pyrometers lies in the variation in the emissivity (ability to emit infrared radiation) [135]. The term emissivity is used to describe the radiation efficiency of a target compared to a blackbody at the same wavelength, angle, and temperature. A more reliable method is two-wavelength pyrometers [136], which results in less noise and higher accuracy. Therefore, Mahmoudi et al. [137] proposed using a two-wavelength pyrometer in an off-axis setup for layerwise anomaly detection during the L-PBF process. Then, a screening step was used to reduce the amount of data and focus on the region of interest where anomalies are expected. The novelty of this approach is that a Gaussian process model is used to account for the spatial dependence of the region of interests. Then, four classifiers were used to classify the anomalies in each layer: logistic regression, K-NN, support vector machines, and random forests. The logistic regression model resulted in the highest accuracy, around 96%.
Mitchell et al. [138] investigated the relationship between the online thermal signature and intentional cavities in a body manufactured by the L-PBF process. The main objective of using ML models was to predict defect occurrence in the printed parts. An unsupervised ML model (k-d tree) was used to predict outliers in the meltpool conditions identified by the pyrometer. The pyrometer used in this study can generate images. Metrics of the meltpool size, shape, and orientation were estimated from the pyrometer images. Then, information from the heat-affected zone was used to create the thermal history per layer, and vertical volume slices were created. Finally, spatially registration was used to correlate the pyrometer and microCT data, as shown by Figure 24. The pyrometer resolution was less than the microCT because of the relatively low sampling rate and the fast nature of the L-PBF. Moreover, the meltpool information obtained from pyrometers was used to classify their behavior as an anomaly or normal. A higher detection rate of pores was found in outlier meltpool images, demonstrating the approach's effectiveness. Although this technique offers a good solution for in situ monitoring, a concern about the response time for control is raised. An infrared camera was employed by Elwarfallie et al. [139] to investigate the use of CNN to predict defects in the powder bed layers of the L-PBF process. The images were taken after sintering four different geometric features at different sizes and represented defects. Their research aimed to investigate the accuracy of the CNN to detect different geometric at different sizes. Their accuracy was limited to 61% due to the insufficient number of layers used. In addition, they suggest the use of a higher-resolution camera to enhance the accuracy. Baumgartl et al. [105] also used an off-axis infrared camera image as a source for the deep learning-based neural network. The main aim of their work was to detect defects such as delamination and spatter. The authors used deep CNN to architecture for the ML model; the accuracy of detecting delamination and splatter was around 96%. However, detecting cracks, balling, pores, and unfused powder might be harder to detect using the same ML model. Table 4 summarizes most articles that used ML models with temperature sensors for in situ monitoring of the L-PBF processes. The signature being monitored here is either the meltpool temperature or the temperature of the scanned layer. Comparable accuracies can be obtained by using pyrometers and infrared cameras; however, it must be kept in mind that the use of photodiode is less expensive. Moreover, it was observed that the objective of using temperature sensors is mostly to detect pore formation and correlate it to the thermal history of parts being printed. It was noted that, when dealing with temporal signals such as pyrometers and photodiodes, linear regression models have a relatively high classification accuracy. More research is needed to investigate if thermographic images can be classified with high accuracy using DCNN, similar to layerwise, monitoring or not.

In-Process Control
The natural extension of research work on process monitoring is developing systems capable of predicting impending events and taking corrective actions to prevent the onset of defects. The application of ML in real-time control for AM is just coming into existence and beginning to display signs of future potential. Some of the challenges where such systems are not highly utilized are a high number of process parameters and their relationship with the part quality. The use of ML for monitoring has matured in the past few years as it mainly depends on training the model offline. More effort is needed to cope with the fast nature of the process. Furthermore, solid solutions for data management and storage are needed to develop ML-based control [140]. Factors affecting the development of such systems include the need for sensor fusion techniques to achieve improved process understanding and control [141] Several studies have been performed using classical control approaches to compensate for defects in metal additive manufacturing. Well-defined examples can be found in the works of Kruth et al. [53,142,143], Berumen et al. [144], and Kleszczynski et al. [46]. Examples of more recent research work in this area using mainly energy density as a process parameter include Clijsters et al. [145], Wang et al. [146], Renken et al. [147], and Yeung et al. [148]. In addition, comprehensive review papers by Tapia and Elwany [149] and Boddu et al. [150] were also published. Generally, these efforts were based on mechanistic (or analytical) process models based on first principles. This typically leads to a fixed number of process parameters with physical or empirical interpretation. In addition, physics-based models are often computationally expensive.
In contrast, data-driven models require little physical knowledge and a more extensive dataset. The number of parameters in these "black-box" models depends on the available data. The so-called "grey-box" or hybrid semiparametric modeling is realized by balancing the advantages and disadvantages of knowledge and data-driven models. There are two approaches used to realize hybrid model structures: serial or parallel [151]. In the serial approach, the data-driven model is used as an input to the mechanistic model. In the parallel approach, the output of the data-driven model is superimposed onto that of the mechanistic model. The residuals between process observations and mechanistic model predictions are then used to improve the model's prediction accuracy. Examples of hybrid modeling can be found in the chemical industry [152].
In this section, we focus on machine learning approaches to control the additive manufacturing process. These approaches are typically mainly based on data-driven models. Machine learning models can be applied to the AM process's analysis, diagnosis, and control because they can define critical causal relationships between process variables and construct classification procedures to detect unwanted process states. Classification of the process states can be used to construct optimal control trajectories in real-time process control.
The application of ML in the development of in-process control systems has improved control performance in terms of accuracy, particularly for systems that are difficult to describe mathematically [153]. ML techniques have been used to develop online closed-loop controllers for various AM processes. For example, Yao et al. [154] used the Markov decision process and layer-per-layer imaging data to formulate an AM optimal control system. Optimal control theory is a branch of mathematical optimization that deals with finding a control for a dynamical system over a period of time such that an objective function is optimized. In this case, the optimal control was to optimize the process parameters in a layer-by-layer manner. They considered the stochastic dynamics of the defects for each layer and used the Markov decision process to control the L-PBF process sequentially. The authors created an optimal quality control policy chart to illustrate when corrective action should be taken, as illustrated by Figure 25. Jin et al. [155] developed a real-time monitoring and control system for fused deposition modeling (FDM) technology. The system proposed adjusts printing conditions based on a trained machine learning algorithm. Machine learning is implemented using a convolution neural network (CNN) model. Real-time images are continuously fed into the model and classified to obtain the current printing condition. The system generates new commands to adjust the filaments flow rate if a defect is detected.
Mukherjee and DebRoy [141] proposed a digital twin of the printing machine; a digital twin is a "virtual replica of the hardware that has been successfully constructed and utilized". A digital twin AM process consists of mechanistic, sensing and control, statistical, Big Data, and machine learning [156]. The main aim was to reduce the trial and error required for part qualification and obtain the desired product attributes. They specified the required components of a digital twin to include mechanistic, control, and statistical models, and machine learning. Reiff et al. [21] developed a control architecture that includes a model-based feedforward control for the L-PBF process, as illustrated in Figure 26 The controller adjusts the laser power, scan speed, and scan strategy based on the current bed temperature calculated by a 2D thermal model. A pyrometer is used to monitor the meltpool temperature, which is used as a feedback signal. Machine learning, specifically radial basis function networks (RBF), was used to tune the process parameters and determine the optimum combination of laser power, scan speed, and powder bed temperature to achieve a homogeneous meltpool.
Liu et al. [157] developed an image-based diagnosis and closed-loop feedback control system for the FDM process. The system is based on a real-time image acquisition device, a two-stage online classification framework to identify the types and severity of the defects, and a PID controller for mitigating the defects. Recently, Masinelli et al. [158] suggested using reinforcement learning (RL) to control the metal additive manufacturing process. The authors used acoustic emission (AE) signals to trace the onset or propagation of defects. Table 5 summarizes the recent efforts related to the application of machine learning techniques in real-time process control of the AM process. It can be noted that this field is still unexplored, and more research is needed to enhance the capability of ML-based control in L-PBF processes.

Summary and Perspective
The latest research integrating ML techniques for in situ monitoring and control of the L-PBF process has been reviewed in this work. First, a description of the L-PBF process signature and the detectable defects was discussed, highlighting the difference between the level of details in each process signature. Afterward, the most common sensors currently used for in situ monitoring were discussed and compared in terms of applications and specifications. Then a detailed categorization of the different ML techniques used for L-PBF defects detection was presented. Finally, this review article classified the ML algorithms in the literature according to sensor type and monitored process signature. Moreover, the application of ML-based control was compared, and more research and investigation in this field is required to overcome the limitations of computationally expensive physics-based models.
It was observed that if an acoustic sensor is being used to monitor the L-PBF process, analyzing the collected AE signals in the frequency domain resulted in higher classification accuracy. It was also observed that the highest accuracy could be obtained when deep learning neural networks are applied. When DSLR cameras are being used to monitor the scanned layer and powder bed layers, it was observed that the supervised approach using DCNN resulted in relatively higher classification accuracy of defects. CNN was the most suitable ML algorithm used to monitor meltpool signatures of the L-PBF. However, it was noted that mounting the camera coaxially resulted in higher defects classification rates. Linear regression models resulted in high classification accuracy when used to classify defects detected by pyrometers and photodiodes.
A major challenge with the ML algorithm examples described in this review article is that they are only applicable to the specific machine they were developed on, the one material it was tested on, or the specific process parameters they were applied to test. Therefore, generalizing these ML models is a current research gap, and more investigation is needed in this area. Moreover, the data, although large in volume, collected from one sensor is sometimes not sufficient. For example, DSLR cameras are only able to detect a large field of view by monitoring layerwise, while high-speed cameras have a narrow field of view and can only detect a small portion of the build plate. Likewise, infrared cameras can detect surface defects, while AE sensors can detect volume defects. Undoubtedly, employing several sensors on the L-PBFs and attempting to fuse the data from these sensors can help enhance detection and classification accuracy. However, new ML algorithms will be needed to cope with the collected data's volume, variety, and velocity.
Below are some suggested research directions to improve the use of ML techniques for in situ monitoring and control of the L-PBF processes.

Data Volume, Velocity, and Variety
Although ML methods have been well developed for decades, ML methods for online monitoring are a relatively new topic that needs more investigation. Due to the fast nature of the L-PBF process, the volume, velocity, and variety of collected data are large enough to fit the aspects of "Big Data" [22]. The articles reviewed in this study reveal that supervised ML methods are the most common approach used for in situ monitoring and control of the L-PBF. Therefore, it is expected that labeling and training this amount of data is both tedious and labor-intensive [159]. One alternative to reduce the time needed for data training is to use different ML approaches, such as unsupervised and active learning techniques, which are expected to be used more often. This would reduce the lengthy training time and offer an opportunity for faster response time [160].
Another approach reported in the literature to reduce the training time is to use knowledge-based artificial neural networks (KB-ANN) [161]. The authors used a modular ANN composed of zones where system-related knowledge is already available in this approach. The weight of neurons can be precomputed without the need for training. Classical artificial neural networks (ANN) were trained using experimental data in areas where knowledge is insufficient. The authors applied this approach to a fused deposition modeling (FDM) process; it is expected that this approach might also be suitable for the L-PBF process and is worth investigating. Another concern is the huge resource consumption needed to create enough data for model training. A suggested approach is integrating physics-based models to ML models [162]. The physics-based model was used to generate large thermal history data used for training the ML model. The model suggested by Ren et al. [162] was validated experimentally and yielded good results; however, it was created for a single layer. The ability to expand this model to multilayer and expand the library of materials may be computationally expensive but still necessary.

Generalization Issues
Most published data report an acceptable accuracy rate for classifying defects and regression analysis using different sensors and different ML algorithms. However, these results were obtained from different geometries and different materials using different machines. Therefore, generalized ML algorithms need to be developed to demonstrate the feasibility of knowledge transfer across different platforms using different machines. Minimal research has discussed the generalization of the developed ML models to monitor L-PBF by changing the material type. For example, Ghayoomi et al. [74] used a VAE approach to generalize the developed machine learning model to classify defects in two different materials, H13 tool steels and 316L stainless steels. Eschner et al. [76] attempted to test the same ML model on different part geometries; the model accuracy was not high when generalized. It was found that training a separate model for complicated geometry was necessary. An approach to generalize an ML model was suggested by Liu et al. [163]. Previously published hardness data was used to train an ML model to predict the part's porosity. More generalized ML models can help reduce the training time and enhance ML algorithms' transferability of ML algorithms, not only across different materials but across different L-PBF platforms. Generalization is usually assessed by testing the ML model with new samples that were not used in training.

Sensor Fusion and Development
Sensor fusion implies using more than one sensor output to achieve an improved process understanding and thus control. The fusion of various data such as meltpool size, temperature, and acoustic emission can be used as an information source for internal and surface defects. It might also serve as an efficient approach to control the L-PBF process and account for corrective actions. Very limited research discusses the applicability of sensor fusion to monitor the L-PBF processes. For example, Montazeri et al. [164] proposed using a photodetector, high-speed visible camera, and short-wave infrared thermal camera for online defect detection of the L-PBF process. It was noted that low-fidelity sensors such as photodetectors might be more cost-effective than thermal cameras. The authors also noted that an array of photodetectors might enhance defect detection accuracy. Clearly, there is a need for more studies on different ML algorithms that can fuse different data collected and benefit from these additions instead of analyzing the output of each sensor individually.
Moreover, to use the ML model in online control of the L-PBF, a relatively fast response is needed to ensure a timely control signal is given to take corrective action [102]. Therefore, it was also suggested to develop computation-enabled intelligent sensors capable of being application-targeted [165]. These sensors will benefit from "Big Data" analytics and the Internet of Things ("IoT") to help place L-PBF in its expected position in Industry 4.0.

AM Framework Development
Data-driven models have been used in several stages of the L-PBF process lifecycle. That is because the process involves a vast amount of manufacturing data, including design data, materials data, process data, online monitoring data, and postprocessing data. Using a data-driven framework to handle the data transfer during the lifecycle of the metallic part would enable the smart transformation of metal AM processes [166]. Data-driven models to test manufacturability and test design for AM rules have been suggested by Ko et al. [167], while data-driven models to predict surface roughness of printed parts were suggested by Cao et al. [168]. Majeed et al. [166] proposed a data-driven framework to handle real-time and non-real-time data for the product lifecycle of AM. The proposed framework consists of four phases: data acquisition, storage, processing integration, and management of this data. Then, data mining and decision-making takes place. Finally, application services take place based on the decisions that were made in the previous phase. To date, most of the research focuses on developing and proposing framework structure in a single stage of AM lifecycle; very limited research discusses the realization of such conceptual ideas [140]. To date, there is no data-driven framework capable of handling the data collected during the lifecycle of the L-PBF process. Therefore, it is suggested that more studies integrate real-time data with non-real-time data and construct a data-driven framework for L-PBF processes. Future research in these areas might help with the smart transformation of the L-PBF processes to take its role as one of the pillars of Industry 4.0. Funding: This research received no external funding.

Conflicts of Interest:
The authors declare no conflict of interes.