# PRG: A Distance Measurement Algorithm Based on Phase Regeneration
## 4 Discussion  
We suggest that the PRG method can achieve high precision range finding by eliminating the carrier integer ambiguity using coarse range finding method and it provides a basis for high precision positioning. Applying carrier phase measurement to study distance measurement using phase regeneration, we found that the method is both stability and accuracy, as demonstrated in the phase-locked loop results. Distance measurement accuracy was examined by comparing the PRG method and the coarse ranging finding method based on RSS. Our results in the range finding accuracy show a high precision compared to coarse range-based RSS finding method. The carrier phase measurement technology in PRG method proposed in this paper reference the GPS of measurement technology, and a general standard require the mean square error of carrier phase measurement is less than half wavelength carrier for using pseudorange to round up the carrier phase integer ambiguity algorithm [18], and this requirement is consistent with accuracy of coarse range finding in this paper. Apart from the influence of carrier loop parameter settings on the distance measurement accuracy, the carrier frequency has an influence on accuracy of distance measurement as well. In addition, it is helpful to improve the robustness of PRG method by detecting sudden changes in integer values to cope with large coarse range finding error in practical applications. The higher the carrier frequency, the smaller the spatial distance metric, and then the higher the range accuracy. However, the requirement of precision of coarse range finding also needs to be improved. The positioning method, based on distance measurement, consists of distance measurement and geometric calculation. Distance measurement can be divided based on the time synchronization and non-synchronization measurement. It is difficult to require high precision time synchronization for positioning in some scenarios, such as IoT. The PRG method proposed in this paper is combined with  
Figure 13: CDF of coarse range finding error. RTD and carrier phase measurement, so it has the advantages of not requiring high precision time synchronization and high precision distance measurement. There are two issues that need to be studied in the future. One is the the system design and simulation verification of using Code Division Multiple Access (CDMA) signal as the range finding signal \(m(t)\) in multi-master, multi-slave case. The main reason for using CDMA signals is to identify different masters and slaves through different spreading codes. The other is the effect of indoor multipath on the accuracy of range finding by PRG method, we intend to use CDMA signal as range finding signal in the future research, and reduce the influence of indoor multipath through RAKE diversity reception. We plan to use the software radio platform and the existing transmission media (e.g., Wi-Fi, BLE) to achieve ranging by the PRG method, and to research the positioning algorithm in the case of multiple machines. The software radio platform is used to transmit and receive range finding signal and obtain the difference carrier phase between the transmitted and the received replication carrier. Existing transmission media is mainly used for coarse range finding by conventional range finding method. Conceptualization, Y.C. ; Formal analysis, D.Z. ; Methodology, Y.C. ; Validation, D.Z. ; Visualization, Y.L. ; Writing - original draft, Y.L. ; Writing - review and editing, D.Z. This research is supported in part by the National Key R&D Program of China (No. 2017 YFB0503700). This research is also received support from the National Key Research and Development Program of China (No. 2016 YFB0502001) and National Natural Science Foundation of China (No. 61372110). The authors declare no conflict of interest. The following abbreviations are used in this manuscript: