## 3 PAI-Rife Algorithm
### PAI-Rife Algorithm
Among such algorithms, the Rife algorithm is widely used in microcontrollers of wireless sensors because of its simplicity and ease of implementation. Nevertheless, it is susceptible to noise and has limitations on the frequency range. To address this problem, we proposed the PAI-Rife algorithm. The main innovation of this algorithm is that it overturned the original frequency deviation factor and redefined it. Then, the traditional spectral interpolation method of the frequency estimation algorithm is improved with the help of the stable characteristic of the phase angle, the anti-noise performance of the algorithm is enhanced, and the frequency estimation accuracy is improved. The PAI-Rife algorithm met the needs of real-time monitoring of the IoT with low complexity and ensured the validity of the frequency information of wireless sensors. Based on the Rife algorithm, the computational complexity of the PAI-Rife algorithm is only increased by 13.3%, which is much lower than the other three improved Rife algorithms. Moreover, while maintaining low computational complexity, the anti-noise performance is enhanced by 80.3%, and the frequency estimation accuracy is improved by 72.4%. The PAI-Rife algorithm proposed in this paper balanced the computational complexity and estimation accuracy. Its estimation performance is better than Rife, ASIQ-Rife, An-Rife, CQRE, HAQSE, and T-PP algorithms. Unfortunately, we did not test the proposed algorithm in the sensor communication link due to time constraints. In further work, we will realize the application in the communication link and complete the technical advancement from acquisition to transmission. At the same time, continuing to optimize the frequency estimation performance of the algorithm in a lower SNR environment to meet the practical application of the IoT in a more severe environment. Conceptualization, M.C. and H.Y. ; methodology, H.Y. ; software, M.C. ; validation, G.J. and W.F. ; formal analysis, M.C. ; investigation, G.J. ; resources, W.Z. ; data curation, W.F. and H.Y. ; writing--original draft preparation, M.C. ; writing--review and editing, W.Z. ; visualization, G.J. ; supervision, W.F. ; project administration, W.F. ; funding acquisition, M.C. and G.J. All authors have read and agreed to the published version of the manuscript. This research was funded by the Applied Basic Research Program of Qinghai Province (Grant Number 2020-ZJ-724) and the Shanghai Natural Science Foundation (Grant Number 21 ZR1461700). The data presented in this study are available on request from the authors. The authors declare no conflict of interest. ## References

* [PERSON] et al. (2018) [PERSON]; [PERSON]; [PERSON] Algorithm of Robust Frequency Estimation in a Channel with White Gaussian Noise and Pulse Interferences. _J. Commun. Technol. El._**2018**, 63, 805-810. [CrossRef]
* [PERSON] et al. (2021) [PERSON]; [PERSON]; [PERSON] Improved Frequency Offset Estimation Based on the DRM System. _Wire. Commun. Mob. Com._**2021**, _2021_, 1297. [CrossRef] \begin{table}
\begin{tabular}{l c c c c c c c c c} \hline \hline \multirow{2}{*}{**Algorithm**} & \multicolumn{2}{c}{**2097 mm**} & \multicolumn{2}{c}{**2378 mm**} & \multicolumn{2}{c}{**2420 mm**} & \multicolumn{2}{c}{**2561 mm**} & \multicolumn{2}{c}{**2653 mm**} \\ \cline{2-10}  & **Results** & **Bias** & **Results** & **Bias** & **Results** & **Bias** & **Results** & **Bias** \\ \hline Rife & 2095.8 & 1.2 & 2320.3 & 57.7 & 2476.1 & 56.1 & 2587.5 & 38.9 & 2610.3 & 42.7 \\ ASIQ-Rife & 2095.8 & 1.2 & 2321.0 & 57.0 & 2475.8 & 55.8 & 2587.5 & 26.5 & 2614.4 & 38.6 \\ An–Rife & 2095.6 & 1.4 & 2321.0 & 57.0 & 2472.9 & 52.9 & 2591.8 & 30.8 & 2614.1 & 38.9 \\ CQRE & 2095.6 & 1.4 & 2323.4 & 54.6 & 2453.8 & 33.8 & 2581.6 & 20.6 & 2630.7 & 22.3 \\ PAI–Rife & 2097.1 & 0.1 & 2364.1 & 13.9 & 2413.8 & 6.2 & 2565.9 & 4.9 & 2652.5 & 0.5 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Comparison of distance values obtained by different algorithms.