SMA-SVR-based carbon-manganese cast steel and low-alloy steel casting strength performance prediction method
The method based on SMA-SVR solves the problem of poor prediction accuracy of yield strength and tensile strength of cast steel in the existing technology, achieves accurate performance prediction of steel castings, reduces test costs and time, and improves product quality. control.
Patent Information
- Application Number
- CN202410686978.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-09-17
AI Technical Summary
The machine prediction model in the existing technology has poor prediction accuracy for the yield strength and tensile strength of cast steel for hull structures. Moreover, due to the imperfect development of interpretable machine learning theory and the lack of theoretical basis for parameter adjustment, the accuracy of the prediction model is low.
Using a method based on SMA-SVR, by dividing the data into a training set and a validation set, standardizing the Z-score, and using cross-validation and intelligent algorithm parameter adjustment, the SVR model parameters are optimized to establish a model that can accurately predict the yield strength and yield strength of cast steel. Regression model for tensile strength.
It achieves accurate prediction of the yield strength and tensile strength of steel castings in a specific composition range and tempered state, reduces the test cycle and cost, improves the accuracy and training time of the model, helps control the performance quality of casting products, and reduces product failure rate.
Smart Images

Figure CN118656726A
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of cast steel performance prediction, and in particular to a method for predicting the strength performance of carbon-manganese cast steel and low alloy cast steel parts based on SMA-SVR. Background Art
[0002] For complex-shaped components in the fields of shipbuilding, petrochemicals, offshore engineering, construction, etc., cast steel parts are usually used. The strength of steel castings is the main inspection indicator. In the production of steel castings, due to differences in composition and process, the strength of different batches of steel castings fluctuates greatly, and insufficient or excessive strength may occur. This is also the main quality problem of steel castings.
[0003] The strength of steel castings mainly depends on alloying elements and tempering process. However, since the strength of materials is usually a complex nonlinear relationship with alloying elements and tempering temperature, it is not easy to find an accurate quantitative relationship. The existing empirical formula for cast steel strength is not accurate enough, and its corresponding measurement conditions often deviate from the actual situation. Usually, in order to ensure that the material strength meets the standard, more alloying elements are empirically added during the casting process to ensure a large strength margin. However, excessive strength is likely to cause a decrease in low-temperature toughness and an increase in hardenability. This contradiction is particularly obvious within the composition and performance range of carbon manganese steel and low alloy steel. Therefore, it is necessary to find the relationship between the accurate composition process and cast steel strength as a benchmark, which is of great significance for the control and prediction of cast steel performance.
[0004] In view of the above problems, the existing technology often uses machine learning algorithms to find the relationship between strength and composition and process. However, due to the imperfect development of interpretable machine learning theory, the current machine learning parameter adjustment does not have sufficient theoretical basis and relies more on experience, resulting in low accuracy of the existing machine prediction model. For example, the patent CN107609647A in the prior art, "A method for predicting the mechanical properties of roll alloys based on BP neural network", mainly collects the mechanical properties test and contact fatigue performance test results of alloy cast steel roll materials, establishes a static database of cast steel material alloy composition, process parameters and performance, extracts features through a data processing system, and uses a neural network algorithm to give a quantitative prediction of the strength of its castings. However, the amount of data collected in this patent is only more than 100 groups, and the neural network algorithm is not very applicable, easy to overfit and not conducive to actual use, and it is difficult to ensure its accurate prediction of the yield strength and tensile strength of cast steel. Summary of the invention
[0005] In view of this, the present invention aims to propose a strength performance prediction method for carbon-manganese cast steel and low alloy steel castings based on SMA-SVR, so as to solve the problem of poor prediction accuracy of the yield strength and tensile strength of hull structure cast steel by machine prediction models in the prior art.
[0006] To achieve the above object, the technical solution of the present invention is achieved as follows:
[0007] A strength performance prediction method for carbon-manganese cast steel and low-alloy cast steel parts based on SMA-SVR, comprising: S1, dividing existing data into a training set and a validation set; S2, performing Z-score standardization on the training set and the validation set obtained after the data division; S3, selecting an SVR algorithm to establish a model; S4, comparing the weighted output results of the model under different parameters through cross-validation, then using the best parameters to establish a regression model for the original data set, using new data as a test set to assess the model capability, optimizing the model parameters according to the size of the test set, and then regressing the original data and the test set to finally complete the establishment of the regression model; S5, after completing the establishment of the regression model, obtaining independent variables w(C), w(Mn), w(Ni), w(Cr), w(Mo), w(V), w(Cu), and tempering temperature as input quantities, and outputting yield strength Rp0.2 and tensile strength Rm.
[0008] Furthermore, in step S1, the existing data are composition analysis results, yield strength Rp0.2, tensile strength Rm and tempering temperature corresponding to cast steel tensile specimens under different heat treatment processes.
[0009] Furthermore, the composition analysis results include at least the mass percentages of C, Mn, Ni, Cr, Mo, V, and Cu.
[0010] Furthermore, in step S1, data partitioning is performed according to a K-fold cross validation method, such as calling a KFold function or a GridSearchCV function in a model_selection module of scikit-learn to perform data partitioning.
[0011] Furthermore, in step S1, the leave-one-out method is used for validation, and the average value of the root mean square error of the validation set after N validations is taken as the loss function corresponding to the parameter, where N is the number of data in the original data set. At this time, the leave-one-out method is used to divide the data set:
[0012] kfold=KFold(n_splits=40,shuffle=False).
[0013] Furthermore, in step S2, the calculation steps of Z-score standardization are: new data = (original data - mean) / standard deviation.
[0014] Furthermore, in step S2, the data in the training set and the validation set are respectively subjected to Z-score standardization, and the StandardScaler function in the sklearn.preprocessing module is called to complete the Z-score standardization.
[0015] Furthermore, in step S4, when new data is used as a test set to assess the model capability, it is determined whether the root mean square error of the mechanical properties of the samples in the model prediction test set is significantly higher than the root mean square error of the training set and the validation set, or whether the data-corrected coefficient of variation of the model prediction value and the test set is significantly lower than the data-corrected coefficient of variation of the training set; if any one of the conditions is met, it means that the original data distribution has changed or the model selection is unreasonable, and the model needs to be rebuilt; if none of the conditions are met, the model parameters only need to be optimized depending on the size of the test set.
[0016] Furthermore, in step S4, the SMA algorithm is used to assist the SVR algorithm in parameter adjustment, and the target parameter is the kernel function kernel of the SVR, including polynomial type, rbf type and sigmoid type; the BaseSMA model of mealpy is used to perform parameter optimization based on the SMA algorithm.
[0017] Furthermore, the SMA algorithm specifies that the population size pop_size = 50, the individual dimension dim including the element composition and tempering temperature is dim = 8, and the maximum number of iterations epoch = 600, so that the fitness function reaches the maximum, and the fitness function improves by less than 10 after 5 iterations. -6 The optimization is terminated.
[0018] Compared with the prior art, the SMA-SVR-based strength performance prediction method for carbon-manganese cast steel and low alloy cast steel parts described in the present invention has the following advantages:
[0019] The SMA-SVR-based strength performance prediction method for carbon-manganese cast steel and low-alloy cast steel parts described in the present invention can accurately predict the yield strength and tensile strength of cast steel parts in a specific composition range and tempering state, which is beneficial to reducing the test cycle and cost, and is also beneficial to improving the accuracy of the machine learning model and shortening the training time of the model; in addition, the present application can adjust the composition and process of the cast steel parts in a targeted manner based on the target performance requirements of the cast steel parts, which can help to control the composition and process during the production and trial production of casting products, achieve precise control of product performance quality, and can indicate the direction for the composition and process adjustment of the production and manufacturing process of related cast steel products in advance. It is particularly suitable for the quality control of normalized + tempered marine carbon-manganese castings that are prone to unqualified strength, thereby reducing the risks of product composition design and process application, improving the quality level of products, and reducing the unqualified rate of products. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:
[0021] Figure 1 The present invention is a flowchart of establishing a regression model in a method for predicting strength properties of carbon-manganese cast steel and low-alloy cast steel parts based on SMA-SVR described in an embodiment of the present invention. DETAILED DESCRIPTION
[0022] The inventive concepts of the present disclosure will be described below using terms commonly used by those skilled in the art to convey the essence of their work to other persons skilled in the art. However, these inventive concepts can be embodied in many different forms and should not be considered limited to the embodiments described herein.
[0023] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0024] The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0025] In order to solve the problem that the machine prediction model in the prior art has poor prediction accuracy for the yield strength and tensile strength of hull structure cast steel, this embodiment proposes a strength performance prediction method for carbon manganese cast steel and low alloy cast steel parts based on SMA-SVR, as shown in the attached Figure 1 As shown, the prediction method includes:
[0026] S1. Data division: divide the existing data into training set and validation set;
[0027] The existing data are composition analysis results, yield strength Rp0.2, tensile strength Rm and tempering temperature corresponding to cast steel tensile specimens under different heat treatment processes, and the composition analysis results at least include the mass percentages of C, Mn, Ni, Cr, Mo, V and Cu. The cast steel is carbon manganese cast steel or low alloy steel casting.
[0028] The training set is used to directly build the regression model, and the validation set is used to evaluate the model during the construction process, providing an unbiased estimate for the model and providing a reference for model parameter adjustment.
[0029] Since this project involves a small amount of data and the computational overhead required to build a regression model is affordable, in order to make full use of the existing data, the leave-one-out method is used to divide the data. This method can ensure that every piece of data in the data set is involved in the verification, and the data used in each round of regression is only one piece less than the original data. The evaluation results are stable and the evaluation deviation is small, which is conducive to the performance of the prediction model in unknown data.
[0030] Specifically, in step S1, the leave-one-out method is used for validation, and the average value of the root mean square error of the validation set after N validations is taken as the loss function corresponding to the parameter, where N is the number of data in the original data set. At this time, the leave-one-out method is used to divide the data set:
[0031] kfold=KFold(n_splits=40,shuffle=False).
[0032] S2. Data standardization: Z-score standardization is performed on the training set and validation set obtained after data division;
[0033] Specifically, the calculation steps for Z-score standardization are: new data = (original data - mean) / standard deviation.
[0034] This makes the sample values fall into an interval with a mean of 0 and a standard deviation of 1 in a dimensionless form, eliminating the influence of the quantity size on the weight of the independent variable, avoiding information leakage of the validation set, and to a certain extent suppressing the interference of data noise and outliers on the model, thereby accelerating the convergence of the regression algorithm.
[0035] S3, model selection: select SVR algorithm to build the model;
[0036] Specifically, you can call the svm module in scikit-learn.
[0037] S4. Parameter adjustment and model building: Compare the weighted output results of the model under different parameters through cross-validation, then use the best parameters to build a regression model for the original data set, and use new data as a test set to assess the model capability. Optimize the model parameters according to the size of the test set, and then regress the original data and test set to finally complete the establishment of the regression model;
[0038] When using new data as a test set to assess the model's capabilities, determine whether the root mean square error of the model's predicted sample mechanical properties in the test set is significantly higher than the root mean square error of the training set and validation set, or whether the data-corrected coefficient of variation of the model's predicted values and the test set is significantly lower than the data-corrected coefficient of variation of the training set; if any of the conditions is met, it means that the original data distribution has changed or the model selection is unreasonable, and the model needs to be rebuilt; if none of the conditions are met, the model parameters only need to be optimized depending on the size of the test set.
[0039] Before the final hyperparameters of the SVR model are determined, intelligent algorithms are used to assist in parameter adjustment. At this time, it is necessary to define a fitness function (usually directly using the loss function). Based on the training set and validation set data, the function is minimized through iteration to determine the corresponding model parameters.
[0040] S5. Model output: After completing the establishment of the regression model, the independent variables w(C), w(Mn), w(Ni), w(Cr), w(Mo), w(V), w(Cu), and tempering temperature are obtained as input quantities, and the yield strength Rp0.2 and tensile strength Rm are output to complete the prediction of the strength properties of steel castings.
[0041] Among them, w(C), w(Mn), w(Ni), w(Cr), w(Mo), w(V), and w(Cu) are the elemental components in the cast steel for which strength properties prediction is required, specifically the mass percentage of each element.
[0042] Therefore, in the actual production process, through the prediction method of the present application, the yield strength and tensile strength of steel castings in a specific composition range and tempering state can be accurately predicted, which is conducive to reducing the test cycle and cost, and is also conducive to improving the accuracy of the machine learning model and shortening the training time of the model; in addition, the present application can adjust the composition and process of steel castings in a targeted manner based on the target performance requirements of the steel castings, which can help to control the composition and process during the production and trial production of casting products, and achieve precise control of product performance and quality. It can point out the direction for the composition and process adjustment of the production and manufacturing process of related cast steel products in advance, and is particularly suitable for the quality control of normalized + tempered marine carbon-manganese castings that are prone to unqualified strength, thereby reducing the risks of product composition design and process application, improving the quality level of products, and reducing the unqualified rate of products.
[0043] Example 1
[0044] This embodiment further describes the prediction method in detail:
[0045] S1, data partition;
[0046] The number of data in the original data set N is 40. The 40 data shown in Table 1 are divided into leave-one-out partitions, specifically using:
[0047] kfold=KFold(n_splits=40,shuffle=False).
[0048] Based on the composition range in Table 1, it can be seen that when w(C) is between 0.10% and 0.4% (inclusive), w(Cu)≤0.05%, w(Ni) is between 0.2% and 0.3%, w(Mo)≤0.06%, w(V)≤0.05%, and w(Mn) is between 1% and 1.40% (inclusive), the model prediction results can have a higher credibility, and most of the composition data in Table 1 fall within this composition range.
[0049] Table 1 Composition analysis and mechanical properties of cast steel tensile specimens under different heat treatment processes
[0050]
[0051] S2, data standardization;
[0052] The data divided in step S1 are standardized respectively. Specifically, the KFold function or the GridSearchCV function in the model_selection module of scikit-learn can be called for division, and the StandardScaler function in the sklearn.preprocessing module can be called for standardization.
[0053] Since the main purpose of this model is to predict the properties of cast steel, it pays more attention to generalization performance. According to experience, for small sample material data, when the generalization performance of the machine learning model is good, its fitting accuracy is generally not low. For each set of undetermined parameters, this study calculates the error between the model prediction results and the 40 validation sets divided by the leave-one-out method, and calculates the average value of the root mean square error of these 40 validation sets as the loss function corresponding to the set of parameters currently being verified.
[0054] S3, model selection;
[0055] Among them, the model is established based on the SVR algorithm, and the svm module in scikit-learn can be called specifically.
[0056] S4, parameter adjustment and model establishment;
[0057] The SMA algorithm is used to assist the SVR algorithm in parameter adjustment. The target parameters mainly include the kernel function of SVR, including polynomial type (poly), rbf type and sigmoid type;
[0058] The three kernel functions are classified and discussed for parameter adjustment. For the polynomial kernel function, the parameters to be optimized are the penalty term C, the kernel function coefficient γ, the degree of the polynomial and the constant term coef0; for the rbf kernel function, the parameters to be optimized are the penalty term C and the kernel function coefficient γ; for the sigmoid kernel function, the parameters to be optimized are the penalty term C, the kernel function coefficient γ and the kernel function constant term coef0.
[0059] The SMA optimization in the parameter adjustment process is mainly performed using mealpy's BaseSMA model. Since the intelligent algorithm parameter adjustment is more efficient, the search range of the above undetermined parameters is relatively large.
[0060] As a type of evolutionary algorithm, the SMA algorithm mainly stipulates that the population size pop_size = 50, the individual dimension dim = 8 (composition and tempering temperature), and the maximum number of iterations epoch = 600, so that the fitness function (the fitness function of this model is the negative of the loss function) reaches the maximum. To avoid overfitting, it is stipulated that the fitness function improvement after 5 iterations is less than 10 -6 The optimization is terminated. Since the underlying SMA algorithm can ensure that individuals can form search vectors at any angle in the solution space, this makes it possible for the algorithm to find the global optimal solution in the solution space.
[0061] After completing the model optimization in step S4, the optimal parameters and the optimal fitness function are obtained.
[0062] S5. After completing the establishment of the regression model, obtain the independent variables w(C), w(Mn), w(Ni), w(Cr), w(Mo), w(V), w(Cu), and tempering temperature as input, and output the yield strength Rp0.2 and tensile strength Rm.
[0063] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for predicting the strength properties of carbon-manganese cast steel and low alloy steel castings based on SMA-SVR, characterized in that: The prediction method comprises: S1. Divide the existing data into training set and validation set; S2. Perform Z-score standardization on the training set and validation set obtained after data division; S3, select SVR algorithm to establish the model; S4. Compare the weighted output results of the model under different parameters through cross-validation, then use the best parameters to build a regression model for the original data set, and use new data as a test set to assess the model capability. Optimize the model parameters according to the size of the test set, and then regress the original data and test set to finally complete the establishment of the regression model. S5. After completing the establishment of the regression model, obtain the independent variables w(C), w(Mn), w(Ni), w(Cr), w(Mo), w(V), w(Cu), and tempering temperature as input, and output the yield strength Rp0.2 and tensile strength Rm.
2. The method for predicting strength properties of carbon-manganese cast steel and low alloy steel castings based on SMA-SVR according to claim 1, characterized in that: In step S1, the existing data are the composition analysis results, yield strength Rp0.2, tensile strength Rm and tempering temperature corresponding to the cast steel tensile specimens under different heat treatment processes.
3. The method for predicting strength properties of carbon-manganese cast steel and low alloy steel castings based on SMA-SVR according to claim 2, characterized in that: The composition analysis results include at least the mass percentages of C, Mn, Ni, Cr, Mo, V, and Cu.
4. The method for predicting strength properties of carbon-manganese cast steel and low alloy steel castings based on SMA-SVR according to claim 1, characterized in that: In step S1, data division is performed according to the K-fold cross-validation method.
5. The method for predicting strength properties of carbon-manganese cast steel and low alloy steel castings based on SMA-SVR according to claim 1, characterized in that: In step S1, the leave-one-out method is used for validation, and the average value of the root mean square error of the validation set after N validations is taken as the loss function corresponding to the parameter, where N is the number of data in the original data set. At this time, the leave-one-out method is used to divide the data set: kfold=KFold(n_splits=40, shuffle=False).
6. The method for predicting strength properties of carbon-manganese cast steel and low alloy steel castings based on SMA-SVR according to claim 1, characterized in that: In step S2, the calculation steps of Z-score standardization are: new data = (original data - mean) / standard deviation.
7. The method for predicting strength properties of carbon-manganese cast steel and low alloy steel castings based on SMA-SVR according to claim 1, characterized in that: In step S2, the data in the training set and the validation set are Z-score standardized respectively, and the StandardScaler function in the sklearn.preprocessing module is called to complete the Z-score standardization.
8. The method for predicting strength properties of carbon-manganese cast steel and low alloy steel castings based on SMA-SVR according to claim 1, characterized in that: In step S4, when new data is used as a test set to assess the model capability, it is determined whether the root mean square error of the mechanical properties of the samples in the model prediction test set is significantly higher than the root mean square error of the training set and the validation set, or whether the data-corrected coefficient of variation of the model prediction value and the test set is significantly lower than the data-corrected coefficient of variation of the training set; if any one of the conditions is met, it means that the original data distribution has changed or the model selection is unreasonable, and the model needs to be rebuilt; if none of the conditions are met, the model parameters only need to be optimized depending on the size of the test set.
9. The method for predicting strength properties of carbon-manganese cast steel and low alloy steel castings based on SMA-SVR according to claim 1, characterized in that: In step S4, the SMA algorithm is used to assist the SVR algorithm in parameter adjustment. The target parameter is the kernel function of SVR, including polynomial type, rbf type and sigmoid type. The BaseSMA model of mealpy is used to perform parameter optimization based on the SMA algorithm.
10. The method for predicting strength properties of carbon-manganese cast steel and low alloy steel castings based on SMA-SVR according to claim 1, characterized in that: The SMA algorithm specifies that the population size pop_size = 50, the individual dimension dim = 8 including the element composition and tempering temperature, and the maximum number of iterations epoch = 600, so that the fitness function reaches the maximum and the fitness function improvement is less than 10 after 5 iterations. -6 The optimization is terminated.
