Method for predicting amount of floating objects in front of three gorges dam based on improved neural network model
By improving the neural network model and optimizing the weights using the particle swarm optimization algorithm, the accuracy problem of predicting the inflow of water into the Three Gorges Dam was solved, and more efficient prediction of the inflow was achieved.
Patent Information
- Application Number
- CN202310316593.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-28
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2043-03-28
AI Technical Summary
Existing technologies lack a predictive model for the amount of water flowing into the Three Gorges Dam that can adapt to the high uncertainty of inflow during the flood season, and existing mathematical models have insufficient predictive accuracy.
A method for predicting drift volume based on an improved neural network model is constructed. An error backpropagation neural network is used and the particle swarm optimization algorithm is employed to optimize the weights. Logistic chaotic mapping and differential mutation operator are combined to improve the accuracy and adaptability of the model.
It improves the accuracy of the drift prediction model and its adaptability to uncertainties in reservoir and dam data, reduces the possibility of the algorithm getting trapped in local optima, and achieves more efficient prediction results.
Smart Images

Figure CN116402209B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of intelligent prediction of hydroelectric engineering, and particularly relates to a Three Gorges reservoir dam front floating amount prediction method based on an improved neural network model. BACKGROUND
[0002] After the Three Gorges reservoir is successfully impounded, a large amount of floating objects will gather on the dam front water surface in the flood season, which brings a security risk to the safe and stable operation of the Three Gorges hub project, and a large amount of floating objects will bring challenges to the restoration of the reservoir ecosystem. Therefore, it is crucial to master the accurate law of the dam front floating amount in the flood season of the Three Gorges reservoir. Cheng Jinhai et al. predicted the evolution trend of the dam front floating amount in the Three Gorges reservoir area by using the theoretical method of wavelet analysis, but this method cannot obtain accurate prediction results of the highly uncertain floating amount in the flood season.
[0003] At the same time, there is a lack of prediction method for the dam front floating amount in the flood season of the Three Gorges reservoir area in the prior art. SUMMARY
[0004] The technical problem of the present application is that there is a lack of dam front floating amount prediction model that can adapt to the highly uncertain inflow amount in the flood season in the prior art, and the accuracy of the existing floating amount evolution trend prediction method using mathematical models such as wavelet analysis is problematic.
[0005] The purpose of the present application is to solve the above problems, and to provide a Three Gorges reservoir dam front floating amount prediction method based on an improved neural network model, to construct a floating amount prediction model based on an error back propagation neural network, and to use a particle swarm algorithm to optimize and improve the weights of the error back propagation neural network, thereby improving the accuracy of the floating amount prediction model and the adaptability to uncertain data information of the reservoir dam.
[0006] The technical solution of the present application is a Three Gorges reservoir dam front floating amount prediction method based on an improved neural network model, comprising the following steps:
[0007] Step 1: Collect the inflow and outflow of the Three Gorges reservoir and the dam front floating amount data, perform feature engineering and data preprocessing on the obtained data set, and divide the training set and the test set;
[0008] Step 2: Set the parameters of the particle swarm algorithm and the improved neural network;
[0009] Step 3: Train the improved neural network using the training set, and optimize and solve the weights and thresholds of the improved neural network using the improved particle swarm algorithm during the training process;
[0010] Step 4: Test the trained improved neural network using the test set, and calculate the prediction error;
[0011] Step 5: judging whether the prediction error is within the allowable range, if yes, ending the training and executing Step 6, otherwise, executing Step 3 to train the improved neural network;
[0012] Step 6: using the trained improved neural network to make real-time prediction of the coming amount of water in front of the Three Gorges Dam.
[0013] Preferably, the method for predicting the coming amount of water in front of the dam uses a single hidden layer error back propagation neural network to establish a coming amount prediction model, the input layer of the single hidden layer error back propagation neural network contains d input neurons, the i-th input neuron is denoted as x i , the hidden layer contains q hidden layer neurons, the threshold value of the h-th hidden layer neuron is denoted as γ h , the output value of the h-th hidden layer neuron is denoted as b h , the connection weight between the i-th neuron of the input layer and the h-th neuron of the hidden layer is denoted as ξ ih , the output value of the h-th neuron of the hidden layer is denoted as p h , the output layer contains l output neurons, the l-th output neuron is denoted as y l ', the threshold value of the j-th output layer neuron is denoted as λ j , the connection weight between the h-th neuron of the hidden layer and the j-th neuron of the output layer is denoted as ω hj , the activation function used in the calculation process is the Sigmoid function, hereinafter referred to as f(), and the overall prediction error is denoted as E.
[0014] Preferably, the method for predicting the coming amount of water in front of the dam uses a logistic chaotic mapping to initialize the population of the improved particle swarm optimization algorithm, and the specific operation is as follows:
[0015] loc′ s+1 = a·loc′ s (1-loc′ s ) (1)
[0016] v′ s+1 = a·v′ s (1-v′ s ) (2)
[0017] where s represents the s-th iteration of the population initialization process, loc′ s represents the s-th chaotic position and loc′ s ∈(0, 1), v′ s represents the s-th chaotic speed and v′ s ∈(0, 1), a is a control parameter;
[0018] After generating chaotic position and chaotic velocity according to formula (1) and formula (2), they are mapped into the value space of population individuals:
[0019] loc s =(loc max -loc min )·loc′ s (3)
[0020] v s =(v max -v min )·v′ s (4)
[0021] In the formula, v max , v min respectively represent the maximum and minimum flying speed of particles in the population; loc max , loc min respectively represent the maximum and minimum moving position of particles in the population.
[0022] Further, in the improved neural network training process, the position and speed of the individual of the particle swarm are used to optimize and update the connection weight of the input layer and the hidden layer of the improved neural network and the corresponding threshold value; similarly, the position and speed of the individual of the particle swarm are used to optimize and update the connection weight of the hidden layer and the output layer of the improved neural network and the corresponding threshold value.
[0023] Preferably, the Gaussian radial basis function is used as the activation function of the output layer of the neural network, and the calculation formula of the Gaussian radial basis function is as follows:
[0024]
[0025]
[0026] In the formula, ρ() represents the Gaussian radial basis function; β j represents the input of the jth output layer neuron; and z is the center of the input value of all neurons of the output layer.
[0027] Preferably, in step 2, the differential mutation operator is introduced to improve the optimization process of the particle swarm algorithm, the differential mutation operator in the differential evolution algorithm is used to perform differential mutation on the obtained global extreme value of the population, so as to reduce the possibility of the algorithm falling into local optimum, and the calculation formula of the global extreme value g best of the population is as follows:
[0028] g best =g best +F·(g best -X r ), and X r ≠g best
[0029] where F represents a scaling factor, which is a random number on [0, 1]; r is a random number in {1, 2, …, N}; X r represents the position corresponding to a random individual other than the global extreme value in the current population.
[0030] Compared with the prior art, the beneficial effects of the present application include:
[0031] 1) After the training process of the error back propagation neural network is optimized and improved by using the particle swarm algorithm, the improved error back propagation neural network is used as the Three Gorges reservoir dam front drift volume prediction model, so that the connection weight of the prediction model is closer to the optimal ideal value, and the precision of the drift volume prediction model and the adaptability to the uncertainty of the reservoir dam data information are improved.
[0032] 2) The present application uses Gaussian radial basis function as the activation function of the output layer of the drift volume prediction model, which further improves the prediction accuracy of the prediction model.
[0033] 3) The present application improves the initialization process of the standard particle algorithm by using logistic chaotic mapping, and introduces a differential mutation operator to update the particles, which improves the optimization ability of the particle swarm algorithm and reduces the possibility of the algorithm falling into local optimum.
[0034] 4) The present application uses the differential mutation operator in the differential evolution algorithm to perform differential mutation on the global extreme value of the obtained population, which effectively reduces the possibility of the algorithm falling into local optimum. BRIEF DESCRIPTION OF DRAWINGS
[0035] The present application will be further described below in combination with the drawings and examples.
[0036] Figure 1 It is a flowchart of the dam front drift volume prediction method of the embodiment of the present application.
[0037] Figure 2 It is a structural diagram of the error back propagation neural network of the embodiment of the present application.
[0038] Figure 3 It is a comparison chart of the predicted value and the actual value of the dam front drift volume of the Three Gorges reservoir in 2012.
[0039] Figure 4 It is a comparison chart of the predicted value and the actual value of the dam front drift volume of the Three Gorges reservoir in 2018.
[0040] Figure 5 It is a comparison chart of the predicted value and the actual value of the dam front drift volume of the Three Gorges reservoir in 2020. DETAILED DESCRIPTION
[0041] As Figure 1 and Figure 2 shown, the Three Gorges Reservoir dam front drift volume prediction method based on improved neural network model comprises the following steps:
[0042] Step 1: Collect the Three Gorges Reservoir inflow, outflow and dam front drift volume data, perform feature engineering and data preprocessing on the obtained data set, and divide the training set and test set;
[0043] Step 2: Set the parameters of the particle swarm algorithm and the improved neural network, including population size N, individual dimension D, division ratio of training set and test set, maximum iteration number iteration of improved particle swarm algorithm;
[0044] In the embodiment, a single hidden layer error back propagation neural network is used to establish a drift volume prediction model; the single hidden layer error back propagation neural network of the embodiment includes d input neurons, the i-th input neuron is denoted as x i , the hidden layer includes q hidden layer neurons, the threshold value of the h-th hidden layer neuron is denoted as γ h , the output value of the h-th hidden layer neuron is denoted as b h , h = 1, 2…q; the connection weight between the i-th neuron of the input layer and the h-th neuron of the hidden layer is denoted as ξ ih , the output value of the h-th neuron of the hidden layer is denoted as p h , the output layer includes l output neurons, the l-th output neuron is denoted as y l ', the threshold value of the j-th output layer neuron is denoted as λ j , the connection weight between the h-th neuron of the hidden layer and the j-th neuron of the output layer is denoted as ω hj , the activation function used in the calculation process is the Sigmoid function, hereinafter referred to as f(), and the overall prediction error is denoted as E.
[0045] The population initialization of the improved particle swarm algorithm is performed by using the logistic chaos mapping, and the specific operation is as follows:
[0046] loc′ s+1 = a·loc′ s (1-loc′ s ) (1)
[0047] v′ s+1 = a·v′ s (1-v′ s ) (2)
[0048] In the formula, s represents the s-th iteration of the population initialization process, loc′ s represents the s-th chaotic position, and loc′ s∈(0, 1), v′ s represents the s-th chaotic velocity and v′ s ∈(0, 1), a is a control parameter, and in the embodiment, a = 4;
[0049] After generating the chaotic position and chaotic velocity according to the formula (1) and the formula (2), they are mapped into the value space of the population individuals:
[0050] loc s = (loc max - loc min )·loc′ s (3)
[0051] v s = (v max - v min )·v′ s (4)
[0052] In the formula, v max , v min respectively represent the maximum and minimum flight speeds of the particles in the population; loc max , loc min respectively represent the maximum and minimum moving positions of the particles in the population.
[0053] In the embodiment, the differential mutation operator is introduced to improve the optimization process of the particle swarm algorithm, the differential mutation operator in the differential evolution algorithm is used to perform differential mutation on the obtained global extreme value of the population, so as to reduce the possibility of the algorithm falling into a local optimum, and the calculation formula of the global extreme value g best of the population is as follows:
[0054] g best = g best +F·(g best -X r ), and X r ≠ g best (5)
[0055] In the formula, F represents a scaling factor, F is a random number in [0, 1]; r is a random number in {1, 2, …, N}, and N represents the population size of the particle swarm; X r represents the position corresponding to a random individual in the current population except the global extreme value.
[0056] In the embodiment, the Gaussian radial basis function is used as the activation function of the output layer of the single-hidden-layer error back propagation neural network, and the calculation formula of the Gaussian radial basis function is as follows:
[0057]
[0058]
[0059] where p() represents a Gaussian radial basis function; β j represents the input of the jth output layer neuron; z is the center of the input values of all neurons in the output layer.
[0060] Step 3: training the improved neural network using the training set, and optimizing and solving the weight and threshold of the improved neural network using the improved particle swarm algorithm during the training process;
[0061] Let the fitness function be fit(), and calculate the fitness function value fit(LOC i ) of each particle corresponding position; record the position with the maximum fitness function value searched by the ith particle as the individual extreme value of the ith particle, i.e., P i,best = (p i,1 , p i,2 , …, p i,D ); record the position with the maximum fitness function value in the population as the global extreme value, i.e., g best = (g1, g2, …, g D ).
[0062] Iteratively update the flight speed component v i,j and the position component loc i,j of the particle,
[0063] v i,j (t+1) = v i,j (t) + c1r1(t) [p i,j (t) - loc i,j (t)] + c2r2(t) [g i (t) - loc i,j (t)] (8)
[0064] loc i,j (t+1) = loc i,j (t) + v i,j (t+1) (9)
[0065] where t represents the tth iteration, r1 and r2 are random numbers uniformly distributed in [0, 1], c1 and c2 are learning factors, and v i,j is the jth dimensional speed component of the ith particle in the population.
[0066] Boundary condition processing in the particle swarm iteration process: if v i,j > v max , then v i,j = v max ; if v i,j < -v maxthen take v i,j = -v max ; if x i,j > x max , then take loc i,j = loc max ; if loc i,j < -loc max , then take loc i,j = loc max .
[0067] The iteration process of the particle swarm is terminated if t < T, and the iteration is repeated until t ≥ T.
[0068] The output value p h of the hidden layer neuron of the single hidden layer error back propagation neural network is calculated as follows:
[0069]
[0070] The output value y j of the output layer neuron of the single hidden layer error back propagation neural network is calculated as follows:
[0071]
[0072] In the embodiment, the gradient descent strategy is used in the training process of the single hidden layer error back propagation neural network to adjust the connection weights and the threshold values in the negative gradient direction. Given a learning rate η, η takes a value in (0, 1), then the specific expressions of the variation gradient m of the parameters between the input layer and the hidden layer, the variation adjustment value Δζ ih of the connection weights between the input layer and the hidden layer, the variation gradient n of the hidden layer to the output layer, the variation adjustment value Δω hj of the hidden layer to the output layer, the variation adjustment value Δγ h of the threshold value γ h , and the variation adjustment value Δλ j of the threshold value λ j are as follows:
[0073] n = y' j (1 - y' j )(y j - y' j ) (12)
[0074] Δω hj = ηn b h (13)
[0075] Δλ j = -ηn (14)
[0076]
[0077] Δζih = ηmx i (16)
[0078] Δγ h = -ηm (17)
[0079] Using the particle swarm individual to optimize and improve the connection weight ξ ih and its corresponding threshold value γ h ,
[0080] loc s = ξ ihs (18)
[0081] v s = γ hs (19)
[0082] loc max = ξ ihmax (20)
[0083] loc min = ξ ihmin (21)
[0084] v max = γ hma x (22)
[0085] v min = γ hmin (23)
[0086] wherein ξ ihs represents the connection weight between the i-th neuron of the input layer and the h-th neuron of the hidden layer obtained in the s-th iteration in the initialization process, γ hs represents the threshold value of the i-th neuron of the hidden layer obtained in the s-th iteration in the initialization process, ξ ihmax represents the maximum value of the connection weight between the i-th neuron of the input layer and the h-th neuron of the hidden layer, ξ ihmin represents the minimum value of the connection weight between the i-th neuron of the input layer and the h-th neuron of the hidden layer, γ hmax represents the maximum value of the threshold value of the neuron of the hidden layer, γ hmin represents the minimum value of the threshold value of the neuron of the hidden layer. Using the particle swarm individual to optimize and improve the connection weight ω hj and its corresponding threshold value λ j ,
[0087] loc s = ω hjs (24)
[0088] v s = λ js (25)
[0089] loc max =ω hjmax (26)
[0090] loc min =ω hjmin (27)
[0091] v max =λ jmax (28)
[0092] v min =λ jmin (29)
[0093] Where, ω hjs λ represents the connection weight between the i-th neuron in the input layer and the h-th neuron in the hidden layer, obtained in the s-th iteration during initialization. js ω represents the threshold of the i-th hidden layer neuron obtained in the s-th iteration during initialization. hjmax ω represents the maximum value of the connection weight between the i-th neuron in the input layer and the h-th neuron in the hidden layer. hjmin The minimum value of the connection weight between the i-th neuron in the input layer and the h-th neuron in the hidden layer, λ. jmax λ represents the maximum threshold value of neurons in the hidden layer. jmin This represents the minimum threshold value of the hidden layer neurons.
[0094] In the embodiment, when the connection weights and corresponding thresholds of the improved neural network model are optimized using individual particles of the particle swarm, the connection weights and corresponding thresholds of the improved neural network model are assigned to individual particles of the particle swarm according to equations (18)-(23) or (24)-(29). The individual particles are iteratively updated using the iterative algorithm of the particle swarm. The updated values of the individual particles are then assigned to the connection weights and corresponding thresholds of the improved neural network model, thereby achieving the optimization of the connection weights and corresponding thresholds of the improved neural network model.
[0095] Step 4: Test the improved neural network after training using the test set and calculate the prediction error;
[0096] The prediction error E of a single-hidden-layer backpropagation neural network is calculated as follows:
[0097]
[0098] Step 5: Determine if the prediction error is within the allowable range. If yes, end the training and proceed to step 6; otherwise, proceed to step 3 to train the improved neural network.
[0099] Step 6: The trained improved neural network is used for real-time prediction of the amount of water flowing in front of the Three Gorges Dam.
[0100] To verify the efficiency of the improved neural network model-based method for predicting the amount of water flowing in front of the Three Gorges Dam during the flood season, the Three Gorges Dam was taken as an example, the daily time scale was selected, and the amount of water flowing in front of the dam, the average inflow and outflow from July 1 to August 31 in 2012, 2018 and 2020 were selected as training and testing data, and the training set and test set were set to 3:1.
[0101] The improved error back propagation (IBP) neural network model, the standard error back propagation (BP) neural network model and the support vector machine (SVM) were used for 100 times of prediction respectively, the average predicted value was counted and compared with the actual value, and the results are shown in Figures 3-5 , the mean absolute percentage error MAPE, the root mean square error RMSE, the goodness of fit R 2 and the average time required for one complete prediction of the algorithm, the prediction results of 2012, 2018 and 2020 are shown in Tables 1, 2 and 3 respectively.
[0102] Table 1 Comparison of prediction indexes of the amount of water flowing in front of the dam in 2012
[0103]
[0104] Table 2 Comparison of prediction indexes of the amount of water flowing in front of the dam in 2018
[0105]
[0106] Table 3 Comparison of prediction indexes of the amount of water flowing in front of the dam in 2020
[0107]
[0108] The population size N of the improved particle swarm algorithm in the IBP model of the application is set to 50, and the iteration number iter is set to 500. Other parameters are generated by the computer according to the selection criteria of the model itself, the input values of the model training include the daily average inflow and outflow, and the output value is the amount of water flowing, therefore the number of input layer neurons u int of the above two neural networks is 2, the number of output layer neurons u out is 1, and the number of hidden layer neurons u mid is calculated according to formula (31):
[0109]
[0110] In the formula, r is a constant, representing an empirical constant of the number of hidden layer neurons;
[0111] Then, according to the calculation of formula (31), u mid The value range of n is an integer on [3, 11].
[0112] From Figures 3-5 It can be known that, compared with the BP and SVM models, the prediction result of the IBP model is closer to the true value, it can be known from Tables 1-3 that the prediction error of the IBP model is smaller, the required calculation time is shorter, and therefore the calculation speed is faster, so that the three Gorges reservoir dam front flood season drift amount prediction method based on the improved neural network model is more efficient.
Claims
1. A method for predicting the drift volume of the Three Gorges Dam based on an improved neural network model, characterized in that, The method for predicting the amount of water flowing into the dam uses a single-hidden-layer error backpropagation neural network to establish a prediction model for the amount of water flowing into the dam, and uses the Gaussian radial basis function as the activation function of the output layer of the prediction model for the amount of water flowing into the dam to obtain an improved neural network as the prediction model for the amount of water flowing into the dam. The input layer of the single-hidden-layer error backpropagation neural network includes The input neuron, the first The input neurons are denoted as The hidden layer contains The nth hidden layer neuron, the nth h The threshold of each hidden layer neuron is denoted as . , No. The output value of each hidden layer neuron is denoted as . , input layer The first neuron and the hidden layer The connection weights between neurons are denoted as . The first hidden layer The output value of the neuron is denoted as The output layer contains The nth output neuron, the nth The output neurons are denoted as , No. The threshold of each output layer neuron is denoted as . Hidden layer The nth neuron and the output layer The connection weights between neurons are denoted as . ; The method for predicting the amount of drift in front of the dam includes the following steps: Step 1: Collect data on inflow, outflow and drift in front of the Three Gorges Reservoir. Perform feature engineering and data preprocessing on the obtained dataset, and divide it into training and test sets. Step 2: Define the particle swarm optimization algorithm and the improved neural network structure and parameters; Step 3: Train the improved neural network using the training set. During the training process, use the improved particle swarm optimization algorithm to optimize the weights and thresholds of the improved neural network. Population initialization for an improved particle swarm optimization algorithm using logistic chaotic mapping; Step 4: Test the trained improved neural network using the test set and calculate the prediction error; Step 5: Determine if the prediction error is within the allowable range. If yes, end the training and proceed to step 6. Otherwise, proceed to step 3 to train the improved neural network. Step 6: Use the trained and improved neural network for real-time prediction of the amount of water flowing into the Three Gorges Dam.
2. The method for predicting the amount of water drifting towards the Three Gorges Dam according to claim 1, characterized in that, The population initialization of the particle swarm optimization algorithm using logistic chaotic mapping is specifically performed as follows: ;(1) ; (2) In the formula s The first step in the population initialization process is... s iteration Indicates the first s The chaotic position in the next iteration and , Indicates the first s The chaotic speed of the next iteration and ; For control parameters; After generating the chaotic position and chaotic velocity according to equations (1) and (2), they are mapped to the value space of the population individuals: ;(3) ;(4) In the formula These represent the maximum and minimum flight velocities of particles in the population, respectively. These represent the maximum and minimum movement positions of particles in the population, respectively.
3. The method for predicting the amount of water drifting towards the Three Gorges Dam according to claim 2, characterized in that, For connection weights and their corresponding thresholds When optimizing, ; ; ; ; ; ; in Indicates the first step in the initialization process. The input layer obtained in the nth iteration The first neuron and the hidden layer Connection weights between neurons Indicates the first step in the initialization process. The iteration yielded the... The threshold of each hidden layer neuron Indicates the input layer's first... The first neuron and the hidden layer The maximum value of the connection weights between neurons. Indicates the input layer's first... The first neuron and the hidden layer The minimum value of the connection weights between neurons. This represents the maximum value of the threshold of a neuron in the hidden layer. This represents the minimum threshold value of the hidden layer neurons.
4. The method for predicting the amount of water drifting towards the Three Gorges Dam according to claim 2, characterized in that, For connection weights and their corresponding thresholds When performing optimization, ; ; ; ; ; ; in, Indicates the first step in the initialization process. The input layer obtained in the nth iteration The first neuron and the hidden layer Connection weights between neurons Indicates the first step in the initialization process. The result of the iteration is the first The threshold of each hidden layer neuron Indicates the input layer's first... The first neuron and the hidden layer The maximum value of the connection weights between neurons. Indicates the input layer's first... The first neuron and the hidden layer The minimum value of the connection weights between neurons. This represents the maximum value of the threshold of a neuron in the hidden layer. This represents the minimum threshold value of the hidden layer neurons.
5. The method for predicting the drift volume before the Three Gorges Dam according to any one of claims 1-4, characterized in that, The Gaussian radial basis function is used as the activation function for the output layer of the neural network. The formula for calculating the Gaussian radial basis function is as follows: ; ; In the formula Represents the Gaussian radial basis functions; Indicates the first The input to each output layer neuron; It is the center of the input values for all neurons in the output layer.
Citation Information
Patent Citations
River floating pollutant identification method based on convolutional neural network
CN115497015A
River floating object detection method based on improved YOLOv3 algorithm
CN115641521A