470 likes | 660 Views
Ad-hoc Wireless Networks. Alexander Dvinsky Topics in Reliable Distributed Computing (048961) Technion, Jan. 2009. Why ad-hoc wireless networks?. Easily and quickly deployed Easily scaled Flexible Low dependence on infrastructure. Field for applications. Environmental
E N D
Ad-hoc Wireless Networks Alexander DvinskyTopics in Reliable Distributed Computing (048961)Technion, Jan. 2009
Why ad-hoc wireless networks? • Easily and quickly deployed • Easily scaled • Flexible • Low dependence on infrastructure
Field for applications • Environmental • Glacier and ocean monitoring • Wild animal observation • Military • Tracking military vehicles • Self-healing mine field • Sniper localization • K. Römer and F. Mattern, “The design space of wireless sensor networks,” IEEE Wireless Communications, vol. 11, no. 6, pp. 54–61, Dec. 2004. • Nitin H. Vaidya, “Tutorial on Mobile Ad Hoc Networks: Routing, MAC and Transport Issues” Infocom 2006 • http://www.terranet.se/
Applications cont’d • Agriculture • Grape monitoring • Cattle herding • Civilian environments • P2P cell-phone network • Fire fighting • Search and rescue (avalanche victims) • Personal networking? • Do you want your microwave oven to pass messages from your refrigerator to a TV? • What about motion sensor to a lamp?
Challenges • Limitations • Range • Battery life • Computing power • Size • Price • Transmission errors (interference) • Routing complexity • Instability • Network partitions • Route changes • Security issues
Routing • There’re a lot of (Wikipedia claims “more than 70”) protocols for wireless routing • Some of the things to consider when choosing are • Latency requirements • Power restrictions • Storage restrictions
Reactive routing • Route is discovered when connection is needed • Pro • Network is silent until connection is to be established • No need to store routing information • Con • Route requests = flooding • High latency
Pro-active routing • Routes are discovered and stored for future use • Pro • Lower latencies • Lower control message flooding • Con • Extra storage for routing data • Maintenance of the (potentially unneeded) routing data
Energy considerations • The model for signal attenuation is when • Thus it is often better to make many small hops than a single large one
A B C Interference • Primary interference constraint • Simultaneous send and receive • Simultaneous sends • Simultaneous receives • Hidden node problem
General interference constraint • Dotted lines show the nodes that can hear each other Primary interference constraint Every link is translatedto a node in theinterference graph Every interfering pair of links from the original graph are represented by an edge Additional interference For example when links are not sufficiently far from each other Legal schedule is represented by an independent set in the interference graph. Unfortunately calculating the maximum one is an NP hard problem
Ad-hoc networks in 802.11 - IBSS • Basic assumption: everybody hears everyone – no routing • Everyone works on the same channel – secondary interference constraint • The time is divided to periods (default – 120 ms) • During each period there’s a chosen leader • Every period a beacon is sent • If node does not hear some amount of beacons it assumes it’s disconnected
IBSS – cont’d • Choosing the leader • At the beginning of each cycle every node tries to send a beacon. Collisions resolved by exp. back off • The one that succeeds is the leader • Leader answers probe requests • To announce one’s presence in the network one must become a leader • Leader is not allowed to sleep during the cycle – nobody wants to be a leader (except for the new guys) • If two different networks with same name are in range nodes will gradually move to the older one (age data is in the beacon)
Demo I received aresponse. Let’stry to connect … I hear no one -I must be the only one around *Logical only I’ll back off 2 I’ll back off 1 Beacon! Beacon! Probe! Probe! Response!
Our problem • Model • Multi-hop network • Stochastic packet arrival • Primary interference constraint • Slotted time. Unit packet length • No central authority • Target • Maximize throughput • Stability • Approach • Iteratively find the best solution
Similar problem #1 • Multi-hop network • Stochastic packet arrival • Primary interference constraint • Either central authority is present, or each node has global topology and queue backlog information • L. Tassiulas and A. Ephremides. - Stability properties of constrained queueing systems and scheduling policies for maximum throughput in multihop radio networks • L. Tassiulas. Linear complexity algorithms for maximum throughput in radio networks and input queued switches
Solution of problem #1 • One optimal, stable solution for the problem, proven by Tassiulas and Ephremides, is the maximum weight matching in the connections graph with queue lengths used as edge weights • A problem with naïve approach is high complexity of calculations required for each slot schedule. That was later fixed by Tassiulas Reminder: Matching: A set of edges such, that no two touch same node Maximal matching: Such a matching, that no more edges can be added to it Maximum matching: A matching with maximal possible weight. If weights are positive, maximum is also a maximal matching
An example • Clearly the above solution contributes the most to stability
Solution of problem #1 cont’d • The state of the network is a set of queue lengths. This state does not change quickly • Instead of finding a maximum weight matching for each slot, we’ll converge to it • At each step a (random) matching is chosen • In each iteration: if newly chosen random matching is “better” than the previous one – use new, otherwise keep the old matching
An example 6 > 1 • First solution chosen might be far from optimal, but we’ll inevitably converge to it eventually 7 > 6 6 < 7 10 > 7
Similar problem #2 • Input-queued switch • Packets, arriving stochastically at input ports are to be scheduled to output ports • Ports are locked exclusively by a scheduled match • Central authority is available P. Giaccone, B. Prabhakar, D.Shah. - Randomized scheduling algorithms for high-aggregate bandwidth switches
Solution of problem #2 • As before, we’re interested in scheduling as close to a maximum weight matching as possible • At each iterationconsider k alternativesfor the next step andselect the heaviest one • Can be easilyparallelized in HW
How the alternatives are chosen • are chosen semi-randomly. It’s a union of k-1 “Neighbor” matchings and a next step of “Hamiltonian Walk” over the set of all possible matchings • Both the definition of neighborhood and k can be chosen considering the domain of the solution physical limitations of the HW
Solution of problem #2 cont’d • Alternative approach • Find a matching with high potential (heavy matching) • Merge two considered matchings into a third one, better then each of the originals • An improvement • Consider the recent arrivaldata when generating nextrandom schedule MIX
Identities • Why? • If you already broadcast out loud, at least say whom to • Protocols are easier that way • Why not? • Nodes are produced identical • Randomly generated identities are possible, but duplicates are to be managed somehow
Example: Initially Partitioned Network D’s packets for address a routed to A • Nitin H. Vaidya, “Tutorial on Mobile Ad Hoc Networks: Routing, MAC and Transport Issues” Infocom 2006
Merged Network • Duplicate address detection (DAD) important To avoid misrouting • Nitin H. Vaidya, “Tutorial on Mobile Ad Hoc Networks: Routing, MAC and Transport Issues” Infocom 2006
Decentralization • The problems presented above are almost identical to ours, except for the centralization aspect • All we need is a decentralized match and a decentralized mix algorithms
Decentralized match R L R L R L L R
Decentralized match cont’d • The match above works, but how well? • Weights are at all not considered when generating a match • We could spend multiple iterations before finding a match, that at least resembles maximum
Alternative decentralized match • Next algorithm approximates maximum matching by a factor of 2 • Greedy • Built for undirected graphs, but can be extended
Distributed weighted matching protocol by node v We’re left with the heaviest unmatchededge – add it to the matching Candidate is the nodethat we have the heaviestedge to among all our neighbors Inform c, that we’d liketo connect to it If someone has requested todisconnect from us – removehim from working neighbor set Set of nodes that have requested to connect to our If our candidate has dropped – recalculatethe candidate If we’ve chosen c andc has chosen us Disconnect from allthe neighbors If someone has requested toconnect to us – write it down Our neighbors • Jaap-Henk Hoepman - Simple Distributed Weighted Matchings - eprint cs. DC/0410047, October 2004.
Example c=F R={C,F} c=null c=F c=B c=B c=D R={D} R={B, G} c=null c=C R={C}
Result 12 instead of optimal 15 But hey, it could bemuch worse!
Decentralized mix • Combination of two matches forms a set of circles and paths (as each node can be touched at most by two edges)
Summation mechanism • A message is sent by each node (in a match) along the path or cycle, calculating weight differences between the matchings D(A)=3 D(A)=0 D(A)=-3 D(A)=-1 D(A)=1 D(A)=3 D(A)=4
Mix by gossip • Both of the gossip algorithms in the paper were presented last week by Ittay. Only minor details vary
Gosp-Algo 1 • Instead of subtracting sums, subtract averages • Each node randomly averages values with randomly chosen neighbor • After enough ( ) iterations, each node has a good approximation of the path/circle average it resides in • Verify, that every node in the component has the same sign of the result • If yes – act accordinglyif no – retain previous schedule
Gosp-Algo 2 • Utilize the property of independent exponential random variables • If then • Each node draws a value of rate equal to its weight and sends it to neighbors • When all values are collected, minimum can indicate the approximation of the sum of rates • To raise confidence, k values and not one are drawn by each node and the average of minimums is used
Discussion points • Identities - is that really so hard to justify a gossip-based mix algorithm? • Running an complex algorithm to find optimal schedule. How stable must the network be to make it worth it? When plain exponential back off is not enough? • When does ad-hoc worth the hassle? How hard is it to put some kind of coordinator in the middle?
References • Eytan Modiano, Devavrat Shah, Gil Zussman - Maximizing Throughput in Wireless Networks via Gossiping. SIG Metrics/Performance 2006. • P. Giaccone, B. Prabhakar, D.Shah. - Randomized scheduling algorithms for high-aggregate bandwidth switches. IEEE J. Sel. Areas Commun.,21(4):546-559, May 2003 • L. Tassiulas and A. Ephremides. - Stability properties of constrained queueing systems and scheduling policies for maximum throughput in multihop radio networks. IEEE Trans. Autom. Control, 37(12):1936-1948, December 1992. • L. Tassiulas. Linear complexity algorithms for maximum throughput in radio networks and input queued switches. In Proc. IEEE INFOCOM’98, April 1998. • Nitin H. Vaidya, “Tutorial on Mobile Ad Hoc Networks: Routing, MAC and Transport Issues” Infocom 2006 • K. Römer and F. Mattern, “The design space of wireless sensor networks,” IEEE Wireless Communications, vol. 11, no. 6, pp. 54–61, Dec. 2004. • http://www.terranet.se/ • Jaap-Henk Hoepman - Simple Distributed Weighted Matchings - eprint cs. DC/0410047, October 2004.