Shuaijun
Li
ab,
Xiaojian
Hao
*ab,
Biming
Mo
ab,
Junjie
Chen
ab,
Hongkai
Wei
ab,
Junjie
Ma
ab,
Xiaodong
Liang
ab and
Heng
Zhang
c
aScience and Technology on Electronic Test and Measurement Laboratory, North University of China, Taiyuan, Shanxi, China. E-mail: haoxiaojian@nuc.edu.cn
bState Key Laboratory of Dynamic Measurement Technology, North University of China, Taiyuan, Shanxi, China
cJincheng Research Institute of Opto-Mechatronicsl Industry, Jincheng, Shanxi, China
First published on 4th December 2024
As one of the main energy sources in human production and life, the accurate and rapid classification of coal is of great significance to industrial production and the control of pollution emissions. However, the complex composition and highly similar elemental composition of coal with different physical properties and chemical composition lead to a high degree of similarity in coal spectral data measured by laser-induced breakdown spectroscopy (LIBS), which poses a great challenge to accurate classification and identification work. In this paper, based on LIBS technology, we integrate the chi-square test (CST) and principal component analysis (PCA) to construct a quadratic dimensionality reduction network (CST-PCA), and for the first time, we propose a new improved sparrow search algorithm (ISSA) by introducing spatial pyramid matching (SPM) chaotic mapping, adaptive inertia weights (w) and Gaussian mutation, and combine it with kernel based extreme learning machine (KELM) to construct an ISSA-KELM data classification model to classify and identify seven types of coal samples. Firstly, 2520 12248-dimensional coal spectral data were preprocessed using a combination of the chi-square test (CST) and principal component analysis (PCA). The KELM was hyper-parameter optimised using ISSA. By comparing with the unoptimized model, the accuracy of coal classification reaches 99.773%. The experimental results show that the CST-PCA-based ISSA-KELM algorithm effectively optimizes the parameters, improves the classification accuracy of coal, and provides a new data processing scheme for accurate qualitative analysis of coal.
Laser-induced breakdown spectroscopy (LIBS) is a widely utilized multi-element analytical technique that employs high-energy laser-induced plasma to generate emission spectra, enabling the determination of a sample's elemental composition and content.2–7 LIBS is widely used in the field of geological,8,9 alloy,10 nuclear material,11 food,12,13 explosives,14 and other material testing and analysis.
Recently, advancements in LIBS technology and intelligent optimization algorithms have enabled researchers to apply it alongside multivariate statistical methods in substance analysis. Xinmeng Luo et al.15 used the optimized back-propagation (BP) neural network model of the sparrow search algorithm (SSA) to achieve the rapid detection of Cd, Cu, and Pb in Fritillaria thunbergii, which provided a basis for the application of LIBS technology to the quantitative analysis of heavy metal content in traditional Chinese medicine. Haorong Guo et al.16 used LIBS in combination with four machine learning models: support vector machines (SVM), particle swarm optimization for support vector machines (SVM-PSO), least squares support vector machine (LSSVM) and particle swarm optimization for least squares support vector machine (LSSVM-PSO), which were successfully applied to classify six alloys and can be effectively used as a real-time, nondestructive, and multi-element on-line analytical method for aerospace alloys classification. Tianbing Chen et al.17 used particle swarm optimization-support vector machine (PSO-SVM) to achieve quantitative prediction of heavy metals in pork. Jing Liang et al.18 used particle swarm optimization algorithm (PSO) optimised kernel extremum learning machine (KELM) on 15 samples of Salvia miltiorrhiza to achieve better classification results. Yarui Wang et al.19 applied high repetition rate laser-ablation spark-induced breakdown spectroscopy (HRR LA-SIBS) with particle swarm optimization algorithm (PSO) optimization-extreme learning machine (ELM) model to achieve high-precision quantitative elemental analysis of aluminum alloys.
In this study, LIBS was used to classify different coal samples. Due to the complexity of the elemental composition of the coal samples and the sophistication of the spectrometer, the obtained spectra often show many intensity lines. Therefore, extracting meaningful information from raw multidimensional spectral data and downscaling it is a challenging task. To address this problem, this study employs feature selection and dimensionality reduction techniques to eliminate irrelevant and redundant features from spectral data, aiming to reduce computational costs and improve learning performance.
Regarding the application of feature selection methods in LIBS, Chunhua Yan et al.20 proposed a hybrid feature selection method based on the Wootton, Sergeant, Phan-Tan-Luu's algorithm-unsupervised variable reduction-particle swarm optimization (V-WSP-PSO) to reject irrelevant and redundant features and verified the effectiveness of the method using LIBS spectral data from different coal samples. Xiangjun Xu et al.21 adopted a method combining spectral preprocessing and feature selection to improve the robustness of the SVM classification model and proved the feasibility of the proposed plastic classification and recycling method. Peng Lu et al.22 proposed a hybrid feature selection method combined with wavelet transform (WT) to analyze the heat value of coal by laser induced breakdown spectroscopy (LIBS), which can effectively reduce the calculation time and improve the performance of the model. Tong Chen et al.23 proposed a weakly supervised feature selection method based on raw spectral data – the spectral distance variable selection method to improve the prediction accuracy of iron content in slurries. On the other hand, the purpose of dimensionality reduction is to map the original data from a high-dimensional space to a low-dimensional component subspace. Hui Lu et al.24 used partial least squares (PLS) and principal component analysis (PCA) to perform dimensionality reduction and variable screening on electrolyte spectral data, which provided a temporary new method for the testing of the molecular ratios of electrolytes. Hongda Li et al.25 used the UMAP data dimensionality reduction algorithm and support vector machine classification algorithm to classify hyperspectral remote sensing images, which improved the accuracy of recognition and classification. P. N. Senthil Prakash et al.26 proposed a hybrid local fisher discriminant analysis (HLFDA) method for dimensionality reduction of the medical data, which improves the prediction accuracy. Jing Liu et al.27 proposed a kernel-supervised machine learning spectral downscaling framework based on the Mahalanobis distance in hyperspectral imaging remote sensing with good performance in spectral dimensionality reduction.
Intelligent optimisation algorithms, feature selection methods and dimensionality reduction methods show significant advantages in LIBS substance analysis, and this study proposes an ISSA-KELM classification model based on CST-PCA quadratic dimensionality reduction network. Firstly, the elemental spectral data of the coal samples were obtained by ablating the surface of the coal sample preparation by the LIBS system, and the data were subjected to feature selection and dimensionality reduction by using the chi-square test (CST) and principal component analysis (PCA). Subsequently, an improved sparrow search algorithm (ISSA) was proposed by introducing spatial pyramid matching (SPM) chaotic mapping, adaptive inertia weights w and Gaussian mutation. The parameters of the Kernel Extreme Learning Machine (KELM) are also optimised by ISSA and 5-fold cross-validation to determine the optimal model parameters. Finally, the ISSA-KELM qualitative analysis model was applied to classify seven coal samples, and the performance was compared with the unoptimized model. The results show that combining LIBS with the CST-PCA-based ISSA-KELM algorithm model is an effective tool for discriminating and analyzing coals with different physical properties and chemical compositions.
Sample number | Carbon (%) | Hydrogen (%) | Nitrogen (%) | Full sulfur (%) | Volatile matter (%) |
---|---|---|---|---|---|
ZBM102A | 62.30 ± 0.36 | 3.11 ± 0.10 | 1.02 ± 0.06 | 1.53 ± 0.05 | 12.86 ± 0.22 |
ZBM104A | 78.97 ± 0.38 | 3.33 ± 0.12 | 0.96 ± 0.06 | 4.10 ± 0.12 | 10.13 ± 0.22 |
ZBM105 | 52.69 ± 0.40 | 2.58 ± 0.10 | 0.72 ± 0.06 | 6.35 ± 0.18 | 14.18 ± 0.50 |
ZBM106 | 72.07 ± 0.38 | 4.46 ± 0.12 | 1.25 ± 0.06 | 0.57 ± 0.04 | 29.70 ± 0.40 |
ZBM107 | 79.89 ± 0.38 | 3.33 ± 0.10 | 1.21 ± 0.06 | 1.54 ± 0.05 | 9.32 ± 0.22 |
ZBM108A | 78.45 ± 0.38 | 3.27 ± 0.12 | 1.06 ± 0.07 | 0.59 ± 0.04 | 11.72 ± 0.22 |
ZBM111C | 77.14 ± 0.38 | 4.59 ± 0.12 | 1.23 ± 0.06 | 0.92 ± 0.04 | 31.29 ± 0.36 |
![]() | (1) |
![]() | (2) |
In this paper, the spectral features after CST feature selection are extracted, and the four principal components are selected to make the error less than 0.05 to complete the secondary dimensionality reduction and achieve the original data information represented by a few variables.
PELM = HHT = h(xi)h(xj) = K(xi,xj) | (3) |
K(xi,xj) = exp(−γ‖xi − xj‖2) | (4) |
![]() | (5) |
The discoverer's position update formula is shown in eqn (6).
![]() | (6) |
The follower's position update formula is shown in eqn (7).
![]() | (7) |
The vigilante's position update formula is shown in eqn (8).
![]() | (8) |
The sparrow search algorithm demonstrates robust search capabilities in practical applications for solving global optimization problems. However, it suffers from two primary disadvantages:
• The initial population is generated randomly, making the generated population unevenly distributed and poorly traversed.
• The stagnation phenomenon may occur at the late stage of the algorithm iteration due to the single population, and it is difficult to obtain the global optimal solution.
To address these shortcomings of the sparrow search algorithm, the traditional sparrow search algorithm is improved by using SPM chaotic sequences, adaptive inertia weights (w), and Gaussian mutation.
(1) SPM initialization improvements. In typical SSA model, the sparrow population is generated by using the function of generating random numbers, which generates a random population within the upper and lower bounds, therefore, the population distribution has inhomogeneity. SPM mapping is a common form of chaotic mapping, which has the characteristics of randomness and traversal.32 In this paper, SPM mapping is used to generate chaotic sequence initialization populations to improve the quality of the initial solutions, which makes the initial solutions as uniformly distributed as possible and enhances the global search ability. The SPM mapping expression is shown in eqn (9).
![]() | (9) |
Combined with the chaotic sequence X(i), the sequence of locations of the primed sparrow individuals in the search area Zkn is further generated as in eqn (10).
Zkn = Zkn,min + X(i)(Zkn,max − Zkn,min) | (10) |
Fig. 3 illustrates the distribution of chaotic sequences generated by SPM chaotic mapping. Additionally, this study employs the Tent chaotic mapping function to perturb individual values chaotically, aiming to prevent them from converging to local optima.
![]() | ||
Fig. 3 Sequence distribution of SPM chaotic mapping (a) scattered distribution map (b) distribution histogram. |
(2) Adaptive inertia weights (w). In the SSA algorithm, the finder locates food for the entire population. Eqn (6) reveals that the finder's own position is not fully utilized, leading to inefficient searching and neglect of the position. Additionally, the discoverer's aggressive search behavior and subsequent convergence of other sparrows to the optimal solution reduce population diversity, making the algorithm prone to local optima. To address this, incorporating the dynamically changing weights w into the updating equation of the discoverer can further optimize the search approach and balance the global and local search. Eqn (12) shows that the weight w is larger in the early stage of the algorithm to achieve stronger global search performance, and w gradually decreases as the number of iterations increases. Thus, the position of the discoverer is dynamically adjusted to give the sparrow population a greater global search capability33 The updated formula for the discoverer's position is presented in eqn (11).
![]() | (11) |
![]() | (12) |
(3) Gaussian mutation. In the later stages of the SSA algorithm iteration, the searching individuals rapidly converge to one or a few locations, which increases the likelihood of encountering local optimal stagnation. When the fitness value of the sparrow individual is less than the average fitness value of the sparrow population, it indicates that the “aggregation” phenomenon occurs and Gaussian mutation begins. To address this problem, a Gaussian mutation strategy is proposed.34 When performing the variation, a normally distributed random number with mean μ and variance σ2 is used to replace the original parameter values. The Gaussian variation operator is formulated as in eqn (11).
Zg = Z × (1 + N(0,1)) | (13) |
The properties of the normal distribution suggest that the gaussian mutation has superior local search capabilities, concentrating on a specific neighborhood around the original individual. This focus improves the algorithm's efficiency in finding global minima.
(4) Specific steps for ISSA optimisation of KELM. Step 1: initialize the parameters of the ISSA, including the number of populations (pop), the number of iterations (Max_iter), the upper and lower bounds of the variables (lb, ub), the dimensions of the variables (dim), and the objective function for optimization (fobj). Additionally, predefine the proportion of discoverers (PD) and the proportion of sparrows aware of the danger (SD);
Step 2: initialize the population using the SPM chaotic mapping strategy;
Step 3: calculate the fitness value of each individual within the initial population and subsequently sort the population based on these fitness values;
Step 4: update the weights based on the number of iterations;
Step 5: update the location of discoverers, followers, and alerts;
Step 6: determine whether the mutation condition is satisfied or not, if it is satisfied, then perform a gaussian mutation to update the optimal sparrow position, otherwise go to the next step;
Step 7: judge whether the termination condition is satisfied or not, if so, proceed to the next step of decoding to get the optimal parameters C and S, otherwise return to step three.
The entire qualitative analysis process of building the KELM model for ISSA optimization is shown in Fig. 4.
The model was evaluated through model evaluation metrics (e.g., accuracy, precision, sensitivity, and F1),35–37 calculated as follows.
![]() | (14) |
![]() | (15) |
![]() | (16) |
![]() | (17) |
The optimal features identified by CST are used as inputs to the PCA model. Since the PCs are new linear combinations of the original wavelength variables, the similarity between the spectra can be visualized by mapping the scores of the first two or three PCs. Fig. 7 shows the visualized 2D and 3D plots of seven coal samples using PCA and CST-PCA downscaling, respectively. In Fig. 7(a), it can be found that there is a serious overlap between ZBM102A and ZBM108A, and the same between ZBM106 and ZBM111C. While in Fig. 7(c), a few samples have a smaller overlap, the differentiation of each sample is better. In Fig. 7(b), there is a serious overlap between ZBM105 and ZBM111C, and the other samples are weakly distinguished. In contrast, Fig. 7(d) shows that each sample has a higher degree of differentiation. By comparing the CST-PCA quadratic dimensionality reduction network with the classical PCA method, it can be found that CST-PCA improves the differentiation between the seven coal samples, which is more conducive to the subsequent classification task.
To achieve a significant recognition effect, the optimal features identified by CST were downscaled using PCA. By constructing cumulative plots of principal components from both PCA and CST-PCA, the contributions and cumulative contributions of their respective principal components were determined, as illustrated in Fig. 8. The results show that by using CST-PCA to extract 4 principal components (PCs), the cumulative contribution reaches 96.39%, exceeding the 95% threshold. However, the cumulative contribution does not increase notably with more PCs, suggesting that additional components have limited explanatory power for the dataset. Thus, these 4 PCs capture the majority of the information from the original spectral data and effectively represent the spectral characteristics of the entire coal sample. The cumulative contribution rate of 4 PCs extracted by the PCA model alone only reached 91.43%, which could not represent the sample spectra well, and 11 PCs were needed to be extracted if we wanted to reach the selection threshold of 95%, so the combination of the CST model and PCA model for the secondary dimensionality reduction well simplified the computation of the subsequent qualitative analyses.
Fig. 9 shows the convergence curves of ISSA and SSA, from which it can be seen that in terms of convergence speed, ISSA converges faster than SSA, with stronger search capability. In addition, the optimal fitness searched by ISSA is also more ideal, with the characteristic of not easily falling into local optimality. The significant advantage of the model's improved performance is well verified.
In order to further illustrate the superiority of CST-PCA-ISSA-KELM classification models in identifying coal types, KELM and SSA-KELM models were constructed, respectively. The performance of KELM, SSA-KELM, and ISSA-KELM qualitative analysis models under different downscaling networks of CST-PCA and PCA was compared under the same training and test sets, and the model confusion matrices in different cases are shown in Fig. 10, which shows that only ZBM102A predicted incorrectly 4 samples for the CST-PCA-ISSA-KELM model. The rest of the samples are predicted with fewer errors, while the number of prediction errors for the unoptimized model is significantly higher.
The results of the evaluation indexes of different models for seven different numbered coal samples (ZBM102A, ZBM104A, ZBM105, ZBM106, ZBM107, ZBM108A, and ZBM111C) are shown in Table 2. It can be seen that the CST-PCA-based ISSA-KELM has the highest classification performance for different coal samples. In order to further observe the performance differences between various classification algorithm models, the values of accuracy, recall, precision, and F1 value of seven coal samples were averaged to obtain the evaluation indexes of various classification algorithm models, as shown in Table 3. It can be seen that the values of accuracy, recall, precision, and F1 value of the CST-PCA-based ISSA-KELM are improved when compared with other unoptimized models.
Sample | Dimensionality reduction network and models | Classification performance evaluation index | ||||
---|---|---|---|---|---|---|
Accuracy | Recall | Precision | F1 value | |||
a Bold indicate that the evaluation indexes (precision, recall, F1 score, or accuracy) of the proposed method are the highest compared to other methods. | ||||||
ZBM102A | PCA | KELM | 0.96164 | 0.93519 | 0.69655 | 0.79842 |
SSA-KELM | 0.98413 | 0.92593 | 0.96154 | 0.94340 | ||
ISSA-KELM | 0.98810 | 0.91667 | 1 | 0.95652 | ||
CST-PCA | KELM | 0.96296 | 0.96296 | 0.81250 | 0.88135 | |
SSA-KELM | 0.98942 | 0.96296 | 0.96296 | 0.96296 | ||
ISSA-KELM | 0.99471 | 0.96296 | 1 | 0.98113 | ||
ZBM104A | PCA | KELM | 0.97090 | 0.79630 | 1 | 0.88660 |
SSA-KELM | 1 | 1 | 1 | 1 | ||
ISSA-KELM | 1 | 1 | 1 | 1 | ||
CST-PCA | KELM | 0.98810 | 0.91667 | 1 | 0.95652 | |
SSA-KELM | 1 | 1 | 1 | 1 | ||
ISSA-KELM | 1 | 1 | 1 | 1 | ||
ZBM105 | PCA | KELM | 0.99339 | 0.95370 | 1 | 0.97630 |
SSA-KELM | 0.99868 | 0.99074 | 1 | 0.99535 | ||
ISSA-KELM | 0.99868 | 0.99074 | 1 | 0.99535 | ||
CST-PCA | KELM | 0.99339 | 0.95370 | 1 | 0.97630 | |
SSA-KELM | 0.99735 | 0.98148 | 1 | 0.99065 | ||
ISSA-KELM | 0.99868 | 0.99074 | 1 | 0.99535 | ||
ZBM106 | PCA | KELM | 0.99471 | 0.97222 | 0.99057 | 0.98131 |
SSA-KELM | 0.99735 | 0.99074 | 0.99074 | 0.99074 | ||
ISSA-KELM | 0.99868 | 1 | 0.99083 | 0.99539 | ||
CST-PCA | KELM | 0.99471 | 0.97222 | 0.99057 | 0.98131 | |
SSA-KELM | 0.99735 | 0.99074 | 0.99074 | 0.99074 | ||
ISSA-KELM | 0.99868 | 1 | 0.99083 | 0.99539 | ||
ZBM107 | PCA | KELM | 0.99603 | 0.97222 | 1 | 0.98591 |
SSA-KELM | 1 | 1 | 1 | 1 | ||
ISSA-KELM | 1 | 1 | 1 | 1 | ||
CST-PCA | KELM | 0.99603 | 0.97222 | 1 | 0.98591 | |
SSA-KELM | 1 | 1 | 1 | 1 | ||
ISSA-KELM | 1 | 1 | 1 | 1 | ||
ZBM108A | PCA | KELM | 0.97751 | 0.91667 | 0.92523 | 0.92093 |
SSA-KELM | 0.98413 | 0.97222 | 0.92105 | 0.94595 | ||
ISSA-KELM | 0.98677 | 1 | 0.91525 | 0.95575 | ||
CST-PCA | KELM | 0.98677 | 0.95370 | 0.95370 | 0.95370 | |
SSA-KELM | 0.98942 | 0.97222 | 0.95455 | 0.96331 | ||
ISSA-KELM | 0.99339 | 1 | 0.95575 | 0.97737 | ||
ZBM111C | PCA | KELM | 0.99471 | 0.96296 | 1 | 0.98113 |
SSA-KELM | 0.99868 | 0.99074 | 1 | 0.99535 | ||
ISSA-KELM | 0.99868 | 0.99074 | 1 | 0.99535 | ||
CST-PCA | KELM | 0.99603 | 0.98148 | 0.99065 | 0.98605 | |
SSA-KELM | 0.99735 | 0.99074 | 0.99074 | 0.99074 | ||
ISSA-KELM | 0.99868 | 0.99074 | 1 | 0.99535 |
Dimensionality reduction network | Models | Accuracy | Recall | Precision | F1 value |
---|---|---|---|---|---|
a Bold indicate that the evaluation indexes (precision, recall, F1 score, or accuracy) of the proposed method are the highest compared to other methods. | |||||
PCA | KELM | 0.98413 | 0.92989 | 0.94462 | 0.93294 |
SSA-KELM | 0.99471 | 0.98148 | 0.98190 | 0.98154 | |
ISSA-KELM | 0.99584 | 0.98545 | 0.98658 | 0.98548 | |
CST-PCA | KELM | 0.98828 | 0.95899 | 0.96392 | 0.96016 |
SSA-KELM | 0.99584 | 0.98544 | 0.98557 | 0.98549 | |
ISSA-KELM | 0.99773 | 0.99206 | 0.99237 | 0.99208 |
In summary, compared with other unoptimized classification algorithm models, the CST-PCA-based ISSA-KELM algorithm model has significant advantages over other unoptimized models, and the accuracy is 99.773%.
This journal is © The Royal Society of Chemistry 2025 |