Soil heavy metal quantitative detection method based on LIBS spectral line multi-information fusion
By using the LIBS spectral line multi-information fusion method, combined with nonlinear regression models and data processing techniques, the problems of long detection cycles and low accuracy of traditional soil heavy metal detection have been solved, and high-precision in-situ quantitative detection of Cr and Pb elements in soil has been achieved.
Patent Information
- Application Number
- CN202511915119.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-18
- Publication Date
- 2026-02-13
AI Technical Summary
Traditional methods for detecting heavy metals in soil require sampling and sample pretreatment, resulting in long detection cycles and an inability to achieve in-situ online detection. Furthermore, quantitative results are easily affected by changes in the energy of the excitation source, changes in environmental parameters, and self-absorption effects, leading to low detection accuracy.
A LIBS-based multi-information fusion method is adopted. By co-optimizing variable selection, nonlinear modeling and optimizing data quality, characteristic spectral lines of Cr and Pb elements are selected, and information on spectral line intensity, peak integral area and half width at half maximum (WHM) is extracted. Quantitative detection is performed using a nonlinear regression model based on radial kernel basis functions, and data processing is carried out by combining a decision filtering algorithm based on median absolute deviation and wavelet transform.
It significantly improves the detection accuracy of heavy metal elements Cr and Pb in soil, expands the linear range of quantitative analysis, enhances the robustness of the model to random noise, instrument drift and matrix interference, and improves the prediction accuracy in high concentration areas.
Smart Images

Figure CN121521847A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of soil element detection, and particularly relates to a soil heavy metal quantitative detection method based on LIBS spectral line multi-information fusion. BACKGROUND
[0002] LIBS technology has been widely applied in various detection occasions due to its advantages in real-time and non-contact detection. In recent years, with the continuous research and improvement of researchers on LIBS technology, LIBS technology has become more mature. Today, as a kind of spectral analysis technology without sample processing and rapid detection, LIBS is gradually applied to soil heavy metal detection.
[0003] Traditional detection methods mostly need sampling, sample pretreatment and a series of complex processes, and face problems such as long detection period, low detection efficiency and inability to realize in-situ online detection, such as atomic absorption spectrometry (AAS), inductively coupled plasma atomic emission spectrometry (ICP-AES) and the like. With its relatively low price and superior performance, LIBS has played a great role in promoting the development of the soil heavy metal detection industry, but there are still many problems in applying LIBS technology to quantitative analysis of soil heavy metals. Traditional quantitative methods usually only use single spectral peak information of characteristic spectral lines, and the quantitative results are easily affected by changes in excitation source energy, environmental parameters and self-absorption effects, resulting in low quantitative detection accuracy. SUMMARY
[0004] Therefore, the purpose of the present application is to provide a soil heavy metal quantitative detection method based on LIBS spectral line multi-information fusion, which provides an effective solution for in-situ high-precision detection of heavy metals in complex soil by synergistically optimizing variable selection, nonlinear modeling and optimizing data quality, and significantly improves the detection accuracy of laser-induced breakdown spectroscopy for Cr and Pb heavy metal elements in soil.
[0005] The application provides a soil heavy metal quantitative detection method based on LIBS spectral line multi-information fusion, which comprises the following steps: Based on the LIBS spectrum of soil samples with different concentration gradients, the characteristic spectral lines of Cr and Pb elements with similar response to the concentration change of each element are selected, and three spectral line information of each characteristic spectral line, i.e. spectral line intensity, spectral peak integral area and half-width, are extracted; Each spectral line information is normalized to eliminate the dimensional difference between different spectral line information; At each concentration gradient, the normalized spectral line information of Cr and Pb elements corresponding to each other is fused at the data level to obtain an original feature vector; Based on the original eigenvectors of Cr and Pb elements under different concentration gradients, nonlinear regression models based on radial kernel function are trained respectively for quantitative detection of heavy metal content in soil.
[0006] Further, the characteristic spectral lines of Cr element include Cr I 357.87nm, Cr I 425.44nm, Cr I 427.48nm, and the characteristic spectral lines of Pb element include Pb I 363.96nm, Pb I 368.35nm, Pb I 405.78nm.
[0007] Further, the response of each spectral line information to the concentration change of each element includes that in the low concentration range, the spectral line intensity, the spectral peak integral area and the element concentration all show a strong linear relationship, and the linear relationship between the half-height width and the element concentration is not obvious; and as the concentration increases, the self-absorption effect is enhanced, the linear relationship between the spectral line intensity, the spectral peak integral area and the element concentration becomes weak, and the linear relationship between the half-height width and the element concentration becomes strong.
[0008] Further, before selecting multiple characteristic spectral lines with strong response to element concentration change and their corresponding three kinds of spectral line information based on LIBS spectrum, the method further comprises: An absolute deviation based decision filtering algorithm is used to reduce the abnormal extreme values of LIBS spectrum, and the specific steps are as follows: A fixed length moving window is used to intercept LIBS spectrum data to obtain the median value of each data point in the window; The absolute deviation of each data point in the window from the median value is calculated and sorted to obtain the median value of the absolute deviation; The median value of the absolute deviation is multiplied by a constant 1.4826 to obtain a scale estimator; A threshold parameter is multiplied by the scale estimator to obtain an absolute deviation threshold value; wherein the size of the threshold parameter determines the degree of spectrum data interception.
[0009] The absolute deviation of any data point in the window is compared with the absolute deviation threshold value; When the absolute deviation of the data point is less than the absolute deviation threshold value, the data point is determined as valid data and the original value is outputted; Otherwise, the data point is determined as singular data and is replaced by the median value of each data point in the window.
[0010] Further, before using the absolute deviation based decision filtering algorithm to reduce the abnormal extreme values of LIBS spectrum, the method further comprises: For the LIBS spectrum, the asymmetric least squares algorithm is applied for baseline correction, and then wavelet transform is implemented for noise reduction processing, which can effectively suppress random noise while well preserving the mutation characteristics such as peaks and edges of the signal.
[0011] Further, the LIBS spectrum of the soil sample with different concentration gradients is obtained in the following manner: Pb(NO3)2 and Cr(NO3)3·9H2O crystals are proportionally added to the standard soil GBW07403, and then mixed in a mortar, and deionized water is used for stirring to make the sample more uniform, and then the sample is dried, ground and sieved to obtain a fine powder; 3g of the powder is placed in a mold and pressed under a pressure of 30MPa for 30 minutes to obtain a 30mm×2mm round cake-shaped sheet, thereby obtaining a soil sample with different concentration gradients.
[0012] Further, the nonlinear regression model based on the radial kernel function is trained in the following manner: For Cr or Pb elements, the original feature vectors of the elements are mapped to a high-dimensional feature space based on the set radial basis kernel function, and the corresponding support vectors are obtained, and different concentration gradients are used as the labels of the support vectors; Based on the labels of the support vectors, the support vector regression algorithm is used to learn the interaction and complementary relationship between the spectral line information carried by each support vector, and a decision boundary is constructed to obtain a set of key support vectors and their corresponding coefficients; The nonlinear regression model is constructed using the key support vectors and their corresponding coefficients, and the selected radial basis kernel function.
[0013] Further, the soil heavy metal content is quantitatively detected in the following manner: The LIBS spectrum of the soil to be measured is obtained, and the spectral line information corresponding to Cr and Pb elements is extracted, and then normalized to obtain the test feature vectors of Cr and Pb elements; For Cr or Pb elements, the similarity between the test feature vector of the element and each key support vector is calculated using the radial basis kernel function; Based on the coefficients and similarity of each key support vector, the corresponding weight is obtained; The weights and labels of each key support vector are weighted and summed, and a bias term is added to obtain the quantitative detection result of Cr or Pb elements.
[0014] The application provides a soil heavy metal quantitative detection method based on LIBS spectral line multi-information fusion, and through cooperative optimization of variable selection, nonlinear modeling and optimized data quality, an effective solution is provided for in-situ high-precision detection of heavy metals in complex soil, and the detection precision of laser-induced breakdown spectroscopy for Cr and Pb heavy metal elements in soil is significantly improved. BRIEF DESCRIPTION OF DRAWINGS
[0015] Figure 1 A LIBS spectrum acquisition device schematic diagram provided by the embodiment of the application is shown. Figure 2 A fitting result comparison diagram before and after application of a decision filtering algorithm provided by the embodiment of the application is shown. Figure 3 A calibration model regression curve diagram based on spectral line intensity provided by the embodiment of the application is shown. Figure 4 A calibration model regression curve diagram based on spectral peak integral area provided by the embodiment of the application is shown. Figure 5 A calibration model regression curve diagram based on half-width provided by the embodiment of the application is shown. Figure 6 A flowchart of the soil heavy metal quantitative detection method based on LIBS spectral line multi-information fusion provided by the embodiment of the application is shown. Figure 7 A SVR model fitting curve diagram based on LIBS spectral line multi-information fusion provided by the embodiment of the application is shown. Figure 8 A contribution degree visualization diagram of each spectral line information provided by the embodiment of the application is shown. DETAILED DESCRIPTION
[0016] To make the purpose, technical scheme and advantages of the technical solution more clear and explicit, the technical solution is further described in detail below in combination with specific embodiments. It should be understood that these descriptions are only exemplary, and are not intended to limit the scope of the technical solution.
[0017] Embodiment one, exploring the quantitative relationship between LIBS spectral line information and element concentration: (I) LIBS spectrum acquisition device: Please refer to the LIBS spectrum acquisition device schematic diagram as shown in Figure 1 . As shown in Figure 1The light source is a Beamtech Nimma-400 type Nd:YAG laser, and its output characteristics are as follows: wavelength 1064 nm, pulse energy 50 mJ, pulse duration 8 ns, and repetition frequency 1 Hz. The laser is converged through a 120 mm focal length lens, and the focal point is positioned at a depth of 2 mm below the sample surface to induce plasma generation. A half-wave plate and a Glan prism are used to form an energy attenuation system to adjust the pulse energy of the ablation target. The plasma spectrum signal is conducted to an Andor Me5000 spectrometer equipped with an ICCD through a fiber probe. The spectral band interval of the instrument is 200-975 nm, and the resolution is =5000. The sample movement is controlled by a three-dimensional platform. The Stanford DG645 digital delay generator ensures the synchronous operation of the laser and the spectrometer, in which the ICCD is triggered by the laser Q signal, and the spectrometer acquisition is set to a 0.8 μs delay.
[0018] (II) Sample preparation and characteristic spectral line selection: The sample used in the present application is a sample prepared in the laboratory. The sample preparation is based on standard soil GBW07403, and Pb(NO3)2 and Cr(NO3)3·9H2O crystals are added to the standard soil in proportion (the background concentrations of Pb and Cr in the standard soil are very low and can be ignored), and then the mixture is mixed in a mortar, and deionized water is added for stirring to make the sample more uniform. Subsequently, the required powder of a certain fineness is prepared through the processes of drying, grinding, and sieving. 3 g of the powder is placed in a mold and pressed at a pressure of 30 MPa for 30 minutes to form a 30 mm×2 mm round cake-shaped sheet. A total of 9 samples with different concentrations are prepared, and the specific element concentrations are shown in Table 1.
[0019] Table 1, element concentrations of samples
[0020] The LIBS spectrum acquisition device is used to measure the spectrum in the range of 200-600 nm for analyzing the Cr and Pb elements in the sample. The information of the NIST database and the acquired spectrum information are combined, and the characteristic spectral lines of Cr and Pb are identified by comparison with the blank soil sample. In the present application, three Cr atomic lines of Cr I 357.87 nm, Cr I 425.44 nm, and Cr I 427.48 nm, and three Pb atomic lines of Pb I 363.96 nm, Pb I 368.35 nm, and Pb I 405.78 nm are selected as the characteristic spectral lines. In order to reduce the influence of environmental fluctuations and system errors on the detection results, 19 sample points are collected for each sample, and the average value of 5 spectra for each sample point is taken as the final result.
[0021] (III) LIBS spectrum pretreatment: In order to optimize the quality of spectral data, for LIBS spectrum, the asymmetric least squares algorithm is applied for baseline correction, and then the wavelet transform is implemented for noise reduction processing, while effectively suppressing random noise, the mutation characteristics such as peak and edge of the signal are well preserved; finally, the decision filtering algorithm based on median absolute deviation is used to reduce abnormal extreme values.
[0022] The implementation steps of the decision filtering algorithm are as follows: The LIBS spectral data is intercepted by using a fixed length moving window to obtain the median of each data point in the window; the absolute deviation of each data point in the window from the median is calculated and sorted to obtain the median of the absolute deviation; the median of the absolute deviation is multiplied by a constant 1.4826 to obtain the scale estimator; the threshold parameter is multiplied by the scale estimator to obtain the absolute deviation threshold; the absolute deviation of any data point in the window is compared with the absolute deviation threshold; when the absolute deviation of the data point is less than the absolute deviation threshold, the data point is determined as valid data and the original value is output; otherwise, the data point is determined as singular data and is replaced by the median of each data point in the window. The decision filter has proportion invariance, causality and high computational efficiency, and can be adapted to different scenes by adjusting the length of the moving window and the threshold parameter, wherein the size of the threshold parameter determines the degree of spectral data interception.
[0023] In this application, 19 points are collected for each sample, so the length of the moving window is set to 19, so as to contain all the repeated experimental spectral data, and the threshold parameter is set to 1. Please refer to the fitting result comparison chart before and after applying the decision filtering algorithm as shown in Figure 2 In order to verify the filtering performance of the decision filtering algorithm, the Cr425.44nm spectral peak intensity is taken as an example to show the improvement degree of the calibration model effect before and after filtering, and the error bar in the figure represents the standard deviation of the model predicted concentration.
[0024] As can be seen from Figure 2 It can be seen that the fitting effect of the data processed by the decision filtering algorithm is obviously improved compared with the unfiltered data, and the data points are closer to the fitting line, so it can be seen that the decision filtering algorithm based on median absolute deviation (MAD) effectively eliminates extreme abnormal values by comparison with the median, and can well reduce the influence of system error and environmental change on the spectrum. Therefore, the decision filtering algorithm is applied to process the six analysis spectral lines of Cr and Pb elements in 19 spectra of each sample, and the average value of the processed spectrum is used for final calculation.
[0025] (Four) Exploring the quantitative relationship between the spectral line information and the element concentration: The nine groups of soil samples in Table 1 are divided into calibration samples and validation samples. Six samples S1, S3, S4, S6, S7 and S9 are randomly selected as a training set to establish a calibration model, and three samples S2, S5 and S8 are used as a validation set to evaluate the detection performance of the calibration model to explore the quantitative relationship between spectral line information and element concentration.
[0026] In addition to using the fitting coefficient (R²), the root mean square error (RMSE), the average relative deviation (ARE) and the relative standard deviation (RSD) are also used to evaluate the performance of the calibration model. The calculation formulas of the parameters are as follows: ; (1) ; (2) ; (3) In the formula, is the standard deviation of the spectral background signal, is the slope of the calibration curve, is the number of samples with different element concentrations, which is 9 here, is the number of repeated measurements of the same sample under the same conditions, which is 19 here, is the predicted element concentration, is the actual element concentration, is the average value of the element concentration of multiple repeated measurements.
[0027] (1) Explore the linear relationship between spectral line intensity and element concentration: Take the element concentration in the sample as the horizontal coordinate and the characteristic spectral line intensity of the element as the vertical coordinate to establish a calibration model. Please refer to the spectral line intensity-based calibration model regression curve as shown in Figure 3 , wherein Figure 3 (a) is the calibration model regression curve of the spectral line intensity of Cr element, Figure 3 (b) is the calibration model regression curve of the spectral line intensity of Pb element.
[0028] As can be seen from Figure 3 , the fitting coefficients (R²) of the six characteristic spectral lines of the two elements are all above 0.85, among which the fitting coefficients of the three spectral lines of Pb element are slightly higher than those of Cr element. The calibration models of the two elements both reflect the linear relationship between spectral line intensity and element concentration, but the quantitative analysis results based on single spectral peak intensity are easily affected by the sample matrix effect, and the quantitative analysis accuracy will be affected by the self-absorption effect as the element concentration in the sample increases.
[0029] Table 2, evaluation indexes of two elements in the spectral line intensity-based calibration model
[0030] From Table 2, it can be seen that the indicators of the two elements are poor, in which the root mean square error (RMSE) of Cr I 425.44 nm and Pb I 405.78 nm is 0.136% and 0.133%, the average relative deviation (ARE) is 14.206% and 16.897%, and the relative standard deviation is also high. This may be due to the mutual interference of the spectral lines of each element in the soil spectrum, the matrix difference between soil samples, and the greater deviation of the calibration data and the calibration fitting curve. In addition, with the increasing self-absorption effect, there is a nonlinear relationship between the element concentration and the absolute intensity of the spectral line. Therefore, the absolute intensity method is simple in analysis and calculation, but has many limiting factors, and it is difficult to achieve high-accuracy quantitative analysis in application.
[0031] (2) Explore the linear relationship between the spectral peak integral area and the element concentration: Take the element concentration in the sample as the horizontal coordinate and the spectral peak integral area of the characteristic spectral line of the element as the vertical coordinate to establish a calibration model. Please refer to the calibration model regression curve diagram based on the spectral peak integral area as shown in Figure 4 , in which Figure 4 (a) is the calibration model regression curve diagram of the spectral peak integral area of Cr element, Figure 4 (b) is the calibration model regression curve diagram of the spectral peak integral area of Pb element.
[0032] It can be observed from Figure 4 that the fitting effect of the spectral peak integral area is better than that of the spectral peak intensity, and the difference between the groups is also smaller. The fitting coefficients of each analysis line are all improved to about 0.9.
[0033] Table 3, evaluation indicators of two elements in the calibration model based on the spectral peak integral area
[0034] It can also be seen from Table 3 that the indicators in the calibration model established by the spectral peak integral area are better than those in the model established by the spectral peak intensity. Among them, the average relative error (ARE) of Cr I 405.78 nm decreases to 18.386%, and the root mean square error (RMSE) of Pb I 357.87 nm decreases to 0.067%. This is because the spectral peak integral area reflects the spectral information of the entire peak region rather than a single height value or width value. In actual analysis, the composition of the sample matrix, environmental changes, plasma state, etc. may cause subtle changes in peak shape. In the low concentration range, the linear relationship between the half-height width and the concentration is not significant, and the peak intensity is very sensitive to the intensity value changes caused by the peak position changes. The spectral peak integral area can significantly suppress noise and pulse fluctuation errors by integrating the total number of photons covering the entire spectral line profile, providing more stable and more linear concentration response than peak intensity and half-height width. Even if the shape of the spectral line is not symmetrical due to pressure broadening, instrument resolution changes, or matrix effects, etc. causing peak asymmetry, peak shift, etc. it still provides more reliable analysis information. This is particularly important for complex matrix samples or scenes with slight fluctuations in experimental conditions. Combined with the distribution of sample points in the calibration model, it can be seen that the spectral peak integral area is still affected by the self-absorption effect, and the RSD of Cr I 425.44 nm and Pb I 405.78 nm is still high, indicating that the repeatability of the measurement is not very good, and there is still room for improvement.
[0035] (3) Explore the linear relationship between half-height width and element concentration: Take the element concentration in the sample as the horizontal coordinate and the half-height width of the characteristic spectral line of the element as the vertical coordinate to establish a calibration model. Please refer to the regression curve diagram of the calibration model based on half-height width as shown in Figure 5 , wherein Figure 5 (a) is the regression curve diagram of the calibration model of Cr element half-height width, Figure 5 (b) is the regression curve diagram of the calibration model of Pb element half-height width.
[0036] As can be seen from Figure 5 , there is a linear relationship between the element concentration and the half-height width, but it is not significant. In the regression model with half-height width as the vertical coordinate, the data points do not change significantly in the low concentration range, and the fitting effect is not good. The difference between the groups of data also leads to poor fitting effect.
[0037] Table 4, evaluation indicators of two elements in the calibration model based on half-height width
[0038] It can also be seen from the table that the quantitative analysis performance of the scaling model with half-width as the ordinate is not as good as the previous two. The root mean square error (RMSE) of Cr and Pb elements is relatively large, reflecting that the difference between multiple measurements is large, resulting in low precision, and the average relative error (ARE) is also unsatisfactory. This is mainly because the half-width of the spectrum line essentially reflects the spectral line shape characteristics, rather than the signal strength. Changes in concentration do not directly cause changes in spectral line broadening, but indirectly cause changes in plasma parameters such as electron density, temperature, and atomic density. This indirectness makes the broadening not only affected by the element concentration, but also affected by the instrument resolution and the physical state of the plasma temperature and pressure, so when directly related to the concentration, the linear relationship is poor, and the quantitative analysis accuracy is not high.
[0039] However, in some cases, the half-width can reflect the concentration change to some extent and has certain advantages compared to spectral line intensity and integral area. For example, when the concentration increases, the light emitted by the central region of the plasma is absorbed by the outer layer of low-temperature atoms, causing the center of the spectrum to be concave on both sides, and the spectral line intensity and integral area will be affected by the self-absorption effect. At this time, the ground state atomic density increases, the optical thickness increases, and the spectral information is transferred to both sides, showing an increase in broadening, and is positively correlated with the concentration (the higher the concentration, the stronger the self-absorption, and the wider the peak). For example, in the early plasma of laser-induced breakdown spectroscopy in a high-pressure environment, particle collisions intensify, causing pressure broadening, and the half-width increases with the local particle density (concentration). As can be seen, in some environments, the half-width can still be used as an important auxiliary parameter in multivariate quantitative analysis model to improve the model performance.
[0040] The scaling models introduced above are all linear fitting using single spectral line information. For example, if the half-width is directly used for single variable scaling, its applicable range in the low concentration interval is very limited, and it is usually only applicable to specific spectral lines such as hydrogen lines and alkali metal element lines, which have a clear and significant relationship between broadening effect and concentration, and require strict control of experimental conditions. When the element concentration in the sample is high, self-absorption occurs, causing the center intensity of the spectrum to decrease, and the linear effect of the spectral line intensity scaling model becomes poor. Considering the limitations of single spectral line information and simple linear model, the present application proposes using a nonlinear regression model SVR (Support Vector Regression) that can contain multiple spectral line information as a quantitative detection model.
[0041] Example 2: Soil heavy metal quantitative detection method based on LIBS spectral line multi-information fusion Please refer to the flowchart of the soil heavy metal quantitative detection method based on LIBS spectral line multi-information fusion as shown in Figure 6 As shown in Figure 6 The method comprises the following steps: S101, based on the LIBS spectrum of the soil sample with different concentration gradient, the characteristic spectral lines of Cr and Pb elements with similar response to the change of the respective element concentration are selected, and three spectral line information of each characteristic spectral line is extracted: spectral line intensity, spectral peak integral area and half width.
[0042] The characteristic spectral lines of the Cr element include Cr I 357.87nm, Cr I 425.44nm and Cr I 427.48nm, and the characteristic spectral lines of the Pb element include Pb I 363.96nm, Pb I 368.35nm and Pb I 405.78nm.
[0043] In addition, before selecting the multiple characteristic spectral lines with strong response to the change of the element concentration and the respective corresponding three spectral line information based on the LIBS spectrum, the method further comprises:
[0044] In specific implementation, the LIBS spectrum of the soil sample with different concentration gradient is obtained by the following method: Pb(NO3)2 and Cr(NO3)3·9H2O crystals are proportionally added to the standard soil GBW07403, and are thoroughly mixed in a mortar. Deionized water is used for stirring to make the sample more uniform. Subsequently, the sample is dried, ground and sieved to obtain a fine powder; 3g of the powder is placed in a mold and pressed under a pressure of 30MPa for 30 minutes to obtain a 30mm×2mm round cake-shaped sheet, thereby obtaining the soil sample with different concentration gradient.
[0045] In addition, before selecting the multiple characteristic spectral lines with strong response to the change of the element concentration and the respective corresponding three spectral line information based on the LIBS spectrum, the method further comprises: The method uses a decision filtering algorithm based on the median absolute deviation to reduce the abnormal extreme value of the LIBS spectrum, and the specific steps are as follows: Step 201, the LIBS spectrum data is intercepted by using a fixed length moving window to obtain the median value of each data point in the window.
[0046] Step 202, the absolute deviation of each data point in the window from the median value is calculated and sorted to obtain the median value of the absolute deviation.
[0047] Step 203, the median value of the absolute deviation is multiplied by a constant 1.4826 to obtain a scale estimate.
[0048] Step 204, the threshold parameter is multiplied by the scale estimate to obtain an absolute deviation threshold.
[0049] The size of the threshold parameter determines the degree of spectrum data interception.
[0050] Step 205, compare the absolute deviation of any data point in the window with the absolute deviation threshold.
[0051] Step 206, when the absolute deviation of the data point is less than the absolute deviation threshold, the data point is determined to be valid data and the original value is output.
[0052] Step 207, otherwise, the data point is determined to be singular data and is replaced by the median of each data point in the window.
[0053] Before reducing the abnormal extreme value of the LIBS spectrum by using the decision filtering algorithm based on the median absolute deviation, the method further comprises: For the LIBS spectrum, an asymmetric least squares algorithm is applied for baseline correction, and a wavelet transform is implemented for noise reduction processing, so that the random noise is effectively suppressed, and the mutation characteristics such as peaks and edges of the signal are well preserved.
[0054] S102, normalize each spectral line information to eliminate the dimensional difference between different spectral line information.
[0055] In this step, because the three spectral line information: spectral line intensity, spectral peak integral area, and half-width have large order of magnitude difference and different units, normalization processing is needed to eliminate the influence of the dimensional difference between different spectral line information.
[0056] S103, under each concentration gradient, fuse the normalized spectral line information of Cr and Pb elements respectively at the data level to obtain the original feature vector.
[0057] In this step, under each concentration gradient, the original feature vector of the Cr element is composed of three spectral line information corresponding to the characteristic spectral lines CrI 357.87nm, CrI 425.44nm, and CrI 427.48nm of the Cr element, with a total of 9 dimensions; the original feature vector of the Pb element is composed of three spectral line information corresponding to the characteristic spectral lines PbI 363.96nm, PbI 368.35nm, and PbI 405.78nm of the Pb element, also with a total of 9 dimensions.
[0058] S104, based on the original feature vectors of Cr and Pb elements under different concentration gradients, train a nonlinear regression model based on a radial kernel function, which is used for quantitative detection of soil heavy metal content.
[0059] In this step, the nonlinear regression model realizes performance optimization through a kernel function, and its deep information fusion mechanism is particularly crucial.
[0060] In a specific implementation, the nonlinear regression model based on the radial kernel function is trained in the following manner: In step 1031, for the Cr or Pb element, each original feature vector of the element is mapped to a high-dimensional feature space based on a set radial basis kernel function, to obtain corresponding support vectors, and different concentration gradients are used as labels of the support vectors.
[0061] In this step, a radial basis kernel function (RBF) is first set, and then the 9-dimensional original feature vector is mapped to a high-dimensional feature space using the kernel function. In the high-dimensional feature space, the originally complex relationship between the original feature vector and the element concentration becomes approximately linear, making it easy to solve.
[0062] In step 1032, based on the labels of the support vectors, the support vector regression algorithm is used to learn the interaction and complementary relationship between the spectral line information carried by each support vector, and a decision boundary is constructed to obtain a set of key support vectors and their corresponding coefficients.
[0063] In this step, in the high-dimensional feature space, the support vectors (corresponding to the original feature vectors) and the corresponding labels (corresponding to the concentration gradients) are used to find the decision boundary of the nonlinear regression model using the support vector regression algorithm. The "importance" of the nonlinear regression model to each original feature vector is reflected in the selection of each support vector and their respective corresponding coefficients, which can be explained as follows from a physical level: In the low concentration interval, the original feature vectors corresponding to the samples whose integral areas show good linear relationships are more likely to be selected as key support vectors by the model, thereby dominating the prediction of this interval. When the concentration increases to cause self-absorption effect, the original feature vectors corresponding to the samples whose full widths at half maximum show obvious broadening trends may become new key support vectors that define the regression boundary of the high concentration interval. In this way, the model dynamically and nonlinearly uses the broadening information of the full width at half maximum to compensate for the saturation effect of the intensity and area information. At the same time, the peak intensity, as a sensitive indicator of the instantaneous state of the plasma, is also contained in each support vector, providing a key auxiliary criterion for the model.
[0064] In step 1033, the key support vectors and their respective corresponding coefficients, and the selected radial basis kernel function are used to construct the nonlinear regression model.
[0065] In addition, the regularization parameter C=10 of the nonlinear regression model is relatively strong in punishing the training error, and can more accurately fit the training data. The insensitive loss function parameter ε=0.03 is relatively small, so that the model is more sensitive to error and has higher precision. The parameter γ=0.2 of the RBF kernel function can make the model use a relatively smooth decision boundary.
[0066] In addition, the content of heavy metals in the soil is quantitatively detected by the following method: Step 301, obtaining the LIBS spectrum of the soil to be measured, and extracting the spectral line information corresponding to Cr and Pb elements respectively, and then normalizing to obtain the characteristic vectors of Cr and Pb elements to be measured.
[0067] In this step, in the prediction stage, the characteristic vector to be measured is taken as the input of the trained nonlinear regression model, and the model will automatically output the concentrations of Cr and Pb elements.
[0068] Step 302, for Cr or Pb elements, the radial basis kernel function is used to calculate the similarity between the characteristic vector to be measured and each key support vector.
[0069] Step 303, based on the coefficients and similarities of the key support vectors, the respective corresponding weights are obtained.
[0070] Step 304, the weights of the key support vectors are weighted and summed with the labels, and then a bias term is added to obtain the quantitative detection result of Cr or Pb elements.
[0071] In the prediction stage of the traditional nonlinear regression model, the model compares a new sample point with all support vectors (key sample points in the training set). The prediction result is a weighted combination of the labels of these support vectors, and the weight is determined by the similarity calculated by the kernel function. For the present application, the characteristic vector to be measured is matched with the key support vectors (each original characteristic vector), and each key support vector itself contains the spectral line information corresponding to Cr and Pb elements. Therefore, the prediction is calculated based on the cooperative similarity of all spectral line information, rather than considering each spectral line information in isolation.
[0072] The method based on LIBS spectral line multi-information fusion proposed in the present application not only expands the linear range of quantitative analysis, but also significantly improves the prediction accuracy in the high concentration area, and enhances the robustness of the model to random noise, instrument drift and matrix interference.
[0073] Example Three, verification experiment: Please refer to the SVR model fitting curve diagram based on LIBS spectral line multi-information fusion as shown in Figure 7 .
[0074] Among them Figure 7(a) SVR model fitting curve graph for Cr element, Figure 5 (b) SVR model fitting curve graph for Pb element.
[0075] By Figure 7 It can be seen that compared with the previous three single spectrum line information calibration methods, the spectral peak intensity, integral area and half height width of three characteristic spectral lines of each element, a total of 9 kinds of spectral line information, are used as the input of the support vector regression model (SVR), the quantitative analysis effect is significantly improved, the fitting coefficient (R²) reaches more than 0.98, the effect is obviously better than the previous three models, and the shorter error bar also indicates that the standard deviation of the predicted concentration is smaller. Moreover, the root mean square error (RMSE) and the average relative error (ARE) are greatly reduced compared to before, and the accuracy is higher. This improvement is due to the complementary information achieved by fusing multiple types of information in the characteristic spectral line.
[0076] The application also uses the permutation feature importance method to evaluate the contribution degree of each spectral line information feature. This method performs multiple independent random permutations on the target feature while keeping other features unchanged, breaks the original relationship between the target feature and the target variable, calculates the degree of decline in model performance after permutation of the target feature, and quantifies the contribution of the feature to the prediction performance of the model. At the same time, the standard deviation is recorded to evaluate the stability of the results. This evaluation method can directly reflect the actual contribution of each spectral line information to the prediction ability of the model.
[0077] Please refer to the contribution degree visualization diagram of each spectral line information as shown in Figure 8 , wherein Figure 8 (a) is the contribution degree visualization diagram of each spectral line information of Cr element, Figure 8 (b) is the contribution degree visualization diagram of each spectral line information of Pb element.
[0078] By Figure 8 It can be seen that the contribution degree of each spectral line feature in the regression model. In the three characteristic spectral lines of Cr element, the contribution degree of spectral peak intensity and half height width is not much different but less than that of spectral peak area, and the contribution degree of half height width of Cr I 427.48 nm is slightly higher than that of spectral peak intensity. Among the three characteristic spectral lines of Pb element, the contribution degree of integral area and spectral line intensity is not much different and is greater than that of half height width, and the contribution degree of spectral line intensity of Pb I 363.96 nm is slightly higher than that of integral area. Overall, for most characteristic spectral lines, the contribution degree of integral area is the largest, the spectral line intensity is the second, and the half height width is the smallest.
[0079] In summary, the application analyzes the advantages and disadvantages of various spectral line information in quantitative analysis by comparing the change trend of element concentration with atomic line spectral line intensity, area and full width at half maximum, and combining theoretical knowledge analysis, and then combining SVR model to fuse and complement each spectral line information. The soil heavy metal quantitative detection method based on LIBS spectral line multi-information fusion of the application has the following beneficial effects: 1) In terms of data processing, the filtering algorithm based on median absolute deviation (MAD) effectively eliminates abnormal data caused by laser energy fluctuation and environmental interference, improving the modeling reliability; 2) The linear relationship between half width and element concentration is not significant, especially in the low concentration area. The linear fitting effect of the model established by the spectral line intensity is improved but not satisfactory. The fitting effect of the model established by the integral area is better than the previous two, and the indicators are also better. The root mean square error (RMSE) of Cr and Pb is reduced to 0.067-0.104wt%, and the average relative error (ARE) is reduced to 18.386-23.217%. This is mainly due to the fact that the integral area contains more spectral information and has stronger noise resistance. However, in the high concentration area, it is inevitable to be affected by the nonlinearity caused by self-absorption effect; 3) The three kinds of information of the characteristic spectral line are used as input to dynamically fuse the advantages of each spectral line information by using nonlinear regression model (SVR) model, further improving the quantitative analysis accuracy. The root mean square error (RMSE) of Cr and Pb elements is further optimized to 0.036wt% and 0.026wt%, the ARE is reduced to 8.624% and 5.733%, and the fitting coefficient (R²) is more than 0.98.
[0080] Therefore, this spectral line multi-information fusion method provides an effective solution for in-situ high-precision detection of heavy metals in complex soil by synergistic optimization of variable selection, nonlinear modeling and optimized data quality, which significantly improves the detection accuracy of Cr and Pb heavy metal elements in soil by laser-induced breakdown spectroscopy.
[0081] The above content is only a preferred embodiment of the application. For those skilled in the art, according to the technical content of the application, many changes can be made in the specific implementation manner and application range, as long as these changes do not deviate from the concept of the application, and all belong to the protection scope of the application.
Claims
1. A soil heavy metal quantitative detection method based on LIBS spectral line multi-information fusion, characterized in that, The method comprises: Based on the LIBS spectrum of the soil sample with different concentration gradients, the characteristic spectral lines of Cr and Pb elements with similar response to the change of the concentration of each element are selected, and three spectral line information of each characteristic spectral line is extracted, including spectral line intensity, spectral peak integral area and half width; Each spectral line information is normalized to eliminate the dimensional difference between different spectral line information; At each concentration gradient, the normalized spectral line information of Cr and Pb elements corresponding to each other is fused at the data level to obtain an original feature vector; Based on the original feature vectors of Cr and Pb elements at different concentration gradients, a nonlinear regression model based on a radial kernel function is trained for quantitative detection of the content of heavy metals in soil.
2. The method of claim 1, wherein, The characteristic spectral lines of Cr element include Cr I 357.87nm, Cr I 425.44nm and Cr I 427.48nm, and the characteristic spectral lines of Pb element include Pb I 363.96nm, Pb I 368.35nm and Pb I 405.78nm.
3. The method of claim 1, wherein, The response of each spectral line information to the change of the concentration of each element includes that in the low concentration range, the spectral line intensity and the spectral peak integral area have a strong linear relationship with the element concentration, and the linear relationship between the half width and the element concentration is not obvious; and as the concentration increases, the self-absorption effect is enhanced, the linear relationship between the spectral line intensity and the spectral peak integral area and the element concentration is weakened, and the linear relationship between the half width and the element concentration is strengthened.
4. The method of claim 1, wherein, Before selecting multiple characteristic spectral lines with strong response to the change of the element concentration and the corresponding three spectral line information based on the LIBS spectrum, the method further comprises: An outlier filtering algorithm based on median absolute deviation is used to reduce the abnormal extreme value of the LIBS spectrum, and the specific steps are as follows: A fixed-length moving window is used to intercept the LIBS spectrum data to obtain the median of each data point in the window; The absolute deviation of each data point in the window from the median is calculated and sorted to obtain the median of the absolute deviation; The median of the absolute deviation is multiplied by a constant 1.4826 to obtain a scale estimator; A threshold parameter is multiplied by the scale estimator to obtain an absolute deviation threshold; wherein the size of the threshold parameter determines the degree of spectrum data interception; The absolute deviation of any data point in the window is compared with the absolute deviation threshold; When the absolute deviation of the data point is less than the absolute deviation threshold, the data point is determined as valid data and the original value is outputted; Otherwise, the data point is determined as singular data and is replaced by the median of each data point in the window.
5. The method of claim 4, wherein, Before using the outlier filtering algorithm based on median absolute deviation to reduce the abnormal extreme value of the LIBS spectrum, the method further comprises: For the LIBS spectrum, an asymmetric least squares algorithm is applied for baseline correction, and then a wavelet transform is implemented for noise reduction processing, which effectively suppresses random noise while well preserving the mutation characteristics such as peaks and edges of the signal.
6. The method of claim 1, wherein, The LIBS spectrum of the soil sample with different concentration gradients is obtained by the following method: Pb(NO3)2, Cr(NO3)3·9H2O was mixed into the standard soil GBW07403 in proportion, mixed well in a mortar, and stirred with deionized water to make the sample more uniform. The sample was then dried, ground, and sieved to obtain a fine powder; 3g of the powder was placed in a mold and pressed at a pressure of 30MPa for 30 minutes to form a 30mm×2mm round cake, thereby obtaining soil samples with different concentration gradients.
7. The method of claim 1, wherein, The nonlinear regression model based on the radial kernel function was trained in the following way: For Cr or Pb elements, each original feature vector of the element was mapped to a high-dimensional feature space based on the set radial basis kernel function to obtain the corresponding support vector, and different concentration gradients were used as the labels of each support vector; Based on the labels of each support vector, the support vector regression algorithm was used to learn the interaction and complementary relationship between the spectral line information carried by each support vector, and a decision boundary was constructed to obtain a set of key support vectors and their corresponding coefficients; The key support vectors and their corresponding coefficients, as well as the selected radial basis kernel function, were used to construct a nonlinear regression model.
8. The method of claim 1, wherein, The soil heavy metal content was quantitatively detected in the following way: The LIBS spectrum of the soil to be tested was obtained, and the spectral line information corresponding to Cr and Pb elements was extracted and normalized to obtain the test feature vectors of Cr and Pb elements; For Cr or Pb elements, the similarity between the test feature vector of the element and each key support vector was calculated using the radial basis kernel function; Based on the coefficients and similarity of each key support vector, the corresponding weight was obtained; The weights and labels of each key support vector were weighted and summed, and a bias term was added to obtain the quantitative detection result of Cr or Pb elements.