Compensation method based on ultraviolet-visible spectrum interaction interference
By constructing nonlinear mapping relationships and Gaussian-linear compensation model, the problems of overlap and cross-interference of spectral signals in ultraviolet visible spectroscopy technology are solved, and high-precision analysis of spectral data is achieved, which is suitable for water pollution control, environmental monitoring, food safety detection and biomedicine.
Patent Information
- Application Number
- CN202510589441.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2045-05-08
AI Technical Summary
When processing water samples containing multiple components, the spectral signal is susceptible to overlapping and cross-interference of absorption peaks of different substances, resulting in a decrease in data accuracy and reliability, which is difficult for traditional methods to effectively solve.
By constructing a nonlinear mapping relationship between turbidity and spectral data, a Gaussian-linear compensation model and a quadratic polynomial regression model of interactive interference data are established, and the interactive interference compensation of spectral data is performed in different wavelength ranges respectively to eliminate cross interference in spectral data.
It significantly improves the accuracy and resolution of spectral data analysis, improves the reliability of multi-parameter analysis, and can more accurately interpret the spectral characteristics of complex water quality samples.
Smart Images

Figure CN120293892A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of spectral analysis, and in particular to a compensation method for ultraviolet-visible spectral interaction interference. Background Art
[0002] Ultraviolet-visible spectroscopy is an efficient and non-destructive analytical method. Light in the ultraviolet to visible light band emitted by a light source passes through a water sample, and the absorption degree of the sample to light of a specific wavelength is analyzed. The concentration of a substance to be measured usually has a certain relationship with the light absorption degree within a specific wavelength range. Different water quality components have unique spectral characteristics, and these characteristics can be distinguished by parameters such as absorbance, intensity, and morphology of absorption peaks. This technology has significant advantages such as simple operation, fast analysis speed, and obtaining rich substance information simultaneously.
[0003] However, when the sample contains multiple substances with similar absorption characteristics, the ultraviolet-visible spectral signals may overlap, resulting in interference between the absorption peaks of different substances, thereby affecting the accuracy and reliability of the data. Taking various water quality parameters such as Chemical Oxygen Demand (COD), nitrate, and turbidity in seawater as examples, the acquisition of spectral data may be affected by the interaction of different substances, resulting in signal overlap and cross-interference. This phenomenon complicates multi-parameter real-time prediction and analysis, and traditional linear regression and principal component analysis methods are difficult to effectively solve the problems brought by spectral signal overlap and cross-interference. Summary of the Invention
[0004] In order to overcome the above problems existing in the prior art, the present invention proposes a compensation method for ultraviolet-visible spectral interaction interference.
[0005] The technical solution adopted by the present invention to solve its technical problems is: a compensation method for ultraviolet-visible spectral interaction interference, including the following steps: Step 1, collect ultraviolet-visible spectral data of single-gradient solutions of turbidity, COD, nitrate, and their mixed solution, and preprocess the data; Step 2, construct a mapping relationship model between turbidity and spectral data; Step 3, for spectral data in the wavelength range of 260 - 320 nm, calculate the interaction interference data, establish a non-linear relationship between turbidity and the interaction interference data, and perform interaction interference compensation and spectral analysis; Step 4, for spectral data in the wavelength range of 220 - 260 nm, construct a relationship model between COD and spectral data, and calculate the interaction interference data; Step 5, based on the characteristics of the interaction interference data obtained in Step 4, establish a regression model, analyze the mutual relationship between the interference spectral characteristics and other substances, and perform interaction interference compensation and spectral analysis.
[0006] The above compensation method based on ultraviolet-visible spectral interaction interference, the specific preprocessing process in step 1 includes: Define parameters, the window width is , the polynomial order is o, and the derivative order is d; construct the matrix to represent the polynomial distribution characteristics of the data within the window, The formula is expressed as: ; Solve the weight matrix through pseudo-inverse operation , and extract the th row as the derivative filtering kernel, ; Among them is the derivative factorial compensation factor, is the derivative filtering kernel; Construct the sparse matrix , its central row is composed of , and the edge rows are generated by truncating the window polynomial fitting. Substitute the original spectral data into to obtain the processed spectral data, where is the input original spectral data, is the processed spectral data, and n is the number of wavelength points.
[0007] The above compensation method based on ultraviolet-visible spectral interaction interference, the specific step 2 is: According to the spectral data in the range of 220 - 320 nm, construct the basis matrix, and the turbidity concentration vector is defined as , N is the concentration gradient, and its spectral data matrix is defined as , M is the number of wavelength points in the range of 220 - 320 nm, and each column corresponds to the absorption spectral data at wavelength , where m = 1, 2... M; construct the basis matrix to represent the non-linear mapping relationship between turbidity and absorption spectral data, The formula is: ; For each wavelength , the coefficient vector is , each wavelength channel is independently modeled, and is solved in batches through matrix operations. The specific formula is ; Extract the information related to turbidity from the spectral data in the range of 400 - 800 nm to obtain the new data , and the predicted value of its absorption spectral data is: ; Among them, at each wavelength constitute the output prediction matrix .
[0008] The above compensation method based on ultraviolet-visible spectral interaction interference, the specific step 3 is as follows: Step 3.1, extract the interaction interference data within the 260-320 nm band, is the interaction interference data, is the spectral data of COD, is the spectral data of turbidity, is the spectral data corresponding to the mixed solution, The interaction interference data can be calculated by the following formula: ; Group and average according to the turbidity concentration gradient to reduce noise; the group length is L, and the group index is , then the averaged interaction interference spectral data can be obtained by the following formula: ; Perform linear interpolation on each wavelength channel of to generate the extended matrix ; Step 3.2, model the non-linear relationship between turbidity and interaction interference data through the Gaussian-linear compensation model: initialize the linear term parameters, and obtain the initial slope and intercept through linear regression, and construct the linear model, , where is the residual noise, c is the turbidity concentration, is the interaction interference data corresponding to the wavelength , where m = 1, 2... M; Calculate the linear residual , and locate the maximum residual point . The amplitude and width are estimated as ; Step 3.3, accurately solve the parameter vector through non-linear least squares optimization; use the least squares method to fit the model to obtain the optimal parameters corresponding to each wavelength, and save the parameters at all wavelengths in the matrix ; Through the parameter matrix obtained by fitting and the new data , use the Gaussian-linear compensation model to predict the interaction interference data. For the new sample use the following formula for calculation: ; By applying the model at each wavelength one by one, the corresponding interactive interference data is obtained ; Step 3.4, in the wavelength range of 260 - 320 nm, according to the turbidity absorption spectrum model and the Gaussian-linear compensation model, calculate the corrected mixed spectral data: ; wherein, is the absorption spectrum data after interactive interference compensation; Bring the absorption spectrum data after interactive interference compensation into the spectral component analysis model for analysis.
[0009] For the above compensation method based on ultraviolet-visible spectral interactive interference, step 4 is specifically: Fit COD and absorption spectrum data in the 220 - 260 nm band. For each wavelength , i = 1, 2, … z, where z represents the number of wavelength points in the 220 - 260 nm range, establish the relationship between the absorbance and the COD concentration , , where is the slope, is the intercept; For the given new data , the predicted value of its absorption spectrum data is: , and the at each wavelength constitutes the output prediction matrix ; Extract the interactive interference data within this band, is the interactive interference data, is the absorption spectrum data of COD, is the absorption spectrum data of nitrate, is the absorption spectrum data of turbidity, is the absorption spectrum data corresponding to the mixed solution of the three substances.
[0010] The interactive interference data can be calculated by the following formula: .
[0011] For the above compensation method based on ultraviolet-visible spectral interactive interference, step 5 is specifically: According to the non-linear mapping relationship between turbidity, COD and the interactive interference data , construct a quadratic polynomial regression model; The input variables , which includes the turbidity concentration and the COD concentration , expand to a matrix including quadratic terms and cross terms : ; For the absorbance at each wavelength (i = 1, 2, … n), solve the regression coefficient matrix , , and establish a non-linear mapping relationship between absorbance and multi-variables ; Input new data , and calculate the absorption spectral data: , and at each wavelength constitutes the output spectral data matrix ; Within 220 - 260 nm, according to the turbidity absorbance model, COD absorbance model and quadratic polynomial regression model, calculate the spectral data of the mixed solution after cross-interference compensation : ; Input the spectral data after cross-interference compensation into the analysis model to analyze nitrate.
[0012] The beneficial effect of the present invention is that, aiming at the cross-interference and overlap problems in spectral data, the present invention adopts a compensation algorithm to significantly improve the accuracy of spectral data analysis. The spectral data after compensation processing can effectively remove cross-interference, significantly improve the resolution of spectral signals, and enhance the reliability of data analysis. This method performs excellently in multi-parameter synchronous analysis, helps to more accurately interpret complex spectral data, especially when dealing with water quality samples containing multiple components, can effectively separate the spectral contributions of various substances. This method is applicable to the fields of water pollution control, environmental monitoring, food safety detection and biomedicine, etc., provides more accurate and reliable technical support for spectral data analysis, and has broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 is a schematic flow diagram of the present invention; Figure 2 is the COD analysis result without cross-interference compensation in the embodiment of the present invention; Figure 3 is the COD analysis result after cross-interference compensation in the embodiment of the present invention; Figure 4 is the nitrate analysis result without cross-interference compensation in the embodiment of the present invention; Figure 5 is the nitrate analysis result after cross-interference compensation in the embodiment of the present invention. Specific embodiments
[0014] To enable those skilled in the art to better understand the technical solutions of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0015] This embodiment completes a compensation method based on ultraviolet-visible spectral interactive interference, which uses the interactive interference compensation method to correct the cross-interference between multiple substances in the spectral data, and realizes more accurate synchronous analysis of multiple water quality parameters through the compensated spectral data. The specific process is as Figure 1 shown.
[0016] Use a spectrometer to collect the ultraviolet-visible spectral data of turbidity, COD, nitrate single-gradient solutions, and their mixed solutions, and smooth the spectral data to remove random noise in the spectrum.
[0017] First, define the parameters. The window width is , the polynomial order is o, and the derivative order is d; construct the matrix to represent the polynomial distribution characteristics of the data within the window, and the formula is expressed as: ; Then, solve the weight matrix through pseudo-inverse operation, and extract the th row as the derivative filter kernel: ; where is the derivative factorial compensation factor, is the derivative filter kernel; Finally, construct the sparse matrix , whose central row is composed of , and the edge rows are generated by truncating the window polynomial fitting. Substitute the original spectral data into to obtain the processed spectral data, where is the input original spectral data, is the processed spectral data, and n is the number of wavelength points. Substituting the original spectral data into the above formula will smooth the spectral data and reduce noise.
[0018] 2. According to the spectral data in the range of 220 - 320 nm, construct a basis matrix to represent the non-linear mapping relationship model between the spectral data and turbidity. The turbidity concentration vector is defined as , N is the concentration gradient, and its spectral data matrix is defined as , and each column corresponds to the absorption spectral data at wavelength , where M is the number of wavelength points in the range of 220 - 320 nm. Construct the basis matrix to represent the non - linear mapping relationship between turbidity and absorption spectral data, as shown in the formula: ; For each wavelength , the coefficient vector is , and independent models are built for each wavelength channel. Batch solutions are obtained through matrix operations , and the specific formula is .
[0019] The spectral data in the range of 400 - 800 nm is mainly affected by turbidity. By analyzing the spectral data in this band, information related to turbidity can be extracted to obtain new data , and the predicted value of its absorption spectral data is: ; At each wavelength constitutes the output prediction matrix .
[0020] 3. The spectral data in the range of 260 - 320 nm is mainly caused by turbidity and COD. However, turbidity will interfere with COD, resulting in the fact that the ultraviolet - visible spectral data of the mixed solution is not simply the superposition of the spectral data of the two substances. It is necessary to compensate for the interactive interference of the spectral data.
[0021] First, extract the interactive interference data in this band, is the interactive interference data, is the spectral data of COD, is the spectral data of turbidity, is the spectral data corresponding to the mixed solution. The interactive interference data can be calculated by the following formula: ; To improve the signal - to - noise ratio, the noise is reduced by grouping according to the turbidity concentration gradient and averaging. The grouping length L is, and the grouping index is, then the averaged interactive interference spectral data can be obtained by the following formula: ; Perform linear interpolation on each wavelength channel of to generate the extended matrix .
[0022] 4. According to the characteristics of the interactive interference data, a Gaussian - linear compensation model is selected to model the non - linear relationship between turbidity and interactive interference data. First, the parameters need to be initialized: Initialization of linear term parameters, obtaining the initial slope through linear regression and intercept , constructing a linear model, where is the residual noise, c is the turbidity concentration, is the interactive interference data corresponding to the wavelength .
[0023] Initialization of Gaussian term residuals, estimating Gaussian term parameters through residual analysis , , . First, calculate the linear residual , locate the maximum residual point . The amplitude and width are estimated as .
[0024] 5. Accurately solve the parameter vector through nonlinear least squares optimization , set the constraint conditions of the parameters as: ; Use the least squares method to fit the model to obtain the optimal parameters corresponding to each wavelength , and save the parameters at all wavelengths in the matrix .
[0025] 6. Using the parameter matrix obtained by fitting and the new data , predict the interactive interference data using the Gaussian-linear compensation model. For the new sample , calculate using the following formula: ; By applying the model at each wavelength one by one, obtain the corresponding interactive interference data .
[0026] 7. In the wavelength range of 260 - 320 nm, calculate the corrected mixed spectral data according to the turbidity absorption spectral model and the Gaussian-linear compensation model, so as to perform accurate spectral component analysis: ; where, is the absorption spectral data after interactive interference compensation.
[0027] Bring the absorption spectral data after interactive interference compensation into the spectral component analysis model, and analyze the COD according to the characteristics such as absorbance and absorption peak intensity in the spectral data. The analysis results are shown in Table 1.
[0028] 8. Fit the COD and absorption spectrum data within the 220 - 260 nm band. For each wavelength (i = 1, 2, … z), where z represents the number of wavelength points in the range of 220 - 260 nm, establish the relationship between the absorbance and the COD concentration as , where is the slope and is the intercept, obtained by fitting with the least squares method.
[0029] For the given new data , the predicted value of its absorption spectrum data is: , and the at each wavelength constitutes the output prediction matrix .
[0030] 9. In the spectral data within the 220 - 260 nm wavelength range, the turbidity and the absorption spectrum data of COD will have an interactive effect on the absorption spectrum data of nitrate, and it is necessary to compensate for the interactive interference of the spectral data. First, extract the interactive interference data within this band. is the interactive interference data. In the 220 - 260 nm wavelength range, is the absorption spectrum data of COD, is the absorption spectrum data of nitrate, is the absorption spectrum data of turbidity, is the absorption spectrum data corresponding to the mixed solution of the three substances.
[0031] The interactive interference data can be calculated by the following formula: ; 10. According to the non - linear mapping relationship between turbidity and COD and the interactive interference data , construct a quadratic polynomial regression model to eliminate the multi - variable interference in the spectrum. The input variables include the turbidity concentration and the COD concentration . Expand into a matrix containing quadratic terms and cross - terms. The formula is: ; For the absorbance at each wavelength (i = 1, 2, … n), solve the regression coefficient matrix , , and establish the non - linear mapping relationship between the absorbance and the multi - variables .
[0032] Input new data , calculate the absorption spectrum data: , at each wavelength constitute the output spectrum data matrix .
[0033] 11. Within the range of 220 - 260 nm, according to the turbidity absorbance model, COD absorbance model, and quadratic polynomial regression model, calculate the spectral data of the mixed solution after interactive interference compensation : ; Input the spectral data after interactive interference compensation into the analysis model. According to the characteristics such as absorbance and absorption peak intensity in the spectral data, analyze nitrate. The results are shown in Table 1
[0034] Table SEQ Table \* ARABIC 1 Analysis results of spectral data before and after interactive interference compensation
[0035] Table 1 shows the comparison of the spectral data before and after interactive interference compensation for the analysis results of COD and nitrate. The results show that after interactive interference compensation, all indicators of COD and nitrate concentration prediction have been improved, and the analysis accuracy has been significantly improved Figure 2 and Figure 3 respectively show the scatter plots of the COD analysis results before and after interactive interference compensation Figure 4 and Figure 5 shows the scatter plots of the nitrate analysis results before and after interactive interference compensation. It can be seen that the scatter plots after interactive interference compensation for both are more concentrated, and the analysis results are more accurate
[0036] Through the above method, this embodiment proposes a compensation method for interactive interference based on ultraviolet - visible spectroscopy. Aiming at the problems of interactive interference and overlap in spectral data, a compensation algorithm is used to significantly improve the accuracy of spectral data analysis. The spectral data after compensation processing can effectively remove cross - interference, significantly improve the resolution of spectral signals, and enhance the reliability of data analysis. This method performs excellently in multi - parameter synchronous analysis, helps to more accurately interpret complex spectral data, especially when dealing with water quality samples containing multiple components, it can effectively separate the spectral contributions of various substances. This method is applicable to fields such as water pollution control, environmental monitoring, food safety detection, and biomedicine, providing more accurate and reliable technical support for spectral data analysis and having broad application prospects
[0037] The above embodiments are only exemplary embodiments of the present invention and are not intended to limit the present invention. Those skilled in the art can make various modifications or equivalent replacements to the present invention within the essence and protection scope of the present invention, and such modifications or equivalent replacements should also be regarded as falling within the protection scope of the present invention.
Claims
1. A compensation method based on ultraviolet-visible spectral interaction interference, characterized in that, It includes the following steps: Step 1: Collect the ultraviolet-visible spectral data of single-gradient solutions of turbidity, COD, nitrate, and their mixed solution, and preprocess the data; Step 2: Construct a mapping relationship model between turbidity and spectral data; Step 3: For the spectral data in the wavelength range of 260 - 320 nm, calculate the interactive interference data, establish a non-linear relationship between turbidity and the interactive interference data, and perform interactive interference compensation and spectral analysis; Step 4: For the spectral data in the wavelength range of 220 - 260 nm, construct a relationship model between COD and spectral data, and calculate the interactive interference data; Step 5: Based on the characteristics of the interactive interference data obtained in Step 4, establish a regression model, analyze the mutual relationship between the interference spectral characteristics and other substances, and perform interactive interference compensation and spectral analysis.
2. The compensation method based on ultraviolet-visible spectral interaction interference according to claim 1, wherein The specific preprocessing process of Step 1 includes: Define the parameters, where the window width is , the polynomial order is o, and the derivative order is d; construct the matrix , which is used to represent the polynomial distribution characteristics of the data within the window, The formula is expressed as: ; Solve the weight matrix by pseudo-inverse operation , and extract the th row as the derivative filter kernel. ; wherein is the derivative factorial compensation factor, is the derivative filter kernel; Construct a sparse matrix , whose central row is composed of , and the edge rows are generated by truncating window polynomial fitting. Substitute the original spectral data into to obtain the processed spectral data, where is the input original spectral data,[[]] is the processed spectral data, and n is the number of wavelength points.
3. The compensation method based on ultraviolet-visible spectral interaction interference according to claim 1, wherein The specific content of step 2 is as follows: According to the spectral data in the range of 220 - 320 nm, construct a basis matrix, and the turbidity concentration vector is defined as , where N is the concentration gradient, and its spectral data matrix is defined as , M is the number of wavelength points in the range of 220 - 320 nm, and each column corresponds to the absorption spectral data at the wavelength , where m = 1, 2... M; construct the basis matrix to represent the non-linear mapping relationship between turbidity and absorption spectral data, and the formula is: ; For each wavelength , the coefficient vector is . Each wavelength channel is modeled independently and solved batch by matrix operation . The specific formula is ; Extract information related to turbidity from spectral data in the range of 400 - 800 nm to obtain new data , and the predicted value of its absorption spectral data is: ; Among them, at each wavelength constitutes an output prediction matrix .
4. The compensation method based on ultraviolet-visible spectral interaction interference according to claim 1, characterized in that, The specific content of Step 3 is: Step 3.1, extract the interactive interference data within the 260 - 320 nm band, is the interactive interference data, is the spectral data of COD, is the spectral data of turbidity, is the spectral data corresponding to the mixed solution, The interactive interference data can be calculated by the following formula: ; Group and average according to the turbidity concentration gradient to reduce noise; If the packet length is L and the packet index is , then the averaged cross-interference spectral data can be obtained by the following formula: ; For each wavelength channel of , perform linear interpolation to generate an extended matrix ; Step 3.2, model the non-linear relationship between turbidity and cross-interference data through a Gaussian-linear compensation model: initialize the linear term parameters, and obtain the initial slope through linear regression and intercept , construct a linear model, , where is the residual noise, c is the turbidity concentration, is the cross-interference data corresponding to the wavelength , where m = 1, 2... M; Calculate the linear residual , locate the maximum residual point . The amplitude and width are estimated as ; Step 3.3, accurately solve the parameter vector through non-linear least squares optimization ; Use the least squares method to fit the model to obtain the optimal parameters corresponding to each wavelength , and save the parameters at all wavelengths in the matrix ; The parameter matrix obtained by fitting and new data , the Gaussian-linear compensation model is used to predict the cross-interference data. For the new samples the following formula is used for calculation: ; By applying the model at each wavelength one by one, the corresponding cross-interference data is obtained ; Step 3.4: In the wavelength range of 260 - 320 nm, calculate the corrected mixed spectral data according to the turbidity absorption spectral model and the Gaussian-linear compensation model: ; Among them, is the absorption spectral data after cross-interference compensation; Bring the absorption spectral data after cross-interference compensation into the spectral component analysis model for analysis.
5. The compensation method based on ultraviolet-visible spectrum interaction interference according to claim 1, wherein, The specific steps of step 4 are as follows: Fit the COD and absorption spectrum data in the wavelength range of 220 - 260 nm. For each wavelength , i = 1, 2, … z, where z represents the number of wavelength points in the range of 220 - 260 nm, and establish the relationship between the absorbance and the COD concentration , , where is the slope, and is the intercept. For the given new data , the predicted values of its absorption spectral data are: , and the at each wavelength constitute the output prediction matrix ; Extract the interactive interference data within this wavelength band, is the interactive interference data, is the absorption spectral data of COD, is the absorption spectral data of nitrate, is the absorption spectral data of turbidity, is the absorption spectral data corresponding to the mixed solution of the three substances; Interactive interference data It can be calculated by the following formula: 。 6. The compensation method based on ultraviolet-visible spectrum interaction interference according to claim 5, wherein, The specific steps of step 5 are as follows: According to the non-linear mapping relationship between turbidity, COD and interactive interference data a quadratic polynomial regression model is constructed; Input variable , which includes turbidity concentration and COD concentration , will be extended to a matrix including quadratic terms and cross terms : ; For each wavelength (i = 1, 2, … n)of the absorbance , solve the regression coefficient matrix , , establish the non-linear mapping relationship between absorbance and multiple variables ; Input new data , calculate absorption spectrum data: , at each wavelength constitute the output spectrum data matrix ; Within 220 - 260 nm, according to the turbidity absorbance model, COD absorbance model, and quadratic polynomial regression model, the spectral data of the mixed solution after cross-interference compensation is calculated. : ; The spectral data after interactive interference compensation is input into the analysis model to analyze nitrate.
Citation Information
Patent Citations
Turbidity compensation method for COD detection based on spectrometry
CN105352898A
Multispectral fusion type chemical oxygen demand testing method and device
CN111487213A
Water quality analyzer
CN116148200A
Water quality detection method and system adopting hyperspectral analysis
CN118150503A
Water quality multi-parameter detection method and system based on ultraviolet-visible light section spectroscopy
CN119438109A
Cited By
Concentration detection method and system of hydrogen peroxide sterilization system
CN120490026A
A concentration detection method and system for a hydrogen peroxide sterilization system
CN120490026B
Optical detection method of analyte
CN121207867A
Method and system for rapidly estimating residual nuclide concentration of radioactive waste liquid
CN121917482A
COD detection anti-interference method and system based on three optical paths and SE-1DCNN
CN122282680A