Mobility Episode Detection From CDR's Data Using Switching Kalman Filter
Mobility Episode Detection From CDR's Data Using Switching Kalman Filter
63
means that in case of an event in a cell, we “observe” the
user in the ellipse center and observation error is defined as
the cell coverage area. It is not realistic, because Gaussian
distribution associates higher probability around the center
of the cell coverage area, but may be good enough for our
purposes.
The ellipse for a cell may be computed from the cell poly-
gon by any kind of approximation. Unfortunately, we discov-
ered cases where coverage area or the polygons of two cells
were distant but the trajectory data clearly showed hopping
Figure 1: System Architecture
between the cells. Thus, the cells were covering more of
the area than the polygons suggested. We decided to ex-
tend the ellipses after initial approximation, which posed
detect the movement episodes: Stay-Jump1 -and-Moving in
the question: to which direction and to what extent?
the CDRs data using a switching Kalman filter with an in-
We tried to use antenna azimuth and signal coverage poly-
tegrated movement model. Before, executing the detection
gon, provided by the operator, using several different tech-
process we need to make an extension in the observed cel- niques. The final problem was that these techniques rely
lular network coverage area existing in our trajectories con- on lots of cell data and the cell plan from the operator is
tained in the CDRs data. This process is done in order to updated too often to get enough data for the new cells. The
make the network coverage area as close to reality as possi-
most straightforward way is to use GPS locations of the
ble.
smartphones coupled with the cell events to improve the
1.2 Problem statement coverage.
The main problem that we are trying to solve in this 3.1 Coverage extension with GPS
article is to detect the mobility episodes “Stay-Jump-and- Extending coverage areas in such a way that they cover all
Moving” using the CDRs data. The fact that the CDRs their associated GPS locations of the cellular phones, is done
data are sparsely sampled in time and space [12], makes it by using mathematical optimization as minimizing a penalty
very challenging to recognize the movement episodes in the function f (e). The constructed function penalizes large dis-
trajectories of the users. Moreover, the trajectories are a tances d(x, r, y) between the cell coverage circle (x, r) and
set of cell coverage area locations; therefore, it is hard to the GPS coordinates y at the time of the cell events. It also
distinguish whether the user is moving or not when he/she penalizes large radius extensions ei , i.e. the antenna should
is located in one of the cells. Hence, our approach is to not cover more of the area than is prescribed by the GPS.
model the moving and stay action by using coverage op- Let xoi and rio be the initial circle centers and x′i are the
timization and displacement features with the support of ’pin’ points – the locations of cell towers that together with
Switching Kalman filter (SKF) to make the estimation of the initial coverage circles provide the primary direction of
the episodes. area extension. The current center and the radius of cell i
are computed by
2. SYSTEM DESIGN AND ARCHITECTURE ei
xi = xoi + o (xoi − xi ), ri = rio + ei .
′
64
St−1 St
xt = F xt−1 + qt (2)
Ẋt−1 Ẋt
yt = Hxt + rt , (3)
with hidden state xt , observable evidence yt , transition ma- X̄t−1 X̄t
trix F , observation matrix H, and random Gaussian noises
for transition qt ∼ N (0, Qt ) and for observation rt ∼ N (0, Rt ).
Kalman filter represents the belief states of xt using continu- Yt−1 Yt
ous random variables Xt with Gaussian probability distribu-
tions xt ∼ P (Xt = x) = N (x; µt , Σt ). Inference algorithms Figure 2: Bayes Net for Switching Kalman Filter: discrete
can be used to calculate probability distribution of Xt from variables are rectangular, continuous variables are ellipses,
the evidence up-to-date y1:t (filtering) or all the evidence and filled are observable variables
y1:T (smoothing)
P (Xt |y1:t ) = N (µt|t , Σt|t ) (4) higher chance to stay in the same model (Nm is the number
P (Xt |y1:T ) = N (µt|T , Σt|T ) (5) of models):
(
where T is the total number of time steps and the symbol 0.8 if i = j
(i.e. t or T ) after the vertical bar (here and further) sig- Z(i, j) = 0.2
Nm −1
otherwise
nifies how much evidence is used to infer the value. The
cornerstone property of KF is that if prior x0 has Gaussian The problem with SKF is that the number of Gaussians is
distribution then inferred distribution of any variable is also multiplied by the number of models each step, which gives
Gaussian. rise to the exponential growth of belief state. There are
Kalman filter is good for processes with linear dependen- several solutions listed in [11] and we use the collapsing ap-
cies within state variables, e.g. the movement of a ballistic proach with the GPB2 algorithm2 described in the paper.
rocket consisting of coordinates, velocity, and gravity forces. The results for filtering and smoothing are computed using
Applicability of Kalman filters to the events in mobile net- predefined models of behavior, i.e. no learning is imple-
work is not obvious, because a mobile user usually makes mented.
untracked turns between the arrival of two events and the
observations are not points with Gaussian noise but cover- 4.3 Model general structure
age areas of antennas. Nevertheless, there is still some sense Taking location
x̄t and velocity ẋt at time t as hidden
using this approach, for example, if a user is moving from x̄t
variables xt = and specifying that a moving user
home to work, then he often preserves the general direction ẋt
and the speed of the movement. coordinates and velocities satisfy the following equations:
65
20
stay
9 jump
9
15
8
8
2 2
7
7
4 4
10
7 7
6 6
6 6
5 3
5
5 3 5
5
1 1
4 4
0
3 3 −0.10 −0.05 0.00 0.05 0.10
3 4 5 6 7 8 9 10 11 12 3 4 5 6 7 8 9 10 11 12
1.0 1.0
0.8 0.8
Figure 4: Noise probability distributions of Stay and Jump
models
M)
)
M
Probability (
Stay(R=0.02) filter
Probability (
0.6 0.6 Stay(R=0.02) filter
Stay(R=0.02) smooth
Stay(R=0.02) smooth
10
Jump(R=2.00) filter Jump(R=2.00) filter
9 5
10
0.2 0.2
8
11 78 6
7
0.0
4
0.0
0 1 2 3 4 5 6 7
9
0 1 2 3 4 5 6 7
6
steps steps
Probability (M)
As the result, given the evidence up-to-date y1:t the al- 0.6 Stay filter
Stay smooth
gorithm computes the probabilities P (St = k|y1:t ) of each TMove filter
0.4 TMove smooth
model k at time t, and the probability distribution of coordi-
nate and velocity P (Xt |St = k, y1:t ). The same is done us- 0.2
ing all the evidence y1:T which gives smoothed results, that 0.00 2 4 6 8 10 12
are more accurate and therefore are used in actual testing steps
and validation.
Figure 5: Coordinates and probabilities for Stay and Move
4.4 Predefined models models where the interval between observations 7 and 8 is
In this section, we describe the models and show how the comparable to other intervals.
Switching Kalman Filter behaves. Consider the two models:
66
10
be considered as the move to that location. If the next event
5
9
location yt+1 is not taken into account, the current state is
10
8
7 8 6
left as St = stay and the algorithm pulls the stay location
11
7
9
4 5 km ahead (see Figure 7). The “weakening” of the simpli-
6
fication by taking the following evidence yt+1 into account
32
5
1 solves the problem:
4
3
−5 0 5 10
1.0 P (St = j|St+1 = k, y1:T ) ≈ P (St = j|St+1 = k, y1:t+1 )
Stay filter
Stay smooth
0.8 j|k
Jump filter
and the formula for computing Ut in the algorithm be-
M)
Jump smooth
comes3
Probability (
TMove filter
0.6
TMove smooth
j(k)
0.4
j|k Mt|t (j)Z(j, k)Lt+1
Ut = P P ,
j(k) ′ )Z(j ′ , k)
0.2
j Mt|t (j)Lt+1 j ′ Mt|t (j
0.0
0 2 4 6 8 10 12 j|k
j|k Ut
steps which must be followed by the normalization Ūt = P j|k .
j Ut
There are still cases that can benefit from taking even more
Figure 6: Coordinates and probabilities for Stay, Jump and
future evidence into account, but we consider them in the
Move models where the interval between observations 7 and
future work.
8 is ten times longer.
10
5. EXPERIMENTATION AND RESULTS
9
8
5.1 Data gathering
7 2 The data gathering process has two main steps. The first
4
7 one is related to the collection of reference data; in our case
6 6
5 5 3 it will be GPS data of the smartphones used by the users.
1 This GPS data will be used as reference data in order to
4
get an idea about the performance of our algorithm. More
3
−5 0 5 10 details about this process is described in the following next
section (Testing strategy). The second step is getting the
Figure 7: Short time between events 3 and 4 pulls first lo- CDR data from the mobile operator of the same time period
cations out of the coverage areas when we were collecting GPS data. This way we will be
able to evaluate the estimations of our algorithm when it is
using this CDRs data as test data. Then, the output of the
therefore we decreased the probability to maintain the jump algorithm will be compared with our reference data (GPS
state P (St = ”jump”|St−1 = ”jump”) = 0.1. data).
The overall rationale behind the models is the following:
5.2 Testing strategy
• If a user is moving by a bus or a car and has frequent
events in the cell network (e.g. GPRS connection), it In this section, we will explain our approach to evaluating
is possible to track him using the Move model. the proposed algorithm. The evaluation will be based on the
use of GPS data collected from the field using mobile phones
• Otherwise, if a user has sparse events on the cells as a reference data. Meanwhile, we used the CDRs collected
around one location then the Stay model is inferred by by the mobile operator of the same mobile phones utilized
SKF, otherwise the location of the user has changed; in the GPS collection campaign as an input for our system.
therefore, SKF should infer new location using the After our algorithm gives its estimation of the movement
Jump model. episodes, we use the timestamp from the CDRs as a mean
to find the corresponding GPS data. Then, the GPS data
4.5 Smoothing fix should be labelled (Stay, Jump, and Move). In order to
There is a simplification in the original SKF algorithm [11] execute this labeling task on the GPS data, we used the
that approximates the probability computation of the cur- following logic:
rent model during the smoothing part:
1. First we check the distance between each successive
j|k
Ut = P (St = j|St+1 = k, y1:T ) ≈ P (St = j|St+1 = k, y1:t ). part of the GPS data and if we find that the distance
This simplification may not be too bad, provided that the is greater or equal than a specified threshold, we label
future evidence yt+1:T does not contain much more informa- the position as a ‘Jump’. Otherwise it is a ‘Stay’.
tion about the current state St beyond than that contained 2. The second step is to run a check on the GPS data
in the next state St+1 . labeled as a “Jump” in the previous step, because they
There are cases when event t + 1 follows within several could be potential ’Move’-s. Therefore, we collect the
seconds after event t and is on the cell tower that is 10 km speed measurements for those GPS locations around
away. This means that two events happen between the tow-
3
ers, where the coverage of two cells overlap and event t must refer to [11] for notation and meaning
67
Actual GPS Movement Episodes
Stay Move Jump
Estimated Stay 109 15 52
SKF Movement Move 8 52 12
Episodes Jump 28 30 12
68
(a) Triangles are GPS locations: red - fast movement, green (b) Circles are SKF predictions: red - Move model, blue - Stay
and blue - walk and stops. Initial polygons and extended model. Dots connect predicted locations with the actual GPS
coverage areas of the cells active during the walk (excluding location at the time of event.
the drive, i.e. red triangles). Small brown circles are the
mobile network towers.
Figure 9: A user visits national park about 50km away from the city.
based on gps tracking data. 22nd International J. Rowland; A. Varshavsky; and W. Willinger. Human
Conference on Geoinformatics (GeoInformatics), mobility modeling at metropolitan scales. MobiSys,
pages 1–6, 2014. pages 239–252, 2012.
[6] Wang H; Calabrese F; Di Lorenzo G; et al. [15] Song C.; Koren; T. Koren; P. Wang; and A. L.
Transportation mode inference from anonymized and Barabási. Modeling the scaling properties of human
aggregated mobile phone call detail records. Intelligent mobility. Nature Physics, 6(10):818–823, 2010.
Transportation Systems (ITSC), pages 318–323, 2010. [16] Ying Zhang. User mobility from the view of cellular
[7] Xingqin Lin; Fleming P.J. ; Andrews J.G. data networks. Proceedings IEEE INFOCOM, pages
Fundamentals of mobility in cellular networks: 1348–1356, 2014.
Modeling and analysis. IEEE Global Communications
Conference (GLOBECOM), pages 5433–5438, 2012.
[8] H.; Sekimoto Y. ; Kurokawa M. ; Watanabe T. et al
Kanasugi. Spatiotemporal route estimation consistent
with human mobility using cellular network data.
IEEE International Conference on Pervasive
Computing and Communications Workshops
(PERCOM Workshops), pages 267–272, 2013.
[9] Ficek M.; Kencl L. Inter-call mobility model: A
spatio-temporal refinement of call data records using a
gaussian mixture model. Proceedings IEEE
INFOCOM, pages 469–477, 2012.
[10] J.L. Morales and J. Nocedal. L-bfgs-b: Remark on
algorithm 778: L-bfgs-b, fortran routines for large
scale bound constrained optimization. ACM
Transactions on Mathematical Software, 38(1), 2011.
[11] Kevin P. Murphy. Switching kalman filters. Technical
report, 1998.
[12] Dongdong Su; Feng Qi. An approach for ensuring the
reliability of call detail records collection in billing
system. International Conference on Research
Challenges in Computer Science. ICRCCS., pages
100–103, 2009.
[13] Yadav K.; Kumar A. ; Bharati A. ; Naik V.
Characterizing mobility patterns of people in
developing countries using their mobile phone data.
Sixth International Conference on Communication
Systems and Networks (COMSNETS), pages 1–8,
2014.
[14] S. Isaacman; R. A. Becker; R. Caceres; M. Martonosi;
69