Prediction of Dimensional Changes of Low-Cost Metal Material Extrusion Fabricated Parts Using Machine Learning Techniques

: Additive manufacturing (AM) is a layer-by-layer manufacturing process. However, its broad adoption is still hindered by limited material options, different fabrication defects, and incon-sistent part quality. Material extrusion (ME) is one of the most widely used AM technologies, and, hence, is adopted in this research. Low-cost metal ME is a new AM technology used to fabricate metal composite parts using sintered metal infused ﬁlament material. Since the involved materials and process are relatively new, there is a need to investigate the dimensional accuracy of ME fabricated metal parts for real-world applications. Each step of the manufacturing process, from the material extrusion to sintering, might signiﬁcantly affect the dimensional accuracy. This research provides a comprehensive analysis of dimensional changes of metal samples fabricated by the ME and sintering process, using statistical and machine learning algorithms. Machine learning (ML) methods can be used to assist researchers in sophisticated pre-manufacturing planning and product quality assessment and control. This study compares linear regression to neural networks in assessing and predicting the dimensional changes of ME-made components after 3D printing and sintering process. In this research, the ML algorithms present a signiﬁcantly high coefﬁcient of determination (i.e., 0.999) and a very low mean square error (i.e., 0.0000878). The prediction outcomes using a neural network approach have the smallest mean square error among all ML algorithms and it has quite small p-values. So, in this research, the neural network algorithm has the highest accuracy. The ﬁndings of this study can help researchers and engineers to predict the dimensional variations and optimize the printing and sintering process parameters to obtain high quality metal parts fabricated by the low-cost ME process.


Introduction
Additive manufacturing (AM), also known as 3D printing (3DP) [1], is a set of technologies that are used to produce objects layer-by-layer from computer-aided design (CAD) models [2]. There are various types of AM processes including material extrusion (ME), selective laser sintering (SLS), selective laser melting (SLM), powder bed fusion (PBF), and stereolithography (STL) [3]. Among these techniques, ME is well-known and the most widely used process [4]. ME has plenty of advantages over traditional manufacturing methods such as the production of highly complex parts with less weight, time, and material cost [5]. The research of the ME process is growing sharply in plenty of areas, such as medicine [6], construction [7], machinery manufacturing [8], and the food industry [9]. Recently, ME has been used in the manufacturing of metal components [10]. In recent years, new metal-infused polymer filaments have been developed as a feedstock material for ME process and can be used to fabricate metal components using this new, low-cost manufacturing processes [11].
Sintering is a process that forms a solid mass of metal by heating the composite material of metal powder and a binding agent to just below the melting point of the metal [12]. The metal-polymer composite filament is melted and extruded in the 3D printer then sintered to change the metal-polymer composite parts to pure metal [13]. 3D printed metal-composite parts need to be sintered in order to melt the polymer and diffuse the metal particles inside the polymer matrix material. After sintering, the internal polymer will melt and the metal material will glue together. Moreover, the sintering process is crucial, because the mechanical properties of the metal-polymer composite parts are much lower than pure metal [14]. In this context, by heating the metal-polymer composite parts to just below the melting temperature of the metal, the polymer will melt and evaporate slowly, which eventually will lead to having a pure metal component [15]. It has been shown by the Gong's group and the Burkhardt's group that after the sintering process, the dimensions of the samples will change [11,16]. Thus, an accurate method is required to predict the CAD dimension.
The dimensional accuracy of AM has been studied by plenty of research groups. Yasa et al. studied the dimensional accuracy and mechanical properties of chopped carbon-fiberreinforced, tough nylon productions, which were made by the ME method [17]. Osman et al. investigated the dimensional errors of AM fabricated samples by laser sintering [18]. The authors concluded that the precision of both selective laser sintering and 3DP models are acceptable. Ibrahim et al. analyzed the dimensional error in some AM methods [19]. They reported different dimensional errors and chose the most accurate one. In the research by Wang's group, they investigated the shrinkage caused by sintering process in the binder jetting AM technique [20]. Three sets of recommended sintering parameters were analyzed to achieve the best dimensional accuracy for each axis and one parameter in all three axes by Wang's group. Four sets of optimal sintering parameters were found by this research group to improve the dimensional accuracy.
Machine Learning (ML) is a subset of artificial intelligence, which can be used to predict mechanical properties of manufacturing parts [21]. ML can perform modeling and analysis on big data [22] to assist humans in various areas of technology such as language detection and translation [23], facial expression and motion analysis [24], medicine [25], etc. In recent years, ML has gained increasing attention in the AM field due to the application of regression, classification, and clustering. ML has numerous applications such as the prediction of tensile strength of Polylactic acid (PLA) objects fabricated by ME [22], design of AM [23], improvement of the geometrical accuracy fabricated by ME [24], etc. Although the dimensional accuracy of AM has been studied in plenty of works [25][26][27][28], ML was not used in these works, since their datasets are not large enough. For example, Gong's group used only 11 samples to get their results. Thus, there is a need for a large dataset to predict the dimensional accuracy in the low-cost metal ME process using ML techniques.
In this study, cuboid samples were fabricated by ME and the dimensions before and after sintering of the samples were collected. This study compares linear regression to neural networks in assessing and predicting the dimensional changes of ME made components after 3DP and sintering. These algorithms were used to predict the CAD dimensions of the samples based on the final sintered dimensions.

Materials and Equipment
In this research, the bronze-PLA filament made by The Virtual Foundry (Stoughton, WI, USA) [29] was used to print the non-sintered parts and fabricated in an Ultimaker S5 3D printer which is made by Ultimaker (Utrecht, The Netherlands) [30]. The sintering process was performed with the use of a KSL-1100X muffle furnace, made by the MTI Corporation (Richmond, CA, USA) [31]. A 35-025 electronic micrometer which is made by iGaging (San Clemente, California, USA) [32], was used to take the measurement of the dimensions before and after the sintering process. The materials and equipment used in this research are shown in Figure 1. Figure 2 shows the metal-composite part as a CAD model, 3D printed and after sintering. The CAD model will be sliced in the software Cura, which is developed by Ultimaker too. This will keep the accuracy of printing process as much as possible.

Process Workflow
The schematic of this research is shown in Figure 3. There are three main sections in the research. The first section is the data collection. The g-code was generated from a CAD model in the slicing software, which then is used to fabricate the non-sintered parts in the 3D printer. After measuring the non-sintered dimensions, the non-sintered parts were sintered in the muffle furnace. After sintering, the sintered parts were polished and then measured. The second section is prediction. Prediction algorithms were trained, tested, and evaluated using the collected data. The third section is verification, where the performance of the prediction algorithm is validated via experimental results.

Dataset Preparation
In this research, there are three different types of data, dimensions obtained from the CAD model, the non-sintered part, and the sintered and polished part. Since the dimensions of the final part are what is wanted, the regression and ML algorithms were developed to use the sintered dimensions with the various printing and sintering parameters to predict the starting CAD dimensions. The CAD dimensions can be controlled by the users in slicing software and the non-sintered and sintered dimensions were measured by an iGaging micrometer.
From the printing process, layer thickness (the height of each layer during the printing process), nozzle temperature, and printing speed were chosen as explanatory variables. For the sintering process, sintering temperature, and ramp ratio (temperature increasing ratio) were chosen as the explanatory variables. The parameters of the printing and sintering process are given in Tables 1 and 2. In this research, 150 samples were fabricated and resulted in 450 groups of data points. Table 3 shows an example of the combination of the process parameters and their relationship with the sample dimensions. The part was printed with a layer thickness of 0.1 mm, 240 • C as nozzle temperature and a 10 mm/s printing speed. The sample was sintered in at 870 • C and the temperature increasing ratio is 2 • C/min. The CAD dimensions of the part are 20mm × 15mm × 6 mm, but after printing, the real dimensions of the part are bigger than the CAD. During the sintering process, the part undergoes a shrinkage process that reduces the dimensions to below CAD dimensions. Thus, compared to the CAD dimensions, the final dimensions will be significantly different. Therefore, a prediction of the CAD dimensions is needed.

Prediction Algorithms
The three types of algorithms used in this research were single linear regression (LR), linear regression with interactions (LRI) and Neural Networks (NN). All ML algorithms are developed in Python. The following subsections will explain the definitions and reasons of choosing these three kinds of algorithms.

LR
LR is a type of supervised ML algorithm that is used to predict continuous outcomes using a constant slope [33]. Since there are 8 independent variables, the polynomial regression is not a suitable method. LR is used in this research because of its briefness on learning and using, accuracy in multiple variables, and reliability [34]. In this research, multiple features are used to do prediction and the equation of the LR is: Here, y is the vector of response variables, X is the matrix of independent variables, θ is the coefficient vector, and ε is the vector of the error term. In this research, the CAD dimension is the response variable. The 8 independent variables are layer thickness (LT), sintering temperature (ST), ramp ratio (RR), nozzle temperature (NT), printing speed (PS) and the final length (L), width (W), and height (H). The LR algorithm will generate the θ and ε and the matrix of independent variables X is shown below:

LRI
LRI is a kind of unique linear regression method. Among the independent variables, there might be some interactions. LRI will involve these interactions during the analysis process [35] but LR does not. The equation of the LRI is the same as LR: Here, y is the vector of response variables, X is the matrix of independent variables, θ is the coefficient vector and ε is the vector of the error term. In this research, the CAD dimension is the response variable. However, the matrix of independent variables X is different, The X for LRI is shown below:

NN
NN is a kind of ML algorithm which uses a set of network layers to translate an input data into an output [36]. NN uses multiple layers of linear processing units for feature extraction and transformation. Each layer uses the output from the previous layer as input, learning in supervised or unsupervised manners [37]. In this research, supervised manners are used since the response variables are labeled data. Also, a deep NN model is developed since we will involve more than a single hidden layer. The schematic of the NN is represented in Figure 4, starting at the input layer, the CAD dimensions, sintered dimensions, printing parameters, and sintering parameters are all inputted and data is analyzed in the hidden layers and then output. The output of the NN is the CAD dimensions, the inputs are the sintered data and printing/sintering parameters.

Results and Discussions
In this section, the results collected from the two different algorithms adopted in this paper are shown by figures presented. Firstly, the printing accuracy of the 3D printer is shown. Then, the dimensional changes between the CAD and sintered data were analyzed by LR, LRI and NN algorithms. The results from the three analysis algorithms adopted in this paper are presented.

Printing Accuracy
The errors between the non-sintered and CAD data are shown in Figure 5. The medians of all dimensional errors are not zero, which means that after printing, the nonsintered and CAD data are different. For the length and the width, non-sintered dimensions are larger than the CAD dimensions, which means that the real parts will expand in length and width than the 3D models after the printing process. As for the height, the real parts will shrink or expand than the 3D models. In the AM design process, the CAD dimensions can be controlled by the users. Thus, it is required to predict the CAD data, but not the non-sintered data.

Analysis of Dimensional Variations of CAD and Sintered Samples
In this subsection, the results of the prediction of CAD dimensions of three different algorithms are shown separately.

Results of Prediction by LR
After parameter optimization, the equations to predict the initial CAD dimensions by LR are: 0.000220 0.0649 0.0136 0.000300 −0.0321 0.647 0.118 0.0793 The coefficients vector generated from the LR algorithm multiply the independent matrix will result in the prediction vector of CAD dimensions. Compared with the real CAD dimension vector, the error is shown in Figure 6. The medians of all three errors are close to zero and most absolute values of maximum and minimum errors are less than 1 mm, which means that in predicting most dimensions, LR is accurate. However, for length and width, there are also several outliers of 2 and 1.5 mm, respectively.

Results of Prediction by LRI
After parameter optimization, the equations to predict the initial CAD dimensions by LRI are: The error between the prediction of CAD dimensions by the LRI and the real CAD dimensions is shown in Figure 7. The medians of all three errors are close to zero and most absolute values of maximum and minimum errors are less than 0.8 mm, which means that most predictions done by LRI are accurate and the variations of LRI predictions are smaller than LR predictions. In addition to length and width, there are also several outliers of 1.4 and 1.2 mm, respectively.

Results of Prediction by NN
After Hyper-parameter optimization, the depth (number of hidden layer), width (number of neurons per hidden layer), and activation function at hidden layers are generated and the structure of the NN is shown in Table 4. The test size of this NN model is 0.32, 144 groups of data are used in each run of the training process and the model is trained 500 times. All manufacturing parameters are independent variables in the input of the NN model; if any one of the parameters were deleted, the accuracy would be lower. In Figure 8, the results generated by NN are shown. The medians of all three errors are close to zero and most absolute values of maximum and minimum errors are less than 0.1 mm, which means NN is accurate and has the smallest variations among all three algorithms. For length and width, there are also several outliers but most of them are less than 0.4 mm. Compared to LR and LRI, NN is more accurate. As seen by the variance of NN is being smaller than LR and LRI. This can be attributed to the fact that NN can extract complex features within the data and hence yield better results compared with LR and LRI. In statistics, the p-value is usually used to evaluate the probability of extreme outcomes [39]. A very small p-value means that an extreme observed outcome would unlikely occur. Table 5 shows the p-values of NN-predicted length, width, and height. All p-values are significantly small.

Error Metrics
The results of different algorithms have been shown in figures. It is difficult to test the performance from the figures. Models that are used to predict output values must have metrics to assess the performance or the success of the algorithm. There are several error metrics that are utilized in the ML community. In this research, the coefficient of determination (R 2 ) values and mean square error (MSE) metrics was used to test the performance of the algorithms. R 2 is the proportion of the variance in the dependent variable that is predictable from the independent variable [40]. The equation is given below: where the RSS is sum of squares of residuals and TSS is total sum of squares. MSE is the average squared difference between the estimated values (predicted values) and the actual value (observed values) [41]. The equation is given below: where MSE is the mean square error, n is the sample size used to test an algorithm, Y i is the observed value, andŶ i is the value predicted by the algorithm. The R 2 s of LR and LRI are shown in Table 6. LRI has a larger R 2 than LR. So, the correlation of LRI is more reliable than LR. The MSE of the three algorithms are shown in Table 7. NN has the smallest MSE and thus, NN is the most accurate algorithm in this research.

Verification
In this section, a verification part is sintered to verify the accuracy of the algorithm. Since the MSE of NN is the lowest, the prediction is generated by NN. The manufacturing parameters are shown in Table 8 and the results are shown in the Table 9.

Conclusions
AM is one of the latest manufacturing processes that is widely used in several fields. Metal AM is also relatively new and has a potential to be one commonly used low-cost metal manufacturing technologies. Low-cost metal ME does not have the disadvantages of metal AM since it uses metal-infused filament materials instead of pure metal materials. ML can assist researchers to predict the qualities of the parts fabricated by low-cost metal ME. In this research, the printing accuracy and the dimensional changes of low-cost metal ME fabricated parts are analyzed by different algorithms and the following conclusions are drawn: After the printing process, the non-sintered dimensions are different from the CAD dimensions, it will expand in length and width than the 3D models. As for the height, it will shrink or expand than the 3D models.

•
The three types of algorithms behave differently in predicting CAD dimensions. NN has the smallest MSE (0.00228 in length, 0.0117 in width, and 0.0000878 in height) and, hence, will be the best algorithm to predict the initial CAD dimensions.

•
Since both LRI and NN have smaller MSE than LR, which means that LRI and NN are more accurate than LR, these independent parameters have internal interactions. • After verification, the errors between the real and target dimensions are negligible; the accuracy of the prediction by NN is acceptable. • For NN that more hidden layers can be added to develop deep model that better capture complex behavioral patterns within the data leading to better prediction accuracy. Our results support this claim since the NN gave the best results.