Introduction

Laser-induced breakdown spectroscopy (LIBS) provides some significant advantages in the chemical analysis of soils. The experimental setup is simple and compact, providing fast measurements in the tens-to-hundreds of ppm range without any preparation of the sample. These features make LIBS applicable for in situ or on-site analysis, which would be of great help in the chemical characterization of polluted soils. As LIBS is an atomic spectroscopy technique, it is particularly suited for the detection of metals, and several previous papers have demonstrated its applicability in this area [18].

In addition to this environmental context, the recent development of Echelle spectrometers [911] now permits the acquisition of broadband spectra at high resolution, i.e., extremely rich spectra comprising several thousands of points. This presents the challenge of finding an efficient way to extract the pertinent information from such data-rich spectra. This problem is complicated by the fact that soils are composite matrices containing multiple chemical elements at very different concentration levels. As a result, LIBS spectra of soils tend to be very complex and can exhibit strong spectral interferences.

Consequently a suitable advanced data treatment methodology is needed to extract both qualitative and quantitative information from LIBS spectra. In a previous study [12], we compared the performances of the standard calibration curve—i.e., the peak area versus the concentration—to two multivariate methods, partial least-squares regression (PLSR) and neural networks analysis (NNA), for the quantitative measurement of chromium concentration in soils. We clearly concluded that neural networks led to the best results in terms of prediction accuracy, prediction precision, and limit of detection, and that this approach to spectra analysis could really improve the analytical results obtained by LIBS.

This paper focuses on the use of neural networks for soils analysis. We first investigated the potential of networks to classify spectra of different soils and we compared their performances to the more standard principal components analysis (PCA). The question as to which part(s) of the spectra to use as inputs for neural networks for the optimal prediction of chromium concentration was then addressed.

Experimental

Experimental setup

A standard LIBS configuration was used in this study consisting of a Nd:YAG laser (Continuum Surelite) that delivers 7-ns pulses at 355 nm with an energy of 3 mJ and a repetition rate of 3 Hz. The relatively low repetition rate ensures that the interaction between the ejected particles and the following laser shot is negligible. Pulses are focused onto the sample through a 50-mm-focal-length lens. The focal spot has a diameter of approximately 50 μm, and each laser shot ablates a few μm of material. A 38.1-mm-focal-length parabolic mirror associated with a 75-mm lens transmits the light emitted by the plasma into a bundle of 200-μm-diameter optical fibers connected to the spectrometer (Oriel MS260i, 2,400 grooves/mm grating blazed at 400 nm). Its resolution power is about 2,500 at 360 nm, and it is equipped with an intensified camera (Andor Technology iStar). Detection is delayed by 150 ns with respect to the arrival of the laser pulse on the sample surface, and the gate width is 2 μs. For analysis, a total of 100 laser pulses are accumulated for every spectrum as the sample is continuously moved in its plane during the acquisition at a speed of about 500 μm s−1, ensuring no overlap between successive impacts.

Samples and datasets

For the study, pressed pellets were prepared for three different soils:

  1. (i)

    Kaolinite (Al2Si2O5(OH)4): this sample is a “model soil”. It is a homogeneous white clay extracted from a deposit and has a grain size distribution between 1 and 10 μm. Several oxides are present in the matrix with a concentration of < 1%, particularly TiO2, Fe2O3, FeO, MnO, MgO, CaO, Na2O, K2O, P2O5, and SO4.

  2. (ii)

    Bourran soil: this is a real agricultural soil with a very homogeneous, brown aspect.

  3. (iii)

    Pierroton soil: this is another real agricultural soil containing 94.2% of sand.

The composition of the two agricultural soils is given in Table 1. Their grain size distribution was intentionally not measured, since our ultimate goal is to perform on-site measurements.

Table 1 Composition of Pierroton and Bourran soils

Samples are doped with chromium at various concentrations by sorption in the liquid phase and continuous agitation for 24 h; they are then centrifuged and lyophilized, i.e., treated by a freeze-drying process. No binder is used. The pellets are then formed in a pelleting-press by applying 250 kg cm−2 for 5 min.

Of the three different soils used in this study, the Bourran soil and the kaolinite give flat, texturally homogeneous pellets that produce smooth and very reproducible LIBS spectra (Fig. 2). By contrast, the Pierroton soil consists almost entirely of coarse-grained sand that does not readily generate satisfactorily aggregated pressed pellets, but rather pellets that are friable, spatially heterogeneous, and which produce LIBS spectra of highly variable emission line intensities.

The matrix of the spectra in lines at the different concentrations forms the dataset. When using neural networks, datasets are divided into two for each soil, one for the calibration of the network (calibration set) and the other for prediction of concentrations (validation set). Table 2 summarizes the composition of the different datasets.

Table 2 Datasets used for each soil

The chromium lines of interest that were used for the quantitative measurements are at 357.87, 359.35, and 360.53 nm.

Data processing

Two chemometrics techniques were used in this study, principal components analysis (PCA) and neural networks analysis (NNA). PCA [13] has been already applied to LIBS for identification/classification purposes [1419] and involves representing the spectra in a new space with far fewer dimensions, keeping the information contained in the dataset. This dataset S (matrix of the spectra in lines) corresponds to the coordinates of the spectra in the initial base of the n wavelengths. The eigenvectors of the covariance matrix S′S, where S′ is the transpose matrix, are the principal components (PC). They form a new base which has the following properties:

  1. (i)

    Each PC defines an axis of maximum variance of the whole dataset.

  2. (ii)

    The axes are orthogonal, i.e., the information contained in a PC is uncorrelated to the one contained in the other PCs.

  3. (iii)

    The eigenvalues associated with each PC characterize the amount of information that it contains.

Typically a few components, instead of the initial hundreds of wavelengths, will represent the quasi-totality of the spectral information. From the base defined by the PCs we can calculate the coordinates of the spectra in the new representation space. Spectra are then commonly projected onto the plane PC2/PC1 containing the major part of the information.

For qualitative and quantitative analyzes we used a neural network based on the back-propagation algorithm [20]. Artificial neural networks are computer systems inspired by biological neurons. Processing is distributed over a large number of basic units called perceptrons or nodes. Owing to their original structure, neural networks exhibit the following specific properties which make them particularly powerful tools:

  1. (i)

    Parallel data processing.

  2. (ii)

    Learning /self-organization ability.

  3. (iii)

    Memory distribution over the units, which induces a strong tolerance to errors or even destruction of the units, and also to noise.

  4. (iv)

    Generalization ability.

The perceptron is described in Fig. 1. It consists of n inputs x 1 ,…, x n converging in the unit. Each x i is affected by a weight w i , and the total input of the node is the weighted sum of the x i . This number is compared to a threshold θ and the perceptron applies a non-linear transfer function (sigmoid) to the difference between the two. The neural network which we used is a three-layer perceptron, also represented in Fig. 1. In our case x i values are the intensities at the n wavelengths, i.e., the input layer has n nodes. The hidden layer has a variable number of nodes, typically a few units. The output layer has only one node since we are interested in only one element, but multiple outputs are possible.

Fig. 1
figure 1

Principle of the perceptron (left) and of a three-layer neural network (right). f s is a sigmoid function

Weights are initially random. During the calibration phase each spectrum of the calibration set is successively injected into the network, then at each iteration the weights are dynamically changed as a function of the difference between the concentration calculated by the network and the true value. This procedure is repeated until the network reaches a good prediction ability over the concentration range. For prediction, the weights being fixed, an unknown spectrum is simply injected into the network which then calculates the concentration.

To assess the quantitative performances of the neural network, we calculate four figures:

  1. (i)

    Average relative error of calibration (%) to evaluate calibration accuracy.

    $$REC\left( \% \right) = \frac{{100}}{{N_C }}\sum\limits_{i = 1}^{N_C } {\left| {\frac{{\widehat{c_i } - c_i }}{{c_i }}} \right|}$$

    where N C is the number of calibration spectra, c i is the true concentration, and ĉ i is the estimated concentration.

  2. (ii)

    Average relative error of prediction (%) to evaluate prediction accuracy.

    $$REP\left( \% \right) = \frac{{100}}{{N_{\text{v}} }}\sum\limits_{i = 1}^{N_{\text{v}} } {\left| {\frac{{\widehat c_i - c_i }}{{c_i }}} \right|} $$

    where N V is the number of validation spectra.

  3. (iii)

    Average relative standard deviation of predicted concentrations of the validation set (%) to evaluate prediction precision.

    $$RSD\left( \% \right) = \frac{{100}}{{N_{conc} }}\sum\limits_{k = 1}^{N_{conc} } {\frac{{\sigma _{C_k } }}{{c_k }}} \,{\text{with}}\,\sigma _{C_k }^2 = \sum\limits_{i = 1}^p {\frac{{\left( {\widehat c_{ik} - c_k } \right)^2 }}{{p - 1}}} $$

    where N conc is the number of different concentrations in the validation set, p is the number of spectra per concentration, and σ Ck is the standard deviation obtained at concentration c k .

  4. (iv)

    Limit of detection (ppm), calculated by fitting predicted concentrations of the validation set versus true concentrations by a straight line a+bc, so that the LOD is given by

    $$ LOD{\left( {ppm} \right)} = \frac{{3\sigma _{a} }} {b} $$

    where σ a is the standard deviation of a given by the regression.

Results and discussion

Classification of soil spectra

Identification or classification of samples is often the first step of the analytical procedure after data acquisition. Indeed, if the prime objective is to measure an elemental concentration, quantitative techniques to process spectra are matrix-dependent. Even if multi-matrices analysis is possible [12], analytical performances will always be better when only one type of sample is measured, hence the interest in using techniques to classify samples prior to the determination of the concentration.

We have three different soils for this analysis. Since iron is present in the three matrices, spectra were normalized with respect to the 373.49-nm emission line of Fe. Figure 2 shows typical spectra of each soil.

Fig. 2
figure 2

Raw (a) and normalized (b) spectra of the three soils. Chromium concentration is 166 ppm for the Bourran soil, 100 ppm for the kaolinite, and 107 ppm for the Pierroton soil. The domain of variation on each side of the average spectrum is represented ± one standard deviation over 10 spectra

We can see from Fig. 2a that raw spectra fluctuations are of the same order of magnitude for the three soils, although the relative variations of the Pierroton spectra seem more important. Figure 2b shows that normalizing by the Fe line compensates well the fluctuations of Bourran and kaolinite spectra, i.e., the global spectrum intensity changes from one spectrum to the other. In contrast, the normalization does not enable one to reduce Pierroton spectra variations. This means that ratios between lines change, i.e., matrix effects occur which cannot be counterbalanced by the normalization. However, thinking about a real-world application, it seemed interesting to us to check if we could identify these samples. If a quantitative measurement by LIBS is impossible with Pierroton spectra, at least we would be able to exclude them from the subsequent analysis.

A 10-nm spectral window between 356 and 366 nm was selected to produce about 250 data points per spectrum. PCA was first employed to classify the samples. Figure 3 shows the coordinates of the spectra in the plane of the first two components t[1] and t[2] which contain 88.8% of the total spectral information. The ellipse in Fig. 3 corresponds to the Hotelling T2 with a confidence interval of 95%. It is an indication of how well the PC decomposition represents the data, i.e., spectra should lie inside this limit. As one can see, Bourran spectra form a well-defined cluster, whereas kaolinite spectra are aligned along a certain direction. This observation means that for this soil, both t[1] and t[2] are linked to chromium concentration. This is less clear for Bourran samples, although one may detect a linear trend in the cluster indicating the same correlation, and it is clearly not the case for Pierroton samples. Yet when doing a PCA, we are not interested in chromium concentration but rather in separating the three soils. From this point of view, we can say from Fig. 3 that the three classes are correctly discriminated, but that there is a risk that new Pierroton spectra may be misclassified due to the important scattering of these spectra in the projection plane. In addition, a non-negligible fraction of these spectra lie outside the 95% confidence interval, which means that they are not well represented by the PCA decomposition. Furthermore, consideration of additional principal components did not provide a better discrimination of the Pierroton spectra. The influence of the spectral bandwidth on ability of PCA to classify the soils was also examined. No significant difference was observed between the entire 40-nm spectral window and a smaller window of 10 nm. Below this limit, input spectra contain insufficient information to distinguish the different matrices and the classification becomes less accurate. In conclusion, PCA enables one to sort spectra of our three soils, but a doubt remains about its ability to correctly identify Pierroton spectra.

Fig. 3
figure 3

PCA of spectra from three different soils. The projection plane is the plane of the first two principal components

We also used neural networks to sort the same spectra, since the primary function of these networks is related to identification and classification problems [20]. For that purpose, arbitrary numerical values were assigned to each soil—0 for Kaolinite, 0.5 for Bourran, and 1 for Pierroton—but any values could be taken. The three-layer neural network had three nodes in the hidden layer and was first calibrated to predict these values from the calibration set of 57 spectra described in Table 2. The prediction was then performed with the validation set of 80 spectra. Results are presented in Table 3 for the validation set, which shows that predicted values are very close to target values, and that the standard deviation is less than 2% with respect to the initial range of values [0,1] in all three cases. With the exception of one Kaolinite sample, all predicted values lie within the target value±0.05. If this tolerance is extended to ±0.1, all spectra are properly sorted by the network, leading to a 100% rate of correct classification. It is especially noticeable that Pierroton samples are perfectly separated from other soils. Therefore the conclusion is drawn that neural networks can be efficiently used in LIBS for classification purposes with an excellent sorting ability.

Table 3 Identification of three soils through neural networks prediction of arbitrary target values

Measurement of Cr concentration

For the determination of chromium concentration in kaolinite samples by NNA, spectra were normalized with respect to the Fe line at 373.49 nm. The datasets used for calibration and validation were those described in Table 1. In each case four specific parameters of the network were optimized during the calibration phase: number of hidden nodes, learning rate, momentum factor, and number of iterations. Given that there is a large quantity of information contained in the LIBS spectra, and that working with small networks is preferable as they have a better generalization ability and are less prone to overfitting [21] (i.e., having a prediction error larger than the calibration error), an important objective of this work was to determine the optimal input set for the network. Thus, to begin, the spectral range of the data was reduced in order to investigate its effect on calibration and prediction accuracy, prediction precision, and limit of detection (Table 4). Three intense chromium lines at 357.87, 359.35, and 360.53 nm were concatenated for the analysis shown in the last row of Table 4. In all other cases a spectral window centered at 360 nm was used.

Table 4 Influence of spectral bandwidth on the analytical performances of the neural network

Table 4 shows that the results are quite independent of the spectral bandwidth from 40 to 4 nm. No reduction of overfitting is observed either. The only significant discrepancy is the inexplicably high LOD associated with the 20-nm window. When using only the 359.35-nm line, which does not interfere with a matrix line in contrast to the two others, prediction is less accurate and less precise. This phenomenon is still amplified when the three Cr lines are concatenated: substantial overfitting is observed, although the network is rather small—calculations were done with two hidden nodes—and the LOD is high. This is possibly due to the fact that the two lateral chromium emission lines at 357.87 and 360.53 nm interfere with different matrix lines (Fe lines at 358.12 and 360.89 nm, Mn line at 360.85 nm). As a result their respective variations may be uncorrelated and cannot be compensated for by other parts of the spectra; hence, the calibration is more difficult than with only one line.

The results in Table 4 lead to the conclusion that dividing the number of inputs of the network by a factor of 10 does not have a large effect on the NNA prediction performances. However, it is necessary to have a certain amount of information in the LIBS spectra that is not correlated to chromium, since using only the Cr emission lines provides worse results in the prediction of the concentration. This means that the neural network performs its own signal normalization from regions in the spectra associated with the soil matrix. Due to self-absorption in the plasma, the relationship between the plasma emission and the concentration is non-linear, and the network needs information about the soil matrix in order to model this non-linearity.

Therefore, keeping in mind that the neural network should be as small as possible and that the number of inputs has to be optimized, the need to have matrix data in the inputs can be met simply by concatenating an additional spectral window containing matrix information to the three Cr lines, or to the single 359.35-nm line (Table 5). A 0.9-nm zone was then selected that includes the two Fe lines at 373.49 and 373.71 nm, not resolved by the spectrometer: this particular spectral window is henceforth referred as the matrix window. The effect of concatenating two matrix windows instead of one was also tested. The second window, centered at 344 nm, is 1.6-nm wide and includes the Fe emission lines triplet at 344.06, 344.10, and 344.39 nm, not resolved by the spectrometer either.

Table 5 Influence of concatenation of matrix windows to Cr lines (spectral intensities or peaks areas) on the analytical performances of the neural network

We see that considering one or more matrix windows (Table 5) and three Cr lines enables us to achieve equivalent results to those obtained with an unbroken spectral window (Table 4), with slightly better performances when using two additional windows instead of one. When using only one Cr emission line, results are not significantly improved compared to Table 4, except for the LOD. This means that the line signal at 359.35 nm after spectra normalization is quite reproducible and does not benefit from an additional normalization inside the network.

When tracing a calibration curve to measure a concentration by LIBS, or when using punctual detectors, the peak area is the quantity of interest. It is interesting to investigate what happens with neural networks in this case. Regarding one emission line, we can consider that the peak area contains as much information as the spectral intensities, but it is concentrated on a single input node instead of several dozens, allowing reduction of the dimension of the network. The lower part of Table 5 presents calculations using the areas of the peaks, which were used as inputs for the neural network. Matrix information was also included in the network inputs by integrating the additional window around 373.5 nm over its spectral range, and only one input node was then added to the Cr peaks areas. Table 5 shows that the neural network performances are improved when using peaks areas instead of spectral intensities, and that overfitting is also reduced. Finally, the best results were obtained when entering the areas of the three Cr peaks and of one matrix-specific spectral window into the neural network, using four input nodes and 19 hidden ones. This resulted in a prediction accuracy of 4.2%, a prediction precision of 5.1%, and a LOD of 13 ppm. It is also worth mentioning that compared to the initial data—the whole spectra—a significant reduction of the number of input variables from 1,024 to 4 was achieved, together with a significant reduction of calculation time.

Conclusion

The aim of this paper was to determine the chromium concentration of a soil using a neural networks analysis of LIBS spectra. As a first step in the analysis, the potential of neural networks for qualitative classification of three different soils was investigated and compared to PCA. Neural networks were shown to be more efficient, particularly in the case of real-world, noisy, and variable spectra, with a rate of correct identification of 100%. Optimization of the input of the neural network was then undertaken to reduce its dimension, and therefore to reduce overfitting and to improve its performance for quantitative elemental analysis. The results obtained were quite independent of the spectral bandwidth and it was observed that soil matrix information had to be included in the neural network for optimal results. The use of matrix-specific spectral windows in addition to the chromium lines produced equivalent performances, with a reduced number of inputs. Finally, the lines spectra were replaced by their respective areas, which further improved the NNA results. A prediction accuracy and precision of 4–5% was obtained with a reasonably small neural network, and the number of input variables was reduced by more than two orders of magnitude. This work illustrates the power of neural networks as an advanced spectral treatment for the determination of elemental concentrations. We think that this innovative technique represents the future for competitive and mature quantitative LIBS.