Spot Symposium 2009 Ksn Radio Stack

511 views

Published on

Invited Talk
Sun SPOT Symposium 2009, London

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
511
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Spot Symposium 2009 Ksn Radio Stack

  1. 1. Markus Bestehorn Stephan Kessler Andreas Leppert Sven Meisinger KSN Radio Stack: pp g KSN Radio Stack: Reliable Wireless Communication for Data- intensive Applications in Sensor Networksintensive Applications in Sensor Networks Sun SPOT Symposium 2009 London www.kit.edu
  2. 2. Data-Intensive Application in WSN? Wireless Sensor Network (WSN) Large number of battery powered devices Introduction Data-Intensive S St k g y p energy is valuable! Exchanging data using wireless communication User can access network through base station Sun SPOT Sun Stack KSN Radio Stack Design Targets SHP User can access network through base station Countless Applications Medical Care, Environment Monitoring, Object Tracking… Su S O SHP Routing Other Layers Demo What is data-intensive application in WSN? 2 variations: Nodes generate Data Comparison KSN Team g Data must be transported to user / base station Amount of data accumulates on the way Base station has to distribute data to the whole network Acitivities Research Q&A Base station has to distribute data to the whole network 2 examples follow Slide 2Markus Bestehorn
  3. 3. Example 1: Data Gathering Data Gathering Applications A large number of nodes Introduction Data-Intensive S St k g Generating / Measuring data (continously) Sending measured data back to base station Sun Stack KSN Radio Stack Design Targets SHPSHP Routing Other Layers Demo More Sensor Nodes Base Comparison KSN Team D it C i /A ti Base StationAcitivities Research Q&A Despite Compression/Aggregation: Messages of several KB have to transmitted reliably Large part of result is lost if 1 message is lost! Slide 3Markus Bestehorn
  4. 4. Example 2: Over-the-Air Deployment Testbeds Evaluate your software Introduction Data-Intensive S St k y Test and debug software Sun Stack KSN Radio Stack Design Targets SHP Problem: Testing-Cycle very cumbersome 1. Connect SPOT to USB 2. Put SPOTs into position SHP Routing Other Layers Demo u S O s o pos o 3. Start testing / evaluation 1. Errors in software? 2 Find error fix code Comparison KSN Team 2. Find error, fix code 4. Collect SPOTs and start with step 1 Solution: Acitivities Research Q&A Fixed infrastructure connected to nodes Not possible/feasible or all deployments Distribute software over-the-air (OTA) Slide 4 ( ) Markus Bestehorn
  5. 5. Example 2: Over-the-air Deployment (cont‘d) Requires large files / messages to be transmitted Query Processor suite file ~500 KB Introduction Data-Intensive S St k Q y Libraries ~700 KB „Large“ Number of Hops I b d f 30 SPOT 9 H Sun Stack KSN Radio Stack Design Targets SHP In our testbed of 30 SPOTs max. 9 Hops Any testbed requires transmission of large SHP Routing Other Layers Demo Any testbed requires transmission of large messages over multiple hopsComparison KSN Team Acitivities Research Q&A Slide 5Markus Bestehorn
  6. 6. Requirements of data-intensive Applications Communication software (stack) must Deliver messages reliably Introduction Data-Intensive S St k g y Cope with relatively large messages Multiple Hops between sender and receiver node P ti l l h d i t k Sun Stack KSN Radio Stack Design Targets SHP Particularly hard in sensor networks Expect nodes to fail during transmission React to topology changes due to external influences, e.g., SHP Routing Other Layers Demo p gy g g Weather Closing/Opening of doors Comparison KSN Team SPOTs are shipped with a communication stack Why not use this stack? Acitivities Research Q&A Slide 6Markus Bestehorn
  7. 7. Testing the Sun Stack (1) Setup for evaluation 2-5 nodes in a line, i.e., 1-4 hops Introduction Data-Intensive S St k , , p 1 specified node sends a message of varying size RadioStream was used After sending node computes a hash value of the message Sun Stack KSN Radio Stack Design Targets SHP After sending, node computes a hash value of the message 1 specified node receives message When receiving completes, receiver computes hash value over received message SHP Routing Other Layers Demo received message Transmission successful, if both hash values are equal Code can be obtained from our homepage: htt // i d i k l h d /KSN Comparison KSN Team http://www.ipd.uni-karlsruhe.de/KSNAcitivities Research Q&A Sender Receiver Slide 7Markus Bestehorn Sender Receiver
  8. 8. Testing the Sun Stack (2) Evaluation was conducted with the „Blue“ release (current)Introduction Data-Intensive S St kSun Stack KSN Radio Stack Design Targets SHPSHP Routing Other Layers Demo Comparison KSN Team Acitivities Research Q&A Slide 8Markus Bestehorn
  9. 9. Motivation for a new stack Sun stack is reliable and fast for small messages Almost no errors for message sizes below 1KB Introduction Data-Intensive S St k g Unreliable for large messages or high number of hops Main reason: Design Goals for the Sun Stack L P Sun Stack KSN Radio Stack Design Targets SHP Low Power Efficient usage of low bandwidth available Design not aimed at „data-intensive“ applications SHP Routing Other Layers Demo g „ pp Messages are transmitted reliably 1 h Comparison KSN Team over 1 hop 802.15.4 layer works Errors must occur above Acitivities Research Q&A Design new stack above MAC Slide 9Markus Bestehorn
  10. 10. Agenda Motivation: Why do we need another stack? What does „data-intensive“ in sensor networks mean Introduction Data-Intensive S St k „ Demo and reliability evaluation data KSN Radio Stack D i & ddi i l f Sun Stack KSN Radio Stack Design Targets SHP Design targets & additional features The core of the KSN Stack Optional KSN stack layers SHP Routing Other Layers Demo p y Possibilities for Optimization / Improvements Reliability evaluation and Demo of the KSN stack Comparison: Sun Stack vs KSN Stack Comparison KSN Team Comparison: Sun Stack vs. KSN Stack The KSN Team Projects Acitivities Research Q&A Research Agenda Slide 10Markus Bestehorn
  11. 11. Design Targets - Reliability Transmission of large messages over multiple hops must work reliably Introduction Data-Intensive S St k y Problems encountered during transmission must be fixed inside the communication stack if possible Handling of errors should not be mixed with application code Sun Stack KSN Radio Stack Design SHP Handling of errors should not be mixed with application code Expect nodes to fail during transmission External influences change communication behaviour of nodes Weather SHP Routing Other Layers Demo Weather Closing doors Sender must know if transmission failed on intermediate Comparison KSN Team nodes End-to-End ACKAcitivities Research Q&A Sender Receiver ACK Slide 11Markus Bestehorn
  12. 12. Design Targets - Extendability Different applications have different demands Run Multiple Stacks parallely on one SPOT Introduction Data-Intensive S St k p p y Adding / implementing new layers Network Management might require another stack than Query Processing Sun Stack KSN Radio Stack Design SHP Processing Stack with less complex interfaces for student experiments, more sophisticated stack to gather the result of their experiments SHP Routing Other Layers Demo experiments Comparison KSN Team Acitivities Research Q&A Slide 12Markus Bestehorn
  13. 13. Further Design Targets Compatibility with 802.15.4 Interface-Compatibility to Sun Stack Introduction Data-Intensive S St k Interface Compatibility to Sun Stack Users have written applications using the Sun Stack Migrating to our stack should not require rewriting the application Sun Stack KSN Radio Stack Design SHP application Link-Quality-awareness Probability for failures increases, as link quality decreases SHP Routing Other Layers Demo Communication hardware on SPOTs allows estimations about link quality Example: Quality-Aware Routing Layer Comparison KSN Team p y g y Acitivities Research Q&A Slide 13Markus Bestehorn
  14. 14. Optimization is not a Design Target Communication stacks for sensor nodes are usually optimized regarding energy usage Introduction Data-Intensive S St k p g g gy g Nodes are usually battery-powered Reliability is the most important step towards efficiency U t k t i i f ti Sun Stack KSN Radio Stack Design SHP Users query a sensor network to gain information demand for information has to be satisfied (efficiently) If failures prevent delivery of information SHP Routing Other Layers Demo Energy used to acquire information until failure occured is wasted! Users might retry Failure likely to occur again more waste! Optimization is the step after functionality is ensured Comparison KSN Team p p y “We should forget about small efficiencies, say about 97% of th ti t ti i ti i th t f ll il ” Acitivities Research Q&A the time: premature optimization is the root of all evil.” (Donald Knuth) Slide 14Markus Bestehorn
  15. 15. Foundation for Reliable Communication Basic Operation of 802.15.4: Sending a packet of 127 byte Introduction Data-Intensive S St k g p y Receiver is a node within the radio range of the sender Two variants of the Basic Operation: B d R i dd i bl k“ Sun Stack KSN Radio Stack Design SHP Broadcast: Receiver address is „blank“ No acknowledgement Unicast: Receiver address identifies node SHP Routing Other Layers Demo If transmission of 127 byte was successful, acknowledgement is sent If there was a failure, no acknowledgement is received and a i i Comparison KSN Team timeout expires. Reliable communication is based on this basic operation First Step: Acitivities Research Q&A First Step: Design communication protocol for messages larger than 127 byte Slide 15Markus Bestehorn
  16. 16. SHP – Single Hop Protocol Single Hop Protocol (SHP) Layer provides interface for Unicast of messages of arbitrary size Introduction Data-Intensive S St k g y Broadcast of messages of arbitrary size Preparation for sending (unicast or broadcast) L t M M h i f b b t M Sun Stack KSN Radio Stack Design SHP Let Message M have a size of b bytes Decompose M into f fragments Assign a sequence number s={1…p} 41 32 SHP Routing Other Layers Demo g p to each fragment Compute checksum C from M Sending process for unicast and broadcast different C Comparison KSN Team Sending process for unicast and broadcast different starting with broadcast Acitivities Research Q&A Slide 16Markus Bestehorn
  17. 17. Single Hop Protocol - Broadcast Two types of packets BroadcastData: Contains fragments Introduction Data-Intensive S St k g of 104 Byte, used for first f-1 fragments BroadcastEnd: Contains last fragment with sequence number s=f Sun Stack KSN Radio Stack Design SHP with sequence number s f Possible failures: Unexpected sequence number SHP Routing Other Layers Demo Timeout while waiting for next/last fragment Limitations (current implementation) Comparison KSN Team ( p ) Sequence Number is 16-bit long max. Broadcast ~ 6 MB sufficient for SPOTs Acitivities Research Q&A Slide 17Markus Bestehorn
  18. 18. SHP – Possible Broadcast Improvement Problem: Broadcast still inherently unreliable Sender broadcasts f fragments to surrounding nodes Introduction Data-Intensive S St k f g g Some receivers only receive k<f fragments Receiver has spent energy, but message is incomplete receiver discards all received fragments energy wasted! Sun Stack KSN Radio Stack Design SHP receiver discards all received fragments, energy wasted! Possible improvement (not yet implemented): Each receiver uses sequence numbers to determine, which k SHP Routing Other Layers Demo fragments are missing If k is sufficiently small compared to f, ask sender to resend missing fragments with unicast Comparison KSN Team Open questions: Caching mechanisms for broadcast messages on sender What is sufficiently small“? Acitivities Research Q&A What is „sufficiently small ? Slide 18Markus Bestehorn
  19. 19. Single Hop Protocol - Unicast SHP - Unicast Protocol 1. Send UnicastRequest to receiver Introduction Data-Intensive S St k q Contains Checksum C Size b of Message M in bytes receiver can abort transfer Sun Stack KSN Radio Stack Design SHP 2. Send f fragments to receiver Receiver has to acknowledge each fragment SHP Routing Other Layers Demo g Unacknowledged fragments are retransmitted after a timeout 3. Receiver checks if data is not Comparison KSN Team disrupted using checksum CAcitivities Research Q&A Slide 19Markus Bestehorn
  20. 20. SHP – Unicast Improvements Evaluation has shown: Data rates with Sun stack higher than with KSN stack Introduction Data-Intensive S St k g Comparable only for small messages due to reliability Reason for lower data rate: A k l d f h f Sun Stack KSN Radio Stack Design SHP Acknowledgment for each fragment congestion Less payload due to larger sequence numbers SHP Routing Other Layers Demo Ideas for improvements: „TCP/IP-like ACK“ Aggregate ackowledgements and send 1 packet to acknowledge several received fragments Comparison KSN Team acknowledge several received fragments Increase number of packets between ackowledgements depending on link quality Acitivities Research Q&A Slide 20Markus Bestehorn
  21. 21. Summary Single Hop Protocol SHP offers reliable delivery to 1-hop neighbors Broadcast Introduction Data-Intensive S St k Unicast Message size B d d 6 MB f b d SPOT h Sun Stack KSN Radio Stack Design SHP Bounded to 6 MB for broadcast Theoretically unbounded for unicast VM defines boundaries for max. array length SPOT has 512KB of RAM SHP Routing Other Layers Demo Layer still not fine-tuned large room for improvements! Comparison KSN Team Design targets so far? Extendability not yet Acitivities Research Q&A 802.15.4 compatiblity done Reliability only 1 hop Slide 21Markus Bestehorn
  22. 22. Extendability – Multiple Stacks, 1 SPOT All communication is based on reliable 1-hop communication SHP usable as a foundation Introduction Data-Intensive S St k Idea to allow multiple stacks Each Stack is assigned a globally unique ID we used a simple byte value Sun Stack KSN Radio Stack Design SHP we used a simple byte value max. 256 different stacks Special byte indicates stack ID E h d Di t h t SHP Routing Other Layers Demo Each node uses a Dispatcher to Pass incoming data to correct stack depending on stack ID Pass outgoing data to SHP Layer Comparison KSN Team SHP Dispatcher has 4 functions Register / unregister new stack Acitivities Research Q&A Broadcast / unicast data using SHP Slide 22Markus Bestehorn
  23. 23. Extendability – More Stack-Layers All new layers must implement LayerInterface Methods for broadcast / unicast of data from upper layers Introduction Data-Intensive S St k pp y Method, which takes incoming data from lower layers or the SHP Level Dispatcher Abstract Layer implementation is provided with our software Sun Stack KSN Radio Stack Design SHP Abstract Layer implementation is provided with our software New Layers can be implemented with very few lines of code Example of a AODV Routing Layer follows now SHP Routing Other Layers Demo Comparison KSN Team Acitivities Research Q&A Slide 23Markus Bestehorn
  24. 24. Example Layer – Multi-Hop Routing Up to this point, only 1-hop communication covered Example for a new Layer: Routing Layer Introduction Data-Intensive S St k p y g y Used Routing Mechanism: Ad-Hoc On Demand Distance Vector Routing (AODV) [2] Sun Stack KSN Radio Stack Design SHP Sun Stack also includes AODV implementation, but No (working) End-to-End ACKs for Multi-Hop Unicasts SHP Routing Other Layers Demo ( g) p Only 1 entry per Receiver no backup routes Both problems affect reliability Comparison KSN Team will be addressed in the following Acitivities Research Q&A Slide 24Markus Bestehorn
  25. 25. AODV Routing Mechanism Basics of AODV: Sender S wants to send message to Receiver R Introduction Data-Intensive S St k g S broadcasts Route Request (RREQ) Nodes receiving RREQs rebroadcast if RREQ has not been broadcasted before Sun Stack KSN Radio Stack Design SHP RREQ has not been broadcasted before Node already has a route to R stored in routing table Receiver R receives the RREQ Route Report (RREP) is sent back to S SHP Routing Other Layers Demo Route Report (RREP) is sent back to S Message is sent through shortest / fastest-available route Comparison KSN Team RREQRREQAcitivities Research Q&A RREQRREQ RREQ RREPRREQ ACKACKACK Slide 25Markus Bestehorn Sender Receiver
  26. 26. AODV – Routing Table Format Routing Table without backup entries 1 entry for each receiver R Introduction Data-Intensive S St k y If transfer fails, new RREQ is broadcast by sender S Problem: RREQ very small message (1 packet) might be transmitted reliably but larger messages fail Sun Stack KSN Radio Stack Design SHP might be transmitted reliably, but larger messages fail same Route will be returned transfer might fail again for larger message energy wasted! SHP Routing Other Layers Demo wasted! Solution: Several entries for 1 receiver R Comparison KSN Team Use depth-first search to transmit larger message to R Can be adapted to use Acitivities Research Q&A quality information! Slide 26Markus Bestehorn
  27. 27. AODV – End-to-End ACK SHP sends ACK if message is transmitted correctly Problem: Introduction Data-Intensive S St k Problem: Intermediate node fails while sending Intermediate node has sent ACK already, but message is lost! Sun Stack KSN Radio Stack Design SHP Solution: Receiver sends End-to-End ACK to sender Sender waits for End-to-End ACK Length of timeout determined using hop count of routing table SHP Routing Other Layers Demo e g o eou de e ed us g op cou o ou g ab e SHP-ACK Comparison KSN Team Design targets so far? Sender ReceiverEnd-to-End ACK Acitivities Research Q&A g g Extendability done 802.15.4 compatiblity done Reliability done Slide 27 Reliability done Markus Bestehorn
  28. 28. Other Layers Reducing Data Size Compression layer Introduction Data-Intensive S St k p y Can be used with abitrary compression algorithm We use a modified ZIP algorithm Should be used above routing layer Sun Stack KSN Radio Stack Design SHP Should be used above routing layer Avoids decompression on every hop Protocol Dispatcher SHP Routing Other Layers Demo Applications can use different protocols on top of single stack! Examples: Comparison KSN Team p PC-like with ports LowPan Acitivities Research Q&A Slide 28Markus Bestehorn
  29. 29. KSN Radio Stack Demo Message Size: 50 KB Tested up to 1 MB with more than 10 hops Introduction Data-Intensive S St k p p 4 Hops Output Power -30 Sun Stack KSN Radio Stack Design SHP Difference to demo before „Simulation“ of node failures by removing/exchanging nodes Simulated „failure“ will cause delay SHP Routing Other Layers Demo S u a ed „ a u e cause de ay Message delivered despite topology changes „Application“ has not been changed Comparison KSN Team Acitivities Research Q&A Sender Receiver Slide 29Markus Bestehorn
  30. 30. Comparison of both Stacks Sun Stack Very fast and efficient for small messages Introduction Data-Intensive S St k y g use for experiments where „every second counts“ Unreliable if Messages become large Sun Stack KSN Radio Stack Design SHP Messages become large Messages must be transmitted over a large number of hops Other transmissions from other SPOTs run parallely Was not shown here SHP Routing Other Layers Demo Was not shown here IPv6 compatible KSN Radio Stack Comparison KSN Team Reliable for large message sizes and large number of hops Up to 1 MB And 15 hops tested without losing messages Acitivities Research Q&A More overhead slower Use for experiments where „counting bytes“ is sufficient Currently not IPv6 compatible Slide 30 Currently not IPv6 compatible Markus Bestehorn
  31. 31. Agenda Motivation: Why do we need another stack? What does „data-intensive“ in sensor networks mean Introduction Data-Intensive S St k „ Demo and reliability evaluation data KSN Radio Stack D i & ddi i l f Sun Stack KSN Radio Stack Design SHP Design targets & additional features The core of the KSN Stack Optional KSN stack layers SHP Routing Other Layers Demo p y Possibilities for Optimization / Improvements Reliability evaluation and Demo of the KSN stack Comparison: Sun Stack vs KSN Stack Comparison KSN Team Comparison: Sun Stack vs. KSN Stack The KSN Team Projects Acitivities Research Q&A Research Agenda Slide 31Markus Bestehorn
  32. 32. Who is who @ KSN? Stephan Kessler Student Assistant Introduction Data-Intensive S St k KSN Serialization & Stack Sun Stack KSN Radio Stack Design SHP Andreas Leppert Student Assistant KSN Stack, Query Dissemination SHP Routing Other Layers Demo S S ac , Que y sse a o Sven Meisinger Comparison KSN Team Student Assistant KSN Serialization, Simulator Acitivities Research Q&A Markus Bestehorn PhD student Slide 32 Project Head Markus Bestehorn
  33. 33. KSN – Other Projects Management Application Controlling large testbeds of SPOTs Introduction Data-Intensive S St k g g Software deployment uses KSN Stack Support for experiments, e.g., collect data S i li ti f SPOT Sun Stack KSN Radio Stack Design SHP Serialization for SPOTs Serialization used in JDK to store/send objects not supported by Squawk VM SHP Routing Other Layers Demo Pure Java serialization Testbed 30+ nodes deployed at the IPD Comparison KSN Team 30+ nodes deployed at the IPD Real network for experiments Acitivities Research Q&A Many more… Homepage: www.ipd.uni-karlsruhe.de/KSN Slide 33Markus Bestehorn
  34. 34. KSN – Sensor Databases Research Topic: Sensor Databases Problem: Every new application for WSN requires complete Introduction Data-Intensive S St k y pp q p development process Design & implement new hardware Design & implement new software Sun Stack KSN Radio Stack Design SHP Design & implement new software very costly Idea: Provide database-like interface for WSN Ad t U ft f WSN li ti l SHP Routing Other Layers Demo Advantage: Use same software for new WSN application, only change query Example: SPOT 1 SPOT 2 Comparison KSN Team Measurement stored distributedly in tables Temp: 25.3°C Hum.: 78% Light: 124 Temp: 23.4°C Hum.: 77% Light: 120 Acitivities Research Q&A Measurement stored distributedly in tables Use SQL to query data, e.g., SELECT nodeID, temp FROM Sensors Slide 34 Size of result depends on query data-intensive! Markus Bestehorn
  35. 35. KSN – Current Research Topics Approximate Query Processing Reduce result quality to save energy Introduction Data-Intensive S St k q y gy Different quality parameters possible Precision of result Security Sun Stack KSN Radio Stack Design SHP Security Consistency Query Distribution SHP Routing Other Layers Demo Broadcast of query very energy consuming Use structure of query to choose distribution strategy try to reach all relevant nodes, but not all nodes! Comparison KSN Team Spatio-Temporal query processing in WSN Moving object DBs provide operators to query object movement Only for historical data stored in a DB server Acitivities Research Q&A Only for historical data stored in a DB server Idea: Try to provide these operators for object tracking in WSN Slide 35Markus Bestehorn
  36. 36. Thank you for your attention! Questions? Introduction Data-Intensive S St k Questions?Sun Stack KSN Radio Stack Design SHP References SHP Routing Other Layers Demo No. Reference [1] MICA2 Sensor Node, http://www.xbow.com/ P ki R Ad h d d di t t ti M bil C ti Comparison KSN Team [2] Perkins, Royer: Ad-hoc on-demand distance vector routing; Mobile Computing Systems and Applications, 1999 Acitivities Research Q&A Slide 36Markus Bestehorn

×