Measuring the Uncertainty of Probabilistic Maps Representing Human Motion for Indoor Navigation

Indoor navigation and mapping have recently become an important field of interest for researchers because global navigation satellite systems (GNSS) are very often unavailable inside buildings. FootSLAM, a SLAM (Simultaneous Localization andMapping) algorithm for pedestrians based on step measurements, addresses the indoor mapping and positioning problem and can provide accurate positioning in many structured indoor environments. In this paper, we investigate how to compare FootSLAM maps via two entropymetrics. Since collaborative FootSLAM requires the alignment and combination of several individual FootSLAMmaps, we also investigate measures that help to align maps that partially overlap. We distinguish between the map entropy conditioned on the sequence of pedestrian’s poses, which is a measure of the uncertainty of the estimated map, and the entropy rate of the pedestrian’s steps conditioned on the history of poses and conditioned on the estimated map. Because FootSLAMmaps are built on a hexagon grid, the entropy and relative entropy metrics are derived for the special case of hexagonal transition maps. The entropy gives us a new insight on the performance of FootSLAM’s map estimation process.


Introduction
Over the last few years professional and consumer location based applications have grown supported by digital cartography and GNSS (Global Navigation Satellite System), where real-time location estimation is combined with accurate maps.Motivated by the success of outdoor navigation the demand for indoor or underground navigation has increased.However, in indoors GNSS is often unavailable [1].
Different techniques address the particular challenges in indoor navigation.An overview of existing techniques is given in [2] and more recently in [3].One approach is to install additional transmitters (GNSS Pseudolites) or receivers (e.g., RFIDs (Radio Frequency Identification), UWBs (Ultra Wide Band transmitters)).Another possibility is to use existing radio base stations originally installed for other purposes (such as UMTS or WLAN) or to enhance the quality of the GNSS signals (high sensitivity receivers and/or assisted GNSS services).The main drawback of these techniques is that new infrastructure needs to be installed and maintained to achieve high positioning accuracy.Another promising approach that deals with the problems of indoor navigation is the use of foot mounted inertial sensors [4] or other suitable forms of pedestrian dead reckoning (PDR) with alternate sensor placements or including additional sensors like cameras or magnetic field sensors [5].In this case, no extra infrastructure is needed and the sensors can usually be implemented at low cost.In this paper, we will focus on positioning estimation for pedestrians based purely on PDR.
Foot mounted inertial measurement units (IMUs) can be used very effectively with the supply of zero velocity updates (ZUPTs) to a PDR estimation algorithm [4], reducing the nonlinear error growth over time to a reasonably small linear drift.The drift experienced by all PDR approaches can be addressed by using available floor plans to constrain the estimate [6][7][8].However, maps of indoor scenarios may be only partially available, completely unavailable, outdated, or proprietary.To address the problem of unknown maps, the principle of Simultaneous Localization and Mapping (SLAM) using PDR can be called into play [9,10].SLAM estimates the location and a suitable presentation of the environment conditioned on a sequence of noisy measurements.

Mobile Information Systems
In this paper, we focus on FootSLAM [11] to estimate useful maps of probabilistic human motion (in the following referred to as probabilistic maps).FootSLAM is a form of SLAM for pedestrians.Rooted in a Bayesian estimation formulation, FootSLAM allows for the generation of a rich map for the visited areas, in our case a probabilistic transition map built on a hexagon raster, while simultaneously making accurate estimates of the pedestrian's pose, her position and orientation, within the map.FootSLAM builds on a Rao-Blackwellized particle filter (RBPF) [12] based on the FastSLAM factorization [13] to process human odometry, that is, human step measurements obtained, for example, with an IMU located on the pedestrian's shoe or in the pocket [14].These odometry measurements are computed by an unscented Kalman Filter [15][16][17] using the raw IMU data and are then used as input to the FootSLAM particle filter.Each particle in the particle filter [18] randomly draws odometry errors and effectively represents one hypothesis for the path followed by the pedestrian.Those particles that revisit similar transitions are rewarded and are more likely to represent the actual path that the pedestrian followed.More precisely, each particle learns the FootSLAM map by counting each transition it makes across the edges of the hexagons and stores its whole path through the hexagonal grid.
The FootSLAM probabilistic transition maps are uncertain because they are estimated from human odometry.A suitable metric of the uncertainty of transition maps has not yet been addressed but having one would be useful for performance evaluation, theoretical analysis, map comparison, map combination, and map selection.Map combination and selection are, for instance, needed by the so-called "Turbo" FeetSLAM algorithm [19] whereby several maps resulting from several datasets are processed and combined in an iterative way to obtain a more accurate and extensive map of an environment.
The paper is organized as follows: First, we will discuss the term uncertainty and give an overview of different uncertainty metrics related to the probabilistic map.After that, we will give an overview of the related work (Section 1.2).In Section 2, we will describe FootSLAM's Bayesian formulation and how the map is generated during the FootSLAM estimation process.Next, Section 3 will introduce the representation of the pedestrian's history of poses as a random walk on a weighted graph, and Section 4 presents the derivation of the entropy and relative entropy metrics.Finally, we will show experimental results and outline the main conclusions.

Uncertainty.
In the context of localization we can find different map definitions (Figure 1).For instance, we can differentiate between roadmaps, floor plans, topological maps, or images like satellite images, and so forth.We can calculate the entropy of any of these maps to obtain a measure of the information content of that map.However, the nature of the maps estimated by a SLAM algorithm is completely different.If we use human odometry and process it using FootSLAM, we obtain a human motion map that is inherently a probabilistic representation of human motion.This map is uncertain because it is being estimated from odometry, which in turn is also uncertain due to uncertainty in the sensor measurements.Our goal is to derive a metric that reflects the uncertainty of a map.
The term uncertainty has different definitions, depending on the context.In this article, we discuss how to measure the uncertainty of probabilistic maps.In our analysis of maps based on human odometry we distinguish between the following: (a) The inherent uncertainty at the human motion level: This uncertainty represents the pedestrian's choice about his next steps.Naturally, it is very difficult if not impossible to model and characterize this process accurately.For instance, intentions will vary from person to person, be time variant, and will encompass at least the history of poses of that person.
(b) The uncertainty of the map itself: Since we estimate transitions given a set of observations, maps are uncertain.For instance, main corridors and some areas of a building such as conference rooms are visited more often than other rooms; likewise, public buildings such as airports or shopping centers are more frequently visited than residential buildings.Therefore, the number of observations is dependent on the location.Other sources of uncertainty at the map level are, for example, the fact that measurements are usually collected by means of inaccurate sensors and the nature of the discrete map representation itself.
We propose to compute the uncertainty of a map via two information theoretic metrics: the entropy of a map and the relative entropy between two maps.The random variable M will refer to the map, the discrete stochastic process Z to the Table 1: Different kinds of entropy metrics.We distinguish between map entropy and step entropy rate given the sequence of measurements Z 1: , the sequence of poses P 0: , or the map M.

Map entropy
Step step measurements, and the discrete stochastic process P to the pedestrian poses.We append 0 :  to the stochastic process variable if we refer to the sequence of that variable until time index  and 0 :  − 1 if we refer to the past history of that variable.
Following [20] we define differential entropy as the entropy of a continuous random variable, simply shortened by entropy and denoted by ℏ.In the case of a discrete stochastic process, such as the sequence of pedestrian poses P 0: , we define entropy rate as the rate of growth of its entropy and denote it by .
We are interested in two different kinds of entropies: (i) a measure of the uncertainty of the map M itself, which can serve as a metric for the goodness of the map; (ii) the entropy rate of the pedestrian's steps.This second metric gives us insight regarding the uncertainty of the next pedestrian's step, which is influenced by the interplay between the constraints of the environment and the pedestrian's choice of movement therein.
Each of the two kinds of entropies mentioned above can be computed conditioned on the following: (i) the sequence (or accordingly history) of noisy measurements Z 1: =  1: , where  1: is a given measurement sequence; (ii) the sequence (or accordingly history) of poses P 0: =  0: , where  0: is the output of a genie; (iii) the true map M =  (also from a perfect genie).Here, the genie is an entity that knows the true sequence of poses or the true map.Note that pose sequences start at time  = 0 due to initialization, whereas the measurements start at time  = 1 [11].An overview of the different kinds of entropies is given in Table 1.
The entropy ℏ(M | Z 1: =  1: ) and the corresponding entropy rate (P  | Z 1:−1 =  1:−1 ) represent the uncertainty of the map and the step conditioned on the noisy measurements, respectively.Following the dynamic Bayesian network representation of FootSLAM [21] the state Z  is a noisy measurement of the true step vector U  , influenced by the error state E  and additional white noise.
The entropies ℏ(M | P 0: =  0: ) and (P  | P 0:−1 =  0:−1 ) aim for the uncertainty of the map and the pedestrian's next step, respectively, conditioned on the sequence of poses given by a genie.In our subsequent numerical evaluations we cannot resort to a genie; hence we shall assume that FootSLAM achieves good convergence and we can therefore approximate the output of the genie using our FootSLAM estimated sequence of poses.If perfect convergence is achieved, that is, the estimated FootSLAM map leads to same discrete transitions in the map, then we are able to determine the map entropy ℏ(M | P 0: =  0: ) and the step entropy rate (P  | P 0:−1 =  0:−1 ).In the following sections we refer to the entropies conditioned on the estimated sequence of poses, assuming sufficiently good convergence.
The entropies conditioned on the true map (last row of Table 1) are metrics that we are not able to calculate since we do not know the map itself because it is being estimated from finite and not necessarily representative walks.The true map itself, also an output of a genie, can be considered as a result of an infinitely long and representative pose sequence:  0:∞ .The map entropy given the true map will obviously result in no remaining uncertainty.The step entropy rate given the true map (P  | M = ) is the remaining uncertainty of the next step of the pedestrian that is only influenced by the pedestrian's free choice within the perfectly known physical constraints and other physical features of the environment like obstacles and signs.In addition, it is to be expected that such influencing factors are dependent on the individual and the state of the individual and her context (such as travel plans).In this paper, we shall quantify the uncertainty based on a very simple and time-invariant model of human motion, namely, a first-order Markov process that encodes the probability of anybody's next steps at a particular location in the environment.Since we have no observation of the physical environment, we shall rely on the human pose sequence as the only state that we can use to encode the environment's influence on motion.This is to say, an infinitely long sequence of representative poses is as informative about the person's next step as the perfect map.
Hence the step entropy rate will be assumed to be constant over time and the step entropy rate given the genie history of poses (P  | P 0:−1 =  0:−1 ) approaches asymptotically this constant for  → ∞: (1) 1.2.Related Work.Following Bjørke [22], Shannon's information theory inspired several research articles in cartography for quantifying the efficiency of a map.Bjørke described in his article the problems of the pure Shannon theory applied to cartography.In his article he gives a comprehensive overview of the related work before 1996.He distinguishes between the syntactic, semantic, and pragmatic aspects of communication originally defined in [23] and also given in [24] as level A, level B, and level C, respectively.In his work, he focuses on applying the Shannon information theory to the syntactic component of a map and defines the terms map entities and map information source.He distinguishes between topological entropy, metrical entropy, and positional entropy.In addition he pointed out that one way to deal with spatial correlation within the map is the computation of the weighted mean of the entropy at different orders of neighborhood.
In our work we concentrate on the Shannon theory applied to the syntactic component of our FootSLAM probabilistic maps (built on a hexagon grid) as Bjørke did.In addition, we restrict our problem to calculating the positional entropy.Per definition of the positional entropy, all occurrences of the map entities are seen as unique events and spatial correlations are not considered.Our work differs from Bjørke's in that we address the problems of calculating the entropy and relative entropy for the special case of FootSLAM transition maps based on hexagons to quickly compare and align maps.
Another approach to evaluate maps that uses the properties of the entropy is the so-called local entropy map [25].Guo proposes a nonparametric analysis approach that detects spatially varying multivariate relationships based on the Rényi entropy in local regions of the geographic space.The multivariate Rényi entropy [26] is the generalization of Shannons' entropy, originally introduced by Shannon in 1948 [27], and is computed over a -dimensional data space.The concept of an entropy map was already used in robotics in 2008 [28], where the optical flow estimates of different images of an object (e.g., visual landmarks) are analyzed with a Bayesian analysis and the resulting conditional probability distributions (belief distributions) are compressed by computing the Shannon entropy that provides a measure of ambiguity for the belief distribution [28].The authors generate a database for different objects and store it's entropy maps, in this case the information relating ambiguity to camera (viewing position).
In [29] Blanco et al. address the uncertainty of maps obtained using a mobile robot SLAM algorithm with RBPFs.The problem is similar to ours, but in contrast to a hexagon based map, the map is based on an occupancy grid, whereby the region is divided into cells (squares) and the binary probability of occupancy/freeness of that cell is stored.Blanco et al. propose to calculate the entropy-based information  = ∑ , ( max −  , ) for all cells ,  of a map to eliminate the influence of the cells not discovered by the robot.In their article, they give also an overview of the related work regarding measuring the uncertainty of the robot pose and/or the map.The map mean information is compared to the joint entropy of the map and the robot path proposed by [30] and it is shown that in the case of the joint entropy defined by Stachniss et al. the map entropy dominates so that the path entropy is hidden.In addition, in [30] the entropy of the individual maps is calculated, whereas Blanco et al. propose to use the expected map, a weighted average of all particle's maps of the RBPF, what we have called accumulated map, in order to measure also the consistency of the individual maps.
The predictability of human motion is intensively studied in [31] and more recently in [32].Based on the mobility patterns of mobile phone users Song et al. showed that human motion is highly predictable [31].Here, a combination of the empirically determined user entropy and Fano's inequality is used to evaluate predictability.However, topological constraints are not considered in their evaluation.Smith et al. refine these limits by considering in addition topological constraints like unreachable areas.They provide a lower upper bound for the predictability of human motion and use the "Geolife dataset" for their evaluation (182 individual GPS trajectories over a period of five years).
None of these references handles the problem of measuring the quality of probabilistic maps as used in FootSLAM.More specifically, FootSLAM maps are built on a hexagonal grid.Maps based on hexagons are widely used, for example, in game programming (Charles S. Roberts 1961, [33]) for regulating movement or in mobile communications to divide a geographic area in cells (cellular network), but in such cases it is not necessary to compare the hexagon maps with one another.Also the maps do not encode probabilistic motion.Our work differs from the work above in the following points: (i) FootSLAM probabilistic transition maps are built on a hexagon grid, where hexagon edge transitions are counted and stored, encoding transition probabilities.(ii) The pedestrian's trajectory on the hexagonal grid can be viewed as a random walk on a weighted graph.It is possible to compute the entropy rate of the pedestrian's steps on a FootSLAM hexagon map.The theory of a random walk on a finite network was introduced by Doyle and Snell in [34] further described by Lovász [35].More information can be found in [20].(iii) We also take into account the number of visits to each hexagonal cell.

Preliminary on FootSLAM Map Representation
2.1.FootSLAM Bayesian Formulation.Following the dynamic Bayesian network representation of [11] for FootSLAM, the person's step measurements Z  1: , what we call odometry, are processed by a RBPF to compute his steps U 0: by estimating the (correlated) errors E 0: that distort the measurements.The estimated steps are then used to infer the pedestrian's sequence of poses P 0: within the time-invariant map M, by adding each step vector to the previous estimated pose.
FootSLAM's goal is to estimate the joint posterior ({PUE} 0: , M | Z  1: ) [11].In order to compute it, FootSLAMs RBPF factorizes it into where the first term corresponds to the map estimation problem and the second term corresponds to the localization problem.In this paper, we focus on the mapping term, since we aim to obtain a metric to measure the quality of the maps.

Hexagon Transition Probabilities.
FootSLAM uses a regular discretization of the 2D space to map the pedestrian's steps.The environment is divided into a set H of  ℎ uniform adjacent hexagons: H = {ℎ 0 , ℎ 1 , . . ., ℎ  , . . ., ℎ  ℎ −1 }.This partitioning allows for using a first-order Markov process model for the pedestrian's motion: each next step of the pedestrian is drawn from a location dependent probability distribution that only depends on his current position (i.e., a person with no memory).We believe that the probabilities of the directions of a person's next step are approximately independent of the past when using hexagons of radius 0.25 m to 1 m.This is because we are interested in capturing attributes of the physical environment and this does not depend on individual step lengths.The influence on human motion of features like walls, doors, and furniture is roughly on this order of scale.Smaller grids would mean that the transition probabilities of neighboring cells become more correlated (transitions would then be over counted) and larger grids would be unable to capture local features very well and would result in less predictive maps.
Note that for convenience we will change the notation used in our original FootSLAM paper [11] and use the indices  and  to refer to the hexagons in the grid and the index  to refer to the particles and eliminate the explicit use of the variable  for the edges in the formulas.
For each one of the hexagons in the grid ℎ  , let   →  refer to the index of any of the six neighboring hexagons of ℎ  .Two hexagons ℎ  and ℎ  are neighbors if they are connected through one edge.Let   refer to the edge of hexagon ℎ  that connects it to hexagon ℎ  and   the edge of ℎ  that connects it to ℎ  (Figure 2).
The random variable M denoting the map is unknown to us.We can only estimate the probability of the map conditioned on the sequence of pedestrian's poses P 0: , that is, (M | P 0: ).Thanks to our hexagon discretization, the map random variable M can be decomposed as follows: where ⃗ M  is a random variable vector of length 6 denoting the transition probabilities of the hexagon with index .With this, the map estimation problem becomes Here, we have assumed that the map factors into conditionally independent components.At each hexagonal cell, ⃗ M  = {M   ℎ  } = {M  } ∀  →  represents the set of six transition probabilities across the six edges of the hexagon ℎ  : Note that the notation P  = ℎ  means that the pose P  lies in hexagon ℎ  .As a result, M  is the probability associated with the step taken at time  that makes the pedestrian move from pose P −1 in ℎ  to pose P  in neighboring hexagon ℎ  by crossing edge   (Figure 2).In addition we can state that ∑  → M  = 1 ∀.

Learning the Transition Map.
In FootSLAM, following the FastSLAM factorization [13] where ⃗ M  is the map of particle , and    is the number of times the particle  crossed edge   of hexagon ℎ  .In FootSLAM we set   =   because it is assumed that it is equally likely to cross any edge in either direction.
The particle maps can be compressed in the form of an accumulated posterior map.The accumulated posterior map is calculated using the weighted sum of all   particles maps: with where   is the particle's weight in the particle filter learnt during the FootSLAM estimation process.The particle's accumulated maps can be used to estimate the distribution of the true (but unknown) edge crossing probabilities affected by human motion in the map M. As proposed in [29] we focus on the entropy of the accumulated map in order to measure the consistency of the individual particle maps.
Learning the map is based on Bayesian learning of multinomial distributions using Dirichlet priors [36].More specifically, we assume that ( ⃗ M  | P 0:−1 ) follows a Dirichlet distribution.The Dirichlet distribution of the random variable ( ⃗ M  | P 0:−1 ) is the multivariate extension of the beta distribution.In contrast to our previous work, where we assumed that (M  | P 0:−1 ) follows a beta distribution, here Mobile Information Systems we assume that ( ⃗ M  | P 0:−1 ) follows a Dirichlet distribution.This can be done because both distributions result in the same transition probabilities.The Dirichlet distribution is usually parametrized by a vector ⃗   of  positive real numbers: with The distribution can be written as where is the beta function and is the gamma function, and with digamma function In our case, at each hexagon ℎ  we have  = 6 events (crossing one of the six edges) with probabilities ⃗ M  = {M  } ∀  → .Each one of these events has been observed   − 1 times.The Dirichlet distribution represents the belief that the probabilities of the  events are M  .
We can use this assumption to compute the probability of next step by marginalizing over the map [11]: where we have made use of the fact that the pose of the pedestrian at time step  is conditionally independent on the history of poses up to  − 2 conditioned on the map.If P   lies in ℎ  and P  −1 lies in ℎ  then the above equation results in Using the fact that (P   | P  −1 , ⃗ M  ) = M  and that ( ⃗ M  | P  0:−1 ) follows a Dirichlet distribution with parameters  →   , we obtain: where   is the number of transitions across edge   of hexagon ℎ  in the map of the particle  computed up to step  and   = ∑  →   .The terms   and   = ∑  →   represent the a priori virtual counts regarding the transition counts across the edges of hexagon ℎ  for particle .When no other prior information is available,   has been chosen to be   = 0.8 ∀{, , }; that is, a uniform prior distribution, with respect to the edges, is assumed.The value 0.8 was chosen empirically from several experiments to be the best value for the prior distribution with respect to FootSLAM's convergence behavior.

Pedestrian's History of Poses as a Random Walk on a Weighted Graph
In the following we describe how we can map the history of poses onto a weighted graph to apply the theory of a random walk on a weighted graph.This is a prerequisite for our entropy and entropy rate calculations that are described in Section 4. Consider now the stochastic process of the history of pedestrian poses P 0:−1 .This sequence of random variables is stationary, given that the distribution of the sequence (P 0:−1 ) is time-invariant; that is, we can shift the history of poses by any shift , P :−1+ and the joint distribution remains the same.Furthermore, at time step , the random variable P  depends only on the previous one P −1 and is conditionally independent of all the other previous random variables P 0:−2 ; that is, (P  | P 0:−1 ) = (P  | P −1 ).This kind of process is called a Markov chain of order one [20].
If P 0:−1 is a Markov chain P, then P −1 is the state at time  − 1.In our case the set of states corresponds to the pedestrian being located at any of the hexagons of the set H = {ℎ 0 , ℎ 1 , . . ., ℎ  , . . ., ℎ  ℎ −1 }.In the same way the pedestrian can start his walk in any of the hexagons and move from one hexagon to the next and the associated Markov chain can start in any of the states and can move successively from one state to the next (Figure 3).Each one of these moves is called step or transition.
In addition, since the probability (P  = ℎ  | P −1 = ℎ  ) does not depend on , the Markov chain is time-invariant.Thus, the chain can be defined by the initial distribution ⃗  0 = (P 0 ) and the so-called transition matrix ⃗ .The transition matrix represents all possible transitions from any hexagon (state) in the hexagonal grid (Markov chain) to any other hexagon (state).The transition matrix for our transition map is therefore a  ℎ ×  ℎ matrix: ) .
Clearly, each row of the transition matrix will consist of six elements unequal to zero at the connecting hexagons and zeros for the remaining elements.Note that we assume that, with every step the pedestrian takes, he is located at a different hexagon; that is,   = 0. Furthermore, any Markov transition matrix has to fulfill the condition FootSLAM maps consist of a set of visited hexagons with their corresponding edge transition counters (6).However, the pedestrian can leave the mapped area with a positive probability (thanks to the  term in ( 18)), making our transition map virtually infinite.Nevertheless, we can assume that the transition map lies on a globe (Figure 4) so that the associated Markov chain is finite.Proceeding like this, the following properties hold: (i) The grid of hexagons has no borders but yet is finite; that is, the Markov chain is finite.Furthermore, we can study the subset of states of the Markov chain corresponding to the hexagons that the pedestrian visited (in dark grey in Figures 4 and 3).(ii) The Markov chain represented by the grid of hexagons is irreducible (also called ergodic): it is possible to reach any hexagon from any other hexagon in a finite number of steps.(iii) The Markov chain is aperiodic; that is, the states do not return to the starting position with a certain period.(iv) The Markov chain is recurrent; that is, with a probability of one it is possible to return to a hexagon within finite time.
For any irreducible and aperiodic Markov chain with transition matrix ⃗ , there exists a unique stationary distribution ⃗  = {  } ∀ℎ  ∈ H that is independent from the initial distribution ⃗  0 of the chain and that satisfies [20,37] The sequence of pedestrian poses conditioned on the map actually falls into the Markov chain category of random walk (poses) on a weighted graph or network (map) [20,38].A network is defined as an undirected graph  with a set of vertices (nodes) corresponding to the states and a set of links that connect the nodes.Each link is associated with a nonnegative weight   =   , usually called conductance in electric networks.It is easy to verify that in FootSLAM these conductances can be defined as   =   +  =   for any pair of neighboring hexagons, since   =   (it is equally likely to cross edges   and   ) and   = 0.8 ∀, .
The random walk P 0:−1 =  0:−1 corresponds to a sequence of hexagons (nodes in the graph).At each time step  − 1 with P −1 = ℎ  , the next connecting hexagon P  = ℎ  is chosen according to a probability proportional to the weights   .Thus, we can define the transition probabilities as follows [20,38]: where   = ∑    .Such a process is called a random walk on the weighted graph  with edge weights {  } [38].If we define with   = ∑ ∈H   and   = ∑ ∈H   , and such a Markov chain has the additional property that it is reversible with respect to the probability ⃗ ; that is, As a result, ⃗  represents the unique stationary distribution for the reversible Markov chain [37].
Our goal in this paper is to derive a metric to compare the goodness characteristics of different FootSLAM transition maps.For this purpose, we now introduce the concepts of map entropy, step entropy rate, relative map entropy, and relative step entropy rate within the context of FootSLAM.Note that in the following we will omit the indices  or cum since all the equations apply for both a particle's transition map and the accumulated map.

Map Entropy Conditioned on the Sequence of Poses.
In this section we address the computation of the uncertainty of the map M conditioned on the sequence of poses P 0: =  0: , which can be calculated as the average of the hexagon entropies: given that the discretization into a grid of hexagons renders the local maps ⃗ M  independent of each other (4).Here,  0: refers to the output of a genie that we approximate with our FootSLAM estimated sequence of poses assuming convergence of the FootSLAM algorithm.The entropy ℏ((M | P 0: =  0: )) takes into account how many times a transition of the map is measured and how certain a learned transition is.In the following for convenience we abbreviate the condition P 0: =  0: with  0: .
The entropy measures the uncertainty of a random variable as the average amount of information needed to describe it [20].To compute the entropy of ( ⃗ M  |  0: ) we rely on the assumption that ( ⃗ M  |  0: ) follows a Dirichlet distribution, which is a continuous distribution.We now introduce the formula for the entropy of a continuous random variable x, usually called differential entropy, which is [20] ℏ If the logarithm has 2 as base, then the entropy is expressed in bits.In this paper, we will use the unit bits.Note that the range of the entropy defined in this manner is (−∞, 0] bits.The lower the entropy value, the lower the uncertainty about the random variable.
In our case (x) = ( ⃗ As a result, the differential entropy has the following closed form [39]: with the same beta, gamma, and digamma functions definitions as in Section 2.3.The maximum entropy of the total map (obtained by inserting ( 28) in ( 26)) occurs for   +   = 1 ∀  →  and has a value of ℏ( ⃗ M  |  0:−1 ) = −4.79bits.

Entropy Rate of the Pedestrian's
Steps.Consider now the Markov chain P of the sequence of pedestrian poses P 0: =  0: on one estimate M of the map.The appropriate question to address is the rate of growth of its entropy with .
The entropy rate of a stationary stochastic process In the case of our stationary Markov chain P with stationary distribution ⃗  and transition matrix ⃗ , the entropy rate is reduced to [20] with By inserting ( 22) and ( 24) in (31) we obtain The entropy rate of the sequence of pedestrian poses provides us with the stationary growing rate of the step entropy, that is, the uncertainty regarding each next step.The maximum entropy occurs with an equally probable Markov chain (  = 1/ ℎ ∀ s.t.ℎ  ∈ H) with uniform transition probabilities (  = 1/6 ∀  → ) and has a value of (P) = 2.584 bits.

Relative Map Entropy Conditioned on the Sequence of Poses.
The relative entropy (or Kullback-Leibler (KL) divergence),  KL ( ‖ ), provides a metric of the difference between two probability density functions (x) and (x) of the same random variable x.The KL divergence is a measure of the inefficiency when (x) is used as an approximation of the true distribution (x) [20].To describe (x) with the approximating distribution (x) we will need ℏ ( (x)) +  KL ( (x) ‖  (x)) bits, (33) instead of ℏ((x)) bits.With this definition  KL is always greater than 0 and 0 if and only if (x) = (x).
The relative entropy between two distributions  and  of a continuous random variable x is defined as [20] In our case, we have two sequences of pedestrian poses P Similarly to the derivation of the map entropy conditioned on the sequence of poses in Section 4.1.1,to compute the map relative entropy we rely on the assumption that the local maps at each hexagon are independent of each other, thus yielding where with the same functions definitions as in Section 2.3.
This equation for the relative entropy provides us with the difference between two distributions of the same map and therefore can be used on a hexagon basis to detect similarities.

Relative Entropy Rate of the
where ⃗   = {   },  ∈ P is the unique stationary distribution of ⃗ .
In our case, let   0:−1 and   0:−1 be two different histories of pedestrian poses, each one corresponding to the Markov chains P and Q with transition matrices ⃗  and ⃗ , respectively, and each one generating one instance of the map, M  and M  .With these assumptions, the following equation holds: where H M  is the set of hexagons of map M  .Inserting ( 22) and ( 24) in (39) we finally obtain , (40) where the superindices  and  indicate that the counters belong to map M  and map M  , respectively.

Experiment Settings
5.1.1.General Settings.Two pedestrians have collected a total of 6 datasets { 1 , . . .,  6 } within the same office environment (depicted in Figure 5).In these datasets, the pedestrians walked 8, 6.2, 5.5, 5.3, 13.7, and 25.7 minutes, respectively, wearing a foot mounted IMU (XSens MTx).The distances walked were 406, 326, 257, 310, 750, and 978 meters, respectively.The data were preprocessed by a ZUPT aided unscented Kalman Filter [17] and then used as input for the FootSLAM algorithm, which was executed offline.In our experiment, the radius of the hexagons was  = 0.5 m and the number of particles used in the RBPF was   = 10 000.The resulting posterior maps are denoted as { 1 , . . .,  6 }.It should be noted that the main contribution of this paper is the analysis of FootSLAM maps regardless of the underlying x (m) Figure 6: Total overlapping map built from a combination of FootSLAM results of  1 - 6 .The accumulated posterior maps of  1 - 6 can be seen in Figure 8.
accuracy of the odometry, as long as convergence can be attained.As has been shown in [14] FootSLAM works also, for example, with pedestrian odometry generated from a sensor carried in a pocket.
Having introduced the general settings, we will next describe the problems that arise when comparing maps that cover different areas using the entropy as a metric.After that we will provide a discussion about the advantages/disadvantages of the differential entropy versus the entropy rate.In the following, let map size refer to the number of hexagons  ℎ visited by the pedestrian, which can be directly related to the area covered by the walk.

Dependence of the Entropy with the Size of the Map.
The map entropy of (26) and step entropy rate of (30) depend on the size of the map.If we wish to compare a set of   maps M = { 1 , . . .,    }, we need to make sure that they cover the same area.We can achieve this by adding to each map the the hexagons visited by other maps that are not included in that map (with their transition counters set to zero, but keeping the  terms).For instance, Figure 6 shows the map area covered by 6 maps  1 - 6 (depicted in Figure 8).All visited hexagons of all maps are combined in a total map with   ℎ hexagons.

Differential Entropy versus Entropy
Rate.The advantage of using the differential map entropy is that it reflects better the total number of visits per hexagon, as we shall show.Maps corresponding to walks that revisit areas more often will result in lower entropy.To illustrate that, we have applied different map strengthening factors to map  6 and computed  its differential entropy (Figure 7).The objective of the map strengthening factor is to increase (or decrease) the belief of the map by multiplying the transition counters with the map strengthening factor.Figure 7 shows that the differential entropy decreases linearly with the logarithm of the map strengthening factor despite the fact that we only increased the total counters of each hexagon and did not change the relationship of the edge transition probabilities.

Map Entropy and
Step Entropy Rate.We are interested in obtaining the uncertainty of each one of the maps.We can do this by computing, for each map, the map entropy and the step entropy rate conditioned on the poses, respectively.Figure 8 shows visual presentations of the resulting posterior maps of our 6 datasets.The starting position of the pedestrian is shown as a red hexagon.The corresponding map entropy and the step entropy rate values of the maps  1 to  6 are shown in the text boxes of Figure 8.We have computed, for each map, the entropy of all hexagons depicted in Figure 6.
We could also use a bounding box around all maps, but the differences between the entropy values will be smaller due to the added hexagons with maximum entropy. 6 shows the lowest map entropy and step entropy rate.The results of  6 are closely followed by  5 , and  3 presents the highest entropy, reflecting the uncertainty over the large unvisited areas.This corresponds to visual inspection of Figure 8: map  6 is the most extensive and accurate and  3 the least.The distinction between the map entropy and the step entropy rate is reflected in the range of values; for example, the difference between maps  3 and  6 is 0.31 and 0.11 for the map entropy and the step entropy rate, respectively.These 6 maps do not differ very much in the number of transition   entropies would be more prominent if, for example, one walk had revisited some areas much more often than the others.We have illustrated the behavior of the differential entropy (Figure 9) and the entropy rate (Figure 10) over time Relative entropy (bits) Figure 13: Relative entropy between two maps  6 and  5 translated along the -axis.The maps were already aligned before shifting  5 .The peak is more steep along the -axis than along the -axis due to the building structure and the direction of the shift.
Finally, Figure 14 shows the KL divergence between  5 rotated a the starting hexagon (in red) and  6 unchanged.The minimum is reached when the two maps are aligned ( 5 unchanged), but we can see that towards the rotation value of  radians there is a local minimum due to the symmetries in the building that make the left side of the corridor fall onto the right side of the corridor and vice versa.These results suggest that we can use the KL divergence between two maps to find the best geometric transformation that places the two maps within the same coordinate system as an alternative for the Bayesian correlation function proposed in [19].Similar results but with smaller differences can be obtained with the relative entropy rate of the pedestrian's step (40).Relative entropy (bits) Figure 14: Relative entropy between two maps  6 and  5 , where  5 is rotated about its starting position.The peak down to a minimum at 0 shift shows the best fit of the two maps.One can see that towards the rotation value of  radians there is a local minimum due to the symmetries of the building.

Conclusion
In this article, we have derived different metrics for map comparison and map alignment.FootSLAM maps are probabilistic representations of human motion that can be explored by information theory.For map comparison we affiliated the map entropy as well as the step entropy rate for the special case of FootSLAM probabilistic maps.The first one is a measure of uncertainty of a map and takes into account the number of times a region is (re)visited.The second one represents the growth in uncertainty with each new step.We have shown that both metrics are suitable for map comparison, where the range of the first one is larger than the second.They are also useful for the collaborative and iterative FeetSLAM algorithm, where comparing the available maps can help to decide in which order to combine them.With these metrics the complexity of the FeetSLAM algorithm can be lowered in order to allow online map merging.In addition to the entropy metrics we have derived the relative map entropy and the relative step entropy rate for map alignment.It has been shown that these metrics are very helpful to find the best geometric transformation between two maps.
In our work, we have concentrated on the calculation of the entropy of FootSLAM maps to obtain a measure of the quality of the map, where no failure rate (e.g., crossing a wall, room failures) is considered.To reflect the failure rate within a map our idea is to take ground truth points or other suitable arrangements for each room and parts of the corridors and to measure the position error in terms of room fitting which is foreseen for future work.In addition, maps of another structure like different sizes of hexagons, other raster formats, or 3-dimensional maps, and so forth, are under investigation.Finally, future work also comprises the extension of the entropy calculation including spatial relationships between hexagons.

Figure 2 :
Figure 2: A pedestrian takes a step U  in order to move from pose P −1 in ℎ  to pose P  in neighboring hexagon ℎ  by crossing edge   .

Figure 3 :
Figure 3: Undirected graph (b) associated with the FootSLAM transition map (a).Each visited hexagon (in gray) is related to a state in the graph.The outer hexagons around the visited ones are drawn with a dashed line and represented by the state ℎ out .The edges crossed by the pedestrian are marked in blue and represented in the graph by blue links.The pedestrian can move from one state (hexagon) to another with a conductance of   , as shown next to each link.

Figure 4 :
Figure 4: Globe representation of a FootSLAM map obtained in an office environment.The hexagons visited by the pedestrian are marked in darker colors.

Furthermore, we assume
that   and   follow each a Dirichlet distribution with parameters  →   = {  } = {   +    } and  → V  = {V  } = {   +    }, respectively.Then resolving (34) for a Dirichlet distribution we obtain [40]  KL ( ‖ ) = ∑ Pedestrian's  Step.The KL divergence rate between two stationary Markov chains P and Q of two different sequences P of the stochastic process P 0: with transition matrices ⃗  and ⃗ , respectively, can be computed as[38]  KL (P ‖ Q)

Figure 5 :
Figure 5: The floor plan of the second floor of the office building, where the walks were conducted.

Figure 7 :
Figure 7: Differential map entropy conditioned on the sequence of poses (28) of map  6 for different map strengthening factors.For a map strengthening factor greater than 100, the differential entropy decreases linearly with the logarithm of the strengthening factor.

Figure 8 :Figure 9 :
Figure 8: Accumulated posterior map of  1 - 6 .The starting position is marked in red and is well known.The respective map entropy ℏ(M |  0: ) and the step entropy rate values (P  |  0:−1 ) of the maps  1 to  6 are shown in the text boxes.

Figure 12 :
Figure 12:  Relative entropy between two maps  6 and  5 translated along the -axis.The peaks down to a minimum at 0 shift shows the best fit of the two maps.The maps were already aligned before shifting  5 .
each particle  learns what we call a transition map by observing the poses, that is, by counting each transition that it makes from P  −1 in ℎ  to P   in ℎ  across edge   .Each particle stores the hexagons it visits ℎ  along with the number of times that it crossed each one of its six edges   , what we call the hexagon transition counters Figure10: Entropy rate for dataset  4 over time.At the beginning the entropy is maximum: 2.58 bits.The results are similarly to Figure9, but the range of values is lower than with the differential entropy.
counters per hexagon; therefore, the range of the differential entropy values is not significant.The difference between the