Compact fiber-optic diode-laser sensor system for wide-dynamicrange relative humidity measurement

A compact fiber-optic diode-laser sensor system for measuring relative humidity is studied. In such a system, a distributed feedback laser lasing near 1877 nm is used as light source while a high-precision Pt resistance as temperature sensor, an accuracy of 0.1% relative-humidity can be achieved. The laser sensor system is able to lock to the absorption peak and calculate the density of water vapor without any additional reference measurements. Using programs built in to the microcontroller unit, the laser system can switch functions between direct measurement at high density and second-harmonic detection at low density. The system can switch between the two modes automatically and work in a wide dynamic range.

Due to there being many of uncertainty, relative humidity (RH) measurement is a complex component for meteorological observation. Most conventional humidity sensors, such as dew-point instrument or capacitance humidity sensor, suffering from long response time, long de-moisture times, and low accuracy. For example, the typical response time for a capacitance humidity sensor is about 1 min and that for a dew-point instrument is even longer. Furthermore, in an actual hygrometer made of a dew-point instrument, the accuracy for measuring RH can reach 0.1% level. However, such an instrument cannot go well at low temperature. At the same time, the accuracy of a capacitance humidity sensor is also low, and its efficacy may be reduced under high humidity.
Recently, infrared laser absorption spectroscopy has been developed for gas detection. Many articles [1][2][3][4][5][6][7] have reported the methods using tunable diode laser absorption spectroscopy (TDLAS) to measure the concentration of water vapor. For wavelength-modulation absorption spec-troscopy [6] using a multi-pass gas cell, the detection level can be as low as 10 nmol/mol [6] in laboratory conditions. However, this method can only be applied to low vapor concentrations, which limits the dynamic range. In highconcentration water-vapor detection, a reference optical path must be set [5] to reduce the optical noise by subtracting the light from the gas mixture, and lock to the absorption peak as feedback signal. However, the reference optical path always additionally requires a photo detector (PD), an optical coupler, and a gas cell. It is should be noticed that the two balanced optical signals are demanded to detect synchronously; otherwise a calculation error may be introduced into such a system. Thus, for a real-time feedback control system for RH measurement, short response time without sacrificing the accuracy or the dynamic range is of great importance.
In this article, we demonstrate a compact fiber-optic diode laser sensor system, which has an integrated temperature and pressure sensor, to measure RH. The system is controlled by a STM32 microcontroller unit (MCU, STMicroelectronics, Geneva, Switzerland), which has two working modes, direct detection mode and harmonic detection mode, respectively used for normal conditions and low-humidity conditions. Built in the proposed system, the two modes can be switched automatically according to the real-time data. Finally, we compare 100 h of continuous measurement data obtained from our system with those from Weather China (www.weather.com.cn) data.

Theory and system setup
TDLAS is a method used for detecting concentrations of one or more selected gases that are mixed with other gases. For a distributed feedback (DFB) laser, the temperature tuning coefficient is about 0.08 nm/°C. A fine adjustment of the lasing wavelength can be achieved by tuning the bias current of the DFB laser. A typical current tuning coefficient for a DFB laser is 0.02 nm/mA. Using temperature and current tuning, the wavelength tuning range of a DFB laser is about 6 nm. Therefore, by tuning the temperature and the bias current，it is easy to make the laser lasing at the absorption wavelength of a selected gas.
When a light beam passes through mixture gas including water vapor in a distance L, according to the Beer-Lambert law, the optical intensity I can be described by [7] 0 e , where I 0 , α and C are the incident intensity, the absorption coefficient and the volume fraction of water vapor, respectively. At the center wavelength (λ 0 =1877 nm) of the water vapor absorption curve (for simplicity, hereinafter it is referred as the absorption wavelength of the water vapor), α can be expressed as where N, S, ν 0 and g(ν 0 ) are the number density of molecules, the water vapor absorption intensity, the wave number and the normalized line shape function of the absorption spectrum corresponding to λ 0 , respectively. In eq.(2), ν 0 =1/λ 0 and g(ν 0 )=ν 0 /(πγ). Here γ is the half width at half maximum (HWHM) of the water absorption spectrum. Under atmospheric pressure 101.3 kPa and temperature 273.15 K, N=2.69×10 19 /cm 3 . According to Doyle Burton law of partial pressure, the partial pressure of the water vapor in mixture gas can be expressed as where P is the total pressure of the mixture gas. Commonly, RH is defined as The saturated vapor pressure P sat at temperature T can be calculated from the experiential eq. (5), which comes from Goff-Grattch formula.
Due to α(ν 0 ) can be obtained from the HITRAN database [9], the RH can be calculated based on eqs. (1)- (5). Certainly, when the system is used in real-world applications, T and P should be real-time measured. Figure 1 shows the schematic of the compact fiber-optic laser sensor system, in which a DFB laser module with built-in thermo-electric cooler and thermistor is used. For the DFB laser, the lasing wavelength can be adjusted over 4 nm by changing the driving current and temperature, the maximum output lasing power being 5 mW. An absorption cell with a collimation lens, which is mounted at the input end, is fabricated in our laboratory. The absorption length is about 30 cm for a single pass. The infrared detector has an active area of 1 mm 2 with a Transistor Outline (TO) package mounted at the output end of the absorption cell. The temperature is acquired using a Pt100 resistance, which can measure the temperature linearly over a range from -40°C to 100°C. The pressure is measured using a silicon pressure sensor. Using the output of the MCU to excite a full bridge, the pressure value can be read out in voltage form. The temperature and pressure signal are conditioned using operation amplifiers and low pass filters before being input into the analog-to-digital converter (ADC) of the MCU. We used a 64-bit STM32 MCU, which sends the slow ramp (about 1 Hz) and high frequency (up to kHz) sinusoidal modulation signals through the digital-to-analog converter (DAC) to drive the current source circuit. This signal was applied to the DFB laser. The swept optical signal is detected using the infrared detector and is converted into a current signal. The DC block makes the DC current be filtered and the AC signal pass, and vice versa for the AC block. The active band filter suppresses the white noise and amplifies the small AC signal that is sent to the ADC.
For high-humidity conditions, the light is strongly absorbed in the absorption cell. The system works in direct-detection mode. Figure 2 shows the process of direct detections. The MCU applies a slowly swept ramp current  to the DFB laser.The wavelength of the laser varies with the changing current. When the wavelength is equal to the absorption wavelength of the water vapor λ 0 , the light undergoes the strongest attenuation. The PD can detect a strongly absorbed signal. An AC block is used to suppress the high-frequency noise between the PD and ADC. Then, the ADC acquires a conditioned signal nearly the same as the origin, but somewhat more smooth.
To calculate the density of the water vapor, the attenuation value of the light at λ 0 should be known. The DFB laser has a highly linear P-I curve. Figure 3 shows the received absorption signal in direct detection mode. By controlling the temperature, the light absorption can be tuned to the linear P-I region. Then, we can choose two points at either end of the recorded curve, and fit a linear curve with four points using the least squares method. It should be careful to ensure that the chosen points are far from the absorption region. Moreover, the noise level ADC receives no light input must be known. Therefore, an average noise value with laser off is recorded in the MCU. Then the value of α(ν 0 )CL can be obtained based on where I signal and I fit is the optical signal detected by PD, under with or without absorption by the water vapor, while I noise is the noise of the system. When α(ν 0 )CL is greater than 0.1, (I signal I noise )/(I fit I noise )<0.9048, which means that the proposed system should be worked in the direct detection mode. For low humidity conditions, the light is weakly absorbed in the absorption cell. Figure 4 shows the process of  harmonic detection mode, it can be seen that the absorption can hardly be distinguished in linear P-I region when operating in direct-detection mode. In order to enhance the detection sensitivity, the system should be switched to work in the second-harmonic detection mode.
When α(ν 0 )CL is less than 0.05, (I signal I noise )/(I fit I noise )> 0.9512, which means that the proposed system should be worked in the harmonic detection mode. In this case, the Beer-Lambert law can be rewritten [8] as Assuming the ramp signal is slowly varying compared with the fast-changing sinusoidal signal; wave number ν 0 should be written as where ν 0 is the average wave number for a small period, and a is the frequency (wave number) modulation amplitude. η is the amplitude modulation depth. Therefore, ηI 0 (ν 0 ) represents the amplitude of the modulation current. According to Fourier analysis, I 2f , the second-harmonic components of I(t), can be given by where m denotes the frequency modulation depth (m=a/γ), γ being the half width at half maximum (HWHM) of the water absorption spectrum at λ 0 =1877 nm. Figure 5 shows the change in the second harmonic signal strength with the linear ramp signal. This curve is calculated using the MCU, which records a periodicity-conditioned signal, and calculates the second harmonic components using a discrete Fourier transform. The finite impulse response algorithm, which is built into the MCU, can be used to filter the signal prior to analysis.
Two thresholds are set for the detection program: TH h represents the high threshold when second-harmonic detection mode is switched off and the MCU operates in direct-detection mode. TH l is the low threshold when the system switches to second-harmonic detection mode. If there is only one threshold defined, the system would switch frequently between the two modes when the value of αCL is close to that threshold. The two thresholds (TH h >TH l ), allow the system to switch smoothly. Figure 6 shows a flow chart of the RH detection process for the proposed system. The system chooses directdetection mode first, and calculates αCL . If αCL<TH l , the program will calculate C, or switch to second-harmonic mode. In the second harmonic mode, if αCL >TH h , the program will calculate C, or switch to direct-detection mode. The humidity will be calculated every time when C is calculated. Then, the system starts to calculate the next C value in the same mode. The air temperature T is calculated using the voltage acquired from the Pt100 resistance, and the atmospheric pressure P is measured using the silicon pressure sensor. The RH can be calculated using eqs. (1)-(5).

Results and discussion
The functions of the system, as Figure 1 shows, are performed by modular circuits. The system is divided into a center unit and an absorption cell. There are five main circuits in the central unit: program control circuit, signal condition circuit, laser cooler control circuit, laser current source circuit and temperature acquisition circuit. We used a DFB laser in butterfly packaging made by Nanoplus Figure 6 Flowchart of the process of the fiber optic laser sensor relative humidity detection system. (Germany) [10], which lasing wavelength is tuned using both driving current and temperature to be near 1877 nm. The laser was coupled into a fiber, which is flexible, durable, and immune to electromagnetic interference. The fiber was connected to an absorption cell. The electric signal generated from the PD, which mounted on the absorption cell, was transmitted to the center unit through a coax cable. In our system, the thermoelectric cooler temperature was tuned to 42°C. The optical spectrum, when the bias current of the laser was tuned, was shown on optical spectrum analyzer Yokogawa AQ6375 (Tokyo, Japan). Figure 7 showed the 1877 nm absorption spectrum with the "maxhold" function selected.
For normal laboratory conditions, the absorption was strong enough to use direct-detection mode. The direct absorption curve for water vapor over the current tuning range was shown in Figure 8(a). The slow ramp signal was swept from 82 mA to 98 mA, and the sweep period was about 2 s. The ambient temperature was 23.1°C, and the pressure was 97.6 kPa.
In Figure 8(a), the real line represents the direct-detection signal from the PD. The obvious attenuation shows that the light was absorbed strongly at this wavelength. The absorption peak curve in Figure 8(b) was calculated using the original recorded curve and subtracting the fit curve. Then, the MCU locates the peak of the curve, and calculates the driving current at the peak point and the FWHM current. From Figure 8(b), it can be seen that the driving current is 91.65 mA at the peak point, and the FWHM current is 5.7 mA. Under such a situation, I signal =266777 and I fit =311090, exp(αCL)=0.85 can also be obtained rely on eq. (6).

Figure 8
Searching algorithm for the absorption peak and bias current locking in direct-detection mode. (a) The signal when the current is swept from 82 mA to 97 mA. (b) The signal subtracted from the curve fit, which can be used to calculate the full width at half maximum and the bias current at the curve peak. (c) The bias current, which can be used to calculate I fit and I signal . constant value. Then, C and RH could be calculated for the measured conditions: C=3580 ppmV, and RH=20.22%.
In low humidity, it has where η=0.098, m=3.2, and the value of k was calculated to be 3.2. In our system, we fit the parameter k by calibrating it in low humidity, and we obtained k=1. 9. The difference between the calculated and calibrated k came from the band pass filter in the system. The band pass filter after the DC block was used to reserve the first-and second-harmonic components of the signal. Assuming the band pass filter was ideal, the first-and second-harmonic components would be noise free. A normal band pass filter always varied in pass band and has a transition width. Therefore, the calibrated parameter k was more accurate for a given system. We used a drying column to create a dry space. From Figure 9, it can be seen that the system recorded the firstand second-harmonic components simultaneously. The second-harmonic peak grew when drying column was opened. However, the first harmonic was nearly unchanged for the same current bias. Figure 10 shows the RH calculated in harmonic detection mode. The temperature was about 26°C, and the pressure was about 99.0 kPa. This low humidity environment was generated using a drying column. The lowest humidity in this test period is 3.756%, which is equivalent to a C＝1263 ppmV at this temperature. The second harmonic signal strength is 161.4848 for this density.
Because of the difficulty to create an ultralow humidity environment, we estimated the sensitivity through the current humidity and the noise of the second harmonic signal. This provides an alternative way to determine the sensitivity of the system. The sensitivity is the low-end humidity detection limit of the system. In the sensitivity-estimation ex  periment, we used a drying column to create a stable low-humidity environment. The system then works insecond-harmonic mode and continually records (about 60 times) the second harmonic peak value at the same humidity over a period of 1 min. The average of this data is in direct proportion to the humidity, and the standard deviation of the data represents the noise or the uncertainty of the second-harmonic peak value. If the humidity is very stable, the uncertainty of the second-harmonic peak value comes from the sum of the light source noise, PD noise, and current noise. The system parameters were not changed after this detection limit estimation. Therefore, the uncertainty of the second harmonic peak value would change little during the harmonic detection mode measurement. This uncertainty of the second harmonic peak value is the low-end detect limit of the system. In the sensitivity estimation experiment, the drying column fixed the humidity at 470 ppmV. The average value was 79.58, and the standard deviation of the data was 0.83. Then, the sensitivity of the system can be estimated to be 4.9 ppmV.
The direct-detection mode uses a straight forward algorithm that does not require any approximation. However, for low humidity, the error arises from the linear fitting curve. The fitting points were randomly chosen far from the absorption region. This introduces error into the system, and the relative error grows as the humidity falls.
The humidity became very low in the drying column if it is run for a long time. Then, we opened the drying column to let the ambient air flow into the column. With the direct-detection mode and the harmonic detection mode working simultaneously, the system recorded the αCL values. The values, which were calculated through directdetection mode and harmonic detection mode, were shown in Figure 11. From Figure 11, it could be seen that when the humidity increased, the harmonic detection algorithm deviated from the direct-detection solution. This resulted Figure 11 Value of αCL, which was calculated using direct-detection mode (points) and harmonic detection mode (circles). The deviation in the two modes can be seen as the humidity changes from low to high. in more noise.
We setup fiber-optic laser sensor system in Haidian District in Beijing, and recorded 120 h of continuous RH data. We compared this data with official weather data obtained from Weather China (www.weather.com.cn). Figure 12 showed the results for the 120 h continuous running. Our system acquired humidity data every 20 s. We averaged over 1 h periods for comparison with the official humidity data. The test data generally agrees with the official data, but our system has a shorter measurement interval and a faster response time. There was some variance, because our experimental location was not in the same district as the measurement point of the official data. Moreover, ours data were averaged over 1 h periods. Therefore, we believed this result sufficiently accurate for real-world weather observation applications.

Conclusions
In this article, we have presented a design for a compact fiber-optic RH measurement system. This system is based on the absorption spectrum of water vapor, and has two operation modes. For normal or high-humidity conditions, the system operates in direct-detection mode, and switches to second-harmonic detection for low-humidity conditions. The system uses an integrated Pt100 resistance temperature sensor and silicon pressure sensor. The temperature and pressure data are acquired and used in the calculation along with the absorption signal. Among the temperature range from -20°C to 40°C, the detection dynamic range spans from RH 0.1% to 100%, at the same time the detection resolution is 0.01% and the error is less than 2%. All the system functions are performed by modular circuits. The system is compact and uses a LCD screen to display the real-time data. For the future applications, this system can be used for both humidity measurement and the other gases detection.