Operationalizing Nitrogen Compliance: A Leakage-Safe, Alarm-Budget Framework for Wastewater Treatment Early Warning
Alireza Mahvelati Shamsabadi, Morteza Mahvelatishamsabadi, Jinwoo Kim, Shokouh Masoumilari, Tejas Ravi Atri, Minwoo Park, Sudong Lee, Daeseung KyungAbstract
We developed a leakage-safe, alarm-budget framework for early warning of effluent total nitrogen (TNout) in a municipal wastewater treatment plant (WWTP) using multiyear daily records from Ulsan, Republic of Korea. The framework combined strict temporal feature construction, train-only preprocessing, horizon-specific target-date purging, and blocked chronological validation at 1-, 3-, and 5 day lead times. Models were evaluated by point-forecast error; at the 5 day lead, models were additionally assessed under nominal 5% and 10% alarm budgets that prioritized the highest-risk days for review at thresholds of 15–17 mg L–1. No single point model dominated across horizons: the lowest pooled mean absolute error (MAE) was 1.546 mg L–1 at 1 day for Persistence, 1.764 mg L–1 at 3 days for HistGradientBoostingRegressor (HGBR), and 1.773 mg L–1 at 5 days for Ridge. At the 5 day lead and a threshold of 16 mg L–1, retrospective fold-local ranking captured 18.3% and 31.0% of exceedances at nominal 5% and 10% alarm budgets, corresponding to approximately 3.5- and 3.1-fold enrichment over random ranking. A fixed rank ensemble remained competitive but did not dominate all operating points. These results show that compliance-oriented wastewater early warning models should be evaluated jointly for temporal validity, forecast accuracy, and bounded-attention decision utility.