CPSC 689: Discrete Algorithms for Mobile and Wireless Systems

36
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch

description

CPSC 689: Discrete Algorithms for Mobile and Wireless Systems. Spring 2009 Prof. Jennifer Welch. Lecture 9. Topic: Localization Sources: Priyantha, Chakraborty, Balakrishnan. Cricket. Savvides, Han, Srivastava. Dynamic fine-grained localization in ad-hoc networks of sensors. - PowerPoint PPT Presentation

Transcript of CPSC 689: Discrete Algorithms for Mobile and Wireless Systems

Page 1: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

CPSC 689: Discrete Algorithms for Mobile and Wireless Systems

Spring 2009

Prof. Jennifer Welch

Page 2: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 2

Lecture 9

Topic: Localization

Sources: Priyantha, Chakraborty, Balakrishnan. Cricket. Savvides, Han, Srivastava. Dynamic fine-grained

localization in ad-hoc networks of sensors. MIT 6.885 Fall 2008 slides

Page 3: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 3

Localization Problem

Ad hoc setting, with many wireless devices. Assume sufficiently reliable communication between nearby

nodes (achieved somehow by the MAC layer). Assume, if necessary, that the nodes have synchronized

clocks. Precisely synchronized, or Approximately synchronized (global or gradient).

Network may (or may not) include anchors: nodes that start out knowing their own locations in 2-dimensional or 3-dimensional space. Exact or approximate.

Some nodes may have info about their distances to nearby nodes. Exact or approximate.

Page 4: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 4

Localization Problem

Localization Problem: Each node should determine “reasonable'' coordinates for itself, in 2D or 3D space, in a way that is consistent with the given anchor coordinates and distances.

The first time we are considering geographical information.

Different from Location Problem, in which each node determines the locations of other nodes.

Page 5: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 5

Why Localization? Location information could be useful for applications in ad hoc

networks, e.g.: For sensor networks that collect data or report events, it's important to

know where the data readings or events occurred. For networks that control robots, cars, or airplanes, it’s important to

know where the robots, cars,…are. Location information can be used in location-aware algorithms, for

tasks like: Routing point-to-point messages Network-wide broadcasting Aggregating data on the way to a central location Establishing spanning trees Implementing virtual geography-based infrastructure Allocating nearby resources

Page 6: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 6

Global Positioning System (GPS) Simplest localization method. Allow all nodes to have GPS receivers, to obtain position data

from GPS satellites. That's generally a good idea, but:

It doesn't work indoors. It doesn’t work outdoors with obstacles to line-of-sight from the

satellites (e.g., in the woods). Locations are only approximate---to within about 10-20 feet. Somewhat expensive---OK for laptops, but may be prohibitive for

cheaper devices like sensor nodes (but getting cheaper). Fairly large, use a lot of power (but getting smaller).

Want a technology that is deployable everywhere, accurate, and fairly low cost.

Page 7: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 7

Localization Solutions Overview

Start (possibly) with some anchors, which know their locations, exactly or approximately. May learn their locations from GPS, or may be manually

configured. Perform ranging: Determine inter-node distances for

some pairs of nodes, usually nodes that can communicate in one hop.

Possibly perform additional phases, determining distances between more pairs of nodes, or refining the existing set of distance measurements.

After obtaining a stable set of distances, compute nodes’ coordinates, using a global optimization strategy or an incremental construction.

Page 8: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 8

Localization Solutions Overview

Computing coordinates of nodes: If there are “enough” anchor nodes and enough

distances, it is possible to assign coordinates uniquely to all the nodes.

If there are too few anchor nodes or distances, it might not be possible to assign coordinates uniquely---different combinations of locations might be consistent with the given information. The algorithm can fail.

Even if there are no anchor nodes, if there are enough distances, it is possible to assign coordinates consistently to all the nodes. It may be possible to obtain a relative rather than an absolute coordinate system.

Page 9: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 9

Localization Solutions Overview After coordinates have been assigned, can evaluate them:

For each edge having a measured distance (obtained from ranging), compare the measured distance with the distance between the locations of the endpoints that are assigned by the algorithm.

Yields a measure of error for the assigned coordinates. Error can result from inaccuracies in the initial anchor

coordinates or in the distance measurements. Errors can also be introduced during the computation

(roundoff). If unreliable location info is used to compute other location

info, the errors can compound badly. Adjust the coordinate assignments to reduce the error, using

optimization techniques.

Page 10: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 10

Ranging

Some nodes measure distance between themselves and some one-hop neighbors.

Use an algorithm that depends on knowledge of signal propagation characteristics.

Technique 1: Use Received Signal Strength: Node i receives a radio signal from node j, measures

received signal power. Node i uses knowledge of the sender's signal power to

determine the power loss. Then uses a model for the signal propagation behavior to

convert the power loss to a distance.

Page 11: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 11

Ranging Unfortunately, using received signal strength

doesn’t work very well: Radio signal propagation behavior is highly dependent on

the environment (obstacles, metal,...), and highly variable. The Savvides paper describes experiments, failed in every

case except for an empty football field, with nodes all at the same height.

Technique 2: Use signal propagation time: Radio signals travel at speed of light, essentially

instantaneous; not plausible to measure this time. Devices can be equipped with other kinds of transmitters

and receivers, for slower signals. Popular choice: Ultrasonic (US) signals.

Page 12: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 12

Ranging Using Signal Propagation Time

E.g.: Time Difference of Arrival (TDoA) Sender node S transmits, simultaneously, a

radio (RF) and ultrasonic (US) signal. Receiver node R measures time difference

between when it begins to receive the two signals.

From the time difference and the known speed of US signals, node R can estimate distance with high accuracy: around 2 cm for node separations around 3 meters!

Range of US transmitters: Typical ones about 3-4 meters, newer ones 10+ meters.

Cricket system uses this method, with radio and ultrasound signals.

S R

Page 13: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 13

Cricket Overview Localization system for in-building, mobile, location-dependent

applications. Like indoor GPS. Consists of Beacons fixed on ceilings or walls of rooms, and

Listeners, which run on mobile and static nodes. Listeners learn their locations from Beacons. System is completely distributed. Beacons aren't connected with any infrastructure, don't coordinate in

any way, don't remember any location information about Listeners. Just help Listeners determine where they are.

Listeners can decide what they want to do with this location info, e.g., integrate themselves into some location-dependent applications: Maintain an active map, including information about which nodes are

nearby. Finding nearby resources. Controlling nearby devices.

Page 14: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 14

Cricket Results

Yields coarse-grained location information, not precise coordinates. Granularity is a space = portion of a room, about 4 feet

square (floor area). Listener learns only which “space” it is in.

Design criteria: Room-size granularity, low cost, no centralized

administration, scalability. Near 100% accuracy for a Listener to determine which

space it is in. Listener privacy:

Cricket doesn't record presence of Listeners. Listener chooses whether to announce its location.

Page 15: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 15

Cricket Issues How Beacons broadcast location information, and

how Listeners receive it reliably: Overcoming bad behavior of indoor wireless

channels. Avoiding interference between different Beacons'

broadcasts. Listener algorithm to decode and correlate the

broadcasts it hears. Using Cricket for applications

Page 16: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 16

Cricket Ranging Technique Each Beacon is associated with a space, and has an identifier string

for that space. Can have more than one Beacon per space---in which case they all

broadcast the same identifier. String must be set by someone manually.

The only manual configuration required. Beacon broadcasts its space’s identifier frequently, using radio

signals. Each time Beacon broadcasts an RF signal, it simultaneously

broadcasts a US signal. Each nearby Listener measures time difference between beginning

of receipt of the RF signal and beginning of receipt of the UF signal. Accurate measurement, using local clock. Uses this to estimate distance from transmitting Beacon. Usually accurate enough to permit reliable identification of the

nearest Beacon, which allows the Listener to identify its space.

Page 17: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 17

Interference Problems

Collisions between transmissions of nearby Beacons: Could result in loss of data Not serious, because Beacons broadcast frequently. More seriously, could cause a Listener to correlate RF signal

of one Beacon with US signal of another Beacon. Multipath effects for ultrasound signals:

Reflections from wall, other objects. Long time scale, orders of magnitude longer than RF

multipath. Could cause Listener to correlate RF signal of a Beacon with

an indirect (late) US signal from the same Beacon, which yields a wrong distance estimate.

Page 18: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 18

Interference Problems

Listener's task (in the face of interference): Gather various RF and US samples. Try to correlate them, i.e., figure out which were

sent by the same Beacon, as part of the same simultaneous transmission.

Calculate distance from the speed, figure out which Beacon is closest.

Choose the space identifier sent from the closest Beacon.

Page 19: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 19

Avoiding Interference Beacons use randomization to decide when to broadcast. Not a full-fledged CSMA/CA-style protocol---simpler, less

energy usage. Beacon chooses successive transmission times randomly,

uniformly, from an interval of [R1,R2] milliseconds. Choice of R1 and R2 based on:

Number of Beacons expected to be within range. Time it takes for transmitted information to reach Listeners

(depends on message size and link bandwidth). Small R1, R2: More chance of collisions. Large R1, R2: More time required for localization.

Page 20: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 20

Coping with Interference Attach a Beacon-UID to RF transmission, thus allowing Listeners to

identify source of RF signals reliably. Since RF range is much larger than US range (80’ vs. 30’), Listener

who receives US signal is almost certain to also receive the corresponding RF signal.

Slow down RF data transmission rate, to ensure that the interval of receipt of the RF transmission includes the interval of receipt of the UF transmission:

This overlap is enough to allow correct correlation for successive transmissions from the same Beacon.

Multipath: If two US signals arrive, overlapping the same RF signal, then Listener chooses the first one for correlation.

B L

Page 21: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 21

Interference from Different Beacons Consider Beacon A, interfering

Beacon B. Not-so-bad case:

Listener L gets RF from A, totally including US from B; potential for incorrect correlation.

But then L also receives the corresponding RF from B; since its interval contains that of the US from B, it overlaps with the RF from A.

That should result in a collision, so L won't be fooled into making the incorrect correlation.

A L

B

Page 22: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 22

Interference from Different Beacons

Consider Beacon A, interfering Beacon B.

A worse case: L gets RF from A, including

reflected, late US from B. L receives the corresponding RF

from B, but it arrives much earlier and doesn't overlap with the RF from A, so doesn't result in a collision.

This can result in an incorrect correlation, and a wrong estimate.

A L

B

Page 23: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 23

Coping with Wrong Correlations L calculates distance to Beacon B based on several

samples for B, not just one. Randomization reduces likelihood of repeated wrong

estimates. How Listener L determines estimate from several samples:

Chooses the one that occurs most often---the “mode”. More precisely, L rounds off calculated distances so

estimates fall into discrete “bins”, chooses the bin that appears most often.

Mode works better than mean, because it does a better job of throwing out anomalous readings.

Difference in accuracy is more apparent when more samples are taken---since then there is a higher likelihood of some wrong measurements, which the mean takes into account but the mode doesn't.

Page 24: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 24

More Precise Localization So far:

Introduced the problem, ranging technique for distance estimation. Cricket system.

Distance estimation using RF + US signals. Determines room “space” only, not actual coordinates. Used to implement space-aware applications.

Next: Consider determining actual coordinates. [Savvides], giving basic methods. [Priyantha et al.], Mobile-assisted methods. [Moore et al.], Robust methods. [Aspnes et al.], Rigidity theory, describing when it’s possible to

determine coordinates.

Page 25: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 25

Dynamic Fine-Grained Localization in ad hoc Networks of Sensors

[Savvides et al.] Ad hoc network, some fraction of nodes are anchors (with known

coordinates). 2D Uses TDoA ranging for distance estimation. Introduces basic multilateration method:

Iterative method for assigning locations to all nodes in a graph, starting from anchors.

Each step is either atomic (adds one new node) or collaborative (adds several new nodes).

New positions may involve some error; use least-squares estimation to minimize the error.

Claim high success rate for assigning coordinates, high accuracy. Claim distributed algorithm (but descriptions mostly centralized).

Page 26: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 26

Atomic Multilateration Assign 2D coordinates (x0,y0) to a node 0 having some anchor

neighbors 1,…,k. Assume:

Coordinates of 1,...,k are known. Distances di between node 0 and anchor neighbors are known.

For each i, 1 ≤ i ≤ k, calculate:

erri = di – sqrt( ( xi - x0 )2 + ( yi - y0 )2 ) ). Discrepancy between measured and calculated distance. Function of unknown coordinates (x0,y0).

Want to choose (x0,y0) to minimize the errors, specifically, minimize sum of squares of the erri.

If distance estimates and anchor coordinates are exactly accurate, we can achieve total error = 0.

Page 27: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 27

Atomic Multilateration Need 3 anchors. With only 2, solution may not be

unique, even if measurements are exact (see figure)

With 3 non-collinear anchors, the minimization problem has a unique solution.

A trick: If speed s of US signal is unknown, can solve uniquely for s as well as (x0,y0), with four anchor points.

0?

0?

12d1

d2

Page 28: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 28

Iterative Multilateration Repeat atomic multilateration, add one new node at a time. Heuristic: Choose unknown node with the most anchor neighbors. Error accumulation:

Really, anchor position and distance estimates aren't exact. Subject to measurement error, limitations of precision of

representation. Since each new node's position is defined based on previous ones,

error can compound. Authors claim this isn't a problem, because the accuracy of each

stage is so high. Distributed algorithm?

Not described that way---someone must select the next node.

Page 29: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 29

Collaborative Multilateration A variant of atomic multilateration, used by a set of unknown nodes

to determine their location estimates ``collaboratively''. For situations in which none of the individual nodes has enough

anchor neighbors, but the entire collection does. Example:

1

2, U

6

5

4, U

3

Anchors = 1, 3, 5, 6 Unknowns = 2, 4

Consider an undirected connected graph, where nodes are classified as anchor (A) or unknown (U).

The U nodes may form a collaborative set. Q: Under what conditions?

Page 30: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 30

Collaborative Multilateration

Set up an error equation for every edge in the graph: Between an unknown node and an anchor node,

or Between two unknown nodes.

Equations have 2 |U| unknowns, for 2 coordinates of each unknown node.

Need “enough” equations; don’t give characterization. Suggest that each unknown node should have

degree 3 (neighbors may be anchors or unknown). Clearly we need more than this---need some

anchors.

Page 31: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 31

Collaborative Multilateration

1

2?

6

5

4?

3

Example works: 5 equations, 4 unknowns. Distances d21 and d23 yield two possible positions

for 2; d45 and d46 yield two possibilities for 4. Assuming the 4 possible distances are distinct, d24

is enough to disambiguate.

Page 32: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 32

Distances might not all be distinct, in which case we don’t get unique solution: But this happens only for sets of choices of points of

“measure 0”. (Implicitly) generalize the example:

A tree of U nodes, plus some A nodes. Each U node has degree 3, counting connections

to both U nodes and A nodes. Each “leaf” U node has 2 A neighbors.

(Implicitly) claim this is enough to generate unique positions. Assuming exact measurements. Except for a set of point choices of measure 0. Remains to be proved. Is this the most general condition?

1

6

5

3

2? 4?

Collaborative Multilateration

Page 33: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 33

Forming a Collaborative Set

Also give distributed algorithm for a set of unknown (U) nodes to try to form a collaborative set C.

It produces a rooted tree of U nodes, where: Each leaf has at least 2 anchor (A) neighbors. The root has at least 3 neighbors that are either

anchors or its children. Each non-root, non-leaf node has at least 2 neighbors

that are either anchors or its children. Implies the implicit conditions we just discussed.

Page 34: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 34

Algorithm to Form a Collaborative Set Distinguished U node u0 starts a distributed algorithm to

establish a rooted tree of U nodes with itself as the root. A node in the tree with no children so far can decide it is a

leaf if it has 2 Anchor neighbors; then marks itself as in C, sends OK to its parent.

A non-root, non-leaf node can finish its work if the number of children from which it has received OK plus the number of Anchor neighbors is 2; then marks itself as in C, sends OK to its parent.

Root u0 can finish if the number of children from which it has received OK plus the number of Anchor neighbors is 3; then marks itself as in C, and announces the members of C.

Page 35: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 35

Forming a Collaborative Set Q: Race condition: Some node could mark itself after its parent

has already collected enough OKs. Gets rejected? Q: Prove that this works right?

Example: Node 2 starts the algorithm, sets up a 2-node tree with itself as the

root, with the needed properties. Node 4 declares itself a leaf (2 Anchor neighbors). Node 2 declares itself done (2 Anchor neighbors + one OK child).

1

2, U

6

5

4, U

3

Page 36: CPSC 689:  Discrete Algorithms for Mobile and Wireless Systems

Discrete Algs for Mobile Wireless Sys 36

Multilateration Can also apply collaborative multilateration iteratively, mix with

atomic multilateration. Success of the multilateration algorithms depends on some

characteristics of the node and anchor placement, especially: High network connectivity (density). High probability that nodes have degree 3. Prevalence of Anchors.

Distributed coordinate-determination algorithms needed, not given. Accuracy:

Claim accuracy of iterative multilateration is very good in small networks.

Needs to be improved for larger networks. Need new strategies to limit error propagation across the network (see

Robust Quadrilaterals paper). Algorithms, especially collaborative strategies, need more theoretical

analysis.