Adaptability of Machine Learning Prediction Models for Chlorine Consumption to Monitoring Frequency of Residual Chlorine in Wastewater Treatment Plants
In many Chinese wastewater treatment plants (WWTPs), residual chlorine is still manually monitored at low frequencies, leading to imprecise disinfectant dosing. This study systematically compared four machine learning models—backpropagation (BP) neural network, long short-term memory (LSTM) neural network, random forest (RF), and support vector regression (SVR)—for predicting chlorine consumption (i.e., the difference between chlorine dose and residual chlorine) during non-monitoring periods under different residual chlorine monitoring frequencies (every 1, 2, 4, 6, and 8 h). Using data from Plant A (equipped with online residual chlorine monitoring) and Plants B and C (manual monitoring every 6 h and 8 h, respectively), input variables included online water quality indicators (temperature, flow, NH3-N, CODCr, TP, TN) and chlorine dose. Results showed that at 1-h intervals, LSTM achieved the highest prediction accuracy; at 2–4-h intervals, RF performed best; at 6-h or lower frequencies, BP was superior; SVR performed worst across all frequencies. Validation on Plants B and C confirmed BP's optimal performance under low-frequency conditions, and particle swarm optimization (PSO) significantly improved its accuracy. These findings provide a basis for selecting appropriate machine learning models for chlorine consumption prediction under varying monitoring frequencies, particularly low-frequency manual monitoring, thereby supporting precise disinfectant dosing control.