Abstract
Right-first-time production enables manufacturing companies to be profitable as well as competitive. Ascertaining such a concept is not as straightforward as it may seem in many industries, including 3D printing. Therefore, in this research paper, a right-first-time framework based on the integration of fuzzy logic and multi-objective swarm optimization is proposed to reverse-engineer the radial based integrated network. Such a framework was elicited to represent the fused deposition modelling (FDM) process. Such a framework aims to identify the optimal FDM parameters that should be used to produce a 3D printed specimen with the desired mechanical characteristics right from the first time. The proposed right-first-time framework can determine the optimal set of the FDM parameters that should be used to 3D print parts with the required characteristics. It has been proven that the right-first-time model developed in this paper has the ability to identify the optimal set of parameters successfully with an average error percentage of 4.7%. Such a framework is validated in a real medical case by producing three different medical implants with the desired mechanical characteristics for a 21-year-old patient.
Keywords
Introduction
Nowadays, additive manufacturing, as a key element of Industry 4.0, has been extensively employed in various areas such as medical, aerospace, manufacturing and tissue engineering [25]. This can be attributed to its ability to (i) produce complex and monolithic products with many features; and (ii) flexibly amend designs [4]. Although the working principles of the different additive manufacturing technologies are different, their essence of adding materials in a layer-upon-layer or surface-upon-surface fashion is, in general, the same [25]. The different additive manufacturing techniques consist of fused deposition modelling (FDM), resign-printing and laser sintering [13, 27]. Each technology has its own applications and strengths and limitations. Among them all, FDM is the most common technology employed in many applications [1]. Therefore, a huge body of research has focused on analyzing, modelling and optimizing this technology and the various thermoplastic polymers that can be printed [30].
Various papers have investigated the printability of various thermoplastic polymers (e.g., Polyether-ether-ketone (PEEK), Polyether-ketone-ketone (PEKK) and Polycaprolactone) and the features of the 3D printed products for biomedical applications [30]. For example, both Polylactic acid (PLA) and hydroxyapatite reinforced PLA were printed using FDM to produce scaffolds and to analyze their mechanical, biocompatibility and biodegradability properties [31]. To enhance the obtained properties of scaffolds without affecting the rheological properties, nanohydroxyapatite and polyvinyl alcohol were added to PLA to obtain a structure that is similar to bones [8, 15]. In addition, the PEEK material and the carbon-enhanced version were employed to print different orthopaedic and dental parts [17]. In addition to the various properties of the materials printed, the operation and the machine parameters have been examined [22, 25]. These parameters should be determined and optimized carefully in order to obtain the desired characteristics of the 3D printed products. Thus, many research papers have presented different experimental as well as statistical algorithms to define and optimize these parameters [29]. A comparative analysis was, for example, conducted to estimate the interrelationships among material- and machine-related parameters and the characteristics of the parts printed [19]. Likewise, the correlation analysis and the analysis of variance were utilized to statistically examine the effects of various parameters (e.g., orientation) on the characteristics of parts printed using different types of materials [9, 24]. Furthermore, image correlation was employed to demonstrate the direct relationship between the material thickness and the characteristics of printed parts [35]. Likewise, several research studies have been previously devoted to systematically mapping the FDM variables to the features of the printed parts. For different materials, the artificial neural network was, for instance, developed to map various FDM parameters to the strength of the printed parts [16, 36]. In addition to improving the generalization abilities of the neural network, it was combined with the dimensional analysis conceptual modelling to enhance the understanding of the FDM process [21]. Moreover, a radial based integrated network was proposed to simulate the FDM process and to systematically and accurately anticipate the characteristics of 3D printed parts [1]. Likewise, fuzzy logic systems were utilized to simulate the FDM process and to extract a linguistic understanding [32].
The many research studies in the related literature have provided a good understanding of 3D printing, in particular the FDM process, and presented various statistical and intelligent models that can be utilized to anticipate the features of the printed specimens. However, to the best of our knowledge, none of these studies has investigated the utilization of a right-first-time structure to identify the optimal 3D printing parameters that need to be used to 3D print parts with required characteristics, this being due to the fact that inverting highly nonlinear and complex models may not be a straightforward task that leads to a unique set of FDM parameters. Therefore, in this research paper, the radial based integrated network that was presented in AlAlaween et al. [1] is utilized in a right-first-time framework. Such a framework is proposed to identify the FDM parameters that should be used to 3D print specimens with the desired mechanical characteristics. In general, inverting highly nonlinear models usually leads to sets of parameters particularly when conflicting objectives need to be considered. Therefore, multi-objective optimization paradigms are commonly employed to identify a set of optimal solutions. Many multi-objective paradigms such as evolutionary and genetic ones have been implemented to find such a set of optimal solutions [2]. Because of its computational efficiency, a stochastic-based particle swarm optimization algorithm has been widely utilized [18, 26]. However, all multi-objective optimization algorithms including the particle swarm optimization cannot identify a single optimal solution. Many research papers have addressed this issue by presenting various methods [33]. However, there is no standard method that can be employed to provide the single/global optimal solution and replace the Pareto optimal set [3]. Therefore, the proposed right-first-time structure integrates the stochastic multi-objective particle swarm optimization and fuzzy logic in a way that can (i) effectively invert the radial based integrated network that was developed in AlAlaween et al. [1]; and (ii) systematically identify the optimal set of the FDM parameters that need to be used to print 3D parts with the desired characteristics according to defined criteria. The right-first-time framework is then validated using a real medical case where three medical parts need to be produced with desired characteristics and then implanted in a 21-year-old patient. This paper is organized as follows: Section 2 discusses the experimental work. Section 3 proposes the right-first-time framework and presents the theoretical background of the radial based integrated network, and the integration of particle swarm optimization and fuzzy logic. The implementation and the results obtained are summarized in Section 4, whereas Section 5 presents the medical case and the validation of the proposed framework. Concluding remarks are finally discussed in Section 6.
Experimental work
High-performance polymers, namely, PEEK and PEKK (3DXTECH Additive Manufacturing, Grand Rapids Michigan, USA) were utilized to print ASTM-D638 specimens. A FUNMAT HT printer (INTAMSYS Technology Inc., Minneapolis, USA) was employed to print these specimens using different sets of FDM variables. The software used in this printer to convert the design model to a GCODE format was InstamSuite 3.6.2. Eight FDM variables that can significantly determine the mechanical characteristics of the ASTMsD638 specimens and, thus, the properties of printed parts in general, are investigated in this paper. Such parameters with their levels are shown in Fig. 1. These parameters were examined, in this research work, using partial factorial design of experiments designed according to the Taguchi L18 array. Therefore, 36 experiments were performed for PEEK and PEKK. To ensure measurement repeatability, each one of these experiments was repeated three times.

The fused deposition variables and their levels.
Once the printing of the standard specimens was completed, they were separated from the glass plate of the FUNMAT HT printer to cool down. Based on the manufacturer’s recommendations, PEKK parts were annealed. All the printed specimens were then characterized in terms of their mechanical characteristics. Instron (SHIMADZU, USA) and the micro Vickers hardness tester (HTMV 2000M, echo LAB, Italy) were used to measure the ultimate tensile strength and elongation, and the micro-hardness, respectively. The average of the three measurements for each experiment was then determined. While measuring the strength and elongation, it was noted that the specimens’ fracture was different in terms of the patterns and locations [1]. In addition, the mechanical behaviours of the printed specimens were different when compared to those of the original filaments. To elucidate, the ultimate tensile strength and the elongation values have decreased and increased, respectively, after 3D printing PEEK and PEKK. Furthermore, the FDM variables differently affected these characteristics of the specimens made using PEEK and PEKK. Figure 2 shows the correlation coefficients among the investigated parameters and the mechanical characteristics. In addition to the reasonable correlation values, such a figure shows that the relationships among them depend on the materials used. Furthermore, the print orientation has direct and strong inverse relationships with elongation for PEEK and PEKK, respectively. Also, the raster width, for instance, directly and inversely affected the tensile strength and elongation and micro-hardness, respectively. The speed has almost a negligible effect on micro-hardness for PEEK but a considerable one for PEKK. Since the infill pattern is considered to be a categorical variable, it was statistically analysed by employing the analysis of variance. It was noticed that it has considerable effects on all the mechanical characteristics of the two materials with p-values of less than 0.05.

The correlation coefficients for (a) Strength; (b) Elongation; and (c) Micro-hardness.
Being able to develop cost-effective customized products, reducing waste, as well as enhancing supply chain and inventory management are features that companies in different industries strive to achieve. This can be attributed to their potential advantages that make companies profitable as well as successful. In addition, they allow them to gain leverage in today’s highly competitive environment [6, 7]. Ascertaining such features systematically may not be as simple as it appears at the first glance, in particular, for those industries whose (i) processes are highly dimensional, and (ii) products affect customer health and well-being. One of these industries is additive manufacturing or the so-called 3D printing whose various processes, particularly the FDM process, are highly dimensional because of the many printing parameters that impact the quality attributes of 3D printed products. Likewise, the FDM process has been recently used to produce products in the medical and tissue engineering areas. Thus, the quality attributes of the products produced need to be as defined. In addition, the relationships among the printing parameters and their interactions and the quality attributes of these products are highly nonlinear. Therefore, this right-first-time structure is developed in this paper to deal with the aforementioned challenges and, thus, produce 3D printed parts with predefined quality characteristics right from the first time.
Figure 3 is a schematic diagram of the proposed right-first-time structure. Such a diagram consists of several stages. First, a set of experiments is conducted to collect the data required to build a data-driven model. The experimental work conducted in this research is briefly summarized in Section 2, where the effects of the eight parameters on the mechanical characteristics were examined. Second, a radial based integrated network, as a powerful data-driven model, was established to (i) represent the relationships between the printing parameters and the mechanical characteristics; and, thus, (ii) be used to predict these mechanical characteristics for any set of printing parameters that are within the investigated range. Finally, such a network was exploited in the reverse-engineering framework that is based on an optimization algorithm integrating PSO and fuzzy logic. Therefore, such a framework can identify the optimal set of the FDM printing parameters that need to be used to produce 3D printed parts with predefined mechanical characteristics. In other words, a 3D printed part with the predefined properties is produced right from the first time. It is worth mentioning that the presented structure is based on supervised algorithms, where the mechanical characteristics are required for the reverse-engineering framework. The radial based integrated network and the proposed optimization algorithm, which integrates PSO and fuzzy logic, are briefly presented in the following sub-sections to help readers in getting to grips with their theoretical backgrounds.

The newly proposed right-first-time framework for the FDM process.
Nowadays, data-based models have been used in various areas including, for example, pharmaceutics, manufacturing, diseases as well as automobiles [1, 6]. Such models, as the name indicates, and their predictive performances rely on the data utilized to develop them.
To elucidate, the data used to develop data-driven models need to be representative in terms of their distribution and amount otherwise biased and inefficient models may result from unrepresentative data [7]. Acquiring such data is considered to be one of the challenging tasks in developing these models in particular, for the FDM process. This is because of the different FDM parameters that affect the features of the 3D parts, and their highly nonlinear interactions and relationships with the characteristics of these parts [25]. Thus, an integrated network based on radial basis functions is introduced to model such a process in two phases. In the first phase, a number of radial basis function (RBF) paradigms are utilized to simulate the FDM process by mapping its inputs to the mechanical characteristics. It is worth noting that these RBF networks may have different numbers of RBFs in the hidden layer and different values for their parameters. In the second phase, the outputs of these functions are mapped again to the mechanical characteristics leading to the predicted ones. Such two phases lead to a dense paradigm in a highly dimensional convex space and, as a result, it can (i) represent the possible relationships in the data available; (ii) improve the predictive performance; and (iii) deal with a limited number of sparse data points [1].
The schematic representation of the radial basis integrated network is presented in Fig. 4. First, the FDM parameters represented symbolically by the vector (

The schematic diagram of the integrated network [1].

The radial based integrated network performance for the strength with a 90% band [1].
Nature-inspired optimization paradigms that include, for instance, genetic and evolutionary algorithms have hitherto received a lot of interest. Such paradigms have been presented to deal with nonlinear, continuous/discrete and multimodal optimization problems [33]. Among them all, PSO algorithms, as computational ones that imitate the motion of fishes and birds, can be considered to be the most common ones. This can be attributed to their effectiveness in estimating a global optimum and their computational efficiency in terms of fast convergence [28]. In general, PSO problems can be divided into single and multi-objective optimization problems. Many PSO paradigms have been utilized to deal with single objective problems. The good results obtained have led to extending them to solve multi-objective optimization problems [28]. In contrast to single objective optimization, solving multi-objective ones leads, in general, to a set of optimal solutions known as Pareto optimal, non-inferior or non-dominated set. Defining a single optimal solution from such a set has been an active research topic. Although many paradigms including, for instance, weighted sum and ranking approaches, have been proposed, defining a single optimal solution remains an attractive research topic [2]. Therefore, a new optimization paradigm based on embedding fuzzy logic in the PSO model is presented to solve multi-objective optimization problems. This can be attributed to the fact that fuzzy logic can handle uncertainties in a natural and efficient way [24].
In general, unconstrained multi-objective optimization can be expressed as follows [14]:
The performance measures for the integrated networks
The radial based integrated network, which briefly summarized in Section 3.1, was employed in a reverse-engineering structure to allow the right-first-time manufacturing of 3D printed parts with the required mechanical characteristics using the optimization algorithm presented in this paper. First and based on the experimental data, the radial based integrated networks with 10 RBF networks and an RBF network in the first and second phases, respectively, were developed to map the printing parameters summarized in Fig. 1 to the three mechanical characteristics investigated, and, then, to predict these characteristics. The performance obtained for the tensile strength, as an example, is shown in Fig. 5. In addition, the coefficient of determination (R2), the root mean square error (RMSE), the mean absolute percentage error (MAPE), scatter index and bias for all the networks are summarized in Table 1, which shows good predictive performances for all the mechanical characteristics. For comparison purposes, the RBF model, the artificial neural network (ANN) and fuzzy logic system (FLS) were also developed to the map the 3D printing parameters to the three mechanical characteristics. For the ultimate tensile strength, the overall performance measures in terms of [R2, RMSE] for the RBF, ANN and FLS are [0.82, 8.83], [0.78, 10.91] and [0.80, 9.49], respectively. For elongation, the overall performance measures in terms of [R2, RMSE] for the RBF, ANN and FLS are [0.73, 5.48], [0.69, 6.4] and [0.74, 5.8], respectively. For micro-hardness, the overall performance measures in terms of [R2, RMSE] for the RBF, ANN and FLS are [0.68, 2.83], [0.68, 2.84] and [0.71, 2.78], respectively. These performance measures for the different models show that the radial based integrated network outperformed these well-known data-based models.
Since three mechanical properties were investigated, a multi-objective PSO optimization model was employed. Therefore, the optimization mathematical model can be expressed as follows:
Such a mathematical model was solved using the algorithm presented in Section 3.2, where multi-objective PSO was first used to identify the Pareto optimal set by randomly initializing 300 particles for 300 iterations. Figures 6–8 show some examples of the behaviours of these three objectives in the search area. It is apparent that these three objectives are in conflict. To illustrate, improving one of them may deteriorate the other objectives. For example, increasing the print speed and decreasing the infill density decrease the strength objective but increase the elongation and the micro-hardness objectives. It is also apparent that the behaviours of the objectives are not as continuous as it was expected. This can be attributed to the effect of the two discrete variables, namely, the type of materials and the infill pattern, on these three objectives.

Examples of the 3D surfaces for the ultimate tensile strength objective.

Examples of the 3D surfaces for the elongation objective.

Examples of the 3D surfaces for the micro-hardness objective.
The number of optimal solutions in the Pareto optimal set is relatively large. Therefore, Fig. 9 presents the Pareto set that was obtained by solving the model presented in Equation (8).

The Pareto solutions defined by the multi-objective PSO algorithm (the optimal solution obtained by fuzzy logic is highlighted by the red arrow).
Once such a set was identified, the optimum point can be selected. Many criteria can be used to define such a point depending on the preferences and priorities of users. For the right-first-time model, the performance of the radial based integrated network in the area examined was considered to be the main criterion in selecting the single optimal solution. Therefore, the FDM printing parameters and the error values resulting from the network were employed to identify the network’s performance in the space. Such a performance can be grouped into three clusters, namely, Unsatisfactory, Satisfactory and Excellent. For the strength, the performance of the radial based network in one of the space areas, as an example, is shown in Fig. 10. Such a figure states that the performance of the radial based integrated network is satisfactory when the material is PEEK, infill pattern is grid, layer thickness is low, infill density is low, print speed is high, number of shells is high, cooling rate is low, layer orientation is medium and raster width is low.

An example of the performance of the integrated model in one of the space areas.
For the Pareto optimal solutions identified in Fig. 9, the membership values were determined using Equation 6. It is worth mentioning that each solution has three membership values for each cluster for the three mechanical characteristics. Such membership values can be integrated by employing various fuzzy operations.
In this research work, the product operation was used. The solution of the Pareto set that has the maximum membership value was chosen to be the single optimal solution. Therefore, the FDM parameters that need to be used to produce 3D printed specimen with an ultimate tensile strength value of 100MPa, an elongation value of 22% and a micro-hardness value of 30 are presented in Fig. 9 for PEEK. This optimal point is marked by the arrow in Fig. 9, where it is apparent that slight changes in these values may deteriorate at least one of the three objectives. The FDM parameters for such a point are listed in Fig. 9. Three standard specimens were printed using the optimal set of parameters identified (or close value to them). The values of the ultimate tensile strength, elongation and microhardness of these specimens were experimentally measured. The average values of the ultimate tensile strength, elongation and microhardness are 95.4MPa, 22.9 and 28.3, respectively. It is noticeable that the right-first-time model developed in this paper has the ability to identify the optimal set of parameters successfully with an average error percentage of 4.7%.
Following Research Ethics Board approval and in order to validate the right-first-time framework proposed in this research work, three medical implants for a 21-year-old patient suffering from Hemifacial Microsomia, as shown in Fig. 11, were produced using 3D printing. Clinical examination revealed an underdeveloped left side of the face and malformation of the left ear lobe without hearing problems. The zygomatic bone and the ramus of the mandible on the ipsilateral side were smaller in size compared to the ones on the right side. In addition, he has weak left-side facial muscles. It is worth mentioning that a mandibular distraction osteogenesis surgery was performed for the patient a year ago leading to an incomplete correction of facial asymmetry. Therefore, implants are required in such a case. A CBCT x-ray was taken for the patient and represented in the Digital Imaging and Communications in Medicine (DICOM) format. Various 3D design programs, namely, Meshmixer®, Slicer® and Blender® were then employed to design patient-specific implants by mirroring the non-affected side. Such implants were printed by the FUNMAT HT 3D printer using PEEK, as a biocompatible material. The surgeons at The University of Jordan Hospital defined the values of the mechanical characteristics of the implants (i.e., the ultimate tensile strength value of 105MPa, an elongation value of 20% and a micro-hardness value of 30).

The patient scans and the two implants produced using the optimal set.
The right-first-time structure was utilized to identify the FDM parameters that need to be used to print the implants to obtain the required values of the mechanical characteristics. Therefore, the framework was implemented as described in Section 4. The optimal set of the FDM parameters is summarized in Fig. 11. By using these parameters (or close value to them), the implants were produced using PEEK. The three parts implants are shown in Fig. 12. It is worth noting that medical-grade PEEK was printed to produce these implants. Since these implants need to be attached to the zygomatic and ramus of mandible bones by Titanium screws, screw holes were predrilled in the implants at different locations as recommended by the surgeons. Such a step was followed by sterilizing the implants using autoclaving technique. Such sterilized implants were then implanted in the patients during a 4-hour operation, in which the patient was under general anaesthetic. Figure 13 shows the implants attached to the zygomatic and ramus of mandible bones during the surgery.

The three customized implants printed for the patient.

The implants attached to the zygomatic and ramus of mandible bones.
A right-first-time structure based on the integration of fuzzy logic and multi-objective particle swarm optimization was proposed to reverse-engineer the radial based integrated network developed to represent fused deposition modelling (FDM). The proposed structure was successful in identifying the optimal set of the FDM parameters that need to be used to produce 3D printed parts with predefined values of the mechanical characteristics. It was noticeable that the radial based integrated network developed to represent the FDM process outperformed three well-known models (i.e., The radial based function, the artificial neural network and the fuzzy logic system). Likewise, the right-first-time model developed in this paper was able to identify the optimal set of parameters successfully with an average error percentage of 4.7%. The proposed framework was validated by printing 3D medical implants for a 21-year-old patient suffering from Hemifacial Microsomia. In summary, the proposed framework is truly promising in the additive manufacturing industry, and, as a result, it can have several advantages in terms of meeting the stringent regulations in some of its applications, in particular, healthcare manufacturing. In such an application, such a framework can be used to produce cost-effective customized implants/products (facial or otherwise) in a way that can minimize time-to-market.
Footnotes
Acknowledgments
The authors would like to acknowledge the financial support from The Royal Academy of Engineering (UK) and Industrial Scientific Research and Development Fund-The Higher Council for Science and Technology (Jordan) under Grant TSP1134.
The 4th author would like to thank The American University of Kuwait for facilitating his work on this research paper during his sabbatical leave in the academic year (2021/2022).
