All Rights Reserved © 2012 IJARCSEE
60
Performance Analysis and Transmitting the Data
over Wireless Networks using ZigBee Approach
Harleen Kaur Sahota#1, Sandeep Singh Kang*2
#
M.Tech (CSE), Department of Computer Science and Engineering, C.G.C, Punjab Technical University, Jalandhar *
Associate Professor, Department of Computer Science and Engineering, C.G.C, Punjab Technical University, Jalandhar
Abstract- The context of this paper is the ZigBee wireless communication standard. ZigBee has gained popularity in market in the recent times due to cost-effectiveness, robustness, reliability, low data rate and low power dissipation. Wide range of residential, commercial and industrial applications have been developed using ZigBee based network. ZigBee technology is based on the IEEE 802.15 standard. In this research paper we describe, analyze and implement the ZigBee Based network. Multiple routing protocols and routing algorithms can be applied in ZigBee networks but in this paper, we have implemented ZigBee using extended AODV protocol in NS2 simulator. The selection of routing protocols and routing strategies depends upon various scenarios specific to a smart home along with the limitation with respect to network throughput and the average network end to end delay. In this paper, different performance metrics (Packet Delivery Ratio and End to End Delay) and the dynamic attributes (Percentage of PDR nodes, Interval of status update message and Wireless Bit Error Rate) have been considered and various observations have been made during the course of simulation. With the proposed implementation, the Bit error rate has improved and reduced end to end delay.
Index Terms: AODV, BER, IEEE 802.15, PDR, WPAN,
ZigBee
I. INTRODUCTION
The need of data transfer from one device to another had resulted in the development of a range of network types, topologies and communication protocols. Wireless sensor network offers a great potential over the traditional wired network in commercial and consumer applications. IEEE 802.15 provides the specification for WPAN networks. The short-distance wireless technologies provide a cost-effective network with low data rate, low speed, low power utilization supported by battery supply and scalability [11]. ZigBee is the specification based on low rate WPAN task group designed by the ZigBee Alliance. It is designed to connect the widest range of devices, in any industry, into a single control network [13]. The ZigBee protocol stack provides an easy, simple and a reliable solution in a wide range of electronic applications such as medical care applications, fire emergency applications, security, commercial and residential control, traffic management
systems, various monitoring and tracking applications, and many others.
II. PROBLEMFORMULATION
In this research work, we propose a solution to enhance the study on Throughput management and networking technology involved in smart homes. It combines wireless specification ZigBee/IEEE 802.15.4 with HomePlug C&C technology. It addresses various aspects of a smart home like cost-effectiveness, openness of protocol stacks, interoperability and robustness. In an attempt to evaluate the network traffic on sensor-enabled nodes in smart homes, we have designed and implemented an experimental network model in the simulation environment of Network Simulator Version-2 (NS-2) software.
In this paper, we have created a ZigBee network where graph G(V,E) , in which V is the set of all the nodes in the network and E consists of edges represented in the graph. An edge e = (u,v) , e E exists if the Euclidean distance between node u and v is smaller than r, where r is the radius of the coverage of nodes and assumed all links in the graph are bidirectional, and the graph is in a connected state. Given a node i , time t is recorded since it receives the broadcasted message for the first time, and t = 0 but they communicate with each other with the help of neighbour hop that knows the source node and destination node. The three network layer protocols, including Flooding, extended AODV and ZigBee routing protocol, were adapted and integrated into the model to forward data packets from a Grid network to a combined network in smart homes. The straightforward way of converting the IEEE 802.11 to IEEE 802.15 standard is by implementing the ZigBee Approach. The advantage of using the 802.15 standard is its simplicity and reliability.
All Rights Reserved © 2012 IJARCSEE
61 routing alternatives in the combined network, various
routing strategies are separately set up in an AODV based/ ZigBee-based network which include joint-path strategy, backbone-based routing strategy and dual-path routing strategy. Besides this, a united addressing scheme is proposed in the model framework to eliminate the issue of addressing collision accompanied by multiple interfaces/channels in the experimental model.
III. DESCRIPTIONOFZIGBEE
A. ZigBee Architecture
The basic architecture of ZigBee is similar to that of other IEEE standards, Wi-Fi and Bluetooth for example, a simplified representation of which is shown in Figure 1 [10].
Figure 1. Zigbee Architecture[10]
On the bottom is the physical layers which is responsible for data transmission and reception. Just above the physical layers is the data link layer, consisting of two sub-layers: medium access control, or MAC, and the logical link control, LLC.
The network layer is located above the IEEE.802.15.4 MAC layer (figure 1) and is responsible for network formation and routing. It is the lowest layer of the ZigBee protocol. The responsibilities and functions of the network layer are Joining and leaving network, Apply security to frames, Route from-to their intended destination, Discover and maintain routes between devices, Discover one-hop neighbors, Store of pertinent neighbor information, Basic
frame handling and device management and Allowing the devices to sleep [14].
The ZigBee application layer is the highest layer of the ZigBee protocol. It is divided in three sub-layers (Figure 1): the Application Support Sub layer, the ZigBee Device Objects, and Application Framework having manufacturer defined Application Objects.
The Application Support sub layer is responsible for: a) Maintaining tables for binding and forwarding messages between devices,
b) Address mapping from 64-bit IEEE addresses to and from 16-bit NWK addresses,
c) Grouping address definitions.
d) Fragmentation and reassembly of packets e) Reliable data transport
The ZDO (ZigBee Device Object) is responsible for Device Discovery, Service Discovery, Security services and Binding.
Application objects are developed by the manufacturer to customize a device for various applications. Application objects control and manage the protocol layers in a ZigBee device. Up to 240 application objects can exist in a device.
B. ZigBee device types
There are three different types of ZigBee devices in a ZigBee network.
– The ZigBee coordinator which is an FFD (Full Function Device).
– The ZigBee router which is also an FFD.
– The ZigBee end-device which is an RFD (Reduced Function Device).
C. Routing in ZigBee
ZigBee coordinator and routers are responsible for discovering and maintaining the routes in the network. ZigBee end devices are not capable to perform route discovery. Route discovery on behalf of the end device is performed by the coordinator or a router [6].
Multiple routing protocols and algorithms can be applied in ZigBee networks. There are four different routing protocols, these are AODV (Ad-hoc On Demand Distance Vector), Cluster-tree algorithm including single-cluster algorithm and multiple-cluster algorithm, Message routing and Neighbor routing [8].
But in this work, we have discussed extended AODV protocol because this protocol is used in its implementation.
All Rights Reserved © 2012 IJARCSEE
62 AODV is an on demand routing algorithm where the nodes
are not taking part in the routing until they are needed. It allows multi-hop communication via multiple nodes without the need for base stations or other fixed infrastructure [4]. A node does not have to discover and maintain a route to another node until these two wishes to communicate. It is a source-initiated protocol, with the source node broadcasting a Route Request (RREQ) when it determines that it needs a route to a destination and does not have one available[12]. When a node wishes to communicate with another node it must first find the route to that node. This is done by the route discovery method. A route request packet (RREQ) is transmitted by the source node to its neighbours.
The Reactive Protocol AODV is extended so that communication between ZIGBEE and the Internet can be supported. Figure 2 shows Architecture of Interconnection of ZIGBEE and Internet [1].
Figure 2: Protocol Architecture [1].
The Ad hoc Routing Protocol AODV is extended for the connection between ZIGBEE and Internet. AODV is extended to find the routes towards the gateways. The figure 3 shows format of extended Route Request message [6].
Figure 3: Extended RREQ Message [6].
The Extended Route Request message contains a field known as Internet Global Address Resolution Flag (I-Flag). The RREQ_I message is used by source node which request for global route discovery.
The RREP message is also extended by the Internet Global Address Resolution flag (I-Flag). This message is called as RREP_I message. It holds the information about Gateway. When a Gateway receives a RREQ, it consults its routing table for the destination IP address specified in the RREQ message [8]. If the destination IP address is not found, the internet gateway sends RREP_I message to the sender of RREQ_I message. If destination address is found by the gateway, it sends RREP message to the sender unicastly. Gateway also sends RREP_I message to the sender. This message creates a default route although it is not requested. Here figure 4 represents extended RREP message format:
Figure 4: Extended RREP Message [8].
IV. NETWORKSIMULATION
All Rights Reserved © 2012 IJARCSEE
63 provides substantial support for simulation of TCP, routing,
and multicast protocols over wired and wireless (local and satellite) networks. The wireless model also includes support for node movements and energy constraints. NS-2 provides a split-programming model [5]. The simulation kernel is implemented using C++, while the Tcl scripting language is used to express the definition, configuration and the control of the simulation. Also, NS-2 can produce a detailed trace file and an animation file (NAM) for each ad hoc network simulation that is very convenient for analyzing the routing behaviour. Network Animator (NAM) is an animation tool for viewing network simulation traces and real world packet traces. It supports topology layout, packet level animation and various data inspection tools. Before starting to use NAM, a trace file needs to be created. This trace file contains topology information, e.g., stations and links, as well as packet traces.
Below summarizes the implementation of wireless networks of ad-hoc Protocols (AODV with ZigBee) in NS-2:
a) Mac Layer: IEEE 802.15.4 b) Ad hoc Routing Protocols: AODV
c) Radio Propagation Model: Two-ray ground at far distances
d) Antenna: an omni-directional antenna having unity gain Simulation of Ad Hoc Networks
e) Channel: Wireless
Mobility Model
The mobile stations move according to an improved version of the commonly used random waypoint model [10]. Each mobile station begins the simulation by selecting a random destination in the defined area and moves to that destination at a random speed. The movement patterns are generated using the movement generator tool setdest and the traffic connection pattern is generated by the traffic generator cbrgen. As shown in the below figure 5, the source node 0 transmit the data to the destination node 1 where as the node 2 act as a base station and all the data send by sender side is collected at the base station in its buffer with using TCP Reno and then data is transmitted to the destination node.
Figure 5: Screenshot of a Mobility Model.
The figure 6 represents the node movement in each direction but they are not active for transmission of data.
Figure 6: Screenshot of a Mobility Model with no transmission.
Algorithm used in Ad-hoc Networks
In this algorithm, every node i store a set of distances for each node j in the neighbourhood of i i.e. {dij(x)}. If a
packet is destined for node x from Node i, then the Node i selects the neighbour k as a next hop if the distance from Node i to Node k i.e. dik(x) equals the Minimum distance in
the set of distances maintained, {dij(x)}. This would lead to
All Rights Reserved © 2012 IJARCSEE
64 distance up-to-date, every node tracks the outgoing links
cost and periodically broadcasts to each one of its neighbours, its current estimate of the shortest distance to every other node in the network.
The objective that is achieved by AODV Protocols is:
(i) Broadcast of discovery packets only when required. (ii) Differentiate between neighbourhood detection and
general topology maintenance.
(iii) To broadcast information about the changes in local connectivity to those neighbouring mobile nodes who need the information.
V. IMPLEMENTATIONTECHNIQUE
The below specified implementation technique has been followed:
//Check if there is Packets in the queue length (max: 50)
Step 1: Broadcast all the Packets from the Node A to Destination Node D; floods the Packets in the network with a Route Request (RREQ) packet.
Step2: The Destination Node D defines the backward Path P; a Route Reply (RREP) packet is sent back to the source along the backward path P.
Step3: Each node that participates in forwarding the RREP back to the originator of the request, the node A, creates a forward route to D.
Step4: If the backward path P not used; deleted path:3ms (P)
Step5: Send Route Error (RERR) packet when any node A can’t establish path: P
// Update the Packets in the Zigbee Networks
1. Every ∆T (time set at every 1.5ms) then
Delete the Route Table Entries from Queue Length:QL.
2. Broadcast (Bcast)
TTL--;
3. Send (packet,Dest)
If (hopcount>0) then
Destination D= select Node A();
Send (A, D); Else
Discardpackets (P);
Endif
We have considered, when a node A determines that a route to the destination node D is required, it will flood the network with a Route REQuest (RREQ) packet for that particular destination node. Each node retransmits all packets seen for the first time and also sets a backward path to node A. When the Route REQuest(RREQ packet) reaches the destination D, a Route REPly (RREP) packet is sent back along the backward path to the source node A. Each node that contributes in forwarding the RREP back to the source of the request, the node A, creates a forward route to destination node D. If the paths are not used, then the backward paths are removed after a time-out of 3 ms. A new route discovery is initiated if a RREP packet is not received within 3 sec. The number of attempts before giving up is 3. Route ERRor (RERR) packet is sent to the source, when a node of an established path cannot forward a data packet back to the source and then a new route discovery is initiated.
VI. RESULTSANDDISCUSSION
This section discusses various performance metrics and dynamic attributes which affect the performance of network by analyzing the data collated from simulations and understand how the network behaves in such circumstances. The Performance Metrics involved in simulation are Packet Delivery Ratio and Average End to End Delay. Some dynamic attributes set up in addition to the above specified performance metrics include the percentage of PDR nodes, Interval of status update message and Wireless Bit Error Rate.
A. Wireless Bit Error Rate
All Rights Reserved © 2012 IJARCSEE
65
Figure 7: BER of ZigBee
The above graph illustrates the BER of a network corresponding to different packet sizes. The simulation results indicate that a wireless network has an average BER of 0.4% without support of the backbone routing strategy. BER remains constant for some time and then decreases at packet size 25 to 30 and then again increases at packet size of 40 to 45 due to disconnection of the receiver or destination and then remains constant. The decrease of wireless error rate results in increase of the PDR and accordingly reduces the end to end delay in the network. Under such situations, a combined network could reduce the impact of bit errors in such manner that the packets rejected at the wireless interface are forwarded through the wired mode to destination nodes.
B. Packet Delivery Ratio and Average End-to-End Delay The below graphs illustrates the PDR and average end-to-end Delay of a ZigBee-based network.
Packet Delivery Ratio is the percentage of data packets received successfully by destination nodes.
Average end-to-end Delay is measured by the time taken for a data packet from the source node to the destination node.
Figure 8: PDR of ZigBee
The above simulation graph indicates the Packet delivery ratio with respect to the simulation time of the network in seconds. . We have simulated the whole network upto 500ms to calculate the PDR and it was observed that the transmission rate of the PDR was 1% at the simulation time 300 to 450 ms (that means 100% packets will be delivered) and also PDR will not be zero because we will run upto 500 ms and shows that PDR will be 0 when the all nodes are disconnected.
All Rights Reserved © 2012 IJARCSEE
66 The above graph reflects that the E2E delay occurred on the
Packet size 25,30 and 35. The increase in End to End Delay due to increased wireless bit error rate in an ZigBee-based wireless network which is primarily caused by packet loss and retransmission. If there is any fluctuation then it means that some delay has occurred in the network.
The Table I and II indicates the simulation environment configurations.
TABLE I
GENERAL SETTINGS OF AODV
S.No. Parameter Value
1 Simulation Area 120km X 120km
2 Transport Layer TCP
3 Packet Size 512 bytes
4 Network Layer Protocol
ZigBee/AODV
TABLE II
GENERAL SETTINGS OF ZIGBEE
S.No. Parameter Value
1 Channel Type Wireless Channel
2 Antenna Model omniAntenna
3 MAC Layer Mac/802_15_4
4 Interface Queue Type
Queue/Drop Tail
5 Link Layer Type LL
6 Frequency (Hz) 2.4 GHz
7 Data Rate 25Kbps
VII. CONCLUSIONANDFUTUREWORK
The key focus of our study is to explore different networking technologies to address various aspects of a smart home like cost-effectiveness, openness of protocol stacks, interoperability and robustness. We propose a combined network of wireless specification ZigBee/IEEE 802.15.4 with extended ADOV protocol, which is designed and implemented NS-2. Combined network performs better than a single network ensuring better Packet Delivery Ratio and Lower Latency as the packets rejected at the wireless
interface are forwarded through the wired interface to destination nodes. The study analyzes the network performance taking into account different performance metrics (Packet Delivery Ratio and End to End Delay) and the dynamic attributes (Percentage of PDR nodes, Interval of status update message and Wireless Bit Error Rate). Proposed Implementation offers an improved bit error rate and packet delivery ratio and thus reducing end to end delay. Due to gaining popularity in sensor and monitoring applications, the ZigBee protocol should be considered as a tough contender for cost-effective wireless data transmission in smart homes.
The experimental model could be extended with the implementation of current or emerging network technologies. Also, the simulation model can be validated for its feasibility in the real environment. Further, the network security issues can be explored for smart homes to provide a secure communication network.
ACKNOWLEDGEMENT
We would like to thanks everyone for their encouragement and advices. We would also like to thank the anonymous reviewers for their insightful comments.
REFERENCES
[1] Rashween Kaur Saluja"An Improved Approach for Working outside
the MANET by Extending MANET Routing Protocol", IJCSI International Journal of Computer Science Issues, Vol. 9, Issue 1, No 2, January 2012 ISSN (Online): 1694-0814, pp. 287-296
[2] Weifa Liang and Yuzhen Liu, ”Online Data Gathering for Maximizing Network Lifetime in Sensor Networks”, IEEE Transaction on Mobile Computing, vol. 6, no. 1, pp. 2-11, January 2007.
[3] Amit Patwardhan” Energy based path planning for wireless sensor networks” International Journal on Emerging Technologies, 2010, pp.16-18
[4] Masato Noto, “An Efficient Flooding Method in Ad-hoc Networks for Reducing Power Consumption “, IEEE 2008; pp. 974-979
[5] S.Koteswararao, Dr. M. Sailaja, P. Ramesh, E. Nageswararao, V. Rajesh “SENSOR NETWORKS SIMULATION IN NS2.26” IJEST, vol2, 2011, pp.251-254.
[6] Farahani S., ZigBee Wireless Networks and Transceivers, Newnes, 2008.
[7] Gislason D., ZigBee wireless networking, Newnes, 2002.
[8] Xu zhanyang, Han xiaoxuan, Zhang shunyi, “A Scheme of Multipath Gateway Discovery and Selection for MANET Using Multi-Metric”, The 1st International Conference on Information Science and Engineering IEEE, 7 Sept. 2009, Page(s): 978-0-7695-3887.
[9] Eady F., Hands on ZigBee: Implementing 802.15.4 with Microcontrollers, Newnes, 2007.
[10]The Network Simulator - ns-2. http://www.isi.edu/nsnam/ns/ [11]Callaway E. 2003. Low Power Consumption Features of the IEEE
802.15.4/ZigBee LR-WPAN Standard. Florida Communication Research Lab, Motorola Labs. http://cens.ucla.edu/sensys03/sensys03-callaway.pdf
[12] R. Shah, J. Rabaey, “Energy aware routing for low energy ad hoc sensor networks”, in: Proceedings of the IEEE Wireless Communications and Networking Conference (WCNC), Orlando, FL, March 2002.
[13] www.zigbee.org