Related Experiment Video
Updated: Jan 15, 2026

Author Spotlight: AI-Driven Trypanosome Species Detection from Microscopic Images
Published on: October 27, 2023
Predictive modelling and optimization of electrocoagulation for nitrate removal using deep learning: Toward
Harun Çiğ1, Fatma Didem Alay2, Benan Yazıcı Karabulut3
1Department of Software Engineering, Engineering Faculty, Harran University, 63300 Sanliurfa, Türkiye.
Abstract:
This study investigates the optimization of the electrocoagulation (EC) process for nitrate (NO₃-) removal from synthetic wastewater through the application of advanced deep learning methodologies. A hybrid model integrating Convolutional Neural Networks (CNN) and Long Short-Term Memory (LSTM) networks was developed to exploit both spatial feature extraction and temporal sequence learning capabilities. The synergy of CNN and LSTM enabled more accurate modelling of the complex, time-dependent behaviour of the EC process. Electrocoagulation (EC) was further optimized using a Box-Behnken design to evaluate the effects of six key variables-pH, initial NO₃- concentration, conductivity, voltage, current, and reaction time-on NO₃- removal efficiency. The resulting statistical model, supported by high coefficient values, demonstrated strong predictive capability for estimating NO₃- removal performance. Model performance was systematically enhanced through hyperparameter tuning using the Random Search algorithm, while the Early Stopping technique was employed to prevent overfitting. Several machine learning and deep learning models were constructed and comparatively evaluated based on established performance metrics, including MSE, RMSE, MAE, MAPE, and R2. The XGBoost model demonstrated superior predictive performance, yielding the lowest values for MSE (44.77), RMSE (6.69), and MAE (4.93). Furthermore, the high R2 (0.96) and adjusted R2 (0.94) values indicate that the model effectively captured a substantial proportion of the variance within the dataset. However, the CNN-LSTM hybrid model also showed excellent performance and was ultimately identified as the most effective deep learning approach due to its ability to capture spatiotemporal dynamics. Beyond predictive performance, the study also addressed energy consumption and operational cost analyses, contributing to a holistic evaluation of system sustainability. The average costs were calculated as $0.46/m3 for Al, $0.55/m3 for Fe, and $0.25/m3 for the Al/Fe combination electrodes. Accordingly, an optimized system design was proposed to maximize NO₃- removal efficiency, minimize energy usage, and promote environmentally sustainable practices. In 5-fold cross-validation, XGBoost achieved the highest accuracy (R2 = 0.932 ± 0.051), while CNN-LSTM showed comparable reliability but lower performance (R2 = 0.886 ± 0.056). The paired Wilcoxon test yielded p = 0.0679, indicating a borderline, non-significant difference. The results underscore the potential of hybrid deep learning architectures in environmental modelling and provide a robust framework for the development of intelligent, cost-effective, and green water treatment technologies.