Expand this Topic clickable element to expand a topic
Skip to content
Optica Publishing Group

Efficient Bayesian inference of absorbance spectra from transmitted intensity spectra

Open Access Open Access

Abstract

High-resolution absorption spectroscopy is a promising method for non-invasive process monitoring, but the computational effort required to evaluate the data can be prohibitive in high-speed, real-time applications. This study presents a fast method to estimate absorbance spectra from transmitted intensity signals. We employ Bayesian statistics to combine a measurement model with prior information about the shape of the baseline intensity and absorbance spectrum. The resulting linear least-squares problem shifts most of the computational effort to a preparation step, thereby facilitating quick processing and low latency for any number of measurements. The method is demonstrated on simulated tunable diode laser absorption spectroscopy data with additive noise and a fluctuating fringe. Results were highly accurate and the method was computationally efficient, having a processing time of only 2 ms per spectrum.

© 2019 Optical Society of America under the terms of the OSA Open Access Publishing Agreement

1. Introduction

Molecular absorption spectroscpy is widely used to measure concentrations [1,2], temperatures [1,2], pressures [3] and velocities [4] of gas-phase species due to the robustness, simplicity, speed, and flexibility of the technique. It is particularly useful in extremely high-temperature, high-velocity conditions and other harsh environments where conventional methods cannot be employed [5]. In absorption spectroscopy, a beam of light is shone through the medium of interest. The light is partially-absorbed by the medium at characteristic absorption wavelengths and the transmitted spectral intensity, $I_\nu$, is recorded. Knowledge of the reference or baseline intensity, $I_{\nu ,0}$ (i.e., light that would be incident on the detector in the absence of any absorber), is needed to calculate the absorbance, $\alpha _\nu = -\mathrm {ln}(I_\nu /I_{\nu ,0})$. The resulting spectrum is processed using a spectroscopic model of the target species to determine the parameters of interest: temperature, pressure, velocity, etc.

Fourier transform spectroscopy (FTS) and tunable diode laser absorption spectroscopy (TDLAS) are primary forms of absorption spectroscopy [6,7]. FTS is often applied in extractive sampling systems, which feature highly-controlled measurement conditions. In these systems, a reference intensity is recorded without the absorbing species. The light source and optical alignment are kept constant in subsequent active measurements and $I_{\nu ,0}$ is approximated using the reference. By contrast, TDLAS is often deployed in combustion and exhaust chambers, where it is frequently impractical or impossible to obtain a clean reference, in situ. Complications, such as window fouling by absorbing media (e.g., soot or condensed water) and fringing artifacts, which arise due to unintentional etalons, can change $I_{\nu ,0}$ over time [811]. Moreover, TDLAS systems often feature restricted access for cleaning windows and adjusting the optics: for instance, due to extended heat up/cool down times. As a result, considerable effort has been invested in developing methods to estimate $I_{\nu ,0}$ for each measurement.

Simple techniques to estimate $I_{\nu ,0}$ take advantage of the different frequencies of gas-phase absorption lines and fluctuations in the incident intensity [12]. The signal is differentiated, which effectively acts as a high-pass filter, reducing the influence of low-frequency distortions in $I_{\nu ,0}$. Another approach is to identify regions of the spectrum that feature absorption lines and neglect those regions while estimating $I_{\nu ,0}$ [13,14]. Recently, this filter has been applied in the time domain, akin to free induction decay analysis, wherein the baseline intensity quickly diminishes and the remainder of the signal is dominated by the molecular response [15].

Advanced algorithms for postprocessing TDLAS data incorporate information about the baseline intensity and absorption features, explicitly, to simultaneously estimate $I_{\nu ,0}$ and $\alpha _\nu$ [16,17]. Diode lasers are often driven by a ramp-shaped current modulation and a low-order polynomial is used to approximate the resulting (near-linear) baseline trace. The polynomial model of $I_{\nu ,0}$ is combined with a spectroscopic model of the absorber, $\alpha _\nu$. Then $I_{\nu ,0}$ and $\alpha _\nu$ are simultaneously fitted to $I_\nu$ by nonlinear optimization, which yields accurate results without distortion from the absorption features. Reference measurements may be included to improve the polynomial fit [16,17] and a fringe model can be incorporated to account for unintentional etalons.

Nonlinear fitting is considered state-of-the-art for homogeneous gasses. However, for measurements of an inhomogeneous target (e.g., in absorption tomography), the absorbance spectrum cannot be described by the spectroscopic model of a spatially-uniform gas [18]. This is a consequence of the nonlinear dependence of $\alpha _{\nu }$ on thermodynamic quantities like concentration and pressure, due to collisional broadening effects, and temperature, due to the Boltzmann distribution of energy state populations. As a result, either the spectroscopic model must be combined with a spatial model of the gas to account for any inhomogeneities along the beam or estimates will be corrupted by model errors [18]. Adding spatial parameters increases the computational cost of nonlinear fitting and may preclude real-time analysis of systems involving multiple lines-of-sight, as in absorption tomography rigs.

We present a numerically-efficient Bayesian method to directly estimate the absorbance spectrum from transmitted intensity data. Our method includes a novel fringe model that can rapidly compensate for etalon-type artifacts. Furthermore, we incorporate prior knowledge about the baseline intensity and, more importantly, the shape and correlation of the absorbance spectrum into our analysis [19]. Information in the spectral prior prevents absorption features from biasing estimates of $I_{\nu ,0}$. The spectrum is obtained by solving a linear system of equations, which involves a large matrix inversion. As a result, our algorithm does not necessarily evaluate single measurements more quickly than a nonlinear fitting algorithm. However, the matrix inversion only needs to be conducted once to process a series of measurements with a shared wavenumber axis. Therefore, time-resolved data can be evaluated by a matrix-vector multiplication following the initial inversion, and simultaneous measurements in absorption tomography can be analyzed together in series, greatly improving numerical efficiency.

The following section reviews the fundamentals of absorption spectroscopy and Bayesian inference and introduces our method. We then conclude with a numerical test that demonstrates our approach using simulated TDLAS data.

2. Methods

Bayesian absorption inference begins with a model that relates the transmitted intensity to the baseline intensity, absorption coefficient, and measurement noise/artifacts. Below, we develop a linear measurement model for absorption spectroscopy that accounts for fringing. Next, we present an overview of Bayesian inference, construct priors for absorption spectroscopy, and obtain an expression to calculate the maximum a posteroiri (MAP) estimate. Finally, we summarize the method.

2.1 Absorption spectroscopy

The attenuation of monochromatic light by an absorbing gas is described by the Beer-Lambert law,

$$\mathrm{ln}\left(\frac{I_\nu}{I_{\nu,0}}\right) ={-}\alpha_\nu,$$
where $I_{\nu ,0}$ is the initial spectral intensity incident on the gas, $I_\nu$ is the transmitted spectral intensity incident on the detector, and $\alpha _\nu$ is the absorbance at wavenumber $\nu$. The absorbance is the integrated spectral absorption coefficient, $\kappa _\nu$,
$$\alpha_\nu = \int_0^{l} \kappa_\nu\left[T(x),p(x),q(x))\right] \mathrm{d}x,$$
where $\kappa _\nu$ is a molecule-specific function of the local thermodynamic state, i.e.: temperature $T$, pressure $p$, and concentration $q$. We assume an inhomogeneous distribution of gas such that these quantities depend on the position, $x$, along the beam of length $l$.

2.1.1 Fringing

Etalons are optical cavities between two parallel reflecting surfaces. Interference occurs when the length of the cavity is out of phase with the wavelength of light, giving rise to a fringe in the transmitted spectral intensity. Spectroscopic data can be contaminated by unintentional etaloning, e.g., due to parallel windows or misaligned optics, resulting in a low-finesse Fabry–Pérot Interferometer (FPI) that alters the baseline intensity. We develop a linear fringe model to account for unintentional etalons in the optical system.

The accurate transmission spectrum of an FPI is described by the Airy equation [20],

$$\frac{I_{\nu,\mathrm{fringe}}}{I_{\nu,0}} = \frac{1}{1+F\sin^{2}(\pi\nu/\Delta_\mathrm{FSR})},$$
where $F$ is the finesse and $\Delta _{\textrm{FSR}}$ is the free spectral range (FSR) of the resonator. The FSR of an FPI is the spectral spacing between transmission points in an optical resonator,
$$\Delta_\mathrm{FSR} = \frac{1}{2n_g d}.$$
Here, $n_g$ is the group index of the resonator material and $d$ is the length of the resonator. High-speed spectrally-resolved intensity data typically spans a narrow spectral range so $n_g$ can be treated as a constant.

We transfer Eq. (3) to the absorbance domain and simplify the result,

$$\alpha_{\nu,\mathrm{fringe}} ={-}\mathrm{ln}\left(\frac{I_{\nu,\mathrm{fringe}}}{I_{\nu,0}}\right) = \mathrm{ln}\left[1+F\sin^{2}\left(\frac{\pi\nu}{\Delta_\mathrm{FSR}}\right)\right] = \mathrm{ln}\left[1+\frac{F}{2}-\frac{F}{2}\cos\left(2\frac{\pi \nu}{\Delta_\mathrm{FSR}}\right)\right].$$
Equation (5) treats the fringe as an absorption effect. Unintentional fringes have a small finesse so the logarithm in Eq. (5) can be approximated by a first order Taylor expansion,
$$\alpha_{\nu,\mathrm{fringe}} \approx \frac{F}{2} -\frac{F}{2} \cos\left(2\frac{\pi\nu}{\Delta_\mathrm{FSR}}\right).$$
The finesse and FSR can change during an experiment due to effects like de-adjustment, window defiling, and thermal drift in the optical components. As a result, both parameters must be estimated for each measurement. Small shifts in $\Delta _{\textrm{FSR}}$ (due to thermally-induced changes in the resonator length, $d$) cause a small shift in the frequency of the cosine in Eq. (6). These frequency differences are nearly imperceptible over a small spectral window. However, the differences accumulate and appear as a (pseudo) phase-shift in spectral windows at larger wavenumbers, as shown in Fig. 1. We approximate this effect by treating the FSR as a constant and introducing an arbitrary phase-shift in the fringe absorbance. The cosine term in Eq. (6) is thus replaced by a linear combination of sine and cosine functions,
$$\alpha_{\nu,\mathrm{fringe}} \approx \frac{F}{2} + \beta_0\cos\left(2\frac{\pi\nu}{\Delta_\mathrm{FSR}}\right) + \beta_1\sin\left(2\frac{\pi\nu}{\Delta_\mathrm{FSR}}\right), \quad\mathrm{where}\quad F = \sqrt{\beta_0^{2}+\beta_1^{2}}.$$
Equation (7) is a linear approximation of fringe absorbance given by the Airy equation.

 figure: Fig. 1.

Fig. 1. Fringe absorbance of two resonators with a very slight difference in the FSR: $\epsilon_\mathrm{FSR}=10^{-4}~\mathrm{cm}^{-1}$. The fringes nearly coincide at small wavenumbers but are visibly pseudo-shifted at larger wavenumbers.

Download Full Size | PDF

2.1.2 Linear measurement model

Lastly, we augment the definition of the absorbance in Eq. (2) to account for fringing by incorporating one fringe absorbance, $\alpha _{\nu ,\mathrm {fringe}}$, per etalon. For a single fringe, this yields

$$\begin{aligned} \mathrm{ln}\left(I_\nu\right) &= \mathrm{ln}\left(I_{\nu,0}\right) - \alpha_\nu - \alpha_{\nu,\mathrm{fringe}} \nonumber\\ &= \mathrm{ln}\left(I_{\nu,0}\right) - \alpha_\nu - \frac{F}{2} - \beta_0\cos\left(2\frac{\pi\nu}{\Delta_\mathrm{FSR}}\right) - \beta_1\sin\left(2\frac{\pi\nu}{\Delta_\mathrm{FSR}}\right). \end{aligned}$$
In this expression, $-F/2$ can be treated as a background intensity offset. Since neither the finesse nor the background intensity is required for real-time analysis, we combine these terms into an effective itensity, $I_{\nu ,0}' = I_{\nu ,0}\exp (-F/2)$. Replacing these terms with the effective intensity yields our measurement model,
$$\mathrm{ln}(I_{\nu}) = \mathrm{ln}(I_{\nu,0}') - \alpha_\nu - \beta_0\cos\left(2\frac{\pi\nu}{\Delta_\mathrm{FSR}}\right) - \beta_1\sin\left(2\frac{\pi\nu}{\Delta_\mathrm{FSR}}\right),$$
where $F$ can be determined from $\beta _0$ and $\beta _1$ using the constraint in Eq. (7) and $I_{\nu ,0}$ can be calculated from $F$ and $I_{\nu ,0}'$. This expression applies to all resolved wavenumber elements and contains four unknowns, $\mathrm {ln}(I_{\nu ,0}')$, $\alpha _\nu$, $\beta _0$, and $\beta _1$, per measurement, $\mathrm {ln}(I_\nu )$. As a result, the model is underdetermined and additional information is required to estimate $\alpha _\nu$.

2.2 Bayesian inference

Bayesian inference is a versatile tool that combines measurements, physical models, and a priori knowledge to infer unknown parameters such as $\alpha _\nu$. Information about the data, $\mathbf {b}$, and unknown parameters, $\mathbf {x}$, is quantified using probability density functions (PDFs), $\pi (\cdot )$. The approach follows from Bayes’ equation,

$$\pi(\mathbf{x}|\mathbf{b}) = \frac{\pi(\mathbf{b}|\mathbf{x})\pi_\mathrm{pr}(\mathbf{x})}{\pi(\mathbf{b})},$$
where $\pi (\mathbf {b}|\mathbf {x})$ is the likelihood PDF, which quantifies the chance of observing $\mathbf {b}$ given $\mathbf {x}$; $\pi _{\textrm{pr}}(\mathbf {x})$ is the prior PDF, which contains antecedent knowledge about $\mathbf {x}$, often summarized in terms of the mean and covariance of $\mathbf {x}$; and the evidence, $\pi (\mathbf {b})$, is a scalar that conserves total probability.

Bayes’ equation yields a posterior PDF, $\pi (\mathbf {x}|\mathbf {b})$, which gives the likelihood of the state $\mathbf {x}$ for the measurement $\mathbf {b}$, subject to the information contained in $\pi _{\mathrm {pr}}(\mathbf {x})$. The posterior is considered a comprehensive solution to the inverse problem. However, the dimension of $\pi (\mathbf {x}|\mathbf {b})$ is usually large and it is convenient to summarize the posterior distribution with a point estimate. We employ the MAP estimate,

$$\mathbf{x}_\mathrm{MAP} = \underset{\mathbf{x}}{\mathrm{argmax}} \;\pi(\mathbf{x}|\mathbf{b}),$$
which is a common choice of summary statistic. The MAP estimate is the most likely value of $\mathbf {x}$ subject to a given measurement and set of prior assumptions.

Section 2.1.2 presents a linear model for absorbance inference that applies at each wavenumber resolved by the detector. Measurements contain $N$ wavenumbers, $\nu _i$, resulting in a discrete vector of unknowns,

$$\mathbf{x} = \left[ \mathrm{ln}(I_{\nu_1,0}'), \mathrm{ln}(I_{\nu_2,0}'), \dots, \mathrm{ln}(I_{\nu_N,0}'), \alpha_{\nu_1}, \alpha_{\nu_2}, \dots,\alpha_{\nu_N}, \beta_0, \beta_1 \right]^{T},$$
which contains the unknown absorbances, and a discrete data vector,
$$\mathbf{b} = \left[ \mathrm{ln}\left(I_{\nu_1}\right), \mathrm{ln}(I_{\nu_2}), \dots, \mathrm{ln}(I_{\nu_N}) \right]^{T}.$$
The following subsections outline a Bayesian strategy to estimate $\mathbf {x}$ from $\mathbf {b}$ and thereby obtain the absorbance spectrum. First, we present a likelihood PDF based on our measurement model. Next, we define baseline curvature and absorbance priors. The likelihood and prior PDFs are constructed using multivariate normal (MVN) functions to yield an analytical expression of the MAP estimate, as in Kaipio and Somersalo [21]. Finally, we describe the calculation of $\mathbf {x}_{\textrm{MAP}}$.

2.2.1 Likelihood PDF

The likelihood PDF is based on the measurement model in Eq. (9), applied to each resolved wavenumber, plus an error term, $\epsilon _i$,

$$\hat{b}_{i} = \mathrm{ln}(I_{\nu_i,0}') - \alpha_{\nu_i} - \beta_0\cos\left(\frac{2\pi\nu_i}{\Delta_\mathrm{FSR}}\right) - \beta_1\sin\left(\frac{2\pi\nu_i}{\Delta_\mathrm{FSR}}\right) + \epsilon_i.$$
The errors comprise measurement noise and model errors. Noise can arise due to fluctuations in the laser intensity, shot noise in the detector, and thermal amplifier noise [22]; and model errors are introduced by linearizing the Airy equation and including too many or too few fringes in $\hat {b}_i$. In principle, $\Delta _{\textrm{FSR}}$ can be estimated for each measurement, resulting in a nonlinear model, but we assume this parameter is accurately computed in a preprocessing stage, as discussed in Section 3.1.

Given the definitions of $\mathbf {x}$ and $\mathbf {b}$ in Eqs. (12) and (13), the model in Eq. (14) can be expressed in matrix form,

$$\hat{\mathbf{b}}(\mathbf{x}) = \mathbf{A}_\mathrm{b}\mathbf{x} + \boldsymbol\epsilon,$$
where
$$\begin{aligned}\begin{matrix}\mathbf{A}_{\mathrm{b}} = & \begin{matrix}\left[ \vphantom{\begin{matrix}1 \\ 1 \\ 1 \\ 1\end{matrix}} \right.\end{matrix} \underbrace{\begin{matrix} 1 & 0 & \dots & 0 \\ 0 & 1 & & \vdots \\ \vdots & & \ddots & 0 \\ 0 & \dots & 0 & 1 \end{matrix}}_ {N\times N\text{ identity mat.}}\underbrace{\begin{matrix} -1 & 0 & \dots & 0 \\ 0 & -1 & & \vdots \\ \vdots & & \ddots & 0 \\ 0 & \dots & 0 & -1 \end{matrix}}_ {\text{Negative $N\times N$ identity mat.}}\underbrace{\begin{matrix} -\cos\left(\frac{2\pi}{\Delta_\mathrm{FSR}}\nu_{1}\right) & -\sin\left(\frac{2\pi}{\Delta_\mathrm{FSR}}\nu_{1}\right) \\ -\cos\left(\frac{2\pi}{\Delta_\mathrm{FSR}}\nu_{2}\right) & -\sin\left(\frac{2\pi}{\Delta_\mathrm{FSR}}\nu_{2}\right) \\ \vdots & \vdots \\ -\cos\left(\frac{2\pi}{\Delta_\mathrm{FSR}}\nu_{N}\right) & -\sin\left(\frac{2\pi}{\Delta_\mathrm{FSR}}\nu_{N}\right) \end{matrix}}_ {N\times 2\text{ fringe model}}\begin{matrix}\left. \vphantom{\begin{matrix}1 \\ 1 \\ 1 \\ 1\end{matrix}} \right].\end{matrix}\end{matrix}\end{aligned}$$
Assuming a low-finesse fringe and an accurate estimate of $\Delta _{\textrm{FSR}}$, model errors are negligible compared to noise. Moreover, electrical noise typically dominates shot noise at the detector, resulting in a Gaussian distribution of $\epsilon _i$. Hence, we employ an MVN PDF for our likelihood,
$$\pi(\mathbf{b}|\mathbf{x}) = \frac{1}{\sqrt{(2\pi)^{N}\det(\boldsymbol{\Sigma}_\mathrm{b})}} \exp\left[ -\frac{1}{2} (\hat{\mathbf{b}}(\mathbf{x})-\mathbf{b})^{T} \boldsymbol{\Sigma}_\mathrm{b}^{{-}1} (\hat{\mathbf{b}}(\mathbf{x})-\mathbf{b}) \right].$$
where $\boldsymbol {\Sigma }_{\textrm{b}}$ is the measurement error covariance. If the bandwidth of the data acquisition device is greater than half of the sampling rate then the sampled points are independent and $\boldsymbol {\Sigma }_{\textrm{b}}$ is a diagonal matrix that contains the variance of $\boldsymbol {\epsilon }$.

The method to estimate $\boldsymbol {\Sigma }_{\textrm{b}}$ depends on the measurement modality. For instance, electrical noise dominates in TDLAS and can determined during the laser-off interval in each current ramp. Typically, electrical noise in $I_\nu$ is roughly uniform across the measurement range. However, the variance of noise in the absorbance domain is a function of $\nu$. We approximate this effect using Gaussian error propagation,

$$(\boldsymbol{\Sigma}_\mathrm{b})_{i,j} = \begin{cases} 0, & \mathrm{for } i\neq j \\ (\sigma_\mathrm{I}/I_{\nu_i})^{2}, & \mathrm{for } i = j \end{cases}.$$
In principle, $\boldsymbol {\Sigma }_{\textrm{b}}$ must be computed for each measurement. However, electrical noise is fairly consistent over time and the spectral range is short. Therefore, $I_{\nu _i}$ in Eq. (18) can be replaced by a representative mean intensity, $\bar {I}$, such that
$$\boldsymbol{\Sigma}_\mathrm{b} = (\sigma_\mathrm{I}/\bar{I})^{2} \mathbf{E}_{N\times N},$$
where $\mathbf {E}_{N\times N}$ is a $N\times N$ identity matrix. This assumption has been validated in common cases with low-to-medium absorbances but must be tested in high-absorbance scenarios where $\alpha _\nu \sim 1$.

2.2.2 Absorbance prior PDF

Absorption features in $\alpha _\nu$ consist of spectral lines whose shape and intensity depend on the state of the absorber, $\boldsymbol \chi = [T,p,q]^{T}$. For instance, consider the absorbance at two wavenumbers, $\alpha _{\nu _1} = f_{\nu _1}(\boldsymbol \chi )$ and $\alpha _{\nu _2} = f_{\nu _2}(\boldsymbol \chi )$, where the functions $f_{\nu _1}$ and $f_{\nu _2}$ contain a spectroscopic model of the target (e.g., accounting for collisional broadening, adjusted state populations, etc.). Changes in the gas state, $\delta \boldsymbol \chi$, induce a finite change in both absorbances, which can be quantified in terms of a local correlation: $\mathrm {corr}[\alpha _{\nu _1}(\boldsymbol \chi ),\alpha _{\nu _2}(\boldsymbol \chi )]$. This section defines an absorbance prior based on the covariance of $\alpha _\nu$ at the measurement wavenumbers to help distinguish fluctuations in the baseline intensity from fluctuations in the absorbance spectum.

To begin, we define the prior PDF of the absorbance vector, $\boldsymbol \alpha = [\alpha _{\nu _1}, \alpha _{\nu _2}, \dots , \alpha _{\nu _N}]^{T}$, in terms of the PDF of $\boldsymbol \chi$ [23],

$$\pi_{\alpha}(\boldsymbol\alpha) = \frac{\partial}{\partial \boldsymbol \alpha} \int\limits_{\{\boldsymbol\chi|g(\boldsymbol\chi)\leq\boldsymbol\alpha\}} \pi_{\chi}(\boldsymbol\chi)\mathrm{d}\boldsymbol\chi, \mathrm{where}\ \boldsymbol\alpha = g(\boldsymbol\chi).$$
Absent prior knowledge about the gas process, $\pi _{\chi }$ is an independent, uniform distribution between minimum and maximum values of $T$, $p$, and $q$, which can be derived from physical constraints (e.g., using an energy balance). Unfortunately, the integral form of a $\pi _{\alpha }$ is costly to evaluate and does not enable the closed form expression of $\mathbf {x}_{\textrm{MAP}}$. We thus invoke the Laplace approximation and model the distribution of $\boldsymbol \alpha$ as locally-Gaussian about its expected value [24]. Using this assumption, Eq. (20) is roughly given by
$$\pi_{\alpha}(\boldsymbol{\alpha}) = \frac{1}{\sqrt{(2\pi)^{N}\det(\boldsymbol{\Sigma}_\alpha)}} \exp\left[ -\frac{1}{2} (\boldsymbol{\alpha}-\boldsymbol{\mu}_\alpha)^{T} \boldsymbol{\Sigma}_\alpha^{{-}1} (\boldsymbol{\alpha}-\boldsymbol{\mu}_\alpha) \right],$$
where $\boldsymbol \mu _\alpha = \mathrm {E}[\boldsymbol \alpha ]$ is the mean absorbance vector and $\boldsymbol \Sigma _\alpha = \mathrm {E}[(\boldsymbol \alpha -\boldsymbol \mu _\alpha ) (\boldsymbol \alpha -\boldsymbol \mu _\alpha )^{T}]$ is the absorbance covariance matrix.

The prior is built using a sample-based approach, where $\boldsymbol \mu _\alpha$ and $\boldsymbol \Sigma _\alpha$ are computed for a set of $M$ vectors of simulated spectra, denoted $\boldsymbol \alpha _k^{*}$ for $k = 1$ to $M$. Note that the spectroscopic model used to generate $\boldsymbol \alpha _k^{*}$ is the same model used to estimate $\alpha _\nu$ in nonlinear fitting algorithms. The absorbance vector are simulated using values of $\boldsymbol \chi$ drawn from $\pi _{\chi }$ such that Eq. (21) is a good approximation of Eq. (20). This approach yields a conservative estimate of the correlations in $\alpha _\nu$, which facilitates the Laplace approximation despite nonlinearities in the spectroscopic model. While $\pi _{\alpha }$ does not contain the maximum amount of information that could be extracted from the spectroscopic model, the prior contains enough information to distinguish absorption lines from baseline fluctuations and fringes.

We simulate sample absorbance vectors using parameters from a well-known database such as HITRAN [25]. Alternatively, the prior can be constructed from empirical absorbance data measured in a controlled laboratory setting. Regardless, given a set of $M$ suitable absorbance vectors, the mean is approximated with a sum,

$$\boldsymbol\mu_\alpha = \frac{1}{M} \sum_{k=1}^{M} \boldsymbol\alpha_{k}^{*},$$
and the covariance is approximated with the expected outer product of $\boldsymbol \alpha _{k}^{*}-\boldsymbol \mu _\alpha$ [26],
$$\boldsymbol{\Sigma}_\alpha = \frac{1}{M-1}\sum_{k=1}^{M} (\boldsymbol\alpha_{k}^{*}-\boldsymbol\mu_\alpha) (\boldsymbol\alpha_{k}^{*}-\boldsymbol\mu_\alpha)^{T}.$$
The prior is fully-specified by $\boldsymbol \mu _\alpha$ and $\boldsymbol \Sigma _\alpha$ but Eq. (21) is defined with respect to the absorbance vector, $\boldsymbol \alpha$, instead of the working variable, $\mathbf {x}$. Therefore, we define the matrix $\mathbf {A}_\alpha$ such that $\mathbf {A}_\alpha \mathbf {x} = \boldsymbol \alpha$,
$$\mathbf{A}_\alpha = \left[ \begin{matrix} \mathbf{0}_{N\times N}, \mathbf{E}_{N\times N}, \mathbf{0}_{N\times 2} \end{matrix} \right],$$
where $\mathbf {0}_{N\times N}$ and $\mathbf {0}_{N\times 2}$ are zeros matrices of size $N\times N$ and $N\times 2$. Substituting $\mathbf {A}_\alpha$ into Eq. (21) yields the final absorbance prior PDF,
$$\pi_{\mathrm{pr},\alpha}(\mathbf{x}) = \frac{1}{\sqrt{(2\pi)^{N}\det(\boldsymbol{\Sigma}_\alpha)}} \exp\left[ -\frac{1}{2} (\mathbf{A}_\alpha\mathbf{x}-\boldsymbol{\mu}_\alpha)^{T} \boldsymbol{\Sigma}_\alpha^{{-}1} (\mathbf{A}_\alpha\mathbf{x}-\boldsymbol{\mu}_\alpha) \right].$$

2.2.3 Intensity prior PDF

Nonlinear fitting algorithms typically employ a low-order polynomial to model $I_{\nu ,0}$ and thereby enforce a low-frequency intensity signal [16]. Instead, we regularize the effective intensity using a second-order Tikhonov prior, based on the assumption that abrupt fluctuations in the baseline intensity are unlikely. This section presents a Tikhonov-type prior PDF that regularizes the effective intensity elements in $\mathbf {x}$.

The discrete Laplace operator can be used to quantify the curvature of $\mathrm {ln}(I_{\nu ,0}')$: $\nabla _{\textrm {I}}^{2}(\mathbf {x}) = \mathbf {A}_{\textrm{ddI}} \mathbf {x}$, where

$$(\mathbf{A}_\mathrm{ddI})_{i,j} = \begin{cases} -\frac{1}{2}, & \mathrm{for }\, i = j \\ 1, & \mathrm{for }\, i = j-1 \\ -\frac{1}{2}, & \mathrm{for }\, i = j-2\\ 0, & \mathrm{otherwise }\\ \end{cases},$$
for $1 < i < (N-2)$ and $1 < j < (2N+2)$. As with $\pi _{{\textrm{pr}},\alpha }$, the second derivatives of ${\textrm{ln}}(I_{\nu ,0}')$ are modeled as an MVN random variable, which yields the following PDF:
$$\pi_{\mathrm{pr},\mathrm{ddI}}(\mathbf{x}) = \frac{1}{\sqrt{(2\pi)^{N-2}\det(\boldsymbol{\Sigma}_\mathrm{ddI})}} \exp\left[ -\frac{1}{2} (\mathbf{A}_\mathrm{ddI}\mathbf{x})^{T} \boldsymbol{\Sigma}_\mathrm{ddI}^{{-}1} (\mathbf{A}_\mathrm{ddI}\mathbf{x}) \right].$$
Absent additional information, these derivatives are assumed to be independent and identically distributed, resulting in a diagonal covariance matrix,
$$\boldsymbol{\Sigma}_\mathrm{ddI} = \sigma_\mathrm{ddI}^{2}\mathbf{E}_{N-2\times N-2}.$$
The standard deviation $\sigma _{\textrm{ddI}}$ must be empirically estimated. To do this, we fit a low-order polynomial to a sample trace, which yields the approximation $\mathbf {x}^{*} = [I_{\nu _1}^{*}, I_{\nu _2}^{*}, \dots , I_{\nu _N}^{*}]^{T}$. While $\mathbf {x}^{*}$ does not reflect a valid baseline intensity, the curvature of the fit can inform $\sigma _{\textrm{ddI}}$. For example, we calculate $\nabla _{\textrm{I}}^{2}[{\textrm{ln}}(\mathbf {x}^{*})]$ and set $\sigma _{\textrm{ddI}}$ to the largest absolute second derivative,
$$\sigma_\mathrm{ddI} = \max_j \left|\left( \mathbf{A}_\mathrm{ddI} \left[\begin{matrix} \mathrm{ln}(\mathbf{x}^{*}) \\ \mathbf{0}_{N+1\times 1} \end{matrix}\right] \right)_j\right|$$
There are alternative heuristics to estimate $\sigma _{\textrm{ddI}}$ but the absorbance inference is relatively robust to this parameter and Eq. (29) is typically sufficient.

2.2.4 MAP estimation

The joint-MVN formulation of the likelihood and priors enables easy calculation of the MAP estimate [21]. First, Eqs. (17), (25), and (27) are combined to obtain the posterior PDF,

$$\pi(\mathbf{x}|\mathbf{b}) = \frac{\pi(\mathbf{b}|\mathbf{x}) \pi_{\mathrm{pr},\alpha}(\mathbf{x}) \pi_{\mathrm{pr},\mathrm{ddI}}(\mathbf{x})}{\pi(\mathbf{b})} \propto \pi(\mathbf{b}|\mathbf{x}) \pi_{\mathrm{pr},\alpha}(\mathbf{x}) \pi_{\mathrm{pr},\mathrm{ddI}}(\mathbf{x}).$$
Since $\pi (\mathbf {b})$ is a constant, only the numerator needs to be maximized. The numerator consists of three MVN PDFs that each contains an exponential function of $\mathbf {x}$ and a scaling constant. The constants do not influence the optimum so the posterior is maximized by maximizing the exponential argument,
$$\begin{aligned} \mathbf{x}_\mathrm{MAP} = \underset{\mathbf{x}}{\mathrm{argmax}} \exp\left\{ -\frac{1}{2} \left[\vphantom{\boldsymbol\Sigma^{T}}\right.\right. & (\mathbf{A}_\mathrm{b}\mathbf{x}-\mathbf{b})^{T} \boldsymbol{\Sigma}_\mathrm{b}^{{-}1} (\mathbf{A}_\mathrm{b}\mathbf{x}-\mathbf{b}) \nonumber \\ & (\mathbf{A}_\alpha\mathbf{x}-\boldsymbol{\mu}_\alpha)^{T} \boldsymbol{\Sigma}_\alpha^{{-}1} (\mathbf{A}_\alpha\mathbf{x}-\boldsymbol{\mu}_\alpha) \nonumber \\ & (\mathbf{A}_\mathrm{ddI}\mathbf{x})^{T} \boldsymbol{\Sigma}_\mathrm{ddI}^{{-}1} (\mathbf{A}_\mathrm{ddI}\mathbf{x}) \left.\left.\vphantom{\boldsymbol\Sigma^{T}}\right]\vphantom{\frac{1}{2}}\right\}. \end{aligned}$$
Equation (31) is rewritten using the Cholesky factors of the inverse covariance matrices,
$$\mathbf{L}_\mathrm{b}^{T}\mathbf{L}_\mathrm{b}^{\,} = \boldsymbol{\Sigma}_\mathrm{b}^{{-}1}, \quad \mathbf{L}_\alpha^{T}\mathbf{L}_\alpha^{\,} = \boldsymbol{\Sigma}_\alpha^{{-}1}, \quad\mathrm{and}\quad \mathbf{L}_\mathrm{ddI}^{T}\mathbf{L}_\mathrm{ddI}^{\,} = \boldsymbol{\Sigma}_\mathrm{ddI}^{{-}1},$$
such that
$$\begin{aligned} \mathbf{x}_\mathrm{MAP} = \underset{\mathbf{x}}{\mathrm{argmax}} \exp\left\{ -\frac{1}{2} \left[\vphantom{\boldsymbol\Sigma^{T}}\right.\right. & (\mathbf{L}_\mathrm{b}\mathbf{A}_\mathrm{b}\mathbf{x}-\mathbf{L}_\mathrm{b}\mathbf{b})^{T} (\mathbf{L}_\mathrm{b}\mathbf{A}_\mathrm{b}\mathbf{x}-\mathbf{L}_\mathrm{b}\mathbf{b}) \nonumber \\ & +(\mathbf{L}_\alpha\mathbf{A}_\alpha\mathbf{x}-\mathbf{L}_\alpha\boldsymbol{\mu}_\alpha)^{T} (\mathbf{L}_\alpha\mathbf{A}_\alpha\mathbf{x}-\mathbf{L}_\alpha\boldsymbol{\mu}_\alpha) \nonumber \\ & +(\mathbf{L}_\mathrm{ddI}\mathbf{A}_\mathrm{ddI}\mathbf{x})^{T} (\mathbf{L}_\mathrm{ddI}\mathbf{A}_\mathrm{ddI}\mathbf{x}) \left.\left.\vphantom{\boldsymbol\Sigma^{T}}\right]\vphantom{\frac{1}{2}}\right\}. \end{aligned}$$
Taking the natural logarithm of Eq. (33) yields a linear least-squares minimization problem,
$$\begin{aligned} \mathbf{x}_\mathrm{MAP} = & \underset{\mathbf{x}}{\mathrm{argmin}} \left\lVert{\left[\begin{matrix} \mathbf{L}_\mathrm{b}\mathbf{A}_b \\ \mathbf{L}_\mathrm{\alpha}\mathbf{A}_\alpha \\ \mathbf{L}_\mathrm{ddI}\mathbf{A}_\mathrm{ddI} \end{matrix}\right]\mathbf{x} - \left[\begin{matrix} \mathbf{L}_\mathrm{b}\mathbf{b} \\ \mathbf{L}_\mathrm{\alpha}\boldsymbol{\mu}_\alpha \\ \mathbf{0}_{(N-2)x1} \end{matrix}\right]}\right\rVert^{2}_2 \nonumber \\ = & \underset{\mathbf{x}}{\mathrm{argmin}} \left\lVert{ \mathbf{Ax}-\boldsymbol\gamma}\right\rVert^{2}_2. \end{aligned}$$
The solution to Eq. (34) is
$$\mathbf{x}_\mathrm{MAP} = (\mathbf{A}^{T}\mathbf{A})^{{-}1} \mathbf{A}^{T} \boldsymbol\gamma =\mathbf{A}^\#\boldsymbol\gamma,$$
where $\mathbf {A}^\#$ is the pseudo-inverse of the augmented system matrix, $\mathbf {A}$.

The pseudo-inverse is only calculated once and is applicable to any number of measurements with a shared wavenumber axis. Hence, while the cost of computing $\mathbf {A}^\#$ is comparable to that of nonlinear fitting techniques, our method spreads this effort across multiple measurements to plausibly achieve real-time processing. This simplification dramatically reduces the computational resources required to evaluate spectroscopic signals.

2.3 Overview of Bayesian absorbance inference

Bayesian absorbance inference begins with a preprocessing stage to calibrate the wavenumber axis; identify fringes and estimate their FSR, $\Delta _{\textrm {FSR}}$; and construct and invert the augmented system matrix. The system matrix depends on the calibrated axis: to simulate the absorbance vectors, $\boldsymbol \alpha _k^{*}$; calculate $\boldsymbol \mu _\alpha$ and $\boldsymbol \Sigma _\alpha$; and obtain estimates of $\sigma _{\textrm{b}}$ and $\sigma _{\textrm {ddI}}$. Preprocessing takes several seconds and can be conducted on-line. Once $\mathbf {A}^{\#}$ has been obtained, transmitted intensity data is formatted into $\boldsymbol \gamma$ vectors and processed in real-time using Eq. (31). This procedure is summarized in Fig. 2 and the key parameters are enumerated in Table 1.

 figure: Fig. 2.

Fig. 2. Flowchart of Bayesian absorbance inference. Transmitted intensity signals are used to estimate key parameters and construct the system matrix. Subsequent signals are evaluated in real-time to obtain MAP estimates, which contain the absorbance spectrum.

Download Full Size | PDF

Tables Icon

Table 1. Parameters Used in Bayesian Absorbance Inference.

3. Results and discussion

Fast Bayesian absorbance inference requires stable wavenumber tuning. Tunable diode lasers can maintain a very consistent wavenumber axis so our approach is well-suited to TDLAS. Thus, while not limited to TDLAS experiments, we demonstrate the technique using a synthetic TDLAS scenario. This section describes the simulation of TDLAS data, sample preprocessing procedures, and results of our simulation.

3.1 Simulating TDLAS data

Modulating the current to a diode laser changes not only the intensity of emitted light but also its wavelength. Diode lasers can be used to probe the absorption spectrum of a gaseous target. A common modulation scheme for direct TDLAS is a periodic current ramp, with the laser turned off at the lowest part of the ramp. This laser-off interval allows for the correction of a thermal radiation offset as well as the estimation of electrical noise. During the ramp, light is attenuated by the gas along the beam, per Eq. (1), and the transmitted intensity is detected by a photodiode. As commonly employed, diode lasers have a very narrow spectral profile and the measured intensity can be regarded as proportional to $I_\nu$.

We simulated light from a diode laser using a periodic ramp current. The minimum current was set below the laser threshold to produce a laser-off interval that was held for 5% of the ramp period. The ground truth ramp was modeled as a fourth-order polynomial with random coefficients that were bounded to yield a realistic trace (with a maximum baseline intensity between 0.3 and 1 arbitrary units). We employed the calibrated wavenumber axis of a 1392 nm vertical cavity surface emitting laser, tuned across several water absorption features. A slight random offset of $\delta _\nu \in [-0.005,0.005]\ {\mathrm{cm}}^{-1}$ was added to the wavenumber axis to mimic calibration errors and thermal drift. We introduced a fringe using the exact Airy function in Eq. (3); and $\Delta _{\textrm{FSR}}$ was randomly chosen from the interval $1\pm 0.0007\ {\mathrm{cm}}^{-1}$ to model thermal expansion and contraction of the optical resonator. Similarly, $F$ was randomly chosen between 0 and 0.05.

Water absorption features were simulated with a line-by-line model using parameters from the HITRAN2016 database [25]. We assumed a homogeneous absorption path, 0.05 m in length, with random uniform draws of the vapor temperature, pressure and mole fraction between 300 and 2000 K, 0.8 and 1.2 bar, and 0 and 0.2, respectively. The resulting intensity profiles were distorted with centered Gaussian noise having a standard deviation of 0.001 arbitrary units.

This procedure was repeated to generate 1000 intensity signals. Figure 3 depicts the first five traces. Each trace consisted of 3000 points, representing a ramp period of 1 ms (3 MSps sampling rate). Of these, $N=2281$ points, shown in Fig. 3, were evaluated with our Bayesian technique. Estimates were validated using ideal absorbances calculated from the simulated incident intensity with and without the gas.

 figure: Fig. 3.

Fig. 3. Five of the 1000 simulated intensity signals. Points in the red area were evaluated with our Bayesian technique. The intensity trace indicated in red was used to estimate $\Delta_\mathrm{FSR}$.

Download Full Size | PDF

3.2 Preprocessing

Three parameters were estimated from a reference signal prior to the Bayesian evaluations: $\Delta _{\textrm{FSR}}$, $\boldsymbol \Sigma _{\textrm{b}}$, and $\boldsymbol \Sigma _{\textrm{ddI}}$. Several methods are available to estimate these parameters and the choice of method depends on the signal properties and availability of additional knowledge (known resonator geometry, material properties, etc.). The methods presented in this section thus serve as examples and are not essential to the proposed technique.

Assuming minimal prior information, we deduced $\Delta _{\textrm{FSR}}$, $\boldsymbol \Sigma _{\textrm{b}}$, and $\boldsymbol \Sigma _{\textrm{ddI}}$ from a representative sample measurement. Ideally, the sample should feature a clear fringe that is strong compared to the absorption features. We therefore selected the transmitted intensity indicated in Fig. 3 to be the reference. A third-order polynomial was fitted to this reference in the evaluation window to generate a very rough estimate of the baseline intensity, $I_{\nu ,0}^{*}$, shown in Fig. 4(a). Taking $I_{\nu ,0}^{*}$ as the baseline intensity, we calculated $\alpha _{\nu } = -{\textrm{ln}}(I_\nu /I_{\nu ,0}^{*})$. The fringe produced a sinusoidal artifact in $\alpha _\nu$ and the frequency of this artifact was estimated using the peak in the amplitude spectrum of $\alpha _{\nu }$: ${\textrm{abs}} \{\mathcal {F}[-\mathrm {ln}(I_\nu /I_\nu ^{*})]\}$. The maximum amplitude, shown in Fig. 2(b), gave the first estimate $\Delta _{\textrm{FSR}} = 1/0.9672~\mathrm {cm} = 1.0339\mathrm {cm}^{-1}$. The precision of this estimate is limited by the frequency resolution of the Fourier transform. In this case, $\delta _{\textrm{FSR}} = 0.07953\mathrm {cm}^{-1}$.

 figure: Fig. 4.

Fig. 4. Estimating the FSR from a reference trace: a) the TDLAS signal $I_\nu$, third-order polynomial fit $I_{\nu,0}^*$, and resulting fringe; and b) the amplitude of the Fourier transform of the absorbance. The peak in the amplitude spectrum yields an estimate of $\Delta_\mathrm{FSR}$.

Download Full Size | PDF

The maximum phase difference in radians between the real and assumed fringes over the evaluation window is

$$\delta_\mathrm{phase} = 2\pi\delta_\mathrm{FSR} \frac{\left|\nu_N-\nu_1\right|}{\Delta_\mathrm{FSR}^{2}}.$$
We found $\delta _{\textrm{phase}} = 2.15\pi$. However, we note from experience that our method yields good results for fringe phase errors less than $\pi /6$, so we refined our estimate of the FSR. One way to refine $\Delta _{\textrm{FSR}}$ is to perform a nonlinear fit of a cosine function to $\alpha _\nu$ using the FSR determined from the amplitude spectrum as an initial guess. After convergence the nonlinear fit gives an FSR of $\Delta _{\textrm{FSR}}=1.005\ {\mathrm{cm}}^{-1}$, with the resulting fringe depicted in Fig. 4(a). Although the maximum uncertainty of this result was unknown, the quality of the fit suggested sufficient accuracy. Hence, we treated $\Delta _{\textrm{FSR}}$ as a known parameter in the Bayesian inference.

Following estimation of the FSR, we created the measurement and curvature covariance matrices. We used the laser-off interval at the beginning of each ramp to estimate the standard deviation of electrical noise (see Fig. 3). Points 1 to 140 of the reference, i.e., the red trace in Fig. 3, gave $\sigma _{\textrm{I}} = 1.005\cdot 10^{-3}$, which closely matched the standard deviation of our simulated noise. The mean value of the sample trace over the evaluation window was $\bar {I} = 0.284$. We constructed $\boldsymbol \Sigma _{\textrm{b}}$ with these estimates using Eq. (19). Finally, $\boldsymbol \Sigma _{\textrm{ddI}}$, defined by Eqs. (28) and (29), was also calculated using $I_{\nu ,0}^{*}$.

3.3 Absorbance prior

The absorbance mean and covariance in $\pi _{{\textrm{pr}},\alpha }$ have discrete support that depends on the wavenumber axis. However, the functional forms of $\boldsymbol \mu _\alpha$ and $\boldsymbol \Sigma _\alpha$ only depend on the spectroscopic properties of the target and the distribution of $\boldsymbol \chi$.

Sample absorbance vectors, $\boldsymbol \alpha _{k}^{*}$, were computed for a uniform grid of thermodynamic conditions. Parameters were sampled from the full range of $\pi _\chi$, $T \in [300~\mathrm {K},2000~\mathrm {K}]$, $p \in [0.8~{\textrm{bar}},1.2~{\textrm{bar}}]$, and $q \in [0,0.2]$ using 30 equidistant points for $T$ and four equidistant points for $p$ and $q$, resulting in $M = 480$ unique state vectors. Sample spectra from this procedure are depicted in Fig. 1(c). The mean absorbance in Fig. 5(c) was computed with Eq. (22) and the covariance matrix in Fig. 5(a) was computed with Eq. (23). Figure 5(b) shows the underlying correlation structure in the absorbance spectrum of water vapor.

As expected, the line centers of absorption features with similar temperature behavior are highly-correlated (see data points 1500 to 2000). Regions that are only covered by the wings of absorption lines are also highly-correlated because the wings overlap and mix, which renders $\alpha _\nu$ nearly proportional to $q$.

 figure: Fig. 5.

Fig. 5. Correlation (a) and covariance (b) matrices for the absorbance prior, determined from simulated spectra (c). Lighter colors represent higher covariance/correlation values. The covariance matrix is displayed on a logarithmic color scale.

Download Full Size | PDF

3.4 Absorbance inference

Given the parameters needed to conduct Bayesian absorbance inference, we proceeded to construct the inverse system matrix and evaluate our simulated data. First, we calculated the Cholesky factors of $\boldsymbol \Sigma _{\textrm{b}}$, $\boldsymbol \Sigma _\alpha$, and $\boldsymbol \Sigma _{\textrm{ddI}}$. Sample-based covariance matrices are subject to numerical instabilities so we added $10^{-8}$ to the diagonal elements of $\boldsymbol \Sigma _\alpha$ to stabilize the decomposition. Next, we combined $\mathbf {L}_{\textrm{b}}$, $\mathbf {L}_\alpha$, and $\mathbf {L}_{\textrm{ddI}}$ with the operators $\mathbf {A}_{\textrm{b}}$, $\mathbf {A}_\alpha$, and $\mathbf {A}_{\textrm{ddI}}$, to obtain the overall system matrix, $\mathbf {A}$. Finally, we performed a one-time calculation of the pseudo-inverse, $\mathbf {A}^\#$, which was subsequently used to evaluate the transmitted intensity signals via fast matrix-vector multiplications.

Vectors of our 1000 simulated TDLAS measurements, $\boldsymbol \gamma _k$, were grouped together in a matrix,

$$\boldsymbol\Gamma = \left[ \begin{matrix} \boldsymbol\gamma_1, \boldsymbol\gamma_2, \dots, \boldsymbol\gamma_{1000} \end{matrix} \right],$$
Bayesian evaluations amounted to the following matrix multiplication:
$$\mathbf{X}_\mathrm{MAP} = \mathbf{A}^\#\boldsymbol\Gamma.$$
Columns of $\mathbf {X}_{\textrm{MAP}}$ are the MAP estimate, $\mathbf {x}_{{\textrm{MAP}},k}$, for the corresponding measurement, $\boldsymbol \gamma _k$, in $\boldsymbol \Gamma$. The MAP estimates contain the absorbance vector, $\boldsymbol \alpha$, as well as the baseline intensity and amplitude coefficients for the fringe model.

Results for the first four signals are shown in Fig. 6 along with the ground truth absorbance spectra. Estimates of $\alpha _\nu$ closely matched the ground truth absorbance spectra. Ideal absorbances are presented as a secondary baseline for comparison. These were computed from the noisy transmitted intensity signal and the exact baseline intensity (which would not be known in an experimental context). This trace serves as an optimal experimental reference: i.e., assuming perfect knowledge of $I_{\nu ,0}$ but lacking prior information about the target spectrum. Deviations between the ideal and ground truth absorbances are caused by noise, which cannot be avoided. By contrast, while the Bayesian estimates were less affected by random artifacts, they were subject to correlated errors (albeit lower in magnitude).

 figure: Fig. 6.

Fig. 6. Bayesian, ideal, and ground truth absorbance spectra plus residua for the Bayesian estimates. Ideal absorbances were calculated from the noisy transmitted intensity and the exact simulated baseline intensity. That is, the absorbance that could be computed given perfect knowledge of the baseline and fringe.

Download Full Size | PDF

The average root-mean-squared error (RMSE) of the Bayesian estimates was only $6.45\cdot 10^{-4}$: roughly an order of magnitude below the mean absorbance for all spectra, $4.77\cdot 10^{-3}$. By comparison, the RMSE of the ideal spectra was $3.99\cdot 10^{-3}$. However, lower errors in the Bayesian estimates, due to the spectral prior, do not necessarily reduce the posterior uncertainty following spectroscopic postprocessing (i.e., computing $T$, $p$, and $q$ from $\alpha _\nu$). This is because the spectroscopic model contains the same information as the absorbance prior. Therefore, the correct interpretation of the lower Bayesian RMSEs is that uncorrelated noise was transferred to lower-amplitude correlated noise.

Our results show that Bayesian absorbance inference can be used to accurately infer absorbance spectra from noisy intensity data with a fringing artifact. Approximations in our linear fringe model were thus sufficiently accurate to compensate for an unintentional etalon.

3.5 Computational considerations

The simplicity and speed of Bayesian absorbance evaluations are considerable advantages over nonlinear techniques, as illustrated by the computation times in Table 2. In our test, preprocessing time exceeded the evaluation time for 1000 spectra by a factor of 65. This shows that Bayesian inference becomes more useful as the number of evaluations with shared properties increases. For instance, in the case of real-time process monitoring, a spectroscopic sensor continuously records intensity data. These traces must be evaluated as fast as possible to obtain low-latency information about the system. The 1.98 ms evaluation time demonstrated here makes it possible to output real-time spectra at a frequency of 500 Hz and a computational latency below 2 ms. Our technique thus paves the way towards on-line, spectrally-resolved TDLAS process monitoring with high species selectivity and the possibility of temperature measurements.

Tables Icon

Table 2. Computation Time of Each Step in the Inference, Evaluations Were Performed in MATLAB R2017b on an Intel Core i7 6500U CPU with 16 GB RAM.

3.6 Inhomogeneous targets

Another advantage of our method arises in the context of inhomogeneous absorption paths, as in combustion chambers and open path emissions detection scenarios. In such cases, fitting the Voigt lineshape to path-integrated data does not return meaningful parameter estimates due to nonlinearities in the local spectroscopic model. Complex fitting strategies are thus required to correct for eventual errors [27]. Bayesian inference circumvents this problem by modeling spectral lines with an MVN distribution. While this approach cannot directly accommodate nonlinear relations from the spectroscopic model, it easily accommodates a superposition of absorbance spectra and lineshapes distorted by path-integration.

We illustrate this flexibility through a thought experiment. Consider an absorption prior generated for a certain molecule and homogeneous absorption path of length $l$. The scenario corresponds to the mean absorbance $\boldsymbol \mu _\alpha$ and covariance $\boldsymbol \Sigma _\alpha$. The local spectral absorption coefficient is $\kappa _\nu = \alpha _\nu /l$ in the homogeneous case, which yields

$$\boldsymbol\mu_\kappa = l^{{-}1}\boldsymbol\mu_\alpha \quad\mathrm{and}\quad \boldsymbol\Sigma_\kappa = l^{{-}2}\boldsymbol\Sigma_\alpha.$$
Next, the path is divided into two independent, homogeneous sections of length $l/2$, each characterized by $\boldsymbol \mu _\kappa$ and $\boldsymbol \Sigma _\kappa$. The sections have a unique absorption coefficient, $\kappa _{\nu _1}$ and $\kappa _{\nu _2}$, and the total absorbance is $\alpha _{\nu }' = l/2\cdot (\kappa _{\nu _1}+\kappa _{\nu _2})$. Since both coefficients follow the same distribution, the MVN pdf of $\alpha _{\nu }'$ is characterized by
$$\boldsymbol\mu_{\alpha}' = 2\frac{l}{2}\boldsymbol\mu_{\kappa} = \boldsymbol\mu_\alpha \quad\mathrm{and}\quad \boldsymbol\Sigma_{\alpha}' = 2\frac{l^{2}}{4} \boldsymbol\Sigma_\kappa = \frac{1}{2} \boldsymbol\Sigma_\alpha.$$
The absorption path can be sectioned, repeatedly, to approximate continuous variation in the gas state. The mean does not change with additional segments, per Eq. (40). However, $\boldsymbol \Sigma _{\alpha }'$ narrows with additional segments because they are assumed to vary independently. Nonetheless, the relative structure of the covariance and correlation matrices remains constant.

In reality, gas states along a path do not vary independently. That is, a finite correlation length can be assumed for all flow types, from a stagnant gas volume to a highly-turbulent reactor. Therefore, absent prior knowledge about spatial correlations in the gas, it is reasonable to select the least-restrictive (maximum entropy) absorbance prior: i.e., the unscaled matrix, $\boldsymbol \Sigma _\alpha$. Hence, the same prior used in this work can be employed in inhomogeneous scenarios.

3.7 Code availability

A commented version of the code used to generate the results presented in this paper has been included as supplemental material (See Code 1, Ref. [28]). The code was written and tested on MATLAB R2017b. Except for the plotting routines, the scripts are compatible with GNU Octave 4.4+.

4. Conclusion

This paper presents a new, computationally-efficient approach to estimate absorbance spectra from intensity spectra. The technique applies Bayesian statistics to a simplified measurement model and incorporates prior information about the system of interest. Our priors include statistical information about the curvature of the incident intensity spectrum as well as the gas properties that give rise to the absorbance spectrum. The absorbance prior, in particular, enables a high-speed performance gain by summarizing as much information about the spectrum as possible in a linear model. We show that the spectral prior is equally valid for homogeneous and inhomogeneous distributions of gas, making the algorithm suitable for absorption tomography. Furthermore, we devised a linear fringe model to compensate for artifacts due to unintentional etaloning. Bayesian evaluations were obtained using a linear least-squares approach, computed by matrix-vector multiplication. This technique can achieve high-throughput with consistent low-latency and is readily-parallelizable. Bayesian absorbance inference is therefore well-suited to real time applications like process monitoring.

We validated our algorithm using 1000 simulated TDLAS measurements of water vapor with additive noise and an etalon. The Bayesian technique adequately compensated for the fringing artifact. Moreover, accurate absorbance estimates, with an RMSE of $6.45\cdot 10^{-4}$, were quickly computed. The evaluation of one spectrum (comprising 2281 wavenumber elements) took only 2 ms on a Intel Core i7 6500U processor.

Bayesian absorbance inference complements common baseline fitting and absorbance estimation methods by locating the primary computational burden in a preparation step, and thus enabling high-speed, low-latency, accurate evaluations of absorbance spectra.

Funding

Deutsche Forschungsgemeinschaft (Projektnummer 215035359 – TRR 129).

Acknowledgments

We thank Dr. Paul J. Hadwin for advice and discussions related to the spectral prior.

References

1. S. Bürkle, A. Dreizler, V. Ebert, and S. Wagner, “Experimental comparison of a 2d laminar diffusion flame under oxy-fuel and air atmosphere,” Fuel 212, 302–308 (2018). [CrossRef]  

2. J. T. C. Liu, G. B. Rieker, J. B. Jeffries, M. R. Gruber, C. D. Carter, T. Mathur, and R. K. Hanson, “Near-infrared diode laser absorption diagnostic for temperature and water vapor in a scramjet combustor,” Appl. Opt. 44(31), 6701–6711 (2005). [CrossRef]  

3. J. Emmert, N. G. Blume, A. Dreizler, and S. Wagner, “Data analysis and uncertainty estimation in supercontinuum laser absorption spectroscopy,” Sci. Rep. 8(1), 10312 (2018). [CrossRef]  

4. C. Strand and R. Hanson, Thermometry and velocimetry in supersonic flows via scanned wavelength-modulation absorption spectroscopy, in 47th AIAA/ASME/SAE/ASEE Joint Propulsion Conference & Exhibit, 493, (American Institute of Aeronautics and Astronautics, Reston, Virigina, 2011).

5. R. K. Hanson and D. F. Davidson, “Recent advances in laser absorption and shock tube methods for studies of combustion chemistry,” Prog. Energy Combust. Sci. 44, 103–114 (2014). [CrossRef]  

6. F. Mayinger, Optical measurements: techniques and applications (Springer Science & Business Media, 2013).

7. R. K. Hanson, R. M. Spearrin, and C. S. Goldenstein, Spectroscopy and optical diagnostics for gases (Springer, 2016).

8. J. Hodgkinson and R. P. Tatam, “Optical gas sensing: a review,” Meas. Sci. Technol. 24(1), 012004 (2013). [CrossRef]  

9. D. Masiyano, J. Hodgkinson, S. Schilt, and R. P. Tatam, “Self-mixing interference effects in tunable diode laser absorption spectroscopy,” Appl. Phys. B 96(4), 863–874 (2009). [CrossRef]  

10. P. Werle, “Accuracy and precision of laser spectrometers for trace gas sensing in the presence of optical fringes and atmospheric turbulence,” Appl. Phys. B 102(2), 313–329 (2011). [CrossRef]  

11. A. Hartmann, R. Strzoda, R. Schrobenhauser, and R. Weigel, “Ultra-compact tdlas humidity measurement cell with advanced signal processing,” Appl. Phys. B 115(2), 263–268 (2014). [CrossRef]  

12. L. A. Kranendonk, A. W. Caswell, and S. T. Sanders, “Robust method for calculating temperature, pressure, and absorber mole fraction from broadband spectra,” Appl. Opt. 46(19), 4117–4124 (2007). [CrossRef]  

13. N. G. Blume, V. Ebert, A. Dreizler, and S. Wagner, “Broadband fitting approach for the application of supercontinuum broadband laser absorption spectroscopy to combustion environments,” Meas. Sci. Technol. 27(1), 015501 (2016). [CrossRef]  

14. Chou Baer Hanson, “Spectral intensity and lineshape measurements in the first overtone band of hf using tunable diode lasers,” J. Mol. Spectrosc. 195(1), 123–131 (1999). [CrossRef]  

15. R. K. Cole, A. S. Makowiecki, N. Hoghooghi, and G. B. Rieker, Baseline-free quantitative absorption spectroscopy based on cepstral analysis, arXiv preprint arXiv:1906.11349 (2019).

16. J. M. Simms, X. An, M. S. Brittelle, V. Ramesh, J. B. Ghandhi, and S. T. Sanders, “Simultaneous optimization method for absorption spectroscopy postprocessing,” Appl. Opt. 54(14), 4403–4410 (2015). [CrossRef]  

17. P. Paci, Y. Zvinevich, S. Tanimura, B. E. Wyslouzil, M. Zahniser, J. Shorter, D. Nelson, and B. McManus, “Spatially resolved gas phase composition measurements in supersonic flows using tunable diode laser absorption spectroscopy,” J. Chem. Phys. 121(20), 9964–9970 (2004). [CrossRef]  

18. C. Wei, D. I. Pineda, C. S. Goldenstein, and R. M. Spearrin, “Tomographic laser absorption imaging of combustion species and temperature in the mid-wave infrared,” Opt. Express 26(16), 20944–20951 (2018). [CrossRef]  

19. S. J. Grauer, J. Emmert, A. M. Steinberg, S. Wagner, and K. J. Daun, Hyperspectral absorption tomography with a lineshape prior., in 11th US National Combustion Meeting, Pasadena, CA, Mar. 24-27, 2019 (2019).

20. W. Demtröder, Experimentalphysik 2 (Springer Berlin Heidelberg, Berlin, Heidelberg, 2006).

21. J. Kaipio and E. Somersalo, Statistical and computational inverse problems, vol. 160 (Springer Science & Business Media, 2006).

22. B. Lins, P. Zinn, R. Engelbrecht, and B. Schmauss, “Simulation-based comparison of noise effects in wavelength modulation spectroscopy and direct absorption tdlas,” Appl. Phys. B 100(2), 367–376 (2010). [CrossRef]  

23. D. P. Bertsekas and J. N. Tsitsiklis, Introduction to probability (Athena Scientific, Belmont, Mass., 2002).

24. U. von Toussaint, “Bayesian inference in physics,” Rev. Mod. Phys. 83(3), 943–999 (2011). [CrossRef]  

25. I. E. Gordon, L. S. Rothman, C. Hill, R. V. Kochanov, Y. Tan, P. F. Bernath, M. Birk, V. Boudon, A. Campargue, K. V. Chance, B. J. Drouin, J.-M. Flaud, R. R. Gamache, J. T. Hodges, D. Jacquemart, V. I. Perevalov, A. Perrin, K. P. Shine, M.-A. Smith, J. Tennyson, G. C. Toon, H. Tran, V. G. Tyuterev, A. Barbe, A. G. Császár, V. M. Devi, T. Furtenbacher, J. J. Harrison, J.-M. Hartmann, A. Jolly, T. J. Johnson, T. Karman, I. Kleiner, A. A. Kyuberis, J. Loos, O. M. Lyulin, S. T. Massie, S. N. Mikhailenko, N. Moazzen-Ahmadi, H. Muller, O. V. Naumenko, A. V. Nikitin, O. L. Polyansky, M. Rey, M. Rotger, S. W. Sharpe, K. Sung, E. Starikova, S. A. Tashkun, J. V. Auwera, G. Wagner, J. Wilzewski, P. Wcisło, S. Yu, and E. J. Zak, “The hitran2016 molecular spectroscopic database,” J. Quant. Spectrosc. Radiat. Transfer 203, 3–69 (2017). [CrossRef]  

26. Y. Dodge, Variance–covariance matrix, in The Concise Encyclopedia of Statistics, (Springer New York, New York, NY, 2008), pp. 559–561

27. X. Liu, J. B. Jeffries, and R. K. Hanson, “Measurement of non-uniform temperature distributions using line-of-sight absorption spectroscopy,” AIAA J. 45(2), 411–419 (2007). [CrossRef]  

28. J. Emmert, “Bayesian absorbance inference - code example,” Code 1: https://figshare.com/s/ea3c3145ea13dc380a43 (2019).

Supplementary Material (1)

NameDescription
Code 1       Sample code for Bayesian absorbance inference

Cited By

Optica participates in Crossref's Cited-By Linking service. Citing articles from Optica Publishing Group journals and other participating publishers are listed here.

Alert me when this article is cited.


Figures (6)

Fig. 1.
Fig. 1. Fringe absorbance of two resonators with a very slight difference in the FSR: $\epsilon_\mathrm{FSR}=10^{-4}~\mathrm{cm}^{-1}$. The fringes nearly coincide at small wavenumbers but are visibly pseudo-shifted at larger wavenumbers.
Fig. 2.
Fig. 2. Flowchart of Bayesian absorbance inference. Transmitted intensity signals are used to estimate key parameters and construct the system matrix. Subsequent signals are evaluated in real-time to obtain MAP estimates, which contain the absorbance spectrum.
Fig. 3.
Fig. 3. Five of the 1000 simulated intensity signals. Points in the red area were evaluated with our Bayesian technique. The intensity trace indicated in red was used to estimate $\Delta_\mathrm{FSR}$.
Fig. 4.
Fig. 4. Estimating the FSR from a reference trace: a) the TDLAS signal $I_\nu$, third-order polynomial fit $I_{\nu,0}^*$, and resulting fringe; and b) the amplitude of the Fourier transform of the absorbance. The peak in the amplitude spectrum yields an estimate of $\Delta_\mathrm{FSR}$.
Fig. 5.
Fig. 5. Correlation (a) and covariance (b) matrices for the absorbance prior, determined from simulated spectra (c). Lighter colors represent higher covariance/correlation values. The covariance matrix is displayed on a logarithmic color scale.
Fig. 6.
Fig. 6. Bayesian, ideal, and ground truth absorbance spectra plus residua for the Bayesian estimates. Ideal absorbances were calculated from the noisy transmitted intensity and the exact simulated baseline intensity. That is, the absorbance that could be computed given perfect knowledge of the baseline and fringe.

Tables (2)

Tables Icon

Table 1. Parameters Used in Bayesian Absorbance Inference.

Tables Icon

Table 2. Computation Time of Each Step in the Inference, Evaluations Were Performed in MATLAB R2017b on an Intel Core i7 6500U CPU with 16 GB RAM.

Equations (40)

Equations on this page are rendered with MathJax. Learn more.

l n ( I ν I ν , 0 ) = α ν ,
α ν = 0 l κ ν [ T ( x ) , p ( x ) , q ( x ) ) ] d x ,
I ν , f r i n g e I ν , 0 = 1 1 + F sin 2 ( π ν / Δ F S R ) ,
Δ F S R = 1 2 n g d .
α ν , f r i n g e = l n ( I ν , f r i n g e I ν , 0 ) = l n [ 1 + F sin 2 ( π ν Δ F S R ) ] = l n [ 1 + F 2 F 2 cos ( 2 π ν Δ F S R ) ] .
α ν , f r i n g e F 2 F 2 cos ( 2 π ν Δ F S R ) .
α ν , f r i n g e F 2 + β 0 cos ( 2 π ν Δ F S R ) + β 1 sin ( 2 π ν Δ F S R ) , w h e r e F = β 0 2 + β 1 2 .
l n ( I ν ) = l n ( I ν , 0 ) α ν α ν , f r i n g e = l n ( I ν , 0 ) α ν F 2 β 0 cos ( 2 π ν Δ F S R ) β 1 sin ( 2 π ν Δ F S R ) .
l n ( I ν ) = l n ( I ν , 0 ) α ν β 0 cos ( 2 π ν Δ F S R ) β 1 sin ( 2 π ν Δ F S R ) ,
π ( x | b ) = π ( b | x ) π p r ( x ) π ( b ) ,
x M A P = a r g m a x x π ( x | b ) ,
x = [ l n ( I ν 1 , 0 ) , l n ( I ν 2 , 0 ) , , l n ( I ν N , 0 ) , α ν 1 , α ν 2 , , α ν N , β 0 , β 1 ] T ,
b = [ l n ( I ν 1 ) , l n ( I ν 2 ) , , l n ( I ν N ) ] T .
b ^ i = l n ( I ν i , 0 ) α ν i β 0 cos ( 2 π ν i Δ F S R ) β 1 sin ( 2 π ν i Δ F S R ) + ϵ i .
b ^ ( x ) = A b x + ϵ ,
A b = [ 1 1 1 1 1 0 0 0 1 0 0 0 1 N × N  identity mat. 1 0 0 0 1 0 0 0 1 Negative  N × N  identity mat. cos ( 2 π Δ F S R ν 1 ) sin ( 2 π Δ F S R ν 1 ) cos ( 2 π Δ F S R ν 2 ) sin ( 2 π Δ F S R ν 2 ) cos ( 2 π Δ F S R ν N ) sin ( 2 π Δ F S R ν N ) N × 2  fringe model 1 1 1 1 ] .
π ( b | x ) = 1 ( 2 π ) N det ( Σ b ) exp [ 1 2 ( b ^ ( x ) b ) T Σ b 1 ( b ^ ( x ) b ) ] .
( Σ b ) i , j = { 0 , f o r i j ( σ I / I ν i ) 2 , f o r i = j .
Σ b = ( σ I / I ¯ ) 2 E N × N ,
π α ( α ) = α { χ | g ( χ ) α } π χ ( χ ) d χ , w h e r e   α = g ( χ ) .
π α ( α ) = 1 ( 2 π ) N det ( Σ α ) exp [ 1 2 ( α μ α ) T Σ α 1 ( α μ α ) ] ,
μ α = 1 M k = 1 M α k ,
Σ α = 1 M 1 k = 1 M ( α k μ α ) ( α k μ α ) T .
A α = [ 0 N × N , E N × N , 0 N × 2 ] ,
π p r , α ( x ) = 1 ( 2 π ) N det ( Σ α ) exp [ 1 2 ( A α x μ α ) T Σ α 1 ( A α x μ α ) ] .
( A d d I ) i , j = { 1 2 , f o r i = j 1 , f o r i = j 1 1 2 , f o r i = j 2 0 , o t h e r w i s e ,
π p r , d d I ( x ) = 1 ( 2 π ) N 2 det ( Σ d d I ) exp [ 1 2 ( A d d I x ) T Σ d d I 1 ( A d d I x ) ] .
Σ d d I = σ d d I 2 E N 2 × N 2 .
σ d d I = max j | ( A d d I [ l n ( x ) 0 N + 1 × 1 ] ) j |
π ( x | b ) = π ( b | x ) π p r , α ( x ) π p r , d d I ( x ) π ( b ) π ( b | x ) π p r , α ( x ) π p r , d d I ( x ) .
x M A P = a r g m a x x exp { 1 2 [ Σ T ( A b x b ) T Σ b 1 ( A b x b ) ( A α x μ α ) T Σ α 1 ( A α x μ α ) ( A d d I x ) T Σ d d I 1 ( A d d I x ) Σ T ] 1 2 } .
L b T L b = Σ b 1 , L α T L α = Σ α 1 , a n d L d d I T L d d I = Σ d d I 1 ,
x M A P = a r g m a x x exp { 1 2 [ Σ T ( L b A b x L b b ) T ( L b A b x L b b ) + ( L α A α x L α μ α ) T ( L α A α x L α μ α ) + ( L d d I A d d I x ) T ( L d d I A d d I x ) Σ T ] 1 2 } .
x M A P = a r g m i n x [ L b A b L α A α L d d I A d d I ] x [ L b b L α μ α 0 ( N 2 ) x 1 ] 2 2 = a r g m i n x A x γ 2 2 .
x M A P = ( A T A ) 1 A T γ = A # γ ,
δ p h a s e = 2 π δ F S R | ν N ν 1 | Δ F S R 2 .
Γ = [ γ 1 , γ 2 , , γ 1000 ] ,
X M A P = A # Γ .
μ κ = l 1 μ α a n d Σ κ = l 2 Σ α .
μ α = 2 l 2 μ κ = μ α a n d Σ α = 2 l 2 4 Σ κ = 1 2 Σ α .
Select as filters


Select Topics Cancel
© Copyright 2024 | Optica Publishing Group. All rights reserved, including rights for text and data mining and training of artificial technologies or similar technologies.