# Advances on Water Quality Detection by UV-Vis Spectroscopy
## 3 Theoretical Basis of UV-Vis Spectrum Data Processing
### Data Preprocessing
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Pretreatment Method** & **Algorithm Principle** & **Advantages** & **Related Literature** \\ \hline  & & & [PERSON] (1964), \\  & & & [PERSON] (2020), \\ Savitzky-Golay (SG) & Polynomial smoothing algorithm based on the least squares principle. & Improve smoothness of spectrum to reduce noise interference. & [PERSON] (2011), \\  & & & [PERSON] (2011), \\  & & & [PERSON] (2018), \\  & & & [PERSON] (2014), \\  & & & [PERSON] (2019) \\  & & & [PERSON] (2019). \\ \hline  & & & [PERSON] (2018), \\  & & & [PERSON] (2016), \\ Wavelet transform & & & [PERSON] (2018), \\  & & & \\ (WT) & & & [PERSON] (2018), \\  & & threshold are generated by noise. & [PERSON] (2019), \\  & & & [PERSON] (2018), \\  & & & [PERSON] (2019). \\ \hline  & & & [PERSON] (2020), \\  & & & [PERSON] (2018), \\  & & & [PERSON] (2011), \\  & & & [PERSON] (2018), \\  & & & [PERSON] (2016), \\  & & & [PERSON] (2016), \\  & & & [PERSON] (2014), \\  & & & [PERSON] (2016), \\  & & & [PERSON] (2014), \\  & & & [PERSON](2020), \\  & & & [PERSON] (2019), \\  & & & [PERSON] (2019). \\ \hline  & & & \\ \multirow{2}{*}{Multiple scattering correction (MSC)} & The average spectrum is regarded as the standard spectrum, and each sample spectrum is regressed with the standard spectrum. & It can effectively eliminate the influence of scattering and enhance the spectral absorption information related to the content of components. & [PERSON] (2020), \\  & & & [PERSON] (2018), \\  & & & information related to the \\  & & the standard spectrum. & \\ \hline  & & The pane slides in the & \\ Two dimensional recombination & coefficient matrix calculates the denoising threshold by using a wavelet coefficient, and constructs a denoising threshold vector. & It removes the nonstationary noise, retains the detail information, and improves the measurement accuracy. & [PERSON] (2016). \\ \hline  & & & \\ Compressed sensing algorithm & projection of the collected signal is used to reconstruct the original signal through the optimization algorithm. & & \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Algorithms for reducing spectral data noise. of a water sample spectrum with equal intervals and stretched the spectrum data into a two-dimensional matrix composed of a spectrum axis and time axis. After two-dimensional wavelet transforms, a window pane with variable width was set to slide horizontally in the coefficient matrix, using the wavelet coefficient in the windowpane to calculate the dynamic denoising threshold, and building the denoising threshold vector along with the windowpane slide to perform the spectrum denoising. [PERSON] et al. [20] applied the compressed sensing de-noising algorithm based on wavelet transform to the on-line water quality detection system of ultraviolet visible spectrometry. The core idea of compressed sensing theory is to acquire a non-adaptive linear projection of the signal, and then reconstruct the original signal from the measured value through an optimization algorithm. This method can effectively de-noise as the absorption characteristics of the original spectral signal of the water samples are retained. Moreover, the de-noising effect is superior to that of the wavelet threshold denoising algorithm.