# Real-Time Indoor Positioning Approach Using iBeacons and Smartphone Sensors
## 4 Experiment  
Experiments were conducted on the fifth floor of the College of Surveying and Geo-informatics, Tongji university (Figure 7). The floor area is around 44 m \(\times\) 17 m, and the minimum width of the corridor is 1.7 m. We adopted Galaxy S6 smartphone and its sensors for positioning. During our experiments, we held the smartphone horizontally in both steady and swaying states. In this study, the sampling rate of gyroscope and accelerator are both 5.5 Hz, and the computational rate for BLE-based positioning was set to 1 Hz. We developed an smartphone application (app) to collect sensor data, implemented our fusion positioning algorithm, and visualized positioning results in the floor plan. The main purpose of these experiments was to investigate the positioning accuracy of the proposed fusion workflow, especially for the cases with sharp turns. In addition, we considered the influence on accuracy of two different errors. The first one is about inaccurate initial positions, and the second one involves frequently disturbed heading orientations (yaw) during walking. Figure 7: The test floor. Therefore, we designed two paths (see Figure 8) including multiple U-turns (180 degrees) and 90-degree-turn(s). The first route has two U-turns and one left turn, and the second case includes three U-turns of a round-trip route in the corridor. First, we implemented the BLE-based positioning method fusing trilateration and fingerprinting of iBeacon. Only 10 BLE beacons were deployed, and they were set in an effective range (no more than 10 m) but not too close. As these beacons were set at similar heights (around 1.3 m above the floor), we fixed the \(z\) value in Equation (7). To implement the fingerprinting method, we set up reference points in regular distance to collect the radio map (Figure 9a). We sampled RSSI data for each point, and the sampling rate was 1 Hz. As mentioned above, we used cosine similarity for localization (Equation (10)). To obtain the ranging parameters of RSSI for trilateration (see Equation (5)), we selected four points and collected RSSI data (Figure 9b). The links between the four stations and iBeacons included NLOS cases. The two parameters \(A\) and \(n\) were computed with least squares adjustment (see Equation (6)). The calculated values are \(-61.94\) and \(1.36\) for \(A\) and \(n\), respectively. Figure 10 shows the BLE-derived locations of the two routes. Positioning accuracy is presented in Table 1. As ground truth is known, we computed root-mean-square error (RMSE) for the two routes. We ran the BLE-based localization three times for each route, and averaged the results of the six trials to calculate the total RMSE. The RMSE of Routes 1 and 2 are 2.71 and 2.77 m, respectively. The column 'RMSE X' shows the major error (2.57 and 2.69 m) is in the \(X\) axis (i.e., the heading direction). The positioning error is mainly from the ranging errors introduced by RSS fluctuations. In this corridor, because the distances between iBeacons and the smartphone are relatively shorter in \(Y\) direction, the ranging errors in \(X\) direction are much larger. As a result, positioning errors are mainly found in the \(X\) direction. We finally obtained the RMSE of 2.75 m regarding the BLE-based method, which is a relatively high accuracy to independent BLE positioning results. Figure 8: Two routes in the testbed. The red dot indicates the starting location and the black lines represent the ground truth: (**a**) Route 1 contains two U-turns and one left turn; and (**b**) Route 2 includes three U-turns. Figure 9: Reference points for fingerprinting: (**a**) points for fingerprinting in offline phase; and (**b**) four points for the adjustment of ranging parameters. Table 2 presents the separate RMSE of trilateration and fingerprinting for localization. Comparing to Table 1, one can find the accuracy improvement of the proposed BLE-based method. The next test was for the proposed fusion workflow of positioning.