3D Printing of Acrylonitrile Butadiene Styrene by Fused Deposition Modeling: Artificial Neural Network and Response Surface Method Analyses

Additive manufacturing of acrylonitrile butadiene styrene (ABS) was investigated based on statistical analysis via an optimization method. The present article discusses the influence of the layer thickness (LT), infill percentage (IP), and contours number (C) on the maximum failure load and elastic modulus of the final product of ABS. ABS is a low-cost manufacturing thermoplastic that can be easily fabricated, thermoformed, and machined. Chemical, stress, and creep resistance is all excellent in this thermoplastic material. ABS combines a good balance of impact, heat, chemical, and abrasion resistance with dimensional stability, tensile strength, surface hardness, rigidity, and electrical properties. To comprehend the impact of additive manufacturing parameters on the build quality, both artificial neural network (ANN) and response surface method (RSM) were used to model the data. The main characteristics of the build considered for modeling were ultimate tensile strength (UTS) and elastic modulus. Main effect plots and 3d plots were extracted from ANN and RSM models to analyze the process. The two models were compared in terms of their accuracy and capability to analyze the process. It was concluded that though ANN is more accurate in the prediction of the results, both tools can be used to model the mechanical properties of ABS formed by 3D printing. Both models yielded similar results and could effectively give the effect of each variable on the mechanical properties.


Introduction
Since the dawn of rapid manufacturing, additive manufacturing (AM) has become one of the remarkable and popular ways of fabrication in the manufacturing world. AM is a method in which engineers can create models by adding successive layers of feedstock material adhered together (Ref 1). Fused deposition modeling (FDM) is a solid-based rapid prototyping technology by which a sample is created by successive deposition of polymeric layers from a print head ( Ref 2). The schematic of 3D printing by fused deposition modeling is shown in Fig. 1 (Ref 3). FDM offers several advantages such as low machine costs, mold dimension accuracy, and time savings (Ref 3). Owing to its advantages, FDM is widely used in manufacturing areas to contribute to improvements in the design and commercialization of products (Ref 4). The required low temperature, the ability to be solidified fast, and the inverse correlation between temperature and viscosity make the amorphous polymers good candidates in FDM ( Ref 5).
A large number of FDM processes were investigated by artificial intelligence techniques, design of experiment (DOE), or evolutionary algorithm to study the effect of FDM parameters on the build quality ( Ref 6). Some of these parameters, such as material density, fill density, and extrusion temperature, were investigated to see how they affected the mechanical properties of different materials, including acrylonitrile butadiene styrene (ABS), polyethylene terephthalate glycol (PETG), and multi-materials ( Ref 7). Understanding the correlation between process parameters and the component properties is an effective approach to optimize the process ( Ref 8). Response surface method (RSM) is a widely used tool to correlate the process parameters with the component properties ( Ref 9). The regression model obtained by this method provides this opportunity to optimize the process. Artificial neural network (ANN) (Ref 10) and genetic algorithm-artificial neural network (GA-ANN) were also utilized to optimize the procedure ( Ref 6). Results indicated that there is a fundamental relation between the tensile strength, extrusion temperature, and infill density (Ref 8). The processing parameters including extrusion or nozzle temperature, infill density, and infill pattern are believed to affect strongly feature qualities, mechanical properties, and build time of the ultimate part (Ref 5). The important role of layer thickness, infill percentage, and extruder temperature was reported by Moradi et al. (Ref 11,12). The objective of the optimization can vary from case to case. For example, obtaining a high maximum failure, shortening the build time and part weight was the main objective of the investigation performed by Moradi et al. (Ref 13). It was reported that the layer thickness and infill percentage were the most influential parameters in determining the failure load, build time, and part weight ( Ref 14). Moradi 17) considered bed and nozzle temperature, print pace, infill percentage, thickness, and the number of loops as input parameters to improve circularity and surface roughness of a grinder blade made of acrylonitrile butadiene styrene (ABS). In another study, the Taguchi method was used to achieve the optimal process parameters, and this improved the surface quality in the XY and XZ planes ( Ref 18). In addition to the aforementioned parameters, void and raster orientation affect the quality of the build ( Ref 19).
Demands on special mechanical properties of the build necessitate the regulation of the FDM parameters ( Ref 20,21). It is also important to know the effect of process parameters on the build quality. ANN is a strong tool to model the processes (Ref 22,23). The RSM is regarded as a modeling process used by experimental research to evaluate the efficiency and the effect of the parameters. In the present study, both ANN and RSM were used to model and investigate the effects of contour numbers, infill percentage, and layer thickness on strength and modulus. Regulating controlled variables to produce tough ABS + specimens, reducing part weight, and minimizing build time of the printing parts were the main objectives (Ref 24). The details of such measurements are provided in reference ( Ref 25). Tensile tests were used to determine the maximum failure load and elastic modulus. The output data were used along with the input parameters to establish a model by using an artificial neural network ( Ref 26). Validation of the obtained model was confirmed by using some untrained data, named test series (Ref 27).

Methodology and Experimental Work
ABS is a three-monomer amorphous polymer made up of acrylonitrile, butadiene, styrene, and an opaque and oil-based thermoplastic. What contributed ABS to be a popular material is its versatility. ABS' products can be used in a variety of domestic, industrial, and specialist settings all over the world. Chemical and thermal stability is provided by the acrylonitrile in ABS, while hardness and strength are added by the butadiene. The styrene gives the finished polymer a nice, glossy finish. ABS has a low melting point, allowing it to be used in injection molding and 3D printing with ease. It also has high tensile strength and is chemically and physically resistant, allowing the finished plastic to withstand heavy use and harsh environmental conditions. ABS has been instrumental in the growth and development of 3D printing. ABS parts are inexpensive and simple to mold into the desired shape and effect. ABS can be heated and cooled multiple times which makes it an environmental material. It is considered to have a very high impact, tensile strength, and aesthetic qualities. It is also a cost-effective material and easy to use for fabricating complex shapes without extra effort.
ABS 3D printing specimens were obtained by fused deposition modeling (FDM). The performance of the 3D printer is easy to be tracked and can be adjusted accurately. Therefore, simplify 3D was used to adjust the specimensÕ parameters. Based on international standard ISO 527-2, the tensile sample was designed by Solidwork software and imported to Simplify 3D. Table 1 shows the considered independent variables. 17 samples were printed in diverse settings mentioned in Table 2 and drawn on a design of experiment to scrutinize the effects of input parameters distinctively. Material properties are men-  tioned in Table 3. Table 4 shows the assigned parameters which are identical for all experiments. Moreover, Fig. 2 represents the geometrical dimensions and internal patterns of samples. The filament was carried by two rollers, and thereafter, a heating element melted the material by designating three input parameters. Then, the pressure by the rollers was applied to drive the material and deposit the first layer. By moving the platform down, the nozzle printed the next layers. Tensile test results were used to determine the maximum failure load and elongation at break. Tensile tests were performed in accordance with ASTM D638 in a universal testing machine. The brittle fracture of a sample is presented in Fig. 3. Based on the results, the samplesÕ behavior could be categorized as a brittle or tough fracture. The brittle samples fracture at the elastic limit, while the tough specimens experienced a low degree of plastic deformation before fracture.

Methodology of Data Analysis
ANN is a robust tool for analyzing the data that can relate the input parameters to output responses. ANN has a structure like neurons that these neurons are correlated with each other by a transfer function. Variables, treated as neurons in a 1st layer, are connected through a transfer function to several neurons that are set in a hidden layer. The hidden layer is also connected to the output with a transfer function. Figure 4 depicts the ANN structure. In the present research, the input parameters (first layer) are the experiment parameters, i.e., contour numbers, thickness, and infill percentage. The outputs are UTS and modulus. To train the model by ANN, some data were randomly selected as training data series (85% of data) among which some were considered for validation of the training process to avoid overfitting. Finally, the rest data which were not included in the training stage were selected as test data sets to assess the accuracy of the model. The modelÕs ability to predict new experimental conditions is evaluated using these results. In this analysis, 70% of the data were chosen as a training series, 15% as a validation series, and 15% as a test series. Up to two hidden layers and different numbers of neurons (5-15) and different types of transfer functions (logsig-tansif-linear) were chosen to train the model. After a sufficient number of runs, the optimal ANN was discovered, ensuring that the error achieved in the prediction of the test data series was minimum. Matlab software was used to carry out the whole process.
To figure out how important each variable is in determining the outputs, main effects plots were drawn based on the data generated by the neural network model. If the number of data increases, the precision of the main effect plots improves. Furthermore, to obtain the interaction plots, enough combinations of data are needed. When there are three variables and four levels, the required number of data combinations is 4 3 = 64. To put it another way, a factorial design is needed, which takes time to complete all the tests. With only a limited number of experiments, ANN can produce all of the required data. Since an accurate ANN model can predict the performance for any combination of variables without having to run experiments on certain variables, itÕs a great way to save time.
To make sure that the ANN model is accurate, it is necessary to perform a rational design of experiments. The design of experiments in regular regression methods such as the RSM is extremely reliable because they cover the required range of all variables through a minimum of experiments. The simple  quadratic functions are potent to make a regression over the range of variables with acceptable accuracy. ANN is capable of doing this regression with much higher accuracy. In this study, a central composite design method was used to design the experiments. The essential data were created by the obtained model after obtaining an accurate ANN model. Following, the produced data were used to create main effects and interaction plots. The input variables and their coded and uncoded levels are presented in Table 5.
RSM is a structured and arranged method to identify relationships between factors affecting a process and the output of the process. Design-Expert V8 software was exploited for statistical analysis of experimental data via RSM (Ref 28-30). Finally, main effects plots were generated by the obtained ANN and RSM models to assess the trends of influence of each variable on the characteristics of the obtained ABS +.

Results and Discussion
The results of the experimental work are provided in Table. 2. For each output, a separate ANN model was considered, as this makes the model more accurate. The chosen ANN models have an accuracy of more than 90% in the prediction of the untrained data. The accuracy is obtained from the relative error (e) which is obtained from: where G target and G output are the expected output values and the values obtained by modeling, respectively. ''n'' is the number of data. The ''root mean square error'' (RMSE) is another criterion used to assess the model accuracy and is obtained from: The correlation coefficient (R) is a measure of the linearity of target and output values and is obtained from: It is most desirable that R be close to 1. The optimum ANN models obtained for each output and the corresponding error, for both preparation and testing, the root mean square error and correlation coefficient, and test data series are provided in Table 6.

UTS Modeling
The results of the ANN model plotted as the target values versus output values are presented in Fig. 5(a) and (b) for training and test data series, respectively.
The main effects plot for UTS is shown in Fig. 6. Among the three variables, the contours number has the most effect on the UTS, and with increasing the contour number, the UTS increases. The same trend is observed for the two other variables but with a lower effect. The main effect plots obtained from RSM modeling are presented in Fig. 7. The same trend as ANN can be observed here.
3D plots of UTS versus the contour numbers and thickness are presented in Fig. 8. The plots correspond to 3 levels of infill percentage. The highest UTS is obtained at maximum contour numbers, maximum thickness, and maximum infill percentage.
3D plots obtained by RSM modeling are provided in Fig. 9. Likewise ANN modeling, the contour number has the main effect on UTS, and by increasing the contour number, the UTS is improved. The infill percentage does not affect the UTS. By increasing the layer thickness, the part thickness is divided into a fewer number of sections, and therefore the specimen printed by a thicker layer consists of less interlayer adhesion than a specimen with a thinner layer. Therefore, increasing layer thickness directly results in less interlayer adhesion. Also, the thicker layer causes a lower heat transfer rate which results in improving interlayer adhesion. That is why the printing of specimens with a thicker layer ends up with tougher properties. Increasing the contours similar to increasing the infill density increases the failure force.   Based on both RSM and ANN models, the trend of the effect of contours number is dependent on the infill percentage. Table 7. In the analysis of variance, the alpha value in F value is considered to be 0.05, which indicates that if the probability of P in the analysis of variance is less than 0.05, the relevant parameter with a probability of more than 95% is effective.

The analysis of variances by RSM modeling is provided in
Also, the values of R indicate the good accuracy of modeling by RSM. The interaction between contours number and the infill percentage is obvious from this equation.

Modulus
The results of the ANN model plotted as the target values versus output values are presented in Fig. 10(a) and (b) for training and test data series, respectively. Figure 11 shows the main effects plot according to ANN modeling. The contour numbers and infill percentage have similar trends, and the modulus is increased as they increase. The effect of the thickness is negligible.   Figure 12 shows the main effects plot obtained by RSM modeling. The trend of contours number and layer thickness is similar for both RSM and ANN modeling. A slight difference in the case of infill percentage is observed for the two models. While the ANN model predicts that the modulus increases with infill percentage, the RSM model predicts a decreasing trend at the high values of infill percentage.
The 3D plots obtained by ANN modeling are presented in Fig. 13. A strong interaction exists between contour numbers and infill percentages at their highest values. When the infill percentage is high, the increase in contour numbers results in a steep increase in modulus. In other words, the highest modulus is obtained when the infill percentage and contour numbers are at their highest level. The 3D plots obtained by RSM are presented in Fig. 14. Both RSM modeling and ANN modeling infer that by increasing the infill percentage the elastic modulus is increased. Also, the ANN model states that the effects of infill percentage and contour numbers are correlated, and the effect of contour number is higher at a higher infill percentage. This correlation is not obvious in 3D plots obtained by the RSM model. Also, both models show that the thickness has the lowest effect on modulus.
The analysis of variances by RSM modeling is provided in Table 8. In the analysis of variance, the alpha value in F value is considered to be 0.05, which indicates that if the probability of P in the analysis of variance is less than 0.05, the relevant parameter with a probability of more than 95% is effective.     The coefficients in the regression equation for coded values are indicative of the importance of each variable. In this case, according to the above equation, the contour number has the most influence on the elastic modulus.
To have a comparison between ANN and RSM, the values of R obtained for prediction are presented in Table 9. According to this table, the accuracy of prediction obtained by the ANN model is higher than the one obtained by RSM, especially for the prediction of modulus. This is attributed to the fact that in RSM a simple regression is used while in ANN a complex relationship is established during training between the inputs and outputs. This is achieved by the selection of the right weight function and choosing the optimum coefficients during the training.
According to Table 9, the ANN resulted in more precise modeling of both UTS and modulus than the modeling by RSM, though the difference is negligible. The drawback of ANN modeling is that a huge number of data are needed to accurately model the process.

Conclusions
Improving mechanical properties to minimize component weight and build time as much as possible was the researchÕs final goal to investigate fused deposition modeling of ABS. By ANN and RSM, the effects of layer thickness (LT), infill percentage (IP), and contour numbers (C) on UTS and elastic modulus were investigated, and the following results were obtained: 1. The results indicated that as the contour numbers increase, the mechanical properties (maximum failure load) improve. 2. The contours number plays the most effective role in the specimensÕ improvement compared with layer thickness and infill percentage. 3. The mechanical properties of the structure depend slightly on the layer thickness, which indicates that a part can be fabricated fast by increasing the layer thickness without any influence on the build properties. The elastic modulus was mainly dependent on the infill percentage. 4. The results of both RSM and ANN stated that the mechanical properties of the build can be controlled by changing the process variables individually, as the interaction between the variables is negligible. A slight interaction between infill percentage and contour numbers was observed in the case of UTS which according to both models can be neglected at lower values. 5. The R value obtained in ANN modeling was higher than the one obtained in RSM modeling, indicating a more reliable prediction by ANN, though the difference was not considerable. 6. Both ANN and RSM can be used to model the mechanical properties of ABS produced by additive manufacturing. These models are effective tools in understanding the effect of each variable on the properties of the final part.

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://creativecommons.org/licenses/by/4.0/.