1. Introduction
Fritillaria thunbergii (Zhebeimu) is a perennial herb in the lily family [
1] that is widely recognized for its medicinal properties; its main production areas are the Zhejiang, Jiangsu and Anhui provinces in China [
2]. Chinese herbal medicines have been used in China for thousands of years and have spread worldwide [
3]. Although herbal medicines are often considered natural and harmless, there are safety concerns, such as the potential of heavy metal overdose and toxicity [
4]. Owing to the growth environment and characteristics of the herb species itself, herbs commonly contain a certain amount of harmful heavy metals, such as Pb, Cd, Hg, As, Cu and Cr. The dry bulbs of
Fritillaria thunbergii are widely used as expectorants and antitussives [
5], and their safety has become a matter of considerable concern. The unique biological properties of Fritillaria lead to the accumulation of heavy metals, especially Cd, when grown in acidic soils. Rapid determination of Cd, Cu and Pb contents is important for evaluating the safety and quality of
Fritillaria thunbergii.
Laser-induced breakdown spectroscopy (LIBS) is an atomic emission spectroscopic technique that uses a laser as the excitation source [
6]. Compared with traditional analytical techniques, such as inductively coupled plasma mass spectrometry (ICP-MS) [
7], atomic absorption spectrometry (AAS) [
8], and inductively coupled plasma atomic emission spectrometry (ICP-ASE) [
9], LIBS has many advantages, such as green spectrometry, a fast analysis speed, the elimination of the need for complex sample preparation, and multiple elemental measurements. LIBS has been widely used for quantitative and qualitative analyses in plant materials [
10,
11,
12], animal tissues [
13,
14], mineral resources [
15,
16] and industrial applications [
17]. Previous studies have provided a basis for the quantitative prediction of heavy metal content in Chinese medicine using LIBS.
The use of models with high accuracy and generalization capabilities is crucial for making predictions using LIBS technology. Partial least squares regression (PLSR) [
18], support vector regression (SVR) [
19] and the back-propagation neural network (BPNN) [
20,
21,
22,
23] are commonly used modeling methods. However, these methods have limitations such as the inability of PLSR to effectively fit nonlinear relationships and the low accuracy of SVR prediction with large data.
BPNN has strong generalization and fitting abilities; however, there are still problems in its applications, such as slow convergence, ease of falling into local minima, and overfitting. In response to these problems, Mohamad et al. [
24] proposed a particle swarm optimization (PSO) algorithm to optimize the initial weights of BPNN, which can effectively improve the prediction accuracy of the model. In 2020, the sparrow search algorithm (SSA) was proposed [
25]; it has better characteristics than other swarm algorithms in the testing of both single-peaked and multi-peaked functions, with fast convergence speed and high convergence accuracy. Therefore, some experts have applied SSA algorithms to perform BPNN optimization. Wang et al. [
26] applied the intelligent optimization SSA to optimize a BPNN model and improve its prediction accuracy.
Thus, to improve the prediction accuracy of BPNNs, this study introduces PSO and SSA to optimize the weights and thresholds of BPNN, forming hybrid algorithm artificial neural network models named PSO-BP and SSA-BP, respectively. In this study, spectral data collected by LIBS were preprocessed and combined with a feature selection algorithm to construct a quantitative analysis model for predicting the content of heavy metals (Cd, Cu and Pb) in Fritillaria thunbergii. We compared the accuracies of the BPNN, PSO-BP and SSA-BP models to determine the optimal prediction model. The optimal model was then compared with the PLSR model commonly used for heavy metal prediction in Chinese herbal medicines to determine its practicality and superiority. By exploring a more effective and convenient detection method for heavy metal content, this study provides a basis for safety monitoring and quality evaluation of Fritillaria thunbergii.
3. Materials and Methods
3.1. Fritillaria thunbergii Material and Sampling
Eight different brands of
Fritillaria thunbergii commonly found on the market were purchased and used in this experiment (
Table 5). Samples with different Cd, Cu and Pb contents were prepared in the laboratory by treatment with cadmium nitrate, copper nitrate and lead nitrate solutions.
Cadmium nitrate, copper nitrate and lead nitrate powders were used to prepare a solution of 0.01 mol/L each. The 8 types of Fritillaria thunbergii were crushed using a high-speed crusher and each type of Fritillaria thunbergii was equally divided into 8 groups and coded. A concentration gradient (for Cd: 0, 5, 10, 20, 25, 50, 80 and 100 mg/kg; for Cu: 0, 20, 40, 60, 80, 100, 200 and 300 mg/kg; and for Pb: 0, 5, 20, 40, 60, 80, 100 and 200 mg/kg) was predetermined between each group. The purpose was to produce samples whose true values could also be re-examined by 1-8 ICP–MS. Each group contained 5 g of Fritillaria thunbergii powder; 1 group was the control group, and the rest were the treatment groups. Different amounts of the solution were added to each group (for Cd cadmium nitrate solution: 22.24, 44.48, 88.97, 111.21, 222.42, 355.87 and 444.84 μL; for copper nitrate solution: 156.25, 312.5, 468.75, 625, 781.25, 1562.5 and 2343.75 μL; and for lead nitrate solution: 48.26, 96.53, 144.79,193.05, 241.31 and 482.63 μL). All samples were dried in an oven at 60 °C and crushed separately using a pulverizer (AQ-180E, Nail, Ningbo, China) to obtain a homogeneous mixture of each group of samples and to ensure consistency in the content of each heavy metal. The ground samples were formed into 1.5 cm diameter pellets using a tablet compressor. For each group, three parallel samples were prepared, and a total of 192 samples were obtained.
3.2. LIBS Experimental
The LIBS setup for this experiment consisted of a pulsed solid-state laser (Vlite 200, Beamtech, Beijing, China), a spectrograph (SR500i, Andor, Belfast, UK), an ICCD camera (DH334-18F-03, Andor, Belfast, UK), a movable sample stage (TSA50-C, Zolix, Beijing, China), an X-Y-Z motorized stage (TSA50-C, Zolix, Beijing, China), a stage controller (SC300-3A, Zolix, Beijing, China), a computer, an energy attenuator, a reflector, a lens and a fiber optic.
In our experiment, the Nd: YAG laser was used as an excitation source. The laser beam was focused 2 mm below the samples with a 100 mm focal length optical lens, forming an ablation spot. To increase the signal-to-noise ratio, the following parameters were optimized: λ = 532 nm, energy = 40 mJ, delay = 2 µs, and gate width = 10 µs. The repetition rate was 1 Hz. Each spectrum was cumulatively acquired, and three laser pulses were taken. In total, 7 LIBS spectra were acquired in 7 different positions, yielding 21 (3 × 7) spectra. To reduce the fluctuation between the laser points, the first of the 7 points was removed, and the average of 18 (3 × 6) spectra was recorded as the LIBS data of the sample.
3.3. Reference Method for Heavy Metal Content Determination
The concentrations of Cd, Cu and Pb in all
Fritillaria thunbergii samples, as determined by inductively coupled plasma mass spectrometry (ICP–MS) analysis (ELAN DRC-e, PerkinElmer, Waltham, MA, USA), were used as reference values. Ginseng (GBW10020) and French beans (GBW10021) were used to assure the accuracy of the results. The results of the Cd, Cu and Pb content determination are shown in
Table 6.
3.4. Sample Division and Spectral Preprocessing
The 8 concentration gradients of Fritillaria thunbergii samples in this experiment were numbered 1–8, and each sample contained 3 sets of experimental data, for a total of 192 spectral sets of data. We used 2 randomly selected sets of data from each sample as the training set for model calculation, and the remaining set of data was used as the test set for a total of 128 sets of training data and 64 sets of test data.
Before the calibration process, it was necessary to employ preprocessing to reduce irrelevant information and remove high-frequency noise and baseline variations. Four preprocessing methods, including multiplicative scatter correction (MSC), standard normal variate (SNV), wavelet transform (WT) and Savitzky–Golay smoothing (SG), were applied separately and compared. The coefficient of determination for cross-validation (Rcv2) and the root mean squared error cross-validation (RMSECV) were used as evaluation indicators to select the optimum preprocessing strategies.
3.5. Sensitive Variable Selection
The raw LIBS spectrum of a Fritillaria thunbergii sample contained large amounts of data, including multiple element spectral lines and unnecessary information, such as redundancy, collinearity, and background information. In some cases, suitable methods can select effective wavelengths containing useful information and reduce the collinearity and high-dimensionality problems of full-spectrum data to reduce the input, develop simpler models, and increase speed. In this study, competitive adaptive reweighted sampling (CARS), successive projection algorithm (SPA), and principal component analysis (PCA) were used to select characteristic wavelengths.
3.6. Discriminant Analysis Method
3.6.1. BPNN
A BPNN is self-organizing, self-learning, and self-adaptive, and its principles are simple and easy to implement. BPNNs have been used in several applications. A BPNN is a multilayer feed-forward neural network that includes an input layer, implicit layer, and output layer [
27]. The main feature of the BPNN algorithm is that the signal is transmitted forward, and the weights and thresholds of the entire network are continuously adjusted by back propagation to reduce errors in the network output [
28].
BPNN can achieve arbitrarily complex nonlinear mapping [
29] with a certain degree of robustness and fault tolerance [
30]. However, the BPNN algorithm has inherent shortcomings, including unstable training results that tend to fall into local optimum solutions, slow convergence, and data overfitting. Therefore, the initial weights and thresholds of the BPNN algorithm were optimized by introducing the PSO and SSA algorithms with the aim of iterative convergence to the optimal global solution.
3.6.2. PSO-BP
The PSO algorithm is used instead of gradient descent to determine the optimal weights and thresholds of the BPNN [
31], which can improve the generalization performance. The PSO algorithm that is combined with the BPNN is called PSO-BP.
PSO, which is a swarm intelligence optimization initially presented by Eberhart and Kennedy (1995) [
32], is derived from the predatory behavior of birds in nature. This algorithm is the simplest way for each bird to follow the bird closest to the food and search its surrounding area to obtain food. The basic principle is that each problem solution is considered to be a bird in the search space, called a “particle” whose position, velocity, and fitness values represent the particle characteristics. Assuming that in a
d-dimensional space, there is an initialized population of potentially optimal particles, the particles adjust their velocity and position according to their individual and global extremes and update their fitness values to achieve the goal of finding an optimal solution.
3.6.3. SSA-BP
The SSA is a novel algorithm with strong optimization capability and fast convergence. The SSA is used to optimize the initial weights of a BPNN, establishing the SSA-BP model, which not only makes full use of the mapping capability of the BPNN, but also has the fast global convergence and learning capability of the SSA. The SSA algorithm that is combined with the BPNN algorithm is called SSA-BP.
The SSA is a novel smart swarm optimization algorithm based on the foraging and antipredatory behavior of sparrows [
33]. Sparrows are classified as discoverers, joiners, and scouts in the foraging process [
34]. The basic process of SSA is to initialize the sparrow population; calculate individual fitness values and determine the best and worst suited individuals; update the positions of discoverers, joiners, and scouts in turn; and update through successive iterations until the termination conditions are met.
3.7. Model Evaluation and Software
The performance of the models was evaluated using seven parameters: the correlation coefficient for calibration (Rc2), cross-validation (Rcv2) and prediction (Rp2), the root mean square error of calibration (RMSEC), the root mean square error of cross-validation (RMSECV) and the root mean square error of prediction (RMSEP), and relative percent deviation (RPD). A good model should have high Rc2, Rcv2 and Rp2 values and low RMSEC, RMSECV and RMSEP values. An RPD greater than 1.5 is considered a good prediction; an RPD between 2.0 and 2.5 indicates that it is a satisfactory prediction model; and an RPD greater than 3.0 is considered a valid prediction model.
Spectral data preprocessing, extraction, and calculation of the SPA, CARS, PCA and PLSR algorithms were performed using Python3.7.3. The BPNN, PSO-BP, and SSA-BP were constructed using MATLAB R2019b (Math Works, Natick, MA, USA).
4. Conclusions
This study demonstrated that LIBS can be used to predict the Cd, Cu and Pb contents in Fritillaria thunbergii. For the estimation of the content of heavy metals, optimal spectral estimation models were established using BPNN, PSO-BP, SSA-BP and PLSR models. The models established by the PSO-BP and SSA-BP models were better and had higher precision than the other models. The SSA-BP model is superior to the PSO-BP model because it runs faster, has higher prediction accuracy at low concentrations, and is more practical to apply. For the SSA-BP model, Cu had the highest modeling accuracy and perfect prediction, with statistical analysis values of Rp2 = 0.991, RMSEP = 7.810 mg/kg and RPD = 10.34. Cd and Pb were modeled better with Rp2 values of 0.972 and 0.956, respectively; RMSEP values of 5.553 and 12.906 mg/kg, respectively; and RPD values of 6.04 and 4.94, respectively. In summary, LIBS technology is an effective method for the rapid detection of Cd, Cu and Pb in Fritillaria thunbergii. This study provides a basis for the application of LIBS to the quantitative determination of heavy metal content in Chinese medicine.