# Dynamic Phase Comparison Planar Direction-Finding Algorithm on Satellite Radio Receiver
## 3 Simulation Results and Analysis
### Dynamic Phase Comparison Algorithm  
For the simulation of the dynamic comparison phase algorithm, as shown in Figure 4, consider the following default simulation parameters as described: Considering that the frequency range of the RPI receiver is 3 kHz-3 MHz, \(S\) represents a far-field radiation source that continuously emits a 32 kHz sine wave signal. It is also assumed that the final distance \(d_{r}\) between the satellite and the far-field radiation source is 20 times the wavelength of the EM waves. A satellite receiver equipped with a dipole antenna completes its first signal sampling during the period from \(T^{\prime}_{S}\) to \(T^{\prime}\), and its half-wavelength distance is calculated and set as the satellite motion distance \(d\) between the two samplings. Then, the receiver completes the second signal sampling during the same period. Ultimately, the DF system utilizes the dynamic phase comparison algorithm to complete the radiation source direction finding.  
The single simulation result of the dynamic phase comparison algorithm, as illustrated in Figure 5, shows that with an SNR of 10 dB and a receiver sampling rate of 6.4 MHz, each sampling of one cycle signal is completed for phase comparison. From the figure, it is evident that the algorithm tends to produce significant errors mainly near \(0^{\circ}\) and \(180^{\circ}\), which aligns with the conclusions of the accuracy analysis in Section 2.2. The reason for this phenomenon is due to the adjacent phase differences of \(-\pi\) and \(+\pi\). When subject to disturbances from noise and other factors, it is easy for the measured phase difference to undergo abrupt changes, directly causing substantial DF errors near \(180^{\circ}\).  
From the precision analysis in Section 2.2, it is understood that the measurement of phase difference is a very important metric in the dynamic phase comparison algorithm. However, the phase difference is easily disturbed by various factors, such as noise, the sampling rate of the radio receiver, and the length of the comparison signal.  
Figure 6 shows the curves of the average absolute error from one thousand simulations of the algorithm, influenced by five factors: relative distance, signal frequency, SNR, the sampling rate of the receiver, and the length of the received signal. In the simulations, the default parameter settings are as follows: an SNR of \(-15\,\mathrm{dB}\), a receiver sampling rate of \(6.4\,\mathrm{MHz}\), and the receiver sampling duration for each sampling is 100 cycles of the EM waves signal.  
Figure 4: Simulation of the dynamic phase comparison algorithm.  
Figure 5: Simulation result of the dynamic phase comparison algorithm.  
The analysis of the simulation results reveals that the relative distance, SNR, the sampling rate of the receiver, and length of the comparison signal all have a significant impact on the algorithm. From the analysis, the following conclusions can be drawn:  
Figure 6: Average absolute error of the dynamic phase comparison algorithm under different (**a**) relative distances, (**b**) signal frequencies, (**c**) SNRs, (**d**) receiver sampling rates, and (**e**) numbers of received signal cycles.  
1. Generally, the lower the relative distance, the higher the SNR, the higher the sampling rate, or the longer the signal length, the higher the DF accuracy;
2. Compared with the almost identical DF accuracy for far-field radiation sources, the algorithm exhibits lower DF accuracy for near-field sources. When the ratio of relative distance to wavelength is fixed, the DF accuracy for radiation sources of different frequencies remains essentially consistent;
3. Azimuth angles of EM waves near \(0^{\circ}\) and \(180^{\circ}\) are likely to produce significant DF errors, and the error may also increase near \(90^{\circ}\);
4. The length of the comparison signal should not be too long as it may lead to a decrease in DF accuracy. Especially when approaching \(90^{\circ}\), overly long signals can cause larger errors.