Efficient Link Scheduling Based on Estimated Number of Packets in Queue on Industrial Wireless Sensor Networks

The links of low power wireless sensor networks are error prone and the transmission on a wireless link is determined probabilistically by the packet reception rate (PRR) of the link. On the other hand, there is a very strict requirement in the end-to-end reliability and delay of sensor data in industrial wireless sensor networks (IWSNs). The existing approaches to provide the end-to-end reliability in IWSNs is retransmitting the packet when failure occurs. These approaches transmit a packet multiple times in successive time slots to provide the required reliability. These approaches, however, can increase the average delay of packets and the number of packets buffered in a queue. This paper proposes a new scheme to estimate the probabilistic amount of packets, called queue level (QL), in the buffer of each node based on the PRRs of the wireless links. This paper also proposes a QL-based centralized scheduling algorithm to assign time slots efficiently in TDMA-based IWSNs. The proposed scheduling algorithm gives higher priority to the nodes with higher QL. By assigning time slots first to the node with the highest QL, we can reduce the average end-to-end delay of packets and reduce the amount of buffered packets in the queue while satisfying the required end-to-end reliability. The performance of the proposed scheduling algorithm have been evaluated through a simulation using the Cooja simulator and compared with the existing approach. In the simulation on an sample network with the target end-to-end reliability of 99%, all of the flows were shown to guarantee the target reliability in both algorithms: on average, 99.76% in the proposed algorithm and 99.85% in the existing approach. On the other hand, the proposed algorithm showed much better performance than the existing approach in terms of the average end-to-end delay of packets (about 47% less) and the number of maximally buffered packets in the queue of each node (maximally, more than 90% less).


Introduction
The wireless sensor networks (WSNs) are receiving more and more attention for deployment in the industrial environment for monitoring and control applications [1]. Compared with wired networks, the challenge of wireless networks is that wireless signals are broadcasted through the air, which are vulnerable to interference with other signals and can be affected due to multipath fading [1]. Recently, to promote the development of IWSN applications, several industrial wireless sensor network standards such as Wire-lessHART [2], ISA 100.11a [3], and IEEE 802.15.4e TSCH [4] have been proposed. To satisfy the reliable and real-time requirement of industrial applications, these networks use the time-division multiple access (TDMA) MAC protocol to avoid collisions effectively among multiple simultaneous transmissions and channel hopping techniques to reduce packet loss due to multipath fading. Those IWSN standards define the TDMA-based transmission structure called slot frame, frequency hopping method, and protocols to provide IPv6 connectivity to IWSNs. However, the scheduling algorithm to assign time-slots to the wireless links is not defined.
There have been many studies in the scheduling algorithms on IWSNs, which are classified into centralized and decentralized scheduling schemes [5]. Decentralized schemes rely on nodes with partial knowledge of their neighborhood and traffic information. Such knowledge is utilized for distributed decision making processes. Decentralized schemes can better react to the dynamics of the network due to link status changes or the nodes' mobility [6]. However, centralized schemes are more suitable for IWSNs that have strict reliability and real-time requirements and utilize a centralized architecture and network management [7,8].
In industrial environments, sensor nodes are located in a harsh condition with many obstacles, high humidity levels, vibrations, dirt and dust, or other conditions that challenge performance. These harsh environmental conditions lower the performance of the wireless links and makes reliable message delivery even more difficult. Mostly, sensor nodes have a scarce resource in terms of processing power, memory, and energy. Constrained by the limited physical size, sensor nodes have limited battery energy supply and their memories are limited and have restricted computational capabilities [7].
To transmit sensor data reliably in wireless sensor networks with error prone links, retransmission after packet loss is the most widely used method [9]. Yan M, et al. [10] proposed two scheduling methods using a hypergraph-based approach to maximize the end-to-end reliability of sensor data with a delay constraint in IWSN: dedicated and shared scheduling methods. Their algorithm consists of two phases: the schedule construction phase and schedule improvement phase. In the construction phase, one time slot is allocated to a link group that consists of links that can transmit simultaneously on the path from the source to destination. Then, in the improvement phase, the retransmission time slots are added to link groups as long as they satisfy the delay constraint. In the shared time slot scheduling method, retransmission time slots are shared among multiple packets to reduce the number of slots while satisfying the required reliability. Dobslaw F. et al. [11] proposed a method called SchdEx to extend a scheduling algorithm to guarantee the end-toend reliability, which determines the number of time slots to each link based on packet loss rates of the entire network. The SchedEx method decomposes the end-to-end reliability into node-to-node reliability to make the calculation easy. Hashimoto M. et al. [12] proposed a flow-based assignment method to reduce the required number of time-slots by prioritizing the flows sharing links and assigning shared time-slots efficiently among the flows. The above methods in [10][11][12] focused on the reliability of the sensor data transmission of flows and reducing the number of time-slots to be assigned to guarantee the required end-to-end reliability. These approaches transmit a packet multiple times in successive time slots to provide the required reliability. These approaches, however, can increase the average end-to-end delay of packets and the number of packets buffered in the queue of the node where multiple flows are multiplexed. This paper proposes a new scheme to estimate the probabilistic amount of packets, called queue level (QL), in the buffer of each node based on the packet reception rates (PRRs) of the wireless links. A node with higher QL means that it can have more packets probabilistically in the queue than the node with lower QL. This paper also proposes a QL-based centralized scheduling algorithm to assign time slots efficiently in TDMA-based IWSNs. The proposed algorithm first calculates the number of time slots that need to be assigned to each node based on the target end-to-end reliability and PRR values of the wireless links. To determine (time-slot, channel) for the time slots assigned to the nodes, the proposed scheduling algorithm uses a prioritization scheme, which gives higher priority to the node with higher QL. By assigning time slots first to the node with the highest QL, we can reduce the average end-to-end delay of packets and reduce the number of packets buffered in the queue while satisfying the required end-to-end reliability.
We evaluated the performance of the proposed scheduling algorithm through a simulation using a Cooja simulator in Contiki [13] and compared it with the flow-based prioritization approach in [12]. In the simulation on an example network in [12] with the target end-to-end reliability of 99%, each node transmitted one packet for each slot frame during 5000 slot frames following the schedules of the proposed algorithm and the flow-based approach, respectively. The simulation results showed that all of the flows guaranteed the target reliability in both of the algorithms: on average, 99.76% in the proposed algorithm and 99.85% in the existing approach. On the other hand, the proposed algorithm showed much better performance than the existing approach in terms of the average end-to-end delay and the number of buffered packets in the queue. The average end-to-end delay of packets of the flow-based approach was 184.4 ms and that of the proposed algorithm was 87.8 ms, which was more than 50 less than the flow-based approach. In the case of packet buffering, the average of maximally buffered packets of the proposed algorithm was lower than or equal to that of the flow-based approach in all nodes. In the case of the flow-based approach, the buffering requirement increases linearly, depending on the number of flows sharing a link. On the other hand, the number of buffered packets in all nodes were maintained at a fixed value (about 2 in the simulation).
The rest of this paper is organized as follows. In Section 2, we describe the network model and the notation used in the paper. In Section 3, we describe the method to estimate the probabilistic amount of packets in each node and the QL-based scheduling algorithm proposed in this paper. Section 4 describes the performance evaluation of the proposed algorithm based on the simulation using Cooja and Section 5 concludes the paper.

Network Model
In this paper, we considered a WSN consisting of a sink node (or a gateway) and sensor nodes with a half-duplex radio interface. A WSN is denoted by a directed graph G = (V, E) where V is a set of sensor nodes including the sink, and E is a set of the links between nodes in the network, respectively. Wireless links between two nodes i and j consist of two directed edges: edge from node i to j denoted by <i,j> and edge from j to i, <j,i>. Link quality estimation in WSNs is a fundamental building block in several mechanisms such as routing and topology control, but is a challenging problem due to the lossy and dynamic behavior of the wireless links. So far, a large number of link quality estimators have been proposed [13]. We used the PRR (Packet Reception Rate) estimator in this paper, which is a receiver side estimator that is simple to measure and has been widely used in WSNs. The PRR of link <i,j> is denoted by R i in this paper. In WSNs, each sensor node generates a packet periodically and needs to transmit through a path from the node to the sink. The packet transmitted by source node k is denoted by p k , and the hop count from the node k to the sink by h k . We assumed that the routing paths are given by a directed convergecast tree constructed by using routing protocols such as RPL [14] or other reliable routing protocols [7]. A single path tree is assumed in this paper, thus, each node k has a parent node P k to transmit its data toward the sink.
In industrial WSNs, there is a strict requirement in the end-to-end reliability of the sensor data transmitted by the nodes depending on the application. In order to ensure the reliability requirement, we assumed a TDMA-based MAC with channel hopping such as IEEE 802.15.4e TSCH [4] as a MAC protocol. In a TSCH network, there are multiple channels up to 16 and a slot frame with a fixed number of time slots. The number of available channels is denoted by N ch and the number of time slots in a slot frame by N s f . Thus, the scheduling problem is to decide which node transmits its packet, on which channel offset, and which time slot in a slot frame [8]. In TSCH networks, a frame transmission and an acknowledgment (ACK) of indicating successful reception of the frame is finished within a time slot. Two different types of time slots are defined in TSCH: dedicated and shared time slots. We assumed that the time slots are dedicated to guarantee the reliability of frame transmission in a time slot. As in TASA [7], we defined a set of duplex-conflict nodes of node k, DC k , as a set of nodes that cannot transmit in the same slot due to conflict. The nodes in DC k consists of the parent node P k , the children of node k, and the children of P k . If a node is not in DC k , it can transmit its frame in the same time slot with node k using different channels to each other. In the example graph in Figure 1, DC 1 is {2, 4} and DC 4 is {1, 2}, thus, node 1 and node 3 (also node 3 and 4) can transmit in the same time slot using different channels.

Proposed Scheduling Algorithm
We assumed in this paper that the convergecast tree for each node to transmit its sensor date to the sink is given and each node has a fixed number of packets to transmit in each slot frame. The proposed scheduling algorithm is a centralized algorithm and after the convergecast tree is constructed, the scheduling server receives the following information for scheduling from each node k.

•
T k : the number of packets to be transmitted by the node in each slot frame; • P k : parent node of node k; and • R k : PRR value of link <k, P k >.

End-to-End Reliability in WSNs
The most widely used method to provide the end-to-end reliability in IWSNs is retransmitting packets when packet loss happens. There have been many studies to determine the required number of time slots to satisfy a given end-to-end reliability requirement and schedule the time slots [10][11][12]. Two types of time slots are used to provide the reliability: dedicated time slot and shared time slot. In a dedicated time slot scheme, a fixed number of time slots are dedicated to transmit a packet, which needs a larger number of time slots compared with the shared time slot scheme. In the shared time slot scheme, we can reduce the number of time slots by taking the advantage of statistical multiplexing of independently transmitted packets when multiple packets share a link. We considered the shared time slot scheme in this paper.
When the target end-to-end PRR (e2ePRR) is given to a IWSN, the number of time slots that needs to be assigned to a packet transmitted by a node depends on e2ePRR, the number of links in the routing path, and the PRRs of the links in the path [10][11][12]. To determine the number of time slots for a packet transmitted by a node with k hops away from the sink, we first determine the required per-hop link PRR (PH k ) to satisfy the given e2ePRR as follows: When multiple packets are sharing a link, we took the average of the per-hop link PRRs of the packets as the required per-hop link PRR (PA k ). Let S k be a set of (p i , h i ) sharing the transmission link of node k, <k, P k >. Then, PA k of the link <k, P k > is calculated as: The number of time slots to be assigned to node k transmitting its packet through link <k, P k >, TS k , is calculated as: In the example network of Figure 1, let us assume that all nodes have one packet to transmit in each slot frame and e2ePRR = 0.99 for all packets. Then, Thus, TS 1 = 7 by Equation (3), and the number of time slots that needs to be assigned to node 1 is 7 to satisfy the target end-to-end PRR. The PA and TS value for all nodes in Figure 1 is shown in Figure 2a.

Estimating Amount of Packets in Queue
The transmission on a wireless link is determined probabilistically based on the PRR of the link. When a packet is transmitted on link <k, P k > with PRR R k , it will be transmitted to node P k with probability R k and stay in node k with probability (1−R k ). We expressed the amount of packets in the queue of a node in percentage, called QL (queue level), by considering the probabilistic transmission of the wireless link. For example, when node 3 has one packet to transmit in the queue and there is no packet in node 2, as shown in Figure 2b, QL 2 = 0 and QL 3 = 100. If node 3 transmits a packet to node 2 in a time slot, the QLs of nodes 2 and 3 change so that QL 2 = 70 and QL 3 = 30 after the time slot because the PRR of link <3,2> is 70%. We can estimate the amount of packets in the queue of a node by its QL. Higher QL means a higher number of packets in the queue.
The proposed scheduling algorithm utilizes the QL information to determine a node to transmit in a time slot. We assumed that all nodes had a fixed number of packets at the beginning of each slot frame. After the convergecast tree is constructed, the scheduling server receives [T k , P k , R k ] from each sensor node k. After that, the scheduling server calculates PA k and TS k for each node k based on Equations (1)-(3). The proposed scheduling algorithm utilizes multiple channels and assigns multiple nodes to a time slot if they are not in duplex-conflicting relationship [8]. For scheduling, the server sets the following information to each node: , which specifies the minimum QL of node k for a time slot to be assigned; and • DC k is a set of nodes that are in duplex-conflicting relationship with node k [7].
The proposed scheduling algorithm starts from the first time slot to decide the nodes to transmit among the nodes that have remaining time slots and their queue level is above their minimum level. The proposed algorithm uses a QL-based prioritization scheme to assign the current time slot to the nodes, which gives higher priority to the nodes with higher QL. The scheduling algorithm performs the following steps to determine the nodes that can transmit their packets in the current time slot.

1.
Determine a set of nodes that need to be scheduled, N, in the current time slot t (initially 0); 2.
Prioritize the nodes in N based on QL k , TS k , and tree level of node k;

3.
Choose the node with the highest priority, n, and assigns channel 0 of time slot t to node n; 4.
Delete n and the nodes in DC n from N; 5.
Choose the next highest priority node, n, in N and assigns the next available channel to node n; 6.
Repeat steps 4 and 5 until N becomes empty or there is no available channel; and 7.
Adjust the QLs of nodes that are transmitting or receiving in time slot t considering the PRR values of the links and go to 1 for the next time slot (t + 1).
Algorithm 1 shows the details of the proposed scheduling algorithm. After initializing the QL and MQL values of each node, we obtain a set of nodes, N, to which time slots can be assigned in step 3. All the nodes in N have to satisfy that TS k ≥ 1 and QL k ≥ MQL k for each node k in N. In the main loop of (4)~(18), the nodes in N are prioritized in the PRIORITIZE(N) function. We prioritized the nodes based on the order of the highest QL, the highest TS, and the highest tree level. In the loop of (7)~(14), we selected the nodes that can transmit in the current time slot ts at the same time and assign to the available channels. At first, we assigned (ts,0) (channel 0 of time slot ts) to N(0), which is the highest priority node in N. After that, we deleted N(0) and the nodes that are duplex-conflicting with N(0) from N. Then, we assigned the next available channel of the current time slot to node N(0), and deleted N(0) and the nodes that are duplex-conflicting with the selected node again. We repeated this step while the channels were available and N was not empty. After selecting all the nodes that can transmit in ts at the same time, we updated the TS and QL values of the nodes in M (the selected links in ts) in the ADJUST_TS_QL(M) function. We increased the time slot ts and set the channel number ch to 0, and updated N to a set of nodes to which channels can be assigned in the next time slot (ts + 1). We repeated the main loop of steps (4)~(18) while N was not empty. After the main loop, we checked the QL of each node and assigned additional time slots to the nodes if their QLs were greater than or equal to MQL in the ASSIGN_ADDITIONAL_TS() function.
After the inner loop (step (7)~step (14)) is finished, M contains the links to which channels are assigned to transmit in the current time slot ts at the same time. The AD-JUST_TS_QL(M) function updates the TS and QL values of the sender and receiver nodes of the links in M to determine the channel assignment in the next time slot. The remaining number of time slots (TS values) are decreased by 1. The QL values are updated based on the number of packets to transmit in time slot ts and the PRR value of the link. The number of packets (tx_amount) to transmit is 100 (one packet) if QL k is greater than 100, otherwise, tx_amount is QL k . Thus, for each link <k, P k > in M, we updated the QLs of node k and node P k based on the PRR value, R k of the link in steps (7) and (8)  To illustrate the operation of the proposed scheduling algorithm with an example, we performed the algorithm in a 2-channel network based on the example network in Figure 1. We assumed all nodes had one packet to transmit in each slot frame. Based on the PA value of each node in Figure 2, the MQL (minimum QL) of each node was set as MQL k = 100 × (1 − PA k ) for node k. We assigned time slots only to the nodes that satisfied QL k ≥ MQL k and TS k ≥ 1. Figure 3 shows the TS, QL, and MQL values of the nodes at each time slot and the (time-slot, channel) assignment result. In each step, the red color denotes the node with the highest priority and the blue color the non-duplex conflicting node. The highest node is assigned to channel 0 and the non-duplex conflicting node to channel 1 in the current time slot. During the assignment step, the QL of a node can become less than its MQL even though its TS is greater than 0. In this case, the remaining time slots are not assigned, which can reduce the number of assigned time slots, but can affect the end-to-end delivery ratio slightly. In Figure 3, node 3 at time slot 8 and node 2 at time slot 15 showed these cases. At time slot 16, there was no node that satisfied QL k ≥ MQL k and TS k ≥ 1, thus, the main loop of the scheduling algorithm was completed. After the main loop was completed at time slot 16, the ASSIGN_ADDITIONAL_TS() function checks the QL of each node and assigns one additional time slot to node 1 because QL 1 > MQL 1 .

Performance Evaluation
We evaluated the performance of the proposed scheduling algorithm and compared it with the approach in [12] using the Cooja simulator on the Contiki platform [15]. The existing approaches in [10][11][12] for guaranteeing the end-to-end reliability used two types of time slots: dedicated and shared time slots. The shared time slot scheme can reduce the number of time slots by utilizing the advantage of statistical multiplexing of independently transmitted packets. We also used the shared time slot approach in this paper. After determining the number of time slots for each node, the scheduling algorithm decides the time-slot number and channel number for each time slot assigned to the nodes. The scheduling of the existing approaches are similar, so we only compared it with the approach in [12] (we call this a flow-based approach).
For fair comparison, we used the same example in [12], which is shown in Figure 4a. The scheduling result of the flow-based approach for the example on a 3-channel network is shown in Figure 4b. We assumed that all sensor nodes had one packet to transmit at the beginning of each slot frame and the target end-to-end reliability of packets was 99%. Figure 4c shows the MQL and TS values for scheduling in the proposed scheduling algorithm and the scheduling result of the proposed algorithm is shown in Figure 4d. The number of assigned time slots of the proposed algorithm is 23, which is one time slot less than that of the flow-based approach. 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-toend 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 endto-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 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.

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. The proposed scheduling algorithm assigns time slots based on the priority, which gives the highest priority to the node with the highest QL. By assigning time slots based on the QL-based priority scheme, we can transmit packets to the sink node fast and reduce the number of packets buffered in each node while satisfying the end-to-end reliability requirement of IWSNs. Based on the simulation using Cooja, we have shown that the proposed algorithm guarantees the target end-to-end reliability required in IWSNs. The simulation results also showed that the proposed algorithm provides a much lower end-to-end delay of packets and lower queue level (number of buffered packets in the queue) compared with the flow-based approach [12].