Sazzad et al. (2025) IoT based soil moisture measurement and type prediction using advanced regression and machine learning models
Identification
- Journal: Scientific Reports
- Year: 2025
- Date: 2025-10-13
- Authors: Md. Mahmud Sazzad, Tanvir Ahmed, Golam Mohammad Kibria, Ishmam Khan
- DOI: 10.1038/s41598-025-19444-2
Research Groups
- Department of Civil Engineering, Rajshahi University of Engineering & Technology, Bangladesh
- Department of Computer Science and Engineering, Rajshahi University of Engineering & Technology, Bangladesh
Short Summary
This study developed an Internet of Things (IoT)-based system utilizing capacitance sensors and machine learning (polynomial regression, Random Forest) for real-time soil moisture measurement and soil type prediction. The system achieved high accuracies of 96.49% for moisture content prediction and 97.77% for soil type classification across various sand types.
Objective
- To develop and validate an IoT-based system combining a capacitance sensor with advanced machine learning models (polynomial regression and Random Forest) for simultaneous real-time soil moisture content estimation and laboratory-based soil type classification, aiming for high accuracy and reduced recalibration needs.
Study Configuration
- Spatial Scale: Laboratory experiments and field measurements (Rajshahi Airport runway, Bangladesh).
- Temporal Scale: Real-time monitoring for soil moisture; oven-drying for 24 to 48 hours for gravimetric moisture content determination.
Methodology and Data
- Models used:
- Linear Regression (Excel, Machine Learning)
- Logarithmic Regression (Excel)
- Polynomial Regression (Machine Learning)
- Random Forest Classifier (Machine Learning)
- Data sources:
- Custom dataset generated in the laboratory using a capacitance sensor (v1.2) and verified by the traditional oven-dry method.
- Field data collected from the Rajshahi Airport runway.
- Soil samples: Sand 1 (Coarse Sand), Sand 2 (Medium-Coarse Sand), Sand 3 (Fine Sand), and Sand 4 (Fine Sand), characterized by sieve analysis.
- Dataset augmentation using Synthetic Minority Over-sampling Technique (SMOTE) to balance classes (654 samples total across three soil types).
- IoT system built with ESP32 microcontroller, 3.7 V 18650 lithium-ion battery, and Blynk server for data transmission.
Main Results
- The logarithmic regression model (Excel) for water content prediction achieved 96.49% accuracy, outperforming the linear regression model (94.47%).
- The machine learning polynomial regression model for water content prediction achieved an R² score of 0.79 and a Mean Absolute Error (MAE) of 1.71%.
- The Random Forest classifier for soil type prediction achieved an overall accuracy of 97.77% (98% in conclusion) on the augmented dataset.
- Specific classification performance for soil types:
- Coarse Sand: Precision = 1.00, Recall = 0.93, F1-score = 0.96
- Fine Sand: Precision = 0.94, Recall = 1.00, F1-score = 0.97
- Medium Coarse Sand: Precision = 1.00, Recall = 1.00, F1-score = 1.00
- Logarithmic equations consistently exhibited higher R² values than linear counterparts for all four sand types (e.g., Sand 1: R²=0.8783 vs 0.8107; Sand 2: R²=0.9525 vs 0.9214).
- Physical properties of selected soils:
- Sand 1 (SW): Bulk density 1880 kg/m³, D50 0.439 mm
- Sand 2 (SP): Bulk density 1750 kg/m³, D50 0.268 mm
- Sand 3 (SP): Bulk density 1740 kg/m³, D50 0.190 mm
- Sand 4 (SP): Bulk density 1700 kg/m³, D50 0.138 mm
Contributions
- Proposed a polynomial regression model specifically tailored to capture the nonlinear relationship between capacitance and soil moisture, achieving improved accuracy (96.49%) over traditional linear/logarithmic models.
- Uniquely integrated real-time field measurements with laboratory-based soil classification using the same low-cost capacitance sensor, a feature not commonly found in prior IoT-enabled systems.
- Enabled minimal recalibration needs through AI-driven adjustments, thereby reducing the dependency on soil-specific calibration.
- Developed a unified, cost-effective framework offering simultaneous dual-functionality: real-time water content estimation and soil type classification.
Funding
The authors did not receive any financial support for the research, authorship, or publication of this article. Laboratory facilities were provided by the Department of Civil Engineering, Rajshahi University of Engineering & Technology, Bangladesh.
Citation
@article{Sazzad2025IoT,
author = {Sazzad, Md. Mahmud and Ahmed, Tanvir and Kibria, Golam Mohammad and Khan, Ishmam},
title = {IoT based soil moisture measurement and type prediction using advanced regression and machine learning models},
journal = {Scientific Reports},
year = {2025},
doi = {10.1038/s41598-025-19444-2},
url = {https://doi.org/10.1038/s41598-025-19444-2}
}
Original Source: https://doi.org/10.1038/s41598-025-19444-2