Quantitative Relationship Analysis of Mechanical Properties with Mg Content and Heat Treatment Parameters in Al–7Si Alloys Using Artificial Neural Network

In this paper, an artificial neural network (ANN) model with high accuracy and good generalization ability was developed to predict and optimize the mechanical properties of Al–7Si alloys. The quantitative correlation formulas of the mechanical properties with Mg content and heat treatment parameters were established based on the transfer function and weight values. The relative importance of the input variables, Mg content and heat treatment parameters, on the mechanical properties of Al–7Si alloys were identified through sensitivity analysis. The results indicated that the mechanical properties of Al–7Si alloys were sensitive to Mg content and aging temperature. Then the individual and the combined influences of these input variables on the properties of Al–7Si alloys were simulated and the process parameters were optimized using the artificial neural network model. Finally, the proposed model was validated to be a robust tool in predicting the mechanical properties of the Al–7Si alloy by conducting experiments.


Introduction
Al-7Si alloys are extensively used in aerospace and automotive industries due to their excellent formability, high corrosion resistance, and good comprehensive mechanical properties [1,2]. The A356 and A357 alloys are two representative Al-7Si alloys with Mg contents ranging from 0.3 to 0.7 wt.% [2][3][4]. They are heat-treatable casting alloys, which can be strengthened by the precipitation of Mg 2 Si after T6 treatment [5,6]. The Mg element is a major alloying element for the formation of most effective hardening phase-metastable β"-Mg 2 Si phases. Higher Mg content increases the Mg-Si phase by altering the nucleation-driving force and growth kinetics. In addition, the size and morphology of the Mg-Si precipitates are controlled by the heat treatment process, including solution treatment, quenching, and artificial aging. Accordingly, an excellent strengthening effect benefits from the synergistic interaction between Mg content and heat treatment history.
Some investigations about the effect of alloying composition (especially Mg content) and processing parameters on the microstructure evolution and mechanical properties of Al-7Si alloys have been conducted. Yıldırım et al. [7] and Thirugnanam et al. [8] reported the effects of Mg amount 2 of 13 on the intermetallics and properties of A356 alloys. Zhu et al. [9] and Long et al. [5] presented the effects of T6 heat treatment on a modified A356 alloy. However, the previous researches discussed the effect of Mg content and heat treatment parameters independently. The information of mutual interaction between Mg content and heat treatment parameters has not been shown. Moreover, the technique of optimizing the properties by trial and error leads to excessive wastage of manpower and money.
With the emergence and development of the Materials Genome Initiative (MGI), the establishment of quantitative relationships between influence factors and properties provides an easy and efficient method in designing and optimizing alloys [10][11][12]: Prediction is prioritized and experimental verification comes later. Many mathematical models have been established to analyze the quantitative relationship [13][14][15]. However, it has been validated in Reference [16] that a mathematical model cannot predict the properties accurately due to the complex and nonlinear relationship between the variables and the properties.
In the past few decades, many artificial intelligence technologies [17][18][19] have been applied to describe this nonlinear relationship, such as genetic algorithm, neurocomputing, fuzzy logic, and artificial neural network (ANN). Compared with other methods, artificial neural network (ANN) [20,21] is a promising technology in the performance prediction field because it can solve problems faster. ANN models [16,[22][23][24][25] are well known for function approximation and feature extraction of highly complex nonlinear relationships without any physical background knowledge. The technique has been widely applied in many aspects of materials science, including prediction of mechanical properties, modeling of the processing-microstructure-property relationships [22,26,27], modeling deformation behavior [28], and generation of processing maps for hot working processes [29]. All the above analyses indicated that ANN model can accurately predict and optimize the properties of aluminum alloy. However, quantitative relationship equations and the significance of each influence factor have not been proposed.
It is essential to attempt an ANN technique to enable the quantitative expression and understanding of the complicated nonlinear relationship of "Mg content-heat treatment parameters-properties" of the Al-7Si alloy. The aim of this work is to use an artificial neural network to empirically model and interpret the dependence of the mechanical properties of Al-7Si alloy on input variables of Mg content and heat treatment parameters. This in turn provides a method for designing the alloy with targeted mechanical properties. In this paper, an accurate ANN model was constructed and the quantitative relationship between the variables and mechanical properties of Al-7Si-xMg alloys were established.

Experimental Process
In the present work, Al-7Si-xMg alloys were obtained using a low-pressure die casting technique at the same casting conditions. The compositions of the Al-7Si-Mg alloys with different Mg contents were monitored by direct reading spectrometry (Thermo ARL easySpark) and the corresponding chemical compositions are shown in Table 1. In order to investigate the effect of heat treatment parameters on Al-7Si alloys with different Mg contents, many samples with the size of 10 × 10 × 80 mm 3 were cut from the castings at as-cast condition, and they were heat treated at a constant solution temperature of 535 ± 5 • C (which was close to the eutectic temperature) with different solution times and aging parameters. Then the heat treated samples were machined with the gage length of 30 mm and cross section diameter of 6 mm as shown in Figure 1. Tensile tests were conducted according to the ASTM B557 standard using an Instron 8801 universal electromechanical testing system equipped with Bluehill software and a ±50 KN load cell at ambient temperature (~20 • C). The gauge length of the extensometer was 25 mm and the ramp rate for extension was 1 mm/min. The value of the mechanical properties was the average of the three specimens. TEM observation were performed on a transmission electron microscope (TEM-2100F) at 200 kV to observe the morphology of the Mg-Si precipitates. The specific values of variables (Mg content and heat treatment parameters) and the mechanical properties (ultimate tensile strength (UTS), yield strength (YS), and elongation) are summarized in Table 2.

Artificial Neural Network Modeling
In the present study, a multilayer artificial neural network with a back-propagation (BP) learning algorithm was employed to simulate the relation between the tensile properties and the heat treatment parameters of Al-7Si-xMg alloys. This work was accomplished by using the neural network toolbox available with MATLAB software. There were three kinds of layers in the neural network: Input layer, hidden layer, and output layer. All the layers were made up with compute units and connected by transfer functions. In the present study, the inputs for the model were Mg content and heat treatment parameters. The outputs were the ultimate tensile strength (UTS), yield strength (YS), and elongation. The details of the neural network methodology and comprehensive treatments regarding ANN can be found elsewhere [24,25,30,31]. In the current study, a number of neural networks with different numbers of neurons in the hidden layer and different transfer functions were trained and tested to optimize the architecture. The transfer functions connecting these four layers were purelin, purelin, and tansig, respectively, as shown in Equations (1) and (2). purelin(n) = n (1) tansig(n) = 2 1 + −2 − 1 (2) The parameter n was determined by the weight matrix and threshold obtained by the ANN model. It was found that the optimum model with 4-10-11-3 architecture was adequate. Table 3 presents the parameters used in this ANN model. The artificial neural networks with the best correlations for ultimate tensile strength, yield strength, and elongation were established and the ANN model designed for this study is presented in Figure 2. Finally, the relative importance of input variables on the output parameters was calculated according to the method reported in literature [32].

Artificial Neural Network Modeling
In the present study, a multilayer artificial neural network with a back-propagation (BP) learning algorithm was employed to simulate the relation between the tensile properties and the heat treatment parameters of Al-7Si-xMg alloys. This work was accomplished by using the neural network toolbox available with MATLAB software. There were three kinds of layers in the neural network: Input layer, hidden layer, and output layer. All the layers were made up with compute units and connected by transfer functions. In the present study, the inputs for the model were Mg content and heat treatment parameters. The outputs were the ultimate tensile strength (UTS), yield strength (YS), and elongation. The details of the neural network methodology and comprehensive treatments regarding ANN can be found elsewhere [24,25,30,31]. In the current study, a number of neural networks with different numbers of neurons in the hidden layer and different transfer functions were trained and tested to optimize the architecture. The transfer functions connecting these four layers were purelin, purelin, and tansig, respectively, as shown in Equations (1) and (2).
The parameter n was determined by the weight matrix and threshold obtained by the ANN model. It was found that the optimum model with 4-10-11-3 architecture was adequate. Table 3 presents the parameters used in this ANN model. The artificial neural networks with the best correlations for ultimate tensile strength, yield strength, and elongation were established and the ANN model designed for this study is presented in Figure 2. Finally, the relative importance of input variables on the output parameters was calculated according to the method reported in literature [32].

ANN Performance Analysis
It has been verified that an optical artificial neural network should satisfy three important conditions [30]: Compendious architecture, high fitting accuracy, and good generalization ability. These three characteristics were evaluated individually in this work.
The regression analysis was used to evaluate the fitting accuracy and the results are presented in Figure 3. As can be seen, the ANN model for mechanical properties can not only be well trained/validated (R = 0.92) but also accurately predict the test sets (R = 0.9). It showed an excellent correlation for the prediction of mechanical properties. This generalization ability, which means the ability to forecast unknown data, is the most important parameter of an ANN model. In this study, ten groups of alloy samples were taken to predict the strength and ductility, and the comparative results of predicted data and experimental data are shown in Figure 4. The smaller the standard deviation (proximity of input data to Y = T line), the more accurate the forecasting effect of the ANN model. The maximum absolute deviation was 4.75 MPa for UTS ( Figure 4a) and 1.3% for elongation ( Figure 4b). It indicated a convincing agreement between the predicted and experimental results for both strength and ductility. Consequently, the ANN model with high accuracy and generalization ability suggests that the predicted values could replace experimental values for deeper and further research.

ANN Performance Analysis
It has been verified that an optical artificial neural network should satisfy three important conditions [30]: Compendious architecture, high fitting accuracy, and good generalization ability. These three characteristics were evaluated individually in this work.
The regression analysis was used to evaluate the fitting accuracy and the results are presented in Figure 3. As can be seen, the ANN model for mechanical properties can not only be well trained/validated (R = 0.92) but also accurately predict the test sets (R = 0.9). It showed an excellent correlation for the prediction of mechanical properties. This generalization ability, which means the ability to forecast unknown data, is the most important parameter of an ANN model. In this study, ten groups of alloy samples were taken to predict the strength and ductility, and the comparative results of predicted data and experimental data are shown in Figure 4. The smaller the standard deviation (proximity of input data to Y = T line), the more accurate the forecasting effect of the ANN model. The maximum absolute deviation was 4.75 MPa for UTS ( Figure 4a) and 1.3% for elongation (Figure 4b).
It indicated a convincing agreement between the predicted and experimental results for both strength and ductility. Consequently, the ANN model with high accuracy and generalization ability suggests that the predicted values could replace experimental values for deeper and further research.

Sensitivity Analysis of Input Variables
In order to design the Al-7Si alloys with required mechanical properties through optimizing Mg content and heat treatment process, it was essential to understand the influential importance of these input variables on output parameters. The index of relative importance (IRI) of input variables on mechanical properties of Al-7Si-xMg alloy is presented in Figure 5. The larger the absolute value of IRI, the stronger the degree of relationship between the input and the output parameters. A negative value indicated that the output parameter was inversely related to the input variables [32]. The estimated IRI values for Mg content and heat treatment parameters were positive for strength and negative in the case of elongation. Specifically, for the UTS and elongation, the order of relative importance of sensitive factors was aging temperature > Mg contents > aging time > solution time, and that for the YS was Mg contents > aging temperature > aging time > solution time. Therefore, the effects of Mg content and aging temperature on mechanical properties were more obvious than those

Sensitivity Analysis of Input Variables
In order to design the Al-7Si alloys with required mechanical properties through optimizing Mg content and heat treatment process, it was essential to understand the influential importance of these input variables on output parameters. The index of relative importance (IRI) of input variables on mechanical properties of Al-7Si-xMg alloy is presented in Figure 5. The larger the absolute value of IRI, the stronger the degree of relationship between the input and the output parameters. A negative value indicated that the output parameter was inversely related to the input variables [32]. The estimated IRI values for Mg content and heat treatment parameters were positive for strength and negative in the case of elongation. Specifically, for the UTS and elongation, the order of relative importance of sensitive factors was aging temperature > Mg contents > aging time > solution time, and that for the YS was Mg contents > aging temperature > aging time > solution time. Therefore, the effects of Mg content and aging temperature on mechanical properties were more obvious than those

Sensitivity Analysis of Input Variables
In order to design the Al-7Si alloys with required mechanical properties through optimizing Mg content and heat treatment process, it was essential to understand the influential importance of these input variables on output parameters. The index of relative importance (I RI ) of input variables on mechanical properties of Al-7Si-xMg alloy is presented in Figure 5. The larger the absolute value of I RI , the stronger the degree of relationship between the input and the output parameters. A negative value indicated that the output parameter was inversely related to the input variables [32]. The estimated I RI values for Mg content and heat treatment parameters were positive for strength and negative in the case of elongation. Specifically, for the UTS and elongation, the order of relative importance of sensitive factors was aging temperature > Mg contents > aging time > solution time, and that for the YS was Mg contents > aging temperature > aging time > solution time. Therefore, the effects of Mg content and aging temperature on mechanical properties were more obvious than those of other parameters. This result was in accordance with the strengthening mechanism of Al-7Si-Mg alloys. of other parameters. This result was in accordance with the strengthening mechanism of Al-7Si-Mg alloys.

Prediction and Optimization of Mechanical Properties with Single Factors
The trained neural network model was applied to understand, evaluate, and predict the different correlations in aluminum alloys. In this study, the effect of the single factor of Mg content or aging temperature on mechanical properties was predicted in a reasonable range.
Mg was an important alloying element in the Al-Si alloy which basically formed the strengthening precipitates-Mg2Si phase. Figure 6a,b shows the variation of mechanical properties with Mg content. The predicted strength increased with the addition of Mg, while the ductility decreased accordingly. When the Mg content increased from 0.2 to 0.4 wt.%, the strength improved from 320 to 340 MPa and the elongation decreased slightly from 10% to 9%. However, when the Mg content increased from 0.4 to 0.7 wt.%, the elongation decreased dramatically from 9% to 4%. This variation was highly consistent with previous studies reported by Chen et al. [4,33]. This was related to the increased precipitation strengthening of Mg-Si precipitates in Al-7Si alloy with high Mg content [34]. Nevertheless, these increased precipitates weakened the plastic deformation capacity, which in turn decreased the elongation. Therefore, superior comprehensive mechanical properties were obtained at a proper Mg content level of 0.3-0.5 wt.%. Figure 6c,d presents the simulated influence of aging temperature on mechanical properties. It was found that with the increase of temperature, the strength increased first and then decreased. The highest strength of about 350 MPa was obtained when the aging temperature was between 180 and 190 °C , and the elongation decreased from 13% to 5% when the aging temperature increased from 150 to 200 °C. Consequently, the best comprehensive mechanical properties were obtained at the condition of 160-175 °C. Increasing the aging temperature accelerated the aging process since the diffusion rate of Si and Mg atoms was improved; thus, the strengthening effect was enhanced [35].

Prediction and Optimization of Mechanical Properties with Single Factors
The trained neural network model was applied to understand, evaluate, and predict the different correlations in aluminum alloys. In this study, the effect of the single factor of Mg content or aging temperature on mechanical properties was predicted in a reasonable range.
Mg was an important alloying element in the Al-Si alloy which basically formed the strengthening precipitates-Mg 2 Si phase. Figure 6a,b shows the variation of mechanical properties with Mg content. The predicted strength increased with the addition of Mg, while the ductility decreased accordingly. When the Mg content increased from 0.2 to 0.4 wt.%, the strength improved from 320 to 340 MPa and the elongation decreased slightly from 10% to 9%. However, when the Mg content increased from 0.4 to 0.7 wt.%, the elongation decreased dramatically from 9% to 4%. This variation was highly consistent with previous studies reported by Chen et al. [4,33]. This was related to the increased precipitation strengthening of Mg-Si precipitates in Al-7Si alloy with high Mg content [34]. Nevertheless, these increased precipitates weakened the plastic deformation capacity, which in turn decreased the elongation. Therefore, superior comprehensive mechanical properties were obtained at a proper Mg content level of 0.3-0.5 wt.%. Figure 6c,d presents the simulated influence of aging temperature on mechanical properties. It was found that with the increase of temperature, the strength increased first and then decreased. The highest strength of about 350 MPa was obtained when the aging temperature was between 180 and 190 • C, and the elongation decreased from 13% to 5% when the aging temperature increased from 150 to 200 • C. Consequently, the best comprehensive mechanical properties were obtained at the condition of 160-175 • C. Increasing the aging temperature accelerated the aging process since the diffusion rate of Si and Mg atoms was improved; thus, the strengthening effect was enhanced [35].

Prediction and Optimization of Mechanical Properties with Several Factors
As stated in the introduction, the influence of Mg content and heat treatment parameters on mechanical properties is complex and interdependent. Mg content influenced the hardening capacity and heat treatment parameters played an important role in the precipitation kinetics [36][37][38]. It was of great importance to examine the synthetic influence of Mg content and heat treatment parameters on mechanical properties. Accordingly, mechanical properties were simulated as a function of the synthetic effects of Mg content and heat treatment parameters and the predicted results are presented in Figures 7 and 8. The isograms of UTS and elongation were drawn based on these 3D prediction figures (Figures 7 and 8) and the results are presented in Figure 9.
It can be deduced from Figures 7 and 8 that a proper value of Mg content and heat treatment should be used to obtain the desired comprehensive mechanical properties. According to the predicted results, the Al-7Si alloy with more than 0.4 wt.% Mg accompanied by aging temperature between 170 and 190 °C and aging time about 10 h was needed in order to obtain an alloy with a high strength of more than 340 MPa. As for the elongation, lower aging temperature and time was beneficial to obtain high elongation. In addition, at a higher aging temperature, the time to peak strengthening effect was shorted due to the improved diffusion rate of both Si and Mg atoms.
In order to satisfy the performance requirement of the workpieces under specific environmental conditions, the parameters can be chosen based on the isograms in Figure 9. The best comprehensive mechanical properties could be obtained under the scope suggested by the stars and arrows in Figure  9. In the present study, the method of designing materials by setting the specific properties first and then selecting the most suitable compositions and processing parameters was proposed and established. The method of improving ductility included decreasing Mg content, aging temperature, and aging time along with increasing solution time. In addition, the density of the isogram represented the gradient of the UTS and elongation. This isogram also confirmed the sensitivity of the mechanical properties to the variables. A wider variation range suggested less impact, which was in accordance with the IRI value.

Prediction and Optimization of Mechanical Properties with Several Factors
As stated in the introduction, the influence of Mg content and heat treatment parameters on mechanical properties is complex and interdependent. Mg content influenced the hardening capacity and heat treatment parameters played an important role in the precipitation kinetics [36][37][38]. It was of great importance to examine the synthetic influence of Mg content and heat treatment parameters on mechanical properties. Accordingly, mechanical properties were simulated as a function of the synthetic effects of Mg content and heat treatment parameters and the predicted results are presented in Figures 7 and 8. The isograms of UTS and elongation were drawn based on these 3D prediction figures (Figures 7 and 8) and the results are presented in Figure 9.       It can be deduced from Figures 7 and 8 that a proper value of Mg content and heat treatment should be used to obtain the desired comprehensive mechanical properties. According to the predicted results, the Al-7Si alloy with more than 0.4 wt.% Mg accompanied by aging temperature between 170 and 190 • C and aging time about 10 h was needed in order to obtain an alloy with a high strength of more than 340 MPa. As for the elongation, lower aging temperature and time was beneficial to obtain high elongation. In addition, at a higher aging temperature, the time to peak strengthening effect was shorted due to the improved diffusion rate of both Si and Mg atoms.

Quantitative Relationship between Mechanical Properties and Variables
In order to satisfy the performance requirement of the workpieces under specific environmental conditions, the parameters can be chosen based on the isograms in Figure 9. The best comprehensive mechanical properties could be obtained under the scope suggested by the stars and arrows in Figure 9. In the present study, the method of designing materials by setting the specific properties first and then selecting the most suitable compositions and processing parameters was proposed and established. The method of improving ductility included decreasing Mg content, aging temperature, and aging time along with increasing solution time. In addition, the density of the isogram represented the gradient of the UTS and elongation. This isogram also confirmed the sensitivity of the mechanical properties to the variables. A wider variation range suggested less impact, which was in accordance with the I RI value.

Quantitative Relationship between Mechanical Properties and Variables
The ANN model is a combination of a mathematical function and associated weights between inputs, hidden units, and outputs. The quantitative relationships between mechanical properties (UTS, YS, and Elongation) and input variables (Mg content, solution time, aging temperature, and aging time) were established, and formulae of the mechanical properties with the second hidden layer are shown in Equations (3) 1 + e −2(∑ 11 where U, Y, and L are weight matrices shown in Table 4. H is the output of each neuron in the second hidden layer, which can be calculated by the quantitative relationship between the first hidden layer and the second hidden layer (Equation (6)).
where E is the output of each neuron in the first hidden layer, which can be calculated by Equation (7). The letters (a-j) are the weight matrices and m is the threshold, and they are shown in Table 5.
where M is the input parameter, f is the threshold, and the letters (α-δ) are weight matrices, and they are shown in Table 6.

Optimizing Processing Parameters
According to the above proposed ANN model, the mechanical properties of the Al-7Si alloy can be predicted and the Mg content and heat treatment parameters can be obtained for targeted mechanical properties. Accordingly, three kinds of properties containing high UTS (A), high elongation (C), and high comprehensive properties (B) were predicted and their corresponding composition and heat treatment parameters were obtained. The specific parameters are presented in Table 7. Then verification experiments were conducted correspondingly. Finally, the experimental and predicted properties were compared and the results are shown in Figure 10. The mean deviation (MD) as the evaluation criterion was calculated according to Equation (8).
where d(i) is the predicted data from the ANN model and a(i) is the experimental data from the actual tensile tests. N is the total number of data in the study.

Optimizing Processing Parameters
According to the above proposed ANN model, the mechanical properties of the Al-7Si alloy can be predicted and the Mg content and heat treatment parameters can be obtained for targeted mechanical properties. Accordingly, three kinds of properties containing high UTS (A), high elongation (C), and high comprehensive properties (B) were predicted and their corresponding composition and heat treatment parameters were obtained. The specific parameters are presented in Table 7. Then verification experiments were conducted correspondingly. Finally, the experimental and predicted properties were compared and the results are shown in Figure 10. The mean deviation (MD) as the evaluation criterion was calculated according to Equation (8).
where ( ) is the predicted data from the ANN model and ( ) is the experimental data from the actual tensile tests. N is the total number of data in the study. In this work, the MDs for UTS, YS, and elongation were 1.96, 0.88, and 0.53 and the corresponding relative percentages were 0.6%, 0.3%, and 5.9%, respectively. All the results not only verified the excellent generalization ability of the ANN model, but also indicated that the ANN model was efficient in predicting the mechanical properties of aluminum alloys.  In this work, the MDs for UTS, YS, and elongation were 1.96, 0.88, and 0.53 and the corresponding relative percentages were 0.6%, 0.3%, and 5.9%, respectively. All the results not only verified the excellent generalization ability of the ANN model, but also indicated that the ANN model was efficient in predicting the mechanical properties of aluminum alloys.

Conclusions
In this work, a feed-forward neural network with back-propagation artificial neural network (BP ANN) model with high accuracy was established to predict the mechanical properties of Al-7Si alloy.
(1) The parameters of Mg content and heat treatment process influenced the mechanical properties of the Al-7Si cast alloy. Based on the sensitivity analysis of the input variables, the sequence of the influences on the mechanical properties was established. The results showed that Mg content and aging temperature were two important parameters in determining the mechanical properties.
(2) Through the optimized ANN model, the quantitative relationships between input variables (Mg content, solution time, aging temperature, and aging time) and mechanical properties (UTS, YS, and elongation) were established by three formulas.

Conflicts of Interest:
The authors declare no conflicts of interests.