Libs peak-seeking method, system and device of adaptive window width symmetric zero-area transformation
The LIBS peak finding method based on adaptive window width symmetric zero-area transformation solves the problem of insufficient peak position identification accuracy in existing technologies, and achieves high-precision and high-noise-resistant LIBS peak identification, which is suitable for laser-induced breakdown spectroscopy analysis.
Patent Information
- Application Number
- CN202511285083.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-10
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2045-09-10
AI Technical Summary
Existing LIBS peak finding methods struggle to balance noise suppression and detail preservation when dealing with complex peaks, resulting in insufficient peak position identification accuracy, especially under conditions of adjacent peaks and noise interference.
An adaptive window-width symmetric zero-area transform method is adopted. Preprocessing is performed using the full-spectrum background subtraction method and filtering method. The window width is dynamically adjusted. Peak finding is performed using narrow or wide window calculation formulas, which are combined with peak resolution and the horizontal distance at the point where the absolute value of the slope is the largest, to ensure accuracy.
It significantly improves peak recognition accuracy and noise resistance, with peak finding accuracy increasing to 97% and false detection rate decreasing to 1.75%, while maintaining robustness under Gaussian noise.
Smart Images

Figure CN120780945B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of laser-induced breakdown spectroscopy element analysis technology, in particular to a LIBS peak searching method, system and device based on adaptive window width symmetric zero area transformation. BACKGROUND
[0002] Laser-induced breakdown spectroscopy (LIBS) technology realizes rapid and non-destructive analysis by detecting element characteristic peaks, and is widely used in many fields. However, the peak recognition accuracy directly affects the analysis reliability. The existing peak searching methods have limitations: the centroid method is difficult to handle complex peaks, the derivative method is sensitive to noise, the wavelet transform is complex to calculate, and the traditional symmetric zero area transformation method cannot balance noise suppression and detail preservation due to fixed window width, so that wide window is easy to miss adjacent peaks and narrow window is easy to be disturbed by noise, resulting in insufficient peak recognition accuracy. Therefore, a dynamic window width adjustment mechanism based on local signal characteristics is needed to solve this problem. SUMMARY
[0003] The purpose of the present application is to provide a LIBS peak searching method, system and device based on adaptive window width symmetric zero area transformation to solve the existing problems.
[0004] The technical solutions of the present application to solve the above technical problems are as follows:
[0005] In a first aspect, the present application provides a LIBS peak searching method based on adaptive window width symmetric zero area transformation, comprising:
[0006] Step S1: Preprocessing the collected LIBS spectrum data by full spectrum background subtraction method and filtering method;
[0007] Step S2: Dividing the preprocessed LIBS spectrum data into several data segments and screening the number of peaks in each data segment;
[0008] Step S3: Calculating the peak resolution of the data segment containing multiple peaks Synchronously calculating the maximum half peak full width , the horizontal distance of the maximum absolute value of slope and the length of the data segment for single peak data segment or multiple peak data segment;
[0009] Step S4: Dynamically adjusting the window width based on the peak resolution :
[0010] When , the narrow window calculation formula is used ;
[0011] When or is a single peak, the wide window calculation formula is used ;
[0012] Step S5: Adjust the adaptive window width Substitute the symmetric zero-area transformation formula to find the peaks in each data segment;
[0013] Step S6: If the peak finding accuracy fluctuation is less than the preset threshold, output the peak finding result; otherwise, adjust the preprocessing parameters and repeat steps S1 to S5.
[0014] Further solution: The full-spectrum background subtraction method mentioned in step S1 is the SNIP method, specifically including:
[0015] S11. Transform the spectral intensity data: ,in, Indicates the first Spectral intensity data for each address, express The data after transformation;
[0016] S12, using iterative formulas Filter for the minimum value, where, express calculate The next iteration, and and same;
[0017] S13, Through The basis was obtained by inverse transformation, and the LIBS spectral data were subtracted from the basis using the SNIP method; the filtering method was Savitzky-Golay filtering.
[0018] Further solution: the peak resolution mentioned in step S3 The calculation formula is: ,in, The distance between the centers of two adjacent peaks. and These are the half-peak full widths of two adjacent peaks, respectively.
[0019] Further solution: In the narrow window calculation formula described in step S4, The function is the floor function; in the wide window calculation formula, As a floor function, the strength values at the beginning and end of the data segment are both greater than a set threshold.
[0020] Further solution: The window function for the symmetric zero-area transformation described in step S5. (including the symmetric zero-area window function) The coefficients (which are the core weighting parameters in peak finding calculation) satisfy... and ,in, ;
[0021] : Gaussian function-based spectral peak approximation model, formula is:
[0022] ;
[0023] wherein: : relative position index in the window (value range is to , window width); represents a natural constant;
[0024] : Full Width at Half Maximum of the spectral peak, that is, the width corresponding to the half of the peak value, reflecting the width characteristics of the peak shape;
[0025] : Gaussian function standardization coefficient, ensuring matches the standard deviation of Gaussian distribution;
[0026] : total number of data points in the window, calculation formula is ( window width, total length of the left and right symmetric window is );
[0027] : sum of Gaussian functions in the window range, used for normalizing , ensuring satisfies the zero area constraint.
[0028] Further scheme: the symmetric zero area transformation formula in step S5 is: , wherein, is the data after symmetric zero area transformation, is the preprocessed LIBS spectrum data.
[0029] Further scheme: the peak position determination condition in step S5 is , wherein, is the ratio of the time symmetric zero area transformation and its standard deviation; is a threshold value, the initial value is 1; represents the standard deviation of .
[0030] Further scheme: the calculation formula of the peak search accuracy in step S6 is , wherein, is the true peak number, is the number of missed peaks; the preset threshold is 0.005.
[0031] Further scheme: the adjustment of the pretreatment parameter in step S6 includes: modifying the iteration number of the SNIP method and the width of the Savitzky-Golay filter.
[0032] Further scheme: the error of the peak searching result compared with the NIST database is less than or equal to 0.071 nm, the peak searching accuracy is greater than or equal to 97%, and the false detection rate is less than or equal to 2%.
[0033] In a second aspect, based on the same inventive concept, the present application further provides a LIBS peak searching system based on adaptive window width symmetric zero area transformation, comprising:
[0034] a pretreatment unit configured to pretreat the LIBS spectral data by using a full spectrum background deduction method and a filtering method;
[0035] a data segmentation and analysis unit configured to segment the pretreated spectral data into a plurality of data segments and filter the number of peaks in each data segment;
[0036] a window width adjustment unit configured to dynamically adjust the window width based on the peak resolution, the full width at half maximum, the horizontal distance at the maximum slope and the data segment length of the data segment;
[0037] a peak searching calculation unit configured to substitute the adaptive window width into a symmetric zero area transformation formula to search for peaks in each data segment;
[0038] a result verification unit configured to determine whether the peak searching accuracy fluctuation is less than a preset threshold, and if yes, output the result, otherwise trigger the pretreatment unit to adjust the parameters and repeat the execution;
[0039] In a third aspect, based on the same inventive concept, the present application further provides a LIBS peak searching device based on adaptive window width symmetric zero area transformation, comprising:
[0040] a spectral acquisition module configured to acquire LIBS spectral data;
[0041] a data processing module connected with the spectral acquisition module and configured to execute the steps of the above method;
[0042] an output module connected with the data processing module and configured to output the peak searching result.
[0043] The present application has the following beneficial effects:
[0044] The application provides a LIBS peak searching method, system and device based on adaptive window width symmetric zero area transformation, the window width function constructed by the method has a core capability: by real-time sensing of local characteristics of a signal (such as peak shape change, slope fluctuation, etc.), a wider window is used in a signal smooth or noise dominant area to enhance the noise suppression effect; a narrower window is used in a neighboring peak area to accurately identify the peak position. By evaluating the peak position detection error and the algorithm robustness, the reliability of the adaptive window width method in improving the peak identification accuracy and noise resistance is verified. BRIEF DESCRIPTION OF DRAWINGS
[0045] Figure 1 A LIBS experimental device layout provided for an embodiment of the application is shown in the figure;
[0046] Figure 2 An SNIP method provided for an embodiment of the application is used to remove a base and a SG smoothing filter color map is shown in the figure;
[0047] Figure 3 A flowchart of the adaptive window width symmetric zero area transformation method provided for an embodiment of the application is shown in the figure;
[0048] Figure 4 A peak searching result color map of the symmetric zero area transformation method with different window widths provided for an embodiment of the application is shown in the figure; wherein, a figure is an example when the fixed window width is 3; b figure is an example when the fixed window width is 9; c figure is an example when the fixed window width is 15; d figure is an example of the spectrum peak after introducing the adaptive window width function; e figure is an example when the window width of the second set of adjacent peak identification limits is 11; f figure is an example when the window width of the third set of adjacent peak identification limits is 5;
[0049] Figure 5 An adaptive window width visualization color map provided for an embodiment of the application is shown in the figure.
[0050] Figure 6 A noise peak color map in an embodiment of the application is shown in the figure; wherein, a figure is an example when the window width is 3; b figure is an example when the window width is 9; c figure is an example when the window width is 15; d figure is an example when the adaptive window width is used;
[0051] Figure 7 A peak searching accuracy and false detection rate comparison color map with different window widths provided for an embodiment of the application is shown in the figure. DETAILED DESCRIPTION
[0052] The principles and characteristics of the application are described below in combination with the drawings, and the examples are only used to explain the application and are not used to limit the scope of the application.
[0053] Embodiment 1
[0054] Ten national standard alloy samples were used in this experiment. Table 1 lists the content of the main elements in the samples. The selected samples are regular cylindrical in shape, with smooth and flat surfaces and uniform overall shape.
[0055]
[0056] Experimental setup such as Figure 1 As shown in the figure. In the experiment, a high-energy pulsed laser (Nimma-400, Raibao Optoelectronics, China, specifications: wavelength 1064nm, pulse frequency 1Hz, energy 60mJ) was used to emit the laser beam. The laser beam was reflected 90 degrees by a mirror and focused by a quartz lens with a focal length of 150mm, irradiating the surface of the alloy sample, thereby inducing plasma. The light signal emitted from the plasma was received by a signal receiver and transmitted to a spectrometer (SR-500i, Andor) via optical fiber. Simultaneously, the optical signal was converted into a digital signal by the ICCD integrated into the spectrometer and transmitted to a computer for analysis and processing. Synchronization between the laser and the spectrometer was achieved using a digital delayed pulse generator (BNC575, pulse delay: 1s).
[0057] In the LIBS experiment, a wavelength range of 250 nm to 900 nm was selected (covering 36,144 data points). By establishing a wavelength-channel address mapping relationship (channel addresses 1 to 36,144 corresponding to 250 nm to 900 nm), the spectral intensity values corresponding to each wavelength were directly stored using integer channel addresses as indexes. This method not only significantly improves data storage efficiency but also, based on the continuous integer characteristics of channel addresses, can quickly locate the target wavelength range, effectively supporting the efficient execution of subsequent spectral peak finding and other computational analysis tasks. This paper uses the full-spectrum background subtraction (SNIP) method to process the spectral data. The core principle of this method lies in performing a nonlinear iterative operation on the data. This operation can accurately identify and effectively process the background signal, thereby achieving more accurate identification and quantitative analysis of peaks in the spectral data. The spectral data is transformed using the following formula:
[0058] (1)
[0059] in, Indicates the first Spectral intensity data for each address, express The data after transformation.
[0060] The first The transformation value of each address is compared with the average value of its neighborhood, and the minimum value is selected. The selection formula is as follows:
[0061] (2)
[0062] In the formula, indicates calculate sub-iteration, and with The base is obtained by inverse transformation, and the LIBS spectral data is deducted by SNIP method. The results show that this method can effectively suppress baseline interference (the blue line represents the original spectral data, the yellow line represents the base, the green line is the spectral line after removing the base, and the red line represents the smoothed spectral line). Figure 2
[0063] SNIP is the abbreviation of "Signal-to-Noise Improvement Procedure", which is a data processing method commonly used in nuclear spectroscopy, radiation detection and spectral data processing;
[0064] In order to preserve signal characteristics while reducing noise, the Savitzky-Golay (SG) filtering method is selected. SG filtering method is a local smoothing method based on polynomial fitting, which has relatively low computational complexity and is suitable for processing large-scale data sets. As shown in the nested chart in Figure 2 , this method provides more reliable input for calculating adaptive window width.
[0065] Figure 2 As shown in the figure, SNIP method removes the base and SG smoothing filter. The blue line represents the original spectral data, the yellow line represents the base, the green line is the spectral line after removing the base, and the red line represents the smoothed spectral line.
[0066] Symmetric zero area transformation (SZAT) uses convolution operation of symmetric window function with zero area to assign different weights to each point of spectral peak: peak value region is transformed into positive number, and non-peak value region is transformed into small number or negative number. The peak searching process of symmetric zero area transformation is as follows:
[0067] Window function has symmetry, and its area is 0, as shown in equation 3:
[0068] (3)
[0069] wherein, represents window width. As one of the core control variables of symmetric zero area transformation, its value directly affects the transformation result.
[0070] The spectral peak region can be approximately regarded as a Gaussian function, and the window function is derived from the Gaussian function, and equation 6 shows the method of symmetric zero area transformation of spectral data.
[0071] (4)
[0072] (5)
[0073] (6)
[0074] where, FWHM represents the full width at half maximum of the spectral peak, , is the data after symmetric zero-area transformation, is the preprocessed LIBS spectral data.
[0075] The peak position is determined by equation 7 as follows:
[0076] (7)
[0077] where, threshold value (initial value is 1), is the ratio of the symmetric zero-area transformation of the th order and its standard deviation, when is greater than the threshold value , the data is identified as a spectral peak. As can be seen from equation 7, the choice of window width directly affects the accuracy of peak position detection.
[0078] When using the above symmetric zero-area transformation method, selecting a wide window can smooth the spectral data in a larger range and suppress the interference of noise on the analysis results, but it may ignore the local significant features in the data, especially when dealing with multiple peaks (referred to herein as 'adjacent peaks') with similar positions but not completely overlapping, a wide window often leads to adjacent peaks being missed. On the contrary, a narrow window provides higher resolution and can better reveal adjacent peaks, but it is also more likely to over-respond to noise, and the effect of suppressing noise is relatively limited. Therefore, when selecting the window width , a balance needs to be made between accuracy and noise suppression according to the analysis target.
[0079] In order to achieve the above purpose, an adaptive window width calculation method is proposed in this paper. First, the peak resolution is calculated as the adaptive window width evaluation standard. Peak resolution can help evaluate the degree of peak separation and be used to preliminarily judge whether there are adjacent peaks in the target range. The peak resolution is calculated by the formula
[0080] (8)
[0081] where, and represent the full width at half maximum (FWHM) of the adjacent two peaks (in the same target range), represents the center distance between the adjacent two peaks.
[0082] The calculation formula of adaptive window width is: when the peak resolution of adjacent two peaks is , it indicates that the two peaks are close to each other, and a narrow window should be used to improve the resolution; and when the peak resolution of adjacent two peaks is , or the data segment contains only a single peak, a wide window is preferred to reduce noise interference and improve anti-interference ability.
[0083] (9)
[0084] In the formula, is the length of the data segment, which is selected from the spectral data processed by the SNIP method and the SG filtering method (the start and end of the data segment are greater than the set threshold), is the horizontal distance (x-axis span) corresponding to the maximum absolute value of the slope of the curve in the data segment, is the maximum full width at half maximum in the data segment, and d / FWHM is called the slope peak width adjustment factor, is the floor function.
[0085] The flow chart of adaptive window width symmetric zero area transformation is shown in Figure 3 :
[0086] The first step of the flow is to eliminate defective data, and the LIBS experimental data is preprocessed by the SNIP method and the SG filtering method. The processed data is divided into several data segments, and the number of peaks in each data segment is selected: when there are multiple peaks, the peak resolution is calculated, and when the peak resolution is less than or equal to 2, a narrow window is adaptively matched; when there is only a single peak in the data segment or the peak resolution is greater than 2, a wide window is matched. The adaptive window width is substituted into the symmetric zero area transformation to determine the peak search result. When the change fluctuation of the peak search accuracy is less than 0.5%, it is output, otherwise the iteration number in the SNIP algorithm and the filtering width of the SG algorithm are modified, the data is optimized, and the above steps are repeated.
[0087] When multiple spectral peaks are closely adjacent in the wavelength dimension, the signal interference between adjacent peaks will cause distortion of the boundary profile of the target peak. In actual analysis, spectral peaks often exhibit asymmetric characteristics (such as tailing or front extension), and such asymmetry will form a complex interference effect in the overlapping region, making it difficult to accurately locate the peak center. In view of this key technical problem, three groups of adjacent peaks are selected as the research object. As Figure 4 shown, the first group of adjacent peaks is located between 1110 and 1165. The window width parameter range is set to 1 to 15 using the traversal method, and each parameter value is substituted into the symmetric zero area transformation method for experimental analysis. The results show that, Figure 4 (b) there is deviation in the positioning of the peak center at 1139. Figure 4In (c), the peak at address 1139 was completely lost, while the peak at address 1122 showed significant deviation. In comparison, Figure 4 (d) After introducing the adaptive window width function, the three spectral peaks are accurately located. The adaptive window width has a significant advantage over the fixed window width in the process of neighboring peak identification.
[0088] It is worth noting that below this adjacent peak, when the window width When the value is less than 9, the symmetric zero-area algorithm can accurately locate the three spectral peaks, such as... Figure 4 As shown in Figure a. And when the window width... When the value is ≥9, the algorithm cannot accurately identify neighboring peaks.
[0089] Similarly, Figure 4 Middle e (the adjacent peak between 1320-1360) and Figure 4 The two sets of neighboring peaks in the middle f (the neighboring peaks between 19080 and 19140) require window widths respectively. ≤11 and A value ≤5 is required for accurate identification. The peak shape characteristics of the three groups of adjacent peaks differ significantly. Figure 4 The peak spacing and boundary sharpness of α are relatively moderate. Figure 4 The peak center spacing of the middle e is extremely narrow and the boundary is blurred, while Figure 4 The peak height difference is obvious in the middle f. Analysis shows that the range of values for the window width parameter has a significant peak shape dependence on the accuracy of neighboring peak identification. The introduction of the adaptive window width function, by dynamically adjusting the window width without manually selecting peak shape parameters, significantly improves peak finding efficiency.
[0090] Figure 4 Peak finding results using the symmetric zero-area transform method with different window widths. Threshold. All values are 1, (a) fixed window width =3; (b) Fixed window width =9; (c) Fixed window width =15; (d) Adaptive window width; (e) Second group of neighboring peak identification limits =11; (f) Third group of adjacent peak identification boundaries =5. The blue line represents the spectral data, the yellow line represents the transformed data with a fixed window width, the red line represents the transformed data with an adaptive window width, and the red dots represent the detected peak center points.
[0091] Figure 5 This is a visualization of the processing results of the adaptive window width method on LIBS data. As shown in the figure, the lengths of the data segments within the two dashed boxes are... All are 47. Adaptive window width matching for number 1. =17, Number 2 Adaptive Window Width Matching = 4. This difference reflects the adaptive adjustment of the algorithm to complex peak shape. This adjustment can save the step of screening the window width according to the spectral peak, greatly reduce the calculation redundancy, and significantly improve the practical operation efficiency of the symmetric zero-area transformation method.
[0092] Figure 5 Adaptive window width visualization plot. The X-axis represents the channel address, the upper half of the Y-axis represents the spectral line intensity, and the height of the column in the lower half represents the window width value, and the width of the column represents the data segment length .
[0093] Noise peaks usually have small amplitudes and appear randomly, which may be mistaken for characteristic signal peaks of elements, interfering with element characteristic identification. Compared with the fixed window width method, adaptive window width has potential advantages in suppressing noise. To verify this feature, 500 data points of background noise peaks were selected for comparative testing. Figure 6 . Figure 6 In Figure a, a window width of = 3 was used, and the over-identification phenomenon of noise peaks occurred. As the window width increased ( Figure 6 In Figure b = 9, Figure 6 In Figure c = 15), the number of detected peaks decreased from 19 to 10. In contrast to the fixed window width, no noise peaks were identified when the adaptive window width was used in Figure d. The internal reasons for this phenomenon can be summarized as follows: the noise peak characteristics are abnormal, with a significantly smaller "horizontal distance at the maximum absolute value of the slope (formula 9)" and a severely distorted peak shape, resulting in an abnormally large "abnormal half-peak full width (FWHM)". Both of these factors cause the slope peak width adjustment factor in formula 9 to approach 0, and in turn, the Figure 6 value also approaches 0. Experimental results show that the adaptive window width algorithm avoids identifying noise peaks by dynamically adjusting the window width parameter;
[0094] Figure 6 In the figure: (a) fixed window width = 3; (b) fixed window width = 9; (c) fixed window width = 15; (d) adaptive window width = 0; the adaptive window width symmetric zero area transform method is used for peak searching of LIBS spectral data. In order to evaluate the effect of adaptive window width and fixed window width on the peak searching of the symmetric zero area transform method, the following experiments are carried out. In the experiment, true peaks (TP), missed peaks (FN) and false peaks (FP) are defined. True peaks: actual peaks in the signal that should be detected. Missed peaks: peaks that should be detected but are not detected due to algorithm limitations or improper parameter settings. False peaks: peaks that are falsely detected as peaks, but are not actually true peaks in the signal. In this paper, the peak detection accuracy (PDA) and false discovery rate (FDR) are defined as follows:
[0095] (10)
[0096] (11)
[0097] The wavelength range is selected as 457.063 nm to 570.148 nm, which avoids the main distribution band of common interference sources (such as strong infrared / ultraviolet components in sunlight, laboratory light noise). From the data analysis in Table 2, it can be seen that the window width has a significant effect on the peak searching result. As the window width gradually increases, the number of missed peaks increases from 44 to 96, while the number of false peaks gradually decreases from 87 to 18. In terms of the key indicator of peak detection accuracy, the adaptive window width method shows a significant advantage. As shown in FIG. 2 (the ordinate is the window width value, the abscissa is the percentage value, the positive and negative directions correspond to PDR (blue, positive direction) and FDR (red, negative direction) respectively), the peak detection accuracy of the adaptive window width algorithm is as high as 97.4% (only 58.44% for fixed window width = 15), with a significant performance improvement; at the same time, the false detection rate is further reduced to 1.75%. The adaptive window width improves the detection accuracy of the peak position by dynamically adjusting the symmetric zero area transform; Figure 7
[0098]
[0099] Figure 7 The peak detection accuracy and false detection rate of different window widths. The ordinate is the window width value;
[0100] In order to comprehensively evaluate the performance of the adaptive window width symmetric zero area transform (SZAT) peak searching algorithm, the following two tests are used to verify:
[0101] (1) Benchmarking: The experimental data of Fe-Cr-Mn-Ni alloy was compared with the NIST database. Table 3 shows the comparison results of the peak positions identified by the algorithm in this paper and the NIST database. As can be seen from Table 3, the peak search results of the algorithm in this paper are basically consistent with the data in the NIST database, and the error is within 0.071 nm.
[0102] (2) Noise robustness verification: Gaussian noise, one of the common noises in LIBS, was added to the experimental data. Different Gaussian noises were added to the LIBS experimental data, and the average error was calculated. After ten experiments, the average value was taken. With the increase of the amplitude of the Gaussian noise, , the average error of the peak search of the algorithm in this paper showed a continuous upward trend, from 0.6081 pm at =0.05 to 1.9266 pm at =0.5. However, compared with the centroid method (14.0961 pm→14.8143 pm), the Gaussian product function method (2.0653 pm→2.5034 pm) and the derivative method (2.4781 pm→3.0286 pm), the average error of the algorithm in this paper is the smallest, which shows its great potential in applications with high precision requirements;
[0103]
[0104] In view of the limitations of the traditional symmetric zero-area transformation (SZAT) peak search algorithm in complex LIBS spectral analysis, the AWSAZC was innovatively proposed. The algorithm constructs a window width adaptive adjustment framework by dynamically analyzing the local statistical properties of the spectral line (such as spectral line slope, full width at half maximum, and peak spacing distribution) and fusing peak resolution dynamic evaluation, realizing efficient analysis of adjacent peaks and noise peaks.
[0105] As shown in Table 4, through systematic verification of Fe-Cr-Mn-Ni alloy samples, the experimental results show that the adaptive window width symmetric zero-area transformation method has significant advantages in peak search: comparison with the NIST standard database shows that the error is within 0.071 nm; the peak search accuracy is improved to 97.4%, and the false positive rate is reduced to 1.75%. Under the interference of Gaussian noise of different intensities, the algorithm in this paper still maintains robustness, verifying its applicability in actual analysis scenarios. The next research focuses on how to establish an effective physical model or statistical criterion to realize reliable discrimination of weak peaks and noise peaks.
[0106]
[0107] Example 2
[0108] Taking a LIBS spectral analysis system built by a scientific research institution as an example, the system aims to analyze the element composition in ore samples, and the specific steps of the LIBS peak searching system based on adaptive window width symmetric zero area transformation are as follows:
[0109] Preprocessing unit:
[0110] SNIP method implementation: using self-developed spectral data processing software, load the collected LIBS spectral data file (.spc format). The software transforms the spectral intensity data according to the SNIP method formula:
[0111] For example, when processing a batch of iron ore spectral data, the iteration number is set to 5 times, and the formula is:
[0112] ;
[0113] Screening the minimum value and inverse transformation to obtain the base, successfully subtracting the base signal, making the peak signal in the spectrum more prominent.
[0114] Savitzky-Golay filter implementation: call the Savitzky-Golay filter algorithm in the same software, set the filter window width to 11 points and the polynomial order to 3. After filtering, the high-frequency noise in the spectral data is effectively suppressed, while the sharpness and full width at half maximum of the peaks are retained, providing a high-quality data basis for subsequent data processing.
[0115] Data segmentation and analysis unit:
[0116] Data segmentation: use a data processing script written in Python language to segment the preprocessed spectral data into several data segments according to the intensity threshold of the spectral data (set to 500 counts). For example, when analyzing a spectrum containing multiple element characteristic peaks, 5 data segments are successfully segmented, each containing clear peak information or background area.
[0117] Peak number screening: through the self-programmed peak recognition algorithm, each data segment is analyzed. The algorithm identifies the number of peaks in the data segment based on the slope change and intensity characteristics. In the above 5 data segments, 2 data segments are accurately judged as single peaks, and 3 data segments are multi-peak, providing a basis for subsequent targeted parameter calculation.
[0118] Window width adjustment unit:
[0119] Parameter calculation: for multi-peak data segments, write a Python function to calculate the peak resolution . For example, in a data segment containing adjacent iron and magnesium element characteristic peaks, the center distance between the adjacent two peaks is measured 2.5 nm, two-peak full width at half maximum 0.8 nm, 0.7 nm, substitute into the formula:
[0120] , calculated At the same time, the maximum half-width of the data segment is calculated using the numpy library function 0.8 nm, the horizontal distance of the maximum absolute value of the slope 10 data points and the length of the data segment 100 data points.
[0121] Window width determination:
[0122] According to the calculated value, when (1.67 as calculated above), the narrow window calculation formula is used to calculate:
[0123] , (in practical applications, it can be appropriately scaled according to the data size, such as taking 1 / 10 of 62).
[0124] For or single-peak data segments, use the wide window calculation formula If a single-peak data segment is 1.2 nm, then (same as the actual situation, such as 10 times magnification for 10).
[0125] Peak search calculation unit:
[0126] Window function construction: write a function in Python to construct a symmetric zero-area transformation window function . Take the Gaussian function as an example, according to the formula ( is the half-width of the spectral peak, here is calculated according to the corresponding data segment) to calculate the Gaussian function value, and then according to:
[0127] , construct the window function.
[0128] Peak search calculation: substitute the adaptive window width into the symmetric zero-area transformation formula , and use Python's numpy library for efficient matrix operations. For each data segment, perform peak search calculation to identify the peak position. For example, in a complex multi-peak data segment, three peak positions are accurately identified, and compared with the known standard spectral peak positions, the error is within the acceptable range.
[0129] Result verification unit:
[0130] Accuracy calculation: write a Python script to calculate the peak search accuracy . By comparing with the known standard spectrum database, the number of true peaks and the number of missed peaks are counted . As in the analysis of 100 spectrum data segments, 95 , 3 , the calculation is as follows:
[0131] .
[0132] Threshold judgment and adjustment: compare the calculated with the preset threshold 0.005. If the fluctuation is less than the threshold, such as the fluctuation of and the last calculated PDA is 0.003, which meets the condition, then output the peak search result to the result file (.txt format). If it does not meet the condition, adjust the number of iterations of SNIP method (such as from 5 times to 7 times) and the width of Savitzky-Golay filter (such as from 11 points to 13 points), trigger the preprocessing unit to execute again until the condition is met.
[0133] Example 3
[0134] The LIBS peak search device of adaptive window width symmetric zero area transformation includes:
[0135] Spectrum acquisition module:
[0136] Laser induction assembly: choose high-energy Nd-YAG laser with wavelength of 1064 nm, pulse width of 5 ns and repetition frequency of 10 Hz. The laser beam emitted by the laser is reflected by a set of high-precision mirrors (reflectivity > 99%) and focused on the surface of the metal sample through a focusing lens with a focal length of 75 mm. For example, when detecting aluminum alloy samples, the laser energy density reaches , effectively inducing the generation of plasma on the surface of the sample.
[0137] Signal receiving assembly: use a large-diameter quartz optical fiber (core diameter 200 μm) to efficiently transmit the light signals emitted by the plasma to the spectrometer. The end of the optical fiber is placed near the sample surface at a 45° angle to optimize the light signal collection efficiency.
[0138] Spectrometer and ICCD: The wavelength range of the used spectrometer is 200-1000 nm with a resolution of 0.05 nm. The gain of the ICCD (intensified charge-coupled device) can be adjusted from 1 to 1000 times, and the exposure time can be accurately controlled from 1 μs to 100 ms. During the detection process, the ICCD gain is set to 200 times and the exposure time is set to 10 μs according to the intensity of the sample emission light, ensuring that clear spectral data is collected.
[0139] Data processing module:
[0140] Hardware configuration: A high-performance industrial computer is used as the data processing core, equipped with an Intel Xeon E5 processor (8 cores, 3.0 GHz main frequency), 16 GB DDR4 memory and 512 GB SSD hard disk. The computer is connected to the spectrometer and ICCD through a USB 3.0 interface to achieve high-speed data transmission.
[0141] Software operation: A self-developed LIBS data processing software is installed in the computer, which is developed based on C++ language and integrates the method steps described above. After the software is started, it automatically identifies the connected spectral acquisition device, receives the collected spectral data in real time, and performs preprocessing, data segmentation, window width adjustment, peak searching calculation and result verification operations. For example, when processing a batch of stainless steel sample spectral data, the software completes all data processing within 1 minute and outputs accurate peak searching results.
[0142] Output module:
[0143] Result display: A 24-inch liquid crystal display is connected to the computer through the HDMI interface, and the peak searching results are displayed to the operator in the form of visual charts (spectral graphs marked with peak positions and corresponding elements) and data tables (peak positions, intensities, and corresponding elements). The operator can intuitively understand the element composition and content information in the sample.
[0144] Data storage: The peak searching result data is stored in the designated folder of the computer hard disk, and at the same time, the data can be transmitted to the enterprise internal server through the network sharing function, which is convenient for subsequent data management and analysis. For example, within a month, the device detected 500 batches of metal samples, and all the peak searching result data was stored completely, providing strong data support for enterprise product quality control.
[0145] Synchronization control module:
[0146] Hardware connection: The synchronization control module is realized by a programmable logic controller (PLC), which is connected to the laser controller in the laser-induced module and the spectrometer control unit in the spectral acquisition module through the RS485 communication interface.
[0147] Synchronous control: write control program in PLC, set the time delay of laser trigger and spectrometer acquisition to 500 ns, ensure that the spectrometer collects at the strongest plasma emission light signal. For example, in the continuous detection process, the PLC stable control of the synchronization of laser and spectrometer, ensure the accuracy and consistency of each detection data.
[0148] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of the changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A LIBS peak-finding method with adaptive window width symmetric zero-area transform, characterized in that, include: Step S1: Preprocess the acquired LIBS spectral data using full-spectrum background subtraction and filtering methods; Step S2: Divide the preprocessed LIBS spectral data into several data segments and filter the number of peaks in each data segment; Step S3: Calculate peak resolution for data segments containing multiple peaks. The maximum full width at half maximum (FWHM) of multi-peak data segments is calculated synchronously. Horizontal distance at the point where the absolute value of the slope is maximum and data segment length ; Step S4: Based on peak resolution Dynamically adjust window width : when When using the narrow window calculation formula ; when When using the wide window calculation formula ; In the narrow window calculation formula The function is the floor function; in the wide window calculation formula, As a floor function, the strength values at the beginning and end of the data segment are both greater than a set threshold; Step S5: Adjust the window width Substitute the symmetric zero-area transformation formula to find the peaks in each data segment; Step S6: If the peak finding accuracy fluctuation is less than the preset threshold, output the peak finding result; otherwise, adjust the preprocessing parameters and repeat steps S1 to S5.
2. The LIBS peak finding method with adaptive window width symmetric zero-area transformation according to claim 1, characterized in that, The full-spectrum background subtraction method mentioned in step S1 is the SNIP method, which specifically includes: S11. Transform the spectral intensity data: ,in, Indicates the first Spectral intensity data for each address, express The data after transformation; S12, using iterative formulas Filter for the minimum value, where, express calculate The next iteration, and and same; S13, Through The basis was obtained by inverse transformation, and the LIBS spectral data were subtracted from the basis using the SNIP method; the filtering method was Savitzky-Golay filtering.
3. The LIBS peak finding method with adaptive window width symmetric zero-area transformation according to claim 1, characterized in that, The peak resolution mentioned in step S3 The calculation formula is: ,in, The distance between the centers of two adjacent peaks. and These are the half-peak full widths of two adjacent peaks, respectively.
4. The LIBS peak finding method with adaptive window width symmetric zero-area transformation according to claim 1, characterized in that, The window function for the symmetric zero-area transformation in step S5 satisfy and ; in, ; in, The spectral peak approximation model based on the Gaussian function is represented by the following formula: ; in: Indicates the full width at half maximum (FWHM) of a spectral peak; Represents the normalization coefficient of the Gaussian function; The formula for representing the total number of data points within the window is as follows: ; This represents the sum of the Gaussian function within the window range.
5. The LIBS peak finding method with adaptive window width symmetric zero-area transformation according to claim 4, characterized in that, The symmetric zero-area transformation formula mentioned in step S5 is: ,in, The data is after a symmetric zero-area transformation. This is the preprocessed LIBS spectral data.
6. The LIBS peak finding method with adaptive window width symmetric zero-area transformation according to claim 5, characterized in that, The peak position determination condition in step S5 is as follows: ,in, For the first The ratio of the symmetric zero-area transformation to its standard deviation; The threshold value is set to 1 initially. express The standard deviation.
7. The LIBS peak finding method with adaptive window width symmetric zero-area transformation according to claim 1, characterized in that, Peak finding accuracy in step S6 The calculation formula is: ,in, This represents the actual number of peaks. The number of missed peaks; the preset threshold is 0.
005.
8. The LIBS peak finding method with adaptive window width symmetric zero-area transformation according to claim 2, characterized in that, The adjustment of preprocessing parameters in step S6 includes modifying the number of iterations of the SNIP method and the width of the Savitzky-Golay filter.
9. A LIBS peak-finding system employing an adaptive window-width symmetric zero-area transform as described in any one of claims 1-8, characterized in that, include: The preprocessing unit is used to preprocess LIBS spectral data using full-spectrum background subtraction and filtering methods; The data segmentation and analysis unit is used to segment the preprocessed spectral data into several data segments and filter the number of peaks in each data segment. The window width adjustment unit is used to dynamically adjust the window width based on the peak resolution, full width at half maximum, horizontal distance at the maximum slope of the data segment, and the length of the data segment. The peak finding calculation unit is used to substitute the adaptive window width into the symmetric zero-area transformation formula to find the peaks in each data segment; The result verification unit is used to determine whether the peak finding accuracy fluctuation is less than the preset threshold. If it meets the threshold, the result is output; otherwise, the preprocessing unit is triggered to adjust the parameters and repeat the process.
10. A LIBS peak-finding device with adaptive window width symmetric zero-area transformation, characterized in that, include: The spectral acquisition module is used to acquire LIBS spectral data; A data processing module, connected to a spectral acquisition module, is configured to perform the steps of the method as described in any one of claims 1-8; The output module, connected to the data processing module, is used to output the peak finding results.
Citation Information
Patent Citations
Method for obtaining powder diffraction file of plant medicinal material
CN103913476A
XRD spectrum automatic peak searching method
CN116952999A