Design and Experiment of an Internet of Things-Based Wireless System for Farmland Soil Information Monitoring
Abstract
:1. Introduction
2. Design of System
2.1. Hardware System Design
2.1.1. Network Architecture of the Proposed System
2.1.2. Soil Monitoring Sensor Unit
- (1)
- Sensors: The system uses TH30 soil sensors from TANGHUA ECOLOGY in Beijing, China. The TH30 sensor is capable of measuring the temperature, water content (VWC), and electrical conductivity of the soil. The TH30 sensor was calibrated at the factory, and its specifications are as follows: volume moisture content (VWC) range: 0~100%VWC; resolution: 0.08%VWC; accuracy: ±1~3%; temperature range: −40~80 °C; resolution: 0.1 °C; accuracy: ±0.5 °C; conductivity range: 0~23 ds/m; resolution: 0.01 ds/m (0~7 ds/m) and 0.05 ds/m (7~23 ds/m); and accuracy: ±5% (0~7 ds/m). The probe material of the TH30 sensor is a special electrode for anti-corrosion, and the sealing material is black flame-retardant epoxy resin. It can operate normally in an environment of −40~85 °C, and the protection grade is IP68. It can be immersed in water for a long time. These features make the TH30 sensor very attractive for long-term soil health monitoring. The TH30 sensor draws power from the power management unit (3.6~12 V DC) and connects to the host microcontroller via the SDI-12. The TH30 sensor uses Frequency Domain Reflectometry (FDR) to detect soil moisture content. The probe of the sensor forms a capacitor, the steel needle/copper wire in the circuit board is the capacitor board, and the surrounding medium is the dielectric material, generating an electromagnetic field between the positive and negative plates. The positive and negative electrodes of the capacitor form an LC oscillator circuit, and the frequency of the LC oscillator circuit is:
- (2)
- Host microcontroller: The host controller is designed using the DL, which is responsible for controlling and coordinating all functions of the system. The DL is a highly integrated data logger with a built-in battery, charge controller, etc., and has an IP65 protective housing. In most cases, users only need to install solar panels to use it. The DL uses a waterproof aviation plug and optional junction box as the sensor connection port. The panel contains a switch, a Bluetooth wake button, a USB cable port, and five status indicators.
- (3)
- Wireless communications and GPS module: The DL can be connected to the mobile phone through Bluetooth, using the mobile phone app to set the parameters of the data logger, through the SIM card in the NB-IoT module. This not only provides the GPS positioning function but also realizes the remote transmission of data to the IoT platform. The login platform can be used to view and download data. The GPS-integrated NB-IoT wireless communication module has an embedded antenna, high sensitivity, and interference suppression capability.
- (4)
- Power management unit: The power management module includes the power supply channel and the solar charging controller. The built-in solar charging controller with an MPPT (Maximum Power Point Tracking) function, 20 Ah polymer lithium battery, and external solar panels effectively reduces the system operating costs.
2.2. Software System Design
2.2.1. Performance Layer
2.2.2. Application Layer
2.2.3. Data Analysis Layer
Machine Learning Model
- (1)
- Database design
2.3. System Deployment and Testing
2.3.1. Deployment of the Developed System
2.3.2. Testing the Developed System
2.3.3. Model Construction and Testing
- (1)
- Data preprocessing: First, the raw data are cleaned, including the removal of noisy data and irrelevant features. In addition, the data are characterized to ensure their suitability for model training.
- (2)
- Feature selection: Based on domain knowledge, the atmospheric temperature and humidity, rainfall, and total solar radiation are selected as the input features of the model, while soil moisture is taken as the output. Additionally, time features are extracted from the dataset, such as the year, month, day, hour, minute, and second, to capture potential temporal patterns in the data. To enhance the diversity of the features and improve the model’s ability to capture short-term trends and patterns of change, we introduce moving average features and sliding window difference features.
- (3)
- Model construction: Python’s scikit-learn library is employed to develop individual models, including linear regression, decision trees, random forest, and GBDTs. Additionally, the LSTM model is implemented using PyTorch, leveraging its nn.LSTM module to capture temporal dependencies in sequential data. The architecture consists of a single LSTM layer followed by a fully connected layer to produce the final output. These models are further integrated to form a hybrid model–meta-model, combining their strengths to enhance prediction accuracy and robustness.
- (4)
- Data partitioning: Using the time-series split method, the dataset, comprising approximately 3800 data points, is partitioned into training, validation, and test sets in a 7:2:1 ratio. This approach aims to ensure the model’s generalization capability on independent data.
- (5)
- Model hyperparameter optimization and training: First, the TPE hyperparameter optimization algorithm is employed to optimize the hyperparameters of each model. The models are then trained using the optimal hyperparameters. After training, the models are saved. The performances of the models are evaluated using the mean squared error (MSE), coefficient of determination (R²), and root-mean-square error (RMSE).
- (6)
- Generalization ability analysis: The saved model is utilized to predict the test set data, thereby verifying the model’s generalization ability. In this study, we focus on absolute error and relative error to evaluate the model’s predictive performance. Consequently, we adopt the mean squared error (MSE) and root-mean-square error (RMSE) as evaluation metrics to provide a more intuitive and comprehensive assessment of prediction accuracy.
3. Experiments and Results
3.1. Experimental Results and Discussion
3.2. Model Performance Assessment
3.2.1. Hyperparameter Optimization and Model Training
3.2.2. Analysis of Model Generalization Ability
- (1)
- Insufficient data volume: During the training process, the lack of data may prevent the model from fully learning the underlying patterns in the data, especially in complex tasks where the model requires a sufficient number of samples to capture various variations and trends. Insufficient data may limit the model’s generalization ability, resulting in poor fitting performance on the test set.
- (2)
- Insufficient data features: The current data features used may not fully reflect the complexity of soil moisture changes; especially, some key temporal features and environmental factors (such as seasonal variations and climatic conditions) have not been fully utilized. The insufficiency of feature engineering may prevent the model from comprehensively understanding the intrinsic relationships in the data, thereby affecting the prediction performance.
- (3)
- Overfitting or underfitting: Some models may have overfitting issues, meaning they perform well on the training set but fail to generalize effectively on the test set. This could be due to the model being overly complex and capturing noise in the training data. On the other hand, the model may also suffer from underfitting, where it is too simple to effectively capture the complex patterns in the data. Both overfitting and underfitting can lead to an unsatisfactory fitting effect.
3.2.3. Summary and Discussion of Model Performance
- (1)
- In this study, the TPE algorithm was applied for hyperparameter optimization, and the of the GBDT model increased from 0.5879 to 0.9838, a rise of 67.34%, significantly enhancing the prediction accuracy of the GBDT model for soil moisture. Although traditional machine learning methods, such as linear regression, decision trees, and random forest, have relatively low simulation accuracy, they remain feasible options for soil moisture prediction when the data volume is limited.
- (2)
- Different models are appropriate for distinct application scenarios and data characteristics. LSTM, as a deep learning model, excels in handling large datasets with rich feature sets. However, in this study, the limited data volume constrained its performance, preventing it from fully showcasing its potential. The ensemble method of meta-models demonstrated significant potential in this research. By integrating multiple algorithms, it enhanced prediction accuracy. Future research can further explore its applications.
4. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Ojha, T.; Misra, S.; Raghuwanshi, N.S. Wireless sensor networks for agriculture: The state-of-the-art in practice and future challenges. Comput. Electron. Agric. 2015, 118, 66–84. [Google Scholar] [CrossRef]
- Jangam, A.R.; Kale, K.V.; Gaikwad, S.; Vibhute, A.D. Design and Development of IoT based System for Retrieval of Agrometeorological Parameters. In Proceedings of the International Conference on Recent Innovations in Electrical, Electronics and Communication Engineering, Bhubaneswar, India, 27–28 July 2018. [Google Scholar]
- Ayaz, M.; Ammad-Uddin, M.; Sharif, Z.; Mansour, A.; Aggoune, E.H. Internet-of-Things (IoT)-Based Smart Agriculture: Toward Making the Fields Talk. IEEE Access 2019, 7, 129551–129583. [Google Scholar] [CrossRef]
- Elijah, O.; Rahman, T.A.; Orikumhi, I.; Leow, C.Y.; Hindia, M.N. An Overview of Internet of Things (IoT) and Data Analytics in Agriculture: Benefits and Challenges. IEEE Internet Things J. 2018, 5, 3758–3773. [Google Scholar] [CrossRef]
- Antonopoulou, E.; Karetsos, S.; Maliappis, M.; Sideridis, A. Web and mobile technologies in a prototype DSS for major field crops. Comput. Electron. Agric. 2010, 70, 292–301. [Google Scholar] [CrossRef]
- Fountas, S.; Carli, G.; Sørensen, C.G.; Tsiropoulos, Z.; Cavalaris, C.; Vatsanidou, A.; Liakos, B.; Canavari, M.; Wiebensohn, J.; Tisserye, B.A. Farm management information systems: Current situation and future perspectives. Comput. Electron. Agric. 2015, 115, 40–50. [Google Scholar] [CrossRef]
- Nabi, F.; Jamwal, S.; Padmanbh, K. Wireless sensor network in precision farming for forecasting and monitoring of apple disease: A survey. Int. J. Inf. Technol. 2020, 14, 769–780. [Google Scholar] [CrossRef]
- Rossel, R.V.; McBratney, A.B. Laboratory evaluation of a proximal sensing technique for simultaneous measurement of soil clay and water content. Geoderma 1998, 85, 19–39. [Google Scholar] [CrossRef]
- Kashyap, B.; Kumar, R. Sensing Methodologies in Agriculture for Soil Moisture and Nutrient Monitoring. IEEE Access 2021, 9, 14095–14121. [Google Scholar] [CrossRef]
- Futagawa, M.; Iwasaki, T.; Murata, H.; Ishida, M.; Sawada, K. A Miniature Integrated Multimodal Sensor for Measuring pH, EC and Temperature for Precision Agriculture. Sensors 2012, 12, 8338–8354. [Google Scholar] [CrossRef] [PubMed]
- Ramson, S.J.; Vishnu, S.; Shanmugam, M. Applications of Internet of Things (IoT)—An Overview. In Proceedings of the 2020 5th International Conference on Devices, Circuits and Systems (ICDCS), Coimbatore, India, 5–6 March 2020. [Google Scholar]
- Pathinarupothi, R.K.; Durga, P.; Rangan, E.S. IoT-Based Smart Edge for Global Health: Remote Monitoring with Severity Detection and Alerts Transmission. IEEE Internet Things J. 2018, 6, 2449–2462. [Google Scholar] [CrossRef]
- Fortino, G.; Russo, W.; Savaglio, C.; Viroli, M.; Zhou, M. Modeling Opportunistic IoT Services in Open IoT Ecosystems. WOA 2017, 90–95. [Google Scholar]
- Kuang, B.; Mahmood, H.S.; Quraishi, M.Z.; Hoogmoed, W.B.; Mouazen, A.M.; van Henten, E.J. Sensing Soil Properties in the Laboratory, In Situ, and On-Line. Adv. Agron. 2012, 114, 155–224. [Google Scholar]
- Ramson, S.J.; Moni, D.J. Wireless sensor networks based smart bin. Comput. Electr. Eng. 2017, 64, 337–353, S0045790616309065. [Google Scholar] [CrossRef]
- Madhura, U.; Akshay, P.; Bhattad, A.J.; Nagaraja, G. Soil Quality Management Using Wireless Sensor Network. 2018. In Proceedings of the 2017 2nd International Conference on Computational Systems and Information Technology for Sustainable Solution (CSITSS), Bengaluru, India, 21–23 December 2017. [Google Scholar]
- Villalba, G.; Plaza, F.; Zhong, X.; Davis, T.W.; Navarro, M.; Li, Y.; Slater, T.A.; Liang, Y.; Liang, X. A Networked Sensor System for the Analysis of Plot-Scale Hydrology. Sensors 2017, 17, 636. [Google Scholar] [CrossRef]
- Estrada-López, J.J.; Castillo-Atoche, A.A.; Vázquez-Castillo, J.; Sánchez-Sinencio, E. Smart Soil Parameters Estimation System Using an Autonomous Wireless Sensor Network with Dynamic Power Management Strategy. IEEE Sens. J. 2018, 19, 8913–8923. [Google Scholar] [CrossRef]
- Roy, A.; Barman, K. An Adaptive Technique For Soil Moister Control and Nutrient Monitoring Using Wireless Sensor Network. Think India J. 2019, 22, 1558–1564. [Google Scholar]
- Vieira, R.G.; Da Cunha, A.M.; Ruiz, L.B.; De Camargo, A. On the Design of a Long Range WSN for Precision Irrigation. IEEE Sens. J. 2017, 18, 773–780. [Google Scholar] [CrossRef]
- Kuang, Y.; Shen, Y.; Lu, L.; Li, G. Farmland Monitoring System Based on Cloud Platform. In Proceedings of the 2019 IEEE 8th Joint International Information Technology and Artificial Intelligence Conference (ITAIC), Chongqing, China, 24–26 May 2019. [Google Scholar]
- Rachmani, A.F.; Zulkifli, F.Y. Design of IoT Monitoring System Based on LoRa Technology for Starfruit Plantation. In Proceedings of the TENCON 2018-2018 IEEE Region 10 Conference, Jeju Island, Republic of Korea, 28–31 October 2018. [Google Scholar]
- Davcev, D.; Mitreski, K.; Trajkovic, S.; Nikolovski, V.; Koteli, N. IoT agriculture system based on LoRaWAN. In Proceedings of the 2018 14 th IEEE International Workshop on Factory Communication Systems (WFCS), Imperia, Italy, 13–15 June 2018; pp. 1–4. [Google Scholar]
- Gia, T.N.; Qingqing, L.; Queralta, J.P.; Zou, Z.; Tenhunen, H.; Westerlund, T. Edge AI in Smart Farming IoT: CNNs at the Edge and Fog Computing with LoRa. In Proceedings of the 2019 IEEE AFRICON, Accra, Ghana, 25–27 September 2019. [Google Scholar]
- Bishop, M.P.; James, L.A.; Shroder, J.F., Jr.; Walsh, S.J. Geospatial technologies and digital geomorphological mapping: Concepts, issues and research. Geomorphology 2012, 137, 5–26. [Google Scholar] [CrossRef]
- Alrajeh, N.A.; Bashir, M.; Shams, B. Localization Techniques in Wireless Sensor Networks. Int. J. Distrib. Sens. Netw. 2013, 9, 304628. [Google Scholar] [CrossRef]
- Gaikwad, S.V.; Vibhute, A.D.; Kale, K.V.; Nalawade, D.B.; Jadhav, M.B. Design and Development of Ground Truth Collection Platform Using Android and Leaflet Library. In Proceedings of the Recent Trends in Image Processing and Pattern Recognition: Second International Conference, Solapur, India, 21–22 December 2018. [Google Scholar]
- Sawant, S.; Durbha, S.S.; Jagarlapudi, A. Interoperable agro-meteorological observation and analysis platform for precision agriculture: A case study in citrus crop water requirement estimation—ScienceDirect. Comput. Electron. Agric. 2017, 138, 175–187. [Google Scholar] [CrossRef]
- Ramadan, K.M.; Oates, M.J.; Molina-Martinez, J.M.; Ruiz-Canales, A. Design and implementation of a low cost photovoltaic soil moisture monitoring station for irrigation scheduling with different frequency domain analysis probe structures. Comput. Electron. Agric. 2017, 148, 148–159. [Google Scholar] [CrossRef]
- Mesas-Carrascosa, F.J.; Santano, D.V.; Meroño, J.E.; De La Orden, M.S.; García-Ferrer, A. Open source hardware to monitor environmental parameters in precision agriculture. Biosyst. Eng. 2015, 137, 73–83. [Google Scholar] [CrossRef]
- Cui, L.; Yang, S.; Chen, F.; Ming, Z.; Lu, N.; Qin, J. A survey on application of machine learning for Internet of Things. Int. J. Mach. Learn. Cybern. 2018, 9, 1399–1417. [Google Scholar] [CrossRef]
- Shokati, H.; Mashal, M.; Noroozi, A.; Abkar, A.A.; Mirzaei, S.; Mohammadi-Doqozloo, Z.; Taghizadeh-Mehrjardi, R.; Khosravani, P.; Nabiollahi, K.; Scholten, T. Random Forest-Based Soil Moisture Estimation Using Sentinel-2, Landsat-8/9, and UAV-Based Hyperspectral Data. Remote Sens. 2024, 16, 1962. [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. Discuss. 2024, 28, 917–943. [Google Scholar] [CrossRef]
- Li, D.; Mei, H.; Shen, Y.; Su, S.; Zhang, W.; Wang, J.; Zu, M.; Chen, W. ECharts: A declarative framework for rapid construction of web-based visualization. Vis. Inform. 2018, 2, 11. [Google Scholar] [CrossRef]
- Suryotrisongko, H.; Jayanto, D.P.; Tjahyanto, A. Design and Development of Backend Application for Public Complaint Systems Using Microservice Spring Boot. Procedia Comput. Sci. 2017, 124, 736–743. [Google Scholar] [CrossRef]
- Draper, N.R. Applied regression analysis. Technometrics 1998, 9, 182–183. [Google Scholar]
- Quinlan, J.R. Induction of decision trees Machine Learning. Mach. Mediat. Learn. 1986, 1, 81–106. [Google Scholar] [CrossRef]
- Breiman, L. Random forests. In Machine Learning; Springer: Berlin/Heidelberg, Germany, 2001; Volume 45, pp. 5–32. [Google Scholar]
- Hochreiter, S.; Schmidhuber, J. Long Short-Term Memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef]
- Friedman, J.H. Greedy Function Approximation: A Gradient Boosting Machine. Ann. Stat. 2001, 29, 1189–1232. [Google Scholar] [CrossRef]
Model | Optimal Hyperparameters of the Model |
---|---|
Linear regression | ’alpha’: 0.00010000388939744078 |
Decision tree | ’max_depth’: 8, ’min_samples_split’: 7, ’min_samples_leaf’: 6 |
Random forest | ’n_estimators’: 296, ’max_depth’: 27, ’min_samples_split’: 2, ’min_samples_leaf’: 5 |
LSTM | ’hidden_size’: 227, ’learning_rate’: 0.004967542985882784, ’batch_size’: 18 |
GBDT | ’n_estimators’: 150, ’learning_rate’: 0.07622686624011799, ’max_depth’: 3, ’subsample’: 0.6000709412669746 |
Model | Model Evaluation Coefficient | ||
---|---|---|---|
MSE (%) | RMSE (%) | ||
Linear regression | 0.9178 | 0.00090 | 0.30 |
Decision tree | 0.8875 | 0.001225 | 0.35 |
Random forest | 0.8578 | 0.001521 | 0.39 |
LSTM | 0.8891 | 0.001156 | 0.34 |
GBDT | 0.9838 | 0.000169 | 0.13 |
Meta | 0.9787 | 0.000196 | 0.14 |
Model | Model Evaluation Coefficient | |
---|---|---|
RMSE (%) | MSE (%) | |
Linear regression | 3.08 | 0.10 |
Decision tree | 2.81 | 0.08 |
Random forest | 2.87 | 0.08 |
LSTM | 2.98 | 0.09 |
GBDT | 2.85 | 0.08 |
Meta | 2.85 | 0.08 |
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
Ou, G.; Chen, Y.; Han, Y.; Sun, Y.; Zheng, S.; Ma, R. Design and Experiment of an Internet of Things-Based Wireless System for Farmland Soil Information Monitoring. Agriculture 2025, 15, 467. https://doi.org/10.3390/agriculture15050467
Ou G, Chen Y, Han Y, Sun Y, Zheng S, Ma R. Design and Experiment of an Internet of Things-Based Wireless System for Farmland Soil Information Monitoring. Agriculture. 2025; 15(5):467. https://doi.org/10.3390/agriculture15050467
Chicago/Turabian StyleOu, Guanting, Yu Chen, Yunlei Han, Yunuo Sun, Shunan Zheng, and Ruijun Ma. 2025. "Design and Experiment of an Internet of Things-Based Wireless System for Farmland Soil Information Monitoring" Agriculture 15, no. 5: 467. https://doi.org/10.3390/agriculture15050467
APA StyleOu, G., Chen, Y., Han, Y., Sun, Y., Zheng, S., & Ma, R. (2025). Design and Experiment of an Internet of Things-Based Wireless System for Farmland Soil Information Monitoring. Agriculture, 15(5), 467. https://doi.org/10.3390/agriculture15050467