# TRC-Based High-Precision Spot Position Detection in Inter-Satellite Laser Communication
## 4 TRC Based Photocurrent Amplitude Detection
### Simulation  
Define a cosine signal with noise as  
\[V(t)\ =\ a_{1}\cdot\cos(2\pi\cdot f_{1}t+\varphi_{1})+n_{1}(t) \tag{23}\]  
Figure 3: Line spectrum detection based on TRC algorithm.  
The main parameters are: amplitude \(a_{1}=0.001\); frequency \(f_{1}=125\) kHz; sampling frequency \(f_{s}=100\) MHz; \(n_{1}\)(t) is the Gaussian white noise with a mean of 0. The data length \(N\) involved in the calculation is 8000 points.  
Under different SNR conditions, we used the TRC method and the direct FFT method to detect the line spectrum amplitude of \(V(t)\), and the results are shown in Figure 4. When SNR = \(-5\) dB, the spectrum obtained by the TRC method (as showed Figure 4c) and the direct FFT method (as showed Figure 4a) both highlight the spectrum line well at the frequency of 125 kHz. However, when SNR = \(-20\) dB, the amplitude of the spectrum line at 125 kHz obtained by the direct FFT method drops sharply (as showed Figure 4b). In contrast, the TRC method can effectively suppress noise, so that the spectrum line of \(V(t)\) is highlighted in the strong noise. As Figure 4d shows, the spectrum line of \(V(t)\) has been significantly enhanced at 125 kHz, and the output SNR of the TRC algorithm has been increased to 2.25 dB.  
It can be seen from Figure 4 that the noise floor in the frequency spectrum of the direct FFT method is much larger than that of the TRC method, and as the SNR decreases, the difference in the noise floor becomes larger. Therefore, the amplitude estimated by the two methods is quite different. In Figure 4, the abscissa \(f_{n}\) is the normalized frequency: \(f_{n}\)= \(f\)/\(f_{s}\), where \(f\) is the signal frequency and \(f_{s}\) is the sampling frequency.  
In Figure 5, the abscissa is the detection point number. This figure shows the amplitude values detected by the two methods under different SNR conditions. When SNR = \(-5\) dB, the average  
Figure 4: The frequency spectrum of the output signal of direct fast Fourier transform (FFT) method and TRC method under different signal-to-noise ratio (SNR) conditions. (**a**) When SNR = \(-5\) dB, direct FFT method output spectrum; (**b**) When SNR = \(-20\) dB, direct FFT method output spectrum; (**c**) When SNR = \(-5\) dB, TRC method output spectrum; (**d**) When SNR = \(-20\) dB, TRC method output spectrum.  
relative error of the direct FFT method is 28.1%, and the average relative error of the TRC method is 15.9%. When SNR = \(-\)20 dB, the average relative error of the direct FFT method reaches 60.9%, while the average relative error of the TRC method is limited within 16.9%. Therefore, the TRC method has better detection accuracy than the direct FFT method.  
The average relative error is defined as  
\[\delta_{AVG} = \frac{1}{N}\sum_{i=1}^{N}\left(|x_{0}-X|/X\right)\cdot 100\% \tag{24}\]  
where \(x_{0}\) is the detected value, \(X\) is the theory value.  
In addition, Figure 6 shows the change curve of the output SNR of the TRC method following the data length \(N\) when the SNR is \(-\)20 dB. It can be seen that the TRC algorithm with window function can effectively suppress noise and improve the SNR of the output signal. As \(N\) gradually increases, the output SNR of the TRC method also increases, which can improve the accuracy of spot position detection. However, an excessively large amount of data will increase the computational burden, which will weaken the real-time performance of spot position detection. Therefore, the appropriate data length must be selected according to the accuracy and real-time requirements of the system. Considering factors such as algorithm calculation efficiency and SNR gain, the value of data length \(N\) is chosen to be 8000 in the subsequent experiments.  
Figure 5: The amplitude detected by direct FFT method and TRC method under different SNR conditions. (**a**) When SNR = \(-\)5 dB, detected amplitude values of \(V(t)\); (**b**) When SNR = \(-\)20 dB, detected amplitude values of \(V(t)\).  
Figure 6: The change curve of the output SNR of the TRC method following \(N\).