and near-infrared spectroscopy [6,11], shows high potential in
wastewater COD monitoring. They are fast, non-destructive and
environment-friendly that requires no chemicals added. Among
these spectroscopic techniques, UV–vis spectroscopy shows the
most extensive application and exhibits the best correlation with
COD by multivariate data analysis. In particular, partial least
squares (PLS) regression is routinely adopted to generate regression
model based on UV–vis spectral data to estimate the water
quality parameters [12,13].
Conventionally, an optimal pathlength is required to be selected
and fixed for UV–vis spectroscopic measurements. According to Beer–
Lambert law, absorbance is proportional to pathlength. It is a crucial
parameter for measurements as it defines the distance that light
travels through a sample. However, the selection of the optimized
pathlength is a difficult task because it varies from a few millimeters
for wastewater influent to dozens of millimeters for wastewater
effluent [4]. Furthermore, different treatment processes usually
result in different matrixes and concentrations of wastewaters, thus