modulated laser light is directed through the gas sample. As the wavelength oscillates, it periodically matches the absorption line of the target gas, causing variations in the light intensity reaching the detector. A photodetector is used to measure the intensity of the transmitted light, capturing the modulated absorption signal. The output from the photodetector is digitised and demodulated at the modulation frequency and its harmonics, such as the second harmonic, using a lock-in mechanism. Demodulation isolates the absorption signal from the background noise and other signal components. The demodulated signal at the second harmonic frequency (2f) is particularly useful: it provides a higher signal-to-noise ratio and is less affected by baseline drifts and other noise sources compared to other even-numbered harmonics [13]. To further remove the need for calibration, the 2f signal is often normalised with the first harmonic signal to obtain the 2f/1f signal [14]. In addition, the amplitude of the (2f/1f) harmonic signal is proportional to the concentration of the target gas. Hence, both the first and second harmonic components of the transmitted signal are typically extracted by the demodulation process.  
The signal digitisation, harmonic extraction, and post-process are realised by the data acquisition (DAQ) system and a high-level processor. As shown in Figure 1, the DAQ and the high-level processor have overlapping roles in the signal acquisition and processing pipeline, often with various degrees of compromise between real-time sensing on one hand and accuracy and sensitivity on the other. For real-time gas sensing system, high temporal resolution is required to obtain high-quality time-resolved gas parameters (e.g., temperature and concentration information). In addition, to preserve signal integrity, data transfer between the DAQ and high-level processor must be without any data loss. To assure this, the amount of data transferred must be minimised. To this end, maintaining a high temporal resolution while achieving high accuracy for real-time gas sensing systems remains an open challenge.  
In this paper, we propose an FPGA-based data acquisition (DAQ) system with embedded processing that harnesses the processing capabilities of an embedded FPGA to further process the acquired data beyond simple acquisition and demodulation. Specifically, we extended the standard I-Q approach beyond digitisation and demodulation of the transmitted signal to include further on-chip post-processing. The on-chip processing not only reduces the burden on the data transfer link between the DAQ and the high-level processor, but it also has the potential for better accuracy compared to the standard I-Q method as the effect of bit truncation is minimised.  
The remainder of this paper is organised as follows: Section 2 gives an overview of related work and highlights the contribution of this paper. Section 3 covers the fundamentals of WMS, on-chip harmonic recovery through demodulation and techniques of gas parameter retrieval from the recovered harmonics, as well as the implementation of  
Figure 1: Overview of the WMS system for gas sensing.  
our proposed FPGA-based data acquisition (DAQ) system with embedded processing. In Section 4, experiments are discussed, and results are presented and explained. Finally, a conclusion is presented in Section 5.