The Prediction of Steel Bar Corrosion Based on BP Neural Networks or Multivariable Gray Models

The corrosion of steel bars in concrete has a significant impact on the durability of constructed structures. Based on the gray relational analysis (GRA) of the accelerated corrosion data and practical engineering data using MATLAB, a back propagation neural network (BPNN) model, a multivariable gray prediction model (GM (1, N)), and an optimization multivariable gray prediction model (OGM (1, N)) of steel corrosion were established by using a sequence of the key affecting factors. By comparing the prediction results of the three models, it is found that the GM (1, N) model has larger fitting and prediction errors for steel corrosion, while the OGM (1, N) model has smaller prediction errors in the accelerated corrosion data; the BPNN model offers more accurate predictions of the practical engineering data. The results show that the BPNN and OGM (1, N) models are all suitable for the prediction of steel bar corrosion in concrete structures.


Introduction
Te corrosion of steel bars induces corrosion cracks in concrete structures. Te appearance of cracks makes it easier for the corrosive media (H 2 O and O 2 ) to reach the surface of the steel bars, which accelerates the corrosion rate of the steel bars. Corrosion reduces the cross section of steel bars and severely afects the bond strength between the steel bars and the concrete, resulting in structural failure. Te reduced load capacity has a great impact on the durability and reliability of the structure [1]. It is difcult to measure the corrosion of steel bars in practice, especially those that are in service. In recent years, theoretical and empirical models have been proposed to estimate the extent of corrosion of steel bars after rust swelling and cracking of concrete structures. Bazant [2] and Zhang and Cheung [3] proposed a prediction model for the extent of steel corrosion according to its physical and chemical processes. Isgor and Razaqpur [4], Zhang et al. [5], Zheng et al. [6], and Xu et al. [7] conducted simulation tests in the laboratory to establish an empirical model of the corrosion rate of steel bars changing with environmental temperature, humidity, and other parameters. Based on a long-term exposure test and actual engineering durability test data, Guo et al. [8] proposed a formula for predicting the loss rate of steel bars. Te theoretical model can refect the physical and chemical processes of steel corrosion in concrete structures, and the infuencing factors are comprehensive. However, many parameters in the model are difcult to determine. Te empirical model can be closely linked with reality, but there are many complex factors in the model, which cannot be fully considered, resulting in certain inconsistencies with reality. Terefore, other methods are needed to predict the amount of steel corrosion.
As a method to determine whether or not variables are correlated and to determine the degree of their correlation, GRA provides a comprehensive assessment model. It was also applied to analyze the efects of the infuencing factors on the steel corrosion which involves multiple variables with comprehensive correlations. Artifcial neural network has been applied in the research of reinforcement corrosion [9,10]. An et al. [11] combined the GRA and BPNN methods to predict the corrosion of steel bars; the results proved that this method can predict well. Luo et al. [12,13] developed a hybrid enhanced Monte Carlo simulation and a dynamical adaptive enhanced simulation method coupled with support vector regression, which showed strong capability for application in the fatigue assessment of turbine bladed disks and structural reliability. Muiga et al. [14] adopted a gray prediction model (GM (1, 1)) to evaluate the carbonization of long-span reinforced concrete bridges. Te accuracy of the prediction model was within a reasonable range and met the requirements of mathematical modeling. However, because of the complex corrosion mechanism of steel bars in concrete structures and the coupling relationship with crack width, protective layer thickness, and steel bar diameter, the GM (1, 1) model has a poor prediction efect sometimes, and the accuracy of its prediction is debatable [15]. In this study, a BPNN model, a multivariable gray model (GM (1, N)), and an optimized multivariable gray prediction model (OGM (1, N)) of steel corrosion are established by using the sequence of the key afecting factors after the gray relational analysis of the accelerated corrosion data. By comparing the calculation results of the three models with the practical engineering data, the applicability of the models is verifed. Te calculation results show that the BPNN and OGM (1, N) models perform well in terms of the prediction of the corrosion of steel bars in concrete structures and can provide some reference values for the evaluation of structural durability.

Gray Relational Analysis.
Gray relational analysis refers to the degree of similarity between the curve geometry formed by the studied sequence and the change analysis of the infuence factor sequence in the development process of the system. It helps to determine whether the connection is close by indicating the degree of connection between the curves. If changes in the trend of the two factors are consistent, the correlation between them will be greater; if the change in trend is inconsistent, the correlation will be lower [16,17]. Te gray correlation between sequences is refected by the gray relational degree, which refers to the measurement of the correlation between the dependent variables over time or diferent objects, considering the relevancy between the factors so as to distinguish each factor. Te greater the correlation between each infuencing factor for the system, the closer relationship between them. For a given system, assume that there are N variables: With one out put X 1 and N − 1 inputs X i (i � 2, 3, . . . , N). Tese two kinds of sequences have strong correlations with each other. For each variable X i (i � 1, 2, . . . , N), we assume that the sequence length is n, that is, Data standardization is used to deal with the problems of inconsistent units among various sequence factors and inconsistent physical meanings. Te mean and variance of each impact factor sequence are calculated as follows: where x i is the mean of each inputs sequence, and σ i is the variance of each inputs sequence.
Ten, we obtain where y i (k) is the i-th input sequence after normalization. Te diference sequences of the relevant factors are found as follows: Te correlation coefcient is calculated between the sequences as follows: where i � 2, 3, · · · , N and k � 1, 2, · · · , n and τ is the resolution coefcient. Te gray relational degree was calculated as follows: Te gray relational degrees of all the infuencing factors were calculated and ranked the λ i (i � 2, 3, · · · , N) from high to low, as λ i2 > λ i3 > · · · > λ iN , and the gray relational coeffcient is between 0 and 1. Te greater the relational degree, the stronger the relation, the correlation order is λ i2 , λ i3 , · · · , λ iN . According to the correlation order, the standby schemes can be sorted and scientifc foundations for decision-making are ofered.

BP Neural Network.
Te back propagation neural network (BPNN) can learn and store vast amounts of data because it is inspired by the structure of neurons, as illustrated in Figure 1 [18]. Te BPNN is a feedforward multilevel neural network, which uses the network's adaptive mapping ability to carry out back propagation and is able to realize any non-linear operation from input to output [19,20]. From the analysis of the network structure, the BPNN includes an input layer, an output layer, and a hidden layer (which can also be multiple layers). Variables are read from the input layer through the network's adaptive learning ability, and weights are calculated to determine the network output. Te output result is compared with the target value, and the error is calculated. Trough feedback and calculation for many iterations, the result can be output until the overall error of the network meets the requirements of the project.
Te key to using the BPNN algorithm for ftting the amount of steel corrosion is to select the corrosion data set as the training set and to construct the mapping relationship between each corrosion value in the corrosion data set and the data of infuential factors to allow efective training. Due to approximating ability to arbitrary nonlinear mapping, the BPNN has broad application in ftting steel corrosion.
Suppose the net input value S j of the jth neuron is as follows: Ten, After the net input S j passes through the transfer function f(•) (this function is a monotonic rising function; there must be a maximum value), the output value y j of the j-th neuron is obtained:

BP Network.
Assuming that the input layer, hidden layer, and output layer of the BP network have n, q, and m nodes, respectively, the weight values between the input layer and hidden layer and that between the hidden layer and output layer are v ki and w jk , respectively. Te transfer function of the hidden layer is f 1 (•), then, Te transfer function of the output layer is f 2 (•), and an output value is obtained in accordance with the group of weights and thresholds.

Error Back Propagation.
In error back propagation, the output error of each layer of neurons is calculated through the output layer, the weight and bias value of the hidden layer of the grid are adjusted according to the error gradient descent method, and the parameters are continuously modifed to reduce the error during the training process. Te fnal error objective function is as follows: where d i is the expected output value, and E is the error objective function. Model GM (1, N). For a given system, assume that there are N variables:

Traditional Gray
With one out put X (0) N). Tese two kinds of sequences have strong correlations with each other. For each variable N),we assume that the sequence length is n, that is, Te 1-AGO sequences of X (0) i are defned as follows: Te mean sequences generated by consecutive neighbors of X (1) i are defned as follows: Computational Intelligence and Neuroscience 3 Te expression of the GM (1, N) model is as follows [21]: where a is the development coefcient of the sequence, is the deriving term, and b i is the driving coefcient.
Te equation (18) can be regarded as a system of linear equations with respect to the parameters p � [a, b 2 , ..., b m ] T , that is, Using the ordinary least-squares estimate (OLSE) method, the parameters P can be obtained as follows: Tus, the time response function of the GM(1,N) model can be derived as: It can get the predicted value as follows: From the above discussion, we can see that the GM (1, N) model has some obvious defects, such as the mean coefcient of the sequence in equation (18) and the driving term N i�1 b i x (1) i (t) in equation (18) are all constants, which may lead to poor predictive precision. (1, N) Model. Zhai et al. [21] and Kaki et al. [22] proposed an optimized multivariable gray prediction model OGM (1, N), which is diferent from the traditional gray model GM (1, N). Te calculation steps are as follows:

OGM
Let the two variable sequences X (0) 1 and X (0) i (i � 2, 3, . . . , N) be defned as in equations (15) and (16). Whereas the 1-AGO sequences be defned as: where, the parameter c can be adjusted according to the simulation accuracy. Assume that the X (1) 1 sequence approximates the exponential change law, and its infuence factor sequence is X (1) 2 , X (1) 3 , · · · , X (1) m ; then, the X (1) i sequence should satisfy the following frst-order linear diferential equation: Te above formula is discretized, and a linear correction term c(k − 1) is added; then, the relationship between data points changes in the dependent variable sequence ϕ i . Subsequently, the diferential equation expression of OGM(1, N) is obtained as follows: Upon discretizing it, we obtain where k � 1, 2, · · · , n, and c(k − 1) refects the linear relationship between the dependent variable and the independent variable.  (27), N + 2 parameters, i.e., P � [a, ρ 2 , · · · , ρ n , c, ϕ] T need to be estimated. Tese parameters can be estimated by solving the system of linear equations: where: Substituting (30) into (27), the time response function of the GM (1, N) model can be derived as follows:  Computational Intelligence and Neuroscience 5

Computational Intelligence and Neuroscience
where Which is referred to as the OGM(1, N) model. It can get the predicted value as follows: Tables 1 and 2. Te data in Table 1 is the accelerated corrosion data of reinforced concrete indoors collected by Liu and Wan [23]; and the data in Table 2 is the practical engineering data collected by Chen et al. [9]. In Table 1, the steel bar corrosion rate ξ and the steel bar corrosion extent η are included in the main sequence. Te crack width ω, corrosion time t, corrosion current i, protective layer thickness c, steel bar diameter d, and steel bar spacing D are included in the reference sequence for calculating steel bar corrosion rate. Te gray relational analysis of all infuencing factors is carried out, and the gray relational degrees is obtained as follows: 0.7704, 0.7516, 0.6268, 0.6224, 0.6021, 0.5928).

Calculation of Gray Relational Degree. Te calculation of the gray relational degrees is based on the corrosion test data of steel bars presented in
(34) Table 2 shows the crack width ω, concrete strength grade f cu , and steel bar diameter d. Te thickness of the protective layer c serves as the reference sequence for the amount of steel corrosion. Te gray correlation analysis of all infuencing factors is carried out, and the gray relational degrees is obtained as follows:   (1, N), and OGM (1, N) Models. Using the accelerated corrosion data in Table 1, according to the results of the correlation analysis, the BPNN model selects the crack width, corrosion time, corrosion current, and protective layer thickness to form the input vector; the steel corrosion rate forms the output vector. A BPNN with four nodes in the input layer and one node in the output layer is established. Based on multiple ftting trials, the hidden layer is set to eight layers, and the learning rate is 0.035. In order to prevent the network from over-ftting, the noise intensity is set as 0.01. Te target error value is specifed as 0.65 × 10 −3 .

Discussion
It can be observed from Figure 2, for the corrosion data of the accelerated corrosion data, among those of the three calculation methods, the ftting error of the GM (1, N) model is relatively large, while the other two models have relatively small errors.
It can be seen from Figure 3 that the ftting error of the BPNN is much smaller than that of OGM (1, N). Because steel corrosion is afected by many factors, there is a highly nonlinear relationship between steel corrosion and each infuencing factor, and the available data is limited. It is especially suitable for BPNN ftting; however, the BPNN may also exhibit over-ftting, resulting in regularity distortion and the predicted value error being relatively large.
It can be seen from Figures 4 and 5, for the measured corrosion data of practical engineering buildings, due to the large discretization of the measured values, the ftting and prediction errors obtained using the GM (1, N) and OGM (1, N) models are both large, while the predicted results obtained using the BPNN model are close to the real values.
It can be seen from the comparative analysis of the prediction results in Tables 3 and 4, the average ftting errors of the OGM (1, N) model for both the fast test and the engineering scatter data are larger than those of the BPNN model, whereas the predicted value of the OGM (1,

Conclusions
Te corrosion of steel bars has a great infuence on the safety and durability of reinforced concrete structures.
Tere are many factors that infuence the corrosion of steel bars in practical engineering, such as the crack width of the concrete structure, strength grade of concrete, diameter of steel bar, thickness of the concrete protective layer, and environmental factors of the project. In this paper, the BPNN, GM (1, N), and OGM (1, N) are used to ft and predict the accelerated corrosion data and practical engineering data of the concrete structure, and the following conclusions are drawn: (1) Compared with the traditional gray model GM (1, N), the OGM (1, N) model exhibits a higher ftting and predicting accuracy. (2) Compared with the GM (1, N) and OGM (1, N) models, the BPNN model exhibits a higher ftting accuracy for the two kinds of data (the accelerated corrosion data and practical engineering data (3) Te BPNN has a higher prediction accuracy for the practical engineering data, while the OGM (1, N) model has a higher prediction accuracy than the BPNN for the accelerated corrosion data. (4) In the practical engineering data, there are several infuencing factors for the corrosion of steel bars.
In this study, we only analyze a few infuencing factors that cause greater correlation and do not consider the atmospheric parameters of the service environment of the actual engineering structure. More relevant data can be collected for model forecasting in actual engineering applications [23].

Data Availability
Te indoor accelerated corrosion test of reinforced concrete data and actual engineering test data used to support the fndings of this study are included within the articles "Predict Corrosion Degree of Steel Bars in Reinforcing Concrete Based on ABC-BP Neural Network" and "Assessment on corrosive degree of reinforcement in concrete by artifcial neural networks," respectively.

Conflicts of Interest
Te authors declare that there are no conficts of interest.  Computational Intelligence and Neuroscience 9