A method for correcting Raman spectral drift based on polynomial fitting

The spectral drift of the Raman spectrometer was corrected through the polynomial fitting method, which solved the problem of the analysis results of spectral drift, improved the accuracy and quality of the Raman spectroscopy, and enhanced the ability to identify substances.

CN115265785BActive Publication Date: 2025-05-30SHANGHAI RUHAI INSTR EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210875401.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-22
Publication Date
2025-05-30
Estimated Expiration
2042-07-22

AI Technical Summary

Technical Problem

The spectral drift caused by structural distortion or environmental factors affects the accuracy and stability of the analysis results.

Method used

The Raman spectral drift was corrected by polynomial fitting method. By measuring the Raman original map of known samples, a polynomial function fitting model was established, and the parameters were adjusted to optimize the fitting effect, and the corrected Raman map was obtained.

Benefits of technology

It improves the accuracy and quality of the Raman spectrum, enhances the accuracy of the characteristic peak position, helps improve the identification ability of substances, and improves the correction accuracy and speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115265785B_ABST
    Figure CN115265785B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for correcting Raman spectral drift based on polynomial fitting, which comprises the following steps: S1: Measuring the original Raman spectrum of a known sample substance by using a Raman spectrometer; S2: Fitting the Raman spectrum curve with a polynomial function, calculating the coefficient matrix of the polynomial function according to the original Raman spectrum in combination with the characteristic peak values of the known sample substance, and establishing a Raman spectrum correction model; S3: Adjusting the parameters of the Raman spectrum correction model; S4: Calculating the corrected Raman spectrum by using the Raman spectrum correction model with adjusted parameters, and confirming the correction effect of the Raman spectrum. The present invention improves the accuracy of the Raman spectrum, numbers the data points collected by the spectrometer starting from 0, and uses polynomial fitting to re-fit and analyze the data to obtain new Raman spectrum data; improves the accuracy of the characteristic peak position; improves the quality of the Raman spectrum, which is beneficial to improving the identification of substances.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for correcting Raman spectral drift, and more particularly to a method for correcting Raman spectral drift based on polynomial fitting. Background Art

[0002] When light irradiates certain substances, in addition to the spectral lines with the same frequency as the incident light in the scattered light, there is also a small part of spectral lines with extremely weak intensity and frequency changes (i.e., frequency increase or decrease). This phenomenon is called the Raman effect, also known as Raman spectroscopy. Raman spectroscopy is an inelastic scattering that reflects molecular vibration and rotation information, so Raman spectroscopy also belongs to molecular spectroscopy. Due to the characteristics of Raman spectroscopy such as frequency, intensity, and polarization that mark the scattering substances, Raman spectroscopy has become a main means for analyzing and testing the structure of substances.

[0003] Raman spectroscopy analysis is a non-destructive analysis technique. It is based on the interaction between light and chemical bonds in materials and can provide detailed information on the chemical structure, phase and morphology, crystallinity, and molecular interactions of samples. Raman spectra are usually measured using a Raman spectrometer. Since lasers were used in Raman spectrometers in the 1960s, Raman spectrometers have developed rapidly. A Raman spectrometer mainly consists of five parts: a light source, an external optical path system, a sample cell, a monochromator, and a signal processing and output system.

[0004] High-quality Raman spectra are crucial for subsequent qualitative and quantitative analysis. When using Raman spectroscopy to analyze samples, although there is no need to pre-treat the samples, due to the structure of the Raman spectrometer itself, certain specific environments, or even long-term use, the spectrometer has undergone a certain distortion compared to the initial production situation, such as imperfect photosensitive element technology or wear in lens design, etc. These will directly cause Raman spectral drift and affect the accuracy and stability of subsequent analysis results. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a method for correcting Raman spectral drift based on polynomial fitting, and use polynomial fitting to improve the quality of Raman spectra.

[0006] The technical solution adopted by the present invention to solve the above technical problem is to provide a method for correcting Raman spectral drift based on polynomial fitting, including the following steps:

[0007] S1: Use a Raman spectrometer to measure the original Raman spectrum of a known sample substance;

[0008] S2: Fit the Raman spectrum curve with a polynomial function, calculate the coefficient matrix of the polynomial function according to the original Raman spectrum combined with the characteristic peaks of the known sample substance, and establish a Raman spectral correction model;

[0009] S3: Adjust the parameters of the Raman spectroscopy correction model;

[0010] S4: Use the Raman spectroscopy correction model with adjusted parameters to calculate the corrected Raman spectrum and confirm the correction effect of the Raman spectrum.

[0011] The above method for correcting Raman spectrum drift based on polynomial fitting, wherein the step S2 includes:

[0012] S21: When the coordinate points of the original Raman spectrum of the substance measured by the Raman spectrometer are (x i , y i ), the original Raman spectrum data is expressed as V1 = [[x 1 , y 1 , [x 2 , y 2 ,... [x n , y n ; For the y value of each point, take the subscript of the x coordinate to map the original Raman spectrum to V2 = [[0, y 1 , [1, y 2 ,... [n - 1, y n ;

[0013] S22: Fit the Raman spectrum curve with the polynomial function of Formula 1

[0014]

[0015] S23: Calculate the difference square sum of the ordinate of the polynomial function and the ordinate of the scattered point value y i of the original Raman spectrum, and use Formula 2 to calculate the polynomial coefficients when the difference square sum takes the minimum value;

[0016]

[0017] S24: Simplify and organize Formula 1 and Formula 2 to obtain the matrix equation of Formula 3, and through matrix calculation, deduce the coefficient matrix A of the polynomial function of Formula 4 to establish the Raman spectroscopy correction model;

[0018]

[0019] A = (XX T ) -1 XY Formula 4;

[0020] S25: Query the characteristic peaks of the known sample substance, use the characteristic peaks as the y value, and find the characteristic peaks in mapping the original Raman spectrum V2 = [[0, y 1 , [1, y 2,...[n-1,y n , obtain the n-value matrix N of the mapped feature peaks corresponding to the n value in

[0021] S26: According to Formula Four in Step S3, where X takes V2 = [[0,y 1 ,[1,y 2 ,...[n-1,y n , and Y takes the matrix composed of multiple feature peaks, calculate to obtain the coefficient matrix A.

[0022] The above method for correcting Raman spectral drift based on polynomial fitting, wherein the parameter adjustment of the Raman spectral correction model in Step S3 includes adjusting the order of the polynomial function, and the steps are as follows:

[0023] S31: Assume the polynomial function is of the first order, and calculate its coefficients a 0 and a 1 to obtain the first-order polynomial function;

[0024] S32: Assume the polynomial function is of the second order, and calculate its coefficients a 0 、a 1 and a 2 to obtain the second-order polynomial function;

[0025] S33: Assume the polynomial function is of the third order, and calculate its coefficients a 0 、a 1 、a 2 and a 3 to obtain the third-order polynomial function;

[0026] S34: Assume the polynomial function is of the fourth order, and calculate its coefficients a 0 、a 1 、a 2 、a 3 and a 4 to obtain the fourth-order polynomial function;

[0027] S35: Perform effect tests on the multiple polynomial functions obtained in Steps S31 - S34, and verify through the characteristic peaks of polystyrene, and select the polynomial function with the optimal fitting effect as the Raman spectral correction model after parameter adjustment.

[0028] The above method for correcting Raman spectral drift based on polynomial fitting, wherein Step S4 includes V2 = [[0,y 1 ,[1,y 2 ,...[n-1,y nThe n value of the characteristic peak mapping in [[ ]] is substituted as the x value into the polynomial function of the Raman spectrum correction model after adjusting the parameters, and the corrected Raman spectrum is calculated. By comparing the deviation between the predicted value and the actual value of the corrected Raman spectrum, the correction effect of the Raman spectrum correction model is confirmed.

[0029] The present invention has the following beneficial effects compared with the prior art: The method for correcting Raman spectrum drift based on polynomial fitting provided by the present invention improves the accuracy of the Raman spectrum. The data points collected by the spectrometer are numbered starting from 0, and polynomial fitting is used to re-fit and analyze the data to obtain new Raman spectrum data; the accuracy of the characteristic peak position is improved; the quality of the Raman spectrum is improved, which is beneficial to improving the recognition of substances; the polynomial fitting correction has high precision, fast speed, good robustness and anti-interference ability, which is beneficial to the accurate analysis of the Raman spectrometer. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 is a flowchart of the method for correcting Raman spectrum drift based on polynomial fitting of the present invention;

[0031] Figure 2 is the first-order, second-order, third-order and fourth-order polynomial fitting curves and the scatter plot of acetonitrile characteristic peaks in the embodiment of the present invention;

[0032] Figure 3 is the first-order, second-order, third-order and fourth-order polynomial fitting curves and the scatter plot of polystyrene characteristic peaks in the embodiment of the present invention;

[0033] Figure 4 is the third-order polynomial fitting curve and the scatter plot of acetonitrile characteristic peaks in the embodiment of the present invention;

[0034] Figure 5 is the comparison diagram of the corrected Raman spectrum and the original Raman spectrum in the embodiment of the present invention.

[0035] In the figure:

[0036] 1. First-order polynomial fitting curve; 2. Second-order polynomial fitting curve; 3. Third-order polynomial fitting curve; 4. Fourth-order polynomial fitting curve; 5. Original Raman spectrum curve; 6. Corrected Raman spectrum curve. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0037] The present invention will be further described below with reference to the drawings and embodiments.

[0038] Figure 1 is a flowchart of the method for correcting Raman spectrum drift based on polynomial fitting in the embodiment of the present invention.

[0039] Please refer to Figure 1, the method for correcting Raman spectral drift based on polynomial fitting provided by the present invention includes the following steps:

[0040] S1: Use a Raman spectrometer to measure the original Raman spectrum of a known sample substance;

[0041] S2: Fit the Raman spectrum curve with a polynomial function, calculate the coefficient matrix of the polynomial function according to the original Raman spectrum combined with the characteristic peak values of the known sample substance, and establish a Raman spectrum correction model; specifically including:

[0042] S21: The coordinate points of the original Raman spectrum of the substance measured by the Raman spectrometer are (x i , y i ), then the original Raman spectrum data is expressed as V1 = [[x 1 , y 1 , [x 2 , y 2 ,... [x n , y n ; for the y value of each point, take the subscript of the x coordinate to map the original Raman spectrum to V2 = [[0, y 1 , [1, y 2 ,... [n - 1, y n ;

[0043] S22: Fit the Raman spectrum curve with the polynomial function of Formula 1

[0044]

[0045] S23: Calculate the ordinate of the polynomial function and the sum of the squares of the differences between the ordinate of the scattered point value y i of the original Raman spectrum, and calculate the polynomial coefficients when the sum of the squares of the differences takes the minimum value using Formula 2;

[0046]

[0047] S24: Simplify and organize Formula 1 and Formula 2 to obtain the matrix equation of Formula 3, and through matrix calculation, deduce the coefficient matrix A of the polynomial function of Formula 4 to establish a Raman spectrum correction model;

[0048]

[0049] A = (XX T ) -1 XY Formula 4;

[0050] S25: Query the characteristic peak values of the known sample substance, use the characteristic peak values as the y values, and find the characteristic peak values in mapping the original Raman spectrum to V2 = [[0, y 1,[1, y 2 ,...[n - 1, y n , obtain the n - value matrix N of multiple characteristic peak mappings corresponding to the n - value in

[0051] S26: According to Formula Four in Step S3, where X takes V2 = [[0, y 1 ,[1, y 2 ,...[n - 1, y n and the n - value matrix N of characteristic peak mappings, and Y takes the matrix composed of multiple characteristic peaks, calculate to obtain the coefficient matrix A.

[0052] S3: Adjust the parameters of the Raman spectrum correction model; including adjusting the order of the polynomial function, specifically as follows:

[0053] S31: Assume the polynomial function is of the first order, and calculate its coefficients a 0 and a 1 to obtain the first - order polynomial function;

[0054] S32: Assume the polynomial function is of the second order, and calculate its coefficients a 0 、a 1 and a 2 to obtain the second - order polynomial function;

[0055] S33: Assume the polynomial function is of the third order, and calculate its coefficients a 0 、a 1 、a 2 and a 3 to obtain the third - order polynomial function;

[0056] S34: Assume the polynomial function is of the fourth order, and calculate its coefficients a 0 、a 1 、a 2 、a 3 and a 4 to obtain the fourth - order polynomial function;

[0057] S35: Conduct an effect test on the multiple polynomial functions obtained in Steps S31 - S34, and verify through the characteristic peaks of polystyrene, and select the polynomial function with the best fitting effect as the Raman spectrum correction model after parameter adjustment.

[0058] S4: Use the Raman spectrum correction model with adjusted parameters to calculate the corrected Raman spectrum, and confirm the Raman spectrum correction effect; including substituting V2 = [[0, y 1 ,[1, y 2 ,...[n - 1, y nThe n value of the characteristic peak mapping in [[ ]] is substituted as the x value into the polynomial function of the Raman spectrum correction model after adjusting the parameters, and the corrected Raman spectrum is calculated. By comparing the deviation between the predicted value and the actual value of the corrected Raman spectrum, the correction effect of the Raman spectrum correction model is confirmed.

[0059] When implementing the method for correcting Raman spectrum drift based on polynomial fitting provided by the present invention, specifically, 1 Raman spectrometer with the model specification of RMS1000 is selected, and acetonitrile standard samples and samples to be tested are used for sampling.

[0060] The Raman spectrometer samples acetonitrile and adopts an adaptive sampling method; the original Raman spectrum data is V1 = [[x 1 , y 1 , [x 2 , y 2 ,... [x n , y n . The subscript corresponding to each X value is mapped, and the mapped data is V2 = [[0, y 1 , [1, y 2 ,... [n - 1, y n ;

[0061] As obtained from Formula 1, when k = 1, the expression of the polynomial is Y = a 0 + a 1 x; when k = 2, the expression of the polynomial is Y = a 0 + a 1 x + a 2 x 2 ; when k = 3, the expression of the polynomial is Y = a 0 + a 1 x + a 2 x 2 + a 3 x 3 ; when k = 4, the expression of the polynomial is Y = a 0 + a 1 x + a 2 x 2 + a 3 x 3 + a 4 x 4 ;

[0062] In the literature Standard Guide for Raman Shift Standards for Spectrometer Calibration (Designation: E1840-96 (Reapproved 2014)), the five characteristic peaks of acetonitrile are 378.5, 919, 1374, 2253.7, and 2940.8 respectively; the five characteristic peaks of acetonitrile are in V 2 = [[0, y 1 , [1, y 2 ,... [n, y n and the mapped positions are 60, 274, 479, 982, and 1531 respectively.

[0063] The characteristic peaks of acetonitrile, the mapped data n, and the Raman original spectrum intensity y values are represented in matrix form respectively, where the Vandermonde matrix X can be the N value in V2 = [[0, y 1 , [1, y 2 ,... [n - 1, y n , and then use Equation 4 to calculate matrix A;

[0064]

[0065] Matrix A is obtained through calculation; since polynomial fitting is used, when k takes different orders, the value of A is different; therefore, the values of A are as follows:

[0066] When k = 1, A = [1.720647, 428.6255];

[0067] First-order expression: Y = 2428.6255 + 1.720647X

[0068] When k = 2, A = [-0.00056054, 2.6232, 233.65599];

[0069] Second-order expression; Y = 233.65599 + 2.6232X - 0.00056054X 2

[0070] When k = 3, A = [1.36e-7, -0.00088, 2.81, 212.40];

[0071] Third-order expression; Y = 212.40 + 2.81X - 0.00088X 2 + 1.36e-7xX 3

[0072] When k = 4, A = [5.508575e-11, -2.722655e-08, -0.00073531694, 2.7724, 214.806];

[0073] Fourth-order expression: Y = 214.806 + 2.7724x - 0.00073531694x 2 +- 2.722655e-08x 3 + 5.508575e-11x 4

[0074] The curve of polynomial fitting is as Figure 2 shown; the curve is the fitted polynomial curve, and the scatter plot is the characteristic peak position of acetonitrile. From the figure, we can preliminarily judge that the fitting effects of the first-order polynomial fitting curve 1 and the second-order polynomial fitting curve 2 are not as good as those of the third-order polynomial fitting curve 3 and the fourth-order polynomial fitting curve 4.

[0075] The error of the polynomial fitting effect can refer to Table 1 below, the corresponding table of the values of the polynomial fitting curve at the characteristic peak position;

[0076]

[0077] Table 1 Corresponding table of the values of the polynomial fitting curve at the characteristic peak position

[0078] As can be seen from Table 1, the mean square error deviations of the third-order polynomial and the fourth-order polynomial are relatively small, and it can be found that the fourth-order polynomial completely fits the corresponding points, which is a typical case of polynomial overfitting.

[0079] To further verify that the fitting effect of the third-order polynomial is better than that of the fourth-order polynomial, we used the polystyrene to be measured for further verification.

[0080] By consulting the literature, the characteristic peak positions of polystyrene are y j = [327, 390, 465, 651, 711, 797, 858, 1169, 1237, 1326, 1371, 1560, 1619, 1648]; the polynomial fitting curve and the scatter plot of the characteristic peaks of polystyrene are specifically drawn as Figure 3 shown. From the figure, it can be found that when the value is at 2000, the value of the fourth-order polynomial becomes negative instead, which is absolutely not allowed in the Raman spectrum. The reason is that the fourth-order polynomial has overfitting; therefore, the third-order polynomial has the best fitting effect. The third-order polynomial fitting curve 3 is drawn separately as Figure 4 shown.

[0081] The Raman spectrum V2 = [[0 , y 1 ,[1, y2 ,...[n - 1, y n into the above third - order expression to obtain a new Raman spectrum V3 = [[x 1, y 1 ,[x 2 , y 2 ,...[x n , y n . Substitute V3 = [[x 1, y 1 ,[x 2 , y 2 ,...[x n , y n and the original Raman spectrum V1 = [[x 1, y 1 ,[x 2 , y 2 ,...[x n , y n for image comparison before and after calibration; as Figure 5 shown, a great change has occurred in the effect of the original Raman spectrum curve 5 and the calibrated Raman spectrum curve 6. The Raman spectrogram has moved from the right to the left, and the positions of the peaks are also closer to the 4 characteristic peak values of acetonitrile, which are 378.5, 919, 1374, 2253.7, 2940.8 respectively; therefore, through the accurate characteristic peak positions, it is easier to judge the corresponding substances.

[0082] In summary, the method for correcting Raman spectrum drift based on polynomial fitting provided by the present invention improves the accuracy of the Raman spectrum. The data points collected by the spectrometer are numbered starting from 0, and polynomial fitting is used to re - fit and analyze the data to obtain new Raman spectrum data; the accuracy of the characteristic peak positions is improved; it is beneficial to improve the recognition of substances.

[0083] Although the present invention has been disclosed above with preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications and improvements without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be defined by the claims.

Claims

1. A method for correcting Raman spectral drift based on polynomial fitting, characterized in that, it includes the following steps: S1: Use a Raman spectrometer to measure the original Raman spectrum of a known sample substance; S2: Fit the Raman spectrum curve with a polynomial function, calculate the coefficient matrix of the polynomial function according to the original Raman spectrum combined with the characteristic peaks of the known sample substance, and establish a Raman spectrum correction model; S3: Adjust the parameters of the Raman spectrum correction model; S4: Use the Raman spectrum correction model with adjusted parameters to calculate the corrected Raman spectrum and confirm the Raman spectrum correction effect; The step S2 includes: S21: The coordinate points of the original Raman spectrum of a substance measured by a Raman spectrometer are (x i , y i ). Then the original Raman spectrum data is expressed as V1 = [[x 1, y 1 , [x 2 , y 2 ,... [x n , y n ; For the y-value of each point, taking the subscript of the x-coordinate maps the original Raman spectrum to V2 = [[0 , y 1 , [1, y 2 ,... [n - 1, y n ; S22: Fit the Raman spectrum curve with the polynomial function of Formula 1 y = a 0 + a 1 x +... + a k x k Formula 1; S23: Calculate the ordinate of the polynomial function The sum of the squares of the differences from the ordinate of the scatter values y of the original Raman spectrum i is calculated, and the polynomial coefficients are calculated using Equation 2 when the sum of the squares of the differences takes the minimum value of zero; S24: Simplify and organize Formula 1 and Formula 2 to obtain the matrix equation of Formula 3, and through matrix calculation, deduce the coefficient matrix A of the polynomial function of Formula 4 to establish a Raman spectrum correction model; A=(XX T ) -1 XY formula four; S25: Query the characteristic peaks of known sample substances, use the characteristic peaks as the y values, and find the corresponding n values of the characteristic peaks in the Raman original spectrum mapped to V2 = [[0,y 1 ,[1,y 2 ,...[n-1,y n , to obtain an n-value matrix N mapped by multiple characteristic peaks; S26: According to Equation 4 in Step S3, where X takes the n-value matrix N mapped by the characteristic peak in [[0 , y 1 ,[1,y 2 ,...[n - 1,y n , and Y takes the matrix composed of multiple characteristic peaks, the coefficient matrix A is calculated.

2. The method for correcting Raman spectral drift based on polynomial fitting according to claim 1, characterized in that, the parameter adjustment of the Raman spectrum correction model in the step S3 includes adjusting the order of the polynomial function, and includes the following steps: S31: Assume the polynomial function is of the first order, and calculate its coefficients a 0 and a 1 to obtain a first-order polynomial function; S32: Assume the polynomial function is second-order, and calculate its coefficients a 0 , a 1 and a 2 to obtain a second-order polynomial function; S33: Assume the polynomial function is of the third order and calculate its coefficients a 0 , a 1 , a 2 and a 3 to obtain a third-order polynomial function; S34: Assume the polynomial function is of the fourth order and calculate its coefficients a 0 , a 1 , a 2 , a 3 and a 4 to obtain a fourth-order polynomial function; S35: Perform effect tests on the multiple polynomial functions obtained in steps S31 - S34, and verify them through the characteristic peaks of polystyrene, and select the polynomial function with the best fitting effect as the Raman spectrum correction model after parameter adjustment.

3. The method for correcting Raman spectral drift based on polynomial fitting according to claim 1, characterized in that, The step S4 includes substituting the n value obtained by mapping the characteristic peak in V2 = [[0,y 1 ,[1,y 2 ,...[n,y n as the x value into the polynomial function of the Raman spectrum correction model after adjusting the parameters, calculating the corrected Raman spectrum, and confirming the correction effect of the Raman spectrum correction model by comparing the deviation between the predicted value and the actual value of the corrected Raman spectrum.