Information-rich quality controls prediction model based on non-destructive analysis for porosity determination of AISI H13 produced by electron beam melting

The number of materials processed via additive manufacturing (AM) technologies has rapidly increased over the past decade. As of these emerging technologies, electron beam powder bed fusion (EB-PBF) process is becoming an enabling technology to manufacture complex-shaped components made of thermal-cracking sensitive materials, such as AISI H13 hot-work tool steel. In this process, a proper combination of process parameters should be employed to produce dense parts. Therefore, one of the first steps in the EB-PBF part production is to perform the process parameter optimization procedure. However, the conventional procedure that includes the image analysis of the cross-section of several as-built samples is time-consuming and costly. Hence, a new model is introduced in this work to find the best combination of EB-PBF process parameters concisely and cost-effectively. A correlation between the surface topography, the internal porosity, and the process parameters is established. The correlation between the internal porosity and the melting process parameters has been described by a high robust model (R2adj = 0.91) as well as the correlation of topography parameters and melting process parameters (R2adj = 0.77–0.96). Finally, a robust and information-rich prediction model for evaluating the internal porosity is proposed (R2adj = 0.95) based on in situ surface topography characterization and process parameters. The information-rich prediction model allows obtaining more robust and representative model, yielding an improvement of about 4% with respect to the process parameter-based model. The model is experimentally validated showing adequate performances, with a RMSE of 2% on the predicted porosity. This result can support process and quality control designers in optimizing resource usage towards zero-defect manufacturing by reducing scraps and waste from destructive quality controls and reworks.


Introduction
Additive manufacturing (AM) techniques are improving fast, thanks to the increasingly available materials and the quality of the final products. Among the various AM techniques, electron beam powder bed fusion (EB-PBF), also known as electron beam melting (EBM), is a powder bed fusion additive manufacturing technique that selectively melts layer by layer the powder bed using an electron beam in order to build the final components (see Fig. 1) [1]. EB-PBF produces metallic components with a density above 99.5% using optimized process parameters [2][3][4][5][6]. The detailed steps of the process can be found in the work of Murr et al. [1]. The two main characteristics of EB-PBF are the vacuum environment and the preheating temperature (up to 1100 °C). The first limits the interstitial element content in the final components [6,7]. The second is a crucial characteristic for the processability of sensitive materials prone to thermal cracking [4,[8][9][10][11][12] since it enables the reduction of residual stresses in the final components [13]. These primary advantages drive the increasing interest in the EB-PBF process.
An example of crack-sensitive material is the AISI H13 steel. This material is widely used to produce die-casting, and extrusion dies for hot working applications [14,15]. Thanks to its microstructure consisting of martensite and Cr, Mo, and V-based secondary carbides, AISI H13 provides high thermal stability and hardness up to 550-600 C [16]. Cormier et al. [5] firstly investigated the production of AISI H13 by the EB-PBF process. More recently, literature addressed the study of the microstructures and the mechanical properties of AISI H13 samples processed by the EB-PBF process [17,18]. The EB-PBF production of AISI H13 components allows the possibility to produce novel optimized designs and conformal dies to increase the components' productivity and lifetime. These concepts were preliminarily studied by Rännar et al. [14] and Gibbons et al. [15].
AM is well known to increase material efficiency, although it is associated with high cost. It becomes competitively convenient with respect to conventional manufacturing processes for highly customized products, which characterizes the customer demand. Despite the improved material consumption, on the route towards sustainability, the optimization process is still critical. In fact, process parameter optimization to reduce internal and external defects to comply with technical and functional specifications of geometry, material structure, and mechanical properties is still affected by a consistent amount of scraps and waste. Moreover, even when the process is optimized, quality controls for internal defects, i.e., porosity, are most typically destructive or expensive.
The most diffused procedure to identify and quantify the internal defects consists of time-consuming destructive (D) methods, e.g., the cross-sectioning of the samples and subsequent optical microscope image analysis [18][19][20]. On the other hand, non-destructive (ND) testing methods, and among them Archimedes [21], gas pycnometers [20], and ultrasonic-based methods [22], can be very fast compared to the traditional destructive methods, but present some limitations in the defect's accurate identification and, consequently, their quantification [23]. The most advanced ND technique is X-ray computer tomography, which gives in-depth information about internal defects [23][24][25]. Nonetheless, the high capital cost of investment and long analysis time of the computer tomography limits its application in the defect analysis during the optimization process [26,27].
Furthermore, all the above mentioned inspection techniques require post-processing of specimens and are thus off-line [23,28]. It is clear that during process optimization, off-line quality controls are inevitable. However, on the route towards sustainability, zero waste, and zero defects, once the process has been optimized, destructive control shall be minimized, if not avoided entirely. This can be achieved by developing predictive models based on in-line and in situ quality controls that can source information while the process is still ongoing and give valuable feedback for on-line improvements. The equipment for some of these in situ techniques for powder bed fusion is commercially available and can give information on the internal defects during the process [29]. Such predictive models relate process parameters and other available information by in situ inspection techniques to defects and often can be obtained by advanced statistical techniques while relying on big data. Indeed, destructive quality controls are necessary to validate those predictive models. Such a framework allows the creation of adequate and information-rich non-destructive quality controls, whose advantages are definitive and twofold [28,29]: real-time process control and scrap reduction [30][31][32][33]. It is worth remarking that the informativeness of destructive or expensive inspection techniques is paramount when studying process parameters windows for innovative materials and setting up the processes. However, during the process optimization and production, they lead to unnecessary costs if robust alternative routes of quality inspection are available.
In situ inspection methods rely on different signals, ranging from raw process parameters and embedded sensors (level-0) to progressively refined and high-resolution measurement methods [29].
Surface characteristics are among the several aspects that in situ inspection techniques can tackle. In fact, due to the layerby-layer nature of the process, the final surface resembles the Fig. 1 Scheme of main element of electron beam melting (EBM) process. During the process a layer of powder is laid on the build plate by the hoppers and levelled by the rake. The EB generated by the column, focused and directed by the lenses locally melt the powder to build the cross-section. The build platform is moved downward, and the process repeats to achieve the layer-by-layer manufacturing population of the internal defects with a certain confidence. This correspondence can be found in the literature [21,34,35], where a qualitative distinction between the different surfaces has been correlated with the internal porosity. However, design specification and quality control require quantitative characterization [36,37], achievable by evaluating surface topography parameters [38,39]. Such quantitative characterization requires exploiting surface topography measuring instruments. Several alternatives are available on the market, e.g., coherence scanning interferometry (CSI), focus variation, and confocal microscopy [40]. However, they differ in metrological performances in the AM field and the suitability for in-line quality controls. Literature reports that the CSI is the most accurate [40], but its working principle hinders application in harsh environments such as the AM building chamber. Therefore, innovative systems based on focus variation [41] and fringe projection are developed for in-line control [42], and they are reported as level-1 in situ inspection methods [29].
The study of a potentially new EB-PBF-processable material involves optimizing the melting process parameters. This could be time-and cost-consuming due to the many combinations necessary to explore the possible process window. Melting optimization aims to achieve targeted geometrical design characteristics and minimize internal defects (if their complete avoidance is impossible) while maximizing productivity. Several studies reported the influence of process parameters on the final quality of the component for various materials [7,12,29,43]. Melting parameters and the powder's quality influence the final component's relative density and hence affect a wide range of mechanical properties [7,12,28]. Amongst the melting parameters, the melting strategy, the beam power, which depends on the voltage and the beam current, the scanning speed, and the line offset, are the most relevant. In addition, these process parameters are the key parameters that define the type and contents of the defects, e.g., lack of fusion and gas pores, as well as the as-built microstructure of the components [7,[44][45][46].
Generally, a design of experiment (DoE) is resorted to investigating the effect of melting parameters on the defects generated during the EB-PBF process. The DoE can be used to select statistically significant factors, i.e., parameters and their interactions, to be included in statistical models to relate process parameters, signals from in situ inspection, and quality characteristics of the components. These models can then be exploited for process optimization to find a proper process window where the parts can be produced with minimum internal defects. For example, Guo et al. [47] showed that the relative density of Ti-6Al-4 V specimens produced through the EB-PBF process is inversely proportional to scanning speed and directly proportional to the beam current. Additionally, they showed the qualitative dependence of the top surface on the internal porosity [47]. Although these studies have paved the way for understanding mechanisms, they all provide qualitative relationships between process parameters, microscale geometrical properties, and internal defects of the EB-PBF parts.
This work aims to establish an information-rich prediction model of the internal porosity from surface topography and input process parameters.
In this work, a mathematical model is proposed to correlate the topographical surface features (level-1 inspection) and the process parameters (level-0 inspection). Similarly, a mathematical model correlating the internal porosity and process parameters is presented. Finally, these models are exploited to build the information-rich predictive model. The development of this model is essential for zerodefect manufacturing and the creation of a digital twin of the processes to achieve complete real-time control of the process.

Sample production
In this work, a gas atomized AISI H13 powder with a particle size range from 40 to 150 µm (d 10 = 45, d 50 = 57 µm, d 90 = 70 µm) supplied by Sandvik was used as the feedstock material. The chemical composition of the powder is reported in Table 1. The particles are mainly spherical, with a high presence of satellites; in Fig. 2, an example of the powder is reported.
The samples were produced using an ARCAM A2X EB-PBF machine. The cubic AISI H13 specimens with a dimension of 30 × 30 × 30 mm 3 were built on a stainless-steel start plate. The preheating temperature was kept constant and set at 700 °C for all the specimens produced in this work. Two levels of layer thickness (t) (50 µm and 90 µm) and the snake-like scan pattern with 90° rotation per layer were used in the sample's production. In the DoE, different combinations of process parameters were selected to study their individual influence and relative interactions. The considered process parameters were the focus offset (FO), the beam speed (v), the beam current (I), and line offset (LO). The experimental plan considered the five factors mentioned above, i.e., t, I, v, LO, and FO, which were varied on 2, 2, 10, 3, and 4 levels, respectively. The levels for each factor were chosen based on the literature [5,18]. According to industrial practices and relying upon authors' experience [2,48,49], some conditions were removed or modified during the building process since they already showed a high presence of defects or could be harmful to the successful process completion. Some replications were introduced randomly to extend the number of data and improve the dataset robustness. This approach resulted in an unbalanced DoE, as reported in Table A1 in the Appendix, with 52 investigated conditions.

Top surface topographical analysis
The top surface topography was measured by CSI. NewView 9000 by Zygo and characterized according to the literature [38,39] following the ISO 25178-2:2018 standard. The measurement was set up considering literature best practices [50]: a Michelson × 5.5 objective lens with a numerical aperture of 0.15 was adopted, applying a 0.5 × digital zoom and resulting in a field of view (FOV) of 3.15 × 3.15 mm 2 with a lateral sampling resolution of 3.15 µm/pixel. Stitching of 4 × 3 FOVs resulted in an investigated area of at least 10 × 8 mm 2 . In addition, signal oversampling was applied [50] to reduce noise and non-measured points due to high surface roughness, typical of AM topographies. As mentioned in the introduction, CSI is the most accurate and precise measurement method, but the harsh build chamber environment hinders its application as an in situ measurement technique. However, literature has shown that other surface topography native measurement methods that can be mounted in the build chamber, e.g., focus variation and fringe projection systems, yield characterization results compatible with CSI measurements [41,42,51]. The characterization includes a first correction of spikes and non-measured points [52,53]. Then, the measured surface was filtered by applying a robust gaussian S-filter, i.e., a high-pass filter in the wavelength domain, to suppress measurement noise with a nesting index of 10 µm [53,54]. Then, the F-operator removes the form by suppressing the least-square fitted plane. Subsequently, according to the state-of-the-art prescription [38,39,55], the waviness surface must be isolated. This is performed by applying a robust gaussian L-filter [53]. The nesting index is chosen as the topography's smooth-to-rough crossover (SRC). This particular choice allows tailoring the separation of the waviness surface and the SL-Surface to the topography in analysis by identifying the separation scale, i.e., the wavelength, between the two surface topography content by scale-sensitive fractal-analysis [53,56]. The waviness surface is then characterized by evaluating the S a , S q , and S dq area field parameters [53]. This characterization step is relevant because the waviness surface can bear a low-scale manufacturing signature, e.g., swollen surfaces [21]. The residual of the waviness removal, i.e., the SL-Surface, is then exploited to perform a feature-based characterization that describes the globules and topographical pores on the surface. Globules and topographical pores are surface defects due to several causes, e.g., attached particles, Marangoni flow, internal cavities, and porosities causing surface recesses [21,34,38]. They can be identified by watershed segmentation, which in this work it is applied with a wolf-pruning at three times the standard deviation of the surface topography heights [38]. The overall volume characterizes globules and pores ( V g and V p ) and the area percentage to the whole surface ( A %g and A %p [38,39]). Once the features are identified, they are removed and the actual roughness surface, i.e. the actual SL-Surface, is then characterized by evaluating S a , S q , S dq , S sk , and S ku . Surface topography analysis is performed by the state-of-the-art software Mountains Lab v8.0.

Internal porosity analysis
All the as-built specimens were cut parallel to the building direction and ground with SiC paper, up to 2500 grit. Then, all the samples were polished with diamond paste, down to 1 µm, to obtain a mirror-like surface. A Leica DMI 5000 M metallographic optical microscope (OM) was used to collect 20 images at 50 × per specimen. The micrographs were analyzed using ImageJ software, and the internal porosity content was determined following the procedure described in the ASTM E2109-01 standard [57]. Per each of the 52 examined specimens, 20 porosity data (percentage),

Statistical analysis
The unbalanced DoE outcomes are analyzed employing the Generalized Linear Model (GLM) technique to identify process parameters and their interactions that statistically influence in a significative way the surface topographical parameters S ▪ and the porosity p (let S ▪ be any considered surface topography parameters introduced in Sect. 2.1 [59]). GLM is a supervised machine learning technique that allows drawing statistical models between a set of predictors, i.e., input variables, and some outputs whose probability distribution can be approximated by a density belonging to the exponential family and, in the case at hand, outputs are assumed to be normally distributed. The model is a linear combination of the predictors, passing through a non-linear function [60]. In literature, the melting process parameters are generally expressed as line energy ( LE = (V ⋅ I)∕v ) or area energy ( AE = LE∕LO ) [61], where V is the voltage of the electron beam source, which is set to 60 kV in the Arcam A2X machine. Therefore, the LE and AE values have been calculated and introduced in the regression model to cater for a possible non-linear combination of the DOE factors. Another relevant process parameter is the speed function (SF). It is generally used during production with a positive value correlating the I and v with a black-box function developed by Arcam GE. This operative melting parameter aims to homogenize the heat distribution on the overall melting area of the specimen. However, it is preferable to use negative SF values that correspond to a linear ratio of v and I during the optimization step, i.e., SF = -v/I, allowing manual setup. The GLM estimates the coefficients of the models, i.e., of the linear combination of the input variables, by the least square method, i.e., maximizing the log-likelihood estimation [59,60]. Accordingly, GLM allows estimating the models h ▪ and f: where h ▪ is the generic model for any S ▪ , and x = {t, I, v, FO, LO, LE, AE, SF} is the input variable array. GLM is typically exploited in literature to quantitatively investigate the effect of process parameters on some quantity of interests [62,63].
Linear polynomial models of the third order with secondorder interactions are considered. However, not all the terms may be statistically significant. In this work, the statistical significance of the terms is set at the conventional confidence level of 95%, i.e., terms associated with a p-value greater than 5% are not statistically significant. Analysis of variance (ANOVA) is typically resorted to properly assess the statistical significance of the estimated parameters, accounting for the degrees of freedom of the estimation and the error, i.e., the fitting residuals. Consequently, the presence of statistically non-significant terms worsens the model's predictive performance, for it reduces the degrees of freedom available to estimate the error. Therefore, variable reduction is a non-trivial issue primarily investigated in the literature. In this work, the variable reduction is tackled by the stepwise method, which obtains a model solely consisting of significant terms by adding and removing predictors in a sequence of steps according to selected alpha-to-enter and alphato-remove thresholds [64][65][66], here both conventionally set at 15% [64].
The application of GLM requires the verification of the base hypothesis, i.e., that the response variable is normally distributed and that the estimated model does not ignore systematic trends in the data, i.e., that the residuals are normally distributed. Normality tests are performed graphically by normal probability plot (NPP) and quantitatively by Anderson-Darling test, at a confidence level of 95%. The goodness of fit is evaluated by testing the normality of the residuals and by computing the R 2 adj [59]. Here, the R 2 adj is preferred to R 2 to compare different models, because it normalises the latter with a factor proportional to the number of terms in the model, so that if two models are equally representative, but one requires more terms, it is associated with a smaller R 2 adj .

Information-rich prediction model
This work aims at establishing an information-rich prediction model of internal defectivity, intended as porosity, as a function of process parameters while also exploiting the characterization of surface topography to enrich informativeness and increase robustness. Thus, it tackles the estimation of the function f i-r : The first step toward the model creation is analyzing the correlation between the porosity and surface topography parameters. This is essential to establish which parameters are correlated to and physically influenced by porosity. This step is conceptually essential for the creation of the information-rich prediction model. Only parameters that are correlated to porosity can be exploited to predict it. Correlation analysis is performed qualitatively through scatter plot and quantitatively by GLM, with variable selection performed by stepwise method. GLM is applied, considering as predictors the S ▪ whose scatter plots suggest a possible correlation; this choice allows considering the most appropriate terms as regressors of Eq. 3. It is worth remarking here that, although the physical relation is S ▪ = S ▪ (p) if a correlation is present, the application at hand requires reversing that information. In fact, during the production, process parameters are set and controlled, and the resulting surface topography parameters can be inspected. These are the available input information exploited as regressors to estimate the model f i-r .
The functional form and related parameters of the information-rich prediction model of Eq. 3 is estimated by stepwise GLM. The goodness of fit is evaluated by testing the normality of the residuals and reporting the R 2 adj . The analyzed process window is sufficiently far from the origin of the hyperspace described by the regressors. Therefore, evaluating the evaluated models' intercept can be carried out merely based on mathematical discussions, i.e., to maximize the goodness of fit. From the process physics perspective, the discussion of the evaluated models' behaviour in the origin neighbourhood is negligible.
The model is trained on the available dataset (see Appendix), excluding replicated conditions. The replications will be exploited to validate the model, by evaluating the prediction interval and performing hypothesis test to assess statistical compatibility of the predicted value with respect to the experimental measurement. Table 2 summarizes the measurement unit used in this work and to which the estimated parameters of the model refer. Table 3 reports the investigated process window regarding the considered factors' minimum and maximum levels. Figure 3 shows some representative results of the top surface topography measurements according to the methodology described earlier. According to the literature, several types of topographies can be distinguished, characterized by more or less severe geometrical errors, large topographical features, and deviation from nominal geometry. These can be classified into clean, wavy, and orange-peel topographies, which might also present some additional localized features, e.g., globules or pores [21,34,38].

Top surface analysis
The set of fields and feature surface parameters are evaluated following the previous methodology.
Stepwise, GLM is applied to the SRC, the field parameters evaluated on the waviness surface, i.e., S a , S q , and S dq , and on the feature parameters evaluated on the SL-Surface, i.e. V g , V p , A %g and A %p . Table 4 reports the R 2 adj and the mathematical models correlating the surface topography parameters to the process parameters. Only statistically significant interactions and parameters, at a confidence level of 95%, are present in the GLM model, thanks to the application of the stepwise variable reduction. Residuals of the models did not show any trend, and the Anderson-Darling normality test could not reject the null hypothesis of normality with a risk of error of 5%.
The resulting different surface regression models consider the combination of the melting process parameters. In particular, S a and S q regression model terms are the same. They indicate an interaction between the I and t since the melt pool depth is strongly dependent on the beam current [67], while FO, which influences the melt pool width, interacts with the LO of subsequent line scan.
The S dq regression model shows the correlation between the surface waviness and melt pool geometry since the FO, SF, and I are the main process parameters defining the melt pool characteristics.
The identification and the removal by segmentation of the topographical features allow the characterization of the actual SL-Surface in terms of S a , S q , S dq , S sk , and S ku . Because a wide range of processing conditions is addressed, some of which are far from optimal, a few topographies may result dominated by features, e.g., orange peel topographies, that hinder the evaluation  of characterization parameters. Stepwise GLM modelling of the parameters is performed to investigate the correlation and the dependence of the actual SL-Surface area field parameters. Table 5 reports the results of such analysis. The ANOVA analysis to test the significance of the terms included in the models showed the statistical significance with p-values smaller than 5% for any terms of any model reported in both Table 4 and Table 5.
The robustness and representativeness of all the models benefitted from constraining to zero the related intercept. The results show that S a and S q are correlated to process parameters consistently to the common practice. However, the more robust modelling is obtained for the S dq parameter. This is the average height gradient of the surface, and it describes how fast the surface slopes vary. Very low S dq characterizes smoother surfaces, while rougher surfaces, rich in hills and dales, by higher values. Moreover, EB-PBF surfaces of not optimized process parameters are rich in topographical pores [38,39]. Therefore, for AM native surfaces, it is quite an effective parameter to describe the quality of the process, although it is scarcely adopted [52]. Complementary information to S dq is S ku which indicates the surface's degree and amount of spikiness, i.e., how many and how sharp the positive features are. Consistently, it is strongly correlated to process parameters. The actual SL-Surface parameters shown in Table 4 depend mainly on the I, FO, and t, suggesting that the more significant effect on the surface parameters is induced by the electron beam diameter and the melt pool depth, and, therefore, the ability to melt multiple layers of the thickness t. The results obtained and shown in former tables provide quantitative evidence in relating these surface topography parameters to process variables, supporting former qualitative analysis in the literature and indicating valuable indications to process and components designers to assess the product quality.

Internal porosity analysis
The quantification of the porosity is performed through the image analysis method on 20 random images per specimen. The overall porosity is calculated and reported as an average value for each sample. From the OM cross-section of the samples, which are shown in Fig. 4, it is possible to distinguish different groups of samples: (i) large and vertical lack of fusion (Fig. 4 sample  05), (ii) random and horizontal lack of fusion (Fig. 4 sample 03), and (iii) no internal porosity or only meagre amounts of spherical pores (Fig. 4 samples 12 and 13 respectively). Furthermore, depending on the combination of the process parameters, it is possible to observe all the intermediate classes.
Analyzing the normal probability plot of the investigated specimens and performing the Anderson-Darling test, almost all samples do not follow a normal distribution at a 95% confidence level. The analyzed data are percentages, which are positively bounded and, in the case at hand, should feature a mode in the neighbourhood of zero. Accordingly, a possible better distribution fit is the lognormal distribution. Therefore, the Box-Cox transformation with λ parameter equal to 0, i.e., a natural logarithm, was applied to the measured values, and the transformed data were tested for normality. Only 4 cases of systematic deviation from normality were observed in the transformed data. In particular, the NPPs from the specimens whose porosity shows a systematic deviation from lognormality suggest a possible bimodal distribution. The analysis at the OM, see Fig. 5, corroborates this hypothesis, showing that these specimens present two well-defined and separated regions: areas with high porosity content and areas with shallow content of defects. Conversely, the specimen characterized by a lognormal porosity distribution presented, at OM analysis, homogeneously distributed defects or a complete absence of significant defects, as shown in Fig. 5 (samples 5 and 12).
Accordingly, to comply with GLM hypotheses, these specimens characterized by a bimodal porosity distribution were excluded from the following computation. However, the high number of remaining conditions (48) against the excluded ones (4) ensures a representative model's definition. The model relating internal porosity and process parameters was obtained via GLM, provided the application of the Box-Cox with λ = 0 transformation, and resulted in: Table 5 Results of the stepwise GLM modelling of the dependence of the actual SL-Surface, i.e., after removing features and area field parameters. Results related to S sk are not shown as R 2 adj is smaller than 0.65, indicating a lack of representativeness of the model and correlation which has an R 2 adj of 0.91, whose residual normality could not be rejected with a risk of error of 5% by the Anderson Darling test, and the included terms parameters are significant with a confidence level of 95%. Equation (4) model is adequately robust and describes the influence of the melting process parameters on the internal porosity. The process-related internal defects are generated by insufficient energy input of the electron beam [68]. Therefore, the subsequent layer or adjacent line scans are not welded together; the defects generated by this phenomenon are the so-called lack of fusion. Indeed, the FO and the I (consequently LE) influence the electron beam diameter [69,70], resulting in different energy input onto the powder bed. This influence cannot be thoroughly captured solely by LE, even though it can yield an appropriate first approximation of the electron beam irradiation, as in Zafar et al. [76], where the parameters considered are the beam voltage V and the beam current I. Conversely, a more complex combination of several parameters and the combination of the material physical properties defines the final geometry and dimension of the melt pool. The final density results from the overlap between subsequent line scan in the XY plane and the melt of different layers XZ-plane. Therefore, the width of the melt pool has to be greater than the LO, and the melt pool depth has to be much greater than the layer thickness.

Internal porosity and surface topography correlation
Once established and quantified, the dependence of quality variables and process parameters for the material-process pair must address the correlation between internal defectivity and surface quality. Correlation analysis according to Sect. 2.5 is performed. According to the results obtained in Sects. 3.1 and 3.2, only SRC, field parameters of the waviness surfaces (S a , S q , and S dq ), and feature parameters of the SL-Surface ( V g , V p , A %g and A %p ) are addressed, and specimens characterized by a bimodal porosity distribution are excluded from the analysis. The first choice enables the applicability of the forthcoming model and results in nonoptimal process conditions, and the second is constrained by the statistical hypothesis supporting GLM. It is worth remarking that considering the discussion provided in Sect. 2.2 and the experimental methodology described in Sect. 2.1, non-optimal process parameters might hinder the evaluation of actual SL-Surface. Therefore, related areal field parameters are not considered. Figure 6 shows the scatter plot of the natural logarithm of the porosity as a function of the considered topographical parameters. The logarithmic transformation is shown to ease the suggestion of the relationship to be modelled via regression. Robust regression exploiting the LAR method was performed to relieve the effect of high data dispersion [71]. Although a qualitative trend might be seen for some parameters, only the models Fig. 5 Stitched images of the cross-section of the specimens: 05-high porosity level and significant vertical lack of fusion, 03-medium porosity level and horizontal lack of fusion, and 12-low porosity level between porosity and A %p and S dq (in Eq. 5 and 6) were statistically significant with an R 2 adj of 0.95 and 0.91, respectively.
According to ANOVA, significant model parameters showed a p-value smaller than 5%. Residuals presented a hyper-normal distribution, suggesting a possible overfit due to the robust algorithm. Other surface topography parameters resulted in R 2 adj smaller than 60% (for example 30% in the case of S a and S q , 60% in the case of V p ). The result suggests that porosity, which has to be traced back to process parameters that influence a broad set of surface topography parameters, mainly affects the areal extension of surface pores and the spatial variability of the surface heights. This is due to the layer-wise nature of the process. Porosity in inner layers induces depression that propagates into waviness that could degenerate into topographical pores at the top surface. Indeed, large and vertical internal lack of fusions are more reasonably expected to generate an orange peel surface, while random and horizontal lack of fusion produces wavy surfaces, with the possible presence of features. Finally, no internal porosity or very low porosity populated by only spherical pores are observed in the specimen with a clean surface.

Information-rich prediction model
Results are shown in Sect. 3 allowed demonstrating a correlation between (i) internal porosity and process parameters, (ii) surface topography and process parameters, and (iii) internal porosity and surface topography, as detailed in Fig. 7.
This information can now be merged within an information-rich prediction model of the porosity. The model relies upon redundancies created by the surface topography quality inspection and characterization to improve the robustness and informativeness of the porosity modelling.
The methodology presented in Sect. 2.5 is applied, and it results in the following model: The model estimated parameters are statistically significant with a risk of error of 5% and yield residuals whose normality cannot be disproved at a confidence level of 95% by the Anderson-Darling test (Fig. 8(a) shows the NPP of the residuals). The model is associated with an R 2 adj of 0.95 and presents an RMSE of 0.7206, i.e. of 2% on the porosity. These results show the effectiveness in increasing the representativeness of the model when additional information from ND in situ quality controls are available. The R 2 adj comparison with the model only including the process parameters as predictors (see Sect. 3.2) shows 4% and 56% relative improvement to the maximum possible achievable. Model validation shows (Appendix) satisfactory results, as it can be appreciated in Fig. 8(b), where only one experimental point is systematically different from the prediction. This is compliant with risk of error of I and II type inherent in quality inspection procedures [72,73]. Specifically, in the case at hand, a dense component is predicted, when in reality is porous, identifying a type II error.

Conclusions
In this work, a new model is developed to estimate the porosity content of the parts starting from the topological investigation of the as-built samples. In fact, in this research, 52 specimens of AISI H13 tool steel samples were produced by the EB-PBF process, following an unbalanced DoE. As a result, an information-rich prediction model of the internal porosity based on the input process parameters (I, SF, t, LO, AE, and LE) and surface topographical parameters (S dq and A %p ) is presented. The results showed a robust correlation between the surface topography features and the input process parameters. Furthermore, the robust correlation of internal defectivity meant as porosity and the input process parameters were shown and related to surface topography. The correlation between internal porosity and surface parameters was only qualitatively supposed in previous literature. This work first substantiates the correlation with statistical analysis. In particular, internal porosity propagates to affect outermost surface of the material in terms of the areal extension of surface pores (A %p ) and variability of the topography height gradient (S dq ). This model's development is helpful for the initial optimization of process parameters while assessing the feasibility of new materials or during quality control of the produced components. The correlation analyses established a robust information-rich prediction model of the internal porosity based on in situ surface topography characterization, and process parameters have been established. The presented methodology can help speed up the characterization step and the process optimization. Moreover, it can aid the manufacturing process design and quality control to optimize the usage of resources towards zerodefect manufacturing by reducing scraps, and waste originating from destructive quality controls and reworks. Future development of this work will include deploying and testing the developed information-rich prediction model in relevant production environments. Potential spin off of the methodology developed is its application to real-time control of the process. Future work will also focus on the probability of defects generation basing on the proposed information-rich prediction model.