Enhanced Minimal Scheduling Function for IEEE802.15.4e TSCH Networks

MAC layer protocol design in a WSN is crucial due to the limitations on processing capacities and power of wireless sensors. The latest version of the IEEE 802.15.4, referenced to as IEEE 802.15.4e, was released by IEEE and outlines the mechanism of the Time Slotted Channel Hopping (TSCH). Hence, 6TiSCH working group has released a distributed algorithm for neighbour nodes to agree on a communication pattern driven by a minimal scheduling function. A slotframe contains a specific number of time slots, which are scheduled based on the application requirements and the routing topology. Sensors nodes use the schedule to determine when to transmit or to receive data. However, IEEE 802.15.4e TSCH does not address the specifics on planning time slot scheduling. In this paper, we propose a distributed Enhanced Minimal Scheduling Function (EMSF) based on the minimal scheduling function, which is compliant with 802.15.4e TSCH. In this vein, we introduce a distributed algorithm based on a Poisson process to predict the following schedule requirements. Consequently, the negotiation operations between pairs of nodes to agree about the schedule will be reduced. As a result, EMSF decreases the exchanged overhead, the end-to-end latency and the packet queue length significantly. Preliminary simulation results have confirmed that EMSF outperforms the 802.15.4e TSCH MSF scheduling algorithm.


I. INTRODUCTION
The next industrial revolution is announced to be Industry 4.0, which will reduce cost and maximize flexibility with the use of digital automation [1]. The Industrial Internet of Things (IIoT) plans to connect to the Internet a large number of industrial objects. In this regard, it is mandatory for real-time infrastructure to be highly reliable for wireless transmissions. So far, the efforts undertaken in IoT were for best-effort solutions, but industrial applications demand a higher level of control in terms of reliability and delay [2]. For that reason, specific MAC protocols are needed to add strict guarantees. Deterministic approaches, especially, can be used to allocate a fixed bandwidth to every device or flow. In addition, these approaches can isolate flows, where each type of flow gets a specific transmission bandwidth. In IEEE 802. 15.4e TSCH mode, channel hopping mechanism is used to reduce external interference and fading. TSCH deploys a deterministic approach to avoid collisions by careful scheduling, which involves allocating a group of cells for interfering transmitters to avoid collisions while reducing contention. A number of centralized and distributed scheduling algorithms have been introduced as of date for TSCH [3]. Over-provisioning is a method used to cope with unreliable links in the schedule by reserving a few cells to allow a packet to be retransmitted. However, extra cells leads to an increase in delays and jitter [4]. Network capacity is also reduced if there is too much traffic and/or lack of reliability due to external interference. In order to handle the issues concerning scheduling, routing and internet integration, the IETF IPv6 through the TSCH mode of IEEE802.15.4e was established for an improved integration of the IPv6-enabled protocols such as RPL, 6LoWPAN and CoAP [5]. In this paper, we propose an Enhanced Minimal Scheduling Function (EMSF) in order to improve reliability and latency when pairs of nodes are dynamically determining their bandwidth requirements. The proposed algorithm is based on the minimal scheduling function (MSF) schemed for the 6TiSCH networks. Our proposal is designed to meet the following goals: 1) A dynamic scheduling: The proposed scheme allocates and deallocates cells without considering the thresholdbased mechanism. 2) A reduction of the transmitted data during the scheduling negotiation phase: The EMSF is designed to meet this target by introducing a prediction system model which anticipates the data to be transmitted for each pair of nodes in the next slotframe. 3) A reduced latency: This design is introduced by minimizing the overhead control packets in order to diminish the end-to-end data transmission delay and the queued data.
The remainder of this paper is organized as follows. In section II, we provide an outlook to the 6TiSCH WG over the 802.15.4e TSCH mode. We discuss some background information and related work in section III. The design of the system is described in section IV and V. We illustrate, in section VI, the results of simulations that show the performance of our approach, and we conclude the paper in section VII.  15.4e TSCH network communicate using a time-slotted mechanism over multiple frequencies, which follows a Time Division Multiple Access (TDMA) schedule. It partitions the wireless spectrum into time and frequency, which is scheduled over a set period of time. This scheduling is also called a superframe or a slotframe. A node transmits/receives data to/from its neighbours on a predefined timeslot and channel in the schedule. A cell, which is usually 10ms in length, is a basic unit of bandwidth scheduled. The transmitter in a cell sends a data packet to the receiver. Once successfully received, an acknowledgement is sent back by the receiver. Channel-hopping improves communication by making it more reliable through diversification of frequencies. This statistical mitigation reduces narrow-band interference and multi-path fading. Cells can contain multiple communication links as long as they are not conflict links nor links interfering amongst each other. Conflict links are those that have the same receiver and/or transmitter. The communication links bounce over a series of available channels in a quasirandom way between the super-frames. Both the sender and the receiver for each scheduled cell will use Eq.(1) to calculate communication frequency, i.e., f [6]: where F is the mapping function for channel frequency, ch offset is the channel offset, ASN is the total number of timeslots, and finally mod N ch is the modular division of N ch , which refers to the number of available physical channels. ASN is calculated as follows: where K is the slotframe cycle, S is the size of the slotframe, and T are the allocated timeslots.

B. Scheduling in 6TiSCH networks
Recently, 6TiSCH Wireless Group was working to define a pre-configured or learned minimal schedule of a node that joins a network with static scheduling configuration [7]. Various kinds of frame are transmitted and received through cells within a schedule determined by slotted ALOHA protocol. Note that static scheduling within 6TiSCH is used only for specific situations like during the bootstrapping stage or as a fallback during network failures. For other situations, a scheduling function is used in order to allocate or deallocate cells between neighboring nodes. 6TiSCH uses MSF as a default scheduling function presented in the IETF draft [8]. The allocation policy and the bandwidth estimation algorithm are used by MSF to determine when cells in neighbouring nodes should be added or deleted [9]. In addition, MSF uses a threshold-based mechanism to mitigate against sudden fluctuations and increases in bandwidth by adding or deleting operations. Both add and delete negotiations are similar, however. Despite that, given two nodes A and B in a network, node B contains all slotOffsets of node A candidate cells of the remove CellList requests. Since candidate cells are randomly selected, there is a high likelihood of negotiation errors at node A. This is due to the fact that node B contains fewer cells in CellList with available slotOffsets than NumCells. In addition, other pairs of nodes may use allocated cells that are also used by nodes A and B. This may cause network collisions, which are mitigated by the scheduling function. The minimal scheduling function uses 6top Housekeeping function to track cell usage and performance and to relocate cells that have collided [10].

III. RELATED WORKS
Constructing a schedule is application specific and several scheduling algorithms have been introduced to schedule TSCH networks. Different proposals could be used to set up the schedule. They can be classified as centralized and distributed. In centralized approaches, the DAG root builds and maintains the schedule for the entire network. Palattella et al. proposed Traffic Aware Scheduling Algorithm (TASA), a centralized scheduling technique that uses a leading-edge matching and colouring method of graph theory to map the distribution of time slots and channel offsets [11]. The motes in the network send the requirements of bandwidth and energy, TASA computes a schedule that satisfies those requests and returns them back to the motes. In distributed approaches, the nodes negotiate with their neighbors to build their own schedule. Accentura et al. proposed Decentralized Traffic Aware Scheduling (DeTAS), which builds optimal collisionfree multi-hop schedules [12]. DeTAS employs neighbourto-neighbour signaling in order to gather network and traffic information. It ensures the smallest queue utilization and the shortest possible end-to-end latency period between when the data was generated to when it was received. Orchestra is another non-graph scheduling technique in which nodes compute their own local schedules, hence the reason its referred to as autonomous scheduling of the TSCH in IPv6 Routing Protocol for Low-Power and Lossy Networks (RPL) [13]. It has no central entity nor negotiation and allocates slots such that it can be installed or deleted automatically with the evolution of the RPL topology. Despite that, it does not offer any solution against bursty traffic. Domingo-Prieto et al. introduced a distributed scheduling algorithm as a solution against sudden or bursty traffic, which uses a control paradigm called Proportional Integral and Derivative (PID) [14]. Techniques based on graph theory have been introduced to other networks including peer-to-peer networks and cognitive radio networks. It is worth mentioning that the work of Domingo-Prieto et al. is the first one to use graph-theory based combinatorial properties to address scheduling in IEEE 802.15.4e TSCH networks. Soua et al. proposed the Wave scheduling algorithm [15]. It aims to reduce the slotframe size by dividing it with a unit called wave and achieving waves many times to build a schedule for all the nodes at proper intervals of time to the DAG root. Every node with a transmittable packet is allocated both a timeslot and a channel for every wave. The slot or channel pattern is determined by the first wave. The following waves are modeled after the first wave, however only the transmission-containing slots and the order in which they repeat themselves are copied from the first wave. Determining a schedule is application-specific and it's based on the metrics that need to be improved. The proposed 6TiSCH WG minimal scheduling function [7] defines how nodes add or remove cells based on a bandwidth estimation algorithm. This method is based on exchanging control packets to measure the required bandwidth. Hence, more resources are appealed to determine the appropriate measurements which leads to an increased probability of dropped packets and a high latency. Note that, unlike the existing scheduling approaches, our method will guarantee a minimum negotiation overhead which will reduce the latency, the packet queue size and the resource utilization. Our proposed model is based on three indispensable steps: 1) Computation of the average generated packets in the previous slotframes 2) Prediction of the amount of data (event/periodic).
3) 6p add/remove transaction according to the predicted model.

IV. PROPOSED SYSTEM
In this section, we will introduce some definitions and assumptions of the system model. When a 802.15.4e TSCH node detects a substantial unpredictable physical event, a massive flow of data packets is generated and queued by the node. These nodes check if they have sufficient bandwidth to send these packets to their parents. A limited number of transmissions and re-transmissions are allowed by each node, which, when exceeded, cause packet dropping. This appliance triggers a tremendous number of packet transactions and a spike in resources usage. To reduce negotiation errors, number of dropped packets and end-to-end latency times, we propose a novel scheduling function based on the minimal scheduling function presented in the IETF draft [8]. The proposed mechanism consists of the following two main operations: Computation of the mean of packets generated by each node and the prediction of the required cells in the next slotframe. First, we introduce some definitions: • Definition 1: We focus on event-driven WSN where nodes measure physical events and send it to the sink in an upstream data circulation transfer. • Definition 2: We define the network topology as graph G = (V, E) where V is the set of all nodes and E is the set of edges between the nodes displaying symmetric communications links. • Definition 3: In a data gathering frame of any node n we denote G(n), which is the number of data transmitting packets sent by node n and T(n), which is the sum of all the packets sent by n including G(n) and the number of packets received by the parent from its children.
Therefore, we define T(n) using the following equation: • Definition 4: We define Q P C (n) as the number of packets in the queue of n that has to be sent to parent and C P C (n) the number of cells already allocated between the parent p(n) and the child c(n). • Definition 5: After executing the scheduling algorithm and based on its output, nodes in G will either add, delete, or keep cells in the next slotframe S i+1 . In this paper we adopt the following assumptions: • Assumption 1: We assume that the gathered data network topology and the routing tree are provided. • Assumption 2: We consider also that the links of the routing tree are symmetric, since user data is gathered upstream, whereas the schedules are negotiated in a distributed fashion between nodes. • Assumption 3: Symmetric links are a requirement for the instant acknowledgment policy.

V. ENHANCED MINIMAL SCHEDULING ALGORITHM A. Prediction of the amount of data
In 802.15.4e TSCH networks, a node transmits two types of packets: Periodic data A w i (n) and Event-driven data A v i (n). Periodic data consist of enhanced beacons, which contain information about the actual ASN, the length of the timeslot and other information about the network. Event-driven data are sent upon the detection of a physical event. The total of a throughput a node generating is illustrated by the following formulas: Which is equivalent to:

B. Poisson-based packet generation model
As mentioned in the last section, we considered the 802.15.4e TSCH network as an event-driven network, where sensor nodes report data to the sink only when they obtain new data (an event occurs in a sensing area). We formulate the scheduling problem as a Poisson process model to describe the data generation. Process Poisson Definition [16]: A Poisson process N (t), t ≥ 0 with intensity λ > 0 is a counting process with the following properties. 1) Independent increment: For all t 0 = 0 < t 1 < t 2 < < t n , then N (t In the network, we consider the generated packets by different nodes as an independent event with no relation with the preceding event. Lemma 2: The Time T between each slotframe S is finite (slotframe durations stay the same through all the scheduling). Based on lemma (1) and (2), we can adopt a Poisson process model to describe data generation packets in the network. The distribution of the number of data packets, N (T ), generated by each node in the network from the beginning to the end of the slotframe is equal to the following formula: where λ is the average number of packets generated after a certain number of slotframes have passed since the two nodes are synchronized to the schedule. Mathematical, λ is defined by the following formula: where T is the actual instant, nbP acket i (n) is the number of packets generated by the node n in the instant T = i and β is the sum of previous number of slotframes which can be validated through simulations. In order to get an accurate value of λ, the protocol will execute it's scheduling algorithm with the minimal scheduling function up to β = 10 slotframes.
An illustration of the execution of the system model is described in Fig. 1. As an example, the nodes A and B are exchanging packets over the built scheduling by the minimal scheduling function. Starting from slotframe S = 10, using Eq.(7), node B determines the average number of generated packets in the previous slotframes since it joined the network as it is shown in Fig. 1(a). Then, the average number is used in Eq.(6) in order to determine the probability of getting a determined number of packets as depicted in Fig. 1(b). This operation will be repeated until a maximum probability value is reached. Based on the predicted output as observed in Fig.  1(c), the algorithm will execute either an add or a remove 6p operation explained in the following section.

C. Add/remove cells
Starting from a given slotframe cycle, each node in the network will execute the Algorithm 1. The purpose is to predict the number of packets that will be generated by each node in the next slotframe. To reduce resource computation by each node, the algorithm stops when a maximum value of λ is reached. By knowing the number of packets that will be generated in the next slotframe, a node can predict how many cells are required in order to exchange data with its preferred parent. Based on the output of the algorithm, a node can trigger a 6p transaction with its preferred parent either to add, or remove cells to the TSCH schedule of both nodes. if (p < C p c (n)) {Compare p with the actual reserved cells for node n} then 13: 6P DELETE command (p) {6P delete request of C p c (n) -p slots} 14: elseif (p > C p c (n)) then 15: 6P ADD command (p) {6P add request of C p c (n) + p slots} 16: end if 17: end for

VI. PERFORMANCE EVALUATION
We conducted our simulations on OpenWSN, which is an opensource network simulator for wireless sensor networks. The simulator supports a few major types of protocol based on IoT standards, such as 6LoWPAN, RPL, ROLL, and CoAP. All the protocols based on OpenWSN 6TiSCH use the latest IEEE 802.15.4e TSCH standard in order to improve their reliability and stability [17]. In order for OpenWSN to remain up to date and have the desired network metrics, it provides a pythonbased configuration tool that allows its network parameters to be modified. The behavior of the network (such as PDR in every channel), the node queuing priority and the timestamp of each sending and receiving packet is recorded and then simulated. Table I shows the parameters used in the OpenWSN simulation. A. 6p error ratio 6p negotiation error ratio is the average ratio between the number of 6p transaction errors and the total 6p transactions throughout a slotframe cycle. Fig. 2 displays the way that the 6p negotiation error ratio is affected by the network density. The number of nodes passes from 10 to 100. The negotiation Fig. 2. 6p error ratio error ratio increases with the increase in network density. In the MSF scenario, it goes from 2.1% to 19.8%, whereas in EMSF scenario it goes from 0.2% to 3.5%. This is due to the decrease in the number of control packets and to the substitution of the threshold-measurement mechanism that is needed for the prediction system to add or delete 6p operations. The number of 6p exchanged packets decreases, which leads to a lower negotiation-error ratio. The suggested mechanism, the EMSF, largely surpasses the MSF and keeps the negotiation-error ratio under 3.5% for all of the network densities. Fig. 3 represents the overhead traffic load in bytes that was employed by nodes in order to exchange 6p information in the network. We notice that the number of exchanged messages increases linearly with the number of deployed nodes. This is due to negotiation exchanges taken between pairs of nodes to determine the 6p operation that will be deployed. We notice that the EMSF maintains an almost constant amount of exchanged packets. This is due to the prediction algorithm that anticipates the number of required cells for each pair of nodes in the following slotframe. EMSF avoids sending overloads and keeps a constant average of control packets through the network lifetime.

C. Latency
The latencies are calculated as follows: Every packet is timestamped since it is generated in the application layer of a source node, until it reaches the application layer of the DAG root. As a result of this condition, retransmission on a MAC layer is not taken into consideration. However, if a packet is repeatedly transmitted, a peak in latency may occur. When a packet achieves 4 MAC retransmissions attempts and the queue is full, a packet will be considerably dropped. Each node sends a fixed traffic load of 2 packets per slotframe for the first 50 slotframes. Thereafter, each node sends a sporadic traffic load ranging from 2 to 7 packets per slotframe. 20 nodes were deployed in this simulation. An end-to-end latency comparison between MSF and EMSF is illustrated in Fig.4. The latency was almost constant for the first 50 slotframes because of stable transmitted data flow. Thereafter, latency varies in between cycles as a result of the failing stochastic transmissions based on the PDR between the nodes. EMSF keeps an end-to-end latency below 75 milliseconds in almost all the slotframe cycles. This is due to its scheduling mechanism that minimizes the overhead charges, which increases the PDR even when irregular data flow is generated.

D. Node queue size
The following Fig. 5 represents the average number of packets in the queues of the network nodes. From this figure, it can be seen that in the case of MSF, node queues are almost full and reach their maximum (5 packets) in some slotframes causing more dropped packets. On the other hand, EMSF shows better performance in this concern. Throughout 200 slotframes, EMSF shows an average queue size ranging from 0 to 4 packets. In a lot of cases, nodes over-allocate cells, especially those near to the DAG root. This is due to the prediction algorithm in the case where a high packet rate is generated in the previous slotframes. This will allocate more cells between pairs of nodes, which will be used when an unpredictable event occurs. For instance, given an average number of generated packets equal to 10 in the previous slotframes, a node generating 5 packets will allocate cells based on the average number of packets generated since the time it joined the network. This means that, even though a huge number of packets is generated, the node has already reserved more cells than its requirements. Therefore, packets tend to queue up less, but consume more energy and than in the case of MSF.

VII. CONCLUSION
In this paper, we formulated the scheduling function for IEEE 802.15.4e TSCH networks as a Poisson process model. We demonstrated that, based on the prediction algorithm, scheduling negotiation overhead is decreased noticeably. In addition, simulations approved that EMSF outperforms MSF in terms of the average packet queue length in the network and the end-to-end latency. In a future work, we will improve EMSF by combining it with an enhanced cell selection mechanism in order to reduce energy consumption throughout the network.