A method for predicting flow of a hydroelectric generating unit based on LSTM deep learning
By using an LSTM deep learning method, an observation dataset of factors affecting hydropower station overcurrent was established and a model was constructed, which solved the problem of overcurrent measurement error of hydropower station units and achieved the improvement of the accuracy of hydropower station water volume calculation and power generation efficiency.
Patent Information
- Application Number
- CN202510124338.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-26
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-01-26
AI Technical Summary
Existing technologies for measuring and calculating the overcurrent of hydropower station units have large errors, resulting in inaccurate calculation of reservoir water volume, affecting the power generation scheduling and operation optimization of the hydropower station.
A method based on LSTM deep learning is used to establish an observation dataset of factors affecting overflow in hydropower stations. Data segmentation and feature segmentation are performed, and an LSTM deep learning model is constructed. Through training and verification, accurate prediction of overflow in hydropower stations is achieved.
It improves the accuracy of overcurrent prediction for hydropower station units, reduces errors in reservoir water volume calculation, optimizes the power generation efficiency and dispatching operation of hydropower stations, and provides real-time decision support.
Smart Images

Figure CN119990449B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of hydropower generation, and in particular relates to a method for predicting overcurrent of hydropower station units based on LSTM deep learning. Background Art
[0002] The LSTM model, owing to its superior time series processing capabilities, has long been widely used in research across various disciplines and industrial practices. Furthermore, in the field of reservoir operation, particularly in the management of reservoir and hydropower station operations, measurement technologies and computational processing methods have been developed to accurately acquire key data such as flow and water level. However, errors in the measurement and calculation of hydropower station unit flow still exist, posing challenges to hydropower station power generation scheduling and even reservoir optimization. The Three Gorges and Gezhouba reservoirs hold a pivotal position in China's hydropower development and Yangtze River management. These two reservoirs play a key role in water resource management in the Yangtze River basin, preventing floods, improving navigation conditions, protecting the coastal ecosystem, and promoting coordinated regional economic development. The Three Gorges Reservoir is located approximately 40 kilometers upstream of the Gezhouba Reservoir. Discharge from the Three Gorges Reservoir only takes about 30 minutes to reach the upstream of the Gezhouba Reservoir, resulting in less pronounced flattening of the flood process. The Three Gorges Reservoir discharge has a decisive influence on the inflow to the Gezhouba Reservoir. Furthermore, the distance between the Three Gorges and Gezhouba is relatively short, with no major tributaries flowing into it, resulting in very low flow rates between the Three Gorges and Gezhouba. Therefore, theoretically, Three Gorges outflows and Gezhouba inflows should be roughly equal, with a lag of no more than one hour. However, actual data indicates a significant imbalance in water volume between the Three Gorges and Gezhouba reservoirs. Numerous case studies and research have shown that this imbalance is primarily due to inaccurate calculations of Gezhouba's water volume. The Gezhouba Reservoir hydropower station underwent capacity expansion and retrofitting of its generator units between 2006 and 2022. This improvement in unit efficiency resulted in a reduction in the required flow rate for power generation under conditions of constant output and head. This resulted in the calculated required flow rate for Gezhouba's overall power generation being higher than the actual value, causing Gezhouba's outflows to consistently exceed those of the Three Gorges. However, Gezhouba's inflows are calculated by inversely calculating outflows and measured water level fluctuations, resulting in long periods of systematically higher inflows to Gezhouba than outflows from the Three Gorges. This discrepancy fluctuates with flow rates, making it difficult to discern patterns.
[0003] At present, the Three Gorges Cascade Regulation Project, some universities, and laboratories have conducted extensive research on this issue. It is generally believed that due to its high design and construction standards and strict operation management, and the fact that no major modifications have been made to the power station units since its completion and water storage, the outflow measurement of the Three Gorges Reservoir is relatively accurate, and can serve as a relatively accurate reference flow for the regional Yangtze River mainstream. Therefore, it is necessary to propose a hydropower station unit overflow prediction method based on LSTM deep learning to solve the above problem. Summary of the Invention
[0004] The technical problem solved by the present application is to provide a hydropower unit over-flow prediction method based on LSTM deep learning, aiming to solve the problem of large error in the measurement and calculation of the hydropower unit over-flow in the prior art, and to realize accurate prediction of the hydropower over-flow by using an LSTM deep learning model.
[0005] To solve the above technical problems, the technical solution adopted by the present application is:
[0006] A hydropower unit over-flow prediction method based on LSTM deep learning, comprising the following steps:
[0007] S1, establishing a hydropower over-flow influencing factor observation data set, including a hydropower upstream measured water level sequence, a hydropower downstream measured water level sequence, a hydropower total output sequence and a unit output sequence;
[0008] S2, determining an arbitrary confidence section of the reservoir hydropower upstream and downstream, obtaining or calculating the confidence section flow, and performing evolution and water balance analysis of the confidence section flow to the reservoir upstream and downstream;
[0009] S3, establishing a hydropower over-flow data set;
[0010] S4, performing dimension segmentation and feature segmentation of the influencing factor observation data set and the over-flow data set, and dividing the training set and the validation set;
[0011] S5, constructing an LSTM-based deep learning model, and setting the properties of the input layer, the LSTM layer, the Drop layer, the full connection layer and the regression layer according to the observation data set and the over-flow data set;
[0012] S6, training the LSTM deep learning model;
[0013] S7, adjusting the LSTM hidden unit number and the neuron dropout rate parameter according to the training effect, and returning to S6 until the training effect meets the requirements;
[0014] S8, verifying the LSTM deep learning model and predicting the unit over-flow.
[0015] Preferably, in the data set in step S1, the unit output sequence is accurate to the output of each unit, and the number of units determines the number of features of the observation data set; the number of units is assumed to be n.
[0016] Preferably, the confidence section in step S2 only includes the river sections whose flow or water level observation data is considered accurate and the error is less than a threshold value.
[0017] Preferably, in step S2, the evolution and water balance analysis is divided into two categories:
[0018] One type is that the confidence section is located downstream of the hydropower station under study, and the other type is that the confidence section is located upstream of the hydropower station under study; for the first type of problem, the flow process of the confidence section is inverted to the reservoir outflow control section; for the second type of problem, the flow process of the confidence section is evolved to the reservoir inflow control section, and based on the measured upstream water level process of the reservoir in the corresponding period, the water level storage capacity curve and the water balance principle are used to calculate the reservoir outflow.
[0019] Preferably, in step S2, the evolution method adopts the Muskingum method, which is based on the following assumptions:
[0020] The velocity of the river water is uniform, the channel shape is constant and the lateral flux in the channel is negligible;
[0021] Based on the water balance equation:
[0022] ; (1)
[0023] Among them, In, Qut, and Wr are the inflow, outflow, and channel storage of the river reach, respectively, and the subscripts indicate the initial and final states of the time period;
[0024] River channel storage equation:
[0025] ; (2)
[0026] Where Q' is the indicated storage flow, K represents the slope of the storage-flow relationship curve, and x is the flow rate specific coefficient;
[0027] The Muskingum confluence equation is obtained by calculating formula (1) and formula (2):
[0028] ; (3)
[0029] ; (4)
[0030] ; (5)
[0031] ; (6)
[0032] in .
[0033] Preferably, the dimension segmentation method in step S4 is:
[0034] The observation dataset is divided into c samples with equal time step a and corresponding to the same number of features b in each time step, that is, the input data shape dimension is determined to be [a, b, c].
[0035] Preferably, the training set and validation set described in step S4 are divided into a ratio of 70% training and 30% validation. Both the training set and the validation set contain data of the reservoir and hydropower station under different operating conditions of high water level and low water level, and do not include the situation when the reservoir is abandoning water; if there is water abandonment, the reservoir gate discharge data is obtained and eliminated from the overflow data set.
[0036] Preferably, in the LSTM deep learning model described in step S5, the principle and structure of the LSTM long short-term memory network layer are as follows:
[0037] LSTM network introduces a new cell state Specializes in linear cyclic information transmission and nonlinearly outputs information to the external state of the hidden layer At the same time, the "gate" structure can be used to remove or add "cell state" information to retain important content and remove unimportant content. The three "gates" are input gate , Forget Gate and output gate ; The calculation process is:
[0038] First, use the external state of the previous moment and the current input , calculate three gates and candidate states ;
[0039] Combined with forget gate and input gate To update the memory unit ;
[0040] Combined output gate , passing the information of the internal state to the external state ;
[0041] The specific calculation process is shown in formulas (7) to (15):
[0042] For the input variable set , first use the nonlinear activation function tanh to transform its input:
[0043] ; (7)
[0044] Given the input vector, the calculation is as follows:
[0045] ; (8)
[0046] Where, Represents the weight matrix of the input variables, which represents the weight of different input features on the overall prediction. The bias vector of the input variable represents the additional degrees of freedom that need to be added after the input variable is weighted by the weight matrix. It is a model hyperparameter together with the weight matrix.
[0047] Forget Gate Control the internal state of the previous moment The amount of information that needs to be forgotten, yes The combined variables input before time, also called hidden layer states, yes Type activation function, specifically calculated as follows:
[0048] ; (9)
[0049] Where, represents the weight matrix of the forget gate input variable, The weight matrix representing the hidden state of the forget gate, represents the forget gate bias vector;
[0050] Input Gate Control the candidate state at the current moment The amount of information that needs to be saved is calculated as follows:
[0051] ; (10)
[0052] Where, represents the weight matrix of the input gate input variables, represents the input gate hidden state weight matrix, represents the input gate bias vector;
[0053] Cell state First, calculate the candidate value of the cell state , as follows:
[0054] ; (11)
[0055] ; (12)
[0056] Where, represents the cell state input variable weight matrix, represents the cell state hidden state weight matrix, represents the cell state deviation vector;
[0057] Output Gate Control the internal state at the current moment Need to output to external state The amount of information is calculated as follows:
[0058] ; (13)
[0059] Where, represents the output gate input variable weight matrix, represents the output gate hidden state weight matrix, represents the output gate bias vector;
[0060] current The hidden layer state at time The calculation is as follows:
[0061] ; (14)
[0062] Where, represents the S-type activation function;
[0063] The final output is:
[0064] ; (15)
[0065] Where, represents the output variable weight matrix, Represents the bias vector of the final output.
[0066] Preferably, the training process described in step S7 measures the model training effect by detecting the model MSE, RMSE, MAE and loss Loss, adjusts the hyperparameters of learning rate, batch size, number of LSTM hidden units and neuron drop probability, and gradually optimizes the training effect.
[0067] Preferably, the verification and prediction process described in step S8 is performed by loading the trained LSTM deep learning model, inputting data that conforms to the shape dimension size, the input including the observed or predicted water level and output in a certain period of time, and outputting the predicted total water diversion and power generation flow of the hydropower station in the corresponding period.
[0068] The beneficial effects of the present invention are as follows:
[0069] 1. The present invention can accurately and quickly predict the overflow of the corresponding unit based on the water level and output measured or forecast data of the hydropower station when there are confidence sections and flow processes upstream and downstream of the hydropower station. It can not only be used for real-time data calculation of hydropower station operation, but also for flow simulation for different situations in scientific research and production practice. By using data from different periods to train deep learning models, it is possible to form specialized models suitable for different water inflow periods, and more targeted predictions of power generation reference flow under specific working conditions such as flood season and water storage period. At the same time, after the training of this LSTM deep learning model is completed, the memory usage is small and the prediction function call is convenient and fast. It can not only provide data support for scientific research, forecasting and scheduling and other businesses, but also provide real-time and fast decision support for scheduling and operation personnel, further optimize the scheduling and operation of hydropower station units, and improve the accuracy of water volume calculation in power station reservoirs while improving the power generation efficiency of hydropower stations.
[0070] 2. The method for predicting the overcurrent of hydropower station units provided by the present invention can reduce the errors in the calculation of water volume in reservoir hydropower stations to a certain extent. These errors are partly due to systematic deviations caused by maintenance of hydropower station unit equipment, changes in operating conditions, etc., and partly due to the error transmission caused by insufficient representativeness of observation data such as water level or observation errors. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 It is a schematic diagram of the flow chart of the present invention;
[0072] Figure 2 This is a schematic diagram of a deep learning network architecture in an embodiment of the present invention;
[0073] Figure 3 This is a generalized diagram of the LSTM model structure in an embodiment of the present invention;
[0074] Figure 4 Schematic diagram of the prediction effect based on the LSTM model in an embodiment of the present invention. DETAILED DESCRIPTION
[0075] Example 1:
[0076] like Figure 1 As shown, a method for predicting overcurrent of hydropower station units based on LSTM deep learning includes the following steps:
[0077] S1, establish an observation dataset of factors affecting the overflow of the hydropower station, including the measured water level sequence upstream of the hydropower station, the measured water level sequence downstream of the hydropower station, the total output sequence of the hydropower station, and the output sequence of each unit;
[0078] S2, determine any confidence section upstream and downstream of the reservoir and hydropower station, obtain or calculate the flow of the confidence section, and perform the evolution and water balance analysis of the flow of the confidence section to the upstream and downstream of the reservoir;
[0079] S3, establish the hydropower station flow data set;
[0080] S4, perform dimension segmentation and feature segmentation of the influencing factor observation dataset and the overflow dataset, and divide them into training set and validation set;
[0081] S5: Build a deep learning model based on LSTM and set the attributes of the input layer, LSTM layer, Drop layer, fully connected layer, and regression layer according to the observation dataset and the flow dataset;
[0082] S6, perform LSTM deep learning model training;
[0083] S7: Adjust the number of LSTM hidden units and the neuron dropout rate parameters based on the training results, and return to S6 until the training results meet the requirements.
[0084] S8, perform LSTM deep learning model verification and unit overcurrent prediction.
[0085] Preferably, in the data set in step S1, the output sequence of each unit is accurate to the output of each unit individually, and the number of units determines the number of features in the observation data set; the number of units is assumed to be n. Taking the Gezhouba Power Station as an example, there are 21 generator units and 1 power unit, so n=22.
[0086] Preferably, the confidence sections described in step S2 only include river sections whose flow or water level observation data are considered to be accurate and the error is less than a threshold; for example, a section a located upstream of the reservoir under study, whose flow measurement process adopts advanced technical means, and after evaluation, its flow process is considered to be accurate and reliable, then the measured flow process of this section is the confidence section flow; or there is a large-scale water conservancy project built upstream of the reservoir under study, and its downstream flow is precisely controlled, then the outflow flow of the upstream reservoir and the outflow representative station are the confidence section flow and the confidence section.
[0087] Preferably, in step S2, the evolution and water balance analysis is divided into two categories:
[0088] One type is that the confidence section is located downstream of the hydropower station under study, and the other type is that the confidence section is located upstream of the hydropower station under study; for the first type of problem, the flow process of the confidence section is inverted to the reservoir outflow control section; for the second type of problem, the flow process of the confidence section is evolved to the reservoir inflow control section, and based on the measured upstream water level process of the reservoir in the corresponding period, the water level storage capacity curve and the water balance principle are used to calculate the reservoir outflow.
[0089] Preferably, in step S2, the evolution method adopts the Muskingum method. Other commonly used software or model methods may also be used under the conditions of having other parameters and computing capabilities. Taking the Muskingum method as an example:
[0090] The Muskingum model is based on the following assumptions:
[0091] The velocity of the river water is uniform, the channel shape is constant and the lateral flux in the channel is negligible;
[0092] Based on the water balance equation:
[0093] ; (1)
[0094] Among them, In, Qut, and Wr are the inflow, outflow, and channel storage of the river reach, respectively, and the subscripts indicate the initial and final states of the time period;
[0095] River channel storage equation:
[0096] ; (2)
[0097] Where Q' is the indicated storage flow, K represents the slope of the storage-flow relationship curve, and x is the flow rate specific coefficient;
[0098] The Muskingum confluence equation is obtained by calculating formula (1) and formula (2):
[0099] ; (3)
[0100] ; (4)
[0101] ; (5)
[0102] ; (6)
[0103] in .
[0104] Preferably, the dimension segmentation method in step S4 is:
[0105] The observation dataset is divided into c samples with equal time steps a and corresponding to the same number of features b at each time step. This means that the input data shape dimension is determined to be [a, b, c]. Taking the Gezhouba Dam as an example, assuming the current observation dataset has 1000 time steps, and the corresponding features at each step include upstream water level, downstream water level, total power plant output, and individual unit output, the number of features is 3 + n = 25. If the dataset is divided into 10 samples, each sample has a time step of 100, and the input data dimension format is [100, 25, 10].
[0106] Preferably, the training set and validation set described in step S4 are divided into a ratio of 70% training and 30% validation. Both the training set and the validation set contain data of the reservoir and hydropower station under different operating conditions of high water level and low water level, and do not include the situation when the reservoir is abandoning water; if there is water abandonment, the reservoir gate discharge data is obtained and eliminated from the overflow data set.
[0107] Example 2:
[0108] like Figure 2 As shown, in the LSTM deep learning model described in step S5, the principle and structure of the LSTM long short-term memory network layer are as follows:
[0109] LSTM network introduces a new cell state Specializes in linear cyclic information transmission and nonlinearly outputs information to the external state of the hidden layer At the same time, the "gate" structure can be used to remove or add "cell state" information to retain important content and remove unimportant content. The three "gates" are input gate , Forget Gate and output gate .
[0110] like Figure 3 As shown, the LSTM network calculation process is:
[0111] First, use the external state of the previous moment and the current input , calculate three gates and candidate states ;
[0112] Combined with forget gate and input gate To update the memory unit ;
[0113] Combined output gate , passing the information of the internal state to the external state ;
[0114] The specific calculation process is shown in formulas (7) to (15):
[0115] For the input variable set , first use the nonlinear activation function tanh to transform its input:
[0116] ; (7)
[0117] Given the input vector, the calculation is as follows:
[0118] ; (8)
[0119] Where, Represents the weight matrix of the input variables, which represents the weight of different input features on the overall prediction. The bias vector of the input variable represents the additional degrees of freedom that need to be added after the input variable is weighted by the weight matrix. It is a model hyperparameter together with the weight matrix.
[0120] Forget Gate Control the internal state of the previous moment The amount of information that needs to be forgotten, yes The combined variables input before time, also called hidden layer states, yes Type activation function, specifically calculated as follows:
[0121] ; (9)
[0122] Where, represents the weight matrix of the forget gate input variable, The weight matrix representing the hidden state of the forget gate, represents the forget gate bias vector;
[0123] Input Gate Control the candidate state at the current moment The amount of information that needs to be saved is calculated as follows:
[0124] ; (10)
[0125] Where, represents the weight matrix of the input gate input variables, represents the input gate hidden state weight matrix, represents the input gate bias vector;
[0126] Cell state First, calculate the candidate value of the cell state , as follows:
[0127] ; (11)
[0128] ; (12)
[0129] Where, represents the cell state input variable weight matrix, represents the cell state hidden state weight matrix, represents the cell state deviation vector;
[0130] Output Gate Control the internal state at the current moment Need to output to external state The amount of information is calculated as follows:
[0131] ; (13)
[0132] Where, represents the output gate input variable weight matrix, represents the output gate hidden state weight matrix, represents the output gate bias vector;
[0133] current The hidden layer state at time The calculation is as follows:
[0134] ; (14)
[0135] Where, represents the S-type activation function;
[0136] The final output is:
[0137] ; (15)
[0138] Where, represents the output variable weight matrix, Represents the bias vector of the final output.
[0139] The specific symbols are explained in Table 1 below:
[0140] Table 1: Explanation of symbols in the formula;
[0141]
[0142] Preferably, the training process described in step S7 measures the model training effect by detecting the model MSE, RMSE, MAE and loss Loss, adjusts the hyperparameters of learning rate, batch size, number of LSTM hidden units and neuron drop probability, and gradually optimizes the training effect.
[0143] Preferably, the verification and prediction process described in step S8 is performed by loading the trained LSTM deep learning model, inputting data that conforms to the shape dimension size, the input including the observed or predicted water level and output in a certain period of time, and outputting the predicted total water diversion and power generation flow of the hydropower station in the corresponding period.
[0144] Example 3:
[0145] Furthermore, the attributes of each layer of the LSTM deep learning model described in step S5 are set as shown in Table 1 below:
[0146] Table 1: Deep learning network analysis property settings:
[0147]
[0148] Taking Gezhouba as an example, the input feature dimension of the input layer is set to 25, the minimum length of minlength is set to 350, and no normalization is performed; the number of hidden units of the LSTM layer is set to 128, the output mode is set to sequence to output the hidden state of each time step, the StateActivationFunction state unit activation function is set to tanh to facilitate processing sequence data, the GateActivationFunction gate activation function is set to sigmoid, the InputWeightsLearnRateFactor input weight learning rate factor is set to 1 to use the global learning rate, and the InputWeightsL2Factor controls the input weight The L2 regularization factor is set to 1, the RecurrentWeightsLearnRateFactor that controls the learning rate factor of the recursive weight is set to 1, the BiasLearnRateFactor that controls the learning rate factor of the bias is set to 1, and the InputWeightsInitializer initialization weight strategy is set to glorot to help accelerate convergence; the DropoutProbability of the Drop layer is set to 0.3 for random neuron dropout probability to adapt to smaller network data sets; the number of NumUnits neurons in the FC fully connected layer is set to 1, because only one output feature, the total overflow, needs to be predicted. The rest, such as the learning rate factor and regularization factor that control the weight and bias, are the same as those of the LSTM layer; the output dimension of the regression layer OutputSize is set to 1.
[0149] like Figure 4As shown, taking the Gezhouba Hydropower Station as an example, the prediction effect of the hydropower station overflow prediction method based on the LSTM deep learning provided by the present invention is demonstrated. It can be seen from the figure that the predicted value curve and the actual value curve have a high degree of overlap. Due to the capacity expansion and transformation of the Gezhouba Reservoir units and possible changes in equipment operating conditions, the calculation results of the Gezhouba unit water diversion and power generation flow rate are systematically biased during the flood season, and fluctuating errors occur during the non-flood season. The current solution to this problem in the Three Gorges cascade regulation is manual correction, which introduces empirical coefficients to scale the water diversion and power generation flow rate. This method provides another way to solve such problems. Based on big data and machine learning ideas, a black box model is established to take into account all factors that affect the accuracy of the water volume calculation of the hydropower station, while the outside world only pays attention to the input and output of the LSTM deep learning model, where the input is the most original unprocessed observation data and the output is a reliable and accurate hydropower station water diversion and power generation flow rate.
Claims
1. A method for predicting overcurrent of hydropower station units based on LSTM deep learning, characterized in that: The following steps are involved: S1, establish an observation dataset of factors affecting the overflow of the hydropower station, including the measured water level sequence upstream of the hydropower station, the measured water level sequence downstream of the hydropower station, the total output sequence of the hydropower station, and the output sequence of each unit; S2, determine any confidence section upstream and downstream of the reservoir and hydropower station, obtain or calculate the flow of the confidence section, and perform evolution and water balance analysis of the flow of the confidence section to the upstream and downstream of the reservoir; the confidence section only includes river sections where the flow or water level observation data is considered accurate and the error is less than the threshold; the evolution and water balance analysis are divided into two categories: One type is that the confidence section is located downstream of the hydropower station under study, and the other type is that the confidence section is located upstream of the hydropower station under study; For the first type of problem, the flow process of the confidence section is inverted to the reservoir outflow control section; For the second type of problem, the confidence section flow process is evolved to the reservoir inflow control section. Based on the measured upstream water level process of the reservoir during the corresponding period, the reservoir outflow is calculated using the water level storage capacity curve and the water balance principle. The evolutionary method adopts Muskingum method; S3, establish the hydropower station flow data set; S4, perform dimension segmentation and feature segmentation of the influencing factor observation dataset and the overflow dataset, and divide them into training set and validation set; S5: Build a deep learning model based on LSTM and set the attributes of the input layer, LSTM layer, Drop layer, fully connected layer, and regression layer according to the observation dataset and the flow dataset; S6, perform LSTM deep learning model training; S7: Adjust the number of LSTM hidden units and the neuron dropout rate parameters based on the training results, and return to S6 until the training results meet the requirements. S8, perform LSTM deep learning model verification and unit overcurrent prediction.
2. A method for predicting overcurrent of a hydropower station unit based on LSTM deep learning according to claim 1, characterized in that: In the data set in step S1, the output sequence of each unit is accurate to the output of each unit. The number of units determines the number of features in the observation data set; the number of units is assumed to be n.
3. A method for predicting overcurrent of a hydropower station unit based on LSTM deep learning according to claim 1, characterized in that: In step S2, the Muskingum model is based on the following assumptions: The velocity of the river water is uniform, the channel shape is constant and the lateral flux in the channel is negligible; Based on the water balance equation: ;(1) Among them, In, Qut, and Wr are the inflow, outflow, and channel storage of the river reach, respectively, and the subscripts indicate the initial and final states of the time period; River channel storage equation: ;(2) Where Q' is the indicated storage flow, K represents the slope of the storage-flow relationship curve, and x is the flow rate specific coefficient; The Muskingum confluence equation is obtained by calculating formula (1) and formula (2): ;(3) ;(4) ;(5) ;(6) in .
4. A method for predicting overcurrent of a hydropower station unit based on LSTM deep learning according to claim 1, characterized in that: The dimension segmentation method described in step S4 is: The observation dataset is divided into c samples with equal time step a and corresponding to the same number of features b in each time step, that is, the input data shape dimension is determined to be [a, b, c].
5. The method for predicting overcurrent of a hydropower station unit based on LSTM deep learning according to claim 1, characterized in that: The training set and validation set described in step S4 are divided into a ratio of 70% training and 30% validation. Both the training set and the validation set contain data of the reservoir and hydropower station under different operating conditions of high water level and low water level, and do not include the situation when the reservoir is abandoning water; if there is water abandonment, the reservoir gate discharge data is obtained and eliminated from the overflow data set.
6. A method for predicting overcurrent of a hydropower station unit based on LSTM deep learning according to claim 1, characterized in that: In the LSTM deep learning model described in step S5, the principle and structure of the LSTM long short-term memory network layer are as follows: LSTM network introduces a new cell state Specializes in linear cyclic information transmission and nonlinearly outputs information to the external state of the hidden layer At the same time, the "gate" structure can be used to remove or add "cell state" information to retain important content and remove unimportant content. The three "gates" are input gate , Forget Gate and output gate ; The calculation process is: First, use the external state of the previous moment and the current input , calculate three gates and candidate states ; Combined with forget gate and input gate To update the memory unit ; Combined output gate , passing the information of the internal state to the external state ; The specific calculation process is shown in formulas (7) to (15): For the input variable set , first use the nonlinear activation function tanh to transform its input: ;(7) Given the input vector, the calculation is as follows: ; (8) Where, Represents the weight matrix of the input variables, which represents the weight of different input features on the overall prediction. The bias vector of the input variable represents the additional degrees of freedom that need to be added after the input variable is weighted by the weight matrix. It is a model hyperparameter together with the weight matrix. Forget Gate Control the internal state of the previous moment The amount of information that needs to be forgotten, yes The combined variables input before time, also called hidden layer states, yes Type activation function, specifically calculated as follows: ; (9) Where, represents the weight matrix of the forget gate input variable, The weight matrix representing the hidden state of the forget gate, represents the forget gate bias vector; Input Gate Control the candidate state at the current moment The amount of information that needs to be saved is calculated as follows: ; (10) Where, represents the weight matrix of the input gate input variables, represents the input gate hidden state weight matrix, represents the input gate bias vector; Cell state First, calculate the candidate value of the cell state , as follows: ; (11) ; (12) Where, represents the cell state input variable weight matrix, represents the cell state hidden state weight matrix, represents the cell state deviation vector; Output Gate Control the internal state at the current moment Need to output to external state The amount of information is calculated as follows: ; (13) Where, represents the output gate input variable weight matrix, represents the output gate hidden state weight matrix, represents the output gate bias vector; current The hidden layer state at time The calculation of is as follows: ; (14) Where, represents the S-type activation function; The final output is: ; (15) Where, represents the output variable weight matrix, Represents the bias vector of the final output.
7. The method for predicting overcurrent of a hydropower station unit based on LSTM deep learning according to claim 1, characterized in that: In the training process described in step S7, the model training effect is measured by testing the model MSE, RMSE, MAE and loss Loss, and the hyperparameters of learning rate, batch size, number of LSTM hidden units and neuron drop probability are adjusted to gradually optimize the training effect.
8. The method for predicting overcurrent of a hydropower station unit based on LSTM deep learning according to claim 1, characterized in that: The verification and prediction process described in step S8 is performed by loading the trained LSTM deep learning model, inputting data that meets the shape dimension size, including the observed or predicted water level and output in a certain period of time, and outputting the predicted total water diversion and power generation flow of the hydropower station in the corresponding period.
Citation Information
Patent Citations
Runoff prediction method based on attention mechanism and LSTM
CN110288157A
Power station water level process prediction method and apparatus based on neural network model
CN113256005A