Machine Learning-Based Forecasting of Wastewater Inflow During Rain Events at a Spanish Mediterranean Coastal WWTPs
Forecasting influent flow in Wastewater Treatment Plants (WWTPs) is critical for managing operational risks during flash floods, especially in Spain’s Mediterranean coastal regions. These facilities, essential for public health and environmental protection, are vulnerable to abrupt inflow surges caused by heavy rainfall. This study proposes a data-driven approach combining historical flow and rainfall data to predict short-term inflow dynamics. Several models were evaluated, including Random Forest, XGBoost, CatBoost, and LSTM, using metrics such as Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and R-squared (R2). XGBoost outperformed the others, particularly under severe class imbalance, with only 1% of the data representing rainfall events. Hyperparameter tuning and input window size analysis revealed that accurate predictions are achievable with just 14 days of training data from a 10-year (2012–2022) dataset sourced from a single WWTP and on-site weather station. The proposed framework supports proactive WWTP management during extreme weather events.
Authors
- Sergio Chiva (ORCID: https://orcid.org/0000-0001-6345-2950)
- Sergio Iserte (ORCID: https://orcid.org/0000-0003-3654-7924)
- Guillem Monrós-Andreu (ORCID: https://orcid.org/0000-0003-4035-0489)
- Raúl Martı́nez-Cuenca (ORCID: https://orcid.org/0000-0001-5955-3441)
- Jaume Luis-Gómez (ORCID: https://orcid.org/0000-0002-5347-6710)
- Maribel Castillo (ORCID: https://orcid.org/0000-0002-2826-3086)
- Alejandro González Barberá (ORCID: https://orcid.org/0009-0001-1497-1233)
Institutions
- Universitat Jaume I (ES)
- Barcelona Supercomputing Center (ES)
- Universitat Politècnica de Catalunya (ES)
Publication Details
- Journal
- Water
- Published
- 2025-11-11
- DOI
- https://doi.org/10.3390/w17223225
- Citations
- 2
- Primary Topic
- Hydrological Forecasting Using AI
- Type
- article
- Field-Weighted Citation Impact
- 1.60
Funders
- Barcelona Supercomputing Center