# Localization of a BLE Device Based on Single-Device RSSI and DOA Measurements
## 7 Experimental Results
### Accuracy Assessment of the Denoising Algorithm and Measurement Method  
We conducted extensive measurements to evaluate the accuracy of the proposed estimation algorithm and the measurement method. We placed the BLE beacon at 13 different known locations with different surrounding environments and used a pre-calibrated scanner device to estimate the DOA. For a better assessment of the algorithm accuracy and to better understand the impact of multipath fading on the DOA estimation, we placed the BLE beacons no more than 3-10 m from the scanner device and took only one measurement (two scans). For all the scans, the actual known direction of the BLE beacon, the estimated DOA, and the angular error in the estimation are presented in Table 3. From the data \begin{table}
\begin{tabular}{l l} \hline \hline
**Measurement Location** & **Estimated DOA** \\ \hline Location 1 & 194.325\({}^{\circ}\) \\ Location 2 & 175.069\({}^{\circ}\) \\ Location 3 & 255.276\({}^{\circ}\) \\ Location 4 & 215.026\({}^{\circ}\) \\ Location 5 & 14.96\({}^{\circ}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Experimental results for Layout 1. \begin{table}
\begin{tabular}{l l} \hline \hline
**Measurement Location** & **Estimated DOA** \\ \hline Location 1 & 264.713\({}^{\circ}\) \\ Location 2 & 315.645\({}^{\circ}\) \\ Location 3 & 324.4\({}^{\circ}\) \\ Location 4 & 264.653\({}^{\circ}\) \\ Location 5 & 275.044\({}^{\circ}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Experimental results for Layout 2. Figure 17: Layout of the scenario with walls in between. in Table 3, \(\theta_{1}\) and \(\theta_{2}\) are the actual direction of the BLE beacon from the scanner device at 2 scan locations, \(\theta\) is derived from Equation (9), \(\hat{\theta}\) is the estimated DOA, and \(\theta_{c}\) is the angular error in estimation derived from Equation (10). The above data show that the average angular error is approximately 24.8\({}^{\circ}\) with a maximum of 101.53\({}^{\circ}\) and a minimum of 4.44\({}^{\circ}\). The histogram of the data represented in Figure 18 also shows that almost all (92.3% of the total measurements) of the estimated DOA are under 60\({}^{\circ}\) and the majority (77% of the total measurements) of the estimated DOA are under 30\({}^{\circ}\) error. The field of view for the central vision of the human eye is approximately 60\({}^{\circ}\), and by applying the same standards, our algorithm performs well in item-finding applications. Our algorithm requires the data to go through four stages of denoising and filtering. The first stage requires data binding over time by finding the median among a set of \(N_{s}/N_{t}\) data samples within each of the \(N_{t}\) bins, which has a complexity of \(O(N_{s}\log(N_{s}/N_{t}))\), assuming \(N_{s}\) data samples are uniformly distributed in \(N_{t}\) time bins. The next step, denoising over time using EWMA, has a time complexity of \(O(N_{t})\) since EWMA is a simple FIR filter. This is followed by data binding over space by finding the median among a set of \(2N_{t}/N_{\theta}\) data samples within each of the \(N_{\theta}\) bins, which has a complexity of \(O(N_{t}\log(2N_{t}/N_{\theta}))\), assuming \(2N_{t}\) data samples are uniformly distributed in \(N_{\theta}\) angular bins. Finally, smoothing over space, which is a moving average filter, has a complexity of \(O(N_{\theta})\).