Upload
edmund
View
220
Download
4
Embed Size (px)
Citation preview
Azimuth Based Localization for Mobile Phones
Anish Thomas, Jan Geldmacher, Jurgen Gotze
Information Processing Lab
TU Dortmund University
Otto-Hahn-Str. 4, 44227 Dortmund, Germany.
Correspondence: [email protected]
Edmund Coersmeier
Task9 GmbH
Universitatsstr. 142
44799 Bochum, Germany.
Abstract—Based on measured acceleration and compass dataof smartphones a concept for GPS-free localization and travelingroute estimation is presented. The built-in compass is used tomeasure the relative direction changes of the traveling user. Theresulting azimuth trajectories are then successively matched to avectorized street map. In order to relate the measured trajectoryto the street map data, it has to be scaled correctly by the currentuser velocity. To estimate the current velocity, pattern matchingis applied to the acceleration sensor data to detect the currentmeans of transportation (MOT). By associating typical velocitieswith each MOT, a set of possible scaled azimuth trajectories canbe found.
I. INTRODUCTION
The evolution of personal mobile communications estab-
lishes new features and applications for mobile phones. Re-
cently it can be observed that phones are equipped not only
with communication technologies like bluetooth and wireless
LAN, but also with multiple sensors for measuring the en-
vironment. Prominent examples are acceleration sensor and
digital compass. These sensors can be used for improving
the usability of the user interface, for example by turning the
screen according to the geographical direction or angle of the
device. However, these sensors also reveal information about
their physical environment, which may be used to assist or
improve localization technologies.
As an example, the acceleration sensor of a mobile phone
can be used to recognize the current means of transportation
(MOT) of a user [1]. Using the fact that every MOT, like
car, train, pedestrian, has its own specific movement pattern, a
pattern recognition approach can be applied to the acceleration
sensor data to estimate the current MOT. This information
can be used to assist the implementation of Location Based
Services (LBS), like for example advanced traffic information
systems [2]. It may also be used to improve localization
accuracy in combination with digital map data, because it can
be seen as a constraint on possible user positions.
Realizing a localization algorithm for mobile phones based
on sensor data and GSM/UMTS network measurements [3],
[4] and not on the GPS technology can be beneficial for several
reasons. Adopting a localization technology for LBS in the
field of social or entertainment applications [5], [6], poses
different requirements than navigation applications. While the
latter requires high accuracy and is actively controlled by the
user, the former are often so called pushed services, which
rely on continuous, but less accurate position estimates, and
which trigger the user on location dependent events. In the
latter case, the GPS technology is not necessarily the optimal
solution, because of its poor user-time coverage due to the
line of sight (LOS) requirement [7], [3] and its increased
energy consumption. Alternative approaches, based on sensor
or baseband measurements can be more suitable, because they
rely on data, that is available continually, and that is less
dependent or independent of LOS conditions.
In this paper, we consider measurements from a digital
compass built into a mobile phone, and its application for
localization. The digital compass delivers relative information
about the change of moving direction of the mobile user.
Based on the observation of the direction changes for a certain
time, a movement trajectory can be constructed. We refer to
this trajectory, that reflects the directions changes over time,
as the azimuth trajectory. The estimated azimuth trajectory
can be correlated with digital map data to estimate the route
and possibly the position of the user. Thus, the localization
approach described in this paper can be seen as azimuth based
map matching.
While the basic idea seems intuitive on first sight, it poses
several problems when it comes to a practical realization:
• A principle problem is that observing solely the direction
changes over time is not sufficient. In fact, to connect the
trajectory with digital map data, it has to be linked to the
current velocity in order to provide the correct scaling of
the trajectory. However, estimating the current velocity in
a mobile phone is not straight-forward.
• A second principle problem is that the measured az-
imuth trajectory does not reveal the absolute movement
direction, but only relative direction changes. This is
due to the fact that while the compass delivers absolute
measurements, the relation of the moving direction to the
measurement axis of the phone is generally not known.
• “User interference” can also become a problem: The
measured direction changes not only depend on the
user movement, but also on turns of the phone that are
performed manually by user.
• Like all measured data, the compass measurements are
distorted by noise. The distortion can introduce strong
degradation of the measured data, due to the rather poor
quality of the involved, built-in magnetic sensor and the
interfering magnetic fields often found in vehicles and
trains.
978-1-61284-4577-0188-7/11/$26.00 c©2011 IEEE71
Acceleration
Sensor Compass
Digital
ClassificationAzimuth
Generation
Cell-ID
Measurement
Previous
Results
Vectorized
Map Data
Candidate
Correlation
Selection
Set of Possible Routes and Metrics
Set of Azimuth Trajectories Set of Candidate Azimuths
Generation
aj(i) ∈ A(i) ck(i) ∈ C(i)
Fig. 1: Azimuth based map matching.
This paper is organized as follows: The proposed azimuth
based map matching concept is described in Sec. II: Subsec.
II-A describes pre-processing of the measured data, Subsec.
II-B explains the involved MOT classification and Subsecs.
II-C and II-D describe the generation of candidate routes
and matching of the measured azimuth trajectories to the
map. Experimental results are used to illustrate the proposed
approach in Section III. Finally, conclusions are drawn in
Section IV.
II. AZIMUTH BASED MAP MATCHING
An overview of the azimuth based map matching approach
and the involved measurements is given in Fig. 1. As explained
before, the underlying principle is to measure the temporal
azimuth changes, while the user is moving, and periodically
correlate the resulting estimated azimuth trajectories with
candidate azimuth trajectories generated from a vectorized
digital map. The result is an estimate of the route that the user
has travelled and an estimate of possible current locations.
The involved computations and measurements mentioned in
Fig. 1 are described in detail in the following subsections.
A. Azimuth Measurement and Pre-Processing
The azimuth trajectory is constructed from the measure-
ments obtained from a digital compass built into the mobile
phone. The digital compass is based on a triaxial magnetome-
ter, which measures the magnetic flux in three dimensions.
In the ideal case, with no magnetic fields except the earth’s
magnetic field, a projection of the 3-D flux vector into a
plane parallel to earth surface delivers the direction of current
magnetic north. The azimuth is the angle between magnetic
north and the arbitrary defined reference axis of the mobile
phone.
Clearly, in a realworld scenario, the measured magnetic flux,
and with it the estimated azimuth, is influenced by multiple,
distorting magnetic fields. Generally, we observed stronger
distortions for measurements in MOTs like trains, buses and
cars, then for pedestrians. This is due to the multiple artificial
electromagnetic fields, which superimpose the earth magnetic
field. However, while there are typically less magnetic distor-
tions for pedestrians, in this case the measured azimuth suffers
from stronger impact of the vibrations due to the walking
motion. This can be seen as a constantly moving reference
axis for the azimuth computation.
0 200 400 600 800 1000 12000
50
100
150
200
250
300
350
400
Samples
Azim
uth
[d
eg
]
Raw Measurement
After Median FilterAfter Median Filter
& Line SimplificationReference
Fig. 2: Pre-processing of measured azimuth trajectory from a
pedestrian (Sampling frequency 1Hz).
Two types of filters are used to reduce the noise impairment:
• First a median filter is used to remove outliers, while pre-
serving direction changes, in the measured raw azimuth
values ϕt. Assume a sliding window of sorted samples
ϕt+n of length N (n = 1 . . . N ), then the median ϕ′t for
this window is computed by
ϕ′t =
{
ϕt+ν+1 if N = 2ν + 1,
0.5(ϕt+ν + ϕt+ν+1) if N = 2ν.(1)
• In order to further reduce the complexity of the measured
azimuth trajectory and to extract only stronger direction
changes, a line simplification [8] is applied to the median
filtered signal ϕ′t. The line simplification is an iterative
method, which iterates until a specified tolerance ∆threshold is fulfilled, i.e. it removes direction changes
≤ ∆.
To illustrate the effect of both filters, Fig. 2 shows a raw
azimuth measurement in degrees sampled with 1Hz, along
with a reference azimuth constructed from a combination of
the tracked GPS path and map data. The median filter window
length is set to N = 40 samples and the tolerance threshold
for line simplification is set to ∆ = 5◦. The result of both
filters can be clearly observed, i.e. outliers are removed by
the median filter, while consecutive application of the line
simplification removes direction changes smaller than ∆.
B. State Classification
In order to link the measured azimuth trajectory to a
physical movement and thus use it for map matching, it
has to be scaled with the current velocity of the user. More
specifically, we first have to decide,
• if an azimuth change stems from a real physical move-
ment of the user, or
• if it just stems from manual movements of the phone,
while the user stays at the same place.
72
0 200 400 600 800 1000 120050
100
150
200
250
300
350
400
Samples
Sca
led
Azim
uth
[d
eg
]
Measurement scaled by v=1.0 m/s
Measurement scaled by v=1.4 m/s
Measurement scaled by v=1.8 m/s
Reference (v=1.4 m/s)
Fig. 3: Measured, filtered azimuth trajectory, scaled with
different pedestrian velocities.
In the second case, the azimuth bears no information that can
be used for localization, such that the measured data cannot
be further processed. If we decide for the first case, then the
azimuth changes reflect the movements of the user and the
measured data can be further utilized. We refer to the first
case as traveling-state and to the second as halt-state.
If deciding for the traveling-state, the next step is to scale
a length L window ϕ′(i) of the time dependent data with the
current velocity, i.e. make ϕ′(i) a function of distance instead
of time. The resulting scaled azimuth trajectory a(i) can then
be correlated with candidate trajectories generated from the
map data in order to find a possible matching route.
However, like the information about traveling- or halt-state,
the moving velocity is generally not known inside the mobile
phone. Therefore, we further differentiate the traveling-state
by also considering the current MOT. By associating each class
of MOT with a set of J typical velocities v(j)(i) ∈ V(i), a
set A(i) of possible distance dependent azimuth trajectories
a(j)(i) ∈ A(i) is generated by scaling ϕ
′(i) with all possible
velocities of the corresponding MOT. Note that the velocity
is assumed to be constant inside a window. Thus the number
L of samples per window has to be selected small enough so
that the assumption of a constant velocity is reasonable.
To differentiate between halt- or traveling-state, and further
classify the latter into different MOT, data from an additional
sensor is used. This sensor is the built-in acceleration sensor:
As described in detail in [1], the measured acceleration data
can be used to classify the current MOT of the user by
exploiting the characteristic acceleration patterns that emerge
from different MOTs. At the same time the approach reveals if
the user is in traveling- or halt-state by comparing acceleration
measurements against predefined thresholds.
In the current realization, the MOT classification is based on
the following three classes: car, train and pedestrian. Reason-
able velocities are associated with each class. For example, for
the pedestrian class, reasonable velocity values could be 1m/s,
1.4m/s, and 1.8m/s. Fig. 3 shows the candidate trajectories
Fig. 4: Street map data and corresponding tree representation.
a(1)(i), a
(2)(i), a(3)(i), which result from scaling a measured
azimuth trajectory ϕ′(i) with these three scaling factors. The
reference velocity is 1.4m/s in this case, such that a strong
correlation of a(2)(i) with the reference can be observed.
It might seem odd that instead of directly using the accel-
eration sensor for estimating the velocity, we suggest to use
the described pattern matching approach. It however turns out
that the acceleration measurements from the built-in sensor are
very coarse, and much more affected by ”local“ movements
(vibrations and manual turns) than by ”global“ movements
(movements related to the traveling route). Given this point of
view, the resulting data cannot be treated like data stemming
from a classical inertial measurement unit.
C. Candidate Generation
In order to determine a possible location and route, the
scaled trajectories a(j)(i) have to be correlated with candidate
trajectories c(m)(i) generated from vectorized street map data.
A very simple representation of street map data is shown
in Fig. 4 on the right: The representation is basically an
undirected graph, consisting of vertices, which are connected
by edges. Vertices can either be shape vertices or junction
vertices and edges represent linear street segments. Shape
vertices determine the shape of a sequence of street segments,
junction vertices define the topological relation of the street
network. In this work, the OpenStreetMap project [9] has been
used as digital map provider – a subset of its data structure,
consisting of nodes and ways, directly relates to the structure
shown in Fig. 4.
To extract candidate trajectories c(m)(i), a tree represen-
tation is used, as illustrated in Fig. 4 on the left. A tree is
constructed by first selecting a starting vertex as root, which
may be a shape or a junction vertex in the map representation.
This vertex is supposed to be the geographical starting point of
the current measurement window (cf. Sec. II-D). Starting from
the root vertex, all possible street segments are parsed until
the respective next junction vertex. These junction vertices
73
Fig. 5: Successive construction of search tree.
become the children of the root vertex. Starting from each of
the children, the map is further parsed for the respective next
junction vertices, which then form the next set of children.
The process is repeated for each of the children, while its
geographical distance to the root is smaller than a value
ℓmax(i). The value ℓmax(i) is defined as
ℓmax(i) = L · ∆t · maxj
v(j)(i), (2)
where ∆t is the sampling time. Thus ℓmax(i) describes the
maximum geographical length of the azimuth trajectories
a(j)(i). Note that the sequence of street segments between
two consecutive junction vertices transforms into one edge in
the tree representation.
After the tree has been constructed, every path from root
to each of the leafs represents a possible sequence of shape
vertices, i.e. a possible sequence of street segments with
length greater or equal ℓmax(i). Thus the candidate trajectories
c(m)(i) can be generated by parsing from root to each leaf and
by computing the azimuth changes based on the shape vertices,
that lie on this path.
Depending on ℓmax(i) and the density of the street network
in the considered region, the tree can become quite complex,
producing a large set of candidate trajectories c(m)(i). To
reduce the complexity the following constraints are employed
during the tree construction:
• Cycles The tree is constructed cycle-free, such that each
junction vertex can only appear once if tracing from root
to a leaf.
• Cell-ID The geographical expansion of the graph is
restricted to the coverage of the Base Transceiver Stations
(BTSs) the phone is connected to during the current
measurement window. The currently connected BTS is
easily identified by reading the current Cell-ID from the
GSM/UMTS baseband.
D. Correlation and Selection
The map matching process consists of successively gener-
ating candidate sets C(i) at each instant i, by constructing
consecutive tree representations based on the considered part
of the street network. As described in the previous section,
each tree is constructed by selecting a starting vertex as the
root. The root vertices at time instant i are determined by those
tree leafs from the previous instant i − 1, that correspond to
the B best candidate trajectories of C(i − 1).In the initial run (i = 0) of the algorithm, the correct starting
node is not known, such that a set of potential starting nodes
has to be selected in a different way. This could be realized
based on the combination of Cell-ID observations and other
reasoning (typical places visited by the user, e.g. home or
work place). Each of the potential starting nodes forms the
root vertex of a separate tree.
To clarify the procedure, it is illustrated in Fig. 5 in a
simplified manner: At instant i = 0, a root vertex is selected
and a tree is constructed. The root vertex has two children,
which again have two children each and form the leafs of
the tree. The distance from the four leafs to the root vertex
is therefore ≥ ℓmax(0). From the resulting four candidates
c(m)(0), in this example the B = 2 best ones are selected.
The leafs of these two candidates, marked in green in Fig.
5, are the root vertices of the two trees at i = 1. These trees
are constructed, resulting in 8 possible candidates c(m)(1) and
again the B = 2 best candidates are selected, which then form
the root vertices in the next step i = 2.
In order to select the B best candidates out of C(i), each
c(m)(i) ∈ C(i) has to be correlated with each a
(j)(i) ∈ A(i).At instant i, we use the correlation coefficient r(m,j)(i) to
define the similarity between a pair (c(m)(i),a(j)(i)):
r(m,j)(i) = Corr(
c(m)(i) − c(m)(i),a(j)(i) − a(j)(i)
)
, (3)
where a(j)(i) and c(m)(i) denote the mean of a(j)(i) and
c(m)(i), respectively. Thus, by actually correlating zero-mean
trajectories, the correlation becomes independent of the di-
rection of the measurement axis of the mobile phone. As
noted in Sec. I, this is important because the angle between
moving direction and direction of compass measurement axis
is generally not known and therefore no absolute, but only
a relative azimuth measurement is given. The scalar valued
function Corr(x,y) is defined as the maximum of the cross-
correlation of x and y, i.e.
Corr(x,y) = maxκ
1
K
K−1−|κ|∑
k=0
xkyk+κ, (4)
with K = min {length(x), length(y)}.
The value r(m,j)(i) represents the degree of similarity
between each of the M candidate trajectories c(m)(i) and
the azimuth measurement scaled with the J different velocity
components v(j)(i). The index j(m)best(i) of the most likely
velocity for each c(m)(i) can be found as
j(m)best(i) = arg max
jr(m,j)(i) for ∀m, (5)
74
51.44
51.442
51.444
51.446
51.448
51.45
7.25 7.252 7.254 7.256 7.258 7.26 7.262 7.264
(a) Map representation i = 0. (b) Tree representation i = 0.
(c) Map representation i = 4. (d) Tree representation i = 4.
Fig. 6: Experimental result for azimuth based localization of a pedestrian at different instants i. Left column: Map representation
(magenta) and reference route (red dotted, only in Fig. a)). Right column: Tree representation. Blue and green segments denote
candidates c(m)(i) and the best candidate, respectively.
and the B best candidates c(m)best(i) are found by selecting the
B largest correlation values from
r(m,j)(i) s.t. j = j(m)best(i). (6)
As a result, there is a set of best candidates c(m)best(i) at
each instant i, and by selecting one of the c(m)best(i) and tracing
the tree up to i = 0, we get an estimate of a possible route
the user has taken. The parameter B is a design parameter,
which controls a trade-off between computational effort and
possibility of loosing the correct path. Detecting of the latter
is crucial, and can be realized during the tree expansion by
validating the locations of candidates with the current Cell-ID
measurement, as mentioned in the previous section.
III. EXPERIMENTAL RESULTS
In this section results of the localization approach based on
experimental data are presented. The azimuth measurements
have been collected by a pedestrian using a Nokia N97
smartphone and walking a route of about 1100m. Fig. 6
illustrates the tree construction and selection procedure by
showing the candidates trajectories (blue) in the tree (right)
and map (left) representation at different instants i of the
algorithm. The route taken by the person is marked by red
dots in the map representation in Fig. 6(a).
Note that in this example, we assume that the starting node
is known, such that there is only one tree constructed at
i = 0 with the root vertex matching the geographical starting
point of the route. In Fig. 6(a) and Fig. 6(b), the first instant
of the algorithm is shown. The tree is extended into three
possible directions from the starting node, which again divide
into multiple branches at the subsequent junctions. In the first
measurement period, the path is straight, such that a(j)(0) does
not contain any azimuth changes and the information is not
yet sufficient for a successful localization. Consequently, the
75
(e) Map representation i = 9. (f) Tree representation i = 9.
Fig. 6: Experimental result for azimuth based localization of a pedestrian at different instants i (continued).
best candidate (green) does not match with the actual route.
At instant i = 4, the measured data contains a 90◦ azimuth
change, and the best of the candidates can be seen to match the
real route in Fig. 6(c). For the corresponding tree in Fig. 6(d),
it can be seen that due to the selection of the best candidates,
the number of branches in the upper part have been reduced.
This becomes more clear at instant i = 9, shown in Fig. 6(f),
where the upper part of the tree and with it the beginning part
of possible street segments in Fig. 6(e), has reduced to only
one branch. At both instants, the best candidate matches the
true route.
From the map representations in Figs. 6(a), 6(c) and 6(e)
it can also be observed that the candidate paths (blue street
segments) can have a greater physical length than the actual
measurement period. This is due to the fact that the different
velocities are used while scaling the measured azimuth, as
described in Sec. II-B. Scaling ϕ′(i) with a velocity that is
too high can therefore lead to candidates, that are too long.
IV. CONCLUSIONS
In this paper a concept for localization and route estimation
of mobile phones based on measured azimuth values has
been described. The concept is based on generating candi-
date azimuth trajectories from a tree representation of street
map data, and correlating them with scaled versions of the
measured azimuth trajectory. The scaling factors are selected
based on the current MOT, which is estimated by applying
pattern recognition to the data obtained from the acceleration
sensor as described in [1]. To reduce the computational effort
of the tree construction and correlation, instead of applying
the computations to one large growing tree, smaller trees
are successively constructed and appended to each other. The
approach essentially resembles the well known M -algorithm
[10] for breadth-first tree search.
In practical tests, the concept can successfully deliver route
estimates, if there is sufficient knowledge of the starting
point or region of the measurement and if proper azimuth
measurements are given. Especially the latter turned out as a
critical part in practice: Depending on the MOT, the quality
of the azimuth measurement can be heavily degraded – while
azimuth measurements carried out by pedestrians can deliver
good quality in many cases, measurements carried out in
vehicles often turn out as strongly distorted due to the presence
of various superimposed magnetic fields.
Rather than considering the proposed concept as a stan-
dalone localization technology, it could also be analyzed as
a supporting technology for localization approaches based on
cellular measurements.
ACKNOWLEDGMENT
Copyright of the underlying street map data for Figs. 6(a),
6(c), and 6(e) is by OpenStreetMap contributors, CC-BY-SA.
REFERENCES
[1] T. Nick, E. Coersmeier, J. Geldmacher, and J. Goetze, “Classifyingmeans of transportation using mobile sensor data,” in Int. Joint Con-
ference on Neural Networks (IJCNN 2010), Barcelona, Spain, 2010.[2] T. Nick, E. Coersmeier, J. Geldmacher, and J. Gtze, “New traffic
information system based on means of transportation classification,”in IADIS Wireless Applications and Computing (WAC 2010), Freiburg,Germany, 2010.
[3] J. Geldmacher, J. Gotze, and E. Coersmeier, “Application and perfor-mance of joint cooperative cell-id localization and robust map matching,”in EUSIPCO-2010, Aalborg, Denmark, 2010.
[4] E. Trevisani and A. Vitaletti, “Cell-ID location technique, limits andbenefits: an experimental study,” in 6th IEEE Workshop on Mobile
Computing Systems and Appl. (WMCSA 2004)., Dec. 2004, pp. 51–60.[5] I. Smith, “Social-mobile applications,” Computer, vol. 38, no. 4, pp.
84–85, April 2005.[6] N. Davies, K. Cheverst, K. Mitchell, and A. Efrat, “Using and deter-
mining location in a context-sensitive tour guide,” Computer, vol. 34,no. 8, pp. 35–41, Aug 2001.
[7] A. LaMarca et al., “Place lab: Device positioning using radio beaconsin the wild,” in LNCS, vol. 3468, 2005, pp. 116–133.
[8] D. H. Douglas and T. K. Peucker, “Algorithms for the reduction of thenumber of points required to represent a digitized line or its caricature,”Cartographica: The International Journal for Geographic Information
and Geovisualization, vol. 10, no. 2, pp. 112–122, Dec 1973.[9] “OpenStreetMap.” [Online]. Available: http://www.openstreetmap.org
[10] F. Jelinek and J. Anderson, “Instrumentable tree encoding of informationsources,” IEEE Trans. Inf. Theory, vol. 17, no. 1, pp. 118–119, Jan 1971.
76