Quantitative Analysis of Polymetallic Ions in Industrial Wastewater Based on Ultraviolet-Visible Spectroscopy

: In order to detect and control the concentration of polymetallic ions in industrial wastewater in real time, a spectrophotometric method combining wavelet transform (WT) and partial least squares regression (PLSR) is proposed for the simultaneous determination of zinc, cobalt and nickel in industrial wastewater by ultraviolet-visible spectrometry, without a separation step. WT was found to be suitable for spectral preprocessing, which effectively eliminated the noise, enhanced spectral feature information, improved the linearity of the detected ions and increased the number of selectable modeling wavelengths. PLSR was used to study the simultaneous detection of zinc, cobalt and nickel. The linear detection ranges were 10–100 mg/L for zinc, 0.6–6.0 mg/L for nickel and 0.3–3.0 mg/L for cobalt. The average relative deviation for zinc, nickel and cobalt was 2.85%, 3.05% and 2.24%, respectively. The results indicated that the WT–PLSR method is suitable for the online detection of polymetallic ions by ultraviolet-visible spectroscopy in zinc industrial wastewater.


Introduction
Zinc hydrometallurgical wastewater contains a large number of heavy metal ions, which are various, toxic and abundant [1]. According to statistics, the annual discharge of wastewater from the zinc hydrometallurgy industry in China is 30,549 million tons, accounting for 65.8% of the total discharge of wastewater from the non-ferrous metal hydrometallurgy industry [2][3][4]. The huge amount of wastewater discharged necessitates massive energy consumption and treatment costs [5][6][7][8]. If the wastewater is not treated properly in the later stages, excessive emissions of metal ions will seriously pollute the environment and affect human health [9][10][11][12]. Therefore, it is very important to monitor the concentration of polymetallic ions in real time and accurately in zinc hydrometallurgical wastewater.
In current production, zinc-smelting enterprises mainly rely on manual offline analysis of polymetallic ion concentration in industrial wastewater, which makes the process of wastewater discharge expensive, cumbersome and time-consuming [13][14][15]. Therefore, modern detection methods are urgently needed for rapid online detection of metal ion concentrations in industrial wastewater. In recent years, several methods, such as potentiometric titration, polarography, inductively coupled plasma mass spectrometry, ultraviolet-visible (UV-vis) absorption spectroscopy, and laser-induced breakdown spectroscopy, have been proposed for the online determination of metal ions [16][17][18][19][20]. Among them, UV-vis spectroscopy is widely used in the field of analysis and detection because of its simplicity, accuracy, speed, versatility and low cost [21][22][23][24].
As a routine quantitative analysis method, UV-vis spectrophotometry has been widely applied in order to simultaneously detect metal concentration in solutions. Several spectrophotometric methods, such as simultaneous equations, difference spectrophotometry, principal component regression (PCR), PLSR, dual-wavelength spectrophotometry, Sustainability 2021, 13, 7907 2 of 10 the area under the curve method, and derivative spectrophotometry, have been proposed for multicomponent analysis [25][26][27]. However, in industrial wastewater treatment, UV-vis spectral data are collected by a microfiber spectrometer. The instrument has the advantages of modularization, miniaturization and intellectualization, and is suitable for rapid online detection of multi-metal ions in the industrial field, but the photometric noise of the acquisition signal is relatively large [28][29][30]. In addition, due to their similar chemical properties, the spectra of zinc (Zn), cobalt (Co) and nickel (Ni) in the zinc wastewater solution overlap seriously [31]. Therefore, it is difficult for the above spectrophotometric methods to simultaneously detect the concentration of polymetallic ions for quantitative evaluation.
In order to detect and control the concentration of polymetallic ions in industrial wastewater in real time, a spectrophotometric method combining wavelet transform (WT) and partial least squares regression (PLSR) is proposed for the simultaneous determination of zinc, cobalt and nickel in industrial wastewater by ultraviolet-visible spectrometry, without a separation step. WT was found to be suitable for spectral preprocessing, which effectively eliminated the noise, enhanced spectral feature information, improved the linearity of the detected ions and increased the number of selectable modeling wavelengths. PLSR is used to study the simultaneous detection of zinc, cobalt and nickel. The linear detection ranges are 10-100 mg/L for zinc, 0.6-6.0 mg/L for nickel and 0.3-3.0 mg/L for cobalt. The average relative deviation for zinc, nickel and cobalt was 2.85%, 3.05% and 2.24%, respectively. The root mean squared error of prediction (RMSEP) is 0.856 for Zn, 0.067 for Ni and 0.032 for Co. The results indicated that the WT-PLSR method is suitable for online detection of polymetallic ions by ultraviolet-visible spectroscopy in zinc industrial wastewater.

Spectral Pretreatment
The acquired spectral data contains noise and background interference, and it is necessary to preprocess the spectral data to improve the accuracy of quantitative analysis. The most common methods in spectral pretreatment are mainly Savitzky-Golay (SG), Fourier transform (FT) and wavelet transform (WT). The SG filtering method is a data-smoothing method of local polynomial least-squares convolution fitting, which can effectively remove noise. The filtering process is expressed as: where m is the width of the window, N is the number of sliding windows, C i is the filter coefficient, Y j+i is the original data, and Y * j is the filtered data. FT is a typical frequency domain denoising algorithm. The frequency distribution of signal and noise is different. The signal frequency band is concentrated, and the spectral coefficient is large. The noise is distributed throughout the frequency domain and has a small spectral coefficient. Therefore, noise can be filtered by a threshold setting and windowing function. DFT is defined as: The wavelet transform has good local characteristics of the time domain and frequency domain. The wavelet is used to decompose the noisy signal into approximate coefficient and detail coefficient, and the noise is mainly distributed in the detail coefficients. Thus, the wavelet coefficient of noise is set to zero by threshold quantization to effectively eliminate noise. The wavelet transform is expressed as follows: where b is a translation parameter, a is a scale parameter, and ϕ(t) denotes the basis function.

Partial Least Squares Regression
The PLSR method is a commonly used chemometric method for the quantitative analysis of spectral multi-component concentration. PLSR mainly studies the regression modeling of multiple dependent variables on multiple independent variables, especially when the variables are highly linearly correlated internally, and the partial least squares regression method is more effective. In addition, the partial least squares regression solves the problem that the number of samples is fewer than the number of variables. In order to simultaneously detect the concentration of polymetallic ions in zinc wastewater solution, the specific process of PLS modeling is as follows: establish an m × n absorbance matrix A, n × l concentration matrix C, where m is the number of wavelengths, n is the number of samples, and l is the number of metal ion species. A and C can be decomposed as follows: where T and U are the score matrixes, P and V are the loads. A and C conform to the Beer-Lambert law and have a linear relationship, so U and T also satisfy the linear relationship: where B is the correlation coefficient matrix. The concentration prediction formula can be expressed by:

Reagents and Apparatus
All chemicals were analytical reagents (AR) without further purification. Double distilled deionized water was used throughout the experimental work. Standard stock solutions of zinc (500 mg/L), nickel (12.5 mg/L) and cobalt (12.5 mg/L) were prepared by corresponding reagents. Acetic acid-sodium acetate (4 mol/L and pH = 5.5) was used as a buffer solution. Nitroso-R salt solution (0.04 g/L) was prepared as a chromogenic reagent. Hexadecyl trimethyl ammonium bromide (0.01 mol/L) was prepared as the stabilizer solution. An ultraviolet-visible fiber spectrophotometer (Ideaoptics PG2000, Shanghai, China) with Morpho software connected to a computer was used for spectral signal acquisition. Quartz cuvettes (1 cm) were matched and used for all absorbance measurements. The PG2000 combines Hamamatsu backlight FFT-CCD, EX filter and EX grating technology, and has many advantages such as an ultra-wide spectral band, high dynamic range, high ultraviolet sensitivity and low electronic noise.

Procedures
Samples were prepared in a 25 mL volumetric flask containing the appropriate volume of each standard stock solution, 5 mL of acetic acid-sodium acetate buffer solution, 3.0 mL of stabilizer solution and 2.5 mL of nitroso-R salt solution. The mixtures were then diluted to 25 mL with deionized water. The prepared concentrations were in the range of 10-100 mg/L for Zn, 0.6-6 mg/L for Ni and 0.3-3 mg/L for Co. For spectral modeling analysis, 40 sets of mixed solutions containing different ratios of Zn, Ni and Co were prepared, with a blank solution as a reference. Among them, 30 sets of mixed solutions were used as the calibration set, and 10 sets were used as the prediction set. Absorption spectra were recorded in the wavelength range of 250 nm to 600 nm at intervals of 1.0 nm against a reagent-blank solution.

Spectral Characteristics
The signal was collected by the microfiber spectrometer in the zinc wastewater solution. Figure 1 shows the absorption spectra of Zn (30 mg/L), Co (1.2 mg/L) and Ni (3.0 mg/L) at the wavelength of 250-600 nm. It can be seen that the spectral signals of zinc, cobalt and nickel overlap heavily over the entire wavelength region. Since the concentration of zinc ions in the wastewater solution is much greater than other trace metal ions, the zinc absorbance is higher than other ions. Among nickel and cobalt ions, the concentration of nickel is higher, but the absorbance is lower, and so the sensitivity to nickel is lower. In addition, the spectral signals of three metal ions are interfered with by noise, because the microfiber spectrometer is designed as a single beam. Compared with the large fiber optic spectrometer with a dual beam, the microfiber spectrometer has the characteristics of miniaturization, modularization and fast detection speed, which makes it suitable for fast online detection in the industrial field; but the disadvantage is that the CCD device has considerable spectral noise. The random fluctuation of noise seriously affects the quantitative analysis of UV-vis spectra. Thus, it is difficult to detect the polymetallic ions of Zn, Co and Ni in the wastewater solution.
modeling analysis, 40 sets of mixed solutions containing different ratios of Zn, Ni an were prepared, with a blank solution as a reference. Among them, 30 sets of m solutions were used as the calibration set, and 10 sets were used as the predictio Absorption spectra were recorded in the wavelength range of 250 nm to 600 n intervals of 1.0 nm against a reagent-blank solution.

Spectral Characteristics
The signal was collected by the microfiber spectrometer in the zinc wastew solution. Figure 1 shows the absorption spectra of Zn (30 mg/L), Co (1.2 mg/L Ni (3.0 mg/L) at the wavelength of 250-600 nm. It can be seen that the spe signals of zinc, cobalt and nickel overlap heavily over the entire wavelength re Since the concentration of zinc ions in the wastewater solution is much greater other trace metal ions, the zinc absorbance is higher than other ions. Among n and cobalt ions, the concentration of nickel is higher, but the absorbance is lo and so the sensitivity to nickel is lower. In addition, the spectral signals of metal ions are interfered with by noise, because the microfiber spectrome designed as a single beam. Compared with the large fiber optic spectrometer a dual beam, the microfiber spectrometer has the characteristics of miniaturiza modularization and fast detection speed, which makes it suitable for fast o detection in the industrial field; but the disadvantage is that the CCD devic considerable spectral noise. The random fluctuation of noise seriously affect quantitative analysis of UV-vis spectra. Thus, it is difficult to detect the polyme ions of Zn, Co and Ni in the wastewater solution.

Univariate Calibration
Generally, in zinc industrial wastewater, the major zinc concentration is usua the range of 10-100 mg/L. The concentrations of trace amounts of Ni and Co are mg/L and 0.3-3 mg/L, respectively. The absorbance spectra of the three metal ions different concentrations are shown in Figure 2. It can be seen that the spectra have interference over the entire wavelength region. To evaluate the linearity of these io the zinc wastewater solution, a calibration curve for each metal ion is constructed the maximum absorbance and the corresponding concentration. Figure 3a show calibration curve for Zn at 303 nml; the linear equation and correlation coefficient (R

Univariate Calibration
Generally, in zinc industrial wastewater, the major zinc concentration is usually in the range of 10-100 mg/L. The concentrations of trace amounts of Ni and Co are 0.6-6 mg/L and 0.3-3 mg/L, respectively. The absorbance spectra of the three metal ions with different concentrations are shown in Figure 2. It can be seen that the spectra have much interference over the entire wavelength region. To evaluate the linearity of these ions in the zinc wastewater solution, a calibration curve for each metal ion is constructed using the maximum absorbance and the corresponding concentration. Figure 3a shows the calibration curve for Zn at 303 nml; the linear equation and correlation coefficient (R 2 ) are: Abs. = 0.0264 C Zn −0.0649 (R 2 = 0.9854). Figure 3b shows the calibration curve for Co at 322 nm, the linear equation and correlation coefficient (R 2 ) are: Abs. = 0.2767 C Co + 0.0003 (R 2 = 0.9912). Figure 3c shows the calibration curve for Ni at 305 nm, the linear equation and correlation coefficient (R 2 ) are: Abs. = 0.0704 C Ni + 0.0057 (R 2 = 0.9837). Obviously, due to the influence of noise, the linearity of these ions is still poor, even at the highest sensitivity, which will seriously affect the quantitative analysis of the spectral signal. Thus, it is necessary to perform spectral preprocessing before modeling analysis. nm, the linear equation and correlation coefficient (R 2 ) are: Abs. = 0.2767 CCo + 0.0003 = 0.9912). Figure 3c shows the calibration curve for Ni at 305 nm, the linear equation correlation coefficient (R 2 ) are: Abs. = 0.0704 CNi + 0.0057 (R 2 = 0.9837). Obviously, du the influence of noise, the linearity of these ions is still poor, even at the highest sensitiv which will seriously affect the quantitative analysis of the spectral signal. Thus, necessary to perform spectral preprocessing before modeling analysis.

Spectral Pretreatment Method
In order to improve the linearity of the spectral signal, three spectral pretreatm methods, Savitzky-Golay (SG), Fourier transform (FT) and wavelet transform (WT), w used for the original spectral data, as shown in Figure 4. The linearity of each metal  Figure 3c shows the calibration curve for Ni at 305 nm, the linear equation and correlation coefficient (R 2 ) are: Abs. = 0.0704 CNi + 0.0057 (R 2 = 0.9837). Obviously, due to the influence of noise, the linearity of these ions is still poor, even at the highest sensitivity, which will seriously affect the quantitative analysis of the spectral signal. Thus, it is necessary to perform spectral preprocessing before modeling analysis.

Spectral Pretreatment Method
In order to improve the linearity of the spectral signal, three spectral pretreatment methods, Savitzky-Golay (SG), Fourier transform (FT) and wavelet transform (WT), were used for the original spectral data, as shown in Figure 4. The linearity of each metal ion

Spectral Pretreatment Method
In order to improve the linearity of the spectral signal, three spectral pretreatment methods, Savitzky-Golay (SG), Fourier transform (FT) and wavelet transform (WT), were used for the original spectral data, as shown in Figure 4. The linearity of each metal ion was evaluated by the correlation coefficient of absorbance and concentration. The larger the correlation coefficient at a certain wavelength, the better the linearity at that wavelength. Figure 4a shows the correlation coefficient of the original spectra in the wavelength range of 250-600 nm. It can be seen from Figure 4a that the linear correlation coefficients of the three metal ions vary greatly, and the maximum values are all less than 0.96, indicating that each metal ion has poor linearity and a small number of optional modeling wavelengths. The correlation coefficients of Figure 4b-d are the results of preprocessing by SG, FT, and WT methods, respectively. It can be seen that the three methods all significantly improve the linear correlation coefficient, and the change of linear correlation coefficient is relatively stable, with the maximum value close to 1. The reason is that spectral preprocessing effectively eliminates noise and enhances spectral feature information, thereby improving the linearity of the detected ions and increasing the number of selectable modeling wavelengths, which facilitates subsequent wavelength selection and modeling analysis.
coefficients of the three metal ions vary greatly, and the maximum values are all less than 0.96, indicating that each metal ion has poor linearity and a small number of optional modeling wavelengths. The correlation coefficients of Figure 4b-d are the results of preprocessing by SG, FT, and WT methods, respectively. It can be seen that the three methods all significantly improve the linear correlation coefficient, and the change of linear correlation coefficient is relatively stable, with the maximum value close to 1. The reason is that spectral preprocessing effectively eliminates noise and enhances spectral feature information, thereby improving the linearity of the detected ions and increasing the number of selectable modeling wavelengths, which facilitates subsequent wavelength selection and modeling analysis.

Application of the Partial Least Squares Regression Method
The PLSR method has been widely used to simultaneously determine compounds with a certain overlap in the UV-vis spectra. Compared to the full-spectrum method, selecting the most informative variables or eliminating non-information variables is beneficial to the PLSR model to minimize the error and enhance prediction ability. It can be seen from Figure 4 that after spectral pretreatment by wavelet transform, the wavelength variables with a correlation coefficient greater than 0.96 are selected, so that the initial variables of Zn, Co and Ni are 109, 127, and 74, respectively. Thirty sets of mixed solutions were used to construct a calibration set. In order to find the optimal model, after the addition of each new factor, the prediction residual error sum of squares (PRESS) and

Application of the Partial Least Squares Regression Method
The PLSR method has been widely used to simultaneously determine compounds with a certain overlap in the UV-vis spectra. Compared to the full-spectrum method, selecting the most informative variables or eliminating non-information variables is beneficial to the PLSR model to minimize the error and enhance prediction ability. It can be seen from Figure 4 that after spectral pretreatment by wavelet transform, the wavelength variables with a correlation coefficient greater than 0.96 are selected, so that the initial variables of Zn, Co and Ni are 109, 127, and 74, respectively. Thirty sets of mixed solutions were used to construct a calibration set. In order to find the optimal model, after the addition of each new factor, the prediction residual error sum of squares (PRESS) and the root-mean-square error of cross-validation (RMSECV) were recalculated for each metal ion separately. The optimal number of factors for Zn, Co, and Ni were 5, 3, and 4, respectively, as shown in Figure 5. The statistical results for Zn, Co and Ni in the calibration set by PLSR method were shown in Table 1. As shown in Table 1, the PLSR method for zinc, cobalt and nickel all have fewer principal component variables, the root mean square error of calibration values (RMSEC) are lower, and the correlation coefficients (R 2 ) for the calibration values are higher. The results show that the PLSR has better real-time performance and high precision and is suitable for simultaneous online detection of multi-metal ions. calibration set by PLSR method were shown in Table 1. As shown in Table 1, the method for zinc, cobalt and nickel all have fewer principal component variables, the mean square error of calibration values (RMSEC) are lower, and the correl coefficients (R 2 ) for the calibration values are higher. The results show that the PLSR better real-time performance and high precision and is suitable for simultaneous o detection of multi-metal ions.

Performance Analysis of WT-PLSR Method
In this paper, SG, FT, and WT are used for spectral data preprocessing, and PL used for quantitative modeling analysis of spectral data. In order to evaluate performance of three preprocessing algorithms and the spectral modeling method calculation results of the calibration set and prediction set are shown in Table 2. It c seen from Table 2 that among the three preprocessing methods, only the spectral preprocessed by WT has the significant R 2 and RMSEC in the calibration set an prediction set. The results indicate that the WT-PLSR method is the best method for o detection of polymetallic ions in zinc industrial wastewater. Using the calibration m by WT-PLSR, the prediction concentration of zinc, cobalt and nickel were calculated are shown in Table 3.
The average relative deviation for zinc, nickel, and cobalt was 2.85%, 3.05% 2.24%, respectively. The root mean squared error of prediction (RMSEP) is 0.856 fo 0.067 for Ni and 0.032 for Co, which satisfies the factory production index (less than 1

Performance Analysis of WT-PLSR Method
In this paper, SG, FT, and WT are used for spectral data preprocessing, and PLSR is used for quantitative modeling analysis of spectral data. In order to evaluate the performance of three preprocessing algorithms and the spectral modeling method, the calculation results of the calibration set and prediction set are shown in Table 2. It can be seen from Table 2 that among the three preprocessing methods, only the spectral data preprocessed by WT has the significant R 2 and RMSEC in the calibration set and the prediction set.
The results indicate that the WT-PLSR method is the best method for online detection of polymetallic ions in zinc industrial wastewater. Using the calibration model by WT-PLSR, the prediction concentration of zinc, cobalt and nickel were calculated, and are shown in Table 3.
The average relative deviation for zinc, nickel, and cobalt was 2.85%, 3.05%, and 2.24%, respectively. The root mean squared error of prediction (RMSEP) is 0.856 for Zn, 0.067 for Ni and 0.032 for Co, which satisfies the factory production index (less than 10%).

Conclusions
In the industrial wastewater from zinc hydrometallurgy, the excessive discharge of heavy metal ions will pose a great threat to the environment and to human health. In current production, zinc smelting enterprises mainly rely on manual offline analysis of polymetallic ion concentration in industrial wastewater, which makes the process of wastewater discharge expensive, cumbersome and time-consuming. Therefore, modern detection methods are urgently needed for rapid online detection of metal ion concentrations in industrial wastewater. Three spectral pretreatment methods, Savitzky-Golay (SG), Fourier transform (FT), and wavelet transform (WT), were used for the original spectral data. Spectral preprocessing effectively eliminated the noise and enhanced spectral feature information. PLSR was used to study the simultaneous detection of three heavy metals (Zn, Co, Ni). Among these methods, the method combining WT with PLSR had the best performance on the three heavy metals. The results indicated that the WT-PLSR method was simple, rapid, and accurate, and was suitable for online detection of polymetallic ions by ultraviolet-visible spectroscopy in zinc industrial wastewater.

Data Availability Statement:
The data presented in this study are available on request from the corresponding author. The data are not publicly available due to confidentiality.