Download presentation
Presentation is loading. Please wait.
Published byRoberta Mills Modified over 9 years ago
1
Lecture 4: Routing Anish Arora CIS788.11J Introduction to Wireless Sensor Networks Material uses slides from Wattenhofer, Gouda, Estrin
2
2 Routing Overview Patterns: Convergecast one shot subscription or persistent subscription subscriber in-network or from base station if in-network and one-shot subscriber, then subscriber could be moving Broadcast potentially directed/local potentially with feedback (PIF) potentially scoped (e.g. data centric routing)
3
3 Routing Overview Model assumptions: Availability of locations Density/planarity Node/link heterogeneity Requirements: Latency Reliability Energy Scalability Convergence
4
4 Taxonomy Static publisher, static subscriber: one-shot query/command often used in broadcast/multicast from base station to nodes Mobile publisher, static subscriber: event detection geometric routing Static publisher, mobile subscriber: Mobile publisher, mobile subscriber: pursuer-evader rumor routing, STALK,
5
5 Convergecast Protocol Classification Distance vector protocols Key issues: Link selection Route metric: o Expected number of transmissions on path o Expected transmission time o Distance advanced towards destination Greedy protocols: issue of dealing with holes Geometric protocols Randomized protocols Gradient-descent protocols Multi-path protocols, even flooding Hierarchical protocols (potentially exploiting clusters)
6
6 Location-based/Geometric/Geographic Convergecast Sensor nodes addressed according to their locations No routing tables stored in nodes! Kleinrock et al.MFR et al.Geometric Routing proposed Kranakis, Singh, Urrutia Face Routing First correct algorithm Bose, Morin, Stojmenovic, Urrutia GFG First average-case efficient algorithm (simulation but no proof) Karp, KungGPSRA new name for GFG Kuhn, Wattenhofer, Zollinger GOAFRWorst-case optimal and average-case efficient, percolation theory
7
7 [Kranakis, Singh, Urrutia CCCG 1999] Correct Geometric Routing: Face Routing
8
8 Face Routing Remark: Planar graph can easily (and locally!) be computed with the Gabriel Graph, for example
9
9 Face Routing st
10
10 Face Routing st
11
11 Face Routing st
12
12 Face Routing st
13
13 Face Routing st
14
14 Face Routing st
15
15 Face Routing st
16
16 All necessary information is stored in the message Source and destination positions Point of transition to next face Completely local: Knowledge about direct neighbors’ positions sufficient Faces are implicit Planarity of graph is computed locally (not an assumption) Computation for instance with Gabriel Graph Face Routing Properties “Right Hand Rule”
17
17 Efficiency in Face Routing Theorem: Face Routing reaches destination in O(n) steps But: Can perform poorly compared to the optimal route Need to bound search area adaptively
18
18 Bounding Searchable Area ts
19
19 Grid Routing Key ideas: Embeds tree in logical grid Well suited for bursty convergecast traffic Avoids fast link reliability estimation o Preselects innerband links Focuses only on up/down link detection Attempts to spread load uniformly o Parent chosen randomly and rotated periodically Deals with holes randomly Cycles avoided by limiting number of diversions Base station snoops
20
20 The Logical Grid The motes are named as if they form an M*N logical grid Each mote is named by a pair (i, j) where i = 0.. M-1 and j = 0.. N-1 The base station is mote (0,0) Physical connectivity between motes is a superset of their connectivity in the logical grid: (0,0) (0,1) (1,1) (1,0) (2,1) (2,0) (0,0) (0,1) (1,0) (1,1) (2,0) (2,1)
21
21 Potential Parents A mote (i, j) dominates another mote (x, y) iff i≥x and j≥y If (i, j) dominates (x, y), then distance from (i, j) to (x, y) is (i-x)+(j-y) Let H be a “small” positive integer, called the hop size A potential parent of a mote (i, j) is a mote (x, y) such that (i, j) dominates (x, y) and distance from (i, j) to (x, y) = H (except in special cases where (i,j) is close to some edge of the grid)
22
22 Communication Pattern Each mote (i, j) can send msgs whose ultimate destination is mote (0, 0) The motes need to maintain an incoming spanning tree whose root is (0, 0): each mote maintains a pointer to its parent When a mote (i, j) has a msg, it forwards the msg to its parent. This continues until the msg reaches mote (0, 0) (H = 2)
23
23 Protocol Message When a mote (i, j) has a parent, then every random period, whose average is 20 seconds, mote (i, j) sends the msg: connected(i, j) Otherwise, mote (i, j) does nothing Every random period, whose average is 20 seconds, mote (0, 0) sends the msg: connected(0, 0)
24
24 Maintaining a Parent Initially, no mote has a parent When a mote (i, j) receives a connected(x, y) msg, where (x, y) is a potential parent of (i, j), (i, j) makes (x, y) its (new) parent Thus, the parent of a mote is changed, in a round robin fashion, among the active potential parents of that mote – load balancing and fast fault recovery
25
25 Losing the Parent If a mote (i, j) does not receive any connected(x, y) msg from any of its potential parents for 120 seconds, then (i, j) loses its parent If a mote (i, j) has no parent and receives a connected(x, y) msg, where (x, y) is not a potential parent of (i, j), then (i, j) makes (x, y) its “foster parent” but (i, j) will not send connected(i, j) msgs as long as (i, j) has no parent
26
26 Using the Routing Protocol When a mote (i, j) has a data msg to forward, it checks whether (i, j) has a parent or a foster parent if (i, j) has a parent or a foster parent (x, y), (i, j) sends a data(x, y) msg, intended for (x, y) otherwise, (i, j) discards the data msg A mote (i, j) has a data msg to forward iff either the mote itself has generated the msg or it has received the data(i, j) msg
27
27 Using the Routing Protocol by the Root When mote (0, 0), the base station, receives any data(x, y), it forwards the msg text to its resident application (the base station snooping)
28
28 Grid Routing in Exscal Each mote is assigned three potential parents for a base station, based on a location of a mote in a logical grid A mote reads potential parent information from internal flash. “Potential Parents” session will cover how to compute potential parents for each mote in the demo topology Provide primary and secondary base stations for each mote - overcome a base station failure A sensor can be connected to the secondary base station, only when its primary base station fails Connected message format connected(myID, currentBaseStationID)
29
29 Data-centric routing Sensor networks can be considered as a virtual database Implement query-processing operators in the sensor network Queries are flooded through the network (or sent to a representative set of nodes) In response, nodes generate tuples and send matching tuples towards the origin of the query Intermediate nodes may merge responses or aggregate
30
30 Directed Diffusion Protocol initiated by destination (through query) Data has attributes ; sink broadcasts interests Nodes diffuse the interest towards producers via a sequence of local interactions Nodes receiving the broadcast set up a gradient (leading towards the sink) Intermediate nodes opportunistically fuse interests, aggregate, correlate or cache data Reinforcement and negative reinforcement used to converge to efficient distribution
31
31 Illustrating Directed Diffusion Sink Source Setting up gradients Sink Source Sending data Sink Source Recovering from node failure Sink Source Reinforcing stable path
32
32 Data Naming Expressing an Interest Using attribute-value pairs E.g., Type = Wheeled vehicle// detect vehicle location Interval = 20 ms// send events every 20ms Duration = 10 s// Send for next 10 s Field = [x1, y1, x2, y2]// from sensors in this area
33
33 Gradient Set Up Inquirer (sink) broadcasts exploratory interest, i1 Intended to discover routes between source and sink Neighbors update interest-cache and forwards i1 Gradient for i1 set up to upstream neighbor No source routes Gradient – a weighted reverse link Low gradient Few packets per unit time needed
34
34 Low Exploratory Gradient Event Low Exploratory Request Gradient Bidirectional gradients established on all links through flooding
35
35 Event-data propagation Event e1 occurs, matches i1 in sensor cache e1 identified based on waveform pattern matching Interest reply diffused down gradient (unicast) Diffusion initially exploratory (low packet-rate) Cache filters suppress previously seen data Problem of bidirectional gradient avoided
36
36 Reinforcement From exploratory gradients, reinforce optimal path for high-rate data download Unicast By requesting higher-rate-i1 on the optimal path Exploratory gradients still exist – useful for faults Event Sink A sensor field Reinforced gradient
37
37 Path Failure / Recovery Link failure detected by reduced rate, data loss Choose next best link (i.e., compare links based on infrequent exploratory downloads) Negatively reinforce lossy link Either send i1 with base (exploratory) data rate Or, allow neighbor’s cache to expire over time Event Sink Src A C B M D Link A-M lossy A reinforces B B reinforces C … D need not A (–) reinforces M M (–) reinforces D
38
38 M gets same data from both D and P, but P always delivers late due to looping M negatively-reinforces (nr) P, P nr Q, Q nr M Loop {M Q P} eliminated Conservative nr useful for fault resilience Loop Elimination A QP DM
39
39 Local Behavior Choices 1. For propagating interests In our example, flood More sophisticated behaviors possible: e.g. based on cached information, GPS 2. For setting up gradients Highest gradient towards neighbor from whom we first heard interest Others possible: towards neighbor with highest energy 3. For data transmission Different local rules can result in single path delivery, striped multi-path delivery, single source to multiple sinks … 4. For reinforcement reinforce one path, or part thereof, based on observed losses, delay variances etc. other variants: inhibit certain paths because resource levels are low
40
40 Simulation studies Compare diffusion to a) flooding, and b) centrally computed tree (“ideal”) Key metrics: total energy consumed per packet delivered (indication of network life time) average pkt delay CENTRALIZED DIFFUSION FLOODING DIFFUSION FLOODING CENTRALIZED
41
41 Rumor Routing Designed for query/event ratios between query and event flooding Motivation Sometimes a non-optimal route is satisfactory Advantages Tunable best effort delivery Tunable for a range of query/event ratios Disadvantages Optimal parameters depend heavily on topology (but can be adaptively tuned) Does not guarantee delivery
42
42 Rumor Routing
43
43 Basis for Algorithm Observation: Two lines in a bounded rectangle have a 69% chance of intersecting Create a set of straight line gradients from event, then send query along a random straight line from source Thought: Can this bound be proved for a random walk. What is this bound if the line is not really straight? Event Source
44
44 Creating Paths Nodes that observe an event send out agents which leave routing info to the event as state in nodes Agents attempt to travel in a straight line If an agent crosses a path to another event, it begins to build the path to both Agent also optimizes paths if they find shorter ones
45
45 Algorithm Basics All nodes maintain a neighbor list Nodes also maintain a event table When it observes an event, the event is added with distance 0 Agents Packets that carry local event info across the network Aggregate events as they go
46
46 Agents
47
47 Agent Path Agent tries to travel in a “somewhat” straight path Maintains a list of recently seen nodes When it arrives at a node adds the node’s neighbors to the list For the next tries to find a node not in the recently seen list Avoids loops -important to find a path regardless of “quality”
48
48 Following Paths A query originates from source, and is forwarded along until it reaches it’s TTL Forwarding Rules: If a node has seen the query before, it is sent to a random neighbor If a node has a route to the event, forward to neighbor along the route Otherwise, forward to random neighbor using straightening algorithm
49
49 Fault Tolerance After agents propagated paths to events, some nodes were disabled Delivery probability degraded linearly up to 20% node failure, then dropped sharply Both random and clustered failure were simulated with similar results
50
50 Can we analyze The inherent concept looks powerful Even though not presented in this way … this algorithm is just an example of gossip routing There are two types of gossip, gossip of events and gossip of queries With the same gossip probability = 1/number of neighbors. (change this, would that help) It maybe possible to find the probability of intersection of these two That might lead to a set of techniques for parameter estimation, or an optimal setting
51
51 Other similar algos. Content based pub/sub Both the subscription and notification meet inside the network. Can we borrow some ideas from wired networks DHT DHTs can also be used to locate events Underlying routing is the problem DHT over DSR or AODV may not be suitable.
52
52 Reliable Data Transport Transport layer design is difficult because of application- specific nature of sensor networks Networking layers tend to become fused (particularly transport and application) Goal: design customizable transport layer Provide the primitives for reliable transport
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.