# Improving Route Selections in ZigBee Wireless Sensor Networks
## 2 Overview of ZigBee
### Link and Route Costs  
In order to enable nodes to differentiate between routes, ZigBee defines the cost of a route as follows: with \(z_{1},\ldots,z_{K}\) being the nodes that form a route, the cost of the route is defined as the sum of individual link costs:  
\[c_{z_{1},\ldots,z_{K}}:=\sum_{i=1}^{K-1}c_{z_{i}z_{i+1}}, \tag{1}\]  
where \(c_{z_{i}z_{i+1}}\) is the cost of the link between nodes \(z_{i}\) and \(z_{i+1}\).  
ZigBee further defines that the cost of a link \(c_{z_{1}z_{2}}\) be related to the probability of successful transmission in the link as follows: let \(p_{z_{1},z_{2}}\) be the probability that a packet transmitted by \(z_{1}\) is successfully received at \(z_{2}\). The cost \(c_{z_{1},z_{2}}\) is defined as (see Section 3.6.3.1 of [13]):  
\[c_{z_{1},z_{2}}:=\min\left\{\mathcal{T},\text{round}\left(\frac{1}{p_{z_{1},z_{ 2}}}^{4}\right)\right\}, \tag{2}\]  
where the reader should note that link costs are quantized into three bits.  
It should be highlighted that the probabilities of successful transmission in links, and therefore, the various link costs, vary not only because of the various distances between nodes but because of hidden node problems [31; 32] and external interference [8; 33; 34]. For instance, node 4 in Figure 1 may generate a higher traffic load than node 5, which means that the probability that node 1 successfully receives a packet from node 3 is lower than the probability that node 2 successfully receives node 3's packet, which means that \(c_{3,1}>c_{3,2}\). Likewise, if an IEEE 802.11 WiFi network is closer to node 1 than to node 2, it may cause more interference in node 1's reception than in node 2's reception, causing \(c_{3,1}>c_{3,2}\) as well.  
Furthermore, the various link costs may vary over time. Although ZigBee networks usually involve stationary devices with a predictable traffic load, WiFi stations are mobile and their traffic load is difficult to forecast. For instance, a WiFi device may move into the area of a ZigBee network and start streaming a video of short duration, causing interference and variation in the cost of routes only during the video stream.  
It is also important to note that ZigBee does not consider how the size of the packet can influence \(p_{z_{1},z_{2}}\). Although different packet sizes alters \(p_{z_{1},z_{2}}\), this simplification is reasonable when ZigBee is applied in applications where most application packets have approximately the same size. For instance, in a wireless sensor network where sensors behave in a similar manner and acquire the same type of measurements such a simplification is reasonable.  
Lastly, we also note that ZigBee's link cost definition does not include energy consumption. Defining link and route costs to minimize energy consumption is a common approach in the literature of route selection for wireless sensor networks [35; 36; 37; 38; 39; 40; 41; 42; 43]. Instead of addressing energy considerations in route selection, ZigBee conserves energy in battery-powered nodes by avoiding them to participate in routing procedures and by specifying power saving procedures. In this approach, battery-powered devices do not participate in routing procedures and communicate only with parent nodes, which are either the ZigBee coordinator or nodes with routing capabilities, called ZigBee Routers. Parent nodes are grid-powered and are the only nodes that participate in routing operations. Given the focus of this paper, all nodes are considered to be either the ZigBee coordinator or ZigBee Routers.