Compensation method based on ultraviolet-visible spectrum interaction interference
By constructing a mapping relationship model and a nonlinear compensation model for spectral data, the problem of material interaction interference in ultraviolet-visible spectroscopy is solved, improving the accuracy and reliability of spectral data analysis. This method is applicable to fields such as water pollution control, environmental monitoring, food safety testing, and biomedicine.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2026-03-27
AI Technical Summary
When processing multiple substances with similar absorption characteristics, ultraviolet-visible spectroscopy may encounter signal overlap and cross-interference, leading to a decrease in data accuracy and reliability, which traditional methods struggle to address effectively.
By constructing a mapping model between turbidity and spectral data, calculating interactive interference data, establishing a nonlinear relationship, and employing a Gaussian-linear compensation model and a quadratic polynomial regression model, interactive interference compensation for spectral data is performed.
It significantly improves the accuracy and resolution of spectral data analysis, enhances the reliability of data analysis, and enables more accurate interpretation of complex spectral data, especially in multi-parameter simultaneous analysis, effectively separating the spectral contributions of each substance.
Smart Images

Figure CN120293892B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of spectral analysis, in particular to a compensation method based on UV-Vis spectrum interaction interference. BACKGROUND
[0002] UV-Vis spectrum technology is a high-efficiency, non-destructive analysis method. It is through the UV to visible light band of light emitted by the light source, after the water sample, the analysis of the sample to the specific wavelength light absorption degree. The concentration of the measured substance is usually related to the light absorption degree in a certain wavelength range. Different water quality components have unique spectral characteristics, which can be distinguished by parameters such as absorbance, absorption peak intensity and morphology. This technology has the advantages of simple operation, fast analysis speed, and simultaneous acquisition of rich material information.
[0003] However, when the sample contains multiple substances with similar absorption characteristics, the UV-Vis spectrum signal may overlap, causing the absorption peaks of different substances to interfere with each other, thereby affecting the accuracy and reliability of the data. For example, in seawater, multiple water quality parameters such as chemical oxygen demand (COD), nitrate, turbidity, etc. The collection of spectral data may be affected by the interaction of different substances, resulting in signal overlap and cross-interference. This phenomenon complicates the real-time prediction and analysis of multiple parameters, and traditional linear regression and principal component analysis methods cannot effectively solve the problems caused by spectral signal overlap and cross-interference. SUMMARY
[0004] In order to overcome the above problems existing in the prior art, the present application proposes a compensation method based on UV-Vis spectrum interaction interference.
[0005] The technical scheme adopted by the present application to solve its technical problems is: a compensation method based on UV-Vis spectrum interaction interference, comprising the following steps:
[0006] Step 1, collect the UV-Vis spectrum data of turbidity, COD, nitrate single gradient solution and mixed solution of the three, and pretreat the data;
[0007] Step 2, construct a mapping relationship model of turbidity and spectral data;
[0008] Step 3, for the spectral data in the wavelength range of 260-320 nm, calculate the interaction interference data, establish the nonlinear relationship between turbidity and interaction interference data, and perform interaction interference compensation and spectral analysis;
[0009] Step 4, for the spectral data in the wavelength range of 220-260 nm, construct a COD and spectral data relationship model, and calculate the interaction interference data;
[0010] Step 5, based on the characteristics of the interaction interference data obtained in step 4, a regression model is established to analyze the mutual relationship between the interference spectral characteristics and other substances, and interaction interference compensation and spectral analysis are carried out.
[0011] The above-mentioned compensation method for ultraviolet-visible spectrum interaction interference, the step 1 preprocessing process specifically includes:
[0012] The definition parameter, the window width is , the polynomial order is o, and the derivative order is d; the matrix is constructed to represent the polynomial distribution characteristics of the data in the window, The formula is expressed as:
[0013] ;
[0014] The weight matrix is solved by pseudo-inverse operation , and the first row is extracted as the derivative filter kernel,
[0015] ;
[0016] Wherein is the derivative factorial compensation factor, is the derivative filter kernel;
[0017] The sparse matrix is constructed, the center row is composed of , and the edge row is generated by truncating the window polynomial fitting, and the original spectrum data is substituted into to obtain the processed spectrum data, wherein is the input original spectrum data, is the processed spectrum data, and n is the wavelength point number.
[0018] The above-mentioned compensation method for ultraviolet-visible spectrum interaction interference, the step 2 is specifically: according to the spectrum data in the range of 220-320nm, the base matrix is constructed, the turbidity concentration vector is defined as , N is the concentration gradient, the spectrum data matrix is defined as , M is the wavelength point number in the range of 220-320nm, each column corresponds to the absorption spectrum data of wavelength , wherein m=1,2……M; the base matrix is constructed to represent the nonlinear mapping relationship between turbidity and absorption spectrum data, The formula is:
[0019] ;
[0020] For each wavelength , the coefficient vector is Each wavelength channel is independently modeled and solved in batch through matrix operation The specific formula is ;
[0021] Extract the information related to turbidity from the spectral data in the range of 400-800 nm to obtain new data The predicted value of the absorption spectrum data is
[0022] ;
[0023] Wherein, the at each wavelength constitutes the output prediction matrix .
[0024] The compensation method based on the mutual interference of ultraviolet-visible spectrum above, the step 3 specifically is:
[0025] Step 3.1, extract the mutual interference data in the wave band of 260-320 nm, is the mutual interference data, is the spectrum data of COD, is the spectrum data of turbidity, is the spectrum data corresponding to the mixed solution, The mutual interference data can be calculated by the following formula:
[0026] ;
[0027] Grouping and averaging according to the turbidity concentration gradient to reduce noise; the grouping length is L, and the grouping index is Then the averaged mutual interference spectrum data Can be obtained by the following formula:
[0028] ;
[0029] Linear interpolation is performed on each wavelength channel of to generate the expansion matrix ;
[0030] Step 3.2, model the nonlinear relationship between turbidity and mutual interference data through the Gauss-linear compensation model: initialize the linear term parameters, obtain the initial slope and intercept through linear regression, construct the linear model, Wherein is the residual noise, c is the turbidity concentration, is the mutual interference data corresponding to the wavelength , wherein m=1, 2……M;
[0031] Calculate the linear residual , locating the maximum residual point . The amplitude and width are estimated as ;
[0032] Step 3.3, the parameter vector is solved accurately by nonlinear least squares optimization ; the model is fitted using least squares method to obtain the optimal parameters corresponding to each wavelength , and the parameters at all wavelengths are saved in matrix ;
[0033] The parameter matrix obtained by fitting and new data , the interactive interference data is predicted using the Gaussian-linear compensation model, and for new samples , the following formula is used for calculation:
[0034] ;
[0035] By applying the model one by one at each wavelength, the corresponding interactive interference data ;
[0036] Step 3.4, in the wavelength range of 260-320 nm, according to the turbidity absorption spectrum model and the Gaussian-linear compensation model, the corrected mixed spectrum data is calculated:
[0037] ;
[0038] Wherein, is the absorption spectrum data after interactive interference compensation;
[0039] The absorption spectrum data after interactive interference compensation is brought into the spectral component analysis model for analysis.
[0040] The above compensation method based on UV-visible spectrum interactive interference, the step 4 is specifically: in the 220-260nm band, the COD and absorption spectrum data are fitted, for each wavelength , i=1, 2, …z, wherein z represents the number of wavelength points of 220-260nm, the relationship between absorbance and COD concentration is established, wherein is the slope, is the intercept;
[0041] For a given new data , the predicted value of its absorption spectrum data is: , and Constructing output prediction matrix ;
[0042] Extracting interaction interference data in the waveband, For interaction interference data, For COD absorption spectrum data, For nitrate absorption spectrum data, For turbidity absorption spectrum data, For the absorption spectrum data corresponding to the mixed solution of the three substances.
[0043] Interaction interference data Can be calculated by the following formula:
[0044] .
[0045] The above-mentioned compensation method for ultraviolet-visible spectrum interaction interference, step 5 is specifically: according to the nonlinear mapping relationship between turbidity and COD and interaction interference data , construct a quadratic polynomial regression model; the input variable , which contains turbidity concentration and COD concentration , will be Extended to a matrix containing quadratic terms and cross terms :
[0046] ;
[0047] For each wavelength (i=1,2,…n) absorbance , solve the regression coefficient matrix , , establish the nonlinear mapping relationship between absorbance and multivariate ;
[0048] Input new data , calculate the absorption spectrum data: , the At each wavelength, it constitutes the output spectrum data matrix ;
[0049] In 220-260nm, according to the turbidity absorbance model, the COD absorbance model and the quadratic polynomial regression model, the spectral data of the mixed solution after interaction interference compensation :
[0050] ;
[0051] The spectral data after interaction interference compensation Input to the analysis model to analyze nitrate.
[0052] The present application has the beneficial effect that the present application adopts a compensation algorithm to significantly improve the accuracy of spectral data analysis in view of the interaction interference and overlap problem in spectral data. The spectral data after compensation processing can effectively remove the cross interference, significantly improve the resolution of the spectral signal, and improve 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 contribution of each substance. This method is suitable for water pollution control, environmental monitoring, food safety detection and biomedical fields, and provides more accurate and reliable technical support for spectral data analysis, and has a wide application prospect. BRIEF DESCRIPTION OF DRAWINGS
[0053] Figure 1 is a flowchart of the present application;
[0054] Figure 2 is the COD analysis result without interaction interference compensation in the embodiment of the present application;
[0055] Figure 3 is the COD analysis result after interaction interference compensation in the embodiment of the present application;
[0056] Figure 4 is the nitrate analysis result without interaction interference compensation in the embodiment of the present application;
[0057] Figure 5 is the nitrate analysis result after interaction interference compensation in the embodiment of the present application. DETAILED DESCRIPTION
[0058] In order for those skilled in the art to better understand the technical solutions of the present application, the present application will be described in detail below in combination with the drawings and specific embodiments.
[0059] This embodiment completes a compensation method based on ultraviolet-visible spectrum interaction interference, adopts an interaction 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, and the specific process is as shown in Figure 1 .
[0060] The ultraviolet-visible spectrum data of turbidity, COD, nitrate single gradient solution and mixed solution of the three are collected using a spectrometer, and the spectral data is smoothed to remove random noise in the spectrum.
[0061] First, define the parameters, the window width is , the polynomial order is o, and the derivative order is d; construct a matrix , which is used to represent the polynomial distribution characteristics of the data in the window, The formula is expressed as:
[0062] ;
[0063] Then, the weight matrix is solved by pseudo-inverse operation , and the first row is extracted as the derivative filter kernel:
[0064] ;
[0065] Where is the derivative factorial compensation factor, is the derivative filter kernel;
[0066] Finally, the sparse matrix is constructed, the central row is composed of , and the edge row is generated by polynomial fitting through truncation windows. The original spectral data is substituted 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 make the spectral data smooth and reduce noise.
[0067] 2. According to the spectral data in the range of 220-320 nm, the basis matrix is constructed to represent the nonlinear mapping relationship model between the spectral data and the turbidity. The turbidity concentration vector is defined as , N is the concentration gradient, and the spectral data matrix is defined as , each column corresponds to the absorption spectral data of wavelength , where M is the number of wavelength points in the range of 220-320 nm. The basis matrix is constructed to represent the nonlinear mapping relationship between turbidity and absorption spectral data, as shown in the formula:
[0068] ;
[0069] For each wavelength , the coefficient vector is , each wavelength channel is independently modeled, and is solved in batches through matrix operation, and the specific formula is .
[0070] 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:
[0071] ;
[0072] each wavelength constitute the output prediction matrix .
[0073] 3. The spectral data in the range of 260-320 nm is mainly caused by turbidity and COD, but turbidity will interfere with COD, resulting in that the UV-Vis spectral data of the mixed solution is not simply the superposition of the spectral data of the two substances, and the spectral data needs to be compensated for interactive interference.
[0074] First, extract the interactive interference data in this waveband, 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:
[0075] ;
[0076] In order 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 the average interactive interference spectral data can be obtained by the following formula:
[0077] ;
[0078] Linear interpolation is performed on each wavelength channel of to generate the extended matrix .
[0079] 4. According to the characteristics of the interactive interference data, a Gaussian-linear compensation model is selected to model the nonlinear relationship between turbidity and interactive interference data. First, the parameters need to be initialized:
[0080] Linear term parameter initialization, the initial slope and intercept are obtained by linear regression, and the linear model is constructed, where is the residual noise, c is the turbidity concentration, is the interactive interference data corresponding to the wavelength .
[0081] Gaussian term residual initialization, estimate the Gaussian term parameters , , . First, calculate the linear residual , locate the maximum residual point The amplitude and width are estimated as .
[0082] 5. The parameter vector is solved accurately by nonlinear least square optimization , and the constraint condition of the parameter is set as:
[0083] ;
[0084] The model is fitted by least square method to obtain the optimal parameter corresponding to each wavelength , and the parameters under all wavelengths are saved in matrix .
[0085] 6. The parameter matrix obtained by fitting and new data are used to predict the interactive interference data by using the Gaussian-linear compensation model. For new sample , the following formula is used for calculation:
[0086] ;
[0087] By applying the model under each wavelength one by one, the corresponding interactive interference data is obtained.
[0088] 7. In the wavelength range of 260-320 nm, the corrected mixed spectral data is calculated according to the turbidity absorption spectrum model and the Gaussian-linear compensation model, so as to perform accurate spectral component analysis:
[0089] ;
[0090] Among them, is the absorption spectrum data after interactive interference compensation.
[0091] The absorption spectrum data after interactive interference compensation is brought into the spectral component analysis model, and COD is analyzed according to the absorbance and absorption peak intensity and other characteristics in the spectral data. The analysis results are shown in Table 1.
[0092] 8. In the wavelength range of 220-260 nm, the COD and the absorption spectrum data are fitted, and for each wavelength (i=1, 2, …z), where z represents the number of wavelength points in the wavelength range of 220-260 nm, the relationship between absorbance and COD concentration is established, where is the slope, and is the intercept, which is obtained by least square fitting.
[0093] For a given new data , the predicted value of its absorption spectrum data is: , at each wavelength The output prediction matrix is composed of .
[0094] 9. The spectral data in the wavelength range of 220-260 nm, turbidity and COD absorption spectrum data will have an interactive effect on the absorption spectrum data of nitrate, and the spectral data needs to be compensated for interactive interference. First, extract the interactive interference data in this wavelength range, is the interactive interference data, in the wavelength range of 220-260 nm, 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.
[0095] Interactive interference data can be calculated by the following formula:
[0096] ;
[0097] 10. According to the nonlinear mapping relationship between turbidity and COD and the interactive interference data , a quadratic polynomial regression model is constructed to eliminate the multivariate interference in the spectrum. The input variable contains the turbidity concentration and the COD concentration , and is expanded to a matrix containing quadratic terms and cross terms, formula:
[0098] ;
[0099] For each wavelength (i=1,2,…n) of absorbance , solve the regression coefficient matrix , , establish the nonlinear mapping relationship between absorbance and multivariate .
[0100] Input new data , calculate the absorption spectrum data: , at each wavelength The output spectrum data matrix is composed of .
[0101] 11. Within the 220-260 nm range, calculate the spectral data of the mixed solution after cross-interference compensation based on the turbidity absorbance model, COD absorbance model, and quadratic polynomial regression model. :
[0102] ;
[0103] Spectral data after interference compensation The data were input into the analysis model, and the nitrate was analyzed based on the absorbance and absorption peak intensity in the spectral data. The results are shown in Table 1.
[0104] Table SEQ Table * ARABIC 1 Spectral data analysis results before and after interactive interference compensation
[0105]
[0106] Table 1 shows a comparison of the COD and nitrate analysis results using spectral data before and after cross-interference compensation. The results indicate that after cross-interference compensation, all predicted indicators for COD and nitrate concentrations were improved, and the analytical accuracy was significantly enhanced. Figure 2 and Figure 3 Scatter plots of COD analysis results before and after interactive interference compensation are shown. Figure 4 and Figure 5 The image shows scatter plots of nitrate analysis results before and after interference compensation. It can be seen that the scatter plots after interference compensation are more concentrated, indicating more accurate analysis results.
[0107] Based on the above-described method, this embodiment proposes a compensation method for cross-interference in ultraviolet-visible spectra. Addressing the cross-interference and overlap issues in spectral data, a compensation algorithm significantly improves the accuracy of spectral data analysis. The compensated spectral data effectively removes cross-interference, significantly improves the resolution of the spectral signal, and enhances the reliability of data analysis. This method performs exceptionally well in multi-parameter simultaneous analysis, facilitating more accurate interpretation of complex spectral data, especially when processing water samples containing multiple components, effectively separating the spectral contributions of each substance. This method is applicable to fields such as water pollution control, environmental monitoring, food safety testing, and biomedicine, providing more accurate and reliable technical support for spectral data analysis and possessing broad application prospects.
[0108] The above embodiments are merely 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 substitutions to the present invention within its scope and spirit, and such modifications or equivalent substitutions should also be considered to fall within the scope of protection of the present invention.
Claims
1. A compensation method based on the interaction interference of ultraviolet-visible spectrum, characterized in that, The method comprises the following steps: Step 1, collecting the UV-visible spectrum data of turbidity, COD, nitrate single gradient solution and mixed solution of the three, and preprocessing the data; Step 2, constructing the mapping model of turbidity and spectral data: according to the spectral data in the range of 220-320 nm, the base matrix is constructed to represent the nonlinear mapping relationship between turbidity and absorption spectral data, N is the concentration gradient; The turbidity concentration vector is defined as N is the concentration gradient, the information related to turbidity is extracted by the spectral data in the range of 400-800 nm, and new data The predicted value of the absorption spectrum data is: wherein each wavelength under constitute an output prediction matrix , a m , b m , c m constitute a coefficient vector q m : , each wavelength channel is independently modeled and solved in batch through matrix operations ; Step 3. Calculate the cross-interference data for the spectral data in the wavelength range of 260-320 nm : , where is the spectral data of COD, is the spectral data of turbidity, is the spectral data of the mixed solution; a nonlinear relationship between turbidity and cross-interference data is established by a Gaussian-linear compensation model, and the parameter vector is accurately solved by nonlinear least squares optimization ; the model is fitted using the least squares method to obtain the optimal parameters corresponding to each wavelength , and the parameters at all wavelengths are saved in the matrix ; The parameter matrix obtained by fitting and new data , the interaction interference data is predicted by using the Gaussian-linear compensation model, and for new samples The following formula is used for calculation: ; By applying the model one by one at each wavelength, the corresponding interaction interference data is obtained ; in the wavelength range of 260-320 nm, the corrected mixed spectral data is calculated according to the turbidity absorption spectral model and the Gaussian-linear compensation model: wherein, is the absorption spectrum data after mutual interference compensation; the absorption spectrum data after mutual interference compensation is brought into a spectral component analysis model for analysis; Step 4: For spectral data in the 220-260nm wavelength range, construct a model relating COD to spectral data and establish absorbance. With COD concentration The relationship between them ,in The slope For the intercept; for the given new data The predicted value of its absorption spectrum data is Under each wavelength Construct the output prediction matrix ; Calculate interactive interference data : ,in This is the absorption spectrum data for COD. The data are the absorption spectra of nitrates. The data are absorption spectra of turbidity. The data are the absorption spectra of a mixed solution of the three substances. Step 5, based on the characteristics of the interactive interference data obtained in step 4, a quadratic polynomial regression model is constructed, and the input variable wherein the turbidity concentration and the COD concentration are contained is expanded into a matrix containing quadratic terms and cross terms , the absorbance of each wavelength , i = 1, 2, … n , the regression coefficient matrix is solved , a nonlinear mapping relationship between absorbance and multivariate is established , and the absorption spectrum data at each wavelength is obtained to form the output spectrum data matrix In 220-260 nm, according to the turbidity absorbance model, the COD absorbance model and the quadratic polynomial regression model, the spectrum data of the mixed solution after interactive interference compensation is calculated : spectral data after interaction interference compensation The nitrate is analyzed by inputting into an analysis model.
2. The compensation method based on UV-Vis spectrum interaction interference according to claim 1, characterized in that, The preprocessing process in the step 1 specifically comprises: The parameters are defined, the window width is , the polynomial order is o, and the derivative order is d; a matrix is constructed to represent the polynomial distribution characteristics of the data in the window, and is expressed by the following formula: ; Solving the weight matrix by pseudo-inverse operation and extract the first row as the derivative filter kernel, wherein is a derivative factorial compensation factor, is a derivative filter kernel; Constructing sparse matrix where the central row is composed of the edge rows are generated by truncated window polynomial fitting, and the original spectral data is substituted 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 UV-Vis spectrum interaction interference according to claim 1, characterized in that, In step 2 The specific formula is .
4. The compensation method based on UV-Vis spectrum interaction interference according to claim 1, characterized in that, The step 3 specifically comprises: The step 3 specifically comprises: The noise is reduced by grouping and averaging by turbidity concentration gradient; the grouping length is L, and the grouping index is The averaged cross-interference light spectrum data It can be obtained by the following formula: Linear interpolation is performed on each wavelength channel of the matrix to generate an extended matrix ; Linear term parameter initialization, initial slope obtained by linear regression and intercept , construct linear model, where is residual noise, c is turbidity concentration, is the interactive interference data corresponding to the wavelength , where m = 1, 2 … M; Computing linear residual , locating maximum residual point , amplitude and width estimates are .
5. The compensation method based on UV-Vis spectrum interaction interference according to claim 1, characterized in that, The step 5 The specific calculation formula is: 。