• 摘要: 本文针对传统锁相放大器硬件扩展性不足、软件灵活性有限的问题,提出一种基于LabVIEW FPGA架构的可编程锁相放大系统。采用LabVIEW图形化编程实现任意波形生成、相敏检波以及低通滤波等功能,将待测信号传输进FPGA后,与本地振荡信号混频得到解调信号,完成数字锁相放大的基本功能。调用上位机通信UDP的IP核完成四线握手,通过FPGA千兆以太网通信,软硬件协同设计,实现调制参数的动态优化及实时监测。将该数字锁相放大器结合TDLAS技术开展痕量氧气的探测,使用中心波长为760.59 nm激光器对0.02%~15.00%浓度范围内的氧气进行二次谐波信号的实时探测与标定实验,验证了系统的可行性和实用性。氧气浓度和二次谐波信号的拟合相关系数R2高达0.999,计算分析得到该系统的氧气检测极限为2.8×10−5。该设计能够在多参数连续可调、高实时性要求的光谱分析场景中展现出显著优势,对微弱信号检测技术的应用发展具有推动作用。

       

      Abstract:
      Objective Weak signal detection under complex backgrounds is a key technology in fields such as medical healthcare, aerospace engineering, and other related areas. The phase-locked amplifier (LIA) can effectively extract the sinusoidal signal of a specified frequency from noise, featuring advantages of a narrow passband and high signal-to-noise ratio (SNR). However, traditional lock-in amplifiers face multiple issues including insufficient hardware scalability and limited software flexibility. Especially in precision measurement tasks requiring real-time adjustment of modulation parameters, the limitations of their fixed hardware architecture and single control logic become increasingly prominent. To address these problems, this paper proposes a programmable lock-in amplifier system based on the LabVIEW FPGA architecture, which realizes the collaborative work of hardware and software.
      Methods In terms of hardware, the system takes the XILINX XC7A200T FPGA chip as the hardware core, and constructs a highly reliable hardware platform with the ALINX AX7202 backplane and AC7200 core board. Meanwhile, the ADC module AN9238 (12-bit resolution, 65 MSps sampling rate) and DAC module AD9767 (14-bit resolution, 125 MSps sampling rate) are selected to ensure high fidelity of signal acquisition and output.
      In terms of software, with the LabVIEW graphical programming platform as the core, the system can flexibly configure the entire signal processing workflow. For the modulation and demodulation function: first, high-throughput function operations are innovatively adopted to realize waveform generation. This scheme is based on a 120 MHz clock-driven timing cycle structure, implements the accumulator function via a shift register, and dynamically generates waveform data using high-throughput multiplication, division, and sine function operations. This not only reduces FPGA resource consumption but also achieves flexible phase configuration and minimized data delay, laying the foundation for the dynamic optimization of subsequent modulation parameters. Second, in the phase-sensitive detection (PSD) module, weak signal demodulation and extraction are realized based on the mixing principle: the signal under test collected by the ADC is multiplied with the reference signal generated internally in the FPGA, and useful signals are initially separated from noise by leveraging the characteristics of coherent same-frequency signals and non-coherent noise. According to phase-locked amplification theory, when the frequency of the signal under test matches that of the reference signal with a fixed phase difference, multiplication generates a DC component and a frequency-doubled component. The DC component is proportional to the amplitude of the signal under test, providing a theoretical basis for signal extraction. Finally, in the filtering module, a cascaded design of a mean filter and Butterworth low-pass filter is adopted: the mean filter is configured with a 60-sample window, performing signal smoothing within a single-cycle timing loop to initially filter out high-frequency random noise; the subsequent 4th-order Butterworth filter adopts a cutoff frequency configuration strategy with a 2–3× bandwidth margin, further suppressing residual high-frequency components without signal distortion, thus achieving an optimal balance between SNR and response speed.
      In the information transmission part, the UDP communication IP core of the host computer is invoked, which is interconnected with the physical pins and FIFO buffer in the FPGA through a four-wire handshaking mechanism. The host computer software is developed based on LabVIEW, featuring a comprehensive human-machine interface (HMI) that supports real-time configuration of core parameters (modulation frequency: 5 Hz–16 kHz adjustable; signal amplitude; phase: 0°–360° continuously adjustable; filter order) and provides a real-time waveform display function, significantly improving the real-time performance and stability of signal processing.
      Results and Discussions To verify the feasibility and practical value of the system, this paper deeply integrates the programmable lock-in amplifier with TDLAS technology to construct a high-precision trace oxygen detection system. A laser with a central wavelength of 760.59 nm and a Herriott-type multi-pass gas absorption cell are employed. First, a modulation amplitude optimization experiment is conducted, constructing a 0.3–1.8 V modulation coefficient gradient test under the conditions of 5 Hz scanning frequency, 16 kHz modulation frequency, 210° relative phase, and 200 Hz filter bandwidth. The results verify that the relationship between the second harmonic amplitude and modulation amplitude meets expectations, i.e., an optimal modulation amplitude exists. Second, concentration calibration and linearity verification experiments are performed: with a 5 Hz scanning frequency and 16 kHz laser modulation frequency, standard oxygen samples with concentrations ranging from 0.02% to 15% are prepared, and real-time detection and calibration of the second harmonic signals are conducted. The fitting correlation coefficient (R2) between oxygen concentration and the second harmonic signal is approximately 0.999, verifying the system’s feasibility and practicality. Finally, detection limit analysis is carried out, and calculations show that the system’s oxygen detection limit is 28 ppm.
      Conclusions This lock-in amplifier has the advantages of high integration, fast detection speed, and high SNR, making it suitable for on-site detection of trace oxygen. This design can exhibit significant advantages in spectral analysis scenarios requiring multi-parameter continuous adjustability and high real-time performance, promote the application and development of weak signal detection technology, enrich the implementation pathways of digital lock-in amplification technology, and provide a new design idea for the development of high-flexibility weak signal detection systems.