Mechanical Strength Optimization for the Polylactic Acid Printed Parts in Material Extrusion Process Using Artificial Neural Network

the process parameters for maximum strength. The full factorial design experiments found that higher strength is achieved at higher temperatures, extrusion width, and number of shells. Based on the Analysis of Variance (ANOVA), the most influential parameter on tensile strength was printing temperature with (44.2%). in the other hand, the extrusion width contributed more than others to compressive strength (51.3%). Comparisons between the experimental and the predicted values were illustrated.The mean error between the experimental and neural network models was (0.42%) for tensile strength and (0.45%) for compression strength, with a correlation coefficient equal to (0.996) and (0.992) for the two responses, respectively. The current proposed study demonstrates good agreements between the predicted model values and the experiment outcomes of tensile and compressive strengths.


Introduction
Remarkable developments in various AM processes help us manufacture mechanical parts without using traditional tools and dies [1,2].Unlike the conventional methods, where we remove material to produce a component, all the additive manufacturing (AM) techniques are based on material addition techniques where the entire component is built layer by layer [3,4].The material extrusion process (MEX) is a better and widely used technique among all standard 3D printing techniques [5].It is not only used to produce visual aids, conceptual models, and prototypes but it is also used to produce functional parts such as drilling grids in the aerospace industry and edentulous mandible trays.
This process uses heat to extrude the filament from a narrow nozzle with approximately ranges (0.36 -0.6 mm) in diameter for building the part [6].The nozzle moves in a computer-controlled path during the material extrusion for the successive layers of the object in a similar manner to the tool movements in CNC machines.Generating the toolpaths for the nozzle movements and other functions created by software (slicer) based on the CAD data for the object [7].The thermoplastic filament is continuously supplied from a spool for building the part layers.During the uniform feeding of the filament, the heating element inside the printing head changes the material to a semi-liquid state.Liquefying the material helps in extruding the material from the nozzle to the print surface [8,9].Figure 1 shows the main elements of the process.Fabricating a good quality part that meets the requirement is essential for product marketing [10].The main elements in the Material Extrusion process [11] The process has various factors that significantly affect printed parts.Achieving the required quality and the preferable characteristics is obtained by choosing the optimal combinations of these factors.Using a proper material also greatly impacts meeting the required [12,13].
Based on the related works, many studies pointed out that mechanical strength plays a critical role in the quality of the parts.Srinivasan et al. [14] investigated the influence of varying the layer thickness, infill pattern, and infill density on the tensile strength and hardness of the ABS material.They found that layer thickness and infill density are the most important parameters.Chockalingam et al. [15] developed a Fuzzy-Logic model for predicting the hardness, tensile, and compression strengths using three printing parameters: infill density, number of shells, and layer thickness.To obtain maximum compression strength, Boesch et al. [16] used the Taguchi design of experiments to optimize three FDM parameters: infill percentage, infill pattern, and layer height.Their study showed that infill percent has the most influence on experimental outcomes.
Kumar et al. [17] investigated the influence of process parameters like layer thickness, printing speed, and printing temperature on the tensile and flexural strength of MEX-processed PLA parts using the Taguchi-CRITIC embedded WASPAS approach.Their analysis showed that increased printing speed and temperature decreased the specimens' flexural strength due to the lack of sufficient time for the bonding of interlayers.It is also evident that the higher printing speed causes porosity and fracture formation, resulting in poor bending strength.Rajpurohit and Dave [18] presented an investigation study for the impact of raster width, layer thickness, and raster angle on tensile strength using PLA material.Their result analysis showed that the three factors significantly affect tensile strength, and the interaction between raster width and layer thickness that play a critical role.
In recent studies, Artificial Neural Network (ANN) has been used in various subjects.Artificial Intelligence (AI), as well as machine learning models, are used in other research to develop a predictive algorithm for the process outputs [19,20].According to the literature, the most analyzed process parameters were infill density, layer height, air gap, raster, and building orientations.However, the performed studies for analyzing the impact on compression strength are still limited; further investigations need to be undertaken to analyze the influence of other factors, such as extrusion temperature, shell width, printing speed, infill pattern, etc., on compressive strength [8,21].This research attempts to address this issue.So, this paper uses neural network models to optimize the tensile and compression strengths using three process parameters: printing temperature, extrusion width, and different shell numbers on PLA material.The term extrusion width includes the width of the inner and outer wall line, the top/bottom line, and the infill line.

Methodology
Three levels for each parameter have been selected to clarify the impact of the printing temperature, extrusion width, and the number of shells on the tensile and compression properties of the printed parts.Table 1 shows the considered variables of the process and their values.A full factorial design of the experiment was employed to conduct experiments for getting inputoutput data.A total of 27 combinations were selected using Minitab software to conduct the experiments to obtain the tensile and compression values for the corresponding tests.Figure 2 shows a flow chart for the work progress.Step-by-step, the processes of the work progress

Specimens Preparation and Testing
Based on the ASTM standards, the specimens were designed using (D638-I) and (ASTM 695) standards for the tensile and compression test by SolidWorks software.After modeling the parts, the CAD files are exported in STL format to enable the slicer software to read and slice the models.Cura 5.3 software is the tool for slicing the CAD models into successive layers, creating supporting structures, specifying printing variable values, and virtually locating the object within the printer surface.Saving the part as a (G code) file is necessary to enable the 3D printer to read the file and create the intended shape.Figure 3a shows the CAD model design for the tensile and compression specimens, and the sliced models were clarified in Figure 3b.
The specimens have been printed using Polylactic Acid (PLA) material on (Creality-Ender 3 pro) printer depicted in Figure 4a showing the printing process.The final printed samples for the tensile and compression test are shown in Figures (4b and 4c) respectivily.The specimens have various combinations of the three sets of variables.
The tensile test was performed for the printed specimens from Polylactic acid (PLA) material.This material is good for lowcost rapid prototyping, accurate and vivid models, props, pastry molds, and containers.In the automotive industry, PLA is frequently used to print tools, jigs, and fixtures [22].The tensile tests have been carried out for the samples using a tensile machine (universal testing machine, Model: WDW-50) illustrated in Figure 5a.The specimens are gripped by the upper and lower jigs, as shown in Figure 5b, and then they are slightly pulled with the crosshead speed of (5 mm /min) until the specimen breaks.In addition to the tensile test, compressive strength is assessed by subjecting the specimens to compressive loads.The same steps were followed in tensile testing, except applying compressive loads is implemented in compression tests as shown in Figure 5c.The tests proceed at the cross head of (5 mm /min) until the specimens start deforming significantly or an exceptional failure is observed.

Artificial Neural Network Model
The feed-forward networks have several neurons in their layers, which are arranged sequentially.The outputs of one layer are inputs to the next layer neurons.These layers are characterized by their activation function and neuron number [23,24].Network training is a process that adjusts the networks' weights to reach the minimum error between the network output and the target, the experimental data.The most common algorithm used to train neural networks and adjust weights is the Backpropagation algorithm [25,26].
Using the obtained data from the tensile and compression tests that were conducted based on the full factorial design of experiments, the ANN model has been trained between input and output parameters.The input layer consists of three neurons, i.e., printing temperature (T), extrusion width (W), and several shells (Sh) with (27 × 3) matrix of data matrix have been imported in the neural fitting tool as shown in Figure 6.The output layer has two neurons, i.e., tensile strength (TS) and Compression strength (CS) of the (27 × 2) matrix of data.
The tangent sigmoid activation function has been used for each layer, and a feed-forward back-propagation network has been created.70% of the sample has been used for training, 15% for testing, and 15% for cross-validation.The back-propagation training algorithm based on the Levenberg-Marquardt algorithm trains these networks.Marquardt algorithm is the fastest method for training moderate-sized feed-forward neural networks (up to several hundredweights) [27].

Testing Process Variables' Influence on Tensile and Compression Strengths
The aim of conducting the experimental runs and tests was to estimate the tensile and compression strengths.Table 2 lists the results of the experiments for the two responses.From the result, it can be found that maximum tensile and compression strengths (74.93 MPa) and (67.43 MPa), respectively, are obtained at printing temperature (210 °C), extrusion width (0.64 mm), and number of shells (4).At high printing temperatures, the successive layers' tendency to bond and attach is higher.Furthermore, it is obvious that with thicker extrusion lines, the temperature fluctuations decrease, leading to residual stress reduction.This phenomenon increases the part's strength by enhancing the layer's tendency to bond with the previous one.Increasing the extrusion width gives thicker extrusion line sections that improve layer adhesion because the material is squished more into the previous layer.This subsequently enhances the overall part strength.In addition to improving the mechanical strength, higher extrusion width can reduce the printing time by decreasing the number of infill lines within the printed parts.The impact of the individual variables for each tensile and compression strength are clarified in Figures (7a, and  7b) respectively.These plots show the behavior of the single variables on the output, known as the main effects plot or average performance.The significance of each parameter on the tensile and compression strengths has been explored utilizing the Analysis of Variance (ANOVA) to determine the investigated variables contribution percentage to the outcomes.As it has been clarified in the ANOVA tables (Tables 3 and 4), printing temperature has the greatest impact on tensile strength at (47.68%) followed by the width of extrusion at (29.67%).On the other hand, the most effective parameter on compression strength was the extrusion width (51.36%), while the second significant parameter was the temperature (38.79% contribution).Figures (8a,  and 8b) illustrates each parameter's contribution percentage on the two outputs.The figures show that the effect of shells number on tensile strength is significantly higher than its effect on compression.layers is weaker at lower printing temperatures and extrusion width.The failure path inclined at 45 o in the same direction as the raster lines.As the printing temperature and extrusion width increase, the bonding between filament is more homogenous, leading to a smoother fracture surface; therefore, the failure occurs within the layers (in-layer) at 0 o as shown in the second and the third specimens (10 and 13) in Figure 9. On the other hand, the 3D-printed PLA specimens did not rupture in a single plane.Instead, it showed irregular breakage with a zigzag form or jagged line, as shown in the figure's fourth and fifth specimens (14 and 15).This is due to the inner construction where the lines (rasters) of the layers have alternately formed either parallel and 45° or 45° and -45° (135°) angle to the tensile applied load.The cross-section of the fracture surface exhibited a loose structure with voids between the layers, and a distinct appearance of layer separation was visible.Most of the 3D printed specimens failed at a point close to the grips, which has been the common failure pattern for the 3D printed specimens [28].The reason specimens are ruptured close to the grips area is due to the presence of stress concentration at fillet areas due to extrudates.The presence of gaps at the center of the specimens can also accumulate stress, leading to premature failure [29].A uniformly distributed diffusion is required to minimize the infill gaps between the PLA extrudates and improve the bond strength.
According to the tensile strength analysis results, printing temperature was also reported in some previous experimental studies.The carried-out investigations that analyzed the influence of some of the process parameters on compressive strength are still limited.Table 5 shows some related research findings compared to the current study.

Temperature
Tensile strength is enhanced by its increase.
[30] Up to 240 °C, tensile strength increased; beyond 250-°C, mechanical properties started to become poorer.[31] Extrusion Width It greatly affected tensile strength and improved it by its increase.
[33] It had a significant impact on compressive strength.
[34] Its effect was insignificant on compressive strength.[35] No. of Shells Its increase leads to an increase in tensile strength.
[36] The compressive strength increased by increasing the vertical walls. [37]

Temperature Extrusion Width No. of Shells
Tensile and compressive strength increased with increasing the parameter values.
Current study

Neural Network Results
The correlation coefficient was utilized to evaluate the closeness between the model's output and the experiments outcomes.This statistical measure can be formulated as [38].
Table 6 depicts the goodness of fit of the ANN model to check the significance of network topology and transfer functions at the hidden and output layers.The best value of overall R (0.994) was obtained using the Levenberg-Marquardt algorithm, as shown in Figure 10d.The training, validation and testing of the data illustrated in Figures (10a,10b, and 10c) respectively.The data reaches its maximum optimal solution at epoch 1, and when validation samples MSE start increasing, the epochs automatically stop, as shown in Figure 11.The correlation coefficient of the two model responses is determined based on Equation 1.They were (0.996 and 0.992) for tensile and compressive strengths, respectively The result shows good agreements between experimental outcomes and the ANN model with maximum errors of 3.95% and 2.34% for each tensile strength and compression strength, respectively.The experimental values behavior against the predicted model data for the tensile and compression responses are shown in Figures (12a, and 12b) respectively.Based on this convergence between the experimental and model outcomes, it is possible to infer that this method is an efficient tool of machine learning techniques in predicting the FFF printed parts strength.The current study also used the ANN model to optimize the printing variables.A MATLAB algorithm was built to find the optimal printing variables that provide maximum tensile and compression strengths.The function generates three vectors; each vector stores 100 elements.The first one was for printing temperature T in the range [190,210], the second vector presents the extrusion width W in the range [0.36, 0.64], and the third one for the number of shells Sh in the range [2,4].
Moreover, the algorithm constructs two three-dimensional arrays with a size of (100,100,100).The computed results of the three input vector combinations are stored in the first array simultaneously.In the second array, the compression strength is also calculated and saved.The maximum values in these two arrays are the optimal values for each tensile and compression strength, and the corresponding variables represent the optimal printing conditions.Table 7 shows the optimal variables conditions and thtaeir corresponding tensile strength and compression strength values.It is noted that the optimum values of (T, W, and Sh) are the same for (TS) and (CS).

Conclusions
In this work, a neural network model was built to predict and optimize the tensile and compressive strengths of the printed parts in the material extrusion process.The experimental runs for printing the parts were achieved based on the full factorial design of experiments to investigate the impact of hot end temperature, extrusion width, and the number of shells as the process input parameters on parts strength.From the present work, the following conclusions have been drawn: The result clarified that higher tensile and compressive strengths are achieved with higher printing temperature (210 °C), higher extrusion width (0.64 mm), and higher number of shells (4).The ANOVA analysis found that temperature is the most effective parameter on tensile strength with (47.68%), while the extrusion width has the greatest impact on compression strength at (51.36%).The correlation coefficient for the two responses was 0.996 and 0.992, respectively.The predicted model for the tensile and compression strengths agreed well with experiment outcomes, with an error average of 0.42% for tensile strength and 0.45% for compressive strength.This indicates that the neural network model can be utilized to predict mechanical strength.Producing parts from different types of material together in one building structure requires more investigations, requiring knowledge and consideration of the different melting points of the used materials.According to practical demands, this combination could address the conflicting characteristics of rigidity and toughness or solve some of the existing challenges encountered in various implementations.

Figure 1 :
Figure 1:The main elements in the Material Extrusion process[11] 1542

Figure 3 :Figure 4 :Figure 5 :
Figure 3: Steps of preparing the tensile and compression specimens, (a) CAD model design, (b) Slicing the models

Figure 7 :Figure 8 :
Figure 7: Main effect plot of the mean strength, (a) Tensile strength, (b) Compression strength

Figure 9 :
Figure 9: Fractured tensile specimens at different combinations of parameters

Figure 10 :
Figure 10: Regression plot for ANN

Figure 11 :
Figure 11: Mean square error plot for ANN

Figure 12 :
Figure 12: Main effect plot of the mean strength, (a) Tensile strength, (b) Compression strength

Table 1 :
Variables and levels of the process

Table 2 :
Experimental results for the tensile and compression strength

Table 3 :
Anova results for Tensile strength

Table 4 :
Anova results for Compression strength

Table 5 :
Comparison of previous studies and the current study

Table 6 :
Optimum parameters and their corresponding optimum value of tensile and compression strengths

Table 7 :
Optimum parameters and their corresponding optimum value of tensile and compression strengths