Research on a small-concentration chemical oxygen demand prediction algorithm based on an enhanced parrot optimizer–BPNN and ultraviolet-visible spectroscopy

Abstract

Purpose: determining small concentrations of chemical oxygen demand (COD) is crucial for domestic drinking water safety. Ultraviolet-visible spectroscopy (UV-vis spectroscopy) is important for COD determination, but the multi-wavelength method has low accuracy and stability for small-concentration COD due to turbidity interference. This paper presents an enhanced parrot optimizer (EPO) algorithm for back propagation neural network (BPNN) parameter optimization to improve small-concentration COD prediction, which includes accuracy and stability. Results: firstly, the EPO algorithm uses the LHS population initialization strategy, which generates the initial population with the help of Latin hypercube sampling and improves the population diversity from the source; secondly, the EPO algorithm adopts the persistence-random-boundary (PRB) location update strategy, improves the position update formula in the residence phase, and integrates the simulated annealing idea to dynamically adjust the search step length to realize the precise balance between global exploration and local development ability; finally, this article proposed the contraction and whirl (CAW) individual elimination strategy, combined with the elite retention logic of the whale optimization algorithm, to periodically eliminate the inferior individuals to avoid premature maturation of the algorithm, and to strengthen the evolutionary momentum of the population. The synergistic effect of the above strategies can accurately optimize the weights and thresholds of the BPNN, and finally build a small concentration COD prediction model that is resistant to low turbidity interference. The core logic of the model's anti-turbidity interference lies in that the BPNN simultaneously learns the mapping relationship of “COD concentration – turbidity concentration – spectrum” and automatically identifies and deducts the contribution of turbidity to the spectrum when predicting COD, thereby offsetting its nonlinear interference and ultimately achieving accurate prediction of low concentration COD. Conclusions: the EPO–BPNN model is outstanding in convergence speed and accuracy. On the standard drinking water quality simulation data set, the coefficient of determination (R2) reached 0.9976, the root mean square error (RMSE) was as low as 0.3930 mg L−1, the mean absolute percentage error (MAPE) was only 3.47%, the percentage bias (PBIAS) was −0.081%, and the maximum relative standard deviation (RSD) was 2.26% (<3%). In the interference of multiple substances in the monitoring data of the inter-reservoir, the standard deviation (SD) of COD concentration values predicted by the model was 0.2876 and 0.3437, respectively; the fluctuations were 81.88% and 79.61% lower than those of the traditional model.

Graphical abstract: Research on a small-concentration chemical oxygen demand prediction algorithm based on an enhanced parrot optimizer–BPNN and ultraviolet-visible spectroscopy

Article information

Article type
Paper
Submitted
09 Sep 2025
Accepted
23 Nov 2025
First published
16 Dec 2025

Environ. Sci.: Water Res. Technol., 2026, Advance Article

Research on a small-concentration chemical oxygen demand prediction algorithm based on an enhanced parrot optimizer–BPNN and ultraviolet-visible spectroscopy

H. Wang, Q. Du and X. Wang, Environ. Sci.: Water Res. Technol., 2026, Advance Article , DOI: 10.1039/D5EW00882D

To request permission to reproduce material from this article, please go to the Copyright Clearance Center request page.

If you are an author contributing to an RSC publication, you do not need to request permission provided correct acknowledgement is given.

If you are the author of this article, you do not need to request permission to reproduce figures and diagrams provided correct acknowledgement is given. If you want to reproduce the whole article in a third-party publication (excluding your thesis/dissertation for which permission is not required) please go to the Copyright Clearance Center request page.

Read more about how to correctly acknowledge RSC content.

Social activity

Spotlight

Advertisements