Prediction of age-hardening behaviour of LM4 and its composites using artificial neural networks

This research work highlights the prediction of hardness behaviour of age-hardened LM4 and its composites fabricated using a two-stage stir casting method with TiB2 and Si3N4. MATLAB - Artificial Neural Networks is used to predict the age-hardening behaviour of LM4 and its composites. Experiments (hardness and tensile tests) are conducted to collect data for training an ANN model as well as to investigate the effect of reinforcements and age-hardening treatment on LM4 and its composites. The results show that with an increment in the reinforcement wt%, there is an enhancement in hardness and ultimate tensile strength (UTS) values within the monolithic composites. As-cast hybrid composites display a 37 to 54% improvement in hardness compared to as-cast LM4. Heat-treated samples, specifically those treated with peak aging with MSHT and 100 °C aging, perform better than as-cast samples and other heat-treated samples in terms of UTS and hardness. Compared to as-cast LM4, MSHT, and 100 °C aged samples display an 85 to 202% increment in VHN. Hybrid composites perform better in terms of hardness, while composites with 3 wt% of TiB2 (L3TB) perform better in terms of UTS, peak aged (MSHT and 100 °C aging) L3TB display 68% increment in UTS when compared to as-cast LM4. ANN model is developed and trained with five inputs (wt% of TiB2, wt% of Si3N4, type of solutionizing, aging temperature, and aging time) and one output (VHN) using different algorithms and a different number of hidden neurons to predict the age hardening behaviour of composites. Among them, Lavenberg-Marquardt (LM) training algorithm with normalized data and 30 hidden neurons performs well and shows a least average error of 1.588364. The confirmation test confirms that the trained ANN model can predict the output with an average %error of 0.14 using unseen data.


Introduction
LM4 is an aluminum-silicon casting alloy that is extensively utilised to manufacture intricate components and parts. The alloy is well-known for its superior strength, excellent castability, and decent machinability, making it a popular choice in a variety of sectors, such as aerospace, automotive, and general engineering. With the increased demand for such popular alloys and the need for more modern materials to support the development of new technologies, there is a need to create new-generation composite materials that can withstand any test or working conditions. It requires considerable time to develop such novel composite materials. However, the time it takes to develop new alloys or composites might vary greatly depending on the individual material, the complexity of the fabrication method, and the intended use. The creation of novel materials can take years, if not decades, because it takes a combination of experimentation, modeling, and testing to identify the material's properties and characteristics. For example, the development of an entirely novel aluminium alloy is often an observational process in which researchers alter alloy composition and processing parameters to attain the desired properties. This may entail a series of laboratory experiments and computer simulations to optimise the alloy's microstructure and mechanical properties, followed by testing small-scale prototypes and then scaling up to higher production quantities. Similarly, developing composites can prove to be a time-consuming process since it requires selecting appropriate reinforcing materials, designing the composite structure, and developing manufacturing techniques to make the composite.
To save time on experiments to produce novel composites, researchers are shifting to Artificial Neural Networks (ANN), which can deliver superior results without requiring actual experimentation. Because of its capacity to manage enormous quantities of data and generate predictions based on patterns and correlations, ANNs have become a prominent tool in the field of materials science. ANNs have been employed in a variety of materials science applications, including materials design, property prediction, process optimization, and material characterisation. The capacity of ANNs to learn from data and generalise to new contexts is one of its primary advantages. This makes them ideal for materials research, where data is frequently complicated and high-dimensional [1]. ANNs have been used to predict material properties such as strength, conductivity, and durability based on their composition and structure. ANNs have also been utilised to improve material processing and production procedures. ANNs, for example, have been utilised to enhance alloy heat treatment, ceramic processing, and composite fabrication. Additionally, ANNs have been employed in materials characterisation, where they may be used to uncover patterns in data that standard analytic methods may not be able to detect.
Here are a few examples of the use of ANNs in materials science: Syam et al [2,3] used various machine learning (ML) algorithms like ANN and K-Nearest Neighbor (KNN) to predict the wear performance of Albased alloys. As per the results, all the ML algorithms were successful enough to predict the wear behaviour of Al alloys; however, KNN and ANN emerged as the most effective methods. Naser [4] used ANN to predict the behaviour of MMCs at elevated temperatures and concluded that the trained ANN model could predict the outputs well within the range and values were very close to experimental values, so he concluded that ANN could be used to develop models that could predict the behaviour of temperature-dependent materials. Anand et al [5] used ANN to optimize the friction welding parameters, 5 different algorithms were trained and tested, and all the algorithms were proved to be effective enough to predict the outputs. It was finally concluded that ANN with a genetic algorithm could be used as an effective tool to predict and optimize the welding parameters. Heng et al [6] implemented ANN to predict the inner surface finish of composites subject to magnetic abrasive finishing (MAF). From the values of R 2 and RSME (Root Mean Square Error), it was determined that the trained ANN model could be successfully used to predict the inner surface roughness of the machined composites. Asadi and Akbari et al [7] examined the mechanical and microstructural properties of aluminum sheets joined using friction stir welding (FSW) process. After experimental testing, the ANN model was trained based on the experimental results. 20% of the data was used for testing, and 80% were used for training the model. Pin shape, transverse speed, and rotational speed were input parameters, and grain size, hardness, and fracture energy were output parameters. The correlation between the input and output variables was found using ANN, and equations were optimized using multiobjective optimization. The results concluded that ANN was effective enough to provide a correlation between input and output parameters, whereas multiobjective optimization provided optimized FSW parameters. Similarly, Akbari et al [8,9] fabricated aluminum-based composites using FSW, optimized the parameters using RSM, and ANOVA, and numerically simulated the process using the 3D FEM process. These advanced simulations and software helped researchers determine better working parameters and conditions without performing bulk experimentations. Liu et al [10] were successful in their efforts to optimize microstructure and predict UTS values of Nb-Si alloy using ANN. Backpropagation ANN was developed and trained using five input parameters. The trained model could predict the UTS values within the prescribed limit and proposed a new microstructure design to obtain the desired UTS. Rhmath et al [11] used ANN for the prediction of wear in Al composites, they used several training algorithms like Levenberg-Marquardt (LM), Scaled Conjugate Gradient (SCG), and Bayesian Regularization (BR) to train the model and also varied the number of hidden neurons from 1-15 to design a best ANN model. They had also used normalized data to train the model. From conclusions it was understood that the created ANN model with LM training algorithm had predicted the wear with an overall R-value of 0.9993. Bongale et al [12] used ANN to predict the wear behaviour of Al-SiC composites. Load, speed, and wt% of reinforcements were taken as input parameters and wear rate as output parameter. A total five hidden neurons were opted. Network was trained using BR algorithm. From results it was concluded that the trained model could predict the wear rate with an average error of 3% and the R-value for training phase is 0.9894. Tugba et al [13] used ANN to predict the wear properties of Ti based hybrid composites. Load, density, and reinforcements were used as inputs, six hidden neurons, and LM training algorithm was used. From results it was understood that the created ANN model could effectively predict the wear behaviour of Ti based hybrid composites, also the overall R-value achieved was 0.94149. ANN was used by Sajjid et al [14] to predict the mass loss of Al-SiC-Zr hybrid composites during wear. They employed the LM algorithm, Zr wt%, sliding distance, and load as input parameters. They normalised the data and trained the ANN model. The results determined that the trained model effectively predicted the mass loss with the least amount of error. Mohsin et al [15] used ANN to predict the tensile properties of Al composite. Pressure and wt% of reinforcement were used as input parameters, UTS and % elongation were used as output parameters. They had used 10 hidden neurons and only one hidden layer; as per the authors, one hidden layer is good enough to predict linear and non-linear functions. From results it was concluded that ANN rightly predicted tensile properties with an overall R-value of 1. Veeresh et al [16] used ANN to predict the wear properties of Al-TiO 2 composites. They had established non-linear correlation between input and output variables, they had used a total data of 860 and results revealed that the trained model could perfom well as the quantity of data was more. Higher the data provided to train the model better the prediction results.
Akbari et al [17] created four different models of ANN by varying the number of inputs and outputs. They had used the BR training algorithm to train the model. Trained models were used to predict the mechanical properties of fabricated composites. After comparing the experimental and predicted results, they concluded that the models could predict the mechanical properties of the untested composites. Lan et al [1] used Particle Swarm Optimization-BP ANN model to predict the mechanical properties of A380 alloy. Composition, cooling rate, and porosity content were chosen as input parameters. According to the results, the developed model could predict the mechanical properties of A380 alloy; nevertheless, the generated model had a flaw. All of the input parameters that might affect the alloy's mechanical properties were not included (ex: Si, Cu, and Zn). Zhang et al [18] trained a Deep Neural Network (DNN) with the help of small data sets. Generally, we required big data sets to predict using ANN, but in the case of material science, it was very difficult to get larger data sets which made the modeling very difficult. From the results of the trained DNN model, they concluded that even small data sets could be used to predict the mechanical properties of materials effectively. Yang et al [19] used BP ANN to predict the UTS and elongation values of T6-treated A357 alloy. Solutionizing-temperature-time and aging-temperature-time were used as input variables, and tan-sigmoid and log-sigmoid transfer functions were used. The results concluded that the trained model could predict UTS values with an absolute relative error of 0.70%; for percentage elongation, it was 1.85%, respectively.
Even though ANN has been used extensively in the field of materials, it is always challenging to find out the suitable input parameters to predict the output. This is because in materials, a large number of specific inputs must be considered to predict any parameter, and the correlation between the input and output parameters is somewhat complex. Researchers are working diligently to create an ANN-based algorithm that can predict the mechanical properties of materials (alloys and composites) by establishing a precise relation between multiple input and output factors. The work presented in thie article, was carried out based on the gaps obtained from the extensive literature review done, splitting the work into two major portions. The first part focuses on creating new (monolithic and hybrid) composites using LM4 as the base matrix with TiB 2 and Si 3 N 4 as reinforcements. These composites were produced using a two-stage stir casting method and subjected to precipitation hardening treatment before their mechanical properties were tested. The second part of the study involved developing and training an ANN model. With the experimental data obtained from the first step, the hardness and tensile behavior of LM4 and its composites were studied. By using the same available experimental data ANN model was trained to establish a correlation between the input and output variables. The predicted values were then compared with the experimental data, and a comparison between LM4 and its composites was also made.
The novelty of this study lies in the unprecedented prediction of aging behavior in composite materials using Artificial Neural Networks (ANN). To date, no research has explored the complexities of predicting such behavior, which involves multiple factors like wt% of two different reinforcements (TiB 2 and Si 3 N 4) , type of solutionizing treatment (single and multistage), aging temperatures (0, 100, and 200°C), and aging times ranging from 0 to 17.5 h. This novel approach opens new avenues for understanding and optimizing the aging process in composite materials.

Materials and methodology
The methodology followed in the current study is presented as a flow chart (figure 1). It consists of majorly six steps from A-F. A: Selection of materials that are used for the preparation of the composites, B: Method of preparation, C: Type of heat treatment used to alter the mechanical properties of the cast composites, D: Types of mechanical tests performed on the as-cast and heat-treated composites, E: Modeling and training of ANN with experimental data, F: Comparison of experimental and predicted data.

Steps A-D
LM4 is selected as base alloy/matrix material to prepare monolithic and hybrid composites, TiB 2 with an average particle size (APS) of 6.7 microns, and Si 3 N 4 with an APS of 26 microns are used as reinforcements. The chemical composition of LM4 used is as follows: Si is the primary alloying element with a wt% of 5.925, followed by Cu with a wt% of 2.476. Other alloying elements like Fe, Mg, and Mn with wt% of 0.641, 0.176, and 0.121 are also available. As they generate strong intermetallics, these alloying elements are the primary reason for enhancing the mechanical properties of alloys/composites when subjected to heat treatments [20]. The two-stage stir casting process is used for the preparation of composites, first, LM4 is melted in the crucible at 745°C [21], and stirring is introduced. The melt temperature is got down to a 600°C (semi-solid) state, and stirring continues until slurry formation occurs. Then preheated reinforcements are added to the molten melt [22,23] and stirred for about 10 min at 200 rpm, then the melt temperature is got upto to 745°C and stirred again at 400 rpm for 10 min. Then after the molten composite mixture is poured into preheated (500°C for 1 h) molds and left for solidification [24]. These cast composites are machined to the required shapes and are subjected to precipitation hardening treatments; here, for the solutionizing part, we have subjected the samples to both single-stage (SSHT) and multistage (MSHT) solutionizing followed by artificial aging at 100 and 200°C. The aging process is carried out until peak age is attained [25]. Peak aging is determined based on the Vickers Hardness Number (VHN) values. These hardness tests are conducted as per ASTM E384 standards using Micro Vickers Hardness Tester (MODEL-MMT-X-7A) [26]; for all these hardness tests, a constant load of 200 gmf is used with a dwell time of 15 seconds. Each sample is measured for hardness at five different spots, and the average value is used for the discussion part. For tensile tests Electronic Tensometer (Model-PC-2000) is used with a 20 kN load; these tests are conducted only for as-cast and peak aged (of best heat treatment method) samples as per ASTM E8 standards [27]. Figure 2 shows the composites fabricated using the two-stage stir casting process and short forms assigned to each of the composites.

Steps E-F
In this study, we aim to use ANN to predict a single output variable based on five input variables. The dataset is imported and loaded into Matlab, and the dataset is shuffled to ensure randomization. The input data set consists of wt% of reinforcements, type of solutionizing, aging temperature, and aging time, and the output data set consists of experimental data collected during hardness tests. The data is then divided into training, validation, and testing sets, with the typical split of 70, 15, and 15%, respectively. Initially, the model is created and trained without normalizing the data, and in later trials, the data is normalized using the 'mapminmax' function in Matlab. A feedforward neural network with one hidden layer and 10-40 neurons in the hidden layer (trial and error) is defined and created using the 'feedforwardnet' function [28]. The size of these matrix varies with the number of neurons in the hidden layer. The network is trained using LM-('trainlm'), BR-('trainbr'), and SCG-('trainscg') algorithms, and the results are compared; the training dataset and the training parameters are set using the 'trainParam' structure. The training progress is monitored using the 'plotperform' and 'plottrainstate' functions. The trained network is validated using the validation dataset, and the validation performance is calculated using the 'perform' function. The testing performance is also calculated using the 'perform' function. The results are then analyzed using the 'plotregression' function to plot the regression between the actual and predicted outputs. Table 1 shows the input data and functions used to train the ANN network. The compact form of the relation between the input and output layers is given by the following equations [29]. Whereas

Hardness and ultimate tensile strength
The two-stage stir casting process is used to cast monolithic and hybrid composites; homogenous distribution is achieved within the matrix because of the effective stirring parameters [30]. As-cast samples are machined for hardness tests, and samples are machined for tensile tests as per ASTM E8 standards [27]. LM4 in the as-cast condition displayed a hardness of 70 VHN, whereas solutionized LM4 samples without aging displayed lesser hardness than the as-cast sample, as shown in figure 3. After solutionizing (both SSHT and MSHT), single phase homogenous solid solution is formed. When quenched in warm water (at 60°C), supersaturated solid solution is formed, which is a soft and unstable phase [31], which is the reason for the drop in hardness values immediately after solutionizing (without artificial aging). Once the artificial aging process is commenced, there is an increasing trend of VHN values in both heat treatment conditions. This is continued until peak hardness (formation of fine precipitates) is attained, and after that, because of over-aging, the VHN values drop due to the coarsening of precipitates [32]. In the case of monolithic as-cast composites, the VHN values improved with an increase in reinforcement wt%; the presence of hard reinforcement particles and good bonding between the matrix and reinforcements results in higher VHN values when compared to as-cast LM4 [33]. However, in the case of hybrid composites, samples with higher TiB 2 wt%, i.e., L2T1S, exhibit the highest hardness than L1.5T1.5 S and L2S1T. The hardness of all three as-cast hybrid composites is higher than the as-cast monolithic composites and as-cast LM4 [34]. The VHN values of heat-treated composite samples follow a similar trend as in the case of LM4. Our previous studies discuss these composites' aging behavior [23]- [25]. Figures 4 and 5 show the peak aged hardness values and peak aging time of LM4 and its composites. L3SN, L3TB, L2S1T, L1.5T1.5 S, and L2T1S as-cast samples display 28,32,37,43, and 54% improvement in VHN when compared to VHN of as-cast LM4. Similarly, peak aged L3SN, L3TB, L2S1T, L1.5T1.5 S, and L2T1S samples display 124, 151, 160, 178, and 202% improvement in VHN when compared to VHN of as-cast LM4 [35]. Figure 5 shows the time required for the alloy and its composites to reach  figure 4) than those aged at 200°C. However, as seen in figure 5, the 100°C aging process takes longer to attain peak hardness. The aging kinetics can help explain this behaviour [36]. When compared to the alloy, the composites show a significant reduction in aging time. This acceleration is due to the presence of reinforcement particles, which improve the aging kinetics [37]. Higher TiB 2 and Si 3 N 4 content in composites results in a shorter aging time to attain peak hardness. Si 3 N 4 composites reach peak hardness faster than TiB 2 composites, although TiB 2 composites achieve greater peak hardness values than Si 3 N 4 composites. Furthermore, raising the wt% of TiB 2 in hybrid composites caused reduction in aging time.
Tensile tests are performed only on the best-performing (in terms of hardness values) composite samples (in both as-cast and heat-treated conditions). From figure 4 we can see that the samples subjected to MSHT +  100°C aging display the highest hardness. So tensile tests are performed on both as-cast and peak aged (MSHT + 100°C aging) LM4, L3TB, L3SN, L2T1S, L1.5T1.5 S, and L2S1T samples. Tensile test results are shown in figure 6, and we can observe that as the wt% of reinforcements increases in the monolithic composite, the UTS values increase [38]. L3TB ( in both as-cast and peak aged) display the highest UTS value compared to monolithic and hybrid composites in as-cast and peak aged conditions. As shown in figure 6, the UTS values of hybrid composites are considerably low compared to the L3TB composites sample. Firstly, adding Si 3 N 4 to the hybrid composite may have resulted in weaker interfacial bonding between the reinforcement and matrix material, reducing UTS values [39]. Si 3 N 4 is a ceramic material with a different coefficient of thermal expansion compared to the metallic matrix material (LM4) and reinforcement material (TiB 2 ), which may result in thermal  stress during processing and use, weakening the interfacial bonding. Secondly, the addition of Si 3 N 4 to the hybrid composite may also reduce the ductility of the material. Si 3 N 4 is a brittle material, and its addition may reduce the overall ductility of the composite, making it more prone to cracking and failure under tensile loading. Load versus Displacement curves of the samples subjected to tensile tests are shown in figures 7 and 8.
The major reason for the sharp increase in VHN and UTS values of heat-treated samples compared to as-cast samples is the formation of intermetallic phases like copper aluminide (Al 2 Cu), and Q-phase [40]. The presence and influence of these phases on the mechanical properties of LM4 and its composites are discussed in our previous studies with the help of SEM, XRD, and TEM analysis [23,24].

Artificial neural network (ANN)
The ANN network is trained with different types of ANN input options, like the number of hidden neurons ranging from 10 to 40 with one hidden layer and different training algorithms like LM, BR, and SCG [17]. From the results obtained, based on the R-values of different combinations mentioned above, only 7 models are selected for further analysis. Hidden neurons ranging from 10 to 25 do not give any promising R-values, so they are exempted from further analysis. Similarly, the BR training algorithm does not give better R-values, it displays R-values between 0.75 to 0.80, as the other two algorithms are performing with better R-values between 0.90 to 0.99, so the BR training algorithm is exempted from further considerations. Further analysis is carried out using only LM and SCG training algorithms with 25-40 hidden neurons. Among the above-mentioned combinations, the LM training algorithm with 30 hidden neurons has given the best-performing R-value. Now for the same combination, the data is normalized, and the network is trained, and this particular combination gave the best R-value [11,41]. Figure 9 shows the regression graphs of the model trained with normalized data with the LM algorithm and 30 hidden neurons. In the regression analysis of ANN, R-value shows the strength and direction of the relationship between predicted values and actual values [42]. If R-value is '1', it represents a perfect match between predicted and actual values; if R-value is '−1', it represents actual and predicted values are inversely proportional; if R-value is '0', it indicates no correlation exists [43]. From figure 9, we can notice that the training R-value is 0.99777, which suggests the model is a good fit and can predict the values accurately [44]. The validation R-value is 099499, which indicates the model is not overfitting and can generalize well to new data. The test R-value is 0.99228, which suggests that the model is working well on the unseen data, which is vital for evaluating the generalizability of the model. All R-value is 0.99645, which finally indicates the overall best fit of the model, and it is recommended for predicting the hardness values [11].
From figure 10, it is noticed that the best validation performance is 10.6097 indicating that the model can predict values that are 10.6097 units away from actual values, and this best result is achieved after training the model 39 times. Figure 10 also shows the training and validation errors as a function of the number of epochs (training iterations). The training error is in blue, while the validation error is in green. If the training error decreases, but the validation error increases, this is a sign of overfitting [45]. Overfitting occurs when the network has learned to fit the training data too well and cannot generalize well to new data. If both the training error and validation error decrease and plateau, this is a sign that the network has converged and further training is unlikely to improve performance. If the validation error is lower than the training error, this can indicate that the network is underfitting the data, and more complex models or training strategies may be necessary [46]. The training error should generally decrease over time. If it plateaus, the network may have converged, or additional training strategies may be necessary. The validation error should generally decrease and then plateau or increase. If it continues to decrease, the network may be overfitting the data. If it increases, the network may not be learning useful patterns in the data. The ratio of the validation error to the training error can indicate how well the network generalizes to new data. As the ratio, in this case, is low, the network is likely to perform well on new data, but if it is high, the network may not generalize well [12].  Figure 11(e) shows that the model trained with the SCG algorithm predicted VHN values with an average error value of 5.00103, which is very high compared to other error values. Figure 11(f) shows that the combination of LM training algorithm-normalized data-30 hidden neurons gave the best-predicted results with an average error value of 1.588364. So it is suggested to use the LM training algorithm and normalised data to train the ANN network for best results.

Confirmation test
LM training algorithm-normalised data-30 hidden neurons is identified as the best combination to train the ANN network as it closely predicted the age-hardening behaviour of LM4 and its composites with an average error of 1.588364. To validate the effectiveness of the trained ANN model, some additional experiments are performed within the trained limit, and the experimental results are noted. Parameters for these additional inputs are chosen within the input data limits. These additional inputs are given as inputs parameters (normalized) to the trained model, and the predicted outputs are compared with the experimental results, as shown in table 2. From table 2 it is observed that the ANN model could predict the unseen data effectively within the trained limit with an average % error of 0.14.

Conclusions
The following conclusions are made: • LM4 monolithic and hybrid composites are successfully produced using a two-stage stir casting process, and from the hardness and tensile test results, it is confirmed that with an increase in reinforcements wt%, there is an increase in VHN and UTS values of monolithic composites when compared to LM4.  • Hybrid composites display better VHN values than LM4 and monolithic composites; the presence of two hard ceramic reinforcement powders displays better resistance to external loads. L3TB displays the highest VHN and UTS values compared to other monolithic composites.
• Samples subjected to heat treatment display better VHN and UTS when compared to as-cast samples; among heat-treated samples, MSHT and 100°C aged composite samples display higher hardness and UTS values when compared to as-cast and other heat-treated samples.
• Because of the poorer interfacial bonding between the reinforcements and the matrix and the difference in coefficient of thermal expansion, hybrid composite samples have lower UTS values than L3TB (the highest).
• Successfully developed an ANN model that can predict age-hardening behaviour in terms of hardness based on the five input variables.
• LM training algorithm-normalised data-30 hidden neurons is the best combination to train the ANN network for better prediction of the aging behaviour of LM4 and its composites with an average error of 1.588364.
• The model's training R-value of 0.99777 and validation R-value of 0.99499 indicate a good fit and generalization ability, respectively. The test R-value of 0.99228 and the overall R-value of 0.99645 suggest that the model performs well on unseen data and is suitable for hardness prediction.
• Additional tests confirm that the trained model can predict the unseen data with an average %error of 0.14 within the trained limit.