## 3 Proposed Scheduling Algorithm
### Estimating Amount of Packets in Queue
Based on the scheduling results in Figure 4, we ran the simulation using the Cooja simulator and analyzed the performance of the proposed algorithm in terms of the end-to-end reliability, the average end-to-end delay of packets, and the number of packets queued in each node. The slot frame length was 50 and each time slot was 10 ms. We set the target end-to-end reliability to 99%. During the simulation, each sensor node transmitted its data 5000 times, one for each slot frame using the time-slot and channel assigned to the node. The flow-based approach uses prioritized transmission. Thus, if there are multiple packets in the queue at its assigned time slot, it transmits the highest priority packet based on the defined priority of flows, as shown in Figure 4b [12]. In the case of the proposed algorithm, each node transmits packets in the queue in FIFO order. Figure 5 shows the end-to-end reliability of each node in the proposed algorithm and the flow-based approach. In both of the algorithms, every node satisfies the target end-to-end reliability of 99%. The average end-to-end reliability of the nodes in the proposed algorithm was 99.76%, which was a little less than that of the flow-based approach (99.85%). Figure 6 shows the average end-to-end delay of packets transmitted by each node in both of the approaches. We assumed that all packets to be transmitted in each slot frame were ready at the beginning of the slot frame. We measured the end-to-end delay of a packet as the time between the slot frame starting time and the packet reception time at the sink node. As shown in Figure 6, the average end-to-end delay of packets of the proposed algorithm was lower than that of the flow-based approach in all nodes, except node 6. In the flow-based approach, node 6 had the shortest end-to-end delay because it had the highest priority. After the packets of all flows were buffered in node 1, the packet of node 6 was transmitted from the first time slot assigned to node 1 (time-slot 14). The average end-to-end delay of packets transmitted by all nodes in the flow-based approach was 184.4 ms, and that of the proposed algorithm was 98.1 ms, which was about 47% less than

Figure 4: Scheduling results of the proposed algorithm and flow-based algorithm on the example network with 3-channels. the flow-based approach. In the case of node 1, the average end-to-end delay of packets of the proposed algorithm was 13.36 ms, which was only about 7% of that of the flow-based approach (206.58 ms). Figure 7 shows the average of maximally buffered packets in the queue of each node in both of the approaches. As we can see in the figure, in the case of the flow-based approach, as the number of multiplexed packets increased, the number of buffered packets also increased. The average values of maximally buffered packets in nodes 1, 2, and 3 were 6.994, 1.998, and 2.998 in the flow-based approach. In the case of the proposed algorithm, the average of the maximally buffered packets in nodes 1, 2, and 3 were 2, 1.992, and 2.027, respectively. From this simulation, we can see that the proposed algorithm keeps the queue level (the number of buffered packets) of the nodes to about a fixed value, which was 2 in this example. Figure 5: End-to-end reliability of the proposed algorithm and the flow-based approach. Figure 6: Average end-to-end delay of packets in the proposed algorithm and the flow-based approach. ## 5 Conclusions

In this paper, we proposed a novel method to estimate the number of packets, called the queue level (QL), in the queue of the nodes in TDMA-based IWSNs. We can estimate the QL of each node based on the probabilistic transmission of wireless links. We also proposed a centralized scheduling algorithm on IWSNs by utilizing the QL information of the nodes. After determining the number of time slots for each node to satisfy the target end-to-end reliability, the proposed scheduling algorithm decides the time-slot and channel to each of the assigned time slot.