Inversion Prediction of COD in Wastewater Based On
Inversion Prediction of COD in Wastewater Based On
A R T I C L E I N F O A B S T R A C T
Handling Editor: Zhen Leng COD is an important detection index in the field of water environmental treatment. At present, COD detection
methods and instruments have shortcomings such as long detection time, complicated detection process and high
Keywords: consumption of chemical agent. In this paper, a rapid detection method for COD index of wastewater based on
Wastewater index detection hyperspectral technology and machine learning is developed, and a complete non-contact detection scheme is
Hyperspectral technology
formed. In the method, the characteristic spectral data of standard COD in the sample spectral curve are
Regression analysis
extracted by successive projections algorithm (SPA) and genetic algorithm (GA) to establish the regression model
COD
Machine learning of the index. The model is applied to the rapid detection of COD index in the textile desizing wastewater
treatment process, and the accuracy of the model in real environment is comprehensively evaluated by root mean
square error (RMSE), relative analysis error (RPD) and determination coefficient (R2). Our results indicate that
the model has high prediction stability and strong generalization ability (the RMSE is 40.4489 mg/L, RPD is 9.37,
and R2 is 0.97) and is a green method for COD detection in wastewater.
1. Introduction unstable and the reliability is poor when detecting the wastewater of
refractory organics.
Water resource protection has always been one of the key and hot In recent years, hyperspectral technology has been widely used in the
research topics in the world. Rapid and effective detection of wastewater quantitative detection of water quality parameters. Water quality
indicators is of great significance to the protection of natural waters. The detection based on hyperspectral technology mainly adopts empirical
detection indicators of wastewater mainly include chemical oxygen method, semi-empirical method and machine learning method. The
demand (COD), turbidity, total phosphorus, total nitrogen and pH (Xing semi-empirical method is most commonly used at present. It can quan
et al., 2019). COD describes the degree of organic pollution in water, and titatively detect indicators by combining the known spectral charac
is an important detection index in the process of industrial wastewater teristics of water quality indicators with relevant statistical models and
treatment and supervision. Environmental engineering researchers want has been applied in the detection of suspended matter, chlorophyll,
to get a rapid method of obtaining COD indicators of water quality in turbidity and eutrophication index. For example, S.Chande et al.
order to detect and stop water pollution in time. Traditionally, COD (Chander et al., 2019) estimated turbidity, suspended sediment con
detection mainly adopts dichromate methods, which have defects such centration and chlorophyll in lake water by using Aviris-NG hyper
as long detection period, high consumption of chemical agent and easy spectral reflectance data. Zhang et al. (Fernandez-Beltran et al., 2018)
to produce secondary pollution. The most critical problem is that this used the combined method of depth factor decomposition machine,
method of detecting COD by oxidation reaction has its own defects. spatial distribution pattern analysis and probability analysis, and used
Since it is hard to control the dosage of oxidant in order to ensure the hyperspectral reflectivity data of water quality to quantitatively esti
complete reacts of organics. Therefore, the COD measurement is mate water quality parameters. The biggest disadvantage of
* Corresponding author. Lingang Economic and Technological Development Zone, 188 University Town, Yibin City, Sichuan Province, 644000, China.
** Corresponding author. Room 4161, No.4 Academic Building, No. 2999, North Renmin Road, Songjiang District, Shanghai, 201620, China.
E-mail addresses: [email protected] (D. Huang), [email protected] (Y. Tian), [email protected] (X. Chen).
https://doi.org/10.1016/j.jclepro.2022.135681
Received 29 August 2022; Received in revised form 8 November 2022; Accepted 16 December 2022
Available online 20 December 2022
0959-6526/© 2022 Elsevier Ltd. All rights reserved.
D. Huang et al. Journal of Cleaner Production 385 (2023) 135681
spectral characteristics of organic pollutants in wastewater (A thesis COD (mg/L) 3622.31 989.35 614.46 569.71 457.51
submitted for the Degree of Doctorate at the Graduate School of the
Chinese Academy of Sciences n.d., 2007). Therefore, empirical method
The main pollutants are polyvinyl alcohol (PVA), acid and a small
and semi-empirical method cannot be used for COD indexes of
amount of starch (Song et al., 2021a). In the experiment, wastewater
wastewater.
samples were taken from the SSSAB-AFB treatment reactor, and treated
At present, the method based on machine learning is the most
by the two-stage spiral symmetrical flow anaerobic reactor-anaerobic
promising non-contact detection method for COD indicators. Gated
fluidized bed (2SSSAB-AFB). The treatment process is shown in Fig. 1
Recurrent Neural Network (GRU), improved from CNN(Tu et al., 2019),
(Dai et al., 2016; Zhang et al., 2018). Firstly, the wastewater is pumped
can predict COD indicators by using hyperspectral data of water quality.
from the inlet bucket into the SSSAB I and the outlet bucket 1 by the
However, GRU model has a complex structure which requires a large
peristaltic pump at the flow rate of φ and 1/5 φ respectively. Then the
amount of training sample data, and takes a long time to calculate.
wastewater will be treated by SSSAB I and then flows into the bucket 1;
Zhang (Zhang et al., 2021) established an intelligent water quality
Secondly, the sample liquid from outlet bucket 1 is pumped into SSSAB
monitoring system based on fusing Random Vector Functional Link
II and flows into outlet bucket 2 after treatment by SSSAB II. Finally, the
network (RVFL) and Group Method of Data Handling model (GMDH),
sample liquid is pumped into the anaerobic fluidized bed (AFB) and
but this method could only conduct qualitative analysis and could not
discharged from the outlet pipe after AFB treatment (Song et al., 2021b;
achieve quantitative detection. Deng (Deng et al., 2019) proposed
Zhou et al., 2021). In Fig. 1, ①~⑤ marks the sampling points of textile
modified Capsule network, which can quantitatively predict COD index
desizing wastewater, and the water samples are defined as I inlet, I
concentration in Baiyangdian lake of China by using one-dimensional
outlet, II inlet, II outlet, aerobic outlet.
hyperspectral data. However, the detection accuracy of this method is
Forty groups of samples were extracted from each sampling point,
low and cannot meet the detection requirements.
the standard COD index of the samples was determined by instruments
In this study, a fast non-contact COD index online monitoring
for detecting COD produced by HACH. Its principle is dichromate
method is intended to develop for monitoring the purification effect of
method (Huang et al., 2022), and the discrete points in the test results
industrial wastewater treatment reactor. The realization of quantitative
were eliminated by Grubbs test method. The final standard COD test
detection of COD index in wastewater mainly involves extraction of
results of the wastewater samples are shown in Table 1.
characteristics for hyperspectral data and analysis of quantitative
regression model. Extraction of spectrum characteristics is applied by
dimensionality reduction of hyperspectral data using statistic methods. 2.1. Hyperspectral data acquisition and processing of wastewater
Characteristics spectrum of COD index is then extracted from the data.
Firstly, using correlation coefficient, data characteristics of hyper The wastewater hyperspectral data were collected by FX10 hyper
spectral data of wastewater is analyzed. According to the characteristics spectral camera (400–1000 nm) and FX17 hyperspectral camera
of the data and combined with experimental comparison, the best (900–1700 nm) developed by SPECIM In, Finland. The hyperspectral
dimensionality reduction method is chosen. Then, using several data of wastewater in the visible-near infrared (VNIR) and near infrared
regression models, different quantitative regression models are built (NIR) bands were obtained. The light transmittance of wastewater is
based on extracted characteristics spectrum and standard COD value. generally strong, and the material of the container will affect the
After analysis the best regression model is selected and has the stability hyperspectral data of wastewater (Yang et al., 2022). In this study, the
tested in the testing system build in this study. Finally, a stable testing hyperspectral data of wastewater samples were collected in bearing
model for COD index is established, which provides ideas for rapid containers made of quartz cuvette, glass cuvette, polyethylene Petri dish
testing of COD index for wastewater. and glass Petri dish respectively. The spectral curves of the five samples
collected are shown in Fig. 2.
2. Experimental materials and methods It can be seen from the analysis of the experimental results of the four
containers that samples with the same COD concentration collected by
This paper takes textile desizing wastewater as the research object. four containers have differences in peak values, trough values and trends
of spectral reflectance curve of hyperspectral data and differences in
2
D. Huang et al. Journal of Cleaner Production 385 (2023) 135681
Fig. 3. The curve of correlation coefficient between Continuum Removal and COD.
trends of concentration gradient curve. We compared the changes of ensure the scattering consistency of spectral curves of samples
curve with that of sample concentration and experimental results with with the same concentration (Le et al., 2022);
the best correlation was chosen for as the best collection method. it was (3) Remove the envelopes of spectral curves (Continuum Removal,
found that the spectral curves detected with quartz cuvette were clear CR) to highlight spectral features, and obtain new smooth spec
and the reflectance difference between samples with different concen tral curves with prominent features (Yousefi et al., 2018).
trations was obvious. Therefore, the quartz cuvette was finally used as
the bearing containers in this study to collect hyperspectral data of 2.2. Detection method
wastewater samples.
The hyperspectral data processing was divided into the following 2.2.1. Selection of detection model
steps: The purpose of COD detection method proposed in this paper is to
establish a regression detection model by taking the hyperspectral data
(1) Extract the spectral reflectance by using whiteboard and dark of wastewater samples with different concentrations as the independent
current normalization and eliminate the noise caused by ambient variable and the standard COD value as the target variable. Pearson
light on spectral reflectance curves using polynomial convolution correlation coefficient between spectral data and COD standard value
smoothing algorithm (Savitzky-Golay Smoothing, SG)(Shi et al., (Adler and Parmryd, 2010) is calculated to analyze the correlation
2021); characteristics of independent variable and target variable, so as to
(2) Eliminate data offset between different pixels of the same sample select an appropriate regression model.
through Multiple Scattering Correction (MSC) algorithm to According to the results shown in Fig. 3, the maximum absolute
value of correlation coefficient between wastewater COD index and
3
D. Huang et al. Journal of Cleaner Production 385 (2023) 135681
Table 2 Table 3
Feature bands of COD. Training effect of SVR model.
Algorithm Bands Feature bands(nm) REMS Model R2c R2p RMSE RPD
4
D. Huang et al. Journal of Cleaner Production 385 (2023) 135681
models, to some degrees, are all able to detect COD index of industrial
Table 4 wastewater. After comprehensive evaluation, NIR-GA-RF model has the
Training effect of CNN model.
highest detection accuracy and its REMS is 58 mg/L. In other words, RF
Model R2c R2p RMSE RPD regression model, which was built from hyperspectral data of textile
VNIR-CNN 0.8695 0.8775 301.2259 3.0691
desizing wastewater collected by FX17 camera, dealt by data processing
VNIR-SPA-CNN 0.9055 0.9846 207.5262 7.7548 and extracted characteristic bands by GA algorithm, is the best detection
VNIR-GA-CNN 0.9032 0.8760 327.9245 2.4299 scheme for COD index.
NIR-CNN 0.9695 0.9375 162.2259 4.0691
NIR-SPA-CNN 0.9950 0.9861 78.0901 24.8758
NIR-GA-CNN 0.9302 0.9889 70.4489 39.7872 3.3. Stability test
5
D. Huang et al. Journal of Cleaner Production 385 (2023) 135681
Table 6
Model stability test results.
Detect method Index SSSAB I(mg/L) SSSAB II(mg/L) AFB(mg/L)
6
D. Huang et al. Journal of Cleaner Production 385 (2023) 135681
References Retrieval of Water Quality, 2007. Retrieval of Water Quality in the Pearl River Estuary
Using Hyperspetral Technique. A Thesis Submitted for the Degree of Doctorate at the
Graduate School of the Chinese Academy of Sciences.
Adler, J., Parmryd, I., 2010. Quantifying colocalization by correlation: the pearson
Shi, X., Yao, L., Pan, T., 2021. Visible and near-infrared spectroscopy with multi-
correlation coefficient is superior to the Mander’s overlap coefficient. Cytometry 77,
parameters optimization of savitzky-golay smoothing applied to rapid analysis of soil
733–742. https://doi.org/10.1002/cyto.a.20896.
Cr content of pearl river delta. J. Geosci. Environ. Protect. 9, 75–83. https://doi.org/
Chander, S., Gujrati, A., Abdul Hakeem, K., Garg, V., Issac, A.M., Dhote, P.R., Kumar, V.,
10.4236/gep.2021.93006.
Sahay, A., 2019. Water quality assessment of River Ganga and Chilika lagoon using
Song, Q., Chen, X., Tang, L., Zhou, W., 2021a. Bioresource Technology Treatment of
AVIRIS-NG hyperspectral data. Curr. Sci. 116, 1172–1181. https://doi.org/
polyvinyl alcohol containing wastewater in two stage spiral symmetrical stream
10.18520/cs/v116/i7/1172-1181.
anaerobic bioreactors coupled a sequencing batch reactor. Bioresour. Technol. 340,
Cozzolino, D., Kwiatkowski, M.J., Parker, M., Cynkar, W.U., Dambergs, R.G., Gishen, M.,
125702 https://doi.org/10.1016/j.biortech.2021.125702.
Herderich, M.J., 2004. Prediction of phenolic compounds in red wine fermentations
Song, Q., Sun, Z., Chang, Y., Zhang, W., Lv, Y., Wang, J., Sun, F., Ma, Y., Li, Y., Wang, F.,
by visible and near infrared spectroscopy. Anal. Chim. Acta 513, 73–80. https://doi.
Chen, X., 2021b. Efficient degradation of polyacrylate containing wastewater by
org/10.1016/j.aca.2003.08.066.
combined anaerobic–aerobic fluidized bed bioreactors. Bioresour. Technol. 332
Dai, R., Chen, X., Xiang, X., Huang, D., Lin, H., Xu, M., 2016. Dispersion characteristics of
https://doi.org/10.1016/j.biortech.2021.125108.
a spiral symmetry stream anaerobic bio-reactor. Biochem. Eng. J. 110 https://doi.
Tu, J., Yang, X., Chen, C., Gao, S., Wang, J., Sun, C., 2019. Water quality prediction
org/10.1016/j.bej.2016.02.005.
model based on GRU hybrid network. In: Proceedings - 2019 Chinese Automation
Deng, C., Zhang, L., Cen, Y., 2019. Retrieval of chemical oxygen demand through
Congress. CAC 2019, pp. 1893–1898. https://doi.org/10.1109/
modified capsule network based on hyperspectral data. Appl. Sci. 9 https://doi.org/
CAC48633.2019.8996847.
10.3390/app9214620.
Xing, Z., Chen, J., Zhao, X., Li, Y., Li, X., Zhang, Z., Lao, C., Wang, H., 2019. Quantitative
Espel, D., Courty, S., Auda, Y., Sheeren, D., Elger, A., 2020. Submerged macrophyte
estimation of wastewater quality parameters by hyperspectral band screening using
assessment in rivers: an automatic mapping method using Pléiades imagery. Water
GC, VIP and SPA. PeerJ. https://doi.org/10.7717/peerj.8255, 2019.
Res. 186 https://doi.org/10.1016/j.watres.2020.116353.
Yang, W.C., Choe, C.M., Kim, J.S., Om, M.S., Kim, U.H., 2022. Materials selection
Fernandez-Beltran, R., Plaza, A., Plaza, J., Pla, F., 2018. Hyperspectral unmixing based
method using improved TOPSIS without rank reversal based on linear max-min
on dual-depth sparse probabilistic latent semantic analysis. IEEE Trans. Geosci. Rem.
normalization with absolute maximum and minimum values. Mater. Res. Express 9.
Sens. 56, 6344–6360. https://doi.org/10.1109/TGRS.2018.2837150.
https://doi.org/10.1088/2053-1591/ac2d6b.
Huang, D., Ye, J., Yu, S., Tian, Y., Wen, X., Wang, Y., Ren, L., Chen, X., 2022. Study on a
Yousefi, B., Sojasi, S., Ibarra Castanedo, C., Maldague, X.P.V., Beaudoin, G.,
fast non-contact detection method for key parameters of refractory organic
Chamberland, M., 2018. Continuum removal for ground-based LWIR hyperspectral
wastewater treatment. Biochem. Eng. J. 177, 1–30. https://doi.org/10.1016/j.
infrared imagery applying non-negative matrix factorization. Appl. Opt. 57, 6219.
bej.2021.108269.
https://doi.org/10.1364/ao.57.006219.
Le, C.T., Phan, N.L., Vu, D.D., Ngo, C., Le, V.H., 2022. Effect of multiple rescatterings on
Zhang, J., Chen, X., Liu, J., Huang, B., Xu, M., 2018. Structural characteristics of a spiral
continuum harmonics from asymmetric molecules in multicycle lasers. Phys. Chem.
symmetry stream anaerobic bioreactor based on CFD. Biochem. Eng. J. 137 https://
Chem. Phys. 24, 6053–6063. https://doi.org/10.1039/d2cp00245k.
doi.org/10.1016/j.bej.2018.05.016.
Li, L., Guo, S., 2021. A wavelength selection model based on successive projections
Zhang, Y., Wu, L., Deng, L., Ouyang, B., 2021. Retrieval of water quality parameters from
algorithm for pH detection of water by VIS-NIR spectroscopy. J. Phys. Conf. Ser.
hyperspectral images using a hybrid feedback deep factorization machine model.
1813 https://doi.org/10.1088/1742-6596/1813/1/012002.
Water Res. 204, 117618 https://doi.org/10.1016/j.watres.2021.117618.
Li, Z., Cheng, Y., Zhang, X., Zhang, Y., 2022. A Novel INS/ADS Integrated Navigation
Zhou, W., Chen, X., Ismail, M., Wei, L., Hu, B., 2021. Simulating the synergy of electron
Method Based on INS Error Model-Aided.
donors and different redox mediators on the anaerobic decolorization of azo dyes:
Peng, D., Tan, G., Fang, K., Chen, L., Agyeman, P.K., Zhang, Y., 2021. Multiobjective
can AQDS-chitosan globules replace the traditional redox mediators? Chemosphere
optimization of an off-road vehicle suspension parameter through a genetic
275. https://doi.org/10.1016/j.chemosphere.2021.130025.
algorithm based on the particle swarm optimization. Math. Probl Eng. 2021 https://
doi.org/10.1155/2021/9640928.