Irrigation water quality is crucial for sustainable agriculture and environmental health, influencing crop productivity and ecosystem balance globally. This study evaluates the performance of multiple deep learning models in classifying the Irrigation Water Quality Index (IWQI), addressing the challenge of accurate water quality prediction by examining the impact of increasing input complexity, particularly through chemical ions and derived quality indices. The models tested include convolutional neural networks (CNN), CNN-Long Short-Term Memory networks (CNN-LSTM), CNN-bidirectional Long Short-Term Memory networks (CNN-BiLSTM), and CNN-bidirectional Gated Recurrent Unit networks (CNN-BiGRUs). Feature selection via SHapley Additive exPlanations (SHAP) provided insights into individual feature contributions to the model predictions. The objectives were to compare the performance of 16 models and identify the most effective approach for accurate IWQI classification. This study utilized data from 166 wells in Algeria’s Naama region, with 70% of the data for training and 30% for testing. Results indicate that the CNN-BiLSTM model outperformed others, achieving an accuracy of 0.94 and an area under the curve (AUC) of 0.994. While CNN models effectively capture spatial features, they struggle with temporal dependencies—a limitation addressed by LSTM and BiGRU layers, which were further enhanced through bidirectional processing in the CNN-BiLSTM model. Feature importance analysis revealed that the quality index (qi) qi-Na was the most significant predictor in both Model 15 (0.68) and Model 16 (0.67). The quality index qi-EC showed a slight decrease in importance, from 0.19 to 0.18 between the models, while qi-SAR and qi-Cl maintained similar importance levels. Notably, Model 16 included qi-HCO3 with a minor importance score of 0.02. Overall, these findings underscore the critical role of sodium levels in water quality predictions and suggest areas for enhancing model performance. Despite the computational demands of the CNN-BiLSTM model, the results contribute to the development of robust models for effective water quality management, thereby promoting agricultural sustainability.
Smart irrigation systems utilising the Internet of Things (IoT) technology and sensory systems have emerged as a revolutionary approach to modernising agriculture and addressing sustainability challenges. The worldwide agricultural sector continues to struggle with two major problems, which include water resource depletion and high operational expenses because of outdated irrigation systems. The research investigates the immediate requirement for budget-friendly precision agriculture solutions that can serve small to medium farmers operating in limited resource areas. The paper describes the development of an affordable IoT-based smart irrigation system that underwent experimental testing. The system uses an ESP32 microcontroller as its core component while incorporating a capacitive soil moisture sensor for precise measurements, a DHT11 sensor for environmental data collection, and the Blynk IoT platform for live monitoring and distant system operation. The system begins irrigation when soil moisture reaches 20% and stops irrigation when moisture levels reach 80%. The system achieved operational success through field tests, which showed it used 25–35% less water than fixed-schedule irrigation systems while reducing operational expenses. The research proves that this affordable design can be duplicated and shows both technical and financial viability, which makes it an effective solution for sustainable farming practices.