Real time indoor localization integrating a model based...

12
Vol.:(0123456789) 1 3 J Ambient Intell Human Comput (2019) 10:1–12 DOI 10.1007/s12652-017-0579-0 ORIGINAL RESEARCH Real time indoor localization integrating a model based pedestrian dead reckoning on smartphone and BLE beacons Lucio Ciabattoni 1  · Gabriele Foresi 1  · Andrea Monteriù 1  · Lucia Pepa 1  · Daniele Proietti Pagnotta 1  · Luca Spalazzi 1  · Federica Verdini 1  Received: 3 February 2017 / Accepted: 9 September 2017 / Published online: 15 September 2017 © Springer-Verlag GmbH Germany 2017 the smartphone application is composed by three main real time threads: a model based step length estimation, head- ing determination and the fusion of beacon information to reset the position and the drift error of the PDR. In order to give soundness to our approach we firstly validated the step length smartphone app with a stereo-photogrammetric system. The whole proposed solution was then tested on fifteen healthy subjects. 1 Introduction A new era for indoor localization applications is dawn- ing thanks to mobile and wireless technologies, wearable devices and the ecosystem of connected objects (Ugolotti et al. 2013). From an engineering perspective, the problem of offering an accurate indoor positioning service attracted a growing number of researchers during the last years (Ficco 2014; Furey et al. 2013). In fact, while the Global Posi- tioning System solved the localization problem for outdoor environments, it cannot be useful inside buildings because of the large signal attenuations (Bhattacharya et al. 2015). An accurate indoor positioning service has the potential to trans- form the experience of people while navigating indoor in several application domains, which are related, for example, to emergency, security, tourism, sport, healthcare (Bennett et al. 2016), robotics, and automation (Choi and Lee 2010). An important challenge when developing indoor localiza- tion systems is matching the solution to the specific domain requirements in terms of both devices and performances. Among all areas, healthcare is one of the fastest growing industries in terms of digital technology usage. Increased acceptability and usability, ubiquitous accessibility to data, real time clinical outcomes, remote patient-to-physician experiences in tele-medicine and tele-rehabilitation are Abstract Mobile and pervasive computing enabled a new realm of possibilities into the indoor positioning domain. Although many candidate technologies have been proposed, no one can still adapt to every use case. A case centered design and the implementation of the solution within the specific domain is the current research trend. With the rise of Bluetooth Low Energy (BLE) Beacons, i.e., platforms used to interact digitally with the real world, more stand- ard positioning solutions are emerging in different contexts. However the reachable positioning accuracy with this tech- nology is still unacceptable for some real applications (e.g., in the healthcare sector or the emergency management). In this paper, an hybrid localization application coupling a real time model based Pedestrian Dead Reckoning (PDR) technique and the analysis of the Received Signal Strength Indicator (RSSI) of BLE beacons is proposed. In particular, * Lucio Ciabattoni [email protected] Gabriele Foresi [email protected] Andrea Monteriù [email protected] Lucia Pepa [email protected] Daniele Proietti Pagnotta [email protected] Luca Spalazzi [email protected] Federica Verdini [email protected] 1 Department of Information Engineering, Università Politecnica Delle Marche, Via Brecce Bianche 12, 60131 Ancona, Italy

Transcript of Real time indoor localization integrating a model based...

Page 1: Real time indoor localization integrating a model based ...static.tongtianta.site/paper_pdf/496b24c4-a89c-11e9-8a9a-00163e08… · of Bluetooth Low Energy (BLE) Beacons, i.e., platforms

Vol.:(0123456789)1 3

J Ambient Intell Human Comput (2019) 10:1–12 DOI 10.1007/s12652-017-0579-0

ORIGINAL RESEARCH

Real time indoor localization integrating a model based pedestrian dead reckoning on smartphone and BLE beacons

Lucio Ciabattoni1  · Gabriele Foresi1 · Andrea Monteriù1 · Lucia Pepa1 · Daniele Proietti Pagnotta1 · Luca Spalazzi1 · Federica Verdini1 

Received: 3 February 2017 / Accepted: 9 September 2017 / Published online: 15 September 2017 © Springer-Verlag GmbH Germany 2017

the smartphone application is composed by three main real time threads: a model based step length estimation, head-ing determination and the fusion of beacon information to reset the position and the drift error of the PDR. In order to give soundness to our approach we firstly validated the step length smartphone app with a stereo-photogrammetric system. The whole proposed solution was then tested on fifteen healthy subjects.

1 Introduction

A new era for indoor localization applications is dawn-ing thanks to mobile and wireless technologies, wearable devices and the ecosystem of connected objects (Ugolotti et al. 2013). From an engineering perspective, the problem of offering an accurate indoor positioning service attracted a growing number of researchers during the last years (Ficco 2014; Furey et al. 2013). In fact, while the Global Posi-tioning System solved the localization problem for outdoor environments, it cannot be useful inside buildings because of the large signal attenuations (Bhattacharya et al. 2015). An accurate indoor positioning service has the potential to trans-form the experience of people while navigating indoor in several application domains, which are related, for example, to emergency, security, tourism, sport, healthcare (Bennett et al. 2016), robotics, and automation (Choi and Lee 2010). An important challenge when developing indoor localiza-tion systems is matching the solution to the specific domain requirements in terms of both devices and performances.

Among all areas, healthcare is one of the fastest growing industries in terms of digital technology usage. Increased acceptability and usability, ubiquitous accessibility to data, real time clinical outcomes, remote patient-to-physician experiences in tele-medicine and tele-rehabilitation are

Abstract Mobile and pervasive computing enabled a new realm of possibilities into the indoor positioning domain. Although many candidate technologies have been proposed, no one can still adapt to every use case. A case centered design and the implementation of the solution within the specific domain is the current research trend. With the rise of Bluetooth Low Energy (BLE) Beacons, i.e., platforms used to interact digitally with the real world, more stand-ard positioning solutions are emerging in different contexts. However the reachable positioning accuracy with this tech-nology is still unacceptable for some real applications (e.g., in the healthcare sector or the emergency management). In this paper, an hybrid localization application coupling a real time model based Pedestrian Dead Reckoning (PDR) technique and the analysis of the Received Signal Strength Indicator (RSSI) of BLE beacons is proposed. In particular,

* Lucio Ciabattoni [email protected]

Gabriele Foresi [email protected]

Andrea Monteriù [email protected]

Lucia Pepa [email protected]

Daniele Proietti Pagnotta [email protected]

Luca Spalazzi [email protected]

Federica Verdini [email protected]

1 Department of Information Engineering, Università Politecnica Delle Marche, Via Brecce Bianche 12, 60131 Ancona, Italy

Page 2: Real time indoor localization integrating a model based ...static.tongtianta.site/paper_pdf/496b24c4-a89c-11e9-8a9a-00163e08… · of Bluetooth Low Energy (BLE) Beacons, i.e., platforms

2 L. Ciabattoni et al.

1 3

only some of the (r)evolutions coming in the latest years. In stark contrast to such possibilities, the technology itself is certainly easily accessible and cost-effective. In this sce-nario, one of the challenges still troubling researchers is the fusion of the information to offer reliable and precise indoor localization services. A revolutionary approach is certainly brought by the Physical Web paradigm, i.e., the process of presenting everyday objects on Internet through Bluetooth Low Energy (BLE) beacons and smartphones connectiv-ity. This technology is nowadays already installed in many healthcare facilities [e.g. the Sarasota Memorial Hospital (Sarasota Memorial Health Care System 2016), FL or the Carmel Medical Center (SPREO Indoor Location Solutions 2016) in Israel] to deliver personalized services, couponing solutions and, obviously, indoor localization and naviga-tion for visitors. Localization services can consequently be performed exploiting an existing infrastructure (Lin et al. 2015), without the need for additional and costly technol-ogy. However the beacons-only based approach has many drawbacks since it is strongly related on BLE performances and the precision may heavily drop due to fast fading and large received signal strength (RSS) fluctuations (Faragher and Harle 2014). Although the BLE beacons may be suitable to enable patients and visitors pathfinding without interrupt-ing hospital staff, a more reliable localization system with errors less than a meter may help in many other aspects. The first aspect may be the ability to precisely track patients to ensure their safety, particularly in the case of Alzheimer’s and dementia diseases. The second one is about tracking staff, to ensure that each patient is checked on a regular basis, to ensure that staff members follow sanitary policies (e.g. the use of hand-washing stations), to monitor accesses in restricted supply rooms or medicine cabinets and so on.

In the literature, the most popular techniques to carry out indoor localization can be divided into infrastructure based (e.g., proximity, triangulation, radio fingerprint) and infrastructure free [pedestrian dead-reckoning (PDR) (Harle 2013)].

The first approach require a network of nodes emit-ting and receiving signals like Wi-Fi, infrared, radio fre-quency, Bluetooth, ultrawideband, ultrasound, or audible sounds (Moutinho et al. 2016). The triangulation method exploits triangles properties to estimate the target loca-tion. Variables that can be used to triangulate the target position comprise RSS (Lee et al. 2009), time of arrival (Moutinho et al. 2016), angle of arrival, time difference of arrival (Jung et al. 2011), or a combination of them (Cheng et al. 2011). The radio fingerprint technique comprises an offline training phase where a number of reference points are selected in the target environment and a map of the signal property (e.g., the RSS) is created. The online posi-tioning phase consists in comparing the measured values with the fingerprint database, in order to find the nearest

sample. The fingerprinting approach can reach higher positioning reliability than triangulation or proximity, but it requires a huge amount of work in the training phase and the accuracy depends on the number of access points (emitting nodes) and reference points (sampling points). Furthermore, environmental changes (like humidity and temperature, closed or opened doors, people inside the building) can influence signal propagation, thus raising the necessity of a fingerprinting database recalibration.

In addition, any RSS-based method shows a perfor-mance degradation when estimating the location in Non Line Of Sight (NLOS) conditions. Finally, the PDR approach uses wearable inertial (accelerometers and gyro-scopes) and heading sensors (magnetometer or compass) to achieve a relative positioning (Torres-Solis and Chau 2010), i.e., with respect to an initial position, which is generally assumed to be known. The PDR method gained particular importance in the last years due to the wide diffusion of smartphones, which embed all the required sensors and offer the possibility of real-time processing (Harle 2013). The localization is reached through three main stages: step detection, step length estimation and heading estimation.

In this paper a model based hybrid real-time indoor localization system is proposed exploiting the complemen-tary characteristics of proximity and PDR approaches. In fact, RSS based approach provides an absolute localiza-tion, but its positioning accuracy depends on the num-ber of network nodes, and it is reduced by NLOS and the strong variation in signal propagation due to environmen-tal changes. On the other hand, the PDR method achieves higher accuracy in a short time, but it gives a relative posi-tioning and shows a progressive drift over time. Hence, we joined the PDR and RSS method in order to reach accuracy, absolute positioning and drift error reset. The hardware is composed of a smartphone and BLE beacons. The indoor localization approach presented in this work can be thus implemented without the need of a dedicated infrastructure and an algorithm training stage.

Given the strong dependence of the PDR approach from two important gait parameters (step detection and step length estimation), the reliability of the smartphone in this context is validated through a comparison with a stereo-photogrammetric system, which is considered a gold standard in gait analysis.

The paper is organized as follows: the works that are mostly related to this contribution are discussed in Sect. 2 and the main innovation with respect the literature highlighted; the developed indoor localization system is detailed in Sect. 3; Sect. 4 presents the experimental set up and the results, while the results are discussed in Sect. 5; finally, Sect. 6 highlights conclusions.

Page 3: Real time indoor localization integrating a model based ...static.tongtianta.site/paper_pdf/496b24c4-a89c-11e9-8a9a-00163e08… · of Bluetooth Low Energy (BLE) Beacons, i.e., platforms

3Real time indoor localization integrating a model based pedestrian dead reckoning on smartphone…

1 3

2 Related works

Several hybrid approaches were proposed in the literature with the aim of finding a good trade-off between the pros and cons of the indoor localization techniques introduced in the previous section. A great part of these contributions uses a smartphone as the hardware, and, for what concerns the soft-ware, a fusion of the PDR approach with other techniques, such as fingerprinting (Li et al. 2016), triangulation (Chen et al. 2015a, b), landmarks (Shang et al. 2015), or activity recognition (Hardegger et al. 2013). The works that fuse PDR and fingerprinting approaches rely on Wi-Fi (Jeon et al. 2014) or Zigbee signals (Ficco et al. 2015; Lee et al. 2011), and they try to overcome the main limitations of fingerprint method, i.e., the strong dependence on the environment and the time costly training procedure. Kim et al. (2013) tried to overcome the first problem by studying the RSS variance problem caused by the device (a smartphone) type and placement, user direction, and environmental changes. A simultaneous localization and mapping technique was recently investigated in order to bypass the problem of data-base creation and update (Faragher and Harle 2013), but it is strongly resource consuming due to the computational com-plexity of the algorithm. Alternative hybrid approaches in emergency first response scenarios without the use of a fixed global positioning infrastructure can be found in Widyawan et al. (2012), where authors use a backtracking particle fil-ter approach to fuse radio frequency (RF), ultrasound bea-cons and a PDR system or Palmieri et al. (2016), where the PDR and Zigbee based fingerprinting fusion is performed through a Kalman Filter. The PDR is computed through a foot mounted Inertial Measurement Unit (IMU) and the Zero Velocity Update algorithm is employed. For what concerns the systems fusing a smartphone based PDR with triangula-tion of RSS signal, they still need a calibration phase and a database, even if it requires less effort and memory costs (Zhuang et al. 2015a). One of the most used model of RSS signal propagation to estimate the distance between a node and the user is the weighted path loss model (Chen et al. 2015b). Recently, Zhuang et al. (2015b) proposed an algo-rithm that autonomously estimates access points location and propagation parameters of the weighted path loss model and that generates database by autonomous crowdsourcing. In Chen et al. (2015a), a sensor fusion framework combining WiFi, PDR and landmarks on a smartphone is proposed. In particular, the sensor fusion problem (and so the PDR algo-rithm) is designed in a linear perspective and a Kalman filter is applied. In order to avoid the calibration phase and the dependency on a Wi-Fi network, some researchers proposed the use of map information or landmarks to enhance posi-tioning accuracy (Shang et al. 2015; Wang et al. 2012). The key idea of this approach is that natural environment usually has some clearly identifiable signatures (such as elevators or

stairs) that can be used to recalibrate the position. However, some a priori map information about landmarks location needs to be known. The approaches that fuse PDR and activ-ity recognition can be considered an example of this idea (Chen et al. 2015b; Hardegger et al. 2013) particular actions, like going up or down stairs, standing still, laying, are asso-ciated with particular environmental landmarks. Particularly, in Hardegger et al. (2013), an approximate path of the user is estimated by a threshold based PDR algorithm performed on a smartphone. The path is then corrected through an activ-ity recognition (sitting or standing still) engine that repeat-edly occurs at specific locations. Other kinds of signal can also be used to triangulate user position, such as auditory sounds (Moutinho et al. 2016), but of course its applicability is limited to places with loudspeakers emitting sounds. From the literature analysis, it clearly emerges that an absolutely valid solution to the indoor localization problem does not yet exists. Every proposed approach has its own advantages and drawbacks and it is particularly suitable in a certain scenario. The original aspects of our work with respect to the related works can be summarized as follows. A model based algorithm is firstly adopted to find the location of foot contact time instants and to estimate step length. The PDR related works previously presented rely on threshold based step detection methods, acting as step counters, and the step length is estimated through empirical relationships, often requiring parameters calibration (Weinberg 2002). On the contrary, we enhance the whole PDR performances by real time computing the inverted pendulum model of human gait (Zijlstra and Hof 1997) (which has been validated through a stereo-photogrammetric system). Furthermore by leveraging on a model based PDR and using beacons as proximity sen-sors, there is no need for a model calibration. Our approach exploit the typical existing infrastructure of the Physical Web paradigm, i.e. a smartphone and BLE beacons. In other words, it means that for such buildings already equipped with beacons, no additional or dedicated hardware needs to be installed to test our method.

3 Materials and methods

A smartphone application was developed in order to fuse the information brought by embedded inertial sensors and beacons for real-time generation of user trajectory.

The PDR positioning technique is composed of three main phases: step detection, step length estimation and head-ing estimation. Bi-axial acceleration along the anteroposte-rior and vertical walking directions was used for step detec-tion and step length estimation. A sensor fusion between accelerometer and gyroscope readings was performed in order to estimate user heading. The proposed PDR algorithm

Page 4: Real time indoor localization integrating a model based ...static.tongtianta.site/paper_pdf/496b24c4-a89c-11e9-8a9a-00163e08… · of Bluetooth Low Energy (BLE) Beacons, i.e., platforms

4 L. Ciabattoni et al.

1 3

generated the user trajectory by associating a vector to each step. The step vector is defined as follows:

– Application point: the end of the previous step vector or the starting point.

– Module: the value of step length.– Direction: direction variation observed during the step

cycle with respect to a reference orientation (starting ori-entation or via-beacons calibrated orientation).

– Versus: forward progression.

Before starting the whole procedure, the acceleration signal is detrended by removing the continuous component.

When the user walks near a beacon, the smartphone appli-cation receive the RSS indicator, thus reaching an absolute positioning inside the floor map, and a reset of the possible drift error. In the next subsections, the atomic stages of the proposed algorithm are described in details and, finally, the implementation of the overall algorithm in a smartphone application is presented.

3.1 Step detection

The step detection phase is aimed at identifying each user step, or, in other words, at carrying out the function of a step counter. The proposed method performed step detec-tion by identifying the heel strike, which is the time instant when the foot hits the ground. In this way, apart from step detection, an estimation of a step cycle start and end points can be achieved. In this time interval, the step length and the amount of direction variation were computed, in order to define the step vector. The heel strike time instants were identified according to the method proposed by Zijlstra and Hof (2003), which requires the de-trended acceleration win-dow to be sent in input to two low pass filters. The first filter is a fourth order, zero lag, Butterworth filter with cut off frequency of 20 Hz, and it is designed in order to remove high frequency noise, while preserving all the relevant infor-mation on human gait. The second filter is a fourth order, zero lag, Butterworth filter with cut off frequency of 2 Hz, introduced to extract the fundamental harmonic of gait of the antero-posterior acceleration. Zero crossings from posi-tive to negative are found on the 2 Hz filtered antero-poste-rior acceleration. For each identified zero crossing, the last antero-posterior peak in the 20 Hz filtered signal is selected as a heel strike.

In details, a threshold (0.5 m/s2) is applied on the height of the maximum–minimum jump corresponding to each zero crossing. If the height of the jump is above this threshold, a step is detected; otherwise another condition must be veri-fied. In particular, if the mean over the last 0.4 s of verti-cal acceleration before the zero crossing is over a second

threshold (0.2 m/s2) then a step is detected; otherwise the zero crossing is discharged as a false positive.

3.2 Step length estimation

Once heel strike time instants are known, the estimation process of the step length can start. Adopting the hypoth-esis of zero vertical velocity at the heel strike, a value for the vertical change of body center of mass can be found by double integrating the 20 Hz filtered vertical acceleration between two consecutive heel strikes. Finally, by applying the inverted pendulum model of Zijlstra and Hof (1997), which was improved by Gonzalez et al. (2007), an estimation of step length can be obtained:

In the above equation, K is a correction factor, l is the length of user’s leg, h is the vertical change of body center of mass during a step, and f if the foot length. The literature suggests a value of 0.83 for K, which represents a deviation of the real biomechanics of human gait from the theoretical inverted pendulum model (e.g., due to the hip rotation).

3.3 Heading estimation

The estimate of the user heading was based on smartphone attitude, assuming the smartphone axes are kept bounded to the actual axes of user movement. A smartphone internal algorithm fuses accelerometer and gyroscope readings in order to refine the raw data and generate information about device attitude. Then, attitude data can be taken through three mathematical representations: quaternions, rotation matrix, Euler angles. The quaternion representation was chosen, in order to avoid the gimbal lock problem. The rela-tionship between quaternions and Euler angle can be used to obtain the roll angle:

where qy, qz, and qw, are the vector components, and qx is the scalar part.

3.4 Beacon

BLE beacons (Estimote 2016) were used to reset the PDR positioning error drift. The acquisition of beacons RSS was performed at 10 Hz sample frequency. According to the Physical Web protocol, each beacon broadcasts a frame encoding the following information to the smartphone: the beacon identifier, RSSI value, an URL to discover the specific web content and, depending on the beacon manu-facturer, distance, proximity, the accuracy associated with

(1)sl = 2

√2lh − h2 + Kf

(2)�roll = arctan

[2(qxqy + qzqw

), 1 − 2

(q2y+ q2

z

)]

Page 5: Real time indoor localization integrating a model based ...static.tongtianta.site/paper_pdf/496b24c4-a89c-11e9-8a9a-00163e08… · of Bluetooth Low Energy (BLE) Beacons, i.e., platforms

5Real time indoor localization integrating a model based pedestrian dead reckoning on smartphone…

1 3

these estimations and optional built in sensor values. Two rules were empirically found and adopted to assess when the user is walking in front of a beacon: (1) the accuracy value (if available) must be different from −1 (the standard value meaning that a beacon is not identifiable); (2) the RSSI value must be greater than −60.0 dBm for 1 s of acquisitions (i.e. the average value computed for a 1 s window). The threshold was empirically defined after gathering more than 10 hours of data from ten different beacons (Estimote 2016) in differ-ent LOS and non LOS conditions (e.g., in presence of walls and furniture). Such a value roughly means that a person is certainly detected whenever her/his distance is less or equal than 2 m with respect the beacon.

3.5 Position and heading reset

In order to reset the PDR position and orientation error drift, we consider a state-machine-like general method. As shown in Fig. 1, beacon thresholds are chosen in order to define circular detecting areas of 2 m radius. Eight possible reset positions are considered within each area.

In order to reset the position, the information about the relative positioning of two consecutive beacons is exploited. In particular, if beacons i − 1 and i are detected in sequence, three reset points adjacent to the i − 1 detecting area are considered, as shown in Fig. 2. The candidate reset point is chosen in order to minimize the Euclidean distance from the last estimated position. Each candidate reset point is then associated with up to three directions determined by consid-ering cardinal and intercardinal directions deriving from the relative positioning of the two beacons. Once the reset posi-tion is determined, the reset direction is selected minimizing the difference between the last measured heading angle and those associated to that point.

Particular configurations can be considered in order to enhance reset precision. As an example, a beacon, placed in

a corridor or a small room, can be marked as “corridor bea-con”. This leads to a reduction of the potential reset direc-tions (e.g., North/South or East/West) as well as the candi-date reset positions (e.g. N/S or E/W points in the detection area).

3.6 Smartphone implementation

In order to reach a reliable positioning, the smartphone should be placed at users hip. In fact, this placement is a suitable approximation of body center of mass, thus allow-ing the inverted pendulum model usage (Pepa et al. 2017).

Figure 3 shows the component diagram of the applica-tion, which will be explained in the following. Successful management of CPU resources is the major issue to face when dealing with real time application on mobile devices. For this reason, our application uses two threads: the main thread, which performs only sensors reading, and a parallel thread, which is responsible for all the other functions. Sam-ple frequency is an essential parameter for signal processing and this software architecture ensures a reliable acquisition at a constant frequency without any loss of data.

Fig. 1 Boxplot of the BLE bea-cons RSSI vs distance function in LOS and non LOS (NLOS) conditions

0.5 1 1.5 2 2.5 3 3.5 4 4.5 5Distance [m]

-85

-80

-75

-70

-65

-60

-55

-50

RS

SI [

dB]

LOSnon LOSthreshold

i-1 i

NEE

SE

W E

S

N

Fig. 2 Position and heading reset scenario when beacon i is east positioned with respect to beacon i − 1

Page 6: Real time indoor localization integrating a model based ...static.tongtianta.site/paper_pdf/496b24c4-a89c-11e9-8a9a-00163e08… · of Bluetooth Low Energy (BLE) Beacons, i.e., platforms

6 L. Ciabattoni et al.

1 3

The application retrieves kinematic data (acceleration and attitude, which is in turn obtained by a fusion of acceleration and angular rate) at 50 Hz, and beacons data at 10 Hz. Kine-matic data include: anteroposterior (x), vertical (y) accelera-tion, and quaternion components. They are stored in a vector and every 2.25 s the entire vector is passed to the parallel thread for online processing. Each time window of 2.25 s is adjacent to the previous one, without overlapping. The first processing phase in a time window is heel strike detec-tion, according to the explained method (Sect. 3.1). Once the application has found heel strikes, step length estimation can be obtained applying the inverted pendulum model (Eq. 1).

For what concerns heading, the smartphone allows to express its own attitude, with respect to a fixed reference frame. Hence, after the user start walking, the first detected step is used to define the orientation, i.e. the fixed refer-ence frame with respect to which quaternions attitude data are read. In details, it was defined in the following way: the y-axis is vertical (gravity direction) and points upward, the x-axis lies in the orthogonal plane, its direction is taken as the mean orientation assumed by the smartphone x-axis during the mid swing (ten samples centered between the first two heel strikes), and it points forward. In fact, pelvis orientation does not always correspond to the progression direction during the step cycle, because of the natural pelvis rotation. The phase during which the pelvis is aligned with progression direction correspond to the mid swing, exactly at half of the step cycle (Inman 1966).

Once defined the fixed reference frame, the following procedure is applied to reach user heading. In each time window, quaternions readings are converted into roll angles (by using Eq. 2). The difference between the mean roll angle

in the window and the heading of the last step (or of the first step, if it is the first walking window) is computed to evaluate the presence of a curve. If this difference is under a threshold, the application considers a straight trajectory and the same heading (mean roll angle in the window) is associ-ated to all the steps in the window. Otherwise, two heading angles are computed: the mean roll angle in the first and second half of the window which are, respectively, associ-ated to the first and second half of the steps detected in the window. Each couple (step length, heading) defines the step vector in polar coordinates. The couples are sent via wireless to a base station (e.g., a server) for real time generation of user trajectory. A linear interpolation joins the x − y points defined by the step vectors. Whenever the RSSI readings from the beacons produce a positive outcome, according to the method exposed in Subsect. 3.4 (i.e., the user is in prox-imity of a beacon), the beacon identifier and the timestamp are saved and sent to the server, thus allowing the correct positioning of beacon reference inside the flux of step vec-tors. In this way, the position can be reset and an absolute positioning can be achieved, with the a priori knowledge about beacons position. In fact, before meeting the first bea-con, the application starts to draw a relative path and it is not able to locate the path on the map. Beacons relative position is used to compute a customized correction factor K and to reset possible drifts of the fixed reference attitude.

4 Experimental results

In order to achieve a reliable real time system for indoor positioning, two testing stages were planned. During the first phase, tests assessed the smartphone reliability in step detection and step length estimation. The second one aimed to evaluate the performances of the overall system in real-time indoor positioning in two scenarios: a straight corridor and a lobby.

4.1 Smartphone reliability for gait analysis

The performance of the application in step detection and step length estimation was evaluated by comparison with a stereo-photogrammetric system composed of six infrared cameras, which acquire the position of reflective markers at 100 Hz sample frequency. Five healthy subjects took part in the tests, which consists of nine walking trials: three at their preferred speed, three at a lower speed and three at a higher speed. Velocity ranges resulted to be: 0.87–1.19 m/s for low velocity, 1.18–1.64 m/s for normal velocity, 1.58–2.26 m/s for high velocity. During each trial, the subject walked forth and back along a straight platform (about 10 m) inside the visual field of infrared cameras. Step length values were estimated in real time by

Fig. 3 Component diagram of the smartphone app

Page 7: Real time indoor localization integrating a model based ...static.tongtianta.site/paper_pdf/496b24c4-a89c-11e9-8a9a-00163e08… · of Bluetooth Low Energy (BLE) Beacons, i.e., platforms

7Real time indoor localization integrating a model based pedestrian dead reckoning on smartphone…

1 3

assigning the standard value of 0.83–K. For each trial, the step detection sensitivity and the step length estimation error were evaluated. The step detection sensitivity was obtained as the number of steps detected by the smart-phone over the number of steps actually performed by the subject in that trial. The estimation error was computed as follows:

where slg is the mean value of step length measured with the gold standard (stereo-photogrammetric system) dur-ing that trial and sls is the mean value of the step lengths obtained with the smartphone in the same trial. The adopted evaluation metrics (step detection sensitivity and step length estimation error) were assessed separately for each velocity range, thus obtaining 15 values (5 subjects times 3 trials) for each pace. Median, 25th, and 75th percentile were chosen as statistical parameter to describe the evaluation metrics. Also minimum and maximum values were reported to have a comprehensive overview.

Step detection sensitivity results are reported in Table 1, where median value was 100% for all velocities; in the interquartile range, the sensitivity was 100% for low and high velocity, while it varied from 92.7 to 100% for normal velocity. The minimum sensitivity was observed at medium velocity (81.8%), the maximum sensitivity is 100% for all velocities. For what concerns the step length estimation error, detailed numerical values for median, interquartile range, minimum, and maximum of the step length estima-tion error are reported in Table 2. The median and inter-quartile range values are: 2.35% (1.42; 7.61)%, 1.98% (1.29; 6.46)%, and 2.32% (1.17; 6.97)% for low, normal, and high velocity, respectively. The minimum error is under 1% for all velocities, while the worst performance was obtained for high velocity (13.63%).

(3)e =‖slg − sls‖

slg×100%

4.2 Indoor localization architecture performances

After ascertaining the smartphone reliability in estimat-ing the fundamental parameters of gait, the performance of the overall indoor localization system, was evaluated on 15 healthy subjects performing three trials for each of the two scenarios considered.

4.2.1 Straight corridor scenario

Each subject had to perform three repetitions of a close path, showed in Fig. 4, at their preferred speed. The path is 124 m long and it includes eight 90° turns and three turns of about 45°. The true trajectory was marked on the floor in order to guide the subject’s path thus having a ground truth. Beacons were distributed along the path (black dots in Fig. 4) with a density of 0.017 unit/m2.

The performance of the system in indoor localization was evaluated by computing the Euclidean distance and the orientation deviation (as absolute value) for each point of the estimated trajectory with respect to the true trajec-tory. Median and interquartile range were used as statistical indicators of the overall positioning performance on each trial, since the error populations (Euclidean distance and orientation deviation) did not belong to a normal probabil-ity distribution. However, root mean square error (RMSE) and standard deviation, accuracy and precision [computed as in Palmieri et al. (2016)] were also reported since they are widely used in the literature.

Across the 45 trials, the indoor positioning system reached a distance error of 0.13 m [(0.05–0.44) m] and an orientation error of 2.8° [(1.0–8.6)°] [median (interquartile range)]. The graphic outcome of smartphone and beacons positioning for three trials is shown in Fig. 4. In particu-lar dots, circles and squares, represents trials correspond-ing to the first, second, and third quartile respectively, the dashed line marked the true trajectory and the bold dots indicate beacons placement. To measure the robustness of our method against missing beacons (e.g., due to low battery, system failure and so on), we evaluated the indoor localization performances on the 45 trials considering two scenarios: (1) six combinations with five operative beacons, thus excluding one by one the beacons (simulating that 17% of the beacons were faulty) (2) 15 combinations with four operative beacons, excluding two beacons at a time (simu-lating that 33% of the beacons were faulty). Numerical and graphical comparisons of localization performance using the three beacons configurations (6, 5, or 4 beacons) are reported in Table 3 and Fig. 5 respectively.

The distance error increase to 0.26 m [(0.08–0.6) m] for the 5-beacons configuration and to 0.3 m [(0.11–0.82) m] for the 4-beacons configuration (median (interquartile range)). The orientation error reached 3.4◦ ((1.2–9.9)◦) and 4.2◦

Table 1 Step detection sensitivity (%)

Velocity Median 25th 75th Min Max

Low 100 100 100 84.4 100Normal 100 92.7 100 81.8 100High 100 100 100 88.5 100

Table 2 Step length estimation error (%)

Velocity Median 25th 75th Min Max

Low 2.35 1.42 7.61 0.39 8.83Normal 1.98 1.29 6.46 0.23 11.03High 2.32 1.17 6.97 0.15 13.63

Page 8: Real time indoor localization integrating a model based ...static.tongtianta.site/paper_pdf/496b24c4-a89c-11e9-8a9a-00163e08… · of Bluetooth Low Energy (BLE) Beacons, i.e., platforms

8 L. Ciabattoni et al.

1 3

((1.4–11.7)◦) excluding 17 and 33% of the beacons configu-rations respectively. Figure 5 shows the cumulative probabil-ity distribution of the distance error in the three considered configurations: the reference one (blue one) reached an error under 1 m with a probability of 90%, the 17 and 33% faulty

beacons configurations gave an error under 1.2 and 1.7 m, respectively, with a probability of 90%.

4.2.2 Multi path scenario

In this scenario a 100 m path through a corridor, two rooms and a 14 × 16m2 lobby has been tested using ten beacons (the density is 0.043 unit/m2). The performance of the system was evaluated by using the same metrics as before and is reported in Table 4. Figure 6 depicts the cumulative prob-ability distribution of the distance error in the three consid-ered configurations (considering every error of all the trials). The system reached a distance error of 0.18 m ((0.1–0.55)m) and an orientation error of 3.7◦ [(2.1–9.4)°] [median (interquartile range)] for the 6-beacons configuration. The distance error increase to 0.58 m [(0.21–0.83) m] when 17% of beacons (i.e., two beacons) are faulty and to 0.65 m [(0.33–0.92) m] when 33% of beacons (i.e., three beacons)

OFFICE OFFICE OFFICE

OFFICE

OFFICE OFFICE OFFICE OFFICE OFFICE

OFFICE

OFFICE

OFFICE OFFICE

OFFICE

OFFICE

OFFICE

OFFICE

OFFICE

OFFICE

OFFICE

OFFICE

OFFICEOFFICEOFFICE

LABORATORY

LABORATORY

ATORY

LABORATORY

OFFICE

OFFICE

1.5 m

Fig. 4 Corridor scenario. Median, first and third quartile experimental path execution by enrolled subjects

Table 3 Positioning error in the corridor scenario

Index Beacon working %

100 83 67

Median (m) .13 .26 .3IQR (m) .05–.44 .08–.6 .11–.82RMSE (m) .6 .81 1.15STD (m) .46 .61 .86Accuracy (m) .63 .47 .37Precision (.7 m) (%) 84 80 72Precision (1.5 m) (%) 96 94 87

Page 9: Real time indoor localization integrating a model based ...static.tongtianta.site/paper_pdf/496b24c4-a89c-11e9-8a9a-00163e08… · of Bluetooth Low Energy (BLE) Beacons, i.e., platforms

9Real time indoor localization integrating a model based pedestrian dead reckoning on smartphone…

1 3

are faulty [median (interquartile range)]. The orientation error reached 5.2◦ [(2.8–10.7)°] and 6.8◦ [(3.2–12.5)°] for the 17 and 33% faulty beacons configurations respectively. The graphic outcome of the positioning system for three trials is shown in Figs. 7 and 8 which represent two consecu-tive parts of the same experimental scenario. In particular dots, circles and squares, represents trials corresponding to the first, second, and third quartile respectively, the dashed

line marked the true trajectory and the triangles indicate beacons placement.

5 Discussion

The first experimental phase aimed to assess the smart-phone reliability in step detection and step length estimation against a stereo-photogrammetric system. Obtained results suggest the feasibility of a smartphone based PDR. In fact, the smartphone app detected almost all the performed steps (sensitivity median 100% for all the velocities, interquartile range 0% for low and high velocity, and 7.3% for normal velocity) and achieved a median error of 2% in step length estimation. Gait speed does not seem to have important effects on the app performance. This accuracy is acceptable if compared with previous works in the literature (Hsu et al. 2014; Lee et al. 2013; Gonzalez et al. 2007), which carried out step length estimation through dedicated inertial sensors.

During indoor localization tests, the proposed architec-ture has been validated in different scenarios: a corridor and

Fig. 5 Corridor scenario. x − y positioning error cumulative probability in three experimen-tal scenarios: considering all the beacons (continuous line), excluding 17% of the beacons (dashed line), and finally excluding 33% of the beacons (dotted line)

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5Error [m]

0

0.2

0.4

0.6

0.8

1

Cum

ulat

ive

prob

abili

ty [%

]100% beacon working83% beacon working67% beacon working

Table 4 Positioning error in the multi path scenario

Index Beacon working %

100 83 67

Median (m) .18 .58 .65IQR (m) .1−.55 .21−.83 .33−.92RMSE (m) .98 1.12 1.55STD (m) .57 .81 .98Accuracy (m) .58 .34 .29Precision (.7 m) (%) 79 69 62Precision (1.5 m) (%) 91 83 76

Fig. 6 Multi path scenario. x − y positioning error cumula-tive probability in three experi-mental scenarios: considering all the beacons (continuous line), excluding 17% of the bea-cons (dashed line), and finally excluding 33% of the beacons (dotted line)

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5Error [m]

0

0.2

0.4

0.6

0.8

1

Cum

ulat

ive

prob

abili

ty [%

]

100% beacon working83% beacon working67% beacon working

Page 10: Real time indoor localization integrating a model based ...static.tongtianta.site/paper_pdf/496b24c4-a89c-11e9-8a9a-00163e08… · of Bluetooth Low Energy (BLE) Beacons, i.e., platforms

10 L. Ciabattoni et al.

1 3

a complex path. In particular in the first experimental sce-nario the positioning error was 0.13 (0.05–0.44) m [median (interquartile range)] and a precision (at 1.5 m) of 96%. Fur-thermore, the availability of less beacons did not produce a high deterioration of performance. In the second scenario the system reached a distance error of 0.18 m [(0.1–0.55) m] and a precision (at 1.5 m) of 87%. Furthermore we tested the localization system performance by excluding 17 to 33% of the beacons in both scenarios. A precision degradation of 2–9 and 8–15% was found in the corridor and in the multi path scenarios respectively. Results indicate a grow-ing importance of the beacons number with the increase of the path complexity, thus suggesting the addition of more devices in such contexts.

Obtained results prove the reliability of the system if compared with previous works in the literature (Li et al. 2016; Chen et al. 2015b; Kim et al. 2013; Faragher and Harle 2013) and suggest the potential of the proposed architecture for application in real life conditions. In fact, the wide dif-fusion of smartphones is already documented (Franko and Tirrell 2012), the physical web is a new paradigm, but it is characterized by high capacity of penetration and integration into existing environments (museum, hospitals, etc.). As a consequence, the combination of a smartphone application with physical web can be considered a low cost, usable and acceptable solution for indoor localization. Apart from the popularity of adopted technologies, the usability of the solu-tion is enhanced by the absence of complex and demanding calibration phases, which makes the architecture suitable for healthcare applications, where both clinicians and patients usually lack of technical expertise.

6 Conclusion

In this work an hybrid real time indoor localization archi-tecture was proposed. The hardware infrastructure is com-posed by a smartphone and BLE Beacons. The developed positioning algorithm fuses the first model based real time PDR and proximity BLE beacons and it does not require any training or calibration phase. The adoption of a heel strike detection technique to carry out step detection and the use of the inverted pendulum model to estimate step length on smartphone have been validated through a stereo-photo-grammetric system (a gold standard in gait analysis). The idea behind this choice was that an accurate estimation of two important spatio-temporal parameters of gait (heel strike and step length) would have enhanced PDR performance, thus allowing the achievement of good performances with a very low computational cost. This hypothesis was confirmed by the results obtained during the 30 experimental trials.

Fig. 7 Complex path sce-nario a corridor and rooms. Median, first and third quartile experimental path execution by enrolled subjects

OFFICE

OFFICE

OFFICE

LABORATORY

1.5 m

LABORATORY

1.5 m

Fig. 8 Complex path scenario b lobby. Median, first and third quar-tile experimental path execution by enrolled subjects

Page 11: Real time indoor localization integrating a model based ...static.tongtianta.site/paper_pdf/496b24c4-a89c-11e9-8a9a-00163e08… · of Bluetooth Low Energy (BLE) Beacons, i.e., platforms

11Real time indoor localization integrating a model based pedestrian dead reckoning on smartphone…

1 3

The infrastructure free approach (for those buildings already provided by BLE beacons, e.g. many healthcare facilities or retail buildings) presented in the paper can thus be employed for those applications requiring positioning and trajectory errors less than 0.5 m. The need of a fixed position for the smartphone may be a limitation for the applicability and novel processing methods (as well as different models of human gait) would be investigated to avoid constraints in smartphone placement.

References

Bennett TR, Wu J, Kehtarnavaz N, Jafari R (2016) Inertial measure-ment unit-based wearable computers for assisted living applica-tions: a signal processing perspective. IEEE Signal Process Mag 33(2):28–35

Bhattacharya T, Kulik L, Bailey J (2015) Automatically recognizing places of interest from unreliable GPS data using spatio-temporal density estimation and line intersections. Pervasive Mob Comput 19:86–107

Chen Z, Zhu Q, Jiang H, Soh YC (2015a) Indoor localization using smartphone sensors and ibeacons. In: Industrial electronics and applications (ICIEA), 2015 IEEE 10th conference, Auckland, 15–17 June 2015, pp 1723–1728

Chen Z, Zou H, Jiang H, Zhu Q, Soh YC, Xie L (2015b) Fusion of WiFi, smartphone sensors and landmarks using the Kalman filter for indoor localization. Sensors 15(1):715

Cheng L, Wu CD, Zhang YZ (2011) Indoor robot localization based on wireless sensor networks. IEEE Trans Consum Electron 57(3):1099–1104

Choi BS, Lee JJ (2010) Sensor network based localization algorithm using fusion sensor-agent for indoor service robot. IEEE Trans Consum Electr 56(3):1457–1465

Estimote (2016) BLE beacons. http://estimote.com/. Accessed 15 June 2017

Faragher R, Harle R (2013) Smartslam—an efficient smartphone indoor positioning system exploiting machine learning and oppor-tunistic sensing. In: Proceedings of the 26th international techni-cal meeting of the satellite division of the Institute of Navigation (ION GNSS), Nashville, TN, 16–20 Sept 2013, pp 1006–1019

Faragher R, Harle R (2014) An analysis of the accuracy of bluetooth low energy for indoor positioning applications. In: 27th interna-tional technical meeting of the satellite division of the Institute of Navigation, ION GNSS 2014, Tampa, FL, 8–12 Sept 2014, pp 201–210

Ficco M (2014) Calibration-less indoor location systems based on wire-less sensors. J Ambient Intell Humaniz Comput 5(2):249–261

Ficco M, Palmieri F, Castiglione A (2015) Supporting first responders localization during crisis management. In: 2015 9th international conference on innovative mobile and internet services in ubiqui-tous computing, Blumenau, 8–10 July 2015, pp 147–152

Franko O, Tirrell T (2012) Smartphone app use among medical provid-ers in ACGME training programs. J Med Syst 36(5):3135–3139

Furey E, Curran K, Mc Kevitt P (2013) Probabilistic indoor human movement modeling to aid first responders. J Ambient Intell Humaniz Comput 4(5):559–569

Gonzalez R, Alvarez D, Lopez A, Alvarez J (2007) Modified pendulum model for mean step length estimation. In: Engineering in Medi-cine and Biology Society (EMBS), 2007 29th annual international conference of the IEEE, Lyon, 22–26 Aug 2007, pp 1371–1374

Hardegger M, Mazilu S, Caraci D, Hess F, Roggen D, Tröster G (2013) Actionslam on a smartphone: at-home tracking with a

fully wearable system. In: Indoor positioning and indoor naviga-tion (IPIN), 2013 international conference, Montbeliard-Belfort, 28–31 Oct 2013, pp 1–8

Harle R (2013) A survey of indoor inertial positioning systems for pedestrians. IEEE Commun Surv Tutor 15(3):1281–1293

Hsu HH, Peng WJ, Shih T, Pai TW, Man KL (2014) Smartphone indoor localization with accelerometer and gyroscope. In: Network-based information systems (NBiS), 2014 17th inter-national conference, pp 465–469

Inman VT (1966) Human locomotion. Can Med Assoc J 94(20):1047–1054

Jeon S, Lee J, Hong H, Shin S, Lee H (2014) Indoor WPS/PDR performance enhancement using map matching algorithm with mobile phone. In: 2014 IEEE/ION position, location and navi-gation symposium—PLANS 2014, Monterey, CA, 5–8 May 2014, pp 385–392

Jung SY, Hann S, Park CS (2011) TDOA-based optical wireless indoor localization using LED ceiling lamps. IEEE Trans Con-sum Electr 57(4):1592–1597

Kim Y, Shin H, Chon Y, Cha H (2013) Smartphone-based Wi-Fi tracking system exploiting the RSS peak to overcome the RSS variance problem. Pervasive Mob Comput 9(3):406–420

Lee H, Lee S, Kim Y, Chong H (2009) Grouping multi-duolateration localization using partial space information for indoor wireless sensor networks. IEEE Trans Consum Electr 55(4):1950–1958

Lee JH, Shin B, Kim C, Kim J, Lee S, Lee T (2013) Real time adap-tive step length estimation for smartphone user. In: Control, automation and systems (ICCAS), 2013 13th international con-ference, pp 382–385

Lee S, Kim B, Kim H, Ha R, Cha H (2011) Inertial sensor based indoor pedestrian localization with minimum 802.15.4a con-figuration. IEEE Trans Ind Inf 7(3):455–466

Li X, Wang J, Liu C, Zhang L, Li Z (2016) Integrated WiFi/PDR/smartphone using an adaptive system noise extended Kalman filter algorithm for indoor localization. ISPRS Int J Geo-Inf 5(2):8

Lin XY, Ho TW, Fang CC, Yen ZS, Yang BJ, Lai F (2015) A mobile indoor positioning system based on ibeacon technology. In: 2015 37th annual international conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Milan, 25–29 Aug 2015, pp 4970–4973

Moutinho J, Araújo R, Freitas D (2016) Indoor localization with audi-ble sound—towards practical implementation. Pervasive Mob Comput 29:1–16

Palmieri F, Ficco M, Pardi S, Castiglione A (2016) A cloud-based architecture for emergency management and first responders localization in smart city environments. Comput Electr Eng 56:810–830

Pepa L, Verdini F, Spalazzi L (2017) Gait parameter and event estima-tion using smartphones. Gait Posture 57:217–223

Sarasota Memorial Health Care System (2016) SMH app. http://www.smh.com/smhapp. Accessed 15 June 2017

Shang J, Gu F, Hu X, Kealy A (2015) Apfiloc: an infrastructure-free indoor localization method fusing smartphone inertial sensors, landmarks and map information. Sensors 15(10):27251

SPREO Indoor Location Solutions (2016) Carmel Medical Center, Clalit Health Services: you have reached your destination. http://spreo.co/press/carmel-hospital-clalit-health-services/. Accessed 15 June 2017

Torres-Solis J, Chau T (2010) Wearable indoor pedestrian dead reckon-ing system. Pervasive Mob Comput 6(3):351–361

Ugolotti R, Sassi F, Mordonini M, Cagnoni S (2013) Multi-sensor sys-tem for detection and classification of human activities. J Ambient Intell Humaniz Comput 4(1):27–41

Wang H, Sen S, Elgohary A, Farid M, Youssef M, Choudhury RR (2012) No need to war-drive: unsupervised indoor localization.

Page 12: Real time indoor localization integrating a model based ...static.tongtianta.site/paper_pdf/496b24c4-a89c-11e9-8a9a-00163e08… · of Bluetooth Low Energy (BLE) Beacons, i.e., platforms

12 L. Ciabattoni et al.

1 3

In: Proceedings of the 10th international conference on mobile systems, applications, and services, ACM, New York, pp 197–210

Weinberg H (2002) Using the adxl202 in pedometer and personal nav-igation applications. Analog Devices AN-602 application note 2(2):1–6

Widyawan Pirkl G, Munaretto D, Fischer C, An C, Lukowicz P, Klepal M, Timm-Giel A, Widmer J, Pesch D, Gellersen H (2012) Virtual lifeline: multimodal sensor data fusion for robust navigation in unknown environments. Pervasive Mob Comput 8(3):388–401

Zhuang Y, Lan H, Li Y, El-Sheimy N (2015a) Pdr/ins/wifi integra-tion based on handheld devices for indoor pedestrian navigation. Micromachines 6(6):793

Zhuang Y, Syed Z, Georgy J, El-Sheimy N (2015b) Autonomous smart-phone-based wifi positioning system by using access points locali-zation and crowdsourcing. Pervasive Mob Comput 18:118–136

Zijlstra W, Hof A (1997) Displacement of the pelvis during human walking: experimental data and model predictions. Gait Posture 6(3):249–262

Zijlstra W, Hof A (2003) Assessment of spatio-temporal gait param-eters from trunk accelerations during human walking. Gait Posture 18(2):1–10