1 Introduction

Additive Manufacturing (AM) mechanism is an inexpensive replica for the traditional manufacturing strategy since those strategies are difficult to design procedures are broadly complex as well as terrible using traditional replicas [1]. In addition, AM models are continuously utilizing Fused Deposition Modeling (FDM) [2]. Moreover, the designing process of 3D digital statistics is to generate the layer-by-layer model, which is termed, AM [3]. In FDM process the polymer substance melted in the warming chamber and pushed into champers system with the help of tractor wheel [4]. Finally, the extruded melted polymer is transferred to bed from nozzle which is programmed mechanism to construct up through the print, and finally, fused layers were formed as the finishing line [5].

FDM with ML architecture used in the current model is demonstrated in Fig. 1. In FDM technology, many limitations were recorded due to inconsistency in process repeatability and part characteristics [6]. The part characteristics are influenced by slicing parameters, building orientation, temperature conditions of FDM manufacturing process [7]. To achieve different aims in terms of part quality characteristics, build time, mechanical properties, cost etc. various influential parameters like nozzle diameter, build orientation, flow rate, raster angle, extrusion temperature, layer thickness, print speed, infill percentage, air gap can be changed [8]. The selection of best combination of optimized parameters is challenging task. Also, to carrying out a greater number of experiments or 3D simulations is inefficient to meticulously optimize the FDM process which is possible by integration of ML with FDM process [9]. Moreover, the AM procedure includes a lot of data issues and factors, which are estimated based on machine learning (ML) models [10]. After completion of manufacturing, DL and ML techniques are used for validation purposes [11]. In present architecture supervised deep learning algorithm is used which utilizes the experimental data for training the model. Experiments are carried out adhering to standard procedures with predefined design variables as an input to neural model. Further, the classification-based algorithm is validated to gain the best prediction accuracy in terms of mechanical properties to achieve best combination of process parameters and can predict the results under random circumstances. The detailed explanation about execution of proposed architecture is elaborated in further sections.

Fig. 1
figure 1

FDM with ML architecture (Developed by authors)

In past, several techniques have been introduced in various methodologies like fuzzy systems [12], automated processing [13], decision tree [14] and many more. Literature reveals that the algorithm was developed for fabrication of part dimension optimization and modelling scheme [15]. To analyse the design properties, the artificial neural network (ANN) was used [16]. In a study, the comparison of response surface methodology (RSM) and ANN was analysed for prediction of tensile properties of friction stir-processed surface composites, and concluded that the ANN model’s predictive capability is far better than the RSM model in regards with tensile strength [17]. Ashutosh Kumar Gupta et al. investigated the effect of process parameters on dimensional accuracy of FDM printed parts and results show that ANN model predicts the results with very less error in comparison of existing models [18]. Jayant Giri et al. optimized the critical process parameters like layer thickness, air gap, raster width, build orientation, raster angle, and the number of contours for enhancing the properties of FDM printed part such as tensile strength, surface roughness, and build time using ANN. The researchers were found that the tensile strength was increased with zero-degree build orientation of the part, lesser layer thickness and higher raster width [18]. Literature have investigated the effect of FDM 3D printing process parameters on the surface roughness of printed parts using ANN Hybrid algorithm and RSM, concluded that 0.3 mm of nozzle diameter achieves the best surface quality [19]. Castro et al. have introduced the 3D printing strategy for a web-based replica to accelerate the pharmaceutical application of the ML model [20]. In another study, the researchers were developed the adaptive fuzzy logic to analyse the parameters, which are used in the 3D-based FDM printing substances [21]. In the present study, the fuzzy logic is initiated to the neural model to monitor the parameters of the 3D printing. Those techniques provide poor results due to the design complexity. Therefore, the current work has aimed to construct an efficient deep neural network to value the designed products in terms of problems, complexity scores. This helps to improve the prediction system in the future.

The structure of this work is discussed as follows; Sect. 2 describes the experimental details related to proposed system and adopted research methodology. Section 3 explain the proposed technique deep neural network structure, tuning and implementation. Section 4 explore the results and discussion with comparison of obtained outcomes with existing work. In the last Sect. 5, the conclusion, limitation, and future scope of research work is discussed.

2 Research gaps

Nowadays, AM process is incorporate with several real-time applications and rapidly increased in many fields. Considering other methods, the AM with FDM printing technology is low cost and easy to use. However, compare the existing techniques various complexity and lower prediction capabilities are reviewed [22, 23]. In addition, mismatch connection during the designing process may reduce the prediction accuracy rate; therefore, the prediction is very important regarding those issues and parameter selection. The main aim of this ML with AM technique is to select the best parameter combination in the 3D printing design. During the printing process, the input data is carried randomly then it leads to cause the overflow issue. These problems have been motivated this present research work.

To bridge the research gap and to enhance the performance characteristics of FDM by providing strong interface between AM & ML, various FDM areas where ML applications have been implemented is shown in Fig. 2. The pie chart shows almost 75% studies have been carried out related to quality monitoring system, mixed studies, and surface roughness in the FDM process. It is evident from the chart that there is scope to analyze the effect of process parameters to improve mechanical properties of parts produced by FDM process using machine learning applications.

Fig. 2
figure 2

ML applications in FDM areas [2]

3 Experimental details

The adopted research methodology in this study is shown in Fig. 3. The key motive of utilizing ML in AM is to find out the best combination of process parameters and analyze the mechanical properties of the proposed design. In the present research work, the design variables are based on nozzle diameter, layer thickness, print speed, distance from each print line used as an input parameter to train the developed model in Deep Neural Network. Their level values are represented in Table 1. The selection of values was based on previous literature and customized 3D printed FDM machine. Rest parameters were kept constant is given as per Table 2. Full factorial experiments with 4 parameters and 4 levels, 4 × 4 × 4 × 4 = 256 has been carried out for each output value in terms of tensile and compressive strength respectively, as more data requirement to execute deep neural network and to attain the best prediction accuracy for the continuous monitoring process.

Fig. 3
figure 3

Adopted research methodology

Table 1 Experimental parameters and their level values
Table 2 Constant experimental parameters

The test specimens have been manufactured with PLA Material with 1.75 mm diameter with predetermined dimensions strictly adhering to ASTM 638 (type IV) and ASTM D790 for checking tensile, compressive strength respectively. Test parts were fabricated using FDM Printer D 300 3DeoMetry Make: Build 300 X 300. Drafting of tested parts was done using CATIA 5.0 software as shown in Fig. 4.Ultimaker Cura 4.0 was used for slicing & generating G codes to adjust the mentioned parameters precisely. Tensile testing was carried out using UNITEK 94100 make universal testing machine and compressive strength testing on Zwick type (1474). Experimental results were classified accordingly in two classes. Class 1 for good connection status and Class 2 for others. Seventy percent of experimental data will be used for training the model and rest for testing of model. Proposed DNN model and validation part is further elaborated Sects. 3 and 4 respectively.

Fig. 4
figure 4

CAD models for test specimens a Tensile as per ASTM D 638 (Type I). b Compressive as per ASTM D-695

Tensile test parts are manufactured as per the standard procedure of ASTM D-638 Part I and for compressive strength parts followed by ASTM D-695 as shown in Fig. 4.

Table 3 explains about the combinations of four input parameters and their levels with experimental results in terms of tensile and compressive strength and their respective class determination. Due to space limitations, we have just shown few experimental results amongst the 256 experiments. It is observed that the maximum tensile strength and compressive strength in the obtained results are 38.13 N/mm2 and 27.59 N/mm2, respectively. The best combinations of tensile and compressive strength both greater than its midrange and average values correspondingly 35.49 MPa and 25.42 MPa are taken as Class 1 combination and rest are Class 2.

Table 3 Part of obtained experimental results

4 Deep neural network modelling

The deep neural network (DNNs) is a prominent technique in the computer version to optimized the parameters of any manufacturing processes [24]. Supervised learning technique was used to execute the deep neural network. This technique utilizes part of experimental data for training the model. Once the machine learning algorithm is trained it updates the parameters and the rest data can be used for testing. Prediction accuracy can be tested after validating the model. In this study, the training procedure of the DNNs is defined by using Eq. (1).

$$ P = h\sum\limits_{j = 1}^{m} {V_{J} x_{j} + a} $$
(1)

Here, output of the training layer was determined by P, layer weight is represented as Vj, xj was mentioned to denote the input values and the parameters of neural layer was expanded using the variable a. The sum of weights Vjxj, bias a, and activation function h (Softmax, RELU) shown in Eq. (1). In every neuron which is connected to previous one input variable xj is multiplied by weights and bias ‘a’ is added to control neuron activation. Output will be obtained after passing the weighted sum and bias to activation function. Figure 5 explains the inner layer of neural model & Fig. 6 shows some part of developed algorithm.

Fig. 5
figure 5

Inner layer of neural model

Fig. 6
figure 6

Proposed Deep Neural Network Algorithm

Here input variables are print speed, distance from each print line, layer thickness, and nozzle diameter. One input layer, 5 hidden layers, 1 output layer. RELU activation function was used for hidden layers as it reaches to the convergence faster and no gradient vanishing issues [25] and SoftMax for output layer as it adds to sum 1 by normalizing the values in the range (0,1). Prediction accuracy in training data and testing data will be evaluated in model as shown in Fig. 6. Categorical cross entropy was used as an objective function, Adam as an optimizer, batch size 10 for epochs 500.

5 Results and discussion

This section presents the obtained results during 256 experiments which consisting seventy percent data for training the proposed model and remaining for testing. The experimental results are classified in classes based on tensile & compressive strength measured with different combinations. Class 1 for good connection status and Class 2 for others. Actual connection status and predicted connection status is interpreted as shown in Fig. 7. The real class and predicted class is shown by blue and orange points respectively. Overlaying points can be considered as no discrimination between actual and predicted class. Prediction accuracies after 500 epochs 0.8654 were obtained on trained data and 0.8846 achieved for test data. RMSE value for tested model observed is 0.3396 is which validates the performance of model and can predict the results under random circumstances.

Fig. 7
figure 7

Performance of Prediction data: a Training. b Testing

Strictly speaking when the data fed is more this model will gain higher prediction accuracy. From the overall result assessment, the proposed model has achieved good performance in prediction accuracy, tensile strength, and compressive strength. Thus, the developed technique is effectively applicable in all mechanical fields.

Best connections of printing parameters were predicted by the proposed model amongst which we further evaluated the influence of parameters on the mechanical properties of printed parts by using Taguchi method. The outcome obtained through Taguchi method in the form of Signal to Noise (S/N) ratio diagram for tensile strength and comprehensive strength is shown in Figs. 8 and 9, respectively. From the S/N Ratio diagram, it is evident that the most influencing parameter is nozzle diameter for tensile strength & for compressive strength layer thickness.

Fig. 8
figure 8

S/N Ratio diagram for Tensile strength

Fig. 9
figure 9

S/N Ratio diagram for compressive strength

B.M. Castro et al. utilized 3D printing scheme using ML web-based pharmaceutical software for pharmaceutical application which helps to improve the fabrication procedure. But it lacks in predicted key fabrication parameters with low accuracies of 76% and 67% for the printability and the filament characteristics. Proposed model of Adaptive fuzzy logic by R.K Gupta et al. [17] error rate recorded during the design process. Grace et al., proposed autonomous correction structure but the design process is complex [26]. Mohamed et al. proposed the optimization of modeling scheme and ANN optimization Definitive screening design (DSD). This study confirmed the capability of an integrated DSD and the ANN for optimizing AM conditions to avoid problems typically encountered in multiple experiments [15]. Error recorded in Predicted and actual results 8.7%.Kaushik Yanamandra, et al., utilized Imaging strategy where high similarity rates was recorded for original and reconstruction model but it takes more duration to execute the function [27]. Samie Tootooni et al. utilized Laser-Scanned 3D Point Cloud Data using Machine Learning. Here Sampling done with Sparse Representation-based Classification (SRC), k-Nearest Neighbors (kNN), Naïve Bayes (NB), Neural Network (NN), Support Vector Machine (SVM), Decision Tree but required large real time data. The major limitation was found that the scanning an entire part, which can be time consuming and inefficient for sample size 500 and obtained maximum accuracy up to 84.71% [28]. Gardner et al. implemented image classification for improvement the part quality in better extent. They were focused on using the tool to optimize for visible print flaws, but other metrics, such as road width and dimensional stability, could also be addressed assuming the effects can be measured locally. Correlations between local flaws and overall part performance, such as mechanical properties can be addressed [29]. Gupta and Taufik, investigated the effect of process parameters on dimensional accuracy of FDM printed parts and results shows that ANN model predicts the results with very less error in comparison of existing models [19]. In a study, the effect of FDM 3D printing process parameters on the surface roughness of printed parts was investigated using ANN Hybrid algorithm and RSM [30]. Literature presents the deep learning model where different complex problems were studied with short duration and wide range of accuracy and accuracy rate recorded was 83% [31, 32].

In the present study, the proposed Deep neural network model is trained with less analyzed input variables as nozzle diameter, width of each print line helped to gain better result 88.64% in terms of prediction accuracy by detecting the finest combination in the printing layer. Moreover, the faults were detected with good accuracy. RMSE value for tested model observed is 0.3396 is which validates the performance of model and can predict the results under random circumstances.

6 Conclusion, limitation, and future research direction

AM mechanism is the process of fabrication, which includes the connection of materials commonly layer-by-layer to generate the structure from FDM. Advantages of this technology involve new design structures, low economic volumes, etc. Moreover, the AM mechanism includes numerous types of machinery to manufacture flexible materials. Nevertheless, during the 3D printing process, if the printing parameter selection at the same time is mismatched, the raise of faulty connection is tremendously affecting the entire performance. Therefore, in this research, a deep learning model is developed for detecting the best connection between process parameters. For example, high dimensional accuracy, high surface finish and better tensile strength can be achieved by setting low layer thickness but can affect the compressive strength adversely. Print speed affects the mechanical properties; build time affects the overall cost of product. Here, design parameters are taken as inputs that are trained to the system. Hence, the developed model is processed on and finally detects the best combination of parameters to improve mechanical properties. Best combination achieved in this study for tensile strength (i.e. 38.13 Mpa) is 0.25 mm nozzle diameter, 80 mm/min print speed, 0.2 mm layer thickness, 0.5 mm distance from each print line while for compressive strength (27.59 Mpa) the corresponding values are 0.3 mm, 40 mm/min, 0.4 mm, 0.7 mm respectively. Nozzle diameter is influential parameter for tensile strength and layer thickness dominates compressive strength predicted by Taguchi analysis. In addition, the proposed model gained 88.64% outcomes in prediction accuracy. When the data fed is more this model will gain higher prediction accuracy. Limitation of this study is huge number of data is needed to accurately process the neural network model. In future this model can be used analyze the best combination for the optimization of other mechanical properties. Theoretically, the proposed deep neural model can be processed and tuned (like number of neurons and layers, activation functions, optimizers, dropouts, normalization, batch size) to select optimized parametric combination to achieve different aims in terms of part quality characteristics, build time, cost etc. In future, researchers can adopt other AI techniques like Big-data, Cloud computing, IoT (Internet of Things) to enhance the accuracy in parametric selection of FDM process.