A portable analog lock-in amplifier for accurate phase measurement and application in high-precision optical oxygen concentration detection

A portable analog lock-in amplifier capable of accurate phase detection is proposed in this paper. The proposed lock-in amplifier, which uses the dual-channel orthometric signals as the references to build the xy coordinate system, can detect the relative phase between the input and x-axis based on trigonometric function. The sensitivity of the phase measurement reaches 0.014 degree, and a detection precision of 0.1 degree is achieved. At the same time, the performance of the lock-in amplifier is verified in the high precision optical oxygen concentration detection. Experimental results reveal that the portable analog lock-in amplifier is accurate for phase detection applications. In the oxygen sensing experiments, 0.058% oxygen concentration resulted in 0.1 degree phase shift detected by the lock-in amplifier precisely. In addition, the lock-in amplifier is small and economical compared with the commercial lock-in equipments, so it can be easily integrated in many portable devices for industrial applications.


Introduction
Nowadays, the accurate detection of phase shift is of extreme importance in many different research fields such as medicine, chemistry, environment and marine analysis, molecular biotechnology, bioprocess control, and industrial production monitoring. But high noise level environments make the right acquisition of accurate phase measurements difficult, especially when the output signal is very small compared to the noise level [1]. In these cases, the ordinary low pass filter is not an option, and some special methods for extracting the signal information should be considered. In this direction, an interesting possibility is the lock-in amplifier, which uses the phase sensitive detection (PSD) technique to take out the data signal at a specific reference frequency and reject noise signals at different frequencies without affecting the measurement significantly [2,3].
However, the commercial lock-in system proposed in the literature, which are expensive, heavy, and power-hungry, is typically appropriate for multi-frequency operation and not considered suitable used in the portable sensing system that utilizes single-supply battery cells. Therefore, the dedicated lock-in amplifier for phase measurement has been developed for measurement problems. On the other hand, another advantage of a dedicated lock-in amplifier is that generally the circuit can be much smaller than a complete instrument and can be placed much closer to the sensor. This can dramatically decrease parasitic effects, noise, and disturbance levels in the system [4][5][6].
To the best of authors' knowledge, there are no cheap portable commercial lock-in amplifiers [7]. To acquire the phase information precisely, it demands that the PSD block operates extremely accurately and stably, because a little deviation of this block will lead to invalid results of the whole system [8]. With respect to a previously published solution, a circuit that permits a single-supply portable analog lock-in amplifier properly processes phase delay information buried in high noise levels, showing recovery equations and the detail for phase measurement [9,10]. Furthermore, the exhaustive experimental verification carried out here improves the previously presented results. The conducted experimental measurements for phase, performed through the AD630 from analog devices, and the fabricated printed circuit board (PCB), have confirmed the correct functionality of the designed amplifier, as well as the system capability to reveal very small signal coming from resistive sensors with satisfactory performances in terms of both sensitivity and resolution improvements. Furthermore, the exhaustive experimental verification of the lock-in amplifier is verified in the high precision optical oxygen concentration detection. Figure 1 shows the basic principle of phase measurement using lock-in techniques. The theory of the phase measurement with a lock-in amplifier can be explained by the mathematical model of tangent in the rectangular coordinate system. As depicted in Fig. 1, the system oscillator generates an original signal, with the frequency ω and amplitude A s . After phase delay block, the input signal is generated with the phase θ, but the frequency and amplitude are not changed. Reference channel path leads the reference signal to be multiplied with the signal. Theoretically, the duty ratio has a great influence on the phase measurement, and it is decided to use the square wave signal V r as the reference signal, because the duty ratio of square wave is more stable than the sinusoidal wave. As depicted in Fig. 1, the relative reference signals can be easily synchronized with the input signal because they are all produced by the system oscillator. The chopper circuit changes the original wave to the square wave synchronously to provide the reference signal for the lock-in amplifier. As the phase measurement system adopts the dual-channel orthometric reference architecture, two orthometric square waves are prepared through part of 90 degree move-phase. In the practical system, it is more secure to keep phase stable between the input and reference signals, because the functions of the oscillator, chopper circuit, and 90°phase shift are all achieved by the microcontroller. In this way, the next block, a multiplier, where it is multiplied by the reference signal, generates a periodic signal, whose direct current (DC) component is proportional to the amplitude of alternating current (AC) component input signal, and depends on the mentioned phase difference. The signal generated by the multiplier may be easily extracted by means of a suitable low-pass filter, which represents the final block of the complete system, gives a DC output proportional to the input signal amplitude, and cancels noise coupled at frequencies different with a different ω. According to the preceding part of the text, the input signal is sin( )

Basic principle of phase measurement with a lock-in amplifier
The reference signal (square wave) in the x axis is where A r is the amplitude of the reference signal. Therefore, applied to the circuit of Fig. 1, it can be seen that the frequencies are equal, and using an ideal amplifier with the amplification n, the signal the output of the multiplier becomes Then, after the low pass filter, whose cut-off frequency has to be very small, the sum-frequency component is removed resulting in a DC output: where A l is the magnification of the circuit. The same principle also applies to the y axis. After the low pass filter, the DC output in the y axis is l 2 sin s r oy Thus, although the phase shift θ changes, it is possible to recover the phase shift according to (6):

Design of lock-in amplifier for phase measurement
The proposed lock-in amplifier for phase measurement is composed of two phase detection channels. The orthometric square waves are the reference signals separately. For one channel, it divides two parts, modulation and demodulation. An analog device, AD630, as the balanced modulator, is the most important part of the lock-in amplifier, which combines a flexible commutating architecture with the accuracy and temperature stability afforded by laser wafer trimmed thin-film resistors. It is a complete high precision function with the preamplifier, multiplier, and chopper circuit. Theoretically, if the duty ratio of the reference signals is not 50%, the output DC signal will be mixed with extra DC component caused by the unbalanced duty ratio. In the whole lock-in amplifier block, there is a calibration circuit, which has wide bandwidth, making sure the output signals are screened from the incorrect duty ratio. In particular, Fig. 2 depicts the measured signals from the output of AD630, when a clean 16 kHz sine wave is the input signal, and the reference square signals are "in-quadrature" and "in-phase", respectively. The figure is collected by the oscilloscope (Tektronix TBS 1102B-EDU). Through a suitable low-pass filter, the modulator output periodic wave is filtered so as to extract a DC voltage signal that gives information about AC input signal amplitude. In particular, the output of "quadrature" mixer: (a) is symmetric with respect to the zero, while the output of "in-phase" mixer; (b) is above zero, and a non-zero DC signal can be detected corresponding to the "in-phase" mixer inputs. The demodulator is divided into two parts: the integrator and the low-pass filter. Theoretically, if the frequency of the input signal is much larger than the central frequency of the integrator, the amplitude of the output signal from the integrator will decrease to close to zero. Conversely, the amplitude with lower frequency will be enlarged. So the integrator with low central frequency in this system is regarded as a low-pass filter, which reduces the influence of sum-frequency and keeps the phase DC component. Here, the central frequency of the integrator is set as 32 Hz. A 2nd order filter also has been implemented after the integrator. The filter with 8 Hz cut-off frequency removes the high frequency component remaining from the integrator and acquires the purer phase DC information.

Lock-in amplifier performance test
Referring to the system block scheme above, which presents two AC inputs and one DC output in one channel lock-in amplifier, the measured value (U o ) is proportional to the input signal amplitude (U i ) only when the calibration output is zero, as previously described, the same as the other lock-in amplifier channel.
The electrical characterization of the designed lock-in amplifier has been performed on the fabricated PCB. In order to both perform the designed system analysis and achieve preliminary where A is the constant for the certain input and reference signal. Thus, the phase shift becomes as Then the derivation of (8) is given by Based on (9), the θ′ increases with the growth of the factor Y in the range of factor Y bigger than 0. So the change rate of phase θ is least when the Y is close to zero. Therefore, the minimum sensitivity of the phase measurement system can be caught at the tiny degree. As we all know, the tiny phase measurement function can be changed approximately as The ARM7 (LPC1758) used here, as the core component of signal acquisition, contains a signal 12-bit successive approximation analog-to-digital converter (ADC) and has a working voltage range of 0 V -3.0 V and resolution of 0.73 mV. For this condition, the sensitivity of lock-in amplifier for phase measurement is 0.014 degree [10].
Furthermore, the designed analog lock-in system has been proved to recover with success also very small noisy signals without performance degradation. More in details, measurement results are reported in Fig. 3, showing the amplitude measurement and the phase measurement for the proposed lock-in amplifier. The figures of Part (1) express the linearity between the measured output DC voltage and different amplitudes of the applied input AC signal, even pure and noisy. Considering the limit voltage of AD in the signal acquisition block, the system sensitivity has been set to about 50 [V/V] here. As shown in the figure, the correlation coefficients of the three groups are all equal to 0.999, extremely close to 1, indicating the output DC presents great linear increasing property with the growth of the amplitudes. The relative error of the worst measurements is 0.4%, even the SNRs differ greatly. So no matter how the SNRs deteriorate, the system has shown the capability to reveal accurately with success an input AC voltage signal with different SNR levels.
To test the precision of the lock-in amplifier in phase measurement, some experiments have been implemented. An alignment of phase shift has been set factitiously between the input signal and the reference signal. As depicted in Figs. 3(a) -3(c), the figures of Part (2) show the relationship between the system measurement and the set phase value, both pure signal and noisy signal, as setting the left part. The measurement also has very good linearity, and the slope of each function is extremely close to 1. The measuring error is below 0.1 degree. So the precision of the lock-in amplifier is at least 0.1 degree. In conclusion, the measurement of this system can reflect the real phase under test, even the quality of the input signal is not satisfying.

Application in the high precision optical oxygen concentration detection system
The purpose of designing the lock-in amplifier for phase measurement is some practical applications. Oxygen sensing is of major importance in many fields, and phase shift measurement is always the crucial step in the fluorescence phase based oxygen sensor. The dynamic quenching of the luminescence of ruthenium complexes is a popular method for optical oxygen detection. Lifetime of luminescent complex, the key factor for concentration measurements, is closely connection with the phase shift measurements. Luminescence sensing requires a change in the spectral properties of the indicator in the presence of oxygen. Changes can occur in the form of luminescence intensity or lifetime of the luminescent complex [11][12][13][14][15]. The oxygen concentration is related to these parameters by the Stern-Volmer (SV) equation: where I and I 0 are the luminescence intensities in the presence and absence of the quencher, τ and τ 0 are the lifetimes of the luminophore in the presence and absence of the quencher, K SV is the Stern-Volmer quenching constant, and [O 2 ] is the concentration of the oxygen. Applying a sinusoidal modulation to the optical source results in a phase delay, φ, in the fluorescent emission that can be related to the lifetime by the equation: where f is the modulation frequency, which can be tuned to the suitable optimum sensor sensitivity that the luminescence lifetime can be detected accurately. Using these equations above, the phase delay information can easily be related with the oxygen concentration.
The fabricated system has been tested with a suitable experimental apparatus to detect the presence of O 2 into a closed chamber. Figure 4 shows the prototype PCB photo, utilized for the system testing (the designed lock-in amplifier delimited by the solid line). In the experimental measurements, we have utilized the commercial oxygen sensing film as the oxygen sensor and the light-emitting diode (LED) as the optical source. The experimental setup scheme is reported in Fig. 5, where the system is allowed to properly select the target gas and detect its concentration. The microcontroller (LPC1758) generates the sine wave signal to excite the LED, and the optical fiber carries blue light from LED to the oxygen sensing film to emit fluorescent light that travels back to a photo detector. Then the fluorescence signal produced on the film is send to lock-in amplifier. The voltage signal demodulated by the lock-in amplifier has been acquired through the signal acquisition block based on the microcontroller (LPC1758) and calculated to be the phase shift signal related to the oxygen concentration by a computer. The achieved experimental results have demonstrated the correct functionality of the system and satisfactory performance in terms of resolution enhancements.

Photonic Sensors 34
By means of a straightforward analysis of the experimental result, it is possible to evaluate the proposed lock-in amplifier performance in terms of the resolution improvement. All experiments were performed at a temperature of (24±1)℃ every 10 min and humidity of 23%. The 0.99%, 3%, 5%, and 8% oxygen concentrations were tested separately. At the beginning of the test, we injected the dry pure nitrogen into a closed chamber for 20 minutes. And then, a kind of oxygen was fluxed into the chamber. After about 10 minutes, the chamber was cleaned again by pure nitrogen. Then another kind of oxygen could be tested. For facilitating the measurements, the system was set an offset phase at the reference coordinate. Figure 6(a) reveals the average phase measurements for different concentrations in 10 minutes, and the fitting function also has been calculated. As depicted in the figures, the phase shift grows with an increase in the concentration. When the concentration changed 3%, the minimum phase shift was 1.62 degree. So at the low concentration, the phase shift caused by the different concentration is available to separate the slight variant of oxygen concentration.  The solid line in Fig. 6(a) is the fit curve. The phase measurement shows an exponential function with the O 2 concentration. At 0.99% -8% concentration, the phase response produced by the oxygen sensing film is more sensitive at the lower concentration. At this range of concentration, the sensitivity of the system is greater than 0.58% O 2 concentration for 1 degree. Then, we fluxed dry pure nitrogen into the chamber for about 30 minute to clean the chamber thoroughly. And another round test started. The four kinds of the standard gas with different concentrations were injected orderly, 10 minutes for everyone. Then the new group of phase measurements for each concentration was acquired by the system. Afterwards, these data were plugged into the fit equation in Fig. 6(a), so the fit concentrations have been calculated. Figure 6(b) depicts the relationship between the fit concentration and the actual O 2 concentration. As the figure depicts, the correlation coefficient is equal to 0.999, and the slope is 1.00, which means the fit measurements have perfect linearity and 1:1 corresponding relationship with the actual concentration, so the measurements of the system are credible and have good repeatability.
In Fig. 7, the measurement of 3% concentration was tested for a period of time. According to the instability of the gas flow, the phase measurements have a certain extent drift during the measuring time. In Fig. 7, the phase ranges from 40.495 degree to 40.528 degree. The dash line demonstrates the fluctuation range for the period of time. Then the system has 0.0263% O 2 concentration drift calculated by the fit equation shown in Fig. 6(a).

Conclusions
In this work, a portable low-cost low-power portable analog lock-in amplifier suitable for sensor interface application was fabricated, providing continuous and accurate measurement of the noisy input signal. It can recover the signal buried in the noise and can measure phase shift well and truly. The sensitivity of the phase measured system reached 0.014 degree, and the precision was at least 0.1 degree. The main advantages of the proposed lock-in amplifier concern both its utilization in portable instrumentations, due to its small size characteristics, and its capability to perform accurately phase measurement between the input and reference signals. The designed system allows enhancing the SNR, so reducing the minimal resolution of the sensor front-end and extracting the phase information effectively and allowing the precision detection of target gas concentration in the application of the high precision optical oxygen concentration detection system. Besides, this system also can be utilized to another measurement system, such as the precision distance measurement, which the measurement can be indicated by the phase shift. The final goal of this project is to complete the integrator and the low-pass filter to get purer DC signal through lock-in amplifier and achieve higher SNR of the whole system. Furthermore, we need to continue to estimate the stability and repeatability of the lock-in block to realize the goal that could be utilized in the modern high-accuracy high precision portable measurement system for sensor application.