Using in-situ process monitoring data to identify defective layers in Ti-6Al-4V additively manufactured porous biomaterials

Additive manufacturing processes, such as Laser Powder Bed Fusion (L-PBF), facilitates the manufacture of porous biomaterials structures, which can be used for example to enhance bone tissue regeneration. In-situ process monitoring techniques such as meltpool emission monitoring are increasingly being applied for the monitoring of the L -PBF processes. This paper investigates the use of statistical anomaly detection to analyse in-situ process monitoring data obtained during L -PBF. In this study a Renishaw 500M was used to produce porous structures, using Ti-6Al-4 V feedstock powder. During the L -PBF process, a co-axial photodiode-based process monitoring system was utilised to generate data relating to both the meltpool and the operational behaviour of the laser. Porous structures were created with intentionally defective layers, whereby the laser power was selectively reduced at specific layers. Control sam- ples were also created where no intentionally defective layers were created. In addition, an un-intentionally defective sample was also analysed. The Generalized Extreme Studentized Deviate (GESD) test was employed to identify any defective layers within the structures. When this approach was applied to data generated during the processing of the structures with reduced input energy layers, the number of defective layers identified corresponded exactly with the known amount. When the test was run on the meltpool data, corresponding to the un-intentional defective structure, 30 layers were identified as defective. When examined, the identified layers corresponded to the physical location of the defect within the sample. The results obtained in this study indicate that the GESD test is an effective and computationally inexpensive method of identifying defective layers created during the L -PBF process.


Introduction
Laser Powder Bed Fusion (L-PBF) involves the melting of powder together, using a layer by layer approach [1]. This additive manufacturing (AM), process facilitates the fabrication of intricate structures that cannot be fabricated using traditional manufacturing methods [2]. In recent years, the increased need for individual part customisation in medical applications and the need for lightweight parts in the aerospace and automotive industries, has seen a rapid development in AM technologies [3][4][5].
L-PBF allows for the production of porous metallic structures, composed of internal micro-scaled architectures. This in turn can allow for the creation of porous biomaterials, with site specific mechanical properties that match the surrounding natural bone [6]. The open nature of the structure can also promote better bone ingrowth, resulting in a strong bone-implant interface [10,11]. Combining both the freeform geometries that L-PBF can facilitate and the advantageous biological properties of these structures, extensive research has been carried out on the use of porous-biomaterials as bone replacing implants [7][8][9].
Although L-PBF offers several advantages and opportunities, concerns around the quality of parts produced demands a high level of post build quality control (QC) [12]. Computer tomography (CT) is a common QC technique, which is routinely in the AM industry [13]. Although this method of QC is effective, it is also costly and time-consuming. Further to this the components that fail to meet the required standards are scrapped, resulting in increased levels of process waste, a potential delay in production times and consequentially results in increase part cost [14]. Therefore, in order to render the need for such post build QC checks redundant, methods of identifying defective components based on in-situ process monitoring data are critical.
Several studies have been published that assess the use of process monitoring (PM) systems during the L-PBF processes [15][16][17][18]. These systems typically consist of one or more photodiodes to monitor the emissions generated by the meltpool. These studies typically assess the emissions generated during the processing of single line scans or primitive cubic test samples.
In our previous study, a strong correlation was demonstrated between PM data and the mechanical properties of diamond based cellular structures [19]. It was demonstrated that as the strength of the structures increased, with increasing input energy, a linear increase in the intensity of the meltpool and laser monitoring signal occurred. In a follow up study, the effect that reducing the laser power at specific layers within porous structures, on the structures load bearing capacity and strut formation was also demonstrated [20]. This study also demonstrated a correlation between the deviation in PM data, between control data and the build data, with a reduction in the load bearing capacity of the structures.
While these studies provide some insight into the application of PM systems during the AM of porous structures, there have been very few publications on the use of anomaly detection to detect defective layers created during the metal additive manufacturing. One such study was carried out by Okaro et al. [21], in their study a machine learning algorithm was applied to PM data in order to identify faulty tensile samples. Okaro used the semi-supervised Gaussian Mixture Model (GMM) technique to classify each tensile bar as "faulty" or "acceptable". In their work however, no classification of individual layers was determined.
Statistical analysis techniques, such as anomaly detection tests, have been published for several decades. One such test is that developed by Grubbs et al. who developed procedures and equations to determine whether or not the highest, lowest or highest & lowest values in a data set are statistical anomalies [22]. Grubbs defined an anomaly as an observation that is the result of a gross deviation from the prescribed procedure or as a manifestation of the random variability inherent within the data set. Jain et al. compared the performance of the Grubbs anomaly test and the Extreme Studentized Deviate (ESD) anomaly detection test, to identify anomalies in environmental and chemical data [23]. These authors concluded that in general the ESD technique provided a better fit, when compared with the Grubbs test, for the detection of multiple anomalies in the data sets studied.
Rosner et al. reported on a procedure to detect multiple (between 1 and k) anomalies in a data set [24]. Rosner's study demonstrated that the modified ESD test, known as the Generalized Extreme Studentized Deviate (GESD), was shown to be accurate using Monte Carlo simulation, at detecting up to 10 anomalies in a sample size of just 25. Rosner concluded that the GESD test was a superior approach to the detection of multiple anomalies in a data, compared with that obtained by ESD.
Mirapeix et al. employed optical spectroscopy to detect defects in laser welded seems [25]. In their work Mirapeix showed that a spike in the wavelength of the emissions detected correlated with the location of a defect in the weld seem. Mirapeix also applied sliding average smoothening technique to remove background noise from the signals generated. This according to the authors resulted in better results, however the effect of the sliding window size was not demonstrated and according to the should be the investigated further to assess its effect.
The aim of this current study is to assess if the Generalized Extreme Studentized Deviate (GESD) anomaly detection test can be utilised to detect defective layers created during the AM of porous structures. This study presents, for the first time, the application of the GESD anomaly detection test on data generated by an in-situ process monitoring system during metal additive manufacturing. The aims of this study are to: -Apply a statistical anomaly detection technique to meltpool and laser related process monitoring data, to identify defective layers within porous structures. -Evaluate if the GESD test can be used to determine if a layer is defective or not.
-Assess the effect of the sliding window size, on the performance of the detection technique. -Determine if by comparing build data, to benchmark data and subsequently applying the anomaly detection test, can be used to identify defective layers.

Experimental setup
Material & machine setup Porous structures were created using a Renishaw RenAM500 M, equipped with the InfiniAM in-situ process monitoring (PM) system. All test pieces were fabricated using Ti-6Al-4 V grade 23 powder, obtained from AP & C, with powder particle diameters in the range of 15-45 μm.
Prior to the build commencing, a vacuum was used to reduce the level of oxygen in the chamber, following which argon gas was introduced to achieve an inert atmosphere.
The test specimen used in this work consisted of a 15 × 15 × 28 mm (L x W x H) lattice structure, composed of 1.5 mm diamond unit cells. The structure created conformed to ISO 13314, the ISO standard describing the method of compression testing of porous metallic structures. Each sample was created using the single exposure scan strategy, whereby the process parameters determine the strut diameter. In this study an exposure time and laser power of 750 μs and 150 W were utilised respectively, at a layer height of 30 μm.

Test specimen
In this study three types of test samples were produced, they were (i) control samples, (ii) an un-intentionally defective sample and (iii) a series of intentionally defective samples, that contained layers processed with a reduction in input energy. The control samples exhibited no defects and were used as the benchmark in this study. The reduced input energy samples consist of a controlled number of layers processed with a reduction in input energy. Finally, the defective sample consists of a gross defect caused by wiper damage. In this study the control samples and the reduced input energy samples studied were repeated 4.
The reduced input energy samples consist of a controlled number of layers processed with a reduction in input energy. These were obtained by systematically reducing the laser power, by 33 %, 66 % and 100 %, for between 1 and 7 layers. Full details on the samples containing reduced input energy layers, and their effect on the mechanical properties of the structure can be seen in [20]. For these samples, the laser power was intentionally reduced in an attempt to mimic, what Sharratt et al. described, an equipment induced defect [26]. Although they have been intentionally designed, for this study these layers are considered as defective. In the following text the SxVy notation is used, where x indicates the level of energy reduction (between 33 and 100 %) and y indicates the number of effected layers (from 1 to 7), as detailed in Table 1. For example, the S2V9 sample was fabricated with a 66 % reduction in input energy, for 9 consecutive layers.

Table 1
Notation associated with each defective sample produced in this study. Where the S value indicates the level of reduction in laser power for the number of layers given by the V value.

Data type & acquisition
During the L-PBF processes, an in-situ monitoring system was utilised to gather meltpool and laser related data at a rate of 100 kHz. The system uses one photodiode to provide feedback on the laser energy input, known as the Beam Dump (BD) signal. The system employs a further two photodiodes to provide information about the emissions emitted from the meltpool during the melting process, known as the photodiode 1 (PD1) and photodiode 2 (PD2). These meltpool monitoring photodiodes detect in two different wavelength ranges, providing information relating to the plasma (PD1) and IR (PD2) emissions created during the L-PBF process [27].
In this study analysis was carried out on each structure created after the build was complete. To do this, the data associated with each sample was first plotted as a function of build plate location. Following this, a region of interest (ROI), 16 × 16 mm, was then taken around each structure. For each of the three photodiodes the mean, maximum, minimum, standard deviation and the sum of the signals generated within each ROI was calculated, per layer. In this paper only the results obtained through analysing the respective mean signal are presented. After carrying out these pre-processing steps, a total of 14,265 data points were generated per sample (951 layers x 3 photodiodes x 5 recordings each = 14,265). Analysis was carried out on 57 samples, equating to approximately 350 MB of data. To further reduce the amount of data, the initial 8 mm of the build was neglected, as this acted as support material and was subsequently removed during the sample preparation stages. This resulted in a total of 665 layers (~20 mm) been analysed.

Statistical analysis
This data generated by the PM system during the AM process, was analysed using the Matlab R2019a software. Firstly, the photodiode data was smoothed using a moving mean function, to remove any signal noise, similar to that carried out by [25]. This function computes a centred moving average by sliding a window of length WL along the data set. Each element of output is the local mean of the corresponding values of the input data set, inside the respective window. This step was carried out to reduce the level of noise in the data sets. Following this, the Generalized Extreme Studentized Deviate (GESD) test was applied to the smoothed data sets.
The GESD test is an iterative method that removes one anomaly per iteration. It may offer improved performance over 'Grubbs' when there are multiple anomalies that mask one another [22]. The GESD test is used to detect one or more anomalies in a univariate data set that follows an approximately normal distribution. In the GESD test, the null hypothesis is that the data has no anomalies verses the alternative hypothesis that there are at most k anomalies [24].

Results & discussion
Firstly, this section the methodology for selecting the appropriate window length (WL) value is presented and discussed. Secondly, the results obtained when the GESD test was applied to the benchmark samples mean Beam Dump (BD) data set is presented. This was carried out in order to demonstrate that no defective layers occurred during the build process. Following on from this, the GESD test was applied to the mean BD signal, generated during the processing of the samples containing reduced input energy layers. This was carried out to verify that the GESD test can detect a known number of defective layers and that the analysis methodology developed is suitable at detecting defective layers. Finally, the GESD test was applied to the data generated during the processing of a sample that contained a gross defect. This sample was intended to be a further control sample; however, it was subject to wiper damage during the build process.

WL selection optimisation
During this study it was observed that the selection of the WL value plays a key role in the identification of defective layers, and that selecting this value is not a trivial task. A value too small and the number of false positives can increase dramatically. On the contrary, too large of a WL value could result in defective layers going undetected. Consequently, the selection of the WL value is critical to the accuracy of the anomaly test.
To overcome this issue, the GESD test was run at a varied number of WL values. Following this, only layers that were identified as defective by each iteration of the test and were subsequently found to be common to each iteration, were highlighted as defective layers. While this allowed for the selection of the WL value to be resolved, it raised the issue of how many iterations of the test to run before determining the commonly identified layers. To overcome this issue, the following analysis was carried out. For each of the data sets analysed, the GESD test was initially set to run 150 times with the WL value increasing from 1 to 150. It was observed that number of defective layers identified varied substantially depending on the WL value. In order to determine a suitable maximum WL value, the number of identified layers verses the WL value was plotted, an example of this can be seen in Fig. 1. This demonstrates that as the WL value increases the number of identified layers converges to around 87 layers. When the number of identified layers converged, no more iterations of the test were carried out. In this study convergence was deemed to have occurred when the slope of the three most recent iterations of the test was ≤ 0. The WL value associated with the converged curve was then selected as the maximum WL value, in the example in Fig. 1 the maximum WL value was 38. After the maximum WL value was determined the layers that were commonly identified as defective by each iteration prior to this, were determined and taken as the true defective layers.
This process of running the GESD test at an arbitrarily high number in order to determine when the number if identified layers converges, was carried out on each data set discussed in the following sections. This method helped negate the issue of choosing a WL and removed any potential bias from the test. Interestingly, it was found, that running the GESD test several times on the data sets studied was a computationally inexpensive method of analysis. For example, when the test was run for 4 iterations, the total run time took less than 0.2 s to compute.

Benchmark & reduced input energy samples
The results of running the GESD test, along with the WL selection technique outlined previously, on the mean Beam Dump signal generated by both the control samples as well as a number of samples containing the reduced input energy layers are given in Figs. 2 and 3.
When the GESD test was applied to the mean control samples BD data no layers were identified as defective, irrespective of the WL value. As the BD signal is representative of the operational behaviour of the laser, this result indicates that the laser operated normally during the build process. Fig. 2 presents the mean BD data generated during the processing of the sample containing 1 layer with a 33 % reduction in input energy (S1V1). The peaks observed in the data correspond to layers where the energy input was higher than other layers, specifically at node junctions (i.e. where individual struts join) within the porous structure. For this sample the number of layers identified as defective converged at a WL value of 14. When the GESD test was run with a WL value of 1, the number of layers identified as defective was 88, the majority of these layers corresponded to layers where the node junctions occurred. This result highlights the issue of selecting a WL value that is too small. When the WL value was increased to 2, the number of layers identified as defective reduces greatly to just 2, one of which been the known reduced input energy layer. As the WL value increases further to 14, the number of defective layers identified by the GESD test increased to 15. This increase in identified layers is directly related to the higher WL value used. As the WL value increases the data is smoothed out over a greater number of layers, therefore the one known defective layer, at layer 617, was smoothed out over a greater number of layers. This highlights the issue of selecting WL value that is too large. When the layers identified as defective at each WL value were analysed however, only one layer was common between each test. Layer 617 was identified as defective at each of the WL values used, indicating that this layer is the only true defective layer. This commonly identified layer corresponds to the one layer processed with reduced input energy. This result indicates that the   2. GESD test applied to the mean Beam Dump data for the S1V1 sample. Defective layers were detected where the laser power was intentionally reduced by 33 % for 1 layer. Fig. 3. GESD test applied to the mean Beam Dump data for the S3V5 sample. Defective layers were detected where the laser power was intentionally reduced by 100 % for 5 layers. D.S. Egan et al. methodology of determining the maximum WL value and subsequently taking only the commonly identified defective layers, is effective in addressing the issue of selecting suitable WL values. Fig. 3 presents the mean BD data generated during the processing of the sample containing 5 layers with a 100 % reduction in input energy (S3V5), i.e. the laser was switched off for 5 layers. When the GESD test was run with a WL value of 1, 5 layers were identified as defective. These layers correspond directly to the 5 layers processed with a known reduction in input energy. Unlike the S1V1 sample however, a WL value of 1 could detect the true number of defective layers. This is of course only known as the number of defective layers present are controlled and known prior analysing the data. Similar to the S1V1 sample however, when the WL value was increased, the number of layers identified as defective also increased, to a maximum value of 45, at which point the curve converged at a WL value of 26. When the layers that were commonly identified by each of the 26 iterations, the only layers common to each were layers 615-619. These commonly identified layers correspond directly to the layers processed with a reduced input energy. Thus, further indicating that by only taking the layers that were commonly identified at each WL value, the number of defective layers could be precisely identified.

Un-intentional defective sample
During the build process a sample which was designed to be a control sample was subject to interference from wiper damage, which resulted in the formation of a gross defect occurring within the sample. When viewed in the build chamber, prior to removing the build platform from the powder, the sample appeared to build relatively successfully, as demonstrated in Fig. 4 left. As this sample was un-intentionally defective and yet managed to build somewhat successfully, it provides a very realworld example of a part failure during the L-PBF process. Fig. 4 left illustrates a layer of the structure before the defect occurred, while Fig. 4 centre illustrates a layer after the defect occurred. These images were captured using a camera mounted within the build chamber. In these figures, the yellow box indicates the location of the defective sample, while the white arrow indicates where the defect occurred within sample. Fig. 4 right, shows the effect that the wiper damage had on the defective sample, when examined post build.

Deviation of defective data from benchmark data
In our previous investigations, it was demonstrated that by comparing build data to benchmark data and by calculating the percentage deviation between the respective signals on a layer-by layer basis, insight into the structural integrity of the structures could be obtained [20]. In this study the percentage deviation between the defective sample and the benchmark samples mean Beam Dump was calculated and plotted as a function of layer ID. When the GESD test was applied to this data set, using the methodology outlined in Table 2, no layers were identified as defective. Thus, indicating that the laser operated as normal when processing this defective sample.
A plot of the deviation between the defective and benchmarks meltpool photodiode signal (Photodiode 1), plotted as a function of layer ID, is given in Fig. 6. Photodiode 1 (PD1) provides a measure of the plasma emissions created by the meltpool during the L-PBF process. Therefore, any change in the build conditions, that may affect the meltpool will have an influence on this signal. When the GESD test was applied to this data, the number of layers identified as defective, 83, converged at a WL value of 38, see Fig. 1. The histogram shown in Fig. 5 left demonstrates the distribution of the each layer identified by all 38 iterations of the GESD test. This figure demonstrates that despite the WL value, all identified layers were between layer 676 and 759, indicating that no iteration of the test detected defective layers outside of this region. When the layers identified by each of the 38 iterations were further analysed, only 30 layers were common to each. These 30 layers occurred between layer 693 and 732, the distribution of these layers can be seen in the histogram in Fig. 5 right. Upon inspection, these defective layers correspond to the layers immediately after the wiper damage occurred, that subsequently resulted in the gross defect occurring.
The data shown in Fig. 6 is the deviation between the benchmark and the defective samples meltpool data set, as a function of layer height. Also shown in this figure are the 30 layers that were commonly identified when the GESD test was run 38 times on this data set. The level of deviation between the benchmark sample set and the defective sample set is between 0 and -10 %, however at layer 692, the layer where the wiper damage occurs, the deviation between the data sets increased to just over 27 %, an increase of 34 % from the previous layer. The gradual decrease in the level of deviation between the respective data sets oven the subsequent layers indicates that the structure is recovering from the initial incident. This conclusion is supported up by the image of the structure in Fig. 4 right, where it can be seen that the void (the defect) created in the sample reduces in size as the layer height increases. The structure recovers to a point where no void is present in the structure, at which point the deviation signal returns to a value similar to that observed before the defect occurred.
The results presented in this section demonstrate that the method of comparing meltpool data to a benchmark meltpool data set, calculating the percentage deviation between the two layer-by-layer, followed by applying the GESD test at multiple WL values, is an effective method at identifying defective layers created during the L-PBF process. Fig. 4. Left: layer before defect occurred. Center: Layer after defect occurred. Right: Un-intentional defect created within the structure (build direction is up).

Table 2
Steps carried out generate the deviation data and to apply the GESD test. Step: Task: 1. Generate benchmark data. E.g. Mean meltpool data, Mean Beam Dump data.

2.
Calculate the percentage deviation between benchmark and build data sets, on a layer-by-layer basis.

3.
Plot percentage deviation as a function of layer ID.

4.
Apply GESD anomaly detection test to this deviation data, at several WL values.
Analyse layers that were commonly identified at each GESD iteration.

Conclusions
In this study a statistical analysis approach was investigated to identify defective layers created during the L-PBF process. The GESD anomaly detection test was applied laser and meltpool related in-situ process monitoring data generated during the L-PBF process. Benchmark control structures, structures containing intentionally reduced input energy layers and a defective sample were analysed during this study, with the aim of successfully identifying any defective layers within each.
The data generated was subject to a moving mean function prior to running the GESD test. The moving mean function computes a centred moving average by sliding a window, of length WL, along the raw data set. To optimise the selection of the WL value in this study, the GESD test was applied using a range of WL values, until the number of identified layers converged. Layers that were commonly identified as defective at each WL value, were then taken as true defective layers.
When the GESD test was applied to the benchmark samples meltpool and laser related data sets, no defective layers were identified. The test was then applied to the data generated by the structures containing a varying number of, intentionally created, reduced input energy layers. This was carried out to determine the effect that varying the WL value had on the effectiveness of the test and to determine if the analysis methodology outlined was suitable for identifying defective layers. It was demonstrated that when only the commonly identified defective layers were selected, the test could detect the exact number of reduced input energy layers within the structures. Demonstrating the ability of the GESD test to identify layers processed with a reduction in laser input energy.
The GESD test was applied to the sample containing a gross, unintentionally created, defect. This sample provided a real-world example, where the structure failed unexpectedly. For this sample, the meltpool build data was compared to benchmark meltpool data on a layer by layer basis, with the percentage difference between the two been calculated and plotted as a function of layer height. When the GESD test was applied to this deviation data, 30 layers were commonly identified as defective. All 30 commonly identified defective layers corresponding to the physical location where the gross defect occurred. Thus, indicating that the analysis method carried out is an effective and computationally inexpensive method for detecting defective layers created during the L-PBF process.
In this study this computationally in-expensive analysis was carried out post build. This method of analysis however has the potential to be applied in near real time to automatically identify defective layers as   6. Percentage deviation between the defective sample and the benchmark sample's Photodiode 1 signal, for each layer. A deviation of nearly 0% was obtained throughout the majority of the structure. Between layer 693 and 732 however, a series of defective layers were detected. they occur, using a similar method to that described in [28].
Going forward there is the potential to apply the GESD test technique to live AM data streams. Amongst the factors to be considered are the data acquisition rate and the rate at which the data is formatted, as well as how to make it available for analysis. Further to this, enhancing the method of noise reduction in the data and improving on the window length (WL) selection method will require further investigation. A further consideration is the development of a feedback mechanism, which could be used to take corrective measures once an anomaly is detected during the build process.

Declaration of Competing Interest
The authors report no declarations of interest.