Machine Learning Model Development for Water Level Forecasting at P.1 Station, Chiang Mai Province

Authors

  • Supachai Mukdasanit Department of Business Computer, Faculty of Management Science, Chiang Mai Rajabhat University, Chiang Mai, Thailand
  • Tawee Chaipimonplin

DOI:

https://doi.org/10.14456/rmutlengj.2025.12

Keywords:

Water Level Forecast, Machine Learning, Artificial Neural Network, Exponential Moving Average

Abstract

This research applies machine learning models to forecast water levels at the P.1 station (Nawarat Bridge), Chiang Mai Province, both for 6 and 9 hours in advance. The objectives are to identify suitable variables and to create models for forecasting water levels at the P.1 station. The study utilizes historical hourly water level data from the P.1 and P.67 stations, combined with Moving Average (MA) and Exponential Moving Average (EMA) data covering the years from 2017 to 2024, which has amounted to a total of 66,180 records. The dataset is divided into a training set (80%) and a testing set (20%). The experiment design involves creating artificial neural network models based on historical data from one station (P.1) and two stations (P.1 and P.67). The models consist of those using only historical data, those using historical data combined with MA, and those using historical data combine with EMA, resulting in a total of 12 models. The structure of each model was optimized to achieve the best forecasting results. The results indicate that the best model for the 6-hour forecasting is the P.1_6 + P.67_6 + EMA model. This model utilizes 18 input variables, with 6 and 2 nodes in the first and second hidden layers, respectively, and 1 output node. This model achieved a Mean Absolute Error (MAE) of 0.0405, a Root Mean Square Error (RMSE) of 0.0578, and a coefficient of determination (R²) of 0.9859. For the 9-hour forecasting, the best model is the P.1_9 + P.67_9 + EMA model, which also employs 18 input variables, with 5 and 4 nodes in the first and second hidden layers, respectively, and one output node. This model achieved a MAE of 0.0562, an RMSE of 0.0776, and an R² of 0.9746.  Both models utilize data from two stations combined with EMA.

References

Mosavi A, Ozturk P, Chau KW. Flood prediction using machine learning models: Literature review. Water. 2018;10(11):1536.

Wee WJ, Zaini NAB, Ahmed AN, El-Shafie A. A review of models for water level forecasting based on machine learning. Earth Sci Inform. 2021;14:1707–28.

Phuttithaworn W. Coping with flood situations. Environ J. 2012;16(1):45–54. Thai.

Upper Northern Region Hydrology and Water Management Center. Announcement from the Irrigation Office No. 1, Issue 3/2022: Monitoring water levels in the Ping River area, Station P.1, Nawarat Bridge, Mueang District, Chiang Mai Province [Internet]. 2022. Available from:http://www.hydronet/Data/ Admin/book/file/E1236-2565.pdf (Accessed 2024 Nov 15).

Upper Northern Region Hydrology and Water Management Center. Announcement of the Irrigation Office No. 1, Issue 20/2024: Notification of critical water levels in the Ping River, Station P.1, Nawarat Bridge, Mueang District, Chiang Mai Province [Internet]. 2024. Available from:http://rio1.rid.go.th/main.php?p=2&id=2621 (Accessed 2024 Nov 15).

Upper Northern Region Hydrology and Water Management Center. Hourly water level data at P.1 station Nawarat Bridge, Ping River, Wat Ket Subdistrict, Mueang District, Chiang Mai Province [Internet]. Available from: http://hydro-1.rid.go.th/ Data/HD 04/hourly/water_today.php (Accessed 2024 Oct 20).

Plate EJ. Early warning and flood forecasting for large rivers with the lower Mekong as example. J. Hydro-Environ Res. 2007;1(2):80–94.

Upper Northern Region Hydrology and Water Management Center, Chiang Mai city flood warning, [Brochure], Royal Irrigation Department, n.d.

Upper Northern Region Hydrology and Water Management Center. Hydrologic diagram of the Ping River Basin [Internet]. Available from: http://www. hydro-1.net/ Data/ HD-06/diagram.php (Accessed 2024 Dec 14).

Box GE, Jenkins GM, Reinsel GC, Ljung GM. Time series analysis: forecasting and control. Hoboken (NJ): John Wiley & Sons; 2015.

Lotysh V, Gumeniuk L, Humeniuk P. Comparison of the effectiveness of time series analysis methods: SMA, WMA, EMA, EWMA, and Kalman filter for data analysis. Informatyka Automatyka Pomiary Gospod Ochr Środowiska. 2023;13(3):71–4.

Hermawan A, Ananda S, Junaedi E, Edy. Enhancing stock price forecasting: Optimizing neural networks with moving average data. Bit-Tech [Internet]. 2025;7(3):798–808. Available from: https://doi.org/10.32877/bt.v7i3.2196.

Formis D, Colletto A, Delsanto D, Dey K, Demichelis F. Mixing neural networks and exponential moving averages for predicting

wireless links behavior. In: Proceedings of the 2024 IEEE 7th International Conference on Industrial Cyber-Physical Systems (ICPS); 2024 May. p. 1–6. Available from: https:// doi.org/ 10.1109/ICPS59941. 2024. 106 40038.

Kutner MH, Nachtsheim CJ, Neter J, Li W. Applied linear statistical models. New York: McGraw-Hill; 2005.

Chaipimonplin T. Investigation internal parameter of neural network model for flood forecasting at Upper River Ping, Thailand.

KSCE J Civ Eng. 2016;20(1):478–84.

Chaipimonplin T. Comparison learning algorithms of artificial neural network model for flood forecasting, Chiang Mai,

Thailand. In: Syme G, Hatton MacDonald D, Fulton B, Piantadosi J. editors. Proc. 22nd Int. Congr. Model. Simul. Soc. Aust.

N. Z. (MODSIM 2017); 2017 Dec. p. 473–9. ISBN: 978-2-9872143-7-9.

Shumway RH, Stoffer DS. Time Series Analysis and Its Applications: With R Examples. 4th ed. New York: Springer; 2017.

Zhang X, Wang R, Wang W, Zheng Q, Ma R, Tang R, Wang Y. Runoff prediction using combined machine learning models and

signal decomposition. J. Water Clim Change. 2025;16(1):230–47.

Akrami SA, El-Shafie A, Naseri M, Santos CA. Rainfall data analyzing using moving average (MA) model and wavelet multi-resolution intelligent model for noise evaluation to improve the forecasting accuracy. Neural Comput Appl. 2014;25:1853–61.

Vergura S. Bollinger bands based on exponential moving average for statistical monitoring of multi-array photovoltaic systems. Energies. 2020;13(15):3992.

Zhou X, Jiang T. Metamodel selection based on stepwise regression. Struct Multidiscip Optim. 2016;54:641–57.

Shaik NB, Pedapati SR, Taqvi SAA, Othman AR, Dzubir FAA. A feed-forward back propagation neural network approach to predict the life condition of crude oil pipeline. Processes. 2020;8(6):661.

Chaipimonplin T, See LM, Kneale PE. Improving neural network for flood forecasting using radar data on the Upper Ping River. In: Proc. MODSIM 2011; 2011 Dec. p. 1070–6.

Gholamy A, Kreinovich V, Kosheleva O. Why 70/30 or 80/20 relation between training and testing sets: A pedagogical explanation. Int J. Intell Technol Appl Stat. 2018;11(2):105–11.

Willmott CJ, Matsuura K. Advantages of the mean absolute error (MAE) over the root mean square error (RMSE) in assessing average model performance. Clim Res. 2005;30(1):79–82.

Wooldridge JM. Introductory Econometrics: A Modern Approach. 6th ed. Boston (MA): Cengage Learning; 2016.

Ajiono A, Hariguna T. Comparison of three time series forecasting methods on linear regression, exponential smoothing and weighted moving average. Int J. Inform Inform Syst. 2023;6(2):89–102.

Thai Meteorological Department. Chiang Mai Meteorological Warning [Internet]. Available from: https://cmmet.tmd.go.th/ warning/cm_ warn.html (Accessed 2025 May 21).

Chaipimonplin T, Mukdasanit S. CM Water Forecast Mobile Application Version 1.0, presented at The 3rd Trilateral Symposium on Sustainability: Strategies for Climate Action and Mitigation of Climate Change Impacts, Chiang Mai, Thailand; organized by Chiang Mai University; 2020.

Downloads

Published

2025-12-16

How to Cite

Mukdasanit, S., & Chaipimonplin, T. (2025). Machine Learning Model Development for Water Level Forecasting at P.1 Station, Chiang Mai Province. RMUTL Engineering Journal, 10(2), 34–48. https://doi.org/10.14456/rmutlengj.2025.12

Issue

Section

Research Article