# An Efficient SS-MAC Protocol for IEEE 802.15.4-Based WSNs of Cluster Tree Topology
## 4 Modeling Analysis
### \(W_{s}\) and \(\alpha\)  
It is assumed that non-cluster-head nodes and CHs are approximately uniformly distributed in coverage area, and the number of member nodes in each cluster is basically the same (less than or equal to \(N_{m}\)). Meanwhile, the routing algorithm can guarantee that each parent in the tree-structured topology has the same number of child nodes (less than or equal to \(N_{t}\)). The packet arrival process of member node \(i\) follows the Poisson process with parameter \(\lambda_{i}\); its value is determined by the data sensing rate \(R_{i}\), that is, \(\lambda_{i}=R_{i}/D_{load}^{SN}\). The amount of data collected by a CH from its member nodes in each session is (bit):  
\[Q_{ch}=W_{s}\cdot P_{load}^{SN}\sum_{i=1}^{N_{m}}\lambda_{i}=W_{s}\cdot P_{ load}^{SN}\cdot N_{m}\cdot\lambda\]  
The number of packets sent by a CH at the highest level to its parent in each session is:  
\[N_{p}=Int[\gamma Q_{ch}/P_{load}^{CH}]^{+}\]  
where \(\gamma\) is the data fusion degree of CHs, which is the ratio of the amount of data after to before fusion \((\gamma<1)\). The time taken by the parent at the second-highest level to receive these packets is:  
\[T_{ch}=N_{t}N_{p}(\frac{P_{load}^{CH}+P_{load}^{CH}+P_{ack}}{R_{c}}+E[D])\]  
where \(E[D]\) is the average packet delay caused by performing the backoff and CCA operations of CSMA/CA. It can be calculated using Formulas (22) and (23) of [24] as follows:  
\[Pr(A_{j}|A_{i})=\frac{P_{c}^{j}(1-x^{m+1})^{j}}{\sum_{k=0}^{n}(P_{c}(1-x^{m+1} ))^{k}}=\frac{(1-P_{c}(1-x^{m+1}))P_{c}^{j}(1-x^{m+1})^{j}}{1-(P_{c}(1-x^{m+1}) )^{n+1}}\]  
\[E[D]=\sum_{j=0}^{n}Pr(A_{j}|A_{t})(T_{s}+jT_{c}+\sum_{h=0}^{j}E[T_{h}])\]  
where \(p_{c}\) is the collision probability of packet sending, \((1-x^{m+1})\) is the probability of a node successfully accessing the channel within number of \(m\) backoff stages. \(T_{s}\), \(T_{c}\) and \(T_{h}\) are the time taken for successful packet transmission, collided packet transmission and backoff stage, respectively. To simplify the calculation, \(E[D]\) can also be set as a constant empirically or even ignored. Since the tree nodes at the highest level enter a sharable slot immediately after the beginning of the session, the data collected from member nodes are sent to their respective parents at the second-highest level, that is, \(SS(L)=SS^{TX}(L)=SS^{RX}(L-1)=T_{ch}\). The amount of data received from \(N_{t}\) child nodes by each tree node at the second-highest level is \(N_{t}N_{p}P_{load}^{CH}\). In addition, each tree node at the second-highest level will receive data packets from member nodes with a data volume of \(Q_{ch}\). By fusion of the two parts of the data, the total data volume to be sent by a tree node at the second-highest level can be obtained as:  
\[Q_{L-1}=\gamma(N_{t}N_{p}P_{load}^{CH}+Q_{ch})=\gamma Q_{ch}(\gamma N_{t}+1) \tag{2}\]  
For each tree node at level \(L-2\), the time it takes to receive data from these child nodes is:  
\[SS^{RX}(L-2)=SS^{TX}(L-1)=\frac{N_{t}Q_{L-1}}{P_{load}^{CH}}\cdot\big{(}\frac {P_{load}^{CH}+P_{load}^{CH}+P_{ack}}{R_{c}}+E[D]\big{)} \tag{3}\]  
Using expressions (1), (2) and (3), the parameter \(\alpha\) can be expressed as:  
\[\alpha=\frac{SS^{TX}(L)}{SS^{TX}(L-1)}=\frac{N_{p}P_{load}^{CH}}{Q_{L-1}}= \frac{1}{\gamma N_{t}+1} \tag{4}\]Expression (4) shows that \(\alpha\) is determined by the data fusion degree \(\gamma\) and the size of the tree topology \(N_{t}\); it affects the duration of session, \(W_{s}\), which, in turn, affects the average packet delay. When \(\gamma\) is fixed, the increase in \(N_{t}\) results in decrease in \(\alpha\) and increase in the session duration. Therefore, the size of the tree topology should be limited to a reasonable range. From Figure 6, \(W_{s}\) can be obtained as:  
\[W_{s}=\sum_{i=2}^{L}SS^{TX}(i)=SS^{TX}(L)\sum_{i=0}^{L-2}\alpha^{-i}=\frac{T_{ ch(\alpha^{L-1}-1)}}{\alpha^{L-1}-\alpha^{L-2}} \tag{5}\]  
Expression (5) shows that \(W_{s}\) is determined by \(\alpha\) and \(T_{ch}\).