# Iterative Positioning Algorithm for Indoor Node Based on Distance Correction in WSNs
## 1 Introduction  
Wireless sensor networks have been widely applied in indoor scenarios where satellite or cellular signals do not work properly, primarily in fields of defense, industry, and social life due to the networks' advantages of low power consumption, low cost, and self-organization [1]. In order to provide adequate monitoring services in engineering applications, node position information must be provided [2, 3]. Node position information is the key to whether the information obtained is valuable or not in the WSN-based Zigbee protocol, especially for target surveillance and tracking in the fields of military work and anti-terrorism [4, 5, 6, 7]. That is, it can be said that perceived data is meaningless if no node position information is provided. However, wireless signals are inevitably interfered with by noises such as multi-path fading [8, 9], diffraction [10], antenna gain [11], and non-line of sight [12] when propagating in actual physical environments, and uncertain propagation loss is produced, resulting in inaccuracies in ranging. It is known that the maximum ranging error rate is up to \(\pm\)50% [13]. To solve this problem, issues and methods on node positioning in WSN should be widely explored. An effective node positioning method must consider the following points. (1) How should a mathematical model be constructed to fit the nonlinear relationship between the received signal strength indication (RSSI) and the distance? (2) What positioning algorithm should be used to obtain a higher positioning accuracy? (3) What are the basic requirements to consider in terms of hardware resources and computational complexity when building a positioning algorithm? Based on the three issues mentioned above, we propose a target node iterative positioning algorithm based on distance correction in this paper. The motivation of this paper is to reduce the positioning error of the target node to support users to retrieve accurate position information. The process of our target node iterative positioning model based on distance correction is shown in Figure 1.  
In the proposed algorithm, the median of the distance deviation coefficients is used to modify the measured distance during each iteration. The median of the distance deviation coefficients can more closely express the overall distance deviation characteristic. The log-distance distribution model is applied to calculate the distances among unknown target nodes and connected anchor nodes to fit more accurately the nonlinear relationship between distance and RSSI, reducing computational complexity as well. The iterative positioning model is constructed to ensure that the target node is in the region  
Figure 1: The process of our target node iterative positioning model based on distance correction. The \(d_{bi}\) is the distance between the given anchor node and unknown target node, which is calculated by the log-distance distribution model in Figure 1. The \(d_{ci}\) is the distance between the coordinates of the anchor node and the coordinates calculated by the triangle centroid positioning algorithm. The \(d_{ni}\) is the distance between the anchor node and the target node, which is recalculated based on the median. Legend: RSSI, received signal strength indication. surrounded by its connected anchor nodes, which is also of great help to improving the positioning accuracy. Additionally, the node iterative positioning algorithm based on distance correction can provide theoretical support for future research. Contributions are included in the following aspects. 1. Derivation of noise impact factor based on a log-distance distribution model The expression of the noise impact factor \(F_{N}\) is derived by reconstructing the mathematical model, which is the corresponding numerical relationship between the noise impact factor \(F_{N}\) and the measured distance. The noise impact factor derived in this paper is used to describe the influence degree of noise on the measured values of RSSI. 2.