487
Views
0
CrossRef citations to date
0
Altmetric
Research Article

Bayesian analysis for geometric shapes in additive manufacturing

ORCID Icon, , , &
Pages 836-853 | Received 28 Jul 2021, Accepted 30 Aug 2022, Published online: 12 Sep 2022

Abstract

In additive manufacturing, geometric shape deviations are built through statistical deviation models. Nonetheless, the resource constraints limit the manufacturers to test shapes. However, in addition to the power, the simplicity of the deviation models has been demonstrated with illustrative cases for in-plane deviation modelling for regular pentagon, irregular octagon as well as straight edges in free-form shapes utilizing only data and models for single regular pentagon and cylinders. Bayesian deviation models, built for geometric shapes, provide a better fit on the data and help in achieving better predictive accuracy. The main aim of this study is to assess the effect of the error distribution, generally assumed as the normal, and evaluate its impact on the deviation model. In particular, we consider Laplace, logistic, Cauchy, and exponential distributions for the errors. It is shown that logistic distribution provides better alternative error distribution for deviation models as compared to the normal distribution.

1. Introduction

Additive manufacturing (AM) is a mechanism which facilitates the direct production of complex geometric shapes [Citation1, Citation2]. Three dimensional printing is a general term used to design and manufacture products with deep environmental, social, financial, and security implications. The benefits of AM include making complex geometries which may not be manufactured in any other way. As a result, new opportunities occur in designing industries, bio-engineering, automotive as well as aerospace. It is feasible with AM to make serviceable parts without the need of assembly to save time and cost of production [Citation3, Citation4]. It decreases waste, minimizes the use of destructive chemicals and make possible the use of recycled materials [Citation5].

Tong et al. [Citation6, Citation7] used the observed deviation data to demonstrate the deviation of shapes in the Cartesian coordinates X, Y, and Z. In fact, the deviation data help in building a compensation strategy, amended shape through the computer-aided design (CAD) model with the objective that the altered form should have a close resemblance to the desired shape. To construct compensation plans, Huang et al. [Citation8] presented a different functional modelling approach which justifies the relationship in dissimilar coordinates and separate geometric shape's complications from deviation modelling.

A general element of established quality control techniques for 3D printing is the application of deviation models for separate geometric shapes. These models, however, have a drawback, that is, tangible tests necessarily executed on numerous copies of each separate form to have an idea on their shape deviation models. To develop models, the resulting data are not successfully utilized and extensive utilization of these techniques is impracticable due to the very high operational costs of 3D printing that restrict the gathering data of deviation to a small sample of dissimilar shapes.

A challenge of in-plan shape deviation in 3D printing is the effective identification of new shape's deviation model by employing a small sample of formerly created dissimilar geometric shapes. Huang et al. [Citation9] formulated a hypothesis in connection to a deviation model for irregular as well as regular polygons. A main restriction of the method, however, is the recognition of the functional shapes for different local deviation attributes which is principally heuristic. Huang et al. [Citation9], however, could not define how an existed data library on geometric deviation may be utilized in order to study new deviation characteristics for new geometric shapes.

Sabbaghi et al. [Citation10] introduced a model building technique for adaptive in-plane deviation models specified by Huang et al. [Citation8] to account for a finite number of trial shapes. They suggested that the method makes use of some features of the deviation model for cylinder of Huang et al. [Citation8] and the “cookie-cutter” deviation formulation suggested by Huang et al. [Citation9].

Wang et al. [Citation11] investigated the effect of process parameters on stereolithography (STL) part shrinkage. Sharon and Mumford [Citation12] studied two-dimensional shape analysis by employing conformal mapping.

Huang et al. [Citation9] discussed statistical predictive modelling as well as compensation of geometric shape deviations of three-dimensional manufactured goods. A predictive model is desired to forecast the value of an extensive class of product shapes, taking into consideration the vast library of AM built products with intricate geometry. They presented a unique statistical predictive modelling and compensation approach in order to have a better quality of cylindrical and prismatic parts. Both experimental exploration and validation of polyhedrons show that the methodology is promising for an extensive class of products constructed through 3D printing technology.

Huang et al. [Citation8] discussed an ideal offline compensation plan of shape shrinkage for additive manufacturing procedures. They came up with a unique approach to (1) model and estimate part shrinkage and (2) draw an ideal shrinkage compensation plan in order to attain the accuracy of dimension. The expanded method is established experimentally as well as analytically in a stereolithography method, which is one of the most extensively used additive manufacturing methods. Jin et al. [Citation13] proposed an off-line predictive control of out-of-plane shape deformation for 3D printing.

Huang et al. [Citation14] described a logical basis for ideal compensation of 3D shape deformation in additive manufacturing. The study discussed an analytical basis to attain optimal compensation for high-precision additive manufacturing. Zhu et al. [Citation15] discussed deviation modelling as well as shape alterations in design for the 3D printing. Systematic deviations are denoted by radial and polar coordinates and random deviations are modelled by translating the contour points with a specified distance which originates from the theory of random field.

Sabbaghi et al. [Citation10] developed a Bayesian model from small samples of dissimilar data for obtaining in-plane deviation in 3D printing by using adaptive Bayesian modelling. Their approach successfully unites geometric shape deviation data and models for a minor sample of formerly developed, distinct geometric shapes to help in the model specification of geometric shape deviation for a wide category of novel forms. The procedure is illustrated for regular pentagon, irregular octagon and freestyle shapes with straight sides employing merely data and models for cylinders and a solitary regular five-sided polygon. We refer to [Citation16–20] for some more recent literature on AM.

In Bayesian analysis, information concerning the unknown parameter of interest before the current data is known as the prior information. We, in this way, describe the prior distribution which is one's understanding or belief expressed by a probability distribution. With the possibility of the sample data, prior distribution is assimilated to derive a posterior distribution. Then, the posterior distribution is used for further inferences. Thus, the posterior belief is a mixture of prior belief and observed data which in future can be used as a prior information. The posterior predictive distribution (PPD) is the distribution for the future predicted data dependent on the observed data. The posterior predictive distribution is mainly utilized to predict values of new data. The posterior distribution is used to compute the predictive distribution, that is, averaging over the posterior distribution can help to predict uncertain prediction. Comparing the predictive distribution to observed data is generally named as the “posterior predictive check”. Unlike the frequentist statistics, this check comprises uncertainty related to the predicted parameters of the model. This is done by “simulating replicated data under the fitted model and then comparing these to the observed data” [Citation21]. Hence, the posterior predictive will be used to “look for systematic discrepancies between the real and simulated data” [Citation22].

The aim of this study is to evaluate the impact of random error distribution of deviation features for different shapes and suggest other appropriate distributions for different shapes. The choice of an appropriate prior has a significant impact on the Bayesian inference [Citation23–28]. This work is an extension of Sabbaghi et al. [Citation10], as they considered only the normal distribution for random errors of deviation features.

The rest of the study is organized as follows: Section 2 discusses the Bayesian model building for deviation features. Section 3 discusses the local and global Bayesian deviation model building for different geometric shapes like cylindrical, regular pentagon, irregular octagon, and free-form while Section 4 presents conclusion and recommendations.

2. Bayesian model building for deviation features

This section describes a basic characterization of deviation features along with the Bayesian model building taken from Sabbaghi et al. [Citation10]. In particular, the modular deviation features for different shapes like cylinder, regular polygon, irregular polygon and free form are discussed [Citation10].

2.1. Functional form of geometric shape deviation

Let thin 3D shapes with in-plane geometric shaped deviation with ignorable heights, as the main aim is to construct shape, that can be represented in two dimensions with identical top and surface deviations. To implement the deviational functional representation as outlined by Huang et al. [Citation8], the (X, Y) Cartesian coordinates are translated into polar coordinates (ϑ,Υ(ϑ)), with angle ϑ and radius Υ(ϑ). Suppose Υsobs(ϑ) and Υsnom(ϑ) indicate the observed and nominal radius, respectively, of a shape s at ϑ[0, 2π]. Every shape s related to a group of known parameters γs describes the nominal radius form Υsnom:[0,2π]R, with γs. Huang et al. [Citation8] expressed the observed deviation at angle ϑ as (1) s(ϑ)=Υsobs(ϑ)Υsnom(ϑ)(1)

2.2. Deviation models for different geometric shapes

Let two dissimilar shapes with nominal radius functions Υ1nom(ϑ),Υ2nom(ϑ):[0,2π]R, respectively, where, Υ1nom() parallel to earlier made shape for which model of deviation has been understood, and Υ2nom() matches to one freshly made shape whose different features of deviation need to be revealed and formed. For Υ1nom(), assume the following deviation model [Citation10]: (2) 1(ϑ)=δ1(ϑ|β)+E1(ϑ)(2) where the systematic deviation is defined by the functional form δ1(ϑ|β), β is a vector of parameter, and E1(ϑ) are random errors with mean E{E1(ϑ)}=0 at ϑ [Citation8]. For instance, the function of δ1 can be written as δ1(ϑ|β)=y0+β0(γ1+y0)b0+β1(γ1+y0)b1×cos(2ϑ) where β=(β0,β1,b0,b1,y0) [Citation8]. The Υ1nom() systematic deviation feature and Υ2nom() deviation model are connected with each other through a local deviation feature δ2(ϑ|α) [Citation9, Citation29] (3) 2(ϑ)=δ1(ϑ|β)+δ2(ϑ|α)+E2(ϑ)(3) Following this description, δ1 maintains the same global deviation aspect between Υ1nom() and Υ2nom(), and δ2, with the parameter vector α, as a local deviation aspect matchless to the fresh shape [Citation10]. The E1(ϑ) and E2(ϑ) are assumed identical and independent, with E{E2(ϑ)}=0. The radius function for a regular n-sided polygon and circumcircle radius size 1 are expressed as Υ2nom(ϑ)=γ1cos(πn)cos{(ϑπ2)mod2πnπn} where this function is clearly defined by the parameter vector γ2=(n,γ1). Setting Υ1nom()γ1 and utilizing Υ2nom() in Equation (Equation3), a polygon deviation model can be obtained. Then, we can infer this specification of model by identifying theoretically, the carved polygon deviates globally in a same technique as its circumcircle. To distinguish δ1 for features like global deviation distributed among the polygon including circumcircle, the deviation of regular polygon varies from δ1 because of its sharp corners and straight sides, as it portrays the local deviation aspect. We take no additional assumptions about correlation between δ1 and δ2 [Citation10].

The deviation model building for a new form Υ2nom() can be summarized by identifying its local deviation aspect δ2 on freshly printed shape. Though such a heuristic local deviation model builds on pre-specified functions may not produce good approximation in an exercise as it is traditionally very hard to find a parsimonious priori and suitable local deviation conditions for complicated shapes. An alternative method which is very reasonable from a statistical viewpoint is to precisely understand that local deviation's qualities that continue across shapes build on a blend of prior assumptions for δ1 and observed deviation data for a freshly manufactured shape Υ2nom().

2.3. An approach for modelling local deviation features

We consider the Bayesian model building methodology in three phases.

  • Built a discrepancy measure [Citation30, Citation31]) to isolate data on the feature of local deviation for a novel shape Υ2nom().

  • To explain the local deviation feature, block and cluster distributions of the discrepancy measure allowing covariates.

  • Identify a model's hierarchy for the parameters α of the patterns over the blocks.

The first phase related to the construction of discrepancy measure can be achieved using Equation (Equation3). Suppose D1 symbolizes the deviation data collection for produced shapes with the identical nominal radius function Υ1nom() and F(β|D1) the posterior distribution of β build on D1. The observed deviation data 2(ϑ) is transformed for a novel produced shape into a random variable to express discrepancy measure as (4) T2(ϑ)=2(ϑ)δ1(ϑ|β~)(4) where β~F(β|D1). The possible non-trivial global deviation feature can be efficiently eradicated by utilizing this transformation. A concrete and simple initial point to understand a function of δ2 in terms of ϑ and Υ2nom(ϑ) is offered by this discrepancy measure and Monte Carlo simulations can be used to derive the distribution of this discrepancy measure appropriately. If β~lF(β|D1) for l=1,,L, then the distribution of the discrepancy measure given in Equation (Equation4) can be determined as (5) T2(l)(ϑ)=2(ϑ)δ1(ϑ|β~(l))(5) Next, to obtain discrepancy measures into E blocks assuming covariates considered to be related to the feature of local deviation, each side will be a natural block for a polygon. To this end, categorize systematic patterns in T2(ϑ) like a functional form of ϑ and Υ2nom(ϑ) across and within the E blocks.

The graphical depiction of the discrepancy measures distribution against the nominal radius function Υ2nom(ϑ) for E blocks is obtained by the graphical posterior predictive check (PPC). Then, the depiction of the discrepancy measure distribution against Υ2nom(ϑ) for each cluster Θk is obtained by second graphical PPC [Citation10]. The observations and results from both checks are utilized to model the feature of local deviation for Υ2nom() as δ2(ϑ|α)=k=1KI(ϑΘk)δ2,k(ϑ|αe(ϑ),k) where δ2,k relates to the kth different pattern of the local deviation aspect and e:[0,2π]{1,,E} is the indication for the block level of ϑ. Generally, it is assumed that the trends and parameters βe,k are dissimilar across block levels e but the function δ2,k remains constant across blocks e=1,,E.

The choice of a suitable number of blocks may be done by inspecting the posterior draws [Citation32] in α across the blocks. For a suitable choice of blocks, the posterior distributions for a set of parameters in α have almost the same local deviation characteristic pattern and is diverse across the blocks. If not, then the blocks may be combined. The data-driven method for blocking may aid to minimize the sensitivity of the investigations to a primary arrangement of blocks. However, physical knowledge or data-driven methods of the 3D printing procedures require care in the selection of blocks.

In the third phase, models of Bayesian hierarchy are defined on the αe,k across blocks, i.e. for k=1,,K, α1,k,,αE,k|Ψkp(Ψk) and priors for the hyperparameters Ψ1,,ΨK are assumed. Such hierarchical models will enable to employ the formerly specified local deviation feature patterns across blocks. Further, it allows to combine the data of observed deviation for points ϑ on a freshly constructed shape Υ2nom() that is available in the same cluster Θk, and thus inferential precision will enhanced. This enhancement is particularly significant in the view of the complexity of small samples of new manufactured shapes. This hierarchical framework is also adequately universal that allows the immediate addition of the understood model of local deviation characteristics from single shape Υ2nom() to novel shapes which share features with Υ2nom().

2.4. Model building of adaptive Bayesian approach

In the previous section, a method for understanding the new shape's deviation Υ2nom() by pooling the observed data and deviation model for a formerly constructed shape Υ1nom() with the data for a newly shape is presented. Here, we explain how this procedure can be translated to develop the adaptive Bayesian methodology.

Suppose that the current data bank Dcurrent is built on a library of s shapes, whose nominal radius functional forms are parameterized by γ1,,γs. The deviation models for s shapes include a set of functional forms δcurrent={δ1(ϑ|α1),,δj(ϑ|αs)}, and the corresponding parameters collection αcurrent=(α1,,αs). Let the gathered deviation data Ds+1 from a freshly produced shape whose nominal radius function is parameterized by γs+1. If the new shape's deviation features are fully in accordance with the existed shapes library, δcurrent and αcurrent are used to identify a function for its deviation model. Nonetheless, if it shares some general features with the previous shapes library, but strongly believed to have definite deviation features too, then obtain a new functional form δs+1(ϑ|αs+1) by utilizing the discrepancy measure Ts+1(ϑ) to understand its unusual deviation features. This discrepancy measure is a functional form of the observed deviation s+1(ϑ) for the (s + 1) shape and the set of known functional forms δcurrent. The distribution of Ts+1(ϑ) is developed as in Equation (Equation5) by employing posterior draws of δcurrent given Dcurrent.

Next, the graphical posterior predictive checks can be employed to accommodate modelling of δs+1(θ|αs+1). After specifying priors on αs+1 and updating the available data to Dcurrent,Ds+1, the class of functions to {δcurrent,δs+1(ϑ|αs+1)}, and the ensemble of parameters to (αcurrent,αs+1), used to obtain the posterior distribution of the parameters and the posterior predictive distributions of deviation for the new and old shapes. Thus, using models for in-plane shape deviations after each stage in adaptive fashion leads to the adaptive Bayesian model building procedure.

3. Bayesian deviation model building for cylinders, regular pentagon, irregular octagon and free-form shapes

The Bayesian procedure for deviation modelling of regular pentagon, irregular octagon and free-form shapes with straight edges build on three manufactured cylinders and one manufactured regular pentagon is discussed in this section.

3.1. Global deviation feature model for cylinders

Sabbaghi et al. [Citation10] analysed the global deviation feature model for three distinct cylinders of nominal radius γs = 0.5, 1.5 and 3. However, from the study, it is observed that there are huge deviations for the mentioned radiuses by considering the normally distributed error term. Furthermore, one can also notice that the size of the deviations increases with γs and different profiles of deviation occur at their bottom and top halves.

Motivated from the performance of normally distributed error terms [Citation10], we adopted the global deviation feature model for fitting on the deviations of cylinders by assuming logistic distribution for errors. Mathematically, 1(ϑ)=δ1(ϑ|β)+E1(ϑ)=(0ϑπ)δ1,U(ϑ|β)+{1(0ϑπ)}δ1,L(ϑ|β)+E1(ϑ)I(0ϑπ)={1if 0ϑπ0otherviseδ1,L(ϑ|β)=y0,L+β0,L(γ1+y0,L)b0,L+β1,L(γ1+y0,L)b1,L×cos{2(ϑΨL)}δ1,U(ϑ|β)=y0,U+β0,U(γ1+y0,U)b0,U+β1,U(γ1+y0,U)b1,U×cos{2(ϑΨU)} where E1(ϑ)Logistic(0,s12).

Similar to [Citation10], the main purpose is to quantify features of the local deviation for new shapes assuming the logistic independently distributed errors for model fitting. Excluding s2, there are 12 parameters in the vector β, where y0,L and y0,U represent over-exposure (expansion) and under-exposure (contraction) of a bright shape because of the light beams on its limit. Huang et al. [Citation8] studied expansion, i.e. positive y0,L and y0,U, as their γ1=0.5 cylinder expanded to produce a positive deviation.

The priors on β0,L,β0,U,β1,L,β1,U, and s1, are β0,L,β0,UN(1,22)β1,L,β1,UN(1,12)log(0.5+y0,U0.5y0,U),log(0.5+y0,L0.5y0,L)N(0,12)log(ΨU/π1ΨU}/π),log(ΨL}/π1ΨL}/π)N(0,12) The priors for β0,L,β0,U,β1,L and β1,U are built on the argument of Huang et al. [Citation8], that is, a weakly informative prior [Citation25] is assumed as 0<y0,U+0.5, y0,L+0.5<1 on the logistic transformation of y0,L+0.5, y0,U+0.5. The logistic transformation is also applied to the prior specifications of ΨL and ΨU. All prior parameters are assumed mutually independent. Since the direct sampling is difficult from the posterior, we employ Hamilton Monte Carlo for posterior draws, as this algorithm has better convergence properties compared to the traditional Monte Carlo methods for non-linear deviation models. The Hamiltonian Monte Carlo algorithm starts at a predefined family of parameters ϑ and at each point, a new momentum vector is taken for a given number of iterations and the existed value of the parameter ϑ is renewed by employing the leapfrog integrator with discretization time ε and number of steps L.

After specifying priors, the Hamiltonian Monte Carlo has been used for obtaining one thousand posterior draws of parameters including s12 by using first five-hundred draws as the burn-in. The depiction of the histograms of different parameters is given in Figure , whereas the means and the posterior predictive intervals for each ϑ are depicted in Figure .

Figure 1. Histograms of posterior parameters.

Figure 1. Histograms of posterior parameters.

Figure 2. Deviation and model fit for different radius manufactured cylinders assuming logistic errors. (a) Radius =0.5, (b) radius =1.5 and (c) radius =3.0.

Figure 2. Deviation and model fit for different radius manufactured cylinders assuming logistic errors. (a) Radius =0.5″, (b) radius =1.5″ and (c) radius =3.0″.

Figure illustrates the model fitted with deviations for three manufactured cylinders, where on the y-axis deviations in inches are plotted against the angle ϑ on the x-axis. The grey dots represent the observed deviations, the solid lines are the means of the posterior predictive distribution, the dashed lines represent 95% posterior predictive intervals while the dashed vertical lines represent the upper and lower halves. For all the assumed radiuses, it can be seen that the observed deviations are within the given limits and close to the posterior predictive means. From Figure , it can also be seen that by increasing the radius of the manufactured cylinder shapes, the deviations tend to be positive rather than negative, however, the deviations remain inside the 95% posterior predictive intervals.

Figure  illustrates the fitted deviation model for three manufactured cylinders by utilizing Equation (Equation2) with E1(ϑ)Laplace(0,s12). In Figure , for three cylinders, it is found that the observed deviations are within the given limits and are right on the centre of the posterior predictive intervals. Furthermore, we noticed that by increasing the radius of the manufactured cylinder shapes the deviations tend to be positive rather than negative. Contrary to Figure , it is observed that the deviation model provides approximately good fit because a very few deviations are near to the limits.

Figure 3. Deviation and model fit for three manufactured cylinders assuming Laplace errors. (a) Radius =0.5, (b) radius =1.5 and (c) radius =3.0.

Figure 3. Deviation and model fit for three manufactured cylinders assuming Laplace errors. (a) Radius =0.5″, (b) radius =1.5″ and (c) radius =3.0″.

Figure  illustrates fitted deviations model for three manufactured cylinders by utilizing Equation (Equation2) with E1(ϑ)Cauchy(0,s12). It is noticed from the figure that the observed deviations are within the given limits and are right on the centre of the posterior predictive intervals and by increasing the radius of the manufactured cylinder shapes, the deviations tend to be positive rather than negative. Further, the deviations are within the 95% posterior predictive intervals. Contrary to Figures and , the deviations are very small and have a trend but posterior predictive means and posterior predictive intervals have no specific pattern. The posterior predictive means fluctuate and sometimes fall outside the posterior predictive intervals and predictive means and intervals have no constant mean and constant variance over the angles. Thus, Cauchy distribution for the errors is not suitable as the logistic or Laplace distribution.

Figure 4. Deviation and model fit for three manufactured cylinders assuming Cauchy distributed errors. (a) Radius =0.5, (b) radius =0.5, (c) radius =1.5, (d) radius =1.5, (e) radius =3.0 and (f) radius =3.0.

Figure 4. Deviation and model fit for three manufactured cylinders assuming Cauchy distributed errors. (a) Radius =0.5″, (b) radius =0.5″, (c) radius =1.5″, (d) radius =1.5″, (e) radius =3.0″ and (f) radius =3.0″.

Figure  illustrates the deviation model fitted for three manufactured cylinders by utilizing Equation (Equation2) with E1(ϑ)Exp(1s12). From the figure, for three cylinders, it is found that the observed deviations fall outside the lower limit of the posterior predictive intervals and by increasing the radius of the manufactured cylinder shapes the deviations tend to be positive rather than negative. Furthermore, the posterior predictive means are very close to the lower limit of the posterior predictive interval. There are variations in the upper limit of the posterior predictive intervals but not in the lower limit. The reason behind this is the exponential distribution which is a positively skewed distribution.

Figure 5. Deviation and model fit for three manufactured cylinders assuming exponentially distributed errors. (a) Radius =0.5, (b) radius =1.5 and (c) radius =3.0.

Figure 5. Deviation and model fit for three manufactured cylinders assuming exponentially distributed errors. (a) Radius =0.5″, (b) radius =1.5″ and (c) radius =3.0″.

Figure  illustrates the fitted deviation model for three manufactured cylinders by utilizing Equation (Equation2) with E1(ϑ)lognormal(0,s12). It is noticed that the observed deviations exactly follow the predictive mean and thus lognormal is also a suitable distribution for the error terms.

Figure 6. Deviation and model fit for three manufactured cylinders.

Figure 6. Deviation and model fit for three manufactured cylinders.

3.2. Local deviation feature modelling for regular five-sided polygon

To define the local deviation model for regular five-sided polygon, let the nominal radius function be given by Υ2nom(ϑ)=3cos(π5)cos{(ϑπ2)mod2π5π5} where γ2 = (5,3). Then, the local deviation feature model can be written as δ2(ϑ|α)=k=12I(ϑΘk)δ2,k(ϑ|αe(ϑ),k) where (6) δ2,k(ϑ|αe(ϑ),k)=αe(ϑ),0+αe(ϑ),1{Υ2nom(ϑ)Υ2nom(m(ϑ))}ae(ϑ),k(6) with m:[0,2π][0,2π] defined as m(ϑ)=argmint:e(t)=e(ϑ)Υ2nom(t) and e:[0,2π]{1,2,3,4,5} is the functional form which returns the block comprising ϑ. For each blocks, five new parameters are introduced which are αe(ϑ),1,1, ae(ϑ),1 and αe(ϑ),2,1, ae(ϑ),2 to determine systematic patterns which occur across blocks.

The distinct magnitudes for each pattern across blocks are entertained through the specification of hierarchical models on βe(ϑ),0, αe(ϑ),1,1. We assume weakly informative priors on ae(ϑ),1 and ae(ϑ),2. Furthermore, α1,0,α2,0,α3,0,α4,0.α5,0iidN(μ0,r02)α1,1,1,α2,1,1,α3,1,1,α4,1,1.α5,1,1iidN(μ1,r12)α1,2,1,α2,2,1,α3,2,1,α4,2,1.α5,2,1iidN(μ2,r22)a1,0,a2,1,,a5,1,a1,2,a2,2,,a5,2iidN(12,12) The standard reference prior [Citation10] is specified as p(m0,m1,m2,r02,r12,r22)1r0,r1,r2 To this end, we fit the following model to all the preceding shapes with priors on β,α, and s02, with 1(ϑ)=δ1(ϑ|β)+E1(ϑ)2(ϑ)=δ1(ϑ|β)+δ2(ϑ|α)+E2(ϑ) where errors E1(ϑ)Logistic(0,s12) and E2(ϑ)Logistic(0,s22) are mutually independent, and a flat prior is assumed on log(s2). To obtain the posterior distribution of α, deviation data for both the new regular pentagon and the cylinders are mixed under this model. To this end, Hamiltonian Monte Carlo is utilized for calculating a thousand posterior draws of parameters α obtained after discarding five hundred observations as the burn-in period (Figure ).

Figure 7. Histograms of posterior draws for five-sided polygon.

Figure 7. Histograms of posterior draws for five-sided polygon.

The resulting deviations with posterior predictive means for each block are shown in Figure (a) assuming logistic error. Similarly, the summary of the specification of hierarchical model for δ2 of a regular pentagon is depicted in Figure (b).

Figure 8. Deviation profile and model fit of a new regular five-sided polygon (pentagon) of size 3 assuming logistic error. (a) Deviation profile assuming l Logistic error and (b) deviation and model fit assuming logistic error.

Figure 8. Deviation profile and model fit of a new regular five-sided polygon (pentagon) of size 3″ assuming logistic error. (a) Deviation profile assuming l Logistic error and (b) deviation and model fit assuming logistic error.

Figure (b) illustrates the fitted model with local deviations for regular pentagon assuming logistic errors and it is noticed that the observed deviations are within the 95% posterior predictive interval.

Figure (a) illustrates the fitted local deviations model for regular pentagon by utilizing Equation (Equation3) with E2(ϑ)Laplace(0,s22). In Figure (b), for each block in a regular pentagon of radius of 3, it is noticed that the observed deviations are within the 95% posterior predictive interval. In contrast to Figure (b), we noticed that the deviation model provides approximately good fit because a very few deviations are close to the limits.

Figure 9. Deviation profile and model fit of a new regular five-sided polygon (pentagon) of size 3 assuming Laplace error. (a) Deviation profile assuming Laplace error and (b) deviation and model fit assuming Laplace error.

Figure 9. Deviation profile and model fit of a new regular five-sided polygon (pentagon) of size 3″ assuming Laplace error. (a) Deviation profile assuming Laplace error and (b) deviation and model fit assuming Laplace error.

Figure  illustrates the fitted local deviations model for regular pentagon by utilizing Equation (Equation3) with E2(ϑ)Cauchy(0,s22). From the figure, for each block in a regular pentagon of radius of 3 inches, it is found that the observed deviations are within the 95% posterior predictive interval. In contrast to Figures and , it can be seen that the deviations are very small and show trend but posterior predictive means and posterior predictive intervals have no specific pattern. The posterior predictive means fluctuate and go outside the posterior predictive intervals and there are huge variations in posterior predictive means. Thus, the posterior predictive means and posterior predictive intervals have no constant mean and variance over the angle. Therefore, the posterior predictive means and posterior predictive intervals cannot be correctly estimated.

Figure 10. Deviation and model fit of the new 3 regular Pentagon assuming Cauchy distribution for error. (a) Deviation profile assuming Cauchy error, (b) deviation and model fit assuming Cauchy error and (c) deviation and model fit assuming Cauchy error.

Figure 10. Deviation and model fit of the new 3″ regular Pentagon assuming Cauchy distribution for error. (a) Deviation profile assuming Cauchy error, (b) deviation and model fit assuming Cauchy error and (c) deviation and model fit assuming Cauchy error.

Figure (a) depicts the fitted local deviations model for a regular pentagon by utilizing Equation (Equation3) with E2(ϑ)Exp(1s22). For a regular pentagon, it is noticed that the observed deviations fall outside the lower limit of the posterior predictive intervals. The posterior predictive means are very close to the lower limit of the posterior predictive interval and there are variations in the upper limit of the posterior predictive intervals. The reason behind this pattern is the exponential distribution which is a positively skewed distribution. Figure  illustrates the deviation fitted model for regular pentagon by utilizing Equation (Equation3) with E1(ϑ)lognormal(0,s22). This figure shows inappropriate fitting of the model and the deviation model does not perform well assuming lognormal distribution for errors.

Figure 11. Deviation profile and model fit of the new 3 regular Pentagon using exponential distribution. (a) Deviation profile of a new 3 Pentagon using exponential distribution and (b) deviation and model fit of the new 3 regular Pentagon using exponential distribution.

Figure 11. Deviation profile and model fit of the new 3″ regular Pentagon using exponential distribution. (a) Deviation profile of a new 3″ Pentagon using exponential distribution and (b) deviation and model fit of the new 3″ regular Pentagon using exponential distribution.

Figure 12. Deviation profile and model fit of the new 3 regular Pentagon assuming Lognormal errors. (a) Deviation profile and (b) deviation and model fit.

Figure 12. Deviation profile and model fit of the new 3″ regular Pentagon assuming Lognormal errors. (a) Deviation profile and (b) deviation and model fit.

3.3. An irregular octagon and local deviation feature model

Sabbaghi et al. [Citation10] investigated the model of the local deviation feature for irregular octagon of nominal radius 1. However, we noticed wider deviations by considering normally distributed error term. To improve the accuracy of the deviation model, we investigate the impact of different skewed distributions. The utilization of the Bayesian method on a single new regular pentagon and cylinders clearly increases up the need of building the local deviation feature model for more common polygon shapes. To this end, we utilize the existed data library of Dcurrent=(D1,D2), δcurrent=(δ1,δ2) and αcurrent to identify a model of deviation for any irregular or regular polygon (convex), without any other posterior predictive checks. The reason behind this is polygons (convex) are comprised exclusively straight edges. Therefore, the deviation can be modelled through the simple augmentation of the existed library of functional forms for straight sides. Assume a curved E-sided polygon with the nominal radius Υ3nom(ϑ):[0,2π]R. From the existed data library, it is noticed that the sides constitute blocks and we fix e:[0,2π]{1,,E} as the functional form that gives the block level for each ϑ. Likewise, utilizing the existed information to characterize m:[0,2π][0,2π] as m(ϑ)=argmint:e(t)=e(ϑ)Υ3nom(t) and the clusters Θ1={ϑ[0,2π]:ϑ>m(ϑ)}, Θ2={ϑ[0,2π]:ϑm(ϑ)}. Finally, we extend the previously learned local deviation feature model to Υ3nom() as (7) δ3(ϑ|α)=k=12I(ϑΘk)δ3,k(ϑ|αe(ϑ),k)(7) with (8) δ3,k(ϑ|αe(ϑ),k)=αe(ϑ),0+αe(ϑ),1{Υ3nom(ϑ)Υ3nom(m(ϑ))}ae(ϑ),k(8) We run the local deviation model utilizing data from the previously developed cylinders and a freshly constructed regular pentagon. The irregular octagon does not necessarily have a circumcircle, therefore, one can utilize the minimum bounding circle for the global deviation feature. The model of local deviation feature for irregular octagon can be written as (9) 3(ϑ)=δ1(ϑ|β)+δ3(ϑ|α)+E3(ϑ)(9) where δ1(ϑ|β) is already defined, δ3(ϑ|α), and E3(ϑ)Logistic(0,s32). A Bayesian hierarchical model is constructed on α, and weakly informative priors on ae(ϑ),1,ae(ϑ),2, β, s32 are assumed for the analysis. We used the Hamiltonian Monte Carlo for calculating a thousand posterior draws obtained after the burn-in of five hundred draws (Figure ).

Figure 13. Histograms of posterior parameters for the irregular octagon.

Figure 13. Histograms of posterior parameters for the irregular octagon.

The fitted model for the irregular octagon is plotted in Figure (a,b) for the irregular octagon deviation profile, particularly by considering three cylinders and one regular pentagon.

Figure 14. Deviation and model fit for new irregular octagon assuming logistic errors. (a) Deviation profile and (b) deviation and model fit.

Figure 14. Deviation and model fit for new irregular octagon assuming logistic errors. (a) Deviation profile and (b) deviation and model fit.

Figure  illustrates the local deviation fitted model for irregular octagon by using Equation (Equation4) with E3(ϑ)Cauchy(0,s32). It is noticed that Cauchy distribution is not appropriate for the errors.

Figure 15. Deviation and model fit for new irregular octagon. (a) Deviation profile and (b) deviation model fit.

Figure 15. Deviation and model fit for new irregular octagon. (a) Deviation profile and (b) deviation model fit.

Figure (b) illustrates the fitted local deviations model for the irregular octagon by using Equation (Equation4) with E3(ϑ)Exp(1s32). From the figure, it can be seen that the observed deviations fall outside the lower limit of the posterior predictive intervals, whereas the posterior predictive means are very close to the lower limit of the posterior predictive interval but not to the upper limit. The fluctuation in the upper limits of the posterior predictive intervals indicates variations in the pattern while the lower limit of the posterior predictive intervals shows smoothness in pattern.

Figure 16. Deviation profile and model fit assuming exponential distribution for errors. (a) Deviation profile and (b) deviation and model fit.

Figure 16. Deviation profile and model fit assuming exponential distribution for errors. (a) Deviation profile and (b) deviation and model fit.

3.4. Free-form shapes with straight edges and local deviation feature model

Sabbaghi et al. [Citation10] also studied the model of the local deviation feature for the free-form shape by assuming normally distributed errors. However, large deviations were noticed in the predictive intervals because of normal distribution of errors. Therefore, we use different error distributions to minimize the predictive intervals. The existed library for models of local deviation feature can be used to study the polygonal shapes. That is, if a new shape's components associate to the existed library, then deviations can be modelled by applying the functions from δcurrent. To this end, the posterior draws for model parameters are depicted in Figure .

Figure 17. Histograms of posterior draws for free-form shapes.

Figure 17. Histograms of posterior draws for free-form shapes.

The observed deviation is defined as (10) 4(ϑ)=Υ4obs(ϑ)Υ4nom(ϑ)(10) (11) 3(ϑ)=δ1(ϑ|β)+δ4(ϑ|α)+E4(ϑ)(11) where E4(ϑ)Logistic(0,s42)

Figure  illustrates the model fitted with local deviations for free form shape. From this figure, it is noticed that the observed deviations are within the 95% posterior predictive interval. However, it is also observed that the deviation model is poorly fitted to the points situated on curved segments because free form shapes would never allow us to understand the deviation characteristic for the curved segments.

Figure 18. Deviation and model fit of the freestyle shape using logistic errors.

Figure 18. Deviation and model fit of the freestyle shape using logistic errors.

Next, Figure  illustrates the local deviations model fitted for free form shapes by utilizing Equation (Equation6) with E4(ϑ)Cauchy(0,s42). From the figure, it is noticed that the observed deviations are within the 95% posterior predictive interval and contrary to Figure , the deviations are very small and are showing trend but the posterior predictive means and posterior predictive intervals have no pattern. The posterior predictive means fluctuate very much and fall outside the posterior predictive intervals.

Figure 19. Deviation and model fit for the new freestyle shape using Cauchy Errors. (a) Deviation with posterior predictive Intervals, (b) deviations and posterior predictive means and (c) deviations with posterior predictive means and intervals.

Figure 19. Deviation and model fit for the new freestyle shape using Cauchy Errors. (a) Deviation with posterior predictive Intervals, (b) deviations and posterior predictive means and (c) deviations with posterior predictive means and intervals.

Figure  illustrates the local deviations model for free form shapes by using Equation (Equation6) with E4(ϑ)Exp(1s42). It is observed from the figure that the observed deviations fall outside the lower limit of the posterior predictive intervals whereas the posterior predictive means are very close to the lower limit of the posterior predictive intervals but not close to the upper limit. The fluctuation in the upper limits of the posterior predictive intervals indicates variations in the pattern while the lower limits of the posterior predictive intervals show a smoothed pattern.

Figure 20. Deviation and model fit for free-form shape assuming exponential errors.

Figure 20. Deviation and model fit for free-form shape assuming exponential errors.

4. Conclusion and recommendations

The results of the fitted model with global deviations assuming logistic, Laplace, Cauchy and exponential distributions of error term for three manufactured cylinders are discussed in this study using the Bayesian deviation model. It is observed that for smaller radius, negative deviations are found whereas for higher radius of the cylinder, the values fall away from the means of posterior predictive distribution. Furthermore, we observed that the deviation model works efficiently for the four straight edges, whereas the model of deviation have a poor fit for points on the bending section. Assuming different distributions for errors, freestyle shapes do not allow to understand the deviation features for the bending section.

The Laplace distribution is also used for errors, which shows that the Bayesian deviation model is approximately a good fit. Likewise, Cauchy distribution is also employed, which shows the lack of fitness of the Bayesian deviation model. The posterior predictive means fluctuate very much and go outside the posterior predictive intervals, and there are huge variations in the posterior predictive means. Furthermore, exponential distribution also shows the lack of fitness because deviations are lying outside in the lower limit of the interval. Also, the means of the posterior predictive distribution are very close to the lower limit. Finally, for the lognormal distribution, it is noticed that the Bayesian deviation model is fitted very poorly.

It is recommended that the fitted model assuming the logistic distribution of the error term with global deviations for three manufactured cylinders and local deviations for regular pentagon, irregular octagon, and free form shapes shows a better fit and should be used rather than assuming other distributions. In future, the performance of other deviation models [Citation33] and discrepancy measures may be studied.

Disclosure statement

No potential conflict of interest was reported by the author(s).

References

  • Oliveira JP, LaLonde AD, Ma J. Processing parameters in laser powder bed fusion metal additive manufacturing. Materials Design. 2020;193:108762.
  • Oliveira JP, Santos TG, Miranda RM. Revisiting fundamental welding concepts to improve additive manufacturing: from theory to practice. Progress Materials Sci. 2020;107:100590.
  • Shen J, Zeng Z, Nematollahi M, et al. In-situ synchrotron X-ray diffraction analysis of the elastic behaviour of martensite and H-phase in a NiTiHf high temperature shape memory alloy fabricated by laser powder bed fusion. Add Manuf Lett. 2021;1:100003.
  • Lopes JG, Machado CM, Duarte VR, et al. Effect of milling parameters on HSLA steel parts produced by wire and arc additive manufacturing (WAAM). J Manuf Process. 2020;59:739–749.
  • Campbell T, Williams C, Ivanova O, et al. Could 3D printing change the world. In: Technologies, potential, and implications of additive manufacturing. Washington, DC: Atlantic Council; 2011. p. 3.
  • Tong K, Amine Lehtihet E, Joshi S. Parametric error modeling and software error compensation for rapid prototyping. Rapid Prototyping J. 2003;9(5):301–313.
  • Tong K, Joshi S, Amine Lehtihet E. Error compensation for fused deposition modeling (FDM) machine by correcting slice files. Rapid Prototyping J. 2008;14(1):4–14.
  • Huang Q, Zhang J, Sabbaghi A, et al. Optimal offline compensation of shape shrinkage for three-dimensional printing processes. IIE Trans. 2015;47(5):431–441.
  • Huang Q, Nouri H, Xu K, et al. Statistical predictive modeling and compensation of geometric deviations of three-dimensional printed products. J Manuf Sci Eng. 2014;136(6):061008.
  • Sabbaghi A, Huang Q, Dasgupta T. Bayesian model building from small samples of disparate data for capturing in-plane deviation in additive manufacturing. Technometrics. 2018;60(4):532–544.
  • Wang W, Cheah C, Fuh J, et al. Influence of process parameters on stereolithography part shrinkage. Materials Design. 1996;17(4):205–213.
  • Sharon E, Mumford D. 2d-shape analysis using conformal mapping. Int J Comput Vision. 2006;70(1):55–75.
  • Jin Y, Qin SJ, Huang Q. Offline predictive control of out-of-plane shape deformation for additive manufacturing. J Manuf Sci Eng. 2016;138(12):121005.
  • Huang Q. An analytical foundation for optimal compensation of three-dimensional shape deformation in additive manufacturing. J Manuf Sci Eng. 2016;138(6):061010.
  • Zhu Z, Anwer N, Mathieu L. Deviation modeling and shape transformation in design for additive manufacturing. Procedia CIRP. 2017;60:211–216.
  • Castillo E, Colosimo BM. Statistical shape analysis of experiments for manufacturing processes. Technometrics. 2011;53(1):1–15.
  • Zhou C, Chen Y. Additive manufacturing based on optimized mask video projection for improved accuracy and resolution. J Manuf Processes. 2012;14(2):107–118.
  • Gebhardt A, Fateri M. 3D printing and its applications. RTejournal-Forum Rapid technol. 2013;2014:1–9.
  • Sabbaghi A, Dasgupta T, Huang Q, et al. Inference for deformation and interference in 3D printing. Ann Appl Statist. 2014;8(3):1395–1415.
  • Sköld G, Vidarsson H. Analysing the potentials of 3D-printing in the construction industry: considering implementation characteristics and supplier relationship interfaces. Gothenburg: Chalmers University of Technology; 2015.
  • Gelman A, Hill J. Data analysis using regression and hierarchical/multilevel models. New York (NY): Cambridge; 2007.
  • Park DK, Gelman A, Bafumi J. Bayesian multilevel estimation with poststratification: state-level estimates from national polls. Political Anal. 2004;12(4):375–385.
  • Berger JO. Prior information and subjective probability. In: Berger JO, editor. Statistical decision theory and bayesian analysis. New York: Springer; 1985. p. 74–117.
  • Oman SD. Specifying a prior distribution in structured regression problems. J Amer Statist Assoc. 1985;80(389):190–195.
  • Gelman A, Jakulin A, Pittau MG, et al. A weakly informative default prior distribution for logistic and other regression models. Ann Appl Statist. 2008;2(4):1360–1383.
  • Ghaderinezhad F, Ley C. On the impact of the choice of the prior in bayesian statistics. In: Tang N, editor. Bayesian inference on complicated data. Rijeka: IntechOpen; 2020. Available from: https://doi.org/10.5772/intechopen.88994.
  • Chen MH, Ibrahim JG, Yiannoutsos C. Prior elicitation, variable selection and bayesian computation for logistic regression models. J R Statist Soc Ser B (Statistical Methodol). 1999;61(1):223–242.
  • Rafique M, Ali S, Shah I, et al. A comparison of different bayesian models for leukemia data. Amer J Math Manag Sci. 2021;41(3):244–258.
  • Huang Q, Nouri H, Xu K, et al. Predictive modeling of geometric deviations of 3d printed products-a unified modeling approach for cylindrical and polygon shapes. 2014 IEEE International Conference on Automation Science and Engineering (CASE). Silver Spring (MD): IEEE; 2014. p. 25–30.
  • Rubin DB. Bayesianly justifiable and relevant frequency calculations for the applied statistician. Ann Statist. 1984;12(4):1151–1172.
  • Meng XL. Posterior predictive p-values. Ann Statist. 1994;22(3):1142–1160.
  • Reichl J. Estimating marginal likelihoods from the posterior draws through a geometric identity. Monte Carlo Methods Appl. 2020;26(3):205–221.
  • Zhu Z, Anwer N, Mathieu L. Geometric deviation modeling with statistical shape analysis in design for additive manufacturing. Procedia CIRP. 2019;84:496–501.