Heliyon (Apr 2024)
Enhancing agricultural automation through weather invariant soil parameter prediction using machine learning
Abstract
Soil parameters are crucial aspects in increasing agricultural production. Even though Bangladesh is heavily dependent on agriculture, little research has been done regarding its automation. And a vital aspect of agricultural automation is predicting soil parameters. Generally, sensors relating to soil parameters are quite expensive and are often done in a controlled environment such as a greenhouse. However, a large scale implementation of such expensive sensors is not very feasible. This work tries to find an inexpensive solution towards predicting soil parameters such as soil moisture and temperature, both of which are crucial to the growth of crops. We focus on finding a robust relation between the above mentioned soil parameters with the nearby weather parameters such as humidity and temperature, irrespective of the weather. We apply different machine learning models like multilayer perceptron (MLP), random forest, etc. to predict the soil parameters, given the humidity and temperature of the surrounding environment. For all the experiments we have used a custom made dataset, which contains around 9000 datapoints of soil moisture & temperature, ambient humidity & temperature. The data has been collected in an uncontrolled agriculture bed via inexpensive sensors. Our results show that XGBoost regressor achieves the best results with an R2 score of 0.93 and 0.99 for soil moisture and soil temperature data respectively. This suggests very high correlation between the weather parameters and soil parameters. The model also portrayed a very low root mean squared error and mean absolute error of 0.037 & 0.015 for soil moisture and 0.001 & 0.0008 for soil temperature. Our results show that it is indeed possible to find the soil parameters from the corresponding weather, which will have great impact on mass agricultural automation. The dataset has been made publicly available at https://github.com/Nadimulhaque0403/Soil_parameter_prediction_dataset.