# An Obstacle-Tolerant Path Planning Algorithm for Mobile-Anchor-Node-Assisted Localization
## 5 Performance Evaluation
### Evaluation Metrics and Localization Techniques  
1. _Number of beacon points_: The number of beacon points stand for the number of times that the MAN broadcasts packets. The more the times of MAN broadcasting, the more the packets the unknown nodes receive. An increase in the number of packets received by an unknown node, leads to a corresponding increase in power consumption per unknown node so that the performance of entire sensor networks, decreases.
2. _Average localization error_: Localization error is defined as the difference between the estimated locations and actual locations of unknown nodes. Equation (2) presents the localization error of an unknown node \(s_{i}\), where \((x_{i},y_{i})\) is the coordinate of the actual location and \((x_{est},y_{est})\) is the coordinate of the estimated location. Average localization error is presented in Equation (3) where \(n\) is the total number of unknown nodes. The lower the average localization errors, the better the performance of sensor networks: \[error(s_{i})=\sqrt{\left(x_{i}-x_{est}\right)^{2}+\left(y_{i}-y_{ est}\right)^{2}}\] (2) \[AvgError=\frac{\sum_{i=1}^{n}error(s_{i})}{n}\] (3)
3. _Localization coverage_: An unknown node can successfully do self-positioning as long as it receives three or more packets from the MAN. The more the unknown nodes successfully self-positions, the better the performance of sensor networks. Therefore, we define the localization coverage as the ratio of the number of unknown nodes that receive three or more MAN packets to the total number of unknown nodes [8].  
There are three common localization techniques, weighted centroid localization (WCL) [28], accuracy priority trilateration (APT) [8], and time priority trilateration (TPT) [8]. The descriptions are as follows:  
1. _Weighted Centroid Localization_ (WCL): WCL defines a weight function \(RSS_{ij}\) which is the RSS value of the MAN at different beacon points to indicate the impact of different beacon point coordinates \(b_{j}(x,y)\). Equation (4) expresses how an unknown sensor, \(s_{i}\) calculates its own positions, \(P(s_{i})\) based on averaging the coordinates of all \(N_{r}\) received beacon points. \[P(s_{i})=\frac{\sum_{j=1}^{N_{r}}RSS_{ij}\times b_{j}}{\sum_{j=1}^{N_{r}}RSS_{ ij}}\] (4)
2. _Time-Priority Trilateration_ (TPT): TPT calculation starts as soon as three localization packets are received. This enables sensors to save power and the time they need to spend waiting. With these localization packets, the following system of equations needs to be solved to obtain the localization result. For computing the position of \(s_{i}(x_{i},y_{i})\) in a 2-D space, the following system of equations must be solved: \[P(s_{i})=\left\{\begin{array}{l}dist(r_{1},s_{i})=\sqrt{\left(x_{1}-x_{i} \right)^{2}+\left(y_{1}-y_{i}\right)^{2}}\\ dist(r_{2},s_{i})=\sqrt{\left(x_{2}-x_{i}\right)^{2}+\left(y_{2}-y_{i}\right)^{ 2}}\\ dist(r_{3},s_{i})=\sqrt{\left(x_{3}-x_{i}\right)^{2}+\left(y_{3}-y_{i}\right)^{ 2}}\end{array}\right.\] (5)
3. _Accuracy-Priority Trilateration_ (APT): Accuracy-Priority Trilateration (APT) is very similar to TPT. The difference between APT and TPT is that APT checks whether to start the trilateration calculation within a period of time. If a sensor has received at least three localization packets, it starts the trilateration calculation with three of the nearest keys.  
In Figure 11, the experimental results show that the localization errors of APT, TPT, and WCL are 0.265, 0.339, and 0.434 _CR_, respectively while their corresponding localization coverages are similar. Therefore, we adopt the APT technique in the following experiments because APT is more accurate than TPT and WCL. The experimental parameter settings are shown in Table 4.