Method for predicting element content in coal based on LIBS spectral feature optimization and machine learning

By combining the NIST database with various machine learning algorithms, the LIBS spectral characteristics were optimized, solving the problem of quantitative analysis of coal samples under complex matrix effects. This resulted in high-precision and robust elemental content prediction, making it suitable for the application of LIBS technology in industrial settings.

CN121997005APending Publication Date: 2026-05-08CHINA COAL TECH & ENG GRP SHANGHAI +1
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA COAL TECH & ENG GRP SHANGHAI
Filing Date
2026-04-10
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing technologies struggle to automatically and accurately extract characteristic wavelengths related to elemental content from the LIBS spectra of coal samples under complex matrix effects, resulting in large quantitative analysis errors, insufficient model generalization ability, and an inability to meet the real-time analysis needs of industrial sites.

Method used

By combining the NIST standard atomic spectrum database with various machine learning algorithms, feature wavelength selection and model optimization are performed, including wavelet transform, adaptive iterative reweighted penalized least squares method, Z-score standardization, cross-validation of multiple feature selection methods and multiple regression algorithms, to establish a high-precision prediction model with strong generalization ability.

Benefits of technology

By effectively eliminating irrelevant and redundant spectral information, the model's prediction accuracy and robustness are improved, making it suitable for cross-domain applications of different coal types and batches, and enabling efficient and accurate analysis of LIBS technology in industrial settings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121997005A_ABST
    Figure CN121997005A_ABST
Patent Text Reader

Abstract

The invention relates to a method for predicting the content of elements in coal based on LIBS spectral feature optimization and machine learning, which comprises the following steps of: converting a preprocessed spectrum into a two-dimensional spectral matrix, matching a peak wavelength point of the two-dimensional spectral matrix with an NIST standard atomic spectrum database, identifying spectral lines belonging to target elements, and determining the content of the elements in the target elements according to the spectral lines. A characteristic wavelength set stably appearing in all coal sample spectrums is screened out to serve as candidate characteristics; further screening out a core characteristic wavelength subset which is most relevant to the content of the target element and has the minimum redundancy by applying a plurality of characteristic selection methods; and then selecting an optimal model combination by adopting a plurality of machine learning regression algorithms. According to the method, through a two-stage screening strategy combining physical spectral line identification (NIST matching) and statistical learning feature selection, irrelevant and redundant spectral information is eliminated to the greatest extent, anti-interference core features directly related to the target element content are reserved, and the quality of model input data is improved from the source.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of spectral analysis chemometrics and machine learning applications, specifically to a method for predicting elemental content in coal based on LIBS spectral feature optimization and machine learning. Background Technology

[0002] my country's coal mines are widely distributed, and the types of coal are complex and varied, with significant differences in elemental composition and content between coals from different producing areas. This makes it difficult for many power plant boilers to consistently use the designed coal type, and an increasing number of thermal power plants need to use blended coal or frequently change coal types, seriously affecting the safe and stable operation of power plant boilers. Therefore, rapidly and accurately obtaining information on the content of multiple elements in coal is of great significance for the clean and efficient operation of industries such as coal-fired power generation and coal chemical industry. Currently, coal elemental analysis mainly relies on standard laboratory methods, such as X-ray fluorescence spectroscopy (XRF), atomic absorption spectroscopy (AAS), and inductively coupled plasma mass spectrometry (ICP-MS). Although these methods are highly accurate, they have inherent drawbacks such as complex sample preparation, long analysis cycles (several hours to several days), high costs, and the inability to achieve real-time on-site analysis, making it difficult to meet the real-time requirements of modern industry for process control and rapid screening of raw materials.

[0003] Laser-induced breakdown spectroscopy (LIBS) has become an ideal choice for industrial online detection due to its advantages of simple sample preparation, rapid detection, and in-situ and simultaneous full-element analysis. However, the differences in the physical properties (such as particle size, density, and surface morphology) and chemical composition (such as volatile matter, ash content, and fixed carbon content) of coal samples can significantly affect the coupling efficiency between the laser and the material, as well as the plasma formation and evolution process. This results in significant differences in the spectral signal intensity of the same element content in different coal samples, leading to quantitative analysis errors caused by strong matrix effects. Furthermore, while the LIBS full spectrum contains thousands of wavelength data points, only a handful of these wavelengths are truly relevant and stable to the content of specific target elements. The core challenge in establishing high-precision quantitative models lies in how to automatically and accurately extract the most relevant and robust set of characteristic wavelengths for each target element content from massive, high-dimensional spectral data. However, although some studies have attempted to use feature selection methods to optimize LIBS quantitative models, these methods are mostly based on standard samples with relatively simple composition or controllable matrix effects. They have failed to adequately address the severe challenges posed by the complex and variable sample matrix in actual coal production, resulting in significant performance degradation and insufficient generalization ability of the constructed models in industrial applications across batches and coal types.

[0004] In summary, there is an urgent need in this field for a data analysis method that can effectively address the complex matrix effects of actual coal samples. This method should be able to screen out characteristic wavelengths with strong correlation and high robustness from the LIBS spectra of real coal samples, and establish a high-precision, highly generalizable prediction model that matches them, thereby promoting the application of LIBS technology from the laboratory to industrial field. Summary of the Invention

[0005] In view of this, the present invention provides a method for predicting elemental content in coal based on LIBS spectral feature optimization and machine learning, thereby solving or at least alleviating one or more of the above-mentioned problems and other problems existing in the prior art.

[0006] To achieve the aforementioned objectives, the technical solution adopted by the present invention is as follows:

[0007] A method for predicting elemental content in coal based on LIBS spectral feature optimization and machine learning includes the following steps:

[0008] (1) Collect the raw LIBS spectrum of the coal sample to be tested, preprocess the raw spectrum to obtain the preprocessed spectrum, and convert the preprocessed spectrum into a two-dimensional spectral matrix;

[0009] (2) Match the peak wavelength points of the two-dimensional spectral matrix with the NIST standard atomic spectral database, extract the wavelength features of key elements, identify the spectral lines belonging to the target elements, and screen out the set of characteristic wavelengths that appear stably in all coal sample spectra as candidate features.

[0010] (3) Using the intensity data of the candidate feature wavelength set as the input variable (x) and the corresponding known target element concentration as the output variable (y), a variety of feature selection methods are applied to further screen out the core feature wavelength subset that is most relevant to the target element content and has the least redundancy;

[0011] (4) Multiple machine learning regression algorithms are used to train the target element content prediction model based on the selected core feature wavelength subsets, and the hyperparameters are optimized. The performance indicators of each model combination are compared, and the model combination with the best prediction accuracy and robustness is selected.

[0012] In the aforementioned method, optionally, in step (1), the coal sample to be tested is prepared by grinding and screening various different coal materials and then mixing them in different proportions to obtain multiple coal samples with different target element contents.

[0013] Furthermore, the coal is raw coal used for boiler combustion, and further includes raw coal from different origins, different coal types, and different batches.

[0014] Furthermore, the method includes creating a sample information table and a sample set for multiple configured coal samples.

[0015] Furthermore, the target element is an element in coal, and the method further includes obtaining a reference value for the content of the target element, which is obtained through chemical analysis methods and is used for model training and performance evaluation.

[0016] Furthermore, the raw LIBS spectrum is LIBS full-spectrum data.

[0017] In the aforementioned method, optionally, step (1) includes the following preprocessing steps:

[0018] The spectrum is denoised using a wavelet transform algorithm.

[0019] An adaptive iterative reweighted penalized least squares method is used to perform baseline correction on the denoised spectrum;

[0020] The baseline-corrected spectrum is Z-score normalized so that each feature dimension follows a standard normal distribution with a mean of 0 and a standard deviation of 1.

[0021] Furthermore, the optimal parameters in the wavelet transform algorithm are selected as follows: the number of decomposition layers is 1, and the basis function is Db5.

[0022] Optionally, in step (3) of the aforementioned method, the feature selection method includes L1 regularization algorithm (Lasso), continuous projection algorithm (SPA), or minimum redundancy maximum correlation (mRMR) algorithm.

[0023] It should be understood that in step (4), any modeling method capable of learning and predicting the content of target elements in coal based on the input spectral line intensity can be applied to this invention, such as, but not limited to: artificial neural network (ANN), support vector machine (SVM) regression, random forest (RF), gradient boosting decision tree (GBDT), partial least squares regression (PLSR), Gaussian process regression (GPR), and other machine learning or statistical learning models. The core of these models lies in establishing a mapping relationship or functional approximation between the input variable (LIBS spectral line intensity) and the target variable (content of target elements in coal).

[0024] Furthermore, cross-validation is used to optimize hyperparameters, and each model optimizes and selects the optimal parameters for each feature selection method.

[0025] Furthermore, model performance is evaluated using at least one of the following metrics: (R²), root mean square error of cross-validation (RMSECV), root mean square error of prediction (RMSEP), or mean absolute error (MAE).

[0026] Optionally, in the aforementioned method, the method further includes dividing the coal sample into a training set and a test set according to the concentration gradient of the target element before using a machine learning regression algorithm to train the model.

[0027] Optionally, in the aforementioned method, the method further includes extracting the intensity information of the core feature wavelength subset corresponding to the optimal model from the LIBS spectrum of the sample to be tested with unknown target element concentration, and inputting it into the trained optimal model to output the predicted value of its target element content.

[0028] Due to the application of the above technical solution, the present invention has the following advantages compared with the prior art:

[0029] 1. Compared with the quantitative analysis of standard samples with relatively simple composition or controllable matrix effects, this invention uses a two-level screening strategy that combines "physical spectral line identification (NIST matching)" and "statistical learning feature selection" to eliminate irrelevant and redundant spectral information to the greatest extent, while retaining the core features that are directly related to the content of the target element and are resistant to interference, thereby improving the quality of the model input data from the source.

[0030] 2. This invention innovatively finds the most suitable combination of algorithms for predicting the content of target elements in coal by cross-comparison and optimization of multiple feature selection methods and multiple machine learning algorithms (such as the optimal model combination for predicting sodium content is mRMR-KELM). Its prediction accuracy and robustness are far higher than those of traditional univariate models or single multivariate correction models.

[0031] 3. This invention can effectively address the complex matrix effects of actual coal samples, and improves the cross-domain applicability of the model across different coal types and batches.

[0032] 4. The method proposed in this invention does not depend on specific detection hardware or software platforms. It is a general data analysis framework that can be widely applied to the model development of LIBS technology in the quantitative analysis of elements in other types of solid and liquid samples. Attached Figure Description

[0033] The disclosure of this invention will become more apparent from the accompanying drawings. It should be understood that these drawings are for illustrative purposes only and are not intended to limit the scope of protection of this invention.

[0034] Figure 1 This is a flowchart illustrating the method for predicting elemental content in coal based on LIBS spectral feature optimization and machine learning, as provided in an embodiment of the present invention.

[0035] Figure 2 A schematic diagram of the LIBS experimental setup.

[0036] Figure 3This is a diagram showing the parameter optimization of the wavelet transform denoising algorithm.

[0037] Figure 4 The images show the original LIBS spectrum and the results of spectral preprocessing. (a) and (b) are the original spectrum (different bands) and background radiance intensity images, respectively; (c) and (d) are the preprocessed spectrum (different bands).

[0038] Figure 5 This is a graph showing the optimization of principal components in a partial least squares regression model.

[0039] Figure 6 This is a graph showing the hyperparameter optimization of a support vector machine regression model.

[0040] Figure 7 The structure diagram of the kernel-based extreme learning machine model.

[0041] Figure 8(a) shows the relationship between the maximum tree depth and the model performance.

[0042] Figure 8(b) shows the relationship between the minimum number of samples required for splitting and the model performance.

[0043] Figure 9 This is a performance graph of the prediction model, where, Figure 9 (a) in the figure represents the SPA-PLSR model; Figure 9 (b) in the figure represents the mRMR-SVR model; Figure 9 (c) in the figure represents the mRMR-RF model; Figure 9 (d) in the model is the mRMR-KELM model.

[0044] In the picture:

[0045] 1. Signal delay generator; 2. Spectrometer; 3. Computer; 4. Laser; 5. Collimator; 6. High-reflection mirror; 7. Focusing lens; 8. Sample stage. Detailed Implementation

[0046] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. Obviously, the described embodiments are only some, not all, of the embodiments described in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without creative effort are within the scope of protection of this application.

[0047] Figure 1 A flowchart illustrating a method for predicting elemental content in coal based on LIBS spectral feature optimization and machine learning, according to an embodiment of the present invention, is shown.

[0048] like Figure 1 As shown, the method for predicting elemental content in coal based on LIBS spectral feature optimization and machine learning provided in this embodiment of the invention includes the following steps:

[0049] S1. Obtain the full LIBS spectrum of the sample and the corresponding reference values ​​of the target element content. The reference values ​​can be obtained by chemical analysis and are used for model training and performance evaluation.

[0050] In this example, the target element is sodium in coal. ICP-OES offline technology was used to detect its sodium content for model training and performance evaluation. Various types of coal samples were selected, including Zhundong coal, Indonesian lignite, Mongolian blended coal, weakly caking coal, high-sulfur coal, thermal coal, high-heat Shenmu coal, long-flame coal, and high-sulfur economic coal, to prepare coal samples with different blending ratios. This example designed to blend different raw coals in different proportions, obtaining a sample set of 52 blended coal samples with different sodium contents. The target element content in the specific blended coal samples is shown in Table 1. To avoid interference factors such as matrix effects caused by uneven blending, each type of raw coal should be ground and sieved to the same particle size before blending. For samples provided for LIBS experiments, the blended coal samples were pressed at 374 MPa for 90 seconds to obtain coal cake samples with a diameter of 20 mm and a thickness of 3 mm.

[0051] Table 1. Content of target elements in blended coal samples

[0052]

[0053] S2. The raw spectra of the sample set were acquired using a LIBS measurement device.

[0054] In this example, a highly compact cage-type LIBS system was used to measure the spectrum. This system consists of a 532 nm pulsed laser, a spectrometer, a signal delay generator, and an optical module. The optimized system parameters are: laser energy 48 mJ / pulse, pulse frequency 10 Hz, spectral delay time 1.4 μs, integration time 4 ms, and focusing depth 2 mm. 1200 spectra were acquired for each sample at different locations, and the LIBS spectrum of that sample was represented by the average intensity of the 1200 spectra for quantitative analysis. The LIBS system setup is as follows: Figure 2 As shown.

[0055] Depend on Figure 2As can be seen, the signal delay generator 1 is connected to the laser 4 and the spectrometer 2 respectively. The optical module includes multiple focusing lenses 7, collimators 5 and high-reflectivity mirrors 6. The LIBS system also includes a computer 3 and a sample stage 8. The collimators 5 and the computer 3 are connected to the spectrometer 2 respectively. A focusing lens 7 is set between the collimator 5 and the sample stage 8. The high-reflectivity mirror 6 is set on the laser path emitted by the laser 4 and reflects the laser onto the sample on the sample stage 8. A focusing lens 7 is also set between the high-reflectivity mirror 6 and the sample stage 8.

[0056] S3. Preprocess the original spectrum to obtain the preprocessed spectrum, such as... Figure 4 As shown.

[0057] In this example, to suppress high-frequency noise and background interference in the original spectral signal, a wavelet transform algorithm is first used to denoise the spectrum. Specifically, this process involves multi-resolution decomposition of the one-dimensional spectral signal under a specific wavelet basis to obtain approximation coefficients and detail coefficients at different scales. By thresholding these coefficients and then performing wavelet reconstruction, effective separation of signal and noise can be achieved. In this embodiment, after optimization testing, Db5 was selected as the wavelet basis function, and a single-level decomposition was used, achieving the best balance between signal-to-noise ratio and computational efficiency.

[0058] For wavelet transform (WT) denoising, three important parameters need to be set appropriately to obtain optimal results: decomposition layer, basis functions, and threshold. The decomposition layer affects both denoising effectiveness and computational complexity. Too many decomposition layers may lead to loss of signal details; too few may fail to effectively remove noise. Different basis functions have different properties, such as tight support, symmetry, and vanishing moments. Thresholds can be categorized as hard thresholds, soft thresholds, and semi-soft thresholds. Hard thresholds retain coefficients greater than the threshold without modification, soft thresholds shrink coefficients greater than the threshold, and semi-soft thresholds fall between soft and hard thresholds. This study compared basis functions and decomposition layers with different threshold sizes and found that for each type of basis function and decomposition layer, the best semi-soft threshold is zero, indicating that hard thresholds are more beneficial for LIBS spectral denoising in this study. Therefore, a hard threshold for DWT was chosen, and the basis functions and decomposition layers were optimized. The optimal parameters were determined using the signal-to-noise ratio (SNR) and root mean square error (RMSE), as shown in the following formulas.

[0059] (1)

[0060] (2)

[0061] In the above two formulas, i represents the index of the i-th data point in the spectral data, corresponding to the wavelength position; This is the original LIBS spectral intensity value at wavelength point i. It is the LIBS spectral intensity value at wavelength point i after noise reduction processing using the wavelet transform algorithm.

[0062] like Figure 3 The diagram shows the DWT parameter selection. The number of decomposition layers is selected from 1 to 10, and the basis functions include Db4, Db5, Db6, Db7, Db8, sym4, sym5, sym6, sym7, and sym8. As the number of decomposition layers increases, the SNR gradually decreases, the RMSE gradually increases, and then gradually stabilizes. Among the results for different basis functions, Db5 has the highest SNR and the lowest RMSE. Therefore, this study selects a decomposition layer of 1 and basis function Db5 as the optimal DWT denoising parameters.

[0063] In this example, the spectrum after noise reduction still exhibits baseline drift caused by continuous background radiation. To eliminate the influence of this matrix effect, an adaptive iterative reweighted penalized least squares (airPLS) method is employed for baseline correction. This algorithm iteratively fits the baseline profile of the spectrum and subtracts this fitted baseline from the original spectrum, thereby obtaining spectral data with a flat baseline and significant characteristic peaks, ensuring the authenticity of the correlation between spectral intensity and elemental concentration. The core parameters that need to be optimized in the airPLS algorithm include: smoothing parameter lambda, penalty term difference order order, edge protection ratio wep, peak region weight attenuation factor p, and maximum number of iterations itermax. In the implementation of this method, after cross-validation and minimizing the mean square error, the optimal parameter settings are determined as follows: smoothing parameter lambda = 7, penalty term difference order order = 2, and maximum number of iterations itermax = 50. For the edge protection ratio (WEP) and the peak region weight decay factor (P), this method adopts a fixed strategy of the algorithm, that is, edge protection is achieved by setting the weights of the first and last points of the data sequence to the weights corresponding to the largest negative residual in the current iteration; while the update of the peak region weight is directly driven by the iteration progress, and its decay effect is achieved by the role of the iteration number i in the exponential term, and it is not opened as an independent adjustable parameter.

[0064] In this example, Z-score standardization is used. For each feature dimension (each wavelength point), its intensity value is subtracted from the mean of that feature across all samples, and then divided by its standard deviation. This ensures that all feature dimensions of the preprocessed data follow a standard normal distribution with a mean of 0 and a standard deviation of 1, effectively improving the convergence speed and prediction accuracy of the subsequent machine learning regression model. The principle is illustrated by the following formula:

[0065] (3)

[0066] (4)

[0067] (5)

[0068] Of the three formulas above, σ is the Z-score normalized spectral intensity; x is the original intensity; μ is the average of the original intensity; σ is the standard deviation of the original intensity.

[0069] Figure 4 The images show the raw LIBS spectrum and the results of spectral preprocessing. Figure 4 (a) shows the original spectrum (black curve) and background radiance (gray background) of the 175.6-522.1 nm band before baseline correction. Figure 4 (b) shows the original spectrum (black curve) and background radiance (gray background) of the band 542.7-900.6 nm before baseline correction; Figure 4 (c) in the image shows the spectrum of the 175.6-522.1 nm band after spectral preprocessing. Figure 4 In the image, (d) represents the spectrum in the 542.7-900.6 nm band after spectral preprocessing. From... Figure 4 (c) and Figure 4 As shown in (d), after preprocessing, the characteristic emission lines clearly stand out from the strong background interference, their peak shapes are restored, and the signal-to-noise ratio is significantly improved. This greatly reduces the interference of background fluctuations on weak peak identification, laying a reliable data foundation for subsequent accurate qualitative and quantitative elemental identification and analysis.

[0070] S4. The preprocessed spectrum is converted into a two-dimensional spectral matrix. A custom Python peak-finding algorithm is used to match the peak wavelengths of the two-dimensional spectral matrix with the NIST database to extract the wavelength features of key elements. A preliminary screening is conducted to identify 62 candidate characteristic wavelengths that appear stably in all 52 coal samples. This set covers the characteristic spectral lines of multiple elements such as Na, K, Ca, and Mg.

[0071] The intensity data of the candidate feature wavelength set is used as the input variable (x), and the corresponding known target element concentration (such as the Na element concentration in this example) is used as the output variable (y). Multiple feature selection methods are applied to further filter out the core feature wavelength subset that is most relevant to the target element content and has the least redundancy.

[0072] In this step, a custom Python peak-finding algorithm is used to match the NIST database for key wavelength feature extraction. The specific steps are as follows: After preprocessing the spectrum, peak-finding is performed. During peak-finding, the baseline-removed spectral intensity threshold is set to 1000. The peak center wavelength is compared with the atomic spectral wavelength of the National Institute of Standards and Technology (NIST) and matched with the actual elements to avoid wavelength drift caused by the resolution limitations of the spectrometer. Finally, 62 candidate characteristic peaks are obtained from 3232 wavelength data.

[0073] In this example, to further eliminate redundant information and select the most predictive core feature subset from the aforementioned candidate features, this study implemented a multi-method comparison optimization strategy. Specifically, using the NIST matching results as a baseline, three additional feature selection methods with different mathematical principles were selected for comparative analysis: the L1 regularization (Lasso) algorithm, which aims to generate sparse solutions for automatic feature selection; the continuous projection algorithm (SPA), which focuses on minimizing collinearity among variables; and the minimum redundancy maximum correlation (mRMR) algorithm, which pursues maximum relevance and minimum redundancy based on information theory. By comparing the feature subsets selected by each method and the predictive performance of their subsequent models, the optimal feature wavelength combination (i.e., the core feature wavelength subset) and its quantity n were finally determined.

[0074] S5. Divide the 52 samples into a training set (39 samples) and a test set (13 samples) according to the concentration gradient. Use a variety of machine learning regression algorithms to train the model based on the core feature subsets selected by different feature selection methods.

[0075] In this example, four regression algorithms—Partial Least Squares Regression (PLSR), Support Vector Machine Regression (SVR), Random Forest (RF), and Kernel Extreme Learning Machine (KELM)—are used for model training. Five-fold cross-validation is employed to optimize hyperparameters and ensure model robustness. For each of the four models, optimal parameters are optimized and selected for each feature selection method. Therefore, this implementation mainly presents the hyperparameter optimization process for the four models, as shown in the following steps:

[0076] (1) Partial Least Squares Regression (PLSR)

[0077] PLSR is a component variable regression method that combines principal component analysis and correlation analysis. It extracts principal components through projection and maximizes the correlation between the independent and dependent principal components. Its key advantage lies in its ability to effectively handle high-dimensional, multicollinear data, correcting for matrix effects while reducing dimensionality and extracting the spectral variation information most relevant to the analyte. Compared to ordinary multiple linear regression, PLSR not only solves the problem of non-invertible high-dimensional data matrices but also typically exhibits higher predictive accuracy and robustness due to its integration of information from both independent and dependent variables. Therefore, it has become a benchmark method for validating the performance of other models in LIBS quantitative analysis. In model training, cross-validation is usually used to determine the optimal number of latent variables to balance model complexity and predictive performance. Figure 5 The process of selecting the optimal number of principal components during PLSR cross-validation is visually demonstrated.

[0078] (2) Support Vector Machine Regression (SVR)

[0079] SVR (Support Vector Machine) is a regression method based on support vector machines. Its core idea is to map the original high-dimensional, nonlinear spectral data to a higher-dimensional feature space through a kernel function, thereby constructing an optimal regression hyperplane. Its goal is not to achieve an absolute fit to all data points, but rather to allow for a tolerance range of error in exchange for the model's generalization ability. This mechanism makes SVR particularly suitable for the nonlinear relationship between elemental concentration and spectral line intensity, which is common in LIBS analysis due to complex matrix effects. Simultaneously, it possesses natural robustness to data noise and outliers. It is precisely this powerful ability to cleverly solve nonlinear problems in a high-dimensional feature space that makes SVR a key candidate model for validating the performance boundaries of linear models and exploring the potential to improve the prediction accuracy of quantitative models in complex systems. This paper selects a linear kernel and radial basis functions as kernel functions; the linear kernel is used only for Lasso feature selection to ensure the model can handle both linear and nonlinear data. Through grid search, the penalty parameter (C), tolerance range ε ​​(Epsilon), and kernel function parameter γ (Gamma) are optimized to find the optimal parameter combination. Figure 6 This visually demonstrates the process of selecting the optimal hyperparameters during the SVR grid search when the kernel function parameters use their default values. The C and Epsilon values ​​corresponding to the trough values ​​are the optimal hyperparameters.

[0080] (3) Nuclear Extreme Learning Machine (KELM)

[0081] KELM is a kernelized upgrade of the traditional Extreme Learning Machine (ELM). Its core principle lies in randomly initializing the weights of a single hidden layer neural network, resolving the output layer weights with only a single generalized inverse operation, and introducing a kernel function to map them to a high-dimensional feature space to address nonlinear issues. This mechanism makes KELM extremely fast to train, making it particularly suitable for online detection scenarios requiring extensive parameter tuning or rapid response. Furthermore, the introduction of the kernel function ensures performance in handling the nonlinear relationships caused by complex matrix effects in LIBS analysis. Figure 7 This study visually demonstrates the model mechanism of KELM. In this study, the radial basis function was chosen as the kernel function, and the regularization coefficient C and the kernel function parameter Gamma were optimized to obtain the optimal model. The optimization process is similar to that of support vector machine regression.

[0082] (4) Random Forest Regression (RF)

[0083] RF (Regressive Randomization) integrates the prediction results of multiple decision trees and introduces two stochastic mechanisms—Bootstrap sampling and random feature selection—to suppress overfitting. The advantages of this method lie in its good interpretability, low requirement for feature preprocessing, and ability to automatically identify nonlinear relationships between variables without relying on explicit kernel function transformations. The main parameters that need to be optimized in RF are the number of decision trees (n_estimators), the maximum tree depth (max_depth), and the minimum number of samples required for splitting (min_samples_split). Preliminary experiments have determined the search ranges for each parameter as follows: n_estimators within the range (1, 300, 10), max_depth within the range (2, 7, 1), and min_samples_split within the range (2, 6, 1). Figures 8(a) and 8(b) illustrate the optimization process of the RF model hyperparameters after NIST matching and feature selection. As shown in Figures 8(a) and 8(b), the mean squared error (MSE) of the model initially decreases rapidly and then stabilizes as the number of decision trees (n_estimators) increases. When the number of n_estimators reaches a certain level (e.g., ≥100), the model performance tends to saturate, indicating that there is no need to further increase the number of trees. Figure 8(a) shows the impact of the maximum tree depth on model performance. It also shows that when the maximum tree depth (max_depth) is 3~7, the MSE decreases significantly and gradually converges. When the max_depth is 5, 6, or 7, the MSE is almost identical and the performance is optimal. Further increasing the tree depth can easily lead to overfitting. Figure 8(b) shows the impact of the minimum number of samples required for splitting (min_samples_split) on model performance. It also shows that when this parameter is 3, the MSE is minimized, and the model performance and robustness are optimal. In summary, this study determined the optimal hyperparameter combination for the NIST-RF model to be: n_estimators = 200, max_depth = 6, and min_samples_split = 3. A similar strategy was used for hyperparameter optimization of other models.

[0084] S6. Model Performance Evaluation and Optimal Model Selection. The predictive performance of each model is evaluated by calculating its coefficient of determination (R²) and root mean square error of prediction (RMSEP) on the test set. Please refer to the performance graphs. Figure 9 As shown in Table 2, the optimal number of features for different feature selections and the evaluation results of their models are presented.

[0085] Table 2. Performance Comparison of Models Combining Different Feature Selection Methods with Machine Learning Algorithms

[0086]

[0087] The results show that the prediction performance of most models is significantly improved after adopting the feature selection method. In particular, the SVR model achieves the best prediction performance with 40 features, and its RMSEP on the test set is 0.0753. The RMSEP reached 0.9926, demonstrating extremely high prediction accuracy and generalization ability. Meanwhile, the SVR model also performed excellently with 18 features (RMSEP = 0.0840). =0.9907), and has a lower feature dimension, resulting in a simpler model. The KELM model maintains good performance across different feature numbers, especially achieving RMSEP of 0.1395 with 7 features. The SVR model achieves an excellent score of 0.9744. However, training the SVR model is relatively time-consuming, and it only reaches its theoretical performance limit when features are perfectly fitted. In contrast, the KELM model trains quickly, maintains high performance across all feature wavelengths, and is relatively more stable.

[0088] Taking into account prediction accuracy, model complexity, and generalization ability, this embodiment ultimately selected the mRMR-KELM model with 26 features as the optimal model for quantitative analysis of the target element content in coal in this implementation case.

[0089] The above embodiments are only used to illustrate the embodiments of the present invention, and are not intended to limit the embodiments of the present invention. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the embodiments of the present invention. Therefore, all equivalent technical solutions also fall within the scope of the embodiments of the present invention, and the patent protection scope of the embodiments of the present invention should be defined by the claims.

Claims

1. A method for predicting elemental content in coal based on LIBS spectral feature optimization and machine learning, characterized in that, The method includes the following steps: The raw LIBS spectrum of the coal sample to be tested is collected, the raw spectrum is preprocessed to obtain the preprocessed spectrum, and the preprocessed spectrum is converted into a two-dimensional spectral matrix. The peak wavelength points of the two-dimensional spectral matrix are matched with the NIST standard atomic spectral database to extract the wavelength features of key elements, identify the spectral lines belonging to the target elements, and screen out the set of characteristic wavelengths that appear stably in the spectra of all coal samples as candidate features. Using the intensity data of the candidate feature wavelength set as input variables and the corresponding known target element concentration as output variables, multiple feature selection methods are applied to further filter out the core feature wavelength subset that is most relevant to the target element content and has the least redundancy. Multiple machine learning regression algorithms were used to train on the selected subsets of core feature wavelengths to establish a target element content prediction model and optimize the hyperparameters. The performance indicators of each model combination were compared, and the model combination with the best prediction accuracy and robustness was selected.

2. The method according to claim 1, characterized in that, The target element is an element found in coal. The method further includes obtaining a reference value for the content of the target element, which is obtained through chemical analysis methods and is used for model training and performance evaluation; and / or, The coal samples to be tested are prepared by grinding and sieving various different coal materials and then mixing them in different proportions to obtain multiple coal samples with different target element contents.

3. The method according to claim 1, characterized in that, The preprocessing includes the following steps: The spectrum is denoised using a wavelet transform algorithm. An adaptive iterative reweighted penalized least squares method is used to perform baseline correction on the denoised spectrum; The baseline-corrected spectrum is Z-score normalized so that each feature dimension follows a standard normal distribution with a mean of 0 and a standard deviation of 1.

4. The method according to claim 3, characterized in that, The optimal parameters for the wavelet transform algorithm are as follows: the number of decomposition layers is 1, and the basis function is Db5.

5. The method according to claim 1, characterized in that, The feature selection methods include L1 regularization algorithm, continuous projection algorithm, or minimum redundancy maximum correlation algorithm.

6. The method according to claim 5, characterized in that, The machine learning regression algorithms include artificial neural networks, support vector machine regression, random forest, gradient boosting decision tree, partial least squares regression, or Gaussian process regression.

7. The method according to claim 6, characterized in that, Cross-validation is used to optimize hyperparameters, and each model optimizes and selects the optimal parameters for each feature selection method.

8. The method according to claim 7, characterized in that, The model performance is evaluated using at least one of the following metrics: coefficient of determination, root mean square error of cross-validation, root mean square error of prediction, or mean absolute error.

9. The method according to claim 1, characterized in that, The method further includes dividing the coal samples into training and test sets according to the concentration gradient of the target element before using a machine learning regression algorithm to train the model.

10. The method according to claim 1, characterized in that, The method also includes extracting the intensity information of the core feature wavelength subset corresponding to the optimal model from the LIBS spectrum of the sample to be tested with unknown target element concentration, and inputting it into the trained optimal model to output the predicted value of its target element content.

Citation Information

Patent Citations

  • Method for improving precision of LIBS (laser-induced breakdown spectroscopy) detection of content of calcium element in drilling carbonate rock

    CN117609872A

  • Multi-element LIBS (laser-induced breakdown spectroscopy)-based hearth alkali metal release prediction model construction method

    CN121260303A

  • SERS (Surface Enhanced Raman Scattering) spectrum quantitative detection method and system based on interpretable stacked ensemble learning

    CN121838947A

  • LIBS-based bauxite component quantitative detection method and related apparatus

    WO2025241437A1

  • Online detection method for bauxite component, and related device

    WO2025241438A1