A characteristic peak fitting method and device based on spectral data

By extracting characteristic peak data points in spectral data, performing peak band determination and data densification processing, and combining fitting functions to calculate fitting parameters, the over-fitting problem in spectral signal fitting is solved and the quantitative accuracy of spectral analysis is improved. sex.

CN118395059BActive Publication Date: 2024-10-11HEFEI GOLD STAR INTELLIGENT CONTROL TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202410840802.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2024-10-11
Estimated Expiration
2044-06-27

AI Technical Summary

Technical Problem

The resolution of existing spectrometers is limited, resulting in the collected spectral signals being composed of discontinuous points. Overfitting is prone to occur during the fitting process, and the fitting results are significantly different from the actual peak shapes, which affects the quantitative effect.

Method used

By acquiring spectral data, extracting data points corresponding to characteristic peaks, performing peak band determination and data densification processing, selecting an initial fitting function for fitting, calculating the loss function to determine the fitting parameters, and obtaining the fitting curve of the characteristic peaks.

Benefits of technology

The over-fitting problem in the characteristic peak fitting process is solved, the fitting peak shape is closer to the actual situation, and the accuracy and performance of quantitative analysis are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118395059B_ABST
    Figure CN118395059B_ABST
Patent Text Reader

Abstract

The present invention provides a characteristic peak fitting method and device based on spectral data, the method comprising the following steps: acquiring spectral data; extracting data points corresponding to each characteristic peak from the spectral data according to the spectral peak information of the elements in the substance to be analyzed; executing for each data point corresponding to the characteristic peak: obtaining the band where the peak value of the characteristic peak is located according to the data point corresponding to the characteristic peak; performing data densification processing on other bands other than the band where the peak value of the characteristic peak is located to obtain the densified data points; fitting the densified data points to obtain the fitting curve of the characteristic peak. The method performs data densification processing on other bands other than the band where the peak value of the characteristic peak is located, and fits the densified data points to obtain the fitting curve of the characteristic peak. It solves the overfitting problem in the discrete characteristic peak fitting process, and the fitting peak shape is closer to the actual situation, which improves the performance and accuracy of the quantitative analysis model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of spectrum analysis, and in particular to a method and device for fitting characteristic peaks based on spectrum data. Background Art

[0002] Due to the constraints of existing hardware materials, the resolution of the spectrometer is limited, and the collected spectral signals are composed of discontinuous points, which are different from the actual spectral signals. Therefore, it is necessary to process the discontinuous spectral signals through function fitting, but overfitting may occur in the fitting process, resulting in a large difference between the fitting result and the actual peak shape, thus affecting the final quantitative effect. Summary of the invention

[0003] In view of the above defects of the prior art, the present invention provides a characteristic peak fitting method and device based on spectral data to solve the technical problems of overfitting and large difference between fitting results and actual peak shapes in the characteristic peak fitting process in the prior art.

[0004] To achieve the above-mentioned purpose and other related purposes, the present invention provides a characteristic peak fitting method based on spectral data, comprising the following steps: acquiring spectral data; extracting data points corresponding to each characteristic peak from the spectral data according to the spectral peak information of the elements in the substance to be analyzed; executing for each data point corresponding to the characteristic peak: obtaining the band where the peak value of the characteristic peak is located according to the data point corresponding to the characteristic peak; performing data densification processing on other bands other than the band where the peak value of the characteristic peak is located to obtain densified data points; fitting the densified data points to obtain a fitting curve of the characteristic peak.

[0005] In one embodiment of the present invention, the step of extracting data points corresponding to each characteristic peak from the spectral data according to the spectral peak information of the element in the substance to be analyzed includes: obtaining the minimum data points of the spectral data located on both sides of the spectral peak of the element according to the spectral peak information of the element in the substance to be analyzed; extracting two of the minimum data points and all data points between the two minimum data points to obtain the data points corresponding to the characteristic peak.

[0006] In one embodiment of the present invention, the step of obtaining the minimum data points of the spectral data located on both sides of the spectral peak of the element in the substance to be analyzed according to the spectral peak information of the element includes: calculating the slope change data of the data points located on both sides of the spectral peak of the element according to the spectral peak information of the element in the substance to be analyzed; determining the minimum data points on both sides of the spectral peak of the element according to the slope change data of the data points on both sides of the spectral peak of the element.

[0007] In one embodiment of the present invention, the step of obtaining the band where the peak value of the characteristic peak is located based on the data points corresponding to the characteristic peak includes: obtaining the maximum data point corresponding to the characteristic peak based on the maximum value of the intensity of the data points corresponding to the characteristic peak; obtaining the slopes on both sides of the maximum data point based on the maximum data point and the adjacent data points on both sides of the maximum data point; and taking the band between the maximum data point and the adjacent data points on the side with the smaller absolute value of the slope of the maximum data point as the band where the peak value of the characteristic peak is located.

[0008] In one embodiment of the present invention, the step of performing data densification processing on other bands other than the band where the peak value of the characteristic peak is located to obtain the densified data points includes: performing data densification processing on other bands other than the band where the peak value of the characteristic peak is located using a linear interpolation method to obtain the densified data points.

[0009] In one embodiment of the present invention, the step of fitting the densified data points to obtain the fitting curve of the characteristic peak includes: selecting an initial fitting function, wherein the initial fitting function has fitting parameters to be solved; obtaining a loss function based on the initial fitting function and the densified data points; calculating the value of the fitting parameter when the loss function takes the minimum value; substituting the value of the fitting parameter into the initial fitting function, and fitting the densified data points to obtain the fitting curve of the characteristic peak.

[0010] In one embodiment of the present invention, the step of selecting an initial fitting function includes: selecting a Lorentz function as the initial fitting function.

[0011] In one embodiment of the present invention, the step of obtaining the loss function based on the initial fitting function and the densified data points includes: substituting the wavelength of the densified data points into the initial fitting function to obtain the theoretical intensity corresponding to each of the densified data points; calculating the intensity difference between the actual intensity of each of the densified data points and the theoretical intensity; and obtaining the loss function based on the intensity differences of all the densified data points.

[0012] In one embodiment of the present invention, the step of calculating the value of the fitting parameter when the loss function takes a minimum value includes: calculating the integral area and half-width of the characteristic peak based on the densified data points; calculating the value range of the fitting parameter based on the integral area, the half-width, the spectral data and the sampling resolution of the spectral data; within the value range, calculating the value of the fitting parameter when the loss function takes a minimum value.

[0013] To achieve the above-mentioned purpose and other related purposes, the present invention also provides a characteristic peak fitting device based on spectral data, including: a data acquisition module, used to acquire spectral data; a data extraction module, used to extract data points corresponding to each characteristic peak from the spectral data according to the spectral peak information of the elements in the substance to be analyzed; a peak band calculation module, used to obtain the band where the peak value of the characteristic peak is located according to the data points corresponding to the characteristic peak; a densification processing module, which performs data densification processing on other bands other than the band where the peak value of the characteristic peak is located to obtain densified data points; and a curve fitting module, used to fit the densified data points to obtain a fitting curve of the characteristic peak.

[0014] Beneficial effects of the present invention: The present invention proposes a method and device for fitting characteristic peaks based on spectral data. The method calculates the band where the peak value of the characteristic peak is located to distinguish the areas with larger changes in the fitting curve, and then densifies the data in other bands other than the band where the peak value of the characteristic peak is located, that is, the areas with smaller changes, and fits the densified data points to obtain the fitting curve of the characteristic peak. It solves the overfitting problem in the discrete characteristic peak fitting process, and the fitted peak shape is closer to the actual situation, thereby improving the performance and accuracy of the quantitative analysis model. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0016] Figure 1 A flow chart of a characteristic peak fitting method provided by one embodiment of the present invention;

[0017] Figure 2 Data points of spectral data and densified data points provided by an embodiment of the present invention;

[0018] Figure 3 A flow chart of data point extraction of characteristic peaks provided by an embodiment of the present invention;

[0019] Figure 4 A flow chart for determining the wavelength band where the peak value of a characteristic peak is located according to an embodiment of the present invention;

[0020] Figure 5 A fitting flow chart of the densified data points provided by an embodiment of the present invention;

[0021] Figure 6 A calculation flow chart of fitting parameters provided by an embodiment of the present invention;

[0022] Figure 7 A comparison chart of the results of two fitting methods provided in one embodiment of the present invention;

[0023] Figure 8 A schematic diagram of a characteristic peak fitting device provided in one embodiment of the present invention.

[0024] Explanation of reference numerals: 100, data acquisition module; 200, data extraction module; 300, peak band calculation module; 400, densification processing module; 500, curve fitting module. DETAILED DESCRIPTION

[0025] The following describes the embodiments of the present invention through specific specific embodiments, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. It should be noted that the following embodiments and the features in the embodiments can be combined with each other without conflict. In addition to the specific methods, equipment, and materials used in the embodiments, according to the technical personnel in this technical field's grasp of the prior art and the records of the present invention, any methods, equipment, and materials of the prior art that are similar or equivalent to the methods, equipment, and materials described in the embodiments of the present invention can also be used to implement the present invention.

[0026] It should be understood that the terms used in the embodiments of the present invention are for describing specific embodiments rather than for limiting the scope of protection of the present invention. Unless otherwise defined, all technical and scientific terms used in the present invention have the same meaning as those generally understood by those skilled in the art.

[0027] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In some of the embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.

[0028] The flowchart and block diagram in the accompanying drawings illustrate the system architecture, functions and operations that may be implemented according to the methods and computer program products of various embodiments disclosed in the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment, or a part of a code, and the module, the program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0029] See also Figure 1 , Figure 1 A characteristic peak fitting method based on spectral data provided in one embodiment of the present invention includes steps S100 to S300.

[0030] Step S100, obtain spectral data. The spectral data is the original spectral data, which is obtained by collecting with a spectrometer, or can be stored in a storage medium after being collected by a spectrometer, and then the spectral data is directly read from the storage medium. Depending on the type of spectrometer, the resolution of the collected signal is also different. Regardless of the type of spectrometer, the spectral data collected is composed of discontinuous points, each point is the data point called later, and the horizontal coordinate corresponding to each data point is the wavelength and the corresponding vertical coordinate is the intensity. Since the peak value of the characteristic peak has a great probability of not appearing on the data point, but on the band between the data points, it is necessary to fit the spectral data at this time, and then solve the true peak wavelength of the characteristic peak according to the extreme value of the fitting curve. The more accurate the fitting method is, the closer the peak shape of the characteristic peak obtained by fitting is to the actual peak shape of the characteristic peak, and the more accurate the subsequent quantitative analysis will be.

[0031] Step S200, extracting data points corresponding to each characteristic peak from the spectral data according to the spectral peak information of the elements in the substance to be analyzed. We can fit all the characteristic peaks in the spectral data, but that requires processing a lot of data. Therefore, in this step, we can determine which data point corresponding to the characteristic peak we need to extract according to the spectral peak information of the elements in the substance to be analyzed, so as to perform characteristic peak fitting only for the characteristic peaks of the elements in the substance to be analyzed. The substance to be analyzed may contain one or more elements, and each element has corresponding spectral peak information. The spectral peak information may be, for example, the absorption spectrum of the element or the excitation spectrum of the element. This information can be obtained by looking up a table; Figure 2 The dots in the figure indicate the data points corresponding to the characteristic peaks of the copper element. It can be understood that in actual processing, the data points corresponding to each characteristic peak can be saved as a wavelength array (denoted as L1) and an intensity array (denoted as I1), so that operations can be performed on these arrays later.

[0032] See also Figure 3 In a specific embodiment of the present invention, step S200 includes: S210, according to the spectrum peak information of the element in the substance to be analyzed, obtaining the minimum data points of the spectrum data located on both sides of the spectrum peak of the element; S220, extracting the two minimum data points and all the data points between the two minimum data points to obtain the data points corresponding to the characteristic peak. In this embodiment, by first obtaining the minimum data points on both sides of the element spectrum peak, the specific band of the characteristic peak is determined, so as to obtain the data points corresponding to each characteristic peak.

[0033] In a specific embodiment of the present invention, step S210 includes: calculating the slope change data of the data points on both sides of the spectrum peak of the element according to the spectrum peak information of the element in the substance to be analyzed; determining the minimum data points on both sides of the spectrum peak of the element according to the slope change data of the data points on both sides of the spectrum peak of the element. It can be understood that the calculated slope is for two adjacent data points, and can be calculated from the spectrum peak to both sides in sequence. Specifically, the minimum data point is found by the positive and negative changes of the slope, for example, first find the data point where the slope on the left side of the spectrum peak changes from negative to positive (that is, the slope of the line connecting the data point and the data point on its left side is negative, and the slope of the line connecting the data point and the data point on its right side is positive), and obtain the left minimum data point, and then find the data point where the slope on the right side of the spectrum peak changes from negative to positive, and obtain the right minimum data point, so that the minimum data points on both sides of the spectrum peak of the element can be confirmed.

[0034] Step S300: Execute steps S310 to S330 for each data point corresponding to each characteristic peak. Thus, a fitting curve can be obtained for each characteristic peak. Figure 2 The figure shows only one of the characteristic peaks. The fitting process of one of the characteristic peaks is described in detail below, and the other characteristic peaks can be fitted according to the same steps.

[0035] Step S310, according to the data points corresponding to the characteristic peak, obtain the band where the peak value of the characteristic peak is located. The band mentioned here is the wavelength range corresponding to two adjacent data points. The reason why the peak value of the characteristic peak is first determined here is that the intensity change at the peak value is relatively drastic. When the data is densified, it is easy to produce a large difference with the actual data, which leads to the inaccurate fitting curve of the characteristic peak obtained in the end. Therefore, in this step, the band where the peak value of the characteristic peak is located is first solved.

[0036] See also Figure 4 In a specific embodiment of the present invention, step S310 includes steps S311 to S313.

[0037] Step S311, according to the maximum value of the intensity of the data point corresponding to the characteristic peak, obtain the maximum value data point corresponding to the characteristic peak. In actual calculation, the position index i1 of the maximum value data point is calculated, which is expressed by the following formula: i1=L1.index(max(I1)), where I1 and L1 are the intensity array and wavelength array of the data point corresponding to the characteristic peak, max(I1) indicates the maximum value of the calculated intensity array, and L1.index() indicates the wavelength index corresponding to the intensity in the brackets.

[0038] Step S312: Obtain the slopes on both sides of the maximum data point according to the maximum data point and the adjacent data points on both sides of the maximum data point. For example, let the slopes on both sides of the maximum data point be k1 and k2 respectively. k1 and k2 can be calculated according to the intensity array I1 and the wavelength array L1. The specific calculation formula is as follows:

[0039] ;

[0040] ;

[0041] In the formula, Represents the intensity of the data point with index i1, that is, the i1-th value in the intensity array I1, that is, the intensity corresponding to the maximum data point, That is, the intensity of the data point to the left of the maximum data point, That is, the intensity of the data point to the right of the maximum data point. Similarly, L1 corresponds to the wavelength of the corresponding index position in the wavelength array.

[0042] Step S313: The band between the maximum data point and the adjacent data point on the side where the absolute value of the slope of the maximum data point is smaller is used as the band where the peak value of the characteristic peak is located. It can be understood that the meaning of this step is: when abs(k1)>abs(k2), it means that the peak value of the characteristic peak is between the maximum data point and its adjacent right data point, where abs() represents the absolute value; otherwise, it means that the peak value of the characteristic peak is between the maximum data point and its adjacent left data point. For example, Figure 2 Among the original data points shown, the third data point is a maximum data point. By calculating the slopes on both sides thereof, it can be known that the absolute value of the slope on the right side is smaller, so the peak value of the characteristic peak is between the third data point and the fourth data point.

[0043] Step S320: Perform data densification processing on other bands other than the band where the peak value of the characteristic peak is located to obtain densified data points. It can be understood that other bands other than the band where the peak value of the characteristic peak is located are not peak positions, and their fluctuations are relatively small, so data densification processing can be performed to add more data points and improve the accuracy of the final fitted curve.

[0044] In a specific embodiment of the present invention, linear interpolation is used to perform data densification processing on other bands outside the band where the peak value of the characteristic peak is located to obtain the densified data points. There are many methods for data densification processing, such as polynomial interpolation, spline interpolation, least squares method, etc. In this embodiment, linear interpolation is used for data densification processing, and its processing steps are relatively simpler and are conducive to the calculation of the half-height width below. The number of data points to be densified can be set as needed. For example, in the present invention, 2 points are inserted between every two adjacent data points.

[0045] After executing step S320, the densified data points can be obtained. It should be noted that the densified data points include the original data points (i.e. Figure 2 ) and the densified data points (i.e. Figure 2 In order to distinguish the densified data points from the original spectral data, the densified data points can also be represented by arrays, that is, the wavelength array L2 and the intensity array I2 are obtained.

[0046] Step S330: Fit the densified data points to obtain a fitting curve of the characteristic peak. Figure 2 The original data in the example are fitted, but the present embodiment is different, and the fitting is performed on the densified data points, that is, Figure 2 All data points in are fitted. It can be understood that the more data points there are, the closer the fitted curve is to the real peak curve.

[0047] Understandably, common methods for curve fitting of multiple points include least square method, spline interpolation method, polynomial fitting method, nonlinear fitting method, Bezier curve method, artificial neural network method, etc. According to the actual situation, a suitable method can be selected to fit the densified data points to obtain the fitting curve of the characteristic peak.

[0048] See also Figure 5 In a specific embodiment of the present invention, step S330 includes steps S331 to S334.

[0049] Step S331, select an initial fitting function, the initial fitting function has fitting parameters to be solved. In this embodiment, the fitting curve of the characteristic peak is obtained by constructing a fitting function and calculating a subsequent loss function. For example, in a specific embodiment of the present invention, the Lorentz function is selected as the initial fitting function, which is expressed as follows:

[0050] ;

[0051] In the formula, x corresponds to the horizontal axis, i.e. wavelength, y corresponds to the vertical axis, i.e. intensity, and x0, y0, A, and w are the fitting parameters to be solved. Once these four parameters are determined, the formula corresponds to the fitting curve of the characteristic peak.

[0052] Step S332: Obtain a loss function based on the initial fitting function and the densified data points. The theoretical intensity corresponding to the wavelength can be solved based on the initial fitting function, and then the difference between the theoretical intensity and the actual intensity can be calculated, so that the loss function can be calculated based on this.

[0053] In a specific embodiment of the present invention, step S332 includes: substituting the wavelength of the densified data point into the initial fitting function to obtain the theoretical intensity corresponding to each densified data point; calculating the intensity difference between the actual intensity of each densified data point and the theoretical intensity; and obtaining the loss function according to the intensity difference of all the densified data points. The loss function can be the sum, average, or square sum of the intensity differences. For example, taking the above fitting function as an example, and calculating the loss function according to the sum of the intensity differences, the loss function can be expressed by the following formula:

[0054] ,

[0055] In the formula, is the wavelength of the i-th data point in the densified wavelength array L2, is the intensity of the i-th data point in the densified intensity array I2, and m represents the total number of densified data points.

[0056] Step S333, calculate the value of the fitting parameter when the loss function takes the minimum value. This step is equivalent to solving the optimal solution of the fitting parameter, and the fitting curve effect obtained by the optimal solution is also the best.

[0057] See also Figure 6 In a specific embodiment of the present invention, step S333 includes step S3331 to step S3333.

[0058] Step S3331: Calculate the integral area S and half-height width w1 of the characteristic peak according to the densified data points. Specifically, the calculation can be performed using the following formula:

[0059] ;

[0060] ;

[0061] In the formula, k3, k4, b3, and b4 are the slopes and intercepts of the two straight lines at the half-width position. The half-width position can be solved according to the ordinate of the maximum data point, that is, the ordinate is divided by 2, and then on the left side of the maximum data point, find the two data points whose ordinates are closest to the half-width position. Based on these two data points, a straight line at the half-width position on the left side of the maximum data point can be obtained. The slope and intercept of this straight line are denoted as k3 and b3. Similarly, another straight line at the half-width position on the right side of the maximum data point can be obtained. The slope and intercept of this straight line are denoted as k4 and b4. Substituting them into the above formula can obtain the half-width w1.

[0062] Step S3332: Calculate the value range of the fitting parameters according to the integrated area S, the half-height width w1, the spectral data (i.e., I1 and L1), and the sampling resolution of the spectral data (i.e., the resolution r of the spectrometer). For example, the value range of A can be [0, 2*S], the value range of w can be [w1-2*r, w1+2*r], the value range of x0 can be [L1(i1)-r, L1(i1)+r], and the value range of y0 can be greater than 0.

[0063] Step S3333: Calculate the value of the fitting parameter when the loss function takes the minimum value within the above value range. The calculated value of the fitting parameter can be used as the optimal solution of the loss function.

[0064] Step S334: Substitute the values ​​of the fitting parameters into the initial fitting function, and fit the densified data points to obtain the fitting curve of the characteristic peak. It can be understood that the initial fitting function into which the optimal solution of the fitting parameters is substituted is equivalent to the fitting curve of the characteristic peak, except that the horizontal coordinate value range of the fitting curve of the characteristic peak is the wavelength of the two minimum value data points mentioned above.

[0065] See also Figure 7 , Figure 7 The solid line in the figure is the fitting curve obtained by fitting the data points of the original spectral data, and the dotted line is the fitting curve obtained by fitting according to the above method of the present invention. The difference between the two can be clearly seen. It can be determined from the figure that the peak shape fitted by the method in the present invention is closer to the actual situation.

[0066] Repeat the above steps to fit other characteristic peaks, so as to obtain the fitting curves of all characteristic peaks. When processing the characteristic peaks later, the wavelength of the true peak, the integral area of ​​the characteristic peak and other parameters can be solved according to the fitting curve of the characteristic peak.

[0067] It should be noted that the step division of the above methods is only for clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they contain the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.

[0068] See also Figure 8 , Figure 8 A characteristic peak fitting device based on spectral data provided by an embodiment of the present invention includes a data acquisition module 100, a data extraction module 200, a peak band calculation module 300, a densification processing module 400 and a curve fitting module 500. The data acquisition module 100 is used to acquire spectral data; the data extraction module 200 is used to extract data points corresponding to each characteristic peak from the spectral data according to the spectral peak information of the elements in the substance to be analyzed; the peak band calculation module 300 is used to obtain the band where the peak of the characteristic peak is located according to the data points corresponding to the characteristic peak; the densification processing module 400 performs data densification processing on other bands other than the band where the peak of the characteristic peak is located to obtain the densified data points; the curve fitting module 500 is used to fit the densified data points to obtain the fitting curve of the characteristic peak.

[0069] It should be noted that the characteristic peak fitting device of the present embodiment is a device corresponding to the characteristic peak fitting method described above, and the functional modules in the characteristic peak fitting device may correspond to the corresponding steps in the characteristic peak fitting method. The characteristic peak fitting device of the present embodiment may be implemented in coordination with the characteristic peak fitting method, that is, in the absence of conflict, the relevant technical details mentioned in the characteristic peak fitting method of the above embodiment may also be applied to the characteristic peak fitting device described above.

[0070] Take LIBS (Laser Induced Break-down Spectroscopy) technology as an example. This technology is an analysis method based on atomic emission spectroscopy. It analyzes the elemental composition of a substance through the plasma generated by laser ablation of the sample. In this process, each element emits light of a specific wavelength, which is the characteristic peak of the element. Accurate analysis of the peak position and intensity of the characteristic peak can provide more accurate input for the subsequent quantitative analysis model, so as to obtain more accurate element types and contents.

[0071] Experiments have shown that the determination coefficient of the quantitative models established by extracting features using ordinary fitting (i.e., the method of directly fitting the data points in the spectral data in the prior art) and constrained fitting (i.e., the method of fitting the densified data points in the present invention) is increased from 0.98 to 0.99, and the average absolute error is increased from 0.011% to 0.008%. It can be seen that through the steps in the present invention, a more accurate fitting curve of the characteristic peak can be fitted.

[0072] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A characteristic peak fitting method based on spectral data, It is characterized in that The steps include: Acquire spectral data; According to the spectrum peak information of the elements in the substance to be analyzed, extracting the data points corresponding to each characteristic peak from the spectrum data; For each data point corresponding to the characteristic peak, execute: According to the data points corresponding to the characteristic peak, the wavelength band where the peak value of the characteristic peak is located is obtained; Performing data densification processing on other bands other than the band where the peak value of the characteristic peak is located to obtain densified data points; The densified data points are fitted to obtain a fitting curve of the characteristic peak.

2. The characteristic peak fitting method based on spectral data according to claim 1, It is characterized in that The step of extracting data points corresponding to each characteristic peak from the spectrum data according to the spectrum peak information of the elements in the substance to be analyzed comprises: According to the spectrum peak information of the element in the substance to be analyzed, obtaining the minimum value data points of the spectrum data located on both sides of the spectrum peak of the element; The two minimum data points and all data points between the two minimum data points are extracted to obtain data points corresponding to the characteristic peak.

3. The characteristic peak fitting method based on spectral data according to claim 2, It is characterized in that The step of obtaining the minimum value data points of the spectrum data located on both sides of the spectrum peak of the element in the substance to be analyzed according to the spectrum peak information of the element includes: According to the spectrum peak information of the element in the substance to be analyzed, calculating the slope change data of the data points located on both sides of the spectrum peak of the element; The minimum value data points on both sides of the spectrum peak of the element are determined according to the slope change data of the data points on both sides of the spectrum peak of the element.

4. The characteristic peak fitting method based on spectral data according to claim 1, It is characterized in that The step of obtaining the wavelength band where the peak value of the characteristic peak is located according to the data points corresponding to the characteristic peak comprises: According to the maximum value of the intensity of the data point corresponding to the characteristic peak, a maximum value data point corresponding to the characteristic peak is obtained; According to the maximum value data point and the data points adjacent to the maximum value data point on both sides, the slopes on both sides of the maximum value data point are obtained; The band between the maximum value data point and the adjacent data point on the side where the absolute value of the slope of the maximum value data point is smaller is taken as the band where the peak value of the characteristic peak is located.

5. The characteristic peak fitting method based on spectral data according to claim 1, It is characterized in that The step of performing data densification processing on other bands other than the band where the peak value of the characteristic peak is located to obtain the densified data points comprises: The linear interpolation method is used to perform data densification processing on other bands except the band where the peak value of the characteristic peak is located, so as to obtain the densified data points.

6. The characteristic peak fitting method based on spectral data according to claim 1, It is characterized in that The step of fitting the densified data points to obtain the fitting curve of the characteristic peak comprises: Selecting an initial fitting function, wherein the initial fitting function has fitting parameters to be solved; Obtaining a loss function according to the initial fitting function and the densified data points; Calculate the value of the fitting parameter when the loss function takes a minimum value; The value of the fitting parameter is substituted into the initial fitting function, and the densified data points are fitted to obtain the fitting curve of the characteristic peak.

7. The characteristic peak fitting method based on spectral data according to claim 6, It is characterized in that The step of selecting an initial fitting function comprises: The Lorentz function is selected as the initial fitting function.

8. The characteristic peak fitting method based on spectral data according to claim 6, It is characterized in that The step of obtaining the loss function according to the initial fitting function and the densified data points comprises: Substituting the wavelength of the densified data point into the initial fitting function to obtain the theoretical intensity corresponding to each of the densified data points; Calculate the intensity difference between the actual intensity of each of the densified data points and the theoretical intensity; The loss function is obtained according to the intensity differences of all the densified data points.

9. The characteristic peak fitting method based on spectral data according to claim 6, It is characterized in that The step of calculating the value of the fitting parameter when the loss function takes a minimum value comprises: Calculating the integrated area and half-height width of the characteristic peak according to the densified data points; Calculating a value range of the fitting parameter according to the integrated area, the half-width, the spectral data, and a sampling resolution of the spectral data; Within the value range, calculate the value of the fitting parameter when the loss function takes the minimum value.

10. A characteristic peak fitting device based on spectral data, It is characterized in that include: A data acquisition module, used for acquiring spectral data; A data extraction module, used to extract data points corresponding to each characteristic peak from the spectrum data according to the spectrum peak information of the elements in the substance to be analyzed; A peak band calculation module, used to obtain the band where the peak of the characteristic peak is located according to the data points corresponding to the characteristic peak; A densification processing module performs data densification processing on other bands except the band where the peak value of the characteristic peak is located to obtain densified data points; The curve fitting module is used to fit the densified data points to obtain the fitting curve of the characteristic peak.

Citation Information

Patent Citations

  • Continuous background correction method based on interpolation method in laser-induced breakdown spectroscopy

    CN106770192A

  • Interpolation reconstruction method based on zanthoxylum bungeanum spectrum characteristic peak

    CN114387260A

  • Raman signal-based complex system substance multi-component analysis method and system

    CN116106289A

  • Multi-component gas concentration detection method based on spectrum analysis algorithm

    CN116879190A

  • Asymmetric Raman spectrum baseline correction method and device and storage medium

    CN117288739A