report contiki1

Upload: sudharshan-babu

Post on 03-Jun-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/12/2019 Report Contiki1

    1/22

  • 8/12/2019 Report Contiki1

    2/22

  • 8/12/2019 Report Contiki1

    3/22

    3

    LIST OF FIGURES

    FIG.NO FIGURES PAGE NO.

    1 Structure of an IEEE 802.15.4 data frame 7

    2 RPL Network Topology 7

    3 SKY FROM MOTEIV 9

    4 Network scenario 13

    5

    The power consumption of each node in the

    network

    14

    6

    The diagrammatic representation of sensornetwork

    15

    3.4 The number of hops in the network 17

    3.5 Received packets per node in the network 17

    3.6

    The power consumption of each node in thenetwork

    18

    3.7The power consumption of each node in thenetwork 19

    3.8

    The diagrammatic representation of averagepower consumption

    19

    3.9 The number of hops in the network 20

    3.10 Received packets per node in the network 20

    3.11 The number of hops in the network 21

    3.12 Received packets per node in the network 22

    3.13

    The diagrammatic representation of averagepower consumption

    23

    3.14

    The power consumption of each node in thenetwork

    23

  • 8/12/2019 Report Contiki1

    4/22

    4

    3.15

    The power consumption of each node in the

    network

    24

    3.16

    The inter packet delay of each node in thenetwork

    24

    3.17

    The diagrammatic representation of average

    power consumption

    25

    3.18 The number of hops in the network 26

    3.19 Received packets per node in the network 26

  • 8/12/2019 Report Contiki1

    5/22

    5

    LIST OF ABBREVIATIONS

    MSDUMAC service data unit,PSDUPHY service data unit,PDUPHY protocol data unit.

  • 8/12/2019 Report Contiki1

    6/22

    6

    CHAPTER-I

    INTRODUCTION

    1.1 Introduction to IEEE 802.15.4Wireless sensor network differ from classical ad hoc networks inseveral ways, e.g., the number of nodes is larger and the spatial

    distribution of the nodes is more dense, the nodes are normally static

    (however, this is not always the case), the energy of the nodes is limited,

    the amount of data transiting through the network is limited and in most

    cases the data is converging to one single server node, collecting and

    processing the data. All these factors have their influence on the choice

    of the technology and routing protocol used in this type of ad hoc

    networks.

    The IEEE 802.15.4 is a recent standard, approved in 2003, describing

    the physical (PHY) and medium access control (MAC) layers for low

    rate wireless personal area networks (LR-PAN).IEEE 802.15.4 isexpected to be deployed on massive numbers of wireless devices, which

    are usually inexpensive, long-life battery powered andlow computation

    capabilities. As such, the standard is also ideal for WSN. At the physical

    layer the standard provides for the use of 3 frequency bands. The most

    popular one being the 2.4 GHz industrial, scientific and medical (ISM)

    frequency band. In this frequency band, 16 channels are available, each

    with a data throughput of 250 kbit/s on the physical layer. On the MAC

    layer, the IEEE 802.15.4 standard supports different modes of operation:

    beacon-enabled or beaconless network mode, with or without a PAN

  • 8/12/2019 Report Contiki1

    7/22

    7

    coordinator, in a star or in a peer-to-peer topology. Almost all

    combinations of these 3 couples are possible.

    FIG 1 Structure of an IEEE 802.15.4 data frame.

    we only use the beaconless network mode, without a PAN coordinator ina peer-to-peer topology. This mode of operation allows multiple hops to

    route messages from any device to any other device. These routing

    functions can be added at the network layer, but are not part of the In a

    beaconless network, the medium access is, just as in WIFI, based on un-

    slotted carrier sense multiple access collision avoidance (CSMA-CA).

    However, unlike the IEEE 802.11 standard, IEEE 802.15.4 omits the

    request/clear to send (RTS/CTS) exchange; hence the hidden node

    problem will be an issue. The omission of the RTS/CTS frames is

    justified by the limited size of the MAC data packet unit, with is fixed to

  • 8/12/2019 Report Contiki1

    8/22

    8

    a maximum of 127 bytesin the standard. Each device (transmitter) is

    identified by a unique 64 bit hardware address, called the extended

    address, comparable with an Ethernet MAC address. The standard

    however allows the allocation of a 16 bit short address, which

    considerably reduces the addressing fields in the MAC frame.

    1.2 TOPOLOGY FORMATIONLLNs do not typically have predefined topologies, for example

    those imposed by point to point wires, so RPL has to discover links to

    form a topology first.

    Figure 2: RPL Network Topology

    RPL creates a tree like topology with a root at the top and leaves at

    the edges. In contrast to tree topology, RPL offers redundant links which

    is a MUST requirement in LLN , so actually violating the actual treetopology. RPL uses "up" and "down" directions terminology regarding

    the movement of traffic. The up is from the leaves to the root and down

    from the root to the leaves.

  • 8/12/2019 Report Contiki1

    9/22

    9

    1.3 THE SENSOR NODEThe hardware platform that is used as building block for the WSN is the

    Tmote Sky platform from Moteiv . The Tmote Sky platform is a wireless

    sensor node based on a TI MSP430 microcontroller with an IEEE

    802.15.4-compatible radio chip CC2420 from chipcon, with an onboard

    antenna. The Tmote Sky platform offers a number of integrated

    peripherals including a 12-bit ADC and DAC and a number of integrated

    sensors like a temperature sensor, 2 light sensors and a humidity sensor.

    FIG-3 TMOTE SKY FROM MOTEIV

  • 8/12/2019 Report Contiki1

    10/22

    10

    The microcontroller is programmed through the onboard universal serial

    bus (USB) connector, which makes it easy to use; no additional

    development kit for the microcontroller is needed. The USB can also be

    used as a serial port to communicate with a host computer.

    1.4 THE REAL TIME OS AND COMMUNICATION STACKContiki is used as real time operating system on the Tmote Sky sensor

    nodes. Contiki is an open source multi-tasking operating system for

    networked systems. It is designed for embedded systems with small

    amounts of memory. A typical Contiki configuration is 2 kbytes of

    RAM and 40 kbytes of ROM. Contiki consists of an event-driven kernel

    on top of which application programs can be dynamically loaded and

    unloaded at runtime. The main reason why Contiki was chosen as real

    time operating system (RTOS) is that it is written in standard C, which

    makes it easy to understand and to modify. As almost all applications on

    military networks are IP based, we opted to use a TCP/IP stack on top ofthe IEEE 802.15.4 devices and not the usual ZigBee stack. Contiki

    contains a small request for comments (RFC)- compliant TCP/IP stack

    that makes it possible to communicate over an IP enabled network.

    Contiki also contains a RFC-compliant ad hoc on-demand distance

    vector(AODV) routing protocol. AODV is a reactive routing protocol

    for ad hoc networks. In a reactive routing protocol,routes are only

    created when desired by the source nodes.When a node requires a route

    to a destination, it initiates a route discovery process within the network.

    This process completes once a route is found or all possible route

  • 8/12/2019 Report Contiki1

    11/22

    11

    permutations are examined. The route is maintained only if there are

    data packets periodically travelling from the source to the destination

    along that path. This protocol is what is called source initiated.

  • 8/12/2019 Report Contiki1

    12/22

    12

    CHAPTER-II

    IMPLEMENTATION IN CONTIKI

    RPL ANALYSIS IN COOJA SIMULATION

    1.Open cooja simulator and open the file2.Select the new simulation and give the name of simulation and

    click ok.

    3.Go to mote in the tool bar select add motes click create new typesimulation and select sky motes.

    4.Browse for the file Contiki\examples\ipv6\rpl-udp. Add 25udp_sender nodes and 1 udp_sink nodes using the udp_sender.cand udp_sink.c programmes.

    5.Change the interval between sending successive packets from 60seconds to 1 second.

    6.Set the area as 0 to 30 in the add mote window and use randompositioning.

    7.Click the start button and in the node output window to run thesimulation.

    8.Open contiki collect plug-in and observe the power,Etx and delaymetrics.

    9.Change the area to 0 to 75 and re-run the simulation.

  • 8/12/2019 Report Contiki1

    13/22

    13

    Figure 4 Network scenario

  • 8/12/2019 Report Contiki1

    14/22

    14

    CHAPTER-III

    RESULT AND DISCUSSION

    3.1 SIMULATION RESULT USING AREA 30

    Figure 5 The power consumption of each node in the network

    When we run the udp_sender.c and udp_Sink.c in cooja we get the

    average power consumed of the network as 3.839 mW.

    To exploit the data coming from the sensors, it is often inevitable to

    have an idea of the (relative) position of the sensor nodes in the network.

    Equipping the nodes with a GPS module could be a solution, although

    this implicates an extra antenna on the node and a clear view of the sky,

  • 8/12/2019 Report Contiki1

    15/22

    15

    which is not always feasible. Furthermore, a GPS module will increase

    the price of a node and will compromise the battery lifetime. Some other

    well documented techniques for retrieving the position of the nodes in a

    wireless network are based on radio hop count, RSSI, time difference of

    arrival or angle of arrival. A relative simple technique is the one basedon the RSSI, also called radio positioning. In this technique the nodes

    look at the power of the received signal from their neighbors and try to

    estimate the distances to their neighbors for localization. In the IEEE

    802.15.4 standard, the radio receivers are bound to measure the received

    signal strength of arriving frames, hence the choice for using this

    technique.

    Figure 6 The diagrammatic representation of sensor network

  • 8/12/2019 Report Contiki1

    16/22

    16

    Figure 7 Instantaneous power in the network

    Figure 8 Average power consumption per node in the

    network

  • 8/12/2019 Report Contiki1

    17/22

    17

    Figure 9 Average radio duty cycle per node in the network

  • 8/12/2019 Report Contiki1

    18/22

    18

    3.2 SIMULATION RESULT USING AREA 75

    Figure 10 The power consumption of each node in the network

    When we run the udp_sender.c and udp_Sink.c in cooja we get the

    average power consumed of the network as 3.847 mW.

  • 8/12/2019 Report Contiki1

    19/22

    19

    Figure11 The diagrammatic representation of sensor network

    Figure 12 Instantaneous power in the network

  • 8/12/2019 Report Contiki1

    20/22

    20

    Figure 13 Average power consumption per node in the

    network

    Figure 14 Average radio duty cycle per node in the network

  • 8/12/2019 Report Contiki1

    21/22

    21

    From the results we can see that the average number of packet sent for

    simulation area 30 is higher but the average power consumption is lower

    in the simulation with area 75. The average number of packets lost is

    higher with area 75 because some nodes might be outside the range ofthe sink and in those cases the packets are lost.

    CONCLUSIONThus we have investigated the zigbee based wireless

    sensor network for different sizes of area and then evaluated the network

    performance in terms of Energy, Latency, Packet Delivery Ratio andaverage power consumption.

    REFERENCE

    1.Dunkels, Adam (May 2003), "Full TCP/IP for 8 BitArchitectures", Proceedings of the First ACM/Usenix International

    Conference on Mobile Systems, Applications and Services

    (MobiSys), San Francisco.

    2.Durvy, Mathilde; Abeill, Julien; Wetterwald, Patrick; O'Flynn,Colin; Leverett, Blake; Gnoske, Eric; Vidales, Michael; Mulligan,

    Geoff; Tsiftes, Nicolas; Finne, Niclas; Dunkels, Adam (November

    2008), "Making sensor networks IPv6 ready", Proceedings of the

    Sixth ACM Conference on Networked Embedded Sensor Systems

    (SenSys) (poster session), Raleigh,NC,US:ACM.

    3.Dunkels, Adam; sterlind, Fredrik; He, Zhitao (November 2007),"An adaptive communication architecture for wireless sensor

    networks", Proceedings of the Fifth ACM Conference on

    Networked Embedded Sensor Systems (SenSys), Sydney,AU.

    http://en.wikipedia.org/wiki/North_Carolinahttp://en.wikipedia.org/wiki/United_States_of_Americahttp://en.wikipedia.org/wiki/Australiahttp://en.wikipedia.org/wiki/Australiahttp://en.wikipedia.org/wiki/United_States_of_Americahttp://en.wikipedia.org/wiki/North_Carolina
  • 8/12/2019 Report Contiki1

    22/22

    22

    4.Dunkels, Adam,The ContikiMAC Radio Duty CyclingProtocol (PDF).

    5."Tiny OS & Cooja",Olaf land, Word press, 20101125 .6.Dunkels, Adam; Schmidt, Oliver; Voigt, Thiemo; Ali, Muneeb

    (November 2006), "Protothreads: Simplifying event-driven

    programming of memory-constrained embeddedsystems", Proceedings of the Fourth ACM Conference on

    Embedded Networked Sensor Systems (SenSys), Boulder,CO,

    USA.

    http://dunkels.com/adam/dunkels11contikimac.pdfhttp://dunkels.com/adam/dunkels11contikimac.pdfhttp://en.wikipedia.org/wiki/PDFhttp://olafland.wordpress.com/2010/11/25/tinyos-and-cooja/http://en.wikipedia.org/wiki/Coloradohttp://en.wikipedia.org/wiki/Coloradohttp://olafland.wordpress.com/2010/11/25/tinyos-and-cooja/http://en.wikipedia.org/wiki/PDFhttp://dunkels.com/adam/dunkels11contikimac.pdfhttp://dunkels.com/adam/dunkels11contikimac.pdf