# End to End Delay and Energy Consumption in a Two Tier Cluster Hierarchical Wireless Sensor Networks
## 6 The Inter-Cluster Communication
### On the Input Process in the Inter-Cluster Communication  
In order to quantify \(F(z)\), first, notice that CONT slots and the TDMA slots in a Combi-Frame are sorted differently, depending of the CH under study. For \(r_{max}=4\), \(N_{Intra}=3\) and \(N_{Inter}=7\), column -\(\mathcal{CONT}\)-\(\mathcal{TDMA}\)- in Table 6 shows the frame structure of each CH located in the 60 degree area \(A_{0}\cup S_{0}\cup A_{1}\). However, as has been said in previous sub-section, for analysis purposes, we assume that all frames start with a transmission slot \(\mathcal{T}\); see the right column of Table 6. The corresponding shift in time between frames is taken into account later on, when considering the transfer delay from the original CH until the sink. Then, assuming independence of the arrival process between disjoint time slots, and denoting by \(A_{i}(z)\) as the PGF of the number of arrivals during the time slot \(i\), \(i=0,1,\ldots,N_{sCF}-1\); \((N_{sCF}=N_{Inter}+N_{Intra})\) we can write:  
\[F(z)=\prod_{i=0}^{N_{sCF}-1}A_{i}(z),\quad\text{with}\quad A_{i}(z)=\left\{ \begin{array}{ll}L(z)&\text{if }i\in\mathcal{C}\text{ (Contention)}\\ R_{\langle x,y\rangle}(z)&\text{if }i\in\mathcal{R}\text{ slot}\\ 1&\text{otherwise}\end{array}\right. \tag{14}\]  
From Equation (14) time slot 0 is only for transmission, mode \(\mathcal{T}\), so \(A_{0}(z)=1\). While the CH is in mode \(\mathcal{S}\) no transmission neither reception happen. During the mode \(\mathcal{T}\) data packets are served into consecutive mini-slots of a TDMA slot and are delivered to one or two CHs inner-ring neighbor. The reception of data packets occurs in two ways. The first one, represented by \(L(z)\), refers to the local traffic (mode \(\mathcal{C}\)). The second way is labeled as \(R_{\langle x,y\rangle}\) (mode \(\mathcal{R}\)), deals with traffic coming from a CH \(\langle x,y\rangle\) located in the neighboring outer ring.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**RING**} & \multirow{2}{*}{**CH**} & \multicolumn{2}{c}{**Frame Structure :**} & \multicolumn{2}{c}{**Frame Structure :**} \\  & & \(\mathcal{CONT}\)-\(\mathcal{TDMA}\)- & **With \(\mathcal{T}\) as Starting Point** \\ \hline \multirow{4}{*}{4} & \(\langle 4,4\rangle\) & \(\mathcal{SSC}\)-\(\mathcal{SSSSSSTS}\)- & \(\mathcal{TS}\)-\(\mathcal{SSC}\)-\(\mathcal{SSSSSS}\) \\  & \(\langle 4,3\rangle\) & \(\mathcal{SC}\)-\(\mathcal{SSSSTS}\)- & \(\mathcal{TSSSS}\)-\(\mathcal{SC}\)-\(\mathcal{SSSS}\) \\  & \(\langle 4,2\rangle\) & \(\mathcal{CSS}\)-\(\mathcal{STSSSSS}\)- & \(\mathcal{TSSSSSS}\)-\(\mathcal{CSS}\)-\(\mathcal{S}\) \\  & \(\langle 4,1\rangle\) & \(\mathcal{SSC}\)-\(\mathcal{SSSSSSST}\)- & \(\mathcal{T}\)-\(\mathcal{SSC}\)-\(\mathcal{SSSSSS}\) \\  & \(\langle 4,0\rangle\) & \(\mathcal{SCS}\)-\(\mathcal{SSSSTS}\)- & \(\mathcal{TSS}\)-\(\mathcal{SCS}\)-\(\mathcal{SSSS}\) \\ \hline \multirow{4}{*}{3} & \(\langle 3,3\rangle\) & \(\mathcal{CSS}\)-\(\mathcal{STRTRRS}\)- & \(\mathcal{TRRS}\)-\(\mathcal{CSS}\)-\(\mathcal{S}\) \\  & \(\langle 3,2\rangle\) & \(\mathcal{SSC}\)-\(\mathcal{TRRS}\)- & \(\mathcal{TRRS}\)-\(\mathcal{S}\)-\(\mathcal{S}\)-\(\mathcal{S}\)-\(\mathcal{S}\)-\(\mathcal{S}\)-\(\mathcal{S}\)-\(\mathcal{S}\)-\(\mathcal{R}\)-\(\mathcal{S}\)-\(\mathcal{R}\)-\(\mathcal{S}\)-\(\mathcal{R}\)-\(\mathcal{S}\)-\(\mathcal{R}\)-\(\mathcal{R}\)-\(\mathcal{R}\)-\(\mathcal{S}  
According to the routing scheme between CHs, the PGFs of the arrival processes \(F(z)\) at any CH located at ring \(r_{p}\), is related to the local traffic and to the output processes of the neighboring CHs located in ring \(r_{p+1}\). We denote by \(D_{\langle x,y\rangle}(z)\) (departure) the PDF of the output process at CH \(\langle x,y\rangle\). In the next lines we derive the analytical expression of that process and provide the relationship between \(A_{i}(z)\), \(D_{\langle x,y\rangle}(z)\) and the local traffic \(L(z)\).