Predicting tensile strength of material extrusion parts during the pre-process using neural networks

Quantitative quality characteristics of additive manufactured parts are influenced by parameters selected in the preparation process (pre-process), especially in the material extrusion process. As a result, a prediction of the tensile strength of manufactured parts is hardly possible, which significantly reduces the usability of the process. In this paper a neural network approach is used to predict the tensile strength during the pre-process. The parameters investigated are print speed, number of shells, layer thickness, nozzle temperature and infill density. A prediction with a mean absolute percentage error (MAPE) of 2.54% could be achieved for randomly generated process parameters using a training data set of 243 samples. This exceeds the best prediction accuracies of the current literature which is between 2.56 and 3.34%. However, this research is particularly different in that, unlike the existing literature, the developed prediction models were tested with untrained random parameter values in a properly conducted test. With a data reduction to a data volume of 32 samples the used approach achieved already a MAPE of 4.15%. The neural network approach outperformed a multiple linear regression even at low training data volume. This publication differs from previously published research activities due to the achieved prediction accuracies on random parameter sets, the number of investigated parameters and the sample size. Users are provided with an algorithm and its procedure to predict the tensile strength which can be adapted to the respective application with the help of company data.


Introduction
The Material Extrusion (MEX) process, also known as Fused Layer Modeling or Fused Deposition Modelling (MEX-TRB/P), matured into a lucrative production alternative due to low machine hour rates, low and wide ranged printer prices as well as low infrastructural requirements.Due to the nature of additive manufacturing, process parameters-such as infill density, number of shells, and layer thickness-are more important compared to conventional manufacturing.They are selected prior to the printing process and have a significant impact on the print result.Since properties such as tensile strength do not depend solely on material properties, the quality of the finished part is often unknown.On the one hand, this leads to high filling densities to ensure the required strength, which increases material costs and printing time.On the other hand, this limits the applicability of the MEX process for stressed parts.With an accurate prediction, the strength of the part can be compared to the already estimated printing time and material cost, which is usually output in the slicer program.In this way, an optimal print job can be found based on quality, time and costs.
However, existing literature typically lacks data and test volume, lacks varied parameters, lacks a proper testing of the prediction accuracy, or achieves unsatisfactory prediction accuracy.Furthermore, the current literature mostly predicts solely trained parameter steps, which reduces the usability of the developed models.In addition, the required data volume and the impact on data reduction methods are unknown.Moreover, it is questionable whether neural networks can achieve better prediction accuracy than simpler methods such as multiple linear regression, as the literature often lacks a comparison.
This paper aims at answering the described open gaps of current literature by predicting the tensile strength in the state of the pre-process with a feed forward neural network based on freely selectable parameter values.This research give novel insights on how the data volume affects the prediction accuracy, how a new parameter should be introduced in an existing neural network approach and how the training data can be reduced in order to still achieve a still satisfying prediction accuracy.The prediction accuracy achieved on randomly selected parameters outperformed previously published models in the literature, even though they predicted known data steps.In addition, the results of the developed neural network are compared to a multiple linear regression approach.
At first the tensile strength is predicted using four variable parameters and a data set of 81 samples for training.Then, print speed is added as a new parameter to improve prediction accuracy and to investigate how to introduce a new parameter into existing data.Effects of the total sample size on the prediction accuracy are investigated using data reduction methods.Subsequently, the prediction of samples with parameter sets outside of the learned value range are observed.Concluding the achieved results are discussed and recommendations are given.

Predicting tensile strength in material extrusion: state of the art
The use of neural networks is common in the area of MEX for example to identify print errors [1].Predictions of quantitative quality characteristics such as surface roughness [2][3][4][5][6] and dimensional accuracy [7][8][9][10] are performed by several researchers.Ali and Chowdary used neural networks to predict dynamic mechanical characteristics of MEX-fabricated parts, in detail the natural frequency [11].Predictions of the compressive strength of MEX parts were performed by Panda et al. [12] and Sood et al. [13].
Besides neural networks a fuzzy logic approach was used by Trivedi and Gurrala to predict the tensile strength of FDM-fabricated parts [14].Deshwal et al. used a neural network to optimize the tensile strength of polylactic acid parts (PLA) by varying the infill density, print speed and nozzle temperature.They found that the neural network approach had a better performance than other tested approaches [15].This could also be stated by a research of Tura et al. [16].Grozav et al. predict the tensile strength with a neural network varying nozzle temperature and print speed.They used in total 36 samples processed on two different MEX printers and two different materials-glycol-modified polyethylene terephthalate (PETG) and PLA-to train their network.They found that the size and variety of the available data were the most influencing and limiting factors of the used approach [17].Bayraktar et al. predicted the tensile strength by observing 36 possible parameter combinations varying the nozzle temperature, layer thickness and raster orientation with a data volume of 108 samples.For nine selected samples within their parameter steps they achieved a MAPE between 3.34% [18].Yadav et al. used a neural network to predict the tensile strength of multi material parts by stacking layers of acrylonitrile butadiene styrene (ABS) and PETG.With a data set of 30 samples they achieved a prediction accuracy between 2.5 and 2.6% for three chosen and trained parameter sets [19].Tura et al. reached a MAPE of 2.21% on validation data for the tensile strength of PLA samples by varying infill density, extrusion temperature and print speed [16].A prediction accuracy on test data was not stated.
In the presented literature the reachable accuracy was determined using training data and test only pre-defined parameter steps.This reduces the applicability of the developed neural networks significantly as they can solely guarantee the stated prediction accuracy for their defined parameter sets.In addition, several of the research papers have only validated their prediction accuracy on the training data used to develop the prediction model, thus lacking a proper test to prove their prediction accuracy.The available research papers also lack sample size, test data volume (if tested), and number of varied parameters.Additionally, information on the sample size required to predict tensile strength with sufficient accuracy is missing.This paper fills the mentioned research gaps and provides an approach to predict the tensile strength of random parameter sets with a similar accuracy.

Observed parameters, value range and resulting data set
The tensile strength of MEX produced parts is mainly determined by the material, the Z-orientation and the selected process parameters [20].This research focus on the latter and therefore keeps the orientation and material fixed.
The mechanical properties of MEX-manufactured parts is especially influenced by the nozzle temperature, the layer thickness [21] and the infill density [22].The density of a part is affected by the parameters infill density representing the percentage filling level of the free space inside a part and the number of shells.Shells are defined as the walls of the print that are exposed to the outside of the part.In the following the number of outer perimeters, top and bottom layers are chosen with the same count and are called number of shells.The infill pattern gyroid was used for all samples.
Firstly, the infill density, nozzle temperature, layer thickness and number of shells are observed.It is expected that they have the strongest effect on the tensile strength.The limits of the value ranges are chosen in such a way that the effect of the parameters can be observed in their entirety, yet a prediction still seems possible (see Table 1).For each parameter the minimum, middle and maximum values are determined to fill the value range.
Combining all possible parameter combinations result in a data set of 81 (3 4 ) samples called M 1 .This is used to train and validate the neural network.Later M 1 will be extended with three differing print speeds resulting in a data volume of 243 (3 5 ) samples (M 2 ).Random parameter combinations which are outside the parameter steps and within the parameter limits are determined to test the prediction accuracy of the resulting neural network.This data set T has a volume of at least 10% of the total training data to test the prediction accuracy.As a loss function, the mean squared error was selected (see Eq. 1).To evaluate the performance of the model the mean absolute error is calculated using the predicted value p i , the measured value x i and the number of samples n (see Eq. 2).The prediction accuracy is given as the mean absolute percentage error MAPE (see Eq. 3), the mean absolute error MAE and the root mean square error RMSE [23].Additionally, the number of outliers is used to describe the prediction results.An outlier is detected when the MAPE is more than one and a half times the interquartile range below the first quartile or above the third quartile. (1)

Used neural network
A feed forward neural network consisting of an input layer, two hidden layers with built-in dropout and an output layer is used to predict the tensile strength, as shown in Fig. 1.Each variable parameter has an associated neuron in the input layer.Dropout is used to switch off neurons randomly in the learning process.It helps the neural network to prevent overfitting.In the output layer one neuron provides the predicted tensile strength value.
The learning process itself is shown in Fig. 2. First the correlation of the input parameters is performed using the Pearson correlation coefficient.In all observations no correlation between the input data was found.Therefore, the data sets could be used to train the neural network.The data set M is used for training and validation using a crossvalidation approach dividing the data set randomly in four separate partitions.A hyperparameter tuning with a random grid search is used as pre-defined hyperparameters have a significant impact on the success of the learning phase.The varied hyperparameters are shown in Table 2.In the epochs selection phase epochs are varied iteratively from 1 up to 500.The best performing neural network is determined calculating the minimum average MAE of all four partitions achieved on the validation data.This neural network is then trained again and afterwards tested with the data set T.

Used multiple linear Regression
The neural network approach shown is compared with a multiple linear regression approach for predicting tensile strength.Linear regression offers simpler applicability and better understanding as the prediction is represented by a function.The function is given by Eq. 5, where P is the predicted tensile strength, b is the constant indicating the intersection with the ordinate, 1 to 5 are the regression coefficients and x 1 to x 5 are the set parameters [24].

Sample, measurement and used equipment
The tensile strength was investigated according to the standards DIN EN ISO 527-1 and 3167.The flat sample of type A1 was used with a length of 150 mm visualized in Fig. 3.A horizontal orientation (XYZ-orientation) was used (see Fig. 4).
For the measurement of the tensile strength an Inspekt 200 from Hegewald & Peschke Meß-und Prüftechnik GmbH was used with a load cell of 10 kN, a test speed of 3 mm/min, a break-off criterion of 75% and a safety criterion of 8 kN.The prints were produced with a Prusa i3 MK3S + from Prusa Research out of glycol-modified polyethylene terephthalate (Prusament PETG) from Prusa Polymers on a plain PEI-coated spring steel build platform. (5)

Effect of parameters on the tensile strength
The printed samples achieved a tensile strength between 16.41 N/mm 2 and 46.04 N/mm 2 .The training data has a span of 29.63 N/mm 2 and the test data of 19.56 N/mm 2 (see Fig. 5).As expected, the obtained tensile strength of the test data was within the training data since the parameters were chosen randomly within the parameter limits of the training data.The differing parameter sets changed the break behavior of the sample.While some break instantly after reaching maximum stress (see (a) in Fig. 6) others had phases of a strong decrease in stress followed by a plateau and a phase with an almost linear stress-strain curve before breaking (see (b) Fig. 6).These samples showed delamination of the outer perimeter and infill during tensile testing, indicating that the process parameters influence this effect.The relative standard deviation of samples with equal parameter sets was 0.63% tested with five additionally manufactured specimens.This indicates a repeatable data generation process.
The effect size of the varied parameters was examined using the mean value of each parameter value represented in a main effects plot (see Fig. 7).The slope of the resulting functions indicates the strength of the parameter influence.The sign of the slope indicates the direction of the optimization.By increasing the number of shells, infill density and layer thickness the mean value of the tensile strength was increased.The tensile strength seems to be particularly dependent on the number of shells, as the function shows the strongest slope.This indicates that the layers aligned with the direction of pull had the highest influence on tensile strength, even though the other layers were aligned with the direction in a gyroid shape.The infill density showed a slightly higher slope than the layer thickness.In contrast, nozzle temperature seemed to have a small influence on the tensile strength.This indicates that the nozzle temperature had less of an effect on layer adhesion than the other effects.Print speed had the highest mean value at the medium speed setting and had small deviations in the mean value.The medium speed mode could be an optimum or a local optimum, and therefore an optimization direction could not be identified.This could be caused by the different speeds within the speed mode depending on the nozzle location.

Predicting the tensile strength via a neural network
After performing the mentioned learning approach on M 1 (see 3.2) a MAPE of 3.21% (MAE of 0.99 N/mm 2 ) was achieved on the random test data T.The neural network  of shells 1 3 Print speed mode achieved a RMSE of 1.32 N/mm 2 and had 2 outliers (8% of test data T).The used hyperparameters of the best neural network are shown in Table 3.

Resulting prediction accuracy and data volume by adding a parameter
In the following the parameter print speed is integrated as it was used by several research activities to optimize the tensile strength [25,26].As the used print speed highly depends on the print head location and print task, existing print speed modes quality and speed were used given by the machine associated slicer (PrusaSlicer).Additionally, a speed mode medium is created by calculating the mean value of both referred speeds (see Table 4).All samples of M 1 used the quality speed mode.With an increased data set M 2 (243 sample) a MAPE of 2.54% could be achieved (see test A in Table 5).Three outliers were identified.Test A resulted in the most powerful neural network found in this paper.
The integration of the parameter print speed tripled the data set resulting in an increased effort in data generation.Therefore, M 2 is reduced by the middle values to test the effect of a reduced added data volume (test B).With the resulting 162 samples the prediction reduced slightly (see Table 5).One could sets with a layer thickness of 0.15 mm resulted in a significantly worse prediction than other unknown data sets in all observations.It seems that this influence is difficult to predict with the used approach.In test A the effect is higher compared to test B resulting in a higher RMSE.
To extend existing models, it is recommended to first add the minimum and maximum values of the new parameters.The achieved prediction accuracy could already be in a satisfactory range as the observation show.

Parameter sets outside the learned value range
The following tests are performed the most powerful neural network found with the total data set M 2 (test A).The hyperparameters of the neural network remain unchanged and are given in Table 6.
The chosen data ranges were tighter than the original parameter ranges to guarantee a high prediction accuracy (see chapter 3.1).Therefore, five samples with randomly chosen parameters with at least one parameter outside of the value range are tested to observe the effect on the reachable accuracy (test C).Additionally, the minimum and maximum of the original value range is tested (test Min and Max).A minimal infill density of 5% was used since a 0% infill density was not printable due to long bridging resulting in fatal print errors.
The prediction accuracy decreased significantly for parameter sets outside the pre-defined value range (see Table 7).Likewise, the RMSE of test C (3.91 N/mm 2 ) is higher compared to test A. Therefore, the needed value range should be known before data generation to choose a tight parameter range which covers the needed parameter values.

Effects of sample size on prediction accuracy
In the following, the training sample size is varied to investigate how the prediction accuracy degrades with a reduction of the training data volume.For this purpose, the achieved accuracy of the developed models is compared to the best model test A, which is based on the largest data set M 2 .This approach provides insight into how to reduce the data collection effort with little impact on prediction accuracy.
The sample size is reduced by eliminating the middle values of each parameter resulting in 32 parameter combinations (test D).In a second observation parameters with a high influence-layer thickness, number of shells infill density-are represented with the minimum, middle and maximum value.The remaining parameters are trained with the middle values (test E).In a third approach the Taguchi method is used resulting in a data set of 27 samples (test F) [27].To test the prediction accuracy data set T is used.
In all tests performed, the prediction accuracy decreased with a minimized data set (see Table 8).Test D achieved better prediction accuracies than E. This indicates that if a parameter is varied in the test data a representation by solely a middle value in the training data should be avoided even if they have a small influence on the predicted value.The Taguchi method achieved almost the prediction accuracy of test D by using less data.The RMSE of test D, E and F are higher compared to A. Test D and E had one outlier while test F had no outliers.
In our observations no clear preferred data reduction approach could be found.Should the data generation of test A exceed the affordable effort it is recommended to use the approach of test D.

Comparing the prediction accuracy with multiple linear regression method
The resulting prediction accuracy of the neural network approach performed best at a high data volume.Further the results are compared to the prediction accuracy of a multiple linear regression, as more simple prediction methods could achieve better prediction accuracies, especially at low data volume.Therefore, a multiple linear regression is used on the basis of the data sets A, D, E and F. The prediction accuracy is tested with the random data set T. Figure 8 shows the MAE, MAPE, RMSE, and outliers of the neural network and a multiple linear regression.The best multiple linear regression model achieved a MAPE of 4.82% using data set A. For all data reduction approaches the neural network outperformed the linear regression regarding MAE, MAPE and RMSE (see (a), (b) and (c) in Fig. 8).The regression resulted in less outliers in test A and D. A multiple linear regression achieved a MAPE (12.15%),MAE (1.41 N/mm 2 ), RMSE (6.84 N/mm 2 ) and one outlier for parameter sets outside of the learned parameter range, which are all higher than the achieved characteristics of the neural network approach.
The results show that the neural network approach is superior to multiple linear regression considering even a low training data volume.

Critical appraisal and limitations
The investigations relate to the parameters print speed, number of shells, layer thickness, nozzle temperature and infill density.Therefore, a prediction using the shown approach is only possible if these parameters influence the tensile strength.The used approach needs to be adapted for printers where other parameters play a predominant role.
The investigations are based on PETG material.Materials with a deviating printability, that cannot be processed repeatably by the printer, could worsen the prediction accuracy.The infill pattern was not varied in this paper.This should be considered as a further parameter if variation of the infill pattern is required.This would extend the neural network by one neuron in the input layer.
Tensile strength is area dependent.The ratio of the number of shells and the infill density influences the degree A comparison of the achieved prediction accuracies with the current literature is shown in Table 9.The results highlight the novelty of the achieved results of this work, as for the first time the prediction accuracy was tested for parameters that differed from the trained parameter steps and still outperformed the presented literature in case of a properly tested prediction accuracy.Additionally, Test A was trained by varying five process parameters, which exceeds the number of parameters in the literature and therefore give more freedom in parameter optimization.Higher achieved

Conclusion
In this paper, a neural network approach was used to predict the tensile strength of MEX-manufactured PETG parts based on process parameters.The effects of data volume on the prediction accuracy was investigated using different data reduction methods.A comparison with a multiple linear regression in dependence of the data volume was performed.
The achieved prediction accuracy (MAPE of 2.54%) on random test data within the parameter ranges exceeds published results even though they predicted solely known trained data.This indicates a high prediction accuracy of the developed neural network.With a lower sample size of 32 samples a MAPE of 4.15% could be achieved.Increasing the data volume reduces the prediction error (MAPE, MAE and RMSE).However, it has been demonstrated that an increase in data is not necessarily accompanied by a decrease in the number of outliers.In all performed investigations the neural network outperformed a multiple linear regression.Therefore, even at low data volume a neural network approach is recommended.
A secured prediction accuracy seems possible with the representation of minimum, medium and maximum values.However, it is recommended to firstly use a reduced data set with solely minimum and maximum values.A satisfying prediction accuracy could be already achieved with a significantly lower effort in data generation.It is suggested to use the minimum and maximum value to add new parameters to the neural network.Additionally, it is recommended to only vary parameters with a high influence on the observed quality characteristic and avoid varying parameters which are represented by solely one value in the training data set.The prediction accuracy of parameter sets outside the defined value range is clearly worsened.The parameter range should be known beforehand and should not be exceeded.
The used approach could be transferable to other part orientations e.g. the Z-orientation, enabling the prediction of the tensile strength for most parts in practice.Therefore, future work targets the application of the presented approach to other printers, materials and orientations.It is planned to investigate how the existing data can be used to further reduce the data volume for new applications by using transfer learning.In addition, it is planned to apply the approach to other quality characteristics such as dimensional accuracy and surface quality.This would allow the prediction of the most important quality characteristics of the MEX process.The presented approach could be extended to other additive processes, especially those in which strength plays a major role, e.g.laser beam melting (PBF-LB/M).For this, the input parameters have to be adapted to the respective additive process.A first test of a neural network approach could be performed using the minimum and maximum data reduction method and solely a few influential process parameters.

Fig. 2
Fig. 2 Used learning process for the neural network

Table 1
Overview of the value range of each parameter Fig. 1 Exemplary structure of the used neural network approach

Table 3
Used hyperparameters for the prediction based on four parameters

Table 4
Used print speed modes

Table 6
Hyperparameter of most powerful neural network found (test A)

Table 7
Prediction accuracy of randomly chosen parameter sets

Table 9
Comparing the achieved prediction accuracy of this work (Test A and Test B) with prediction models of the current literature the literature were not properly tested as they use the accuracy of the validation, which is more accurate since it has already been used for training.Proper testing requires separation of training and test data.Validation accuracies are typically used only for hyperparameter selection and are not commonly used to report the achieved prediction accuracy of a model.