Prediction of canal discharge under complex conditions based on a long short-term memory neural network
GUO Shiyuan1, MA Weizhi2, LU Ruilin1, LIU Jinlong3, YANG Zhigang3, WANG Zhongjing3,4, ZHANG Min1
1. Department of Computer Science and Technology, Tsinghua University, Beijing 100084, China; 2. Institute for AI Industry Research, Tsinghua University, Beijing 100084, China; 3. Department of Hydraulic Engineering, Tsinghua University, Beijing 100084, China; 4. Breeding Base for State Key Lab of Land Degradation and Ecological Restoration in Northwest China, Ningxia University, Yinchuan 750021, China
Abstract:[Objective] Water discharge prediction in canals under complex conditions is a fundamental problem with prominent practical significance in improving farmland irrigation water efficiency, conserving water resources, and reducing involved costs. The state-of-art solution of prediction is establishing nonlinear partial differential equations with numerical calculation methods, with time cost being exponential to the fineness of the spatiotemporal division. Moreover, the current time step calculation depends on the result of the last time step, i.e., the calculation cannot be parallelized, which results in a tradeoff between accuracy and efficiency. In actual irrigation areas, the control of gate openings in canals primarily relies on human experience, which has an extremely long feedback process. Therefore, it is challenging to employ human experience and numerical calculation methods when multiple gate changes are required. The rapid development of artificial intelligence-related technologies has yielded more opportunities for modernizing conventional industries. In this study, the input and output were definite for the water discharge prediction task, which corresponds to the "regression" problem-one of the two types of fundamental problems that neural networks are good at solving. This study presents new insights to leverage the neural network to solve the water discharge prediction problem end-to-end. The neural network only needs to be trained once, and further, multiple results can be obtained with high efficiency during testing. Therefore, the proposed approach overcomes the shortcomings of the conventional methods, which involve extremely high time costs.[Methods] Based on the Internet-of-Water theory of "real-time perception, water-information interconnection, process tracking, and intelligent processing", this study introduced a novel approach for water discharge prediction. First, we investigated the sequence features of the upstream and downstream canal water discharge gate control and introduced the static features of the gates and canal. Second, we proposed a novel predicting method for canal discharge based on a long short-term memory (LSTM) neural network, in which the gating mechanism allows better modeling and prediction of problems with sequential information. Feature discretization and normalization were applied to the static features to improve the generalization ability of the model to predict unseen data. Layer normalization was performed on the output of the LSTM network to adjust the distribution of the output to the unsaturated region of the activation function, making the neural network more sensitive to the input and output, as well as accelerating its convergence.[Results] The following comparative experimental results were obtained:1) The proposed model can complete the prediction task with an accuracy rate exceeding 97% in every canal segment, which is significantly better than all baselines, indicating the effectiveness of using the hidden sequence features inside the canal and the gating mechanism of the LSTM neural network. 2) Under normal circumstances, introducing static features as part of the model's input improves the prediction performance. 3) The proposed model demonstrates good robustness. It successfully learns and shows good prediction performance without too much data fed into it. Hence, it is extremely useful in situations of data shortage and when requiring model migration to other canals. 4) Compared to the conventional numerical calculation method, the proposed model demonstrates 308 times higher prediction efficiency, reducing the prediction time from 950 h to about 3 h on 100,000 pieces of data.[Conclusions] This study verifies the feasibility of artificial intelligence-based methods in improving the conventional canal discharge prediction problem, achieves a win-win situation between accuracy and efficiency through a reasonably designed deep learning model, and provides a new idea for applying artificial intelligence-based methods in solving hydraulic problems.
郭世圆, 马为之, 卢瑞麟, 刘晋龙, 杨志刚, 王忠静, 张敏. 基于LSTM神经网络的复杂工况下明渠流量预测[J]. 清华大学学报(自然科学版), 2023, 63(12): 1924-1934.
GUO Shiyuan, MA Weizhi, LU Ruilin, LIU Jinlong, YANG Zhigang, WANG Zhongjing, ZHANG Min. Prediction of canal discharge under complex conditions based on a long short-term memory neural network. Journal of Tsinghua University(Science and Technology), 2023, 63(12): 1924-1934.
[1] 郑志磊,王忠静.水联网渠道可控性判别指标研究[J].水力发电学报, 2019, 38(7):57-66. ZHENG Z L, WANG Z J. Indicator of canal controllability for internet of water[J]. Journal of Hydroelectric Engineering, 2019, 38(7):57-66.(in Chinese) [2] 刘晋龙.基于水联网的灌区渠系输配水联控研究[D].北京:清华大学, 2022. LIU J L. Research on joint automatic control of water transmission and distribution canal system in irrigation district based on internet-of-water[D]. Beijing:Tsinghua University, 2022.(in Chinese) [3] 郑志磊.基于水联网的灌区管理与渠道自动控制研究[D].北京:清华大学, 2018. ZHENG Z L. Research on the internet-of-water based irrigation district management and automatic control of irrigation canals[D]. Beijing:Tsinghua University, 2018.(in Chinese) [4] 王忠静,王光谦,王建华,等.基于水联网及智慧水利提高水资源效能[J].水利水电技术, 2013, 44(1):1-6. WANG Z J, WANG G Q, WANG J H, et al. Developing the internet of water to prompt water utilization efficiency[J]. Water Resources and Hydropower Engineering, 2013, 44(1):1-6.(in Chinese) [5] 王忠静,郑志磊,徐国印,等.基于线性二次型的多级联输水渠道最优控制[J].水科学进展, 2018, 29(3):383-389. WANG Z J, ZHENG Z L, XU G Y, et al. Linear quadratic optimal control of multi-cascaded canals[J]. Advances in Water Science, 2018, 29(3):383-389.(in Chinese) [6] ZHENG Z L, WANG Z J, ZHAO J S, et al. Constrained model predictive control algorithm for cascaded irrigation canals[J]. Journal of Irrigation and Drainage Engineering, 2019, 145(6):04019009. [7] LIU J L, WANG Z J, YANG Z G, et al. An adaptive predictive control algorithm for comprehensive dendritic canal systems[J]. Journal of Irrigation and Drainage Engineering, 2023, 149(1):04022046. [8] SAINT-VENANT A J C. Théorie du mouvement non permanent des eaux avec applications aux crues des rivières età l'introduction des marées dans leur lit[J]. Comptes Rendus de l'Académie des Sciences de Paris, 1871, 73:147-154. [9] 何星.刚性植被河道的圣维南方程修正研究[D].北京:华北电力大学(北京), 2021. HE X. Study on modification of Saint-Venant equations for rigid vegetated channel[D]. Beijing:North China Electric Power University (Beijing), 2021.(in Chinese) [10] 王祎,贾文雅,尹雪婷,等.人工神经网络的发展及展望[J].智能城市, 2021, 7(8):12-13. WANG Y, JIA W Y, YIN X T, et al. Development and prospect of artificial neural network[J]. Intelligent City, 2021, 7(8):12-13.(in Chinese) [11] 陈大宏,蓝霄峰,杨小亭.求解圣维南方程组的DORA算法[J].武汉大学学报(工学版), 2005, 38(5):41-44. CHEN D H, LAN X F, YANG X T. DORA approach for solution of the Saint-Venant equations[J]. Engineering Journal of Wuhan University, 2005, 38(5):41-44.(in Chinese) [12] 王泗远,郭泽庆,王高亚.明渠非恒定流问题的数值计算方法--以圣·维南方程组的数值计算方法为例[J].中国新技术新产品, 2011(10):7-7. WANG S Y, GUO Z Q, WANG G Y. Numerical calculation method of non-constant flow in open channel:Taking the numerical calculation method of de Saint-Venant system of equations as an example[J]. China New Technologies and Products, 2011(10):7-7.(in Chinese) [13] 伍宁.一维圣维南方程组在非恒定流计算中的应用[J].人民长江, 2001, 32(11):16-18. WU N. Application of one dimensional Saint-Venant equations in non-constant flow[J]. Yangtze River, 2001, 32(11):16-18.(in Chinese) [14] 陈滋月.基于圣维南方程组的辽宁省中小河流流量自动化推求试验研究[J].水利技术监督, 2016, 24(4):108-110, 116. CHEN Z Y. Experimental research on automatic calculation of flow of medium and small rivers in Liaoning province based on Saint-Venant equations[J]. Technical Supervision in Water Resources, 2016, 24(4):108-110, 116.(in Chinese) [15] 王浩骅,管光华,肖昌诚.一维圣维南方程差分数值算法中稀疏矩阵求解方法比较及优选研究[J].灌溉排水学报, 2021, 40(3):116-124. WANG H H, GUAN G H, XIAO C C. Comparison and optimization of sparse matrix solution methods in one-dimensional Saint-Venant equation difference numerical algorithm[J]. Journal of Irrigation and Drainage, 2021, 40(3):116-124.(in Chinese) [16] ASSEM H, GHARIBA S, MAKRAI G, et al. Urban water flow and water level prediction based on deep learning[C]//Proceedings of the Joint European Conference on Machine Learning and Knowledge Discovery in Databases. Skopje, Macedonia:Springer, 2017:317-329. [17] 胡磊.基于深度学习的超临界机组给水流量预测及控制优化[D].太原:山西大学, 2021. HU L. Water supply flow prediction and control optimization of supercritical unit based on deep learning[D]. Taiyuan:Shanxi University, 2021.(in Chinese) [18] 刘晓锋,李太斌,范伟宁,等.基于深度学习的水电站水流量和发电量区间预测[J].电子技术与软件工程, 2020(9):221-222. LIU X F, LI T B, FAN W N, et al. Interval prediction of water flow and power generation based on deep learning[J]. Electronic Technology&Software Engineering, 2020(9):221-222.(in Chinese) [19] 牟意红.基于GA-BP神经网络的灌区水流量监测系统设计[D].武汉:武汉理工大学, 2018. MOU Y H. Design of water flow monitoring system in irrigation area based on GA-BP neural network[D]. Wuhan:Wuhan University of Technology, 2018.(in Chinese) [20] 佟强.基于BP神经网络的灌区取水流量在线监测研究[J].水利科技与经济, 2021, 27(10):104-109. TONG Q. Study on on-line monitoring of water intake flow in irrigation area based on BP neural network[J]. Water Conservancy Science and Technology and Economy, 2021, 27(10):104-109.(in Chinese) [21] HOCHREITER S, SCHMIDHUBER J. Long short-term memory[J]. Neural Computation, 1997, 9(8):1735-1780. [22] BA J L, KIROS J R, HINTON G E. Layer normalization[EB/OL].(2016-07-21)[2022-11-28]. https://arxiv.org/pdf/1607.06450.pdf. [23] 罗梓宁.信贷风险识别中的连续变量最优离散化[D].上海:上海师范大学, 2018. LUO Z N. Optimal discretization of continuous variables in credit risk identification[D]. Shanghai:Shanghai Normal University, 2018.(in Chinese) [24] 谷晓伟.基于SOBEK模型的黄河三角洲自然保护区淡水湿地生态需水量研究[D].南京:河海大学, 2007. GU X W. Study on ecological water requirement of freshwater wetland in Yellow River delta natural conservation area based on SOBEK model[D]. Nanjing:Hohai University, 2007.(in Chinese) [25] DELTARES. SOBEK, user manual[M]. Delft, The Netherlands:Deltares, 2018. [26] KINGMA D P, BA J. Adam:A method for stochastic optimization[EB/OL].(2017-01-30)[2022-11-28]. https://arxiv.org/pdf/1412.6980.pdf. [27] RUMELHART D E, HINTON G E, WILLIAMS R J. Learning representations by back-propagating errors[J]. Nature, 1986, 323(6088):533-536. [28] ELMAN J L. Finding structure in time[J]. Cognitive Science, 1990, 14(2):179-211.