*Article* **Discrimination of Chemical Oxygen Demand Pollution in Surface Water Based on Visible Near-Infrared Spectroscopy**

**Xueqin Han 1,†, Xiaoyan Chen 2,†, Jinfang Ma <sup>1</sup> , Jiaze Chen <sup>1</sup> , Baiheng Xie <sup>1</sup> , Wenhua Yin <sup>2</sup> , Yanyan Yang <sup>2</sup> , Wenchao Jia <sup>2</sup> , Danping Xie 2,\* and Furong Huang 1,\***


**Abstract:** Chemical oxygen demand (COD) is one of the indicators used to monitor the level of pollution in surface water. To recycle agricultural water resources, it is crucial to monitor, in a timely manner, whether COD in surface water exceeds the agricultural water control standard. A diagnostic model of surface water pollution was developed using visible near-infrared spectroscopy (Vis-NIR) combined with partial least squares discriminant analysis (PLS–DA). A total of 127 surface water samples were collected from Guangzhou, Guangdong, China. The COD content was measured using the potassium dichromate method. The spectra of the surface water samples were recorded using a Vis-NIR spectrometer, and the spectral data were pre-processed using four different methods. To improve the accuracy and simplicity of the model, the synthetic minority oversampling technique (SMOTE) and the competitive adaptive reweighted sampling (CARS) algorithm were used to enhance model performance. The best PLS–DA model achieved an accuracy of 88%, and the SMOTE–PLS–DA model had an accuracy of 94%. The SMOTE algorithm could improve the accuracy of the model despite the sampling imbalance. The CARS–SMOTE–PLS–DA model achieved 97% accuracy, and the CARS band selection technique improved the simplicity and accuracy of the discrimination model. The CARS–SMOTE–PLS–DA model improved the discrimination accuracy by 9% over that of the PLS–DA model. This method can not only save human and material resources but is also a new way for real-time online discrimination of COD in surface water.

**Keywords:** surface water; vis-NIR spectroscopy; chemical oxygen demand; SMOTE; CARS; PLS–DA
