Defect Probability Estimation for Hardness-Optimised Parts by Selective Laser Melting

The development of reliable additive manufacturing (AM) technologies to process metallic materials, e.g. selective laser melting (SLM), has allowed their adoption for manufacturing final components. To date, ensuring part quality and process control for low-volume AM productions is still critical because traditional statistical techniques are often not suitable. To this aim, extensive research has been carried out on the optimisation of material properties of SLM parts to prevent defects and guarantee part quality. Amongst all material properties, defects in surface hardness are of particular concern as they may result in an inadequate tribological and wear resistance behaviour. Despite this general interest, a major void still concerns the quantification of their extent in terms of probability of defects occurring during the process, although it is optimised. Considering these issues, this paper proposes a novel approach to quantify the probability of occurrence of defects in hardness-optimised parts by SLM. First, three process variables, i.e. laser power, scan speed and hatching distance, are studied considering their effect on hardness. Design of Experiments and Response Surface Methodology are exploited to achieve hardness optimisation by controlling process variables. Then, hardness defect probability is estimated by composing the uncertainty affecting both process variables and their relationship with the hardness. The overall procedure is applied to AlSi10Mg alloy, which is relevant for both aerospace and automotive applications. The approach this study proposes may be of assistance to inspection designers to effectively and efficiently set up quality inspections in early design phases of inspection planning.


Introduction
Additive manufacturing (AM) is one of the most recent technologies that have been rapidly developing and integrating into manufacturing and our day-to-day lives. AM is defined in ISO/ASTM 52900:2015 as "the process of joining materials to make parts from 3D model data, usually layer upon layer, as opposed to subtractive manufacturing technologies and formative manufacturing methodologies" [1]. Synonyms found in the literature include additive processes, additive techniques, additive layer manufacturing, layered manufacturing, and solid freeform fabrication.
Parts produced by additive technologies are characterised by innovative shapes, complex features and lightweight structures, hard or even impossible to produce with conventional processes [2]. Parts production is carried out directly from computer-aided design (CAD) models without any sort of tools or fixtures and with negligible production of waste material [3,4]. The development of AM technologies capable of processing metallic materials in the late 1990s 1 3 played a transformational role regarding their application domains. In fact, AM parts, after years of being limited to producing polymeric visualization models and prototypes, are now used as end parts for several industrial sectors such as automotive, motor racing, medical, aerospace, defence [5,6]. Therefore, ensuring the quality of additively produced parts is a fundamental need to meet the stringent requirements and certification constraints imposed by the sectors.
One of the most widespread metal AM process is selective laser melting (SLM) or direct metal laser sintering (DMLS) [7,8]. In this process, a high-density object is built up layer by layer through the consolidation of metal powder particles with a focused laser beam that selectively scans the surface of the powder bed [3,[9][10][11][12][13]. Metal powders, also reactive materials like titanium and aluminium, e.g. Ti6Al4V or AlSi10Mg alloys, are melted without the aid of a binder, as in the case for indirect laser sintering [14][15][16][17][18]. Recently, researchers have shown an increasing interest in the potential of this process that enables to build in one step full dense metallic parts with complex geometries which are used as final parts or functional prototypes [4,19,20]. Indeed, by choosing the proper input conditions, components by SLM can achieve equivalent or very similar mechanical properties to those of parts produced by traditional manufacturing techniques [3,21]. However, despite the versatility of the materials and shapes that can be achieved, SLM features some criticalities that require careful control of the process and the process variables used, which must be optimised to prevent defects from being generated.
Defects of metal components by SLM may be classified in the following categories: residual stresses; porosity; cracking and delamination; balling; geometric defects and dimensional accuracy; surface defects, and microstructural inhomogeneity and impurities [2]. The presence of such defects can severely affect the final quality and mechanical properties of SLM samples. However, due to the complex nature of the process and the differences between the properties of materials used, it is challenging to adopt standard methods to improve and optimise mechanical properties [22][23][24]. According to literature, controlling and changing properly the input variables may allow to obtain the desirable mechanical properties of the parts and conversely to limit the probability of defects generation. Specifically, the influence of the process variables on surface mechanical properties, and the subsequent identification of the values that optimise such properties, may be investigated through the use of experimental planning, e.g., factorial designs, and relevant statistical analysis using the analysis of variance (ANOVA) [25][26][27][28]. So far, despite the large amount of published studies focusing on the optimisation of the AM process, no specific attention has been paid to the remarkable issue of identifying the probability of defects generation occurring when the process is optimised. Indeed, even under optimal working conditions, namely when each process parameter is set at its optimal value, the probability of defects occurrence is never negligible because of the uncertainty affecting the overall manufacturing process. In this view, the objective of the study is to contribute to this growing area of research by proposing a methodology for the estimation of the probability of occurrence of defects related to a specific surface mechanical property, i.e. surface hardness. In particular, such probability is estimated for hardness-optimised AlSi10Mg samples produced by SLM process. First, the significance and the optimal values of process variables affecting hardness values are determined through statistically designed experiments. The Response Surface Methodology (RSM) is used to analyse the results [29]. Then, a mathematical model relating the significant process variables to the output response, i.e. hardness value, is developed and, as a result, optimised. Finally, the probability of the occurrence of hardness defect is estimated by exploiting and composing the uncertainty affecting both the obtained mathematical model and the input variables.
By applying methodologies already exploited in literature, this work moves forward to defining a method to estimate the probability of occurrence of defects, which still lacks in literature. This method represents a powerful tool for inspection designers to effectively and efficiently set up quality inspections of low-volume AM productions in early design phases of inspection planning [30,31].
The rest of the paper is structured as follows: Sect. 2 presents the adopted defect prediction models, Sect. 3 describes the considered material and manufacturing process, Sect. 4 defines the analysis methodology, Sect. 5 details the experimental set-up, Sect. 6 discusses results, and Sect. 7 finally draws conclusions.

Defect Prediction Model
In order to evaluate the probability of occurrence of defects in the final part, the AM manufacturing process, in optimal working conditions, should be modelled as represented in Fig. 1. Specifically, m process variables, also called input variables, may affect the final quality of the AM product. In order to evaluate product quality, n output variables are measured on the AM part, using the most appropriate inspection method to detect the defect, e.g. dimensional verifications, mechanical tests, or visual checks [32][33][34]. In this situation, each input variable may potentially influence each output variable at different intensity levels. As represented in Fig. 1, each input variable is denoted as X i , (i = 1,…,m) and each output variable is indicated as Y j (j = 1,…,n). Furthermore, for each output variable Y j , a probability of occurrence of a defect, called p Y j , may be defined. It is worth remarking that the manufacturing process considered is in optimal working conditions, meaning that each input variable is set at its optimum value. Under such conditions, each p Y j should be zero; however, in realistic cases, this almost never happens because of uncertainty. Consequently, it is of the utmost importance to estimate such probabilities of occurrence of defects in order to effectively and efficiently plan quality inspections on the final product [35].
The probabilities of occurrence of defects, p Y j , are closely related to the intrinsic characteristics of the process. Accordingly, they can be evaluated by using empirical methods, e.g. historical data, previous experience on similar processes, knowledge of the process, or by implementing probabilistic models [36][37][38]. In the case of AM productions, which are small-sized lots or even unique parts, the historical data are often not available, requiring the formulation of a probabilistic model that exploits the knowledge of the production process.
The model developed in this work relies on the assumption that a relationship between input and output variables exists. Consequently, if the adopted inspection procedure detects a defect related to the output variable, this can be caused by some input variables or by their interaction. The probabilities of occurrence of defective-output variables can, therefore, be obtained based on the mathematical function that relates input variables with output variables [39]. Moreover, the proposed methodology requires the knowledge of the values of input variables that result in the best values of output variables. Thus, the AM process must be optimised, and the input variables must be set to their optimal value. Finally, the specification limits of the output variables (upper specification limit, USL j , and lower specification limit, LSL j ) are necessary to determine whether the products meet the specifications imposed by company regulations and/or standards. Input variables can be discrete or continuous variables. Since most of the process variables set on AM machines are continuous variables, only these are covered in detail in this study.
The methodology adopted to estimate the probability of occurrence of defective-output variables relies on the composition of the uncertainty coming from the mathematical function that relates the input and output variables, and from the uncertainty deriving from maintaining the input variables at their optimal value [35]. Specifically, since in practical applications, the mathematical function is not exactly defined, it implies that its coefficients are affected by uncertainty. Also, the optimal values of the input variables are often not exact because of the uncertainty of the measurement device. Accordingly, a variability range must be associated with them. The probability distribution associated with input variables depends on their characteristics, e.g. a uniform distribution should be considered, if the values are all equiprobable in the interval. The variance of the probability distribution of each output variable may, therefore, be estimated by composing the uncertainties associated to both the input variables and the mathematical function, through the law of composition of variances for linear or linearizable model [40]. In formulas, defined the vector of the m input variables as X = x 1 , … , x m T , the uncertainty of each input variable contributes to the variance of the related Y j output variable, together with the contribution of the mathematical function coefficients, A = a 0 , a 1 , … , a m T , as shown in Eq. (1) [35]: where K is the vector of size 2m + 1 of the input variables and the coefficients of the mathematical function, defined as K = [X, A] T , cov(K) is the variance-covariance matrix [41] and Y j K is the vector of the partial derivatives of Y j with respect to each component of K.
Since the distribution of each output variable Y j originates by many different random contributions, it can be approximated to a normal distribution according to the central limit theorem [42]. Thus, each probability p Y j , which represents the probability that Y j falls outside the specification limits (LSL j and USL j ), can be estimated by computing the area of the normal distribution outside the two specification limits, according to Eq. (2): Fig. 1 Schematic of AM process with m input variables and n output variables measured on the AM product, with relative probabilities of occurrence of defects p Y j 1 3

Material and Process
This section describes the material and the additive manufacturing process considered in the present work, with highlights on their industrial application and focusing on the process variables known to influence material properties.

AlSi10Mg Alloy
Aluminum-Silicon alloys are extremely attractive cast aluminum alloys thanks to their high fluidity, weldability, corrosion resistance and low coefficient of thermal expansion. Moreover, the presence of magnesium as alloying element promotes the formation of precipitates of Mg 2 Si. These strengthen the matrix and enable effective hardening to be achieved through heat treatments or rapid solidification techniques, but limit the feasible design [11,19,23,[43][44][45]. Therefore, aluminum alloys are of great interest for automotive and aerospace industries due to their combination of high strengths, low densities and thermal capacity [44], finding application in heat exchangers, heat sinks, turbine blades, carters and cylinder blocks [46,47]. Furthermore, near-eutectic composition, thanks to the small solidification range, ease their processing by laser [43]. Therefore, AlSi10Mg is an alloy which is particularly suitable and interesting for SLM processing, which, ultimately, enables freedom design for this high-performance material.

Selective Laser Melting
SLM was born, as patent deposition, in 1987 and has been developed since the early 2000s, mostly from the point of view of the capability of processing mono-component material, which eventually enabled for production application. The part building process takes place inside an enclosed chamber filled with nitrogen gas to minimise oxidation and degradation of the powdered material, or inert gas, e.g. Argon or Helium, to avoid material to react with the environment.
An infra-red heater maintains the powder in the build platform at an elevated temperature, just below its the melting point or its glass transition temperature, to reduce the laser power needed to locally melt the powder and the heat exchange which is a source of warping. As soon as a counter-rotating roller spreads a layer of powder on the building platform, which must be ground and polished, a focused laser beam is directed onto the powder bed and is moved using galvanometers. In such a way, the laser beam thermally fuses the material to form the slice cross-section. Surrounding powder remains loose and serves as support for subsequent layers, thus eliminating the need for the secondary supports which are necessary for photopolymer vat processes. After completing a layer, the build platform is lowered by one-layer thickness, t, typically (20-50) µm for metal, and a new layer of powder is laid, and the beam scans the subsequent cross-section. Schematic of the process system's main component is shown in Fig. 2 [48].
In the present work, the EOS M 290 SLM machine is considered. This platform is a high productivity system of limited dimensions that enables to build components within a volume of (250 × 250 × 320) mm. It features a Yb-fibre laser with a nominal power of 400 W and a focus diameter of 100 µm, with a scanning control based on f − lenses with a focal length of 410 mm, that operates in an Argon shielded environment.
In order to achieve total quality management, the whole influencing factors in the AM process chain must be catered for [49,50], as shown in Fig. 3. Through the SLM process, five aspects have the most significant impact, these being Equipment, Material, Production, Batch and Part. However, only few can be actually controlled and, moreover, a thorough understanding of their effect on the process is far from being achieved.
Literature [3,23,[51][52][53] provides an overview of most relevant influencing factors along with systematic study, by means of ANOVA, DoE and RSM, of their effect on material characterisation, both from mechanical and topographical perspectives. Amongst those, process variables represent a subset the component manufacturer can act on to achieve control and optimisation of the process. According to Gibson et al. [48], notwithstanding their effects are intertwined, process variables can be divided into four categories: (1) laser-related variables (e.g. laser power, spot size), (2) scan-related variables (scan speed, scan spacing or hatching distance, and scan pattern), (3) powder-related variables (e.g. particle shape, size and distribution, powder  [48] bed density, layer thickness, material properties), and (4) temperature-related variables (e.g. powder bed temperature, powder feeder temperature, temperature uniformity) [43,54].
Along the building direction, different boundary conditions for heat exchange between the layer and the environment are met during the build. In fact, the bottom region is in contact with the building platform, below it, and laser exposed areas, above it; the top region has exposed areas below and the region in between them contacts exposed areas above and below itself [55][56][57]. These three regions can be respectively named as the down-skin, the up-skin and the core or in-skin [3,11,48,[58][59][60], as shown in Fig. 4. In order to optimise the process, it is standard practice to set up different process parameter for each of these three regions, considering that the down-skin consists of two layers and the up-skin of three [11,58]. Literature [3,11,43,60,61] has shown that this region-wise differentiated parameter set-up can both relieve the effect of boundary condition for heat exchange and achieve control of material properties. In fact, according to Fig. 4, up-and down-skin variables are related to surface properties, whilst in-skin variables to the core, bulk average properties of the component.

Influence of Process Variables on Material Defects
Due to its application field, see Sect. 3 [63], promoted by the layer remelting. A large amount of studies in literature reveals that controlling and properly changing the input variables allows obtaining the desirable mechanical properties of the parts and conversely to limit the probability of defects generation.   [59] In particular, the present paper focuses on the effect of laser power, P, the hatching distance, h d , and the scan speed, v, of the in-skin.
Due to its working principle, SLM can be compared for issues (warping, thermal gradient, residual stresses) to casting, even though with quite the opposite microstructural remelts and definitively without casting design constraints [64]. Laser source must be capable of generating a laser with a power sufficient to melt the layer and part of the layer underneath, in order to guarantee adequate adhesion: the greater the laser power, the larger the remelt zone. Because of the cyclic melting of layers, a fine microstructure results which sometimes requires devoted heat treatments to be performed. Moreover, since the laser power controls the severity of the temperature gradient, it has, therefore, a significant effect on the surface properties. Indeed, thermal gradient and resulting shrinkage may generate residual stresses leading to an increase of the probability of warping and cracks onset, which, though, can be relieved by slight oversizing the part [65,66] and by devoted scanning strategies. The laser locally melts the cross-section with a pattern, i.e. scanning strategy, aimed at minimising the thermal gradient and the residual stresses in the component, e.g. by means of the offset island strategy [50,60]; laser scans at a certain speed, v, which is critical to be appropriately set as it determines the amount of energy introduced during melting, hence influencing material properties and structure. Indeed, as described by Childs et al. [67], excessively high speed may hinder from melting to occur or yields to balling whereas low speed entails high energy adsorption, E A , defined according to Eq. (3): Furthermore, complex interactions between P, v and scanning strategy increase the complexity of the setup of this parameter [67]. To fill the cross-section, laser scans lines according to the scanning strategy and the distance between the centre of two adjacent lines is the hatching distance or scan spacing, h d , which is, therefore, a measure of the overlap of lines. In particular, multiple overlapping lines entails several passes of the laser on the same point, thus enabling higher v to be adopted [48,67]. Moreover, if the distance between two adjacent scan lines is larger than the diameter of the laser beam, the metal powders do not bind together well. Consequently, high hatch density entails greater energy adsorption and yields to higher mechanical strength [3], hardness and, in general, improved tribological behaviour, thus decreasing the probability of defects generation.
Adhesion between layers is core to be achieved to avoid delamination and high part density and hardness. In particular, devoted scanning strategies have been developed to improve bonding of the layers, e.g. the alternate xy and the rotated hatch pattern [50,59]. Furthermore, layer thickness t has been demonstrated to affect adhesion, depending on energy absorption [50].
Therefore, considering the variables accounted by the present work, the laser heat input is using the energy density function, ψ, which is described by Eq. (4): More in general, the laser heat input is strictly related to the degree of consolidation of the powder particles, and it may increase the probability of defects generation, if not appropriately set, by creating turbulence in the melt pool that can form a keyhole-like defect in the extreme conditions [50]. Consequently, it is often adopted in literature as a reference parameter for the setup of ANOVA, DoE and RSM analysis of influencing factors on material properties [43].
Amongst the several mechanical properties, this work focuses on the hardness. This measurement evaluates a characteristic that allows inferring other properties of the material, e.g. plasticity. However, as far as the influence of process variables is concerned, here is relevant to recall the works of Li and Gu [68], Song et al. [69], Lam et al. [70], Li et al. [71] and Ghasri-Khouzani et al. [44]. They demonstrated that the local melting and high cooling rate typical of SLM process yield to a finer microstructure. Thus, materials by SLM are characterised by greater hardness, and hence higher strength, with respect to cast or wrought parts. These properties are further enhanced by the alloying elements and the interactions of dislocation for the AlSi10Mg. SLM introduces anisotropy in the material due to the layer-by-layer building strategy; however, it has been demonstrated that at least at macro and micro scales it does not introduces significant differences in the material mechanical behaviour [44].

Analysis Methodology
This section presents the methodologies adopted for arranging the tests and analysing experimental data to optimise the SLM process. Design of Experiment (DoE) is an effective statistical approach for optimising the process when a combination of different input variables and their interactions affect selected responses [72]. Then, Response Surface Methodology (RSM) uses experimental designs to fit the model by the least-squares technique. In fact, RSM is a collection of mathematical and statistical techniques aimed for the empirical exploration of the relationship between continuous response(s) and a set of input factors [29]. In the exploratory stages of model building, stepwise regression may be used to identify the best subset of predictors. It is an automatic technique implemented in several statistical software such as MINITAB®, which is used in this analysis.
Stepwise regression both adds and removes predictors at each step, according to selected Alpha-to-Enter and Alphato-Remove values [29]. The Analysis Of Variance (ANOVA) is used to estimate the statistical significance of variables' effects with respect to the observed differences in response. Diagnostic checking test, e.g. coefficients of determination and residuals plots, are exploited to verify the underlying assumptions to perform the ANOVA and ultimately demonstrate the model adequacy. Finally, the response surface plots can be employed to study the surfaces and locate the optimum. For this reason, the RSM is usually used to assess results and efficiency of operations [50].

Experimental Setup
As mentioned in Sect. 3.3, and according to literature, in this case study, the input variables were laser power, scan speed and hatching distance of the in-skin. The three input, i.e. P, v and h d , if not adequately set, may determine the generation of several defects, e.g. warpage, cracking, unsatisfactory powder bonding and microstructure dimension. Hence, their set-up controls the quality outputs of the parts. The output variable measured on the samples was surface hardness. Samples geometry (see Fig. 5) was designed to perform, in forthcoming analyses, measurements of surface roughness, in addition to the hardness tests.
In order to obtain optimal process variables that result in the best values of hardness, an experimental plan was designed. Specifically, a 3 3 full factorial design was realised in order to investigate possible quadratic effects of input variables. The three input variables related to the in-skin, laser power (P), scan speed (v) and hatching distance (h d ), were kept at three levels (see Table 1). For each of the 27 parts, the contour of the layer structure was exposed with the same value of speed (1000 mm/s) and laser power (355 W) of the up-skin. In addition, a strategy of post-contour was realised (with a speed of 900 mm/s and a power of 80 W).
The choice of the levels of the process variables set in the experimental plan allowed to get a wide range of energy density function, ψ, see Eq. (4). Specifically, ψ varied from 35.09 to 124.58 J/mm 3 , as it will be shown in Sect. 6.1. The experiments were not randomised because of the high repeatability of the machine allowed building the samples in a single job, by varying process variables for each sample. This approach, as a first approximation, is the one adopted in the computer experiment field.
After the production, the 27 specimens for hardness measurements were polished, see Fig. 6a. Then, the Brinell hardness test was performed according to the industrial standard ISO 6506-1:2014 [73]. The test was carried out using a sphere with a diameter of 2.5 mm and applying a force of 62.5 kgf, thus evaluating Brinell hardness in the scale HBW 2.5/62.5 to provide a reference to powder supplier specification. The average value of three measurements for each sample was examined, to cater for the measurement procedure variability. Figure 6b shows the Brinell hardness test performed on the specimens.

Results and Discussion
After collecting the data obtained from the Brinell hardness measurements on the 27 samples of the experimental plan, the statistical analysis was performed, using the

ANOVA Results
The arrangement of the full factorial design, as shown in Table 2, allowed the identification of the appropriate empirical equation, i.e. a second-order polynomial multiple regression equation. The standard stepwise regression was adopted to obtain a model containing exclusively significant factors. The values of Alpha-to-Enter and Alpha-to-Remove were set to 10% to allow entering terms close to the significance level of 5%. The software MINITAB® 17.1 was used to perform the analysis. The RSM provided the analysis of variance (ANOVA) (see Table 3), the coefficients of the regression models with their standard errors (see Table 4), and the regression equation shown in Eq. (5).
The predicted response, i.e. the Brinell hardness HB, was therefore related to the set of regression coefficients (β): the intercept (β 0 ), linear (β 1 , β 2 , β 3 ), interaction (β 5 ) and quadratic coefficient (β 4 ). As mentioned in Sect. 5, in this analysis, Brinell hardness is evaluated in the scale HBW 2.5/62.5; however, for simplicity of notation, the corresponding measurement unit is only indicated by the symbol HB.
By performing a qualitative analysis on the main effect of the process variables and observing the main effect plot, shown in Fig. 7, it can be concluded that all three input variables have a main effect on hardness. In the main effect plot, the higher the slope of the line which connects the levels of the process variables, the greater the influence of each variable is. The main effect on the hardness seems to be due to the scan speed v: a speed of 900 mm/s produces a hardness of about 90 HB; conversely, using a speed of 1700 mm/s the resulting hardness is about 120 HB. The second variable, which has the greatest effect on hardness, is the hatching distance h d , whilst the laser power P seems to have a weaker effect than the other process variables. It is worth noting that the trends are of direct proportionality for the scan speed and the hatching distance and inverse proportionality for the laser power: lower laser power yields   Table 3). Indeed, it emerges that v and h d are highly significant, i.e. their p-values are less than 0.1%, and P is significant at a 6% significance level. With respect to the quadratic terms in Table 3, only the effect of the scan speed is found to be highly significant. The interactions between variables can be visualised with the interaction plot, shown in Fig. 7. Parallel lines in an interactions plot indicate no interaction. The greater the departure of the lines from the parallel state, the higher the degree of interaction. The graph shows that it is possible to obtain high HB using high values of scan speed and high values of hatching distance and, there are strong interactions between these two variables. The ANOVA confirms that result, by showing that the interaction between v and h d is highly significant (p value of 0.4%). Furthermore, the RSM provided the estimates of the regression model's parameters, see Eq. (5), with their standard errors, which are reported in Table 4. The analysis of residuals, i.e. the differences between the observed and the corresponding fitted values, is shown in Fig. 8 and suggests that the model fits the data well. The normality of the residuals is confirmed graphically both by the normal probability plot (NPP), in which the points follow approximately a straight line, and by the histogram (see Fig. 8). Furthermore, by performing the Anderson-Darling test, the null hypothesis that the residuals follow a normal distribution cannot be rejected at a significance level of 5% [41]. The plot of residuals versus fitted values shows a horizontal band around the residual line (value 0) and no recognizable patterns are found. However, the residuals versus order plot reveals that non-random error, especially of timerelated effects, may be present. The R 2 value is a measure of goodness of fit of the model. It shows that the variation in the response explained by the model describing the relationship between the process variables and the Brinell hardness is 92.3%. Even the predicted R 2 value is very high, reaching 85.9%, suggesting a great predictive capability of the model. In Fig. 9, surface plots showing how the fitted response relates to the three pairs of independent variables are reported. A surface plot displays the three-dimensional relationship with the independent variables on the x-and y-axis, and the response (z) variable represented by a smooth surface. The graphs are generated by calculating fitted responses using the independent variables while holding the third control variable constant at the central value.

Process Optimisation
In order to find the values of laser power, scan speed and hatching distance of the in-skin resulting in the best value of hardness, a response optimisation was performed. Specifically, the objective function was set to maximise the hardness. Process variables setups and the respective value of energy density ψ, are summarised in Table 5, together with the predicted value of hardness and the related 95% confidence interval. In Fig. 10, the optimisation plot for HB is reported. Such a plot shows the effect of each factor on the response. The factors are reported in the columns and the response in the row. The vertical red lines on the graph represent the optimal factor settings, whose values are displayed in red at the top of each column. The horizontal blue line and value represent the response for the optimal factor levels. As far as P and h d values are concerned, they  are situated at the limits of the ranges selected for the planned experimentation. Specifically, P is located at the lower limit of the range and h d at the upper limit. Regarding v, the value that leads to the optimal hardness is placed at about three-quarters of the interval. This parameter set corresponds to a low energy density value (38.78 J/mm 3 ) if compared to those obtained in the planned experimentation (see Table 2). From a physical point of view, the obtained values can be considered reasonable. In fact, when the energy density is too high, i.e., increasing laser power and decreasing scan speed, the melt pool volume increases, and its viscosity decreases, leading to irregularities and a very deep penetration into the previously formed layers, and partial evaporation takes place [63]. Conversely, when the energy density is too low, a partial penetration of the melt pool to the underlying layers occurs, wetting is unsatisfactory and droplets are formed [3,63]. The obtained process variables setup, which lies in the process window defined by Kempen et al. [63], allows getting parts characterised by good mechanical properties, in this case high hardness.

Estimation of Probability of Occurrence of Hardness Defect
According to Eq. (1), the variance of the output variable HB was obtained by composing the uncertainty of both the mathematical function parameters, reported in Table 4, and the input variables, evaluated as the resolution of the AM machine (see Table 6). In order to evaluate the standard deviations of the input variables, shown in Table 6, it was assumed that they were uniformly distributed within their resolution range [40]. The variance-covariance matrix used for the calculation, see Eq. (1), was derived by the software MINITAB®. The computations were performed using the software MATLAB® and the variance of hardness is finally reported in Eq. (6).
The probability of occurrence of the defective-output variable HB was obtained under the hypothesis of normal distribution. Specifically, given the optimal value of hardness reported in Table 5, the related variance shown in Eq. (6), and the specification limit, the probabilities of occurrence of defect, p HB , was derived by applying Eq. (2). The specification limit, set to 114 HB, was fixed according to technological requirements for the produced parts. The resulting probability is shown in Eq. (7).

Conclusions
Although extensive research has been carried out on the optimisation of material properties of components produced by additive manufacturing, relatively little attention has been paid to the quantification of possible defects occurring in the process when it is optimised. Indeed, although the probability of defects occurring is typically small when the process is optimised, this cannot be neglected when planning inspections. So far, published studies have been limited to the identification of possible relationships between process variables and surface properties and their consequent optimisation. The present study aimed to contribute to this growing area of research by presenting a new method to estimate   the probability of occurrence of macro-hardness defect in AlSi10Mg parts produced by SLM process with an EOS M 290 machine, operating under optimal working conditions. The first step of the proposed methodology aimed to determine the effect of some process variables on the Brinell macro-hardness of SLM parts, through statistically designed experiments. Selected process variables were laser power, scan speed and hatching distance of in-skin, i.e. the core, of the parts. A 3 3 full factorial design was realised in order to evaluate possible non-linear effects of process variables. It was found that scan speed, hatching distance, their interaction, and the quadratic effect of scan speed have the most significant influence on the hardness. The response surface methodology (RSM) provided the mathematical model relating the process variables to the hardness. By optimising this response surface, it was obtained that hardness is maximised when the laser power is 340 W, the scan speed is 1538.4 mm/s, and the hatching distance is 0.19 mm. Afterwards, the probability of occurrence of hardness defect was estimated by exploiting all sources of uncertainty originating from the mathematical model and the process variables. Considering a lower specification limit of 114 HB, the probability of occurrence of hardness defect was 0.55%.
In addition to the optimal configuration of the process variables, the most significant contribution of this study has been to propose a methodology based on design of experiments, response surface methodology and the composition of uncertainties which allows: • The identification of process variables and interactions which have a significant effect on the hardness; • The definition of a mathematical model relating process variables and hardness; • The estimation of the probability of occurrence of hardness defect under optimal working conditions.
By providing a quantitative assessment of hardness defect probability, this study can help researchers and practitioners in their understanding of the SLM process in terms of defect generation. Operatively, the approach herein presented has the great potential of supporting inspection designers in the planning of effective quality inspection strategies during the early phases of inspection planning.
Funding This work has been partially supported by "Ministero dell'Istruzione, dell'Università e della Ricerca" Award "TESUN-83486178370409 finanziamento dipartimenti di eccellenza CAP. 1694 TIT. 232 ART. 6" and by the FCA-POLITO-2018 Project "Quality control of surface mechanical properties and topographical features of manufacts by additive manufacturing".
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creat iveco mmons .org/licen ses/by/4.0/.