A runoff forecasting method based on SWAT and LSTM
By combining the SWAT hydrological model and the LSTM model, replacing some sub-basin models, and using CNN-LSTM to predict residuals, the problem of parameter and structural uncertainty in the existing runoff forecasting method is solved, and efficient and high-precision runoff forecasting is achieved. .
Patent Information
- Application Number
- CN202311073409.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-24
- Publication Date
- 2025-02-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing runoff forecasting methods are limited by model parameter uncertainty and structural uncertainty, making it difficult to achieve efficient and high-precision prediction.
The runoff forecasting method based on SWAT and LSTM is adopted. The LSTM model is trained by using the input data of the SWAT hydrological model and historical runoff data, and some sub-basin models in the SWAT model are replaced, and the residuals are predicted by the CNN-LSTM model to correct the runoff forecasting results.
It improves the accuracy and efficiency of runoff forecasting and can more accurately predict future runoff data.
Smart Images

Figure CN118191976B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to hydrological forecasting technology, and in particular to a runoff forecasting method based on SWAT and LSTM. Background Art
[0002] At present, the mechanism model, as an important means of runoff forecasting, is limited by the uncertainty of model parameters and model structure. Based on the distribution characteristics of model errors and observation data errors, the data assimilation technology that integrates new observation data to update the model state during the dynamic operation of the numerical model can reduce the parameter uncertainty of the mechanism model. The parameters of the hydrological model can be estimated by using the ensemble Kalman filter assimilation algorithm to jointly assimilate multiple observation data, such as runoff and actual evapotranspiration. The "state-parameter" simultaneous estimation data assimilation method can not only update the state variables of the model, but also update the parameters of the model. Remote sensing observation technology provides a large amount of observation data for hydrological data assimilation research, such as precipitation observation data GPM (Global Precipitation Measurement) and soil moisture observation data SMAP (Soil Moisture Active Passive). The recently launched Surface Water and Ocean Topography (SWOT) satellite provides river surface height, width and slope observation information, which will greatly expand the application of runoff data assimilation.
[0003] SWAT (Soil and Water Assessment Tool) was developed by Dr. Jeff Arnold of the Agricultural Research Center of the United States Department of Agriculture (USDA) in 1994. The original purpose of the model development was to predict the long-term impact of land management on water, sediment and chemicals under the complex and changing soil types, land use patterns and management measures in large watersheds. The SWAT model uses daily continuous calculations and is a semi-distributed watershed hydrological model. It has been rapidly developed and applied in recent years, mainly using spatial information provided by remote sensing and geographic information systems to simulate a variety of different hydrological physical and chemical processes.
[0004] Using deep learning algorithms to assimilate additional observational data will become a new means of runoff data assimilation. Traditional runoff data assimilation methods lack the recognition of deeper associations between data, while spatiotemporal deep learning algorithms can well capture the physical spatial and temporal dependencies between model states and observational data, and can replace traditional data assimilation methods to directly assimilate precipitation and runoff observational data to update runoff forecast results. For example, additional observational data such as runoff and precipitation can improve the accuracy of runoff simulation; the addition of residual information can further improve runoff forecasts. Deep learning algorithms that jointly learn spatial and temporal features are suitable for the study of runoff data assimilation in watersheds. For example, the graph neural network algorithm that jointly learns spatiotemporal features performs better than single deep learning algorithms such as LSTM in runoff forecasting. In terms of spatiotemporal observations, wireless sensor network data provides observational data with high spatiotemporal resolution. In terms of spatiotemporal feature learning, the spatial topological relationship of wireless sensor network data can be associated and learned through graph neural networks, while traditional deep learning methods lack the learning of spatial topological relationships. Deep learning algorithms that take into account the spatial topological relationship and time series relationship of various hydrological variables in the basin, such as convolutional neural network-long short-term memory (CNN-LSTM), will further demonstrate their application potential in the field of runoff forecasting. Summary of the invention
[0005] The main purpose of the present invention is to provide a runoff forecasting method based on SWAT and LSTM to improve the existing runoff forecasting method and achieve efficient and high-precision runoff prediction.
[0006] The technical solution adopted by the present invention is: a runoff forecasting method based on SWAT and LSTM, comprising:
[0007] S1, train the LSTM model using the input data of the SWAT hydrological model and historical runoff data;
[0008] S2, using the trained LSTM model to replace some sub-basin models in the SWAT hydrological model to obtain the SWAT-LSTM model;
[0009] S3, using future meteorological data to drive the SWAT-LSTM model to simulate historical runoff;
[0010] S4, using the observed historical runoff data and the historical runoff data simulated by SWAT-LSTM to calculate the residual of the runoff simulation;
[0011] S5, train the CNN-LSTM model using meteorological data and simulated residual data;
[0012] S6, predicting future runoff using SWAT-LSTM, and then adding the residuals predicted by the CNN-LSTM model to obtain the corrected runoff.
[0013] Furthermore, the step S1 comprises:
[0014] The LSTM model was trained using SWAT input data and historical runoff data. The number of LSTM neurons was set to 50, the epochs was 120, the learning rate was 0.001, and the batch size was 320. The parameters of the LSTM model were the optimal solution selected based on multiple test results, and the Adam method was selected as the parameter optimization solution.
[0015] Furthermore, the step S2 comprises:
[0016] Identify sub-basin models with poor runoff prediction in the SWAT model;
[0017] If the runoff forecast result predicted by the LSTM model is more accurate than that of the SWAT sub-basin model, the LSTM model is used to replace the SWAT sub-basin model. The calculation formulas of the evaluation criteria PBIAS, RMSE, and NSE are as follows:
[0018] ;
[0019] ;
[0020] ;
[0021] Where Q sim is the result predicted by the model; Q obs is the observed value; N is the total number of samples.
[0022] Furthermore, the step S5 comprises:
[0023] The CNN-LSTM model was trained using precipitation, temperature and the simulated residual data in step S4; in the CNN-LSTM, CNN was set to 1D, kernel size was 2, the number of neurons of LSTM was set to 50, the epoch was 120, the learning rate was 0.001, and the batch size was 320. The parameters of the LSTM model were the optimal solution selected based on multiple test results, and the Adam method was selected as the parameter optimization solution.
[0024] Advantages of the present invention:
[0025] Compared with the prior art, the method of the present invention can obtain a runoff forecast result with higher accuracy.
[0026] In addition to the above-described purposes, features and advantages, the present invention has other purposes, features and advantages. The present invention will be further described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The drawings constituting a part of this application are used to provide a further understanding of the present invention. The illustrative embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0028] Figure 1 It is a schematic diagram of the runoff forecasting method based on SWAT and LSTM of the present invention;
[0029] Figure 2 It is a schematic diagram of the LSTM model of the present invention;
[0030] Figure 3 It is a schematic diagram of the SWAT-LSTM model of the present invention;
[0031] Figure 4 It is a schematic diagram of the CNN-LSTM model of the present invention;
[0032] Figure 5 It is a runoff forecast result diagram of the SWAT model of the present invention;
[0033] Figure 6 It is a runoff forecast result diagram of the SWAT-LSTM model of the present invention. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0035] The present invention takes the runoff forecast of the upper reaches of the Heihe River as an implementation case.
[0036] SWAT model introduction:
[0037] SWAT is a popular semi-distributed hydrological model. It provides a detailed representation of the physical processes associated with the movement of water and nutrients, including infiltration, evapotranspiration, runoff, nutrient cycling, and pollution transport. The input parameters required for the simulation of hydrological processes in the model come from soil, land cover, and topographic features. It can simulate hydrological processes at multiple spatial and temporal scales, from minutes to years, from small streams to large watersheds. The watershed is divided into several sub-basins based on the SWAT division, and each sub-basin consists of hydrological response units. SWAT combines uniform soil properties, land use types, and topological properties (slope) to represent a single HRU, providing the basic parameters required for vertical hydrological simulation based on Darcy's equation and routing simulation based on Muskingum method or variable storage coefficient method. The input data of SWAT can be divided into three spatial levels: watershed, sub-basin, and HRU. The core water balance simulation of the model is based on HRUs (e.g., evaporation, runoff, infiltration, irrigation, snowmelt, and groundwater systems). The finest spatial dynamic simulation unit is the HRU. In most cases, HRUs with unique soil types, land use types, and slopes usually occupy several discrete grids, and water balances are simulated simultaneously within the same sub-basin without interaction. Data at the sub-basin level are aggregated from data at the HRU level. After completing the sub-basin simulation, the model directs water and other features from upstream to downstream, that is, from the entire basin through the river network to the outlet. Forcing data, including precipitation, air temperature, wind speed, solar radiation, and relative humidity, can be measured or simulated by the model based on monthly meteorological data, including maximum and minimum temperatures and dew point temperature. These data and related parameters are stored in text files. High resolution or large-scale projects may result in thousands of input files. It may be challenging for users to reconfigure or update model parameters.
[0038] The water balance simulation formula of the SWAT model is as follows:
[0039]
[0040] where SMt is the soil water content at time t (mm), SM0 is the initial soil water content (mm), R is precipitation, Qsurf is surface runoff, E is evapotranspiration, W is soil infiltration, and Qgw is groundwater.
[0041] LSTM model introduction:
[0042] LSTM (Long Short-Term Memory) is a variant of recurrent neural network (RNN) that is specifically designed to process sequence data. Compared with traditional RNN, LSTM has stronger memory capacity and long-term dependency modeling capabilities.
[0043] The core idea of LSTM is to control the flow and forgetting of information through a gating mechanism. It consists of a cell and three gates: input gate, forget gate, and output gate. Figure 2 shown.
[0044] At each time step, the LSTM unit receives the input data and the hidden state of the previous time step, and decides which information needs to be remembered and which needs to be forgotten based on the importance of the input data. The input gate controls the input of new information, and the forget gate controls the forgetting of old information. The LSTM unit then calculates the new cell state based on the output of these gates. Finally, the output gate calculates the hidden state based on the cell state and the input of the current time step, and outputs it to the next time step or for prediction.
[0045] like Figure 1 As shown, the specific operation steps of the present invention are as follows:
[0046] (1) Using the input data of the SWAT hydrological model and historical runoff data to train the LSTM model;
[0047] (2) Use the trained LSTM model to replace some sub-basin models in the SWAT hydrological model to obtain the SWAT-LSTM model;
[0048] (3) Using future meteorological data to drive the SWAT-LSTM model to simulate historical runoff;
[0049] (4) Calculate the residual of runoff simulation using the observed historical runoff data and the historical runoff data simulated by SWAT-LSTM;
[0050] (5) Use meteorological data and simulated residual data to train the CNN-LSTM model;
[0051] (6) Use SWAT-LSTM to predict future runoff, and then add the residual predicted by the CNN-LSTM model to obtain the corrected runoff.
[0052] Preferably, step (1) comprises:
[0053] The LSTM model was trained by SWAT input data (precipitation, temperature) and historical runoff data. The number of LSTM neurons was set to 50, the epochs was 120, the learning rate was 0.001, and the batch size was 320. The parameters of the LSTM model were selected based on the optimal solution selected according to multiple test results, and the Adam method was selected as the parameter optimization solution.
[0054] Preferably, if Figure 3As shown, step (2) includes:
[0055] (2.1) Identify the sub-basin models with poor runoff prediction in the SWAT model;
[0056] (2.2) If the runoff forecast result predicted by the LSTM model is more accurate than that of the SWAT sub-basin model, the LSTM model is used to replace the SWAT sub-basin model. The calculation formulas of the evaluation criteria PBIAS, RMSE, and NSE are as follows:
[0057] ;
[0058] ;
[0059] ;
[0060] Where Q sim is the result predicted by the model; Q obs is the observed value; N is the total number of samples.
[0061] Preferably, step (5) comprises:
[0062] (5.1) Use precipitation, temperature and residual data simulated in step (4) to train the CNN-LSTM model, as Figure 4 As shown in the figure, in CNN-LSTM, CNN is set to 1D, kernel size is 2, the number of neurons of LSTM is set to 50, the epoch is 120, the learning rate is 0.001, the batch size is 320, and the parameters of the LSTM model are the optimal solution selected based on multiple test results. The Adam method is selected as the parameter optimization solution.
[0063] Taking the Yingluoxia Basin in the upper reaches of the Heihe River as an example, we first use meteorological data (temperature, precipitation) to drive the SWAT hydrological model to simulate the basin's historical (2001-2009) runoff. Then, we use meteorological data and simulated (2001-2006) sub-basin runoff data to train LSTM, and use 2007-2009 runoff data to test the LSTM model. Finally, we get the LSTM model for the upper sub-basin of the Heihe River. Then, we evaluate the SWAT sub-basin prediction results and the LSTM prediction results respectively. The best evaluation criteria are selected based on PBIAS, NSE and RMSE. The model is used as a sub-basin model, and finally the SWAT-LSTM Heihe upper reaches runoff forecast model is obtained; then the runoff simulated by the SWAT-LSTM model and the observed runoff are used to calculate the residual of the runoff simulation, and the simulated residual and meteorological data (temperature, precipitation) are used to train and test the CNN-LSTM model to obtain the residual prediction model; finally, the residual predicted by CNN-LSTM and the runoff predicted by SWAT-LSTM are used to calculate the corrected runoff forecast result to obtain the optimized runoff forecast result.
[0064] Results Analysis
[0065] Comparison between SWAT and SWAT-LSTM
[0066] Figure 5 The runoff forecast results of the SWAT model are shown. Figure 6 The runoff forecast results of the SWAT-LSTM model are shown. 2 The evaluation index can determine that the runoff forecast accuracy of SWAT-LSTM is higher than that of SWAT model during the validation period (2006-2009).
[0067] In the embodiment of the present invention, the meteorological input data may be precipitation and temperature, and may also include solar long-wave and short-wave radiation, air pressure and wind speed, etc. The embodiment of the present invention does not limit the uniqueness.
[0068] In the embodiment of the present invention, the parameter optimization settings and parameter optimization methods for constructing LSTM and CNN-LSTM can be optimally selected according to the application object, and the embodiment of the present invention does not make any unique limitation on the specific method.
[0069] The present invention makes full use of the LSTM model and the SWAT hydrological model to improve the runoff forecast accuracy and achieve the purpose of improving the runoff forecast accuracy.
[0070] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A runoff forecasting method based on SWAT and LSTM, characterized in that: include: S1, train the LSTM model using the input data of the SWAT hydrological model and historical runoff data; S2, using the trained LSTM model to replace some sub-basin models in the SWAT hydrological model to obtain the SWAT-LSTM model; S3, using future meteorological data to drive the SWAT-LSTM model to simulate historical runoff; S4, using the observed historical runoff data and the historical runoff data simulated by SWAT-LSTM to calculate the residual of the runoff simulation; S5, train the CNN-LSTM model using meteorological data and simulated residual data; S6, predicting future runoff using SWAT-LSTM, and then adding the residuals predicted by the CNN-LSTM model to obtain the corrected runoff.
2. The runoff forecasting method based on SWAT and LSTM according to claim 1, characterized in that: The step S1 comprises: The LSTM model was trained by SWAT input data and historical runoff data. The number of LSTM neurons was set to 50, the epochs was 120, the learning rate was 0.001, and the batch size was 320. The parameters of the LSTM model were selected based on the optimal solution selected according to multiple test results, and the Adam method was selected as the parameter optimization solution.
3. The runoff forecasting method based on SWAT and LSTM according to claim 1, characterized in that: The step S2 comprises: Identify sub-basin models with poor runoff prediction in the SWAT model; If the runoff forecast result predicted by the LSTM model is more accurate than that of the SWAT sub-basin model, the LSTM model is used to replace the SWAT sub-basin model. The calculation formulas of the evaluation criteria PBIAS, RMSE, and NSE are as follows: Where Qsim is the result of model prediction; Qobs is the observed value; N is the total number of samples.
4. The runoff forecasting method based on SWAT and LSTM according to claim 1, characterized in that: The step S5 comprises: The CNN-LSTM model was trained using precipitation, temperature and the simulated residual data in step S4; in the CNN-LSTM, CNN was set to 1D, kernel size was 2, the number of neurons of LSTM was set to 50, the epoch was 120, the learning rate was 0.001, the batch size was 320, and the parameters of the LSTM model were the optimal solution selected based on multiple test results, and the Adam method was selected as the parameter optimization solution.
Citation Information
Patent Citations
CNN-LSTM-based real-time flood forecasting intelligent method
CN115099497A
LSTM-based medium and long term runoff forecasting intelligent method
CN115115111A