The Optical Frequency Comb Spectroscopy (OFCS) Group at the Department of Physics at Umeå University develops new techniques for extremely high sensitivity trace gas detection, non invasive temperature measurements, and other applications of OFCS. Their setup used primarily for trace gas detection contains several components that have been developed in-house, including a Fourier Transform Spectrometer (FTS) and an auto-balancing detector. This is the one used in this thesis work and it includes a high frequency data acquisition card (DAC) recording interferograms in excess of 10^7 double-precision floating point samples per sweep of the FTS's retarder. For acquisition and analysis to be possible in both directions of the retarder the interferograms needs to be analysed in a sub-second timeframe, something not possible with the present software. The aim of this thesis work has thus been to develop a system with optimized analysis implementations in MATLAB. The latter was a prerequisite from the group to ensure maintainability, as all members are well acquainted with it.Fulfilling its primary purpose MATLAB performs vector and matrix computations quite efficiently, has mostly fully mutable datatypes, and with recent just-in-time (JIT) compilation optimizations vector resizing performance has improved to what in many instances is perceived as equivalent to preallocated variables. This memory management abstraction, however, also means that explicit control of when arguments are passed by value or by reference to a function is not officially supported. The following performance ramifications naturally increase with the size of the data sets (N) passed as arguments and become quite noticeable even at moderate values of N when dealing with data visualization, a key function in system. To circumvent these problems explicit data references were implemented using some of the undocumented functions of MATLAB's libmx library together with a custom data visualization function.The main parts of the near real time interferogram analysis are resampling and a Fourier transformation, both of which had functionally complete but not optimized implementations. The minimal requirement for the reimplementation of these were simply to improve efficiency while maintaining output precision.On experimentally obtained data the new system's (DAQS) resampling implementation increased sample throughput by a factor of 19 which in the setup used corresponds to 10^8 samples per second. Memory usage was decreased by 72% or in terms of the theoretical minimum from a factor 7.1 to 2.0. Due to structural changes in the sequence of execution DAQS has no corresponding implementation of the reference FFT function as the computations performed in it have been parallelized and/or are only executed on demand, their combined CPU-time can however in a worst-case scenario reach 75% of that of the reference. The data visualization performance increase (compared to MATLAB's own, as the old system used LabVIEW) depends on the size in pixels of the surface it is visualized on and N, decreasing with the former and increasing with the latter. In the baseline case of a default surface size of 434x342 pixels and N corresponding to one full sweep of the FTS's retarder DAQS offers a 100x speed-up to the Windows 7 version of MATLAB R2014b's plot.In addition to acquiring and analyzing interferograms the primary objectives of the work included tools to configure the DAC and controlling the FTS's retarder motor, both implemented in DAQS.Secondary to the above was the implementation of acquisition and analysis for both directions of the retarder, a HITRAN reference spectra generator, and functionality to improve the user experience (UX). The first, though computation time allows for it, has not been implemented due to a delay in the DAC-driver. To provide a generic implementation of the second, the HITRAN database was converted from the text-based format it is distributed in to a MySQL database, a wrapper class providing frequency-span selection and the absorption spectra generation was developed together with a graphical front-end. Finally the improved UX functionality mainly focused on providing easy-access documentation of the properties of the DAC.In summation, though the primary objectives of optimizing the data analysis functions were reached, the end product still requires a new driver for the DAC to provide the full functionality of the reference implementation as the existing one is simply too slow. Many of DAQS' components can however be used as stand-alone classes and functions until a new driver is available. It is also worth mentioning that National Instruments (NI), the DAC vendor, has according to their technical support no plans to develop native MATLAB drivers as MathWorks will not sell them licenses.
Identifer | oai:union.ndltd.org:UPSALLA1/oai:DiVA.org:umu-139117 |
Date | January 2017 |
Creators | Seton, Ragnar |
Publisher | Umeå universitet, Institutionen för fysik |
Source Sets | DiVA Archive at Upsalla University |
Language | English |
Detected Language | English |
Type | Student thesis, info:eu-repo/semantics/bachelorThesis, text |
Format | application/pdf |
Rights | info:eu-repo/semantics/openAccess |
Page generated in 0.0165 seconds