1.25k likes | 1.44k Views
Part III: Time & Space Problems in Sensor Networks Mani Srivastava. Time and Space Problems. Timing synchronization Node Localization Sensor Coverage. Time Synchronization. Time sync is critical at many layers in sensor nets Beam-forming, localization, tracking, distributed DSP.
E N D
Part III: Time & Space Problems in Sensor NetworksMani Srivastava
Time and Space Problems • Timing synchronization • Node Localization • Sensor Coverage
Time Synchronization • Time sync is critical at many layers in sensor nets • Beam-forming, localization, tracking, distributed DSP Ref: based on slides by J. Elson
Time Synchronization • Time sync is critical at many layers in sensor nets • Beam-forming, localization, tracking, distributed DSP • Data aggregation & caching t=1 t=0 t=2 t=3 Ref: based on slides by J. Elson
Conventional Approaches • GPS at every node • E.g. some GPSs provide 1 pps @ O(10ns) accuracy • But • doesn’t work everywhere • cost, size, and energy issues • NTP • some well known “primary time servers” are synchronized via GPS, atomic clock etc. • pre-defined server hierarchy (stratums) • nodes synchronize with one of a pre-specified list of time servers • Problems: • potentially long and varying paths to time-servers due to multi-hopping and short-lived links • delay and jitter due to MAC and store-and-forward relaying • discovery of time servers • Perfectly acceptable for most cases • E.g. Internet (coarse grain synchronization) • Inefficient when fine-grain sync is required • e.g. sensor net applications: localization, beamforming, TDMA etc
Limitations of What Exists • Existing work is a critical building block BUT… • Energy • e.g., we can’t always be listening or using CPU! • Wide range of requirements within a single app; no method optimal on all axes • Cost and form factor: can disposable motes have GPS receivers, expensive oscillators? Completely changes the economics… • Needs to be fully decentralized, infrastructure-free Ref: based on slides by J. Elson
Sources of time synchronization error • Send time • Kernel processing • Context switches • Transfer from host to NIC • Access time • Specific to MAC protocol • E.g. in Ethernet, sender must wait for clear channel • Propagation time • Dominant factor in WANs • Router-induced delays • Very small in LANs • Receive time • Common denominator: non-determinism
About Computer Clocks • Clocks in computers • Clock Skew • Due to the clock drift, the local clock need to be periodically synchronized to maintain an accurate global time
[Romer2000] Scheme for Ad Hoc Networks • Don’t try to synchronize local clocks all the time • Generate time stamps to record the events’ occurring time • The time stamps are updated along its way by each node using its own local clock • As the result of clock shift and message propagation delay, the final time stamp is expressed as a lower and upper bound
Example 1 2 3 N • When 1 senses an event, it starts counting time with its clock. • 1 sends 2 a message regarding the event, and a time stamp including how long the time has elapsed since the event • 2 estimates the transmission delay to the time stamp and continues counting the time • Messages are forwarded the same fashion as 12 to node N • N is able to recover the time by looking at the time stamp 1 2 3 N
Analysis • Assumptions • Maximum clock skew is known • The link can survive long enough so that a synchronization message can be sent after the application message • Time transformation • Recall • Real time estimation based on clock 1 • Time difference in local clock 2
Message Delay t4 t5 t6 M1 ACK1 M2 ACK2 t3 t1 t2 • Estimate delay for M2 • Sender: • Receiver: • A transmission of M2 is necessary for receiver to obtain an estimation of delay! Dummy message might need to be sent • It is desirable to make the interval between M1 and M2 short Receiver Sender
Add Them Together ! 1 2 3 N idle1 idle2 • Node N puts together the time counted by all the nodes and message delays • Notation • idle=t2-t1 • rtt=t3-t2 rtt1 rtt2 r1 r2 r3 rN s1 sN s2 s3 3 N 1 2
This Leads To … • Inaccuracy is proportional to time stamp length • Time stamp length increases linearly with • the age of time stamp • the number of hops S1 S2
Results • Simulation • Number of hops <= 5 • Age of time stamp <= 500 s • Length of time stamp <= 3 ms • Able to distinguish two events with time separation >= 6 ms • Improvements • Store and forward the history of time stamp. • Look for common node in history when two time stamps overlap • When events have overlapping time stamps • Use statistical tools to analyze the probability that one event happens before another
New Sync Method: Reference Broadcast [Elson2001] • Reference-broadcast synchronization: Very high precision sync with slow radios • Beacons are transmitted, using physical-layer broadcast, to a set of receivers • Time sync is based on the difference between reception times; don’t sync sender w/ receiver! • Post-facto synchronization: Don’t waste energy on sync when it is not needed • Timestamp events using free-running clocks • After the fact, reconcile clocks • Peer-to-peer sync: no master clock • Tiered Architectures: Range of node capabilities Ref: based on slides by J. Elson
Traditional Sync Problem: Many sources of unknown, nondeterministic latency between timestamp and its reception Sender Receiver Send time Receive Time At the tone: t=1 NIC NIC Access Time Propagation Time Physical Media Ref: based on slides by J. Elson
Reference Broadcast Sync Sync 2 receivers with each other, NOT sender with receiver Sender Receiver Receiver Receive Time NIC NIC NIC I saw it at t=4 I saw it at t=5 Propagation Time Physical Media Ref: based on slides by J. Elson
RBS reduces error by removing much of it from the critical path NIC NIC Sender Sender Receiver Receiver 1 Critical Path Receiver 2 Time Critical Path Traditional critical path: From the time the sender reads its clock, to when the receiver reads its clock RBS: Only sensitive to the differences in receive time and propagation delay Ref: based on slides by J. Elson
Observations about RBS • RBS removes send and accesstime errors • Broadcast is used as a relative time reference • Each receiver synchronizing to a reference packet • Ref. packet was injected into the channel at the same instant for all receivers • Message doesn’t contain timestamp • Almost any broadcast packet can be used, e.g ARP, RTS/CTS, route discovery packets, etc Ref: based on slides by J. Elson
Phase Offset Estimation • Simplest case: single pulse, two receivers • Xmitter broadcasts reference packet • Each receiver records the time that beacon was received according to its local clock • Receivers exchange observations • Sufficient information to form a local (relative) timescale • However, global timescales are also important • Extending simple case to many receivers • Assumptions • Propagation delay is zero • No clock skew • Receiver non-determinism (error) is Gaussian • Sending more messages increases precision • Transmitter broadcasts m packets • Each receiver records time the beacon was observed • Receivers exchange observations • Receiver i computes phase offset to receiver j as the average of the offsets implied by each pulse received by both nodes • Result:
Receiver Determinism Testbed: Berkeley motes with narrowband (19.2K) radios Ref: based on slides by J. Elson
Gaussian = Good! • Well behaved distributions are useful • Error can be reduced statistically, by sending multiple pulses over time and averaging • Also, easier to model/simulate • Problem: Clock skew • It takes time to send multiple pulses • By the time we do, clocks will have drifted • Oscillator characteristics • Accuracy: difference between expected and actual frequency • Difference: Frequency error (usually 10-4 – 10-6) • Stability: tendency to stay at same frequency over time • Phase difference between two nodes’ clocks will change due to frequency differences • Solution: don’t average; fit a line instead! • Frequency and phase of local node’s clock recovered from slope and intercept of the line • Fitting a line assumes that frequency is stable • Assume high short-term frequency stability • Ignore data more than a few minutes old Ref: based on slides by J. Elson
Clock Skew Estimation Results • 2 receivers (motes): r1, r2 • Point (0,0) marks the first pulse • Receivers synchronized, no clock skew • Clock skew increases as time increases • Linear fit gives good results • With clock skew estimation, sufficient information exists to convert any time value generated by r1’s clock to a time value that would have been generated by r2’s clock Time Ref: based on slides by J. Elson
RBS: Phase offset estimation Numerical analysis results • Numerical analysis for m=1..50, n=2..20 • 1000 trials for each m, n • Results: mean dispersion, std.dev • 2-receiver case • 30 broadcasts improve precision from 11 usec to 1.6 usec • 20-receiver case • Dispersion reduced down to 5.6 usec
RBS Sync Advantages • 11usec precision over 19.2K radios: wow! • local or relative time: “peer to peer sync” • allows seamless exchange of messages about the local area; no error due to the master sync server being far away • (NTP allows sync without an external ref., but some node still needs to be defined as “time”) • Graceful handling of lost packets, outliers Ref: based on slides by J. Elson
Comparison to NTP • Second implementation: • Compaq IPAQs (small Linux machines) • 11mbit 802.11 PCMCIA cards • Ran NTP, RBS-Userspace, RBS-Kernel • NTP synced to GPS clock every 16 secs • NTP with phase correction, too; it did worse (!) • In each case, asked 2 IPAQs to raise a GPIO line high at the same time; differences measured with logic analyzer Ref: based on slides by J. Elson
Clock Resolution Ref: based on slides by J. Elson
Clock Resolution RBS degraded slightly (6us to 8us); NTP degraded severely (51us to 1542us) Ref: based on slides by J. Elson
Multihop RBS • Some nodes broadcast RF synchronization pulses • Receivers in a neighborhood are synced by using the pulse as a time reference. (The pulse senders are not synced.) • Nodes that hear both can relate the time bases to each other “Blue pulse 2 secafter red pulse!” “Here 3 sec after blue pulse!” “Here 1 sec after red pulse!” “Here 1 sec afterblue pulse!” “Here 0 sec after red pulse!” Ref: based on slides by J. Elson
Time Routing 1 2 5 6 3 4 7 8 9 10 11 The physical topology can be easily converted to a logical topology; links represent possible clock conversions 1 2 5 A B 6 3 4 7 C 8 9 D 10 11 Use shortest path search to find a “time route”; Edges can be weighted by error estimates Ref: based on slides by J. Elson
External Standards (UTC) 1 2 5 6 3 4 7 8 9 10 11 The multihop algorithm can also be easily used to sync an RBS domain to an external standard such as UTC 1 2 5 A B 6 3 4 7 C 8 9 GPS D GPS 10 11 GPS’s PPS generates a series of “fake broadcasts”: “received” by node 11’s local clock and UTC Ref: based on slides by J. Elson
Post-facto Sync (well, pre) Sync pulses Drift Estimate Test pulses 7usec error after 60 seconds of silence Ref: based on slides by J. Elson
RBS Summary • RBS can improve accuracy by removing sender from the critical path • RBS outperforms NTP • 8 times better for light load • Remarkable performance on heavy load • Multi-hop algorithm can extend RBS property across broadcast domains, and to external standards such as UTC • Facilitates tiered architectures (some nodes have GPS, some don’t) • Facilitates post-facto sync (save energy by only syncing after an event of interest) • Cannot be applied to the Internet at large • Only works with broadcast medium, not point-to-point links Ref: based on slides by J. Elson
References on Timing Synchronization • Kay Romer Time Synchronization in Ad Hoc Networks • Jeremy Elson et al. Fine-Grained Network Time Synchronization Using Reference Broadcasts • http://www.gpsclock.com/gps.html
Localization • Localization of sensor nodes has many uses • Beamforming for localization of targets and events • Geographical forwarding • Geographical addressing • Why not just GPS at every node? • Large size • High power consumption • Works only when LOS to satellites • Over kill – often only relative position is needed • Works only on earth (e.g. sensor nets on other planets)
What is Location? • Absolute position on geoid • e.g. GPS • Location relative to fixed beacons • e.g. LORAN • Location relative to a starting point • e.g. inertial platforms • Most applications: • location relative to other people or objects, whether moving or stationary, or the location within a building or an area • Range and resolution of the position location needs to be proportionate to the scale of the objects being located
Self-positioning vs. Remote-Positioning • Self-positioning • Mobile node formulates its own position • e.g. by sensing signals received at the mobile from the transmitters in the infrastructure • Remote-positioning • Position of mobile node calculated at a remote location • e.g. by using signals received from the mobile by sensors in the infrastructure • Indirect positioning • Using a data link it is possible to send position measurements from a self-positioning receiver to a remote site, or vice versa • A self-positioning system that sends data to a remote location is called indirect remote-positioning • A remote-positioning system transmitting an object’s position to the object is called indirect self-positioning
Techniques for Location Sensing • Measure proximity to “landmarks” • e.g. near a basestation in a room • example systems: • Olivetti’s Active Badge for indoor localization • infrared basestations in every room • localizes to a room as room walls act as barriers • Most commercial RF ID Tag systems • strategically located tag readers • improved localization if near more than one landmark • Estrin’s system for outdoor sensor networks • grid of outdoor beaconing nodes with know position • position = centroid of nodes that can be heard • # of periodic beacon packets received in a time interval exceeds a theshold • a problem: not really location sensing • it really is proximity sensing • accuracy of location is a function of the density of landmarks • Location accuracy = O(distance between landmarks)
Techniques for Location Sensing (contd.) • Dead reckoning: position relative to an initialization point • work as supplement to a primary location sensing techniques • resynchronize when the primary location sensing technique works, and takes over if the primary fails • e.g. supplement GPS during signal outages • Use wheel and steering information in vehicles • Integrating accelerometers mounted on gyroscopically stabilized platforms • Point Research’s Pointman Dead Reckoning Module • inertial measurement unit for personnel on foot • Latitude and longitude relative to the start point • magnetic compass + MEMS-based electronic pedometer + barometric altimeter + DSP • position error of 2-5% of total distance traveled since last resynchronization • no drift with time • U. S. Patent No. 5,583,776. • www.pointresearch.com
Pointman Dead Reckoning Module Size: 1.9" x 2.9" x 0.6“ Weight: 1.5 oz. Power: 0.5 Watts @ 3.3 V (250 mW in new low-power DRM)
Trackman Personnel Locator • Combines a DRM with a GPS and a radio transmitter to provide continuous location tracking • Kalman filter is used to combine the dead reckoning data with GPS data when it is available • Specifications: • Size: 3.2" x 7.5" x 2.3" • Weight: 12 oz. • Range: 0.25 miles
Techniques for Location Sensing (contd.) BS 2 BS 1 MS 3 BS • Measure direction of landmarks • Simple geometric relationships can be used to determine the location by finding the intersections of the lines-of-position • e.g. Radiolocation based on angle of arrival (AoA) measurements of beacon nodes (e.g. basestations) • can be done using directive antennas or antenna arrays • need at least two measurements
Techniques for Location Sensing (contd.) • Measure distance to landmarks, or Ranging • e.g. Radiolocation using signal-strength or time-of-flight • also done with optical and acoustic signals • Distance via received signal strength • use a mathematical model that describes the path loss attenuation with distance • each measurement gives a circle on which the MS must lie • use pre-measured signal strength contours around fixed basestation (beacon) nodes • can combat shadowing • location obtained by overlaying contours for each BS • Distance via Time-of-arrival (ToA) • distance measured by the propagation time • distance = time * c • each measurement gives a circle on which the MS must lie • active vs. passive • active: receiver sends a signal that is bounced back so that the receiver know the round-trip time • passive: receiver and transmitter are separate • time of signal transmission needs to be known • N+1 BSs give N+1 distance measurements to locate in N dimensions
Radiolocation via ToA and RSSI x2 d2 BS BS x1 MS d1 d3 BS x3
Techniques for Location Sensing (contd.) • Measure difference in distances to two landmarks • Time-difference-of-arrival (TDoA) • Time of signal transmission need not be known • Each TDoA measurement defines line-of-position as a hyperbola • hyperbola is a curve of constant difference in distance from two fixed points (foci) • Location of MS is at the intersection of the hyperbolas • N+1 BSs give N TDoA measurements to locate in N dimensions
Algorithms for Location • Depends on whether ToA (RSSI is similar) or TDoA is used • Straightforward approach: geometric interpretation • Intersection of circles for ToA • Intersection of hyperbolas for TDoA • But what if the circles or hyperbolas do not intersect at a point due to measurement errors?