Abstract
With the advent of wireless sensor networks, the ability to predict nutrient-rich discharges, using on-node prediction models, offers huge potential for enabling real-time water reuse and management within an agriculturally dominated catchment. Existing discharge models use multiple parameters and large historical data which are difficult to extract and this, coupled with constraints on network nodes (battery life, computing power, and sensor availability), makes it necessary to develop low-dimensional models. This paper investigates a data-driven model for predicting daily total oxidized nitrate fluxes and reduces the number of model parameters used to 5—a reduction of at least 50%. Trained on only a 12-month training dataset derived from the published measured data, results for the model generated using an M5 decision tree, giving an $R^2$ of 0.92 and a relative root-mean-square error of 26%. The 80% of the residuals for test data falls within $\pm 0.05$ kg/ha/day error range, which is minimal, offering an improvement over results obtained by contemporary research.
Introduction
Nitrogen fertilizers are indispensable for maintaining high crop yields in modern agriculture. However, their use comes with a significant environmental cost: approximately 30% to 50% of applied nitrogen is lost through leaching and drainage. This nitrate loss is a primary driver of eutrophication, leading to harmful algal blooms and the contamination of drinking water supplies.
To mitigate these effects, proactive farm management requires real-time monitoring and prediction of nitrate discharge. While traditional bio-geochemical models exist, they are often "heavy," requiring dozens of complex parameters—such as soil redox potential or microbial activity—and extensive historical datasets. Such requirements are incompatible with the hardware constraints of Wireless Sensor Networks (WSNs), where individual nodes operate with limited battery life, processing power, and memory. This research addresses this gap by developing a low-dimensional, data-driven model capable of high-accuracy predictions with minimal, easily measurable inputs.
Methodology: Model Abstraction and the M5 Algorithm
The researchers adopted a strategy of model abstraction to bridge the gap between complex environmental simulations and the limitations of edge computing. By systematically identifying and selecting the most influential parameters, the input space was reduced from over 20 variables down to a core set of 5 to 8 key features.
The core of the predictive engine is the M5 Decision Tree algorithm. Unlike standard regression trees that assign a single constant value to each leaf node, the M5 algorithm builds a linear regression model at each leaf. This hybrid approach allows the model to capture complex, non-linear global relationships by approximating them as a series of local linear functions. This architecture is particularly well-suited for environmental data and is computationally efficient enough to run directly on WSN nodes.
Key features introduced to enhance the model include:
- Seasonality: The "Day of the Year" was included to capture strong seasonal cycles in nitrate loss, which often outweigh the immediate impact of fertilizer application.
- Soil Moisture Proxy: In the absence of direct sensor data, a "last-five-day-rainfall" metric was utilized as an effective proxy for soil moisture levels.
Data and Experimental Setup
The model was trained and validated using a high-resolution dataset from the Dripsey catchment in County Cork, Ireland. The data encompassed 12 months of observations from a 17-hectare agricultural site. Precipitation and Total Oxidized Nitrogen (TON) concentrations were recorded at 30-minute intervals. For the purposes of this study, these high-frequency readings were aggregated into daily loads (kg/ha/day) to align with practical daily farm management decision-making.
Results and Performance
The optimized M5 model demonstrated exceptional predictive power despite its reduced complexity. Key performance metrics include:
- Predictive Accuracy: The model achieved an $R^2$ of 0.92 and a Relative Root-Mean-Square Error (RRMSE) of 26%.
- Residual Analysis: 80% of the residuals for the test data fell within a narrow range of $\pm 0.05$ kg/ha/day, indicating very high precision.
- Comparative Advantage: The model outperformed existing meta-models (which typically reach $R^2 \approx 0.82$) while requiring significantly fewer training samples and input parameters.
- Robustness: 10-fold cross-validation confirmed the model's stability, maintaining an $R^2$ of 0.72 even under rigorous testing scenarios.
Conclusion and Future Work
This study proves that high-accuracy nitrate loss prediction does not necessitate high-dimensional complexity. By focusing on abstracted features like precipitation, fertilizer timing, and seasonality, the M5-based model enables real-time, on-node forecasting within WSNs.
While the results are promising, the authors note that the model's current site-specific nature (trained on Irish catchment data) requires further validation across diverse climates and soil types. Future iterations may also benefit from the integration of direct soil moisture sensors as they become more cost-effective. Ultimately, this low-complexity approach paves the way for smarter, more responsive agricultural management systems that protect water quality without compromising productivity.
Summary updated