Download PDF
Research Article  |  Open Access  |  31 Aug 2024

Energy efficiency prediction model in fused deposition modeling based on Bayesian optimized random forest

Views: 74 |  Downloads: 5 |  Cited:  0
Green Manuf Open 2024;2:13.
10.20517/gmo.2024.052101 |  © The Author(s) 2024.
Author Information
Article Notes
Cite This Article

Abstract

As the manufacturing industry expands in both scale and energy consumption, the challenge of achieving green and sustainable development becomes more prominent. One effective approach to this challenge is reducing product energy consumption by selecting appropriate process parameters. Process parameters in fused deposition modeling (FDM) play a crucial role in determining the energy consumption during the manufacturing process. Accurately forecasting how these parameters affect energy consumption is essential for realizing green manufacturing in FDM. This paper proposes a method for predicting energy consumption in FDM using Bayesian-optimized random forests (BO-RF). First, response surface methodology (RSM) is utilized to design experiments, obtain the sample datasets, and identify four significant factors affecting processing energy consumption. Then, the sample datasets are partitioned into training and testing subsets; Bayesian optimization is used to optimize the model parameters of the RF, thereby obtaining the prediction model. Finally, using mean square error (MSE), mean absolute percentage error (MAPE), mean percentage error, and coefficient of determination as evaluation metrics, the BO-RF model’s predictive performance is evaluated against nine other prediction models. The results demonstrate the BO-RF prediction model’s superiority over nine other models.

Keywords

FDM, energy consumption, Bayesian optimization, random forests

INTRODUCTION

Additive manufacturing (AM), often referred to as 3D printing, is a technique for fabricating solid parts by layering materials based on a 3D computer-aided design (CAD) model. Unlike traditional subtractive manufacturing (cutting and machining), AM is a “bottom-up” material accumulation method[1]. Fused deposition modeling (FDM) 3D printing primarily uses filament materials such as polylactic acid (PLA), acrylonitrile butadiene styrene (ABS), and fiber-reinforced composites. The filament is heated and melted, extruded through a nozzle, and then deposited layer by layer onto a preheated substrate, ultimately forming parts with specific shapes and structures. Depending on the characteristics of the part’s shape and structure, supports may be added as necessary. Based on its process principles, FDM 3D printing demonstrates high material utilization, aligning with the requirements of green manufacturing. However, this technique still faces challenges such as long printing times and high energy consumption[2]. Due to the unique process characteristics of FDM, numerous printing parameters such as printing speed, infill speed, nozzle temperature, bed temperature, and layer height exist. It is intuitively understood that there is a certain relationship between these parameters and energy consumption. To obtain a more comprehensive understanding of how printing parameters influence energy consumption, researchers have conducted a series of studies using various qualitative and quantitative analysis methods.

In qualitative analysis, the impact of printing parameters and their interactions on energy consumption is studied using experimental design and statistical analysis methods. Griffiths et al. employed the design of experiments (DOE) method to investigate the effects of part orientation, number of perimeters, infill rate, and layer thickness on energy consumption[3]. Their results indicated that layer thickness was the most influential factor in determining energy consumption, and the interactions between the studied parameters also had a notable impact on energy consumption. Additionally, using main effects plots and contour plots of energy consumption, they determined the optimal range of printing parameter combinations. Enemuoh et al. applied Taguchi orthogonal design, signal-to-noise ratio analysis, and variance analysis to study the effects of five printing parameters: infill rate, infill pattern, layer thickness, printing speed, and number of perimeters on energy consumption[4]. Their findings showed that layer thickness exerted the greatest influence on energy consumption, followed by printing speed, infill rate, infill pattern, and number of perimeters. They identified optimized parameter levels based on the signal-to-noise ratio analysis. Galetto et al. used experimental design and variance analysis to examine the impact of layer height, infill rate, nozzle temperature, printing orientation, number of perimeters, printing speed, and retraction speed, as well as the interactions between these parameters, on FDM energy consumption[5]. They found that low infill rate, large layer thickness, and fewer perimeters were conducive to reducing energy consumption. Furthermore, based on the experimental design analysis results, they fitted a polynomial to approximate the relationship between printing parameters and energy consumption, identifying the corresponding optimized parameter combinations for different optimization needs. Elkaseer et al. utilized Taguchi orthogonal design, variance analysis, and polynomial fitting methods to establish a quadratic regression model for the relationships between infill rate, layer height, printing speed, printing temperature, and printing orientation with energy consumption[6]. They used this model to predict how printing parameters affect energy consumption, finding that printing speed and layer thickness exerted an important influence on energy consumption. Camposeco-Negrete et al. employed Taguchi design and variance analysis to study the effects of layer thickness, infill pattern, printing orientation, and printing position on energy consumption[7]. They further determined the optimized combination of printing parameters through desirability analysis. Al-Ghamdi et al. used experimental design and variance analysis to investigate the impact of layer thickness, infill rate, printing speed, and wall thickness on FDM energy consumption[8]. They found strong interactions between the printing parameters and developed a cubic nonlinear regression model. Hassan et al. used full factorial design and variance analysis to study how six different infill patterns and four infill rates influence FDM energy consumption[9]. They established a polynomial regression model discovering that both of them had a notable impact.

In quantitative analysis, it is rare to find studies that utilize physics-based functions to clearly describe how printing parameters affect energy consumption. This is mainly due to the complexity of the relationship, making it challenging to establish an expression using physics-based mathematical models. Therefore, polynomial fitting methods based on quadratic regression are primarily used to establish the relation between printing parameters and energy consumption. Feng et al., based on experimental design results, employed the group method of data handling (GMDH) to establish second-order nonlinear relationship models between three printing parameters and FDM printing energy consumption[10]. Tian et al. used a linear regression model to predict the influence of printing parameters on the FDM energy consumption, and proposed a nonlinear optimization approach to identify the optimal combination of printing parameters that minimizes energy consumption while meeting part quality requirements[11]. Alizadeh et al. used polynomial fitting to establish a quadratic polynomial regression model for the relationship between layer thickness, printing speed, nozzle temperature, and energy consumption[12]. They then used the nondominated sorting genetic algorithm II (NSGA-II) and technique for order preference by similarity to ideal solution optimization (TOPSIS) methods to solve a multi-objective optimization model for energy efficiency and geometric accuracy of the parts, obtaining optimized combinations of printing parameters based on the quadratic polynomial regression model.

In recent years, with the swift advancements in artificial intelligence, machine learning (ML) has found extensive applications in the mechanical manufacturing sector. Applications such as fault diagnosis[13] and defect monitoring in part manufacturing[14] have shown promising results. In terms of regression prediction, ML techniques are frequently employed to forecast the correlation between design parameters and performance metrics in aerospace optimization design[15], establishing surrogate models for optimization, and achieving effective results. As a data-driven modeling and prediction method, ML has shown unique advantages in multi-input single-output regression prediction and has achieved broader adoption in the field of AM. Xia et al. employed three ML algorithms, adaptive neuro fuzzy inference system (ANFIS), extreme learning machine (ELM), and support vector regression (SVR), to establish predictive models for the surface roughness of parts formed by arc AM[16]. The study showed that the genetic algorithm (GA)-ANFIS model, optimized by a GA, had relatively better predictive performance. Li et al., aiming to study the influence of process parameters on the performance of parts formed by selective laser melting (SLM), utilized Kriging, radial basis function (RBF), and SVR to build a composite surrogate model based on local error for predicting material utilization, energy consumption, and tensile strength of SLM parts[17]. The predictive method’s effectiveness was verified through experiments. Baturynska et al., addressing the low prediction accuracy of linear regression methods in predicting geometric errors of AM parts, proposed applying ML algorithms such as SVR, decision tree (DT) regression, and multilayer perceptron to predict geometric errors[18]. The comparison with linear regression models indicated that ML algorithms had better prediction performance for geometric errors in AM parts. Cai et al., studying the relationship between dynamic strength and printing parameters of 3D-printed polypropylene composites, used six ML algorithms to establish predictive models[19]. The study found that artificial neural networks (ANNs) had the best predictive performance but required longer prediction times, while SVR performed well in both predictive performance and prediction time. Gor et al. used ML algorithms such as ANN, K-nearest neighbors (KNNs), and support vector machines (SVMs) to predict the density of parts produced by powder bed fusion AM[20]. Their results indicated that among the ML algorithms used, SVM exhibited relatively the best predictive performance. Kumar et al. applied the KNN algorithm to predict the influence of process parameters on the surface roughness of parts formed by microplasma arc metal AM[21]. Experimental validation showed that the prediction error of surface roughness confirmed the effectiveness of the KNN algorithm in predicting surface roughness for microplasma arc metal AM. Ranjan et al. used the random forest (RF) algorithm to predict how process parameters influence mechanical properties, such as bending performance and fracture strength of Al-reinforced ABS composite parts fabricated by fused filament fabrication (FFF) 3D printing[22]. Wu et al. employed RF, SVR, ridge regression (RR), and least absolute shrinkage and selection operator (LASSO) regression algorithms to establish predictive models to link FDM printing parameters with the surface roughness of formed parts[23]. The experimental validation results demonstrated the effectiveness of these methods in predicting the surface roughness of FDM parts. Furthermore, Li et al. utilized an ensemble learning method to create a ML model comprising six heterogeneous base learners to predict the influence of FFF printing parameters on the surface roughness of formed parts[24]. Their study showed that this predictive method achieved high accuracy in forecasting the surface roughness of FFF parts. Feng et al. utilized the GMDH to establish an energy consumption predictive model[10]. They further applied the differential evolution (DE) algorithm to optimize printing parameters for low energy consumption and conducted variance analysis to study the impact of three printing parameters on energy consumption. Zhang et al. used a back-propagation neural network (BPNN) to establish an energy efficiency predictive model[25]. Based on the model, they employed an adaptive niche GA to solve an energy efficiency optimization model and obtain optimized printing parameter combinations.

Based on the above analysis, it is evident that ML algorithms have realized broader adoption in AM and predicted the correlation between printing parameters and the quality of formed parts, including surface roughness and mechanical properties, resulting in accurate predictive outcomes. However, for different research problems, such as the regression modeling prediction between FDM printing parameters and energy consumption, the accuracy of predictive results varies depending on the ML algorithm used. In the current research on the correlation between FDM printing parameters and energy consumption, whether using polynomial fitting methods or ML methods for regression prediction, there is a lack of in-depth analysis regarding the predictive accuracy of the methods employed. This leads to an insufficient understanding of the most effective ML methods. Furthermore, it is clear that research on energy efficiency optimization in FDM based on ML methods is limited. Consequently, exploring various ML predictive approaches for FDM energy consumption is essential.

METHODS

Experimental design

Experimental design uses statistical methods to study how to design reasonable experimental schemes, obtain experimental data, and analyze experimental results to understand the effects of experimental factors and their interactions on responses. Experimental design primarily consists of the following three parts:

(1) Designing the Experiment Scheme: Determine the objectives of the experiment, specifically the response indicators. Identify the experimental factors to be studied and their levels, and design a reasonable experimental scheme.
(2) Measuring Experimental Results: Conduct the experiments according to the designed scheme, and record the experimental response results.
(3) Analyzing Experimental Results: Use statistical methods to analyze the experimental results. This involves assessing the significance of the effects of experimental factors on the response and analyzing the impact of interactions between experimental factors on the response.

Response surface methodology experimental design

Response surface methodology (RSM) is a technique that uses appropriate experimental design methods to study how to approximate the functional correlation between design variables, constraints, and target values in complex situations. Its essence lies in approximating the relationship between the inputs x1, x2, …, xn and the output y of actual complex structural systems using response surface fitting. For the response surface function that fits the input-output relationship, in general, lower-order polynomials are sufficient to meet accuracy requirements. The determination of the polynomial order depends on the nonlinearities between the inputs and outputs in the actual structural system. When designing the response surface function, the following principles need to be considered: to minimize the number of experiments as much as possible, lower-order and simple expression polynomial functions should be chosen to meet the fitting accuracy requirements. Based on the previous analysis, selecting a reasonable experimental design method, which involves choosing sample points to fit the response surface, is one of the keys to the effective application of RSM. For response surfaces in the form of second-order polynomials, commonly used experimental design methods include:

(1) Full factorial design
Full factorial design is a fundamental experimental design method in RSM. This method requires running all possible experimental combinations. For a full factorial design with m factors each at n levels, the number of experiments required is nm. As can be seen, the number of experiments increases exponentially with the number of factors. Therefore, considering the cost and time of experiments, full factorial design is not suitable for situations with a large number of factors.

(2) Central composite design
Central composite design (CCD) is an extension of the two-level full factorial design. It involves adding axial points and center points to ensure that the design requirements are met. For an m-factor CCD, the number of experiments needed is typically 2m + 2m + 1. Compared to full factorial design, CCD requires fewer experiments, thus improving experimental efficiency.

(3) Box-Behnken design
Box-Behnken design sets three levels for each experimental factor and is commonly used to study the nonlinear interactions between response variables and factors. For the same number of factors, Box-Behnken design requires fewer experiments compared to CCD, offering higher experimental efficiency.

Establishment of RF model based on Bayesian optimization

DT

DT is a commonly used ML algorithm, and its model training process is based on a tree structure, conducting a series of attribute tests according to the sample datasets. Typically, a single DT model consists of a root node, several internal nodes, and leaf nodes, where the leaf nodes correspond to the results obtained by the model’s decision, and the root node and internal nodes correspond to specific attribute judgments. Based on the results of attribute judgments, the sample datasets contained in each node are divided into subsets and assigned to corresponding child nodes. The root node serves as the initial attribute judgment node and contains the complete sample datasets.

For the training sample dataset:

$$ \mathrm{D=\left \{(x_{1},y_{1}),(x_{2},y_{2}),\dots ,(x_{m},y_{m}) \right \} \ y_{i}\in R} $$

Attribute set:

$$ \mathrm{A=\left \{ a_{1},a_{2},\dots ,a_{d} \right \}} $$

In the case of a classification problem, the training process of a DT model is illustrated in Figure 1, showing that the training of the DT model is a recursive process.

Energy efficiency prediction model in fused deposition modeling based on Bayesian optimized random forest

Figure 1. DT model training process. DT: Decision tree.

The key issue in achieving effective modeling of DTs is how to divide the optimal attributes. In DT learning, the division of optimal attributes is mainly achieved through the following three criteria:

(1) Information Gain:

$$ \mathrm{Gain(D,a)=Ent(D)-\sum_{v=1}^{V}\frac{|D^{v}|}{|D|}Ent(D^{v})} $$

$$ \mathrm{Ent(D)=\sum_{k=1}^{|y|}p_{k}log_{2}p_{k}} $$

Where Ent (D) represents the information entropy, and Pk denotes the proportion of samples belonging to the k class in the training sample datasets D, k = 1, 2, …, |y|. Dv indicates the number of samples containing the value of the attribute corresponding to the internal node in the sample datasets D. A larger information gain for a particular attribute indicates that the attribute is more favorable for splitting.

(2) Gain Ratio:

$$ \mathrm{Gain_{ratio(D,a)}=\frac{Gain(D,a)}{IV(a)}} $$

$$ \mathrm{IV(a)=\sum_{v=1}^{V}\frac{|D^{v}|}{|D|}log_{2}\frac{|D^{v}|}{|D|}} $$

The gain ratio helps address the issue of attribute preference when using information gain as a criterion. Specifically, for attributes with a wider range of values, a higher information gain might occur, potentially leading to erroneous attribute partitioning, such as using sample ID as the optimal splitting attribute.

(3) Gini Index:

$$ \mathrm{Gini(D)=\sum_{k=1}^{|y|}\sum_{k^{'}\neq k}p_{k}p_{k^{'}}=1-\sum_{k=1}^{|y|}p_{k}^{2}} $$

$$ \mathrm{Gini_{index(D,a)}=\sum_{v=1}^{V}\frac{|D^{v}|}{|D|}Gini(D^{v})} $$

The aforementioned optimal attribute partitioning criteria correspond to three classic DT algorithms: the ID3 DT algorithm, the C4.5 DT algorithm, and the classification and regression tree (CART) DT algorithm. The CART algorithm is applicable to both classification and regression tasks. Therefore, in the predictive modeling of energy consumption in FDM 3D printing, a DT model based on the CART algorithm is used.

RF model

RF is an ensemble learning algorithm based on the Bagging algorithm, using DTs as base learners. Its primary modeling principle involves establishing several sample datasets through bootstrapping, constructing CART regression tree models for each dataset, and ultimately computing the arithmetic average of the predictive results from these regression tree models to yield the prediction of the RF model.

The key steps in RF modeling include:
(1) Utilizing bootstrapping to randomly sample the original training datasets, resulting in T training subsets.
(2) Based on the T training subsets obtained in step (1), further establishing T CART regression tree models through random selection of attributes.
(3) Employing each CART regression tree model to predict output results fi (x).
(4) Calculating the prediction output results f (x) of the RF model through simple averaging, as given in

$$ \mathrm{f(x)=\frac{1}{T}\sum_{i=1}^{T}f_{i}(x)} $$

According to the above analysis, the modeling process of RF is illustrated in Figure 2.

Energy efficiency prediction model in fused deposition modeling based on Bayesian optimized random forest

Figure 2. RF modeling process. RF: Random forest.

Bayesian optimization algorithm

The numbers of regression trees in a RF, leaf nodes, and attributes in the randomly selected subsets all significantly influence the model’s prediction performance. Therefore, parameter optimization is crucial for enhancing the performance of predictive models. Commonly used parameter optimization methods include grid search, GAs, particle swarm optimization (PSO), etc. In this paper, we adopt the Bayesian optimization algorithm for parameter optimization of the RF model. Compared to other optimization algorithms, Bayesian optimization algorithm leverages known sampled information to determine new sampling points, thus possessing the advantage of high optimization efficiency.

The problem of optimizing RF model parameters based on the Bayesian optimization algorithm can be formulated as:

$$ \mathrm{x^{\ast}=argmin_{x\in X}f(x)} $$

Where x* represents the set of model optimization parameters, x denotes the model parameters to be optimized, X stands for the parameter space for the optimization parameters, and f (x) signifies the objective function to be optimized, which is the prediction error of the RF model.

The solution steps of the Bayesian optimization algorithm mainly include:
(1) Estimating the posterior distribution of the objective function using the probability surrogate model of Gaussian process based on known sampled points and their function values.
(2) Determining the optimal sampling point for the next iteration according to the sampling rule of the acquisition function.

Based on the above analysis, the modeling process of RF based on Bayesian optimization is illustrated in Figure 3.

Energy efficiency prediction model in fused deposition modeling based on Bayesian optimized random forest

Figure 3. BO-RF modeling process. BO-RF: Bayesian-optimized random forest.

EXAMPLE VERIFICATION

Energy efficiency function

FDM 3D printing generates energy consumption mainly during the startup, preheating, printing, and reset stages, with the printing stage contributing the highest energy consumption due to its prolonged duration[26]. To consider the feasibility and ease of energy consumption measurement, this study measures the total energy consumption throughout the entire printing process, from the startup to the reset stages of the FDM 3D printer. Given that the energy consumption varies depending on the specific part being printed, using energy consumption as the sole research object yields results that lack general applicability. Therefore, this study further investigates the energy efficiency of the printing process, referred to as printing energy efficiency, based on the energy consumption of the printing process.

There are numerous indicators for evaluating the energy efficiency of the manufacturing process[27], with specific energy and energy utilization rate being two commonly used indicators. In this study, specific energy is adopted as the evaluation indicator for the energy efficiency of FDM 3D printing. In FDM, the specific energy can be represented by the ratio of the total energy consumption during the printing process to the total material consumption. A lower specific energy indicates that less energy is consumed per unit volume of material, thereby signifying higher energy efficiency.

Based on the above analysis, the energy efficiency function for FDM 3D printing, in terms of specific energy, can be expressed as

$$ \mathrm{E_{SEC}=\frac{E}{V_{m}}=\frac{E}{Vf_{p}}} $$

Where ESEC is the specific energy consumption; E is the total energy consumption during the manufacturing process; Vm is the total material consumption of the manufactured parts. V is the volume of the molded part; fp is the filling density of the molded part. Based on the above analysis, it is evident that the smaller the unit energy consumption and specific energy consumption, the higher the energy utilization efficiency.

Experimental materials and equipment

The printing material used in this study is PLA filament, and the selected FDM printing device is the UP PLUS 2. The part diagram of the printed specimen is shown in Figure 4.

Energy efficiency prediction model in fused deposition modeling based on Bayesian optimized random forest

Figure 4. Prototype part drawing.

After completing the 3D modeling of the part using SolidWorks based on the part drawing, the next step involves setting up the print parameters and performing the slicing operation using Cura software. First, the set values for various process parameters are obtained from the Test design results based on Box-Benhnken. Next, these parameters are configured in the Cura software. Then, the model is exported and sent to the printer for printing. During the printing process, the Aitek AWS2013 power meter is used to measure the energy consumption. Finally, the energy consumption data for FDM 3D printing is obtained. The primary function of the slicing software is to slice the model layer by layer and generate different paths based on the model’s shape and the set process parameters, ultimately producing the GCode file for the entire 3D model, which can be exported for offline printing.

Experimental design results

There are numerous printing parameters in FDM 3D printing. These parameters can be categorized into the following three types:
(1) Process-related printing parameters: These include layer height, bed temperature, nozzle temperature, printing speed, infill speed, bottom/top thickness, retraction speed, retraction distance, and so on.
(2) Machine-related printing parameters: These include nozzle diameter, filament width, and other related parameters.
(3) Part geometry-related printing parameters: These include the printing orientation of the part, specific geometric features, and similar attributes.

Based on existing research results from the literature[5] and the controllable parameters of the UP PLUS 2 printer the previously listed parameters were further refined. After analysis, this paper focuses on the following six printing parameters for further study: Layer Height, Nozzle Temperature, Bed Temperature, Print Speed, Travel Speed, and Infill Speed. According to process requirements, the ranges for these parameters are as follows: Layer Height: 0.1-0.3 mm; Nozzle Temperature: 200-220 °C; Bed Temperature: 60-80 °C; Printing Speed: 40-60 mm/s; Travel Speed: 90-110 mm/s; Fill Speed: 60-80 mm/s. Based on these ranges, each experimental factor is set to three levels. The experimental factors and their levels are summarized in Table 1.

Table 1

Print parameters and factors level

Factor LevelLayer height (mm)Nozzle temperature (°C)Bed temperature (°C)Printing speed (mm/s)Travel speed (mm/s)Fill speed (mm/s)
10.120060409060
20.2210705010070
30.3220806011080

Based on the determined experimental factors and levels, the experiment involves six factors with three levels each. Considering the number of experiments and efficiency, this study chooses the Box-Behnken design type. The specific energy consumption (ESEC) is used as the experimental response. Using Design Expert software, an experimental matrix based on the Box-Behnken design type was created, as shown in Table 2, comprising a total of 54 experimental runs.

Table 2

Test design results based on Box-Benhnken

Experimental sequencePrinting parametersExperimental results
Layer height (mm)Nozzle temperature (°C)Bed temperature (°C)Printing speed (mm/s)Travel speed (mm/s)Fill speed (mm/s)Equivalent printing time
(s2/mm3)
ESEC
(J/mm3)
10.22206050110700.001455.9
20.32106050100700.000940.7
30.22106040100700.001860.1
40.22108060100800.001077.7
50.12108050100600.0033139.7
60.22208050110700.001467.7
70.32107040110600.001445.5
80.12107060110700.0024103.5
90.22007050110700.001462.0
100.3210706090700.000839.3
110.2220705090800.001360.6
120.32108050100600.001151.1
130.12207040100700.0036121.2
140.22107050100700.001461.6
150.22107050100700.001459.2
160.22107050100700.001461.1
170.12106050100800.002589.0
180.2220705090600.001764.9
190.32007040100700.001246.4
200.22106060100600.001451.6
210.12007060100700.0024106.1
220.22006050110700.001450.2
230.22107050100700.001461.6
240.2200705090800.001355.9
250.12106050100600.003399.0
260.22108060100800.001063.0
270.22107050100700.001460.1
280.22207050110600.001762.5
290.2200605090700.001448.8
300.12007040100700.0036121.2
310.22108040100800.001674.8
320.32207040100700.001246.9
330.32106050100800.000835.0
340.22108040100600.002180.5
350.1210706090700.0024108.4
360.2220805090700.001475.3
370.22106040100800.001654.0
380.1210704090700.0036124.1
390.12108050100600.0033133.5
400.12107040110700.0036122.2
410.2200705090600.001763.4
420.3210704090700.001249.7
430.22107050110800.001359.2
440.2210805090700.001469.1
450.22108050110700.001467.7
460.32007060100700.000840.2
470.22207050110800.001357.3
480.12207060100700.0024106.5
490.22107050100700.001459.2
500.32207060100700.000842.1
510.32107060110700.000840.7
520.2220605090700.001451.6
530.22106060100800.001049.2
540.32108050100800.000848.8

Analysis of variance

The analysis of variance (ANOVA) significance test method was used to analyze the factors influencing the energy efficiency of FDM printing. When the P-value is ≤ 0.01, the experimental factor has a very significant effect on the response; When P ≤ 0.05, the effect is significant; When P > 0.05, the experimental factor does not significantly affect the response.

The ANOVA results for FDM printing energy efficiency are shown in Table 3. From the results, it can be seen that the model’s P-value is < 0.0001 (P < 0.05), indicating that the model accurately reflects the real situation. The P-value for the lack of fit is 0.9439 (P > 0.05), suggesting that the lack of fit is not significant, and thus, the model has good explanatory power. After validating and confirming the model’s effectiveness, it can be further concluded that the factors with a very significant impact on FDM printing energy efficiency are layer height (X1), bed temperature (X3), and printing speed (X4). The factor with a relatively significant impact is fill speed (X6), while the remaining printing parameters have a less significant impact on FDM printing energy efficiency. Regarding the interactions between printing parameters, the interaction between layer height and heated bed temperature has a very significant impact on FDM printing energy efficiency, the interaction between layer height and printing speed has a relatively significant impact, and the interactions between other printing parameters have a less significant impact on FDM printing energy efficiency.

Table 3

Variance analysis results of print energy efficiency

Source of varianceSum of squaresDegrees of freedomMean squareF valueP value
Model38,469.78271,424.81131.91< 0.0001
X1-layer height27,298.83127,298.832,527.32< 0.0001
X2-nozzle temperature3.9113.910.360.5525
X3-bed temperature2,187.9012,187.90202.56< 0.0001
X4-printing speed542.361542.3650.21< 0.0001
X5-travel speed8.2718.270.770.3897
X6-fill speed142.471142.4713.190.0012
X1X20.5010.500.0460.8313
X1X3233.591233.5921.63< 0.0001
X1X497.84197.849.060.0058
X1X50.2910.290.0270.8715
X1X612.47112.471.150.2925
X2X310.43110.430.970.3348
X2X40.4010.400.0370.8480
X2X55.4115.410.500.4855
X2X60.9410.940.0870.7704
X3X43.7413.740.350.5612
X3X521.31121.311.970.1720
X3X63.1413.140.290.5943
X4X52.8912.890.270.6091
X4X611.91111.911.100.3033
X5X62.2212.220.210.6542
X122,128.4412,128.44197.05< 0.0001
X220.5510.550.0510.8230
X3214.95114.951.380.2500
X4239.72139.723.680.0662
X521.7111.710.160.6938
X622.5812.580.240.6289
Residual280.842610.80
Lack of fit147.26197.750.410.9439
Pure error133.58719.08
Total deviation38,750.6253

Data preprocessing

The quality of the datasets significantly affects the predictive performance of the model. Therefore, it is essential to preprocess the datasets obtained through experimental design, including feature processing, dataset partitioning and normalization.

Feature processing

The number of features or dimensions in the datasets used for training the BO-RF model can influence the predictive performance of the model. When the dimensionality is too high, the predictive accuracy of the model will decrease. Hence, it is necessary to analyze and process the features of the datasets. In this study, a variance analysis of the response surface experimental design results revealed that layer height, bed temperature, printing speed, and infill speed had significant effects on energy consumption. Therefore, dimensionality reduction was performed on the original datasets with six features, and ultimately, four features were selected for training the BO-RF model.

Dataset partitioning

As per the analysis, 54 sets of experimental data were selected as the sample datasets. After removing duplicate sample data, 47 sets of experimental data were retained. To ensure that the training set had enough samples to meet the model’s predictive accuracy, 35 sets of data were randomly assigned for training set data, while the remaining 12 sets were allocated for test set data.

Normalization

In the sample data of ML, there often exists a disparity in the orders of magnitude between different feature attributes. For example, in this paper, the order of magnitude for layer height is 10-1, while for bed temperature, it is 101. The differences in orders of magnitude between feature attributes can lead to features with higher magnitudes dominating the ML algorithm, causing the model to overlook information contained in other features, thus resulting in a decrease in prediction accuracy. To prevent the differing magnitudes from affecting the predictive accuracy of the BO-RF model, the datasets need to be normalized[28]:

$$ \mathrm{x^{'}=\frac{x-x_{min}}{x_{max}-x_{min}}(x_{max}^{'}-x_{min}^{'})+x_{min}^{'}} $$

Where x’ indicates the processed sample data, x’max stands for the maximum value in the processed sample data, x’min corresponds to the minimum value in the processed sample data, x denotes the original sample datasets, xmax points to the maximum value in the original sample datasets, and xmin represents the minimum value in the original sample datasets. The normalization range chosen in this study is [0, 1].

Model evaluation metrics

To quantitatively evaluate the modeling and predictive performance of different ML models, four evaluation metrics are chosen: mean square error (MSE), coefficient of determination (R2), mean absolute percentage error (MAPE), and maximum percentage error (MPE).

(1) MSE

$$ \mathrm{MSE=\frac{1}{n}\sum_{i=1}^{n}(y_{i}-\hat{y}_{i})^{2}} $$

Where n represents the number of samples in the test set, yi denotes the measured value of the output response, and $$ \hat{\mathrm{y}}_{\mathrm i} $$ means the predicted value of the output response. A smaller MSE indicates a better predictive capability of the model.

(2) R2

$$ \mathrm{R^{2}=\frac{(n\sum_{i=1}^{n}y_{i}\hat{y}_{i}-\sum_{i=1}^{n}\hat{y}_{i}\sum_{i=1}^{n}y_{i})^{2}}{(n\sum_{i=1}^{n}\hat{y}_{i}^{2}-(\sum_{i=1}^{n}\hat{y}_{i})^{2})(n\sum_{i=1}^{n}y_{i}^{2}-(\sum_{i=1}^{n}y_{i})^{2})}} $$

The R2 characterizes the percentage of variability in a dependent variable that is explained by the model. The optimal value is 1, indicating excellent performance of the regression prediction model. The closer the value of R2 is to 1, the better the predictive performance of the model.

(3) MAPE

$$ \mathrm{MAPE=\frac{1}{N}\sum_{i=1}^{N}\left | \frac{y_{i}-\hat{y}_{i}}{y_{i}} \right | }\times 100\% $$

(4) MPE

$$ \mathrm{MPE=max\left | \frac{y_{i}-\hat{y}_{i}}{y_{i}} \right | }\times 100\% $$

In the four model evaluation metrics, MSE is used to assess the dispersion of prediction results, R2 is used to evaluate the linear correlation between predicted values and actual values, while MAPE and MPE are employed to evaluate the accuracy of prediction results.

RESULTS

In the BO-RF model, the Bayesian optimization algorithm is used to optimize the parameters of the RF model, including the numbers of DTs, leaf nodes, and attributes in the randomly selected subsets. The sample datasets consist of the 47 experimental data sets introduced in the data preprocessing section, with 35 sets used for the training set and the remaining 12 sets for the testing set. Figure 5 shows the energy efficiency prediction results based on the RF and the BO-RF model. Here, ESEC is used to represent energy consumption, which is the energy consumption per unit volume of material processed.

Energy efficiency prediction model in fused deposition modeling based on Bayesian optimized random forest

Figure 5. Energy efficiency modeling prediction results of RF and BO-RF models. (A) Prediction results of the training set for the RF model; (B) Prediction results of the test set for the RF model; (C) Prediction results of the training set for the BO-RF model; (D) Prediction results of the test set for the BO-RF model. RF: Random forest; BO-RF: Bayesian-optimized random forest.

To validate the superiority of the BO-RF model, comparisons are made among the BO-RF energy efficiency prediction model, RF-based energy efficiency prediction model, SVR-based energy efficiency prediction model, and BPNN-based energy efficiency prediction model in terms of the four evaluation metrics: MSE, MPE, MAPE, R2 [Table 4]. To visually represent the comparison results, a comparison histogram is plotted [Figure 6]. Among these models, GS-SVR stands for grid search-based SVR, GA-SVR for GA-based SVR, PSO-SVR for PSO-based SVR, BO-SVR for Bayesian optimization-based BVR, BO-MK-SVR for Bayesian optimization-based multi-kernel SVR, GA-BPNN for GA-based BPNN, PSO-BPNN for PSO-based BPNN, and BO-BPNN for Bayesian optimization-based BPNN.

Energy efficiency prediction model in fused deposition modeling based on Bayesian optimized random forest

Figure 6. The results of model evaluation metrics for ten models. (A) The comparison of MSE among the prediction results of various models; (B) The comparison of R2 among the prediction results of various models; (C) The comparison of MAPE among the prediction results of various models; (D) The comparison of MPE among the prediction results of various models. MSE: Mean square error; R2: coefficient of determination; MAPE: mean absolute percentage error; MPE: maximum percentage error.

Table 4

Comparison of prediction performance of each energy efficiency modeling

MSER2MAPEMPE
Training setTest setTraining setTest setTraining setTest setTraining setTest set
BO-RF0.00080.0010.98910.9742.8%5.0%9.7%11.4%
RF0.01050.0100.93520.90911.8%16.8%48.0%37.1%
GS-SVR0.00130.0020.98520.9503.5%7.5%11.4%9.6%
GA-SVR0.00030.0020.99660.9501.9%6.6%6.8%21.8%
PSO-SVR0.04220.0210.89010.74915.8%14.2%41.4%37.8%
BO-SVR0.00050.0020.99310.9652.3%6.3%9.2%14.2%
BO-MK-SVR0.00580.0090.92140.81611.5%16.8%24.9%27.2%
GA-BPNN0.00460.0040.95540.9275.5%9.3%53.3%30.8%
PSO-BPNN0.00030.0030.99630.9441.5%7.0%8.2%17.1%
BO-BPNN0.00330.0170.95730.6464.4%13.0%45.0%50.4%

According to the comparison results in Table 4, it is evident that the energy efficiency prediction model based on BO-RF exhibits the best predictive performance. The SVR-based energy efficiency prediction model also demonstrates good predictive performance, albeit slightly inferior to the BO-RF model. However, the predictive performance of the BPNN-based energy efficiency prediction model is relatively poor. Analysis suggests that the BPNN model requires a large amount of sample data, and its predictive performance improves with a larger sample size. When predicting with small sample data, the RF and SVR models perform better.

CONCLUSION AND FUTURE WORK

In this study, we addressed the prediction problem of the relationship between processing parameters and energy consumption in FDM. We proposed a FDM energy consumption prediction model based on BO-RF. Through experimental validation from the perspectives of MSE, MPE, MAPE, and R2, we compared the prediction results of the BO-RF energy consumption prediction model with those of nine other models. The results demonstrate the superiority of the BO-RF-based FDM energy consumption prediction model.

The proposed approach in this study is data-driven, which may have limitations in model interpretability. In future work, we will integrate data-driven and mechanistic knowledge-driven models to enhance model interpretability and improve predictive performance.

DECLARATIONS

Authors’ contributions

Conceptualization, methodology, data analysis and interpretation, manuscript perfection: Li Y

Supervision, review and editing, formal analysis: Bao H

Original draft preparation, methodology: Yang J

Data curation, investigation: Ke Q, Zhou Y

Availability of data and materials

Not applicable.

Financial support and sponsorship

This research is supported by the National Key Research and Development Program (2020YFB1711604) and the National Natural Science Foundation of China (51505119).

Conflicts of interest

All authors declared that there are no conflicts of interest.

Ethical approval and consent to participate

Not applicable.

Consent for publication

Not applicable.

Copyright

© The Author(s) 2024.

REFERENCES

1. Huang SH, Liu P, Mokasdar A, Hou L. Additive manufacturing and its societal impact: a literature review. Int J Adv Manuf Technol 2013;67:1191-203.

2. Suárez L, Domínguez M. Sustainability and environmental impact of fused deposition modelling (FDM) technologies. Int J Adv Manuf Technol 2020;106:1267-79.

3. Griffiths C, Howarth J, De Almeida-rowbotham G, Rees A, Kerton R. A design of experiments approach for the optimisation of energy and waste during the production of parts manufactured by 3D printing. J Clean Prod 2016;139:74-85.

4. Enemuoh EU, Duginski S, Feyen C, Menta VG. Effect of process parameters on energy consumption, physical, and mechanical properties of fused deposition modeling. Polymers 2021;13:2406.

5. Galetto M, Verna E, Genta G. Effect of process parameters on parts quality and process efficiency of fused deposition modeling. Comput Ind Eng 2021;156:107238.

6. Elkaseer A, Schneider S, Scholz SG. Experiment-based process modeling and optimization for high-quality and resource-efficient FFF 3D printing. Appl Sci 2020;10:2899.

7. Camposeco-negrete C. Optimization of printing parameters in fused deposition modeling for improving part quality and process sustainability. Int J Adv Manuf Technol 2020;108:2131-47.

8. Al-ghamdi KA. Sustainable FDM additive manufacturing of ABS components with emphasis on energy minimized and time efficient lightweight construction. Int J Lightweight Mater Manuf 2019;2:338-45.

9. Hassan MR, Jeon HW, Kim G, Park K. The effects of infill patterns and infill percentages on energy consumption in fused filament fabrication using CFR-PEEK. Rapid Prototyping J 2021;27:1886-99.

10. Feng M, Hua Z, Hon KKB. A qualitative model for predicting energy consumption of rapid prototyping processes - a case of fused deposition modeling processe. IEEE Access 2019;7:184825-31.

11. Tian W, Ma J, Alizadeh M. Energy consumption optimization with geometric accuracy consideration for fused filament fabrication processes. Int J Adv Manuf Technol 2019;103:3223-33.

12. Alizadeh M, Esfahani MN, Tian W, Ma J. Data-driven energy efficiency and part geometric accuracy modeling and optimization of green fused filament fabrication processes. J Mech Des 2020;142:041701.

13. Lei Y, Yang B, Jiang X, Jia F, Li N, Nandi AK. Applications of machine learning to machine fault diagnosis: a review and roadmap. Mech Syst Signal Pr 2020;138:106587.

14. Yang J, Li S, Wang Z, Yang G. Real-time tiny part defect detection system in manufacturing using deep learning. IEEE Access 2019;7:89278-91.

15. Xiong Y, Guo L, Tian D, Zhang Y, Liu C. Intelligent optimization strategy based on statistical machine learning for spacecraft thermal design. IEEE Access 2020;8:204268-82.

16. Xia C, Pan Z, Polden J, Li H, Xu Y, Chen S. Modelling and prediction of surface roughness in wire arc additive manufacturing using machine learning. J Intell Manuf 2022;33:1467-82.

17. Li J, Cao L, Hu J, Sheng M, Zhou Q, Jin P. A prediction approach of SLM based on the ensemble of metamodels considering material efficiency, energy consumption, and tensile strength. J Intell Manuf 2022;33:687-702.

18. Baturynska I, Martinsen K. Prediction of geometry deviations in additive manufactured parts: comparison of linear regression with machine learning algorithms. J Intell Manuf 2021;32:179-200.

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

20. Gor M, Dobriyal A, Wankhede V, et al. Density prediction in powder bed fusion additive manufacturing: machine learning-based techniques. Appl Sci 2022;12:7271.

21. Kumar P, Jain NK. Surface roughness prediction in micro-plasma transferred arc metal additive manufacturing process using K-nearest neighbors algorithm. Int J Adv Manuf Technol 2022;119:2985-97.

22. Ranjan N, Kumar R, Kumar R, Kaur R, Singh S. Investigation of fused filament fabrication-based manufacturing of ABS-Al composite structures: prediction by machine learning and optimization. J Mater Eng Perform 2023;32:4555-74.

23. Wu D, Wei Y, Terpenny J. Predictive modelling of surface roughness in fused deposition modelling using data fusion. Int J Prod Res 2019;57:3992-4006.

24. Li Z, Zhang Z, Shi J, Wu D. Prediction of surface roughness in extrusion-based additive manufacturing with machine learning. Robot Cim Int Manuf 2019;57:488-95.

25. Zhang L, Zhong YJ, Kan HY, Zhang BK. Optimization method for high energy efficiency process parameters in fused deposition manufacturing. J Mech Des Manuf 2021;3:149-52+6. (in Chinese).

26. Zhang L, Zhang BK, Bao H, Zhang C, Zhang WW. Carbon emissions quantitative methodology of product fused deposition manufacturing. J Mech Eng 2017;5:50-9. (in Chinese). Available from: https://d.wanfangdata.com.cn/periodical/jxgcxb201705006. [Last accessed on 27 Aug 2024]

27. Li CB, Zhu YT, Li L, Chen XZ. Multi-objective CNC milling parameters optimization model for energy efficiency. J Mech Eng 2016;21:120-9. (in Chinese). Available from: https://d.wanfangdata.com.cn/periodical/jxgcxb201621015. [Last accessed on 27 Aug 2024]

28. He H, Garcia EA. Learning from imbalanced data. IEEE Trans Knowl Data Eng 2009;21:1263-84.

Cite This Article

Export citation file: BibTeX | EndNote | RIS

OAE Style

Bao H, Li Y, Ke Q, Yang J, Zhou Y. Energy efficiency prediction model in fused deposition modeling based on Bayesian optimized random forest. Green Manuf Open 2024;2:13. http://dx.doi.org/10.20517/gmo.2024.052101

AMA Style

Bao H, Li Y, Ke Q, Yang J, Zhou Y. Energy efficiency prediction model in fused deposition modeling based on Bayesian optimized random forest. Green Manufacturing Open. 2024; 2(3):13. http://dx.doi.org/10.20517/gmo.2024.052101

Chicago/Turabian Style

Bao, Hong, Jing Yang, and Yongshuai Zhou. 2024. "Energy efficiency prediction model in fused deposition modeling based on Bayesian optimized random forest" Green Manufacturing Open. 2, no.3: 13. http://dx.doi.org/10.20517/gmo.2024.052101

ACS Style

Bao, H.; Li Y.; Ke Q.; Yang J.; Zhou Y. Energy efficiency prediction model in fused deposition modeling based on Bayesian optimized random forest. Green. Manuf. Open. 2024, 2, 13. http://dx.doi.org/10.20517/gmo.2024.052101

About This Article

© The Author(s) 2024. Open Access This article is licensed under a Creative Commons Attribution 4.0 International License (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, sharing, adaptation, distribution and reproduction in any medium or format, for any purpose, even commercially, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Data & Comments

Data

Views
74
Downloads
5
Citations
0
Comments
0
0

Comments

Comments must be written in English. Spam, offensive content, impersonation, and private information will not be permitted. If any comment is reported and identified as inappropriate content by OAE staff, the comment will be removed without notice. If you have any queries or need any help, please contact us at support@oaepublish.com.

0
Download PDF
Share This Article
Scan the QR code for reading!
See Updates
Contents
Figures
Related
Green Manufacturing Open
ISSN 2835-7590 (Online)
Follow Us

Portico

All published articles will preserved here permanently:

https://www.portico.org/publishers/oae/

Portico

All published articles will preserved here permanently:

https://www.portico.org/publishers/oae/