An Enhanced Routing Protocol for ZigBee/IEEE 802.15.4 Wireless ...

1 downloads 0 Views 215KB Size Report
ZigBee is a well accepted industrial standard for wireless sensor networks based on IEEE 802.15.4. Since aiming for the application of low data rate, low.
2008 Second International Conference on Future Generation Communication and Networking

An Enhanced Routing Protocol for ZigBee/IEEE 802.15.4 Wireless Networks Xianghua Xu, Daomin Yuan, Jian Wan Grid and Services Computing Lab, School of Computer Science Hangzhou Dianzi University 310018, Hangzhou, China [email protected], [email protected], [email protected] ZigBee specification [2] is firstly published by the ZigBee alliance in 2003. In this specification, ZigBee is defined on top of medium access control (MAC) and Physical (PHY) layers of IEEE 802.15.4. ZigBee networks support star and mesh topology, self-forming and self-healing. In a Zigbee network, all nodes are categorized into Coordinator, Router and End device depending on their functionality. Coordinator and router are FFDs, and End device is a RFD. There is only one coordinator in PAN, which is in charge of initiate network. And ZigBee networks are well organized by distributed address allocation mechanism. When any node wants to join in the network, it must scan the network and choose a parent node. Then the parent node assigns an address to it and if the node is a router node, it is also able to permit other nodes to join. Therefore, those two nodes construct a parent-child relationship. In this way, all networks are formed by means of spanning-tree and every node gets a unique address, which make routing among nodes quite convenient. One of the most important research topics on WSNs has been the routing protocol, so does ZigBee. There have been many studies on the routing protocols for wireless networks. Considering of the well-organized characteristics, ZigBee combines the Tree-based Hierarchical routing (THR) and the well-known ondemand distance vector (AODV) routing protocol in order to meet the objectives such as cost-effectiveness and path robustness [3]. THR directly get the next hop node for a given destination address without routing discovery according to some formulas. It does not need extra memory usage, but the routing path is often inefficient, since it only utilizes parent-child links. And AODV routing protocol has to perform route discovery process when the destination node address is new. However, route discovery is fulfilled by flooding the whole network, which may cause serious redundancy, contention, and collision in the network.

Abstract ZigBee is a well accepted industrial standard for wireless sensor networks based on IEEE 802.15.4. Since aiming for the application of low data rate, low price and low power consumption, ZigBee networks have the limited resources such as computation complexity and storage space. So it is especially important to design an efficient and effective routing protocol to save the consuming energy and extend the lifetime for ZigBee networks. In this paper, we survey two kinds of routing methods of the existing ZigBee routing protocol, and then propose two improved algorithms respectively. Simulation results show that the proposed routing version is a more efficient routing protocol, which can reduce routing overhead and routing discovery delay.

1. Introduction Wireless sensor networks (WSNs) are popular topics and intrigue lots of research interests in recent years, so WSNs are widely researched and there exist a great many research achievements. However, there is no universal industrial standard for practical application such as environments monitoring, home network, industry automation, etc, until ZigBee Standard shows up. Since published, ZigBee, which based on low power, low cost and low rate IEEE 802.15.4 MAC/PHY standard, is well accepted and quickly becomes a popular network protocol in WSNs. IEEE 802.15.4 [1] is a standard for wireless personal area networks (PANs), which aims at low data rate, short communication range and low cost. In IEEE 802.15.4, all devices are divided into two categories: full function devices (FFDs) and refined function devices (RFDs) according to their capabilities. FFDs can initiate a PAN and act as the coordinator of the PAN, or can forward data and act as the routers.

This work is supported by Science and Technology Research and Development Program of Zhejiang Province, China. (Grant No. 2008C11100, 2007C11023, 2007R40G2040097)) 978-0-7695-3431-2/08 $25.00 © 2008 IEEE DOI 10.1109/FGCN.2008.154

294

address, forward cost, residual cost, expiration time>. There exist two kinds of routing algorithms in ZigBee routing protocol, which is Tree-based Hierarchical routing and AODV routing. Routing table and route discovery table are only for AODV routing.

In order to avoid those problems mentioned above, we propose much more efficient ways and the corresponding improved algorithms. In THR, we choose the next hop node, whose distance from the destination node is currently minimum among all neighbor nodes by greedy algorithm. Therefore, we can get nearest node away from the destination and get an efficient routing path. In AODV, we separate all nodes into clusters according to the specified cluster forming method. In this way we decrease the flooding times and improve the routing efficiency.

3. Tree-based hierarchical routing (THR) 3.1. ZigBee Tree-based routing algorithm In ZigBee, every node has the ability to perform tree-based routing, which does not need extra memory space and path discovery. When any source node with address S at depth d wants to transmit data to the destination node with address D, it firstly checks whether source address S and destination address D meet the following equation. S < D < S + Cskip ( d − 1) If the equation is satisfied, it means the destination node is one of the descendant nodes of source node. Then source node directly sends the data to one of its children node according to the following equation. Otherwise, it transmits the data to its parent node. D, if D > S + Rm * Cskip ( d ) ⎧ ⎪ N= ⎨ ⎢ D − ( S + 1) ⎥ ⎪⎩ S + 1 + ⎣⎢ Cskip ( d ) ⎦⎥ * Cskip ( d ), otherwise The ZigBee Tree-based routing algorithm is very simple and easy to implement, but it only considers parent-child relationship to transmit data and ignores utilizing the neighbor node, which may sharply decrease the routing path cost. It even encounters such an extreme condition that the destination node is just the source node’s 1-hop neighbor node, which has to be routed through many hops by ZigBee Tree-based routing algorithm.

2. Preliminaries In ZigBee networks, the network addresses are assigned using a distributed address allocated mechanism. The address is unique within a particular network and is assigned by a parent to its child when a new node successfully joins in the network. Every potential parent is provided with a finite sub-block of the address space, which is used to assign network address to its children. The size of sub-block is decided by several appointed parameters: Cm-the maximum number of children a parent may have, Lm-the maximum depth in the spanning-tree network, Rm-the maximum number of routers a parent may have as children. Once those parameters are given, we can compute the size of address sub-block at depth d, say Cskip(d) as follows: Rm = 1 ⎧1 + Cm ⋅ ( Lm − d − 1), ⎪ Lm − d −1 Cskip ( d ) = ⎨1 + Cm − Rm − Cm ⋅ Rm , Rm > 1 ⎪⎩ 1 − Rm

A node with a Cskip(d) value greater than 0 shall permit other nodes to associate and be capable of allocate addresses. And it can assign its k-th router child and n-th end device child at depth d+1 in a sequential manner, respectively, to the following equations: Ak = Aparent + Cskip ( d ) ⋅ ( k − 1) + 1,

3.2. An enhanced tree-based routing algorithm In order to make the ZigBee Tree-based routing algorithm more efficient, we have to consider neighbor nodes and choose the node with the local shortest path to the destination as next hop node. This thought is based on Greedy algorithm, so we do not need to prove that we will get a whole shortest path at last. The improved Tree-based routing algorithm includes three steps, and every step in detail is depicted as follows: Step 1: if the destination node is in its neighbor table, directly transmit to corresponding node. Step 2: if the destination node is its descendant node, choose one of its children node as next hop node just as the way of ZigBee. Step 3: if the above conditions are not satisfied, then choose the node with minimum hop to destination node

(1 ≤ k ≤ Rm)

An = Aparent + Cskip ( d ) ⋅ Rm + n, (1 ≤ n ≤ Cm − Rm ) Therefore, all sensor nodes are organized as a spanning-tree network, and any node can easily check their parent node and descendant nodes. In ZigBee, every device maintains a neighbor table which has all the neighbor information in the 1-hop transmission range. Every entry of the neighbor table include: . And every FFD node maintains routing table and route discovery table. The fields of routing table and route discovery table are as follows:, maxComDepth then maxComDepth = i; minHopNode = N end foreach End

4.2. An enhanced AODV algorithm To alleviate the broadcast storm problem, there are a great number of approaches proposed by researchers to limit flooding packets relay to a small portion of nodes. Among them, grouping nodes into clusters is a much more efficient and effective method. There are several ways to construct the cluster, such as Lower-ID Cluster algorithm (LID), Highest-Connectivity Cluster algorithm (HCC), Least Cluster-head Change Algorithm (LCC), etc. And considering the ZigBee networks are well organized in way of spanning-tree and distributed address allocated mechanism, we partition the whole network into static clusters according to following rules. FFD nodes with even depth are assigned to be cluster heads. FFD nodes with odd depth and RFD nodes are assigned to be cluster members and the cluster heads are their respective father nodes In this way, it forms a 1-hop non-overlapping cluster structure with two hops between neighboring cluster-heads. And the clusters are labeled by their respective cluster-heads network address. We set ZigBee network parameters Lm=3, Rm=2 and Cm=4, and get the following clusters example according to the formulas above.

4. AODV routing 4.1. ZigBee AODV routing ZigBee specification adopts the well-studied public domain algorithm AODV [4, 5]. When a node want to transmit data to another in this way, it firstly checks whether there is an entry in the route table for the destination. If it is there, it directly gets the next hop address from the routing table. Otherwise, it has to perform routing discovery process by broadcasting RREQ before sending the data in order to build a routing path. When receiving the RREQ, the destination node responds by unicasting RREP along the reverse path. The routing discovery process is finished when RREP reaches the source node. Then the built path is added into the routing table and the source node starts to transmit data along the path. For broadcasting RREQ, a straightforward approach is blind flooding. Blind flooding requires no knowledge of network topology, and packets are broadcast to all destinations. Therefore, it generates an excessive amount of traffic in large networks and suffers from broadcast storm problem, which refers to the fact that flooding may result in excessive redundancy, contention collision [6]. If the networks own a lot of nodes, this will add a heavy burden to all nodes. So if the flooding packets are limited to certain sets of nodes and avoid redundantly broadcasting to the whole network, the control overhead can be significantly decreased.

Figure 1. Cluster structure illustration Considering the ZigBee networks are constructed in a way of spanning-tree and every cluster node is fixed by their network address, we can easily calculate the cluster head of the destination node. So we can route data in a clustering manner and do not need any extra computation and memory to store cluster information. The routing process of the improved AODV algorithm is just similar as the CBRP [7]. But it is rather different way how to calculate the cluster-head address of the destination node. So the calculation algorithm of cluster label is especially given here.

296

Algorithm 2: Calculate the cluster label of destination Input: destination node D Output :Cluster Label of the destination Begin: curNode-record the current node address, set 0 at first found-record whether find the cluster label, set false if D is even then ClusterLabel = D else for d=1 to Lm for i=1 to Rm //for FFD if i-th children of curNode is D then found = true break else if the i-th children of curNode is ancestor of D curNode = i-th of children of curNode break end if end for if i >= Rm and D < i-th of children of curNode+Cm-Rm then found = true //for RFD if found is true then ClusterLabel = curNode break end if end for end if

Figure 2. Average end-to-end delays Figure 2 shows the average end-to-end delay that is defined as the delay between the time at which the data packet was originated at the source and the time it reaches the destination. The procedure is caused by the process of route discovery, the repair of failure link, queuing and retransmission. When the number of network nodes is increased, the average of end-to-end delays of ZigBee routing protocol and enhanced routing protocol are both increased corresponsively. And as the number of nodes increases, the latter achieves higher performance.

5. Performance evaluation To evaluate the performance of the enhanced routing protocol, simulations, which bases on Samsung's IEEE 802.15.4 extension, are made in NS22.30. In the simulation environment, we set the network size as 200x200 and the transmission range as 50 meters. We increase the number of nodes from 50 to 200 in the system without changing the size of the simulation area. Traffic sources are CBR. The packet size is 127bytes and the average packet rate is 10 packets/sec. The simulation duration is 300 seconds. Every node has identical transmission range and they are randomly deployed. Thus, the network topology in the simulation is always variable, and it may occur for several nodes not to be able to join the network if there's no neighbor node within the transmission range. In our simulations, we only consider scenarios where more than 80 percent of the total number of nodes is able to join the network. In order to keep the clustertree network formation and discovery procedures, we set the number of children and maximum depth of the tree as Cm=4, Rm=4, and Lm=5.

Figure 3. Packets delivery ratio Figure 3 shows the delivery ratio of ZigBee routing protocol and enhanced routing protocol, which is defined as the ratio of the number of data packets received by the destinations to those sent by the CBR sources. As it is illustrated, the packet delivery ratios of both are decreased as the number of nodes increased. This is due to an increase in probability of packet collisions as the network traffic increased. Since the AODV with logical clustering in the enhanced

297

routing protocol tries to decrease the times of route discovery, it performs better and is more scalable along with increasing network nodes. When the number of network nodes is small, the average end-to-end delay and packet delivery ratio does not benefit much, but when the number of network nodes increase, both decreases significantly. It suggests that the enhanced routing protocol is more suitable and scalable for a real-time and dense network.

7. References [1] Wireless Medium Access Control and Physical Layer Specifications for Low-Rate Wireless Personal Area Networks (LR-WPANs), IEEE Std 802.15.4-2003, IEEE Computer Society, 01 October 2003. [2] [3]

6. Conclusion In this paper, we analyze two routing algorithms of ZigBee routing protocol in detail, and then we separately make an improvement according to their shortages and inefficiency. In tree-based hierarchical routing, we efficiently utilize the neighbor table and find the next hop node with shortest path to destination among neighbor nodes. Apparently, the improved treebased routing algorithm significantly reduces the routing hops and therefore energy consumption. In ZigBee AODV routing algorithm, we consider the good organization of the constructed spanning-tree network by distributed address allocated mechanism, and try to decrease the retransmission of flooding packets in order to make routing more efficient and avoid broadcasting storm problem. We group all nodes into logical clusters in an effective way. Therefore, nodes in the same clusters can share routing table and effectively reduce the times of broadcasting routing discovery packets. At last, we simulate ZigBee routing protocol and the improved one, and the results show that the latter is more efficient and performs better in terms of average end-to-end delay and Packets delivery ratio.

[4] [5] [6]

[7]

[8] [9]

298

ZigBee specifications, "ZigBee Document 053474r15", ZigBee Alliance, Feb 2007. Jae.Y. H, Sunghyun Choi, “Enhanced Hierarchical Routing Protocol for ZigBee Mesh Networks”, IEEE Communications letters, Vol.11, No.12, Dec. 2007, pp. 1028-1030. Ian D. Chakeres, Lukr Klein-Berndt, “AODVjr, AODV Simplified”, Mobile Computing and Communcation Magazine, March, 2005, pp. 123-131. C.E. Perkins, E.M. Royer, and S.R. Das, “Ad hoc On Demand Distance Vector Routing (AODV)”, RFC 3561, July 2003. Tzu-Chiang Chiang, Po-Yi Wu and Yueh-Min Huang, “A Limited Flooding Scheme for Mobile Ad Hoc Networks”, WiMob'2005, Vol. 3, Aug. 2005, pp. 473478. Ryotaro ODA, Tomoyuki OHTA, and Yoshiaki KAKUDA, “An Efficient On-Demand Hierarchical Routing Protocol Based on Autonomous Clustering for Mobile Ad Hoc Networks”, ISADS'07, March 2007, pp. 180-187. J. Zheng and M.J. Lee, "NS2 Simulator for IEEE 802.15.4",http://ees2cy.engr.ccny.cuny.edu/zheng/pub/, 2004 Jane Y. Yu, and Peter H. J. Chong, "A Survey of Clustering Schemes for Mobile Ad hoc Networks", IEEE Communications Surveys & Tutorials, First Quarter 2005, volume 7, No.1. pp. 32-48.