Method for predicting corrosion resistance of magnesium-lithium alloy based on machine learning

The prediction model is constructed through machine learning algorithms, and the rapid and accurate evaluation of electrochemical corrosion behavior of magnesium lithium alloys is solved, and effective judgment of corrosion resistance of magnesium lithium alloys and auxiliary roles in the design of magnesium lithium alloys are realized.

CN119993346APending Publication Date: 2025-05-13ZHENGZHOU UNIV

Patent Information

Application Number
CN202510119473.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-24
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The prior art is difficult to quickly and accurately evaluate the electrochemical corrosion behavior of magnesium lithium alloys after heat treatment, extrusion and rolling, which limits its application.

Method used

Using machine learning algorithms, we use the electrochemical corrosion behavior data of magnesium lithium alloys to construct a variety of machine learning models (such as random forests, support vector machines, gradient enhancement, etc.) to predict the electrochemical corrosion behavior of magnesium lithium alloys.

Benefits of technology

It realizes rapid and accurate prediction of the electrochemical corrosion behavior of different components and treatment states of magnesium lithium alloys, provides effective judgment on the corrosion resistance of magnesium lithium alloys, and assists in the design and research of magnesium lithium alloys.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119993346A_ABST
    Figure CN119993346A_ABST
Patent Text Reader

Abstract

The invention discloses a method for predicting corrosion resistance of a magnesium-lithium alloy based on machine learning, and belongs to the technical field of metal material design. Metal elements participating in prediction comprise Mg, Li, Al, Zn, Si, Ca, Sn, Y, Nd, Gd, Ce, Zr, La, Mn and Er, and the prediction method comprises the following steps: training model parameters by using a training set in an established database based on a machine learning algorithm; and evaluating the model by using a test set, and predicting Ecorr and icorr values of different alloys formed by elements with different contents in the magnesium-lithium alloy. According to the method, the electrochemical corrosion behavior of the alloy with different components formed by multiple different element contents of the magnesium-lithium alloy is predicted through a machine learning algorithm, so that the corrosion resistance of the alloy is effectively judged; and meanwhile, the method plays an important auxiliary role in research on the corrosion resistance of the magnesium-lithium alloy and design of the corrosion-resistant magnesium-lithium alloy in the future, and the problem that the corrosion resistance of the material is rapidly and accurately evaluated at present is effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of metal material design, and in particular relates to a method for predicting the corrosion resistance of magnesium-lithium alloys based on machine learning. Background Art

[0002] Compared with other metal structural materials, magnesium-lithium (Mg-Li) alloy is the lightest, with a density of 1.25 to 1.65 g / cm 3 The alloy has a strength of only 1 / 2 that of aluminum alloy and 3 / 4 that of traditional magnesium alloy. At the same time, Mg-Li alloy also has the characteristics of high specific strength and specific stiffness, biocompatibility and good low temperature performance, and has good application prospects in the fields of automobile, aerospace, biomedicine, etc.

[0003] Traditional corrosion-resistant Mg-Li alloy design methods usually require the selection of element composition and content based on rich experience, or the processing of existing alloys, and require a large number of experiments for verification, which often requires a long test time and high cost. With the development of big data technology, machine learning has shown significant advantages in modeling and data processing. It trains models based on a large amount of experimental data and material property information, establishes a complex mapping relationship between characteristic parameters and target variables, and then predicts the mechanical properties, fatigue life, phase structure, etc. of the material within a certain accuracy range through the trained model. Therefore, using machine learning methods to quickly and accurately predict the performance of different magnesium-lithium alloy components and guide the prediction of future magnesium-lithium alloys is still a major research direction today.

[0004] Machine learning is playing an increasingly important role in guiding the field of material design. At present, there have been studies reporting on patents related to the use of machine learning methods to guide the design of magnesium alloy materials. For example, the Chinese invention patent with application publication number CN117521518A discloses a method for optimizing the heat treatment process of magnesium alloys based on machine learning. It constructs a machine learning model with mechanical properties as output and magnesium alloy process descriptors as input. In the process of training the machine learning model, the leave-one-out method is used to divide the training set data, thereby realizing the prediction of the mechanical properties of magnesium alloys by heat treatment data. The Chinese invention patent with application publication number CN118197502A discloses a method for designing high thermal conductivity and high electrical conductivity alloys based on symbolic regression and machine learning. By constructing an original data set for predicting the thermal conductivity and electrical conductivity of the alloy, a machine learning algorithm is used to screen features related to the thermal conductivity and electrical conductivity of the alloy, etc., and component points with high thermal conductivity are selected, and finally an alloy with high thermal conductivity and high electrical conductivity is obtained. However, the existing patents focus on the prediction of electrochemical corrosion behavior of cast magnesium-lithium alloys, and cannot predict the electrochemical corrosion behavior of magnesium-lithium alloys after heat treatment, extrusion, rolling, etc., which limits their application. This prediction method can not only predict the electrochemical corrosion behavior of cast magnesium-lithium alloys, but also directly predict the electrochemical corrosion behavior of magnesium-lithium alloys after heat treatment, extrusion, rolling, etc. (E corr and i corr ). Summary of the invention

[0005] The purpose of the present invention is to solve the problems existing in the prior art and provide a method for predicting the corrosion resistance of magnesium-lithium alloys based on machine learning. The values ​​of alloys with different components formed by various elements in magnesium-lithium alloys are predicted by machine learning algorithms, so as to effectively judge the corrosion resistance of the alloy. At the same time, it plays an important auxiliary role in the future research on the corrosion resistance of magnesium-lithium alloys and the design of corrosion-resistant magnesium-lithium alloys, and effectively solves the current problem of quickly and accurately evaluating the corrosion resistance of materials.

[0006] To achieve the above object, the present invention adopts the following technical solution: A method for predicting the corrosion resistance of magnesium-lithium alloy based on machine learning, comprising the steps of:

[0007] S1. Collect electrochemical corrosion behavior data and construct a dataset:

[0008] The electrochemical corrosion behavior data of magnesium-lithium alloys were collected from a large number of literatures through academic websites, including alloy composition, alloy state, test temperature, solution environment, and corrosion potential E of Mg-Li alloy measured in electrochemical tests. corr and corrosion current density E corr Information, build a data set through the collected data information;

[0009] S2. Process and select the data in the data set, and determine the valid data points in the data set for predicting corrosion potential and corrosion current density as input features:

[0010] In the data processing process, the missing data points in some data sets are first eliminated and mean filled, the input features are extracted from the remaining data, and then the data are standardized. Finally, the electrochemical corrosion behavior data are numerically converted and logarithmically calculated. The input features finally determined by the above data processing are composed of three parts: alloy composition, processing technology and corrosive medium;

[0011] For corrosion potential E corr Data processing: Since the reference electrodes of the electrochemical experiments recorded in the database include saturated silver / silver chloride electrode Ag / AgCl and saturated calomel electrode SCE, the corrosion potential E corr The reference electrode is unified as the value when the reference electrode is a saturated calomel electrode (SCE). The conversion formula is:

[0012] E SCE =E Ag / AgCl -0.044;

[0013] For the corrosion current density E corr Data processing: Due to the large dispersion of corrosion current density, in order to reduce the variability of the target variable, the corrosion current density E corr The data is subjected to negative logarithm mathematical operation with base 10;

[0014] S3. Build a machine learning model:

[0015] Construct multiple machine learning models, including random forest RF, support vector machine SVM, gradient boosting GBDT, extra tree ET, Huber regression HR and extreme gradient boosting XGBoost to predict the electrochemical corrosion behavior of magnesium-lithium alloy;

[0016] S4. Divide the input features in the data set and perform model training:

[0017] The training set and test set were divided into cross-validation sets in a ratio of 4:1. The hyperparameters of different machine learning models were trained using the training set, and the hyperparameters of the models were optimized using Bayesian optimization.

[0018] In the prediction of the corrosion resistance of magnesium-lithium alloy, the model constructed with different hyperparameter combinations is used as the proxy model. The optimization goal is to minimize the root mean square error RMSE of the model on the validation set. Through the iterative Bayesian optimization process, the best hyperparameter combination x* is finally determined, thereby achieving the best accuracy in predicting the corrosion resistance of magnesium-lithium alloy.

[0019] The formula for Bayesian optimization is: Where X represents the entire hyperparameter search space, x is the hyperparameter sampled from bounded X, and f(x) represents the evaluation result of the hyperparameter combination x;

[0020] S5. Use the test set to evaluate the performance of the model and use feature importance and SHAP analysis to screen out the best machine learning model:

[0021] The test set is used to train the machine learning model to predict the electrochemical corrosion behavior parameter combinations of alloys with different compositions, and the determination coefficient R is used to 2 , root mean square error RMSE and mean absolute error MAE to evaluate the predictive ability of machine learning models, use feature importance and SHAP analysis methods to analyze machine learning models, improve the interpretability of the models, and screen out the best machine learning models;

[0022] S6. Collect new electrochemical corrosion data as a validation set and input it into the best machine learning model to predict the best electrochemical corrosion behavior data:

[0023] Several new sets of electrochemical corrosion data were re-selected from academic websites as validation sets. At the same time, experiments were performed on the electrochemical workstation to predict the best electrochemical corrosion behavior data from the input features that affect electrochemical corrosion.

[0024] Furthermore, in step S2, the types of metal elements of the alloy components in the input characteristics include: Mg, Li, Al, Zn, Si, Ca, Sn, Y, Nd, Gd, Ce, Zr, La, Mn and Er, and the processing technology includes: homogenization temperature (H_Tem), homogenization time (H_Time), extrusion temperature (E_Tem), extrusion ratio (E_R), solution temperature (S_Tem), solution time (S_Time), rolling temperature (R_Tem) and rolling ratio (R_R).

[0025] Furthermore, in step S2, the corrosion medium of all alloys is a neutral NaCl solution at room temperature, and only the Cl ion concentration (Cl_ion) is recorded. In step S2, the specific method of elimination and mean filling includes: eliminating a group of data with more missing data, eliminating data with similar composition but large difference in corrosion performance in the magnesium-lithium alloy data set, and using the mean filling method for data with fewer missing data.

[0026] Furthermore, in step S2, the standardization processing method is: by converting the data into a standard normal distribution with a mean of 0 and a standard deviation of 1, the purpose of standardization is achieved. The data range is between [-1, 1]. The standardization formula is: In the formula, X is the data to be standardized, X normalized is the standardized data, μ and σ are the mean and standard deviation of the original data respectively.

[0027] Furthermore, in step S4, the training set and the test set are divided into a ratio of 4:1 and cross-validation is performed during the training process. Cross-validation is to divide the original data set into k folds of equal size, each fold is used as a validation set, and the remaining k-1 folds are combined into a training set, so as to perform k times of model training and evaluation, each time using a different validation set for evaluation, and finally taking the average of the k evaluation results as the evaluation indicator of model performance.

[0028] Furthermore, in step S5, the determination coefficient R 2 The calculation formulas for RMSE, MAE and RMSE are as follows:

[0029]

[0030] In the formula, n represents the total number of samples, Y i , are the true value, predicted value and average value of corrosion potential and corrosion current density, respectively.

[0031] Furthermore, in step S5, feature importance and SHAP method are used in model analysis to analyze the machine learning model and improve the interpretability of the model, giving priority to R 2 The value of R 2 The closer the value is to 1, the better the performance of the model is. Secondly, the influence of RMSE and MAE is considered. Using RMSE can better reduce the impact of errors than MSE, reflecting the deviation between the model prediction and the actual value, while MAE can be more sensitive to higher outliers. Finally, their performance on the test set is combined to select the best machine learning model.

[0032] Furthermore, in step S6, 5 groups of validation data are selected, the electrochemical device used is a RST5200F electrochemical workstation, and the polarization curve diagram is drawn by conducting experiments on the workstation.

[0033] The beneficial effect of the present invention is that the present invention predicts the values ​​of alloys of different compositions formed by various elements in magnesium-lithium alloys through a machine learning algorithm, thereby effectively judging the corrosion resistance of the alloy, and at the same time plays an important auxiliary role in the future research on the corrosion resistance of magnesium-lithium alloys and the design of corrosion-resistant magnesium-lithium alloys, and effectively solves the current problem of quickly and accurately evaluating the corrosion resistance of materials. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 This is a design framework diagram for predicting the corrosion resistance of magnesium-lithium alloy using the ML method in an embodiment of the present invention;

[0035] Figure 2 E is predicted by different ML models in the embodiments of the present invention corr and i corr R 2 , MAE and RMSE value comparison chart;

[0036] Figure 3 (a) E is predicted by different ML models on the training set and the test set in the embodiment of the present invention corr and (b)i corr Comparison chart of

[0037] Figure 4 Two methods in the embodiments of the present invention are used to demonstrate the interpretability of the model (a1 and b1) feature importance and (a2, b2, a3 and b3) SHAP;

[0038] Figure 5 The polarization curve diagram obtained through experiments to verify the concentrated magnesium-lithium alloy. DETAILED DESCRIPTION

[0039] The present invention is further explained below in conjunction with the accompanying drawings and specific embodiments.

[0040] Embodiment: The present invention provides a method for predicting the corrosion resistance of magnesium-lithium alloy based on machine learning, comprising the steps of:

[0041] S1. Collect electrochemical corrosion behavior data and construct a dataset:

[0042] The electrochemical corrosion behavior data of magnesium-lithium alloys were collected from a large number of literatures through Web of Science, Springer and Google Scholar, including alloy composition, alloy state, test temperature, solution environment and corrosion potential E of Mg-Li alloy measured in electrochemical test. corr and corrosion current density E corr Information, a total of 289 points of data, the data set is constructed through the collected data information.

[0043] The problem of poor corrosion performance of Mg-Li alloys can be solved by alloying, heat treatment and severe plastic deformation. In other words, the electrochemical corrosion behavior of magnesium-lithium alloys is not only related to the type and content of elements, but also closely related to the processing technology and corrosive media. These parameters together affect the corrosion resistance of magnesium-lithium alloys. Drawing on insights from feature engineering principles, using these parameters as model inputs is expected to significantly enhance the generalization ability of ML models and promote the accuracy of predicting the corrosion resistance of magnesium-lithium alloys.

[0044] S2. Process and select the data in the data set to determine the alloy composition, processing technology and corrosive medium of the valid data points in the data set for predicting corrosion potential and corrosion current density as input features:

[0045] In the data processing process, the missing data points in some data sets are first eliminated and mean filled, the input features are extracted from the remaining data, and then the data is standardized. Finally, the electrochemical corrosion behavior data is converted into numerical values ​​and logarithmic operations are performed. The specific methods of elimination and mean filling include: eliminating a group of data with more missing data, eliminating data with similar composition but large differences in corrosion performance in magnesium-lithium alloy data sets, and using the mean filling method for data with fewer missing data.

[0046] The input features finally determined by the above data processing are composed of three parts: alloy composition, processing technology and corrosive medium; the metal elements of the alloy composition in the input features include: Mg, Li, Al, Zn, Si, Ca, Sn, Y, Nd, Gd, Ce, Zr, La, Mn and Er, and the processing technology includes: homogenization temperature (H_Tem), homogenization time (H_Time), extrusion temperature (E_Tem), extrusion ratio (E_R), solution temperature (S_Tem), solution time (S_Time), rolling temperature (R_Tem) and rolling ratio (R_R). After data filtering, there are 268 and 265 valid data points for predicting corrosion potential and corrosion current density, respectively.

[0047] The standardization method is to convert the data into a standard normal distribution with a mean of 0 and a standard deviation of 1, so as to achieve the purpose of standardization. The data range is between [-1, 1]. The standardization formula is: In the formula, X is the data to be standardized, X normalized is the standardized data, μ and σ are the mean and standard deviation of the original data respectively.

[0048] For corrosion potential E corrData processing: Since the reference electrodes of the electrochemical experiments recorded in the database include saturated silver / silver chloride electrode Ag / AgCl and saturated calomel electrode SCE, the corrosion potential E corr The reference electrode is unified as the value when the reference electrode is a saturated calomel electrode (SCE). The conversion formula is:

[0049] E SCE =E Ag / AgCl -0.044.

[0050] For the corrosion current density i corr Data processing: Since the dispersion of corrosion current density is large, in order to reduce the variability of the target variable, the corrosion current density i corr The data is subjected to a negative logarithm operation with a base of 10, so that i corr The distribution of is more compact. In order to enable the machine learning model to learn the relationship between features and target variables more effectively, the input features are standardized and the range of feature values ​​is scaled to a similar scale.

[0051] S3. Build a machine learning model:

[0052] A variety of machine learning models were constructed, including six ML regression models: random forest RF, support vector machine SVM, gradient boosting GBDT, extra tree ET, Huber regression HR and extreme gradient boosting XGBoost to predict the electrochemical corrosion behavior of magnesium-lithium alloys.

[0053] S4. Divide the input features in the data set and perform model training:

[0054] Because the data set selected in the above steps is used to predict the effective data points of corrosion potential and corrosion current density, respectively, 268 and 265, the number of data points is small, so the training set and test set are divided into a ratio of 4:1 for cross-validation. Cross-validation is to divide the original data set into k folds of equal size, each fold is used as a validation set, and the remaining k-1 folds are combined into a training set. In this way, k model training and evaluation can be performed, each time using a different validation set for evaluation, and finally the average value of the k evaluation results is used as the evaluation indicator of model performance.

[0055] The hyperparameters of the machine learning model were trained multiple times using the training set, and Bayesian optimization was used to further optimize the hyperparameters of the machine learning model during the training process to avoid overfitting. Each ML algorithm was randomly divided and trained five times, and the best performing model was selected as the best performance of the algorithm in dealing with this problem.

[0056] Bayesian optimization is based on the performance evaluation of the surrogate model on the previously completed samples of different hyperparameter combinations (x1, f(x1)),..., (xt, f(xt))) and the acquisition function to find a new hyperparameter combination xt+1 that may be useful for the next step of detection; the Bayesian optimization process requires the definition of the search space and the sample points of the initial hyperparameter combination. Through multiple iterations, the optimal hyperparameter combination within the defined iteration cycle can be determined. Compared with other optimization methods, Bayesian optimization has lower computing resource consumption, is not limited by the size of the database, and has no strict requirements on the data dimension.

[0057] In the prediction of the corrosion resistance of magnesium-lithium alloy, the model constructed with different hyperparameter combinations is used as the proxy model. The optimization goal is to minimize the root mean square error RMSE of the model on the validation set. Through the iterative Bayesian optimization process, the best hyperparameter combination x* is finally determined, thereby achieving the best accuracy in predicting the corrosion resistance of magnesium-lithium alloy.

[0058] The formula for Bayesian optimization is: Where X represents the entire hyperparameter search space, x is the hyperparameter sampled from bounded X, and f(x) represents the evaluation result of the hyperparameter combination x;

[0059] S5. Use the test set to evaluate the performance of the model and use feature importance and SHAP analysis to screen out the best machine learning model:

[0060] The test set is used to train the machine learning model to predict the electrochemical corrosion behavior parameter combinations of alloys with different compositions, and the determination coefficient R is used to 2 , root mean square error RMSE and mean absolute error MAE to evaluate the predictive ability of the machine learning model, use feature importance and SHAP analysis methods to analyze the machine learning model, and improve the interpretability of the model to screen out the best machine learning model.

[0061] Use feature importance and SHAP methods in model analysis to analyze machine learning models and improve model interpretability, with R being a priority 2 The value of R 2 The closer the value is to 1, the better the performance of the model is. Then, the influence of RMSE and MAE is considered. In the present invention, RMSE can better reduce the influence of errors than MSE, reflecting the deviation between the model prediction and the actual value, while MAE can be more sensitive to higher outliers. The closer RMSE and MAE are to 0, the better the model is. Finally, the optimal model (both XGBoost algorithms) is selected by combining their performance on the test set.

[0062] Coefficient of determination R 2The calculation formulas for RMSE, MAE and RMSE are as follows:

[0063]

[0064] In the formula, n represents the total number of samples, Y i , are the true value, predicted value and average value of corrosion potential and corrosion current density, respectively.

[0065] like Figure 2 and Figure 3 As shown, the XGBoost algorithm is used in the present invention to respectively corr and i corr The most accurate prediction (R 2 =85.6% and 84.1%), and has good robustness. 2 , RMSE and MAE are as follows Figure 2 The comparison between the actual value and the predicted value of each ML model on the training set and the test set is shown in Figure 3 Generally speaking, the closer the data point is to the diagonal line, the closer the model's predicted value is to the true value. Figure 2 In summary, the XGBoost model is selected to predict the E corr and i corr .

[0066] like Figure 4 As shown, it is crucial to identify the most important features to accurately predict the model output. Figure 4 Two methods are presented to analyze the interpretability of the model. First, Figure 4 (a1) and (b1) show the corr and i corr The feature importance ranking of the ML model is used to intuitively show the contribution of each input feature to the corrosion resistance of magnesium-lithium alloy. corrIn the prediction, Ca is the most important. The addition of Ca to the alloy is beneficial to the reduction of grain size and the enhancement of corrosion resistance. However, with the increase of Ca content, the (Mg, Al)2Ca phase will accelerate galvanic corrosion. Ce is also relatively important in the model because it promotes the formation of Al2Ce phase in Mg-Li-Al alloys. This phase helps to refine the grain size and inhibit the precipitation of AlLi and MgLi2Al compounds, thereby reducing microgalvanic corrosion between β-Li phase and Al-rich particles. Zn is also ranked relatively high, which may be attributed to its role in the formation of Mg-Li-Zn phase. Compared with the matrix, this phase exhibits a higher potential, resulting in the formation of microgalvanic corrosion inside the alloy, thereby accelerating local corrosion. In addition, R_Tem in the processing parameters also plays an important role. After hot rolling treatment, the grain structure of the alloy is refined and the distribution of the second phase becomes more uniform, which helps to slow down the corrosion process. For i corr The alloying elements Al, Mg, Li and Zn are particularly important for the prediction of corrosion resistance of Mg-Li alloys. Al plays a vital role in improving the corrosion resistance of Mg-Li alloys. The presence of dissolved Al enhances the hydrogen overpotential of the alloy and improves the structure and composition of the oxide film, thereby providing stronger corrosion resistance. Both Mg and Li are active metal elements soluble in water, which can cause corrosion when Mg-Li alloys are immersed in NaCl solutions. The corrosion reaction produces magnesium hydroxide, lithium hydroxide and hydrogen, as shown in the following two formulas:

[0067] Mg+2H2O=Mg(OH)2+H2↑

[0068] 2Li+2H2O=2LiOH+H2↑

[0069] In addition to the feature importance method, SHAP was used to explore the model's logic in handling prediction problems. In this study, SHAP assigned each feature an important value for a specific prediction, which helped to better understand the model's decision-making process and thus improve the accuracy of predictions of material properties. Figure 4 (a2) and (b2) reflect the influence of each feature on the model prediction. They represent the significance of each variable as a series of colored points on the graph, with the y-axis representing feature correlation and the x-axis representing SHAP level. Red points represent larger values ​​and blue points represent smaller values. Figure 4 (a3) and (b3) show the average SHAP value of each feature, which intuitively reflects the contribution of each input feature to the model prediction in the entire dataset.

[0070] In predicting E corr Element Y has a positive effect, which may be due to its similar standard electrode potential to Mg and its ability to produce a dense Y2O3 layer on the alloy surface, thereby enhancing the corrosion resistance.corr Since a negative logarithmic transformation is applied to the output values, the impact of the input features is opposite. - to i corr The influence of the corr value) because it can penetrate and destroy the oxide film on the surface of magnesium-lithium alloy. - The increase in concentration accelerates the anodic activation dissolution of the alloy, thereby increasing the corrosion rate. Among the processing parameters, extrusion temperature ranks high and has a great impact on i corr The improved corrosion resistance of the alloy after extrusion is attributed to grain refinement and uniform distribution of intermetallic phases. In contrast, the homogenization temperature and time have a positive effect on corrosion resistance by reducing casting defects and enhancing the uniformity of the microstructure, thereby slowing down the corrosion process (for i corr negatively impact the value).

[0071] S6. Collect new electrochemical corrosion data as a validation set and input it into the best machine learning model to predict the best electrochemical corrosion behavior data:

[0072] Several new sets of electrochemical corrosion data were re-selected from academic websites as validation sets. At the same time, experiments were performed on the electrochemical workstation to predict the best electrochemical corrosion behavior data from the input features that affect electrochemical corrosion.

[0073] Five groups of validation data were selected, and the electrochemical equipment used was a RST 5200F electrochemical workstation. The polarization curves were drawn by conducting experiments on the workstation.

[0074] In addition, in order to further evaluate the E corr and i corr In order to improve the generalization performance of the ML model, we collected 5 new electrochemical corrosion data entries (not included in the training and test sets) as the validation set. The processing parameters of these magnesium-lithium alloys are shown in Table 1. It should be noted that: Sample 1 is a cast magnesium-lithium alloy containing Mg-12.31Li-5.62Al-0.14Y. Sample 2 was obtained by homogenization of sample 1; sample 3 is a cast magnesium-lithium alloy, sample 4 was obtained by solution treatment of sample 3, and sample 5 was produced by hot rolling of sample 4. The corrosion medium of all samples was 3.5wt.% sodium chloride solution. By performing electrochemical tests on these alloys, the polarization curves obtained are shown in the attached figure. Figure 5 shown.

[0075] Table 1 Processing parameters of the verified alloy

[0076]

[0077] Table 2 E of alloys in the validation set corr and i corr Comparison of predicted and experimental values

[0078]

[0079] Attached Figure 5 The polarization curve diagram obtained through experiments to verify the concentrated magnesium-lithium alloy.

[0080] The results show that the XGboost model can effectively capture the relationship between alloy composition, processing technology, and corrosive media and E corr and i corr The complex relationships and patterns between them are relatively successful in predicting the electrochemical corrosion behavior of magnesium-lithium alloys. However, there are still some data points with obvious prediction deviations, which may be due to the size and quality limitations of the dataset and the inherent constraints of a single ML model. Considering the complexity of predicting the electrochemical corrosion behavior of magnesium-lithium alloys, these errors are considered to be within an acceptable range.

[0081] The present invention predicts the values ​​of alloys of different compositions formed by various element contents in magnesium-lithium alloys through a machine learning algorithm, thereby effectively judging the corrosion resistance of the alloy. At the same time, it plays an important auxiliary role in the future research on the corrosion resistance of magnesium-lithium alloys and the design of corrosion-resistant magnesium-lithium alloys, and effectively solves the current problem of quickly and accurately evaluating the corrosion resistance of materials.

[0082] The above description is only used to illustrate the technical solution of the present invention rather than to limit it. Other modifications or equivalent substitutions made to the technical solution of the present invention by ordinary technicians in this field should be included in the scope of the claims of the present invention as long as they do not depart from the spirit and scope of the technical solution of the present invention.

Claims

1. A method for predicting the corrosion resistance of magnesium-lithium alloy based on machine learning, characterized in that: The steps include: S1. Collect electrochemical corrosion behavior data and construct a dataset: The electrochemical corrosion behavior data of magnesium-lithium alloys were collected from a large number of literatures through academic websites, including alloy composition, alloy state, test temperature, solution environment, and corrosion potential E of Mg-Li alloy measured in electrochemical tests. corr and the corrosion current density i corr Information, build a data set through the collected data information; S2. Process and select the data in the data set, and determine the valid data points in the data set for predicting corrosion potential and corrosion current density as input features: In the data processing process, the missing data points in some data sets are first eliminated and mean filled, the input features are extracted from the remaining data, and then the data are standardized. Finally, the electrochemical corrosion behavior data are numerically converted and logarithmically calculated. The input features finally determined by the above data processing are composed of three parts: alloy composition, processing technology and corrosive medium; For corrosion potential E corr Data processing: Since the reference electrodes of the electrochemical experiments recorded in the database include saturated silver / silver chloride electrode Ag / AgCl and saturated calomel electrode SCE, the corrosion potential E corr The reference electrode is unified as the value when the reference electrode is a saturated calomel electrode (SCE). The conversion formula is: AND SCE =And Ag / AgCl -0.044; For the corrosion current density i corr Data processing: Since the dispersion of corrosion current density is large, in order to reduce the variability of the target variable, the corrosion current density i corr The data is subjected to negative logarithm mathematical operation with base 10; S3. Build a machine learning model: Construct multiple machine learning models, including random forest RF, support vector machine SVM, gradient boosting GBDT, extra tree ET, Huber regression HR and extreme gradient boosting XGBoost to predict the electrochemical corrosion behavior of magnesium-lithium alloy; S4. Divide the input features in the data set and perform model training: The training set and test set were divided into cross-validation sets in a ratio of 4:

1. The hyperparameters of different machine learning models were trained using the training set, and the hyperparameters of the models were optimized using Bayesian optimization. In the prediction of corrosion resistance of magnesium-lithium alloy, the model constructed with different hyperparameter combinations is used as the surrogate model. The optimization goal is to minimize the root mean square error RMSE of the model on the validation set. Through the iterative Bayesian optimization process, the optimal hyperparameter combination x is finally determined. * , thereby achieving the best accuracy in predicting the corrosion resistance of magnesium-lithium alloys; The formula for Bayesian optimization is: Where X represents the entire hyperparameter search space, x is the hyperparameter sampled from bounded X, and f(x) represents the evaluation result of the hyperparameter combination x; S5. Use the test set to evaluate the performance of the model and use feature importance and SHAP analysis to screen out the best machine learning model: The test set is used to train the machine learning model to predict the electrochemical corrosion behavior parameter combinations of alloys with different compositions, and the determination coefficient R is used to 2 , root mean square error RMSE and mean absolute error MAE to evaluate the predictive ability of machine learning models, use feature importance and SHAP analysis methods to analyze machine learning models, improve the interpretability of the models, and screen out the best machine learning models; S6. Collect new electrochemical corrosion data as a validation set and input it into the best machine learning model to predict the best electrochemical corrosion behavior data: Several new sets of electrochemical corrosion data were re-selected from academic websites as validation sets. At the same time, experiments were performed on the electrochemical workstation to predict the best electrochemical corrosion behavior data from the input features that affect electrochemical corrosion.

2. The method for predicting the corrosion resistance of magnesium-lithium alloy based on machine learning according to claim 1, characterized in that: In step S2, the types of metal elements of the alloy components in the input characteristics include: Mg, Li, Al, Zn, Si, Ca, Sn, Y, Nd, Gd, Ce, Zr, La, Mn and Er, and the processing technology includes: homogenization temperature (H_Tem), homogenization time (H_Time), extrusion temperature (E_Tem), extrusion ratio (E_R), solution temperature (S_Tem), solution time (S_Time), rolling temperature (R_Tem) and rolling ratio (R_R).

3. The method for predicting the corrosion resistance of magnesium-lithium alloy based on machine learning according to claim 1, characterized in that: In step S2, the corrosion medium of all alloys is a neutral NaCl solution at room temperature, and only the Cl ion concentration (Cl_ion) is recorded.

4. The method for predicting the corrosion resistance of magnesium-lithium alloy based on machine learning according to claim 1, characterized in that: In step S2, the specific methods of elimination and mean filling include: eliminating a group of data with more missing data, eliminating data with similar composition but greatly different corrosion properties in the magnesium-lithium alloy data set, and using the mean filling method for data with fewer missing data.

5. The method for predicting the corrosion resistance of magnesium-lithium alloy based on machine learning according to claim 1, characterized in that: In step S2, the standardization processing method is: by converting the data into a standard normal distribution with a mean of 0 and a standard deviation of 1, the purpose of standardization is achieved. The data range is between [-1, 1]. The standardization formula is: In the formula, X is the data to be standardized, X normalized is the standardized data, μ and σ are the mean and standard deviation of the original data respectively.

6. The method for predicting the corrosion resistance of magnesium-lithium alloy based on machine learning according to claim 1, characterized in that: In step S4, the training set and the test set are divided into a ratio of 4:1 and cross-validation is performed during the training process. Cross-validation is to divide the original data set into k folds of equal size, each fold is used as a validation set, and the remaining k-1 folds are combined into a training set, so as to perform k times of model training and evaluation, each time using a different validation set for evaluation, and finally taking the average value of the k evaluation results as the evaluation indicator of model performance.

7. The method for predicting the corrosion resistance of magnesium-lithium alloy based on machine learning according to claim 1, characterized in that: In step S5, the determination coefficient R 2 The calculation formulas for RMSE, MAE and RMSE are as follows: In the formula, n represents the total number of samples, Y i , are the true value, predicted value and average value of corrosion potential and corrosion current density, respectively.

8. The method for predicting the corrosion resistance of magnesium-lithium alloy based on machine learning according to claim 1, characterized in that: In step S5, feature importance and SHAP method are used in model analysis to analyze machine learning models and improve the interpretability of the models, with R being given priority. 2 The value of R 2 The closer the value is to 1, the better the performance of the model is. Secondly, the influence of RMSE and MAE is considered. Using RMSE can better reduce the impact of errors than MSE, reflecting the deviation between the model prediction and the actual value, while MAE can be more sensitive to higher outliers. Finally, their performance on the test set is combined to select the best machine learning model.

9. The method for predicting the corrosion resistance of magnesium-lithium alloy based on machine learning according to claim 1, characterized in that: In step S6, 5 groups of validation data are selected, the electrochemical device used is an RST 5200F electrochemical workstation, and the polarization curve diagram is drawn by conducting experiments on the workstation.

Citation Information

Patent Citations

  • Magnesium alloy heat treatment process optimization method based on machine learning

    CN117521518A

  • High-thermal-conductivity and high-electric-conductivity alloy design method based on sign regression and machine learning

    CN118197502A

Cited By

  • Method and system for predicting service life of oxygen evolution type titanium-based anode

    CN120636597A

  • AZ31B magnesium alloy surface laser micro-groove preparation method based on machine learning optimization

    CN121881810A

  • Metal material microbial corrosion sensitivity and corrosion behavior prediction method based on sign regression

    CN122337439A

  • A method for predicting metal material microbiological corrosion sensitivity and corrosion behavior based on symbolic regression

    CN122337439B