Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Machine_Learning_Study_of_the_Effect_of_Process_Pa

Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

Article

Machine Learning Study of the Effect of Process Parameters


on Tensile Strength of FFF PLA and PLA-CF
Abdelhamid Ziadia, Mohamed Habibi * and Sousso Kelouwani

Department of Mechanical Engineering, University of Quebec in Trois-Rivieres, 3351 Bd des Forges,


Trois-Rivieres, QC G8Z 4M3, Canada; abdelhamid.ziadia@uqtr.ca (A.Z.)
* Correspondence: mohamed.habibi@uqtr.ca

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

Eng 2023, 4, 2741–2763. https://doi.org/10.3390/eng4040156 https://www.mdpi.com/journal/eng


Eng 2023, 4 2742

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

The analyses of the previous investigations, summarized in Table 1, provide a presenta-


tion of an important study direction in the field of FFF, particularly with materials like PLA
and PLA-CF. As previously stated, numerous researchers have conducted studies to better
understand the impact of various process factors on the mechanical properties of printed
parts. Several of these studies used the design of experiments, empirical methodologies,
or direct experimentation to identify these relationships. Although these methodologies
have produced useful insights, there appears to be a clear gap in these studies: a lack of
advanced prediction and optimization strategies. While traditional methods are rigorous,
they may fail to capture the complex interplay of several elements. Furthermore, it appears
that the current literature lacks an integrated approach that not only predicts results but
also optimizes parameters for ideal results. This identified gap emphasizes the potential
need for more integrated and advanced techniques in future research initiatives.

Table 1. Summary of the literature review.

Reference Material Parameters Studied Major Findings


Contours number Raster angle had the greatest
Gebisa et al. [5] ULTEM 9085 Raster parameters influence on
Air gap mechanical properties.
Layer height Infill density highly impacted
Claver et al. [6] PLA, ABS Infill density tensile strength; layer thickness
Layer orientation had a smaller effect.
Layer thickness
Layer thickness and contours
Chokshi et al. [7] PLA Infill pattern
number impact flexural strength.
Contours number
Infill density, followed by layer
Layer thickness
thickness, have the highest
Othman et al. [8] PLA Infill pattern
influence on
Contours number
mechanical properties.
Carbon fibers enhanced tensile
strength and Young’s modulus
Ning et al. [9] ABS with carbon fibers -
but reduced toughness and yield
strength.
Carbon fibers increased strength,
stiffness, thermal conductivity,
Love et al. [10] Polymers with carbon fibers -
and reduced distortion in
FDM parts.
ABS reinforced with TiO2 at a 5%
Perez et al. [11] ABS with fibers and TiO2 - weight ratio showed the highest
ultimate tensile strength.
Extrusion temperature and layer
Printing speed
thickness influenced tensile
Aissa et al. [12] RPA Extrusion temperature
strength more than
Layer thickness
printing speed.
Layer thickness has a critical
Layer thickness influence on achieving the
Mushtaq et al. [13] ABS Printing speed optimum surface roughness and
Infill density print time; infill density was
critical for mechanical qualities.
The predictive model accurately
Zhang et al. [14] CCFRP - determined the flexural strength
of CCFRP specimens.

In this context, we present a novel way to model the process–structure properties


interactions for the FFF process. The primary focus of this study is to use ensemble learning
algorithms to predict the mechanical properties of FFF-printed parts using PLA and PLA
with carbon fiber (PLA-CF) as the printing material. Additionally, the study aims to
understand the impact of process parameters on the mechanical properties of the parts
Eng 2023, 4 2744

Eng 2023, 4, FOR PEER REVIEW 4

and perform a multi-objective optimization of process parameters to achieve the desired


mechanical properties. As shown in Figure 1, this novel method aims to provide a complete
complete method that fills gaps in previous studies. The rest of this article will be orga-
method that fills gaps in previous studies. The rest of this article will be organized as
nized as follows: Section 2 will define the machine learning algorithms and performance
follows: Section 2 will define the machine learning algorithms and performance metrics
metrics used in this study. Section 3 will provide details on the experimental and compu-
used in this study. Section 3 will provide details on the experimental and computational
tational methods adopted, and the results obtained will be discussed. Finally, in Section
methods adopted, and the results obtained will be discussed. Finally, in Section 4, the
4, the article will be concluded with a summary and future research perspectives.
article will be concluded with a summary and future research perspectives.

Figure 1. Schematic diagram of article content structure.


Figure 1. Schematic diagram of article content structure.
2. Machine Learning
2. Machine Learning
The four main categories of machine learning techniques are supervised, unsupervised,
The four mainand
semi-supervised, categories of machine
reinforcement. learning
However, techniques
in this arefocus
paper, the supervised, unsuper-
is on supervised
vised, semi-supervised, and reinforcement. However, in this paper, the focus
learning, which is a formalization of the concept of learning from examples. The supervised is on super-
vised learning, which is a formalization of the concept of learning from examples.
learning approach involves providing the learner with a training set and a test set of labeled The
supervised
data, whichlearning
it uses toapproach
learn from involves providing
the labeled data tothe learner
identify thewith a training
unlabeled dataset
as and a test
accurately
set of labeled
as possible data,
[15]. which
This paper it uses
focusesto learn fromon
explicitly thethe
labeled data to identify the
regression-supervised unlabeled
models since
data as accurately
the variables as possible
to predict [15]. This paper focuses explicitly on the regression-super-
are discrete.
vised models since the variables to predict are discrete.
2.1. Machine Learning Regression Models
2.1. Machine Learning
This section Regression
provides Models explanation of the various machine-learning regres-
an in-depth
sion This
models employed
section providesin this
an study.
in-depth explanation of the various machine-learning re-
gression models employed in this study.
Eng 2023, 4 2745

2.1.1. Multiple Linear Regression


Multiple linear regression is a statistical method that enables the prediction of a target
variable based on the values of two or more explanatory variables [16]. This technique
builds upon linear regression and is sometimes referred to as multiple regression. In this
context, the variable to be predicted is designated as the dependent variable, while the
variables employed for prediction are called independent variables. The primary objective
of this algorithm is to establish a linear association between the independent variables (x)
and the dependent variable (y), as illustrated in Equation (1):

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.

2.1.2. Decision Tree Regression


A decision tree is a method that employs a tree-like framework for constructing
regression models [17,18]. This approach progressively develops a corresponding decision
tree by dividing a dataset into increasingly smaller subsets. The decision tree consists of
three types of nodes. The root node serves as the starting point and represents the entire
data sample. Interior nodes symbolize the features of the dataset, with their branches
denoting the respective decisions. Lastly, leaf nodes signify the outcomes derived from
the model.

2.1.3. Least Absolute Shrinkage and Selection Operator (Lasso)


Lasso, a shrinkage method, applies constraints on the coefficients of the least squares
estimates [14]. The objective function for the lasso technique is illustrated in Equation (2):
 2
N p p
J= ∑ i =1 yi − β 0 − ∑ j=1 β j xij + λ ∑ j =1 β j (2)

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.

2.1.4. Ridge Regression


Ridge regression, a linear regression variation, contains a regularization method to
avoid overfitting and deal with multicollinearity among predictor variables. It predicts the
dependent variable y based on the independent variables x1 , x2 , x3 , . . ., xp via the linear
relationship:
p
y = β 0 + β 1 x1 + β 2 x2 + . . . + β p x p + λ∑i=1 β2i (3)
where β 0 , β1, β 2 . . . , β p are the coefficients estimated to minimize the residual sum of
p
squares plus the penalty term. The presence of the penalty term λ∑i=1 β2i distinguishes
ridge regression from ordinary linear regression; it penalizes large coefficients with a tuning
parameter λ.
Ridge regression behaves exactly like normal linear regression when (λ = 0). As λ
increases, the model’s coefficients approach zero, simplifying the model. To assist the model
in predicting new data, the best value for λ is commonly chosen through cross-validation.
Ridge regression performs better when the predictors are correlated, leading to more stable
predictions and preventing calculation issues.

2.2. Ensemble Learning Methods


Ensemble learning is a technique that combines multiple base learners to enhance
the final prediction [18]. Individual base models might exhibit suboptimal performance
Eng 2023, 4 2746

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.

2.2.1. Bagging and Boosting


The key distinction between bagging and boosting lies in their training methodolo-
gies. In bagging, the base models are trained concurrently, whereas boosting necessitates
sequential training of the base models [19].
The underlying principle of bagging ensemble learning is straightforward; it depends
on samples generated using the bootstrap statistical method, which is based on an original
dataset [18]. Given N bootstrap samples, each with a size of S (as shown in Equation (4)),
bagging proceeds accordingly:
n     o
r11 , r21 , . . . , rS1 , r12 , r22 , . . . , rS2 , . . . , r1N , r2N , . . . , rSN (4)

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):

f mi (.) = f mi−1 (.) − ci × ∇ f mi−1 L( f mi−1 )(.) (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

XGB strives to prevent overfitting while optimizing computational resources [22,23].


To accomplish this, an objective function (shown in Equation (9)) that assesses both loss
and regularization should be minimized:
Eng 2023, 4, FOR PEER REVIEW 7
n t
Obj(t) = ∑ k =1
l (yi , ŷi ) + ∑k=1 Ω( f i ). (9)

InInthis case, nn isisthe


this case, thenumber
number of values,
of values, l denotes
l denotes the lossthe loss function,
function, yi and 𝑦̂𝑖 are the ŷi are
yi and
the actual label and the predicted label, respectively, f is the weak learner,
actual label and the predicted label, respectively, fi is thei weak learner, and Ω is the and Ω is the
regulation term (Equation (10)), which is defined
regulation term (Equation (10)), which is defined as: as:
11 2
( f i𝑖 )) =
ΩΩ(𝑓 = 𝛾𝑇
γT++2 𝜆 ∥λ𝑤k ∥w k2 (10) (10)
2
where γ represents the minimum loss necessary to further partition the leaf node, T
where γ represents
denotes the number the
ofminimum loss
leaves in the necessary
tree, λ is the to further partition
regularization the leaf
parameter, andnode, T denotes
w refers
the
to number ofassigned
the weight leaves in leaf. λ is the regularization parameter, and w refers to the
the tree,
to each
weight assigned to each leaf.
2.2.2. Stacking
2.2.2. Stacking
Unlike bagging and boosting methods, which rely on basic models utilizing the same
algorithm, stacking and
Unlike bagging models employmethods,
boosting a hierarchical
whichensemble framework.
rely on basic modelsThe stacking
utilizing the same
model enhances modeling accuracy by combining different classifiers or
algorithm, stacking models employ a hierarchical ensemble framework. The stacking regressors [24–
26]. The
model simplest
enhances stacking model
modeling typically
accuracy comprisesdifferent
by combining two levels: level 0, which
classifiers includes[24–26].
or regressors
basic models, and level 1, which features the meta-learner. The basic models
The simplest stacking model typically comprises two levels: level 0, which includes (level-0) uti- basic
lize various algorithms to learn from the original dataset, generating the meta-feature da-
models, and level 1, which features the meta-learner. The basic models (level-0) utilize
taset, while the meta-learner (level-1) processes the meta-feature dataset to produce the
various algorithms to learn from the original dataset, generating the meta-feature dataset,
final results. K-fold cross-validation is commonly employed during the training process
while the meta-learner (level-1) processes the meta-feature dataset to produce the final
of a single basic model to prevent overfitting and ensure that all original datasets contrib-
results. K-fold cross-validation
ute to training for generating newismeta-feature
commonlydatasets.
employed during the training process of a
single basic model to prevent overfitting and ensure that all original datasets contribute to
training for generating new meta-feature datasets.
2.2.3. Blending
The primary distinction between blending and stacking lies in the manner in which
2.2.3.
basicBlending
models generate the meta-feature dataset. Instead of using the K-fold cross-valida-
tionThe primary
method, distinction
blending reservesbetween
a portionblending and stacking
of the training lies in the
dataset (typically 10%manner
or 20%) in
as which
the models
basic validation set [26].the
generate Figure 2 providesdataset.
meta-feature a summary of the
Instead of ensemble
using thelearning blending
K-fold cross-validation
method.blending reserves a portion of the training dataset (typically 10% or 20%) as the
method,
validation set [26]. Figure 2 provides a summary of the ensemble learning blending method.

Figure 2.2.Blending
Figure Blending method.
method.
Eng 2023, 4, FOR PEER REVIEW 8

Eng 2023, 4 2.3. Performance Metrics 2748

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).

Figure 3. Tensile specimen shape and dimensions.


Eng 2023, 4 2749

3.1. Choice of Material


PLA, or polylactic acid, is a biodegradable and bioactive polyester that is derived
from renewable resources, such as cornstarch, sugarcane, or cassava roots. It has become a
popular material for 3D printing due to its environmental friendliness, ease of printing, and
low toxicity. However, its mechanical properties are not as strong as some other materials,
such as ABS.
To improve the properties of PLA, researchers have turned to composite materials,
such as PLA-CF. Carbon fiber is a strong and lightweight material that can be used to
reinforce plastic materials. PLA-CF is a composite material made by adding carbon fiber to
PLA. It has improved mechanical properties, such as strength and stiffness, compared to
pure PLA.
The use of bioplastics, such as PLA, is becoming increasingly important as concerns
about the environment and sustainability grow. Petroleum-based plastics, such as ABS,
are non-renewable and contribute to pollution and waste. The availability of these ma-
terials is also decreasing, making it necessary to find alternative materials that are more
sustainable. By using PLA and PLA-CF, this study contributes to the development of more
environmentally friendly 3D-printing materials.

3.2. Design of the Experiment


The optimization of the process–structure properties of materials is a crucial aspect of
3D printing. This study considered three key parameters for optimizing the 3D printing
process of PLA and PLA-CF: printing temperature, layer thickness, and printing speed.
Printing temperature refers to the temperature at which the material is extruded from
the printer nozzle. It is a critical parameter that can significantly impact the final mechanical
properties of the printed part. If the temperature is too low, the material may not bond well
between layers, leading to a weak and brittle part. On the other hand, if the temperature
is too high, the material may burn or degrade, affecting its structural integrity [30]. Layer
thickness refers to the thickness of each layer of material that is deposited on top of the
previous layer. This parameter affects the resolution and quality of the final printed part.
A thinner layer thickness results in higher resolution and smoother surface finish, but
it also increases printing time. A thicker layer thickness results in faster printing but
may compromise the quality and mechanical properties of the final part [31]. Printing
speed refers to the speed at which the printer moves the nozzle across the printing bed.
This parameter affects the overall printing time and the quality of the final part. A slower
printing speed allows for better adhesion between layers, resulting in a stronger part with
a better surface finish; however, it also increases printing time. A faster printing speed
reduces the printing time but may result in weaker parts with a lower-quality surface
finish [32].
Other parameters, such as the infill density and pattern, and bed temperature, can
also affect the final properties of the printed part. However, for this study, these parameters
were set as indicated in Table 2 and were not considered in the optimization process.

Table 2. Table of the fixed FFF process parameters and their description.

Factors Description Value


Bed temperature(◦ C) Used to heat the build platform 60
Infill density % The amount of material used in the inside of the print 100
Infill pattern The form or structure of the material within the component Lines
Number of contours The number of contours surrounding the part 1

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

Table 3. Table of the selected factors and their levels.

Factors Level 1 Level 2 Level 3


Printing temperature (◦ C) 200 215 230
Layer thickness (mm) 0.25 0.35 0.45
Printing speed (mm/s) 40 50 60

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.

3.3. Data Collection and Modeling


Tensile tests are a standard method for determining the mechanical properties of
materials, including their strength, stiffness, and ductility. In this study, the specimens
created using the full factorial design of the experiment were used for tensile tests to
evaluate the mechanical properties of PLA and PLA-CF.
The tensile tests were performed using a universal tensile material testing system MTS,
which is a commonly used equipment for material testing. The crosshead speed was set
to 2 mm/min, which is a typical speed for tensile tests on 3D-printed parts. The experi-
mental setup for the tensile test includes the MTS equipment, the specimen holder, and
the strain gauge for measuring the deformation of the specimen. After the tensile tests
were performed, the obtained data were manually preprocessed and stored in CSV files.
Preprocessing involves removing any outliers or errors in the data and ensuring that the
data is formatted correctly for analysis. The results of data collection and preprocessing
are shown in Table A1, which includes the tensile strength, modulus of elasticity, and
elongation at break for each specimen.
The tensile test results are used to evaluate the effect of the chosen parameters on the
mechanical properties of the printed parts. By analyzing the data and comparing the results
for different parameter combinations, the optimal printing parameters can be determined
for producing parts with the desired mechanical properties.
In this study, the collected data from tensile tests were used to train ensemble learning
models to predict the ultimate tensile strength, Young’s modulus, and strain at the break
Eng 2023, 4 2751

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.

Table 4. Prediction accuracy of the blending methods.

Property Predicted R2 (%) RMSE Mean of Actual Values


Ultimate tensile strength (σ) (MPa) 91.75% 1.23 33.87
Young’s modulus (E) (MPa) 94.08% 278.00 3233.74
Strain
Engat break
2023, ()PEER
4, FOR (%)REVIEW 88.54% 0.09 1.91
12

(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 5. Tensile test behavior of PLA and PLA-CF parts.

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.

Ultimate Tensile Strength Young’s Modulus Strain at Break


Material (PLA/PLA-CF) 67.30% 92.70% 71.60%
Printing temperature 12.89% 2.44% 7.08%
Layer thickness 9.68% 2.99% 13.19%
Printing speed 10.11% 1.85% 8.12%

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.

Figure 6. Importance of the process parameters on the mechanical properties.


Figure 6. Importance of the process parameters on the mechanical properties.

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.

3.4.2. Analysis of the Response Surfaces


The response surfaces presented in Figures A1–A6 provide additional insights into
the influence of the printing parameters on the mechanical properties of the PLA and
PLA-CF specimens.
For PLA-CF, the response surfaces showed that the ultimate tensile strength decreases
with increasing layer thickness and printing speed. The printing temperature had a more
complex influence on the ultimate tensile strength, with the highest values observed
in a range of temperatures between 210 ◦ C and 225 ◦ C. Young’s modulus increased with
increasing layer thickness at high printing speeds and low temperatures. The strain at break
had its maximum values at a range of layer thicknesses between 0.375 mm and 0.425 mm,
and increased with increasing printing temperature and decreasing printing speed.
For PLA, the response surfaces showed that printing temperature had the highest
influence on the ultimate tensile strength, with an increase in strength observed with
increasing temperature. Layer thickness had a significant influence on Young’s modulus,
with an increase in modulus observed with increasing layer thickness. The increase in
printing speed also produced a higher Young’s modulus. The maximum values of strain
at break for PLA specimens appeared at a range of layer thicknesses between 0.375 mm
and 0.425 mm, a range of printing speed between 45 mm/s and 55 mm/s, and at low
temperatures.
These findings coincide with the studies of Othman et al. [8], who used PLA as the
printing material, and layer thickness and other process parameters to study their influence
on the mechanical properties of the printed parts, while Aissa et al. [12] used printing
temperature, layer thickness, printing speed, and reinforced polyamide as the printing
material. The findings also confirmed the importance of feature importance analysis,
presented in the previous section, and the need for optimizing the printing parameters to
achieve the desired mechanical properties.

3.5. Optimization of the Process Parameters


After the analysis presented in Section 3.4, it is concluded that the material used had
the most significant influence on the mechanical properties studied. Once the appropriate
material is selected, the choice of the process parameters depends on the desired mechanical
properties. Therefore, to optimize these relationships and find the optimal set of printing
parameters for a given material, a genetic algorithm was used.

3.5.1. Genetic Algorithm


The genetic algorithm (GA) is a population-based stochastic optimization algorithm
that was inspired by Charles Darwin’s theory of evolution. The GA algorithm begins by
creating an initial population of multiple solutions that represent the chromosomes of the
individuals. The fitness of each individual in the population is then evaluated by calculating
a fitness score [33]. Natural selection is applied by selecting the fittest individuals from the
population. Crossover and mutation are then applied to produce offspring that descend
from the fittest individuals.
The crossover operator takes two parents and produces two offspring by exchanging
parts of their chromosomes. The mutation operator introduces small random changes to
the offspring’s chromosomes to promote diversity in the population. These operators are
Eng 2023, 4 2755

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.

Figure 7. Flow chart of the genetic algorithm.


Figure 7. Flow chart of the genetic algorithm.
3.5.2. Optimization of the Process Parameters
3.5.2. Optimization of the Process
The fitness function used inParameters
the genetic algorithm plays a crucial role in determining
theThe
optimal
fitnesssetfunction
of process parameters.
used Thisalgorithm
in the genetic study defines thea fitness
plays crucialfunction as a weighted
role in determining
the optimal set of process parameters. This study defines the fitness function as aThe
sum of the predicted mechanical properties using the process parameters. weights
weighted
sum of the predicted mechanical properties using the process parameters. The weightsofofthe
of each mechanical property are determined by the user based on the application
printed
each part and
mechanical the importance
property of each property
are determined in thebased
by the user design oncriteria.
the application of the
The fitness function (Equation (13)) includes the
printed part and the importance of each property in the design criteria. ultimate tensile strength, Young’s
modulus, and function
The fitness strain at break, as the
(Equation predicted
(13)) includes mechanical
the ultimate properties. The process
tensile strength, parame-
Young’s
ters to optimize are the material (m) used, printing temperature (t),
modulus, and strain at break, as the predicted mechanical properties. The process param- layer thickness (h), and
printing
eters speed (s).
to optimize are The predicted(m)
the material mechanical properties,
used, printing σ̂, Ê, and
temperature are calculated
(t),ê,layer thickness using
(h),
the ensemble learning models trained in Section 3.3: ̂
and printing speed (s). The predicted mechanical properties, 𝜎̂, 𝐸 , and 𝜖̂, are calculated
using the ensemble learning models trained in Section 3.3:
σ̂ β × Ê γ × ê
f (m, t, h, s) = α × 𝜎̂+ 𝛽×𝐸̂ + . (13)
𝑓(𝑚, 𝑡, ℎ, 𝑠) = 𝛼 ×σ + E + 𝛾×𝜖̂ .e (13)
̅
𝜎 𝐸̅ 𝜖̅

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 printingparameters:
 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.

Table 6. Solutions to the optimization process.

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.

4. Conclusions and Prospects


This article presents a data-driven modeling approach to predict the ultimate tensile
strength (UTS), Young’s modulus, and strain at break of PLA and PLA-CF dog-bone specimens.
The specimens were manufactured according to ASTM D638-14 Type I and tested using a
universal tensile material testing system (MTS). The study investigated the influence of
material type and process parameters such as printing temperature, printing speed, and layer
thickness on the mechanical properties. A genetic algorithm was employed to optimize the
process parameters for specific conditions. Ensemble learning algorithms, including XGBoost,
gradient boosting regressor, random forest, decision tree, multiple linear regression, lasso, and
ridge regression, were used to predict the mechanical properties with high accuracy.
Eng 2023, 4 2758

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.

Ultimate PLA- Ultimate


Modulus Strain Young’s Strain
PLA Tensile CF Tensile
of Elasticity at Break Modulus at Break
Run Strength Run Strength
(σ) (E) (e) (σ) (E) (e)
1 26.66 1746.67 1.79 1 33.61 3754.25 1.42
2 25.92 1744.65 1.84 2 34.17 3356.07 1.44
3 27.34 1505.78 2.00 3 34.44 3497.39 1.55
4 24.50 1543.07 1.95 4 37.93 4391.66 1.16
5 26.85 1202.43 2.31 5 38.14 4174.61 1.30
6 25.93 1482.00 1.96 6 37.61 4581.69 1.10
7 31.41 1812.83 2.08 7 35.85 4125.07 1.08
8 29.42 1891.01 1.89 8 35.74 4132.72 1.10
9 24.30 1258.48 2.18 9 31.13 3984.64 0.92
10 27.23 1556.10 1.96 10 39.60 3505.53 1.56
Eng 2023, 4 2759

Table A1. Cont.

Ultimate PLA- Ultimate


Modulus Strain Young’s Strain
PLA Tensile CF Tensile
of Elasticity at Break Modulus at Break
Run Strength Run Strength
(σ) (E) (e) (σ) (E) (e)
11 30.20 2143.89 1.97 11 37.34 3986.06 1.30
12 31.21 1629.61 2.06 12 37.39 3853.34 1.38
13 28.87 1809.15 1.92 13 38.53 4153.85 1.44
14 28.39 1762.37 1.94 14 36.99 4000.50 1.30
15 27.16 1617.90 2.024 15 36.31 4060.63 1.22
16 33.59 1801.88 2.15 16 35.57 3768.16 1.37
17 29.87 1756.94 1.83 17 35.88 3939.81 1.22
18 25.90 1625.23 1.717 18 34.43 4034.85 1.06
19 30.21 1895.71 2.054 19 31.40 3497.64 1.37
20 32.03 1755.01 2.39 20 34.65 4250.31 1.38
21 32.95 2094.29 1.90 21 34.88 3941.19 1.51
22 30.64 1958.45 1.82 22 35.05 3339.23 1.70
23 30.38 1881.98 1.80 23 34.24 3518.94 1.47
24 29.65 1922.06 1.79 24 34.53 3256.32 1.79
25 26.15 1897.19 1.45 25 32.76 3343.46 1.37
Eng
26 2023, 4, FOR PEER REVIEW
29.91 1931.47 1.85 26 33.24 3432.23 21
1.33
27 31.54 2011.35 1.85 27 34.89 3912.19 1.22

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.

You might also like