A method, device and storage medium for adaptive correction of ultraviolet spectral wavelength drift
By optimizing the acquisition of the basic reference spectrum and the multivariate correction model, and combining the adaptive correction method of translation and scaling factors, the problem of wavelength drift in ultraviolet spectrometers was solved, and real-time correction was achieved in the case of overlapping characteristic absorption bands of multi-component gases, thus improving the consistency of spectral signals.
Patent Information
- Application Number
- CN202411711690.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2044-11-27
AI Technical Summary
Existing ultraviolet spectrometers suffer from wavelength drift in multi-channel spectrometers, resulting in poor spectral signal consistency. This is particularly difficult to correct effectively in field applications, and existing methods fail to effectively handle situations where the characteristic absorption bands of multi-component gases overlap.
By optimizing the acquisition method of the basic reference spectrum and combining it with a multivariate correction model, a correction model is generated in real time, taking into account translation and scaling factors, to achieve adaptive correction.
It achieves real-time and effective wavelength drift correction under the condition of overlapping characteristic absorption bands of multi-component gases, adapts to actual drift changes in the field, and improves the consistency of spectral signals.
Smart Images

Figure CN119574485B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of spectrum correction, and in particular to an ultraviolet spectrum wavelength drift adaptive correction method, device and storage medium. Background Art
[0002] In the application field of multivariate correction based on multi-channel spectrometers, the consistency of spectral signals has a great impact on equipment performance. Slight deviations in calculations may lead to two problems: larger deviations in target object predictions and cross-interference in non-target object predictions.
[0003] Wavelength drift is a typical factor affecting spectral signal consistency. Aging of the device's optical components, vibrations, collisions during transportation, and changes in ambient temperature can cause deformation of the optical system's mechanical components. This can cause the optical path to shift, leading to a shift between the spectrometer's pixels and the detected wavelength. This phenomenon, known as wavelength drift, is an objective and unavoidable phenomenon, requiring corrective measures.
[0004] Current wavelength drift correction methods:
[0005] 1. Spectrometer correction is achieved by mapping the specific wavelength of the mercury lamp to the pixel points. This is generally suitable for laboratory applications, and the correction conditions may not meet the requirements of field correction.
[0006] 2. Correction is performed by introducing a standard gas of the measured gas and establishing a baseline correspondence between the absorption peak point of the standard gas and the pixel point. Correction data is obtained based on the single-point data, and then the wavelength of the entire spectrum is corrected. The calibration environment is consistent with the application environment and can meet on-site correction requirements. The specific method can be found in patent application number CN201910084228.6.
[0007] 3. After signal acquisition is truncated, the offset effect is subtracted. By calculating the correlation coefficient between the lamp spectrum and the measured signal spectrum, the maximum point (where the lamp and signal are most consistent) is found. Then, the wavelength offset of the signal spectrum relative to the lamp spectrum is calculated through interpolation. This method is applied to the measurement of SO2 in flue gases. For the 280-320nm band, which is essentially only SO2, its characteristic absorption cross section is stored in a computer. Each time the absorption spectrum of the gas in this band is collected, it is correlated with the stored spectrum to obtain the wavelength offset. The absorption spectrum is then offset-corrected and the concentration is calculated, reducing the impact of spectral line offset on the absorption spectrum. For example, patent application number: CN201110404621.2.
[0008] 4. The absorption structure caused by spectral line shift is used as the absorption cross section of a pollutant in the regression calculation to correct the drift. The effect is slightly better than the spectral line shift correction method. Specifically, the correlation coefficient between the lamp spectrum (or the stored SO2 spectrum at 280-320nm) and the measured signal spectrum is calculated. The point with the maximum correlation coefficient is found, and then the wavelength shift is calculated through interpolation to eliminate the influence of spectral line shift. For example, patent application number: CN201110405158.3.
[0009] The method of directly correcting wavelength drift through mercury lamp spectrum is mostly used in laboratory applications. Field application conditions may not be met, and it is not possible to correct it every time the waveform is collected. Therefore, its application is limited.
[0010] The spectral line shift correction method and the spectral line drift participation regression algorithm require the storage of standard spectra (or measured lamp spectra) for correlation calculations, and then find the point where the correlation coefficient is the largest, which is the point where the lamp and the signal are most consistent. Then interpolation is performed to obtain the wavelength offset of the signal spectrum relative to the lamp spectrum. After that, the spectral line shift correction method directly predicts the corrected spectrum, while the spectral line drift participation regression algorithm uses the "absorption structure" brought by the spectral line offset as an absorption cross section of a "pollutant" to participate in the regression operation to eliminate the drift effect.
[0011] The current method essentially performs overall translation correction (when the integer is not satisfied, an interpolation method is used to generate a corrected spectrum), without considering the possibility of overall expansion and contraction.
[0012] In addition, the reference spectrum used for correlation calculations is generally the measurement lamp spectrum (or in special application scenarios such as flue gas applications, SO2 in the 280-320nm band is used, and there is basically only one gas in this band, SO2). It does not involve the more general situation, that is, the characteristic absorption bands of multiple target gases overlap, making it difficult to find the pure component area. Summary of the Invention
[0013] The purpose of the present invention is to propose a method, device and storage medium for adaptive correction of ultraviolet spectrum wavelength drift, so as to solve the technical problem that the current ultraviolet spectrum drift correction method has limited application scenarios.
[0014] The main improvements of the present invention are: (1) optimization of the method for obtaining the basic reference spectrum; (2) improvement of the wavelength drift correction process (real-time reference spectrum generation process, correction process that simultaneously completes translation and scaling);
[0015] Specifically, the present invention provides a method for adaptively correcting ultraviolet spectrum wavelength drift, comprising the following steps:
[0016] S1. Optimize the method for obtaining the basic reference spectrum of multiple target gases to obtain the optimized basic reference spectrum;
[0017] S2, measured original absorbance spectra of multiple target gases;
[0018] S3, obtaining a real-time control sum spectrum based on the predicted concentration of each component preliminarily predicted from the original absorbance spectrum and the optimized basic reference spectrum;
[0019] S4, correcting the original absorbance spectrum using the correction model to obtain a corrected absorbance spectrum;
[0020] S5, calculating the similarity between the real-time control sum spectrum and the corrected absorbance spectrum, and iteratively calculating and adjusting the correction model parameters until the similarity reaches a preset condition, thereby obtaining a final correction model;
[0021] S6. Using the final correction model, the adaptive correction of the absorbance spectrum of the target gas to be measured is completed.
[0022] A storage medium stores instructions and data for implementing an ultraviolet spectrum wavelength drift adaptive correction method.
[0023] An ultraviolet spectrum wavelength drift adaptive correction device comprises: a processor and a storage medium; the processor loads and executes instructions and data in the storage medium to implement an ultraviolet spectrum wavelength drift adaptive correction method.
[0024] The beneficial effects provided by the present invention are:
[0025] This paper provides a method for obtaining real-time reference spectra. In addition to considering translational factors, the correction model also incorporates scaling factors, making it more adaptable to actual field drift variations. This method does not limit the correction band to the characteristic absorption band of a single pure component; even when the characteristic absorption bands of multiple components overlap, real-time and effective wavelength drift correction can be performed. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a schematic flow chart of the method of the present invention;
[0027] Figure 2 This is a comparison chart of wavelength drift absorbance spectrum correction for mixed gas SO2-15ppm-H2S-5ppm;
[0028] Figure 3 It is a working diagram of the hardware device of the present invention. DETAILED DESCRIPTION
[0029] To make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0030] Before formally explaining the present invention, relevant technical terms in the present invention are explained. In addition, the scheme of the present invention is also generally explained first for easy understanding.
[0031] (1) Original absorbance spectrum: refers to a graph drawn by measuring the absorbance of a substance to be tested to monochromatic light of different wavelengths, with wavelength as the horizontal axis and absorbance as the vertical axis;
[0032] (2) Deconcentration (spectrum): When measuring the absorbance of a substance to be tested, the influence of the substance concentration on the absorbance measurement result is eliminated by a certain method or technology, thereby obtaining a pure absorbance spectrum at unit concentration;
[0033] Specifically, in practical applications, to obtain the absorbance characteristics of a pure substance, it is necessary to eliminate the influence of concentration on absorbance. This is usually achieved by averaging the absorbance values of standard substances of varying concentrations, after deducting the concentration information. For example, according to the Lambert-Beer law, absorbance generally exhibits a linear relationship with the concentration of the absorbing substance. Therefore, dividing the absorbance value by the concentration information yields the pure absorbance spectrum at unit concentration. To ensure representativeness, spectra are obtained for each absorbance value at different concentrations, and the average spectral statistic is then taken to obtain the final pure absorbance spectrum at unit concentration.
[0034] Please refer to Figure 1 , Figure 1 It is a schematic flow diagram of the method of the present invention.
[0035] The present invention provides a method for adaptively correcting ultraviolet spectrum wavelength drift, comprising the following steps:
[0036] S1. Optimize the method for obtaining the basic reference spectrum of multiple target gases to obtain the optimized basic reference spectrum;
[0037] Please refer to Table 1, which shows the ways to obtain three basic reference spectra.
[0038] Table 1 Three basic reference spectrum acquisition methods
[0039]
[0040] Table 1 lists three ways to obtain basic spectra. The first two are traditional methods. The first is to obtain them publicly online. The advantage of this method is that it is easy to obtain and does not require testing. The disadvantage is that the usage scenarios are limited. The actual bands and test conditions should be kept consistent with the public conditions as much as possible.
[0041] The second method is to obtain spectra of single or multiple concentrations. Its advantage is that it is highly targeted and the spectrum is obtained based on the test on the same platform, so the consistency of the test conditions can be guaranteed. The disadvantage is that testing is required and the reference spectra of single or multiple concentrations need to be stored. In actual application, it is limited to the application of single-component pure gas.
[0042] The third method adopted in the present invention is the deconcentration mean spectrum, which has the same advantages and disadvantages as the second method. The difference is that only the deconcentration mean spectrum is stored during storage. There is also a big difference from the second method in actual use, that is, first, the predicted concentration of each component is preliminarily predicted by the original absorbance spectrum, and then the predicted concentration of each component and the corresponding stored mean spectrum are used to invert their basic reference spectra respectively. Finally, according to the additivity principle, a real-time control sum spectrum is obtained to participate in the subsequent similarity calculation.
[0043] The present invention optimizes the acquisition of the basic reference spectrum to a certain extent, and the specific process is as follows:
[0044] S11. Measure the absorbance spectra of target gases at different concentrations using the same device.
[0045] For example, taking SO2 as an example, the present invention measures the absorbance spectra of SO2 with different concentrations on the same device, wherein the device can be an online or portable UV analyzer.
[0046] S12, performing deconcentration processing and preprocessing on the absorbance spectra of target gases with different concentrations to obtain processed absorbance spectra;
[0047] As previously mentioned, deconcentration can be achieved by subtracting concentration information from absorbance values at each wavelength or pixel. Furthermore, preprocessing methods in the present invention include spectral truncation, differentiation, and smoothing. These methods are relatively common data processing methods and will not be elaborated in detail in this invention.
[0048] S13. Performing average processing on the absorbance spectra after being processed with the standard substances of different concentrations to obtain an optimized target gas basic reference spectrum.
[0049] It should be noted that the averaging process is to add and average each spectrum, and finally obtain a basic reference spectrum of the stored target gas. For example, if the target gas is SO2, the basic reference spectrum of the stored SO2 gas is obtained, and this spectrum is used as the optimized basic reference spectrum of the target gas.
[0050] It should be noted that when there are multiple target gases, the same method as above can be used to obtain multiple target gas basic reference spectra. The present invention takes SO2 as an example for illustration only and is not intended to be limiting.
[0051] After obtaining the optimized target gas basic reference spectrum, the predicted concentration of each component is preliminarily predicted by the original absorbance spectrum. Then, the predicted concentration of each component and the corresponding stored mean spectrum are used to invert its basic reference spectrum respectively. Finally, according to the additivity principle, a real-time control sum spectrum is obtained to participate in the subsequent similarity calculation.
[0052] S2, measured original absorbance spectra of multiple target gases;
[0053] S3. Preliminarily predict the predicted concentration of each component based on the original absorbance spectrum and the optimized basic reference spectrum to obtain a real-time control sum spectrum;
[0054] It should be noted that step S3 is specifically as follows:
[0055] S31, using a multivariate calibration model to obtain the preliminary concentration of each target component based on the original absorbance spectra of the multiple target gases;
[0056] In the present invention, the multivariate calibration model adopts the PLS calibration model.
[0057] S32. Query the corresponding optimized basic reference spectrum according to the preliminary concentration of each target component, and obtain a real-time control sum spectrum based on the principle of spectral additivity of the corresponding optimized basic reference spectrum.
[0058] It should be noted that the optimized basic reference spectrum has been obtained in step S1. Correspondingly, the optimized basic reference spectrum can be obtained by inverting the preliminary concentration of each component.
[0059] After obtaining the basic reference spectrum corresponding to each component, the absorbance additivity principle is used for fusion to obtain a complete real-time control sum spectrum.
[0060] S4, correcting the original absorbance spectrum using the correction model to obtain a corrected absorbance spectrum;
[0061] It should be noted that step S4 is specifically as follows:
[0062] S41, constructing a correction model and initializing parameters;
[0063] As an embodiment, the correction model in the present invention is as follows:
[0064] y i =f(x,y,x i ×k+b)
[0065] i=1,2,…,N, k∈[k1,k2], b∈[b1,b2]
[0066] Among them, y iis the correction value at the i-th wavelength or pixel point in the corrected absorbance spectrum, f(x) is the interpolation function, x is the wavelength or pixel vector of the original absorbance spectrum, y is the absorbance vector of the original absorbance spectrum, and x i is the absorbance value at the i-th wavelength or pixel point in the original absorbance spectrum, k is the stretch correction factor, b is the translation correction factor, k and b are initialization parameters, and N is the total number of wavelengths or pixels in the absorbance spectrum; k1, k2, b1, and b2 are preset values, where k1, k2, b1, and b2 are set based on actual experience, which define the established range of the translation correction factor and the stretch correction factor. The data within this range are credible or acceptable values. In the present invention, k1, k2, b1, and b2 can be taken as 0.9, 1.1, -2, and 2.
[0067] S42. Correcting the original absorbance spectrum using the correction model to obtain a corrected absorbance spectrum.
[0068] It should be noted that the original absorbance spectrum can be corrected by the calculation of the correction model described above to obtain a corrected absorbance spectrum. As an initial model, the corrected absorbance spectrum may not be accurate or deviate significantly from the actual value. In this case, the model parameters can be further adjusted.
[0069] S5, calculating the similarity between the real-time control sum spectrum and the corrected absorbance spectrum, and iteratively calculating and adjusting the correction model parameters until the similarity reaches a preset condition, thereby obtaining a final correction model;
[0070] It should be noted that step S5 is specifically as follows:
[0071] S51, calculating the similarity between the corrected absorbance spectrum and the real-time control sum spectrum;
[0072] It should be noted that the evaluation formula for the similarity in step S5 is as follows:
[0073] R=Similarity(y reference ,y correction )
[0074] Among them, R is the similarity measurement index parameter, Similarity() means the use of multiple evaluation indexes for comprehensive voting calculation, y reference is the real-time comparison sum spectrum, y correction is the corrected absorbance spectrum.
[0075] As an embodiment, commonly used vector similarity measurement indicators include distance, correlation coefficient, angle cosine, etc. The present invention adopts a variety of evaluation indicators to conduct comprehensive voting for evaluation.
[0076] S52. When the similarity does not fall within the preset range, adjust the correction model parameters and iterate steps S51 to S52 using the adjusted correction model until the similarity reaches the preset condition to obtain the final correction model.
[0077] It should be noted that adjusting the model parameters in step S52 specifically refers to adjusting k and b to increase or decrease the corresponding step sizes Δk and Δb, respectively. For example, if the initial value of k is k2, then the adjustment is reduced; if the initial value of k is k1, then the adjustment is increased. The same applies to the adjustment of b.
[0078] S6. Using the final correction model, the adaptive correction of the absorbance spectrum of the target gas to be measured is completed.
[0079] As an embodiment, the final values of k and b in the present invention are 0.98 and 1.56.
[0080] Finally, the present invention takes a mixed gas of SO2 and H2S as an example and introduces ultraviolet light into the mixed gas of SO2-15ppm-H2S-5ppm to perform wavelength drift correction, where the characteristic absorption of SO2 and H2S completely overlap.
[0081] Please refer to Table 2 for the comparison table of predictions before and after correction.
[0082] Table 2 Comparison of model prediction results before and after wavelength drift correction
[0083]
[0084] It can be seen from the above table that the influence of drift is significantly improved after correction.
[0085] Also refer to Figure 2 , Figure 2 This is a comparison chart of wavelength drift absorbance spectrum correction for the mixed gas SO2-15ppm-H2S-5ppm.
[0086] from Figure 2 It can be seen that the corrected measured spectrum coincides well with the modeled spectrum at most wavelength points, and the correction effect is obvious.
[0087] See Figure 3 , Figure 3 4 is a schematic diagram of the working of the hardware device of an embodiment of the present invention, wherein the hardware device specifically comprises: an ultraviolet spectrum wavelength drift adaptive correction device 401, a processor 402 and a storage medium 403.
[0088] An ultraviolet spectrum wavelength drift adaptive correction device 401: The ultraviolet spectrum wavelength drift adaptive correction device 401 implements the ultraviolet spectrum wavelength drift adaptive correction method.
[0089] Processor 402: The processor 402 loads and executes the instructions and data in the storage medium 403 to implement the method for adaptively correcting ultraviolet spectrum wavelength drift.
[0090] Storage medium 403: The storage medium 403 stores instructions and data; the storage medium 403 is used to implement the method for adaptively correcting ultraviolet spectrum wavelength drift.
[0091] The beneficial effects of the present invention are:
[0092] This paper provides a method for obtaining real-time reference spectra. In addition to considering translational factors, the correction model also incorporates scaling factors, making it more adaptable to actual field drift variations. This method does not limit the correction band to the characteristic absorption band of a single pure component; even when the characteristic absorption bands of multiple components overlap, real-time and effective wavelength drift correction can be performed.
[0093] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for adaptively correcting ultraviolet spectrum wavelength drift, characterized by: The method comprises the following steps: S1. Optimize the method for obtaining the basic reference spectrum of multiple target gases to obtain the optimized basic reference spectrum; S2, measured original absorbance spectra of multiple target gases; S3, obtaining a real-time control sum spectrum based on the predicted concentration of each component preliminarily predicted by the original absorbance spectrum and the optimized basic reference spectrum; S4, correcting the original absorbance spectrum using the correction model to obtain a corrected absorbance spectrum; S5, calculating the similarity between the real-time control sum spectrum and the corrected absorbance spectrum, and iteratively calculating and adjusting the correction model parameters until the similarity reaches a preset condition, thereby obtaining a final correction model; S6. Using the final correction model to complete the adaptive correction of the absorbance spectrum of the target gas to be measured; Step S1 is specifically as follows: S11. Measure the absorbance spectra of target gases at different concentrations using the same device. S12, performing deconcentration processing and preprocessing on the absorbance spectra of target gases with different concentrations to obtain processed absorbance spectra; S13, performing mean processing on the processed absorbance spectrum to obtain an optimized target gas basic reference spectrum; Step S3 is as follows: S31, using a multivariate calibration model to obtain the preliminary concentration of each target component based on the original absorbance spectra of the multiple target gases; S32. Invert the corresponding basic reference spectrum based on the preliminary concentration of each target component and the corresponding optimized basic reference spectrum, and obtain a real-time control sum spectrum based on the spectral additivity principle of the inverted corresponding basic reference spectrum.
2. The method for adaptively correcting ultraviolet spectrum wavelength drift according to claim 1, wherein: Step S4 is specifically as follows: S41, constructing a correction model and initializing parameters; S42. Correcting the original absorbance spectrum using the correction model to obtain a corrected absorbance spectrum.
3. The method for adaptively correcting ultraviolet spectrum wavelength drift according to claim 2, wherein: The corrected model in step S41 is as follows: in, is the first value in the corrected absorbance spectrum i Correction value at each wavelength or pixel point, is the interpolation function, x is the wavelength or pixel vector of the original absorbance spectrum, y is the absorbance vector of the original absorbance spectrum, is the absorbance value at the i-th wavelength or pixel point in the original absorbance spectrum, k is the expansion correction factor, b is the translation correction factor, k , b is the initialization parameter, N is the total number of wavelengths or pixels in the absorbance spectrum; k 1, k 2, b 1, b 2 is the default value.
4. The method for adaptively correcting ultraviolet spectrum wavelength drift according to claim 3, wherein: Step S5 is specifically as follows: S51, calculating the similarity between the corrected absorbance spectrum and the real-time control sum spectrum; S52. When the similarity does not fall within the preset range, adjust the correction model parameters and iterate steps S51 to S52 using the adjusted correction model until the similarity reaches the preset condition to obtain the final correction model.
5. The method for adaptively correcting ultraviolet spectrum wavelength drift according to claim 1, wherein: The evaluation formula of the similarity in step S5 is as follows: in, R is the similarity measurement parameter, Similarity () indicates the use of multiple evaluation indicators for comprehensive voting calculation, For real-time comparison, add the spectrum. is the corrected absorbance spectrum.
6. The method for adaptively correcting ultraviolet spectrum wavelength drift according to claim 4, wherein: In step S52, the model parameters are adjusted, specifically: k , b Increase or decrease the corresponding step size Δ k , Δ b .
7. A storage medium, characterized in that: The storage medium stores instructions and data for implementing the method for adaptively correcting ultraviolet spectrum wavelength drift according to any one of claims 1 to 6.
8. An ultraviolet spectrum wavelength drift adaptive correction device, characterized by: include: A processor and a storage medium; the processor loads and executes instructions and data in the storage medium to implement the method for adaptively correcting ultraviolet spectrum wavelength drift according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method for correcting spectral shift in differential optical absorption spectroscopy (DOAS) measurement
CN102495014A
Spectral line drift participated regression algorithm method for correcting spectral line drift in differential optical absorption spectral measurement
CN102519892A
Method and system for correcting spectrograph wavelength shift
CN109883962A
Method for correcting gas absorption line under mixed gas background
CN115436320A
Online wavelength calibration method for ultraviolet differential gas analyzer
CN117074341A