Abstract
Accurate estimation of key process variables is essential for effective monitoring and control in wastewater treatment plants (WWTPs), particularly when direct measurements are limited by noise, delays, or operational constraints. This study investigates machine learning–based prediction of nitrate concentration at the outlet of a pilot-scale denitrification reactor at the Veas wastewater treatment facility in Norway. Using high-resolution multivariate sensor data, the task is formulated as a data-driven state estimation problem in which outlet nitrate concentration is inferred from twelve process measurements capturing chemical, hydraulic, pressure, dosing, and thermal dynamics. A full year of operational data from October 2023 to September 2024 is used strictly for model training, while data from October 2024 to March 2025—representing future, unseen operating conditions—is used exclusively for evaluation. This provides a real-situation temporal test rather than a conventional cross-validation or holdout split, enabling a more realistic assessment of model generalization under operational variability. A broad range of modeling approaches is evaluated, including shallow regressors such as Elastic Net, Random Forest Regression, and Gradient Boosted Decision Trees. Traditional deep learning architectures for sequential data are also explored, including Recurrent Neural Networks (RNNs), Long Short-Term Memory networks (LSTMs), Gated Recurrent Units (GRUs), Temporal Convolutional Networks (TCNs), Deep AutoRegressive Networks (DeepAR), and Neural Basis Expansion Analysis for Time Series (N-BEATS). Finally, transformer-based modeling is examined using the Temporal Fusion Transformer (TFT), adapted in this study for regression by aligning the target with the input window. Across all experiments, the TFT achieves the strongest predictive accuracy, with a test RMSE of 1.7707, outperforming the best shallow model (RMSE 2.6018) and best traditional deep learning model (RMSE 2.8320). The results confirm that TFT models nonlinear and temporal dynamics more effectively than other approaches, enabling reliable nitrate state estimation in real WWTP operations.