Machine_Learning_Study_of_the_Effect_of_Process_Pa
Machine_Learning_Study_of_the_Effect_of_Process_Pa
Machine_Learning_Study_of_the_Effect_of_Process_Pa
Abstract: Material extrusion is a popular additive manufacturing technology due to its low cost, wide
market availability, ability to construct complex parts, safety, and cleanliness. However, optimizing
the process parameters to obtain the best possible mechanical properties has not been extensively
studied. This paper aims to develop ensemble learning-based models to predict the ultimate tensile
strength, Young’s modulus, and the strain at break of PLA and PLA-CF 3D-printed parts, using
printing temperature, printing speed, and layer thickness as process parameters. Additionally,
the study investigates the impact of process parameters and material selection on the mechanical
properties of the printed parts and uses genetic algorithms for multi-objective optimization according
to user specifications. The results indicate that process parameters and material selection significantly
influence the mechanical properties of the printed parts. The ensemble learning predictive models
yielded an R2 value of 91.75% for ultimate tensile strength, 94.08% for Young’s modulus, and 88.54%
for strain at break. The genetic algorithm successfully identified optimal parameter values for the
desired mechanical properties. For optimal ultimate tensile strength, PLA-CF was used at 222.28 ◦ C,
0.261 mm layer, 40.30 mm/s speed, yielding 41.129 MPa. For Young’s modulus: 4423.63 MPa, PLA-CF,
200.01 ◦ C, 0.388 mm layer, 40.38 mm/s. For strain at break: 2.249%, PLA, 200.34 ◦ C, 0.390 mm layer,
45.30 mm/s. Moreover, this work is the first to model the process–structure property relationships for
an additive manufacturing process and to use a multi-objective optimization approach for multiple
mechanical properties, utilizing ensemble learning-based algorithms and genetic algorithms.
Citation: Ziadia, A.; Habibi, M.;
Kelouwani, S. Machine Learning Keywords: additive manufacturing; material extrusion; machine learning; genetic algorithm;
Study of the Effect of Process
process optimization
Parameters on Tensile Strength of
FFF PLA and PLA-CF. Eng 2023, 4,
2741–2763. https://doi.org/
10.3390/eng4040156
1. Introduction
Academic Editor: Tomasz
Additive manufacturing, also known as 3D printing, is revolutionizing the manufac-
Lipiński
turing and prototyping industries by providing a simpler and more cost-effective product
Received: 11 October 2023 development process than traditional manufacturing techniques. Among various 3D print-
Revised: 29 October 2023 ing technologies, material extrusion, or fused filament fabrication (FFF), is the most widely
Accepted: 30 October 2023 used and rapidly growing technique [1,2]. Material extrusion was first introduced in 1989
Published: 3 November 2023 and patented by Scott Crump, the co-founder of Stratasys [3], who also introduced it to the
market as fused deposition modeling (FDM). Initially, this technology was also referred
to as fused filament fabrication (FFF), which gained popularity after the expiration of the
Stratasys FDM patent [1].
Copyright: © 2023 by the authors.
The popularity of material extrusion can be attributed to its capability to print with
Licensee MDPI, Basel, Switzerland.
a wide range of materials, making it possible to build new technologies with various
This article is an open access article
distributed under the terms and
characteristics. Additionally, its low cost, scalability, and wide market availability make it
conditions of the Creative Commons
an attractive option for researchers and industry professionals alike [4].
Attribution (CC BY) license (https://
However, research has shown that parts produced using traditional manufacturing
creativecommons.org/licenses/by/ methods exhibit superior mechanical properties compared to those fabricated with material
4.0/). extrusion. This is because the parts are printed layer by layer, creating voids that generate
internal stress when subjected to mechanical tests. To overcome this obstacle, researchers
worldwide are pursuing different strategies to optimize the mechanical properties of 3D-
printed parts by selecting the appropriate process parameters [5,6]. In summary, material
extrusion has significantly improved the product development process with its versatility
and cost-effectiveness. Despite its limitations in terms of mechanical properties, ongoing
research aims to overcome these challenges and further enhance the capabilities of this
innovative technology [4,5].
Several researchers have employed different approaches to investigate the optimiza-
tion of process–structure properties of 3D-printed polymers. Gebisa et al. [5] employed
a full factorial design experiment to study the effect of FFF process parameters on the
tensile properties of ULTEM 9085. They investigated five variables, including the contours
number, contour width, raster width, raster angle, and air gap, and found that raster angle
had the greatest influence on mechanical properties. Claver et al. [6] studied the effect of
layer height, infill density, and layer orientation on the tensile strength of polylactic acid
(PLA) and acrylonitrile butadiene styrene (ABS). They found that infill density significantly
impacted tensile strength, while layer height had little effect. Chokshi et al. [7] investigated
the effect of layer thickness, infill pattern, and contours number using PLA as the print-
ing material. Their study showed that layer thickness and contours number significantly
impact flexural strength. Othman et al. [8] studied the influence of layer thickness, infill
pattern, and contours number on the mechanical properties and showed that all three
process parameters studied have close contribution values on mechanical strengths. Infill
density has the highest influence on mechanical properties, followed by layer thickness.
To enhance the mechanical properties of polymers, researchers have developed com-
posites that combine polymers with reinforcing materials such as fibers, particles, or fillers.
Introducing these reinforcing materials allows the resulting composite material to exhibit
improved properties such as increased strength, stiffness, toughness, and wear resistance
compared to pure polymers. Several researchers have studied and compared the mechani-
cal performance of polymers and composites using various materials and techniques. Ning
et al. [9] evaluated the effects of carbon fibers on the mechanical properties of FFF-fabricated
parts made of ABS. They found that carbon fibers enhanced tensile strength and Young’s
modulus but reduced toughness, yield strength, and ductility. Love et al. [10] observed that
combining carbon fibers and polymers increased strength, stiffness, thermal conductivity,
and reduced distortion in FFF-fabricated parts. Perez et al. [11] investigated the effects of
reinforcing materials such as fibers and TiO2 on the mechanical properties of 3D-printed
ABS matrix composites. They found that ABS reinforced with TiO2 at a 5% weight ratio
showed the highest ultimate tensile strength. Aissa et al. [12] experimented with reinforced
polyamide (RPA) as the printing material and used printing speed, extrusion temperature,
and layer thickness as FFF process parameters. They found that extrusion temperature
and layer thickness had a more significant impact on tensile strength than printing speed.
Mushtaq et al. [13] used ABS as a printing material and focused on part properties like
flexural strength, tensile strength, surface roughness, print time, and energy consumption.
The process parameters were layer thickness, printing speed, and infill density. Using a full
central composite design, twenty specimens were tested. Layer thickness was shown to be
critical for achieving the optimum surface roughness and print time, while infill density
was critical for mechanical qualities. Zhang et al. [14] developed a data-driven predictive
modeling approach to understand the structure–property relationship of FFF-fabricated
continuous carbon fiber-reinforced polymers (CCFRP). The ensemble learning algorithm
combined eight base learners: multiple linear regression, least absolute shrinkage and
selection operator (lasso), multivariate adaptive regression splines (MARS), generalized
additive model (GAM), K-nearest neighbors (KNN), support vector machine (SVM), extra-
trees, and extreme gradient boosting (XGBoost). Their study concluded that the predictive
model accurately predicted the flexural strength of CCFRP specimens, with a minimum
RMSE of 9.87%, a minimum RE of 7.75%, and a maximum R2 of 96.99%.
Eng 2023, 4 2743
y = β0 + β1 x1 + · · · + βp xp (1)
where β0 is the value of y when the independent variables are equal to zero, and {β1 , . . .,
βp } are the estimated regression coefficients.
where β0 and βj represent the coefficients for the least squares estimates, and λ denotes
the tuning parameter that regulates the penalty effect on the estimation of coefficients.
The lasso offers an advantage over traditional least squares approaches as the penalty term
facilitates managing the trade-off between variance and bias.
due to high variance or bias. However, when these base learners are connected, they form
a more robust learner, as their combination effectively reduces bias or variance, leading
to improved model performance. In this study, four distinct types of ensemble learning
techniques were employed.
These samples are subsequently utilized to train multiple base models, as demon-
strated in Equation (5):
{ m1 , m2 , . . . , m N }. (5)
In a regression scenario, as is the case in this study, the average of the predictions
from the base models is computed to generate a final prediction with reduced variance, as
depicted in Equation (6):
1 N
N ∑ i =1 i
f mi ( x ) = m (x) . (6)
In this study, the bagging method employed is random forest (RF), which utilizes
deep decision trees as weak learners fitted to bootstrap samples derived from an initial
dataset [20]. In RF, feature sampling also occurs, ensuring that each decision tree trains on
a random subset of features. Boosting shares similarities with bagging, as both techniques
use multiple base models to achieve a better-performing model [18].
The primary difference between the two is that boosting trains base models sequen-
tially, with each model focusing on the data poorly addressed by its predecessor. Upon
completing the process, a learner with reduced bias is obtained. The boosting methods
utilized in this study include gradient boosting and extreme gradient boosting (XGB).
Gradient boosting is an approach wherein the ensemble model is constructed as the
sum of weighted weak learners, as illustrated in Equation (7):
N
f m N (.) = ∑ i =1 c i × m i (. ) (7)
This algorithm transforms the problem into a gradient descent-based one. During
each sequential iteration, a weak learner is fitted to the negative of the current fitting error
in relation to the existing ensemble model [19], as demonstrated in Equation (8):
where L(.) represents the fitting error of the model, ci is the step size, and −∇ f mi−1 L( f mi−1 )(.)
denotes the opposite of the current fitting error relative to the existing model.
Extreme gradient boosting (XGB) is constructed similarly as a sum of weighted weak
learners (refer to Equation (7)), where the first weak learner is trained on the entire input
data. Subsequent models are trained on the residuals to address the limitations of the
previous training, continuing until the stopping criterion is achieved [21].
Eng 2023, 4 2747
Figure 2.2.Blending
Figure Blending method.
method.
Eng 2023, 4, FOR PEER REVIEW 8
A critical aspect of developing a robust machine learning model is assessing its per-
formance. Various metrics are employed to evaluate the quality of the model. These per-
2.3. Performance
formance Metrics
indicators facilitate the measurement of the model’s effectiveness based on the
A critical
available data. Byaspect of developing
fine-tuning a robust machine
the hyperparameters, it islearning
possiblemodel is assessing
to improve its per-
the model’s
formance. Various metrics are employed to evaluate the quality of the model. These per-
performance.
formance indicators facilitate the measurement of the model’s effectiveness based on
the Root
2.3.1. available
Meandata. By fine-tuning
Squared Error (RMSE)the hyperparameters, it is possible to improve the
model’s performance.
Root mean square error (RMSE) represents the standard deviation of the prediction
errors, indicating how closely the data is clustered around the best-fit line [27,28]. The
2.3.1. Root Mean Squared Error (RMSE)
formula to calculate the RMSE is shown in Equation (11):
Root mean square error (RMSE) represents the standard deviation of the prediction er-
rors, indicating how closely the data is clustered
1 𝑛 around the best-fit line [27,28]. The formula
to calculate the RMSE is shown RMSE = √ Σ(11):
in Equation ̂𝑖 )2
𝑖=1 (𝑦𝑖 − 𝑦
(11)
𝑛
r
In this equation, y represents the actual 1value,
n ŷ is the predicted value, n denotes the
RMSE =
n ∑ (y − ŷi )2
i =1 i
number of values, and i refers to the index of each value.
(11)
In this equation, y represents the actual value, ŷ is the predicted value, n denotes the
2.3.2. Coefficient of Determination (R2)
number of values, and i refers to the index of each value.
R2, also known as the coefficient of determination, represents the difference between 1
and theCoefficient
2.3.2. ratio of theofsum (R2 )
of residual squares
Determination to the total sum of squares [28], as shown in
Equation 2 (12):
R , also known as the coefficient of determination, represents the difference between 1
and the ratio of the sum of residual 2squares∑to 𝑛 the
(𝑦𝑖 −𝑦total
̂ 𝑖 )2 sum of squares [28], as shown in
R = 1 − ∑𝑖=1 𝑛 (𝑦 −𝑦 2 (12)
Equation (12): 𝑖=1 𝑖 ̅)
2
In this equation, y denotes theR2actual ∑in=1 ŷ(yisi− ŷi )predicted value, ȳ represents the
= 1 −value,n
the
2
(12)
mean value, n refers to the number of values,∑and i =1 (iy −
indicates
i y ) the index of each value.
AnInRthis
2 score of 1.0 signifies a perfect fit of the model to the data, while an R 2 value of
equation, y denotes the actual value, ŷ is the predicted value, ȳ represents the
0.0 suggests
mean value,that the predicted
n refers values
to the number of are constant
values, and i and
indicates equalthe
to index
the mean value
of each of the
value.
training
Andata. A negative
R2 score R2 score
of 1.0 signifies impliesfitthat
a perfect themodel
of the model’s performance
to the data, whileisanexceptionally
R2 value of 0.0
poor.
suggests that the predicted values are constant and equal to the mean value of the training
data. A negative R2 score implies that the model’s performance is exceptionally poor.
3. Methodology
3. Methodology
The CAD models of the test specimens are designed using SolidWorks and saved as
TheThese
STL files. CADfiles
models of the
are then test specimens
processed are designed
using Ultimaker Curausing SolidWorks
5.4.0 software, whichandslices
saved
as STL
them andfiles. Thesethe
generates files are then
G-code processed
for printing theusing
models Ultimaker Cura 5.4.0
with the material software,
extrusion which
printer,
slices them
Ultimaker S5.and
Thegenerates the G-code
test specimens for printing
are prepared the models
for tensile withtesting
strength the material extrusion
in accordance
printer,
with Ultimaker
the ASTM S5. Type
D638-14 The Itest
[29]specimens are prepared
standard method. formethod
This test tensile aims
strength testing in
to determine
accordance
the with the ASTM
tensile properties D638-14 Type
of unreinforced and Ireinforced
[29] standard method.
plastics This
in the test of
form method aims
standard
to determine thetest
dumbbell-shaped tensile properties
specimens whenof unreinforced and reinforced
tested under specified plastics
conditions. Thein test
the speci-
form of
standard
mens have dumbbell-shaped
an overall width of test
19specimens
mm and an when tested
overall under
length of specified conditions.
165 mm (Figure 3). The test
specimens have an overall width of 19 mm and an overall length of 165 mm (Figure 3).
Table 2. Table of the fixed FFF process parameters and their description.
The full factorial design of the experiment involves testing all possible combinations
of the chosen parameter levels to determine their effect on the final properties of the
printed part. As depicted in Table 3, three levels were selected for each parameter: printing
temperature, layer thickness, and printing speed.
Eng 2023, 4 2750
For printing temperature, the levels chosen were 200, 215, and 230 ◦ C. These tempera-
tures were selected based on the melting point of the PLA and PLA-CF materials and their
recommended printing temperature range.
For layer thickness, the levels chosen were 0.25, 0.35, and 0.45 mm. This parameter
affects the resolution and quality of the final printed part, as well as printing time.
Finally, for printing speed, the levels chosen were 40, 50, and 60 mm/s. This pa-
rameter affects printing time and the overall quality of the printed part, as well as its
mechanical properties.
By applying a full factorial design of the experiment, this study can determine the
effect of each parameter and their interactions on the final properties of the printed parts.
This approach allows for the optimization of the printing process and the production of
high-quality parts with the desired mechanical properties.
The full factorial design of the experiment yielded 27 specimens for each material,
resulting in a total of 54 specimens for the study. Of these, 27 specimens were printed using
pure PLA, and the remaining 27 specimens were printed using PLA-CF. Each specimen
represents a unique combination of the chosen parameter levels, allowing for the determi-
nation of how each parameter affects the final mechanical properties of the printed part.
By testing multiple specimens for each material and parameter combination, the study can
determine the consistency and repeatability of the printing process and ensure that the
results are statistically significant.
Overall, the use of a full factorial design of the experiment and multiple specimens
allows for a comprehensive analysis of the 3D printing process and the properties of
the printed parts. This approach can help to optimize the printing process, improve the
quality of the final parts, and contribute to the development of more sustainable and
environmentally friendly 3D-printing materials.
of the printed parts. The blending ensemble learning method was used, which combines
multiple weak learners to create a stronger, more accurate predictive model.
The weak learners employed were the bagging method random forest, the boosting
methods Xgboost and gradient boosting, and the regression models decision tree regressor,
the multiple linear regression, lasso, and ridge regression. The multiple linear regression
was used as the meta-learner, which combines the predictions of the weak learners to create
the final prediction.
To train and evaluate the ensemble learning models, the data was randomly split into
training data (70%), testing data (20%), and validation data (10%). The weak learners were
trained using the training data, and their predictions were combined to create the data on
which the meta-learner was trained. The prediction results of the validation set of the weak
learners were combined with the validation set to evaluate the model.
The results of the ensemble learning models (Table 4) showed a high accuracy in
predicting the mechanical properties of the printed parts. The R2 score for the prediction of
ultimate tensile strength was 91.75%, the R2 score for Young’s modulus was 94.08%, and
the R2 score for strain at break was 88.54% (Figure 4). The RMSE values were also relatively
low, indicating that the models have a good predictive accuracy.
(a) (b)
(c)
Figure 4. Observed versus predicted mechanical properties: (a) strain at break (%), (b) ultimate ten-
Figuresile Observed
4.strength (MPa),versus predicted
and (c) Young’s mechanical
modulus (MPa). properties: (a) strain at break (%), (b) ultimate
tensile strength (MPa), and (c) Young’s modulus (MPa).
3.4. Influence of the Features Studied on the Mechanical Properties of the Part
Table A1 provides data on the mechanical properties of the PLA and PLA-CF speci-
mens. There is a clear difference between the properties of the two materials, which con-
firms the effect of carbon fiber on PLA. The addition of carbon fiber improves the mechan-
ical properties of PLA, including its strength, stiffness, and toughness.
Figure 5 presents the behavior of runs 1, 10, 12, and 13 of PLA and PLA-CF. These
runs represent different combinations of the printing parameters and their effect on the
mechanical properties of the printed parts. The plots show the stress–strain curves for
Eng 2023, 4 2752
These results prove that the models trained can predict the mechanical properties
studied with high accuracy. Therefore, the optimization of the process parameters within
the range studied became possible. Consequently, it is necessary to analyze the influence of
the process parameters used on these mechanical properties.
3.4. Influence of the Features Studied on the Mechanical Properties of the Part
Table A1 provides data on the mechanical properties of the PLA and PLA-CF spec-
imens. There is a clear difference between the properties of the two materials, which
confirms the effect of carbon fiber on PLA. The addition of carbon fiber improves the
mechanical properties of PLA, including its strength, stiffness, and toughness.
Figure 5 presents the behavior of runs 1, 10, 12, and 13 of PLA and PLA-CF. These runs
represent different combinations of the printing parameters and their effect on the mechan-
Eng 2023, 4, FOR PEER REVIEW ical properties of the printed parts. The plots show the stress–strain curves for each run,
13
which provide information on the mechanical behavior of the printed parts under a tensile
load.
Figure
3.4.1.5.Feature
Tensile test behavior of PLA and PLA-CF parts.
Importance
The decision tree regressor algorithm was used to study the importance of the features,
3.4.1. Feature Importance
as it provides good interpretability and the ability to output the importance of the features.
TheThe decision tree
importance of theregressor
features algorithm wasextent
indicates the used to
to which
study the importance
a given of theaffects
input feature fea-
tures, as it provides
the outcome, whichgood interpretability
can be and the
used to evaluate the relative
ability to output the
influence importance
of the of theon
input features
features. The importance
the mechanical propertiesof the features
of the indicates
printed parts. the extent to which a given input feature
affects the outcome, which can be used to evaluate the relative influence of the input fea-
tures on the mechanical properties of the printed parts.
The results presented in Table 5 show that the material had the greatest importance
on all the mechanical properties studied, which confirms the significant effect of carbon
fiber on the mechanical properties of PLA, which is supported by various studies. In fact,
Eng 2023, 4 2753
The results presented in Table 5 show that the material had the greatest importance
on all the mechanical properties studied, which confirms the significant effect of carbon
fiber on the mechanical properties of PLA, which is supported by various studies. In fact,
Ning et al. [9] deduced that the inclusion of carbon fibers into ABS significantly increased
its tensile strength and Young’s modulus, albeit with a noted reduction in toughness, yield
strength, and ductility, which is consistent with our observations regarding the significant
improvement in mechanical performance through the use of carbon fiber reinforcement.
Similarly, Love et al. [10] confirmed that combining carbon fibers with polymers increased
strength, stiffness, and heat conductivity while decreasing distortion in FFF-fabricated parts.
Table 5. Features importance for each mechanical property studied using a decision tree.
The study of feature importance also confirms that the printing temperature has the
most significant influence on the ultimate tensile strength of the printed parts. For Young’s
Eng 2023, 4, FOR PEER REVIEW
modulus and strain at break, the layer thickness was the process parameter with14the most
significant influence, as shown in Figure 6, which showcases the influence of the process
parameters on the mechanical properties of the printed parts. In a study conducted by
Aissa et al. [12], printing temperature had a greater influence on tensile strength than
parameters on the mechanical properties of the printed parts. In a study conducted by
other
Aissa et al.process
FFF factors,
[12], printing such as layer
temperature thickness
had a greater and printing
influence on tensilespeed.
strength Furthermore,
than other other
researchers’ investigations of various process–structure properties of
FFF process factors, such as layer thickness and printing speed. Furthermore, other re- FFF-printed polymers,
as
searchers’ investigations of various process–structure properties of FFF-printed polymers, optimal
noted in Gebisa et al. [5] and Claver et al. [6], demonstrated the importance of
process
as notedparameter
in Gebisa et settings, with
al. [5] and printing
Claver et al. temperature emerging
[6], demonstrated as a critical
the importance determinant of
of optimal
mechanical properties. These findings highlight the major influence of printing temperature
process parameter settings, with printing temperature emerging as a critical determinant
of mechanical
on properties.
the mechanical These findings
properties highlight the
of FFF-printed major The
objects. influence of printing
results of featuretemper-
importance
also revealed the critical function of layer thickness in affecting mechanical im-
ature on the mechanical properties of FFF-printed objects. The results of feature properties.
portance
This also revealed
discovery the critical
is supported function of
by Othman etlayer thickness
al. [8], in affecting mechanical
who emphasized prop- of layer
the significance
erties. Thisindiscovery
thickness is supported
their work, citing itsbystrong
Othman et al. [8], who
association emphasizedstrengths
to mechanical the significance
when paired
of layer thickness in their work, citing its strong association to mechanical strengths when
with other parameters. Aissa et al. [12] discovered layer thickness as a key FFF process
paired with other parameters. Aissa et al. [12] discovered layer thickness as a key FFF
parameter impacting tensile strength, stressing its importance in 3D printing. They also
process parameter impacting tensile strength, stressing its importance in 3D printing.
stated thatstated
They also printing
thatspeed
printinghasspeed
a smaller
has a impact
smaller on mechanical
impact properties
on mechanical compared
properties com- to layer
thickness and thickness
pared to layer printing andtemperature.
printing temperature.
Table 5. Features importance for each mechanical property studied using a decision tree.
Ultimate Tensile
Young’s Modulus Strain at Break
Strength
Eng 2023, 4 2754
These findings can be used to optimize the printing process and improve the mechani-
cal properties of the printed parts. By selecting the appropriate material and optimizing the
printing temperature and layer thickness, it is possible to achieve the desired mechanical
properties for 3D-printed parts, contributing to the development of more sustainable and
environmentally friendly materials.
Moreover, thanks to the models created to predict the mechanical properties stud-
ied, 3D plots of the response surfaces of these properties are created in Figures A1–A6.
These plots can approve the study of the feature importance.
used to produce a new population, and the process of selection, crossover, and mutation is
repeated until the termination criteria are achieved.
The use of GAs in 3D printing optimization has become increasingly popular in
Eng 2023, 4, FOR PEER REVIEW recent years due to its ability to efficiently find the optimal set of printing parameters.16
By using GAs, it is possible to search through a large parameter space and find the best
set of parameters that result in the desired mechanical properties of the printed parts.
Figure 7 summarizes
population, evaluating the GA process,
fitness, selectingshowing theindividuals,
the fittest steps involved
andinapplying
generating the initial
crossover
population,
and evaluating
mutation to produce fitness, selecting
offspring for thethe fittest
next individuals, and applying crossover and
generation.
mutation to produce offspring for the next generation.
ToTo normalize
normalize the
the mechanical
mechanical properties,the
properties, theaverage
averagevalues
valuesofofthe
themechanical
mechanicalprop-
proper-
ties in the collected data, σ, E,
erties in the collected data, 𝜎̅, 𝐸̅ , and 𝜖̅, are used in the fitness function. This normaliza- is
and e, are used in the fitness function. This normalization
important to ensure that the optimization process is not biased toward a specific mechanical
tion is important to ensure that the optimization process is not biased toward a specific
property. The weights of the mechanical properties, α, β, and γ, are assigned by the user.
mechanical property. The weights of the mechanical properties, α, β, and γ, are assigned
by the user. These weights determine the importance of each mechanical property in the
optimization process. The user can assign higher weights to the properties that are more
critical to the application of the printed part.
By using the fitness function in the genetic algorithm, it is possible to efficiently
Eng 2023, 4 2756
These weights determine the importance of each mechanical property in the optimization
process. The user can assign higher weights to the properties that are more critical to the
application of the printed part.
By using the fitness function in the genetic algorithm, it is possible to efficiently search
for the optimal set of process parameters that result in the desired mechanical properties of
Eng 2023, 4, FOR PEER REVIEW
the printed parts. This approach can significantly reduce the time and cost 17 required to find
the optimal printing parameters for a given material and application.
Equation (14) represents the range of values for the parameters that will be optimized
by the genetic algorithm. The optimization process aims to maximize the fitness function
properties of the printed parts. This approach can significantly reduce the time and cost
while
required keeping
to find the printing
the optimal temperature,
printing parameters for alayer
giventhickness,
material andprinting speed, and printing
application.
material within the specified range. By setting these boundaries,
Equation (14) represents the range of values for the parameters that will be optimizedthe GA algorithm can
by the genetic algorithm. The optimization process aims to maximize the fitness function mechanical
efficiently search for the optimal set of parameters that result in the desired
while properties
keeping the of the printed
printing parts.layer
temperature, Thethickness,
range ofprinting
values speed,
for each
andparameter
printing ma-is based on the
experimental
terial within results
the specified obtained
range. in the
By setting theseprevious
boundaries,sections
the GAand represents
algorithm the feasible and
can effi-
cientlyoptimal
search for the optimal
values for theset of parameters
printing that result in the desired mechanical prop-
parameters:
erties of the printed parts. The range of values for each parameter is based on the experi-
mental results obtained in the previous sections and represents the feasible and optimal
maximize f
values for the printingparameters:
m ∈ {0, 1}; 0attributedtoPLAand1attributedtoPLA − CF
◦
200𝑓 C < t < 230 C ◦ (14)
maximize
𝑚 ∈ {0,1}; 0
0.25 mm < h
attributed <
to 0.45
PLA mm
and 1 attributed to PLA-CF
200∘ C <40 𝑡< 230∘ C< s < 60 mm/s
mm/s (14)
0.25 mm < ℎ < 0.45 mm
{40each
During mm/sgeneration,
< s < 60 mm/s the fitness score of each individual is calculated using the
weighted
During eachsum of predicted
generation, mechanical
the fitness score ofproperties basedison
each individual the parameters
calculated using theassigned by the
user.sum
weighted Theoftop five fittest
predicted individuals
mechanical are then
properties selected
based on the to create theassigned
parameters next generation
by through
the user. The topand
crossover fivemutation.
fittest individuals are then
This process selected to
is repeated create
until the the next generation
termination criteria, which is set
through
to acrossover
maximum andof mutation. This process
250 generations, is repeated until the termination criteria,
is reached.
which is setFigure
to a maximum
8 shows of 250
the generations,
evolution of is reached.
fitness scores over the 250 generations. As can
Figure 8 shows
be seen, the evolution
the fitness of fitness scores
score improves over the from
significantly 250 generations.
the initial As can be
population to the later
seen, the fitness score improves significantly from the initial population to the later gen-
generations. This indicates that the genetic algorithm is effective in finding the optimal set
erations. This indicates that the genetic algorithm is effective in finding the optimal set of
of parameters that maximize the desired mechanical properties. The best individual found
parameters that maximize the desired mechanical properties. The best individual found
by theby the algorithm
algorithm providesprovides thecombination
the optimal optimal combination of printingtoparameters
of printing parameters achieve the to achieve the
desired mechanical properties for
desired mechanical properties for the printed parts.the printed parts.
Figure 8. The optimal solution for each iteration of the optimization process for the mechanical properties.
Figure 8. The optimal solution for each iteration of the optimization process for the mechanical
properties.
The results summarized in Table 6 show the optimal solutions for different mechan-
ical properties using fused filament fabrication (FFF) 3D printing with PLA-CF (polylactic
Eng 2023, 4 2757
The results summarized in Table 6 show the optimal solutions for different mechanical
properties using fused filament fabrication (FFF) 3D printing with PLA-CF (polylactic acid—
carbon fiber) and PLA (polylactic acid) materials. The optimal values and parameters for
each property are as follows:
1. Ultimate tensile strength (UTS)—the optimum solution has a value of 41.129 MPa.
The optimal parameters for achieving this value are:
• Printing temperature: 222.28 ◦ C;
• Layer thickness: 0.261 mm;
• Printing speed: 40.03 mm/s;
• Material: PLA-CF.
2. Young’s modulus—the optimal value is 4423.63 MPa, and the optimal parameters are:
• Printing temperature: 200.01 ◦ C;
• Layer thickness: 0.388 mm;
• Printing speed: 40.038 mm/s;
• Material: PLA-CF.
Mechanical
Value Material Printing Temperature Layer Thickness Printing Speed
Property
Ultimate tensile strength 41.129 MPa PLA-CF 222.28 ◦ C 0.261 mm 40.30 mm/s
Young’s modulus 4423.63 MPa PLA-CF 200.01 ◦ C 0.388 mm 40.38 mm/s
Strain at break 2.249% PLA 200.34 ◦ C 0.390 mm 45.30 mm/s
Note: In this case, the goal was to maximize Young’s modulus, which is unusual.
To search for the minimum, one could change the weight attributed to Young’s modulus in
the fitness function by changing its value to −1, for example.
3. Strain at break—the optimal solution has a value of 2.249%. The parameters for
achieving this value are:
• Printing temperature: 200.34 ◦ C;
• Layer thickness: 0.39 mm;
• Printing speed: 45.30 mm/s;
• Material: PLA.
According to the literature, as the layer thickness increases, the ultimate tensile
strength decreases [33,34], which explains the low layer thickness value produced by
the GA method. Furthermore, Huynh et al. [35] demonstrated that increasing the tempera-
ture from 200 ◦ C to 220 ◦ C, using PLA as a printing material, greatly enhances the ultimate
tensile strength, which explains the printing temperature of 222.28 ◦ C coming from the
ultimate tensile strength optimization.
These results are confirmed by the response surfaces presented in Figures A1–A6.
These figures demonstrate the relationships between the process parameters and the me-
chanical properties of the printed materials.
This study has shown that PLA-CF specimens exhibit higher ultimate tensile strength
(UTS) and Young’s modulus compared to PLA specimens. For PLA-CF specimens, the
following trends were observed in relation to process parameters:
• UTS increases when layer thickness and printing speed decrease, with maximum
values at printing temperatures between 210 ◦ C and 225 ◦ C;
• Young’s modulus increases with increasing layer thickness and printing speed and
decreasing printing temperature;
• Strain at break increases with increasing printing temperature and decreasing printing
speed, with maximum values for layer thicknesses between 0.375 mm and 0.425 mm.
For PLA specimens, the following trends were observed:
• Both UTS and Young’s modulus increase when all studied process parameters (printing
temperature, printing speed, and layer thickness) increase;
• Strain at break increases when printing temperature decreases, with maximum values
for layer thicknesses between 0.375 mm and 0.425 mm, and printing speeds between
45 mm/s and 55 mm/s.
The genetic algorithm used in the study produced values of 41.129 MPa for UTS,
4423.63 MPa for Young’s modulus, and 2.249% for strain at break.
The study focused on the effect of printing materials (PLA and PLA-CF) and process
parameters (printing speed, printing temperature, and layer thickness) on the mechanical
properties of 3D printed parts. Future research aims to investigate the influence of additional
process parameters, such as infill density and bed temperature, on the mechanical properties
of 3D-printed parts, as well as to explore more materials to broaden the scope of the study.
Author Contributions: Conceptualization, A.Z.; formal analysis, M.H. and A.Z.; funding acquisition,
M.H. and S.K.; investigation, A.Z.; methodology, M.H.; software, A.Z.; supervision, M.H. and S.K.;
writing—original draft, A.Z.; writing—review and editing, M.H. All authors have read and agreed to
the published version of the manuscript.
Funding: The authors acknowledge the funding provided by the Natural Sciences and Engineering
Research Council (NSERC) of Canada (grant number: CRSNG–RGPIN-2021-02846) and the Canada
Research Chair Program.
Data Availability Statement: Data available under request.
Conflicts of Interest: The authors certify that they have no affiliations with or involvement in any
organization or entity with any financial interest or non-financial interest in the subject matter or
materials discussed in this manuscript.
Appendix A
Table A1. The preprocessed collected data from the mechanical test.
Appendix B
Appendix B
Figure A1. Response surface 3D plots of the predicted ultimate tensile strength of PLA-CF: (a)
Figure A1. Response surface 3D plots of the predicted ultimate tensile strength of PLA-CF:
printing temperature vs. layer thickness, (b) printing temperature vs. printing speed, and (c) printing
(a) printing temperature vs. layer thickness, (b) printing temperature vs. printing speed, and
speed vs. layerspeed
(c) printing thickness.
vs. layer thickness.
Eng 2023, 4, FOR PEER REVIEW 22
Eng 2023, 4 2760
Figure A2. Response surface 3D plots of the predicted ultimate tensile strength of PLA: (a) printing
Eng 2023, 4, FOR PEER REVIEW Figure A2. Response surface 3D plots of the predicted ultimate tensile strength of PLA: (a) print-
23
temperature vs. layer
ing temperature vs.thickness, (b) printing
layer thickness, speed
(b) printing speed vs. printing
vs. printing temperature,
temperature, and
and (c) (c) printing speed
printing
speed
vs. layer vs. layer thickness.
thickness.
Figure A3. Response surface 3D plots of the predicted Young’s modulus of PLA-CF: (a) printing
Figure A3. Response surface 3D plots of the predicted Young’s modulus of PLA-CF: (a) printing
temperature vs. layer
temperature thickness,
vs. layer thickness,(b)
(b)printing temperature
printing temperature vs. vs. printing
printing speed,
speed, and (c)and (c) printing speed
printing
speed
vs. layer vs. layer thickness.
thickness.
Eng 2023, 4, FOR PEER REVIEW 24
Eng 2023, 4 2761
FigureFigure Response
A4. A4. surface 3D plots of the predicted Young’s modulus of PLA: (a) printing
Response surface 3D plots of the predicted Young’s modulus of PLA: (a) printing
Eng 2023, 4, FOR PEER REVIEW 25
temperature vs. layer
temperature thickness,
vs. layer thickness,(b)
(b)printing speedvs.vs.
printing speed printing
printing temperature,
temperature, and (c)and (c) printing speed
printing
speed
vs. layer vs. layer thickness.
thickness.
FigureFigure Response
A5. A5. surface 3D plots of the predicted strain at break of PLA-CF: (a) printing
Response surface 3D plots of the predicted strain at break of PLA-CF: (a) printing
temperature vs. layer
temperature thickness,
vs. layer thickness,(b)
(b)printing temperature
printing temperature vs.vs. printing
printing speed,
speed, and
and (c) (c) printing speed
printing
speed
vs. layer vs. layer thickness.
thickness.
Eng 2023, 4, FOR PEER REVIEW 26
Eng 2023, 4 2762
Figure A6. Response surface 3D plots of the predicted strain at break of PLA: (a) printing temper-
Figure A6. Response surface 3D plots of the predicted strain at break of PLA: (a) printing tem-
ature vs. layer thickness, (b) printing speed vs. printing temperature, and (c) printing speed vs.
perature vs. layer thickness, (b) printing speed vs. printing temperature, and (c) printing speed
layer thickness.
vs. layer thickness.
References
References
1. Khosravani,
1.
M.R.; Reinicke, T. On the environmental impacts of 3D printing technology. Appl. Mater. Today 2020, 20, 100689.
Khosravani, M.R.; Reinicke, T. On the environmental impacts of 3D printing technology. Appl. Mater. Today 2020, 20, 100689.
[CrossRef]
https://doi.org/10.1016/j.apmt.2020.100689.
2. Shaqour,
2. B.; Abuabiah,
Shaqour, B.; Abuabiah, M.;M.;
Abdel-Fattah,
Abdel-Fattah,S.; S.; Juaidi, A.;Abdallah,
Juaidi, A.; Abdallah, R.;R.; Abuzaina,
Abuzaina, W.; Qarout,
W.; Qarout, M.; Verleije,
M.; Verleije, B.; Cos,B.;
P. Cos, P. Gaining
Gaining a a
betterbetter
understanding
understanding of the extrusion
of the extrusionprocess
processinin fused filamentfabrication
fused filament fabrication 3D3D printing:
printing: Int. J.Int.
A review.
A review. Adv.J.Manuf.
Adv. Manuf.
Technol.Technol.
114, 1279–1291.
2021, 2021, 114, 1279–1291.[CrossRef]
https://doi.org/10.1007/ s00170-021-06918-6.
3. 3. Radadiya,
Radadiya, V.A.;V.A.; Gandhi,
Gandhi, A.H.A.H. A Study
A Study ofofTensile
TensileCharacteristics
Characteristics for forGlass
Glassand Carbon
and Fiber
Carbon Along
Fiber with with
Along Sandwiched Reinforced
Sandwiched Reinforced
ABS Composites.
ABS Composites. J. Inst.
J. Inst. Eng.Eng. (India)Ser.
(India) Ser.CC2022,
2022, 103,
103,1049–1057.
1049–1057. https://doi.org/10.1007/s40032-022-00848-2.
[CrossRef]
4. 4.
FarhanFarhan
Khan,Khan, M.; Alam,
M.; Alam, A.; Ateeb
A.; Ateeb Siddiqui,
Siddiqui, M.;M.; SaadAlam,
Saad Alam,M.; M.;Rafat,
Rafat, Y.;
Y.; Salik,
Salik, N.;
N.;Al-Saidan,
Al-Saidan,I. I.Real-time
Real-time defect detection
defect in in 3D
detection
3D printing using machine learning. Mater. Today Proc. 2020, 42, 521–528. https://doi.org/10.1016/j.matpr.2020.10.482.
printing using machine learning. Mater. Today Proc. 2020, 42, 521–528. [CrossRef]
5. Gebisa, A.W.; Lemu, H.G. Influence of 3D printing FDM process parameters on tensile property of ultem 9085. Procedia Manuf.
5. Gebisa, A.W.; Lemu, H.G. Influence of 3D printing FDM process parameters on tensile property of ultem 9085. Procedia Manuf.
2019, 30, 331–338. https://doi.org/10.1016/j.promfg.2019.02.047.
2019,
6. 30, 331–338. [CrossRef]
Rodríguez-Panes, A.; Claver, J.; Camacho, A.M. The influence of manufacturing parameters on the mechanical behaviour of PLA
6. Rodríguez-Panes,
and ABS piecesA.; Claver, J.; Camacho,
manufactured by FDM: AA.M. The influence
comparative analysis.of Materials
manufacturing
2018, 11,parameters on the mechanical behaviour of PLA
1333. https://doi.org/10.3390/ma11081333.
and
7. ABS pieces
Chokshi, H.;manufactured
Shah, D.B.; Patel,byK.M.;
FDM:Joshi,A comparative analysis.
S.J. Experimental Materialsof2018,
investigations 11, parameters
process 1333. [CrossRef]
on mechanical properties for
7. Chokshi,
PLA H.; during
Shah, D.B.; Patel, K.M.;
processing in Joshi, S.J. Experimental
FDM. Adv. Mater.investigations
Process. of process2022,
Technol. parameters
8 on mechanical
(Suppl. 2), properties for
696–709.
https://doi.org/10.1080/2374068X.2021.1946756.
PLA during processing in FDM. Adv. Mater. Process. Technol. 2022, 8 (Suppl. 2), 696–709. [CrossRef]
8. 8. Othman,
Othman, F.M.;F.M.; Fadhil,
Fadhil, T.; Ali,
T.; Ali, A.H.B.
A.H.B. Influenceof
Influence ofprocess
process parameters
parametersonon mechanical
mechanical properties and printing
properties time oftime
and printing FDMofPLAFDM PLA
printed parts using design of experiment. J. Eng. Res. 2018,
printed parts using design of experiment. J. Eng. Res. 2018, 8, 2248–9622. 8, 2248–9622.
9. Ning, F.; Cong, W.; Qiu, J.; Wei, J.; Wang, S. Additive manufacturing of carbon fiber reinforced thermoplastic composites using
9. Ning, F.; Cong, W.; Qiu, J.; Wei, J.; Wang, S. Additive manufacturing of carbon fiber reinforced thermoplastic composites using
fused deposition modeling. Compos. Part B Eng. 2015, 80, 369–378. https://doi.org/10.1016/j.compositesb.2015.06.013.
fused deposition modeling. Compos. Part B Eng. 2015, 80, 369–378. [CrossRef]
10. Love, L.J.; Kunc, V.; Rios, O.; Duty, C.E.; Elliott, A.M.; Post, B.K.; Smith, R.J.; Blue, C.A. The importance of carbon fiber to polymer
additive manufacturing. J. Mater. Res. 2014, 29, 1893–1898. [CrossRef]
11. Torrado Perez, A.R.; Roberson, D.A.; Wicker, R.B. Fracture surface analysis of 3D-printed tensile specimens of novel ABS-based
materials. J. Fail. Anal. Prev. 2014, 14, 343–353. [CrossRef]
12. Ouballouch, A.; Alaiji, R.E.; Ettaqi, S.; Bouayad, A.; Sallaou, M.; Lasri, L. Evaluation of dimensional accuracy and mechanical
behavior of 3D printed reinforced polyamide parts. Procedia Struct. Integr. 2019, 19, 433–441. [CrossRef]
Eng 2023, 4 2763
13. Mushtaq, R.T.; Iqbal, A.; Wang, Y.; Rehman, M.; Petra, M.I. Investigation and Optimization of Effects of 3D Printer Process
Parameters on Performance Parameters. Materials 2023, 16, 3392. [CrossRef] [PubMed]
14. Zhang, Z.; Shi, J.; Yu, T.; Santomauro, A.; Gordon, A.; Gou, J.; Wu, D. Predicting flexural strength of additively manufactured
continuous carbon fiber- reinforced polymer composites using machine learning. J. Comput. Inf. Sci. Eng. 2020, 20, 061015.
[CrossRef]
15. Goh, G.D.; Yap, Y.L.; Tan, H.K.; Sing, S.L.; Goh, G.L.; Yeong, W.Y. Process-structure-properties in polymer additive manufacturing
via material extrusion: A review. Crit. Rev. Solid State Mater. Sci. 2020, 45, 113–133. [CrossRef]
16. Maulud, D.; Abdulazeez, A.M. A Review on Linear Regression Compre- hensive in Machine Learning. J. Appl. Sci. Technol. Trends
2020, 1, 140–147. [CrossRef]
17. Huang, J.H.R.; Wu, C.-Y.; Chan, H.-M.; Ciou, J.-Y. Printing parameters of Sugar/Pectin Jelly Candy and application by using a
decision tree in a hot-extrusion 3D printing system. Sustainability 2022, 14, 11618. [CrossRef]
18. Barrios, J.M.; Romero, P.E. Decision tree methods for predicting surface roughness in fused deposition modeling parts. Materials
2019, 12, 2574. [CrossRef]
19. Ghojogh, B.; Crowley, M. The theory behind overfitting, cross validation, regularization, bagging, and boosting: Tutorial. arXiv
2019, arXiv:1905.12787. [CrossRef]
20. Ma, Y.; Schutyser, M.A.; Boom, R.M.; Zhang, L. Predicting the extrudability of complex food materials during 3D printing based
on image analysis and gray-box data-driven modelling. Innov. Food Sci. Emerg. Technol. 2021, 73, 102764. [CrossRef]
21. Li, X.; Zhang, M.; Zhou, M.; Wang, J.; Zhu, W.; Wu, C.; Zhang, X. Qualify assessment for extrusion-based additive manufacturing
with 3D scan and machine learning. J. Manuf. Process. 2023, 90, 274–285. [CrossRef]
22. Lee, S.; Park, J.; Kim, N.; Lee, T.; Quagliato, L. Extreme Gradient Boosting-inspired process optimization algorithm for manufac-
turing engineering applications. Mater. Des. 2023, 226, 111625. [CrossRef]
23. Cai, R.; Wang, K.; Wen, W.; Peng, Y.; Baniassadi, M.; Ahzi, S. Application of machine learning methods on dynamic strength
analysis for additive manufactured polypropylene-based composites. Polym. Test. 2022, 110, 107580. [CrossRef]
24. Wu, T.; Zhang, W.; Jiao, X.; Guo, W.; Alhaj Hamoud, Y. Evaluation of stacking and blending ensemble learning methods for
estimating daily reference evapotranspiration. Comput. Electron. Agric. 2021, 184, 106039. [CrossRef]
25. Cui, S.; Yin, Y.; Wang, D.; Li, Z.; Wang, Y. A stacking-based ensemble learning method for earthquake casualty prediction. Appl.
Soft Comput. 2021, 101, 107038. [CrossRef]
26. Sun, W.; Trevor, B. A stacking ensemble learning framework for annual river ice breakup dates. J. Hydrol. 2018, 561, 636–650.
[CrossRef]
27. Gupta, A.K.; Taufik, M. Investigation of dimensional accuracy of material extrusion build parts using mathematical modelling
and artificial neural network. Int. J. Interact. Des. Manuf. 2023, 17, 869–885. [CrossRef]
28. Chicco, D.; Warrens, M.J.; Jurman, G. The coefficient of determination R-squared is more informative than SMAPE, MAE, MAPE,
MSE and RMSE in regression analysis evaluation. PeerJ Comput. Sci. 2021, 7, e623. [CrossRef]
29. Materials, P.; Materials, E.I. Standard Test Method for Tensile Properties of Plastics; ASTM: West Conshohocken, PA, USA, 2015;
Volume 1, pp. 1–17.
30. Butt, J.; Bhaskar, R.; Mohaghegh, V. Investigating the effects of extrusion temperatures and material extrusion rates on FFF-printed
thermoplastics. Int. J. Adv. Manuf. Technol. 2021, 117, 2679–2699. [CrossRef]
31. Wang, P.; Zou, B.; Xiao, H.; Ding, S.; Huang, C. Effects of printing parameters of fused deposition modeling on mechanical
properties, surface quality, and microstructure of PEEK. J. Mater. Process. Technol. 2019, 271, 62–74. [CrossRef]
32. Spoerk, M.; Holzer, C.; Gonzalez-Gutierrez, J. Material extrusion-based additive manufacturing of polypropylene: A review on
how to improve dimensional inaccuracy and warpage. J. Appl. Polym. Sci. 2020, 137, 48545. [CrossRef]
33. Feng, R.; Jiang, J.; Sun, Z.; Thakur, A.; Wei, X. A hybrid of genetic algorithm and particle swarm optimization for reducing
material waste in extrusion-based additive manufacturing. Rapid Prototyp. J. 2021, 27, 1872–1885. [CrossRef]
34. Srinivasan, R.; Prathap, P.; Raj, A.; Kannan, S.A.; Deepak, V. Influence of fused deposition modeling process parameters on the
mechanical properties of PETG parts. Mater. Today Proc. 2020, 27, 1877–1883. [CrossRef]
35. Huynh, L.P.T.; Nguyen, H.A.; Phan, L.K.H.; Tran, T.T. Effect of process parameters on mechanical strength of fabricated parts
using the fused deposition modelling method. J. Korean Soc. Precis. Eng. 2019, 36, 705–712. [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual
author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to
people or property resulting from any ideas, methods, instructions or products referred to in the content.