Prediction of 316 stainless steel low-cycle fatigue life based on machine learning

The low-cycle fatigue life of 316 stainless steel is a significant basis for safety assessment. Usually, many factors affect the low-cycle fatigue life of stainless steel, and the relationship between the influencing factors and fatigue life is complicated and nonlinear. Therefore, it is hard to predict fatigue life using the traditional empirical formula. Based on this, a machine learning algorithm is proposed. In this paper, based on the large amount of existing experimental data, machine learning methods are used to predict the low circumferential fatigue life of 316 stainless steel. The results show that the prediction accuracy of nu-SVR and ELM models is high and can meet engineering needs.

Effect of strain amplitude.  shows typical cyclic stress response curves for different strain amplitudes. It can be seen that the cyclic characterization of the material is correlated with the strain amplitude. At a low strain amplitude (0.2%), the material does not show hardening, and the cycles are longer than other strain amplitudes. As the strain amplitude increases (before 0.8%), the material stress cycle response exhibits two phases. However, at high strain amplitude, the cyclic response of the material exhibits three phases. When the strain amplitude is 0.5%, the stress drops sharply and the number of cycles is the lowest. It can be seen from the figures that, as the strain amplitude increases from 0.2 to 1.2%, the cycle time gradually decreases from10 5 to10 3 . The distribution of all data is exponential, which is typical of the ε-N (strain-cycle) distribution of the low-cycle fatigue life of stainless steel.
Effect of residual stress. Residual stresses are the mutually balanced internal stresses that exist within the material or part when no external forces are applied. Residual stress includes compressive residual stress and tensile residual stress. Compressive residual stress is beneficial to materials and can effectively inhibit crack propagation, while tensile residual stress is harmful to materials and should be eliminated as far as possible. If the surface treatment of 316 stainless steel is carried out, the residual compressive stress can be increased. If the surface treatment of 316 stainless steel is continued, the residual compressive stress will cause stress relaxation under cyclic load, resulting in the reduction or even disappearance of the effect of residual compressive stress on increasing the fatigue life of materials 34 .

Data processing
Sensitivity analysis based on the Sobol algorithm. In this paper, the low-cycle fatigue life prediction of 316 stainless steel is studied. The three factors considered above, crack growth rate, average strain, and residual stress, were taken as the input data of machine learning, and the fatigue life was taken as the output data   www.nature.com/scientificreports/ to establish a machine learning prediction model. The total number of samples was 500 groups  . Due to the large amount of literature data, only a few studies are listed in the references. The Sobol 51 method was used to study the effect of different input variables on the low perimeter fatigue life of 316 stainless steel. The core of the Sobol algorithm is to decompose the total variance of the objective function into the variance of a single objective and multiple objective parameters.
Let the model be expressed asu = f (x) , where the model parametersx = x 1 , x 2 , . . . , x n are n-dimensional discrete points and u is the output 52 .
If the function f (x) be productive andx i obey uniform distribution in[0, 1] , then f (x)can be expressed as follows: , there are2 n terms in the summed number. Equation (1) is the expression of variance decomposition of the function f (x).
The total variance of the model can also be decomposed as a combination between one parameter and several other parameters: whereVar(Y)is the total variance of the model;Var(Y ) i is the variance generated by a parameterx i ;Var(Y ) ij is the variance generated by the interaction of parametersx i andx j ; andVar(Y ) 1,2,··· ,n is the variance generated by the joint action ofnparameters. Normalizing the above equation, the sensitivity between the parameters is obtained as follows: Then, the full-order sensitivity of the model can be expressed as follows: First-order sensitivity index: Data normalization. Due to the different types of data collected and the different magnitudes of the data, they are often discrete. If network input is performed, it will cause the annihilation of the data and a loss of information. For better generalization, the collected data were normalized by the following formula 53 : wherexandx ′ are the values before and after data normalization, respectively;x min andx max are the minimum and maximum values inside the collected sample data, respectively.
The randperm function was used to disrupt the sample order, the total number of samples was 500 groups, 450 groups were randomly selected as training data, and 50 groups were used as test data.

Machine learning model
BP neural network and genetic algorithm to optimize BP neural network model. BP (back propagation) neural network is the most basic neural network; its output results are forward-propagated, and the error is backpropagated. The neural network power threshold is adjusted according to the prediction error. The basic unit of a neural network is the neuron, and the basic architecture is composed of the input layer, the hidden layer, and the output layer. According to Kolmogorov's theorem, a three-layer BP neural network structure has a solid nonlinear mapping capability and can approximate any nonlinear function 54 .
Since the BP neural network uses the fastest gradient descent method to learn an artificial neural network, and the initial weights and thresholds of the BP neural network are randomly generated, it is easy to fall into the optimal local solution during the training of the BP neural network, which makes the prediction error large and the generalization ability of the model not strong. A genetic algorithm (GA) is mainly an algorithm for global search and optimization based on simulating the biological evolution mechanism in nature, which in turn can solve the BP neural network in the case of local optimal conditions [55][56][57][58] .The genetic algorithm optimizes the connection weight and threshold of BP neural network. The entire process is shown in Fig.3.

Extreme learning machine. Extreme Learning Machine (ELM) is a new Single-hidden-Layer Feedfor-
ward Neural Network (SLFN) learning algorithm 59,60 .ELM adjusts the number of neurons in the hidden layer without adjusting other weight thresholds and the hidden layer. Compared with other algorithmic models, ELM has the advantages of fast training and good generalization performance. It is now widely used in the fields of life prediction, reliability, and fault diagnosis. www.nature.com/scientificreports/ Two theorems were proposed by Huang et al. 59 : ∈ R m and an arbitrary interval infinitely differentiable activation functiong:R → R , then for a SLFN with Q hidden layer neurons, with any assignmentw i ∈ R n andb i ∈ R , its hidden layer output matrixHis invertible and has�Hβ − T ′ � = 0.

Theorem 2 Given any
and given any small errorε > 0 , and an arbitrary interval infinitely differentiable activation functiong:R → R , there always exists a SLFN containingK(K≤Q) hidden layer neurons with�H N×M β M×m − T ′ � < εfor any assignmentw i ∈ R n andb i ∈ R.
The weights and biases are randomly generated before ELM training, so only the number of hidden layer neurons and the activation function must be determined to calculate β. The steps are as follows: 1. Determine the number of neurons in the hidden layer and set the weightswand biasb. 2. Set the activation function as an infinitely differentiable function, and then calculate the output matrixHof the hidden layer. 3. Calculate the output layer weightsβ : β = H + T ′ .

Support vector machine. Support Vector Machine (SVM) is often used in classification and nonlinear
regression problems. The main idea is to find the maximum geometric distance by controlling the function distance, which means that the function distance is the constraint and the geometric distance is the objective function. The SVM algorithm architecture is shown in Fig.4:whereKis the kernel function, and its main types are as follows: Gaussian kernel function:k The Laplace kernel function:k Sigmoid kernel function:k x i , x j = tanh βx T i x j + θ .

Results and analysis BP neural network and genetic algorithm to optimize BP neural network model. Parameters
such as the number of hidden layer neurons, activation function type, and backpropagation algorithm affect the BP neural network prediction performance.The parameters of the BP neural network are controlled, 1-20 dimensional neurons are selected, the tansig function and the logsin function are compared, and the tansig function has higher prediction accuracy than the logsin function. The LM (Levenberg-Marquardt) backpropagation algorithm, GD (Gradient descent) algorithm, and GDA (Gradient descent with adaptive learning rate) algorithm are compared. The LM algorithm is found to have higher prediction accuracy. When the optimal parameter neuron is determined to be 10, the tansig function is selected for the hidden layer function, and the LM algorithm is chosen. The prediction result is shown in Fig.5, and it can be seen that the predicted value is basically within the error band of twice. The parameters of the genetic algorithm were set as follows: maxgen = 100, sizepop = 30, pcross = 0.3, and pmutation = 0.1. The prediction errors of the two models test sample (50 groups) are shown in Fig.6, which shows that the BP neural network fluctuates the most. The GA-BP neural network fluctuates within 2% relative error, and the training effect is more suitable than the BP neural network.
Extreme learning machine. In ELM prediction, the correct selection of parameters is crucial to the prediction results. The parameter selection of ELM mainly includes the selection of input and internal parameters. The input parameters are mainly the selection of data volume, and the internal parameters are the key factors affecting the prediction ability of ELM. The internal parameters are mainly the activation function and the number of neurons in the hidden layer; relatively speaking, the effect of the activation function on ELM is smaller  www.nature.com/scientificreports/ than the effect of the number of neurons in the hidden layer. According to Theorems 1 and 2, the more neurons there are in the hidden layer, the more likely SLFN is to approximate all the training samples with zero error, and the better the results obtained by ELM prediction. However, when the number of neurons in the hidden layer is large enough, it will affect the generalization performance of ELM. As shown in Fig.7, the accuracy of the test set shows that the accuracy peaks at a specific value as the number of hidden layer neurons increases, and the accuracy of the training set will decrease if the number of hidden layer neurons continues to increase. Therefore, choosing the appropriate number of hidden layer neurons is necessary to achieve the optimal prediction accuracy of ELM.

Support vector machine.
Regression analysis of the low perimeter fatigue life of 316 stainless steel wasperformed using the support vector machine toolbox LIBSVM developed in the literature 49 . Two regression support vector machine models (epsilon-SVR and nu-SVR) were selected for life prediction, both of which were chosen with Gaussian radial basis kernel functions. In solving the problem with SVM, the selection of parameters significantly impacts the SVM prediction. For the above two regression models, there are penalty coef-ficientsCand kernel function parametersg. The cross-validation (CV) method can find parametersCandg, and theCandgobtained can avoid under-learning and over-learning states and finally achieve superior accuracy of data set prediction. As shown in Fig.8, the penalty coefficientCinside the rough selection is small, and the fine selection mean square error (MSE) has a smaller error than the rough selection. The best parameters are set as follows: penalty coefficientC= 1.4142, kernel function parameterg= 1.6245, and insensitivity coefficientp= 0.01. These parameters are used to construct the support vector machine prediction model.   www.nature.com/scientificreports/ The prediction accuracyR 2 of several models is shown in Fig.9. It can be seen that the BP prediction model has a poor effect, while the nu-SVR prediction model has the best effect.

Conclusions
(1) This paper discusses three factors that affect the fatigue life of 316 stainless steel. The influence of the stress intensity factor on crack rate under different temperatures and stress ratios is discussed in the first factor. The second factor compares the relationship between strain amplitude and cycle times. The third factor discusses the relationship between loading stress, stress ratio, cycle times, and residual stress. (2) To address the problem of large error between the traditional material fatigue life calculation method and the actual value, a low-cycle fatigue life prediction model of 316 stainless steel based on machine learning was established in this paper. The model took crack growth rate, average stress, and residual stress as input data and fatigue life as output data. (3) Compared with the centralized model proposed in this paper, the prediction effect of the BP neural network was poor. The prediction effect of the nu-SVR model was the best, followed by ELM, and theR 2 reached 0.945 and 0.936, respectively, which met the project's needs.