Docstoc

Slide 1 - ISIP

Document Sample
Slide 1 - ISIP Powered By Docstoc
					Dynamically Controllable Applications for
      Wireless Sensor Networks



                                                        Base with Mote




                                       Isolated Mica2
                                            Mote




                      Sriram Rajan
              Master’s Thesis Presentation

             Advisor : Dr. Georgios Lazarou
    Department of Electrical and Computer Engineering

                  December 9th, 2005
Agenda


• Introduction to Wireless Sensor Networks

• Requirements for Designing Dynamically Controllable
  Applications
• Sensor Network Programming
• Related Work
• Research Contribution
• Results, Conclusion, and Future work




Dynamically Controllable Applications for Wireless Sensor Networks   Page 2 of 42
Introduction to Wireless Sensor Networks (Slide 1 of 3)

Why Sensor Networks ?
     • Autonomous, early warning systems [1] for Tsunamis can be developed
     • Small size, can be deployed right out of the box
“Sensor node” or “Mote” refers to a combination of the following items:
     • Sensor (reports events)
     • Processor (stores the Mote ID, processes readings, provides encryption
       to sensor messages)
     • Radio (Send, Receive Messages)
Split-phase operations are used for data events
     • Request event
     • Continue executing other events or tasks until data is received



Dynamically Controllable Applications for Wireless Sensor Networks   Page 3 of 42
Introduction to Wireless Sensor Networks (Slide 2 of 3)


                                                                               Node 2
                                                                                             Node 1




                                                                              Base Station            Node 3
                                            Communication                        and
                                              Interface
                                                                              Base node



                                                                     Node 5                      Node 4

  Base Station                                                          Base Node
       • Has external power supply                                            • Node connected to Base
                                                                                Station
       • Can program the base node
                                                                              • Provides processing capability
       • Used with base node to
                                                                                to the Base Station
         communicate with the Wireless
         Sensor Network (WSN)                                                 • Can send/ receive radio signals
                                                                                to/from the WSN


Dynamically Controllable Applications for Wireless Sensor Networks                                        Page 4 of 42
Introduction to Wireless Sensor Networks (Slide 3 of 3)


                                                                               Node 2
                                                                                             Node 1




                                                                              Base Station            Node 3
                                            Communication                        and
                                              Interface
                                                                              Base node



                                                                     Node 5                      Node 4


    Communication Interface                                             Host Computer
          • Link between Host Computer and                                    • Communicates the WSN via the
            Base Station                                                        communication interface.
                    Links are possible via LAN,                        Sensor Node
                     Internet and Serial mediums
                                                                              • Robust, sensor devices
                                                                              • Capable of multi-hop
                                                                                communication
Dynamically Controllable Applications for Wireless Sensor Networks                                        Page 5 of 42
Problem Statement

The main requirements for implementing dynamically
controllable applications are [7]:
   1. Propagation : The data/control messages must reach all

      of the nodes in the network
   2. Lifetime of the network : The data traffic in the sensor

      network must be minimal for effective communication
      within the sensor network
   3. Efficient Power consumption : Any implementation

      must consider the limited power availability and must
      restrict the number of transmissions for the protocol




Dynamically Controllable Applications for Wireless Sensor Networks   Page 6 of 42
Motivation – Why work on Application optimization ?



Sensor                                                               Efficient sensor network
application                                                          applications can be
failures                                                             designed [6,9] that have
                                                                     better fault tolerance
• The approach of executing multiple operations
  dynamically can be exploited to design controllable
  applications


• Low cost of nodes and low maintenance requirements allow
  for easy implementation and rapid deployment


Dynamically Controllable Applications for Wireless Sensor Networks                    Page 7 of 42
Summary of This Work

 • Designed and developed a novel scheme for TinyOS
   application design that attains the following objectives:

       Interchangeable modules at run-time

       Controllable frequency of sensor operations, such as
        transmitting readings or performing actions at regular
        intervals

       Ability to control the mote operation by terminating or
        resetting a mote to a particular state during operation

 • Our scheme has been verified to work in TinyOS and has
   significant time and performance improvements.
Dynamically Controllable Applications for Wireless Sensor Networks   Page 8 of 42
TinyOS Elements




                                                          msg_recv(type, data)
                                                                                                       Why TinyOS for WSN?
                             activity ()


                                                                                                           Modular nature
                                                                                                           Extensive support of platforms
         init




                                                                                                           Large user base
                                                                                            Legend         Example : Calamari
                                                                                                            application
                                                                                 Internal   Commands
                                                                                 State
         Generic Messaging
         Component                             Send_msg                                     Event      TinyOS Components
                                                 thread                                     Handlers
                                                                                                       A component stores the
                                                                                            Commands
                                                                                            used       state of the system,
                                                                                                       consists of interfaces and
                activity()
  init




                                                                                            Events     events
                                                                           packet_receive




                                                                                            signaled
                                                                                                         Event are triggered by
                                                                           (success)




                                                                                                          commands, signals or other
                                                                                                          events themselves . Example
                                                                                                          : event Timer.fired()
                                                                                                         Sending messages is
                                           Sample TinyOS Component [2]                                    achieved using split-phase or
                                                                                                          using an event that calls an
                                                                                                          appropriate task.
Dynamically Controllable Applications for Wireless Sensor Networks                                                          Page 9 of 42
Application framework
  application                       Application Layer and Routing logic
                                                                                               Application:
                                                                                               Combination of software and
                     GenericComm module                                                        hardware, can also provide
                                                                                               routing information. Example :
   messaging
                                                                                               “Send message only if light
                      AM Standard module
                                                                                               intensity > 4”
                                                                                               Messaging component:
                  RadioCRCPacket




                                       UARTPacket
                                         module
                      module




   packet                                                                                            Messaging functions to
                                                                                                      upper level components
    byte         Radio                  UART                     Photo    Temperature                Event handlers for lower-
                 Byte                   Byte
                                                                                    Software
                                                                                                      level components
                                                                                    Hardware
     bit
                CC1000
                                                                                               Packet , Byte, Bit:
                 RFM                                  Clocks      ADC       I2C
                                                                                               Software/ Hardware
                                                                                               components that deal with
                               Sample Application Framework [3]                                packet-level, byte level and bit
                                                                                               level processing
Dynamically Controllable Applications for Wireless Sensor Networks                                              Page 10 of 42
TinyOS Concurrency model [2]

• Concurrency implemented by using separate procedures:
              Events (hardware interrupt handlers) and tasks
• Events preempt other events and tasks
• Those statements marked atomic or events with keyword
   async are never interrupted
• Event failures are common occurrence when the sensor is
   busy with another that cannot be interrupted
• The scheduler component runs these tasks in FIFO order,
   unless interrupted.




Dynamically Controllable Applications for Wireless Sensor Networks   Page 11 of 42
Related Work

                                                                     • Also used for reliable
                                                                       upgrade of communication
                                                                       software [4]

                                                                     • An Arbiter code is used to
                                                                       switch between two working
                                                                       module implementations
                                                                           First, the reliable module
                                                                            and the experimental
                                                                            module are processed in
                                                                            parallel.

                                                                           If the error is within the
                                                                            acceptable threshold,
                                                                            experimental module is
                                                                            used

                                                                           Otherwise, the reliable
                      Simplex Architecture [4, 5]
                                                                            module is implemented.

Dynamically Controllable Applications for Wireless Sensor Networks                             Page 12 of 42
Limitations of related work and solutions

  Limitations                                                        Solutions

• Processor overload as a result of                                  • Reduce overload involved in
  the upgrade                                                          upgrade [9, 10]

• Do not meet the static                                             • Dynamically Controllable
  programming requirement in                                           Application (DCA) is proposed
  TinyOS                                                               as a technique is designed in
                                                                       TinyOS to achieve dynamic:
                                                                        State changes
  Solutions from this research
                                                                        Control the frequency of
                                                                         transmission and other events
                                                                         (variable changes)
                                                                        Functionality changes
 • Upgrades results in significant                                   • Sensor operation remains
   sensor application downtime                                         unaffected in DCA

Dynamically Controllable Applications for Wireless Sensor Networks                        Page 13 of 42
Our Dynamically Controllable Application (DCA) Scheme (Slide 1 of 4)

                                                                      • Triggers an event after
                                                                        receiving a message
                                                                        from the base mote

                                                                      • a high probability of an
                                                                        event interrupting the
                                                                        application’s operation
                                                                        (otherwise, the event is
                                                                        triggered again)

                                                                     State control:
                                                                      • Identical to the
                                                                         frequency control
                                                                      • In addition, involves
                                                                         additional variable
                                                                         settings and
                      Block Diagram of the DCA scheme                    declarations




Dynamically Controllable Applications for Wireless Sensor Networks               Page 14 of 42
Our Dynamically Controllable Application (DCA) Scheme (Slide 2 of 4)

                                                                     Frequency Control:
                                                                      • Sensor applications
                                                                        typically use periodic
                                                                        logging or other
                                                                        sensor data reporting
                                                                        functions.

                                                                     Module Control:
                                                                      • The hypothesis that a
                                                                        module change could
                                                                        be achieved using
                                                                        DCA needed to be
                                                                        verified
                                                                      • A module control
                                                                        component has
                                                                        therefore been
                      Block Diagram of the DCA scheme                   included in the DCA
                                                                        mechanism



Dynamically Controllable Applications for Wireless Sensor Networks               Page 15 of 42
Our Dynamically Controllable Application (DCA) Scheme (Slide 3 of 4)


                                                                     Component and
                                                                     Messaging Interface:
                                                                      • Uses message types
                                                                        provided by TinyOS to
                                                                        trigger appropriate
                                                                        events
                                                                     Sensor Hardware and
                                                                     Radio Interface:
                                                                      • Provides a medium to
                                                                        communicate




                      Block Diagram of the DCA scheme




Dynamically Controllable Applications for Wireless Sensor Networks             Page 16 of 42
Our Dynamically Controllable Application (DCA) Scheme (Slide 4 of 4)

     application
                                           DCA Application

                                                                                                    Field                   Value

                        GenericComm module
                                                                                                                  Address of the source node
                                                                                              Source (16 bytes)
     messaging

                         AM Standard module                                                                       Simple action code for each
                                                                                               Action (8 bytes)
                                                                                                                        unique action

                                                                                                                  Frequency of operation and
                                                                                               Value (8 bytes)
                     RadioCRCPacket




                                                                                                                         other values
                                           UARTPacket
                                             module
                         module




                                                                                                                   This field decides which
      packet
                                                                                              Module (16 bytes)    module is to be activated.



                                                                                                     DCA Message Structure
       byte         Radio                   UART                 Photo   Temperature
                    Byte                    Byte
                                                                                   Software

                                                                                   Hardware
       bit
                   CC1000
                    RFM                                 Clocks    ADC      I2C




                                      DCA Application Framework


Dynamically Controllable Applications for Wireless Sensor Networks                                                Page 17 of 42
Working of DCA Scheme (Slide 1 of 3)
                                                                     Frequency and State
                                                                     changes:
                                                                          • Application Design scheme
                                                                            that allows for:
                                                                               Frequency changes
                                                                               Resets

                                                                          • Changes are achieved
                                                                            when events are triggered

                                                                          • An event is triggered when
                                                                            command messages are
                                                                            received

                                                                     Bypasses the static redesign
                                                                     requirement of the original
                                                                     application


                                                         Flow chart for DCA frequency/ reset change

Dynamically Controllable Applications for Wireless Sensor Networks                              Page 18 of 42
Working of DCA Scheme (Slide 2 of 3)

Module Changes
      • Implemented using the DCA scheme
      • DCA allows direct communication between the modules and
        radio/messaging components
      • Uses start/stop commands to control the active module

Original Implementation (Without DCA)
      • Separate modules would need to be declared and used simultaneously




Dynamically Controllable Applications for Wireless Sensor Networks   Page 19 of 42
Example for designing DCA applications

        COTS Component A                  COTS Component B                    Read Transmit_Frequency
   Read Transmit_Frequency           Read Transmit_Frequency                  COTS_ModuleA.initialize()
   COTS_Module_A.initialize()        COTS_Module_B.initialize()               COTS_ModuleB.initialize()
   COTS_Module_A.start()             COTS_Module_B.start()                    COTS_ModuleA.start()
     Output = COTS_Module_A            Output = COTS_Module_B                 Output = COTS_ModuleA
   While (Not(Stop_Request()))       While (Not(Stop_Request()))              While (Not(Stop_Request()))
     Display_Output()                  Display_Output()                        If Timer.Fired()
   End While                         End While                                    Transmit (value)
   COTS_Module_A.stop()              COTS_Module_B.stop()                      If Module.change()
                                                                                    COTS_Module_A.stop()
                                                                                    COTS_Module_B.start()

                                                                              Output = COTS_Module_B
                   Original Application
                                                                              End While
  Applications would need to be
  redesigned, recompiled, and loaded to                                        Application using DCA
  the sensor nodes in order to implement
                                                                     Applications that use the DCA scheme
  this change in functionality.
                                                                     can easily change from one
                                                                     “Common Off the Shelf” (COTS)
                                                                     component (COTS_Module_A) to
                                                                     another (COTS_Module_B) provided
                                                                     these were included in the design
                                                                     phase.



Dynamically Controllable Applications for Wireless Sensor Networks                                Page 21 of 42
Experimental Setup

                                                                                 • Deployment
                                                                                     Final stage of
                                                                                      application
                                                                                      implementation on
                                                                                      Field motes

                                                                                     Performed after
                                                                                      repetitive tests on
                                                                                      simulator and
                                                                                      hardware to meet
                                                                                      loss threshold

• Design or Development                                              • Experimentation
      Failures must be anticipated during                              Experimentation is done with
       the design of the application and                                 Hardware motes and Simulation
       debug messages provided for                                       iteratively to isolate errors
       evaluation.
                                                                        Testing is performed to determine if
      Several areas of the code can be                                  application is suitable for
       tested simultaneously.                                            deployment
Dynamically Controllable Applications for Wireless Sensor Networks                            Page 22 of 42
Comparison of Hardware and Software Experimental setup

                        Hardware
  • Requires the MessageCenter or
    similar application to communicate
    with base node.
  • Uses the base node to communicate
    with other nodes
  • Metrics used are primarily verification
    and time to completion
                                                                                    Software
                                                                     • MessageCenter application can be
                                                                       used, though the communication is
                                                                       also possible via the TOSSIM [8]
                                                                     • The simulator can directly inject
                                                                       messages to any node
                                                                     • Verification, Time to completion, Code
                                                                       comparisons and Losses can be
                                                                       determined.
Dynamically Controllable Applications for Wireless Sensor Networks                            Page 23 of 42
Validation and Testing Metrics



                        • Time to Completion

                        • Verification of operation

                        • Comparison of results with related work

                        • Testing for fault conformance




Dynamically Controllable Applications for Wireless Sensor Networks   Page 24 of 42
Cases for Testing and Validation

                           Cases                                       Comparable scenarios
 Case I : Implementing                                               “No comparable scenario
 software reset in a node                                            with node synchronization”
 synchronization scenario such
 as Traffic light
 Case II: Changing frequency                                         Manual update of operation
 of operation                                                        frequency and reloading
                                                                     application
 Case III: Dynamic design to      Manually updating the
 change the node functionality application configuration and
 by redirecting the output of the initiating the upgrade
 working module


Dynamically Controllable Applications for Wireless Sensor Networks                     Page 25 of 42
Case I: Software reset implementation (Slide 1 of 2)
                                                               Setup
 • 10 sets experiments performed on hardware setup with
   varying node startup sequence.
 • Final set of experiments performed in simulation.
 • Motes are numbered (Mote id) 1 to 4
 • Initially all motes have their respective yellow LED’s blinking
   in State 1.
 • Upon receiving the sync message, each node waits for a
   random amount of time based on its node id, then the
   traffic light operation is initiated.
 • The reset signal shifts all nodes to State 1 for re-
   synchronization.
Dynamically Controllable Applications for Wireless Sensor Networks     Page 26 of 42
Case I: Software reset implementation (Slide 2 of 2)

                                                           Results
                                                                                Re-
                                                       Synchronization
                                        Mode                             synchronization
                                                       time in seconds
                                                                         time in seconds
                                      Hardware                 35              16
                                       TOSSIM                  23              45


                                    Verification of Hardware/ Simulation operation


• Hardware and software experiments have verified the
  operation and have obtained the time for completion of
  operation.


• In a few cases of hardware setup the synchronization was
  not achieved without the reset signal.

Dynamically Controllable Applications for Wireless Sensor Networks                         Page 27 of 42
Case 2: Frequency change application comparison
                             Setup                                                         Results
    • Two sets of experiments performed                                   • A readily available application that
      on both hardware and software                                         transmits sensor data via radio
      simulation separately                                                 (RFM) was used

    • Initially the node is started with its                              • Application functionality was verified
      default frequency                                                     in both hardware and software
                                                                            implementations
    • The frequency is later changed by
      sending a message from the base
      node during its operation.
                                                         Comparison of Case 2 with related mechanisms
                                                           Code complexity        Packet
              Mechanism           Time to complete                             transmission      Power source
                                                           added (in lines)     mechanism
                                     Insignificant
                                                                              From base node/       External
                 Case 2               (few ms on                     98
                                                                                 on demand        (from base)
                                      Hardware)
              Incremental                                                     Individual nodes   Internal (within
                                      25 seconds                 > 100
              Upgrades[9]                                                         /periodic           node)
                                                                              Individual nodes
               Deluge [10]            23 seconds                     2                              Internal
                                                                                  /periodic


Dynamically Controllable Applications for Wireless Sensor Networks                                    Page 28 of 42
Case 3: Module change implementation (Slide 1 of 2)

                                                            Setup
 • Identical setup was used for Hardware and Simulation experiment.
 • The nodes were started with one module (radio for sending sensor
   output signals) and the output was directed to another component (led)
   after a random wait.
 • The network was monitored for any transmission of stray or unwanted
   signals from the nodes to determine any failures in module transition.

                                                        Hypothesis
 • Two or more modules can be dynamically replaced in an application
 • This operation can be easily accomplished by combining two readily
   available components (Common Off the Shelf or “COTS”)




Dynamically Controllable Applications for Wireless Sensor Networks   Page 29 of 42
Case 3: Module change implementation (Slide 2 of 2)

                                                     Results
  • The change in hardware functionality from one module to another was
    observed instantly.
  • This simulation software readings (TOSSIM) also verified the change of
    functionality.
  • The power requirements were linear and increased steadily with time across
    all sensor components.


                                               With LED              With Radio
                                               active                active
                            LED                45.97                 0
                            CPU                50.88                 52.43
                            Radio              126.57                149.71
                  Energy consumption in Millijoules for implementing and completing Module
                                              change operation

Dynamically Controllable Applications for Wireless Sensor Networks                  Page 30 of 42
Case 3: Module change operation comparison

     The upgrade protocol in [9, 10] was evaluated for the
     following metrics:

 • Time to complete operation:
        Varies with the size of the network.
        Average of 1 minute.
        In contrast, the entire setup of DCA lasted only for 20 seconds.

 • Downtime:
        The sensor is out of normal operation for up to 10 seconds during
         the upgrade process from the experimental observation.
        However, the DCA application was successful in implementing the
         module change without affecting the sensor operation.




Dynamically Controllable Applications for Wireless Sensor Networks   Page 31 of 42
Discussion of Results

 1. A DCA scheme can be effectively implemented
    and tested using any TinyOS application.

 2. The energy consumption is linear and increases
    steadily with time.

 3. The operation of the sensor application remains
    unaffected.

 4. The time to completion for DCA is lesser than
    that for upgrade protocols [9,10].

Dynamically Controllable Applications for Wireless Sensor Networks   Page 32 of 42
Conclusions

 • A new scheme (DCA) has been developed
        Allows the user to bypass the static programming
         requirement in TinyOS platform

        Allows control over the application features, during the
         operation of the sensor network

 • The results indicate that the DCA mechanism was
   found to be more time saving:
        in the order of few milliseconds
        compared to several seconds to minutes required for
         implementing similar changes via upgrade protocols


Dynamically Controllable Applications for Wireless Sensor Networks   Page 33 of 42
Future Work

  • In this thesis, losses were constant, depending on
    the network size, and irrespective of node spacing
    (2 -20 feet) in the experiments (this research and in
    [10])
          Efficient node loss determination with lossy network
           setup
          Simulations could be performed around the maximum
           sensor range of 500 feet

  • Could be combined with upgrades to analyze the
    overall performance in terms of losses, time to
    completion and sensor downtime
Dynamically Controllable Applications for Wireless Sensor Networks   Page 34 of 42
References (Slide 1 of 4)

 [1] P.E. ROSS, "Waiting and Waiting For the Next Killer
     Wave", IEEE Spectrum. Volume 42, Issue 3, Page 17.

 [2] TinyOS Tutorial, Available: http://www.tinyos.net/tinyos-
     1.x/doc/tutorial/.

 [3] Anna Hać, “Wireless Sensor Network Designs”, John
     Wiley and Sons Ltd. 2003, Pages 325-352

 [4] Lui Sha, “Using Simplicity to Control Complexity”, IEEE
     SOFTWARE, July / August 2001.




Dynamically Controllable Applications for Wireless Sensor Networks   Page 35 of 42
References (Slide 2 of 4)

 [5] P.V. Krishnan, L. Sha, K. Mechitov, “Reliable Upgrade Of
     Group Communication Software In Sensor Networks”,
     Proceedings of the First IEEE International Workshop on
     Sensor Network Protocols and Applications, May 2003.

 [6] Chalermek Intanagonwiwat, Ramesh Govindan, Deborah
     Estrin, John Heidemann, and Fabio Silva, “Directed
     Diffusion for Wireless Sensor Networking”, IEEE/ACM
     Transactions on Networking, VOL. 11, NO. 1, February
     2003.

 [7] Thanos Stathopoulos, John Heidemann, Deborah
     Esterin, “A Remote Code Update Mechanism For
     Wireless Sensor Networks”, Available:
     http://lecs.cs.ucla.edu/~thanos/moap-draft.pdf
Dynamically Controllable Applications for Wireless Sensor Networks   Page 36 of 42
References (Slide 3 of 4)

 [8] Philip Levis, Nelson Lee, Matt Welsh, David Culler,
     "Platforms: TOSSIM: Accurate And Scalable Simulation
     Of Entire Tinyos Applications", Proceedings of the 1st
     international conference on Embedded networked sensor
     systems, November 2003.

 [9] Jaein Jeong and David Culler, “Incremental Network
     Programming for Wireless Sensors”, IEEE SECON 2004,
     2004 1st Annual IEEE Communications Society
     Conference on Sensor and Ad Hoc Communications and
     Networks, October 2004 Pages: 25-33.




Dynamically Controllable Applications for Wireless Sensor Networks   Page 37 of 42
References (Slide 4 of 4)

 [10] Adam Chlipala, Jonathan Hui and Gilman Tolle, “Deluge:
    Data Dissemination in Multi-Hop Sensor Networks,” UC
    Berkeley CS294-1 Project Report, December 2003,
    Avaliable:
    http://www.cs.berkeley.edu/˜jwhui/research/projects/delug
    e/deluge_poster.ppt




Dynamically Controllable Applications for Wireless Sensor Networks   Page 38 of 42
Acknowledgements

 •      Dr. Lazarou for motivating me to pursue research and training me to
        work aggressively on research issues
 •      Mr. Hannigan for his encouragement, support, and motivation both
        as an employer and as a friend
 •      My thesis committee members Dr. Chu and Dr. Philip for patiently
        reviewing my thesis in a short time. They also encouraged me in
        my course work and motivated me to attain higher grades
 •      Still searching for words to thank Arun Ramakrishnan, Ashwini Mani,
        and Gaurav Marwah. Their assistance in patiently reviewing several
        revisions of my thesis helped me a lot
 •      Thanks to Sai Bushan for helping me getting started and going with
        Python scripting
 •      Thanks to Shivakumar, Sridhar, Marshall Crocker, Sanjay Patil, Sai
        Bushan for assisting and motivating me towards my defense
 •      A special thanks to Aravindh Ravichandran, Ezhil Nachiappan and
        Ekta Mathur for their understanding and assistance.
 •      Worldwide TinyOS community for their timely support in various
        programming issues
Dynamically Controllable Applications for Wireless Sensor Networks   Page 39 of 42
Questions?




Dynamically Controllable Applications for Wireless Sensor Networks   Page 40 of 42

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:6
posted:1/7/2012
language:
pages:39