Tailored Algorithm for Sensitivity Enhancement of Gas Concentration Sensors Based on Tunable Laser Absorption Spectroscopy

In this work, a novel tailored algorithm to enhance the overall sensitivity of gas concentration sensors based on the Direct Absorption Tunable Laser Absorption Spectroscopy (DA-ATLAS) method is presented. By using this algorithm, the sensor sensitivity can be custom-designed to be quasi constant over a much larger dynamic range compared with that obtained by typical methods based on a single statistics feature of the sensor signal output (peak amplitude, area under the curve, mean or RMS). Additionally, it is shown that with our algorithm, an optimal function can be tailored to get a quasi linear relationship between the concentration and some specific statistics features over a wider dynamic range. In order to test the viability of our algorithm, a basic C2H2 sensor based on DA-ATLAS was implemented, and its experimental measurements support the simulated results provided by our algorithm.


Introduction
Gas sensors based on Tunable Laser Absorption Spectroscopy (TLAS) are widely used due to their high sensitivity and selectivity. Moreover, there currently exists a wide range of laser options to implement this application. Generally, TLAS can be performed in two different modes: Line Locked Tunable Laser Absorption Spectroscopy (LL-TLAS) or Analytical Tunable Laser Absorption Spectroscopy (ATLAS) [1]. In the LL-TLAS mode, the emission is ideally matched with the central wavelength of the absorption line, thereby the overall laser intensity observed by the detector will be affected as the gas concentration is varied [1][2][3]. In the ATLAS mode, the laser line emission is scanned over the spectral region where the molecule absorbs [4][5][6][7][8][9]. Furthermore, this scanning task can be carried out by two different techniques: Direct Absorption (DA-ATLAS) and Wavelength Modulation (WM-ATLAS) [4]. In the DA-ATLAS case, the laser wavelength is tuned over the spectral region where the gas absorption line occurs; therefore, based on the Beer-Lambert law, the transition line shape and its integrated absorbance can be determined straightforwardly [5]. Here, the laser wavelength is driven typically with a saw-tooth or triangular waveform of a certain frequency. In the WM-ATLAS case, the laser wavelength is also driven with a typical saw-tooth or triangular waveform, but this is also modulated with another faster signal waveform [4,5]. Usually, sensors based on the WM-ATLAS technique have a minimum detectable absorbance in the order of 10 −6 ; this is quite superior to that typically achieved by sensors based on DA-ATLAS, which is in the order of 10 −3 [10]. For instance, the sensor based on WM-ATLAS designed by [6] was able to simultaneously detect CH 4 and H 2 S with a minimum detection limit of 1.1 ppm m and 15 ppm m, respectively. An example of a typical sensor based on DA-ATLAS is the one presented by [7], which can detect a minimum concentration of 0.2% of CH 4 . One disadvantage of WM-ATLAS sensors is that their highest detectable concentration typically lies within a narrow concentration range (<1%), while sensors based on DA-ATLAS usually have a larger dynamic range [10]. Furthermore, as in the ATLAS sensors, the laser line emission is tuned, therefore these will generate an output signal in the time domain. From this signal output, different spectroscopic parameters can be determined depending on the sensor configuration. For instance, there are algorithms in which the measured sensor signals are fitted with Voigt [5,8,11], Lorentzian [9], Voigt-Lorentzian or Voigt-Gaussian functions [4] in order to determine one or more spectroscopic parameters such as the line strength, the line position and the lower-state energy of one or multiple absorption lines [11]. However, for some applications, it is only necessary to determine the gas concentration at ambient temperature and at atmospheric pressure. For instance, for coal mine hazard detection applications, CH 4 sensors with a dynamic range from 0-100% are of interest [12,13], as well as, for this application, sensors to monitor CO, O 2 , C 2 H 2 and CO 2 are required [12]. Here, for gas concentration sensors, simple algorithms can be applied to determine the concentration from the output signal. For example, a relationship can be established between the concentration and one statistics feature of the signal generated by the sensor. Some commonly-used statistics features are the peak amplitude [14], the area under the curve [10] and the Root-Mean Square (RMS) [7]. These kinds of relationships are easy to compute, and therefore, the gas concentration can be determined straightforwardly. However, sensors based on these algorithms commonly have a limited dynamic range since most of these statistics features (peak amplitude, area and RMS) will linearly increase with the concentration up to a certain level. Afterwards, the statistics feature will increase slowly with the concentration due to the effect of saturation in the gas cell. In this range, the relationship between the statistics feature and the concentration will have a nonlinear behavior. Consequently, the sensitivity to the gas concentration will have a quasi constant trend for a limited dynamic range, and afterwards, it will drops rapidly with the concentration. Different optimized designs have been proposed to widen the dynamic range while keeping a high sensitivity. For instance, the sensor developed by [10] reached a dynamic range of 0.005-50% CH 4 , and in this particular case, the concentration was determined by means of the relationship between the area under the curve and the concentration. Hence, there are several gas sensors based on the DA-ATLAS technique for which designers have improved the minimum detectable absorption and also have increased the sensitivity over a certain dynamic range. Some of these enhancements have been based on improving the optical arrangements, optimizing the optical component characteristics and the electronic stages used to recover and to process the signals.
In this paper, a tailored algorithm to widen the dynamic range of sensors based on DA-ATLAS, is presented. Moreover, based on the proposed algorithm, it is shown that it is possible to establish a quasi linear relationship between a tailored statistics feature and the concentration within the wider dynamic range. This consequently allowed us to get a high and quasi constant sensitivity within this concentration range. Furthermore, this algorithm can be applied to currently-designed sensors since it is only necessary to change the way in which the sensor signal output is processed. This new algorithm is based on the combination of different statistical features of the sensor signal output instead to consider just one statistics feature (area, peak amplitude, RMS). This type of statistical analysis is commonly used in digital image processing for texture measurements [15][16][17][18][19][20]. Finally, in order to support the general performance of the algorithm, some experimental results are presented.

Basic Principles of DA-ATLAS Gas Sensors
The principle of DA-ATLAS sensing is based on the amount of light absorbed when it passes through a gas sample. Hence, it is necessary to measure the absorption per each wavelength. Therefore, the laser is tuned over a certain spectral range to resolve the absorption line. The transmitted light intensity through a gas cell can be described by the Beer-Lambert law, which is given as: where I 0 (λ) is the laser intensity before the gas cell, C is the gas concentration, l is the gas cell pathlength and α (λ) is the monochromatic absorption coefficient. The latter was calculated by using the parameter of the HITRAN spectroscopy database [21]. Moreover, the proportion of light absorbed by the gas sample through the cell can be expressed by: Simulated absorption profiles of a (C, l, λ) for different concentration levels and considering that the laser is scanned from 1532.61-1533.04 nm, where one ro-vibrational line of C 2 H 2 occurs, are shown in Figure 1a. Here, it can be observed that the peak amplitude a p = max(a (C, l, λ)) rapidly increases with the concentration. However, how fast the a p reaches the maximum value will depend not only on the sample concentration, but also on the gas cell pathlength. For instance, in Figure 1b, the peak amplitude of the absorption for different concentrations and cell lengths is shown. Here, it can be observed that the longer the cell pathlength, the more rapidly the signal peak amplitude will reach one. Besides, as it approaches one, it becomes almost flat for the rest of the concentration range. Consequently, if the concentration is determined based on the peak amplitude, it is possible to optimize the sensor by selecting the gas cell pathlength in order to have either a low and quasi constant sensitivity over the wide concentration region or have a quite large sensitivity for a narrow range of low concentration levels, since after a certain concentration level, the sensitivity will tend to zero (Figure 1c). In this case, the sensitivity was calculated as da p /dC. Hence, it can be useful to have a different option to analyze and process these absorption profiles, which are the sensor output, to determine the concentration with higher precision, especially in the region where the sensitivity is close to zero. Here, we propose a new algorithm, which helps to conserve the high sensitivity over a much wider dynamic range and also provides a quasi constant sensitivity behavior within this wider range. Additionally, it allows us to have a quasi constant sensitivity over the wide measurement range.

Basic DA-ATLAS Gas Sensor with Two Optical Channels
There exist different sensor configurations to perform the sensing based on DA-ATLAS mode. One of these configurations, which is very popular, is that based on dual channels [3][4][5]7,22]. In this configuration, two channels are ideally formed by equally splitting the light beam before it enters the gas cell. In the measurement channel, the beam passes through the gas cell, and at the output, it is recorded by one optical detector. In the reference channel, the beam does not pass by the measurement cell, and therefore, it directly arrives at another detector. In Figure 2 is shown a general block diagram of a dual channel sensing setup. One advantage of this configuration is that the signals of the measurement and the reference channels can be either subtracted, divided or mathematically combined in order to calculate the transmission, the visibility or the depth of modulation (DM). The D M is an interesting measurement since it is robust to fluctuations of the light source [23,24], and it can be described as: where P R (λ (t)) and P M (C, l, λ (t)) are the power registered by the reference and the measurement detectors respectively when the laser wavelength is at position λ (t). Here, as the laser wavelength will be scanned periodically, therefore it can be represented as a function of time (t). Moreover, D M is unitless, and in our case, g is a proportionality constant to take into account losses or an unbalanced beam splitting ratio, ideally g = 1. In a practical way, g can be calculated as the ratio between the signals provided by the reference and the measurement detectors when the target gas concentration is 0%. Furthermore, Equation (3) demonstrates the advantage of using the two-channel setup, since any source intensity fluctuation will affect both channels with the same magnitude, and therefore, their effects will be minimized when the D M is computed.

Tailoring an Algorithm for Enhancement of the Sensor Sensitivity to the Gas Concentration
In the DA-ATLAS technique, the laser is tuned in one direction to scan the spectral region where an absorption line of the target molecule occurs, and afterwards, it is returned to its initial position ( Figure 3a). This spectral scan can be driven by using, for instance, a saw tooth or a triangular waveform. As an example and in order to explain our algorithm methodology, let us consider that a C 2 H 2 sensor is going to be designed, targeting the absorption line occurring at 1532.8302 nm with a 10-cm gas cell pathlength. Moreover, let us to consider that the laser is tuned within the 1532.61-1533.04 nm range and it is driven with a triangular waveform ( Figure 3a). Here, the time duration of the tuning cycle period (T 0 ) will depend on the frequency at which the laser is tuned. Hence, as the laser is periodically scanned over time, therefore the D M of the output will have a particular waveform in the time domain, as is shown in Figure 3b. For this figure, different concentrations of C 2 H 2 were considered, and it can be appreciated how the peak amplitude of the signal increases with the gas concentration. Furthermore, the D M signal was normalized to 255 considering the standard gray tone scale of image processing. From this figure, it also can be observed that different statistical features of the sensor signal output, such as the peak to peak amplitude, the mean, the RMS and the DC level, are affected by the concentration. Therefore, if the gas concentration is determined based only on the peak amplitude of the signal, more valuable information is wasted. Thus, it is possible to build new algorithms to extract additional information of the statistics features of the sensor output waveforms in order to enhance some sensor characteristics such as the sensitivity and the gas concentration dynamic range.  The algorithm proposed in this work is based on the analysis of the sensor signal output waveforms. Here, for simplicity and normalization purposes, we will consider the number of samples (n) forming a laser tuning cycle. In this way, N will be the total number of samples composing each tuning cycle period (T 0 ), and it also represents the number of scanning steps considered to complete one laser tuning cycle ( Figure 3). The general flow diagram of the algorithm proposed in this work is presented in Figure 4. This steps should be performed for designing a particular gas sensor. According to the flow diagram for implementing the new algorithm, it is necessary to build our generating functions ( f k (C)), which are based on some statistical features of the sensor signal output, such as the mean (m 1 ), the peak amplitude of the signal (A), the entropy (h), the standard deviation (σ) and the k-th momentum over the origin (m k ). These statistics features can be expressed by the following Equations: In Figure 5, the A, σ, h and m 1 -m 5 features from D M waveforms as a function of the C 2 H 2 concentration are shown. From Figure 5a, it can be observed that the parameter A is the one that most rapidly increases with low concentration levels (0-20%). However for higher concentration levels (20-100%), A becomes quite flat meaning that it has become insensitive to concentration changes. Moreover, it can be appreciated that for higher concentration levels, the most sensitive statistics feature is the entropy (h). Furthermore, it also can be appreciated that the mean and the σ present a lower sensitivity to the gas concentration. Finally, it can be appreciated in Figure 5b-e that k-th moments over the origin are quite sensitive for higher concentrations; however, these have the disadvantage that for low concentration levels, their response is close to zero. For instance, in Figure 5e, it can be observed that below a 20% C 2 H 2 concentration, m 5 is practically zero and after this level presents a high slope for the range from 20-100%. Therefore, it can be concluded from this first analysis that some statistics features are quite sensitive to low concentrations levels (A and h) and others to high levels (m k ).

Generating Functions
In order to take advantage of the fact that each statistics feature is more sensitive to different concentration intervals, different ways to combine the k-th moment (k > 1), A, σ, h and m 1 were analyzed. In this way several new functions can be built. From these new functions, we selected one set, called here generating functions, which can be expressed as: where w is a weighting constant to scale the magnitude of the high order moments. In our case, w was considered as the maximum of m 1 within the measurement range, which corresponds to the C 2 H 2 concentration of 100% (w = m 1 (100%)). In Figure 6, it can be observed that the slope of all the generating functions becomes larger the higher the order of the moment about the origin is. Moreover, it also can be appreciated that these functions will have a well-defined inflection point occurring when the k-th moment starts to govern the behavior of the generating function.

Selection of the Optimum Generating Function
As there are infinite possible k values, it is necessary to select only one for each generating function (Equations (8)-(11)). In our case, we decided to look for the k values for which the built generating functions have a quasi linear response to the concentration. Moreover, in general terms, the sensitivity can be calculated as the derivative of the generating function with respect to the gas concentration d f k /dC . Since we are looking for functions with quasi linear response to the concentration (Figure 7), therefore the sensitivity must have a quasi constant behavior within the measurement range. It is important to point out that the k value will not necessarily be the same for each generating function. For instance, for our design example, we found that the optimal k was within the range of 2.0-3.0, 3.5-4.5, 2.5-3.5 and 3.5-4.5 for f k m , f k h , f k σ and f k A , respectively. In Figures 7 and 8, the generating functions ( f k ) for these k intervals, in steps of 0.2, and their corresponding sensitivities are shown, respectively. From Figure 8, it can be observed that the sensitivity of the four generating functions is improved with these k values since these are now much larger than zero and have a quasi constant profile for high concentrations. This shows that by using these algorithms, it is possible to enhance the sensitivity for higher concentrations, which is not possible when the concentration is determined based only on either the peak amplitude, the mean, the RMS or the standard deviation. After we find a range of k values for which the generation functions have a quasi linear behavior, just one of these k values must be selected for each function. For our example, we determined as the optimum k value 2.2, 4.2, 2.9 and 4.1 for f k m , f k h , f k σ and f k A , respectively. In Figure 9a-d, it can be appreciated that each optimal generating function has a very linear behavior compared to that obtained when the A, m 1 , σ or h are computed (Figure 5a). Moreover, these functions present some inflection points due to the combination of different functions and can be precisely fitted with a polynomial.  . In this form, the gas concentration can be calculated by using the expression C r f = ∑ r n=0 p n ( f k ) n , where p n are the polynomial coefficients and r is the degree of the polynomial (Figure 9a-d).
In a practical sensor design, the algorithm should be performed only one time to determine the generating function and its optimal k value. Afterwards, it is only necessary to calculate the generating function based on the sensor output waveform and from this result determine the gas concentration by using the polynomial coefficients. Additionally, the sensitivity for each one of the optimal generating functions is presented in Figure 9e. Here, it can be observed that all of them have an enhanced sensitivity for a higher concentration than obtained with the peak amplitude A of the sensor signal output (D M ). Moreover, from the sensitivity results, it can be observed that f k h and f k A have a larger sensitivity for all the measurement range (0-100%); however, for low concentrations, f k h shows a lower sensitivity than that obtained with f k A . To the contrary, f k A has a high sensitivity to low concentrations similar to that obtained when A is used, but due to the k-moment contribution, it keeps its high sensitivity for the full measurement range. This point demonstrates that the measurement range and the sensitivity of typical gas concentration sensors based on DA-ATLAS can be enhanced by using this kind of tailored algorithm.

Proof of Principle Gas Sensor Setup Based on DA-ATLAS
In order to test the viability of the tailored algorithms, particularly the expansion of the dynamic range and the enhancement of the sensitivity, a basic gas C 2 H 2 sensor was implemented. It was based on a ring fiber tunable laser ( Figure 10). Here, the light of a pigtailed diode laser emitting at λ = 980 nm and delivering a maximum output power of 300 mW was coupled to a Wavelength Division Multiplexer (WDM, Qphotonics QFBGLD-980-200) to pump an Erbium-Doped Fiber (EDF, Newport F-EDF-T3) of 3.4 m in length. Afterwards, the luminescence generated by the EDF traveled throughout the circulator (Thorlabs 6015-3) from Port 1 to Port 2 where a silicon wafer is placed. Port 3 of the circulator was spliced to a 50/50 coupler (Thorlabs 10202 A-50) in order to split the reflected interference spectrum of the wafer into two outputs. One of the 50% outputs was launched to a Variable Optical Attenuator (VOA), which was used to change the spectral gain of the laser to avoid laser emissions in the 1550-nm region. Finally, the VOA was spliced to the WDM-1550-nm port in order to close the ring cavity. The other 50% output of the reflected interference spectrum of the Si wafer was divided by a 50/50 fiber coupler, to form the measurement and the reference channels of the sensor. Here, the laser signal was monitored by using an Optical Spectrum Analyzer (OSA, Yokogawa AQ6370C) with a resolution of 0.02 nm. In this arrangement, a 4-nm laser tuning range without mode hopping was achieved by varying the wafer temperature with the Thermo Electric Cooler (TEC). Here, in order to have repetitive tuning cycles, the laser line wavelength was tuned over time by driving the TEC with a Proportional-Integral-Derivative (PID) controller, which was implemented with LabVIEW software (PC DAQ). In this laser setup, a bulk silicon wafer of 85 µm in thickness was used as a spectral selective filter [25]. Hence, the wafer acts as a Fabry-Perot Interferometer (FPI), and therefore, its reflection pattern can be shifted by varying the refractive index of silicon. This can be achieved by taking advantage of the thermo-optical properties of silicon [25]. Consequently, this allowed us to tune the laser emission wavelength to scan one ro-vibrational absorption line of the target molecule. In our case, we tuned the laser emission over the ro-vibrational line of C 2 H 2 occurring at 1532.8302 nm at atmospheric pressure [21]. For the experiments carried out in this work, the VOA remained fixed. Here, the light beam of the reference channel is monitored with the P R optical detector, while the measurement channel is monitored with the P M detector. These signals are recovered with a Data Acquisition System (DAQ) and processed with a Personal Computer (PC). This stage also calculates the D M signal, which is the main output signal of our sensor.

Characterization of the Laser Line Tuning and Simulation of the Sensor Output
In order to be able to simulate the output waveform that will generate our gas sensor, we firstly characterized the laser line emission profile and its tuning behavior over time. The measured laser line profile (L M ) is shown in Figure 11a. It was recorded with an optical spectrum analyzer (Yokowaga AQ6370C) with a resolution of 20 pm. This laser emission has a Full Width at Half Maximum (FWHM) of approximately 15 pm, and it was well fitted with a Gaussian Lorentzian Sum (GLS) function (Figure 11a), which is defined as [26]: where q = 0.4 and ρ = FWMH/2. Moreover, by varying the TEC's temperature from 287.9-292.0 K, it was possible to tune the laser emission from 1532.785-1533.000 nm (∆λ = 0.215 nm), as shown in (Figure 11b). Here, the laser line wavelength is scanned periodically over time. In our case, we developed a PID controller to drive the TEC's voltage supply and to guarantee that the temperature remains over the wavelength scanning range. In this case, we did not optimize the PID in order to drive the TEC's temperature with a linear behavior as when it is driven with sawtooth or triangular waveforms ( Figure 3). In our TEC's PID controller software program, we set the levels of temperature (T osc ), and the laser emission was tuned following the function shown in Figure 11b. Moreover, by varying in this way the temperature of the Si wafer, the laser line was scanned almost completely over the ro-vibrational absorption line, as can be observed in Figure 11c. Finally, by using the simulated laser line emission and its tuning characterization, the D M for different concentrations was simulated, and the results are shown in Figure 11d; here, D M waveforms were normalized to 255.

Simulated Generating Functions for the Experimental Sensor Setup
Once the D M signal was simulated, we proceeded to calculate the generating functions and to look for the optimal k value that provided the most constant sensitivity for each one. Firstly, the m k , h, σ and A statistics features were calculated ( Figure 12). Afterwards, based on Equations (8)-(11), the generating functions were calculated for some k values for which these functions provide the most constant sensitivity over a wider dynamic range. In Figure 13, some examples of functions obtained with some particular values of k are shown. Moreover, the sensitivity that can be achieved by using these functions is shown in Figure 14. Afterwards, we proceeded to select one k value for each generating function of this experimental case, which were 2.6, 4.6, 2.6 and 4.8 for f k m , f k h , f k σ and f k A , respectively ( Figure 15). Moreover, their sensitivities are shown in Figure 14e. From this figure, it can be observed that f k h and f k A have a greater sensitivity for high C 2 H 2 concentrations and also that the f k A function has a greater sensitivity for low concentration levels. Therefore, we considered that f 4.8 A is the best option to be used for this gas sensor design since it has a larger concentration over the full concentration range. Finally, these optimal generating functions were fitted with a polynomial of the form C 5 f = ∑ 5 n=0 p n ( f k ) n to determine the concentration, and the p n constants are listed in Table 1.

Experimental Measurements
Now, in order to support our simulated results, we performed some measurements with different C 2 H 2 concentrations. The measured D M waveforms for each concentration are shown in Figure 16a (see Table 1). Afterwards, for each one of these D M signals, the optimal generating functions f 2.6 m , f 4.6 h , f 2.9 σ and f 4.8 A were calculated.  Additionally, as an example of the typical results expected when the concentration is determined based on a single statistics feature, the peak amplitude of the D M waveforms was calculated.
These results are shown in Figure 16b-e where it can be observed that all have the same tendency as the simulated results. In each graph is shown the error between the measured and the simulated results. It can be expressed as δ = | f k E − f k S )/ f k S | × 100%. Here, let us point out that we consider that these errors are mainly due to systematic causes, and therefore, these can be reduced by further optimizing the sensing arrangement stages. In practice, after these generating function results are obtained, the C 2 H 2 concentration can be determined by means of the polynomial coefficients listed in Table 1.

Experimental Sensitivity
One of the main points of the algorithm is to enhance the sensitivity over a larger dynamic range. As an example, the sensitivity obtained based on a single statistics feature (peak amplitude and mean) and that obtained with some generating functions ( f 4.8 A and f 2.6 m ) are shown in Figure 17. For this case, the approximate sensitivity values for the experimental measurements E were calculated by using the relationship ∆ f /∆(C s ) = [ f (C s ) − f (C s−1 )]/(C s − C s−1 ). From Figure 17, it can be noted that the tailored functions provide a better sensitivity level over a much wider dynamic range. For instance, f 4.8 A has a similar sensitivity to that of A within the concentration range from 0-17%, but after this level, the sensitivity obtained with the generating function is considerably larger. Similar behavior is observed when the sensitivity is obtained with the f 2.6 m and m 1 functions. Thus, it can be concluded that generating functions can be suitable to keep a high sensitivity over a larger dynamic range compared with that obtained when it is determined based on a single statistics feature, such as the peak amplitude, the mean, the area or the RMS. Furthermore, of our tailored functions, f k A was the best option since it has the highest sensitivity for low concentration levels, and it is kept quasi constant for the full measurement range.

Conclusions
In this work, a tailored algorithm to enhance the sensitivity of sensors based on DA-TLAS was presented. Here, it was demonstrated that with this algorithm, it is possible to have a quasi constant sensitivity over a much wider dynamic range than obtained when the concentration is determined based on a single statistics feature such as the peak amplitude, the area, the mean or the RMS of the sensor output waveform. This is possible by taking into account other statistical features of the sensor output waveforms, which usually are wasted. Moreover, it was shown that different functions can be built by combining statistics features in order to tailor an optimal generating function to enhance the sensitivity for certain concentration ranges. Finally, the algorithm was tested for one experimental sensor setup, and the obtained measurements are in agreement with the our simulated results.