Arti ﬁ cial neural network for predicting the mechanical performance of additive manufacturing thermoset carbon ﬁ ber composite materials

: Composites have been evolved rapidly due to their unique performance in comparison with other con - ventional materials, such as metals. Although additive manufacturing ( AM ) has attracted considerable attention in recent years to produce reinforced complex composite structures as in reinforced carbon ﬁ ber composites, it is di ﬃ cult to control the ﬁ ber content concentration within the composites to obtain tailored materials properties, especially at high loads of ﬁ bers. In fact, high load of ﬁ bers usually leads to technical issues, such as nozzle clogging and ﬁ ber agglomeration that hinder the 3D printing process. Therefore, a customized arti ﬁ cial neural network ( ANN ) system was developed in this work to predict the mechanical characteristics of 3D printing ther - moset carbon ﬁ ber composites at any carbon ﬁ ber concen - tration. The developed ANN system was consisting of three model techniques for predicting the bending stress as well as the ﬂ exural modulus of the thermoset carbon ﬁ ber com - posites, even when handling small experimental datasets. The system architecture contained connected arti ﬁ cial neu - rons governed by non - linear activation functions to enhance precise predictions. Various schemes of ANN models were utilized namely: 1 - 4 - 1, 1 - 4 - 8 - 1, and 1 - 4 - 8 - 12 - 1 models. The developed models have revealed various accuracy levels. However, the 1 - 4 - 8 - 12 - 1 model has demonstrated a very high level of predictions for the mechanical performance of the AM epoxy/carbon ﬁ ber composites. This would enhance predicting the performance of such composites in 3D printing with very minimal experimental work to optimize the ﬁ ber content for the desired overall mechan - ical performance.


Introduction
Additive manufacturing (AM) or 3D printing has received much attention in recent years by the reason of producing complex geometries with customizable material attributes [1].The process of creating 3D objects initiated by bringing layer upon layer of substance whatever the fabric material is.The most widely used fabric materials are metals, polymers, and concrete; however, polymers are noticed as one of the most famous fabric materials used in structural applications due to their lightweight, low cost, and thermal properties [2][3][4][5].Though the considerable interest in polymers, they are not appropriate for purposes requiring higher mechanical performance as they possess limited material strength in contrast to other materials, such as ceramics or metals [6][7][8][9].At this point, efforts have been expended on enhancing the mechanical performance of polymers using various types of reinforcements.More recent attention has focused on the provision of fibers as reinforcements used in composites, for example, carbon [10,11], glass, and natural [9,[12][13][14][15][16][17].These fibers can be categorized into short and continuous [18].However, short fibers (chopped or milled) have demonstrated their importance by the fact of ease raw material preparing.Consequently, this technique can significantly ease the manufacturing process flexibility in fiber positioning and material deposition.Furthermore, short fiber composites have lower material costs and void content, making them an appealing choice for many researchers [19][20][21][22].
Recently, considerable literature has grown up around the theme of using carbon fibers to strengthen the composites [23,24].The term carbon fiber refers to a long chain composed of carbon atoms joined securely to each other [25].One reason why carbon fibers have been used extremely is the close mechanical performance to that of some metals as steel [26].Another reason is the high strength-toweight ratio compared to either steel or plastic [27,28].This evidence demonstrates the central role played by carbon fiber in very popular applications in engineering, aerospace, and cars, for example [29].
Investigating the constructing of thermoplastic composites is a continuing concern within the fused filament fabrication (FFF) methodology.This technology allows the additively embedding short fibers and polymers [30].In this operation, a continuous filament of a thermoplastic material is melted in a heating stage and then is solidified  upon the deposition on the print bed [31].Researchers have reported improvements in the mechanical performance of the created composites corresponding to this method [32].Even though thermoplastic composites with high volumes of short fibers may be effectively produced and 3D printed, FFF process is suffering from the weak adhesion between the fibers and the matrix material within the composites due to low interfacial strength between printed layers [33].However, researchers pay the attention to strengthen the mechanical performance employing a recently developed direct writing (DW) method.In this technique, paste-like composite inks can be extruded into 3D shapes by altering fluid viscosity and yield strength via rheology modifiers, such as nanoclay or fumed silica [34].Fiber-polymer matrix adhesion is substantially greater in thermoset composites, where fibers are covered with a small coating of surfactant, which chemically links the thermoset matrix and the fiber, resulting in high adhesion unlike thermoplastic composites [35].That the high-volume concentration of fibers can be embedded in thermoplastic composites; it is, however, notably limited in thermoset composites to less than 5%.A recent technique [34] was developed for that reason, leading to increasing this amount to nearly 46% of short, copped carbon fibers.
The high mechanical performance of composites is obviously of several factors; one of them is the volume ratio of fibers.While obtaining high mechanical properties requires high-volume ratio of fibers, there isas mentioned abovea limit in the fiber concentrations used in composites whatever the fiber type is [36][37][38].The question here arises, what if researchers still could not conduct experiments exceeding the recorded percentage limit of fibers?Is there any approach to predict the behavior of the thermoset composite if we use 50% of carbon fibers' volume ratio as example?
Suitable technologies, such as the artificial neural network (ANN), represent a great method to analyze the complexity of such predictions.This method is particularly useful in studying and solving nonlinear problems based on the nonlinear regression methods used in various fields, such as structural engineering, composite materials, and robotics [39][40][41][42][43]. Generally, ANN is built from a network of linked nodes, known as artificial neurons, which help in the processing the neurons' signals at their connection.Each input signal is treated as a real number, and the output of each neuron is determined using a nonlinear activation function of the sum of its inputs.Besides, neurons usually have a weight that changes the intensity of the signal at a connection.Different layers containing neurons may apply various modifications to their inputs where signals pass the first layer input to the last layer (the output layer)maybe many timesto achieve the right answer.
Consequently, this study aims to develop prediction models for the intrinsic mechanical properties of additively fabricated short carbon fiber-reinforced thermoset composites, taking the advantage of ANNs.The developed models can provide good predictions about the performance of carbon fibers without requiring any experimental investigation regardless the fiber concentration content.Thus, the approach used in this work would enhance the better understanding of the performance of additively manufactured thermoset carbon fiber composites and would have a significant influence on the adaption of these materials at larger scales, opening the door to their usage in a wide range of technical applications with high levels of reliability.

Materials and methods
The reinforcement was milled carbon fibers with small lengths, L = 50 μm, and aspect ratios, s = 4.5.The matrix resin was epoxy 826 from Hexion, a curing agent, and a nanoclay.The effects of milled carbon fibers on mechanical properties and printability were then studied by gradually adding different amounts of milled carbon fibers to this mixture.As the concentration at which carbon fiber is used dramatically affects the mechanical properties of   the composites, the volume percentages of these chopped fibers to neat epoxy ranged from 2 to 46%.
To construct the composite item, the method was carried out utilizing DW-based 3D printing, in which the reinforcement was filled with the epoxy system through a nozzle attached to a customized 3D printer.Three-point bending tests were performed on the printed specimens using an Instron Universal testing machine in accordance with the ASTM D7264/D7264M 07 standard to evaluate mechanical performance.Each set was subjected to at least four tests to provide the repeatability and to quantify the experimental variability.Additional information on the experimental process can be obtained in [34].
However, it should be noted that the maximum possible value that can be added to the compositeas described in [34] is nearly 46% of carbon fibers as a volume fraction.Furthermore, this limitation of carbon fibers amount is due to the difficulty of conducting experiments because of fiber agglomeration and nozzle clogging observed during the 3D printing process.Given these concerns, the current work involves examining the mechanical performance at higher carbon fiber concentrations exceeded the recorded values in [34] using the ANN.
ANN's structure can be divided into three main subgroups, including an input layer, one or more hidden layers, and an output layer.While the input layer accepts data from external sources, the output layer provides one  or more data points based on the function of the network after the being processed through the hidden layers.Figure 1 depicts the ANN model.Neurons are the basic building components of ANNs that are used to determine output.Moreover, the neuron has the advantage of collecting the inputs from several other neurons, multiplying it by the weights supplied to it, and then applying an activation function to the result before moving to the next variable.
Although this math operation may be seen simple as a first impression, stacking tremendous neurons in various layers may create an ANN capable of doing extremely complex tasks.Three stimuli models in this article were built using the Matlab environment to predict the young modulus and the bending stress.The key aspects of these models can be listed as follows: increasing the number of hidden layers used, as well as neurons in each hidden layer.
All models have a common one input (i.e., carbon fiber content) and a one output (young's modulus (E) or bending strength (σ b )).In conjunction with these principals, Model A has one hidden layer with four neurons.However, the hidden layers' number rises in Model B to be two layers containing four and eight neurons in each hidden layer, respectively.To assess whether there is any improvement in the predicted mechanical performance, it was chosen here to construct a model (i.e., Model C) with three hidden layers, each containing four, eight, and twelve neurons.During the simulation, each resulted signal from neurons is transported to the next layer through the Log-sigmoid transfer function, which is preferable for connecting the hidden and output layers.The following equation shows the mathematical relation used in this function: In practice, Log-sigmoid is a popular multi-layer neural network that is trained to positive infinity using the backpropagation algorithm.As the neurons' net input changes from negative to positive infinity, this function gives outputs ranging from 0 to 1.A qualitative methodology is employed in this study; the weights of the connections between neurons in ANNs are first assigned random values, and then those models (networks) start training the data, having the ability of mapping creation between inputs and outputs.However, providing more training data has had the neural network gradually changes its weights, mapping each input to the right outputs.

Results and discussion
On the first point, prediction models' experimental data were divided into 70% for training data and 30% for testing in order that the ANN's models being developed.On the second point, the method begins by creating input/ output data and then training these data by the networks to map between inputs and outputs as mentioned in the previous section.However, the training process was based on the backpropagation gradient descent method due to its effectiveness in terms of both simplicity and application, even in multi-layer networks.To better understand the back-propagation algorithm, it is divided into three stages: first, feeding the input training values and computing the network outputs; second, calculating the difference between the goal values and the computed results; and third, transmitting the error back to change the weights of the layers.
With regard to analyze the mechanical properties of fiber material based on the experimental data, the ANN method is applied.These results aimed to examine the model prediction and the experimental results of average bending stress and flexural modulus (Figures 2 and 3 predicting values during the training stage.This in fact is due to using one hidden layer with small number of neurons.Further analysis of the data in Model C reveals that the ANN results are very close to the experimental results.Figures 4 and 5 show the relative error of the three models' outputs.As can be seen from Figure 6, the discrepancy between the outputs and the objectives is shown by the error bars.This difference approved the Model C analyses and  showed how close the ANN outputs from the experimental data.Additional statistical analysis found that the mean absolute percentage errors (MAPEs) of bending strength were 19.28, 12.97, and 6.71%, in Models A, B, and C, respectively.Also, MAPEs regarding the flexural modulus are identified to be 17.26, 15.83, and 8.26% in Models A, B, and C, respectively.Overall, a significant difference was found between Model A and Model C with successive increases in the accuracy of the predicted data as we increase the hidden layers.However, MAPE is calculated as the following:

, respectively). Figures clearly demonstrate that Model A's prediction model is not capable of accurately
where S is the number of samples, Ω p denotes the pre- dicted mechanical property value, and Ω exp denotes the measure of the experimental mechanical property.In addition, to compare the reliability of the proposed prediction model, R-square (correlation coefficient) is presented and evaluated quantitatively.The correlation coefficient is used to validate models by comparing the anticipated Bending stress correlation coefficients averages were 0.74, 0.86, and 0.95 for Models A, B, and C, respectively.On the other hand, these values were 0.91, 0.90, and 0.97 in flexural modulus property.As a result of these indications, the suggested model (i.e., Model C) performed very well for both bending stress and flexural modulus.These findings suggest that Model C has a good correlation coefficient, and its accuracy rates are about equivalent to 95 and 97% in both average bending and flexural modulus, respectively.
An important concept that emerged from the data is to find the predicted equations for each model.Figures 7  and 8 depict the linear regression analysis to generate polynomial ANN equations and curveting.More inspection to fit the resulted data, a polynomial of higher order and a Gaussian's fit curve of model C are shown in Figures 9 and 10, respectively.
These results validate the equations and the predicted models of the suggested ANN models.It should be noted, however, that certain predictions depart from the experimental data.This is owing to the minimal quantity of sample data [38], making determining the most accurate findings difficult.Tables 2 and 3 show the ANNs' prediction as well as the relative error of the obtained mechanical performance in relation to Model C. The tables (above) proofed the ability of ANN model to be very suitable for estimating the mechanical performance of AM thermoset carbon fibers composites.Moreover, the validity of the predicted equation and the ANN were tested using some extra points ranging between the experimental fiber content.Figures 11 and 12 show the precision of the final developed model, and Table 4 shows its predictions with extra points exceeded the practical fiber concentrations (i.e., some points exceeded the maximum experimental fiber contents).

Conclusions
Neural network models were developed and investigated to predict and determine the average bending stress and flexural modulus at various carbon fiber concentrations within 3D-printing manufacturing composites.It was demonstrated here that proper design of ANN schemes has to be selected to perform such good predictions to enhance the reliability of the model.ANN was properly utilized as a tool to assess and support predictions via the analysis of the entire system within a data framework.ANN-developed models were capable of handling tiny experimental datasets to find the mechanical performance of AM carbon fiber composite structures.There was a high level of agreement between the experimental mechanical characteristics and the derived models.The MAPE and correlation coefficient were used to assess the accuracy of the three ANN models.The best MAPEs using ANN system regarding predicting the young's modulus of carbon fibers was 8.26%, and that for bending stress was 6.71%.It can also be concluded that the ANN prediction models can accurately predict the mechanical characteristics of the fibers as well as the desired performance to enhance more reliable utilizations of such AM systems.In terms of future study, these findings (using the suggested ANN model) add to a foundation for understanding and predicting the mechanical performance of any reinforced thermoset composite manufactured utilizing AM technology; so that, the current implemented approach can be extended to study and investigate various fiber types of reinforcements in composites.

Figure 6 :
Figure 6: Function fit values of ANN Model C in: (a) bending stress and (b) flexural Modulus.

Figure 9 :
Figure 9: Advanced correlation fit between ANNs and experimental values of bending stress (Model C).(a) Polynomial 3rd degree fit; (b) Gaussian's fit.

Figure 6
Figure 6 depicts the output function fit of a network spanning the range of inputs as the plotting of targets and output data points linked with input values.As can be seen from Figure6, the discrepancy between the outputs and the objectives is shown by the error bars.This difference approved the Model C analyses and

Figure 11 :
Figure 11: Validation of the ANN in Model C: (a) bending stress and (b) flexural modulus.

Figure 12 :
Figure 12: The behavior of the proposed extra validation points of both bending stress and flexural modulus.

Table 1 :
Evaluation and statistical values of mechanical performance prediction models

Table 2 :
Evaluation comparison (of average bending stress) between the predicted ANN Model C and the relative error

Table 3 :
Evaluation comparison (of average flexural modulus) between the predicted ANN Model C and the relative error CF (vf%)

Table 4 :
Output of the ANN Model C