## 5 Simulation and Analysis  
Simulations are carried out to evaluate the performance of the proposed algorithm. In order to compare performance of the three geometric constraint algorithms, the same scenario as [36; 39] is considered for data generation. As shown in Figure 6, seven BSs are located at (6000, 0), (3000, \(-\)6000), (\(-\)3000, \(-\)5000), (\(-\)6000, \(-\)1000), (\(-\)4000, 6000), (0, 5000) and (4000, 6000), respectively, MS is located at (2000, 1000), all units are in meters. The measurement noise error of distance of TOA satisfies Gaussian distribution with zero mean and standard deviation \(\sigma\), \(\sigma\) equals to 9 or 18, which denotes low measurement noise error  
Figure 5: Flow chart of the proposed algorithm.  
or high measurement noise error, respectively. The NLOS error of distance of TOA satisfies uniform distribution from 100 to 1300. Each of the data in the tables below are calculated from 1000 independent trials. In the simulations, the number of LOS BSs varies from three to seven, the NLOS BS and LOS BS are randomly selected from the seven BS for each trial. The correct identification is defined as all LOS BSs are correctly identified and all NLOS BSs are correctly identified, too. The performance of the proposed algorithm is compared with the other two geometric constraint methods, RT algorithm and AM algorithm.  
For the case of \(\sigma\) equals 9, the performance comparison is shown in Table 1. The proposed algorithm outperforms the RT algorithm greatly. Compared with AM algorithm, when there are only three LOS BS, i.e., there is only one LOS BS combination, the two algorithms have the same accuracy because the second step of proposed algorithm cannot be performed, and the two algorithms adopt the same method. However, when there are four or more LOS BS, proposed algorithm outperforms AM algorithm. This demonstrates that the effectiveness of second step of proposed algorithm, which helps to improve the performance of the proposed algorithm when there are more than three LOS BS and at least two BS combinations pass the first step.  
It is observed from Table 2 that when \(\sigma\) equals to 18, the performance of the proposed algorithm is superior to that of RT algorithm and AM algorithm too. Comparing the results of Tables 1 and 2, we can see that the performance of all three geometric constraint algorithms degrade with the increasing in standard deviations of measurement noise errors \(\sigma\) (except for one data of RT algorithm). This is because as \(\sigma\) increase, the measurement noise error is more easily confused with the NLOS error, which results in the performance degradation of geometric constraint algorithm.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**The Number of LOS BS**} & \multicolumn{3}{c}{**The Number of Correctly Identified**} \\ \cline{2-4}  & **RT** & **AM** & **Proposed** \\  & **Algorithm** & **Algorithm** & **Algorithm** \\ \hline
3 & 853 & 926 & 926 \\ \hline
4 & 949 & 970 & 988 \\ \hline
5 & 948 & 990 & 1000 \\ \hline
6 & 951 & 996 & 1000 \\ \hline
7 & 943 & 1000 & 1000 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Algorithm performance comparation (\(\sigma=9\)).  
Figure 6: Geometric position relationship of BSs and MS.  
It can be seen from Tables 1 and 2, for proposed algorithm, when the number of LOS BSs is four, the probability of BS being misjudged is 1.2% and 5%, respectively. This result approximates the theoretical analysis results of Equation (22). This shows the effectiveness of our theoretical derivation.