검색
검색 팝업 닫기

Ex) Article Title, Author, Keywords

Article

Split Viewer

Research Paper

Curr. Opt. Photon. 2023; 7(6): 683-691

Published online December 25, 2023 https://doi.org/10.3807/COPP.2023.7.6.683

Copyright © Optical Society of Korea.

Software-based Simple Lock-in Amplifier and Built-in Sound Card for Compact and Cost-effective Terahertz Time-domain Spectroscopy System

Yu-Jin Nam, Jisoo Kyoung

Department of Physics, Dankook University, Chungnam 31116, Korea

Corresponding author: *kyoungjs@dankook.ac.kr, ORCID 0000-0001-6736-9118

Received: June 7, 2023; Revised: September 27, 2023; Accepted: October 12, 2023

This is an Open Access article distributed under the terms of the Creative Commons Attribution Non-Commercial License (http://creativecommons.org/licenses/by-nc/4.0/) which permits unrestricted non-commercial use, distribution, and reproduction in any medium, provided the original work is properly cited.

A typical terahertz time-domain spectroscopy system requires large, expensive, and heavy hardware such as a lock-in amplifier and a function generator. In this study, we replaced the lock-in amplifier and the function generator with a single sound card built into a typical desktop computer to significantly reduce the system size, weight, and cost. The sound card serves two purposes: 1 kHz chopping signal generation and raw data acquisition. A unique software lock-in (Python coding program to eliminate noise from raw data) method was developed and successfully extracted THz time-domain signals with a signal-to-noise ratio of ~40,000 (the intensity ratio between the peak and average noise levels). The built-in sound card with the software lock-in method exhibited sufficiently good performance compared with the hardware-based method.

Keywords: Data acquisition, Software lock-in amplifier, Soundcard, Terahertz time-domain spectroscopy

OCIS codes: (070.0070) Fourier optics and signal processing; (120.4820) Optical systems; (140.0140) Lasers and laser optics; (300.0300) Spectroscopy; (300.6495) Spectroscopy, terahertz

Over the past few decades, terahertz time-domain spectroscopy (THz-TDS) has become a valuable tool in various research fields such as material characterization [14], chemical detection [58], medical imaging [911], and nondestructive screening [1214] owing to its unique characteristics. First, THz-TDS provides broadband spectral information (0.1–10 THz) in a single measurement. Another important advantage of THz-TDS compared with continuous wave THz measurements is that the measured THz spectrum has both amplitude and phase at each frequency. Therefore, a complex refractive index can be directly extracted without using the Kramers-Kronig relation [15, 16].

A typical THz-TDS system uses a pair of photoconductive antennas (PCAs) with a femtosecond laser [17]. The femtosecond laser beam is divided into two parts: Pump and probe. When an emitter PCA with a moderate bias voltage (1–20 V) is illuminated by the pump beam, photo-excited electrons are accelerated and a single cycle THz wave is generated. THz measurements by a detector PCA are similar to the reverse generation process, but do not require a bias voltage. The photo-excited electrons illuminated by the probe beam are accelerated by the incident THz wave, and small currents are produced across the electrodes on the detector PCA.

The electric field of the THz wave at the detector is typically approximately 10–100 V/cm. Currents are measured in picoamps to nanoamps [18]. Measuring such tiny currents is challenging in general under the thermal noise voltage. Therefore, a hardware lock-in amplifier (LIA) is extensively used to detect weak signals in noisy environments. In addition, a function generator or an optical chopper is required to modulate such signals for lock-in detection. In the past few decades, the field of femtosecond lasers has made significant progress, allowing tabletop fiber lasers to replace bulky Ti:sapphire lasers for THz-TDS. As a result, THz-TDS systems are smaller in size than in the past. However, the hardware LIA and the accompanying modulation system prevent further reduction in the size and cost of THz-TDS systems. In this study, by developing a simple software algorithm and using a built-in sound card as both a function generator and a data-acquisition device, respectively, we reduced the size, weight, and cost of THz-TDS systems significantly. In the following section, we first explain our software LIA and then show how to construct a THz-TDS system with our built-in sound card.

Lock-in detection also known as phase-sensitive detection uses a specific reference frequency to single out the component of a signal [19, 20]. Environmental noise signals at frequencies other than the reference frequency are rejected. Specifically, the configuration of a THz-TDS system with a function generator and a hardware LIA is schematically displayed in Fig. 1(a). When the bias voltage across the emitter PCA given by a function generator is a square pulse with an angular frequency ωr, the THz signal at the detector might be modulated with the same frequency. The modulated bias voltage is the reference signal of the system. Mathematically, the modulated THz signal at the detector can be written as follows:

Figure 1.Schematic of THz-TDS setup. (a) Conventional setup with a function generator and a hardware LIA. (b) THz-TDS setup for testing software lock-in detection methods. An oscilloscope was used for data acquisition. Inset: Small and cheap voltage amplifier (YUFO Electronics Limited, Guangdong, China). (c) Compact and cost-effective THz-TDS setup by a built-in sound card. Each line-out and microphone port has two channels (left and right channels). THz-TDS, terahertz time-domain spectroscopy; LIA, lock-in amplifier.

Vssinωrt+θs,

where Vs denotes the THz signal amplitude, and θs denotes the additional phase difference between the emitter bias and the detector signal. The actual signal from the detector PCA contains background noise [Vn(t)] that changes randomly independent of the reference. Therefore, the total signal from the detector is defined as follows:

Vnt+Vssinωrt+θs.

The hardware LIA receives reference information from the function generator and generates its own reference sine wave, as follows:

VLsinωrt+θL,

where VL and θL denote the lock-in reference amplitude and the phase constant, respectively. The hardware LIA amplifies the input noisy signal from the detector PCA [Eq. (2)] and multiplies it by the lock-in reference [Eq. (3)]. The result is

VntVLsinωrt+θL+VsVLsinωrt+θssinωrt+θL.

From the trigonometric identity, the second term of Eq. (4) can be expressed as a sum instead of a product.

VntVLsinωrt+θL12VsVLcos2ωrt+θs+θL +12VsVLcosθsθL.

As shown in the equation, the first two terms are AC signals that vary rapidly (typically 1–10 kHz), whereas the last term is a DC signal that does not change with time. Then, the hardware LIA passes the multiplied signal through a low pass filter, leaving only the DC signal. Finally, the locked and amplified signal becomes

12VsVLcosθsθLVs.

which is directly proportional to the THz signal amplitude (Vs) that we want. The time constant of the hardware LIA determines how low frequencies are allowed to pass, whereas the sensitivity determines the amplification level of raw detector signals.

We measured the THz-TDS signal in the usual way using a function generator (AFG3000; Tektronix, OR, USA) and a hardware LIA (SR830; Stanford Research Systems Inc., CA, USA). The pairs of PCA (PCA-40-05-10-800, BATOP GmbH, Jena, Germany) were used for the emitter and detector. A 10 V, 1 kHz square pulse bias was applied to the emitter. The excitation laser (center wavelength: 780 nm) had 10 mW power with a 100 MHz repetition rate for both the emitter and detector. The LIA obtained the reference information from the function generator, and the detector PCA was directly connected to the signal input part of the LIA. The time constant and sensitivity were set to 10 ms and 1,000 uV, respectively. Time domain data were measured in a total of 20 ps time windows at 0.05 ps intervals. The measured THz-TDS signal is displayed in the top panel of the Fig. 2(a). As shown in the Fig. 2, a typical nice terahertz pulse had been measured using a conventional method.

Figure 2.Measured full-scale time-domain signal of THz waves (a) with hardware lock-in amplifier (LIA), (b) wave with a software lock-in detection method 1, and (c) wave with a software lock-in detection method 2.

3.1. Experimental Setup and Data Acquisition

In this study, we have developed two software lock-in detection methods: One is to simply emulate a hardware LIA in software (method 1), and the other is a novel unique method (method 2), which does not require a low-pass filter. To realize the lock-in detection by the software, raw data of the reference signal (bias voltage pulse) and detector signal (small THz signal with large noise) are necessary. To this end, the THz-TDS setup was changed as shown in Fig. 1(b). The hardware LIA was removed, and the conventional oscilloscope (Lecroy waverunner LT342) was employed as the data acquisition device. Our oscilloscope has two input channels: One channel is used to acquire the reference signal from the function generator, and the other channel is used to obtain raw detector signals. As the raw THz signal was extremely weak, a small and cheap voltage amplifier was used between the detector and oscilloscope [Fig. 1(b); The diameter of the coin is 21.60 mm). The voltage amplifier is made by YUFO Electronics Limited [21]. The gathered raw data were sent to a desktop computer through local area network cards.

The amplified raw detector signals [modulated THz signals with noise corresponding to Eq. (2)] collected for 10 ms at each delay line are drawn as a two-dimensional (2D) image in Fig. 3(a). The jet colormap was selected to depict the image so that the reddish and blueish areas represent positive and negative values, respectively. The signal is feeble in most areas except around 13 ps of the delay line where the positive and negative time domain peaks are located (Fig. 2). In our setup, the positive time domain peak was observed at 13.15 ps, whereas the negative peak was located at 13.55 ps. Therefore, the polarity changed from positive to negative as the delay line changed by 0.4 ps. Such an opposite polarity was directly observed in the 2D raw detector signals. As the delay line passed from 13 to 14 ps, the colormap changed its color from red to blue or vice versa, meaning that the polarity was reversed along the delay line. The reference bias voltage and the amplified raw detector signals as a function of time are displayed in Fig. 3(b). The chopping frequency was 1 kHz; Thus, the total five numbers of the square pulse appeared within 5 ms [upper panel in Fig. 3(b)]. Although the peak-to-peak voltage (Vpp) of the reference bias voltage recorded through the oscilloscope was approximately 3.2 V, the Vpp of the actual voltage across the emitter was 10 V. When performing Lock-in detection, only the frequency and shape of the signal are important, not its absolute amplitude. Therefore, we used a reference signal for data analysis. The raw detector signals at 13.15 and 13.55 ps within the same 5 ms are shown in the lower panel of Fig. 3(b). The opposite polarity discussed above was observed: The signal at the 13.15 ps delay line [red line in the lower panel of Fig. 3(b)] was in-phase with the reference bias voltage, whereas it was out-of-phase at the 13.55 ps delay line [blue line in the lower panel of Fig. 3(b)].

Figure 3.Raw time domain signals: (a) Measured raw detector signal using an oscilloscope as a data-acquisition device. (b) (upper panel) A bias chopping reference signal from the function generator. (lower panel) Measured raw detector signals at 13.15 ps (red line) and 13.55 ps (blue line) delay lines, respectively.

3.2. Software Lock-in Detection Method 1

To mimic the hardware LIA, a lock-in reference signal [Eq. (3)] in the form of a sine function is necessary. The black line in Fig. 4(a) indicates the raw reference chopping signal from the function generator, which timely syncs with the emitter bias voltage (1 kHz square pulse). To create the lock-in reference from the chopping reference, the fast Fourier transform (FFT) was performed. The absolute amplitude of the FFT is shown in Fig. 4(b). Because the chopping reference had a square shape, infinitely many frequency components were required. However, as expected, the maximum amplitude was observed at a 1 kHz frequency. In addition, the phase information at the 1 kHz frequency was obtained by FFT. Based on the FFT results, we successfully constructed the lock-in reference [Eq. (3), a 1 kHz sine wave matched the chopping reference], as indicated by the red dotted line in Fig. 4(a). The next step is to multiply the lock-in reference [red dotted line in Fig. 4(a)] with the raw noisy time-dependent signals [Fig. 3(a)] to obtain Eq. (4) or (5). This process has been performed at each delay line to extract the full time-domain signal. The multiplication between the lock-in reference and the raw data at the delay line 13.15 ps [red line in the lower panel of Fig. 3(b)] is depicted as an example in Fig. 4(c).

Figure 4.For software lock-in detection method 1. (a) Chopping reference signal (black solid line) from the function generator and the corresponding lock-in reference (red dotted line). (b) Fast Fourier transform (FFT) of the chopping reference signal [black line in (a)]. (c) Multiplication between lock-in reference [red dotted line in (a)] and raw detector signal at 13.15 ps delay line [red solid line in Fig. 3(b)]. (d) After passing through the Butterworth filter of data (c).

The last step is to pass the multiplication data through the low-pass filter implemented by the software. The performance of the low-pass filter for a hardware LIA is typically modulated by setting the time constant. As the time constant increases, the cutoff frequency becomes lower, meaning that the noise signal can be mostly eliminated. However, the processing time can increase significantly. Therefore, an optimal time constant must be found through trial and error. Our software low pass filter was realized using the Butterworth filter in the Python SciPy module [22]. In addition to the time constant, the software Butterworth filter requires the optimal setting of the filter order. After many trial and error processes, we found the optimal values of 2 for the filter order and 200 ms for the time constant in our system. The multiplication data in Fig. 4(c) (at the 13.15 ps delay stage) was passed through our software low-pass filter, and the results are illustrated in Fig. 4(d). The terahertz wave signal extracted from the noise was the last value of the filtered data [Eq. (6)]. After gathering the filtered signal at each delay line, we finally obtained the full-scale time-domain signal, as shown in the middle panel of Fig. 2 (blue line). Compared with the hardware lock-in result (upper panel in Fig. 2), our software lock-in works very well.

3.3. Software Lock-in Detection Method 2

Although the previous method of software lock-in detection is accomplished by mimicking the hardware LIA, there are several drawbacks. First, it requires the optimal values of filter order and time constant to construct a software-based low-pass filter. Finding the optimal value is a time-consuming task due to the raster scanning process. In addition, because the optimal values may vary depending on the experimental condition, they must be newly found each time the system is changed. Second, in the entire algorithm, the time spent performing the FFT (to generate the sine form of the lock-in reference) and running the low-pass filter consumes a significant portion, slowing down the running speed of the program. Therefore, we propose a novel software lock detection method that requires neither the FFT nor a low-pass filter.

Our method uses the chopping reference directly as a lock-in reference without FFT. Instead, the chopping reference was normalized and shifted so that the minimum and maximum voltages are −1 and 1 V, respectively, and the average value is zero. The lock-in reference for method 2 is depicted in Fig. 5(a), as indicated by the red dotted line. The black line in Fig. 5(a) represents the chopping reference, which is the same data displayed in the black line in Fig. 4(a). Unlike the hardware lock-in system, the new lock-in reference contains the fundamental and the higher-order sine functions [Fig. 4(b)]. Specifically, it is as follows:

Figure 5.For software lock-in detection method 2. (a) Chopping reference signal (black solid line) from function generator and corresponding lock-in reference (red dotted line). (b) Multiplication between lock-in reference [red dots in (a)] and raw detector signal at 13.15 ps delay line [red line in Fig. 3(b)]. The black dotted line represent the average of the red line data.

VL1sinωrt+θL1+VL3sin3ωrt+θL3+VL5sin5ωrt+θL5+.

These higher-order components, however, did not affect the final result because the lock-in detection only singled out the fundamental component as we will see in the next paragraph. Because the FFT process has not been used, the running time of the analysis program is significantly reduced.

The next step is multiplying the lock-in reference with the raw detector signal at each delay line. Mathematically, this multiplication can be expressed as follows:

VntVL1sinωrt+θ L1 +VsVL1sinωrt+θssinωrt+θ L1 + VntVL3sin3ωrt+θ L3  +VsVL3sinωrt+θssin3ωrt+θ L3  + VntVL5sin5ωrt+θ L5 +VsVL5sinωrt+θssin5ωrt+θ L5 +.

The Fig. 5(b) shows the multiplication between the new lock-in reference and the raw detector signal at 13.15 ps delay line as an example. Due to the higher order components of the lock-in reference, the resulting multiplication data [Fig. 5(b)] differ significantly from the previous one [Fig. 4(c)]. Equation (8) can be alternatively expressed using the trigonometric identity:

12VsVL1cosθsθ L1 +VntVL1sinωrt+θ L1 12VsVL1cos2ωrt+θs+θ L1 +12VsVL3cos2ωrt+θsθ L3 +VntVL3sin3ωrt+θ L3 12VsVL3cos4ωrt+θs+θ L3 +12VsVL5cos4ωrt+θsθ L5 +VntVL5sin5ωrt+θ L5 12VsVL5cos6ωrt+θs+θ L5 +.

By comparing Eqs. (5) and (9), the DC component we want to pick up is not changed at all although the lock-in reference contains the higher-order sine functions.

The final step is to extract only the DC component from Eq. (9) or the data displayed in Fig. 5(b). As discussed previously, the reason for using a low-pass filter in hardware lock-in is to leave only the DC component in Eq. (5). The DC component can also be extracted by simply averaging the multiplication signals [Eq. (5) or Eq. (9)] instead of passing them though the low-pass filter because all AC components may become zero after averaging, whereas the DC component would add up. The averaging process of the time-dependent signal in hardware is more difficult to implement than a low-pass filter. Therefore, the hardware LIA typically uses a low-pass filter rather than time averaging. In contrast, software-wise, averaging is significantly easier to implement than a low-pass filter because parameters such as filter order or time constant are not required for averaging. The averaged multiplication data at the 13.15 ps delay line in Fig. 5(b) were approximately 0.15 (marked with a black dotted line). Such a multiplication and averaging process was performed at every delay line, and the gathered data are displayed in the lower panel in Fig. 2 (green line). Our new lock-in detection method extracts THz-TDS signals from noise very well at a faster speed than the previous method. As neither the filter order nor the time constant is necessary, there is no need for their optimization process. Therefore, our new lock-in technique can be used universally even if the detection environment is different.

Although we successfully demonstrated the software-based lock-in detection in the previous chapter, we still use expensive and bulky hardware, including a function generator and an oscilloscope. In this chapter, we demonstrate that how a built-in sound card can replace both pieces of hardware.

4.1. Built-in Sound Card for Compact THz-TDS

In our experiments, the function generator plays two roles: one is to apply a 0–10 V periodic square pulse voltage to the emitter, and the other is to deliver a reference signal to the lock-in system. Our goal is to implement a function generator using a line-out port (an earphone port) of a sound card. The model number of the main board used for this experiment was Samsung DB400T6A-B0K/R (Samsung, Suwon, Korea), where the sound card (Realtek HD Audio ALC662) was built-in. Although the analog line-out port has only a single hole at the main board, there are two channels because of the stereo sound system. Therefore, we can use one of them as the emitter bias and the other for the reference signal of the software lock-in detection. To generate the 1 kHz periodic square pulse, we played the video (1 kHz square wave with sampling rate 96 kHz) [23]. Because of the voltage limitations of the sound card, the output voltage range was limited to between −0.4 to 0.4 V, which was sufficient for the lock-in reference signal but insufficient for the emitter bias. To enhance the bias voltage, the voltage amplifier [inset picture in Fig. 1(b)] was adopted as depicted in Fig. 1(c). The raw (1 kHz square pulse played) data and their amplification are depicted in Fig. 6 (blue line: raw data, red line: amplified data). Although the noise is higher than that of commercial function generators, the built-in sound card can sufficiently produce the desired signal. As described in the next paragraph, lock-in detection works well even with such high-bias noise.

Figure 6.Built-in sound card as a function generator. Raw data of 1 kHz periodic sound signal (blue line) and its amplification (red line) for emitter bias.

4.2. Built-in Sound Card for Software Lock-in Detection

The MIC (microphone) port (line-in port) in the built-in sound card was used for data acquisition. As is the line out port, the MIC port has two channels. One channel is directly connected to a line out channel to record the lock-in reference signal, and the other channel is connected to the detector for raw detector acquisition. As before, the voltage amplifier was inserted between the detector and the sound card to enhance small detector signals. Figure 7(a) shows the measured lock-in reference from the line out channel (blue line) and the raw detector signal at the zero-delay position between the THz wave and the optical probe beam (red line). The detector signal is modulated according to the reference signal. Likewise, at every delay line, we recorded the lock-in reference and the raw detector signal. To complete the lock-in detection, the software lock-in method 2 was used and the final THz time domain signal is shown in Fig. 7(b). The same THz signal was also measured with a conventional hardware LIA and the function generator as well [Fig. 7(c)]. Comparing Figs. 7(b) and 7(c), the built-in sound card and software lock-in detection work very well without any expensive and bulky commercial hardware.

Figure 7.Built-in sound card-based compact and cost-effective THz-TDS system. (a) Bias chopping reference (blue line) and the raw detector signal at zero-delay line (red line). (b) Recovered THz time domain signal with a built-in sound card and software lock-in detection method 2. (c) Measured THz time-domain signal with a commercial function generator and the hardware LIA. THz-TDS, terahertz time-domain spectroscopy; LIA, lock-in amplifier.

THz-TDS is a unique tool compared with other spectroscopy systems because both amplitude and phase information can be measured simultaneously. A conventional THz-TDS system requires a function generator and hardware LIA for small signal detection. Although successful, such expensive and bulky hardware has prevented THz-TDS from being used outside the laboratory. In this study, we have developed a novel software lock-in detection method. Although there have been software algorithms that mimic hardware lock-in, we have demonstrated a significantly simpler and faster method. Since our novel method requires neither a filter order nor time constant, no optimization process is required when the emitter or detector system is changed. Furthermore, we successfully replaced the function generator and LIA with a single built-in sound card to further reduce the setup size, weight, and cost. THz-TDS systems are currently piquing interest in the field of biomedical imaging and non-destructive detection. Several studies have been constructed compact THz spectroscopic systems by reducing the number of optical components [24, 25]. We, therefore, believe that our work along with previous research can pave the way for developing portable cost-effective THz-TDS systems for external laboratory applications.

This work was supported by the National Research Foundation of Korea (NRF) grant funded by the Korea government (MSIT) (NRF 2020R1F1A1074832, NRF 2021R1F1A1058307, and NRF 2022R1A2C2006379), International Research & Development Program of the NRF funded by the Ministry of Science and ICT (Grant no. 2022K1A3A1A73080783), Nano•Material Technology Development Program through the NRF funded by the Ministry of Science, ICT and Future Planning (NRF 2009-0082580, Project number K210309005, K230208009), and Research-focused Department Promotion Project as a part of the University Innovation Support Program 2020 of Dankook University.

National Research Foundation of Korea (NRF) grant funded by the Korea government (MSIT) (NRF-2020 R1F1A1074832, NRF-2021R1F1A1058307, NRF-2022 R1A2C2006379); International Research & Development Program of the NRF funded by the Ministry of Science and ICT (Grant no. 2022K1A3A1A73080783), Nano•Material Technology Development Program through the NRF funded by the Ministry of Science, ICT and Future Planning (NRF 2009-0082580, Project number K210309005, K230208009), and Research-focused Department Promotion Project as a part of the University Innovation Support Program 2020 of Dankook University.

Data underlying the results presented in this paper are not publicly available at the time of publication, which may be obtained from the authors upon reasonable request.

  1. M. Hangyo, M. Tani, and T. Nagashima, “Terahertz time-domain spectroscopy of solids: A review,” Int. J. Infrared Millim. Waves 26, 1661-1690 (2005).
    CrossRef
  2. S. H. Chun, K. W. Shin, H. J. Kim, S. Jung, J. Park, Y.-M. Bahk, H.-R. Park, J. Kyoung, D.-H. Choi, D.-S. Kim, G.-S. Park, J. F. Mitchell, and K. H. Kim, “Electromagnon with sensitive terahertz magnetochromism in a room-temperature magnetoelectric hexaferrite,” Phys. Rev. Lett. 120, 27202 (2018).
    Pubmed CrossRef
  3. J. Kyoung, “Direct in situ observation of the percolation transition in VO2 thin film by peak-shift spectroscopy,” Opt. Mater. Express 12, 1065-1073 (2022).
    CrossRef
  4. R. Matsunaga, Y. I. Hamada, K. Makise, Y. Uzawa, H. Terai, Z. Wang, and R. Shimano, “Higgs amplitude mode in the BCS superconductors Nb1-xTixNInduced by terahertz pulse excitation,” Phys. Rev. Lett. 111, 57002 (2013).
    Pubmed CrossRef
  5. B. Fischer, M. Hoffmann, H. Helm, G. Modjesch, and P. U. Jepsen, “Chemical recognition in terahertz time-domain spectroscopy and imaging,” Semicond. Sci. Technol. 20, S246 (2005).
    CrossRef
  6. B. Reinhard, K. M. Schmitt, V. Wollrab, J. Neu, R. Beigang, and M. Rahm, “Metamaterial near-field sensor for deep-subwavelength thickness measurements and sensitive refractometry in the terahertz frequency range,” Appl. Phys. Lett. 100, 221101 (2012).
    CrossRef
  7. J. T. Kindt and C. A. Schmuttenmaer, “Far-infrared dielectric properties of polar liquids probed by femtosecond terahertz pulse spectroscopy,” J. Phys. Chem. 100, 10373-10379 (1996).
    CrossRef
  8. S. Mitryukovskiy, D. E. P. Vanpoucke, Y. Bai, T. Hannotte, M. Lavancier, D. Hourlier, G. Roos, and R. Peretti, “On the influence of water on THz vibrational spectral features of molecular crystals,” Phys. Chem. 24, 6107-6125 (2022).
    Pubmed CrossRef
  9. J. A. Zeitler, P. F. Taday, D. A. Newnham, M. Pepper, K. C. Gordon, and T. Rades, “Terahertz pulsed spectroscopy and imaging in the pharmaceutical setting-A review,” J. Pharm. Pharmacol. 59, 209-223 (2007).
    Pubmed CrossRef
  10. E. P. J. Parrott, Y. Sun, and E. Pickwell-MacPherson, “Terahertz spectroscopy: Its future role in medical diagnoses,” J. Mol. Struct. 1006, 66-76 (2011).
    CrossRef
  11. G. J. Wilmink, B. L. Ibey, B. D. Rivest, J. E. Grundt, W. P. Roach, T. D. Tongue, B. J. Schulkin, N. Laman, X. G. Peralta, C. C. Roth, and C. Z. Cerna, “Development of a compact terahertz time-domain spectrometer for the measurement of the optical properties of biological tissues,” J. Biomed. Opt. 16, 047006 (2011).
    Pubmed CrossRef
  12. A. G. Davies, A. D. Burnett, W. Fan, E. H. Linfield, and J. E. Cunningham, “Terahertz spectroscopy of explosives and drugs,” Mater. Today 11, 18-26 (2008).
    CrossRef
  13. Y. C. Shen, T. Lo, P. F. Taday, B. E. Cole, W. R. Tribe, and M. C. Kemp, “Detection and identification of explosives using terahertz pulsed spectroscopic imaging,” Appl. Phys. Lett. 86, 241116 (2005).
    CrossRef
  14. Y. Takida, K. Nawata, and H. Minamide, “Security screening system based on terahertz-wave spectroscopic gas detection,” Opt. Express 29, 2529-2537 (2021).
    Pubmed CrossRef
  15. W. Withayachumnankul and M. Naftaly, “Fundamentals of measurement in terahertz time-domain spectroscopy,” J. Infrared Millim. Terahertz Waves 35, 610-637 (2014).
    CrossRef
  16. P. U. Jepsen, “Phase retrieval in terahertz time-domain measurements: A "how to" tutorial,” J. Infrared Millim. Terahertz Waves 40, 395-411 (2019).
    CrossRef
  17. N. M. Burford and M. O. El-Shenawee, “Review of terahertz photoconductive antenna technology,” Opt. Eng. 56, 010901 (2017).
    CrossRef
  18. J. Neu and C. A. Schmuttenmaer, “Tutorial: An introduction to terahertz time domain spectroscopy (THz-TDS),” J. Appl. Phys. 124, 231101 (2018).
    CrossRef
  19. D. T. Chuss, “A software-based lock-in measurement for student laboratories,” Am. J. Phys. 86, 154-158 (2018).
    CrossRef
  20. D. Uhl, L. Bruder, and F. Stienkemeier, “A flexible and scalable, fully software-based lock-in amplifier for nonlinear spectroscopy,” Rev. Sci. Instrum. 92, 083101 (2021).
    Pubmed CrossRef
  21. YUFO-IC, “YUFO-IC website,” (YUFO Electronics Limited), https://www.yufo-ic.cn/ (Accessed Date: May 5, 2023)
  22. Github, “SciPy 1.11.3,” (SciPy, Published Date: Sep. 27, 2023), https://www.scipy.org/ (Accessed Date: May 5, 2023)
  23. RandomMoshe, “1 kHz square wave,” (Youtube, Published Date: Mar. 25, 2018), https://www.youtube.com/watch?v=Fsob8tEdxnI&t=15s (Accessed Date: May 5, 2023)
  24. S. Watanabe and R. Shimano, “Compact terahertz time domain spectroscopy system with diffraction-limited spatial resolution,” Rev. Sci. Instrum. 78, 103906 (2007).
    Pubmed CrossRef
  25. T. Probst, A. Rehn, and M. Koch, “Compact and low-cost THz QTDS system,” Opt. Express 23, 21972-21982 (2015).
    Pubmed CrossRef

Article

Research Paper

Curr. Opt. Photon. 2023; 7(6): 683-691

Published online December 25, 2023 https://doi.org/10.3807/COPP.2023.7.6.683

Copyright © Optical Society of Korea.

Software-based Simple Lock-in Amplifier and Built-in Sound Card for Compact and Cost-effective Terahertz Time-domain Spectroscopy System

Yu-Jin Nam, Jisoo Kyoung

Department of Physics, Dankook University, Chungnam 31116, Korea

Correspondence to:*kyoungjs@dankook.ac.kr, ORCID 0000-0001-6736-9118

Received: June 7, 2023; Revised: September 27, 2023; Accepted: October 12, 2023

This is an Open Access article distributed under the terms of the Creative Commons Attribution Non-Commercial License (http://creativecommons.org/licenses/by-nc/4.0/) which permits unrestricted non-commercial use, distribution, and reproduction in any medium, provided the original work is properly cited.

Abstract

A typical terahertz time-domain spectroscopy system requires large, expensive, and heavy hardware such as a lock-in amplifier and a function generator. In this study, we replaced the lock-in amplifier and the function generator with a single sound card built into a typical desktop computer to significantly reduce the system size, weight, and cost. The sound card serves two purposes: 1 kHz chopping signal generation and raw data acquisition. A unique software lock-in (Python coding program to eliminate noise from raw data) method was developed and successfully extracted THz time-domain signals with a signal-to-noise ratio of ~40,000 (the intensity ratio between the peak and average noise levels). The built-in sound card with the software lock-in method exhibited sufficiently good performance compared with the hardware-based method.

Keywords: Data acquisition, Software lock-in amplifier, Soundcard, Terahertz time-domain spectroscopy

I. INTRODUCTION

Over the past few decades, terahertz time-domain spectroscopy (THz-TDS) has become a valuable tool in various research fields such as material characterization [14], chemical detection [58], medical imaging [911], and nondestructive screening [1214] owing to its unique characteristics. First, THz-TDS provides broadband spectral information (0.1–10 THz) in a single measurement. Another important advantage of THz-TDS compared with continuous wave THz measurements is that the measured THz spectrum has both amplitude and phase at each frequency. Therefore, a complex refractive index can be directly extracted without using the Kramers-Kronig relation [15, 16].

A typical THz-TDS system uses a pair of photoconductive antennas (PCAs) with a femtosecond laser [17]. The femtosecond laser beam is divided into two parts: Pump and probe. When an emitter PCA with a moderate bias voltage (1–20 V) is illuminated by the pump beam, photo-excited electrons are accelerated and a single cycle THz wave is generated. THz measurements by a detector PCA are similar to the reverse generation process, but do not require a bias voltage. The photo-excited electrons illuminated by the probe beam are accelerated by the incident THz wave, and small currents are produced across the electrodes on the detector PCA.

The electric field of the THz wave at the detector is typically approximately 10–100 V/cm. Currents are measured in picoamps to nanoamps [18]. Measuring such tiny currents is challenging in general under the thermal noise voltage. Therefore, a hardware lock-in amplifier (LIA) is extensively used to detect weak signals in noisy environments. In addition, a function generator or an optical chopper is required to modulate such signals for lock-in detection. In the past few decades, the field of femtosecond lasers has made significant progress, allowing tabletop fiber lasers to replace bulky Ti:sapphire lasers for THz-TDS. As a result, THz-TDS systems are smaller in size than in the past. However, the hardware LIA and the accompanying modulation system prevent further reduction in the size and cost of THz-TDS systems. In this study, by developing a simple software algorithm and using a built-in sound card as both a function generator and a data-acquisition device, respectively, we reduced the size, weight, and cost of THz-TDS systems significantly. In the following section, we first explain our software LIA and then show how to construct a THz-TDS system with our built-in sound card.

II. PRINCIPLES OF LOCK-IN DETECTION

Lock-in detection also known as phase-sensitive detection uses a specific reference frequency to single out the component of a signal [19, 20]. Environmental noise signals at frequencies other than the reference frequency are rejected. Specifically, the configuration of a THz-TDS system with a function generator and a hardware LIA is schematically displayed in Fig. 1(a). When the bias voltage across the emitter PCA given by a function generator is a square pulse with an angular frequency ωr, the THz signal at the detector might be modulated with the same frequency. The modulated bias voltage is the reference signal of the system. Mathematically, the modulated THz signal at the detector can be written as follows:

Figure 1. Schematic of THz-TDS setup. (a) Conventional setup with a function generator and a hardware LIA. (b) THz-TDS setup for testing software lock-in detection methods. An oscilloscope was used for data acquisition. Inset: Small and cheap voltage amplifier (YUFO Electronics Limited, Guangdong, China). (c) Compact and cost-effective THz-TDS setup by a built-in sound card. Each line-out and microphone port has two channels (left and right channels). THz-TDS, terahertz time-domain spectroscopy; LIA, lock-in amplifier.

Vssinωrt+θs,

where Vs denotes the THz signal amplitude, and θs denotes the additional phase difference between the emitter bias and the detector signal. The actual signal from the detector PCA contains background noise [Vn(t)] that changes randomly independent of the reference. Therefore, the total signal from the detector is defined as follows:

Vnt+Vssinωrt+θs.

The hardware LIA receives reference information from the function generator and generates its own reference sine wave, as follows:

VLsinωrt+θL,

where VL and θL denote the lock-in reference amplitude and the phase constant, respectively. The hardware LIA amplifies the input noisy signal from the detector PCA [Eq. (2)] and multiplies it by the lock-in reference [Eq. (3)]. The result is

VntVLsinωrt+θL+VsVLsinωrt+θssinωrt+θL.

From the trigonometric identity, the second term of Eq. (4) can be expressed as a sum instead of a product.

VntVLsinωrt+θL12VsVLcos2ωrt+θs+θL +12VsVLcosθsθL.

As shown in the equation, the first two terms are AC signals that vary rapidly (typically 1–10 kHz), whereas the last term is a DC signal that does not change with time. Then, the hardware LIA passes the multiplied signal through a low pass filter, leaving only the DC signal. Finally, the locked and amplified signal becomes

12VsVLcosθsθLVs.

which is directly proportional to the THz signal amplitude (Vs) that we want. The time constant of the hardware LIA determines how low frequencies are allowed to pass, whereas the sensitivity determines the amplification level of raw detector signals.

We measured the THz-TDS signal in the usual way using a function generator (AFG3000; Tektronix, OR, USA) and a hardware LIA (SR830; Stanford Research Systems Inc., CA, USA). The pairs of PCA (PCA-40-05-10-800, BATOP GmbH, Jena, Germany) were used for the emitter and detector. A 10 V, 1 kHz square pulse bias was applied to the emitter. The excitation laser (center wavelength: 780 nm) had 10 mW power with a 100 MHz repetition rate for both the emitter and detector. The LIA obtained the reference information from the function generator, and the detector PCA was directly connected to the signal input part of the LIA. The time constant and sensitivity were set to 10 ms and 1,000 uV, respectively. Time domain data were measured in a total of 20 ps time windows at 0.05 ps intervals. The measured THz-TDS signal is displayed in the top panel of the Fig. 2(a). As shown in the Fig. 2, a typical nice terahertz pulse had been measured using a conventional method.

Figure 2. Measured full-scale time-domain signal of THz waves (a) with hardware lock-in amplifier (LIA), (b) wave with a software lock-in detection method 1, and (c) wave with a software lock-in detection method 2.

III. SOFTWARE-BASED LOCK-IN DETECTIONS

3.1. Experimental Setup and Data Acquisition

In this study, we have developed two software lock-in detection methods: One is to simply emulate a hardware LIA in software (method 1), and the other is a novel unique method (method 2), which does not require a low-pass filter. To realize the lock-in detection by the software, raw data of the reference signal (bias voltage pulse) and detector signal (small THz signal with large noise) are necessary. To this end, the THz-TDS setup was changed as shown in Fig. 1(b). The hardware LIA was removed, and the conventional oscilloscope (Lecroy waverunner LT342) was employed as the data acquisition device. Our oscilloscope has two input channels: One channel is used to acquire the reference signal from the function generator, and the other channel is used to obtain raw detector signals. As the raw THz signal was extremely weak, a small and cheap voltage amplifier was used between the detector and oscilloscope [Fig. 1(b); The diameter of the coin is 21.60 mm). The voltage amplifier is made by YUFO Electronics Limited [21]. The gathered raw data were sent to a desktop computer through local area network cards.

The amplified raw detector signals [modulated THz signals with noise corresponding to Eq. (2)] collected for 10 ms at each delay line are drawn as a two-dimensional (2D) image in Fig. 3(a). The jet colormap was selected to depict the image so that the reddish and blueish areas represent positive and negative values, respectively. The signal is feeble in most areas except around 13 ps of the delay line where the positive and negative time domain peaks are located (Fig. 2). In our setup, the positive time domain peak was observed at 13.15 ps, whereas the negative peak was located at 13.55 ps. Therefore, the polarity changed from positive to negative as the delay line changed by 0.4 ps. Such an opposite polarity was directly observed in the 2D raw detector signals. As the delay line passed from 13 to 14 ps, the colormap changed its color from red to blue or vice versa, meaning that the polarity was reversed along the delay line. The reference bias voltage and the amplified raw detector signals as a function of time are displayed in Fig. 3(b). The chopping frequency was 1 kHz; Thus, the total five numbers of the square pulse appeared within 5 ms [upper panel in Fig. 3(b)]. Although the peak-to-peak voltage (Vpp) of the reference bias voltage recorded through the oscilloscope was approximately 3.2 V, the Vpp of the actual voltage across the emitter was 10 V. When performing Lock-in detection, only the frequency and shape of the signal are important, not its absolute amplitude. Therefore, we used a reference signal for data analysis. The raw detector signals at 13.15 and 13.55 ps within the same 5 ms are shown in the lower panel of Fig. 3(b). The opposite polarity discussed above was observed: The signal at the 13.15 ps delay line [red line in the lower panel of Fig. 3(b)] was in-phase with the reference bias voltage, whereas it was out-of-phase at the 13.55 ps delay line [blue line in the lower panel of Fig. 3(b)].

Figure 3. Raw time domain signals: (a) Measured raw detector signal using an oscilloscope as a data-acquisition device. (b) (upper panel) A bias chopping reference signal from the function generator. (lower panel) Measured raw detector signals at 13.15 ps (red line) and 13.55 ps (blue line) delay lines, respectively.

3.2. Software Lock-in Detection Method 1

To mimic the hardware LIA, a lock-in reference signal [Eq. (3)] in the form of a sine function is necessary. The black line in Fig. 4(a) indicates the raw reference chopping signal from the function generator, which timely syncs with the emitter bias voltage (1 kHz square pulse). To create the lock-in reference from the chopping reference, the fast Fourier transform (FFT) was performed. The absolute amplitude of the FFT is shown in Fig. 4(b). Because the chopping reference had a square shape, infinitely many frequency components were required. However, as expected, the maximum amplitude was observed at a 1 kHz frequency. In addition, the phase information at the 1 kHz frequency was obtained by FFT. Based on the FFT results, we successfully constructed the lock-in reference [Eq. (3), a 1 kHz sine wave matched the chopping reference], as indicated by the red dotted line in Fig. 4(a). The next step is to multiply the lock-in reference [red dotted line in Fig. 4(a)] with the raw noisy time-dependent signals [Fig. 3(a)] to obtain Eq. (4) or (5). This process has been performed at each delay line to extract the full time-domain signal. The multiplication between the lock-in reference and the raw data at the delay line 13.15 ps [red line in the lower panel of Fig. 3(b)] is depicted as an example in Fig. 4(c).

Figure 4. For software lock-in detection method 1. (a) Chopping reference signal (black solid line) from the function generator and the corresponding lock-in reference (red dotted line). (b) Fast Fourier transform (FFT) of the chopping reference signal [black line in (a)]. (c) Multiplication between lock-in reference [red dotted line in (a)] and raw detector signal at 13.15 ps delay line [red solid line in Fig. 3(b)]. (d) After passing through the Butterworth filter of data (c).

The last step is to pass the multiplication data through the low-pass filter implemented by the software. The performance of the low-pass filter for a hardware LIA is typically modulated by setting the time constant. As the time constant increases, the cutoff frequency becomes lower, meaning that the noise signal can be mostly eliminated. However, the processing time can increase significantly. Therefore, an optimal time constant must be found through trial and error. Our software low pass filter was realized using the Butterworth filter in the Python SciPy module [22]. In addition to the time constant, the software Butterworth filter requires the optimal setting of the filter order. After many trial and error processes, we found the optimal values of 2 for the filter order and 200 ms for the time constant in our system. The multiplication data in Fig. 4(c) (at the 13.15 ps delay stage) was passed through our software low-pass filter, and the results are illustrated in Fig. 4(d). The terahertz wave signal extracted from the noise was the last value of the filtered data [Eq. (6)]. After gathering the filtered signal at each delay line, we finally obtained the full-scale time-domain signal, as shown in the middle panel of Fig. 2 (blue line). Compared with the hardware lock-in result (upper panel in Fig. 2), our software lock-in works very well.

3.3. Software Lock-in Detection Method 2

Although the previous method of software lock-in detection is accomplished by mimicking the hardware LIA, there are several drawbacks. First, it requires the optimal values of filter order and time constant to construct a software-based low-pass filter. Finding the optimal value is a time-consuming task due to the raster scanning process. In addition, because the optimal values may vary depending on the experimental condition, they must be newly found each time the system is changed. Second, in the entire algorithm, the time spent performing the FFT (to generate the sine form of the lock-in reference) and running the low-pass filter consumes a significant portion, slowing down the running speed of the program. Therefore, we propose a novel software lock detection method that requires neither the FFT nor a low-pass filter.

Our method uses the chopping reference directly as a lock-in reference without FFT. Instead, the chopping reference was normalized and shifted so that the minimum and maximum voltages are −1 and 1 V, respectively, and the average value is zero. The lock-in reference for method 2 is depicted in Fig. 5(a), as indicated by the red dotted line. The black line in Fig. 5(a) represents the chopping reference, which is the same data displayed in the black line in Fig. 4(a). Unlike the hardware lock-in system, the new lock-in reference contains the fundamental and the higher-order sine functions [Fig. 4(b)]. Specifically, it is as follows:

Figure 5. For software lock-in detection method 2. (a) Chopping reference signal (black solid line) from function generator and corresponding lock-in reference (red dotted line). (b) Multiplication between lock-in reference [red dots in (a)] and raw detector signal at 13.15 ps delay line [red line in Fig. 3(b)]. The black dotted line represent the average of the red line data.

VL1sinωrt+θL1+VL3sin3ωrt+θL3+VL5sin5ωrt+θL5+.

These higher-order components, however, did not affect the final result because the lock-in detection only singled out the fundamental component as we will see in the next paragraph. Because the FFT process has not been used, the running time of the analysis program is significantly reduced.

The next step is multiplying the lock-in reference with the raw detector signal at each delay line. Mathematically, this multiplication can be expressed as follows:

VntVL1sinωrt+θ L1 +VsVL1sinωrt+θssinωrt+θ L1 + VntVL3sin3ωrt+θ L3  +VsVL3sinωrt+θssin3ωrt+θ L3  + VntVL5sin5ωrt+θ L5 +VsVL5sinωrt+θssin5ωrt+θ L5 +.

The Fig. 5(b) shows the multiplication between the new lock-in reference and the raw detector signal at 13.15 ps delay line as an example. Due to the higher order components of the lock-in reference, the resulting multiplication data [Fig. 5(b)] differ significantly from the previous one [Fig. 4(c)]. Equation (8) can be alternatively expressed using the trigonometric identity:

12VsVL1cosθsθ L1 +VntVL1sinωrt+θ L1 12VsVL1cos2ωrt+θs+θ L1 +12VsVL3cos2ωrt+θsθ L3 +VntVL3sin3ωrt+θ L3 12VsVL3cos4ωrt+θs+θ L3 +12VsVL5cos4ωrt+θsθ L5 +VntVL5sin5ωrt+θ L5 12VsVL5cos6ωrt+θs+θ L5 +.

By comparing Eqs. (5) and (9), the DC component we want to pick up is not changed at all although the lock-in reference contains the higher-order sine functions.

The final step is to extract only the DC component from Eq. (9) or the data displayed in Fig. 5(b). As discussed previously, the reason for using a low-pass filter in hardware lock-in is to leave only the DC component in Eq. (5). The DC component can also be extracted by simply averaging the multiplication signals [Eq. (5) or Eq. (9)] instead of passing them though the low-pass filter because all AC components may become zero after averaging, whereas the DC component would add up. The averaging process of the time-dependent signal in hardware is more difficult to implement than a low-pass filter. Therefore, the hardware LIA typically uses a low-pass filter rather than time averaging. In contrast, software-wise, averaging is significantly easier to implement than a low-pass filter because parameters such as filter order or time constant are not required for averaging. The averaged multiplication data at the 13.15 ps delay line in Fig. 5(b) were approximately 0.15 (marked with a black dotted line). Such a multiplication and averaging process was performed at every delay line, and the gathered data are displayed in the lower panel in Fig. 2 (green line). Our new lock-in detection method extracts THz-TDS signals from noise very well at a faster speed than the previous method. As neither the filter order nor the time constant is necessary, there is no need for their optimization process. Therefore, our new lock-in technique can be used universally even if the detection environment is different.

IV. BUILT-IN SOUND CARD FOR COMPACT THz-TDS

Although we successfully demonstrated the software-based lock-in detection in the previous chapter, we still use expensive and bulky hardware, including a function generator and an oscilloscope. In this chapter, we demonstrate that how a built-in sound card can replace both pieces of hardware.

4.1. Built-in Sound Card for Compact THz-TDS

In our experiments, the function generator plays two roles: one is to apply a 0–10 V periodic square pulse voltage to the emitter, and the other is to deliver a reference signal to the lock-in system. Our goal is to implement a function generator using a line-out port (an earphone port) of a sound card. The model number of the main board used for this experiment was Samsung DB400T6A-B0K/R (Samsung, Suwon, Korea), where the sound card (Realtek HD Audio ALC662) was built-in. Although the analog line-out port has only a single hole at the main board, there are two channels because of the stereo sound system. Therefore, we can use one of them as the emitter bias and the other for the reference signal of the software lock-in detection. To generate the 1 kHz periodic square pulse, we played the video (1 kHz square wave with sampling rate 96 kHz) [23]. Because of the voltage limitations of the sound card, the output voltage range was limited to between −0.4 to 0.4 V, which was sufficient for the lock-in reference signal but insufficient for the emitter bias. To enhance the bias voltage, the voltage amplifier [inset picture in Fig. 1(b)] was adopted as depicted in Fig. 1(c). The raw (1 kHz square pulse played) data and their amplification are depicted in Fig. 6 (blue line: raw data, red line: amplified data). Although the noise is higher than that of commercial function generators, the built-in sound card can sufficiently produce the desired signal. As described in the next paragraph, lock-in detection works well even with such high-bias noise.

Figure 6. Built-in sound card as a function generator. Raw data of 1 kHz periodic sound signal (blue line) and its amplification (red line) for emitter bias.

4.2. Built-in Sound Card for Software Lock-in Detection

The MIC (microphone) port (line-in port) in the built-in sound card was used for data acquisition. As is the line out port, the MIC port has two channels. One channel is directly connected to a line out channel to record the lock-in reference signal, and the other channel is connected to the detector for raw detector acquisition. As before, the voltage amplifier was inserted between the detector and the sound card to enhance small detector signals. Figure 7(a) shows the measured lock-in reference from the line out channel (blue line) and the raw detector signal at the zero-delay position between the THz wave and the optical probe beam (red line). The detector signal is modulated according to the reference signal. Likewise, at every delay line, we recorded the lock-in reference and the raw detector signal. To complete the lock-in detection, the software lock-in method 2 was used and the final THz time domain signal is shown in Fig. 7(b). The same THz signal was also measured with a conventional hardware LIA and the function generator as well [Fig. 7(c)]. Comparing Figs. 7(b) and 7(c), the built-in sound card and software lock-in detection work very well without any expensive and bulky commercial hardware.

Figure 7. Built-in sound card-based compact and cost-effective THz-TDS system. (a) Bias chopping reference (blue line) and the raw detector signal at zero-delay line (red line). (b) Recovered THz time domain signal with a built-in sound card and software lock-in detection method 2. (c) Measured THz time-domain signal with a commercial function generator and the hardware LIA. THz-TDS, terahertz time-domain spectroscopy; LIA, lock-in amplifier.

V. CONCLUSION AND REMARK

THz-TDS is a unique tool compared with other spectroscopy systems because both amplitude and phase information can be measured simultaneously. A conventional THz-TDS system requires a function generator and hardware LIA for small signal detection. Although successful, such expensive and bulky hardware has prevented THz-TDS from being used outside the laboratory. In this study, we have developed a novel software lock-in detection method. Although there have been software algorithms that mimic hardware lock-in, we have demonstrated a significantly simpler and faster method. Since our novel method requires neither a filter order nor time constant, no optimization process is required when the emitter or detector system is changed. Furthermore, we successfully replaced the function generator and LIA with a single built-in sound card to further reduce the setup size, weight, and cost. THz-TDS systems are currently piquing interest in the field of biomedical imaging and non-destructive detection. Several studies have been constructed compact THz spectroscopic systems by reducing the number of optical components [24, 25]. We, therefore, believe that our work along with previous research can pave the way for developing portable cost-effective THz-TDS systems for external laboratory applications.

ACKNOWLEDGMENTs

This work was supported by the National Research Foundation of Korea (NRF) grant funded by the Korea government (MSIT) (NRF 2020R1F1A1074832, NRF 2021R1F1A1058307, and NRF 2022R1A2C2006379), International Research & Development Program of the NRF funded by the Ministry of Science and ICT (Grant no. 2022K1A3A1A73080783), Nano•Material Technology Development Program through the NRF funded by the Ministry of Science, ICT and Future Planning (NRF 2009-0082580, Project number K210309005, K230208009), and Research-focused Department Promotion Project as a part of the University Innovation Support Program 2020 of Dankook University.

FUNDING

National Research Foundation of Korea (NRF) grant funded by the Korea government (MSIT) (NRF-2020 R1F1A1074832, NRF-2021R1F1A1058307, NRF-2022 R1A2C2006379); International Research & Development Program of the NRF funded by the Ministry of Science and ICT (Grant no. 2022K1A3A1A73080783), Nano•Material Technology Development Program through the NRF funded by the Ministry of Science, ICT and Future Planning (NRF 2009-0082580, Project number K210309005, K230208009), and Research-focused Department Promotion Project as a part of the University Innovation Support Program 2020 of Dankook University.

DISCLOSURES

The authors declare no conflicts of interest.

DATA AVAILABILITY

Data underlying the results presented in this paper are not publicly available at the time of publication, which may be obtained from the authors upon reasonable request.

Fig 1.

Figure 1.Schematic of THz-TDS setup. (a) Conventional setup with a function generator and a hardware LIA. (b) THz-TDS setup for testing software lock-in detection methods. An oscilloscope was used for data acquisition. Inset: Small and cheap voltage amplifier (YUFO Electronics Limited, Guangdong, China). (c) Compact and cost-effective THz-TDS setup by a built-in sound card. Each line-out and microphone port has two channels (left and right channels). THz-TDS, terahertz time-domain spectroscopy; LIA, lock-in amplifier.
Current Optics and Photonics 2023; 7: 683-691https://doi.org/10.3807/COPP.2023.7.6.683

Fig 2.

Figure 2.Measured full-scale time-domain signal of THz waves (a) with hardware lock-in amplifier (LIA), (b) wave with a software lock-in detection method 1, and (c) wave with a software lock-in detection method 2.
Current Optics and Photonics 2023; 7: 683-691https://doi.org/10.3807/COPP.2023.7.6.683

Fig 3.

Figure 3.Raw time domain signals: (a) Measured raw detector signal using an oscilloscope as a data-acquisition device. (b) (upper panel) A bias chopping reference signal from the function generator. (lower panel) Measured raw detector signals at 13.15 ps (red line) and 13.55 ps (blue line) delay lines, respectively.
Current Optics and Photonics 2023; 7: 683-691https://doi.org/10.3807/COPP.2023.7.6.683

Fig 4.

Figure 4.For software lock-in detection method 1. (a) Chopping reference signal (black solid line) from the function generator and the corresponding lock-in reference (red dotted line). (b) Fast Fourier transform (FFT) of the chopping reference signal [black line in (a)]. (c) Multiplication between lock-in reference [red dotted line in (a)] and raw detector signal at 13.15 ps delay line [red solid line in Fig. 3(b)]. (d) After passing through the Butterworth filter of data (c).
Current Optics and Photonics 2023; 7: 683-691https://doi.org/10.3807/COPP.2023.7.6.683

Fig 5.

Figure 5.For software lock-in detection method 2. (a) Chopping reference signal (black solid line) from function generator and corresponding lock-in reference (red dotted line). (b) Multiplication between lock-in reference [red dots in (a)] and raw detector signal at 13.15 ps delay line [red line in Fig. 3(b)]. The black dotted line represent the average of the red line data.
Current Optics and Photonics 2023; 7: 683-691https://doi.org/10.3807/COPP.2023.7.6.683

Fig 6.

Figure 6.Built-in sound card as a function generator. Raw data of 1 kHz periodic sound signal (blue line) and its amplification (red line) for emitter bias.
Current Optics and Photonics 2023; 7: 683-691https://doi.org/10.3807/COPP.2023.7.6.683

Fig 7.

Figure 7.Built-in sound card-based compact and cost-effective THz-TDS system. (a) Bias chopping reference (blue line) and the raw detector signal at zero-delay line (red line). (b) Recovered THz time domain signal with a built-in sound card and software lock-in detection method 2. (c) Measured THz time-domain signal with a commercial function generator and the hardware LIA. THz-TDS, terahertz time-domain spectroscopy; LIA, lock-in amplifier.
Current Optics and Photonics 2023; 7: 683-691https://doi.org/10.3807/COPP.2023.7.6.683

References

  1. M. Hangyo, M. Tani, and T. Nagashima, “Terahertz time-domain spectroscopy of solids: A review,” Int. J. Infrared Millim. Waves 26, 1661-1690 (2005).
    CrossRef
  2. S. H. Chun, K. W. Shin, H. J. Kim, S. Jung, J. Park, Y.-M. Bahk, H.-R. Park, J. Kyoung, D.-H. Choi, D.-S. Kim, G.-S. Park, J. F. Mitchell, and K. H. Kim, “Electromagnon with sensitive terahertz magnetochromism in a room-temperature magnetoelectric hexaferrite,” Phys. Rev. Lett. 120, 27202 (2018).
    Pubmed CrossRef
  3. J. Kyoung, “Direct in situ observation of the percolation transition in VO2 thin film by peak-shift spectroscopy,” Opt. Mater. Express 12, 1065-1073 (2022).
    CrossRef
  4. R. Matsunaga, Y. I. Hamada, K. Makise, Y. Uzawa, H. Terai, Z. Wang, and R. Shimano, “Higgs amplitude mode in the BCS superconductors Nb1-xTixNInduced by terahertz pulse excitation,” Phys. Rev. Lett. 111, 57002 (2013).
    Pubmed CrossRef
  5. B. Fischer, M. Hoffmann, H. Helm, G. Modjesch, and P. U. Jepsen, “Chemical recognition in terahertz time-domain spectroscopy and imaging,” Semicond. Sci. Technol. 20, S246 (2005).
    CrossRef
  6. B. Reinhard, K. M. Schmitt, V. Wollrab, J. Neu, R. Beigang, and M. Rahm, “Metamaterial near-field sensor for deep-subwavelength thickness measurements and sensitive refractometry in the terahertz frequency range,” Appl. Phys. Lett. 100, 221101 (2012).
    CrossRef
  7. J. T. Kindt and C. A. Schmuttenmaer, “Far-infrared dielectric properties of polar liquids probed by femtosecond terahertz pulse spectroscopy,” J. Phys. Chem. 100, 10373-10379 (1996).
    CrossRef
  8. S. Mitryukovskiy, D. E. P. Vanpoucke, Y. Bai, T. Hannotte, M. Lavancier, D. Hourlier, G. Roos, and R. Peretti, “On the influence of water on THz vibrational spectral features of molecular crystals,” Phys. Chem. 24, 6107-6125 (2022).
    Pubmed CrossRef
  9. J. A. Zeitler, P. F. Taday, D. A. Newnham, M. Pepper, K. C. Gordon, and T. Rades, “Terahertz pulsed spectroscopy and imaging in the pharmaceutical setting-A review,” J. Pharm. Pharmacol. 59, 209-223 (2007).
    Pubmed CrossRef
  10. E. P. J. Parrott, Y. Sun, and E. Pickwell-MacPherson, “Terahertz spectroscopy: Its future role in medical diagnoses,” J. Mol. Struct. 1006, 66-76 (2011).
    CrossRef
  11. G. J. Wilmink, B. L. Ibey, B. D. Rivest, J. E. Grundt, W. P. Roach, T. D. Tongue, B. J. Schulkin, N. Laman, X. G. Peralta, C. C. Roth, and C. Z. Cerna, “Development of a compact terahertz time-domain spectrometer for the measurement of the optical properties of biological tissues,” J. Biomed. Opt. 16, 047006 (2011).
    Pubmed CrossRef
  12. A. G. Davies, A. D. Burnett, W. Fan, E. H. Linfield, and J. E. Cunningham, “Terahertz spectroscopy of explosives and drugs,” Mater. Today 11, 18-26 (2008).
    CrossRef
  13. Y. C. Shen, T. Lo, P. F. Taday, B. E. Cole, W. R. Tribe, and M. C. Kemp, “Detection and identification of explosives using terahertz pulsed spectroscopic imaging,” Appl. Phys. Lett. 86, 241116 (2005).
    CrossRef
  14. Y. Takida, K. Nawata, and H. Minamide, “Security screening system based on terahertz-wave spectroscopic gas detection,” Opt. Express 29, 2529-2537 (2021).
    Pubmed CrossRef
  15. W. Withayachumnankul and M. Naftaly, “Fundamentals of measurement in terahertz time-domain spectroscopy,” J. Infrared Millim. Terahertz Waves 35, 610-637 (2014).
    CrossRef
  16. P. U. Jepsen, “Phase retrieval in terahertz time-domain measurements: A "how to" tutorial,” J. Infrared Millim. Terahertz Waves 40, 395-411 (2019).
    CrossRef
  17. N. M. Burford and M. O. El-Shenawee, “Review of terahertz photoconductive antenna technology,” Opt. Eng. 56, 010901 (2017).
    CrossRef
  18. J. Neu and C. A. Schmuttenmaer, “Tutorial: An introduction to terahertz time domain spectroscopy (THz-TDS),” J. Appl. Phys. 124, 231101 (2018).
    CrossRef
  19. D. T. Chuss, “A software-based lock-in measurement for student laboratories,” Am. J. Phys. 86, 154-158 (2018).
    CrossRef
  20. D. Uhl, L. Bruder, and F. Stienkemeier, “A flexible and scalable, fully software-based lock-in amplifier for nonlinear spectroscopy,” Rev. Sci. Instrum. 92, 083101 (2021).
    Pubmed CrossRef
  21. YUFO-IC, “YUFO-IC website,” (YUFO Electronics Limited), https://www.yufo-ic.cn/ (Accessed Date: May 5, 2023)
  22. Github, “SciPy 1.11.3,” (SciPy, Published Date: Sep. 27, 2023), https://www.scipy.org/ (Accessed Date: May 5, 2023)
  23. RandomMoshe, “1 kHz square wave,” (Youtube, Published Date: Mar. 25, 2018), https://www.youtube.com/watch?v=Fsob8tEdxnI&t=15s (Accessed Date: May 5, 2023)
  24. S. Watanabe and R. Shimano, “Compact terahertz time domain spectroscopy system with diffraction-limited spatial resolution,” Rev. Sci. Instrum. 78, 103906 (2007).
    Pubmed CrossRef
  25. T. Probst, A. Rehn, and M. Koch, “Compact and low-cost THz QTDS system,” Opt. Express 23, 21972-21982 (2015).
    Pubmed CrossRef