Design and Development of a Configurable Framework for Soft Sensor Generation in Wastewater Treatment: A Case Study of BOD5 Prediction at the Sidi Merouane WWTP
No Thumbnail Available
Date
2026
Journal Title
Journal ISSN
Volume Title
Publisher
Faculty of Science
Abstract
The monitoring of wastewater quality is essential for the effective operation of
wastewater treatment plants and for the protection of receiving environments. Among the
main indicators used to assess organic pollution, the five-day biochemical oxygen demand
(BOD5) remains particularly important because it reflects the biodegradable organic load of
wastewater. However, the conventional determination of BOD5 requires a five-day
incubation period under controlled laboratory conditions. This delay limits its usefulness for
timely operational decision-making and prevents its direct use for rapid process monitoring.
Soft sensors provide a promising alternative by estimating difficult-to-measure
variables from other physicochemical parameters that are more readily available. In
wastewater treatment, machine learning models can learn the relationships between routinely
measured variables and BOD5, thereby providing rapid estimates that may support
monitoring and decision-making. Nevertheless, many existing studies focus on a single
model developed for a particular dataset and treatment plant. Such solutions are often
difficult to reproduce, adapt, compare, or extend to other target variables and operating
conditions.
This work proposes the design and implementation of a configurable framework for the
development of data-driven soft sensors in wastewater treatment. The framework supports
the main stages of the soft-sensor development process, including dataset preparation,
preprocessing, experimental configuration, regression-model training, performance
evaluation, model comparison, interpretation of results, and prediction using a selected
model. A functional prototype was implemented to demonstrate these capabilities.
The framework was validated through a case study involving BOD5 prediction at the
Sidi Merouane wastewater treatment plant in Algeria. Historical physicochemical data were
used to train and compare five regression models: Linear Regression, Random Forest
Regression, Extra Trees Regression, XGBoost, and CatBoost. Three experimental scenarios
were considered: the generation of a local BOD5 soft sensor, the comparison of candidate
models, and the evaluation of different input-variable combinations. CatBoost achieved the
best performance on the test set, with an R² of 0.9042, an RMSE of 1.5205 mg/L, and an
MAE of 1.1270 mg/L. SHAP-based analysis indicated that COD, specific conductivity, and
pH were among the most influential variables.
vii
The results demonstrate the feasibility of the proposed framework for developing BOD5
soft sensors from treatment-plant data. The prototype should be regarded as a decisionsupport
and experimentation tool; it does not replace laboratory analysis or constitute a live
operational deployment. Future work should focus on validation using multiple treatment
plants, chronological data splits, periodic retraining, and integration with real monitoring
systems.