Research topic
Research topic is related to evaluation of sensor data attribute relations and sensor reading forecasts that could be used as a foundation for reducing the necessary physical devices to take the necessary agricultural environment measurements [1].
Research question and problem definition
After discussions with field experts, the main research question was formulated: Based on previously gathered greenhouse environmental sensor data (Leaf Temperature by Infrared sensor collected during summer of 2022), is it possible to estimate soil characteristics for example measurements like:
- Dielectric permittivity (DP)
- Volumetric water content (VWC)
- Electrical conductivity (EC)
- Soil temperature
Research plan
To answer the research question, a plan was created and included the following steps:
- Identify research topic and questions
- Find, extract and prepare sensor data from cloud data storage
- Clean the data, handle empty values, group and normalize the data
- Give first conclusions about the data relations
- Experiment with sensor data forecasts
- Evaluate results and give conclusions
Data preparation for analysis
The initial data was looked up by using Postman api tool where the request collection was created. During a period of 8 days (2022-06-21 until 2022-06-28) and 60000 measurements in total the data was extracted with python requests.
The data was extracted from cloud api and saved in multiple csv files and later merged for further processing and analysis. During merging the dataset was resampled to 15 minute intervals where average measurement value was used.
To clean the data the missing values were removed because they were both at the beginning and end of the dataset. Further the outliers were removed using the Z-score method and the data were normalized.
Data correlation
Correlation was used as one of the data relation analysis methods to see how all the attributes compares to each other. The following result was obtained in a form of correlation score matrix heatmap:
The result suggests that there exists a correlation between air temperature, leaf temperature and somw of the soil characteristics, so it was decided to continue with the evaluation of soil property forecasting.
Evaluation of data forecasting
As already described in previous studies, one of the well established and proven forecasting methods for time series is LSTM [2]. LSTM or Long Short term memory models stores information in memory and usually defining which part of memory can be accessed at which time is the integral part of LSTM models [3].
The following LSTM models were implemented to estimate soil temperature and dielectric permitivity:
The LSTM model was implemented and afterwards tuned to find optimal hyperparameters for this scenario using RandomSearch. Total of 10 epochs seemed to give the most accurate results in this case.
Results and conclusions
The results show that the Soil temperature forecast is the most accurate:
When forecasting the soil dielectric permittivity the result sas a bit less accurate, but still can give an insight into soil properties.
The results suggest that, depending on the quality of the data, we can get a certain forecast precision which has the potential to substitute some of the physical device measurements.
References
[1] A. Kempelis, A. Romanovs and A. Patlins, "Using Computer Vision and Machine Learning Based Methods for Plant Monitoring in Agriculture: A Systematic Literature Review," 2022 63rd International Scientific Conference on Information Technology and Management Science of Riga Technical University (ITMS), Riga, Latvia, 2022, pp. 1-6, doi: 10.1109/ITMS56974.2022.9937119.[2] A. Kempelis, M. Narigina, E. Osadcijs, A. Patlins and A. Romanovs "Machine Learning based Sensor Data Forecasting for Precision Evaluation of Environmental Sensing" 2023 The 10th Jubilee IEEE Workshop on Advances in Information, Electronic and Electrical Engineering (AIEEE), Vilnius, Lithuania, 2023, pp.
[3] S. Chen, R. Lin and W. Zeng, "Short-Term Load Forecasting Method Based on ARIMA and LSTM," 2022 IEEE 22nd International Conference on Communication Technology (ICCT), Nanjing, China, 2022, pp. 1913-1917, doi: 10.1109/ICCT56141.2022.10073051.