Related Experiment Video
Updated: Jul 15, 2025

12:50
Continuous Instream Monitoring of Nutrients and Sediment in Agricultural Watersheds
Published on: September 26, 2017
11.3K
Development of a Soft Sensor Using Machine Learning Algorithms for Predicting the Water Quality of an Onsite
Hsiang-Yang Shyu1, Cynthia J Castro1, Robert A Bair1
1Civil & Environmental Engineering, University of South Florida, 4202 E. Fowler Avenue, Tampa, Florida 33620, United States.
ACS Environmental Au
|September 25, 2023
Summary
This study developed soft sensors using machine learning to predict key water quality parameters like chemical oxygen demand (COD) and total suspended solids (TSS) in real-time for onsite wastewater treatment systems (OWTS). While COD and TSS predictions were accurate, E. coli prediction requires further improvement.
Area of Science:
- Environmental Engineering
- Water Quality Monitoring
- Wastewater Treatment
Background:
- Onsite wastewater treatment systems (OWTS) require continuous monitoring for efficiency and compliance.
- Traditional off-line water quality analyses (COD, TSS, E. coli) are time-consuming and lack real-time data.
- Existing real-time COD analyzers are often too costly for OWTS.
Purpose of the Study:
- To design and implement a real-time remote monitoring system for OWTS.
- To develop multi-input, single-output soft sensors predicting key water quality parameters (COD, TSS, E. coli).
- To evaluate machine learning algorithms for predicting off-line parameters using in-line sensor data.
Main Methods:
- Developed soft sensors integrating data from in-line sensors (turbidity, color, pH, NH4+, NO3-, electrical conductivity).
- Utilized temporal and spatial water quality data from a field-tested OWTS (n=56).
- Evaluated four machine learning algorithms: PLS, SVR, CUB, and QRNN for prediction accuracy.
Main Results:
- Support Vector Regression (SVR) accurately predicted COD (MAPE 14.5%, R^2 0.96).
- Cubist regression (CUB) optimally predicted TSS (MAPE 24.8%, R^2 0.99).
- E. coli prediction was less accurate (CUB: MAPE 71.4%, R^2 0.22), requiring further development.
Conclusions:
- Machine learning-based soft sensors can provide valuable real-time estimates of COD and TSS in OWTS.
- Soft sensors offer a cost-effective alternative for real-time monitoring, enabling operational adjustments.
- Further research is needed to improve the accuracy of E. coli prediction in OWTS using soft sensors.

