Abstract
•One-day-ahead soft-sensing: process variables primary (R2=0.668); AR-only R2=−0.08.•RF Pareto-optimal (RMSE=1.73 mg/L); XGB/LGBM/GB equivalent (p_bonf ≥ 0.05 vs CB).•Eight-strategy ablation: best ensemble exceeds RF by 0.007 mg/L.•SHAP: COD top predictor (|SHAP|=1.01 mg/L); denitrification shift at ∼1000 mg/L.•Adaptive conformal: 90.5 % coverage (30–90 day windows); seasonal R2=0.620–0.741.
Accurate prediction of effluent total nitrogen (TN) is essential for stable biological nutrient removal and operational decision-making in wastewater treatment plants. This study proposes a temporally admissible and explainability-driven soft sensing framework for one-day-ahead prediction of effluent TN, in which every predictor is constructed exclusively from information available at or before the close of the previous operational day, eliminating any requirement for same-day TN measurement. The framework is validated using 1382 operational records from the Melbourne Western Treatment Plant. ASM2d-inspired feature engineering under strict non-anticipative constraints preserves biologically meaningful dynamics while formally prohibiting information leakage. Bayesian hyperparameter optimization combined with five-fold time-series cross-validation and a 346-day chronological hold-out enabled rigorous benchmarking across six machine learning models. Random forest (RF) achieved the best predictive performance (RMSE = 1.728 mg/L, R² = 0.673), with CatBoost statistically equivalent and recommended where calibration consistency is prioritized; these correspond to RMSE reductions of 39.1–57.1 % relative to persistence baselines. An eight-strategy ensemble ablation demonstrated that the best-performing ensemble strategy (uniform averaging, RMSE = 1.720 mg/L) outperforms the best standalone model by only 0.008 mg/L; operationally negligible, establishing a parsimony recommendation for standalone RF deployment. Feature-class ablation shows that process variables, not autoregressive persistence, are the primary predictive engine. SHAP analysis identified a denitrification-related chemical oxygen demand (COD) regime shift near 1000 mg/L, framed as a hypothesis-generating conditional association consistent with ASM2d stoichiometry. Adaptive rolling-window conformal prediction achieved 90.5–91.3 % empirical coverage, while seasonal analysis confirmed robust within-year consistency across all Southern Hemisphere seasons.