A feedback-based print quality improving strategy for FDM 3D printing: an optimal design approach

Fused deposition modelling (FDM) 3D printing, as a supporting technology in social manufacturing and cloud manufacturing, is a rapidly growing technology in the era of industry 4.0. It produces objects with a layer-by-layer material accumulation technique. However, qualitative uncertainties are the common challenges yet. In order to assure print quality, studying the error causing parameters and minimizing their effects are important. This paper presents a feedback-based error compensation strategy, which integrates a fuzzy inference system and a grey wolf optimization algorithm. The objectives are twofold. First, the possible errors in FDM 3D printing are discussed in detail and optimal error causing parameters are obtained in percentage. This is used to understand the effects of the printing errors in every phase of the 3D printing process. From the nine optimization configuration trials used, Config-6 that has 100 number of iterations and 60 wolves is selected due to its higher convergence speed and best fitness value. The integral absolute error (IAE) is used as an objective function and the global minimum is achieved in the iteration interval 86,100\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$\left [ {86,100} \right ]$\end{document}. The outputs of this optimization problem are used to achieve the next objective. Second, a closed-loop quality monitoring approach comprising of inner-loops and an outer-loop is taken. The three inner-loops are used to monitor the errors during pre-printing, printing, and post-printing, respectively. The outer-loop, on the other hand, is responsible for monitoring the aggregated errors in all the three 3D printing phases. The error compensation system simulation in Matlab is run for 10 s, and the results show that the “normal” range deformation factors are reached within less than 2 s for the inner-loops, whereas the outer-loop deformation factor is achieved within 2 s. The responses are within the acceptable time range.


Introduction
The advancement of science and technology is improving people's life quality. The personalized market is developing fast. The individual interest oriented commodities are favored by the customers. To accommodate customer satisfactions, the advanced manufacturing paradigms [1,2], such as social manufacturing and cloud manufacturing are emerging. Social manufacturing is a novel concept developed from social computing in 2012 [3,4], and it has been regarded as an innovative manufacturing Tariku Sinshaw Tamir and Gang Xiong are the co-first authors.
Zhen Shen zhen.shen@ia.ac.cn Extended author information available on the last page of the article. solution for the coming personalized customization era. The growing of manufacturing technology with the aid of networked systems, artificial intelligence and other enabling technologies opens a door to move mass production to mass customization.
Three dimensional (3D) printing, as a massively distributed manufacturing (MDM) technology, is a viable solution for customer interest-based fabrication [5]. The 3D printing possesses the following steps [6]. It starts from a 3D model. Then, the 3D model gets into a certain slicing algorithm to generate printing toolpath. Based on the defined toolpath, the part building is done [7]. The last step is postprocessing in which the printed part is further enhanced by the removal of support structures [8]. An arbitrary shape can be produced by fused-deposition-modelling (FDM) 3D printing, which is schematically shown in Fig. 1. FDM 3D printing, as a supporting technology in social manufacturing and cloud manufacturing, is a rapidly growing technology. It produces objects with a layer-by-layer material accumulation technique [9,10]. In FDM, the thermoplastic filament is moved from the extruder cold end to hot end, where it is heated until molten. Then the filament in molten state is fed through the nozzle to accumulate on the heated build platform in a layer-by-layer fashion until the finished part is produced. The advantages of FDM include simple technology, affordable system cost, and the ability to create complicated shapes and recommended manufacturing time. However, FDM 3D printing is suffering difficulties in controlling errors during phenomena such as nozzle clogging, material runout, excessive vibration, defects associated with cooling and heating, and under extrusion or over extrusion [11,12]. Problems affecting the quality of 3D prints are also reported in [13]. Those factors reduce the reliability of FDM technique that fundamentally affect the quality of a printed part. Surface roughness, porosity, geometric deviation, and poor interconnection between layers [14,15] are some of the 3D printing inaccuracies, which result in print quality issues. Optimization with regard to production speed, product accuracy and development cost is an active research area in 3D printing. This paper presents a mechanism to enhance print quality by incorporating a closed-loop control framework in 3D printing. An endto-end feedback-based error compensation mechanism is proposed to minimize the errors associated with every phase of the 3D printing process. Modelling the 3D printing process mathematically is the primary task before diving into modelling and optimization of a control framework. A parallel system or a digital twin takes use of a virtual representation of physical systems in an attempt to highfidelity modelling and simulations. It monitors, simulates, diagnoses, predicts, and controls the formation process and behavior of products in the real environment. The parallel system theory was proposed by Prof. Fei-Yue Wang for management and control of complex systems [16]. The first definition of digital twin was made by Michael Grieves for presenting product life cycle management (PLM). Rolle et al. [17] implemented a digital twin architecture focusing on industry 4.0. This industrial revolution is considered as a new technological wave transforming industrial environment dramatically [18]. Fuller et al. [19] wrote a review paper on digital twin enabling technologies and their challenges in the three application domains: manufacturing, healthcare and smart cities.
The rest of the paper elucidates the errors associated with every phase of the 3D printing process and proposes an end-to-end error compensation strategy. Section 2 presents the researchers' perspectives on mechanisms for improving print quality, and also introduces the use of control systems and optimization algorithms in industries. Section 3 outlines the detailed description of the types of errors in every phase of 3D printing. Section 4 proposes an end-toend 3D printing error compensation strategy. Section 5 presents results and discussions, followed by conclusions and perspectives in Section 6.

Related work
Most of the existing 3D printers lack automatic error compensation and quality monitoring mechanism. Therefore, nowadays, researchers aim to minimize the effects of 3D printing errors for assuring print quality. Various types of error compensation strategies are reported in the literature.
The following paragraph presents a detailed report on datadriven print quality monitoring system in FDM 3D printing.
Liu et al. [20] proposed an image-based closed-loop quality monitoring system for fused filament fabrication (FFF), in which the quality issues are mitigated via online processing parameter adjustment. Similarly, Faes et al. [21] integrated a two-dimensional laser scanner into a 3D printer machine, and monitored the process state variables online to improve the accuracy of printing. Ikeuchi et al. [22] developed a data-efficient neural network model in cold spray additive manufacturing (AM) to predict the geometry of the printed part. The proposed model was also used for modelling of other deposition-based AM technologies. Saluja et al. [23] proposed a convolutional neural network (CNN)-based warping detection system, which captures each of the print layers and extracts the corners, and the extracted region of interest is then fed to a CNN model to monitor the printing process. Cerro et al. [24] also developed a machine learning (ML) model to predict surface roughness of printed parts manufactured by using an FDM 3D printer. The application of ML in AM is discussed in [25][26][27], which is used to improve print quality. Different types of ML models [28] are also used for prediction purpose that can be applied in system maintenance scheduling. Moreover, in situ monitoring of FFF is reviewed [29,30], which then derives the FFF technology to the next generation of systems by enabling robust closed-loop control scheme in 3D printing.
Most of the aforementioned research works follow component-wise (i.e., application-specific) quality monitoring strategy to enhance the quality of products. Thus, those print quality monitoring approaches may not probably consider and generalize all the factors that affect the performance of the 3D printer. The quality of the printed object is affected by every phase of the 3D printing process. The objective of this paper is to present an end-to-end quality monitoring framework for minimizing the effects of the 3D printing errors and further improving the quality of the printed object. We consider the errors associated in pre-printing, printing, and post-printing. A feedback-based fuzzy inference system (FIS) along with the grey wolf optimization (GWO) algorithm is used for the error compensation framework. The following paragraphs present a detailed report on applications of FIS and GWO for controlling and optimization tasks in industries.
Fuzzy logic was introduced by Lotfi A. Zadeh in 1965 [31]. Since then it has been applied to model imprecise, linguistic and uncertain data [32,33]. Unlike conventional control schemes, whose controlling performance highly depend on the modelling accuracy of a physical system, a fuzzy inference engine is convenient when an analytical model is difficult to get while expert experience is available. Thus, it is a viable solution to extend the controlling capability of a fuzzy system in manufacturing industry under such conditions. Li et al. [34] proposed a fuzzy multi-criteria modelling method used in serviceoriented manufacturing for the problem of fuzzy scheduling. Similarly, Wang et al. [35] used a dynamic adaptive fuzzy system to evaluate the reliability of a manufacturing system with multiple production lines. Ding et al. [36] incorporated fuzzy rules into a regular petri nets in a self-adaptive software system that can autonomously modify its behavior at runtime in response to changes in the system and its environment.
The GWO algorithm is first coined by Mirjalili et al. [37]. It is a kind of meta-heuristic-based optimization method that mimics the special hunting behavior of a group of grey wolves living together. Mirjalili and his co-workers tested the performance of the GWO algorithm with 29 well-known functions and reported that the algorithm provided very competitive performance compared to other meta-heuristic optimization methods. Ghorpade et al. [38] used the GWO technique in automotive industry to position wireless sensor nodes optimally in the parking area for a vehicle parking system. Similarly, Yan et al. [39] magnified the performance of the GWO algorithm by benchmarking 23 widely used test functions over a known engineering design problem.

An end-to-end error analysis in FDM 3D printing
Before discussing an FDM 3D printing's error compensation method, it is critical to first explore the causes of errors related to the printing process. The main sources of errors are observed in three phases: pre-printing phase, printing phase, and post-printing phase. Beyond the aforementioned error sources, the 3D printing process is also affected by some external disturbances that result in printing errors. The summed up errors are reflected in the quality of the printed object. The general description of errors in every phase of the 3D printing process is illustrated in Fig. 2.

Pre-printing phase
File format conversion error and slicing error are the two known causes of printing errors under this stage. The surface of a 3D model is represented by STereoLithography (STL) file format with small triangles. But, this file format is not the exact representation of the model, which then results Slicing of the 3D model is the core and a very important task in the 3D printing process. Layer height is one of the slicing parameters that plays a major role for assuring the quality of the printed object. The thinner the layers are, the better the quality of the object will be. But, this results in lower printing speed. On the contrary, thicker layer yields higher printing speed. But, it leads to larger stepping effects in the printed object that reduces the surface quality. To create an optimal trade-off between fabrication time and surface quality, Mao et al. [42] proposed an adaptive slicing method to generate an efficient slicing plan. The proposed algorithm is based on dynamic programming and searches for the best printing direction. Similarly, Garashchenko and Zubkova [43] designed an adaptive slicing algorithm which adopts variable layer height by considering the angle between the surface of the object and the printing direction. Their algorithm can then reduce the printing time.

Printing phase
Processing parameters setting errors and machine errors are the major causes of printing errors in this stage. Processing parameters setting plays a crucial role for assuring the quality of the printed object. Optimized processing parameters may reduce printing errors and then enhance print quality. Print speed, print bed temperature, and extruder temperature are some of the main parameters that affect the quality of the 3D printing process [27]. Improper setting of those parameters may lead to extruder clogging, under extrusion, over extrusion, etc., which severely affect the material deposition process, resulting in poor print quality. Zhang et al. [44] proposed a method to predict surface roughness in extrusion-based AM by considering three processing parameters, including layer thickness, extruder temperature, and print speed. Similarly, Khanzadeh et al. [45] presented a ML-based porosity prediction scheme by using the thermal history of melt-pool for direct laser deposition. Frick [46] also discussed about how to avoid errors during desktop 3D printing.
Three factors are considered to study the machine errors. They can be listed as machine vibration, material deposition process, and 3D printer calibration. The 3D printer under run condition may experience vibration on its components that results in loss of the printing path. This is a severe issue that affects the structural geometry of the print object, resulting in print quality problems [47]. Another major factor in the 3D printing process is that during material deposition, the air gap between the print head of the extruder and the print bed must be in optimal distance. If the gap is large it may result in loss of contact between the layers, whereas the lower gap may cause deformations. Therefore, the proper calibration of 3D printer components prior to the printing action is needed.

Post-printing phase
Traditional planar slicing requires support structures to print overhangs and complex parts of the object [48]. After the completion of a 3D printing process, support structures need to be removed from the main part of the object. However, the quality of the printed part is significantly affected through the removal process. Zhao et al. [49] proposed a nonplanar slicing method for robotic AM. Their algorithm attempts to print 3D object without using support structures, which results in improved quality of the printed part as compared to objects printed with the planar slicing algorithm. Similarly, Ahlers et al. [50] used nonplanar slicing to minimize discretization effects in an AM process. Their work proposed a novel slicing algorithm for FDM 3D printing that combines planar and nonplanar layers, resulting in stronger and smoother object surfaces and increased printing quality. Moreover, various 3D printers having multiple degrees of freedom are reviewed in [51]. 3D printers that have many degrees of freedom have a high chance to move freely in any direction, which then improve the print quality by minimizing the effect of support structures.

External disturbances
One major problem in 3D printing is the bending of the printed part through cooling operation. An untimely cooling system may lead the material to bend in one direction that results in printed part quality issues [52]. An appropriate and timely cooling mechanism should be supplied into the 3D printing process in the time of material deposition. Thus, each of the printing layer sticks well to its successive layer and the strength of the final product can be guaranteed layer by layer.
Another factor on the quality of the printed part is the material properties of the filament. Metals, alloys, polymers, composites, bio-materials, ceramics, and concrete are the main known materials used in 3D printing. Thermoplastic polymers such as polyamide (PA), acrylonitrilebutadiene-styrene copolymers (ABS), polylactic acid (PLA) and polycarbonate (PC) are mainly in the form of filaments for FDM 3D printing [53]. The composite of polymers with fibers enhances the mechanical properties of the printed parts to be used as functional components and load-bearings [54][55][56].

Modelling of FDM 3D printer and control system design
The overall mathematical representation of an end-to-end FDM 3D printer with the incorporation of a feedback system is shown in Fig. 3. We try to give knowledge about the use of closed-loop-based quality monitoring in the domain of FDM 3D printing.
A feedback-based control system is designed for the compensation of errors to enhance the print quality in FDM 3D printer. The proposed error compensation framework is shown in Fig. 4. It consists of a control system, a model of 3D printer and an optimization algorithm. The control system comprises of inner-loops and an outer-loop, which represents the whole control framework. The aim is to control the pre-printing, printing, and post-printing processes independently. Thus, an independent control scheme [57,58] is applied and error analysis of the three phases is conducted in a parallel configuration. There are three innerloops having three FIS control schemes, FIS-1, FIS-2, and FIS-3, respectively. Those individual inner-loops control approaches are dedicated to analyze the effects of error causing parameters in each phase of the 3D printing process. The outer-loop, on the other hand, is used to compensate the summed up effects of errors by deploying another FIS scheme in hope of fitting the actual model with the target one. Normalization and average operations are involved in the inner loops of the control system. The individual normalization operator normalizes the model size into the interval [0,1]. The values after the summation blocks of the three inner loops are then denormalized to restore their original scales. Furthermore, since the outputs of the three inner loops are the model sizes, an averaging operator is used to get the average value of the three model sizes. As a result, the output of the summation and averaging block is fed into the comparator of the outer loop control system as an actual model size.
Three conditions are considered for analyzing the effects of errors on the print quality. The followings are the representations of error causing parameters, which can be evaluated in percentage. 1) During pre-printing phase, denoted by P 1 , 2) during printing phase, denoted by P 2 , and 3) during post-printing phase, denoted by P 3 . Error (E) and Integral of Error (I E) are fed to FIS, whereas the enlargement or reduction of the new model is the output from FIS. This applies   Fig. 4 The error compensation model for all FIS structures. The error is defined as the difference between the target model and the actual model. Therefore, the formation of the new model is a function of P 1 , P 2 , P 3 , E and I E, and it is expressed as: where M 1 * , M 2 * and M 3 * are the new model representations of the three inner-loops respectively, and M * is the new model representation of the outer-loop. The proposed Multi Input Single Output (MISO) FIS takes "Error" and "Integral of Error" as inputs and outputs the new model deformation factors as shown in Fig. 5. A trial-and-error procedure is applied to determine the range of fuzzy membership functions. A Mamdani type fuzzy inference system [59] is used. The FIS operations are as follows. "Min" for "And", "Min" for "Implication", "Max" for "Aggregation", "Centroid" for "Defuzzification" and triangular membership functions, are used. The twenty-five IF...THEN structured fuzzy rules are designed from the two linguistic input variables. Each has five linguistic values. Figure 5 presents the overall FIS structure that shows the interconnection of each linguistic values to form a set of fuzzy rules.
Linear-fitting, which is a universal modelling technique involving less amount of calculation, results in better printing accuracy as compared with non-linear-fitting modelling techniques [60]. Thus, one can intend to use it to represent the mapping between the new model and the actual one in an FDM 3D printer. It is mathematically written as: where y is the actual model size and x is the new model size. The two model sizes are the average value of the three points of the data at different positions of each side length. This kind of measurement is useful to consider the printed object inaccuracies of size, shape and printing position. The terms α and β are the two deformation factors. The aim is to find the best function matching between x and y. The new model versus the actual model relationships for the three individual inner-loops are expressed as follows, Thus, the sum of the outputs of the three inner-loops is fed to the outer-loop's FIS to solve the error compensation problem.

Optimization method
The GWO algorithm is applied to determine the optimal solutions for the three error causing parameters, P 1 , P 2 , and P 3 . This algorithm is a meta-heuristic-based optimization method with the inspiration of social hierarchy of the grey wolves [37]. Grey wolves have a habit of living, hunting, and eating together in their hierarchical order. The hierarchy's top level is alpha (α) wolf that monitors and leads the whole pack and decides the time to walk, hunt, sleep, and so on. Whereas, the hierarchy's second level is beta (β) wolf that helps α-wolf for decision making. The hierarchy's lowest level is omega (ω) wolf. The other category of wolves, Fig. 5 The FIS structure on the other hand, which is neither α-wolf, β-wolf, nor ωwolf is known as delta (δ) wolf. The grey wolves' hunting process comprises encircling and attacking.
The displacements of α, β, and δ wolves represent the other wolves' movements for hunting the prey, and the mathematical expression of encircling during the hunting process is given as: where D is the distance from the prey to the grey wolves, X P and X are the position vectors of the prey and the grey wolf, respectively, and t is the current iteration. C is a coefficient calculated using a random vector, r 1 . A is a factor located in the interval [−2, 2] determined by r 2 and m. The terms r 1 and r 2 are the two random vectors in the range [0, 1]. The term m is a decreasing vector with components from 2 to 0. The magnitude of A tells us the diversion or attacking towards the prey. If |A| > 1 wolves will diverge to search the ambient to detect the prey, while if |A| < 1 wolves will converge to attack towards the prey. The knowledge of α, β, and δ wolves' positions is used to compute the potential location of the prey. The higher-level wolves' (α, β, and δ) position updating algorithm is governed as: Finally, the wolves' positions will be updated as follows: It is known that α, β, and δ wolves are the three best search agents giving the first, the second, and the third fittest solutions, respectively. However, since an extra emphasis is not given yet for α solution, an emphasis coefficient is introduced in the expression of the search agent positions (8) to influence the other two best solutions. Thus, Eq. 8 can be modified as: where the term η is an emphasis coefficient conventionally given in the interval [1,2]. The GWO algorithm is clearly illustrated in Fig. 6.

The results and discussions of the optimization problem
This section discusses the simulation results of the optimization algorithm that gives the optimal error causing parameters in the three phases of the 3D printing process (i.e., pre-printing, printing and post-printing). The knowledge of the optimal error causing parameters is useful to make a decision about which printing stage needs further research for enhancing the print quality. For example, if the possibility of the pre-printing error percentage is more than the other two printing phases, one can decide to do research on a mechanism to reduce the effect of errors associated in the pre-printing phase. And the same scenario applies for the other two cases, i.e., printing and post-printing phases. The GWO algorithm is used to determine the optimal error causing parameters. It applies the following design specifications. The initial position of each wolf is generated based on uniform random distribution. The α-wolf's Fig. 6 The GWO algorithm emphasis coefficient is chosen as η = 1.2. Even though it is very difficult to decide the maximum number of iterations and the maximum number of populations for populationbased optimization problems [61], nine configuration trials are considered as shown in Table 1. And the one with the best fitness value is chosen. Table 2 shows the fitness best solutions for all types of configurations. The integral absolute error is chosen as a standard objective function. It is denoted as a print accuracy index (P AI ), which is in fact a metric for our optimization model, and it can be mathematically expressed as: where e (t) is the difference between the target model and the actual model. Our optimization problem is to state the objective function with the possible constraints and solve for the minimum to find the optimal error causing parameters. It is described as follows, where P 1 , P 2 and P 3 are the three error causing parameters during pre-printing, printing, and post-printing, given in percentage, respectively. The ranges are in the interval [0, 1]. It is noted that the model error is the difference between the target model and the actual model. And the actual model is affected by the three error causing parameters and some other external disturbances. These parameters affect the integral absolute error indirectly. Therefore, the three error causing parameters are considered as the possible constraints of the objective function.   Figure 7 shows the convergence curve of Config-1, Config-4 and Config-7. The total number of iterations is taken as 50 for different numbers of wolves. Config-4 achieves better fitness solution and higher convergence speed as compared with the other two configurations. Similarly, Fig. 8 presents the convergence curve of Config-2, Config-5 and Config-8 for 75 iterations for different numbers of wolves. From the three configurations, Config-5 has a better fitness value and a higher convergence speed. Config-3, Config-6 and Config-9 are operated with 100 iterations for different numbers of wolves, which are shown in Fig. 9. The best fitness value and highest convergence speed are observed for Config-6 compared to the rest two configurations.
From the nine configuration trials, it is observed that Config-6 that has 100 iterations and 60 wolves achieves the best fitness value and highest convergence speed. The global minimum is observed in the iteration interval [86, 100]. Therefore, Config-6 is selected for our optimization problem. With this configuration, the optimal error causing parameters are evaluated as shown in Fig. 10. From the figure, the percentage values for the three parameters, i.e., P 1 , P 2 and P 3 are given as 32.6%, 16.63% and 4.99% respectively. This means that the print quality of the 3D printing system is affected by the errors associated in 32.6% during preprinting phase, 16.63% during printing phase, 4.99% during post-printing phase, and the rest is due to external disturbances. The results give us information to decide which phase of the 3D printing process needs a further quality monitoring mechanism. In the present scenario, it is observed that the errors associated with the pre-printing phase have a higher probability to influence the print quality. Although more focus is necessary in the pre-printing phase, it is recommended to investigate a general error compensation framework that considers all the 3D printing phases. A feedback-based fuzzy system is introduced to compensate the effects of errors in the 3D printing process. The simulation results of the proposed error compensation mechanism are presented next.

The closed-loop results analysis and discussions
This section discusses the simulation results of the proposed error compensation mechanism. It presents detailed  analysis of the results of the controlling performance of FIS in both the inner-loops and the outer-loop. Figure 11 shows the three deformation factors of the inner-loops. These deformation factors tell us about the reduction or the enlargement of the print object. The deformation factors of all the three inner-loops, i.e., α 1 , α 2 and α 3 are computed by setting the range of β 1 , β 2 and β 3 in the interval [−0.01, 0.01]. Settings of the three β ranges are based on conventions in hope of reducing deformation of the print object. The deformation ranges are named as "reduced-large", "reduced-small", "normal", "enlarged-small" and "enlarged-high" whose values in units are set as , respectively. The error compensation system simulation in Matlab is run for 10 s. From Fig. 11, it is observed that after 1.2 s the first two deformation factors are found in the interval [0.2, 0.6] and [0.6, 1] respectively, whereas, the third deformation factor is found in the interval [0.6, 1] after 3 s. The responses are in fact under the acceptable deformation range. Figure 12 shows the model errors of the three inner-loops. It is clear that the first two individual errors are approaching to zero after 1.2 s, whereas the third individual error is approaching to zero after 3 s. Similarly, the deformation factor and the model error of the outer-loop is presented in Fig. 13. It shows that the model error is down to zero after 2 s and at the same time the deformation factor is found in the interval [0.8, 1], which is within the "normal" range and acceptable value.
It is observed that the integration of the fuzzy system and GWO algorithm in the 3D printing process gives a promising result by minimizing the effects of the error causing parameters, and hence it improves the print quality. One can come with an idea that a closed-loop-based quality monitoring approach is a viable solution to guarantee the Fig. 12 The model errors for the inner-loops Fig. 13 The deformation factor and the model error for the outer-loop print quality in the 3D printing process. Last, it can be said that considering all the possible error causing parameters and the nice modelling of the 3D printing process results in better control performance. In fact, it is very difficult to explore all the errors associated in the 3D printing process due to a lot of design constraints. And also, eliminating all the errors at the same time is not a simple task. It is recommended to consider the most influential errors in the print quality and then to design a suitable error compensation framework.

Conclusion
Knowing the negative effects of printing errors in the quality of the printed object, in this paper we propose a feedbackbased error compensation strategy that considers the three phases of the 3D printing process: pre-printing, printing, and post-printing. The objectives of this paper are twofold: (1) To identify the type of errors in every phase of FDM 3D printing. This means that the errors in the three phases of the 3D printing process are summarized. (2) To propose an end-to-end error compensation strategy by designing a feedback-based fuzzy inference system. The former is used to know the performance of the 3D printing process in the presence of the possible error causing parameters. The latter is dedicated to determining the optimal error causing parameters by integrating FIS and GWO algorithms. The knowledge of optimal error causing parameters is used to make a decision about which phases of the 3D printing process need further monitoring to enhance the print quality. For example, if the print quality is possibly affected by the errors associated with the pre-printing phase, one can make an effort to minimize the errors in this phase, and the same scenario applies for the printing and post-printing ones.
From the nine optimization configurations adopted, Config-6 that has 60 wolves and 100 number of iterations is selected due to its best fitness value and higher convergence speed. The global minimum is found in the iteration interval [86, 100]. The proposed feedback-based fuzzy system has a promising result by generating the deformation factors in a normal range within less than 2 s for the inner-loops. An outer-loop generates the deformation factor within 2 s. Last, it is observed that the paper demonstrated how a closed-loop-based control system is used in 3D printing to minimize the effects of printing errors. However, all the results are simulation-based. The results can be further improved by refining the control and optimization model. The next step is to do real experiments and investigate the performance of the proposed error compensation approach in a real scenario. Data availability The authors confirm that the data supporting the findings of this study are available within the article.