A Parallel-Phase Demodulation-Based Distance-Measurement Method Using Dual-Frequency Modulation

: Time-of-ﬂight (ToF) measurement technology based on the amplitude-modulated continuous-wave (AMCW) model has emerged as a state-of-the-art distance-measurement method for various engineering applications. However, many of the ToF cameras employing the AMCW process phase demodulation sequentially, which requires time latency for a single distance measurement. This can result in signiﬁcant distance errors, especially in non-static environments (e.g., robots and vehicles) such as those containing objects moving relatively to the sensors. To reduce the measurement time required for a distance measurement, this paper proposes a novel, parallel-phase demodulation method. The proposed method processes phase demodulation of signal in parallel rather than sequentially. Based on the parallel phase demodulation, 2 π ambiguity problem is also solved in this work by adopting dual frequency modulation to increase the maximum range while maintaining the accuracy. The performance of proposed method was veriﬁed through distance measurements under various conditions. The improved distance measurement accuracy was demonstrated throughout an extended measurement range (1–10 m). m at intervals of 0.5 m. For each distance, 10,000 measurements were conducted. The remaining factors were ﬁxed; i.e., the sampling frequency at 625 MS / s, the modulation voltage amplitude at 12 V, eight samples for one-point distance measurement, and an integration time of 9.6 µ s.


Introduction
3D depth maps contain position and orientation information of objects unavailable in color images. Such 3D spatial information can be utilized in various types of engineering applications, such as unmanned vehicles, robots, human-recognition systems, medical applications, and even personal IT devices [1][2][3][4][5][6][7]. Specifically, in the field of machine vision, 3D depth maps are widely used for many purposes, including human motion capturing [5,6] and object recognition [7].
There are several ways to obtain a 3D depth map, such as stereoscopy [8,9], the structured light method [10,11], and the Time-of-flight (ToF) measurement method [12][13][14][15][16]. However, the stereoscopy and structured light methods require many cameras and incur excessive computational loads [13]. In addition, these methods can achieve high depth resolutions only when a relatively large triangulation base is obtained, meaning that the systems are often bulky [13]. Consequently, the ToF measurement method has been widely adopted as an alternative for 3D depth sensing due to its compactness and low calculation loads [12][13][14][15][16]. During ToF measurements [12][13][14][15][16][17], a pulsed or continuous optical signal is emitted to the object and the traveling time of the reflected light signal is measured. The traveling time, i.e., the ToF, is then converted into the distance.
The direct ToF measurement method [13,15,17], which uses a pulsed optical signal for emission, is one way to measure the ToF. After the emitted light is reflected from the object, the time-to-digital converter (TDC) returns the ToF of the reflected light. Although the direct ToF measurement method where A E , A R , and , which is the cross-correlation function between the reflected light signal and demodulation signal for one integration time, is calculated for n = 1, 2, …, N in sequence [26]. The integration in the demodulation process can be expressed as In Equation (5), int T is the integration time required to calculate one sample. During the sample integration, sinusoidal terms which contain f are generally negligible under the assumption that the inverse of int T is much smaller than f . With multiple samples, the phase delay between the emitted light signal and reflected light signal is calculated through a simple trigonometric calculation [26,27]. The distance is also determined using this phased delay accordingly. The results are given below The harmonic emitted light signal E(t), reflected light signal R(t), and the n-th demodulation signal M n (t) are expressed below where E A , R A , and M A represent the amplitudes of the emitted light signal, the reflected light signal, and the demodulation signal, respectively. f denotes the modulation frequency of all signals. E DC , R DC , and M DC represent the DC components of the emitted light signal, the reflected light signal, and the demodulation signal, respectively. ϕ ToF is the phase delay of the reflected light signal. In the demodulation signal, δ n represents the nth phase shift for n = 1, 2, . . . , N. The number of phase shifts, identical to the number of samples, is N. During the demodulation process, the sample I m (δ n ), which is the cross-correlation function between the reflected light signal and demodulation signal for one integration time, is calculated for n = 1, 2, . . . , N in sequence [26]. The integration in the demodulation process can be expressed as In Equation (5), T int is the integration time required to calculate one sample. During the sample integration, sinusoidal terms which contain f are generally negligible under the assumption that the inverse of T int is much smaller than f . With multiple samples, the phase delay between the emitted light signal and reflected light signal is calculated through a simple trigonometric calculation [26,27]. The distance is also determined using this phased delay accordingly. The results are given below ); B is DC component of sample I m (δ n ) in Equation (5) (R DC M DC T int ), which partially stems from the DC component of the demodulation signal M DC ; and N pseudo represents other noise sources which are not related to the DC component [12]. According to this equation, a reduction of the modulation frequency increases the standard deviation. Therefore, the unambiguous range and the accuracy of the distance measurement have a trade-off relationship.

Sequential Dual-Frequency Modulation Approach
Another method that can be used to solve the 2π ambiguity problem is dual-frequency modulation. Dorrington et al. [24] used two different modulation frequencies to solve the measurement ambiguities. In this method, two measured distances are obtained for each modulation frequency sequentially using the AMCW method. The actual distance is then calculated using these two measured distances [24] as follows. Figure 2 shows the overall scheme when using these two modulation frequencies sequentially.
Another method that can be used to solve the 2π ambiguity problem is dual-frequency modulation. Dorrington et al. [24] used two different modulation frequencies to solve the measurement ambiguities. In this method, two measured distances are obtained for each modulation frequency sequentially using the AMCW method. The actual distance is then calculated using these two measured distances [24] as follows. Figure 2 shows the overall scheme when using these two modulation frequencies sequentially. When using this method, the unambiguous range, which is increased, can be given by where E f is the effective frequency, which is identical to the greatest common division of the two frequencies.
In addition, 1 f and 2 f represent the two modulation frequencies.
The advantage of this method is that the calculations are simple and it uses a high frequency to measure the distance, which improves the accuracy of the measurement. However, the total time for one-point distance measurement is doubled due to the sequential dual-frequency modulation process [22].

Simultaneous Dual Frequency Modulation with Sequential Demodulation
In order to overcome the disadvantages of the sequential dual-frequency modulation method, there is an alternative method which superposes each modulation frequency into a single modulation signal but demodulates it with different frequencies ( 1 f and 2 f ) sequentially to get a single phase image [22]. By repeating the procedure using the different initial phase shift, δ n , n = 1, 2, ..., N, N different samples are obtained to extract actual distance. Figure 3 is schematic of simultaneous dual frequency modulation with sequential demodulation, which shows waveform of modulation and demodulation signals [22]. When using this method, the unambiguous range, which is increased, can be given by where f E is the effective frequency, which is identical to the greatest common division of the two frequencies.
In addition, f 1 and f 2 represent the two modulation frequencies.
The advantage of this method is that the calculations are simple and it uses a high frequency to measure the distance, which improves the accuracy of the measurement. However, the total time for one-point distance measurement is doubled due to the sequential dual-frequency modulation process [22].

Simultaneous Dual Frequency Modulation with Sequential Demodulation
In order to overcome the disadvantages of the sequential dual-frequency modulation method, there is an alternative method which superposes each modulation frequency into a single modulation signal but demodulates it with different frequencies ( f 1 and f 2 ) sequentially to get a single phase image [22]. By repeating the procedure using the different initial phase shift, δ n , n = 1, 2, . . . , N, N different samples are obtained to extract actual distance. Figure 3 is schematic of simultaneous dual frequency modulation with sequential demodulation, which shows waveform of modulation and demodulation signals [22].  The main advantage of this method is that it does not significantly increase the total time for one actual distance measurement compared to the single-frequency modulation method described in Section 3.1 [22]. One disadvantage of this method, however, is that the demodulation signal must change over time. Moreover, it requires more than five-samples to obtain a single distance [22].

Proposed Parallel Phase Demodulation using Dual Frequencies
The dual-frequency modulation scheme based on parallel phase demodulation is described in this section. The main advantage of the proposed method is that the demodulation processing time is nearly identical to one integration time regardless of the number of samples per distance measurement. This is possible because the proposed method uses parallel phase demodulation, meaning that all samples are calculated in parallel. The main advantage of this method is that it does not significantly increase the total time for one actual distance measurement compared to the single-frequency modulation method described in Section 3.1 [22]. One disadvantage of this method, however, is that the demodulation signal must change over time. Moreover, it requires more than five-samples to obtain a single distance [22].

Proposed Parallel Phase Demodulation Using Dual Frequencies
The dual-frequency modulation scheme based on parallel phase demodulation is described in this section. The main advantage of the proposed method is that the demodulation processing time is nearly identical to one integration time regardless of the number of samples per distance measurement. This is possible because the proposed method uses parallel phase demodulation, meaning that all samples are calculated in parallel.

Parallel Phase Demodulation Method
The conventional AMCW method demodulates the optical signal reflected from an object using hardware such as an optical shutter, demodulation pixel, or an image intensifier [12,14,24]. Specifically, only one demodulation signal can be used per integration time; therefore, demodulation must be done sequentially. The parallel phase demodulation method proposed in this paper undertakes computational demodulation using software rather than hardware. The overall schematics of the sequential and parallel phase demodulations are shown in Figure 4.
signal separated into two parts in sequence.
The main advantage of this method is that it does not significantly increase the total time for one actual distance measurement compared to the single-frequency modulation method described in Section 3.1 [22]. One disadvantage of this method, however, is that the demodulation signal must change over time. Moreover, it requires more than five-samples to obtain a single distance [22].

Proposed Parallel Phase Demodulation using Dual Frequencies
The dual-frequency modulation scheme based on parallel phase demodulation is described in this section. The main advantage of the proposed method is that the demodulation processing time is nearly identical to one integration time regardless of the number of samples per distance measurement. This is possible because the proposed method uses parallel phase demodulation, meaning that all samples are calculated in parallel.

Parallel Phase Demodulation Method
The conventional AMCW method demodulates the optical signal reflected from an object using hardware such as an optical shutter, demodulation pixel, or an image intensifier [12,14,24]. Specifically, only one demodulation signal can be used per integration time; therefore, demodulation must be done sequentially. The parallel phase demodulation method proposed in this paper undertakes computational demodulation using software rather than hardware. The overall schematics of the sequential and parallel phase demodulations are shown in Figure 4.     Figure 4a shows the sequential demodulation process of conventional AMCW method. In the conventional method, the samples I m (δ n ), n = 1, 2, . . . , N, are sequentially obtained for distance calculations. The sequential processing is inevitable in this case because it adopts a demodulation process in its hardware [12,14,24]. Figure 4b shows the proposed parallel phase demodulation process. Reflected light signal R(t) is measured and converted to digital format; then, the samples I m (δ n ), n=1, 2, . . . , N, are calculated using N number of demodulation signals in parallel compotation. The proposed method requires 1/N total processing time per single distance measurement compared to that of sequential demodulation. In addition, the proposed method provides ideally zero DC components of demodulation M DC , which improves distance accuracy compared to that of the conventional method, as described in Equation (10). The proposed method demodulates digitized reflected light; and in software, positive and negative values of the demodulation signal, for example, ideal sine wave functions with zero DC components, can be used. Whereas the conventional method based on hardware demodulation uses a physical demodulation signal [12,14,24], which has a positive value for all time, a sine wave form with positive, non-zero DC component value can be used.
Another advantage of parallel phase demodulation is that it can reduce unwanted noise effects during the calculation process. To verify this, the overall procedure of the parallel phase demodulation method is described mathematically. First, the reflected light signal R(t) and the demodulation signal M n (t) can be expressed as follows where all related parameters are identical to those in Section 2, and as mentioned above, the demodulation signal in Equation (13) has zero DC components. The nth sample I m (δ n ), which is calculated by demodulating the reflected light signal, can then be expressed as This equation can be rewritten as shown below Hence, there is no DC component on M n (t), which is related to photon shot noise [12]. With the parallel phase demodulation method, it is shown that such DC terms on M n (t) can be excluded because all demodulation signals are implemented in the software program, as mentioned above. Moreover, in the sample I m (δ n ), there is no DC term related to R DC , which includes the external light. This indicates that the proposed method can reduce the effects of external light on the accuracy of the measurement. In summary, the proposed parallel phase demodulation method can reduce both the total time for one distance measurement and the noise effects.

Dual-Frequency Modulation Based on Parallel Phase Demodulation
In order to solve the 2π ambiguity problem, the conventional dual-frequency modulation [24,25] method is combined with parallel phase demodulation. By combining these two methods, the demodulation process is especially reformed, which is different with sequential demodulation process mentioned in Section 3.3.
The mathematical description is as follows. First, the emitted light signal E(t) is modulated simultaneously using two frequencies. In this case, the emitted light signal E(t) and the reflected light signal R(t) can be expressed as follows: where E 1 , E 2 , R 1 , and R 2 represent the amplitude of the where M 1 and M 2 represent the amplitude of the f 1 component of the demodulation signal and the amplitude of the f 2 component of the demodulation signal, respectively. f e is the effective frequency, which is identical to the greatest common division of f 1 and f 2 . The demodulation signal does not have a DC component because demodulation is done using software, as opposed to other methods in the literature [22,24,25]. Moreover, as expressed by Equation (18), the demodulation signal is also generated as the sum of the dual-frequency signal, which is also one of the major differences compared to earlier approaches [22,24,25]. Using the signals above, the 2π ambiguity problem is revisited by referring to previous methods [22,24,25].
When the phase shift of the demodulation signal is 0, sample I m (0) can be expressed as follows Because the inverse of T int is much smaller than f 1 , f 2 , f 1 − f 2 and f 1 + f 2 , the terms which contain the f 1 , f 2 , f 1 − f 2 and f 1 + f 2 can be neglected. Thus, sample I m (0) can be expressed as Likewise, if the phase shift δ n is applied to the demodulation signal, sample I m (δ n ) can be expressed as Using angle sum identities and the orthogonality of trigonometric functions, the following equations are satisfied.
Appl. Sci. 2020, 10, 293 9 of 15 The distance using each frequency can then be calculated as shown below Using d 1 , d 2 , and Equation (9), k 1 and k 2 , which are the integers expressed in Equation (9) for each frequency, are determined as follows The values of k 1 and k 2 can be determined using the modified Chinese remainder theorem [29]. An error e can arise when calculating k 1 and . . . The standard deviation of the error, i.e., σ e , and the probability of the occurrence of an error, i.e., P e , can be expressed as follows [25] σ The above shows that the higher the frequencies which are combined, the higher the probability of the occurrence of an error becomes [25]. After calculating k 1 and k 2 , the actual distance is calculated by interpolating the two measured distances d 1 + c 2 f 1 k 1 and d 2 + c 2 f 2 k 2 [25].
The optimum value of w which minimizes the standard deviation of the actual distance is expressed as shown below [25].
The main advantage of the method proposed above is that the measurement time does not change, even if numerous samples are used for the distance measurement. In Sections 3.2 and 3.3, the sequential dual-frequency method's implementation is described; it is shown that an increased number of samples can reduce the measurement accuracy if total measurement time remains. However, the proposed method does not have such a drawback. Moreover, as mentioned in Section 4.1, there is no DC component for sample I m (δ n ), as indicated in Equation (23). This makes it possible to remove the effects of external light on the accuracy of the measurement. Figure 5a shows the whole distance measurement system. The distance measurement system consists of five components: a monitor for displaying the results of the experiment, an analyzer for computing all calculations in real time, a laser controller, a laser diode, and an avalanche photodiode. Figure 5b shows the optical components. Figure 5a shows the whole distance measurement system. The distance measurement system consists of five components: a monitor for displaying the results of the experiment, an analyzer for computing all calculations in real time, a laser controller, a laser diode, and an avalanche photodiode. Figure 5b shows the optical components. The M9-852-0100 laser diode by Thorlabs Inc., which generates infrared light at a wavelength of 852 nm, is used as the illumination source. The APD 120 by Thorlabs Inc. is used as the detector, which converts the reflected light signal into a voltage signal. The PXI system by National Instruments Inc. is used to control the measurement system, collect the measurement signal, and process the signals. The PXI system consists of a PXIe-5160 digitizer module, a PXIe-5423 arbitrary function generator module, and a PXI-8880 controller module. The PXIe-5160 fast digitizer module collects the measured voltage signal from the avalanche photodiode with a sampling frequency of 625 MHz. The PXIe-5423 module generates a waveform for modulating the laser intensity and for generating the demodulation signal. The PXI-8880 controller module controls the entire measurement system and processes the samples. All modules are combined in a PXI-1082 chassis, which provides the power, cooling, and communication buses for the PXI modules. Figure 6 shows the overall signal flows of the measurement system. The laser controller generates a DC component for the signal, and the function generator generates a modulation signal. Part of the modulation signal is connected to one channel of the digitizer to be used as the The M9-852-0100 laser diode by Thorlabs Inc., which generates infrared light at a wavelength of 852 nm, is used as the illumination source. The APD 120 by Thorlabs Inc. is used as the detector, which converts the reflected light signal into a voltage signal. The PXI system by National Instruments Inc. is used to control the measurement system, collect the measurement signal, and process the signals. The PXI system consists of a PXIe-5160 digitizer module, a PXIe-5423 arbitrary function generator module, and a PXI-8880 controller module. The PXIe-5160 fast digitizer module collects the measured voltage signal from the avalanche photodiode with a sampling frequency of 625 MHz. The PXIe-5423 module generates a waveform for modulating the laser intensity and for generating the demodulation signal. The PXI-8880 controller module controls the entire measurement system and processes the samples. All modules are combined in a PXI-1082 chassis, which provides the power, cooling, and communication buses for the PXI modules. Figure 6 shows the overall signal flows of the measurement system. The laser controller generates a DC component for the signal, and the function generator generates a modulation signal. Part of the modulation signal is connected to one channel of the digitizer to be used as the demodulation signal. The remaining generated modulation signal is combined with the DC component of the laser controller and used to modulate the laser diode, which emits the optical signal onto the object. The emitted light signal is then reflected and detected by the avalanche photodiode, after which the avalanche photodiode transmits the measured voltage signal to the digitizer through another channel. The digitizer collects input signals and transmits them to the controller. The controller calculates the distance using the signals received. One distinct advantage of this system setup is that the modulation signal and demodulation signal can be generated using only one function generator.

Experimental Setup
after which the avalanche photodiode transmits the measured voltage signal to the digitizer through another channel. The digitizer collects input signals and transmits them to the controller. The controller calculates the distance using the signals received. One distinct advantage of this system setup is that the modulation signal and demodulation signal can be generated using only one function generator.

Results from Single-Frequency Modulation
In this section, using the parallel phase demodulation method, the standard deviations with respect to the object distance are analyzed. The conditions of the experiment are determined by two independent variables: the modulation frequency and the modulation voltage amplitude. The measured distance ranged from 1 m to 4.5 m at intervals of 0.5 m. For each distance, 10,000 repeated distance measurements were conducted to evaluate the standard deviations of the result. The remaining factors were fixed; i.e., the sampling frequency at 625 MS/s, the number of samples for a single distance measurement at 4, and the integration time at 9.6 μs. Figure 7 shows the results of the experiment for different modulation frequencies. The modulation frequencies were 31.25, 15.625, and 7.8125 MHz. The modulation voltage amplitude was fixed at 12 V. Figure 7 shows that as the modulation frequency increased, the standard deviation decreased, which can be described by Equation (10). For the case of 7.8125 MHz modulation frequency, the maximum value of the standard deviation was about 0.05 m. On the other hand, for 31.25 MHz modulation frequency, the maximum value of the standard deviation was lower than 0.01 m.

Results from Single-Frequency Modulation
In this section, using the parallel phase demodulation method, the standard deviations with respect to the object distance are analyzed. The conditions of the experiment are determined by two independent variables: the modulation frequency and the modulation voltage amplitude. The measured distance ranged from 1 m to 4.5 m at intervals of 0.5 m. For each distance, 10,000 repeated distance measurements were conducted to evaluate the standard deviations of the result. The remaining factors were fixed; i.e., the sampling frequency at 625 MS/s, the number of samples for a single distance measurement at 4, and the integration time at 9.6 µs. Figure 7 shows the results of the experiment for different modulation frequencies. The modulation frequencies were 31. 25, 15.625, and 7.8125 MHz. The modulation voltage amplitude was fixed at 12 V. Figure 7 shows that as the modulation frequency increased, the standard deviation decreased, which can be described by Equation (10). For the case of 7.8125 MHz modulation frequency, the maximum value of the standard deviation was about 0.05 m. On the other hand, for 31.25 MHz modulation frequency, the maximum value of the standard deviation was lower than 0.01 m.       25 MHz. It shows that as the modulation voltage amplitude increases, the standard deviation decreases. The maximum value of standard deviation is lower than 0.02 m. A monotonically increasing trend of standard deviation is shown for all cases of modulation voltage amplitude in general, which can be described by Equation (10). Performances of the proposed method and two commercial cameras utilizing conventional sequential AMCW [30], are compared in Table 1 in terms of distance standard deviation versus distance and integration time. The performance parameters of commercial cameras were taken from a reference paper [30]. The relatively very short integration time of the proposed method was chosen to be 9.6 μs, which is suitable for raster scanning type distance measurements. From Table 1, it is obvious that the proposed method can measure a single distance in a very short integration time. The proposed method presents relatively low standard deviation contributed by no DC components in the demodulation process, as shown in Equations (10) and (13). Performances of the proposed method and two commercial cameras utilizing conventional sequential AMCW [30], are compared in Table 1 in terms of distance standard deviation versus distance and integration time. The performance parameters of commercial cameras were taken from a reference paper [30]. The relatively very short integration time of the proposed method was chosen to be 9.6 µs, which is suitable for raster scanning type distance measurements. From Table 1, it is obvious that the proposed method can measure a single distance in a very short integration time. The proposed method presents relatively low standard deviation contributed by no DC components in the demodulation process, as shown in Equations (10) and (13).

Results from Dual-Frequency Modulation
In this section, using dual-frequency modulation based on parallel phase demodulation, the bias error and the standard deviation are investigated. The conditions of the experiment were determined by the combination of the two frequencies. In this case, combinations of 31. 25 Table 2 which can be calculated using Equations (8) and (11). The distance was measured from 1 to 10 m at intervals of 0.5 m. For each distance, 10,000 measurements were conducted. The remaining factors were fixed; i.e., the sampling frequency at 625 MS/s, the modulation voltage amplitude at 12 V, eight samples for one-point distance measurement, and an integration time of 9.6 µs.  Figure 9a shows that the bias error when using only single low frequency is much larger than that when using dual frequencies. Specifically, the maximum value of bias error when using single low frequency is higher than 0.4 m. On the other hand, the maximum value of bias error for dual-frequency cases is about 0.1 m. Figure 9b shows that the standard deviation when using only single low frequency is much larger than that when using dual frequencies in general. It should be noted that as higher frequencies are combined, the standard deviation becomes smaller. This trend is also shown in earlier work [25]. However, in case of combination of 31.25 and 34.375 MHz, there is an abrupt increase in the standard deviation at around 9.0 m, which was predicted in Equations (27) and (28) [25]. Consequently, as shown in Figure 9b

Conclusions
In this paper, an AMCW-based ToF measurement method using parallel phase demodulation and dual-frequency modulation is proposed. The performance of this proposed method was also verified through experimental results. According to the results, the proposed method presents relatively low standard deviation of distance measurement due to zero DC components of demodulation signal. In addition to improvement of accuracy, time for single distance measurement can be reduced by the proposed method. Moreover, using the dual-frequency modulation, the proposed method can extend unambiguous range effectively, as shown in experimental results. The proposed method will be applied to a compact scanning-type 3D sensor for robot applications in the author's group.

Conclusions
In this paper, an AMCW-based ToF measurement method using parallel phase demodulation and dual-frequency modulation is proposed. The performance of this proposed method was also verified through experimental results. According to the results, the proposed method presents relatively low standard deviation of distance measurement due to zero DC components of demodulation signal. In addition to improvement of accuracy, time for single distance measurement can be reduced by the proposed method. Moreover, using the dual-frequency modulation, the proposed method can extend unambiguous range effectively, as shown in experimental results. The proposed method will be applied to a compact scanning-type 3D sensor for robot applications in the author's group.