Real-time gas sensing based on optical feedback in a terahertz quantum-cascade laser

We report on real-time gas sensing with a terahertz quantum-cascade laser (QCL). The method is solely based on the modulation of the external cavity length, exploiting the intermediate optical feedback regime. While the QCL is operated in continuous-wave mode, optical feedback results in a change of the QCL frequency as well as its terminal voltage. The first effect is exploited to tune the lasing frequency across a molecular absorption line. The second effect is used for the detection of the self-mixing signal. This allows for fast measurement times on the order of 10 ms per spectrum and for real-time measurements of gas concentrations with a rate of 100 Hz. This technique is demonstrated with a mixture of D2O and CH3OD in an absorption cell. © 2017 Optical Society of America OCIS codes: (140.5965) Semiconductor lasers, quantum cascade; (280.4788) Optical sensing and sensors; (300.6320) Spectroscopy, high-resolution; (300.6495) Spectroscopy, terahertz. References and links 1. M. Tonouchi, “Cutting-edge terahertz technology,” Nat. Photonics 1, 97–105 (2007). 2. P. U. Jepsen, D. G. Cooke, and M. Koch, “Terahertz spectroscopy and imaging – Modern techniques and applications,” Laser Photonics Rev. 5, 124–166 (2011). 3. L. Ho, M. Pepper, and P. Taday, “Terahertz spectroscopy: Signatures and fingerprints,” Nat. Photonics 2, 541– 543 (2008). 4. P. C. Ashworth, E. Pickwell-MacPherson, E. Provenzano, S. E. Pinder, A. D. Purushotham, M. Pepper, and V. P. Wallace, “Terahertz pulsed spectroscopy of freshly excised human breast cancer,” Opt. Express 17(15), 12444– 12454 (2009). 5. A. G. Davies, A. D. Burnett, W. Fan, E. H. Linfield, and J. E. Cunningham, “Terahertz spectroscopy of explosives and drugs,” Mater. Today 11(8), 18–26 (2008). 6. L. Rezac, P. Hartogh, R. Güsten, H. Wiesemeyer, H.-W. Hübers, C. Jarchow, H. Richter, B. Klein, and N. Honingh, “First detection of the 63 μm atomic oxygen line in the thermosphere of Mars with GREAT/SOFIA,” Astron. Astrophys. 580, L10 (2015). 7. J. B. Baxter and G. W. Guglietta, “Terahertz Spectroscopy,” Anal. Chem. 83(12), 4342–4368 (2011). 8. H.-W. Hübers, S. G. Pavlov, H. Richter, A. D. Semenov, L. Mahler, A. Tredicucci, H. E. Beere, and D. A. Ritchie, “High-resolution gas phase spectroscopy with a distributed feedback terahertz quantum cascade laser,” Appl. Phys. Lett. 89, 061115 (2006). 9. S. Bartalini, L. Consolino, P. Cancio, P. De Natale, P. Bartolini, A. Taschin, M. De Pas, H. Beere, D. Ritchie, M. S. Vitiello, and R. Torre, “Frequency-Comb-Assisted Terahertz Quantum Cascade Laser Spectroscopy,” Phys. Rev. X 4, 021006 (2014). 10. Y. L. Lim, P. Dean, M. Nikolić, R. Kliese, S. P. Khanna, M. Lachab, A. Valavanis, D. Indjin, Z. Ikonić, P. Harrison, E. H. Linfield, A. G. Davies, S. J. Wilson, and A. D. Rakić, “Demonstration of a self-mixing displacement sensor based on terahertz quantum cascade lasers,” Appl. Phys. Lett. 99, 081108 (2011). 11. P. Dean, Y. L. Lim, A. Valavanis, R. Kliese, M. Nikolić, S. P. Khanna, M. Lachab, D. Indjin, Z. Ikonić, P. Harrison, A. D. Rakić, E. H. Linfield, and A. G. Davies, “Terahertz imaging through self-mixing in a quantum cascade laser,” Opt. Lett. 36(13), 2587–2589 (2011). 12. A. D. Rakić, T. Taimre, K. Bertling, Y. L. Lim, P. Dean, D. Indjin, Z. Ikonić, P. Harrison, A. Valavanis, S. P. Khanna, M. Lachab, S. J. Wilson, E. H. Linfield, and A. G. Davies, “Swept-frequency feedback interferometry Vol. 25, No. 24 | 27 Nov 2017 | OPTICS EXPRESS 30203 #305532 https://doi.org/10.1364/OE.25.030203 Journal © 2017 Received 24 Aug 2017; revised 10 Oct 2017; accepted 19 Oct 2017; published 17 Nov 2017 using terahertz frequency QCLs: a method for imaging and materials analysis,” Opt. Express 21(19), 22194– 22205 (2013). 13. Y. Ren, R. Wallis, D. S. Jessop, R. Degl’Innocenti, A. Klimont, H. E. Beere, and D. A. Ritchie, “Fast terahertz imaging using a quantum cascade amplifier,” Appl. Phys. Lett. 107, 011107 (2015). 14. M. Wienold, T. Hagelschuer, N. Rothbart, L. Schrottke, K. Biermann, H. T. Grahn, and H.-W. Hübers, “Realtime terahertz imaging through self-mixing in a quantum-cascade laser,” Appl. Phys. Lett. 109, 011102 (2016). 15. T. Hagelschuer, M. Wienold, H. Richter, L. Schrottke, K. Biermann, H. T. Grahn, and H.-W. Hübers, “Terahertz gas spectroscopy through self-mixing in a quantum-cascade laser,” Appl. Phys. Lett. 109, 191101 (2016). 16. D. R. Bacon, J. R. Freeman, R. A. Mohandas, L. Li, E. H. Linfield, A. G. Davies, and P. Dean, “Gain recovery time in a terahertz quantum cascade laser,” Appl. Phys. Lett. 108, 081104 (2016). 17. X. Qi, G. Agnew, I. Kundu, T. Taimre, Y. L. Lim, K. Bertling, P. Dean, A. Grier, A. Valavanis, E. H. Linfield, A. Giles Davies, D. Indjin, and A. D. Rakić, “Multi-spectral terahertz sensing: proposal for a coupled-cavity quantum cascade laser based optical feedback interferometer,” Opt. Express 25(9), 10153–10165 (2017). 18. L. Schrottke, M. Wienold, R. Sharma, X. Lü, K. Biermann, R. Hey, A. Tahraoui, H. Richter, H.-W. Hübers, and H. T. Grahn, “Quantum-cascade lasers as local oscillators for heterodyne spectrometers in the spectral range around 4.745 THz,” Semicond. Sci. Technol. 28, 035011 (2013). 19. H. Richter, M. Greiner-Bär, S. G. Pavlov, A. D. Semenov, M. Wienold, L. Schrottke, M. Giehler, R. Hey, H. T. Grahn, and H.-W. Hübers, “A compact, continuous-wave terahertz source based on a quantum-cascade laser and a miniature cryocooler,” Opt. Express 18(10), 10177–10187 (2010). 20. H. M. Pickett, R. L. Poynter, E. A. Cohen, M. L. Delitsky, J. C. Pearson, and H. S. P. Müller, “Submillimeter, millimeter, and microwave spectral line catalog,” J. Quant. Spectrosc. Radiat. Transf. 60, 883–890 (1998). 21. T. Hagelschuer, N. Rothbart, H. Richter, M. Wienold, L. Schrottke, H. T. Grahn, and H.-W. Hübers, “Highspectral-resolution terahertz imaging with a quantum-cascade laser,” Opt. Express 24(13), 13839–13849 (2016). 22. R. Lang and K. Kobayashi, “External Optical Feedback Effects on Semiconductor Injection Laser Properties,” IEEE J. Quantum Electron. 16, 347–355 (1980). 23. G. Giuliani, M. Norgia, S. Donati, and T. Bosch, “Laser diode self-mixing technique for sensing applications,” J. Opt. A, Pure Appl. Opt. 4, S283–S294 (2002). 24. L. A. Curtiss and M. Blander, “Thermodynamic Properties of Gas-Phase Hydrogen-Bonded Complexes,” Chem. Rev. 88, 827–841 (1988). 25. S. Dixit, J. Crain, W. C. K. Poon, J. L. Finney, and A. K. Soper, “Molecular segregation observed in a concentrated alcohol-water solution,” Nature 416(6883), 829–832 (2002). 26. J.-H. Guo, Y. Luo, A. Augustsson, S. Kashtanov, J.-E. Rubensson, D. K. Shuh, H. Ågren, and J. Nordgren, “Molecular Structure of Alcohol-Water Mixtures,” Phys. Rev. Lett. 91(15), 157401 (2003).


Introduction
Spectroscopy at terahertz (THz) frequencies has attracted increasing interest in recent years [1,2]. Due to the presence of a variety of characteristic spectral features, the THz region is very promising for applications in the field of medicine, security screening, and astronomy [3]. Examples of THz spectroscopic applications include the detection of human cancer tissue with a portable THz pulsed spectrometer [4] and the identification of illicit drugs and explosive materials with a THz time-domain spectrometer [5]. Another example is the THz heterodyne spectrometer onboard the Stratospheric Observatory for Infrared Astronomy (SOFIA), which allows for the observation of cold interstellar matter and planetary atmospheres [6].
At present, THz spectroscopy is realized with a variety of techniques [7]. Due to their narrow linewidth, quantum-cascade lasers (QCLs) are well suited for THz high-resolution molecular spectroscopy [8,9]. However, the extensive use of THz QCLs for spectroscopic applications is still limited by the system size and complexity including the detector. While detectors operating at room temperature such as Golay cells or pyroelectric detectors are typically rather slow and not very sensitive, cryogenically cooled detectors are very sensitive, but expensive and bulky. These detection schemes have in common that the sensitivity increases with the power of the THz source.
A rather compact and sensitive detection scheme is based on the response of the QCL to external optical feedback (EOF). EOF is induced if a fraction of the emitted light is reflected back into the active medium, giving rise to the self-mixing effect, which is measurable through a change of certain QCL parameters such as power, frequency, and voltage. In such a configuration, the sensitivity does not scale with the THz source power, but with the relative amount of the back-coupled light. So far, the self-mixing technique has been applied to THz interferometry and imaging [10][11][12][13][14]. Recently, we demonstrated the feasibility of high-resolution spectroscopy through self-mixing with a QCL operating at 3.4 THz and in the weak-feedback regime [15]. However, in the limit of weak feedback, the small self-mixing signal results in measurement times on the order of several minutes per spectrum. Since scattering processes typically occur on a ps time scale, the response time of QCLs to EOF is intrinsically suitable for very fast, real-time spectroscopic applications [12,16]. Such a realtime EOF spectrometer based on a QCL has been theoretically proposed for high-speed material detection and identification [17].
In this paper, we present a real-time EOF sensor based on a QCL operating at 4.7 THz in an intermediate feedback regime. The study comprises an experimental as well as theoretical investigation and demonstrates that THz spectroscopy through EOF is not limited to weak feedback. This allows for short measurement times on the order of 10 ms for a single spectrum with a 200 MHz coverage. As a further advantage, we show that, at intermediate feedback levels, EOF can be applied to replace conventional frequency tuning by simply varying the length of the external cavity. This is exploited to tune the QCL frequency across a molecular rotational transition of gaseous deuterium oxide (D2O) in an absorption cell. We further demonstrate real-time monitoring of the gas concentrations in a mixture of D 2 O and deuterated methanol (CH 3 OD) at rates of 100 Hz. Finally, the results are compared to conventional direct absorption measurements.

Experimental setup
A schematic diagram of the experimental setup is shown in Fig. 1(a). THz radiation is generated by a QCL with a lateral distributed feedback grating and a 873 µm long resonator. The active region design is based on a GaAs/(Al,Ga)As heterostructure and a single-plasmon waveguide with an outcoupling facet of 10 × 80 µm 2 . In [18], Schrottke et al. describe details of the active region. The QCL is operated in a compact Stirling cryocooler (Ricor K535) at temperatures in the range of 40−50 K [19]. The exit window is made of high-density polyethylene (HDPE). For self-mixing, the QCL is operated at a current of 588 mA and a heat sink temperature of 48 K. The QCL DC current is provided by a low-noise current source (QCL 1000, Wavelength Electronics). The heat sink temperature is stabilized by a temperature control unit (CryoCon C24) with an accuracy of ± 1 mK. In this configuration, the QCL emits a single frequency at 4.7518 THz with an optical output power of up to 1.4 mW. The sensor is controlled via a CompactRIO (National Instruments) system.
The QCL beam is collected by a 90° parabolic off-axis mirror with a diameter of 25.4 mm. At a distance of 75 mm from the vacuum window of the cooler, the beam enters a 300mm long absorption cell with an inner diameter of 45 mm sealed by 1.5-mm thick HDPE windows. The windows of the absorption cell are tilted with respect to the optical axis to avoid standing waves, which would generate additional EOF. For gas phase spectroscopy, D2O is injected into the absorption cell via a needle valve (V 1 ) and evacuated by a turbomolecular pump (TMP), which is connected to the cell by a second valve (V 2 ). For realtime observation of gas mixtures, a second gas such as CH 3 OD can be injected via another valve V 3 . The pressure inside the evacuated absorption cell is below 5 × 10 −2 Pa. The operating pressure used in our experiments ranges from 1 to 200 Pa.
At a distance of 90 mm from the exit window of the absorption cell, the beam is transmitted through a rotating wire grid with a diameter of 76.2 mm, which is mounted at an angle of 45° with respect to the optical axis. The wire grid splits the beam and allows for variation of the feedback strength. In the path of the first beam, the transmitted beam is focused onto a plane mirror so that an external cavity, which induces EOF, is formed by the mirror and the outcoupling laser facet. The plane mirror is mounted on a voice coil, which serves as a linear translation stage. This allows for modulation of the QCL frequency as a function of the mirror displacement. The modulation is controlled by the cRIO and read out with a dedicated position sensor. The self-mixing signal is obtained by measuring the voltage across the QCL. A liquid-helium-cooled Ge:Ga detector is placed in the focus of the path of the second beam in order to measure the absorption signal directly. The path length between the outcoupling facet of the QCL and the plane mirror or the Ge:Ga detector is 565 mm in both cases. The self-mixing voltage and the detector signal are monitored via the cRIO, which operates at a sampling rate of 50 kHz. Figure 1(b) displays the transmission through the wire grid as a function of the wire grid angle δ, which has been measured at the position of the mirror as well as of the Ge:Ga detector with a power meter (TK TeraHertz Absolute Power Meter System, Thomas Keating). A variation of the wire grid angle allows for the reduction of the feedback level. Figure 1(c) shows the transmission spectra of D2O and CH 3 OD, which have been separately measured with the Ge:Ga detector through a variation of the QCL driving current at a pressure of 100 Pa. The frequency scale corresponds to a linear frequency-current characteristic with a tuning coefficient of −34 MHz/mA and has been confirmed by a simulation based on the Jet Propulsion Laboratory (JPL) molecular spectroscopy catalog [20]. Details of the assignment procedure are described in [21]. The absorption peak of the D 2 O line is visible at −68 MHz with respect to the QCL operating point used for EOF spectroscopy, i.e. the unperturbed frequency ν 0 . The absorption peak of CH 3 OD is observed at −29 MHz [ Fig. 1(c)].

Measurement principle
The measurement principle is solely based on EOF. While the QCL is operated in continuouswave mode at a fixed temperature and a fixed driving current, frequency tuning is obtained by varying the external cavity length. The signal detection is based on the feedback-induced voltage variation of the QCL. We first consider a system without any gas species, for which the feedback parameter C equals the value C 0 for the evacuated absorption cell. The behavior of the system is well described by the Lang-Kobayashi theory [22]. In terms of optical phases, the self-mixing equation reads [12,22] Here, Δφ = φ 0 − φ denotes the difference between the optical phase φ 0 = 4πdc −1 ν 0 of the unperturbed system and φ = 4πdc −1 ν of the system with optical feedback. α LEF is the linewidth enhancement factor. In terms of the optical phases, d denotes the external cavity length, c the speed of light, and ν 0 and ν the unperturbed and perturbed frequency, respectively. We now where N is an integer. In this case, Eq. (1) is solved by Δφ = 0. It is important to note that the condition defined by Eq. (2) can always be realized by adjusting the external cavity length. In the vicinity of d s , the solution of Eq. (1) becomes single valued even in the intermediate feedback regime (1 < C 0 < 4.6). The variation of the cavity length can then be exploited to tune the laser frequency across a certain range. The maximum tuning range, for which the solution of Eq. (1) remains strictly single valued, is obtained for C 0 = 1.8. Since the system remains typically metastable under a variation of the cavity length even for larger feedback parameters, the optimum experimental conditions are expected for 1.8 < C 0 < 4.6. Above that level, always three or more stable solutions exist, which complicates the preparation of a well-defined default state. We now consider a small variation of the cavity length Δd = d − d s , fulfilling the condition with Δd M denoting the maximum variation of the cavity length. Within this range, we approximate sin(x) in Eq. (1) by x. The feedback-induced frequency shift then becomes The result is illustrated in Fig. 2 In the presence of an absorbing gas species, the feedback parameter changes according to 0 0 , where T denotes the single-pass power transmission through the absorption cell, which is determined by the absorption coefficient α of the molecule and the length L of the gas column. Apparently, the feedback parameter becomes now frequency dependent. In addition, also the optical cavity length becomes frequency dependent due to the change of the refractive index. This requires rewriting Eq. (4) in terms of the optical phases, which yields The solutions of Eq. (6) are illustrated in Fig. 2(b) for a Doppler-broadened D 2 O absorption line and different peak absorption values A pk at the center of the absorption line A pk = max(1−T). For smaller values of A pk , a deviation from the linear frequency dependence is obtained only in the vicinity of the peak. At larger peak absorption values, hysteresis appears where the size of the hysteresis loop increases with increasing A pk . In such cases, a certain frequency range around the peak will not be covered by the tuning mechanism.
Another important aspect is the detection of the self-mixing signal via the terminal voltage of the QCL. The self-mixing component of the voltage due to the modulation of the laser gain follows [12,14] where m is a constant. We define the apparent transmission as EOF EOF (gas) .
(ref ) Here, U EOF (gas) is the self-mixing voltage obtained with the absorption cell filled with gas, while U EOF (ref) refers to the self-mixing voltage for an empty absorption cell. Figure 3(a) illustrates the self-mixing signal U EOF , which is obtained for different absorption levels. For clarity, the absorption peak has been located at Δν = 0, and we set arctan(α LEF ) = 0. At very small absorption levels (A pk << 0.1), the induced nonlinearity of the frequency scale is negligible and, according to Eq. (4), T' (Δd) is proportional to T (Δν). At a small absorption level (A pk = 0.1), the apparent peak absorption A pk ' = max(1−T') is still equal to the simulated value A pk . However, the line shape becomes distorted due to the nonlinear frequency shift around the absorption peak [cf. inset of Fig. 3(a)]. In the range of 0.15 < A pk < 0.20, where the peak separation is still rather small, the absorption A pk can also be obtained from A pk ' by multiplying A pk ' with an absorption-dependent prefactor. For real-time measurements as discussed later, the deviation between A pk and A pk ' in that range is negligible as compared to the accuracy of the method. At a larger absorption level (A pk = 0.4), two separate peaks are observed due to the hysteresis of the system. In such a situation, Eq. (8) cannot be easily applied to determine A pk , since the center of the absorption peak is no longer covered by the optical-feedback tuning scheme [cf. Figure 2(a)]. Fortunately, above the onset of hysteresis, the (b) Hysteresis-induced separation d pk-pk of the peak positions as a function of A pk calculated at 300 K (Doppler broadened).
peak separation d pk-pk as introduced in Fig. 3(a) depends monotonically on A pk . This behavior is exemplarily depicted in Fig. 3(b) for the two gas species used in the experiments. The figure shows the separation d pk-pk as a function of A pk which has been calculated for Dopplerbroadened absorption lines at a temperature of 300 K. Above the onset of hysteresis at A pk ≈0.15, the peak separation is a monotonically increasing function of the absorption level. For A pk > 0.9, the peak separation exceeds 2Δd M , which sets an upper limit for the observable peak absorption. Note that the small difference between D 2 O and CH 3 OD in Fig. 3(b) is due to their different Doppler-broadened linewidths.

Self-mixing parameters
with D m denoting the maximum mirror displacement of 16 µm. φ m = 2πν m t is the mirror oscillation phase with ν m labeling the mirror modulation frequency and t denoting the time. d shift denotes an offset term for the mirror position. Figure 4(a) presents the EOF signal as a function of the mirror oscillation phase for two different feedback levels. The red line corresponds to the maximum level of feedback. Here, the QCL voltage is reduced by up to 3.2 mV and shifted with respect to the unperturbed QCL voltage. This indicates stronger feedback (C > 1). The D 2 O absorption appears as sharp dips indicated by blue arrows. There are two dips for each oscillation, since the absorption frequency is detected twice, once during the forward motion of the mirror and a second time during the backward motion. The green line in Fig. 4(a) is the result of a simulation of the EOF signal according to Eq. (7) with parameters C 0 = 3.1 and α LEF = 0.4. Except for the D 2 O absorption lines, the agreement is excellent. According to the definition in [23], the feedback parameter is in the intermediate feedback regime (1 < C < 4.6). The black line in Fig. 4(a) is a measurement in the weak feedback regime at C 0 = 0.5 [23]. The EOF signal is significantly reduced and oscillates around the unperturbed QCL voltage. The absence of any absorption line is a consequence of the reduced frequency tuning range, which does no longer cover the D 2 O absorption frequency (Δν < ν 0ν D2O ). This is also illustrated in Fig. 4(b), which presents a simulation of the expected frequency shift due to EOF as a function of the mirror oscillation

Transmission and line shape at larger absorption levels
Since gas absorption leads to a reduction of the feedback level, the transmission values and the line shape of the self-mixing spectra become affected when displayed as a function of the mirror displacement. Without gas, the frequency shift with respect to ν 0 is a linear function of the cavity length [cf. Equation (4)]. In this case, the EOF frequency depends linearly on the mirror displacement with a tuning coefficient of −6.3 MHz/µm. Figure 5(a) shows the EOF signal as a function of the dimensionless displacement Δd/Δd M obtained at maximum feedback (C 0 = 3.1) and for two different values of the D 2 O pressure. The blue line in Fig.  5(a) shows a forward and backward sweep across the D 2 O line at a pressure of 2 Pa. The peak absorption appears for both sweeps at almost identical mirror displacement positions d D2O /Δd M . This verifies that the influence of the gas absorption on the EOF frequency is negligible for sufficiently small absorption levels as shown in Fig. 2. In this case, the measured peak absorption A pk ' (Δd) according to Eq. (8) represents the simulated peak absorption A pk (Δν). The red line in Fig. 5(a) shows the result of the same measurement at 20 Pa. Here, the D 2 O absorption lines for the forward and backward motion of the mirror are shifted by a distance of d pk-pk /Δd M ≈0.4 due to hysteresis. The line shape becomes strongly distorted, and A pk ' is not equal anymore to the simulated peak transmission value. The measured peak absorption values A pk ' of 0.48 (forward direction) and 0.51 (backward direction) obtained via Eq. (8) are smaller than the simulated value of 0.63. This difference is in good agreement with the theory [cf. Figure 3(b)]. Note that the absorption A pk can be obtained from the measured values A pk ' via the peak separation d pk-pk /Δd M as presented in Fig. 3(b). Figure 5(b) presents the EOF transmission spectrum as a function of the EOF-induced frequency shift for the measurement at 2 Pa (blue line). The spectrum has been obtained by averaging the EOF signal of the forward and backward sweep within a single mirror oscillation period and by normalizing it to a reference measurement with an evacuated absorption cell according to Eq. (8). The frequency scale corresponds to that of an empty cavity according to Eq. (4). A simulation of the expected transmission spectrum based on the molecular spectroscopy catalog [20] is also shown in Fig. 5(b) by the red line. The simulated transition frequency of −68 MHz relative to the frequency set by the operating point of the QCL as well as the transmission of 0.88 fit very well to the experimental data. Note that this result is the same as obtained in a direct absorption configuration [ Fig. 1(c)]. The full width at half maximum of 13.4 MHz of the calculated line is slightly broader than the observed one. This is due to the nonlinear frequency shift around the absorption peak present at absorption levels Apk ≈0.1 in accordance with the theory [cf. inset of Fig. 3(a)].
We conclude that the peak transmission as well as the transition frequency of different gas concentrations can be determined through EOF, even for strong absorption levels with A pk > 0.1. However, the assignment of a well-defined frequency scale in order to reconstruct the spectral line shape would require a self-consistent solution of Eq. (6) on the basis of the experimental data, since the EOF frequency depends now on the mirror displacement and the gas concentration.

Dynamical system with two gas species
In order to demonstrate the real-time potential of THz gas sensing based on EOF, the experiment is repeated with a mixture of two different gases. Initially, the absorption cell is filled with D 2 O at 40 Pa. Then, a second gas, in our case deuterated methanol CH 3 OD, is injected into the absorption cell. Every 20 ms, a self-mixing spectrum is recorded, which contains the absorption lines for the forward and the backward sweep of the mirror. This allows for real-time monitoring of the concentration ratio of CH 3 OD and D 2 O, which is reflected in the peak absorption for the two species. Figure 6(a) presents the peak absorption of D 2 O (blue points) and CH 3 OD (red points) derived from the EOF signal as a function of time and pressure. The total pressure follows the relation p(t) = p 0 + p 1 t, where p 0 = 40 Pa and p 1 = 16 Pa/s. The data points have been obtained according to Eq. (8) and by correcting the measured peak absorption A pk ' (Δd) via the peak distance d pk-pk of the forward and backward sweep as described in the previous section. The absorption peaks are evaluated above a level of 0.1 in order to avoid artificial peaks. Three different regions I−III can be distinguished in Fig. 6, which are separated by dashed lines. In region I (0 < t < 2.5 s), the peak absorption A pk of D 2 O (A) is stronger than the one of CH 3 OD (B). Here, the absorption of D 2 O is observed starting from t = 0 with an initial peak absorption of approximately 0.9. The absorption of CH 3 OD is observable after t = 0.5 s (p ≈50 Pa). From that point on, the ratio of the CH 3 OD to D 2 O absorption rapidly changes and is approximately one in region II (2.5 s < t < 5.0 s) with a crossover at t = 4.0 s (p ≈100 Pa). Note that this is consistent with the ratio of the peak absorption of CH 3 OD and D 2 O obtained with the Ge:Ga detector [cf. Figure  1(c)]. An exemplary EOF spectrum at the crossover point is also shown [inset in Fig. 6(a)]. In region III (5.0 s < t < 7.5 s), the CH 3 OD peak absorption is clearly stronger than the one of D 2 O, which is reduced to 0.1 at t = 7.5 s. Evaluating the standard deviation, we estimate the accuracy to be 10% for the peak absorption, which corresponds to a bandwidth-normalized noise-equivalent absorption of 6.3 × 10 −4 Hz −1/2 . In order to compare our real-time sensing scheme with a conventional approach, the experiment is repeated in a direct absorption configuration with a Ge:Ga detector. For this measurement, the wire grid phase is set to 90°, and the mirror is covered with Eccosorb. For frequency tuning, the QCL current is tuned to 3 mA above the operating point. This corresponds to a frequency tuning of 102 MHz. Figure 6(b) presents the result of this experiment. Here, the same behavior of the ratio of the CH 3 OD to D 2 O absorption within regions I−III as depicted in Fig. 6(a) can be observed. Again, an exemplary transmission spectrum measured at the crossover point in region II (2.5 s < t < 5.0 s) at t = 4.0 s (p ≈100 Pa) is shown [cf. inset in Fig. 6(b)]. The frequency scale has been derived from the linear dependence on current and frequency with respect to the tuning coefficient [cf. Figure 1(c)]. Due to a better signal-to-noise ratio, the accuracy obtained with the Ge:Ga detector amounts to 4% for the peak absorption values, which corresponds to a bandwidth-normalized noiseequivalent absorption of 2.5 × 10 −4 Hz −1/2 . Nevertheless, a comparison between Figs. 6(a) and 6(b) reveals that the ratio of the peak absorption of CH 3 OD and D 2 O can be precisely obtained from the EOF signal without any additional detector and in agreement with calculation results as discussed in section 3. Improvements of the signal-to-noise ratio are expected by a further reduction of the noise floor through synchronization of the acquisition hardware with the mechanical vibrations of the cryocooler.
While the ratio of the peak absorption of CH 3 OD and D 2 O is consistent with the expected change of the concentration ratio, the reduction of the absolute absorption level after injection of the second species in Figs. 6(a) and 6(b) requires a different explanation. Since the absorption signal is significantly reduced already from the beginning of the experiment at t = 0 and p = 40 Pa, pressure broadening effects can be excluded as a possible reason. Indeed, the balance between adsorption and desorption processes at the glass cylinder might play a role here as well as the formation of hydrogen bonded complexes [24][25][26]. A detailed study of this effect is beyond the scope of this paper and will be the subject of future investigations.

Summary and conclusion
We have developed a THz gas sensor which exploits the self-mixing effect for real-time sensing of different gas species at THz frequencies. Our method exploits the intermediate feedback regime and is based on a variation of the cavity geometry, i.e. it does not require any variation of the operating parameters of the source. As compared to previous experiments based on weak optical feedback [15], the sensitivity is drastically increased and now allows for real-time observation of the concentration of different gas species. This has been demonstrated for mixing of D2O and CH 3 OD in an absorption cell.
The system proves the feasibility of real-time gas sensing via the self-mixing effect in a THz QCL and combines the advantages of being intrinsically fast and highly sensitive without requiring any liquid-helium-cooled detectors. Higher acquisition rates are feasible by operating the QCL in a low-vibration system such as a flow cryostat and by optimizing the acquisition hardware. Further improvements toward high-temperature operation are expected for THz QCLs based on metal-metal waveguides. In the future, such an optical-feedback spectrometer might be used for in situ observations of chemical reactions at THz frequencies.