Predicting Mechanical Properties and Corrosion Resistance of Heat-Treated 7N01 Aluminum Alloy by Machine Learning Methods

In this paper, mechanical properties and corrosion resistance of different heat-treated 7N01 aluminum alloys are measured. A novel approach is proposed to establish the relationship between heat-treated processing parameters and the properties using machine learning methods. With a set of trustable data, generalized regression neural network (GRNN), support vector machine (SVM) and multiple linear regression (MLR) are applied in the prediction of mechanical properties, while GRNN and SVM, two prevalent machine learning methods, are also employed to predict the corrosion resistance. By comparing coefficient of determination (R2) and mean absolute percentage error (MAPE), we demonstrate, GRNN and SVM are indeed useful machine leaning methods for both modeling and predicting. In virtue of the new approach, we can also establish other goal-oriented models for design and prediction as long as the training data set is available. Finally, it’s found that both single-stage aging and retrogression re-aging can make the alloy reach higher strength values than double-stage aging, however the corrosion resistance of double-stage aging alloy is better than that of single-stage aging.


Introduction
7N01 aluminum alloy (Al-Zn-Mg series alloys) has been widely applied in high-speed train body structures [1][2][3] due to its excellent mechanical properties and low density. As is well known, Al-Zn-Mg alloys can be strengthened by aging treatment. Meanwhile, a few specific heat treatments can also enhance the corrosion resistance [4][5][6]. Up to now, heat treatments are developed to promote Al-Zn-Mg alloys by changing the dimension and volume fraction of precipitates in matrix as well as on grain boundaries [7][8][9][10]. At present, the majority of researchers adopt the route of process-organization-property for heat-treatment study, which is indeed an effective research idea. An approach called "trial and error method" is frequent to be taken to design heat treatment system, which means the technique is determined by experience, then the properties and organization structures are analyzed, if the results are not satisfactory, heat treatment system shall be redesigned. It is a time-consuming and laborious method. However, if the properties of Al alloys under different process parameters could be predicted, researchers would have certain design guiding direction. As a result, the efficiency could be greatly improved. Therefore, establishing accurate mathematical models to characterize quantificationally the relationship between heat-treated parameters and properties is of vital

Materials and Heat Treatments
7N01alloys are employed in this experiment,whose compositions (mass fraction) are 4.23%Zn, 1.049%Mg, 0.032%Cu, 0.377%Mn, 0.083%Zr, 0.029%Ti, 0.087%Fe, balance Al. The specimens are treated by solid-solution first at 480℃ for 1h, and then aged with different parameters, such as single-stage aging, double-stage aging and retrogression re-aging, as shown in table 1 in Appendix.

Experimental Methods
The tensile properties of different heat-treated 7N01 alloys (three parallel samples are tested for each parameter, the average values are calculated and used)are tested with WDW-3100 microcomputer control electronic universal testing machine. The ultimate tensile strength values are computed directly from the tensile curve.
The electrochemical impedance spectroscopy (EIS) is tested at CS310 electrochemical station by a three-electrode testing system, in which the reference electrode is saturated calomel electrode (SCE) and the counter electrode is platinum. The test is conducted at room temperature, and the corrosive medium is 3.5% NaCl solution. The frequency range of electrochemical impedance spectrum is 10 -1 -10 5 HZ.

MLR Model
In regression analysis, multiple linear regression (MLR) is a common method to establish the relationship between inputs and outputs. In the regression model, multiple explanatory variables (independent variables) are employed, and the dependent variable is the linear superposition of explanatory variables. The general equation can be expressed as follow: where n is the number of independent variables, k i (i=1, 2…n) represents the regression coefficient, x (i=1, 2…n) and Y are independent variables and dependent variables, respectively.

GRNN Model
Generalized regression neural network (GRNN) was first put forward in 1991 by Specht [16]. GRNN had great performance in approximation of function, and compared with other neural network, the training process was more convenient and quicker, because its structure and connection weight were uniquely identified by training samples.
GRNN structures contain four layers, they are input layer, pattern layer, summation layer and output layer, respectively. The pattern layer is also called the hidden regression layer, the Gaussian function is taken as the activation kernel function: There are two elements in the summation layer. One calculates the weighted sum of the output of each element in the pattern layer called the molecular unit, another called the denominator unit calculates the sum of the output of each unit in the pattern layer. Last, the output layer is responsible for calculating the ratio of the numerator unit to the denominator unit to get an estimate value.

SVR Model
Support Vector Machine (SVM) was a novel and universal machine learning method proposed by Vapnik et al. in the 1990s. Based on the statistical learning theory, SVM embodied the idea of structural risk minimization [17]. It is especially intractable to deal with non-linear regression problems when facing regression. The non-linear mapping to the high dimensional feature space can change the non-separable mode of the low dimensional space into linear separable mode. Hence in order to solve non-linear regression problems, kernel functions are introduced in SVM which played an extremely important role. In this paper, the radial basis function is chosen as the kernel: The final regression function is: where , * are Lagrange multipliers and bis the bias. After these coefficients are obtained, the corresponding predictive value f(x) can be predicted using equation (4), with the descriptors x which is unseen the training data set.

Mechanical Properties Models
After obtaining 72 set of input-output pairs, including 45 single-stage aging pairs, 9 double-stage aging pairs and 18 retrogression re-aging pairs, the relationship between heat-treated parameters and mechanical properties are established by GRNN, SVR and MLR models. First aging time and temperature, second aging time and temperature, third aging time and temperature are regarded as the six inputs, while ultimate tensile strength is deemed as the output. First of all, 72 sets of data are divided into training set and testing set. 62 sets of training set are used to build model, and 10 sets of testing set are employed to test the extrapolation ability of the model to prevent over fitting. The final MLR model developed by 62 sets of training set is given as equation (5), Where x 1 -x 6 is expressed as the aging time and temperature of I, II and III respectively, and x 5 is excluded as the interference term in the fitting:  Before the establishment of the GRNN and SVR model, the normalization of 62 sets of training is carried out first to avoid the accuracy reduction of the model due to the gap between independent variables. The normalization formula is shown below: The independent variables are normalized to the interval of [-1, 1], where x is the original data, x' is the normalized data, x min and x max are the minimum value and maximum value in the original data, respectively.
After the normalization, the three different models are established precisely. Experimental values, training and testing data developed by GRNN, SVR and MLR models for mechanical properties are shown in figure 1. Solid lines include red line in figure 1a, blue line in figure 1band green line in figure  1c represent the training data fitting line, while dotted line is the ideal 45° line. The closer solid lines and dotted line are, the more accurate the models established by training set will be. Compared the three solid lines, it can be observed that red line and blue line are closer to the ideal 45° line, indicating that GRNN and SVR process a high accuracy for modeling.
To further compare the three models, the coefficient of determination (R 2 ) and mean absolute percentage error (MAPE) are introduced here to evaluate the three models, which the formulas are shown below as equations (7) and (8): where � is the predicted value, while y represents the experimental measured value, and n is the number of samples. R 2 , which is always employed to determine the fitting effect of the regression modes, has a range between 0 to 1. The closer to 1 the value is, the better the fitting effect performs. From figure  1, the R 2 values can be intuitively caught that R 2 train of GRNN and SVR model approximate to 1, which are 0.9967 and 0.9828, respectively, while R 2 train of MLR is only 0.6823. Therefore, the GRNN and SVR models have high modeling accuracy compared with the MLR model. Besides, the relative error percentage of GRNN, SVR and MLR model are shown in figure 2. As shown in figure 2, the GRNN and SVR models have smaller amplitude fluctuations above and below the dotted line, and relative errors are almost always within 6%, but the MLR model fluctuates greatly with the maximum of 35%, indicating a larger error than GRNN and SVR.
The prediction abilities of GRNN, SVR and MLR models are exhibited in table 2 by calculating the relative errors between experimental values and predicted values of testing set. The relative errors of GRNN model and SVR model is much smaller with the maximum errors of 5.81% and 6.29% respectively. However, the maximal relative errors of MLR model is 23.99%. Table 3 shows the MAPEs for evaluating GRNN, SVR and MLR models. Obviously, GRNN model has small MAPEs, which is 0.570% in training set, and 2.028% in testing set. So does the SVR model, which has the MAPEs of 1.362% in the training set and 2.291% in the testing set. However, in MLR model, it is 6.646% in training set, 7.075% in testing set. The lower MAPEs are, the better the modeling and prediction are. The MAPEs manifest that the errors between measured and predicted are lower in GRNN and SVR models than in MLR model. It is of valid testification that the modeling and predicting performance of GRNN and SVR is much better than that of MLR.
Through the comparison of the above series of indicators, it can be concluded that the tradition MLR model has numerous limitations and poor fitting performance. However, the GRNN and SVR model used to fit are more accurate and also have an excellent effect in the prediction of unknown data (testing sample).     the strength change is gentle before 10 min, then the strength gradually increases with the extension of time, peaks at 50 min, and then slightly decreases. The tensile strength at 130 ℃ firstly decreases and then increases with time, reaching the peak value at 50min, and then slightly decreases. At 160 ℃, firstly the tensile strength decreases, then increases and then decreases with time, reaching the peak value at 15min. There exists a peak aging time in single-stage aging, and the higher the aging temperature is, the shorter the peak time will be. Then, we have studied the effect of different retrogression parameters including time and temperature on the tensile strength of 7N01 alloys. As shown in figure 3b, while at the retrogression temperature of 210 ℃, the strength of the alloy increases first and then decreases, reaching a peak value of 484 MPa at 30 min. Then when the retrogression temperature is 230 ℃, the strength of the alloy also increases first and then decreases, reaching a peak value of 477 MPa at 20min. At last, with the retrogression temperature of 250 ℃, the strength reaches the peak value of 479MPa at the 10 min. In other words, the higher the regression temperature of the alloy, the shorter the time to reach the peak is, also the strength decline rate of the alloys increases with the increased temperature.
The precipitation phase sequence of 7N01 aluminum alloy during aging process is: α (supersaturated solid solution)→GP zone (I and II) →Metastable phase η'(MgZn2)→η(MgZn2). The higher the retrogression temperature is, the stronger the diffusion ability of solute atoms is, then the quicker GP zone and η' dissolve back. As a result, the undissolved GP zone which can be used as η' nucleation area during re-aging stage decrease, and the formation rate of η phase is faster. Therefore, with the increase of the retrogression temperature, the time to reach the peaking strength is shorter, and the larger the decline rate is. In other words, the increase of regression temperature would shorten the time for aluminum alloy to maintain high strength, and the alloy is prone to over-aging, which means more difficult to control with parameters. Appropriately reducing the retrogression temperature makes part of GP zones and tiny η' phase to dissolve, and the original η' phase in the matrix continuing grow up, then the new GP zone can produce. Therefore, the peak strength of the alloy could increase, so does the time to maintain a higher strength. Figure 4 shows the Electrochemical Impedance Spectroscopy (EIS) of 7N01 alloy samples in 3.5% NaCl solution. Figure 4a is the Nyquist and figure 4b is the Bode, indicating the relationship between the impedance Z' and the impedance Z'', the relationship between the frequency and the impedance modulus Z and the phase Angle, respectively. It can be found that there is only a capacitive reactance arc in all three different kinds of ageing state alloys in figure 4a. The amplitude of capacitive reactancearc, that is, the curvature radius, can be used to judge the corrosion resistance of Al alloys. When the arc curvature radius of the capacitive reactance is larger, the degree of ion exchange is smaller, the polarization resistance is larger, and the corrosion resistance is better. In figure 4b, there is only one peak and one trough in the phase angle diagram, therefore only a time constant exists in the EIS. The equivalent circuit diagram in figure 5 is employed to conduct circuit fitting for impedance spectra with the software. The constant phase angle element is used to replace the capacitor element in the circuit for better fitting effect, and it is expressed as C p in figure 5, which is defined as:

Corrosion Resistance Models
Y 0 is a constant, j is an imaginary unit, and W is the angular frequency, while n is the capacitor diffusion coefficient. When n=1, the constant phase angle element is the pure capacitor element. When n=0, the constant phase angle element is the pure resistance element [18]. R s is the solution resistance, R t corresponds to charge transfer resistance. The higher the R t value is, the better the protective effect of the oxide film on the original surface to the sample will be and the better the corrosion resistance is. So, the fitting R t values are employed for evaluating the corrosion resistance.    By fitting the 29 groups of EIS, the circuit parameters of impedance spectra under different aging systems are obtained in table 4 in Appendix. Since R t can be used to represent the corrosion resistance of the alloys, heat treatment parameters are taken as inputs and R t values as output to establish GRNN and SVR models. Similar to the mechanical properties model, 29 set of input-output pairs are divided into 23 training sets and 6 testing sets, and are normalized first. Figure 6 shows the R t values and predicted values of GRNN and SVR models. It can be observed that whether GRNN model of data fitting line (red line), or the SVR model fitting line (blue line) is approximate to the ideal 45° dotted line, manifest that the two models for training set fitting are much accurate. Black dots are testing sets whose role are to examine model's ability for prediction of external data. Compared GRNN with SVR, the distance from the black dots to the ideal 45° line is not significant, indicating both GRNN and SVR model has similar and high fitting precision. Coefficient of determination (R 2 s) are also given in figure 6. In GRNN model, R 2 train and R 2 test are equal to 0.9981 and 09837 respectively, while R 2 train and R 2 test of SVR model are 0.9889 and 0.9815. R 2 train in GRNN is bigger than in SVR, but express a slight gap between them. The R 2 s which close to 1 signify the two current models both have excellent performance fitting and the prediction.
The relative errors as shown in figure 7 indicate that both two models have small training errors and testing errors. And the MAPEs in table 5 are able to intuitively compare the performance of the two models. The GRNN training set is 2.369%, and the SVR training set is 2.153%, which are both similar and small. However, the GRNN testing of 4.940% is larger than the SVR testing of 3.596%, indicating that the GRNN model may have a little over fitting. It can be seen from the above comparison that they are two excellent methods to the fitting of training set and the prediction of test set.  Relative error(%)  Machine learning method is an effective tool for predicting material properties. With the method, materials' design and predict would be convenient and efficient. Similarly, ML method can also be used in other physical and chemical properties, as long as the data is available and effective.

Number of Samples
By comparing such heat treatment process, it's found that although 7N01 alloys after single-stage aging have much higher tensile strength than that with double-stage aging, the corrosion resistance also reduces much seriously.

Conclusions
(1) 7N01 alloys with single-stage aging treatment have much higher tensile strength but poor corrosion resistance than that with double-stage aging treatment.
(2) In mechanical property models, by comparing the R 2 and MAPEs, it can be concluded GRNN and SVR model both have higher R 2 and lower MAPEs whether in training or testing set than MLR, which indicates the tradition MLR model has numerous limitations and poor fitting performance and the GRNN and SVR model used to fit are more accurate and also have excellent effects in the prediction.