# A New Intra-Cluster Scheduling Scheme for Real-Time Flows in Wireless Sensor Networks
## 2 Proposed Scheme
### Procedure of the Proposed Scheme
In the same way in slot #7, the flow _F2_ transmission _H2_\(\rightarrow\)_H1_ is interference with transmission _H3_\(\rightarrow\)_H5_ of _F1_ and hence delayed. Flow _F2_ transmission _H2_\(\rightarrow\)_H1_ is scheduled in the time slot #10 while transmission _H1_\(\rightarrow\)_H3_ is scheduled in the time slot #11. For flow _F3_, the IntraSend transmission arrives at the source cluster-head in time slot #1. Hence, the transmission _H2_\(\rightarrow\)_H4_ and _H4_\(\rightarrow\)_H5_ are scheduled by the global cluster-head in the InterComm time-slots #2 and \(3\) respectively. For flow _F4_, the transmission _H2_\(\rightarrow\)_H4_ will be scheduled by the global head in the InterComm time-slot #6, due to no interference with high priority flow. Hence, the transmission _H4_\(\rightarrow\)_H3_ of _F4_ has interference with transmission _H3_\(\rightarrow\)_H5_ of high priority flow _F1_ in the InterComm time slot #7, therefore, the transmission _H4_\(\rightarrow\)_H3_ will be delayed by one time-slot. Transmission _H4_\(\rightarrow\)_H3_ of _F4_ will scheduled in the InterComm time slot #10 due to no interference with transmission _H2_\(\rightarrow\)_H1_ of high priority flow _F2_. For the flow _F5_, InterComm scheduling the transmission _H1_\(\rightarrow\)_H2_ is conflict with both transmission _H1_\(\rightarrow\)_H3_ of _F1_ and _H2_\(\rightarrow\)_H4_ of _F4_, therefore, transmission _H1_\(\rightarrow\)_H2_ will be scheduled in the InterComm time slot #7 as it has no interference with transmission _H3_\(\rightarrow\)_H5_ of higher Flow 1. Similarly, transmission _H2_\(\rightarrow\)_H4_ of _F5_ cannot be schedule in the InterComm time slot #10 due to interference with high priority flows transmission _H2_\(\rightarrow\)_H1_ of flow _F2_ and transmission _H4_\(\rightarrow\)_H3_ of _F4_. Finally, the transmission _H2_\(\rightarrow\)_H4_ of _F2_ will be scheduled in the InterComm time slot #11, due to non-conflict with high flow. Finally, consider the IntraRecv scheduling of clusters as shown in Table 6. As shown in Figure 2 cluster _H3_, _H4_ and _H5_ have only incoming flows, so in these, IntraRecv scheduling does not differentiate IntraSend and IntraRecv time slots and can schedule IntraRecv flows both in IntraSend and IntraRecv time slots. For example, as shown in the Table 6, cluster _H5_ schedule _F1_ transmission _H5_\(\rightarrow\)_m_ in the IntraRecv time slots while transmission _m_\(\rightarrow\)_q_ in the IntraSend time slots, as there is only \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & \multicolumn{6}{c}{**IntraSend Scheduling**} \\ \hline
**Cluster** & **Flow\#** & \(\mathbf{r_{i}}\) & **1** & **4** & **5** & \(\mathbf{a_{i}^{SH}}\) \\ \hline \multirow{2}{*}{H1} & F1 & 0 & a\(\rightarrow\)b & b\(\rightarrow\)H1 & & 4 \\ \cline{2-6}  & F5 & 0 & & j\(\rightarrow\)c & c\(\rightarrow\)H1 & 5 \\ \hline \multirow{4}{*}{H2} & F2 & 0 & i\(\rightarrow\)h & h\(\rightarrow\)H2 & & 4 \\ \cline{2-6}  & F3 & 0 & p\(\rightarrow\)H2 & & & 1 \\ \cline{1-1} \cline{2-6}  & F4 & 0 & e\(\rightarrow\)g & & g\(\rightarrow\)H2 & 5 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Results of proposed scheme IntraSend scheduling of Figure 2. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & \multicolumn{6}{c}{**InterComm Scheduling**} \\ \hline
**Flow\#** & \(\mathbf{a_{i}^{SH}}\) & **2** & **3** & **6** & **7** & **10** & **11** & \(\mathbf{a_{i}^{DH}}\) \\ \hline F1 & 4 & & & H1\(\rightarrow\)H3 & H3\(\rightarrow\)H5 & & & 7 \\ \hline F2 & 4 & & & & H2\(\rightarrow\)H1 & H1\(\rightarrow\)H3 & 11 \\ \hline F3 & 1 & H2\(\rightarrow\)H4 & H4\(\rightarrow\)H5 & & & & 3 \\ \hline F4 & 5 & & & H2\(\rightarrow\)H4 & H4\(\rightarrow\)H3 & & 10 \\ \hline F5 & 4 & & & & H1\(\rightarrow\)H2 & & H2\(\rightarrow\)H4 & 11 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Results of proposed scheme InterComm scheduling of Figure 2.  
incoming flows in cluster \(H5\).