Experimental study of overland flow resistance coefficient model of grassland based on BP neural network

The overland flow resistance on grassland slope of 20° was studied by using simulated rainfall experiments. Model of overland flow resistance coefficient was established based on BP neural network. The input variations of model were rainfall intensity, flow velocity, water depth, and roughness of slope surface, and the output variations was overland flow resistance coefficient. Model was optimized by Genetic Algorithm. The results show that the model can be used to calculate overland flow resistance coefficient, and has high simulation accuracy. The average prediction error of the optimized model of test set is 8.02%, and the maximum prediction error was 18.34%.


Introduction
The overland flow resistance is a key parameter to reflect the hydraulic characteristics of the overland flow. Studying the law of overland flow resistance is of great significance for understanding the hydrodynamic mechanism of soil erosion process. Many scholars [1][2][3][4][5][6][7] carried out extensive and in-depth research on the law of overland flow resistance. In the past, the research mostly focused on the experimental analysis of the overland flow resistance. For example, Keli Zhang [3] thought that the resistance coefficient in the process of rill erosion was closely related to the flow conditions and slope morphology. Peiqing Xiao [7] thought that the average resistance coefficient of slope under different covering conditions was closely related to rainfall intensity, and decreased with the increase of rainfall intensity.
Due to the difference of study objects and calibration data, the formula of overland flow resistance coefficient is quite different in form and scope of application. In this study, the neural network theory was applied to the study of overland flow resistance coefficient. In order to provide a reference for improving the calculation method of overland flow resistance coefficient and the prediction accuracy of the erosion prediction model, a BP neural network model was established based on the simulated rainfall experiment data, the genetic algorithm (GA) was used to optimize the model parameters.

Experiment equipment
The experiments were carried out in the key laboratory of soil and water loss process and control on the loess plateau of ministry of water resources. The soil tank was 5.0m long, 1.0m wide and 0.6m deep. The slope was 20°. The representative plant alfalfa in the Loess Plateau was planted on the slope by bunch planting. The distance of bunch planting was 20cm. The experiments were carried out when the grass was covered by 60% -70%. The simulated rainfall device was a side-jet artificial rainfall device. The simulated rainfall installation was 6.0m above the ground, and had a jet height of 1.5m. The values of rainfall uniformity measured before experiments were 86% -92%.
Soil was taken from the surface layer of loess slope of mountain Mang in Zhengzhou, and the particle composition was shown in Table 1. Loess was layered paving compaction to 50cm thick, and the soil moisture content was about 15%. The soil dry bulk density is about 1.05g/cm 3 above 20cm depth, and about 1.35g/cm 3 below 20cm depth. Samples taken from the upper, middle and lower part of the slope by cutting ring, are used to calculate the average bulk density and dry bulk density.

Experiment scheme
According to the typical rainfall frequency characteristics in the hilly and gully regions of the Loess Plateau, three rainfall intensities of 45, 90 and 130mm/h were identified as the experiment conditions. Simulated rainfall of 30mm/h was applied to the experimental slope about 10 min on the day before the experiments to ensure that the soil moisture content of each experiment was consistent. Observation sections were set along the slope from top to bottom at an interval of 1m, and the 5th section was the exit section. In the measurement interval of 2min, the five sections of the experimental parameters were measured. The flow rate was determined by the dye method, and the flow width was the sum of the flow widths of each section. A runoff sample was taken at the outlet of the soil tank at each time interval. Take a sample of runoff sediment. After runoff occurred on the slope, the rainfall lasted for 60 min, and each experiment was repeated once. The overland flow resistance coefficient was calculated by the Darcy-Weisbach resistance coefficient formula.

Modeling method 3.1 BP neural network
BP neural network consists of input layer, hidden layer and output layer. Each layer has several neurons. Neurons in different layers are connected to each other with a certain weight. The hidden layer neurons have bias values and activation function, and the output layer neurons have bias values. The model input variables were simulated rainfall intensity, flow velocity, flow depth, slope roughness, and the model output variable was overland flow resistance coefficient. The model was a BP neural network with 3 layers of network topology, and the number of neurons in input layer, hidden layer and output layer are 4, 12, and 1, respectively. Hidden layer activation function is:

Genetic algorithm
According to the topological structure and the characteristics of neuron activation function of BP neural network model, the initial weights and bias values of the model can be optimized by genetic algorithm. The weights and bias values optimization of BP neural network based on genetic algorithm, includes population initialization, construct fitness function, selection operation, cross operation, mutation operation. Population initialization is to encode all the individuals in the population according to individual information. Each individual is a real number string, which is composed of input layer and hidden layer neuron connection weights, hidden layer neuron bias values, hidden layer and output layer neuron connection weights and output layer bias value.
To construct fitness function is to build a BP neural network model based on information of connection weights and bias values of the neurons carried by individual, to train BP neural network using training samples, and then to simulate and predict. The sum of the absolute value of the error between the predicted output and the expected output is taken as the fitness value Fi of the individual i.
F i is the fitness value of individual i, k is a coefficient, p is the number of neurons in the output layer of the neural network, y i is the expected output value of the i-th neuron in the output layer of the neural network; t i is the predicted output value of the i-th neuron in the output layer of the neural network.
The selection operation refers to selecting an individual from a population. The method is roulette method based on the selection strategy of proportion of fitness, and the selection probability P i of an individual i is expressed as: f i is the inverse of the fitness value of individual I, N is the number of individuals in the population.
The cross operation refers to using real number cross method to process real-coded individuals. The cross operation expression of the k-th chromosome a k and the l-th chromosome a l in the j position is: a kj is the j-bit coded value of chromosome a k after the cross operation, a lj is the j-bit coded value of chromosome a l after the cross operation, b is a parameter of the cross operation.
The mutation operation refers to using a certain algorithm to make the gene fragments of selected individual mutation. The mutation operation expression of the i-th chromosome's j-th gene a ij is a a a f g r a a a a f g r a max is the upper bound of gene a ij , a min is the lower bound of gene a ij , g is the current evolution generation; G max is the largest evolution generation; r* is a random number, r is a random number within [0,1], f(g) is a function.
Considering the computational accuracy and computational requirements, set the population size to 20, the maximum evolutionary algebra to 50, the crossover probability to 0.7 and the mutation probability to 0.2.

Results and discussions
The model of BP neural network optimized by genetic algorithm was BP-GA model. Because of the difference of the dimension and magnitude between the input and output variables can affect the accuracy of the model. Therefore, all data of the input and output matrices were transformed to the interval [-1, 1] using a normalization formula.

Model training results analysis
81 training samples of 3 simulated rainfall experiments under grassland conditions were put into BP-GA model for training. During the training of 10 BP-GA models, the model parameter optimization process of genetic algorithm was traced 5 times randomly, and the optimal fitness of all individuals in each generation was recorded. Optimization process of BP neural network model parameter using genetic algorithm was shown in Fig 1. Due to the random assignment of parameters during model initialization, the initial fitness of each population was different, the optimal fitness of the population decreased with the increase of the genetic generation, and the crossover and mutation of chromosomes leaded to the drastic changes of the optimal fitness, resulting in some inflection points in the optimal fitness curves. The optimal fitness of each population tended to be consistent at around 50 generations, and was stable at about 9.5. The average prediction errors of 10 BP_GA models for the training samples were shown in Fig 2. When the simulated rainfall intensity is 45 mm/h, the average prediction error of all the training samples is 4.77%, and the maximum prediction error is 12.23%. When the simulated rainfall intensity is 90 mm/h, the average prediction error of all the training samples is 4.52%, and the maximum prediction error is 13.06%. When the simulated rainfall intensity is 130 mm/h, the model predicts the average error of all the training samples 6.52%, the maximum prediction error is 15.46%. The model had a high prediction accuracy. On the one hand, the grass can reduce the impact of raindrops on the surface of the slope, and on the other hand, it can increase the soil anti-corrosion ability and maintain the stability of the surface morphology.

Model verification
9 groups of test samples of three simulated rainfall experiments under grassland conditions were respectively substituted into the BP-GA model for verification. The test samples were randomly selected in different stages of each experiment and had good representativeness. The average prediction error of the BP-GA model for the test sample set was 8.02%, and the maximum prediction error was 18.34%. The model had a high simulation accuracy and a good generalization ability. The predicted value and the measured value calculated by BP-GA model were fitted and analyzed. The fitting relationship between the two was good, the fitting coefficient was 1.0045 and the coefficient of determination R 2 was 0.8588. Fig 3 showed the predicted and measured values have a good correlation and a oneto-one correspondence.

Conclusions
According to the experiment data, model of overland flow resistance coefficient was established based on BP neural network optimized by genetic algorithm. The input variations of model were rainfall intensity, flow velocity, water depth, and roughness of slope surface, and the output variations was overland flow resistance coefficient. Genetic algorithm could improve the parameter optimization speed and simulation accuracy of BP neural network. The average prediction error and the maximum prediction error of the test set of the BP-GA model were respectively 8.02% and 18.34%. Because of the limitation of experiment conditions, the influences of different cover and slope on the overland flow resistance coefficient are not considered, and the prediction method of BP neural network model is only discussed by using simulated rainfall experiment data of grassland slope of 20°.