## 3 Proposed Method  
This paper proposes a DC control method to achieve high PDR for IEEE 802.15.4-compliant heterogeneous star and/or tree topology WSNs. Figure 3 shows the example of a tree topology heterogeneous WSNs. In homogeneous WSN, communication qualities, such as PDR and energy consumption, can be improved by setting the same DC for all sensor nodes. On the other hand, in heterogeneous WSNs where data rates of sensor nodes are different, even if the same DC control is applied to all sensor nodes, the high communication quality may not be achieved because of the different characteristics of  
Figure 2: Flow chart of IEEE 802.15.4 packet transmission.  
the network nodes. In order to solve this problem, the proposed method allocates an appropriate DC for each sub-network (sub-network means a network consisting of a router node and its subordinate nodes). DC is controlled in consideration of the buffer occupancy of nodes.  
This paper assumes that each router node does not generate its own packet. In this section, we also assume that there are no transmission failures. Each router node generates a packet when relaying packets from the end devices. We assume that the number of generating packets of router node \(i\) in one superframe duration \(\lambda_{i}\) is given by  
\[\lambda_{i}=\frac{DataRate_{i}}{8\times P}\times B1, \tag{4}\]  
where \(DataRate_{i}\) is the total data rate of end devices which belong to router node \(i\), and \(P\) is a packet payload size (byte).  
Assuming that there are no transmission failures, the data rate of router node \(i\) is given by  
\[DataRate_{i}=\sum_{j=1}^{N_{i}}DataRate_{j}, \tag{5}\]  
where \(N_{i}\) is the number of end devices which belong to router node \(i\). Assuming that router node \(i\) transmits \(n_{i}\) packets during \(aBaseSuperframeDuration\), the total number of transmitted packets during one active period, which indicates the service rate of node \(i\), \(\mu_{i}\), is  
\[\mu_{i}=n_{i}\times 2^{SO}. \tag{6}\]  
Assuming no contention, \(n_{i}\) is given by  
\[n_{i}=\frac{aBaseSuperframeDuration-Beaconframe}{maxDelay}, \tag{7}\]  
where \(maxDelay\) is given by Equation (8), and expressed as  
\[\begin{split} maxDelay=macCSMABackoff*(T_{Backoff}+T_{CCA})\\ +T_{PbitTx}+T_{ACK}+T_{SIFS}+T_{TA},\end{split} \tag{8}\]  
where \(macCSMABackoff\) is the maximum number of carrier sensing trials, \(T_{Backoff}\) and \(T_{CCA}\) are time to backoff and carrier sense, respectively. \(T_{PbitTx}\) expresses the time to transmit a packet. When the data transfer speed is 250 (Kbps),  
\[T_{PbitTX}=\frac{PacketSize(\text{byte})}{250(\text{Kbps})}. \tag{9}\]  
Figure 3: Example of a tree topology heterogeneous Wireless Sensor Networks (WSNs).  
In Equation (8), \(T_{ACK}\) is the time to transmit an ACK frame, \(T_{SIFS}\) is short inter frame space, and \(T_{TA}\) is the waiting time for the next transmission.  
From Equations (4) and (6), the buffer occupancy of router node \(i\)\(\rho_{i}\) is expressed as the ratio of the number of generating packets of router node \(i\) in one superframe duration, \(\lambda_{i}\), to the service rate of node \(i\), \(\mu_{i}\). \(\rho_{i}\) is given by  
\[\begin{split}\rho_{i}&=\frac{\lambda_{i}}{\mu_{i}} \\ &=\frac{\frac{DataRate_{i}}{8\times P}\times aBaseSuperframe Duration\times 2^{BO}}{n_{i}\times 2^{\text{SO}}}. \end{split} \tag{10}\]  
For avoiding buffer overflow, DC should be controlled so that \(\rho_{i}\) is less than 1, as shown in Figure 4. From Equations (4)-(10), DC should satisfy:  
\[DC>\frac{DataRate_{i}}{8\times P}\times\frac{aBaseSuperframe Duration}{n_{i}}. \tag{11}\]