1 Introduction

The development of numerous spectroscopic methods and techniques is a result of the requirement for the fast, accurate and selective monitoring of atmospheric pollutants. Photoacoustic spectroscopy (PAS) is a very successful detection technique for air pollutants due to its universality, high sensitivity, high selectivity, wide dynamic range, simple handling and fast data processing. PAS is a powerful technique for the infrared linear and nonlinear absorption and relaxation processes of molecules in different gas mixtures [1,2,3]. For the temporal shape analysis of the pulsed infrared photoacoustics signal, we employed artificial neural networks to investigate SF\(_6\)–Ar mixtures in a multiphoton (MP) regime. Knowledge of the infrared absorption and nonradiative relaxation of molecules in the atmosphere is important for different models of energy transfer responsible for global warming and climate change. The \(\hbox {SF}_{6}\) molecule is a typical greenhouse gas with high infrared absorption and energy transfer potential [4, 5] which can have a significant impact on the climate in the future.

Many studies have been published on the multiphoton excitation (MPE) of polyatomic molecules [4, 5]. Multiphoton absorption (MPA) in various polyatomic molecules in the gas phase can be characterized by the dependency of the average energy absorbed by one molecule on radiation energy fluence \(\Phi \). The functional dependence of the MPA signal amplitude (intensity and shape) and other physical parameters (spatial and temporal laser beam characteristics, excited molecules relaxation time) on laser fluence \(\Phi \) is the most commonly measured characteristic in experiments in MPA. Small variations in \(\Phi \) could change well-known dependencies and mask the real ratio between the absorption efficiency of the \(\hbox {SF}_{6 }\) and other trace gases within the same experimental conditions [6,7,8,9]. In our investigation, Ar was used as the buffer gas due to its simplest case collisional behavior and the absence of vibrational-to-vibrational energy transfer between the absorbing molecule and buffer [4, 7]. Using pulse photoacoustic spectroscopy (PAS), the absorption and relaxation processes in the gas mixture were analyzed based on features of the generated acoustic waves, which are determined by the propagation medium and sound source temporal and spatial characteristics.

Computational intelligence has proven itself as a practical and powerful collection of techniques with successful applications in numerous fields. Artificial neural networks (ANNs) are a powerful tool which is complementary to conventional approaches for classification, pattern recognition and prediction. Several important features including high processing speeds and the ability to learn the solution to a problem from a set of examples make ANNs suitable for application in photoacoustics. One feature of ANNs is that they are capable of recognizing the shape of the PA signal and simultaneously in real time developing a spatial profile of the laser beam, in order to determine the relaxation time of the excited molecule and the distance from the microphone to the laser beam. Further development of the already successful implementation of ANNs in photoacoustics [10] is proposed here through the application of determining the laser fluence \(\Phi \). As mentioned above, in MPA experiments the laser fluence \(\Phi \) can fluctuate between two consequent pulses, changing intensity I significantly. In order to control and overcome such changes, artificial neural networks can be applied to recognize the values of \(\Phi \) in real time, with improved accuracy. Since this method of simultaneously determining the spatial characteristics of laser radiation, laser fluence and relaxation time works in real time, it can be considered as a substitute for the instruments used to measure spatial profiles for higher laser beam intensities.

In previous articles, we have shown that the three experimental parameters (relaxation time \(\tau _{V-T} \), distance between the laser beam and microphone r*, and laser beam spatial profile R(r)) can be calculated in real time simultaneously with the help of intelligent photoacoustics methods. Now we show that the simultaneous calculation of four independent parameters (\(\tau _{V-T} \), r*, R(r) and laser fluence \(\Phi )\) can be carried out in real time using a more complex neural network, thereby combining our previous results [10, 11] and the results developed here. The agreement between the experiment and simulation results is about as good as can be expected. The opportunity for expanding the number of parameters that can be simultaneously calculated exists through knowing the relationship between the laser fluence and the intensity of the photoacoustics signal (the concentration of the absorbing molecules and an instrumental “one point” calibration factor as defined in [11]). We believe that this work appears promising as a basis for developing a versatile and comprehensive instrument that can carry out the real-time measurements of trace gas analysis, at the same time controlling some instrumental parameters as well.

2 Theoretical Background

The intensity of the PA signal is directly proportional to the energy absorbed and the concentration of the absorber. The shape of the PA signal is determined by the relaxation characteristics of the gas mixture, and it also depends on the excitation energy density (or spatial distribution of the absorbing molecules). Therefore, the spatial profile of the laser beam should be investigated in more detail. The shape of an acoustic wave generated by a given energy source can be calculated by solving the nonhomogeneous linearized wave equation [12, 13]:

$$\begin{aligned} \frac{\partial ^{2}\delta p(\mathbf{r},t)}{\partial t^{2}}-c^{2}\Delta \delta p(\mathbf{r},t)=S(\mathbf{r},t) \end{aligned}$$
(1)

where \(\delta p\left( {\mathbf{r},t} \right) \) is the pressure discrepancy from its equilibrium state value, c is the speed of sound and S(rt) is the source function. The source function S(rt) is determined by means of its spatial and temporal characteristics. If the distribution of the excited molecules at location r and time t is given by energy function E(r \(, t) = R\)(r)T(t), then the source function is defined as [13]:

$$\begin{aligned} S(\mathbf{r},t)=-\frac{\partial ^{2}E(\mathbf{r},t)}{\partial t^{2}}H(t)-\frac{\partial E(\mathbf{r},t)}{\partial t}{\delta }(t) \end{aligned}$$
(2)

where H(t) is the Heaviside step function and \(\delta (t)\) is the Dirac delta function. The spatial part R(r) of the energy density E(r,t) is determined by the geometrical characteristics of the laser radiation and absorption properties of the medium. The temporal part T(t) describes the evolution of the excitation energy, i.e., relaxation characteristics of the excited molecules. It can be presented as:

$$\begin{aligned} T (t) = \mathrm{exp} (-t / \tau _{V\_T}) \end{aligned}$$
(3)

Two of the methods used to solve the wave equations for a known source function and defined initial and boundary conditions are: (a) Fourier transform and (b) Green’s functions method. Green’s functions method allows us to calculate the photoacoustic signal for an arbitrary laser beam profile and excitation energy decay. The general solution of linearized wave equation (1) using Green’s functions method can be written in the form:

$$\begin{aligned} \delta P(\mathbf{r},t)=\int {d^{3}{} \mathbf{{r}'}\int {d{t}'g(\mathbf{r},t|\mathbf{{r}'},{t}')S(\mathbf{{r}'}} } ,{t}'), \end{aligned}$$
(4)

where g(r , t \({\vert }\) r \(^{\prime }\) \(, t^{\prime }\)) is Green’s function for a 2D wave equation. Green’s function can be numerically averaged over the spatial part (e.g., the laser profile) in cylindrical geometry. For the averaged Green’s function \(G\left( {r,t-t^{\prime }} \right) \) in cylindrical geometry, an acoustic wave takes the form:

$$\begin{aligned} \delta P(\mathbf{r},t) =-\frac{\partial T(0)}{\partial t}G(r,t)-\int \limits _0^t {\frac{\partial ^{2}T}{\partial t^{2}}} G(r,t-{t}')d{t}' \end{aligned}$$
(5)

The acoustic wave obtained consists of two components: a positive-going condensation peak of amplitude \(P^{+}\), followed by a negative-going rarefaction peak of amplitude \(P^{-}\). The amplitude ratio \(P^{-}\) /\(P^{+}\) depends on the quantity \(\varepsilon \), defined as:

$$\begin{aligned} \varepsilon =\frac{\tau _p }{\tau _{V-T} }=\frac{r_L }{c\tau _{V-T} }, \end{aligned}$$
(6)

where \(r_{\mathrm{L}}\) is the distance from the microphone to the center of the laser beam and c is the speed of sound inside the experimental chamber for the given gas mixture.

Dimensionless parameter \(\varepsilon \) is suitable for calculations and used instead of the relaxation time \(\tau _{V-T} \). Another useful dimensionless quantity reduced time t* can be written as \(t*= t\)/ \(\tau _\mathrm{p}\), where t is the time and \(\tau _\mathrm{p}\) is the sonic transit time (\(\tau _\mathrm{p}= r_{L}/c)\). Based on Eq. 6, it can be concluded that for constant temperature (constant c) and geometrical conditions (constant \(r_{\mathrm{L}})\), it is only changes in a relaxation parameter that change the value of parameter \(\varepsilon \). The shape and intensity of the photoacoustic signal are changed too. The method for laser fluence recognition proposed in this paper includes a constant value of parameter \(\varepsilon \) and shape of the PA signal. The intensity of the PA signals \(P^{+}\) is directly proportional to the absorbed energy \(E_\mathrm{a}\), and their ratio is constant for the constant concentration of the absorbing molecules [11]. The PA signal intensity varies with changes in the absorbed energy (the shape of the PA signal remains the same). Also, the intensity of the PA signal depends on the geometric parameters of the system such as the radius of the laser beam \(r_\mathrm{L}\) and the distance r between the beam and the microphone. These experimental parameters define dimensionless quantities r* (\(r^{*}=r/r_L )\). Although changes in parameter r* (different positions of the photoacoustic cell, blend, etc.) can substantially change the PA signal intensity, it is not the case in our study.

We recently developed a method based on analysis of the photoacoustic signal temporal shape which employs computational intelligence to simultaneously calculate the symmetric laser beam spatial profile, vibrational-to-translational relaxation time (\(\tau _{V-T} )\) and distance from the laser beam to the absorption molecules \((\hbox {SF}_{6})\) within the photoacoustic cell (r*) [10, 14,15,16]. Previously, a mathematical algorithm developed for photoacoustic tomography (PAT) was used for simultaneous determination of the laser beam spatial profile and relaxation time [17], but practical usage of this method is limited due to the long computational time. The main aim in our previous research was to improve the existing experimental apparatus in order to avoid additional optical instruments for measuring the spatial profile of the laser beam. Random variation of the spatial profile of the laser beam increases the error in determining the important parameters of MPA. Computational intelligence applied to the simultaneous calculation of the laser beam spatial profile and \(\tau _{V-T} \)values provides results for times ranging around a few microseconds. The real-time operation provides exact knowledge of the laser beam profile during two consecutive pulses and allows its correction [15,16,17].

3 Neural Network Laser Fluence Recognition

Artificial neural networks are highly parallel connectionist systems modeled on biological neurons [18]. Neural networks represent a computational paradigm in which the solution to a problem is learned from a set of examples. Computational power in an ANN is derived from the density and complexity of the interconnections. Here, feedforward multilayer perception networks were used, which were trained in an offline batch training regime to recognize the values of laser fluence \(\Phi ,\) and above-mentioned quantities \(R\left( {\varvec{r}} \right) \), \(\tau _{V-T} ,_{ }\) and r* from the intensity and shape of the given PA signal. A simple ANN is composed of several layers: the input layer, a number of hidden layers and the output layer. Between the layers are connections containing weights. Determination of the weights is called learning or training. Neural networks used for laser fluence recognition are trained by a supervised learning process in which the network is supplied with input vectors (PA signals) together with corresponding target vectors (characteristic parameters of the laser beam, i.e., \(\Phi \) values). The weights are chosen during the training process so as to minimize the error. Once the weights have been fixed, new data can be processed by the network very rapidly, which is an obvious advantage of ANNs. A suitable error function is defined with respect to a set of data points, and is usually defined as the squares of the individual errors summed for all output units and for all patterns. For a multilayer perceptron, there is a computationally efficient procedure for updating the connection weights based on the technique of error backpropagation. Another important issue, generalization, shows the ability of the network to perform with newly presented data which did not form part of the training set. To achieve successful generalization, we consider three data sets: the training, test and validation sets.

The ANN developed for the simultaneous determination of R(r), \(\tau _{V-T} \), and r*, had theoretical PA signals as training, validation and testing inputs. The PA signals were calculated using the Fourier transform method and Green’s functions method [10] for a specific laser beam profile and exponential excitation energy decay, in accordance with the experimental conditions. With the aim to improve and compare the experimental results in real time, an additional parameter had to be taken into account: the photoacoustic signal intensity I and corresponding values of the laser fluence \(\Phi \) (Fig. 1). The ANNs used in this study, presented in Fig. 1, had an input layer, one or two hidden layers and an output layer. Structures with up to two hidden layers were selected on the basis of numerous experiments and performance trials. The architecture of the ANNs consisted of four neurons in the output layer (three output neurons to be included by merging with our previously published results). The outputs of the neural network were: value of \(\varepsilon \), value of \(r^{*}\), profile shape class and laser fluence \(\Phi \). The Levenberg–Marquardt algorithm was used to train the feedforward multilayer perception network. The mean squared error was used as a performance measure during training. Three outputs of the neural networks were estimated values of \(\varepsilon \) and \(r^{*}\) (previously defined), and the profile shape class, which distinguished: Gauss, top hat, Lorentz and Lorentz with the hole laser beam profiles [10]. Additional output of the network estimated the value of \(\Phi \).

In contrast to our previous results in which we introduced neural networks capable of determining three parameters from a PA signal (\(\tau _{V-T} \), r, R), the networks developed here demonstrate that a fourth parameter, laser fluence \(\Phi \), can be determined with the same success. We therefore kept the sampling of the PA signal in 21 or 28 points, maintaining compatibility with our previous results. This approach makes it possible for the three previous parameters and the fourth parameter introduced here to be estimated by two separate networks in a parallel fashion, or be combined into a single network’s solution to estimate all four parameters, as illustrated in Fig. 1. A combined solution is more elegant, but it demands a more complex network structure, while a parallel solution is less elegant but clearly separates the additional results presented here from our previously published results.

Fig. 1
figure 1

ANN trained to recognize laser fluence \(\Phi \) from PA signal intensity, with possibility of extension for simultaneous determination of the profile shape class, vibrational-to-translational relaxation time (\(\tau _{V - T})\) and distance from the laser beam to the absorption molecules \((\hbox {SF}_{6})\) within the photoacoustic cell (r*)

4 Experimental Results

A typical experimental photoacoustic device to investigate samples in the gaseous phase and measure the relaxation time consists of a laser, photoacoustic cell and a microphone. The TEA \(\hbox {CO}_{2}\) laser with a 45-ns FWHM pulse was used as a nonfocused beam source. The beam spatial profile was defined by the iris. The iris defines a characteristic spatial profile consisting of concentric rings. The number of rings depends on the iris size, wavelength and so on. Usually, we have had only one ring; thus, this profile can be described by the Lorentz profile with the hole. The profile was not quantified by other methods, but it was visualized by thermal tape or a graphite plate. The stainless-steel photoacoustic cell was 18.5 cm long and had a diameter of 9.3 cm. We examined the gas mixture \(\hbox {SF}_{6}\)–Ar. Measurements were carried out on the mixture under a pressure of 100 mbar with a fluence range of 0.2 J\(\cdot \hbox {cm}^{-2}\)–1.5 J\(\cdot \hbox {cm}^{-2}\). The absorber pressure \((\hbox {SF}_{6})\) was kept constant at 0.47 mbar. With such experimental conditions, we can assume that all of the irradiated molecules took part in the excitation processes, allowing for the average number of absorbed photons and those corresponding to the real excitation level of molecules to be calculated [4]. Also, our experimental results confirmed that, for a fixed total \(\hbox {SF}_{6}\)–Ar pressure, the variations of \(\varepsilon \) (\(\tau _{V-T} )\) as a function of the real excitation level are much smaller than those due to noise deviations, especially at lower fluences [4, 8]. The photoacoustic wave generated was detected by an appropriate microphone (Knowles Electronics Co., Model 2832), which was placed in the chamber. The experimental settings contained optical (beam splitter, lenses) and additional instruments (joulemeter, photon-drag detector, oscilloscopes), a vacuum system and a system for introducing gases.

Experimental PA signals were obtained for five different values of \(\Phi \) (0.2, 0.4, 0.6, 0.8, 1.0 and 1.4) J\(\cdot \hbox {cm}^{-2}\). These values fulfill the conditions for the study of MP processes in a gas mixture. The experimental PA signals obtained from the \(\hbox {SF}_{6}\)–Ar gas mixture for five different \(\Phi \) values are shown in Fig. 2. The theoretical PA signals were calculated using Green’s function method for parameter \(\varepsilon = 3.6\) for the Lorentz with the hole profile shape, which corresponds to the experimental setup. A comparison between the five experimental PA signals and a single theoretical PA signal is presented in Fig. 2, revealing mainly satisfactory agreement. Still, there are certain disagreements between theoretical and experimental PA signals. Discrepancies between the signals are the result of variations in the laser beam profile (nonideal profile in experiments). The difference between the theoretical spatial laser beam profile and the real laser beam (experimental) profile leads to the difference between the theoretical and experimental signal. In some cases, small deviations may occur due to different deexcitation dynamics, particularly in the case of MP processes. The \(\hbox {SF}_{6}\)–Ar mixtures investigated under our experimental conditions for their pressure and fluence ranges satisfy the exponential decay approximation. The influence of the laser beam spatial profile and excitation energy decay on measuring the relaxation time and calibration of the photoacoustic system has already been explained in detail [19].

In PAS experiments, the signal measured corresponds to the pressure change detected by the microphone. Some deformations of a real signal may arise due to pressure changes. We should note that the existing disagreements between the theoretical and experimental signal are caused by numerous factors, and this has some influence on the accuracy of the computational intelligence method proposed in this paper (Table 1).

Fig. 2
figure 2

Comparison of five experimental signals (obtained from \(\hbox {SF}_{6 }\)–Ar mixture for absorber pressures of \(\hbox {p}_\mathrm{SF6}=0.47\) mbar and \(\mathrm{p}_\mathrm{total}\) = 100 mbar) for laser fluences \(\Phi = (0.4, 0.6, 0.8, 1.0, 1.4)\hbox { J}\cdot \mathrm{cm}^{-2 }\) and single simulation signal for \(\Phi = 1.0 \hbox { J}\cdot \mathrm{cm}^{-2}\). The theoretical signal was calculated for the Lorentz with the hole laser beam profile and for the parameter \(\varepsilon = 3.6\). Signal intensity is shown in arbitrary units (a.u.), and the x-axis values represent reduced time \((t^*)\). Discrepancies between experimental and theoretical signals are caused by well-known phenomena

Table 1 Results—training by simulation, guess of experimental data

The average number of absorbed photons per molecule <n> is a function of fluence \(\Phi \) . It was found that the average number of photons absorbed per molecule <n> is proportional to \(\Phi ^{2/3}\) [20]. Also, the intensity of the PA signal is a function of fluence \(\Phi \) through the number of absorbed photons <n>. We define the PA signal intensity I as the maximum value of the first peak \(P^{+}\) [11]. We measured the absorbed energy based on the transmitted energy for a cell filled by the gas mixture and the transmitted energy for the evacuated cell. Due to low absorption, the number of measurements must be large enough for precise determination of the absorbed energy. The intensity ratio for two PA signals \((I_{1}/I_{2})\) as well as the ratio of absorbed energy \((E_{01}/E_{02})\) must follow the fluence ratio \(\left( \Phi _1 /\Phi _2 \right) {^{2/3}}\). This dependency was proven on a set of theoretical and experimental PA signals. The validity of these relations has enabled us to form an input set of theoretical PA signals for network training which contains the necessary information about laser fluence, in order to achieve good generalization in the network. Using this known relation between the signal intensity I and laser fluence \(\Phi \), and based on comparison between the experimental and theoretical (for the Lorentz with the hole profile shape) signal intensities, we defined a sufficient number of PA signals for the network training.

Fig. 3
figure 3

ANN training dataset of 71 simulation PA signals for laser fluence \(\Phi \) ranging from (0.2 to 1.5) \(\hbox {J}\cdot \mathrm{cm}^{-2}\). Dataset of 71 PA signals was calculated using Green’s function method for Lorentz with the hole spatial laser beam profile and parameter \(\varepsilon = 3.6\), which provide the best match with the experimental PA signal

Fig. 4
figure 4

ANN fit for five different laser fluence values, \(\Phi = (0.4, 0.6, 0.8, 1.0, 1.4)\hbox { J}\cdot \mathrm{cm}^{-2}\). Solid line and dotted line of the same color are experimental and ANN fit, respectively (signal intensity in arbitrary units is a function of reduced time \(t^*\))

Datasets for the network training, validation and testing were randomly selected from the same dataset of 71 PA signals calculated using Green’s function method for parameter \(\varepsilon = 3.6\) and spatial laser beam profile Lorentz with the hole. The Lorentz with the hole profile provides the best match with the experimental PA signal [10]. A complete dataset of 71 theoretical (PA) signals for network learning is shown in Fig. 3. In order to form a statistical model for network generalization, the dataset is divided into: the training, test and validation sets. The training set, that contained 49 PA signals with a corresponding pairs of input–output data, was presented to the network during training. The ANN adjusted the weights during training in order to obtain a minimal error. The validation sample (11 PA signals) was used to measure the network generalization during training. Error in the validation sample was monitored during training, and the training was stopped when the ability to generalize stopped improving. The testing sample of 11 PA signals had no effect on training and provided an independent measure of network performance during and after training. To evaluate the error, a test set was used. When the training of the network was completed, it was able to process new experimental PA signals (with unknown parameters) in the application phase and produce reasonable output instantaneously with sufficient accuracy. The optimum number of neurons required in the hidden layer depends on the complexity of the input and output data. The network inputs were 21 or 28 equidistant points, which proved to be sufficient for efficient network operation. All the PA signals were sampled at 21 or 28 equidistant points on the t* axis.

The method was tested by five experimental PA signals with different \(\Phi \) values. The estimated values of the parameter \(\Phi \) and errors in the percentages are shown at Table 1. The error bars are lower for higher fluences because the signal-to-noise ratio is the best at the highest fluence. The ANN fit for five different \(\Phi \) values is illustrated in Fig. 4, which shows that the difference presented in Fig. 2 between the experimental and simulation signals used for the ANN training is similar to the ANN results. We can conclude that for the given task the ANN performed efficiently, but some differences between the real and estimated \(\Phi \) values occurred for reasons which have already been discussed.

5 Conclusion

ANNs as a technique is currently having a vast practical impact in measurement technology and many other fields. Feedforward neural networks are very suitable for modeling nonlinear relationships and are particularly useful in solving problems for which there are no suitable conventional mathematical models. Neural network training can in some cases be computationally intensive and slow, but in the implementation phase feedforward networks have high speed parallel data processing as an inherent feature. In this paper, we have focused our attention on artificial neural networks applied to the problem of determining the values of \(\Phi \), based on the intensity of theoretical and experimental PA signals. One of the easily varied parameters in an MPE experiment is laser fluence \(\Phi .\) Variations in fluence \(\Phi \) produce profound changes in the absorption cross section and the dissociation probability. This could mask the real ratio between the absorption efficiency of the \(\hbox {SF}_{6 }\) and other trace gases within the same experimental conditions. To prevent such changes, neural networks can be applied to recognize the values of \(\Phi \) in real time from the intensity of the PA signal.

The proposed method for the application of computational intelligence to photoacoustic measurements was successfully tested by theoretical and experimental PA signals. Trained networks were capable of recognizing four parameters simultaneously: the laser beam spatial profile, excited molecule relaxation time, distance between the laser and the microphone and laser fluence. The networks were trained using the calculated (theoretical) PA signals adjusted for our experimental setup. This methodology can be used to efficiently find the parameters of unknown (experimental) PA signals with acceptable precision. In the application phase, ANNs determine the laser fluence and the aforementioned parameters practically instantaneously, providing real-time operation. These advantages of the computational intelligence method allow for its more efficient usage in trace gas monitoring with the possibility of its application for higher intensities of laser radiation. Although the solution to the problem of finding \(\Phi \) values from theoretical PA signals networks is satisfactorily precise, it is necessary to improve the accuracy on a set of experimental PA signals. As explained, there are several reasons which cause the differences between theoretical and experimental signals, and consequently differences in the real and estimated values of \(\Phi \). Further directions of our research could be to improve precision in determining the parameter \(\Phi \) on a set of experimental PA signals with the application of fuzzy systems or by applying more complex hybrid neuro-fuzzy-genetic solutions. Also, as an important research direction, along with the analysis of atmospheric pollutants considered here, is to consider more practical applications and case studies for our methodology in order to further prove its usability.

As we have mentioned before, we believe that this intelligent photoacoustic approach could thoroughly establish the ground work to fulfill the goal of developing a versatile instrument capable of tracing and monitoring gas species with a self-correction capability. Such an instrument could be a completely application-oriented system, one that does not need any change in the experimental setup, and all are just matter of modified software.