## 3 Materials and Methods  
### Basics of Wavelength Modulation Spectroscopy  
The fundamental basis of WMS has been covered by refs. [9; 14]. We cover the most important equations here to support our proposed system. Generally, absorption spectroscopy involves passing light through a sample and measuring the absorbed light at specific wavelengths to identify and quantify substances within the sample. In WMS, the wavelength of the light source is modulated (i.e., varied in a controlled manner) around the absorption line of the target gas. The wavelength of the light, \(v(t)\), modulated around a central frequency, \(v_{0}\), with a modulation frequency, \(f_{m}\), and modulation amplitude, \(\Delta v\), may be expressed as  
\[(t)=v_{0}+\Delta v\cos(2\pi f_{m}). \tag{1}\]  
The output of the diode laser, \(I_{0}(t)\), which is incident on the gas sample, may be expressed as  
\[I_{0}(t)=I_{0,s}+I_{0,m} \tag{2}\]  
where \(I_{0,s}\) and \(I_{0,m}\) are, respectively, the scan and modulation components of the incident light intensity. The transmitted intensity of light, \(I_{t}(v)\), after passing through a gas sample of length \(L\), is given by the Beer-Lambert law:  
\[I_{t}(v)=I_{0}\exp(-\alpha(v)L), \tag{3}\]  
where \(I_{0}\) is the incident light intensity and \(\alpha(v)\) is absorption coefficient, which describes how light is absorbed by the gas at a specific wavelength, \(v\). Assuming that the gas properties are uniform along the laser path, the absorbance coefficient can be obtained as  
\[\alpha(v(t))=\varnothing(v(t))\cdot P\cdot S(T)\cdot X, \tag{4}\]  
where \(\varnothing(v)\) is the line shape function, \(P\) is the pressure (in atm), and \(X\) is the molar fraction of the target gas species. The term \(S(T)\) is the temperature-dependent line strength of the selected absorption line, where \(T\) is the temperature. For a single wavelength, \(v\), only one of, \(P,\;\;T\), and \(X\) can be determined. The simultaneous determination of more of one of \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Features** & \
\begin{tabular}{c} **Raw Data Sampling** \\ **(e.g., [15; 16])** \\ \end{tabular} &
\begin{tabular}{c} **Standard I-Q (e.g.,** \\ [6; 12; 17] \\ \end{tabular} & **Proposed** \\ \hline On-chip processing & No & Yes & Yes \\ Realtime harmonic & No & Yes & Yes \\ extraction & Very low & High & Medium \\ Accuracy loss & High & Low & Very low \\ requirement & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Summary of features of common DAQ techniques for WMS from the literature. these properties of the gas requires multiple laser signals to be multiplexed. In this work, we assume that both \(P\) and \(T\) are constant, and consequently only a single wavelength is used. In addition, data from the HITRAN2016 database are used in this work. The transmitted signal, \(I_{t}(v)\), is typically detected by a photodetector and digitised using an analogue to digital converter (ADC) with sufficient sampling rate. The modulated absorption signal contains components at the modulation frequency, \(f_{m}\), and its harmonics \(2f_{m}\), \(3f_{m}\), etc. The digitised signal can be decomposed into its harmonic components using a lock-in amplifier or Fourier analysis. The modulated transmitted signal, \(I_{t}(t)\), can be expressed in terms of the frequency components as  
\[I_{t}(t)=S_{0}+S_{f_{m}}\sin\Bigl{(}2\pi f_{m}t+\varnothing_{f_{m}}\Bigr{)}+S_ {2f_{m}}\sin\Bigl{(}4\pi f_{m}t+\varnothing_{2f_{m}}\Bigr{)}+\cdots. \tag{5}\]  
Demodulation using a lock-in involves multiplication by a reference signal at the harmonics of interest, and then low-pass filtering the resulting signal. For example, the second harmonic component can be isolated as  
\[S_{2f_{m}}=\frac{1}{T}\int_{0}^{T}I_{t}(t)\cdot\cos(4\pi f_{m}t)dt \tag{6}\]  
where \(T\) is the integration period. To avoid phase-sensitivity, both the in-phase (\(I\)) and quadrature (\(Q\)) components are obtained.