3.1. Microstructure Analysis
Figure 4 shows the SEM microstructures (
Figure 4a–c) and corresponding element distribution maps (
Figure 4d–f) of the selected alloys, Al-7.6Sn (
Figure 4a,d), Al-6.4Sn (
Figure 4b,e) and Al-5.7Sn (
Figure 4c,f) after heat treatment at 250 °C for 3 h and cooled in the furnace to room temperature. The Al-7.6Sn exhibits a dendritic cell structure with a size ranging from 10–110 μm (
Figure 4a). In addition to the aluminum solid solution (Al), the elements distribution maps (
Figure 4d) reveal the presence of soft structural inclusions of Sn-and Pb-rich phases (Sn-rich, Sn-Pb, and Pb-Sn phases), as well as the solid phase inclusions of Al
2Cu (
θ) phase, as confirmed by [
23,
43,
44,
45]. Due to the close atomic numbers of Al and Si, the backscattered electrons (BSE) SEM images do not reveal the presence of a small amount of the (Si) phase in the microstructure. However, the Si distribution map demonstrates its presence. Zn and Mg are dissolved in the Al-matrix and soft inclusions, and they do not form their phases or concentration zones, which was noted by [
1]. The EDS point analysis of the Al-7.6Sn alloy (
Figure 5a,b) confirms the presence of the following components: Al-solid solution with copper, zinc, and silicon (Point 1), the soft phase inclusions based on tin (Sn-rich phase) (Point 2), soft phase inclusions with Sn and Pb (Sn-Pb and Pb-Sn phases) (Points 3,4), and solid-phase inclusions Al
2Cu (
θ-phase) (Points 5,6). The detected phases’ chemical compositions and corresponding EDS spectrums are presented in
Figure S1. The formed phases, Al-solid solution, Sn-and Pb-rich phases (Sn-rich, and Pb-Sn phases) and Al
2Cu (
θ), were confirmed by the XRD analysis (
Figure 6). The soft structural inclusions are located on the dendritic cell boundaries and exhibit a globular and elongated shape (
Figure 4a). The globular soft inclusions’ size ranged from 3 to 16 μm, the elongated inclusions’ thickness ranged from 4 to 9 μm, and length ranged from 12 to 38 μm. The distribution of Sn- and Pb-rich phases in a single soft inclusion is depicted in
Figure 5a,b. Solid inclusions of the Al
2Cu phase are primarily located along the dendritic cell boundaries and have an elongated shape with a length ranging from 5 to 45 μm and a thickness from 2 to 10 μm.
The Al-6.4Sn and Al-5.7Sn alloys exhibit a similar microstructure to Al-7.6Sn alloy: a dendritic cell structure with a size ranging from 15–115 μm for Al-6.4Sn alloy and 10–75 μm for Al-5.7Sn alloy (
Figure 4b,c). The element distribution maps (
Figure 4e,f) also indicate the presence of the Al-solid solution, the soft structural inclusions of Sn-and Pb-rich phases (Sn-rich, Sn-Pb, and Pb-Sn phases), the solid phases inclusions of Al and Cu-rich phase (Al
2Cu) and a small fraction of the (Si) phase. The presence of these phases was confirmed by XRD-analysis (
Figure 6). The soft and solid phase inclusions have a shape and distribution similar to the Al-7.6Sn alloy. For both alloys, the predominant structure of the soft inclusions is the globular shape ranging in size from 3 to 15 μm. In addition, there are a small number of elongated inclusions with a thickness of 2–4 μm and 3–5 μm and a length ranging from 9 to 41 μm and from 10 to 18 μm for the Al-6.4Sn alloy and the Al-5.7Sn alloy, respectively. The solid inclusions of the Al
2Cu phase are mainly located along the dendritic cell boundaries and have an elongated shape (the thickness ranged from 2 to 5 μm for the Al-6.4Sn alloy and from 2 to 4 μm for the Al-5.7 alloy, respectively). The length of the solid phases usually does not exceed 50 μm for the Al-6.4Sn alloy and 38 μm for the Al-5.7 alloy. The EDS point analysis of the investigated Al-6.4Sn and Al-5.7Sn alloys (
Figure 5c–f) also indicates the presence of the structural components: the Al-solid solution with copper, zinc, and silicon, soft phase inclusions with Sn and Pb (Sn-rich, Sn-Pb, Pb-Sn phases), and solid inclusions of Al
2Cu phase. The detected phases’ chemical compositions and corresponding EDS-spectrums of the Al-6.4Sn and Al-5.7Sn alloys are presented in
Figures S2 and S3.
3.3. Artificial Neural Network Model
In the present work, the chemical compositions of the added elements (Fe, Si, Mn, Mg, Cu, Ni, Ti, Zn, Bi, Pb, and Sn) of the investigated alloys were selected to be the inputs, and the tensile strength (MPa), elongation to failure (%), and HB were set as the outputs control responses. There were numerous trials, including attempting one, two, and three concealed layers. In addition, various numbers of neurons were tested in each hidden layer. It is well known that the influence of the number of neurons in hidden layers on the output of a network is complex. If the design of the model is overly simplistic, the trained network will not be able to correctly learn the process and determine the relationship between input and output variables. Alternatively, it may fail to align during training, or the training data may be overfitted. Consequently, various network structures in the hidden layer with varying numbers of neurons were investigated.
Figure 7 shows the flow chart of the implemented ANN model. The trial-and-errors strategy was launched with one neuron in the hidden layer and progressed with additional neurons to determine the optimal number of neurons.
Figure 6 demonstrates how the number of neurons in one hidden layer affects the proposed network’s effectiveness, tested using mean square error (MSE) and correlation coefficient (R) indicators. The MSE was lowest when the number of neurons was 20, corresponding to the maximum linear correlation coefficient (R) value between the experimental and predicted data.
Figure 8 schematically illustrates the one (
Figure 8a), two (
Figure 8b), and three (
Figure 8c) hidden ANN architectures, respectively. Prior to training the network, the input and target variables were unified within the range of 0 to 1 to achieve a functional form for the network to read and improve the efficiency of neural network training. Equation (4) is the most commonly used formula for unification.
where
I is the experimental data or input data,
Imax and Imin are the max. and the min values in experimental data,
I’ is the unified value corresponding to I.
Training refers to the process of refining network predictions to match experimental data. The network architecture, including the transfer function, training functions, and training methods, must be selected based on the availability of data and the consistency of the output. In this investigation, the tansigmoid and purelinear transfer functions were utilized. The trained network must then be tested to ensure its dependability and precision. The neural network can be trained using various learning algorithms, with the BP algorithm being one of the most common. The weights are modified in an ANN with a BP algorithm, and the changes are saved as knowledge.
This work utilized three different ANN architectures with one, two, and three hidden layers to determine the ideal network’s accurate prediction. For all networks, 11 input neurons (values of Si, Fe, Mn, Cu, Mg, Ni, Zn, Tic, Bi, Pb, and Sn), the hidden layers with 20 neurons, and three output neurons (tensile strength (MPa), elongation to failure (%), and hardness (HB)) were used with ‘tansigmoid’ transfer function for hidden layers and ‘purelinear’ transfer function for outputs. For the network training, a feed-forward backpropagation algorithm is chosen. The used parameters for network training are listed in
Table 5. The study was conducted using the MATLAB 2015b software’s neural network toolbox. After approximately 80,000 epochs, the network training was stopped when the goal was achieved and stable. A complete run through a sequence of input-output pairs is an epoch during network training.
Figure 9 depicts a comparison between the experimental stress (black lines) and the ANN model’s predicted stress with one, two, and three hidden layers and 20 neurons for each hidden layer (blue lines).
Table 6 represents the comparison indicators R, RMSE, and AARE (%) between the predicted and experimental stress for the different numbers of the hidden layers. The ANN model with two hidden layers exhibited the strongest correlation between the predicted and experimental stress (
Figure 9b,e) compared to the other ANN models (
Figure 9a,c,d,f). Using a network with two hidden layers yielded the highest R and lowest RMSE and AARE (%) (
Table 6). The ANN model with one hidden layer exhibited undesirable correlation coefficients and error levels between the experimental and predicted stress. Based on
Figure 9 and
Table 6, the most efficient network contained two hidden layers.
Figure 10 shows the relative error histograms and relative error plots of the predicted stress using one, two, and three hidden layers. The relative errors of the predicted stress obtained by two hidden layers were distributed about zero with the lowest standard deviation (SD) of 2.636 (
Figure 10c). The distribution of the relative errors of the predicted stress obtained by the one hidden layer was the widest, with an SD of 5.458 (
Figure 10a). In comparison, relative errors of the predicted stress obtained by the three hidden layers (
Figure 10e) were narrowly distributed compared with those of one layer and wider than those of two layers. The relative error of the predicted stress using two hidden layers ANN model was lower than that of the other used models, namely, one- and three-layers ANN models (
Figure 10b,d,f).
Since the ANN model with two hidden layers has proven its efficiency in predicting the stress, it was also used for predicting the elongation to failure (%) and the hardness (HB).
Figure 11 illustrates a comparison between the experimental (black lines) and the predicted elongation to failure (%) and hardness (HB) of the ANN model with two hidden layers (blue lines).
Table 7 depicts the comparison indicators R, RMSE, and AARE (%) between the experimental and predicted elongation to failure (%) and hardness (HB) using the ANN model with three hidden layers.
Figure 11 and
Table 7 prove the high efficiency of the used ANN model in predicting the elongation to failure (%) and hardness (HB). A stronger agreement was observed between the predicted and experimental hardness (HB) via two hidden layers network (
Figure 11a,b) than that for elongation to failure (%) (
Figure 11c,d). The all-comparative indicators, R, RMSE, and AARE (%) in the case of hardness (HB), are better than those of the elongation to failure (%),
Table 7. Despite that, it is possible to efficiently use the constructed ANN model to predict the elongation to failure (%).
Model Verification
Four different alloys were cast and tested to evaluate and verify the precision of the two hidden layers proposed network. Their properties (stress, elongation %, hardness HB) were then predicted. The chemical composition of the casted alloys is tabulated in
Table 8.
Figure 12 shows a comparison among the predicted and the experimental stress, elongation to failure (%), and hardness (HB) values for the four alloys (
Table 8).
Table 9 represents the comparison indicators R, RMSE, and AARE (%) between the experimental and predicted data. The properties of stress, elongation to failure %, and hardness (HB) of the newly prepared four alloys were accurately predicted with a low level of error. The experimental and predicted characteristics were found to be in excellent agreement, as shown in
Figure 12. It is observed that the predicted values are located within the interval of the experimental values for all controlled parameters, stress, elongation to failure, and hardness, demonstrating the excellent predictive power of the constructed model.
The indicator R for the stress was closer to that for the elongation and hardness; it was around 0.97–0.98. In addition, there was an insignificant difference between RMSE for all properties; however, elongation to failure had the lowest value. The predicted properties of stress, elongation to failure %, and hardness (HB), showed a significant difference in AARE %. The largest AARE was obtained for elongation to failure, the highest at 10%, but this is still within the acceptable error range. The prediction of stress yielded the lowest value (1.9%).