2024 Global Conference on Process Safety and Big Data

Predicting Dissolved Oxygen Concentration in Wastewater Treatment Plants Using Machine Learning Techniques

Authors

?ahin, O., Turkish Petroleum Refineries Corporation
Yasmal, A., Turkish Petroleum Refineries Corporation
Sapmaz, A., Turkish Petroleum Refineries Corporation
Samur, M. O., Turkish Petroleum Refineries Corporation
Atlar, K., Turkish Petroleum Refineries Corporation
With the global population on the rise, the demand for water continues to escalate, necessitating more efficient utilization of water resources. Wastewater treatment plants (WWTPs) which consist of a series of physical, chemical, and biological treatment processes are installations established for the purification and restoration of water to reusable quality [1]. Refinery wastewater treatment involves a sequence of processes, starting with preliminary screening and continuing through primary oil-water separation, secondary biological treatment, and tertiary advanced filtration and disinfection, ultimately concluding with sludge treatment, all to comply with environmental laws, manage effluent sustainably and protect water sources [2].

This work focuses on predicting the dissolved oxygen concentration in the activated sludge pools of the biological treatment unit located in the wastewater treatment plant of an oil and gas refinery. Adequate oxygen levels are vital for the biological degradation process within activated sludge; any deficiency can hinder the effectiveness of microbial activity. By developing predictive algorithms, this study aims to identify potential operational issues proactively, leading to improved treatment efficiency and optimized resource utilization, including chemicals, support bacteria, and aeration systems. Another objective of this project is to address potential issues arising during the biological treatment process in the activated sludge tank by providing early warnings to operators and engineers without waiting for laboratory results. In this manner, the necessary conditions for the optimum oxygen concentration required by bacteria are predetermined. Consequently, this situation not only enhances operational efficiency and decreases associated costs but also contributes to the enhancement of water quality.

The complexity of wastewater treatment processes, characterized by the intricate interplay of physical, chemical, and biological factors, along with external influences such as weather conditions and wastewater composition, presents challenges for accurate modeling [1, 3]. Addressing these challenges requires comprehensive data analysis, in-depth understanding of system dynamics, and the application of advanced modeling techniques. In this comparative study, eight machine learning models were applied to a 2-year real time-series dataset. Their performances were evaluated based on 8-hour average data and 23 features. The developed models were trained, validated, and tested on real process data. In addition to this, principal component analysis (PCA) was utilized to elucidate data relationships, while Shapley additive explanations (SHAP) are used to measure the impact of input indicators on the prediction outcomes of the developed machine learning models. The accuracy of the models is evaluated through the calculation of three commonly used metrics: coefficient of determination (R2), mean squared error (MSE), and mean absolute error (MAE).

Following comprehensive analysis, the gated recurrent unit (GRU) model developed for predicting dissolved oxygen concentration demonstrated the most promising results, achieving an R2 value of 0.7, an MSE of 0.01, and an MAE of 0.07, making it the best model in this study (Table 1). This indicates its suitability as a soft sensor for online control and management systems in WWTPs. In summary, the GRU model provides an effective solution for predicting dissolved oxygen concentration in the complex processes of WWTPs. Although these predictions may be sufficient for better control of the system; for a such complex and nonlinear wastewater treatment system, future work could focus on enhancing the model’s performance. This could involve incorporating climate data or adding a new feature set to the dataset. Additionally, grid research could be conducted to adjust hyperparameters for each model.

Table 1. Comparison of accuracy metrics of machine learning prediction models for dissolved oxygen concentration.

Metrics/Models

GRU

LSTM

TCN

CNN

ANN

TCN-LSTM

CNN-LSTM

CNN-GRU

R2

0.685

0.601

0.055

0.081

-0.298

0.403

0.603

0.001

MSE

0.010

0.013

0.030

0.029

0.041

0.019

0.013

0.032

MAE

0.068

0.074

0.113

0.094

0.112

0.086

0.072

0.109

References

[1] Cheng, T., Harrou, F., Kadri, F., Sun, Y., & Leiknes, T. (2020). Forecasting of wastewater treatment plant key features using deep learning-based models: A case study. IEEE Access, 8, 184475-184485.

[2] Guo, H., Qin, Q., Hu, M., Chang, J., & Lee, D. (2024). Treatment of refinery wastewater: Current status and prospects. Journal of Environmental Chemical Engineering, 12(2), 112508. https://doi.org/10.1016/j.jece.2024.112508

[3] Mahanna, H., ELRahsidy, N., Kaloop, M. R., El-Sapakh, S., Alluqmani, A., & Hassan, R. (2024). Prediction of Wastewater Treatment Plant Performance through Machine Learning Techniques. Desalination and Water Treatment, 100524. https://doi.org/10.1016/j.dwt.2024.100524