3droad TMC

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

1

Low-cost and Accurate 3D Road Modeling


Using Mobile Phone
Zhice Yang, Student Member, IEEE Qian Zhang, Fellow, IEEE
AbstractThis paper studies the feasibility of using mobile phone to achieve low-cost and accurate 3-dimensional (3D) road
modeling, which provides nutritious supplement to current digital map. Instead of using expensive tools, our method only needs
a mobile phone fixed on a moving vehicle. Road surface variation, reflected by vehicle dynamic state, is captured by sensors
in the mobile phone. The road in 3D is reproduced by combining sensing data from accelerometer, magnetometer, gyroscope
and GPS trace. Several compensation and calibration techniques are developed to improve modeling accuracy based on the
systematic study of sensor error properties. A learning step is used to automatically unify the user dependent factors to avoid
manual adjustment. We evaluate our method on a 2 km real road. Compared with the field measured baseline, it successfully
generates a fine-grained 3D road model with maximum height error less than 4m and 90% slope angle error less than 2 degrees.

Index TermsMobile phone, Measurement, 3D Road Map, Sensor

I NTRODUCTION

HE rapid spread of mobile phone navigation


systems and the fast development of wireless network have dramatically popularized the 2dimensional (2D) digital map. Due to the dimensional
gap between 2D map and the real 3D world, 2D
digitalization will never be the ultimate goal of the
map evolution. Consider a 3D map providing detailed
road slope angle information. It will be extremely
helpful for drivers encountering bad weather such as
snow and sleet. Using the maximum inclining angle
on each road segment, intelligent driving system can
automatically route to avoid roads on which vehicles
are likely to slip. Such accurate 3D road map is also
meaningful in improving driving safety [1], reducing
energy consumption [2] and enabling new vehicle
localization approach [3].
Despite numerous potential benefits, accurate 3D
road map is not easy to generate. The key reason is the
number of roads in the world is huge and keeps growing. Owning to this fact, there is a trade-off between
the accuracy and the expense in traditional methods.
Specifically, large-scale measurement methods such
as satellite remote sensing and aerial photographing
[4] cannot provide images with enough resolution to
extract road surface variation. These methods also
surfer from unexpected barriers such as trees beside
mountainous roads. To avoid those drawbacks, other
approaches equip helicopters or vehicles with special
Z. Yang and Q. Zhang are with Department of Computer Science and
Engineering, Hong Kong University of Science and Technology, Hong
Kong SAR, China.

devices such as laser scanners [5], sensors [1] and


cameras [6] to enable 3D road measurement. Though
accurate, the costly instruments, dedicated labor and
a great deal of time become the major concerns for
nationwide deployment.
In this paper, we try to seek a method to keep measurement burden minor while achieve enough accuracy to fulfill emerging demand. The exploring hints
come with two observations. First, modern commodity mobile phone is programmable and equipped with
various Microelectromechanical Systems (MEMS) sensors, which make the mobile phone an ubiquitous
sensing platform. Second, the road surface variation
is directly related to the vehicle spatial dynamics. In
other words, car tilts up and down when encounters slopes. The above two observations show the
insight that the mobile phone could be a 3D road
measurement tool. Millions of drivers carrying mobile
phones are not encouraged to make phone call during
driving. In this sense, mobile phones in moving vehicles, once fixed, are able to monitor roads variation
without affecting their normal use. Moreover, such
cooperative measurement stretches spatial coverage
with huge user amount and car mobility. Therefore,
the measurement cost is shared by undedicated participants.
The simple intuition incurs a main concern: Is it
possible to get 3D road information accurately and
easily through mobile phone only? We answer it by
proposing our method 3Rd. 3Rd consists of mobile
phone clients and a backend server. The client app
works when driver fixes his/her mobile phone on the
vehicle, and mainly performs sensing and recording.
The only constraint is that the mobile phone should be
fixed to the vehicle during the measurement. We find

20XX IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or
promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works. DOI: No. XXXX

the phone holder 1 is a common accessory to ease this


work. Besides this, priori to first use, the driver needs
to finish a closed loop path to generate a profile for
that vehicle to aid measurement. The backend server
is responsible for calculating 3D road model based
on the sensing data from clients. The key principle
is that accelerometer reading of the constant gravity
direction differs on roads with different slope angles.
To accomplish it, we fuse the data from accelerometer,
magnetometer and gyroscope to reproduce the vehicle
position sequence in 3D space. The position sequence
is then used to generate moving directions of that
vehicle. Further, moving directions are treated as the
slope angles and sticked to GPS trace to obtain the 3D
road model.
3Rd achieves accurate measurement while keeps
concise procedures by addressing two practical challenges. First, low-cost MEMS sensors on commodity
mobile phone are coarse and inaccurate [7]. The design of 3Rd is based on the knowledge of the error
properties of each sensor, and incorporates errors
and uncertainties by comprehensively formulating the
measurement problem. For instance, GPS trajectories
are used to reduce acceleration shaking yet without introducing new measurement error. Gyroscope
measurement with bias error is high-pass-filtered to
provide fine-grained slope variation. More techniques
are developed and combined in our design to target
this challenge; we put their details in the following
sections.
The second challenge is owing to the fact that
mobile phone is a personal device. It suffers from nonuniform user behaviors and different environmental
factors. For example, different users may have their
phone holders placed at different positions, and thus
the position relation between the mobile phone and
the vehicle is unknown. Those user-depend factors,
though inevitable, should not be manually adjusted.
In 3Rd, we introduce a learning step to construct the
personal measurement profile. 3Rd intentionally runs
a closed loop path for reference and leverages the
unique path features to estimate the phone holder
position and the in-car electromagnetic fields to guide
the real measurement. All of the user-dependent parameters are determined automatically in the learning
step. Users do not require to provide further adjustment until next structure resetting such as replacing
a car or changing the phone holder direction.
Contributions of this work are:
As far as we know, this is the first work that studies
the feasibility of using mobile phone to model roads
in 3D space. The low-cost nature makes large scale
3D road generation possible and its high accuracy
could benefit new applications.
We design and implement a 3D road modeling
1. http://www.amazon.com/s/ref=nb sb noss?url=
search-alias%3Dmobile&field-keywords=Phone+Holder+

method based on commodity mobile phone sensing.


Various techniques are created to increase modeling
accuracy and improve usability.
We evaluate our method in a 2km real road. Results
show it has a comparable accuracy to the field measurement. 3Rd successfully produces a fine-grained
3D road model with maximum height error less
than 4m and 90% slope error less than 2 degrees.
The rest of this paper is organized as follows. 2
gives an overview the modeling method. 3 formulates the problem and describes the algorithm in detail. 4 introduces the implementation. The evaluation
is presented in 5. We discuss an application example
and other related issues in 6. The related work is in
7. Finally, we conclude our work is in 8.

D ESIGN OVERVIEW

In this section, we first show the intuition of inferring


road shape based on measurable parameters. Then we
give an overview of our design.
2.1

Measurement Basis

Regardless of the complex 3D vector mathematical


calculation, our measurement basis is quite simple
and intuitive. One obvious fact is that vehicle dynamic
states, such as running up or down, turning left or
right, are determined by the shape of the road. Sensors
in the mobile phone, which is fixed to the vehicle, are
able to detect these state changes.
In Fig.1, a car carrying a mobile phone is moving
from the flat side to the uphill. Frame Ob represents
the mobile phone body and frame On represents the
Earth/map. Ob twists according to the slope while
On is stationary. The moving direction vector, whose
direction is parallel to the road surface and points
to the front of the car, has two groups of readings
when viewed in different frames. In On , the moving
direction vector points to the tangent direction of the
road, and can be used to derive road angles. In Ob ,
the vector is a constant and can be predetermined.
In order to determine the moving direction in On ,
3Rd first uses the natural constant vectors, the gravity
and the magnetic North, as reference to calculate
frame Ob variations through sensor readings. Then,
3Rd transforms the known moving direction vector in
Ob into On to obtain the slope angle sequence. Road
model in 3D is finally generated by sticking the slope
angle sequence to the GPS trace.
2.2

Modeling Steps

3Rd takes three regular steps to model the road and


one additional learning step before first use. All of the
calculations are performed in the server and clients
are only responsible for sensing and collecting data.
Measurement initialization and data collection. We fix
the mobile phone on the vehicle to monitor its position changing during the measurement. With this

t0
On

t2

t1

Zn

Zb

Ob

Xn

Xb

On

Zn

Zb

Ob

Zb
Ob

t3

Xb

Ob

Xn

On

Zb

Xb

Ob

Xn

On

Zn

Zb

Xb

Ob

Xn

On

Fig. 1. Measurement Basis Illustration

D ESIGN D ETAILS

In this section, We first formulate the modeling problem and define the accuracy metrics. Then, we describe the method details of 3Rd. We use the same
subsection names to show the relation to the brief
steps in 2.2.

Zb

Xb

measurement.

Xb

Xn

condition, the moving direction vector becomes a


constant with respect to the mobile phone body Ob ,
and it can be measured as profile with in the Closed
Loop Learning step.
Frame transformation calculation. This step uses sensing data to calculate the 3D position of the mobile
phone body with respect to the Earth. The position
is useful in transforming the reading of the moving
direction with respect to the phone body Ob to the
reading with respect to the Earth On . The calculation
is done in two ways. One method uses the gravity
direction and the magnetic North direction to calculate the mobile phone position. Another method starts
from an initial position, which is propagated with
incremental rotation values recorded by gyroscope.
Due to the different error properties, we implement
both and fuse them in the 3D road modeling step.
3D road modeling. 3Rd models the road in terms of
height and angle. Here, the moving direction vector
in Ob is known as user profile. First, the slope angle
sequence is calculated by transforming the moving
direction from Ob into On . Then, the angle sequence
is sticked to GPS trace according to the time stamps.
After that, we enhance the slope angle accuracy by exploiting the error properties of the two transformation
methods. Finally, the relative height of the road is obtained by adding the products of the tangent of slope
angle and the corresponding horizontal displacement.
Closed Loop Learning. The learning step is a must
to determine user profile before the first use. This
step depends on the three steps above and solves unknowns with special input. It takes a closed loop path
in the modeling process and searches the unknown
parameters (moving direction with respect to Ob and
local magnetic field) according to the the property of
the a closed loop, which is a road path with the same
start and end point. The loop path can be but not
limited to a circle; driving around a block is a choice.
Further, the learning is also automatically done when
drivers encounter closed loop during in the regular

3.1 Notations and Problem Formulation


In this subsection, we give the concept of frame,
formulate the modeling problem and define the measurement accuracy metrics.
3.1.1 Frame
Frame or frame of reference is important because
it provides physical meaning for the sensing data
collected by mobile phones.
Up

North
n

East

Fig. 2. b-frame and n-frame


The mobile phone body reference frame (b-frame
Ob ) is fixed on the mobile phone body. A Cartesian
coordinate system is aligned to this frame as Fig.2
shows. Its coordinate system and vector readings are
noted with superscript b.
The navigation reference frame2 (n-frame On ) is
fixed on the Earth, whose coordinate system has its
origin fixed at a selected point and axes aligned with
the directions of the East, the North and the vertical
(up). Its coordinate system and vector readings are
noted with superscript n.
The reading of a vector in one frame is defined as
its decomposition values along the frame coordinate
axes. For example, the reading of a vector ~v in b-frame
is expressed as ~v b = [vxb , vyb , vzb ]T , which is defined as
~v = vxb ~ebx + vyb ~eby + vzb ~ebz . ~ebx , ~eby , ~ebz are the basis vectors of the corresponding b-frame coordinate system.
Similarly, its reading in n-frame is ~v n = [vxn , vyn , vzn ]T .
The q
norm of a vector ~v is its strength, denoted by
|~v | =
vx2 + vy2 + vz2 . We use an orthogonal matrix
n
Cb to denote the reading transformation between two
frames: Cbn ~v b = ~v n Cnb ~v n = (Cbn )T ~v n = ~v b .
The measurement is taken in discrete time, so we
introduce t as the sampling time. The attribute ~v is
expressed in terms of t as ~v (t). If ~v (t) is a constant,
we ignore its variable as ~v (t) = ~v .
2. In spite of the earth rotation, in our measurement, we treat
n-frame as an inertial frame, where Newtons law is valid.

3.1.2 Problem Formulation


A road on the Earth can be treated as a curve in
n-frame. Fig.3 shows that a road curve is described
by triples ~cn (t) = [cnx (t), cny (t), cnz (t)]T sequence in nframe. Modeling the road in 3D space is to determine
the value of ~cn (t) at every t. Without confusion, we
ignore the superscript of ~cn (t) as ~c(t) in the context.
Up

Moving direction
n

c (t)

Moving direction
n

cz(s)

Curve Projection on
Horizontal Plane

Length of the Curve Projection on


Horizontal Plane

Fig. 3. Problem Formulation


The measurement problem consists of two parts.
First, the horizontal locations cx (t) and cy (t), shown
in the dash line s in Fig.3, are the projection of ~c(t)
on the horizontal plane and can be measured by GPS
longitude and latitude. The second part is the vertical
dimension cz (t). Traditional 2D maps are lack of the
information of cz (t), which is what we are going
to measure. Note that s(t) is uniquely determined
by t. Therefore, cz can be expressed in terms of the
horizontal distance:
cz (t) = cz (t(s)) = cz (s)

(1)

The variation rate of cz (s) is relates to the road slope


angle (s). Note that (s) is just the angle between the
car moving direction d~n (s) = [dnx (s), dny (s), dnz (s)]T and
the horizontal plane:
Z s
Z s
cz (s) cz (s0 ) =
c0z (si )dsi =
tan((si ))dsi (2)
s0
s0
q
tan (s) = dnz (s)/ dnx 2 (s) + dny 2 (s)
(3)
Equation (2) and (3) indicate that we can obtain the
relative road height by measuring the car moving
direction along the road.
3.1.3 Accuracy Definition
Accuracy is the most essential part for a modeling
method. We define two metrics here on purpose of
fully describing the road in 3D space. We especially
focus on the vertical dimension.
First, the geometric difference between the road
model and the real road must be small. Taking the
sampling points at s1 ...sn , the modeling results are
~cm (si ). The maximum height error should be smaller
than the required threshold:
max |cmz (si ) cz (si )|

i{1...n}

1m

1m

10

Fig. 4. Examples on Accuracy for Road Shape

X
n

1m

n
East

Curve Projection on
Latitud-Longitude Plane

North

line is the real road and the solid line is the modeling
results. Three measurements have the same maximum
error as 1m. = 1m seems a perfect result for a
road with several kilometers, but it may also mean
a sudden dangerous barrier, a bump or merely an
elevation measurement bias.

(4)

Height difference, though intuitive, could be confusing. Take upper part of Fig.4 for example, the dash

In order to overcome the shortcomings, we propose


the road slope as the second metric for the road
modeling accuracy. Slope grade is an essential factor
for road and is suggested by several well studied
literatures [8] [9]. Thus the maximum angle error
should be smaller than the required threshold:
max |m (si ) (si )|

i{1...n}

(5)

In the lower part of Fig.4, three situations can be


distinguished by the maximum angle error.
3.2

Frame Transformation Calculation I

This section introduces our first algorithm that uses


accelerometer and magnetometer to determine the
reading transformation matrix from b-frame to nframe. In another word, we want to determine the
mobile phone position in 3D space with respect to
the Earth. This calculation is straightforward once
we take the gravity acceleration direction and the
magnetic North direction into consideration. Both of
their readings are constant in the Earth frame but are
flexible in the body frame. The position is calculated
by quantifying the difference between the two groups
of readings. However, the simple calculation does not
guarantee accuracy under different measurement conditions. Our contribution is to make use of different
sensor properties to minimize the total calculation
error. We first describe the basic calculation method,
then we propose the compensation methods.
3.2.1 Calculation Method
A same vector has different readings in different
frames. For example, the moving direction in Fig.1
is a constant vector in b-frame but a variable in nframe. The transformation matrix Cbn transforming the
vector reading ~v b in b-frame to the n-frame reading
~v n is a 3 3 orthonormal matrix. Its orthogonality
Cnb = (Cbn )1 = (Cbn )T makes the nine unknowns
less flexible. Actually, one needs at least four readings ~v1n , ~v1n , ~v2b , ~v2b from two different vectors ~v1 , ~v2 to
uniquely determine Cbn . Those two groups of readings
can be measured by accelerometer and magnetometer
respectively.

The first group of readings is provided by ac~


celerometer, whose reading A(t)
is a measurement of
b
~
the supporting force Fsupp (t) that the mobile phone
applies on its accelerometer chip with respected to
b-frame. Cnb (t) is the transformation matrix that we
n
want to solve. F~supp
(t) is the supporting force reading
with respect to n-frame. ~A (t) is the measurement
n
~
error. In addition to F~supp
(t), the gravity force G
also applies on the chip. Consider the synthesis force
n
~ n , we can get the acceleration
F~ n (t) = F~supp
(t) + G
of the mobile phone in n-frame ~annb (t) = F~ n (t)/m0 .
The synthesis force value equals to the acceleration
with unit mass, then the accelerometer reading can
be expressed as:

derivative of the horizontal locations: ~anGP Sk (t) =


[d2 cx (t)/dt2 , d2 cy (t)/dt2 , 0]T . If we divide ~annb (t) into
horizontal part and vertical part ~annb (t) = ~annbk (t) +
~annb (t), ~anGP Sk (t) is an estimate for ~annbk (t). Moreover,
the time interval between two sample points is small
(0.02s in our implementation, sensors by resampling,
GPS at 1Hz by interpolation 4), so we can use the
transformation matrix Cnb (t ) in the previous sample
to approximate Cnb (t). The new acceleration relation
is:

~ + ~A (t) = C b (t) F~ n (t) = C b (t) (F~ n (t) G


~ n)
A(t)
n
supp
n

Second, by doing tests, we find ~A (t) affects the


~ The measured |A(t)|
~
amplitude of A(t).
differs from
~
9.4 to 10.4 in different positions. If |A(t)|
=
6 |~g n | 9.8,
the derived Cnb (t) will not satisfy the orthogonality.
On the other hand, there still has an unknown ~annb
in (10), whose direction is same as ~g n . We keep the orthogonality and eliminate ~annb through normalizing
both sides of the equation in (10).

Cnb (t)

(~annb (t)

~g )

(6)

Particularly, when the phone is at rest or in uniform


motion, ~annb (t) = 0, we have this estimate:
~ Cnb (t) ~g n
A(t)

(7)

The second group of readings is provided by mag~


netometer, whose reading M(t)
is the measurement
of the strength and direction of magnetic fields with
respect to b-frame:
~
~ en+M
~ lb (t)
M(t)+
~M (t) = Cnb (t) M

(8)

~M (t) is the measurement error. The Earths magnetic


~ n is ubiquitous and approximately points to
field M
e
the North. Its exact value is provided in the pub~ b (t) is generated by the local
lic database [10]. M
l
surrounding materials, such as Iron product, electric
current and so on. Particularly, when there is no
~ b (t) = 0, we have the
local magnetic interference, M
l
estimate:
~
~ en
M(t)
Cnb (t) M

(9)

From the readings of the two sensors, Cnb (t) can be


estimated by solving several equations from (7)(9).
3.2.2 Accelerometer Compensation
The real measurement is far from the ideal assumptions in (7). For the accelerometer, there are two
reasons affecting the calculation of Cnb (t). First, the
car speed is always changing, so the acceleration of
the mobile phone body with respect to n-frame is not
zero: ~annb (t) 6= 0. We compensate it by considering the
horizontal acceleration obtained from GPS. Second,
the value of ~A (t) is too large to be ignored. We unify
the accelerometer reading to eliminate the impact
of scalar value error in solving Cnb (t). Details are
presented below.
First, from (6), ~annb (t) is unknown and can not
be determined by accelerometer. We solve this
problem by introducing the GPS horizontal acceleration, which is calculated through the second

~ 0 (t) = A(t)
~ Cnb (t ) ~an
A
GP Sk (t)

=Cnb (t) (~annb (t) ~g n ) Cnb (t ) ~anGP Sk (t) ~A (t)


Cnb (t) (~annb (t) ~g n )

~ 0 (t)/|A
~ 0 (t)| Cnb (t) [0, 0, 1]T
A
3.2.3

(10)

(11)

Magnetometer Compensation
~ b (t) is a main contributer to
The local magnetic field M
l
the magnetometer readings in many cases, where (9)
~ b (t) = M
~ b as an unknown
does not hold. We treat M
l
l
constant parameter and calculate it during the learning step. Readings of the magnetometer are specially
rotated and scaled to reduce error. We present these
two approaches below.
First, any electric current and magnetic material
near the mobile phone generate magnetic fields,
~ b (t). Fig.5(a) is an in-door test.
which contribute to M
l
The mobile phone is hanged over a steel table from
~
70cm to 0cm. M(t)
is recorded with different distance
values and shown in dot points. The color of the
point indicates the distance; the darker the closer.
The black arrow is the negative gravity direction,
obtained by averaging accelerometer readings. The
angles between the black arrow and magnetometer
~
~
~ n i are constant if
readings hA(t),
M(t)i
h~g n , M
e
b
~
~ b (t) is definitely
Ml (t) = 0. The result shows that M
l
none zero and is a main component of the magnetic
fields in common cases.
The experiment in Fig.5(b) illustrates the possibility
to compensate Mln (t). We put the mobile phone screen
up on a chair that can rotate, and the sensor readings
are recorded at different angles until the rotation
forms a circle. The black arrow is the negative gravity
~
direction obtained by averaging A(t).
The hollow
points are the readings of the magnetometer and form
a circle. However, due to the impact of the material
of the chair and the mobile phone case, the center of

20

10
0

10

< gn,Mne >

20
20

40

30
40

50

50
50

0
40

30

20

10

10

10

50

(a)

60

40

20

20

40

60

80

(b)

Fig. 5. Magnetometer Test

the circle is slightly shifted from the expected value


~ en i. We explore
and violates the angle relation h~g n , M
the relation between the two circles and find the local
magnetic field Mlb = Cnb (t) Mln (t) is a constant 3
and can be estimated through a closed loop path. The
~ b is generated as user profile
compensation value M
estl
in 3.5.1.
~ 0 (t) = M(t)
~
~ b C b (t) M
~n
M
+M
estl
n
e

(12)

Second, the angle constraint does not hold for every sample in (11) and (12) due to various errors:
~ 0 (t), M
~ 0 (t)i =
~ en i. Those error could orighA
6 h~g n , M
inate from in-car magnetic field changes caused by
electronic devices or out-car magnetic field changes
caused by different terrains and buildings [11]. This
inequality makes Cnb (t) violate the orthogonality. The
~ 0 (t)
problem is relieved by adjusting the direction of A
~ 0 (t). We choose to adjust M
~ 0 (t) because M
~b
or M
estl
~
contains more error sources for two reasons: Mlb (t)
is not a strict constant due to several unpredictable
factors such as the mobile phone current, and the
rotation in closed loop does not form a perfect circle
because of the road slope angle variation.
~ 0 (t) in the plane determined by A
~ 0 (t)
We rotate M
0
~
and M (t). The new relation is obtained by vector
cross product:
~ = (A
~ 0 (t) M
~ 0 (t)) A
~ 0 (t)
M
~ /|M
~ | Cnb (t) [0, 1, 0]T
M

(13)
(14)

3.2.4 Method Summary


The calculation of the frame transformation matrix
Cbn (t) uses the sensing data from accelerometer, magnetometer and GPS. The method flow is:
~
1) The original accelerometer reading A(t)
is compensated in (10) with the horizontal acceleration
estimated from GPS trace.
~
2) The original magnetometer reading M(t)
is compensated in (12) with the local magnetic field bias
~ b , which is a constant after the learning step.
M
estl
3. As the strength of the magnetic field attenuates inversely with
the third power of the distance, which is considered to be very fast.
~ b (t) is the closely attached vehicle body.
The main contributer for M
l
Other magnetic interference from the nearby mobile devices such
as notebook is negligible after tens of cm attenuation.

~ 0 (t) according to A
~ 0 (t) in (13) to meet
3) We rotate M
the angle constraint that restricts the direction of
the gravity and geomagnetic fields.
4) We normalize obtained vectors to reduce scalar
value error in (11) and (14)
5) The third column of Cnb (t) is estimated by (11).
The second column of Cnb (t) is estimated by (14).
The first column is determined by the other two
columns through the orthogonality.
The composition of Cnb (t) shows the essence of
the calculation. Consider the moving direction vector reading in b-frame d~b , the corresponding reading
d~n (t) = Cbn (t) d~b in n-frame is the slope angle that
we want to obtain. As Cbn (t) = (Cnb )T (t), dnz (t) is
determined by the third column of Cnb (t), which is
mainly measured by the accelerometer. The similar
observation holds for dny (t), which is mainly determined by the magnetometer. The conclusion is that
the accuracy of the slope angle calculated in this
method is mainly determined by the accelerometer.
3.3

Frame Transformation Calculation II

In this section, we use sensing data from gyroscope


to calculate Cnb (t). 3.2 calculates Cnb (t) at very t
independently, while the calculation in this section
based on the change rate of Cnb (t). We first introduce
the basic algorithm, then we discuss the calibration
method.
3.3.1

Calculation Method

Gyroscope is a sensor that measures the mobile phone


~
body rotation angular velocity. Its reading W(t)
estib
mates the rotation angular velocity
~ nb (t) of the mobile phone b-frame with respect to n-frame. In Fig.2,
the circular arrow is the positive rotation direction.
For example, if we put the phone screen up on the
desk and rotate it counterclockwise, the z-axis reading
Wz will have positive value.
b
The relation [12] between Cbn (t) and
~ nb
(t) is:

b
b
0
nbz
(t) nby
(t)
dCbn (t)
b
b
(t)
0
nbx
(t)
=Cbn (t) nbz
dt
b
b
nby (t) nbx (t)
0
b
=Cbn (t) T (~
nb
(t))

In discrete case, take the previous sampling time as


t :


b
Cbn (t) = Cbn (t ) T (~
nb
(t))(t t ) + I
(15)
In (15), Cbn (t) is calculated in a iterative way. The
initial value Cbn (t0 ) is obtained through the method
in 3.2.
3.3.2

Gyroscope Calibration

Consider the simple error model [12] for x component


b
in gyroscope x nbx
+ x = Wx , where x is the bias

d~n (t) = Cbn (t) d~b . Then, d~n (t) is transformed to d~n (s)
by aligning the time in GPS trace as (1). Road slope
angle (s) is determined by d~n (s) in (3). We contribute
to this simple calculation by fusing the measurement
data from different sensor sources.

10

20

40

Time(s)

60

80

slow down

Fig. 6. Static Gyroscope Measurement

error and x is the scale error. We perform one experiments to show the error properties of gyroscope, and
propose a simple scheme to reduce the bias error.
In the experiment, we record the reading of the
gyroscope in a static situation 4 . Results are shown
in Fig.6. The angle value is the integration of the
angular velocity, for example, x (t) =
Rcorresponding
t
Wx (ti )dti . This results shows that the low-cost
0
gyroscope has large bias error . The value of is
stable because the slope of the curve does not change
much. Therefore, we treat as a constant and update
it whenever the mobile phone is not moving. The
static period can be judged by the variance of the
acceleration. The gyroscope is calibrated in (16).
b
~ 0 (t) = W(t)
~
W
~
~ nb
(t)

(16)

3.3.3 Method Summary


The calculation method based on gyroscope works as:
1) The gyroscope bias error ~ is updated according to
(16) once the mobile phone is static.
2) We calculate one initial matrix Cbn (t0 ) from 3.2.4.
3) Cbn (t) is calculated iteratively by taking (16) into
(15).
From (15), the measurement error in gyroscope
accumulates with time. We will handle this problem
in the next section.
3.4

3D Road Modeling

Guided by the accuracy metrics, the 3D road model


of 3Rd contains two aspects: the road height and
the road slope angle. We first obtain the road slope
angle (s) by using the the moving direction and the
frame transformation matrix obtained in 3.2 and 3.3.
Then we generate the road height using the geometric
relation between the road angle and horizontal displacement.
3.4.1 Road Slope Angle Calculation
Given the frame transformation matrix Cbn (t) and
the moving direction d~b with respect to the car, the
moving direction with respect to the Earth is given by
4. n-frame is not an inertial frame actually. The angular
rotation speed of Earth in inertial space is about 4.2
103 dps(degree/second). The impact is very small in our experiments

Angle (degree)

Angle(degree)

10

stopped

speed up
deceleration
zones(obstacles)

acc
acc without GPS
gyro

10
330

340

350

360

Time (s)

370

380

390

400

Fig. 7. Angle Measurement Comparison


The fusing method is motivated by the properties of
the two different sensor sources used to derive Cbn (t):
The one in 3.2 is mainly based on accelerometer
and the one in3.3 is mainly based on gyroscope. We
use acc (t) and gyro (t) to denote the calculated angle
respectively. Consider the motivated example in Fig.7
taken from the real trace in 5, it shows the real
performance of acc (t) and gyro (t). The car is first
stopped by the traffic light. After several seconds, the
car speeds up and encounters two deceleration zones
(Fig.10(b)). Those curves indicate three points: First,
acc (t) and gyro (t) are quite different wherever acceleration occurs. Second, the difference is not caused
by the GPS compensation scheme in 3.2.2. On the
contrary, one reason for the difference is that our
compensation scheme can not fully compensate the
horizontal acceleration. Third, gyro (t) shows a fine
variation when the car encounters the deceleration
zones. This example motivates us to take gyro (t) as
the complement to describe the road angle detailed
variations.
In order to leverage the properties in the modeling, we verify them in distance domain. Consider
acc (s) = (s) + acc (s) and gyro (s) = (s) + gyro (s),
where (s) is the real angle and acc (s)gyro (s) are
the measurement errors. First, if we treat acc (s) as
a random variable dominated by car acceleration, its
variation is of high frequency compared with the road
shape such as down hill or up hill. In other words,
the low-frequency part of acc (s) is accurate. Second,
gyro (s) is not affected by the error sources in acc (s)
and the random noise in gyroscope are eliminated
by the integration-like calculation. However, gyro (s)
is cased by the system error of gyroscope and increases with time/distance. Therefore, gyro (s) is of
low frequency and the high frequency part of gyro (s)
is accurate.
From the above analysis, we design two filters
to improve the calculation for (s). We use a lowpass filter on acc (s) to remove acc (s) and the highfrequency part of (s). Similarly, we use a high-

pass filter on gyro (s) to remove gyro (s) and the


low-frequency part of (s). The filtered signals are
combined to get the new estimate m (s). The cut-off
frequency we selected is 200m, which means an uphill
and downhill pair is treated of high frequency if their
horizontal distance is less than 200m.
3.4.2 Road Curve Calculation
We generate the road curve model cmz (s) by considering the geometric relation in (2) and (3). In discrete
case, it is:
cmz (sk ) =

k
X
i=0

(si+1 si ) tan m (si )

(17)

3.4.3 Method Summary


1) We use Cnb (t) from 3.2 3.3 and d~b from user
profile to get two road slope angle estimates acc (t)
and gyro (t). acc (t) and gyro (t) are mapped to
acc (s) and gyro (s) according to the GPS trace(1).
2) We fuse the two slope models by applying
band pass filters: m (s) = Lowpass(acc (s)) +
Highpass(gyro (s)).
3) The vertical dimension of the road curve ~c(s) is
given by cmz (s) in (17)
3.5

Closed Loop Learning

Mobile phone, as a personal device, incurs measurement diversity. We design a learning step in 3Rd
to unify the diversity while keep their manual adjustment minor. The diverse factors, specifically, the
position of the mobile phone holder and the in-car
magnetic field, are relatively stable, so we treat them
as the user profile and obtain them before the first use.
Since the user only need to perform this step once per
car with a fixed mobile phone holder, we believe this
learning process is of low overhead.
The learning process is finished by driving along a
path satisfying two requirements: First, the driving
starts at a certain direction and ends at a similar
direction. This requirement makes the vehicle rotate
for a circle and the in-car magnetic field can be calculated 3.2.3. Second, the path should be self-crossed.
The crossing points have the same height and can
be used as a constraint to calculate moving direction
d~b . A closed loop path concurrently satisfies the two
requirements, so that it is chosen in the learning step
of 3Rd design.
3.5.1 Learning: Local Magnetic Fields Calculation
~ b (t) based on two facts. One is that the
We calculate M
l
strength of the magnetic field inversely proportional
~ b (t)
to the cubic of the distance to the source, so M
l
is dominated by the source nearby. As the mobile
phone is fixed on the car, the magnetic sources such
as car body change directions the same as the mobile
phone. In the view point of the mobile phone, the

North

Up

d(t0)

Height

(t0)

(t0)

East

(a) d~n (t0 )Decomposition

(b) Height Constraint

Fig. 8. Moving Direction d~b Calculation

local magnetic field with respect to the phone body


~ b (t) = M
~ b.
is constant during the measurement: M
l
l
Another fact is that the car body rotates for a circle
in the close loop due to the alignment of the start
and end points. Similar to Fig.5(b), this fact indicates
~ en forms a circle.
~ eb (t) = Cnb (t) M
M
~
Consider the magnetometer readings M(t)
=
b
b
~
~
~
Me (t) + Ml M (t), it is a circle with a constant
~ b from circle M
~ b (t). Note that the cencenter bias M
e
l
b
~
ter and radius of Me (t) satisfy the angle constraint
~ en i.
~
hA(t),
Me~b (t)i hCnb (t) ~g n , Cnb (t) M~en i = h~g n , M
Hence, we use a least squares method [13] to move
~
M(t)
to meet the angle constraint. The moved value
b
~
~ b.
Mestl is the estimate of M
l
3.5.2

Learning: Moving Direction Calculation

The key idea for calculating the local moving direction


d~b is shown in Fig.8. The initial value of d~n (t0 ) =
Cbn (t0 ) d~b is divided into two parts. The horizontal
part (t0 ) determines the horizontal model shape and
the vertical part (t0 ) determines the vertical variation. We search (t0 ) by minimizing the error between
the horizontal model and the GPS trace. After that,
the curve shape is almost determined, then we fix
(t0 ) and search (t0 ) to make the height difference
between the self-cross points as small as possible.
Specifically, given the sampling time t0 ...tn and the
self-crossed points at t0 and tn , The scheme works as:
1) Searching is started by decomposing d~b into a
function of (t0 ) and (t0 ):
d~n (tk ) = Cbn (tk ) d~b = Cbn (tk )Cnb (t0 ) d~n (t0 )
= Cbn (tk )Cnb (t0 ) ~v n ((t0 ), (t0 ))

(18)

The initial rough estimates m (t0 )m (t0 ) for (t0 )(t0 )


are easily obtained by considering the car acceleration.
2) Takes the horizontal displacement between ti and
ti+1 as s(ti ) = s(ti+1 )s(ti ). The horizontal model is
given by (19). m (t0 ) is searched to minimize the total
horizontal difference between the horizontal model
and the GPS trace:
k
q
X
cmx|y (tk )= s(ti )dnx|y (ti )/ dnx 2 (ti ) + dny 2 (ti ) (19)
i=0

9
nq
X
m(t0)=arg min (cmx(ti)cx(ti))2+(cmy(ti)cy(ti))2

(20)

(t0 ) i=0

3) We fix (t0 ) to m (t0 ) and search (t0 ) to minimize the height difference at the crossing point:
m (t0 ) = arg min |cmz (tn ) cmz (t0 )|

(a) Slope Measurement Device

(21)

(t0 )

25

The moving direction with respect to the mobile


phone body d~b is obtained by substituting m (t0 ) and
m (t0 ) into (18). Due to the space limitation, we omit
the proof of the effectiveness and the uniqueness of
the searching method for (t0 ) and (t0 ).

20
15
10
5
0
1

I MPLEMENTATION

The data is collected by Samsung Galaxy S II with


Android 2.3. We use the FASTEST level of sampling
rate in the sensing data logging application. With
all the sensors opening, the sampling rate of the
accelerometer and the magnetometer is about 60Hz
and the rate of the gyroscope is about 100Hz. Each
record is trigged by one sensor event and has the
format htimestamp, vx , vy , vz i. timestamp is the event
time in nanosecond and its value is counted from the
last power on. GPS has an independent mechanism,
whose fastest sampling rate is fixed to 1 Hz. The default timing method in GPS uses milliseconds counted
from 1970. We record a nanosecond time once GPS
event triggers the handle in our program to align the
time with sensor records. The record for GPS has similar format htimestamp, latitude, longitude, altitudei.
3Rd server algorithm is currently implemented in
Matlab without parallelism. The desktop is Intel i7 950
and 3G RAM. The total modeling time for a 2km road
is about 6.1s, which can be largely improved with C
implementation.
In order to unify the sampling time among sensors,
we use 50Hz to resample the sensing data. Normally,
the car speed is less than 25m/s or 90km/h. 50Hz is
enough to sense the slope changes within 1m. We use
the linear interpolation in the resampling, alternative
interpolation methods do not show improvement in
~
~
performance. After resampling, we obtain M(t),
A(t)
~
and W(t).
For GPS, its sampling rate is much lower
than 50Hz. The horizontal trace is linearly interpolated and smoothed by a moving-sum-filter, and then
we have cx (t),cy (t). The above all are the complete
input for the modeling method in 3.

E VALUATION

We evaluate 3Rd in four steps. First we give a field


solution to accurately measure the slope in real road
as the benchmark. Then, we compare the results of
3Rd to the benchmark data. After that, we explain
the limitation of existing 3D road modeling methods.
Last, a real application example is used to show the
effectiveness of 3Rd.

0.5

0.5

Measurement Error (degree)

(b) Accuracy Evaluation

(c) Results

Fig. 9. Slope Measurement Device


5.1

Real Road Benchmark

In this subsection we describe the benchmark used


for evaluation. First we introduce the field measurement method, then we describe the properties of the
obtained benchmark.
5.1.1 Road Slope Measurement
In order get the benchmark data from real roads, a
field measurement device is developed based on the
accelerometer. The mechanism of this device is using
the accelerometer to measure the difference of the
gravity directions between the sampling location and
the level point.
Fig. 9(a) shows its architecture. The mobile phone
is tightly fixed on a cubic box by scotch tapes. The
box has large underside to tolerant sands and small
stones on the road surface. There is another white
cube between the box and the mobile phone. The gap
between the white cube and the box is filled by papers
to adjust fine-grained level. We use a ping-pong ball
to find a level desk and record the level point reading.
In the measurement, we put down the device on the
center of the road and head it to the moving direction.
The angle between the level point and the acceleration
direction is treated as the slope angle . Then, we use
GPS and a tape to map the angles to their locations.
GPS Locations are measured every 10m. Road angles
are measured every meter and equally inserted between two GPS locations. Finally, we get (s). Height
cz (s) is obtained by (17).
As the accuracy of the benchmark is determined
by the accelerometer. We experimentally quantify the
direction measurement ability of the accelerometer in
Fig. 9(b)(c). The evaluation is done through comparing the measured gravity direction by the accelerometer with the result obtained by a protractor. As shown
in Fig. 9(b), the mobile phone is fixed to a protractor
panel by a solid cylinder. The gravity direction is indicated by a pendant. A mirror is used to aid accurate

10

5.2

Plane Construction Downhill

The Benchmark

The road for evaluation is shown in Fig. 10(a). The


benchmark is measured on the road with the tool described in Fig. 9(a). Results are shown in Fig. 11(b)(c)
tagged with benchmark.
The reason for choosing this road is the rich slope
variation and road conditions. In a high view, the road
is a 1.7km mountainous loop road. It consists of one
downhill (300 900m), one uphill (900 1700m) and
several plane segments. The average slope angle of the
downhill and the uphill is about 6 , which is definitely
considered as steep slope [14] and several warning
signed are set alone the road. In addition to the steep
slope trend, there exists 8 deceleration zones whose
surface are raised to keep drivers alert. Their variation
contribute to the 8 peaks in Fig.10(b). Further, the road
also contains several bumps in the segment under
construction(50 300m). As a summary, the CDF in
Fig.10(b) shows that the slope variation in 10m is
larger than 3 in more than 10% of the road segment.
The above features enrich road conditions and make
it suitable for modeling evaluation.
The accuracy of the slope angle in the benchmark
is quantified in 5.1.1. For the height benchmark, we
view its accuracy indirectly. First, the last point of
the loop road is just the beginning of the road. If
the initial point is 0, then the last point cz (sn ) is
calculated by accumulated summation and equals to
0 in principle. The actual value of cz (sn ) is 0.7m.
Further, the difference of the maximum and minimum
altitude of the road consulted from road construction
map is 137.6472.85 = 64.79m. The same value in our
measurement is 63.97m, and their difference is 0.82m.
The above two numbers indicate the height error in
the benchmark is within one meter.

Real Road Evaluation

In this subsection, we compare the modeling result


of 3Rd with the benchmark and evaluate component
schemes separately.

Start Point

(a) The Road for Evaluation

CDF

5.1.2

Driving
Direction

The North

Slope Variantion

reading. When the mobile phone rotates for , which


can be read from the pendant, the gravity direction
measured by the accelerometer should change for a
same angle.
Based on , the mobile phone is rotated for 360
in 10 interval. The rotated angle measured by the
accelerometer is defined as the difference between the
initial gravity direction and current gravity direction:
~
~
0 (i) = hA(0),
A(i)i.
Therefore, 0 (i+1) 0 (i)10 is
just the error of angle measurement.The same test is
done for three axes, the overall histogram is shown
in Fig. 9(c). Results indicate the error of the slope
angle by this device is within 0.8 , which is the error
bound for our benchmark.

Uphill

10

Deceleration Zones

0
0

1
0.8
0.6
0.4
0.2
0
0

200

400

600

800 1000 1200 1400 1600

Horizontal moving Distance (m)

Slope Angle Variantion per 10m (degree)

(b) Road Conditions

(c) Deceleration Zone in Yellow

Fig. 10. The Benchmark Road

5.2.1

3D Modeling Overview

We perform 3Rd method on the road in Fig.10(a).


The mobile phone is fixed on the taxi by tape or
mobile phone holder. We ask the driver to drive
along the road for several loops. In the first loop, we
perform the learning step to generate the user profile
(the driving direction and the magnetic noise). We
use the data in other loops to model the road and
show the effectiveness of the method. The modeling
tests are performed for 17 times with different taxis
and mobile phone positions. The driving speed for
each test is is very diverse depending on the traffic
light and pedestrians. The statics of the speed for all
the tests are shown in Fig.12. The portion of zero
speed is mainly caused by the traffic light in the
construction segment. During 70% of the time, the
speed is less than 40km/s, which is the normal speed
in urban areas. The maximum speed is 60km/s, which
is close to the designed speed of highways of the
mountainous terrain [15].
The final model of the road is shown in Fig.11.
Based on the metrics in 3.1.3, we view the model in

11

Relative Height (m)

1
0.8

20

3Rd

0.6

3RdALL
Baro

0.4

GPS

0
0

10

GPS
Baro
Benchmark
3Rd
Google

40

Google
0.2

5
0

60

15

70

20

Height Error (m)

200

400

600

1
0.8
0.6
0.4

Baro

0.2
0
0

3Rd
2

Angle Error (degree)

1200

1400

1600

1200

1400

1600

(b) Road Height

Road Slope Angle (degree)

(a) CDF of Height Error

800
1000
Horizontal Moving Distance (m)

15
Baro
Benchmark
3Rd

10
5
0
5
10
0

200

400

600

800

1000

Horizontal Moving Distance (m)


(d) Road Angle

(c) CDF of Angle Error

Fig. 11. Real Road Evaluation


1

TABLE 1
Method Components

0.8
0.6
0.4
0.2
0
0

10

20

30

40

Driving Speed (km/h)

50

60

Fig. 12. Driving Speed of the Modeling Evaluation


both height and angle. CDF of the height error for all
the tests is tagged as 3RdALL. CDF of the angle error
for all the tests is coincidence with the one with tag
3Rd. As the results for different tests are quite similar,
curves in Fig.11 tagged as 3Rd only present the results
of one test. The modeling results are compared with
the benchmark in Fig. 11. The maximum height error
is about 4m. The mean height error is 1.65m. 90%
height errors are less than 2.5m. The maximum angle
error is about 6.5 , 90% angle errors are less then 2 .
5.2.2 Components Evaluation
In 3Rd, we develop and combine several schemes
to improve the modeling accuracy. We evaluate each
component by disabling it to see the modeling result.
Table.1 lists the brief summery and the corresponding
abbreviations in Fig.13. we use 3Rd-X to indicate 3Rd
minus X scheme. For example, 3Rd-2 denotes the 3Rd
modeling results without compensating the magnetic
field interference. We ignore 3Rd-4 in this section
because of its obvious results. All the component evaluation share the same user profile unless otherwise
mentioned.
In Fig. 13(a), we zoom in the last several meters of Fig. 11(d) to show the impact of horizontal
acceleration without compensation. The upper part

Section
3.2.2

3.2.3

3.2.3

4
5

3.3.2
3.4.1

Method
Reduce the horizontal acceleration
~an
(t) through GPS
GP Sk
Compensate the magnetometer reading
~b
with local magnetic field M
l
Eliminate the impact of magnetometer on
angle measurement by rotating
Subtract the bias error from gyroscope
Fuse the measurement of two sensors
through filter

Abbr.
3Rd-1
3Rd-2
3Rd-3
3Rd-4
3Rd-5

of Fig.13(a) is the horizontal acceleration calculated


from GPS. The car is stopped at 1700m, so the latter
part of the curve shows a continuous deceleration.
Measured angle by 3Rd-1 in the lower part of Fig.13(a)
is distorted from the benchmark with a trend similar
as the horizontal acceleration.
As we directly fix the mobile phone on the platform
under the windshield of the taxi, the local magnetic
~ b is large. In Fig. 13(b), points tagged as 3Rdfield M
l
2 are the magnetometer readings without compensation. The black arrow is the average of the negative
gravity direction. The magnetic compensation scheme
plays critical role in generating accurate moving direction. The best fitted curve in horizontal searching
in3.5.2 is shown in Fig. 13(c). Due to the wrong
horizontal moving direction, the vertical moving direction searching is also affected. Take the wrongly
selected moving direction d~b , the real measurement
shows large error in Fig.13(e)(f) tagged 3Rd-2.
In Fig. 13(e)(f), lines tagged 3Rd-3 are generated by
~ to fit the angle restriction h~g n , M
~ en i.
rotating the A(t)

aGPS||

zero

1
10

Road Slope Angle (degree)

500

Benchmark

3Rd
3Rd-1

5
1400

1450

1500

1550

40

400

20

300

200

20

100

40

0
40

1600

1650

50
20

1700

Horizontal Moving Distance(m)

(a) Accelerometer

0
20

40

3Rd-2
GPS
3Rd

4
2
0
2
4
6
8

12

200

(b) Magnetometer

Benchmark
3Rd
3Rd-5
3Rd Gyro

10

3Rd-2
3Rd 200

50

200

700

750

800

850

900

950

1000

Horizontal Moving Distance (m)

(c) Horizontal Trace

(d) Shape Filter

1
0.8

0.8

3Rd
3Rd-2

0.4

3Rd-3

0.2

3Rd-5
2

Height Error (m)

3Rd

0.6

3Rd-1

0.6

0
0

100

Road Slope Angle (degree)

Acc(m/s2 )

12

10

3Rd-1

0.4

3Rd-2

0.2

3Rd-3

0
0

(e) Height Error CDF

3Rd-5
1

Angle Error (degree)

(f) Angle Error CDF

Fig. 13. Components Evaluation

These CDF verify our claim in 3.2.3 that readings of


magnetometer decrease the modeling accuracy.
Curve tagged 3Rd-5 in Fig.13(d) is the result without combining the high frequency part of gyroscope
measurement. 3Rd Gyro is the result with full frequency of gyroscope measurement and is obviously
biased from benchmark. However, landmarks such as
artificial deceleration zones, can be distinguished in
the 3Rd Gyro rather than 3Rd-5. The improvement of
3Rd in 13(e)(f) is contributed by the high frequency
part of 3Rd Gyro. Nevertheless, the improvement is
limited by the reason that the benchmark is not well
aligned with the car measurement in locations due to
GPS error. In Fig.13(d), peaks in 3Rd do not compensate peaks in benchmark even though they are very
close. We will discuss this issue in 6
5.3 Other Modeling Approaches
5.3.1 GPS Altitude
GPS altitude is an approach to measure the road
height. However, reasons such as short receiving antenna make the localization accuracy in mobile phone
worser than the official report [16]. A recent study
[17] on iPhone3GS shows the median vertical error is
about 11m and the median horizontal error is about
9m in ideal outdoor conditions. We get similar result
in our evaluation in Fig.11, where we plot the relative
altitude and tag it as GPS.
5.3.2 Aerial and Satellite Survey
Aerial images are widely used to generate terrain
elevation. The National Elevation Dataset [18](NED)

is the primary elevation data product of the USGS. It


is available in the U.S. at different resolutions from
30m to 3m. The resolution defined in Xm means the
terrain is measured in unit of gird with side length of
Xm. The mean relative error reported by [18] is 1.64m.
For the entire world, a 90m resolution NASA database
(SRTM [4]) is available. The 90% relative height error
in the Eurasia is 8.7m [4]. We compare our method
with SRTM because our experimental area is out of
the cover of NED.
The curve tagged Google in Fig.11(b) is the road
elevation obtained from the Google Earth which integrates SRTM data. The large bump from 800m to
900m is unusual. The reason is that the aerial images
are not able to distinguish the terrain elevation the
road elevation. This road is dug into a trench rather
than floating on the hill. This limitation is universal
and it is an obstacle for the aerial survey in supplying
accurate road model. Besides these, the resolution is
blurred by the grid-based measurement. Any points in
one grid share the same elevation and can not provide
high resolution road slope as our model.
5.3.3

Barometer Altimeter

Barometer altimeter is an altitude measurement device based on barometric pressure. We compare our
results with data collected by Samsung Galaxy S
III which has embedded barometer. The input parameters, sea level pressure and temperature, are
requested from public database [19] in real time.
In Fig.11, Results tagged Baro show the barometer

13

altimeter achieves the best height measurement accuracy among legacy methods. Resent work [20] even
uses it as the elevation benchmark.
However, barometer does not fulfill the accurate
road modeling for three reasons. First, it is a height
measurement tool without directly providing road angle information. Differentiating on smoothed barometer measurement is a direct approach to obtain the
slope angle, but the smoothing parameter is normally
hard to obtain and the smoothing process reduces
the amplitude of slope angle. Baro in Fig.11(c) shows
the best signal we obtained by smoothing; obvious
randomness dominates slope details. This property
does not satisfy our slope angle accuracy requirement
in 3.1.3 and the impact on real example is shown
in 5.4. Second, barometer altitude is sensitive to
environmental factors such as the open and close of
the car window, air conditioner temperature and so
on [21]. Third, barometer is still a rare sensor. To our
knowledge, only five high-end mobile phone models
are equipped with MEMS barometer.
5.4

Application Example

Accurate modeling property, especially the angle variation in 3Rd, potentially enables new applications.
Take the motivating example in the first paragraph of
1. we show how the 3Rd model helps drivers detect
slippery road slope in bad weather.
The maximum friction coefficient between ice and
tire is about 0.1 [22], which means the maximum
slope angle resisting to slipping on a road covered
by ice is th = arctan(0.1). We take this value as the
threshold to detect the possible slippery slopes. In
this simple example, the evaluation road is divided
into segments with equal length of 20m. One segment
is considered as slippery if there are more than 1m
slope samples larger than th . We list the results in
Fig.14. The horizontal axis is the index of the road
segments. Pos indicates the slippery segments under
our definition. 3Rd has 5/86 = 5.8% mismatch when
compared with the results of benchmark. However,
when we carefully examine those mismatched points,
we find 4 of them are caused by GPS location misalignment and they do not affect real use at all.
The only false positive one is shown by the arrow.
Therefore 3Rd achieves 1/86 = 1.2% false positive and
0% false negative detection in this example. The best
known rival 3D model obtained by barometer 5.3.3
achieves 23/86 = 26.7% in the detection.

D ISCUSSION

We first identify the error sources in our modeling


method and then we discuss several practical issues:
1. Frame transformation matrix Cbn (t) calculation
error. If we treat the moving direction as an known
parameter, the slope angle is determined by Cbn (t).
As we summarize in 3.2.4, the angle value mainly

Pos
3Rd
Benchmark
Baro
Neg
0

10

20

30

40

50

60

70

80

90

Fig. 14. Slippery Road Slope Detection

depends on the accelerometer direction measurement.


Its error accumulates in the height calculation due
to the integration property. Even the expectation of
height error is zero, its variance increases with moving
distance.
2. GPS horizontal error. The locations of the deceleration zones in Fig. 11(d) are shifted from the
benchmark. One reason is that the sampling rate of
GPS is fixed to 1 second which is too low to get the accurate location when the car is moving. However, the
problem is not that obvious when considering traces
from multiple runs. The accuracy of the location of the
steep slopes can be increased by averaging. The trace
level combining/averaging can also be implemented
by using the Dynamic Time Warping Algorithm.
3. Moving direction d~b error. The height error is
proportional to the product of the horizontal moving
distance and the tangent value of the angle error in d~b .
The value selected in the learning step may not be the
fittest vector in the regular measurement. In Fig.11(b),
3Rd is rotated for a tiny angle from the optimal value
(height at the end should be zero). However, 3Rd
can automatically calibrate the direction value when
encountering a loop. Even in a long traveling that
does not have a loop path, the result of 3Rd can be
calibrated by other altitude measurement methods.
For example, the GPS has large error in the altitude
measurement, but in a long range, its error will not
increase. These inaccurate estimations can be used as
constraints to adjust the value of d~b .
4. Communication and battery overhead. The
power consumption of our application is not considered as a problem like other mobile applications.
This is because most cars are equipped with a 12V
charging port or even USB ports in the vehicle media
panel. The communication overhead is also negligible
since we do not target real-time road modeling. We
note that the rate of sensing data is about 5k Byte/s.
Therefore, even after a long drive of several hours or
one day, the amount of data is limited to 100MB level,
which is quite affordable for current smart devices.
Users may upload data whenever they encounter
convenient accessible networks.

R ELATED W ORK

Using sensors to navigate air craft in 3D space has


been widely studied in navigation and robotic area
[12]. 3D road modeling is an inverse process of 3D

14

navigation, but navigation algorithms are not applicable to our scenario due to low sensor quality. The
study of using low-cost sensor in navigation focuses
on 2D scenarios [23], where the inertial sensors are
used to aid vehicle positioning when GPS is temporarily unavailable. One big problem in low-cost sensors
is their accuracy. Recent work A3 [24] proposes a
method to find the right time to calibrate gyroscope
according to the measurement from accelerometer
and magnetometer. However, their method cannot be
applied in in-car scenario since car body introduces
continuous bias in magnetometer measurement [11].
Work directly related to 3D road modeling can be
divided into three categories. The first kind equips
camera or laser scanner on vehicles to collect road
information. [6] uses the a vision based method to
detect road slope, but it does not provide exact angle
value. The laser scanner [5] is also a classical tool in
3D modeling. 3Rd is not based on optical method and
does not require special equipments. The second kind
is based on vehicle sensing. [2] uses mass effect on
heavy-duty vehicles to obtain road slope angle. Their
method is not scalable to normal vehicles. [1] uses
additional vehicle sensors to calculate road slope in
real time. 3Rd only needs a mobile phone. Third, aerial
images such as SRTM [4] can also be used to get
road height information. 3Rd additionally provides
accurate slope angle information in the model.
Some work uses mobile systems to sense road
conditions. Most of them differ from us by focusing
on the traffic condition or driving behavior [25] rather
than the detailed road shape. The most relevant one,
Pothole Patrol [26] uses the abnormal readings of
a mobile sensing platform to detect potholes when
the car goes over a pothole. 3Rd aims at providing
detailed road shape rather than identifying special
road patterns such as potholes or bumps. In [20],
they use USGS data to provide accurate elevation for
cyclist and use barometer as benchmark. As we show
in 5.3.3, barometer is not sufficient to fulfill road
angle accuracy requirement.

[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]

[12]
[13]

[14]
[15]
[16]
[17]
[18]
[19]
[20]
[21]
[22]
[23]
[24]
[25]
[26]

C ONCLUSION

This paper studies the feasibility of using commodity


mobile phone to achieve low-cost and accurate 3D
road modeling, which is considered to be a challenging problem due to the low quality sensors and
the complex user behavior. However, it is clear that
before the real deployment of 3Rd, much more work
is required. It would be very interesting to develop
crowdsourcing method to improve the model quality
among multiple measurement.

R EFERENCES
[1]

Y. Sebsadji, S. Glaser, S. Mammar, and J. Dakhlallah, Road


slope and vehicle dynamics estimation, in American Control
Conference, 2008.

P. Sahlholm and K. Henrik Johansson, Road grade estimation


for look-ahead vehicle control using multiple measurement
runs, Control Engineering Practice, vol. 18, 2010.
P. Vemulapalli, A. Dean, and S. Brennan, Pitch based vehicle localization using time series subsequence matching with
multi-scale extrema features, in ACC, 2011.
SRTM, http://goo.gl/cuZYP8.
A. Jaakkola, J. Hyyppa, H. Hyyppa, and A. Kukko, Retrieval
algorithms for road surface modelling using laser-based mobile mapping, Sensors, vol. 8, 2008.
J. Zhao, M. Whitty, and J. Katupitiya, Detection of non-flat
ground surfaces using v-disparity images, in IROS, 2009.
C. Barthold, K. P. Subbu, and R. Dantu, Evaluation of
gyroscope-embedded mobile phones, in SMC 2011.
S. Chuanzhu, H. Chaohui, and Z. Yong, Based on adams
optimal design of atv motorcycle for gradeability and shock
absorption property, in ICDMA), 2010.
Grade warning signs, http://goo.gl/TKHaxy.
NGDC geomagnetic calculators, http://goo.gl/aFKAov.
Y. Wang, Y. Chen, J. Yang, M. Gruteser, R. Martin, H. Liu,
L. Liu, and C. Karatas, Determining driver phone use by
exploiting smartphone integrated sensors, Mobile Computing,
IEEE Transactions on, vol. PP, no. 99, pp. 11, 2015.
D. Titterton, J. Weston, D. H. Titterton, and J. L. Weston,
Strapdown Inertial Navigation Technology, 2nd Edition. IET, 2004.
C. M. Shakarji, Least-squares fitting algorithms of the
NIST algorithm testing system, JOURNAL OF RESEARCHNATIONAL INSTITUTE OF STANDARDS AND TECHNOLOGY, vol. 103, 1998.
Manual on uniform traffic control devices, http://goo.gl/
uUmk2n.
Geometric design of highways and streets, http://goo.gl/
lvgN7f.
GPS accuracy, http://goo.gl/lD645j.
P. A. Zandbergen, Accuracy of iPhone locations: A comparison of assisted GPS, WiFi and cellular positioning, Transactions in GIS, 2009.
NED, http://goo.gl/Uj3Ywm.
Hong kong weather, http://goo.gl/9NtJH7.
A. Zhan, M. Chang, Y. Chen, and A. Terzis, Accurate caloric
expenditure of bicyclists using cellphones, ser. SenSys 12.
ACM.
J. Parviainen, J. Kantola, and J. Collin, Differential barometry
in personal navigation, in Position, Location and Navigation
Symposium, 2008 IEEE/ION, 2008.
F. Gustafsson, Slip-based tire-road friction estimation, Automatica, vol. 33, pp. 10871099, 1997.
S. Godha, Performance evaluation of low cost mems-based
imu integrated with gps for land vehicle navigation application, Department of Geomatics Engineering, 2006.
P. Zhou, M. Li, and G. Shen, Use it free: Instantly knowing
your phone attitude, ser. MobiCom 14.
P. Mohan, V. N. Padmanabhan, and R. Ramjee, Nericell:
rich monitoring of road and traffic conditions using mobile
smartphones, in ACM Sensys, 2008.
J. Eriksson, L. Girod, B. Hull, R. Newton, S. Madden, and
H. Balakrishnan, The pothole patrol: using a mobile sensor
network for road surface monitoring, in ACM MobiSys, 2008.

You might also like