## 2 Principle
The output voltage \(U\) of the balanced detector is expressed as  
\[U(t)=\chi\cos[\omega_{1}(t-\tau_{0})-\omega_{0}\tau_{0}+\alpha\frac{\pi_{\text{ T}}}{2}b_{5}(t-\tau_{0})+\omega_{\text{D}}t]+n_{1}(t), \tag{6}\]  
where \(\chi=0.5\xi ec\mathcal{R}AE_{0}^{2}\beta/n\), \(\xi\) is the transimpedance of the balanced detector, \(\varepsilon\) is the dielectric constant, \(c\) is the speed of light, \(n\) is the refractive index of the medium, \(\mathcal{R}\) represents the responsivity of the photodiode, \(A\) represents the effective optical receiving area of the photodiode [20], \(\omega_{\text{D}}=2\pi f_{\text{D}}\), the sampling frequency of the analog-to-digital converter (ADC) is \(f_{5}\) (\(f_{\text{S}}=1/T_{\text{S}}\), where \(T_{\text{S}}\) is the sampling period), and \(n_{1}(t)\) is the noise. The variable \(U(t)\) is discretely sampled via  
\[U(m)=\chi\cos[\omega_{1}(mT_{\text{S}}-\tau_{0})-\omega_{0}\tau_{0}+\alpha \frac{\pi_{\text{T}}}{2}b_{5}(mT_{\text{S}}-\tau_{0})+\omega_{\text{D}}mT_{ \text{S}}]+n_{1}(mT_{\text{S}}), \tag{7}\]  
and \(U(m)\) is digitally demodulated, resulting in baseband data expressed as  
\[D(m)=\frac{\chi}{2}\sin[\alpha\frac{\pi}{2}b_{5}(mT_{\text{S}}-\tau_{0})]+ \sum_{k=-\infty}^{+\infty}n_{1}(mT_{\text{S}})\sin[\omega_{1}(mT_{\text{S}}- \tau_{0})-\omega_{0}\tau_{0}+\omega_{\text{D}}mT_{\text{S}}]h_{2}(mT_{\text{ S}}-kT_{\text{S}}), \tag{8}\]  
where \(h_{2}(kT_{\text{S}})\) represents the impulse response of the low-pass filter. For ease of reading, the symbols involved in Equations (1)-(8) are summarized in Table 1 in Appendix A. Additionally, the symbols involved in the traditional and proposed methods are summarized in Table 2 in Appendix A. The traditional ranging flow [19; 21; 22] is illustrated in Figure 1b. A segment of data, denoted as \(X_{1}(i)\), with a length of \(N_{2}\), is extracted from the baseband data \(D(m)\) and subsequently cross-correlated with the punctual code \(Y_{\text{P}}(m)\). The length of \(Y_{\text{P}}(m)\) is \(N_{2}\). The coarse distance \(m_{1}T_{C}c/2\) is determined according to the position \(m_{1}\) of the chip where the correlation peak is located, where \(c\) represents the speed of light. A new pseudo-random code \(b_{3}(t)\) is generated by cyclically shifting the original pseudo-random code \(b_{1}(t)\) according to \(m_{1}\). New early \(Y_{\text{E1}}(m)\) and late \(Y_{\text{L1}}(m)\) codes are derived from \(b_{3}(t)\). Next, \(Y_{\text{E1}}(m)\) and \(Y_{\text{L1}}(m)\) are cross-correlated with \(X_{1}(i)\) to obtain \(R_{X_{1},Y_{\text{E1}}}\) and \(R_{X_{1},Y_{\text{L1}}}\), which are then used to compute \(Z\). The fractional part of the chip, representing the fine time delay, is derived inversely as \(\Delta T_{\text{C}}=Z/a_{1}\) (\(0\leq\Delta\tau<1/2\)) according to the early-late discrimination model \(Z(T)=a_{1}T+b_{1}\) (\(a_{1}=2(N_{1}+1)/N_{1}\), \(b_{1}=0\)) [21]. The ultimate distance of the target is \(L=(m_{1}T_{\text{C}}\pm\Delta\tau T_{\text{C}})c/2\). The early-late discrimination model used in the traditional method is a theoretical model in which the parameter \(a_{1}\) is a theoretical value that is relevant to the length of the pseudo-random code, and the parameter \(b_{1}\) is equal to 0. The correlation function of the pseudo-random code determines the early-late discriminant model [21; 23]. The theoretical pseudo-random code has a rectangular waveform with an infinitely wide bandwidth. Its correlation function is [23]  
\[R^{*}(\tau_{1})=\text{Re}\bigg{[}\int_{-\infty}^{\infty}\varphi_{\text{PN}}( \omega)e^{i\omega\tau_{1}}\frac{d\omega}{2}\bigg{]}\sqrt{P_{1}}, \tag{9}\]where \(\mathrm{Re}(x)\) denotes the real part of the complex number \(x\), \(\tau_{1}\) is the phase difference of the pseudo-random code, \(\varphi_{\mathrm{PN}}(\omega)\) is the spectral density of the pseudo-random code, and \(P_{1}\) is the signal power.