Vous êtes sur la page 1sur 7

International Journal of Information and Computer Science (IJICS) Volume 4, 2015

doi: 10.14355/ijics.2015.04.010

www.iji-cs.org

A Novel Shortcut Tree Routing Method Based


on Load-balanced in ZigBee Wireless Sensor
Networks
Li Zhixin1, Zhu Zhangqing*2, Xin Bo3
Department of Control and System Engineering, Nanjing University, No.22. Hankou Road, Nanjing 210093, China
lizhixinsuccess@163.com; *2zzq-hf@163.com; 3xinbo@nju.edu.cn

Abstract
ZigBee Tree Routing has two major problems; the first problem is its more hop-counts as compared to the reactive routing and
another one is the hotspot problem. In this paper, we propose an improved routing algorithm called Load-balanced Shortcut
Tree Routing (LSTR) which utilizes the information of neighbors within two hops. In LSTR, the intermediate or source node can
find the optimal next hop node which has the smallest remaining hop-count to the destination within its transmission range. In
the process of data transmitting, nodes depth, nodes residual energy and energy threshold are taken into account. The
simulation result shows that this algorithm can transmit data efficiently, balance the energy of network and prolong networks
lifetime.
Keywords
ZigBee Network; Tree Routing Algorithm; 2-hop Neighbor

Introduction
ZigBee/IEEE 802.15.4 is a global hardware and software standard designed for Wireless Sensor Networks (WSN)
which is composed of a large number of low-powered, self-organizing and small size sensor devices, called sensor
nodes, which are capable of collecting, storing, processing environmental information, and communicating with
neighboring nodes [1]. The nodes can be deployed on the ground, in the air, under water, on bodies, in vehicles,
and inside buildings. The monitoring area may be inaccessible terrains or harsh environment, which needs the
sensor network possessing cooperative and self-heal capabilities. On the other hand, the ZigBee WSN must have
robust routing path which can enhance the reliability of the network. There are two kinds of routing protocol in
Zigbee WSN, cluster tree routing and the reactive routing protocol which is derived from AODVjr.
The Cluster Tree Routing is widely used in many resource-limited devices and applications, since it does not
require any routing table and route discovery overhead to send a packet to the destination. However, the tree
routing cannot provide the optimal routing path because of the fundamental limitation that a packet must follow
the tree topology. Moreover, because the nodes closer to the coordinator need to transport larger quantity of data
and their energy would be worn out quickly and the energy of network will be unbalanced. This is also called
hotspot problem.
ZigBee reactive routing protocol provides the optimal routing path for the arbitrary source and destination pair
through flooding the Route Request Command Frame (RREQ) in the network [2]. It requires the route discovery
processing for each communication pair, so the route discovery overhead and the memory consumption
proportionally increases with the number of traffic sessions increases. Moreover, the flooding mechanism wastes a
large amount of bandwidth and device energy, and might cause a broadcast storm problem [3].
Relate Work
For the ZigBee standard, there have been several significant methods and thoughts proposed to solve the problems
of ZigBee tree routing and AODV routing. NTR is a routing strategy proposed by L. Dan, Q.Zhihong[4, 5]. This
protocol was firstly tried to find the common neighbor nodes between the source and destination by using the

61

www.iji-cs.org

International Journal of Information and Computer Science (IJICS) Volume 4, 2015

neighbor table; then it used a proposed strategy to select the neighbor that was nearest to the destination as the
next hop. In the literatures[6, 7], the hops from source node to destination node can be calculated by using
hierarchical tree algorithm. Based on this idea, if a node could obtain two nodes addresses, it could calculate the
hops between two nodes. The introduction of 1-hop neighbor table provides the network addresses of the
surrounding nodes. The hops to the destination can be separately calculated based on these address information.
According to the comparison of these hops, the source or intermediate node determines the optimal path to the
destination in a larger scope. Then the Shortcut Tree Routing (STR) protocol is proposed in [6], which uses the 1hop neighbor table to find the optimal next hop node that has the smallest remaining hop counts to the destination.
The routing strategy of Enhanced Tree Routing protocol (ETR) [8] is similar to STR, with the difference that ETR
defines tree index as a tool to simplify the route calculations. In the above protocols, nodes try to find shortcut
paths by searching the neighbor table and selecting the neighbor which is the nearest to the destination as the next
hop. Although, using shorter paths can reduce energy consumption, the approaches dont consider energybalancing problem of the nodes and load-balancing problem of the network. On the other hand, although they
have mentioned to use 1-hop neighbor to improve Tree Routing in [7, 8], the scope of 1-hop neighbor is very
limited as compared to 2-hop neighbor, and the effect is not obvious. Another approach that considers the load
balancing in the ZigBee network is introduced in [9, 10]. This improved routing protocol is based on the energybalancing and includes an optimization algorithm to make sure that the routing is locally optimal. The algorithm
uses the residual energy of nodes to avoid selecting nodes with low residual energy. Although it concentrates on
balancing energy consumption in the network to improve network lifetime, it doesnt consider hop counts and
routing cost as an optimization criterion.
The paper is organized as follows. Section III discusses hierarchical tree routing. Section IV gives a detailed
description of load-balanced shortcut tree routing protocol. In section V, we evaluate the performance. Finally, in
section VI, we present the paper concludes and the work for the next-phase.
Hierarchical Tree Routing
The network address assignment in the ZigBee specification includes hierarchical tree address allocation scheme
which is defined in ZigBee2007 and stochastic address allocation scheme which is defined in ZigBeePro[11].
A hierarchical tree network starts from a ZigBee coordinator acting as the root of the tree. A ZigBee coordinator or
router can act as a parent device and accept association from other devices in the network. A device connected to a
parent device is known as a child device[12]. The messages intended for a child can be routed through its parent. A
ZigBee end device can act only as a child because it lacks the routing capability. The network depth is defined as
the minimum number of hops to reach the ZigBee coordinator[13]. The ZigBee coordinator itself has a depth of
zero. Application developers are allowed to use their own address allocation method. When the ZigBee
coordinator starts establishing the network, if the nwkUseTreeAddrAlloc attribute is set to TRUE, the coordinator
will use the default distributed addressing scheme. In the distributed addressing, the ZigBee coordinator provides
each potential parent with a sub-block of network addresses. The parent will assign these addresses to its children.
The ZigBee coordinator determines the maximum number of children allowed for each parent. If the
nwkUseTreeAddrAlloc is set to FALSE, the APL layer will provide user-defined addressing to the NWK layer. The
default address allocation simply uses the depth and maximum number of children to allocate the addresses. The
parameters that affect the address allocation are the following: Lm: The network maximum depth (nwkMaxDepth).
Cm: The maximum number of children a parent can accept (nwkMaxChildren). Rm: The maximum number of
routing-capable children a parent can accept (nwkMaxRouters ). d: The depth of a device in a network [14].
To determine the address of the remaining devices, a simple function Cskip(d) is introduced:

1 + Cm (Lm d 1)

Cskip (d) 1 + Cm Rm Cm Rm Lm d 1

1 Rm

,if Rm =
1
(1)

, otherwise

The address of each end device and router is assigned using the following equations:

62

International Journal of Information and Computer Science (IJICS) Volume 4, 2015

=
Ak Aparent + Cskip (d) (k 1) + 1

www.iji-cs.org

(1 k Rm) if node k is Router

A
=
Aparent + Cskip (d) Rm + n (1 n Cm-Rm) node n is Endevice
n

(2)
(3)

For a ZigBee router with address Am at depth d, the destination with address Ad is a descendant if:

Am < Ad < Am + Cskip (d 1)

(4)

When the destination is a descendant of the receiving device, the address of the next hop node is:

if A d is child of A m ,
Ad

An =
Ad Am 1
otherwise.
Am + 1 + Cskip (d) Cskip (d)

(5)

Hierarchical tree routing is based on the block address allocation mechanism, so each device has an address space
to distribute to their children[15]. When a device has no capability of route discovery, it simply follows the
hierarchical tree by comparing the destination address. Tree routing algorithm uses address calculation of two
nodes to determine the relationship between parent and child, and choose next hop. The algorithm just uses two
addresses to identify a jump, and it may have the problem that the path may not be optimal, as Fig.1 shows:

FIG.1 EXAMPLE OF HIERARCHIAL TREE ROUTING

Improved Algorithm Designing


Our objective is to provide a near optimal routing path like the reactive routing protocol as well as to maintain the
advantages of cluster tree routing such as no route discovery overhead and little memory consumption for the
routing table. In contrary to the cluster tree routing which only uses tree links connecting the parent and child
node, LSTR exploits the neighbor nodes by focusing that there exist the neighbor nodes shortcutting the tree
routing path in the mesh topology.
The main point of LSTR is: firstly, we use the beacon frame to finish the establishment of 2-hop neighbor table. The
table is defined as follow:
id

nbrAddr1

nbrAddr2

LQI

Epower

depth

nbrAddr1 is 1-hop neighbor s address


nbrAddr2 is 2-hop neighbor s address
Link Quality Indicator (LQI) indicates the quality of the received signal and the result should be represented as an
integer ranging from 0 to 255.
Epower is the residual energy value of neighbor node.
Routers set up 2-hop neighbor table by broadcasting beacon frame in cycles. In receiving the other neighbors
beacon frame, the node extracts the information to join its 2-hop neighbor table. We assume that each node has an
up-to-date 2-hop neighbor table.
We set an energy threshold value Q, on the basis of residual energy state of the sensor node. When node residual
energy is smaller than Q, it means the battery energy of this node is not sufficient, in the process of data
transmitting, this node should be avoided.

63

www.iji-cs.org

International Journal of Information and Computer Science (IJICS) Volume 4, 2015

Assume that the initial energy value of node is E, the energy threshold equation is:

Q=

1
1
E

t
di + 1

(6)

t means the network operation time, di is the depth of i, is a coefficient, which is used to balance the speed that
the threshold decreases which comes from the increase of the depth of the network.
Secondly, after finishing the establishment of neighbor table, node could use it to relay the data packet, choose one
of neighbor nodes as the next hop node when the remaining tree hops to the destination can be reduced. Using the
address information which is provided by 2-hop neighbor table, node could determine the optimal path in a larger
scope, and generally will reduce the overhead of relaying the data packet. Specific algorithm is as follow:
1) If the destination is the nodes 1-hop neighbor, send directly to destination node.
2) If the destiantion is the descendant or parent node, according to the tree algorithm routing to send.
3) If it does not fit the above two kinds of circumstances, we compute the remaining tree hops from an arbitrary
source to a destination using ZigBee address hierarchy and tree structure as discussed in previous section. In other
words, the remaining tree hops can be calculated using tree levels of source node, destination node, and their
common ancestor node, because the packet from the source node goes up to the common ancestor, which contains
an address of the destination, and goes down to the destination in Cluster Tree Routing. Table 1 describes the
algorithm to find ancestors network address at each tree level.
TABLE 1 ALGORITHM TO FIND ANCESTORS AT EACH TREE LEVEL

Find_Ancestors(devAddr)
Input: devAddr- devices network address
Output: level(devAddr)- devAddrs tree level
A(devAddr)- nerwork address of the devAddrs ancestors at each level
A(devAddr,0) = 0
for i=0 to Lm -1
if (A(devAddr, i) =devAddr)
return i, A(devAddr)
endif
rtrOrder = (devAddr-A(devAddr,i)-1)/Cskip[i]
if(rtrOrder < Rm)
A(devAddr, i+1)= A(devAddr,i)+ Cskip[i]. rtrOrder +1
else if(rtrOrder >Rm)
A(devAddr, i+1)= devAddr
endif
endfor

The reason that we find the common ancestors of the device is we want to compute the tree routing cost between a
source and a destination. The relevant definitions are as follows:
level (u) : tree level of node u.
A(u): {A(u,i) |A(u,i) is the network address of us ancestor at tree level i, i <level(u)}.
LCA(s, d): the lowest common ancestor between source node s and destination d. Since the network address of
device is contained in its ancestors address space in lower tree levels, we can find the rtrOrder, which is the router
capable child order k. Since the routing hops from S to LCA(s, d) and from LCA(s, d) to D can be calculated using
different of tree levels, the tree routing cost from s to d can be calculated by the equation level(s) + level(d) 2level(LCA(s, d)).
Table 2 describes the load-balanced shortcut tree routing (LSTR) algorithm to find the next hop nodes network
address. When nodes residual energy Epower < Q, it means the battery energy of this node is not sufficient, the
nodes working state is unstable, and should be avoided in the process of transmission. We can weigh the
importance of each criterion based on our goal by using coefficients , and (0, , 1, + + =1). In LSTR, a

64

International Journal of Information and Computer Science (IJICS) Volume 4, 2015

www.iji-cs.org

source or an intermediate node selects the next hop node having the smallest TotalCost to the destination. This
procedure can effectively balance the network traffic by evenly distributing the workload of intermediate nodes
and by relieving the congestion of nodes. Also, it can reduce delay by reducing the hop counts. Furthermore, LSTR
improves the packet delivery ratio, because it selects link with higher quality. The routing path selection in LSTR is
decided by individual node in a distributed manner, and LSTR is fully compatible with the ZigBee standard that
applies the different routing strategies according to each nodes status. The LSTR algorithm basically follows
ZigBee Tree Routing, but chooses one of 1-hop neighboring nodes or 2-hop nodes as the next hop node when the
remaining hops to the destination can be reduced.
TABLE 2 LOAD-BALANCED SHORTCUT TREE ROUTING ALGORITHM

Find_NextHopAddr(dstAddr)

Input : dstAddr network address of the destination


Output : nextHopAddr next hop address for the destination
Initialize the min RouteCost and min TotalCost with
Level ( dstAddr ) , A ( dstAddr ) = Find _ Ancestor ( dstAddr )
for each ( nbrAddr1 ni , nbrAddr 2 nij in nbrTable )
if ( nij == dstAddr & & Epower Q )
{
min RouteCost = 2
TotalCost
=

( depth
k =1

b
Epowerk

LQI k

) + min RouteCost

if (TotalCost min TotalCost )


min TotalCost = TotalCost
nextHopAddr = nbrAddr1 ni
end if
}
else {
level ( ni ) , A ( ni ) = Find _ Ancestors ( ni )
level ( LCA ) = 0
while(level ( LCA) min(level (dstAddr ), level (ni )) & &
A(dstAddr , level ( LCA) == A(ni , level ( LCA)))
++level(LCA)
end while
= level (dstAddr ) + level (ni ) - 2 level ( LCA)
nbrRouterCost
if (nbrRouterCost min RouterCost )
min RouterCost = nbrRouteCost
end if
TotalCost
=

( depth
k =1

b
Epowerk

LQI k

) + min RouteCost

if (TotalCost min TotalCost & & Epower Q )


min TotalCost = TotalCost
min nextHopAddr = ni
end if
}
end for each

Performance Evaluation
In this evaluation, we conduct simulations to evaluate the performance of the proposed LSTR in comparison to the
CTR and ZAODV. We compare router cost, energy consumption, packet delivery ratio, networks lifetime and
dead nodes of the three protocols. We use NS-2 as the tool of simulation experiment. The simulated network
consists of 100 nodes randomly distributed in the area of 100100m2. Nodes communication radius is 30 m. The

65

www.iji-cs.org

International Journal of Information and Computer Science (IJICS) Volume 4, 2015

coordinator is located at the center of the region and the neighbor table of each node is allowed to keep up to 14
neighbors. The network parameters are Cm = 4, Rm = 4, Lm = 7. The transmission of a packet from a randomly
chosen source node to a randomly chosen destination node is called an event. For each event, the evaluation
parameters are measured. The events happened sequentially that each event starts after the previous one finishes.
Therefore, there is no packet collision or channel contention during packet transmission. This allows us to focus on
the performance of routing protocols by examining the hop-counts, packet delivery ratio and nodes life time. The
simulation is based on 100 different randomly generated networks and the results are averaged.
TABLE 3 SIMULATION RESULT

CTR

ZAODV

LSTR

Packet delivery ratio

0.69

0.55

0.78

Average hop count

5.88 hops

4.03hops

4.29hops

Energy consumption

0.17

0.08

0.03

Average dead nodes Number

23.4

25.6

19.1

Network lifetime

117events

203events

312events

Table 3 compares the simulation results of CTR, ZAODV and LSTR protocol. By comparing the results, we can find
out that the proposed LSTR outperforms others in terms of reliability, number of hop counts, lifetime and loadbalancing. LSTR is able to balance the energy consumption of the nodes in the network more effectively than the
other two protocols. As the performance evaluation shows, the LSTR routing reduces more than 25 percent of the
routing cost needed for the traditional ZigBee Tree Routing and the routing cost performance is as good as
ZAODV routing.
For a random destination, the performance of the proposed algorithm depends on how many useful neighbor
nodes are stored in the neighbor table, which can be optimized by applying the proper parameters of ZigBee node
such as nwkMaxRouter, nwkMaxChildren,nwkMaxDepth,NWK_MAX_DEVICE_LIST of nodes. These parameters
are configured in nwk_globals.c and nwk_globals.h in ZigBee protocol stack such as Z-Stack which is developed by
Texas Instrument [15]. Therefore, we expect the proposed algorithm to be utilized in many ZigBee applications
requiring both small memory capacity and high routing performance.
Conclusion
In this paper, we have described the detour path problem, hotspot problem and load unbalanced problem of the
Cluster Tree Routing. These are the fundamental problems of the traditional ZigBee tree routing protocols, which
cause the overall network performance degradation. To overcome these problems, we propose LSTR that uses the
2-hop neighbor table. In LSTR, the intermediate or source node can find the optimal next hop node that has the
smallest remaining hop count to the destination within its transmission range. In the process of data transmitting,
node depth and node residual energy are taken into account, and the energy threshold Q is dynamically adjusted
in time, trying to balance energy consumption of all nodes in the network. Simulation result shows that the LSTR
can effectively avoid hot spot in the process of network running, transmit data more optimized, and prolong
networks lifetime. LSTR algorithm is based on proper functioning network. However, the monitoring area of
ZigBee WSN may be inaccessible terrains or harsh environment, which needs the sensor networks possess
cooperative and self-heal capabilities. In addition, some sensor nodes may fail due to various reasons such as
power voltage changes, or environmental interference which will lead to the network partition. The next step is to
research the recovery mechanism of ZigBee WSN. We plan to design a fault detection and recovery mechanism for
the network based on localized tree and a recovery method for every ZigBee node.
REFERENCES

[1]

66

S.C. Ergen. ZigBee/IEEE 802.15.4 Summary, Technical Report, September 2004.

International Journal of Information and Computer Science (IJICS) Volume 4, 2015

[2]

Jin Shyan Lee. An Experiment on Performance Study of

www.iji-cs.org

IEEE 802.15.4 Wireless Networks, IEEE Transactions on

Computers, Vol. 55, Issue 8, pp. 10401051, August 2006.


[3]

ZigBee Specification, ZigBee Alliance Std., 2005. [Online]. Available: http: //www. zigbee.org

[4]

M. Al-Harbawi, M.F.A. Rasid, N.K. Noordin, Improved Tree Routing (ImpTR) Protocol for ZigBee Network,
International Journal of Computer Science and Network Security, Vol.9, October 2009.

[5]

L. Dan, Q. Zhihong, Z. Xu, L. Yue, Research on Tree Routing Improvement Algorithm in ZigBee Network, Second
International Conference on MultiMedia and Information Technology, pp.89-92, April 2010.

[6]

T. Kim, D. Kim, N. Park, S. Yoo, T.anchez Lopez, Shortcut Tree Routing in ZigBee Networks, Second International
Symposium on Wireless Pervasive Computing, pp.42-47, February 2009.

[7]

Taehong Kim, Daeyoung Kim, Seong-eun Yoo, Lpez, Shortcut Tree Routing in ZigBee Networks ,IEEE Transactions on
Computers, Vol. 1, Issue 8, pp. 4244-0523 July 2014.

[8]

S.Ahn, B.Kim, S.Lee, Energy-efficient Tree Routing Algorithm-based Destination Family Group in ZigBee Networks,
Fourth International Conference on Sensor Technologies and Applications, pp.1-6, July 2010.

[9]

H. Fariborzi, M. Moghavvemi, EAMTR: Energy Aware

Multi-Tree Routing for Wireless Sensor Networks, Issue on

Wireless Ad-Hoc Networks, Vol.3, Issue.5, pp.733-739, April 2008.


[10] L. Tao, C. Qiao-lin, W. Deng-di, B. Yan-li, ZigBee Tree Routing Optimize Based on Energy-balanced, Ninth
International Symposium on Distributed Computing and Applications to Business, pp.1-7, August 2010.
[11] Atefeh. Khatiri, Ghasem. Mirjalily, Ahmad.

Khademzadeh, Energy-Efficient Shortcut Tree Routing in ZigBee

Networks, Fourth International Conference on Computational Intelligence, pp.2-9, August 2012.


[12] Yukun Yao, Zhi Ren, Neighbor-Information-Assisted Tree Routing for ZigBee Networks, International Conference on
Computer Science and Electronics Engineering, pp.4-8, August 2012.
[13] W. Qui, E. Skafidas, P. Hao, Enhanced Tree Routing for Wireless Sensor Networks, Ad Hoc Journal,Vol.7, Issue.3,
pp.638-650, June 2007.
[14] W.R. Heinzelman, A. Chandrakasan, H. Balakrishnan, Energy efficient Communication Protocol for Wireless
Microsensor Networks, 33rd Annual Hawaii International Conference on System Sciences, pp. 1-10, January 2000.
[15] CC2420 Product Information. [Online]. Available: http://www.chipcon.com.

67