- Research
- Open Access
- Published:

# Hardware and software design of BMW system for multi-floor localization

*EURASIP Journal on Wireless Communications and Networking*
**volume 2017**, Article number: 139 (2017)

## Abstract

Although the Micro Electro Mechanical System (MEMS) sensors are capable of providing short-term high positioning accuracy, every positioning result significantly depends on the historical ones, which inevitably leads to the long-term error accumulation. The Bluetooth Low Energy (BLE) is independent of the accumulative error, but the positioning accuracy is suffered by the irregular jump error resulted from the Received Signal Strength Indicator (RSSI) jitter. Considering the requirement of accurate, seamless, and consecutive positioning by the existing commercial systems, we propose a new integrated BLE and MEMS Wireless (BMW) system for multi-floor positioning. In concrete terms, first of all, the way of fingerprint database construction with the reduced workload is introduced. Second, the fingerprint database is denoised by the process of affinity propagation clustering, outlier detection, and RSSI filtering. Third, the robust M estimation-based extended Kalman filter is applied to estimate the two-dimensional coordinates of the target on each floor. Finally, the barometer data are used to calculate the height of the target. The extensive experimental results show that the proposed system can not only restrain the accumulative error caused by the MEMS sensors but also eliminate the irregular jump error from the BLE RSSI jitter. In an actual multi-floor environment, the proposed system is verified to be able to achieve the Root Mean Square (RMS) positioning error within 1 m.

## Introduction

At present, the indoor positioning has broad application such as searching the cars and elevators in underground parking lot and pushing advertisements or discounts to the customers in large shopping malls. The Global Navigation Satellite System (GNSS) [1–3] well meets the precision requirement of outdoor positioning, but in indoor environment, its performance may drastically deteriorate due to the serious signal blocking and multipath effect. In response to this compelling problem, a batch of researchers put forward a variety of indoor positioning systems based on the Bluetooth Low Energy (BLE) [4], Ultra Wideband (UWB) [5], Radio Frequency Identification (RFID) [6], Micro Electro Mechanical System (MEMS) sensors [7], and Wireless Local Area Network (WLAN) [8, 9].

The hardware cost, range limitation, and long-term error accumulation limit the development of the conventional positioning systems. Among them, the MEMS sensors can be used to perform the Pedestrian Dead Reckoning (PDR) [7, 10] by using the inertia and heading information though it contains the accumulative error. The BLE Received Signal Strength Indicator (RSSI)-based positioning system can meet the requirement of low power, low cost, and no accumulative error though the RSSI jitter caused by multipath effect may seriously decrease the positioning accuracy.

In recent decade, various integrated systems have been significantly concerned to improve positioning accuracy [11, 12]. The systems [13–15] using Kalman and particle filter to achieve the WLAN/MEMS fusion positioning reduce the accumulative error of MEMS sensors, but they fail to constrain the WLAN RSSI jitter. To solve the RSSI jitter problem, the authors in [16] build the observation equation of the RSSI according to the signal propagation model, which is difficult to be constructed in the complex indoor environment. In [17], the authors design an indoor positioning system by fusing the WLAN and Magnetic Angular Rate and Gravity (MARG) data to solve the problems of RSSI jitter and accumulative error. However, this system cannot achieve the three-dimensional positioning, which is significantly required by the current commercial applications.

This paper presents a new integrated BMW system for multi-floor positioning. First of all, the fingerprint database is optimized by using the affine propagation clustering, outlier detection, and RSSI filtering algorithms. Specifically, the fingerprint denoising is performed to reduce the probability of large errors of BLE positioning, and then, the gait detection approach is used to estimate the walking speed and heading angle of the target based on the extended Kalman filter (EKF). Second, the robust EKF is designed to restrain the accumulative error caused by the MEMS sensors, as well as eliminate the irregular jump error from the BLE RSSI jitter. Finally, according to the barometer data and geographical location information, the height of the target is calculated to achieve the multi-floor positioning.

## Related work

In this section, we will briefly introduce some related work in three aspects of fast fingerprint database construction, fusion positioning, and multi-floor positioning and also address the corresponding limitations.

**Fast fingerprint database construction** Although the fingerprint positioning has been studied for a long time, it still cannot be applied widely since its offline phase generally spends a huge amount of time on fingerprint database construction. By using the conventional approaches, the target area is calibrated with a batch of equally spaced grids, and then, the fingerprints are collected at the grids point-by-point [18, 19]. The involved time cost rises significantly with the increase of environmental size, which hinders the development of fingerprint positioning. In [20], the authors propose to construct an incomplete fingerprint database with realistic coverage gaps, and meanwhile study the performance of several interpolation and extrapolation approaches used for recovering the missing fingerprints. In [21], according to the distribution of Reference Points (RPs) with respect to each Wi-Fi Access Point (AP), the signal propagation model is constructed as a function of spatial structure, which can be used to construct the fingerprint database quickly.

**Fusion positioning** At present, the common single positioning systems are difficult to adapt to the complex indoor environment. In response to this compelling problem, a variety of fusion positioning systems are designed to compensate for the shortcomings of each single one. In [22], the data fusion from both the proprioceptive and exteroceptive sensors, like the odometer, Global Positioning System (GPS), Light Detection and Ranging (LIDAR), and vision, as well as the knowledge of road map is considered to perform the fusion positioning. In [23], the authors conduct data fusion by integrating the RSSI and Time difference of Arrival (TDOA) measurements to estimate the superior locations of the target. Specifically, by employing the nonparametric estimation approach, which is robust to the variations of measurement noise and quantization, it is addressed that the fusion positioning is more robust and higher accurate and has lower implementation cost.

**Multi-floor positioning** The mainstream of indoor positioning systems mainly focuses on the horizontal coordinate estimation, whereas little research has been done on the vertical coordinate estimation. In [24], the authors propose a WiFi-based indoor positioning system that takes both the characteristics of trilateration and scene analysis into account. The authors in [25] rely on the path loss model to construct a light fingerprint radio map to find the target floor. However, these systems are applied to only determine the floor on which the target is most probably located, but they cannot estimate the accurate locations of the target.

## System description

### System framework

As shown in Fig. 1, our system contains four modules, BLE fingerprint positioning module, speed and heading calculation module, EKF module, and height calculation module. According to the output of accelerometer, gyroscope, and magnetometer, the gait detection and quaternion calculation are carried out to estimate the walking speed and heading angle of the target, which will be sent to the PDR to perform localization. Then, the localization results by the PDR and Weighted K Nearest Neighbor (WKNN) are selected as the input of the EKF to obtain the two-dimensional coordinates of the target. After that, based on the output of barometer, two-dimensional positioning result, and geographical location information, the height of the target is inferred.

### BLE fingerprint positioning

BLE fingerprint positioning includes two phases, offline phase and online phase. The main tasks of offline phase are the coordinate calibration and fingerprint database construction with respect to the target environment. In addition, the affinity propagation clustering, outlier detection, and RSSI filtering are carried out to eliminate the large errors as well as optimize each sub-database. The main task of online phase is to match the newly collected RSSI data against the fingerprint database to obtain the positioning result. This process is shown in Fig. 2.

#### Fast fingerprint database construction

The data in the conventional fingerprint database are collected point-by-point, which limits the application of fingerprint positioning due to the requirement of huge time cost. In response to this compelling problem, we propose a new fast fingerprint database construction approach. First of all, the floor plan of the target environment is imported into the terminal as a map. Second, the map is represented by a batch of straight lines (labeled with dash blue lines) with the starting and ending points (labeled with red triangles), as shown in Fig. 3.

Supposing that the pixel size of the map is *m*
_{mapx
} by *m*
_{mapy
} and the actual size of the target environment is *M*
_{
x
} by *M*
_{
y
}, we can obtain the relations of the pixels and actual locations in (1).

where \(({X_{0}},{Y_{0}})\phantom {\dot {i}\!}\) is the actual origin location, which is represented by (0,0) in the map. \(\phantom {\dot {i}\!}({x_{\text {map}{_{i}}}},{y_{\text {map}{_{i}}}})\) and \(({X_{i}},{Y_{i}})\phantom {\dot {i}\!}\) are the coordinates of the *i*th point in the map (with the length *m*
_{mapx
} and width *m*
_{mapy
}) and actual environment (with the length *M*
_{
x
} and width *M*
_{
y
}) respectively.

We construct the standard fingerprint database by

where *L*
_{step_x
} and *L*
_{step_y
} are the physical intervals in the *X* and *Y* directions, respectively, in the actual environment, which are normally set as *L*
_{step_x
}=*L*
_{step_y
}.

By taking the walking path from (*x*
_{0},*y*
_{0}) to (*x*
_{end},*y*
_{end}) (in Fig. 3) as an example, a volunteer starts walking after labeling (*x*
_{0},*y*
_{0}) on the screen of the terminal and then labels (*x*
_{end},*y*
_{end}) on the screen of the terminal when he/she stops walking. During the walk, (*x*
_{
i
},*y*
_{
i
}) is notated as the *i*th location, which is calculated by

where *v*
_{
n
} and *θ*
_{
n
} are the walking speed and heading. \({\varepsilon _{xi}} = \frac {{{v_{i}}\sin ({\theta _{i}})}}{{\sum {{v_{i}}\sin ({\theta _{i}})} }}(L\sin ({\Psi _{1}}) - {L_{pdr}}\sin ({\Psi _{2}}))\) and \({\varepsilon _{yi}} = \frac {{{v_{i}}\cos ({\theta _{i}})}}{{\sum {{v_{i}}\cos ({\theta _{i}})} }}(L\cos ({\Psi _{1}}) - {L_{pdr}}\cos ({\Psi _{2}}))\) are the error compensation in the *X* and *Y* directions respectively. *L* and \({L_{pdr}} = \sum \limits _{i = 1}^{N} {{v_{i}}}\) are the actual distance and the estimated one by the PDR from the starting to ending locations. *Ψ*
_{1} is the heading of (*x*
_{end},*y*
_{end}) relative to (*x*
_{0},*y*
_{0}). *Ψ*
_{2} is the heading of (*x*
_{
N
},*y*
_{
N
}) relative to (*x*
_{0},*y*
_{0}).

Since the RSSI in standard fingerprint database may be lost when the walking speed is too fast, we propose to rely on the interpolation approach to estimate the lost RSSI by propagation modeling, as shown in Fig. 4.

We use the propagation model below to describe the relations of the RSSI and distance from each anchor to the terminal.

where \({P_{{d_{0}}}}\) is the RSSI with 1-m distance from the anchor. *d* is the distance from the anchor to terminal. *N*
_{
t
} is the path loss exponent.

Figure 5 shows two groups of test points indicating the variation of RSSI with respect to the distance from an anchor to the terminal. As can be seen from Fig. 6, the constructed propagation model matches the variation of RSSI well when the distance is within 10 m.

We randomly select *N*
_{
m
} terminal locations to train the path loss exponent for each anchor by

where the notation “ ∥∙∥_{2}” represents the 2-norm operation. *D*
_{0} is the anchor location. *D*
_{
i
} is the *i*th location of the terminal. \({P_{{d_{i}}}}\) is the RSSI at *D*
_{
i
}. We calculate \(\overline N = {{\sum {{N_{i}}}} / m}\) as the path loss exponent. Thus, the lost RSSI at *D*
_{
i+1} is estimated by

#### Outlier detection

We rely on the affinity propagation clustering [26] to classify the off-line RSSI data and then construct each cluster as a sub-database, as shown in Table 1. In online phase, we match the newly collected RSSI data to the cluster center of each sub-database and then select the sub-database with the best matching to perform positioning. To achieve this goal, we define density(*x*,*k*) and relative_density(*x*,*k*) as the density and relative density [27] of the newly collected RSSI *x* with respect to its *k* nearest neighbors respectively.

where distance(*x*,*y*) is the distance between *x* and *y*. *N*(*x*,*k*) is the set of *k* nearest neighbors with respect to *x*. |*N*(*x*,*y*)| is the number of RSSI data in *N*(*x*,*k*).The pseudo-code of sub-database construction is shown in Table 1.

*c*
*l*
*u*
*s*
*t*
*e*
*r*
_{
i
} is the *i*th cluster. point_{
j
} is the *j*th point. *Threshold* is the threshold of relative density.

### Speed and heading estimation

We integrate the data from the 3-axis accelerometer, 3-axis gyroscope, and 3-axis magnetometer to estimate the walking speed and heading of the target (Fig. 7). First of all, the median and mean filters are fused to eliminate the device noise. Second, the low-pass filtering is performed on the output of 3-axis accelerometer to detect the gait and consequently estimate the walking speed. Finally, the data from the 3-axis accelerometer, 3-axis gyroscope, and 3-axis magnetometer are combined with the posture matrix [28] to estimate the heading.

#### Speed estimation

We calculate the step size of the *k*th step by \({P_{k}} = {C_{Sk}}\sqrt [4]{{{A_{\text {norm}{_{\max }}}} - {A_{\text {norm}{_{\min }}}}}}\), where the maximum and minimum acceleration respectively are \({A_{\text {norm}{_{\max }}}}\phantom {\dot {i}\!}\) and \(\phantom {\dot {i}\!}{A_{\text {norm}{_{\min }}}}\). The parameter *C*
_{
Sk
} is trained by using the Back Propagation (BP) neural network [29, 30]. Specifically, the step frequency *F*
_{
Sk
} and height \({H_{{S_{k}}}}\) are selected as the input and *C*
_{
Sk
} is selected as the output to train the coefficients *V*
_{
ij
} and *W*
_{
j
}. The number of neurons on hidden layer is 11, as shown in Fig. 8.

With the pedestrian walking, the output of accelerometer \({A_{\text {norm}}}\; = \sqrt {a_{{x_{b}}}^{2} + a_{{y_{b}}}^{2} + a_{{z_{b}}}^{2}}\) generally changes in sinusoid mode [28], where \({a_{{x_{b}}}}\), \({a_{{y_{b}}}}\), and \({a_{{z_{b}}}}\) are the output of accelerometer in *X*, *Y*, and *Z* directions respectively. A step is detected when *A*
_{norm} reaches a local maximum higher than a given threshold *A*
_{0}. By setting the sampling frequency as *f*
_{
s
} and number of samples between two adjacent maximum as *Δ*
*N*, the time duration of the *k*th step is \({t_{k}} = \frac {\Delta N}{f_{s}}\) and the corresponding estimated speed is

#### Heading estimation

We define the carrier and geographic reference coordinate systems as *x*-*y*-*z* and ENU, where *E*, *N*, and *U* axes point to the geographic east, north, and sky directions, respectively, as shown in Fig. 9.

The coordinate transformation from the carrier to geographic reference coordinate systems is described as

where \(T_{n}^{b}(q)\) is the posture matrix. *q*=*q*
_{0}+*q*
_{1}
*i*+*q*
_{2}
*j*+*q*
_{3}
*k* is the quaternion. \({\left [ {\begin {array}{*{20}{c}} {{x_{b}}}&{{y_{b}}}&{{z_{b}}} \end {array}} \right ]^{T}}\) and \({\left [ {\begin {array}{*{20}{c}} {{x_{n}}}&{{y_{n}}}&{{z_{n}}} \end {array}} \right ]^{T}}\) are the coordinates of the target in the carrier and geographic reference coordinate systems respectively. According to the relations of the posture matrix and quaternion [31], we have

Using the rigid body angular differential equation, we obtain

where *w*=0+*w*
_{
x
}
*i*+*w*
_{
y
}
*j*+*w*
_{
z
}
*k* is the angular velocity rotation quaternion. *w*
_{
x
}, *w*
_{
y
}, and *w*
_{
z
} are the angular velocities in *X*, *Y*, and *Z*directions in the carrier coordinate system. The notation “ ⊗” represents the quaternion multiplication, which is also used in [31]. We rewrite the formula above in matrix form as

We discretize the formula above as

where *T*
_{
s
} is the sampling interval. *I* is the unit matrix. \(\vec q(0)\) is the initial quaternion. *m* is the index of samples. We normalize the quaternion as

The posture matrix can be updated based on the quaternion obtained in (12). However, the quaternion may not be accurate due to the error of the gyroscope. To solve this problem, we construct the quaternion equations of status and observation as follows.

where \({A_{m}} = \left (I + \frac {1}{2}\Omega \left (w{T_{s}}\right)\right)\) is the transition matrix of status. *W*
_{
m
} is the process noise. *V*
_{
m+1} is the observation noise. The observation variable *Y*
_{
m+1} is calculated by

where \({a_{m + 1}} = {\left [ {\begin {array}{*{20}{c}} {{a_{{x_{b}}}}}&{{a_{{y_{b}}}}}&{{a_{{z_{b}}}}} \end {array}} \right ]^{T}}\) and \({c_{m + 1}} = {\left [ {\begin {array}{*{20}{c}} {{c_{{x_{b}}}}}&{{c_{{y_{b}}}}}&{{c_{{z_{b}}}}} \end {array}} \right ]^{T}}\) are the output of accelerometer and magnetometer, respectively, in the carrier coordinate system. \(g = {\left [ {\begin {array}{*{20}{c}} 0&0&1 \end {array}} \right ]^{T}}\)is the normalized output of accelerometer when the target is static in the geographic reference coordinate system. \(L = {\left [ {\begin {array}{*{20}{c}} 0&{{b_{y}}}&{{b_{z}}} \end {array}} \right ]^{T}}\) is the output of magnetometer in the geographic reference coordinate system, in which \({b_{y}} = \sqrt {c_{{x_{\mathrm {b}}}}^{2} + c_{{y_{b}}}^{2}}\phantom {\dot {i}\!}\) and \(\phantom {\dot {i}\!}{b_{z}} = {c_{{z_{\mathrm {b}}}}}\). Based on (14), we can calculate that

Finally, the heading of the target is estimated by

### Robust EKF

#### EKF

We choose the geographic east and north directions, walking speed, and heading to construct the equation of status below.

where *X*
_{
t
}=[*E*
_{
t
}
*N*
_{
t
}
*v*
_{
t
}
*φ*
_{
t
}]^{T}. *E*
_{
t−1} and *N*
_{
t−1} are the geographic east and north directions, respectively, at moment *t*−1. *v*
_{
t−1} and *φ*
_{
t−1} are the walking speed and heading, respectively, in the geographic reference coordinate system at moment *t*−1. *W*
_{
t−1} is the Gaussian white noise with zero mean at moment *t*−1. \(E\left [ {{W_{i}}W_{j}^{\mathrm {T}}} \right ] = Q(i,j){\delta _{ij}},\;\;i,j = 1, \cdots,o\), in which *o* is the number of estimation variables, *δ*
_{
ij
} is the Kronecker function, and *Q* is the covariance matrix of process noise.

The output of BLE fingerprint positioning and the estimated speed and heading are selected as the observation variable to construct the equation of observation below.

where \({Z_{t}} = {\left [ {E_{t}^{\text {ble}}\;N_{t}^{\text {ble}}\;v_{t}^{\text {mems}}\;\varphi _{t}^{\text {mems}}} \right ]^{\mathrm {T}}}\). \(E_{t}^{{\text {ble}}}\) and \(N_{t}^{{\text {ble}}}\) are the geographic east and north directions by the BLE fingerprint positioning at moment *t*. \(v_{t}^{\text {mems}}\) and \(\varphi _{t}^{\text {mems}}\) are the estimated speed and heading, respectively, by using the MEMS sensors at moment *t*. *V*
_{
t
} is the Gaussian white noise with zero mean at moment *t*. *E*[*V*(*i*)*V*
^{T}(*j*)]=*R*(*i*,*j*)*δ*
_{
ij
}, *i*,*j*=1,⋯,*n*, in which *n* is the number of observation variables and *R*(*R*>0) is the covariance matrix of observation noise.

#### Robustness enhancement

Considering that the change of the weighting factors of the IGG3 [32] is slight, we first define the IGG3 weight function below to enhance the robustness of the EKF. We first define the IGG3 weight function below.

where *p*
_{
i
} and \({\bar p_{i}}\) are the *i*th diagonal elements in the weight matrix *P*=*R*
^{−1} and equivalence weight matrix \(\bar P\) respectively. *k*
_{0}∈[1,1.5] and *k*
_{1}∈[2.5,3] are the weights. The normalized residual vector *u*
_{
i
} is calculated by

where *v*
_{
i
} is the *i*th element in the *n*×1-dimensional residual vector of observation *V*. \(\sigma _{v_{i}} = \frac {\sigma _{0}}{\sqrt {q_{v_{i}}}}\), in which \(q_{v_{i}}\) is the reciprocal of *v*
_{
i
} and *σ*
_{0} is the variance factor [32].

Then, we apply the M estimation approach to enhance the robustness of the EKF. The main difference between the conventional EKF and robust one is the updating of filter gain, as shown below.

where \(\bar K\left (t \right)\) is the filter gain at moment *t*. *P*(*t*,*t*−1) is the one-step prediction of the matrix of error covariance at moment *t*. *H*(*t*) is the matrix of observation at moment *t*. \(\bar R\left (t \right) = \bar B_{t}^{- 1}\) is the covariance matrix of observation noise, in which \({\bar B_{t}}\) is the equivalent weight matrix.

### Height estimation

### Pressure measure

The principle of barometric pressure measure is that the atmospheric pressure in the gravitational field decreases as the height increases [33]. Thus, the altitude of the target can be estimated by using the barometric pressure measured by the barometer. When the height of gravity, *H*, is less than 11 km, the standard pressure formula can be described as

where *P*
_{
s
} is the pressure value.

Finally, the height of the target is estimated by

where *R*=6356766 m is the radius of earth. Since *R*≫*H*, we can obtain \(\frac {R}{{R - H}} \approx 1\) and *h*≈*H*.

### Algorithm design

The walking pattern in indoor environment can be simply divided into walking flat, upstairs, and downstairs. In our system, we rely on the output of barometer to determine the walking pattern of the target and then count the number of steps to estimate the height of the target, as shown in Table 2. In this table, *h*
_{
t−1} and *h*
_{stair} stand for the height of the target at moment *t* and step height respectively.

### System implementation

Figure 10 shows the schematic diagram of the proposed system. The BLE anchor broadcasts the packets in a real-time manner. A smartphone equipped with the BLE and MEMS modules is selected as the target. Both the BLE and MEMS data are packaged and transmitted to the positioning server through the 4G network, and then, the estimated locations of the target are displayed by the server, as shown in Fig. 11.

#### Hardware platform

The CC2540 chip of Texas Instruments (TI) is selected as the BLE anchor with the broadcast frequency 10 Hz and power 0 dBm, as shown in Fig. 12.

The target is installed with the Android 6.0 operating system and designed to support the BLE, accelerometer, magnetometer, and barometer modules. The positioning and web servers are based on the Windows 7 operating system with the processor of Intel (R) Core (TM) i3-416 CPU @ 3.60 GHz, as shown in Fig. 13.

#### Software platform

The APP used to collect the data from the BLE and MEMS sensors as well as access the positioning server is developed by Android Studio software, and the corresponding algorithms are written on the Eclipse software platform in JAVA (Figs. 14 and 15). The MySQL database and Apache Web server are selected to save the positioning result and show them through the PHP and JavaScript (Fig. 16).

## Experimental results

Two adjacent floors in a building are selected as the experimental environment, as shown in Figs. 17 and 18. There are 11 BLE anchors, namely Anchor 1,⋯,11, fixed in target environment and the 514 RPs (marked with bullet) are uniformly calibrated with the interval of 0.6 m. Figure 19 shows some photos of the actual environment. The positioning result can be displayed on both the terminal and server sides, as shown in Figs. 20 and 21.

Figures 22 and 23 show the result of fingerprints clustering without and with denoising. The process of denoising increases the probability of merging the physically adjacent RPs into the same cluster.

Although the irregular jump error of BLE positioning may exceed 10 m, the ultimate error by fusion positioning will converge into a small value as the time going on. By taking the result in Fig. 24 as an example, the error of initial positioning is over 13 m, but the one almost decreases to less than 2 m when the timestamp is over 100 s.

We continue to compare the performance of the proposed and conventional positioning algorithms by using the MEMS or BLE solely. Figure 25 shows the result of locations tracking by different algorithms on a floor. The real trajectory starts from point A, along Anchor 3 and Anchor 6, along Anchor 4 and Anchor 3, and back to point A (see Fig. 25).

The result of locations tracking on two different floors is also shown in Fig. 26. In this test, the real trajectory is selected from point A, along Anchor 3 and point B, going upstairs to point C, along Anchor 8 and Anchor 7, and ending at point D (see Figs. 26 and 27).

As can be seen from Fig. 26, the large accumulative error of MEMS positioning exists, while the BLE positioning is suffered by the irregular jump error and cannot be accurate enough when the target is located in the staircase. In contrast, the proposed fusion positioning algorithm can restrain the accumulative error of MEMS positioning as well as eliminate the irregular jump error of BLE positioning. In addition, it is also verified that the proposed algorithm is featured with good height resolution, which makes the system more robust to the actual indoor multi-floor positioning.

Figures 27 and 28 show the Cumulative Density Function (CDF) of errors and the error at each test point respectively. From these figures, we can find that the positioning errors by using the BLE or MEMS solely are much larger than the one of the proposed fusion positioning. In addition, different percentile errors of fusion, BLE, and MEMS positioning are also illustrated in Table 3.

Figure 29 shows the height error of each test point when the target is located in the staircase. From this figure, we can find that our system is capable of achieving better height resolution compared to the conventional ones using the MEMS or BLE solely.

Finally, we investigate the stability of our system under the long-term testing. To achieve this goal, three shapes (square, linear, and irregular shapes) of trajectories are considered in Figs. 30, 31, 32, 33, 34, 35, and 36 respectively. Obviously, our system exhibits the best performance in terms of accumulative error constraint, irregular jump error elimination, and height resolution under different shapes of trajectories.

## Conclusions

In this paper, both the hardware and software of BMW system are designed and implemented for indoor multi-floor positioning. Based on the extensive experimental results, it is demonstrated that the proposed system is capable of solving the problems of accumulative error constraint and irregular jump error elimination in MEMS and BLE positioning respectively. In general, our system is featured with high positioning accuracy, good height resolution, and strong long-term stability.

## References

M Jia, L Wang, Q Guo, X Gu, W Xiang, A low complexity detection algorithm for fixed up-link scma system in mission critical scenario. IEEE Internet Things J.

**PP**(99), 1–1 (2017).M Jia, X Gu, Q Guo, W Xiang, N Zhang, Broadband hybrid satellite-terrestrial communication systems based on cognitive radio towards 5g. IEEE Wirel. Commun.

**23**(6), 96–106 (2016).M Jia, L Wang, Z Yin, Q Guo, X Gu, A novel spread slotted aloha based on cognitive radio for satellite communications system. EURASIP J. Wirel. Commun. Netw.

**2016**(1), 232 (2016).ES Lohan, J Talvitie, PFE Silva, in

*International Conference on Localization and GNSS*. Received signal strength models for WLAN and BLE-based indoor positioning in multi-floor buildings (IEEEGothenburg, 2015), pp. 1–6.K Yu, JP Montillet, A Rabbachin, UWB location and tracking for wireless embedded networks. Signal Process.

**86**(9), 2153–2171 (2006).YL Lai, J Cheng, A cloud-storage RFID location tracking system. IEEE Trans. Magn.

**50**(7), 1–4 (2014).L Zhang, J Liu, H Jiang, Senstrack: energy-efficient location tracking with smartphone sensors. IEEE Sensors J.

**13**(10), 3775–3784 (2013).N Alsindi, Z Chaloupka, N Alkhanbashi, An empirical evaluation of a probabilistic RF signature for WLAN location fingerprinting. IEEE Trans. Wirel. Commun.

**13**(6), 3257–3268 (2014).M Zhou, F Qiu, K Xu, Z Tian, Semi-supervised learning for indoor hybrid fingerprint database calibration with low effort. Comput. Commun.

**86**(C), 57–74 (2016).B Koo, S Lee, M Lee, in

*International Conference on Indoor Positioning and Indoor Navigation*. PDR/fingerprinting fusion indoor location tracking using RSS recovery and clustering (IEEEBusan, 2015), pp. 699–704.M Tanenhaus, D Carhoun, T Geis, in

*IEEE/ION Position Location and Navigation Symposium*. Miniature IMU/INS with optimally fused low drift MEMS gyro and accelerometers for applications in GPS-denied environments (IEEESouth Carolina, 2012), pp. 259–264.K Kloch, P Lukowicz, C Fischer, in

*International Symposium on Wearable Computers*. Collaborative PDR localisation with mobile phones (IEEESan Francisco, 2011), pp. 37–40.W Xiao, W Ni, KT Yue, in

*International Conference on Indoor Positioning and Indoor Navigation*. Integrated Wi-Fi fingerprinting and inertial sensing for indoor positioning (IEEEGuimaraes, 2011), pp. 1–6.H Wang, H Lenz, A Szabo, in

*Positioning, Navigation and Communication, 2007. Wpnc ’07. Workshop On*. WLAN-based pedestrian tracking using particle filters and low-cost MEMS sensors (IEEEHannover, 2007), pp. 1–7.M Atia, M Korenberg, A Noureldin, in

*IEEE International Symposium on Mechatronics and Its Applications*. A WiFi-aided reduced inertial sensors-based navigation system with fast embedded implementation of particle filtering (IEEESharjah, 2012), pp. 1–5.V Malyavej, W Kumkeaw, M Aorpimai, in

*International Conference on Electrical Engineering/Electrinics, Computer, Telecommunications and Information Technology*. Indoor robot localization by RSSI/IMU sensor fusion (IEEEKrabi, 2013), pp. 1–6.X Liu, Z Wu, X Lin, WLAN/MARG/GPS integrated positioning system based on a self-adaptive weighted algorithm. Qinghua Daxue Xuebao/J. Tsinghua University.

**53**(7), 955–960 (2013).M Zhou, Q Zhang, Y Wang, Hotspot ranking based indoor mapping and mobility analysis using crowdsourced Wi-Fi signal. IEEE Access.

**5:**, 3594–3602 (2017).M Zhou, Y Tang, Z Tian, Semi-supervised learning for indoor hybrid fingerprint database calibration with low effort. IEEE Access.

**5:**, 4388–4400 (2017).J Talvitie, M Renfors, ES Lohan, Distance-based interpolation and extrapolation methods for RSS-based localization with indoor wireless signals. IEEE Trans. Veh. Technol.

**64**(4), 1340–1353 (2015).SS Jan, SJ Yeh, YW Liu, Received signal strength database interpolation by kriging for a Wi-Fi indoor positioning system. Sensors.

**15**(9), 21377–21393 (2015).J Laneurit, C Blanc, R Chapuis, IEEE, Columbus, in

*Intelligent Vehicles Symposium*. Multisensorial data fusion for global vehicle and obstacles absolute positioning, (2003), pp. 138–143.M Mcguire, KN Plataniotis, AN Venetsanopoulos, Data fusion of power and time measurements for mobile terminal location. IEEE Trans. Mob. Comput.

**4**(2), 142–153 (2005).HH Liu, YN Yang, in

*TENCON 2011 - 2011 IEEE Region 10 Conference*. WiFi-based indoor positioning for multi-floor environment (IEEECebu, 2012), pp. 597–601.IH Alshami, NA Ahmad, S Sahibuddin, in

*Malaysian Software Engineering Conference*. A light WLAN radio map for floor detection in multi-floor environment localization (IEEESeri Kembangan, 2015), pp. 135–139.X Wang, L Yang, L Wang, in

*IEEE International Conference on Mobile Ad-Hoc and Sensor Networks*. Improved AP clustering algorithm based on target segmentation (IEEEDalian, 2013), pp. 539–541.IR King, Density data and emission measure for a model of the coma cluster. Astrophys. J.

**174**(174), 123 (1972).K Zhao, B Li, A Dempster, in

*IEEE International Conference on Wireless Communication and Sensor Network*. A new approach of real time step length estimation for waist mounted PDR system (IEEEChangsha, 2015), pp. 400–406.Y Zhang, L Wu, Stock market prediction of S&P 500 via combination of improved BCO approach and BP neural network. Expert Syst. Appl.

**36**(5), 8849–8854 (2009).S Jia, Q Qiu, J Li, in

*IEEE International Conference on Information and Automation*. BP neural network based localization for a front-wheel drive and differential steering mobile robot (IEEELijiang, 2015), pp. 2270–2274.Y Yang, W Gao, X Zhang, Robust Kalman filtering with constraints: a case study for integrated navigation. J. Geodesy.

**84**(6), 373–381 (2010).S Zhao, S Chan, in

*IEEE International Symposium on Circuits and Systems*. A novel algorithm for mobile station location estimation with none line of sight error using robust least m-estimation (IEEESeattle, 2008), pp. 1176–1179.Y Kim, Y Hwang, S Choi, in

*IEEE/ACM International Conference on Advanced Intelligent Mechatronics*. Height estimation scheme of low-cost pedestrian dead-reckoning system using Kalman filter and walk condition estimation algorithm (IEEEWollongong, 2013), pp. 1492–1497.

## Acknowledgements

This work was supported in part by the Program for Changjiang Scholars and Innovative Research Team in University (IRT1299), Special Fund of Chongqing Key Laboratory (CSTC), Fundamental and Frontier Research Project of Chongqing (cstc2017jcyjAX0380, cstc2015jcyjBX0065, cstc2015jcyjBX0085), and University Outstanding Achievement Transformation Project of Chongqing (KJZH17117).

## Author information

### Authors and Affiliations

### Contributions

The authors have contributed jointly to all parts on the preparation of this manuscript, and all authors read and approved the final manuscript.

### Corresponding author

## Ethics declarations

### Competing interests

The authors declare that they have no competing interests.

### Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

**Open Access** This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

## About this article

### Cite this article

Zhou, M., Wang, B., Tian, Z. *et al.* Hardware and software design of BMW system for multi-floor localization.
*J Wireless Com Network* **2017, **139 (2017). https://doi.org/10.1186/s13638-017-0925-0

Received:

Accepted:

Published:

DOI: https://doi.org/10.1186/s13638-017-0925-0

### Keywords

- Multi-floor positioning
- Data fusion
- Robust M estimation
- BLE
- MEMS