{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,13]],"date-time":"2026-10-13T22:51:35Z","timestamp":1791931895204,"version":"4.3.4"},"reference-count":47,"publisher":"MDPI AG","issue":"6","license":[{"start":{"date-parts":[[2025,3,8]],"date-time":"2025-03-08T00:00:00Z","timestamp":1741392000000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"Ministry of Research, Innovation and Digitization, CCCDI\u2014UEFISCDI","award":["PN-IV-P7-7.1-PED-2024-0910"],"award-info":[{"award-number":["PN-IV-P7-7.1-PED-2024-0910"]}]},{"name":"Ministry of Research, Innovation and Digitization, CCCDI\u2014UEFISCDI","award":["RO50411550"],"award-info":[{"award-number":["RO50411550"]}]},{"name":"\u201cDun\u0103rea de Jos\u201d University of Gala\u021bi","award":["PN-IV-P7-7.1-PED-2024-0910"],"award-info":[{"award-number":["PN-IV-P7-7.1-PED-2024-0910"]}]},{"name":"\u201cDun\u0103rea de Jos\u201d University of Gala\u021bi","award":["RO50411550"],"award-info":[{"award-number":["RO50411550"]}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Sensors"],"abstract":"<jats:p>Maintaining effluent quality in wastewater treatment plants (WWTPs) comes with significant challenges under variable weather conditions, where sudden changes in flow rate and increased pollutant loads can affect treatment performance. Traditional physical sensors became both expensive and susceptible to failure under extreme conditions. In this study, we evaluate the performance of soft sensors based on artificial intelligence (AI) to predict the components underlying the calculation of the effluent quality index (EQI). We thus focus our study on three ML models: Long Short-Term Memory (LSTM), Gated Recurrent Unit (GRU) and Transformer. Using the Benchmark Simulation Model no. 2 (BSM2) as the WWTP, we were able to obtain datasets for training the ML models and to evaluate their performance in dry weather scenarios, rainy episodes, and storm events. To improve the classification of networks according to the type of weather, we developed a Random Forest (RF)-based meta-classifier. The results indicate that for dry weather conditions the Transformer network achieved the best performance, while for rain episodes and storm scenarios the GRU was able to capture sudden variations with the highest accuracy. LSTM performed normally in stable conditions but struggled with rapid fluctuations. These results support the decision to integrate AI-based predictive models in WWTPs, highlighting the top performances of both a recurrent network (GRU) and a feed-forward network (Transformer) in obtaining effluent quality predictions under different weather conditions.<\/jats:p>","DOI":"10.3390\/s25061692","type":"journal-article","created":{"date-parts":[[2025,3,10]],"date-time":"2025-03-10T05:46:52Z","timestamp":1741585612000},"page":"1692","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":27,"title":["Evaluating Machine Learning-Based Soft Sensors for Effluent Quality Prediction in Wastewater Treatment Under Variable Weather Conditions"],"prefix":"10.3390","volume":"25","author":[{"ORCID":"https:\/\/orcid.org\/0009-0001-8109-2888","authenticated-orcid":false,"given":"Daniel","family":"Voipan","sequence":"first","affiliation":[{"name":"Department of Computer Science and Information Technology, \u2018Dunarea de Jos\u2019 University of Galati, 800008 Galati, Romania"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0005-9106-6076","authenticated-orcid":false,"given":"Andreea Elena","family":"Voipan","sequence":"additional","affiliation":[{"name":"Department of Automation, \u2018Dunarea de Jos\u2019 University of Galati, 800008 Galati, Romania"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-6645-3705","authenticated-orcid":false,"given":"Marian","family":"Barbu","sequence":"additional","affiliation":[{"name":"Department of Automation, \u2018Dunarea de Jos\u2019 University of Galati, 800008 Galati, Romania"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"1968","published-online":{"date-parts":[[2025,3,8]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","first-page":"168388","DOI":"10.1016\/j.scitotenv.2023.168388","article-title":"Impacts of climate change on the fate of contaminants through extreme weather events","volume":"909","author":"Bolan","year":"2023","journal-title":"Sci. Total Environ."},{"key":"ref_2","doi-asserted-by":"crossref","unstructured":"Silva, J.A. (2023). Wastewater Treatment and Reuse for Sustainable Water Resources Management: A Systematic Literature Review. Sustainability, 15.","DOI":"10.3390\/su151410940"},{"key":"ref_3","doi-asserted-by":"crossref","first-page":"100112","DOI":"10.1016\/j.nexus.2022.100112","article-title":"The role of wastewater treatment in achieving sustainable development goals (SDGs) and sustainability guideline","volume":"7","author":"Obaideen","year":"2022","journal-title":"Energy Nexus"},{"key":"ref_4","doi-asserted-by":"crossref","first-page":"119230","DOI":"10.1016\/j.jenvman.2023.119230","article-title":"A systematic review of industrial wastewater management: Evaluating challenges and enablers","volume":"348","author":"Singh","year":"2023","journal-title":"J. Environ. Manag."},{"key":"ref_5","doi-asserted-by":"crossref","unstructured":"Capodaglio, A.G., and Callegari, A. (2025). Use, Potential, Needs, and Limits of AI in Wastewater Treatment Applications. Water, 17.","DOI":"10.3390\/w17020170"},{"key":"ref_6","doi-asserted-by":"crossref","first-page":"100524","DOI":"10.1016\/j.dwt.2024.100524","article-title":"Prediction of wastewater treatment plant performance through machine learning techniques","volume":"319","author":"Mahanna","year":"2024","journal-title":"Desalin. Water Treat."},{"key":"ref_7","doi-asserted-by":"crossref","first-page":"791","DOI":"10.1111\/wej.12670","article-title":"Design and evaluation of advanced automatic control strategies in a total nitrogen removal activated sludge plant","volume":"35","author":"Tejaswini","year":"2020","journal-title":"Water Environ. J."},{"key":"ref_8","doi-asserted-by":"crossref","first-page":"1107","DOI":"10.1016\/j.procbio.2008.06.002","article-title":"Real-time remote monitoring of small-scaled biological wastewater treatment plants by a multivariate statistical process control and neural network-based software sensors","volume":"43","author":"Lee","year":"2008","journal-title":"Process Biochem."},{"key":"ref_9","doi-asserted-by":"crossref","unstructured":"Zainurin, S.N., Wan Ismail, W.Z., Mahamud, S.N.I., Ismail, I., Jamaludin, J., Ariffin, K.N.Z., and Wan Ahmad Kamil, W.M. (2022). Advancements in Monitoring Water Quality Based on Various Sensing Methods: A Systematic Review. Int. J. Environ. Res. Public Health, 19.","DOI":"10.3390\/ijerph192114080"},{"key":"ref_10","doi-asserted-by":"crossref","first-page":"101930","DOI":"10.1016\/j.rineng.2024.101930","article-title":"Explainable machine learning methods for predicting water treatment plant features under varying weather conditions","volume":"21","author":"Saleem","year":"2024","journal-title":"Results Eng."},{"key":"ref_11","doi-asserted-by":"crossref","first-page":"67","DOI":"10.2166\/wst.2007.604","article-title":"Benchmark simulation model no 2: General protocol and exploratory case studies","volume":"56","author":"Jeppsson","year":"2007","journal-title":"Water Sci. Technol."},{"key":"ref_12","doi-asserted-by":"crossref","first-page":"653","DOI":"10.1016\/j.jclepro.2015.05.057","article-title":"Life Cycle Assessment as an environmental evaluation tool for control strategies in wastewater treatment plants","volume":"107","author":"Meneses","year":"2015","journal-title":"J. Clean. Prod."},{"key":"ref_13","doi-asserted-by":"crossref","first-page":"65","DOI":"10.2166\/wst.2006.773","article-title":"Benchmark Simulation Model No 2 in Matlab-Simulink: Towards plant-wide WWTP control strategy evaluation","volume":"54","author":"Vrecko","year":"2006","journal-title":"Water Sci. Technol."},{"key":"ref_14","doi-asserted-by":"crossref","first-page":"108562","DOI":"10.1016\/j.ecolind.2022.108562","article-title":"The pollution scale weighting model in water quality evaluation based on the improved fuzzy variable theory","volume":"135","author":"Zeng","year":"2022","journal-title":"Ecol. Indic."},{"key":"ref_15","doi-asserted-by":"crossref","first-page":"108982","DOI":"10.1016\/j.compchemeng.2024.108982","article-title":"Knowledge-enhanced data-driven modeling of wastewater treatment processes for energy consumption prediction","volume":"194","author":"Allen","year":"2025","journal-title":"Comput. Chem. Eng."},{"key":"ref_16","doi-asserted-by":"crossref","first-page":"1","DOI":"10.2166\/wst.2013.246","article-title":"Benchmark simulation models, quo vadis?","volume":"68","author":"Jeppsson","year":"2013","journal-title":"Water Sci. Technol."},{"key":"ref_17","doi-asserted-by":"crossref","first-page":"1912","DOI":"10.2166\/wst.2012.089","article-title":"Global sensitivity analysis of the BSM2 dynamic influent disturbance scenario generator","volume":"65","author":"Gernaey","year":"2012","journal-title":"Water Sci. Technol."},{"key":"ref_18","doi-asserted-by":"crossref","first-page":"474","DOI":"10.2166\/wst.2024.213","article-title":"Exploring the effects of faults on the performance of a biological wastewater treatment process","volume":"90","author":"Ivan","year":"2024","journal-title":"Water Sci. Technol."},{"key":"ref_19","doi-asserted-by":"crossref","first-page":"1255","DOI":"10.1016\/j.envsoft.2011.06.001","article-title":"Dynamic influent pollutant disturbance scenario generation using a phenomenological modelling approach","volume":"26","author":"Gernaey","year":"2011","journal-title":"Environ. Model. Softw."},{"key":"ref_20","unstructured":"Pisa, I., Santin, I., Vicario, J.L., Morell, A., and Vilanova, R. (2019, January 2\u20136). Data Preprocessing for ANN-based Industrial Time-Series Forecasting with Imbalanced Data. Proceedings of the 2021 29th European Signal Processing Conference (EUSIPCO), A Coruna, Spain."},{"key":"ref_21","doi-asserted-by":"crossref","unstructured":"Cabello-Solorzano, K., De Araujo, I.O., Pe\u00f1a, M., Correia, L., and Tall\u00f3n-Ballesteros, A.J. (2023, January 5\u20137). The impact of data normalization on the accuracy of machine learning algorithms: A comparative analysis. Proceedings of the 18th International Conference on Soft Computing Models in Industrial and Environmental Applications (SOCO 2023), Salamanca, Spain. Lecture Notes in Networks and Systems.","DOI":"10.1007\/978-3-031-42536-3_33"},{"key":"ref_22","unstructured":"\u021a\u00eeru, A.E., Vasiliev, I., Diaconu, L., Vilanova, R., Voipan, D., and Ratnaweera, H. (2023, January 12\u201315). Integration of ANN for accurate estimation and control in wastewater treatment. Proceedings of the 2022 IEEE 27th International Conference on Emerging Technologies and Factory Automation (ETFA), Sinaia, Romania."},{"key":"ref_23","doi-asserted-by":"crossref","unstructured":"Pisa, I., Sant\u00edn, I., Vicario, J.L., Morell, A., and Vilanova, R. (2019). ANN-Based Soft Sensor to Predict Effluent Violations in Wastewater Treatment Plants. Sensors, 19.","DOI":"10.3390\/s19061280"},{"key":"ref_24","doi-asserted-by":"crossref","first-page":"21","DOI":"10.1016\/j.eng.2024.04.012","article-title":"Digital Twins for Wastewater Treatment: A technical review","volume":"36","author":"Wang","year":"2024","journal-title":"Engineering"},{"key":"ref_25","doi-asserted-by":"crossref","first-page":"102946","DOI":"10.1016\/j.mex.2024.102946","article-title":"A Critical review of RNN and LSTM variants in hydrological Time Series predictions","volume":"13","author":"Waqas","year":"2024","journal-title":"MethodsX"},{"key":"ref_26","doi-asserted-by":"crossref","first-page":"7691","DOI":"10.1109\/ACCESS.2018.2888585","article-title":"A novel Data-Driven model for Real-Time influenza Forecasting","volume":"7","author":"Venna","year":"2018","journal-title":"IEEE Access"},{"key":"ref_27","doi-asserted-by":"crossref","first-page":"184475","DOI":"10.1109\/ACCESS.2020.3030820","article-title":"Forecasting of Wastewater Treatment Plant Key Features Using Deep Learning-Based Models: A Case study","volume":"8","author":"Cheng","year":"2020","journal-title":"IEEE Access"},{"key":"ref_28","unstructured":"Voipan, D., Vasiliev, I., Diaconu, L., Voipan, A., and Barbu, M. (2024, January 10\u201312). Enhancing Effluent Quality Predictions in Wastewater Treatment with LSTM Neural Network. Proceedings of the 2022 26th International Conference on System Theory, Control and Computing (ICSTCC), Sinaia, Romania."},{"key":"ref_29","doi-asserted-by":"crossref","unstructured":"Raschka, S., Patterson, J., and Nolet, C. (2020). Machine Learning in Python: Main Developments and Technology Trends in Data Science, Machine Learning, and Artificial Intelligence. Information, 11.","DOI":"10.3390\/info11040193"},{"key":"ref_30","doi-asserted-by":"crossref","unstructured":"Cheng, H., and Ai, Q. (2023). A Cost Optimization Method Based on Adam Algorithm for Integrated Demand Response. Electronics, 12.","DOI":"10.3390\/electronics12234731"},{"key":"ref_31","doi-asserted-by":"crossref","unstructured":"Jierula, A., Wang, S., OH, T.-M., and Wang, P. (2021). Study on Accuracy Metrics for Evaluating the Predictions of Damage Locations in Deep Piles Using Artificial Neural Networks with Acoustic Emission Data. Appl. Sci., 11.","DOI":"10.3390\/app11052314"},{"key":"ref_32","doi-asserted-by":"crossref","unstructured":"Mienye, I.D., Swart, T.G., and Obaido, G. (2024). Recurrent Neural Networks: A Comprehensive Review of Architectures, Variants, and Applications. Information, 15.","DOI":"10.20944\/preprints202408.0748.v1"},{"key":"ref_33","doi-asserted-by":"crossref","unstructured":"Zarzycki, K., and \u0141awry\u0144czuk, M. (2021). LSTM and GRU Neural Networks as Models of Dynamical Processes Used in Predictive Control: A Comparison of Models Developed for Two Chemical Reactors. Sensors, 21.","DOI":"10.3390\/s21165625"},{"key":"ref_34","doi-asserted-by":"crossref","first-page":"749","DOI":"10.1007\/s11336-021-09823-9","article-title":"Transformer-Based deep neural language modeling for Construct-Specific Automatic item Generation","volume":"87","author":"Hommel","year":"2021","journal-title":"Psychometrika"},{"key":"ref_35","doi-asserted-by":"crossref","first-page":"111","DOI":"10.1016\/j.aiopen.2022.10.001","article-title":"A survey of transformers","volume":"3","author":"Lin","year":"2022","journal-title":"AI Open"},{"key":"ref_36","doi-asserted-by":"crossref","unstructured":"Gulshin, I., and Kuzina, O. (2024). Machine Learning Methods for the Prediction of Wastewater Treatment Efficiency and Anomaly Classification with Lack of Historical Data. Appl. Sci., 14.","DOI":"10.3390\/app142210689"},{"key":"ref_37","doi-asserted-by":"crossref","unstructured":"Vergni, L., and Todisco, F. (2023). A Random Forest Machine Learning Approach for the Identification and Quantification of Erosive Events. Water, 15.","DOI":"10.3390\/w15122225"},{"key":"ref_38","doi-asserted-by":"crossref","first-page":"e623","DOI":"10.7717\/peerj-cs.623","article-title":"The coefficient of determination R-squared is more informative than SMAPE, MAE, MAPE, MSE and RMSE in regression analysis evaluation","volume":"7","author":"Chicco","year":"2021","journal-title":"PeerJ Comput. Sci."},{"key":"ref_39","doi-asserted-by":"crossref","first-page":"493","DOI":"10.1080\/21622515.2023.2242015","article-title":"Application of machine learning at wastewater treatment facilities: A review of the science, challenges and barriers by level of implementation","volume":"12","author":"Imen","year":"2023","journal-title":"Environ. Technol. Rev."},{"key":"ref_40","unstructured":"Liu, L., Liu, J., and Han, J. (2021). Multi-head or single-head? An empirical comparison for transformer training. arXiv."},{"key":"ref_41","doi-asserted-by":"crossref","first-page":"117275","DOI":"10.1016\/j.eswa.2022.117275","article-title":"A multi-head attention-based transformer model for traffic flow forecasting with a comparative analysis to recurrent neural networks","volume":"202","author":"Reza","year":"2022","journal-title":"Expert Syst. Appl."},{"key":"ref_42","doi-asserted-by":"crossref","first-page":"55","DOI":"10.1007\/s44163-024-00151-2","article-title":"Challenges with developing and deploying AI models and applications in industrial systems","volume":"4","author":"Sinha","year":"2024","journal-title":"Discov. Artif. Intell."},{"key":"ref_43","doi-asserted-by":"crossref","first-page":"13521","DOI":"10.1007\/s10462-023-10466-8","article-title":"Deep learning modelling techniques: Current progress, applications, advantages, and challenges","volume":"56","author":"Ahmed","year":"2023","journal-title":"Artif. Intell. Rev."},{"key":"ref_44","doi-asserted-by":"crossref","first-page":"110132","DOI":"10.1016\/j.engappai.2025.110132","article-title":"Insights into the application of explainable artificial intelligence for biological wastewater treatment plants: Updates and perspectives","volume":"144","author":"Sheik","year":"2025","journal-title":"Eng. Appl. Artif. Intell."},{"key":"ref_45","doi-asserted-by":"crossref","unstructured":"Cao, K., Zhang, T., and Huang, J. (2024). Advanced hybrid LSTM-transformer architecture for real-time multi-task prediction in engineering systems. Sci. Rep., 14.","DOI":"10.1038\/s41598-024-55483-x"},{"key":"ref_46","doi-asserted-by":"crossref","first-page":"113396","DOI":"10.1016\/j.enbuild.2023.113396","article-title":"An improved feature-time Transformer encoder-Bi-LSTM for short-term forecasting of user-level integrated energy loads","volume":"297","author":"Yan","year":"2023","journal-title":"Energy Build."},{"key":"ref_47","doi-asserted-by":"crossref","first-page":"e2023WR035448","DOI":"10.1029\/2023WR035448","article-title":"Reducing the environmental impact of sewer network overflows using model Predictive Control strategy","volume":"60","author":"Vasiliev","year":"2024","journal-title":"Water Resour. Res."}],"container-title":["Sensors"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/1424-8220\/25\/6\/1692\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,9]],"date-time":"2025-10-09T16:49:32Z","timestamp":1760028572000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/1424-8220\/25\/6\/1692"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,3,8]]},"references-count":47,"journal-issue":{"issue":"6","published-online":{"date-parts":[[2025,3]]}},"alternative-id":["s25061692"],"URL":"https:\/\/doi.org\/10.3390\/s25061692","relation":{},"ISSN":["1424-8220"],"issn-type":[{"value":"1424-8220","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,3,8]]}}}