## Abstract

This paper discusses the application of a discrete-time extended Kalman filter (EKF) to the problem of estimating the decay time constant for a Fabry-Perot optical cavity for cavity ring-down spectroscopy (CRDS). The data for the estimation process is obtained from a CRDS experimental setup in terms of the light intensity at the output of the cavity. The cavity is held in lock with the input laser frequency by controlling the distance between the mirrors within the cavity by means of a proportional-integral (PI) controller. The cavity is purged with nitrogen and placed under vacuum before chopping the incident light at 25KHz and recording the light intensity at its output. In spite of beginning the EKF estimation process with uncertainties in the initial value for the decay time constant, its estimates converge well within a small neighborhood of the expected value for the decay time constant of the cavity within a few ring-down cycles. Also, the EKF estimation results for the decay time constant are compared to those obtained using the Levenberg-Marquardt estimation scheme.

© 2011 OSA

## 1. Introduction

Cavity ring-down spectroscopy (CRDS) is a cavity enhanced spectroscopic technique that works by injecting tunable coherent light from a laser or a nonlinear optical device either pulsed or continuous-wave into a resonant optical cavity containing two or more highly reflective mirrors. The optical cavity contains the field, and allows for a long effective pathlength (typically of the order of kilometers), thus intensifying the measurement of photon loss inside the cavity as a function of the optical wavelength; e.g., see [1–4]. In this paper, we consider a Fabry-Perot optical cavity consisting of a hollow tube fitted with two highly reflective mirrors. When the input laser frequency matches the resonant frequency of the cavity, it is said to be in *lock* with the cavity. Any deviation between these frequencies is characterized in terms of the *detuning parameter* Δ and is an undesired effect.

If the light coupling into the cavity is interrupted, light inside the cavity continues to resonate and gradually decays in intensity. This intensity information is recorded to study the decay of light inside the cavity as a function of wavelength. The time taken for the light intensity to decay to 1*/e* times its initial value is termed as the decay time *τ*. This decay time depends upon the reflectivity of the mirrors mounted inside the cavity and losses due to the sample contained within the cavity which directly dictates the amount of optical absorption or scatter. Hence, an estimate of *τ* in such a spectroscopic technique can be used as a molecular detector in chromatographic systems and for applications in molecular fingerprinting which involves detecting various chemicals, such as explosives and their related compounds.

Conventional linear least square techniques can be used to estimate the value for *τ* if the logarithm of the decay of the cavity field is considered [1, 5]. However, linear methods are applied to estimate *τ* in the case of isolated ring-downs and are susceptible to system noise characteristics and instrument offsets; e.g., see [6, 7]. On the other hand, nonlinear least square methods such as the Levenberg-Marquardt (LM) algorithm can handle system noise more effectively but is known to limit the data throughput to below 10Hz [8]. In order to overcome these issues and considering the underlying system dynamics to be linear, an optimal estimator such as the linear Kalman filter (KF) can be employed, which has been successfully used for real-time estimation in various fields; see e.g., [9]. However, in our case, since the measurement involves output light intensity, which is a nonlinear function of the magnitude and phase quadratures, we need to consider nonlinear estimation schemes with real-time implementation capabilities and better throughput than the LM method. To this effect, we propose the use of the extended Kalman filter (EKF) which is the nonlinear counterpart of the linear KF. It was shown in simulation in [10] that the EKF could be used to estimate the states (magnitude and phase quadratures) and parameters (*τ* and Δ) for a Fabry-Perot optical cavity. In this paper, we apply the EKF to estimate *τ* for a set of experimentally obtained output intensity data for a Fabry-Perot optical cavity. During the course of the experiment, Δ was maintained near zero with the aid of a proportional-integral (PI) controller which was used to maintain the distance between the two mirrors inside the cavity so as to match the cavity’s resonant frequency with the input laser frequency. Also, the EKF estimation results for *τ* are compared to those obtained by applying the LM technique to the same set of ring-down data.

The rest of the paper is organized as follows: Section 2 explains the basics of the CRDS technique using a Fabry-Perot optical cavity and introduces the application of modern estimation and control techniques to such an optical system. Section 3 provides a detailed description of a continuous-time mathematical model describing the dynamics for the optical cavity in terms of amplitude and phase quadratures. It also reformulates these dynamics in terms of a state-space representation. A brief introduction to the discrete-time EKF and its recursion equations are presented in Section 4. This section also describes the conversion of the continuous-time state-space equations of Section 3 into their discrete-time counterparts which are used to estimate the value of the decay time constant (*τ*). A detailed description of the experimental setup and the estimation results for *τ* are presented in Section 5 with a comparison between EKF estimation results and LM estimation results. Finally, conclusions and a note on future work are outlined in Section 6.

## 2. Estimation and control for cavity ring-down spectroscopy

Consider the block diagram in Fig. 1 representing an application of modern estimation and control techniques to a CRDS setup. This block diagram can be grouped into two parts: The first part is a CRDS setup comprising of a laser, an acousto-optical modulator (AOM) and a Fabry-Perot optical cavity; and the second part consists of an estimation-control loop comprising of an EKF and a controller. As mentioned in Section 1, light is coupled to the Fabry-Perot cavity via a fast optical switch such as an AOM. Considering the cavity to be locked, that is, the laser frequency is the same as the resonant frequency of the cavity, the light intensity inside the cavity builds due to constructive interference. When light coupling to the cavity is interrupted, its intra-cavity intensity slowly decays depending upon the absorption properties of absorbing species in the cavity as well as the reflectivity of the mirrors within the cavity. This effect is termed as the *ring-down* effect. Indeed, the ring-down time or decay time (*τ*), which is the time taken for the light inside the cavity to decay to 1*/e* of its original intensity, can be computed, which gives a good indication of the absorptive losses associated with the cavity.

Traditional data processing techniques for CRDS focus on fitting each individual decay curve to an exponential equation described by,

where*I*(

*t*) represents the decay amplitude at time

*t*,

*I*

_{0}is the initial intensity of the field within the cavity, and

*τ*is the decay time constant. Indeed, the decay time is a direct measure of losses within the cavity and can be described as, where

*t*is the round-trip time for light within the cavity,

_{rt}*ε*(

*λ*) is the extinction coefficient of an absorbing species with concentration

*c*computed as a function of the wavelength (

*λ*) of the incident light on the cavity. Also,

*n*is the number of mirrors with reflectivity

*R*and

*α*is a lumped term comprising of other absorptions.

The CRDS technique either requires that decay be linearized and a linear least squares fit applied, or that a nonlinear least squares algorithm, usually Levenberg-Marquardt (LM), be employed. Though such techniques accurately determine *τ* for CRDS, they are slow [8]. Also, if the data is noisy, which is generally the case for a simple pulsed system, tens or hundreds of ring-down times may need to be acquired and averaged in order to obtain an accurate result. However, in some applications, it is required that the estimation of *τ* occur in real-time. Since the decaying light intensity as seen at the output of the cavity is a nonlinear function of the magnitude and phase quadratures, we need a suitable nonlinear estimator to estimate *τ*. Hence, we propose the use of an extended Kalman filter (EKF), which is a suboptimal nonlinear estimator, in order to determine *τ*.

For the ring-down estimation to be accurate, the deviation of input laser frequency from the cavity’s resonant frequency characterized by the *detuning parameter* Δ, needs to be maintained at zero. In other words, cavity lock should be maintained. This can be achieved by varying the length between the two mirrors, m1 and m2, in the Fabry-Perot cavity by means of a piezoelectric actuator (PZT), controlled using a suitable controller (see Fig. 1). As mentioned in Section 1, this process varies the length of the cavity, hence affecting its resonant frequency. As shown in the Fig. 1, one way to achieve this is by recording the light intensity at the reflected port of the cavity and using the Pound-Drever-Hall (PDH) method to obtain an analogue voltage (Δ* _{V}*) proportional to Δ. This information is then used by the controller to position mirror m2 via a PZT to maintain cavity lock.

In this paper, we will discuss the application of a discrete-time EKF to estimate the decay-time for a set of experimentally obtained intensity data for a frequency-locked Fabry-Perot optical cavity. The cavity was held in lock with the input laser frequency using a PI controller. Though modern control theory such as linear Gaussian (LQG) control [11–13] and other H_{2}/H_{∞} control methods can be used to improve locking in the presence of noise and uncertainties, they will not be considered in the scope of this paper. A description of the cavity dynamics in terms of a state-space representation follows.

## 3. Cavity dynamics

Consider the following set of continuous-time equations describing the dynamics of the optical cavity; e.g, see [14, 15]:

*a*denotes the annihilation operator for the cavity mode defined in an appropriate rotating frame, (·)

^{†}represents the operator adjoint operation,

*γ*=

*γ*+

_{m}*γ*is the total cavity coupling coefficient.

_{c}*γ*represents the cavity coupling coefficient at the mirrors in a vacuum cavity and

_{m}*γ*represents the cavity coupling coefficient corresponding to the absorbers within the cavity.

_{c}Also, Δ is the detuning parameter, *ā _{in}* the laser input,

*y*is the measured output corresponding to the output light intensity, and

*w*and

*v*represent lumped process and measurement noise terms respectively.

We then define quadrature variables for amplitude (*q*) and phase (*p*) in terms of the annihilation operator (*a*) as,

In order to obtain the cavity dynamics in terms of quadrature components, we begin by substituting (3) into (6). This gives,

*w*=

_{q}*w*+

*w*

^{†}and

*iw*=

_{p}*w – w*

^{†}. Considering the time dependence of various terms and writing (7) and (8) in the state-space form, we get,

*x̄*(

*t*) = [

*q*(

*t*)

*, p*(

*t*)]

*is the state vector,*

^{T}*ū*(

*t*) = 2

*ā*is the input to the system, and

_{in}*w̄*(

*t*) = [

*w*(

_{p}*t*)

*, w*(

_{q}*t*)] is the lumped quadrature noise vector. Also,

*A*,

_{c}*B*, and

_{c}*D*are given matrices. In the sequel, the system (9) will be treated as a classical state-space system.

_{c}Similarly, the nonlinear output dynamics (4) can also be written in terms of the state vector as,

where the nonlinear function $h(x(t))=\frac{{\gamma}_{m}}{4}(q{(t)}^{2}+p{(t)}^{2})$ and*v*(

*t*) is the lumped measurement noise.

## 4. EKF recursion and design

The linear Kalman filter (KF) is an optimal minimum mean-square estimator. It combines the expected value of measurements of a system in terms of dynamic (mathematical) models with noisy measurements usually obtained from sensor(s) to provide values closer to the true measurement. Indeed, such an optimal filter can be applied to linear systems only. In the case of nonlinear systems with nonlinear dynamics, measurements or both, the system equations can be linearized about the current operating point or estimated trajectory and the recursion equations of the linear KF are applied to the resulting linearized system equations. This extension of the KF to nonlinear systems is known as the extended Kalman filter (EKF) and is a suboptimal variant of its linear counterpart. As seen from (11), the measurement equation describing the intensity of light at the output of the cavity is a nonlinear function of the quadrature states *q* and *p*. The estimation of states in this case requires the application of a nonlinear filter such as the EKF which is described in the rest of this section. Also, since the measurements are obtained at discrete intervals of time, we shall apply the recursion equations of a discrete-time EKF.

Consider a nonlinear discrete-time system with the following dynamics,

where*x*

_{(·)}∈ℝ

*is the state,*

^{n}*u*

_{(·)}∈ ℝ

*is the known input,*

^{m}*w*

_{(·)}∈ ℝ

*and*

^{p}*v*

_{(·)}∈ ℝ

*are the process and measurement noise inputs respectively, and*

^{q}*y*

_{(·)}∈ ℝ

*is the measured output. Also,*

^{l}*f*(·) and

*h*(·) are given nonlinear functions. For the system described in (12) – (13), the EKF

*propagation*and

*update*recursion equations are given by,

**Propagation**

**Update**

*propagation*step consists of estimating the value of the state

*x*and covariance

*P*(a matrix representing the approximate variance of the estimate of the state from its true value) one time-step ahead. These values are computed using available state(s) and input(s) at the current time-step and evaluating the state dynamics $f({x}_{k}^{+},{u}_{k})$. The errors in propagation are then corrected using the measured sensor value(s) in the

*update*step. Also, in (14) – (18),

*y*

_{(·)}is the measured sensor output and

*F*

_{(·)},

*H*

_{(·)}are the linearized process and output matrices respectively, computed about the current operating point as,

*K*(·) represents the Kalman gain,

*P*is the covariance matrix,

*Q*and

*R*are the process and measurement noise matrices, and

*I*is the identity matrix of suitable dimensions. Also, (·)

*and (·)*

^{−}^{+}represent apriori and posteriori values respectively; and

*δ*is the sampling time constant.

Since we are interested in estimating the value for *τ* (= 1*/γ*), the continuous-time linear model in (9) is written in the following form,

*x*(

*t*) = [

*q*(

*t*)

*, p*(

*t*)

*, γ*(

*t*)]

*is the*

^{T}*augmented state vector*with the dynamics for the constant term

*γ*(= 1

*/τ*) added to the original state vector

*x̄*defined in (10). The nonlinear measurement equation, however, remains the same as in (11).

In order to apply the discrete-time EKF recursion equations, the continuous-time model presented in (20) and (11) needs to be written in the corresponding discrete-time format. This transformation is achieved as,

where,*δ*the sampling time. Also, the discrete-time measurement equation is computed as,

The actual estimation process comprised of the application of the discrete-time EKF recursion Eqs. (14)–(18) to the light intensity data captured at the output of the cavity. For this purpose, various matrices and constants defined in Eqs. (14)–(18) were set as follows:

Since the cavity was purged with nitrogen and placed under vacuum before recording the intensity data at its output, most of the losses within the cavity were due to the mirrors. Hence, *γ _{m}*

*>> γ*, which meant that

_{c}*τ*was almost equal to the decay time constant for an empty cavity. Considering the reflectivity of mirrors used in the experiment (explained in Section 5), the value of

*τ*for the cavity was expected to be around 5.26

*μs*, corresponding to

*γ*= 1.9

*×*10

^{5}. This was used as an indication for the approximate true value for

*τ*during the estimation process. In accordance, the initial state vector [

*q*

_{0}

*, p*

_{0}

*, γ*

_{0}]

*representing initial values for the amplitude quadrature, the phase quadrature and the total cavity coupling coefficient were set to [0*

^{T}*,*0

*,*1.805

*×*10

^{5}]

*. Here,*

^{T}*γ*

_{0}was set with a 5% error from its expected true value of 1.9

*×*10

^{5}. Also, the corresponding covariance matrix

*P*reflecting error variance in initial conditions was set to,

The output intensity measurements were collected into the vector *y*
_{(·)} defined in (24) and the sampling time constant *δ* was set to 10^{−}^{8}s.

A detailed description of the experimental setup and EKF estimation results are presented in the next section.

## 5. Experimental setup and results

A block diagram describing the experimental setup used to collect ring-downs from a Fabry-Perot cavity is depicted in Fig. 2. Light from an external cavity tunable diode laser (New Focus 6330, 10mW tunable from 1540–1640 nm) is passed through a Faraday isolator in order to prevent unwanted optical feedback. The light is then passed through an electro-optic modulator (EOM) (Thorlabs). The EOM places FM sidebands (at *±* 18.5 MHz) on the laser radiation; these are used to lock the cavity to the laser using the method outlined in [16]. The phase modulated light is then passed through an Acousto-Optic Modulator (AOM) (Brimrose) that is used to rapidly switch the laser light on and off (at 25KHz for this experiment), generating a square waveform. The light then passes through a polarizing cube beamsplitter (PCB) and a quarter wave plate (QWP) before entering the optical cavity. The reflected beam passes back through the optical circulator, and is tapped off to lock the cavity. The cavity is a stainless steel tube (Los Gatos Research) with 99.96% mirrors as both the input and output couplers (Advanced Thin Films, R > 99.96%, loss < 10ppm). These mirrors give a calculated empty cavity ring-down time of ≈ 5*μ*s. Both reflected and transmitted photodetectors were designed and built in-house and have a 3 dB bandwidth *>* 20MHz. The cavity is locked with an in-house designed analog PI controller with a unity gain bandwidth of 1KHz. Light exiting the cavity is acquired using a high-speed digitizing oscilloscope (Cleverscope 3284A, 100MS/sec, 14 bits), and exported to Matlab^{®} for estimating the value for *τ*. Twenty ring-down cycles of this data were used for the estimation process, with Fig. 3 depicting a sample ring-up and ring-down cycle.

In order to estimate the ring-down time constant, the discrete-time EKF recursion Eqs. (14)–(18) and associated constants and matrices outlined in Section 4 were applied to the light intensity data captured at the output of the cavity. This estimation process took about 1.4*s* for one cycle of ring-up and ring-down data. Since the EKF is a suboptimal method, its estimates converge to a neighborhood of the expected true value for *τ* at 5.26*μs* and oscillate with a variation of ±0.012*μs*. In addition, the LM technique was also applied to the recorded intensity data and the estimation results for the ring-down time were compared to that obtained from the EKF at the end of each ring-down cycle. This is depicted in Fig. 4. As seen from Fig. 4, EKF estimates converge to a small neighborhood of the expected true value for *τ* whereas the LM estimates converge to within 0.1*μs* of the expected true value for *τ* at the end of 19 ring-down cycles.

Another advantage of the EKF is in the number of ring-down cycles needed to converge to a neighborhood of the expected true value for *τ*. Since the EKF is a recursive method and relies on the states and parameters at the previous instant in time to estimate the corresponding states and parameters at the current time instant by propagating these values through the system dynamical Eqs. (20)–(23). The associated estimation error improves with time as successive measurements are obtained and the filter recursion is carried out until the estimate for the state(s) converges to a certain neighborhood of the expected true state. This is a direct consequence of the large deviation of the EKF estimated values for *τ* during the initial few cycles as depicted in Fig. 4, after which the error in estimation gradually reduces and the estimate settles within a neighborhood of the expected true value for *τ*. On the other hand, in the case of the curve-fitting LM method, every ring-down cycle is considered independently of the previous cycle and the value for *τ* is estimated separately for each ring-down cycle. This is why the LM algorithm generally needs hundreds of ring-down cycles to obtain an acceptable value for *τ* after averaging the statistics obtained at the end of each ring-down cycle, which is not the case with the EKF.

## 6. Conclusion

The application of a discrete-time extended Kalman filter (EKF) for the estimation of the decay time constant for cavity ring-down spectroscopy was presented. The experimental setup consisted of a Fabry-Perot optical cavity which was purged with nitrogen and placed under vacuum before recording the light intensity at its output, which was then exported to Matlab^{®} for the estimation process. Since the cavity was almost empty during the process of data accumulation, the losses in the cavity were mainly due to the mirrors, with very little or no effect due to other factors contributing to the absorption or scattering of light within the cavity. Hence, the approximate value for *τ* in the estimation process was expected to be close to that of an empty cavity. Considering the reflectivity of mirrors used in the experiment, the value for *τ* of the cavity was expected to be around 5.26*μs* (corresponding to *γ* = 1.9 *×* 10^{5}).

The EKF was applied to the output intensity data obtained from the cavity after locking the cavity to the input laser frequency via a PI controller. The (mathematical) dynamics for the cavity were set in terms of its amplitude and phase quadratures and the recursion equations of the discrete-time EKF were used for the estimation process. The EKF estimates for *τ* converged to the neighborhood of the expected true value of 5.26*μs* within a few cycles of the output ring-down data. The Levenberg-Marquardt (LM) technique was also implemented and its estimation results were compared to that of the EKF at the end of each ring-down cycle. It was found that the LM estimate for *τ* had a 0.1*μs* deviation from the expected true value for *τ* at the end of 19 ring-down cycles, whereas the EKF converged to a neighborhood of the expected true value for *τ* oscillating with a variation of 0.012*μs* after the same number of ring-down cycles.

Indeed, the estimation time can be improved by using a subset of the intensity data points whereas the accuracy of results can be improved by considering the effect of unmodeled dynamics for the cavity model. We are currently working on applying the EKF to the estimation of *τ* in real-time using field programmable gate arrays (FPGA).

## Acknowledgments

This work was supported by the Australian Research Council.

## References and links

**1. **A. O’Keefe and D. A. G. Deacon, “Cavity Ring-Down Optical Spectrometer for Absorption Measurements using Pulsed Laser Sources,” Rev. Sci. Instrum. **59**, 2544–2551 (1988). [CrossRef]

**2. **B. A. Paldus, C. C. Harb, T. G. Spence, B. Wilke, J. Xie, J. S. Harris, and R. N. Zare, “Cavity-Locked Ring-Down Spectroscopy,” J. Appl. Phys. **83**, 3991–3997 (1998). [CrossRef]

**3. **K. W. Busch and M. A. Busch, *Cavity-Ringdown Spectroscopy. An Ultratrace-Absorption Measurement Technique, vol. 720 of ACS Symposium Series* (American Chemical Society, Washington, DC, 1999). [CrossRef]

**4. **T. G. Spence, C. C. Harb, B. A. Paldus, R. N. Zare, B. Willke, and R. L. Byer, “A Laser-Locked Cavity Ring-DOWN Spectrometer Employing an Analog Detection Scheme,” Rev. Sci. Instrum. **71**, 347–353 (2000). [CrossRef]

**5. **J. Xie, B. A. Paldus, E. H. Wahl, J. Martin, T. G. Owano, C. H. Kruger, J. S. Harris, and R. N. Zare, “Near-Infrared Cavity Ringdown Spectroscopy of Water Vapor in an Atmospheric Flame,” Chem. Phys. Lett. **284**, 387–395 (1998). [CrossRef]

**6. **A. A. Istratov and O. F. Vyvenko, “Exponential analysis in physical phenomena,” Rev. Sci. Instrum. **70**1233 (1999). [CrossRef]

**7. **M. Mazurenka, R. Wada, A. J. L. Shillings, T. J. A. Butler, J. M. Beames, and A. J. Orr-Ewing, “Fast fourier transform analysis in cavity ring-down spectroscopy: application to an optical detector for atmospheric NO2,” Appl. Phys. B: Lasers Opt. **81**, 135–141 (2005). [CrossRef]

**8. **M. A. Everest and D. B. Atkinson, “Discrete Sums for the Rapid Determination of Exponential Decay Constants,” Rev. Sci. Instrum. **79**, 023108–023108–9 (2008). [CrossRef]

**9. **C. K. Chui and G. Chen, *Kalman Filtering with Real-Time Applications*, Theoretical, Mathematical & Computational Physics (Springer-Verlag, Berlin, Heidelberg, Germany, 2009), 4th ed.

**10. **A. G. Kallapur, I. R. Petersen, T. K. Boyson, and C. C. Harb, “Nonlinear Estimation of a Fabry-Perot Optical Cavity for Cavity Ring-Down Spectroscopy,” in “IEEE International Conference on Control Applications (CCA),” (Yokohama, Japan, 2010), pp. 298–303.

**11. **S. Z. Sayed Hassen, E. Huntington, I. R. Petersen, and M. R. James, “Frequency Locking of an Optical Cavity Using LQG Integral Control,” in “*17th IFAC World Congress*,” (Seoul, South-Korea, 2008), pp. 1821–1826.

**12. **S. Z. Sayed Hassen, M. Heurs, E. H. Huntington, I. R. Petersen, and M. R. James, “Frequency Locking of an Optical Cavity using Linear-Quadratic Gaussian Integral Control,” J. Phys. B: At. Mol. Opt. Phys. **42**, 175501 (2009). [CrossRef]

**13. **S. Z. Sayed Hassen and I. R. Petersen, “A time-varying Kalman filter approach to integral LQG frequency locking of an optical cavity,” in “*American Control Conference*,” (Baltimore, MD, USA, 2010), pp. 2736–2741.

**14. **C. W. Gardiner and P. Zoller, *Quantum Noise* (Springer, Berlin, Germany, 2000).

**15. **H. A. Bachor and T. C. Ralph, *A Guide to Experiments in Quantum Optics* (Wiley-VCH, Weinheim, Germany, 2004), 2nd ed. [CrossRef]

**16. **R. W. P. Drever, J. L. Hall, F. V. Kowalski, J. Hough, G. M. Ford, A. J. Munley, and H. Ward, “Laser Phase and Frequency Stabilization using an Optical Resonator,” Appl. Phys. B: Lasers Opt. **31**, 97–105 (1983). [CrossRef]