## 7 Superframe Duration Allocation Schemes
### Illustrative Example  
In this subsection, we present an example that illustrates the use of the Load-SDA allocation scheme. We consider a small example of a cluster-tree network composed of 6 cluster-heads, where each cluster is composed of 2 leaf nodes (Figure 11), and have a known traffic load. For the sake of simplicity, all values represented in this subsection are multiples of \(SD_{min}\). We also assume that each leaf node handles one message stream; nodes with odd indexes handle message streams with periods equal to \(60\times SD_{min}\) and nodes with even indexes generate message streams with periods equal to \(70\times SD_{min}\). In this example, cluster-heads do not handle any message stream. Based on the analysis presented in Section 5, we assume parameter \(X\) to be 2 messages per \(SD_{min}\) (Equations (13) and (27)). For this example, we consider a bottom-up scheduling. Then, the Beacon Interval (BI) is set according to Equation (8). Considering that \(Pi_{min}\) is \(60\times SD_{min}\), BI is defined to be \(32\times SD_{min}\) (BO = 5). Thus, for cluster-head \(CH_{6}\), the load imposed by its message streams (Equation (28)) is:  
\[Y=\sum_{i\in\mathcal{S}_{blue}}\frac{1}{\left\lfloor\frac{P}{BI}\right\rfloor} =\frac{1}{\left\lfloor\frac{60}{32}\right\rfloor}+\frac{1}{\left\lfloor\frac {70}{32}\right\rfloor}=1+\frac{1}{2}=\frac{3}{2} \tag{36}\]  
Figure 11: Cluster-tree network composed of 6 cluster-heads and 12 leaf nodes. Therefore, for \(CH_{6}\), the superframe order \(SO_{6}\) is:  
\[SO_{6}=\left\lceil\log_{2}\left(\left\lceil\frac{Y}{X}\right\rceil\right)\right\rceil =\left\lceil\log_{2}\left(\left\lceil\frac{3}{4}\right\rceil\right)\right\rceil=0 \tag{37}\]  
The superframe duration for \(CH_{6}\) is \(SD_{6}=\alpha\times 2^{0}\), that corresponds to \(SD_{min}\). In fact, as cluster-head 6 has only two leaf nodes and \(SD_{min}\) supports two messages, such a SD provides a reasonable bandwidth for this traffic. Following the same reasoning, superframe durations of cluster-heads 4 and 5 are also defined as \(SD_{min}\). For cluster-head \(CH_{3}\), message load includes the load imposed by its child nodes (Equation (36)) and also by the child cluster-head \(CH_{6}\) (accumulated load). The accumulated load is:  
\[Y=\sum_{i\in\mathbb{S}_{blox}}\frac{1}{\left\lceil\frac{P_{i}}{BI}\right\rceil} =2\times\frac{1}{\left\lfloor\frac{60}{32}\right\rfloor}+2\times\frac{1}{ \left\lceil\frac{70}{32}\right\rceil}=2+1=3 \tag{38}\]  
Thus, for \(CH_{3}\), the superframe order \(SO_{3}\) is:  
\[SO_{3}=\left\lceil\log_{2}\left(\left\lceil\frac{Y}{X}\right\rceil\right) \right\rceil=\left\lceil\log_{2}\left(\left\lceil\frac{3}{2}\right\rceil \right)\right\rceil=1 \tag{39}\]  
The superframe duration for \(CH_{3}\) is \(SD_{3}=\alpha\times 2^{1}\), which corresponds to \(2\times SD_{min}\). Table 1 shows the superframe duration for all clusters. After defining the superframe duration for all cluster-heads, the protocol and timing constraints need to be verified. Based on Equation (10), the protocol constraint is respected, as follows:  
\[\sum_{j=1}^{N}SD_{j} \leq BI\leq P_{min}-\delta_{i} \tag{40}\] \[17\times SD_{min}\leq 32\times SD_{min} \leq 60\times SD_{min}-\frac{1}{2}\times SD_{min}\] (41) \[17 \leq 32\leq 60-\frac{1}{2} \tag{42}\]  
Regarding the timing constraint, as an example, we present the probabilistic response time analysis for message stream \(S_{10}\) (depth 3). For this work, we assume that message streams with the same period of \(S_{10}\) are considered for the set of the higher priority message streams. Thus, for depth 3 (\(CH_{5}\)), the set of higher priority message streams is composed only of message stream \(S_{9}\). Thus, we have:  
\[\Theta^{1}_{10}(CH_{5}) =\frac{1}{2}+\left\lfloor\frac{1}{1}\right\rfloor\times 31+ \frac{1}{2}=1 \tag{43}\] \[\Theta^{2}_{10}(CH_{5}) =\frac{1}{2}+\left\lfloor\frac{\left\lceil\frac{70}{32}\right\rceil \times\frac{1}{2}}{1}\right\rfloor\times 31+\left\lceil\frac{10}{60}\right\rceil \times\frac{1}{2}=1 \tag{44}\]