Optimization of fused filament fabrication system by response surface method

Fused filament fabrication (FFF) is a 3D printing or additive manufacturing method used for rapid prototyping and manufacturing. The characterization and optimization of process parameters in FFF is of critical importance because the quality of the specimens produced by this method substantially depends on the appropriate setting of various significant factors. In this study, the FFF printing process using acrylonitrile butadiene styrene (ABS) as the filament material was investigated for the optimization of significant factors in the process. Three potential factors, namely nozzle temperature, bed temperature, and printing speed, were included in this study as the inputs, while surface roughness of the specimens was considered as the output. Roughness measurements were made on the flat surfaces at the top and bottom of the specimens. As the ranges for optimal factor settings were recommended by the manufacturer, the Box-Behnken design, which is a response surface method (RSM), was utilized in this study. In each treatment, two replicas of the test specimens were used for the confirmation test. The results of the statistical analyses indicated that the bed temperature and the printing speed had a significant impact on the surface roughness. Another finding was that there was a non-linear relationship between the bed temperature and the surface roughness. The optimal settings for the factors arrived at in this study can serve as guidelines for the practitioners to achieve the highest performance when they use FFF with ABS filaments.


Introduction
Fused filament fabrication (FFF) or fused deposition modeling (FDM) is a manufacturing technique that is commonly known as three-dimensional (3D) printing process. In this process, a filament made of different types of materials is melted and extruded through an extruder onto a print bed. Specimens are built by depositing the melted filament, layer by layer, and the profile is formed using a computer-aided design (CAD) model imported into the program and linked to the FFF system. The qualityrelated characteristics of the specimens include mechanical properties, as well as the surface finish. The surface roughness is a critical property that characterizes the surface finish. There are many factors, e.g., nozzle temperature, bed temperature, printing speed, and layer height, which can impact this property. Therefore, it is essential to quantify the effect of the settings of these factors on the response, i.e., the surface roughness, so that the practitioners can efficiently utilize such a system to achieve the best possible performance.

Literature review
Based on the existing literature, there are three critical issues related to the performance optimization of an FFF system. The first of these is the utilization of an appropriate method to optimize the response, while the second one is the detailed study of factors affecting the surface quality of the specimens. The third issue is the application of a chemical solution to further improve the surface quality. The literature review presented here will address and discuss these three issues.
As for the response optimization of FFF systems, there are different methods, namely, the design of experiments, the response surface method (RSM), and machine learning, which are widely applied for process optimization in fabrication processes. Vahabli and Rahmati [1] applied a radial basis function (RBF) based neural network to predict the surface roughness of parts produced from an FFF system when the surface build angles were varied. Chang, Kim, and Lee [2] utilized two different design of experiment methods, namely 2 3 and 3 2 factorial designs to optimize model temperature, layer thickness, and part fill style. The response variable in their study was the surface roughness of the ABS specimens. Luzanin, Movrin, and Plancak [3] applied 2 k factorial design to determine the effect of system inputs, i.e., the extrusion temperature and extrusion speed, while surface roughness was the output. The filament material used in their study was polylactic acid (PLA). Galantucci, Lavecchia, and Percoco [4] used the central composite design (CCD), which is a specific type of RSM to optimize the surface roughness. An important finding from them was that the surface quality was significantly improved by immersing the test pieces in dimethyl ketone-water solution. Peng, Xiao, and Yue [5] integrated a second-order RSM with a fuzzy inference system to optimize the parameters in the FFF process. In their study, the input parameters were compensation, extrusion velocity, filling velocity, and layer thickness, while the responses were dimensional error, warp deformation, and building time.
Another important issue related to FFF is the determination of significant factors and their effects on the characteristics of the fabricated specimens. Many studies were conducted on surface quality, which is one of the essential characteristics. The objective was to establish a relationship between the input factors and the surface roughness. Durgun and Ertan [6] investigated the quality of the specimens, and the responses were the surface quality and two mechanical properties, namely, tensile strength and flexural strength. The input factor was the raster angle which was varied at different levels. The output responses were optimized by finding the most appropriate setting of the raster angles. Boschetto, Bottini, and Veniali [7] developed a method to improve the surface quality. Their newly developed methods were categorized as indirect and direct methods. The indirect method focused on two stages, i.e., the surface requirement input stage and the solution finding stage. On the other hand, the direct method covered the input of the process parameters and the surface quality prediction. The material used in their study was ABS, and the input factors were layer thickness and deposition angle. Boschetto, Giordano, and Veniali [8] also studied the relationship between the part geometry and its setting parameters on the surface roughness. Sood, Mahapatra, and Ohdar [9] conducted an experimental study on the effect of five factors À layer thickness, orientation, raster angle, raster width, and air gap, on the surface roughness. The experimental method used by them was the CCD. Garg, Bhattacharya, and Batish [10] investigated the effect of two factors À part orientation and raster angle, on the surface roughness of the parts, which were produced with ABS filaments. Ayrilmis [11] found that the height of the printing layer had a direct effect on the surface roughness of the test pieces made from PLA. Their results pointed out that the average surface roughness was significantly improved when the height of the printing layer was decreased. Rahman, John, Sivadasan, and Singh [12] applied the Taguchi design method for the design of experiments to determine the appropriate settings of six input factors À bed temperature, nozzle temperature, print speed, infill, layer thickness, and the number of loops. The surface roughness was the response variable. Tlegenov, Hong, and Lu [13] monitored the nozzle condition to minimize the clogging which had a direct effect on the surface roughness. To conduct their experiment, a vibration sensor was installed in the system. Hanus, Spirutova, and Beno [14] applied the method of deposition modeling for constructing a rapid prototype of a foundry and the focused response was the surface quality, which was measured in the form of average surface roughness. The material used in their experiment was ABS. The surface roughness was assessed in different conditions, including sandblasting and etching.
Another method to improve the quality of surface finish is the treatment of specimens with a chemical solution. Numerous research studies were conducted to study the effect of chemical treatment on the specimen characteristics. Kuo and Mao [15] developed an acetone-vapor polishing system to smoothen the surface of fabricated ABS parts. Their experiments showed that the surface finish was significantly improved, especially when the orientation of the parts was complex. Jayanth, Senthil, and Prakash [16] reported on the positive effect of two chemicals, acetone and 1,2-dichloroethane, on the surface quality of ABS samples. Their results showed that the chemical treatment significantly reduced the surface roughness of their samples. The vapor smoothing technique was utilized by Zhang, Han, and Kang [17] to improve the surface quality of test samples made from ABS. Their results signified that the surface roughness and other mechanical properties were improved after the treatment.

Research gap and objectives
There have been numerous studies focused on the characterization of FFF systems with surface roughness as the response variable. From the literature, it can be observed that in these studies, the experimental design method was primarily limited to 2 k factorial design or Taguchi design. These approaches were basically meant for screening and not for optimization. Moreover, the literature study also points out that the CCD was also a commonly used RSM in many studies. However, the downside of this method is its high consumption of computational resources and time because five levels of testing are required for each treatment. Furthermore, in these studies, as the operational ranges of the factors were recommended by the manufacturers, the axial points outside the range or testing at extreme conditions was not required. Therefore, another RSM, namely, the Box-Behnken method, was utilized in this study, as it requires fewer runs than the CCD. Three factors, namely, the nozzle temperature, bed temperature, and printing speed, were selected as the inputs because of their significant influence on the surface roughness as established in the literature.

Fused filament fabrication (FFF)
FFF is a fabrication method in which a thermoplastic filament is melted and fed through an extruder onto a print bed. The extruder is controlled by a computer program and it is moved to create a designated shape by depositing the filament, layer by layer. Different types of materials, such as acrylonitrile butadiene styrene (ABS) and polylactic acid (PLA), are used as filament materials. The schematic of an FFF system is shown in Figure 1.

Surface quality
One of the most critical characteristics of the test specimens is the surface finish quality. The surface finish is quantified and measured in the form of average surface roughness (Ra), as shown in (1). Along the travel-length of the measurement, the distances from the mean line to each peak of the groove are measured and averaged. Figure 2 graphically illustrates the calculation example of Ra.
where n is the number of points measured, L is the travellength, and Z i is the deviation from the mean line of the surface texture (mm).

Box-Behnken method
The Box-Behnken design is one type of RSM. In this method, in addition to the treatments being set at the low and high levels (À1 and 1), the center point at the coded level of 0 is also included in the design. As a result, the Box-Behnken design is capable of explaining the quadratic effect in the response. In Figure 3, the design of the threefactors experiment is graphically represented. The one-unit cube with the colored dots illustrates the design points of each treatment at different coded levels.

Test specimen
The test specimen in this research was built following the ASTM D638 standard (type IV, dumbbell shape), which was actually a specification for testing the tensile strength of specimens. The thickness of the test specimen was 3.2 mm and its overall length and width were 115 and 19 mm, respectively. However, the objective of this experiment was the investigation of the surface roughness and hence, the focus of measurement was on the flatness.
As there was no specific standard for specimens to be tested for surface roughness, the aforementioned standard was applied to assess the surface quality in this study. The solid model of the test specimen shown in Figure 4 was built in the form of a .stl (standard tessellation language) file and imported to a slicer software. The 3D model was sliced into layers and turned into a G-code before being exported to the FFF system.

Factor settings and experimental conditions
To fabricate the test specimens, the infill density used was 10% with the rectilinear infill style. Each specimen consisted of eight layers of the fused filament and the height of each layer was 0.3 mm. There were three layers each in the bottom and top surfaces while the middle part had two layers. In this system, there was a single extruder with a nozzle diameter of 0.4 mm. The filament was made of   ABS and its diameter was 1.75 mm. The printing conditions were recommended by the filament manufacturer and are described in Table 1.
To prepare for the fabrication, the heat bed of the system was covered by a print bed tape (sheet type) supplied by the system manufacturer. White glue (UHU glue stick) was also lightly applied on the surface of the tape to prevent warping, while the filament was deposited on the surface (Fig. 5).
Because this study was focused on the effect of nozzle temperature, bed temperature, and printing speed on the surface quality, the other parameters were kept constant. Next, an empirical study was carried out and the Box-Behnken design was selected. The standard design matrix is shown in Table 2; there are three levels (À1: low, 0: center, and +1: high) for each input factor.

Surface roughness measurement
As mentioned earlier, the surface roughness was the response variable in this experiment, as it represents the quality of the surface finish. The average surface roughness (Ra) of the test specimen was measured by using a surface roughness tester (Times model TR-100), which is a contact-type surface roughness measurement instrument, with a stylus that makes direct contact with the surface of the test specimen. The test specimen, tester, and measuring point are shown in Figure 6.    Figure 7. Based on the position of the surface measured, the analyses were categorized into two cases, top and bottom surfaces. Table 3 shows the design matrix and the responses for the bottom surface. Here, the first two columns list the order of the standard and actual runs. Two responses, Ra 1 and Ra 2 , were assigned to represent the two replicas of each treatment.

Bottom surface
The ANOVA of the first set of replicas, Ra 1 is illustrated in Table 4, while the ANOVA of the second set of replicas, Ra 2 is shown in Table 5. The results from Tables 4 and 5 reveal two important findings regarding the lack-of-fit and significant factors. Firstly, when the significant level was set to 0.05, the p-value of the lackof-fit from the two tables suggests out that the lack-of-fit   terms were not significant (0.089 and 0.1951); therefore, there is a low probability that a lack-of-fit occurred. Secondly, only the bed temperature (B) and printing speed (C) had significant effects on the surface quality, as their pvalues were less than 0.05. Thirdly, the p-values of model terms were 0.0033 and 0.0102, so the regression models (including B and C) were adequate to explain the responses, Ra 1 and Ra 2 .
In conclusion, the results from ANOVA in Tables 4 and 5 specify that bed temperature (B) and printing speed (C) were explanatory variables included in the models. Therefore, the multiple linear regression model was used to fit regression lines for surface roughness, Ra 1 and Ra 2 , as shown in (2) and (3). After the significant factors were identified, the model adequacy checking was carried out. The objective was to check that the residuals of the proposed model satisfied the assumptions. This result implied that the computed model could explain the relationship between the input factors and the response. The normal probability plots of the residuals are shown in Figure 8. As their pattern followed a straight-line, it can be inferred that the residuals were normally distributed with no outliers.
When the nozzle temperature and the printing speed were set to 215°C and 90 mm/s, respectively, the main effect plot of the bed temperature in Figure 9 points out that the average surface roughness at 80°C was significantly lower than that at 90°C. Therefore, based on the manufacturer's recommended range, the bed temperature should be set at 80°C to achieve the lowest surface roughness.
Another finding is depicted in the main effect plots of the printing speed (Fig. 10), wherein the nozzle temperature and bed temperature were set at 215 and 85°C, respectively. From Figure 10, it can be seen that the average surface roughness at a printing speed of 120 mm/s is significantly higher than that at 60 mm/s.

Top surface
For the analysis of the top surface, Table 6 illustrates the design matrix and the response. The surface roughness of the top surface was measured as Ra 3 (for the normal run) and Ra 4 (for the confirmation run).
The ANOVA of surface roughness values Ra 3 and Ra 4 (Tables 7 and 8) signifies that there is a low probability that a lack-of-fit occurred as the lack-of-fit terms were not significant (p-values = 0.4044 and 0.0573 for Ra 3 and Ra 4 , respectively). The results indicate that the bed temperature (B) and the printing speed (C) had significant effects on the quality of the top surface. Moreover, as the term B 2 was significant, it implied that there was a curvature in the response. As a result, factor B was automatically included  Tables 7 and 8 indicated that the regression models included bed temperature (B), printing speed (C), and a quadratic term (B 2 ). The regression models for surface roughness, Ra 3 and Ra 4 , were formulated in (4) and (5), respectively.
The residuals of the predicted model were used to construct the normal probability plots (Fig. 11). As the pattern of the points followed a straight line, it could be inferred that the residuals satisfied the assumption of the model. Figure 12 depicts the main effect plots of B 2 on the response (Ra 3 (left) and Ra 4 (right)) when the nozzle temperature and printing speed were set to 215°C and 90 mm/s, respectively. From these two plots, it can be noticed that there was a curvature in the response. Moreover, they also show that the surface roughness was the lowest when the bed temperature was at the middle of the range (i.e., 85°C).  However, when the nozzle temperature and the bed temperature were set to 85 and 215°C, respectively, the main effect plots of the printing speed in Figure 13 illustrate similar results as in the case of the bottom surface. In other words, the surface roughness was low when the printer worked at a low speed.

Validation results
The validation was conducted with a test specimen at the following conditions: nozzle temperature = 200°C, bed temperature = 80°C, and printing speed = 60 mm/s, which were within the design space. The surface roughness was measured and compared with the results from the predictive model. The validation results in Table 9 show a comparison of the observed and predicted responses and they reveal that there was no significant difference between the two. Therefore, the predictive model can be considered adequate to explain the surface roughness of the specimen.

Conclusions and discussions
In this study, an FFF system with an ABS filament was used to fabricate the test specimens. Initially, the input factors were screened and the significant factors among  them were identified. Next, the quantification and optimization of these factors was conducted to achieve the lowest surface roughness. The surface roughness was measured at the top and bottom surfaces. For each treatment, two replicas of the specimens were fabricated for normal and confirmation runs. The common observation from both the bottom and top surfaces was that two factors, i.e., bed temperature and the printing speed had significant effects on the surface roughness. For the bottom surface, the printing speed was set at the lowest level (60 mm/s) to obtain the lowest surface roughness. However, for the top surface, the bed temperature was set in the middle of the range (85°C), as the relationship was quadratic. Therefore, the optimized setting of the bed temperature depended on the type of the surface that the practitioners focused on. For a future research study, it may be interesting to explore the information outside the range recommended by the manufacturer. Moreover, another response surface method, CCD may be an alternative option of design as it includes the axial points in the design. In terms of the input factors, the layer height may be included in a future study to quantify its effect on the surface roughness.