## 3 PAI-Rife Algorithm
### PAI-Rife Algorithm
The computational complexity of several Rife algorithms is listed in Table 2. Although the ASIQ-Rife algorithm does not need its frequency shifted, the Rife and Quinn algorithms are used many times during its computation, resulting in a significantly increased computational complexity. The An-Rife algorithm required two frequency shifts, and the probability of being frequency shifted for the second time is 66%, resulting in a 55.3% increased amount of computation. The CQRE algorithm only needs to perform a spectral peak search again, so the increased amount of calculation is slight. In the estimation process of the PAI-Rife algorithm, the spectrum is recalculated only after the frequency shift, and the probability of the frequency shift is only 40%, so the calculation amount is much smaller than the other three improved algorithms. Compared with the CQRE algorithm, the calculation amount is reduced by 13.4% while improving the performance. In addition, we counted the single simulation time of the PAI-Rife algorithm. From the time the signal is received to the end of the estimated frequency, the total is 0.574 ms. It is enough to show that the PAI-Rife algorithm can estimate the signal frequency in real-time and meet the needs of the IoT for real-time monitoring of structural status, positioning, and tracking. ### Estimated Performance at Different Frequencies

In this subsection, the estimation performance of the PAI-Rife algorithm at different frequencies is tested. The quantization frequency \(f_{0}=19\) Hz is set, 0.05\(\Delta f\) is the quantization interval, and 11 quantization frequency points \(f_{i}\) are taken between \((f_{0}\sim f_{0}+\Delta f/2)\). The SNR is \(-6\) dB. The comparison results of PAI-Rife and several other Rife algorithms are shown in Figures 2 and 3. The estimation error of the Rife algorithm is substantial near the quantization frequency. The ASIQ-Rife, An-Rife, and CQRE algorithms have been improved to reduce the estimation error near to the quantization frequency. However, they have not changed the spectral interpolation method of the Rife algorithm. Therefore, the estimation accuracy in the optimal interval is the same. The PAI-Rife algorithm proposed in this paper changed the interpolation method and designed the judgment basis for the correction direction, making the estimation of the frequency deviation factor more accurate. At the same time, a more reasonable and accurate decision threshold is set, and the signal frequency is shifted to the optimal estimation interval, which makes the performance of frequency estimation more stable. According to the statistics of standard deviation results, the mean value of the standard deviation of the Rife algorithm on 11 frequency points is about 0.029. The mean value of the standard deviation of the better-performing An-Rife algorithm among the three existing improved algorithms is about 0.013. The mean value of the standard deviation of the proposed PAI-Rife algorithm is about 0.008. Therefore, the frequency estimation accuracy of the PAI-Rife algorithm has been dramatically improved, which is 38.5% higher than that of the An-Rife algorithm. The signal frequency can be calculated with better estimation accuracy than the other four algorithms at different frequency points. \begin{table}
\begin{tabular}{l l l l l} \hline
**Algorithm** & **Complex Multiplications** & **Complex Additions** & **Computation Points** & **Increased Complexity** \\ \hline Rife & \(C_{M}\) & \(C_{A}\) & 15,360.0 & 0\% \\ ASIQ–Rife & \(C_{M}+8N\) & \(C_{A}+5.3(N-1)\) & 28,973.9 & 88.6\% \\ An–Rife & \(C_{M}+5N\) & \(C_{A}+3.3(N-1)\) & 24,265.1 & 55.3\% \\ CQRE & \(C_{M}+2N\) & \(C_{A}+2(N-1)\) & 19,454.0 & 26.7\% \\ PAI–Rife & \(C_{M}+1.2N\) & \(C_{A}+0.8(N-1)\) & 17,407.2 & 13.3\% \\ \hline \end{tabular}
\end{table} 
Table 2: Complexity of different Rife algorithms (\(N=1024\) ). After comparing several Rife algorithms, we also conducted a comparative analysis under the same conditions with other frequency domain estimation algorithms, such as T-PP and HAQSE.