1. Introduction
Calibration-free (CF) methods in laser-induced breakdown spectroscopy (LIBS) serve as an alternative to calibration-based techniques [
1]. Their major advantage is the ability for rapid chemical analysis without standards; this is important in situations where matrix-matched standards are not available or amounts of samples are limited. However, their typical accuracy and precision are modest and degrade toward semi-quantitative analysis for concentrations below 1%. The main applications of CF LIBS can be found in industry, geology, biology, archeology, or even space exploration [
1,
2].
Over the years, several approaches to CF LIBS have been proposed, all relying on an assumption of a uniform isothermal plasma at local thermodynamic equilibrium (LTE). They can be divided into two categories: those that use the experimental spectrum to determine the plasma parameters (the inverse problem) and those that specify the plasma parameters to reproduce the experimental spectrum (the direct problem). The most frequently used version of the first category is the Boltzmann plot (BP) or Saha–Boltzmann plot (SBP) method [
2,
3]. It relies on the assumptions of stoichiometric ablation, plasma uniformity, and optical thinness. The latter condition, though, can be relaxed by the proposed self-absorption correction methods [
4]. This method has been repeatedly used to solve specific analytical problems. Praher et al. [
5] and Pedarnig et al. [
6] paid special attention to the homogeneity and optical transparency of the plasma during a CF LIBS analysis of steel slags and other industrial materials. They carefully optimized the timing of radiation collection and corrected lines for self-absorption. Gornushkin et al. [
7] studied effects of non-uniformity of LIBS plasma on the accuracy of calibration-free BP analysis. Hermann et al. [
8] took into account the influence of density and temperature gradients on the plasma spectra by assuming two homogeneous zones within the plasma, each with its own density and temperature. Wester and Noll [
9] also proposed a heuristic two-shell plasma model to account for plasma gradients.
Several single-point calibration methods have been proposed to improve the CF-BP–LIBS method; they needed only one reference standard with a composition similar to the sample being analyzed. Although not truly calibration-free, they are still close to CF because, in the end, they provide concentrations of elements not included in the certified standard. The methods reduce the error of CF-BP analysis associated with instrumental factors or inaccuracy of spectroscopic data. Cavalcanti et al. [
10] demonstrated an improvement in the accuracy of the CF LIBS analysis by first applying it to a certified sample and then to unknown samples. Gaudiuso et al. [
11] proposed an inverse CF-LIBS method in which one certified sample was used to find the unique slope of a Boltzmann plot, which was then applied to unknown samples. Aragon and Aguilera [
12,
13] proposed a one-point calibration “C-sigma” method which was based on the theory of curves-of-growth. Here, several elemental BPs were merged into a single BP that was common for all the elements. Grifoni et al. [
14] compared the three one-point calibration methods in favor of the first.
All CF-BP (inverse) methods require solving ill-posed problems of self-absorption correction [
15] and deconvolution [
16], which can lead to significant errors in the calculation of the integral line intensities (see Equation (1) below). Another disadvantage of these methods is their large error in determining medium and low concentrations at the level of 1% or less. The error is related to the need to sum the element concentrations up to 100% to exclude the experimental factor from the model equations. Because of this, small errors at high concentrations are transformed into large errors at low concentrations. This disadvantage, however, is not inherent in single-point calibration methods that do not use such summation or use it only as part of the procedure [
10,
11,
12,
13,
14]. Another source of error may be the inadequacy of the model of a homogeneous isothermal plasma to the parameters of a real plasma [
17]. Errors can also arise due to uncertainties in spectroscopic parameters and experimental factors, such as neglecting the light-collection geometry [
18]. Gornushkin et al. [
19] studied the factors of optical density, plasma inhomogeneity, line overlap, noise, spectral resolution, electron density, and path length that affect the accuracy of quantitative analysis by CF-BP–LIBS.
Another group of methods belonging to the second category (direct problem) was proposed by the authors [
20,
21,
22,
23]. These methods are based on generating synthetic spectra by using the collision-dominated model of a homogeneous isothermal plasma in LTE (see, for example, Reference [
21]) and comparing these spectra with experimental ones. Their advantage is that there are no requirements for optical thinness and deconvolution of overlapping lines; these effects are automatically accounted for when generating synthetic spectra. Yaroshchyk et al. [
20] developed an automated standard-free LIBS method that allows for a fast multi-element analysis. The plasma spectrum was represented by a system of simultaneous algebraic equations, which were solved by using the singular value decomposition algorithm. Gornushkin et al. [
21] developed a radiation dynamic model of the post breakdown laser plasma in which the problem of determining the concentration of elements was solved by a direct comparison of the calculated synthetic spectra with the experimental ones. Simulated annealing Monte Carlo optimization was used to determine the plasma temperature and density. In a subsequent paper, Herrera et al. [
22] compared CF-BP–LIBS with simulated annealing Monte Carlo (MC–LIBS) by analyzing aluminum alloy samples ablated into vacuum. They found that the relative concentrations obtained with CF-BP and MC–LIBS were comparable in magnitude with relative errors of 30–250%. It was argued that the improvement of the spatial and temporal resolution of the experiment is no less important than the refinement of theoretical models. Demidov et al. [
23] developed a new MC–LIBS algorithm suitable for graphical processing unit (GPU) computing, in contrast to central processing unit (CPU) computing, which requires unacceptably long processing times. The reduction in computation time was achieved through massive parallel computing on GPUs containing thousands of coprocessors. The performance of MC–LIBS was tested on the spectra of mixtures of metal oxides CaO, Fe
2O
3, MgO and TiO
2, which simulated by-products of metallurgical production, steel slags. Comparison with CF-LIBS showed that the accuracy of the MC–LIBS and CF-LIBS methods is the same for this type of sample.
In the abovementioned MC–LIBS papers [
21,
22,
23], the effectiveness of the method was evaluated by using experimental spectra. Therefore, it was difficult to separate errors due to instrumental factors from errors due to the method itself, for example, due to the stochasticity of the method. In this work, we continued to improve the MC algorithm [
23] and study its internal characteristics, which were not considered in previous publications. The reliability of the algorithm was tested on synthetic spectra simulating samples of metallurgical slag. These spectra are free from instrumental factors and completely correspond to the mathematical model of a homogeneous isothermal plasma in LTE. This work should prove that MC–LIBS is a viable alternative to CF-BP–LIBS that can provide higher accuracy of CF analysis for both high and low concentrations.
2. Materials and Methods
The plasma is assumed to be isothermal and uniform at local thermodynamic equilibrium (LTE). The radiation along a line of sight is given by the following equation:
where
is the spectral intensity,
is the Planck function, and
is the optical density. The optical density can be factorized into two terms, namely a wavelength-dependent and wavelength-independent optical density:
Here, where and are the elementary charge and mass, and are the speed of light and Boltzmann constant, is the permeability of free space, is the wavelength in the line center, is the degeneracy of the lower transition level, is the atomic or ionic partition function, and are the lower and upper transition energies, is the number density of atomic or ionic species, and is the radiation path length through the plasma. Term represents a line shape function (Gaussian, Lorentzian, or Voigt). In our algorithm, two functions are tested that are typical to LIBS spectra: Lorentzian and Voigt.
A Monte Carlo (MC) algorithm minimizes a cost function that signifies the difference between synthetic and experimental spectra. During the minimization, the physical parameters of the model (
are varied and gradually approach that of experimental plasma. After finding the minimum, the sought-for parameters of the experimental plasma are read from the model. Mathematically, the problem is expressed by Reference [
23]:
where
is the cost function to be minimized;
and
are the experimental and synthetic spectra (dependency of
and
upon
is omitted); and
D is the
-dimensional search domain, where
is the number of chemical elements considered in the model.
A cost function can be any suitable metric that is sensitive to a difference between two sets of data. For example, one can use a correlation coefficient for the construction of the cost function:
Here,
and
are the intensities of the experimental and synthetic spectra at wavelength
, and
and
are their corresponding averages over a wavelength range. Function (4) is sensitive to mutual positions and intensities of spectral lines on two compared spectra and depends on the cosine of an angle between two vectors. The vectors represent synthetic and experimental spectra in a multidimensional space,
, where
is the number of spectral points (
). If the vectors are collinear, the two spectra perfectly match and
. The contribution of an element to the cost function depends on its concentration and number of spectral lines available for this element. To equalize contributions from all elements, weights (
) are added in Equation (4):
To calculate , equal weights () are first assigned to all elements regardless of their concentrations; , with being the number of elements. The contribution of each spectral line of a given element is then calculated based on the integral intensity of this line divided by the sum of integral intensities of all lines belonging to this element: where
is the integral intensity of line of element , and is the number of lines available for this element. The integral intensities of all lines are recovered from the experimental spectrum. A full spectral grid is split into spectral fragments so that and denote the lower and upper boundaries of a particular fragment Each fragment may contain one or several lines of the same or different elements. The weight of each fragment is then determined by a simple relation: . The weighting of the cost function equalizes its sensitivity to both weak and strong lines, making it possible to determine trace elements with the similar accuracy as the main ones.
The main concept of the MC–LIBS method is to minimize the cost function, which measures the similarity between model-generated and experimental spectra. This is a non-linear problem (Equation (1)) that needs to be solved in a high-dimensional space (Equation (3)). Standard optimization methods, such as, for example, Newton–Raphson or Levenberg–Marquardt, are inefficient in this case, since the solution can be caught in some local minimum or maximum. Therefore, we use a global optimization algorithm that works as follows.
Many initial random combinations (configurations), , of plasma parameters (, , and ) are taken from hypercube in Equation (3) and used for generation of synthetic spectra. Each configuration is represented by a point in box that has volume, , in a phase space of plasma parameters. Values of the cost function are calculated for these initial configurations, and smaller subset of points () is chosen that corresponds to smallest values of . Boxes of smaller volumes, , are then built around each such point. In a next iteration, a fraction, , of configurations is taken from the original box , while another fraction, , is taken from smaller boxes , where . After calculating the cost functions for the new set of configurations, new points are chosen for the smallest values of the cost function, and new boxes are built around those points such that , and so on. As a result, a configuration is found that yields the global minimum of the cost function without a danger of being trapped in local minima. The adjustable parameters of the optimization are the total number of configurations, ; number of boxes, ; rate of reduction of volumes, ; and fraction of configurations, , taken from small, , and large, , boxes.
To accelerate the described method, a large number of synthetic spectra can be calculated in parallel. The number is determined by the available processors. With the help of graphics processing units (GPUs), the parallel calculation of millions of spectra is thus possible.
3. Results
The Monte Carlo algorithm is run on a GPU card. A typical GPU works with vectors rather than matrices; matrix operations are prohibited. Therefore, for arrays with dimensionality greater than 1, say , only one data dimension, e.g., , can be simultaneously processed by the GPU (parallelized) while two other dimensions, and , are run within a nested loop on the CPU (central processing unit). For efficient operation, the number of such CPU-loops should be maximally reduced. In the proposed MC algorithm, the plasma parameters are calculated on the GPU for ~105–106 simultaneous configurations at each wavelength scanning the whole wavelength range in a loop on the CPU. To reduce time for looping on the CPU, narrow spectral fragments around chosen lines are selected. The selected lines are bracketed within intervals with margins of plus–minus 10–15-line widths from line centers. Such intervals are found to be optimal for reliable subtraction of a baseline. The algorithm is implemented on the @MATLAB 2020b platform, using a desktop 3 GHz PC with a NVIDIA Tesla K40 graphical card.
The baseline subtraction is important for finding true heights and widths of spectral lines that are otherwise affected by a radiation continuum and neighboring lines. This procedure is especially important for weak lines that sit on the wings of strong lines. In this work, a polynomial approximation of the baseline is used [
24]. Polynomials of powers from 1 and 10 are sequentially tested to find the optimal one. For each tested polynomial, the baseline is subtracted, and lines are approximated by either a Lorentzian or Voigt function
in the exponent of Equation (6):
where
, and
are the fitting parameters. The optimal polynomial is determined by the minimal error of the least-mean-square fit.
An observed line profile may consist of several profiles; moreover, an individual atomic or ionic line profile can be broadened by self-absorption and instrumental function. A task is to retrieve original line profiles from the observable spectrum. It is postulated that the width of each line in the iterated synthetic spectrum is equal to the corresponding line width in the observable spectrum, regardless of what the actual parameters of the plasma are. Then the own (not self-absorbed) line width,
, can be extracted by solving the obvious equation:
, where
is the FWHMs (full-width-at-half-maxima) of the experimental line. By combining Equations (1) and (2) with this simple relation, a function is composed:
The root of this function,
, is found numerically by fitting the parameter
(a more detail description can be found in Reference [
19]). It is easy to show that the root always exists for the physical interval
and
represented by Voigt, Lorentzian, or Gaussian functions. Thus, the found
is the own line width that is free from self-absorption broadening. This approach is used to generate lines with unknown Stark parameters; it is not needed for lines with known Stark parameters.
The inherent performance of the MC method was demonstrated with synthetic spectra. A synthetic spectrum was generated that reproduced a spectrum of the slag sample (
Table 1). The major element, calcium, was taken at the concentration 10
16 cm
−3; the concentrations of other elements were calculated based on stoichiometric ratios of corresponding oxides.
The plasma was assumed to be uniform and isothermal, with a temperature T = 10,000 K and size R = 0.1 cm. Seventy-four spectral lines were used, which are given in
Table 2. All of these lines could be clearly identified on the experimental spectrum from a slag sample. No other criteria for choosing the lines were applied; they could be strong or weak, atomic or ionic, or self-absorbed or optically thin. Spectroscopic data for the lines were taken from the NIST database [
25]; the Stark broadening parameters were taken from Griem’s tables [
26] and pertinent works from the literature [
27,
28]. The fragment of the synthetic spectrum is shown in
Figure 1 to illustrate its appearance. Complicating effects were added to the spectrum in the form of a finite spectral resolution (84 pix/nm) and random Gaussian noise (0.5% of maximal spectrum intensity). Considering this synthetic spectrum as experimental one, the task was to retrieve the sample composition by the MC method and compare it to the certified values.
The convergence of the MC algorithm to the same value of the cost function is illustrated in
Figure 2. The algorithm scanned six orders of magnitude in concentrations, two orders in path length, and 10
4 K range in temperatures. Starting eleven times from a random configuration, the cost function consistently converged to a minimum
. Running 50 iterations took ~5 min on the GPU, examining 500,000 configurations per iteration.
The certified–found correlation plot for the artificial slag sample is shown in
Figure 3, and the corresponding accuracy and precision are given in
Table 3. To obtain data given in
Figure 3 and
Table 3, 11 runs by 50 iterations have been performed for each element, starting each time from a random configuration. Since each run takes ~5 min, the total processing time was 5 min × 11 runs = 55 min. Note that, for a practical problem, such extensive calculations are not required; one run will be enough, because the iterations converge to the same value within ±5%. Convergence can be further improved by refining the algorithm on a denser grid.
The points in
Figure 3 show the very small scatter around the 45-degree correlation line, while
Table 3 implies that the relative errors for major and minor elements are below 1% (except for silicon). The relative standard deviation is always below 10%, mostly around 1%; it comes from random noise that was imposed on the spectrum and stochastic character of the algorithm. As one sees from
Table 3, accuracy and precision are slightly worse for elements represented by only a few lines (e.g., only one line at 390.6 nm was available for Si) or weak lines (e.g., Cr I at 357.9 and 359.3 nm shown in the inset in
Figure 1). Note that the accuracy and precision of the MC analysis is the same at both low and high concentrations due to the concentration-independent nature of the method’s errors, unlike the CF-BP method. This favorably distinguishes MC–LIBS from the standard BP method, where accuracy and precision significantly deteriorate toward low concentrations due to the closure condition.
4. Discussion
It can be seen that, even for a synthetic spectrum, the result is not 100% accurate. The reasons for this are as follows. During the iterative reconstruction, the broadening parameters (due to the Stark effect) were not known for all lines. These parameters were determined from Equation (5), where the error is dependent on the accuracy of the line width measurement. Thus, as the noise fraction increases, the error also increases. Two other conditions for successful reconstruction are good spectral resolution to distinguish closely spaced lines and a wide spectral range necessary to represent each element with a sufficient number of lines. In principle, only one spectral line per element is required. However, since the spectra are subject to instrumental noise, or the parameters of the spectroscopic lines are not always known with 100% accuracy, it is desirable to include as many suitable lines for each element as possible. The effect of an insufficient number of lines for Si (only one) leads to a larger relative error of its determination (see
Table 3).
Experimentally, the above conditions require operation with a wide-range high-resolution spectrometer, such as an echelle. It should also be noted that the spectrometer must be carefully calibrated with a standard light source to account for the uneven spectral response of the light detector.
Further, the Monte Carlo CF method is based on an oversimplified model of laser-induced plasma in LTE, in which plasma is assumed to be (i) isothermal, (ii) uniform, and (iii) stationary, and (iv) light is collected along a single line-of-sight. None of these conditions is fully satisfied in real plasma and experiment. Nevertheless, the assumption can still be a reasonable approximation if the experiment is well-planned. Conditions (i) and (ii) can be met by choosing the correct gating for the detection of LIBS spectra: the start of the gate must be delayed with respect to the laser pulse enough for the plasma to thermalize (i.e., equilibrate translational temperatures of electrons and heavy particles). At the same time, the gate length must be short enough to consider the plasma frozen, but also long enough to collect enough light and not lose sensitivity. Condition (iii), stationarity, is provided, again, by the short gating of plasma emission. Conditions (i)–(iii) assume the use of a gated ICCD camera for light detection rather than a CCD camera. Condition (iv) can be provided by diaphragming the light collection path; a top-view geometry could be the most suitable one.
Thus, despite the very promising results of Monte Carlo analysis with a synthetic spectrum (~1% accuracy and precision), similar results for experimental spectra can turn out to be worse (see, for example, References [
22,
23]), unless special measures are taken to properly organize the experiment considering the above requirements. It is not difficult to ensure the required experimental conditions, in which case the real efficiency of the method can approach the theoretical one. The relatively long processing time (minutes) of each spectrum can hardly be considered a limitation, given the ever-increasing power of modern computers.