Accurate Sinusoidal Frequency Estimation Algorithm for Internet of Things Based on Phase Angle Interpolation Using Frequency Shift  
[PERSON]  
1 College of Physics and Electronic Information Engineering, Qinghai Minzu University, Xining $10007, China; [EMAIL_ADDRESS] (M.C.); 13709759761@139.  
With the development of the IoT in full swing, the significance of information technology to the modern industry has been upgraded from purely providing monitoring center functions to building a comprehensive information framework for industrial processes [10]. Hence, in developing the IoT, we have to consider the sensor network capabilities on the one hand. [PERSON] et al. [11] proposed a pilot-assisted fast frequency monitoring algorithm to enable Narrow Band IoT (NB-IoT) to establish a communication link quickly. [PERSON] et al. [12] surveyed the trust management scheme for wireless sensor networks. They proposed a secure multi-path routing scheme based on energy efficiency [13], which effectively ensured the security and integrity of data transmission. On the other hand, we have to estimate the signal parameters, mainly the frequency, which provides technical support for the research and the integration of sensor networks and sensors.  
Wireless sensors have detected events or physical states through unique algorithms, converted environmental parameters into electrical signals, and sent the data to a database to receive and respond to appropriate conditions. Because the actual frequency point is usually between the two sampling frequency points, spectral leakage and fence effects are generated, resulting in a biased frequency estimate [14]. Usually, the fast Fourier transform (FFT) interpolation is used to improve frequency estimation accuracy, and it can also satisfy the needs of real-time estimation. [PERSON] et al. [15] proposed a classical double-spectrum-line interpolation algorithm. They used the ratio of the maximum and sub-maximum spectrum to interpolate, which improved frequency estimation accuracy. However, the interpolation direction is easily misjudged when the actual frequency is close to the quantized point. In order to reduce the estimation error caused by spectrum leakage and enable wireless sensors to obtain accurate signal frequency, we proposed an improved Rife algorithm based on phase angle interpolation (PAI-Rife). Our contributions are summarized as follows:  
1. Redefined the frequency deviation factor: we modified the spectrum-ratio relationship and defined the frequency deviation factor as the ratio of the maximum spectrum and the sum of it and the sub-maximum spectrum, which improved the frequency deviation correction capability.
2. Designed the phase angle interpolation and the criterion: we used the exceptional stability of the phase angle to convert the amplitude of the spectrum into the phase angle. In this way, we determined the frequency deviation factor and the interpolation direction, which enhanced the anti-interference ability of the algorithm.
3. Shifted the frequency: we set the optimal frequency shift decision threshold, and through frequency shift, the estimation accuracy of different frequency points is guaranteed.  
The rest of this paper is organized as follows: firstly, existing frequency estimation algorithms are reviewed and analyzed in Section 2. Then, an improved frequency estimation algorithm is proposed in Section 3. Furthermore, the numerical simulation and analysis are provided and discussed in Section 4. Finally, the research work of this paper is summarized in Section 5.