Reservoir rain accepting capability analysis method based on LSTM (Long Short Term Memory) model

Through the reservoir rain absorption capacity analysis method based on the LSTM model, the problems of large calculation errors, high modeling costs and slow calculation speed in the existing technology are solved, and more accurate and fast reservoir rain absorption forecast is achieved.

CN119830020AInactive Publication Date: 2025-04-15WENZHOU WATER RESOURCES & ELECTRIC POWER SURVEY & DESIGN INST CO LTD +1

Patent Information

Application Number
CN202510325181.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-19
Publication Date
2025-04-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When calculating the amount of rainfall that can be accommodated in the prior art, there are problems such as large calculation error, high modeling cost and slow calculation speed, especially when considering future rainfall distribution, drainage process and early rainfall impacts.

Method used

The reservoir rain absorption capacity analysis method based on the LSTM model is adopted, and the reservoir rainfall historical data is obtained and the characteristic matrix is ​​constructed by obtaining rainfall historical data and reservoir history monitoring data, and the LSTM model is trained to match the data scale in the reservoir rainfall situation, and the water balance calculation is carried out based on future rainfall, rain type and drainage flow, and the dichotomy method is used to test the reservoir's accommodated rainfall.

Benefits of technology

It reduces calculation errors, reduces modeling costs, improves calculation speed, and can more accurately consider future rainfall and reservoir operation status, providing a fast and accurate reservoir rainfall forecasting plan.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119830020A_ABST
    Figure CN119830020A_ABST
Patent Text Reader

Abstract

The invention relates to an LSTM (Long Short Term Memory) model-based reservoir rain receiving capacity analysis method, which comprises the following steps of: acquiring rainfall historical data and reservoir historical monitoring data, constructing an input characteristic matrix of an LSTM model, matching a data scale under a reservoir rain receiving situation, adjusting parameter quantity of the LSTM model, optimizing an adjustment strategy and an Early Stopping early stop strategy based on an AdamW optimizer, a CosineAnnealingLR learning rate, and analyzing the rain receiving capacity of a reservoir. Training an LSTM (Long Short Term Memory) model by using the input feature matrix to obtain optimal parameters of the model, finally, setting future rainfall, a rainfall pattern, a discharged flow and a target water level based on the trained LSTM model to carry out water balance calculation, trying to calculate the receivable rainfall by using a bisection method, and completing the rain receiving capability analysis of the reservoir. Factors such as future rainfall, drainage control and early-stage rainfall influence are fully considered, accurate and effective reservoir receivable rainfall is obtained, and a set of rapid and accurate reservoir rain receiving forecasting scheme is formed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of reservoir water level warning, and in particular relates to a reservoir rainfall receiving capacity analysis method based on an LSTM model. Background Art

[0002] Reservoirs are one of the most important water conservancy projects for flood prevention in river basins. However, due to the high intensity of rainstorms in mountainous areas, the convergence speed of small and medium-sized reservoirs is fast, the flood control storage capacity is small, the response time is short, and the flood control dispatching pressure is high. How to calculate the accurate rainfall that can be accommodated by the reservoir within a limited forecast period, compare it with the meteorological short-term forecast rainfall, and carry out reservoir pre-discharge and pre-discharge work has very good practical significance. At present, the runoff coefficient estimation method is generally used during flood prevention. The difference between the reservoir capacity and the target capacity is calculated, and then the rainfall value is calculated using the runoff coefficient.

[0003] According to the research results of existing scholars on the rain-receiving capacity of small and medium-sized reservoirs, a rapid estimation method for the maximum rain-receiving capacity of small and medium-sized reservoirs under the two conditions of no discharge and full discharge of discharge facilities is proposed; the maximum rain-receiving capacity that the reservoir can bear is deduced by using the inflow and outflow process under the rainfall scenario; the maximum rain-receiving capacity of the reservoir is calculated by establishing a correlation between soil moisture content and runoff coefficient; the rainstorm resistance capacity is analyzed based on different preset conditions, and the free storage capacity of the reservoir is converted into the maximum rainfall that can be accommodated under the current water level of the reservoir; the rainstorm resistance capacity of the reservoir under the saturated and semi-saturated state of the basin is analyzed by assuming the design of rainstorm and reversely calculating the inflow flood. However, this type of method requires a large amount of analysis of the rainfall runoff of each research object and the construction of a correlation, and the factors such as the rain type distribution, discharge process, and the influence of previous rainfall in the future rainfall are not considered in the initial calculation process. Different rain types represent the changes in rainfall at different times during the rainfall process, and there are large differences in the impact on the reservoir discharge and the remaining rain-receiving capacity. The results are often too large during the rainfall process, resulting in large errors in the calculation results, which is not conducive to flood prevention work. For large reservoirs, a reservoir flood forecasting and dispatching system is generally built. Relying on flood forecasting models and reservoir dispatching models, the acceptable rainfall is calculated through trial calculations. This type of method has the problems of high modeling cost, large calculation amount and slow calculation speed.

[0004] Therefore, designing a reservoir rainfall capacity analysis method based on the LSTM model that can combine rainfall pattern distribution to reduce calculation errors, reduce modeling costs and improve calculation speed has become a technical problem that needs to be solved urgently. Summary of the invention

[0005] In order to solve the above problems, the present invention provides a reservoir rainfall capacity analysis method based on LSTM model.

[0006] The technical solution of the present invention is a reservoir rainfall capacity analysis method based on the LSTM model, comprising the following analysis steps: Step 1, obtain historical rainfall data and historical reservoir monitoring data, and normalize the data; Step 2: Use the data processed in step 1 to construct the input feature matrix of the model; Step 3: construct an LSTM model to match the data scale under the reservoir rainfall scenario and adjust the parameters of the LSTM model; Step 4: Based on the AdamW optimizer, the CosineAnnealingLR learning rate optimization adjustment strategy and the EarlyStopping early stopping strategy, the LSTM model constructed in step 3 is trained using the input feature matrix to obtain the optimal model parameters; Step 5, based on the trained LSTM model, set the future rainfall, rain type, discharge flow and target water level to perform water balance calculation, use the dichotomy method to calculate the reservoir's accommodating rainfall, and complete the reservoir's rain receiving capacity analysis; the rain type is obtained by classifying historical rainfall data and integrating rainfall data of the same type.

[0007] As a further improvement of the present invention, the step 1 collects historical rainfall data at intervals of 5 minutes, and then collects historical reservoir monitoring data at the same time point based on the time point of the historical rainfall data, and finally eliminates the data with missing items. The acquired data content includes rainfall, water level, water level storage capacity curve, reservoir inflow, reservoir outflow and catchment area; the normalization processing adopts maximum and minimum value normalization.

[0008] As a further improvement of the present invention, the step 2 constructs an input feature matrix in units of 1 hour, uses a sliding window method, sets the length to 12, extracts data for 12 consecutive unit times as input features, and the matrix expression is: input feature variable , output feature variables , where a, b, and c represent the features of 12 consecutive time units for constructing the input features, namely rainfall, water level, and inflow; the output feature variable Y represents the inflow after 12 consecutive time units; 80% of the data after constructing the matrix is ​​used as the training set for training the LSTM model, and 20% is used as the validation set for validating the model.

[0009] As a further improvement of the present invention, the constructed LSTM model includes 3 LSTM layers, a Flatten layer, two Dropout layers and two fully connected linear layers. By matching the data scale under the reservoir rainfall scenario, the number of input features of the first LSTM layer is set to 4, the output feature dimension is set to 128, and the number of LSTM layers is set to 3; the dropout rate of the first Dropout layer is set to 0.5, the number of input features of the first linear connection layer is set to 1536 and the number of output features is set to 2048, and the activation function is set to LeakyReLU, the dropout rate of the second Dropout layer is set to 0.5, the number of input features of the second linear connection layer is set to 2048 and the number of output features is set to 12, and the activation function is set to Sigmoid.

[0010] As a further improvement of the present invention, the training LSTM model includes the following steps: s1, set the total number of epochs for training to 100; s2, set the learning rate of the AdmaW optimizer to 0.0001; set the warm-up step of the CosineAnnealingLR learning rate optimization adjustment strategy to 5 generations; set the monitoring index of the EarlyStopping early stopping strategy, the validation set error and the monitoring step to 10; s3, use the MSE function as the error function of the LSTM model, and minimize the MSE according to the parameter combination adjusted in step 3; s4, input the feature vector obtained from the input feature matrix into the LSTM model for training, calculate the error size based on MSE, and use the AdamW optimizer to update the model parameters based on the error, while triggering CosineAnnealingLR and EarlyStopping for update; s5: Repeat s4 until the set Epoch is reached, or the EarlyStopping condition is triggered to stop model training early and output the global optimal parameters.

[0011] As a further improvement of the present invention, the rain-holding capacity analysis obtains 12 rainfall, water level and inflow data at intervals of 5 minutes before the current time, inputs the data into the trained LSTM model, and predicts the 12 inflows at intervals of 5 minutes in the future. The water balance calculation is performed in combination with the future rainfall, rain type and downstream flow. On the premise of not exceeding the target water level, the reservoir's accommodative rainfall capacity is repeatedly calculated using the dichotomy method, and the maximum value obtained is used as the calculation result of the accommodative rainfall capacity.

[0012] As a further improvement of the present invention, the expression for water balance calculation is: ,in, and represents the reservoir capacity at time t and t-1, and represents the reservoir inflow at time t and t-1, and It represents the reservoir discharge at time t and t-1; the rain receiving capacity analysis includes using the dichotomy method to calculate the amount of rainfall that the reservoir can accommodate, arranging the amount of rainfall that can be accommodated to form a water level storage capacity curve that changes in chronological order, and then using the water level storage capacity curve to deduce the reservoir water level at the corresponding time.

[0013] After adopting the above method, by collecting historical rainfall data and historical reservoir monitoring data, and processing them by maximum and minimum value normalization, the influence of the absolute value of the data on the model training is removed, and the accuracy of the model training is improved; the three features of rainfall, water level, and inflow extracted from the historical rainfall data and the historical reservoir monitoring data are used to build the LSTM model. By adjusting the parameters of the LSTM model, the MSE value of the error function is minimized, the error in the training process is reduced, the modeling cost is reduced, and the error of the calculation results is reduced; and the rain receiving capacity of the reservoir is analyzed. When the LSTM model is used, 12 rainfall, water level and inflow data at 5-minute intervals before the current time are used as the basis for LSTM model prediction. The reservoir's accommodating rainfall under the influence of different previous rainfalls is updated in real time. The water balance calculation is performed by combining future rainfall, rain type and discharge flow. The future rainfall, discharge control, and the impact of previous rainfall are fully considered to obtain accurate and effective reservoir accommodating rainfall, avoid excessive rainfall at a certain moment during the rainfall process, and exceed the reservoir's accommodating rainfall at that time, thus forming a set of fast and accurate reservoir rainfall forecasting schemes. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 Shown is a schematic diagram of the model construction and reservoir rainfall capacity analysis process of the present invention. DETAILED DESCRIPTION

[0015] A reservoir rainfall capacity analysis method based on LSTM model includes the following analysis steps: Step 1, obtain historical rainfall data and historical reservoir monitoring data, and normalize the data; Step 2: Use the data processed in step 1 to construct the input feature matrix of the model; Step 3: construct an LSTM model to match the data scale under the reservoir rainfall scenario and adjust the parameters of the LSTM model; Step 4: Based on the AdamW optimizer, the CosineAnnealingLR learning rate optimization adjustment strategy and the EarlyStopping early stopping strategy, the LSTM model constructed in step 3 is trained using the input feature matrix to obtain the optimal model parameters; Step 5, based on the trained LSTM model, set the future rainfall, rain type, discharge flow and target water level to perform water balance calculation, use the dichotomy method to calculate the reservoir's accommodating rainfall, and complete the reservoir's rain receiving capacity analysis; the rain type is obtained by classifying historical rainfall data and integrating rainfall data of the same type.

[0016] The step 1 collects historical rainfall data at intervals of 5 minutes, and then collects historical reservoir monitoring data at the same time point based on the time point of the historical rainfall data. Finally, the data with missing items are eliminated. The acquired data content includes rainfall, water level, water level storage capacity curve, reservoir inflow, reservoir outflow and catchment area; the normalization processing adopts maximum and minimum value normalization.

[0017] In step 2, the input feature matrix is ​​constructed in units of 1 hour, and the sliding window method is used. The length is set to 12, and the data of 12 consecutive unit times are extracted as input features. The matrix expression is: , output feature variables , where a, b, and c represent the features of 12 consecutive time units for constructing the input features, namely rainfall, water level, and inflow; the output feature variable Y represents the inflow after 12 consecutive time units; 80% of the data after constructing the matrix is ​​used as the training set for training the LSTM model, and 20% is used as the validation set for validating the model.

[0018] The constructed LSTM model includes three LSTM layers, one Flatten layer, two Dropout layers and two fully connected linear layers. By matching the data scale under the reservoir rainfall scenario, the number of input features of the first LSTM layer is set to 4, the output feature dimension is set to 128, and the number of LSTM layers is set to 3; the dropout rate of the first Dropout layer is set to 0.5, the number of input features of the first linear connection layer is set to 1536 and the number of output features is set to 2048, and the activation function is set to LeakyReLU, the dropout rate of the second Dropout layer is set to 0.5, the number of input features of the second linear connection layer is set to 2048 and the number of output features is set to 12, and the activation function is set to Sigmoid.

[0019] The training LSTM model includes the following steps: s1, set the total number of epochs for training to 100; s2, set the learning rate of the AdmaW optimizer to 0.0001; set the warm-up step of the CosineAnnealingLR learning rate optimization adjustment strategy to 5 generations; set the monitoring index of the EarlyStopping early stopping strategy, the validation set error and the monitoring step to 10; s3, use the MSE function as the error function of the LSTM model, and minimize the MSE according to the parameter combination adjusted in step 3; s4, input the feature vector obtained from the input feature matrix into the LSTM model for training, calculate the error size based on MSE, and use the AdamW optimizer to update the model parameters based on the error, while triggering CosineAnnealingLR and EarlyStopping for update; s5: Repeat s4 until the set Epoch is reached, or the EarlyStopping condition is triggered to stop model training early and output the global optimal parameters.

[0020] The rain-holding capacity analysis obtains 12 rainfall, water level, and inflow data at intervals of 5 minutes before the current time, inputs the data into the trained LSTM model, and predicts the 12 inflows at intervals of 5 minutes in the future. The water balance is calculated based on the future rainfall, rain type, and outflow. Under the premise of not exceeding the target water level, the reservoir's accommodating rainfall capacity is repeatedly calculated using the dichotomy method, and the maximum value obtained is used as the calculation result of the accommodating rainfall capacity.

[0021] The expression for the water balance calculation is: ,in, and represents the reservoir capacity at time t and t-1, and represents the reservoir inflow at time t and t-1, and It represents the reservoir discharge at time t and t-1; the rain receiving capacity analysis includes using the dichotomy method to calculate the amount of rainfall that the reservoir can accommodate, arranging the amount of rainfall that can be accommodated to form a water level storage capacity curve that changes in chronological order, and then using the water level storage capacity curve to deduce the reservoir water level at the corresponding time.

[0022] By collecting historical rainfall data and historical reservoir monitoring data, and processing them with maximum and minimum normalization, the influence of the absolute value of the data on model training is removed, and the accuracy of model training is improved; the three features of rainfall, water level, and inflow extracted from the historical rainfall data and the historical reservoir monitoring data are used to build the LSTM model. By adjusting the parameter quantity of the LSTM model, the error function MSE value is minimized, the error in the training process is reduced, the modeling cost is reduced, and the error of the calculation results is reduced; and when analyzing the rain receiving capacity of the reservoir, 12 rainfall, water level, and inflow data at intervals of 5 minutes before the current time are used as the basis for LSTM model prediction, and the reservoir's accommodating rainfall under the influence of different previous rainfalls is updated in real time. By combining future rainfall, rain type, and discharge flow to perform water balance calculations, the future rainfall, discharge control, and previous rainfall influence are fully considered to obtain accurate and effective reservoir accommodating rainfall, avoid excessive rainfall at a certain moment during the rainfall process, and exceed the reservoir's accommodating rainfall at that time, and form a set of fast and accurate reservoir rainfall forecasting solutions.

Claims

1. A reservoir rainfall capacity analysis method based on LSTM model, characterized by: The analysis steps include: Step 1, obtain historical rainfall data and historical reservoir monitoring data, and normalize the data; Step 2: Use the data processed in step 1 to construct the input feature matrix of the model; Step 3: construct an LSTM model to match the data scale under the reservoir rainfall scenario and adjust the parameters of the LSTM model; Step 4: Based on the AdamW optimizer, the CosineAnnealingLR learning rate optimization adjustment strategy and the EarlyStopping early stopping strategy, the LSTM model constructed in step 3 is trained using the input feature matrix to obtain the optimal model parameters; Step 5, based on the trained LSTM model, set the future rainfall, rain type, discharge flow and target water level to perform water balance calculation, use the dichotomy method to calculate the reservoir's accommodating rainfall, and complete the reservoir's rain receiving capacity analysis; the rain type is obtained by classifying historical rainfall data and integrating rainfall data of the same type.

2. According to the method for analyzing the rain-receiving capacity of a reservoir based on the LSTM model in claim 1, it is characterized by: The step 1 collects historical rainfall data at intervals of 5 minutes, and then collects historical reservoir monitoring data at the same time point based on the time point of the historical rainfall data. Finally, the data with missing items are eliminated. The acquired data content includes rainfall, water level, water level storage capacity curve, reservoir inflow, reservoir outflow and catchment area; the normalization processing adopts maximum and minimum value normalization.

3. According to the method for analyzing the rain-receiving capacity of a reservoir based on the LSTM model in claim 1, it is characterized by: In step 2, the input feature matrix is ​​constructed in units of 1 hour, and the sliding window method is used. The length is set to 12, and the data of 12 consecutive unit times are extracted as input features. The matrix expression is: , output feature variables , where a, b, and c represent the features of 12 consecutive time units for constructing the input features, namely rainfall, water level, and inflow; the output feature variable Y represents the inflow after 12 consecutive time units; 80% of the data after constructing the matrix is ​​used as the training set for training the LSTM model, and 20% is used as the validation set for validating the model.

4. The method for analyzing the rain-receiving capacity of a reservoir based on an LSTM model according to claim 1, characterized in that: The constructed LSTM model includes three LSTM layers, one Flatten layer, two Dropout layers and two fully connected linear layers. By matching the data scale under the reservoir rainfall scenario, the number of input features of the first LSTM layer is set to 4, the output feature dimension is set to 128, and the number of LSTM layers is set to 3; the dropout rate of the first Dropout layer is set to 0.5, the number of input features of the first linear connection layer is set to 1536 and the number of output features is set to 2048, and the activation function is set to LeakyReLU, the dropout rate of the second Dropout layer is set to 0.5, the number of input features of the second linear connection layer is set to 2048 and the number of output features is set to 12, and the activation function is set to Sigmoid.

5. The method for analyzing the rain-receiving capacity of a reservoir based on an LSTM model according to claim 4, characterized in that: The training LSTM model includes the following steps: s1, set the total number of epochs for training to 100; s2, set the learning rate of the AdmaW optimizer to 0.0001; set the warm-up step of the CosineAnnealingLR learning rate optimization adjustment strategy to 5 generations; set the monitoring index of the EarlyStopping early stopping strategy, the validation set error and the monitoring step to 10; s3, use the MSE function as the error function of the LSTM model, and minimize the MSE according to the parameter combination adjusted in step 3; s4, input the feature vector obtained from the input feature matrix into the LSTM model for training, calculate the error size based on MSE, and use the AdamW optimizer to update the model parameters based on the error, while triggering CosineAnnealingLR and EarlyStopping for update; s5: Repeat s4 until the set Epoch is reached, or the EarlyStopping condition is triggered to stop model training early and output the global optimal parameters.

6. The method for analyzing the rain-receiving capacity of a reservoir based on an LSTM model according to claim 4, characterized in that: The rain-holding capacity analysis obtains 12 rainfall, water level, and inflow data at intervals of 5 minutes before the current time, inputs the data into the trained LSTM model, and predicts the 12 inflows at intervals of 5 minutes in the future. The water balance is calculated based on the future rainfall, rain type, and outflow. Under the premise of not exceeding the target water level, the reservoir's accommodating rainfall capacity is repeatedly calculated using the dichotomy method, and the maximum value obtained is used as the calculation result of the accommodating rainfall capacity.

7. A reservoir rainfall capacity analysis method based on LSTM model according to claim 1 or 6, characterized in that: The expression for the water balance calculation is: ,in, and represents the reservoir capacity at time t and t-1, and represents the reservoir inflow at time t and t-1, and It represents the reservoir discharge at time t and t-1; the rain receiving capacity analysis includes using the dichotomy method to calculate the amount of rainfall that the reservoir can accommodate, arranging the amount of rainfall that can be accommodated to form a water level storage capacity curve that changes in chronological order, and then using the water level storage capacity curve to deduce the reservoir water level at the corresponding time.

Citation Information

Patent Citations

  • Method for predicting rain accommodation capability

    CN109696715A

  • Flood season reservoir inflow prediction method based on stacked long and short memory network

    CN114611777A

  • CNN-LSTM convolutional recurrent neural network hydrological forecast correction method based on grid rainfall information

    CN115511206A

  • Basin flood prediction method based on artificial intelligence hydrological model

    CN116989749A

Cited By

  • Method and system for evaluating rain receiving capacity of small reservoir

    CN120409929A

  • Warehouse-out flow prediction method based on Stacking framework

    CN121146176A