Hybrid LSTM Method for Multistep Soil Moisture Prediction Using Historical Soil Moisture and Weather Data
Abstract
1. Introduction
1.1. Background and Motivation
1.2. Objectives of the Study
- Develop a hybrid LSTM-XGBoost model to predict soil moisture at 24 h, 72 h, and 168 h intervals using historical soil moisture and weather data.
- Evaluate the performance of the proposed hybrid model against standalone ML, DL, and other hybrid models.
- Assess the ability of LSTM to capture long-term temporal dependencies in time-series soil moisture and meteorological data for improved feature representation.
- Investigate the role of XGBoost in refining predictions by leveraging non-linear relationships within LSTM-extracted features.
1.3. Contributions of the Study
1.4. Hypotheses
- The LSTM-XGBoost hybrid model will outperform all evaluated standalone ML, DL, and other hybrid models in terms of R2 and error metrics across 24, 72, and 168 h prediction horizons.
- LSTM will significantly enhance temporal feature representation by learning long-term dependencies in soil moisture and weather variables.
- XGBoost, when applied to LSTM-derived features, will reduce prediction errors by capturing complex non-linearities in the data.
- Combining lag soil moisture values with historical weather data will improve the accuracy of future soil moisture predictions.
1.5. Research Questions
- Can a hybrid model combining LSTM and XGBoost improve the accuracy of multistep soil moisture prediction (24, 72, and 168 h ahead) compared to standalone and other hybrid models?
- How effectively does the LSTM component capture long-term temporal dependencies in time-series soil moisture and meteorological data?
- What role does XGBoost play in refining soil moisture predictions by modeling non-linear relationships in LSTM-extracted features?
- Can historical weather and soil moisture data be used to predict future soil moisture values?
2. Materials and Methods
2.1. Dataset Description
2.2. Data Acquisition and Preprocessing
2.3. LSTM Architecture
2.4. Proposed LSTM Architecture
2.5. XGBoost Architecture
2.6. Proposed XGBoost Architecture
2.7. Experiment Setup
2.8. Proposed Method Architecture
2.9. Model Performance Evaluation Metrics
3. Results
3.1. Learning Curves of Proposed Models
3.2. Standalone ML Models Result
3.3. Standalone DL Models Result
3.4. Hybrid LSTM Models Result
3.5. Model Testing (Actual vs. Prediction Results) Visualization
4. Discussion
5. Limitations and Future Works
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
XGBoost | Extreme Gradient Boosting |
RF | Random Forest |
GB | Gradient Boosting |
SVR | Support Vector Regressor |
LightGBM | Light Gradient Boosting Method |
LR | Linear Regression |
DT | Decision Tree |
MLP | Multi-Layer Perceptron |
KNN | K-Nearest Neighbors |
Bi-LSTM | Bi-directional Long Short-Term Memory |
LSTM | Long Short-Term Memory |
GRU | Gate Rated Unit |
RNN | Recurrent Neural Network |
DL | Deep Learning |
ML | Machine Learning |
ARIMA | Auto-Regressive Integrated Moving Averages |
ETs | Extra Trees |
RR | Ridge Regression |
CNNs | Convolutional Neural Networks |
ABAC | Abraham Baldwin Agricultural College |
ISMN | International Soil Moisture Network |
FAO | Food and Agriculture Organization |
References
- Walker, J.P.; Willgoose, G.R.; Kalma, J.D. In situ measurement of soil moisture: A comparison of techniques. J. Hydrol. 2004, 293, 85–99. [Google Scholar] [CrossRef]
- Ahmad, S.; Kalra, A.; Stephen, H. Estimating soil moisture using remote sensing data: A machine learning approach. Adv. Water Resour. 2010, 33, 69–80. [Google Scholar] [CrossRef]
- Allen, R.G.; Pereira, L.S.; Raes, D.; Smith, M. Crop Evapotranspiration-Guidelines for Computing Crop Water Requirements; FAO: Rome, Italy, 1998. [Google Scholar]
- Granata, F.; Di Nunno, F.; Najafzadeh, M.; Demir, I. A Stacked Machine Learning Algorithm for Multi-Step Ahead Prediction of Soil Moisture. Hydrology 2022, 10, 1. [Google Scholar] [CrossRef]
- Fu, R.; Xie, L.; Liu, T.; Zheng, B.; Zhang, Y.; Hu, S. A Soil Moisture Prediction Model, Based on Depth and Water Balance Equation: A Case Study of the Xilingol League Grassland. Int. J. Environ. Res. Public Health 2023, 20, 1374. [Google Scholar] [CrossRef]
- Hu, L.; Xu, H.; Zhang, J.; Luo, Q. Soil Moisture Prediction Based on the ARIMA Time-Series Model. In Proceedings of the 35th Chinese Control and Decision Conference, CCDC 2023, Yichang, China, 20–22 May 2023; Institute of Electrical and Electronics Engineers Inc.: Yichang, China, 2023. [Google Scholar] [CrossRef]
- Filipović, N.; Brdar, S.; Mimić, G.; Marko, O.; Crnojević, V. Regional soil moisture prediction system based on Long Short-Term Memory network. Biosyst. Eng. 2022, 213, 30–38. [Google Scholar] [CrossRef]
- Suebsombut, P.; Sekhari, A.; Sureephong, P.; Belhi, A.; Bouras, A. Field data forecasting using lstm and bi-lstm approaches. Appl. Sci. 2021, 11, 11820. [Google Scholar] [CrossRef]
- Huang, F.; Zhang, Y.; Zhang, Y.; Shangguan, W.; Li, Q.; Li, L.; Jiang, S. Interpreting Conv-LSTM for Spatio-Temporal Soil Moisture Prediction in China. Agriculture 2023, 13, 971. [Google Scholar] [CrossRef]
- Wang, Y.; Shi, L.; Hu, Y.; Hu, X.; Song, W.; Wang, L. A comprehensive study of deep learning for soil moisture prediction. Hydrol. Earth Syst. Sci. 2024, 28, 917–943. [Google Scholar] [CrossRef]
- Li, Q.; Zhang, C.; Shangguan, W.; Li, L.; Dai, Y. A novel local-global dependency deep learning model for soil mapping. Geoderma 2023, 438, 116649. [Google Scholar] [CrossRef]
- Khosravi, K.; Golkarian, A.; Barzegar, R.; Aalami, M.T.; Heddam, S.; Omidvar, E.; Keesstra, S.D.; López-Vicente, M. Multi-step ahead soil temperature forecasting at different depths based on meteorological data: Integrating resampling algorithms and machine learning models. Pedosphere 2023, 33, 479–495. [Google Scholar] [CrossRef]
- Rani, A.; Kumar, N.; Kumar, J.; Sinha, N.K. Chapter 6—Machine learning for soil moisture assessment. In Deep Learning for Sustainable Agriculture; Poonia, R.C., Singh, V., Nayak, S.R., Eds.; Academic Press: Amsterdam, The Netherlands, 2022; pp. 143–168. [Google Scholar] [CrossRef]
- Acharya, U.; Daigh, A.L.M.; Oduor, P.G. Machine learning for predicting field soil moisture using soil, crop, and nearby weather station data in the red river valley of the north. Soil Syst. 2021, 5, 57. [Google Scholar] [CrossRef]
- Togneri, R.; dos Santos, D.F.; Camponogara, G.; Nagano, H.; Custódio, G.; Prati, R.; Fernandes, S.; Kamienski, C. Soil moisture forecast for smart irrigation: The primetime for machine learning. Expert Syst. Appl. 2022, 207, 117653. [Google Scholar] [CrossRef]
- Heddam, S. 3–New formulation for predicting soil moisture content using only soil temperature as predictor: Multivariate adaptive regression splines versus random forest, multilayer perceptron neural network, M5Tree, and multiple linear regression. In Water Engineering Modeling and Mathematic Tools; Samui, P., Bonakdari, H., Deo, R., Eds.; Elsevier: Amsterdam, The Netherlands, 2021; pp. 45–62. [Google Scholar] [CrossRef]
- Chatterjee, S.; Dey, N.; Sen, S. Soil moisture quantity prediction using optimized neural supported model for sustainable agricultural applications. Sustain. Comput. Inform. Syst. 2020, 28, 100279. [Google Scholar] [CrossRef]
- Cai, Y.; Zheng, W.; Zhang, X.; Zhangzhong, L.; Xue, X. Research on soil moisture prediction model based on deep learning. PLoS ONE 2019, 14, e0214508. [Google Scholar] [CrossRef]
- Dolaptsis, K.; Pantazi, X.E.; Paraskevas, C.; Arslan, S.; Tekin, Y.; Bantchina, B.B.; Ulusoy, Y.; Gündoğdu, K.S.; Qaswar, M.; Bustan, D.; et al. A Hybrid LSTM Approach for Irrigation Scheduling in Maize Crop. Agriculture 2024, 14, 210. [Google Scholar] [CrossRef]
- Kouadri, S.; Pande, C.B.; Panneerselvam, B.; Moharir, K.N.; Elbeltagi, A. Prediction of irrigation groundwater quality parameters using ANN, LSTM, and MLR models. Environ. Sci. Pollut. Res. 2022, 29, 21067–21091. [Google Scholar] [CrossRef]
- Kandamali, D.F.; Cao, X.; Tian, M.; Jin, Z.; Dong, H.; Yu, K. Machine learning methods for identification and classification of events in ϕ -OTDR systems: A review. Appl. Opt. 2022, 61, 2975–2997. [Google Scholar] [CrossRef]
- Prasad, R.; Deo, R.C.; Li, Y.; Maraseni, T. Soil moisture forecasting by a hybrid machine learning technique: ELM integrated with ensemble empirical mode decomposition. Geoderma 2018, 330, 136–161. [Google Scholar] [CrossRef]
- Datta, P.; Faroughi, S.A. A multihead LSTM technique for prognostic prediction of soil moisture. Geoderma 2023, 433, 116452. [Google Scholar] [CrossRef]
- Li, Q.; Zhu, Y.; Shangguan, W.; Wang, X.; Li, L.; Yu, F. An attention-aware LSTM model for soil moisture and soil temperature prediction. Geoderma 2022, 409, 115651. [Google Scholar] [CrossRef]
- Jimenez, A.-F.; Ortiz, B.V.; Bondesan, L.; Morata, G.; Damianidis, D. Long Short-Term Memory Neural Network for irrigation management: A case study from Southern Alabama, USA. Precis. Agric. 2021, 22, 475–492. [Google Scholar] [CrossRef]
- Gao, P.; Xie, J.; Yang, M.; Zhou, P.; Chen, W.; Liang, G.; Chen, Y.; Han, X.; Wang, W. Improved soil moisture and electrical conductivity prediction of citrus orchards based on IoT using deep bidirectional lstm. Agriculture 2021, 11, 635. [Google Scholar] [CrossRef]
- Li, Q.; Li, Z.; Shangguan, W.; Wang, X.; Li, L.; Yu, F. Improving soil moisture prediction using a novel encoder-decoder model with residual learning. Comput. Electron. Agric. 2022, 195, 106816. [Google Scholar] [CrossRef]
- Wu, Z.; Cui, N.; Zhang, W.; Liu, C.; Jin, X.; Gong, D.; Xing, L.; Zhao, L.; Wen, S.; Yang, Y. Estimating soil moisture content in citrus orchards using multi-temporal sentinel-1A data-based LSTM and PSO-LSTM models. J. Hydrol. 2024, 637, 131336. [Google Scholar] [CrossRef]
- Guo, R.; Zhao, Z.; Wang, T.; Liu, G.; Zhao, J.; Gao, D. Degradation state recognition of piston pump based on ICEEMDAN and XGBoost. Appl. Sci. 2020, 10, 6593. [Google Scholar] [CrossRef]
Field Name | Device Name | Latitude | Longitude |
---|---|---|---|
Front Field | 4D01 | 31.48449 | −83.5452 |
4D02 | 31.4845 | −83.544 | |
North Pivot | 4D03 | 31.4837728 | −83.5477376 |
4D04 | 31.4841216 | −83.5486016 | |
4D05 | 31.4839808 | −83.5469888 | |
4D06 | 31.4844096 | −83.5479488 | |
South Pivot | 4D07 | 31.4826464 | −83.5490432 |
4D08 | 31.4819584 | −83.5483456 | |
4D09 | 31.4828736 | −83.54864 | |
4D10 | 31.4822336 | −83.5472512 | |
West Field | 4D11 | 31.4814976 | −83.5514752 |
4D12 | 31.4814336 | −83.5508224 | |
4D13 | 31.4826112 | −83.5502144 | |
4D14 | 31.4826048 | −83.5510784 | |
Weather Station | 31.48509752 | −83.54801174 |
Layer | Output Shape | Parameters |
---|---|---|
LSTM | (32, 24, 256) | 271,360 |
LSTM | (32, 24, 128) | 197,120 |
LSTM | (32, 64) | 49,408 |
Dropout | (32, 64) | 0 |
Dense | (32, 256) | 16,640 |
Dense | (32, 168) | 43,296 |
24 h | 72 h | 168 h | |||||||
---|---|---|---|---|---|---|---|---|---|
Model | MSE | MAE | R2 | MSE | MAE | R2 | MSE | MAE | R2 |
RF | 2.1862 | 0.6793 | 0.9474 | 2.3530 | 0.8439 | 0.9407 | 2.6979 | 0.8953 | 0.9173 |
SVR | 26.389 | 3.0212 | 0.3469 | 26.629 | 3.0228 | 0.3295 | 27.437 | 3.0700 | 0.3119 |
DT | 5.7204 | 0.8667 | 0.8624 | 6.8018 | 0.9684 | 0.8286 | 6.9688 | 0.9640 | 0.7864 |
GB | 3.9939 | 1.0681 | 0.9044 | 6.2844 | 1.6528 | 0.8380 | 6.6368 | 1.7598 | 0.7829 |
MLP | 22.674 | 3.2572 | 0.4545 | 26.483 | 3.5384 | 0.3327 | 26.781 | 3.5319 | 0.1792 |
LR | 11.671 | 1.7389 | 0.7192 | 23.604 | 3.0455 | 0.4052 | 25.253 | 3.3593 | 0.2260 |
AdaBoost | 11.301 | 2.8148 | 0.7290 | 17.925 | 3.6179 | 0.5358 | 15.839 | 3.3744 | 0.4949 |
ET | 1.6417 | 0.4538 | 0.9673 | 1.2966 | 0.5183 | 0.9605 | 1.4349 | 0.5450 | 0.9560 |
RR | 11.667 | 1.7385 | 0.7208 | 23.598 | 3.0451 | 0.3902 | 25.247 | 3.3589 | 0.1779 |
XGBoost | 3.3839 | 0.7440 | 0.9186 | 3.2386 | 0.9679 | 0.9184 | 3.3175 | 1.0118 | 0.9083 |
ElasticNet | 11.198 | 1.6929 | 0.7306 | 22.536 | 2.9726 | 0.4322 | 23.895 | 3.2742 | 0.2677 |
24 h | 72 h | 168 h | |||||||
---|---|---|---|---|---|---|---|---|---|
Model | MSE | MAE | R2 | MSE | MAE | R2 | MSE | MAE | R2 |
LSTM | 0.0007 | 0.0156 | 0.9781 | 0.0007 | 0.0158 | 0.9771 | 0.0006 | 0.0146 | 0.9738 |
Bi-LSTM | 0.0005 | 0.0128 | 0.9662 | 0.0005 | 0.0126 | 0.9652 | 0.0005 | 0.0122 | 0.9627 |
CNN | 0.0005 | 0.0136 | 0.9748 | 0.0005 | 0.0135 | 0.9741 | 0.0005 | 0.0131 | 0.9710 |
GRU | 0.0014 | 0.0234 | 0.9311 | 0.0015 | 0.0228 | 0.9294 | 0.0015 | 0.0240 | 0.9098 |
RNN | 0.0020 | 0.0269 | 0.9063 | 0.0023 | 0.0299 | 0.8878 | 0.0023 | 0.0301 | 0.8660 |
24 h | 72 h | 168 h | |||||||
---|---|---|---|---|---|---|---|---|---|
Model | MSE | MAE | R2 | MSE | MAE | R2 | MSE | MAE | R2 |
LSTM + RF | 0.0003 | 0.0086 | 0.9834 | 0.0004 | 0.0093 | 0.9827 | 0.0003 | 0.0082 | 0.9822 |
LSTM + LR | 0.0006 | 0.0148 | 0.9719 | 0.0006 | 0.0153 | 0.9693 | 0.0006 | 0.0152 | 0.9652 |
LSTM + XGBoost | 0.0003 | 0.0078 | 0.9867 | 0.0003 | 0.0080 | 0.9856 | 0.0002 | 0.0074 | 0.9854 |
LSTM + KNN | 0.0003 | 0.0072 | 0.9838 | 0.0004 | 0.0078 | 0.9824 | 0.0003 | 0.0068 | 0.9821 |
LSTM + MLP | 0.0015 | 0.0234 | 0.9271 | 0.0017 | 0.0239 | 0.9219 | 0.0014 | 0.0230 | 0.9193 |
LSTM + DT | 0.0009 | 0.0108 | 0.9590 | 0.0009 | 0.0114 | 0.9579 | 0.0007 | 0.0102 | 0.9567 |
CNN + LSTM | 0.0007 | 0.0151 | 0.9685 | 0.0006 | 0.0147 | 0.9699 | 0.0006 | 0.0150 | 0.9659 |
Study | Year | Model | Dataset | Prediction Horizon | Results (R2) | Description |
---|---|---|---|---|---|---|
[9] | 2023 | Conv-LSTM | ERA5-Land | Unspecified | 92% | No time-step prediction, focused on spatial features. |
[27] | 2022 | EDT-LSTM | FLUXNET 2015 | 1–10 days | 89.6% (1 day) 58.3% (10 days) | Good for short-term prediction accuracy, performance declines with longer horizon. |
[28] | 2024 | PSO-LSTM | Sentinel-1A satellite data | Unspecified | 86.8–96.8% | No time-step prediction |
[10] | 2024 | FA-LSTM | Internation Soil Moisture Network (ISMN) | 1–7 days | 94.3% (1 day) 81.7% (7 days) | Good short-term prediction accuracy, performance declines with longer horizons. |
2024 | GAN-LSTM | 1–7 days | 94.4% (1 day) 81.7% (7 days) | |||
This study | 2025 | LSTM-XGBoost | (D.A.T.A) farm; historical soil and weather | 1–7 days | 98.67% (1 days) 98.54% (7 days) | Improved short and long-term prediction accuracy |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Kandamali, D.F.; Porter, E.; Porter, W.M.; McLemore, A.; Kiobia, D.O.; Tavandashti, A.P.; Rains, G.C. Hybrid LSTM Method for Multistep Soil Moisture Prediction Using Historical Soil Moisture and Weather Data. AgriEngineering 2025, 7, 260. https://doi.org/10.3390/agriengineering7080260
Kandamali DF, Porter E, Porter WM, McLemore A, Kiobia DO, Tavandashti AP, Rains GC. Hybrid LSTM Method for Multistep Soil Moisture Prediction Using Historical Soil Moisture and Weather Data. AgriEngineering. 2025; 7(8):260. https://doi.org/10.3390/agriengineering7080260
Chicago/Turabian StyleKandamali, Deus F., Erin Porter, Wesley M. Porter, Alex McLemore, Denis O. Kiobia, Ali P. Tavandashti, and Glen C. Rains. 2025. "Hybrid LSTM Method for Multistep Soil Moisture Prediction Using Historical Soil Moisture and Weather Data" AgriEngineering 7, no. 8: 260. https://doi.org/10.3390/agriengineering7080260
APA StyleKandamali, D. F., Porter, E., Porter, W. M., McLemore, A., Kiobia, D. O., Tavandashti, A. P., & Rains, G. C. (2025). Hybrid LSTM Method for Multistep Soil Moisture Prediction Using Historical Soil Moisture and Weather Data. AgriEngineering, 7(8), 260. https://doi.org/10.3390/agriengineering7080260