Lock-in amplifier (LIA) plays a crucial role in the field of photoacoustic trace gas detection. In this paper, we introduce an innovative concept termed the virtual digital Lock-in Amplifier (VDLIA) using matched filtering techniques. The VDLIA exhibits exceptional proficiency in accurately determining both the amplitude and phase of sinusoidal signals, even in the presence of heightened levels of noise. Pivotal factors influencing the VDLIA's performance, including the characteristics of the low-pass filter, and the resolution of the analog-to-digital converter (ADC), were examined under diverse noise conditions. To evaluate the effectiveness of the VDLIA, it was integrated into a photoacoustic system designed for the detection of SO 2 concentration. Experimental results demonstrate that the output results of the proposed VDLIA closely align with those generated by a commercial LIA, offering significant potential for various industrial applications.