Reservoir power generation flow calculation method based on the coupling of physical methods and deep learning
By combining physical methods with deep learning and LSTM models, the method addresses the limitations of traditional prediction methods, enhancing water reservoir power generation prediction accuracy and optimizing energy utilization.
Patent Information
- Application Number
- CN202510369168.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2045-03-27
AI Technical Summary
When traditional reservoir power generation prediction methods cope with highly nonlinear, multivariable coupled hydrological processes, it is difficult to fully capture the dynamic characteristics of the reservoir system, resulting in limited prediction accuracy.
Combining physical methods and deep learning, the reservoir water level, inflow rate and power generation output data are decomposed into periodic terms, trend terms and residual terms through the BFAST method. The LSTM model is used to learn the timing relationship between the power generation output residual and the input variable, predict the power generation output and convert it into the current generation.
It improves the accuracy of the prediction of power generation of reservoirs, optimizes the efficiency of water energy utilization, and can effectively capture the nonlinear dynamic characteristics in the power generation process of reservoirs.
Smart Images

Figure CN119903306B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of water conservancy projects and intelligent dispatching, and particularly relates to a method for calculating reservoir power generation flow based on the coupling of physical methods and deep learning. Background Technique
[0002] As an important facility for regulating water resources in a basin, the reasonable operation of a reservoir can effectively improve the utilization efficiency of water resources and ensure the stable operation of the power grid. Accurately predicting the power generation output of a reservoir is of great significance for optimizing power grid dispatching, improving the utilization efficiency of water energy, and achieving sustainable energy development.
[0003] Due to climate change, precipitation uncertainty, and complex operation and dispatching rules, traditional reservoir power generation prediction methods such as physical statistical models, regression analysis, and time series analysis methods (such as ARIMA) have limitations in dealing with highly nonlinear and multi-variable coupled hydrological processes, and it is difficult to fully capture the dynamic characteristics of the reservoir system, resulting in limited prediction accuracy. In recent years, significant progress has been made in the application of deep learning technology in the fields of hydrology and water conservancy engineering, especially the LSTM neural network. Due to its special gating mechanism, LSTM can effectively capture the dependency relationships of long time series data and has strong time series data modeling capabilities. Summary of the Invention
[0004] The present invention aims to improve the accuracy of reservoir power generation output prediction, and proposes a method for calculating reservoir power generation flow based on the coupling of physical methods and deep learning, which can be used to optimize the utilization efficiency of water energy.
[0005] To solve the above technical problems, the technical solution adopted by the present invention is:
[0006] A method for calculating reservoir power generation flow based on the coupling of physical methods and deep learning, comprising:
[0007] Step 1: Collect historical operation characteristic data of the reservoir, including reservoir water level, inflow, power generation output, and power generation flow, and perform data cleaning, removing outliers, and filling missing data;
[0008] Step 2: Use the BFAST method to decompose the reservoir water level, inflow, and power generation output data respectively, and obtain the periodic term, trend term, and residual term data of the reservoir water level, inflow, and power generation output respectively;
[0009] Step 3: Take the periodic term, trend term, and residual term of the reservoir water level and inflow as input variables, and the residual term of the power generation output as the target variable, construct and train a deep learning model to enable the model to learn the time series relationship between the power generation output residual and the input variables;
[0010] Step 4: Use the trained deep learning model to predict the residual power generation output, and add the predicted residual term to the periodic term and trend term of the corresponding period to obtain the total power generation output of the reservoir.
[0011] Step 5: Based on the water energy power generation conversion formula, convert the total power generation output of the reservoir into power generation flow.
[0012] Furthermore, the historical operation characteristic data of the reservoir collected in Step 1 are daily-scale data to ensure the time resolution and data consistency of the model.
[0013] Furthermore, the principle of using the BFAST method to decompose the power generation output, reservoir water level, and inflow data in Step 2 is as follows:
[0014] BFAST (Breaks For Additive Season and Trend) is a statistical method for time series analysis, mainly used to detect and monitor structural changes (breakpoints) in time series, especially in data with seasonal and trend components.
[0015] The mathematical expression form of BFAST is:
[0016] Y t =T t +S t +e t ,t = 1,……n
[0017] Where, Y t is the measured value at time t, T t is the trend term, S t is the periodic term, and e t is the residual term;
[0018] The trend term is piecewise linear, and the breakpoints are set as and defined as Then:
[0019]
[0020] This means that there is a linear trend term between every two adjacent breakpoints. There are a total of m breakpoints, and j is one of them, j = 1,……m. According to the intercept and slope of the continuous linear model, the amplitude direction of the mutation and the slope of the gradual change between the detected breakpoints can be deduced. The amplitude of the mutation at the breakpoint is derived from the difference between T t at two adjacent breakpoints and , that is:
[0021] Amplitude = (α j-1 -α j )+(βj-1 -β j )t
[0022] The gradual change slopes before and after the breakpoint are β j-1 and β j , and the intercepts before and after the breakpoint are α j-1 and α j .
[0023] The seasonal breakpoint may occur at a different time from the breakpoint detected in the trend term. Let the seasonal breakpoint be There are a total of p seasonal breakpoints, and j' is one of the breakpoints, j′ = 1, …… p, and define Then for
[0024] Assume:
[0025]
[0026] where: s is the seasonal period, γ i,j′ represents the seasonal effect parameter of season i and j', so when
[0027] , the sum of s consecutive seasons S t is exactly zero, which ensures that the sum of the seasonal effects of all seasons (including season 0) is zero. This is a common constraint in the seasonal model to avoid overparameterization.
[0028] The seasonal term can be re-expressed as:
[0029]
[0030] When t is in season i, t = 1, otherwise 0. Therefore, if t is in season 0 (i.e., the base season), then d t,i -d t,0 = -1; for other seasons, when t is in season i ≠ 0, d t,i -d t,0 = 1, d t,i , d t,0 are both seasonal dummy variables, d t,i indicates whether time t belongs to season i, and d t,0 indicates whether time t belongs to season 0.
[0031] The power generation output of a reservoir usually shows a certain periodicity, which is mainly due to the influence of multiple factors. First, the seasonal changes in hydrological conditions directly affect the inflow and water level of the reservoir. For example, in the flood season, the rainfall increases significantly, resulting in an increase in inflow, which in turn increases the power generation output of the reservoir; while in the dry season, the inflow decreases and the power generation output decreases accordingly. Secondly, the seasonal fluctuations in electricity demand will also affect the power generation output of the reservoir. In summer, especially in hot weather, the demand for electricity increases significantly, and the reservoir will be dispatched according to the changes in demand to maximize power generation. In addition, the dispatching strategy and operation management of the reservoir also have an important impact on the periodic characteristics of power generation output, especially in the cascade reservoir system, the linkage effect between different reservoirs may further affect its power generation output cycle. Therefore, understanding the mechanism of these factors is crucial to accurately simulate the changes in the power generation output of the reservoir. The output residual is related to the reservoir water level and inflow, but because the output residual is discontinuous, decomposing the reservoir water level and inflow into season, trend and residual terms for simulation can better capture the contingency of the residual.
[0032] Furthermore, the deep learning model in step 3 is an LSTM model.
[0033] The principle of the LSTM deep learning model is:
[0034] The LSTM deep learning model mainly maintains its state and regulates the information flow in the cell state structure through an input gate, an output gate, and a forget gate. Its functions are mainly realized through the following formula:
[0035] Forget gate: determines which past information should be forgotten in the current time step. The calculation formula is as follows:
[0036] f t =σ(W f ·[h t-1 ,x t ]+b f )
[0037] Among them, f t Represents the output of the forget gate, which is a vector between 0 and 1, indicating the proportion of retention or forgetting, W f represents the weight matrix of the forget gate, h t-1 is the hidden state of the previous time step, x t is the input of the current time step, b f is the bias vector of the forget gate, σ represents the sigmoid function, which compresses the output between 0 and 1.
[0038] Input gate: The input gate determines what new information will be added to the cell state. It is divided into two steps: generating input gate coefficients and candidate memory cell states.
[0039] Input gate coefficient:
[0040] i t = σ(W i · [h t-1 , x t + b i )
[0041] where W i represents the weight matrix of the input gate, b i represents the bias vector of the input gate, [h t-1 , x t is the concatenation of the previous hidden state h t-1 and the current input x t .
[0042] Candidate memory cell state:
[0043]
[0044] Finally, the calculation formula of the input gate is:
[0045]
[0046] where i t represents the output of the input gate, represents the candidate cell state, represents the new information at the current time step, C t is the cell state at time t, C t-1 is the cell state at time t-1; W c is the weight matrix of the cell state candidate value.
[0047] Output gate: The output gate controls which information is extracted from the cell state as the output of the current time step and updates the hidden state:
[0048] o t = σ(W o · [h t-1 , x t + b o )
[0049] h t = o t · tanh(C t )
[0050] where o t represents the output of the output gate; h t represents the hidden state of the current time step, as the input of the next time step; Wo is the weight matrix of the output gate; b o is the bias term of the output gate; tanh is the hyperbolic tangent activation function, which compresses the value to the range of [-1, 1].
[0051] In the training and prediction processes of this model, not only the long-term seasonal cycle changes and trends are considered, but also the short-term fluctuations and random noises are effectively processed. This model provides a powerful tool for simulating the power generation output error, helps to reveal the evolution law of the output error, and provides a more accurate reference basis for dispatching optimization.
[0052] The key parameters for improving the learning performance of the LSTM model mainly include: the number of hidden layers, the number of training epochs, the number of neurons in the hidden layer, the learning rate, and the batch size. The selection of these parameters should be adjusted according to the characteristics of the dataset, or determined through experiments and optimization to obtain the best model performance.
[0053] Furthermore, the performance of the power generation output residual simulation in step 4 is evaluated by the systematic bias BIAS and the correlation coefficient R, and the calculation formulas are as follows:
[0054]
[0055] where X s1 is the simulated value of the power generation output residual, X o1 is the measured value of the power generation output residual, and are the means of the simulated value and the measured value of the power generation output residual respectively, and n is the number of time series of the measured values.
[0056] Furthermore, the performance of the power generation flow simulation in step 5 is evaluated by the efficiency coefficient NSE and the relative error RE, and the calculation formulas are as follows:
[0057]
[0058] where X s2 is the simulated value of the power generation flow, X o2 is the measured value of the power generation flow, and are the means of the simulated value and the measured value of the power generation flow respectively, and n is the number of time series of the measured values.
[0059] Furthermore, in step 5, based on the water energy power generation conversion formula, the predicted total reservoir power generation output is converted into the power generation flow Q:
[0060]
[0061] where P is the power generation output power, η is the efficiency of the generator, ρ is the density of water, g is the acceleration due to gravity, and H is the head, which refers to the difference between the upstream water level and the downstream water level of the reservoir.
[0062] Advantages of the present invention:
[0063] The reservoir power generation prediction method of the present invention can effectively capture the non-linear dynamic characteristics in the reservoir power generation process, improve the accuracy of reservoir power generation output prediction, and is used to optimize the water energy utilization efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 It is a schematic flow chart of the method of the present invention;
[0065] Figure 2 It is the decomposition result of the power generation output data of the BFAST method of the present invention; wherein, Figure 2 in (a) is the measured value of the power generation output, Figure 2 in (b) is the periodic term after the decomposition of the power generation output data, Figure 2 in (c) is the trend term after the decomposition of the power generation output data, Figure 2 in (d) is the residual term after the decomposition of the power generation output data;
[0066] Figure 3 It is the simulation result of the power generation output residual in the embodiment; wherein, Figure 3 in (a) is the comparison chart of the measured residual and the simulated residual during the calibration period, Figure 3 in (b) is the scatter plot of the measured residual and the simulated residual during the calibration period, Figure 3 in (c) is the comparison chart of the measured residual and the simulated residual during the verification period, Figure 3 in (d) is the scatter plot of the measured residual and the simulated residual during the verification period;
[0067] Figure 4 It is the simulation result of the power generation flow rate in the embodiment;
[0068] Figure 5 It is the decomposition result of the reservoir water level data in the embodiment; wherein, Figure 5 in (a) is the periodic term after the decomposition of the reservoir water level data, Figure 5 in (b) is the trend term after the decomposition of the reservoir water level data, Figure 5 in (c) is the residual term after the decomposition of the reservoir water level data;
[0069] Figure 6 It is the decomposition result of the inflow data in the embodiment; wherein, Figure 6 in (a) is the periodic term after the decomposition of the inflow data, Figure 6 in (b) is the trend term after the decomposition of the inflow data, Figure 6 in (c) is the residual term after the decomposition of the inflow data. DETAILED DESCRIPTION OF THE INVENTION
[0070] The technical method of the present invention will be further described below with reference to the drawings and specific examples.
[0071] Embodiment 1
[0072] In this embodiment, the Ertan Reservoir in the Yalong River Basin is taken as the research reservoir, and the research period is from January 1, 2002 to December 31, 2018. Based on the calculation method of reservoir power generation flow coupling physical methods and deep learning, such as Figure 1 , the following steps are included:
[0073] Step 1: Collect the historical operation characteristic data of the reservoir, including reservoir water level, inflow, power generation output, and power generation flow, and perform data cleaning, removing outliers, filling missing data, etc.
[0074] The collected historical operation characteristic data of the reservoir is daily-scale data.
[0075] Step 2: Use the BFAST method to decompose the reservoir water level, power generation output, and inflow data respectively, and obtain the periodic term, trend term, and residual term of the reservoir water level, power generation output, and inflow data. The periodic term reflects the change in power generation capacity of the reservoir in different seasons, while the trend term shows the overall change trend of the reservoir power generation output over time. The residual term mainly represents the noise caused by the change in reservoir water level, inflow, or manual operation in the short term.
[0076] The decomposition results of the power generation output are as shown in (a), (b), (c), (d) in Figure 2 , where Figure 2 in (a) is the measured value Y of the power generation output t , Figure 2 in (b) is the periodic term S after the decomposition of the power generation output data t , Figure 2 in (c) is the trend term T after the decomposition of the power generation output data t , Figure 2 in (d) is the residual term e after the decomposition of the power generation output data t . Through the analysis of the data of the Ertan Reservoir from 2002 to 2017, it is found that significant mutations occur in the periodic term in 2007 and 2014: the mutation in 2007 is mainly manifested as an increase in the output fluctuation amplitude, which may be related to the power demand fluctuation and the play of the peak regulation and frequency modulation functions; the mutation in 2014 may be related to the commissioning of the downstream cascade power stations, resulting in a reduction in the power generation output of Ertan, although the trend term still shows an upward trend. In addition, with the increase in the scheduling complexity, the residual term gradually increases, which may be related to the joint scheduling of cascade power stations and the inflow fluctuation.
[0077] As shown in (a), (b), (c) in Figure 5 , they are the periodic term, trend term, and residual term after the decomposition of the reservoir water level data respectively.
[0078] As shown in (a), (b), (c) in Figure 6 , they are the periodic term, trend term, and residual term data after the decomposition of the inflow respectively.Figure 2-6 All are daily-scale data. Since the sequence is long, only the years are marked.
[0079] Step 3: After obtaining the periodic term, trend term, and residual term, use the periodic term, trend term, and residual term of the reservoir water level and inflow as input variables, and the residual term of the power generation output as the target variable. Using 2002 - 2012 as the calibration period, construct and train an LSTM deep learning model to enable the model to learn the complex time series relationship between the power generation output residual and the input variables.
[0080] In this embodiment, the key parameters for the learning performance of the LSTM model are set as follows: the number of hidden layers is 4, the number of training epochs is 100, the number of neurons is 256, the learning rate is 0.0001, and the batch size is 32.
[0081] Step 4: Use the trained LSTM deep learning model to predict the power generation output residual. The performance of the power generation output residual simulation is evaluated by the systematic bias BIAS and the correlation coefficient R. The calculation formulas are as follows:
[0082]
[0083] where, X s1 is the simulated value of the power generation output residual, X o1 is the measured value of the power generation output residual, and are the means of the simulated value and the measured value of the power generation output residual respectively, and n is the number of time series of the measured value.
[0084] The measured value is the residual term decomposed by the BFAST method, and the simulated value is the residual term simulated by the LSTM.
[0085] The simulation results during the calibration period are as shown in Figure 3 a. It shows that the overall agreement between the measured residual and the simulated residual is good, but there are deviations at some peaks and troughs, which may be due to the limited ability of the model to capture extreme values. The scatter plot of the measured residual and the simulated residual during the calibration period is as shown in Figure 3 b. It shows that the correlation coefficient between the measured value and the simulated value is 0.87, and the fitting effect is good, but the bias value is -47.35, indicating that there is a certain underestimation phenomenon in the model. The simulation results during the verification period are as shown in Figure 3 c. It shows that the model can capture the overall trend of the residual, but the simulation of some larger wave peaks is not accurate enough. The scatter plot of the measured residual and the simulated residual during the verification period is as shown in Figure 3 d. It shows that the bias during the verification period is reduced to -26.97, and the correlation coefficient remains 0.87, indicating that the model performance has been improved.
[0086] The power generation output residual mainly reflects the random noise generated in the short term due to factors such as water level fluctuations, inflow changes, or artificial interventions. The LSTM deep learning model has a powerful ability to process time series information and can effectively identify complex time-dependent patterns in the output error. As a key input variable, the inflow can reflect the dynamic evolution of the basin climate and hydrological conditions and directly affect the short-term fluctuations of power generation output. The reservoir water level not only reflects the water storage state of the reservoir but is also closely related to the operation rules, reflecting the regulation ability and water resource utilization efficiency of the reservoir at different operation stages. At the same time, it reflects the periodic and trend change characteristics of the reservoir operation. By taking the periodic terms, trend terms, and noise terms (i.e., residual terms) of the inflow and reservoir water level as inputs together, the LSTM deep learning model can fully capture the long-term and short-term dependence relationships of these time series data, thereby deeply mining the non-linear associations and time series characteristics between the output residual and the input variables.
[0087] Step 5: Based on the hydropower conversion formula, convert the predicted total power generation output of the reservoir into the power generation flow rate Q:
[0088]
[0089] where P is the power generation output power, i.e., the aforementioned total power generation output; η is the efficiency of the generator, ρ is the density of water, g is the acceleration due to gravity, and H is the head, which refers to the difference between the upstream water level and the downstream water level of the reservoir;
[0090] The performance of the power generation flow rate simulation is evaluated by the efficiency coefficient (NSE) and the relative error (RE), and the calculation formulas are:
[0091]
[0092] where X s2 is the simulated value of the power generation flow rate, X o2 is the measured value of the power generation flow rate, and are the means of the simulated value and the measured value of the power generation flow rate respectively, and n is the number of time series of the measured values.
[0093] The simulation results of the power generation flow rate are as Figure 4As shown, during the calibration period and the verification period, the simulation effect of this method is relatively good. Although there are large fluctuations in the generated power flow during the day, the deep learning model can accurately capture the output residuals, reflecting the fluctuations under the day-time regulation. By adding the simulated residual terms to the periodic terms and trend terms, the generated power output results closer to the measured values are finally obtained. This method achieved high NSE (Nash-Sutcliffe efficiency coefficient) and RE (relative error) during the calibration period, specifically: NSE was 0.91 and RE was -0.05; while during the verification period, although the model performance decreased slightly, with NSE being 0.80 and RE being -0.03, it still showed an ideal simulation effect.
[0094] The above results indicate that the method proposed by the present invention can effectively decompose and extract the periodic fluctuations, trend evolutions and residual characteristics of the reservoir generated power flow, and make full use of the deep learning model to explore the non-linear dynamic relationship between the generated power output residuals and key influencing factors such as reservoir water level and inflow. Based on the generated power output sequence data simulated by the method of the present invention, the reconstructed generated power output sequence not only better reproduces the fluctuation characteristics and phased change trends under the day-time reservoir operation, but also significantly improves the simulation and prediction accuracy of the generated power output under complex operation conditions. This method makes full use of the advantages of multiple decompositions and deep learning models.
[0095] The above are only the preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions falling within the concept of the present invention belong to the protection scope of the present invention. It should be noted that for those of ordinary skill in the art in this technical field, several improvements and refinements made without departing from the principle of the present invention should be regarded as within the protection scope of the present invention.
Claims
1. A method for calculating the reservoir power generation flow rate based on the coupling of physical methods and deep learning, characterized in that, Including: Step 1: Collect the historical operation characteristic data of the reservoir, including the reservoir water level, inflow, power generation output, and power generation flow rate, and perform data cleaning, outlier removal, and missing data filling. Step 2: Use the BFAST method to decompose the reservoir water level, inflow, and power generation output data respectively, and obtain the periodic term, trend term, and residual term data of the reservoir water level, inflow, and power generation output respectively. Step 3: Take the periodic term, trend term, and residual term of the reservoir water level and inflow as input variables, and the residual term of the power generation output as the target variable, construct and train a deep learning model to enable the model to learn the temporal relationship between the power generation output residual and the input variables. Step 4: Use the trained deep learning model to predict the power generation output residual, and add the predicted residual term to the periodic term and trend term of the corresponding period to obtain the total power generation output of the reservoir. Step 5: Based on the water energy power generation conversion formula, convert the total power generation output of the reservoir into the power generation flow rate.
2. The method for calculating the reservoir power generation flow rate based on the coupling of physical methods and deep learning according to claim 1, characterized in that, The historical operation characteristic data of the reservoir collected in Step 1 are daily-scale data.
3. The reservoir power generation flow calculation method based on the coupling of physical methods and deep learning according to claim 1, characterized in that The deep learning model described in Step 3 is an LSTM model.
4. The reservoir power generation flow calculation method based on the coupling of physical methods and deep learning according to claim 1, wherein The performance of the power generation output residual simulation in Step 4 is evaluated by the systematic bias BIAS and the correlation coefficient R, and the calculation formulas are as follows: Among them, X s1 is the simulated value of the power generation output residual, and X o1 is the measured value of the power generation output residual. and are the means of the simulated value and the measured value of the power generation output residual respectively, and n is the number of time series of the measured values.
5. The reservoir power generation flow calculation method based on the coupling of physical methods and deep learning according to claim 1, wherein, The performance of the power generation flow rate simulation in Step 5 is evaluated by the efficiency coefficient NSE and the relative error RE, and the calculation formulas are as follows: Among them, X s2 is the simulated value of power generation flow rate, and X o2 is the measured value of power generation flow rate. and are the mean values of the simulated and measured power generation flow rates respectively, and n is the number of time series of measured values.
Citation Information
Patent Citations
QLSTM-based short-term photovoltaic power generation power prediction method and device
CN118568572A
Distributed photovoltaic output power estimation method
CN119401450A