1 Simulation de modèles de mobilité : paradoxes et étrangetés Jean-Yves Le Boudec EPFL En collaboration avec Milan Vojnović Microsoft Research
2 Résumé Les ingénieurs qui développent des systèmes de communication mobile ont souvent recours à la simulation dans les phases de conception et de simulation. Bien que conceptuellement très simple, la simulation peut poser des problèmes parfois déroutants. Par exemple, des simulations de durées différentes donnent des résultats différents, et plus la simulation est longue, plus les résultats sont différents. Ces phénomènes peuvent être expliqués, et quelque fois entièrement évités, par la théorie des probabilités, et en particulier le calcul de Palm pour les processus ponctuels stationnaires – une théorie initialement développée dans le cadre des files d’attente. [LV06] The Random Trip Model: Stability, Stationary Regime, and Perfect Simulation, J.-Y. Le Boudec and Milan Vojnović, ACM/IEEE Trans. on Networking, Dec 06 [L04] Understanding the simulation of mobility models with Palm calculus, J.-Y. Le Boudec, Performance Evaluation, 2007
3 Outline Simulation Issues with mobility models Palm calculus Stability Stationary distributions and Perfect Simulation
Random Waypoint (Johnson and Maltz`96) Used at IETF to evaluate performance of ad-hoc routing protocols Node picks next waypoint X n+1 uniformly in area Picks speed V n uniformly in [v min,v max ] Moves to X n+1 with speed V n 4 XnXn X n+1
5 Path P n XnXn X n+1 Swiss Flag [LV05] Non convex domain Random Waypoint on Non Convex Area
6 City- section, Camp et al [CBD02] More Realistic Model
7 Issue about speed Distributions of node speed, position, distances, etc change with time Node speed: 100 users average 1 user Time (s) Speed (m/s) 900 s
8 Node Position Distributions of node speed, position, distances, etc change with time Distribution of node position: Time = 0 sec Time = 2000 sec
9 Why does it matter ? A. In the mobile case, the nodes are more often towards the center, distance between nodes is shorter, performance is better The comparison is flawed. Should use for static case the same distribution of node location as random waypoint. Is there such a distribution to compare against ? Random waypoint Static A (true) example: Compare impact of mobility on a protocol: Experimenter places nodes uniformly for static case, according to random waypoint for mobile case Finds that static is better Q. Find the bug !
10 Issues with Mobility Models Is there a stable distribution of the simulation state (time-stationary distribution), reached if we run the simulation long enough ? If so: How long is long enough ? If it is too long, is there a way to get to the stable distribution without running long simulations (perfect simulation) ?
11 Outline Simulation Issues with mobility models Palm calculus Stability Stationary distributions and Perfect Simulation
12 Palm Calculus Relates time averages versus event averages An old topic in queueing theory Now well understood by mathematicians under the name Palm Calculus
13 Palm Calculus Framework A stationary process (simulation) with state S t. Some quantity X t measured at time t. Assume that (S t ;X t ) is jointly stationary I.e., S t is in a stationary regime and X t depends on the past, present and future state of the simulation in a way that is invariant by shift of time origin. Examples S t = current position of mobile, speed, and next waypoint Jointly stationary with S t : X t = current speed at time t; X t = time to be run until next waypoint Not jointly stationary with S t : X t = time at which last waypoint occurred
14 Palm Expectation Consider some selected transitions of the simulation, occurring at times T n. Example: T n = time of n th trip end Definition : the Palm Expectation is E t (X t ) = E (X t | a selected transition occurred at time t) By stationarity: E t (X t ) = E 0 (X 0 ) Example: T n = time of n th trip end, X t = instant speed at time t E t (X t ) = E 0 (X 0 ) = average speed observed at a waypoint
15 Event versus Time Averages E ( X t ) = E (X 0 ) expresses the time average viewpoint. E t (X t ) = E 0 (X 0 ) expresses the event average viewpoint. Example: T n = time of n th trip end, X t = instant speed at time t E t (X t ) = E 0 (X 0 ) = average speed observed at trip end E ( X t )= E (X 0 ) = average speed observed at an arbitrary point in time
16 Formal Definition In discrete time, we have an elementary conditional probability E t (X t ) = E (X t 1 9 n 2 Z such that Tn=t ) / P ( 9 n 2 Z such that T n =t) In continuous time, the definition is a little more sophisticated uses Radon Nikodym derivative– [L04] for details Also see [BaccelliBremaud87] for a formal treatment Palm probability is defined similarly P t ( X t 2 W) = E t (1 Xt 2 W )
17 Ergodic Interpretation Assume simulation is stationary + ergodic, i.e. sample path averages converge to expectations; then we can estimate time and event averages by: In terms of probabilities:
18 Two Palm Calculus Formulas Intensity of selected transitions: := expected number of transitions per time unit Intensity Formula: where by convention T 0 · 0 < T 1 Inversion Formula The proofs are simple in discrete time – see [L04]
19 A Classical Example
20 Outline Simulation Issues with mobility models Palm calculus Stability Stationary distributions and Perfect Simulation
21 Necessary Condition for Existence of a Stationary Regime Apply the intensity formula to T n = trip end times Thus: if the random trip has a stationary regime it must be that the mean trip duration sampled at trip end times is finite On bounded area, means: mean of inverse of speed is finite Converse is true [LV06]
22 A Random waypoint model that has no stationary regime ! Assume that at trip transitions, node speed is sampled uniformly on [v min,v max ] Take v min = 0 and v max > 0 Mean trip duration = (mean trip distance) Mean trip duration is infinite ! Was often used in practice Speed decay: “considered harmful” [YLN03]
What happens when the model does not have a stationary regime ? The simulation becomes old
24 Outline Simulation Issues with mobility models Palm calculus Stability Stationary distributions and Perfect Simulation
Stationary Distribution of Speed
Closed Form Assume a stationary regime exists and simulation is run long enough Apply inversion formula and obtain distribution of instantaneous speed V(t)
27 Removing Transient Matters A. In the mobile case, the nodes are more often towards the center, distance between nodes is shorter, performance is better The comparison is flawed. Should use for static case the same distribution of node location as random waypoint. Is there such a distribution to compare against ? Random waypoint Static A (true) example: Compare impact of mobility on a protocol: Experimenter places nodes uniformly for static case, according to random waypoint for mobile case Finds that static is better Q. Find the bug !
28 Removing Transients May Take Long If model is stable and initial state is drawn from distribution other than time-stationary distribution The distribution of node state converges to the time-stationary distribution Naïve: so, let’s simply truncate an initial simulation duration The problem is that initial transience can last very long Example [space graph]: node speed = 1.25 m/s bounding area = 1km x 1km
29 Perfect simulation is highly desirable (2) Distribution of path: Time = 100s Time = 50s Time = 300s Time = 500s Time = 1000s Time = 2000s
Solution: Perfect Simulation Def: a simulation that starts with stationary distribution Usually difficult except for specific models Possible if we know the stationary distribution Sample Prev and Next waypoints from their joint stationary distribution Sample M uniformly on segment [Prev,Next] Sample speed V from stationary distribution
Stationary Distrib of Prev and Next
Stationary Distribution of Location
There is a closed form for stationary distribution of location but it is ugly and hard to sample from – not to be used in practice [LV04]
A Fair Comparison We revisit the comparison by sampling the static case from the stationary regime of the random waypoint Random waypoint Static, from uniform Static, same node location as RWP
No Speed Decay
Conclusions Les simulations peuvent ne pas avoir de régime stationaire par vieillissement plutôt qu’explosion Si régime stationaire existe, il faut éliminer les transitoires ou faire une simulation parfaite Le calcul de Palm permet de faire une simulation parfaite pour ce type de modèles
37 References [ARMA02] Scale-free dynamics in the movement patterns of jackals, R. P. D. Atkinson, C. J. Rhodes, D. W. Macdonald, R. M. Anderson, OIKOS, Nordic Ecological Society, A Journal of Ecology, 2002 [CBD02] A survey of mobility models for ad hoc network research, T. Camp, J. Boleng, V. Davies, Wireless Communication & Mobile Computing, vol 2, no 5, 2002 [CHC+06] Impact of Human Mobility on the Design of Opportunistic Forwarding Algorithms, A. Chaintreau, P. Hui, J. Crowcroft, C. Diot, R. Gass, J. Scott, IEEE Infocom 2006 [E01] Stochastic billiards on general tables, S. N. Evans, The Annals of Applied Probability, vol 11, no 2, 2001 [GL06] Analysis of random mobility models with PDE’s, M. Garetto, E. Leonardi, ACM Mobihoc 2006 [JBAS+02] Towards realistic mobility models for mobile ad hoc networks, A. Jardosh, E. M. Belding-Royer, K. C. Almeroth, S. Suri, ACM Mobicom 2003 [KS05] Anomalous diffusion spreads its wings, J. Klafter and I. M. Sokolov, Physics World, Aug 2005
38 References (2) [L04] Understanding the simulation of mobility models with Palm calculus, J.-Y. Le Boudec, accepted to Performance Evaluation, 2006 [LV05] Perfect simulation and stationarity of a class of mobility models, J.-Y. Le Boudec and M. Vojnovic, IEEE Infocom 2005 [LV06] The random trip model: stability, stationary regime, and perfect Simulation, J.-Y. Le Boudec and M. Vojnovic, MSR-TR , Microsoft Research Technical Report, 2006 [M87] Routing in the Manhattan street network, N. F. Maxemchuk, IEEE Trans. on Comm., Vol COM-35, No 5, May 1987 [NT+05] Properties of random direction models, P. Nain, D. Towsley, B. Liu, and Z. Liu, IEEE Infocom 2005 [PLV05] Palm stationary distributions of random trip models, S. PalChaudhuri, J.-Y. Le Boudec, M. Vojnovic, 38 th Annual Simulation Symposium, April 2005
39 References (3) [RMM01] An analysis of the optimum node density for ad hoc mobile networks, ICC 2001 [S64] Principles of random walk, F. Spitzer, 2 nd Edt, Springer, 1976 [SMS06] Delay and capacity trade-offs in mobile ad hoc networks: a global perspective, G. Sharma, R. Mazumdar, N. Shroff, IEEE Infocom 2006 [SZK93] Strange kinetics (review article), M. F. Shlesinger, G. M. Zaslavsky, J. Klafter, Nature, May 1993 [YLN03] Random waypoint considered harmful, J. Yoon, M. Liu, B. Noble, IEEE Infocom 2003