Slides - Department of Information Technology

Rapid Classification of Vehicle Heading
Direction with Two-Axis Magnetometer
Niklas Wahlström 1
Roland Hostettler2
Fredrik Gustafsson1
Wolfgang Birk2
1 Division
of Automatic Control
Linköping University
Linköping, Sweden
2 Division
of Systems and Interaction
Luleå University of Technology
Luleå, Sweden
Niklas Wahlström, Roland Hostettler, Fredrik Gustafsson, Wolfgang Birk
Rapid Classification of Vehicle Heading Direction with Two-Axis Magnetometer
AUTOMATIC CONTROL
REGLERTEKNIK
LINKÖPINGS UNIVERSITET
Background
Traffic monitoring in wireless
sensor network
Sensor nodes equipped
with a magnetometer.
Limitations:
Energy budget
Computational resources.
Information you can extract
Number of vehicles
Type of vehicle
Heading direction
Niklas Wahlström, Roland Hostettler, Fredrik Gustafsson, Wolfgang Birk
Rapid Classification of Vehicle Heading Direction with Two-Axis Magnetometer
AUTOMATIC CONTROL
REGLERTEKNIK
LINKÖPINGS UNIVERSITET
Problem formulation
Magnetic field
2-axis magnetometer has been deployed on the roadside
y
x
yy
0
0
2−axis magnetometer
0.5
1
Time [s]
1.5
2
Magnetometer measures a distortion of the magnetic field.
We want to classify the heading direction of the vehicle!
Niklas Wahlström, Roland Hostettler, Fredrik Gustafsson, Wolfgang Birk
Rapid Classification of Vehicle Heading Direction with Two-Axis Magnetometer
AUTOMATIC CONTROL
REGLERTEKNIK
LINKÖPINGS UNIVERSITET
Magnetic dipole
The vehicle can be modeled as a magnetic dipole:
h(t) =
3(r(t) · m)r(t) − kr(t)k2 m
kr(t)k5
y
Magnetic field
m
Vehicle
Heading direction
Road
r(t)
Sensor position z
x
We measure two components of the magnetic field.
y(kT ) =
1 0 0
h(kT ) + e(kT ),
0 1 0
Niklas Wahlström, Roland Hostettler, Fredrik Gustafsson, Wolfgang Birk
Rapid Classification of Vehicle Heading Direction with Two-Axis Magnetometer
k = 1, · · · , N
AUTOMATIC CONTROL
REGLERTEKNIK
LINKÖPINGS UNIVERSITET
Simulated examples
Three different vehicle are heading in positive x-direction
m
Heading
direction
Heading
direction
r(t)
r(t)
x
Sensor
r(t)
x
Sensor
hx
hy
0
4
0
x
Sensor
hx
hy
0
2
Time [s]
Heading
direction
m
hx
0
y
y
y
m
hy
0
2
Time [s]
Niklas Wahlström, Roland Hostettler, Fredrik Gustafsson, Wolfgang Birk
Rapid Classification of Vehicle Heading Direction with Two-Axis Magnetometer
4
0
2
Time [s]
4
AUTOMATIC CONTROL
REGLERTEKNIK
LINKÖPINGS UNIVERSITET
Simulated examples
Three different vehicle are heading in positive x-direction
y
y
m
y
m
Heading
direction
Heading
direction
Heading
direction
m
r(t)
r(t)
x
Sensor
t=2.55
r(t)
x
Sensor
t=2.14
x
Sensor
t=2.1
hy
hy
t=3.41
t=1.95
t=2.73
t=1.72
hy
t=2.2
t=1.55
t=2.66
t=1.68
hx
t=1.2
hx
hx
All measurement trajectories are turning clockwise!
Niklas Wahlström, Roland Hostettler, Fredrik Gustafsson, Wolfgang Birk
Rapid Classification of Vehicle Heading Direction with Two-Axis Magnetometer
AUTOMATIC CONTROL
REGLERTEKNIK
LINKÖPINGS UNIVERSITET
Key idea
t=2.55
t=2.14
t=2.1
hy
hy
t=3.41
t=1.95
t=1.68
hx
t=2.73
t=1.72
hy
t=2.2
t=1.55
t=2.66
t=1.2
hx
hx
Idea:
Classify heading direction by the turn of the measurement trajectory!
Niklas Wahlström, Roland Hostettler, Fredrik Gustafsson, Wolfgang Birk
Rapid Classification of Vehicle Heading Direction with Two-Axis Magnetometer
AUTOMATIC CONTROL
REGLERTEKNIK
LINKÖPINGS UNIVERSITET
0
0.7
0.77
yx
0.5 1
Time [s]
0.54
yy
0
0.5 1
Time [s]
0.74
0.65
0.98
0.59
yx
x
yy
y
1.17
y and y
yx and yy
Real world data
0.79
0
0.91
0.5 1
Time [s]
0.7
yx
Niklas Wahlström, Roland Hostettler, Fredrik Gustafsson, Wolfgang Birk
Rapid Classification of Vehicle Heading Direction with Two-Axis Magnetometer
0
1.2
yy
yx and yy
yy
yx and yy
1.11
0.5 1
Time [s]
0.91
yx
1.03
AUTOMATIC CONTROL
REGLERTEKNIK
LINKÖPINGS UNIVERSITET
0
0.77
yx
0.5 1
Time [s]
0.54
0.7
0
yy
y
y
1.17
yx and yy
yx and yy
Real world data
0.74
0.65
0.98
0.59
yx
0.5 1
Time [s]
0.79
0
0.91
0.5 1
Time [s]
0.7
yx
0
1.2
yy
yx and yy
yy
yx and yy
1.11
0.5 1
Time [s]
0.91
yx
1.03
Classify driving direction by the turn of the measurement trajectory!
Niklas Wahlström, Roland Hostettler, Fredrik Gustafsson, Wolfgang Birk
Rapid Classification of Vehicle Heading Direction with Two-Axis Magnetometer
AUTOMATIC CONTROL
REGLERTEKNIK
LINKÖPINGS UNIVERSITET
The theorem
Assume the magnetic dipole model
h=
3(r · m)r − krk2 m
krk5
then
dr
y
1
2
x
r dr x y
r dr y > 0
r
111111111
000000000
000000000
111111111
000000000
111111111
000000000
111111111
⇔
y
x
1
2
x
h dhx y
h dhy > 0
11111111111dh
00000000000
00000000000
11111111111
00000000000
11111111111
00000000000
11111111111
h
x
Observe: Independent of m !
Niklas Wahlström, Roland Hostettler, Fredrik Gustafsson, Wolfgang Birk
Rapid Classification of Vehicle Heading Direction with Two-Axis Magnetometer
AUTOMATIC CONTROL
REGLERTEKNIK
LINKÖPINGS UNIVERSITET
The classifier
Integrate over all infinitesimal area segments
f =
Z x
h (t) dhx (t)/dt
dhx hy dhy = hy (t) dhy (t)/dt dt.
Z x
h
The time discrete version will then be
f
N −1 x
x
x
hky (hky+1 − hky )/T T
=
h (h
k
k+1 − hk ) /T
k =1
N −1
y
y
=
(hxk hk+1 − hk hxk+1 )
k =1
y
y
=(hx1:(N−1) )T h(1+1):N − (h1:(N−1) )T hx(1+1):N
∑
∑
Niklas Wahlström, Roland Hostettler, Fredrik Gustafsson, Wolfgang Birk
Rapid Classification of Vehicle Heading Direction with Two-Axis Magnetometer
AUTOMATIC CONTROL
REGLERTEKNIK
LINKÖPINGS UNIVERSITET
The classifier
· · · yk+1 yk · · ·
Sum over all triangles
The enclosed area can be
computed as two inner products!
y
y
f̂ = (yx1:(N−1) )T y(1+1):N − (y1:(N−1) )T yx(1+1):N
The sign of f̂ determines the heading direction.
Note: h has been replaced with the measurement y which contains
noise.
Niklas Wahlström, Roland Hostettler, Fredrik Gustafsson, Wolfgang Birk
Rapid Classification of Vehicle Heading Direction with Two-Axis Magnetometer
AUTOMATIC CONTROL
REGLERTEKNIK
LINKÖPINGS UNIVERSITET
The improved classifier
· · · yk+1 yk · · ·
The variance of f̂ can be reduced
by trading for some bias.
Idea: Average over larger
triangles!
y
y
f̂p = (yx1:(N−p) )T y(1+p):N − (y1:(N−p) )T yx(1+p):N
Observe: The feature still only consists of two inner products!
Niklas Wahlström, Roland Hostettler, Fredrik Gustafsson, Wolfgang Birk
Rapid Classification of Vehicle Heading Direction with Two-Axis Magnetometer
AUTOMATIC CONTROL
REGLERTEKNIK
LINKÖPINGS UNIVERSITET
Experimental results
N
2 sensor nodes
W
E
South-North
45 min
S
88 vehicles travelling
south-north
Sensor 2
99 vehicles travelling
north-south
Sensor 1
North-South
Correct classification by the two sensors
Sensor 1
Sensor 2
South-North
(Sensor 1)
North-South
(Sensor 2)
87/88
82/88
91/99
99/99
Niklas Wahlström, Roland Hostettler, Fredrik Gustafsson, Wolfgang Birk
Rapid Classification of Vehicle Heading Direction with Two-Axis Magnetometer
AUTOMATIC CONTROL
REGLERTEKNIK
LINKÖPINGS UNIVERSITET
Summary
Vehicle heading direction classification using a 2-axis magnetometer.
A two-fold classification problem.
One strong feature has been derived and extracted from data.
It is fast (difference of two inner products)
Theoretical justification is provided.
It works on real world data with good results
Niklas Wahlström, Roland Hostettler, Fredrik Gustafsson, Wolfgang Birk
Rapid Classification of Vehicle Heading Direction with Two-Axis Magnetometer
AUTOMATIC CONTROL
REGLERTEKNIK
LINKÖPINGS UNIVERSITET
Summary
Vehicle heading direction classification using a 2-axis magnetometer.
A two-fold classification problem.
One strong feature has been derived and extracted from data.
It is fast (difference of two inner products)
Theoretical justification is provided.
It works on real world data with good results
=⇒ Fast and accurate classifier for this application!
Niklas Wahlström, Roland Hostettler, Fredrik Gustafsson, Wolfgang Birk
Rapid Classification of Vehicle Heading Direction with Two-Axis Magnetometer
AUTOMATIC CONTROL
REGLERTEKNIK
LINKÖPINGS UNIVERSITET