An Energy-Efficient One-Shot Scheduling Algorithm for Wireless Sensor Networks

In low-load wireless sensor networks, the power consumption of the node consists mainly of two parts: data transmission and node state switching. The lower node workload causes low energy consumption on data transmission, and the state switching energy of the node cannot be ignored. This paper proposes a one-shot time division multiple access (TMDA) scheduling with unlimited channels (SUC) on the assumption that the number of available channels is unlimited. SUC combines the receiverbased consecutive slot allocation with channel allocation, which minimises the number of node state switching and optimizes energy efficiency. Theoretical analysis demonstrates that the number of channels required by SUC does not exceed logN+1 2 , where N indicates the number of nodes. Seeing that the number of available wireless channels is limited in practice, the paper proposes the scheduling with limited channels (SLC) and uses a Lookahead Search mechanism to solve slot conflict. For the scalability of the algorithm, a distributed implementation based on the token change is proposed. The algorithm uses the depth-first-search (DFS) to pass the token to all nodes and terminates slot and channel assignment. The simulation results show our algorithm can reduce the energy consumption by minimizing the number of state switching and shorten the data aggregation time by reusing slots among nodes.


Introduction
Wireless sensor networks (WSNs) have the advantages of low power consumption, low cost, and flexible deployment and are widely used in data aggregation applications [1,2]. A sensor network is a collection of sensing devices, each of which has limited power supply, memory, processing ability, and transmission power. The sensed data arrives at sink through one or more hop(s) to deliver the information. The routing tree is a typical form of network organization for these applications. Since the many-to-one traffic pattern of the WSNs, nodes must switch their state (that is, switch from sleep to receive/transmit or vice versa) frequently during data transmission. The main reason for this is that nodes with child need to forward their child's data in discrete time slots. In [3,4], the authors proved that the energy consumption spent on nodes' state switching is nonnegligible. Furthermore, in low-load sensor networks, time and energy for data transmission and reception are limited. However, the energy of the node state switching is a necessary overhead, which results in considerable energy consumption on the node state switching.
A way is to minimize the number of node state switching by assigning consecutive slots to nodes based on the workload of the node. In [5], the authors research the problem of energy wastage caused by the state switching and developed a contiguous sleep scheduling algorithm, which assigns sensors with consecutive slots to reduce the times of state switching. The cost is increasing the data transmission delay. HTSAS [6] focuses on the energy consumption and delay caused by the state switching and consecutive slot assignment. The consecutive slots are assigned to each node based on their layer in the routing tree. HTSAS is a single channel scheduling algorithm and imports a multiparent node which leads to extracomplexity for the building of routing tree. These algorithms cannot always guarantee that the number of state switching of the node is the least. That is, the node wakes up from the sleep to receive the data of the child node and then forwards all data including the data produced by itself to the parent. After that, the node goes to sleep to save energy.
In this paper, we formulate the problem as the one-shot TDMA scheduling. Figure 1 shows the difference between consecutive slot assignment and one-shot TDMA scheduling. It can be seen from the figure that the one-shot TDMA scheduling minimizes the number of state switches for all nodes by continuously allocating receiving and transmitting time slots for the nodes in the network. It is obvious that the one-shot TDMA scheduling can reduce energy consumption and delay.
The above discussion motivates us to design a one-shot TDMA scheduling algorithm, so that the energy cost of the node state switching will be minimal.
The main contributions of this paper are as follows.
(i) We consider the constraints of parallel data transmission and energy consumption and formalize the one-shot TDMA scheduling problem (ii) A receiver-based consecutive slot assignment strategy is proposed. This strategy ensures that the number of state switches for all nodes in the network is only twice in each data aggregation cycle (iii) In order to satisfy the one-shot TDMA scheduling, a greedy multichannel allocation method is adopted. We proved that the number of channels required by our algorithm does not exceed log N+1 2 , where N denotes the number of nodes in the network (iv) We take into account the constraint on the number of channels available in the actual application environment and design the one-shot TDMA scheduling with limited number of channels Differently from the early conference papers [7], we formalized the one-shot TDMA scheduling problem and perfected the theoretical analysis and proof in this paper. Considering the challenges posed by large-scale wireless sensor networks, we also propose a distributed implementation of the algorithm. Finally, we analyze the performance of the one-shot TDMA algorithm through simulation experiments.
The paper is organized as follows: a brief discussion of related work about energy efficiency for wireless sensor networks in Section 2. Section 3 described the problem of the energy cost of node state switching and formulated the one-shot TDMA scheduling. Section 4 introduces the oneshot TDMA scheduling algorithm SUC and SLC. A mathematical analysis of their performances is included. Section 6 demonstrates the experimental results for performance evaluation by comparing the proposed method against other well-known previously designed algorithms. We end the paper in Section 7 with a conclusion and future work.

Related Work
In WSNs, many multichannel scheduling protocol have been proposed; they are usually used to improve the ability of par-allel transmission or reduce transmission delay. Some results improve energy efficiency through reducing idle listening or overhearing.
MMSN [8] is the first multichannel MAC protocol proposed for WSNs. It is a time-sharing CSMA mechanism. In order to save energy and communication overhead, MMSN assigns different channels for nodes in two hops. It uses a snooping mechanism to detect packet transmission on different channels, which causes the nodes to switch on different channels. MMSN shows that the uniform random backoff algorithm cannot effectively avoid contention and propose a nonuniform backoff algorithm. Experimental results show that MMSN achieves good parallel transmission capability and energy efficiency. Wu and Tseng [9] adopt the top-down time slot allocation method. The time slot of each child node be assigned on the basis of the parent node time slot, thus ensuring that the time slot allocation of the parent and child nodes is continuous. The number of node state transitions is reduced. In [10], the authors take the level of the node in the routing tree as the priority and then assign the time slot to the node according to the priority. Since the priority of the parent node is higher than that of the child node, the algorithm can provide the continuity of the time slot of the parent and child nodes, thus reducing the number of state switches of the parent. Abedi and Razaghi Kariznoi [11] propose a cross-layer multichannel optimization protocol, which combines MAC and opportunistic routing. Nodes can sleep and wake up adaptively according to load and energy level. The dynamic adjustment of channel load based on the number of nodes competing for the same channel and channel utilization balances the load of each channel. The simulation results show that the network lifetime is obviously prolonged. DRCS [12] is a distributed receiver-based multichannel routing protocol, which adopts routing and channel selection dynamically. DRCS exploits asynchronous duty-cycling to avoid energy wastage from overhearing. Each node chooses a least-used channel in its neighborhood as its receiver channel and then announces to its neighbors by broadcasting in a round-robin approach. When a node needs to transmit data, then it selects the channel according to the battery-health of nodes on a channel and expected transmission count (ETX) [13] on that channel. It is worth noting that the battery-health and ETX are evaluated periodically, which helps to dynamically select the best forwarding node and channel, so as to ensure the load balance between channel and node. Wu et al. [14] analyze the difference of energy consumption of nodes in different states and propose a node active scheduling strategy based on continuous time slot allocation for energy consumption of node state switching. The paper takes node workload as weight and then ranks nodes in descending order of weight. The consecutive time slots allocated by the node match their weights, thereby reducing the node state switching energy consumption. However, the time slot allocated for the node for receiving data and the time slot for transmitting data are not connected. Ma et al. [15] consider the energy consumption of node state switching. They construct a fusion conflict graph based on the network connectivity graph and the conflict graph and allocate continuous 2 Journal of Sensors time slots for each node based on the fusion conflict graph, thereby reducing the number of node state switching. However, the receive and transmit time slots allocated for a node are separate, and for most nonleaf nodes in the routing tree, they must perform two state switches to be able to complete data reception and transmission. Cheng and Ho [16] propose a robust data transmission protocol through increasing the packet delivery ratio (PDR). Adaptive channel access (ACA) algorithm is used to overcome the interference imposed by WLAN as well as optimal channel selection. Each node contributes to the selection of the optimal channel by performing PDR measurements which is done by using channel scanning. The optimal channel which has the higher PDR value is assigned to the node. Since, each node periodically updates PDR; therefore, it may consumes additional energy. PCA-MC proposed in [17] provides quality of service (QoS) guarantee for multichannel WSNs in smart grid application. A modified receiver-based channel assignment (RBCA) [18] is adopted as the MAC protocol. In modified RBCA, the interfering degree of the nodes is calculated based on the SINR value, then a channel is assigned to the node which has a maximum interfering degree. The node which has not been assigned to channel is marked as the interfering node. The channels are assign for these interfering node in the time slot assignment phase. To realize service differentiation, a delayaware data collection model is used for ensuring that each type of packet is marked with appropriate priority. The packets are listed in descending order by their priority and then transmit to the sink.
Tree-based multichannel protocol (TMCP) proposed in [19] divides the routing tree into multiple subtrees and assigns different channels to each subtree, thus reducing transmission interference between subtrees. After finished the channel assignment, TMCP assigns a time slot to each node. Similarly, a flow-based multichannel protocol is proposed in [20] (named MCRT). MCRT partitions the net-work, according to the data flow and assigns a channel to each partition, thus optimizes the end-to-end delay. Besides, MCRT also designed a well-established heuristic algorithm to optimize the number of channels. NDAS [21] optimizes the delay by exploiting the multichannel and asynchronous duty-cycle for WSNs. Two types of conflict graphs are proposed to describe the relationship of data transmission links and then present two coloring algorithms to assign time slots or channel for each link. A data aggregation tree is built based on the concept of the maximum independent set. Three types of nodes are marked with black, blue, and white, respectively. NDAS firstly schedules white nodes and then blue and black nodes. Then, NDAS schedules link at time slot t based on the following two conditions. First, the receiver of the link must be active and not be scheduled to receive data from other sender. Second, the links in the subtree rooted at the sender already have been scheduled before time slot t. Because child should always be scheduled before its parent, the delay is optimized. DMPMC [22] is a distributed multipower and multichannel scheduling algorithm for clustering WSNs. Two-level transmission power is used to support the communication intracluster and intercluster, respectively. After the nodes are clustered, a routing tree containing only cluster head is formed. Cluster head is listed in ascending order based on their ID and allocate channels in turn. Simulation results show that DMPMC achieves the low transmission delay. But, due to the use of unique channel per cluster head, DMPMC requires as many channels as cluster heads, which makes it very unsuitable for large-scale and dense WSNs. DCAS proposed in [23] is a distributed collision-free scheduling algorithm aimed at minimizing latency. DCAS assumes that each node has the 3-hop neighboring information. The node then constructs local extend relative collision graph [24] and local data-forwarding graph based on its neighborhood information. An independent set for each time slot is formed based on the previous collision graph for ensuring collision-free data transmission. MCAS- 3 Journal of Sensors MAC [25] is designed based on AS-MAC [26]. Unlike AS-MAC, MCAS-MAC asynchronously schedules the wake-up and sleep time of nodes and meantime has back-to-back transmission and multichannel support for WSNs with high traffic. When a node joins into the network, it first selects a least used channel as its home channel based on the gathered schedule and channel information. These information are announced by the other nodes by using Hello message. When a node needs to transmit data, sender chooses a intended receiver and then switches to receiver's home channel. When the receiver wakes up, the sender immediately sends all data in the queue to the receiver. If there are multiple queued data to be transmitted, MCAS-MAC introduces additional dwell time to transmit them. The evaluation of performance shows that MCSA-MAC improves the reliability of packet delivery and delivery latency.
Recently, machine learning-based routing [27] has become an increasingly popular direction. By analyzing empirical or historical data, machine learning-based routing can continuously improve the performance of sensor networks, such as energy efficiency, transmission reliability, and delay. However, in practice, sensor nodes only have limited computing and storage resources, which will be one of the limitations of applying machine learning algorithms.
At last, we compare these multichannel protocols and present the results in Table 1. Most multichannel protocols optimize energy efficiency and delay and use single path to aggregate data. These protocols give full play to the advantages of multichannel. However, for some asynchronous protocols [8,12,16,25], how to realize efficient data transmission between sender and receiver is still a challenging problem. The multichannel protocol based on slot allocation [17,19,22,23] needs to solve the problem of efficient synchronization of nodes and even the whole network.
In summary, several algorithms [14,15] optimize the node state switching by allocating consecutive time slots. However, due to the constraint of shared channel, the node receiving and transmitting slots are not continuous. In these algorithm, the number of state switching of some nodes is at least twice. Based on this, this paper ensures that the data reception and transmission slots of each node are continuous during the data transmission process by arranging the slots of the nodes on different channels. Thus, the number of node state transitions is minimized to one.

System Model and Assumption
3.1. Network System Models. We consider a data collection network consists with a sink and N sensor nodes (that is, The sensors were randomly deployed in a 2-dimensional region. Each node is equipped with a halfduplex wireless transceiver. For simplicity, we assume that nodes always use a fixed transmitting power (named E t ) to communicate with its neighbor. The neighbor is a collection of nodes that are within the effective communication distance (named R). In here, R is determined by E t . Furthermore, the communication between node v i and v j is The energy consumption of node is mainly composed of four parts: transmitting, receiving, listening radio signal, and sampling data. In this paper, we mainly consider the energy consumed by switching between state A and state B for a node. Table 2 summarizes typical values of Tmote Sky mote for different operations.
In order to use the TDMA to schedule the activity of the node, we assume that time is divided into slots with length t s . The slots are organized in the form of schedule frame. The schedule frame is repeated in each data collection cycle.

Problem Description.
In this section, we describe the problem studied in this paper. To describe the energy consumption of nodes' state switching, the energy ratio is calculated using where E sw denotes the energy cost of node state switching and E t denotes the energy consumption of data transmission. Using Equation (1), we illustrate the energy consumption of the Tmote sky with different initial workloads in Figure 2. The parameters in Table 2 are referred in [30]. Based to the experimental result shown in Figure 2, the energy consumption of node state switching is higher than that on data transmission when the nodes have low workload (e.g., 16 bytes). In practice, for many real-world environment monitoring applications (e.g., sensor networks for collecting temperature and humidity information), each node may produce only 20 bytes per duty-cycle. Therefore, the energy cost of node state switching is one of the main factors in energy consumption for this type of application. We define the energy consumption of nodes in different states. Table 3 gives the symbol used in this section. For a node v i , if it is scheduled to transmit at slot t, we denote it as T t i = 1; otherwise, we denote it as T t i = 0. Similarly, we use R t i to denote whether the node v i is scheduled to receive at slot t or not. We also use E P,T and E P,R to denote energy consumption by state transition. In fact, the energy consumption from active state to sleep sate is very low compared to switch from sleep to active state. Therefore, this part of energy is often ignored.
For node v i , its energy consumption during a scheduling The objective of a schedule S is to minimize these two energy consumption. If the node has fully consecutive slots, we have Σ T t=1 ðC t i,T + C t i,R Þ = 1. The one-shot TDMA scheduling problem is defined as follows: given a data collection tree T, how to ensure that each node in T wakes up only once during each data collection cycle, and the wireless channel used by the algorithm is the least (named CN). The optimization problem is stated as 4 Journal of Sensors follows: The first condition ensures that the data produced by itself and delivered by its child is reliably forwarded to next hop. The second condition ensures that the node only be in transmitting or receiving at any slot t. The third condition ensures that the transmission of node v i and node v k is interference-free only when two nodes use different channels at slot t.

One-Shot TDMA Scheduling Algorithm
The first proposed in this section is the one-shot TDMA scheduling algorithm with no limit on the number of available channels. However, considering that the number of available channels is limited in an real-word wireless communication system, another scheduling algorithm with a limited number of available channels is proposed. They are all centralized algorithms. In the next section, we will present a distributed implementation of our algorithm.
4.1. One-Shot TDMA Scheduling with Unlimited Channels (SUC). The SUC algorithm consists of two phases: the workload collection phase is used to calculate the workload of each node in the network; the receiver-based transmission slot allocation phase is used to assign consecutive slots to each node based on their workload. In order to ensure that the slot arrangement of each node meets the one-shot scheduling requirements, and the scheduling of the nodes is collision-free, these consecutive slots are arranged to different wireless channels.
Phase one: workload collection. In a data aggregation sensor network, nodes periodically generate data and deliver data to the sink in a multihop manner. In this data transfer process, we assume that each hop passes the raw data, that is, the data is not aggregated by the node. Based on this, we can use W i = W si + w i to compute the node v i 's workload, where W i is the node v i 's total workload, w i denotes the amount of data produced by node v i during a data collection cycle, and W si denotes the total amount of raw data generated by a subtree with node v i as the root node in one data collection cycle. The workload collection is completed using depthfirst-search (DFS) which is widely used to resolve the node traversal problem. Figure 3 illustrates the node workload collection. Each node produces one raw data and delivers it to the parent in one slot. Notice that our algorithm can be easily applied to scenarios where the initial workload of node is different.  [9] Energy efficiency Matlab Single Small Tree DRCS [12] Network lifetime, good PDR MICAz motes, Castalia simulator Single Small and large Hybrid TMCP [19] Throughput, packet losses GloMoSim Single Large Tree MCRT [20] Delay Tmote motes, NS-2 Multiple Large Tree NDAS [21] Delay Matlab Single Small and large Tree DMPMC [22] Delay, energy efficiency Matlab Single Small and large Clustering MCAS-MC [25] Packet delivery ratio, delay Mica2 motes, RePTEX [29] Small Hybrid DCAS [23] Delay Matlab Single Small and large Hybrid

Journal of Sensors
Phase two: receiver-based transmission slot assignment. The receiver-based transmission slot assignment starts from the sink. First, according to the workload of the child, all the children of the sink are allocated consecutive transmission slots for transmitting the collected raw data to the sink. Subsequently, in order to ensure that the slot assignment of the nodes meets the one-shot scheduling requirement, each node allocates consecutive transmission slots to its children based on its own transmission slot. For any node v i , the number of slots assigned to it is determined by its workloads W i calculated in the front. We assume node v i turns to assign slots, and it has j children. For node v i , its first transmission slot is t i , then its last transmission slot is t i + W i − 1.
Node v i works as follows to guarantee the slot assignment meets the requirement of one-shot TDMA scheduling.
(i) Step one: node v i assigns consecutive transmission slots to its children. In order to guarantee one-shot scheduling of node v i , the slot assigned to the child must be smaller than the first slot of node v i . Therefore, for node where W m denotes the workload of the child m of node v i . If node k is the first child of node v i , e.g., k = 1, then we have v i − ∑ c m=1 W m − 1 = v i − 1. As the time slot allocation is performed layer by layer from top to bottom, there may be a case where the first slot number of the node is less than 0. Therefore, when the slot allocation of all nodes is completed, the slot number of the node needs to be adjusted. The slot number adjustment method is as follows: the slot number less than 0 is defined as an offset, and the maximum offset is the absolute value of the minimum slot number (less than 0). Then, each slot of the node is added to the offset. This operation ensures that the slot number of the node is a positive number greater than 0 (ii) Step two: channel allocation. To minimize the number of wireless channels, SUC uses a greedy assignment mechanism. We define the candidate channel list as CCL. When a node v i assigns a channel to child k, it first checks the assigned slot information on each channel in CCL. If there is a channel (for example, ch i ) in CCL that satisfies the requirement of collision-free slot allocation for child k, then channel ch i will be assigned to child k; otherwise, a new channel ch i+1 will be assigned to child k and added to the CCL. Hence, we have CCL = CCL ∪ ch i+1 Algorithm 1 is the pseudocode of SUC. In this algorithm, t j is the last slot assigned to node v j , and W j denotes the workload of node v j . AS ch j includes all the slots active in channel ch j .
Proof. For the application of raw data collection without data fusion, the energy consumption of a node can be divided into two parts: energy consumption of transmitting and receiving data (say E D ) and energy consumption of statetransition (say E S ). Since the node needs to wake-up at least once during the data collection process, the optimal energy consumption of state-transition E S opt = n * e s , where e s denotes the energy for state-transition and n denotes the number of nodes in the network.☐ According to Algorithm 1, since the slot allocated for the child of the node always takes precedence over the node itself, the node will forward the data to its parent or sink only after the data of the child is completely collected. In this process of aggregating data, the node only needs to wake up once, that is E S = E S opt . Let E be the total energy consumption in a one-shot TDMA scheduling. We get E = E D + E S = E D + E S opt . Because E D is fixed for a given data collection tree, and it only depends on the structure of data collection tree, we have E D opt = E D , where E D opt is the optimum energy consumption for data transmit and receive. At least, we get E = E D opt + E S opt = E opt . For the TDMA scheduling algorithm, there is a scheduling conflict when different nodes reuse the same slot. To ensure the reliability of data convergence and the continuity of node slots, scheduling conflict problem must be solved. Algorithm 1 solves it by assigning different channels to these nodes. As a result, our algorithm can ensure that slot is interference-free. Based on this, we can get the following conclusion for the data collection tree T. Theorem 2. For data collection tree T composed with N sensor nodes, the number of channels CN is used by Algorithm 1 to establish the one-shot TDMA scheduling of T less than log N+1 2 .
Proof. According to the receiver-based transmission slot allocation algorithm, the transmission slot allocation process starts from the sink. Therefore, for each node in the tree, the transmission slot number of the child is always smaller than the slot number of the parent. For the channel allocation, Algorithm 1 assigns a new wireless channel to the node and adds it to the CCL if and only if there is a scheduling collision and the scheduling collision cannot be resolved using the wireless channel in the CCL. Therefore, the number of channels is equal to the maximum number of times a slot is reused among nodes. We discuss the channel requirements of Algorithm 1 in two different topologies.☐ Type I: N-ray regular tree (such as binary tree and ternary tree): Considering the N-tree T of height h (counting from top to bottom begin with the root node), according Input: Data Collection Tree: T The node set: V Output: Scheduling frame for T 1: whileV ≠ ∅do 2: Finding the node v j by using DFS 3: Assigning slots AS j = ½t j − W j + 1, t j to v j 4: ch j =1; 5: t l = t j − W j + 1; 6: while (t l < = t j ) do 7: ift l ∈ AS ch j then 8: ch j = ch j + 1; 9: t l = t j − W j + 1; 10: ift l == t j + 1then 11: AS ch j = AS ch j ∪ AS j 12: Assigning AS j and ch j to v j 13:   7 Journal of Sensors to the time slot assignment based on the receiver, the slot interval (denoted by T 1 ) assigned by each node in the child node set fs 11 , s 12 , ⋯, s 1N g of level 1 in the tree T (remember for) is shown in The total number of slots required is NððN h − 1Þ/ðN − 1ÞÞ; the slot interval (recorded as T 2 ) assigned by each node in the set of child fs 21 , s 22 ,⋯,s 2N 2 g of level 2 is shown in From the above derivation of the slot assignment of each node in the N-tree T with levels 1 and 2, respectively, it is known that at least one slot in T 1 is included to T 2 , for example, N h − 1. Thus, according to the receiver-based slot assignment, it can be inferred that slot T i assigned to the node set fs i1 , s i2 ,⋯,s iN i g at level i in T always contains at least one slot in T 1 . Therefore, for tree T, there is at least one slot k used by nodes located at different level in the tree. That is to say, there is a node set S k = fs 1 , s 2 ,⋯,s h g corresponding to the slot k which consists of node located at different level in T. The size of the node set is equal to h.
Based on the above discussion, it can be concluded that for any N-tree T, the number of channels required for one-shot TDMA scheduling of T is CN = h.
Type II: random data collection tree: for a random data collection tree T, we assume that the sink has n children, denoted by st 1 , st 2 , ⋯, st n , respectively, and uses N i to represent the workload of node st i . Since each node produces a workload during a data collection cycle, we have N 1 + N 2 + ⋯+N n = N. For Algorithm 1, since the slots of the parent and child are contiguous, slot reuse can only occur between subtrees, for example, two subtrees rooted at st 1 , st 2 . We use δ to represent the maximum number of time slot reuses between subtrees. Then, the value of δ may be {1,2,3,4, ...}. Considering that different subtree combinations (for example, {st 1 , st 2 }, {st 1 , st 3 }, etc.) result in different δ, we can get a sequence of values of δ: {δ 1 , δ 2 , ⋯, δ m }. For Algorithm 1, we have CN = max ðδ i Þ, ð1 ≤ i ≤ mÞ. Based on the previous discussion of the N-ray regular tree, it can be known that δ is maximum when each layer of the tree reuses the same time slot. According to the graph theory, the number of nodes in a tree with h layer is 2 h − 1. For the n subtrees of tree T, we have 2 h − 1 ≤ max ðN 1 , N 2 ,⋯,N n Þ, and so, h ≤ lo g 2 . Based on the discussion for the N-ray regular tree, we have δ i = h . Moreover, we have CN = max ðδ i Þ, and so, CN ≤ log N+1 2 .

Scheduling with Limited Channels.
In Section 4.1, SUC implements one-shot TDMA scheduling with enough available channels. However, in practice, there is a limitation on the number of wireless channels over which a transceiver can use. Typically, the number of orthogonal channels in the 2.4 GHz band is less than 6. Therefore, we take into account this constraint on the number of channels and design an algorithm for the one-shot TDMA scheduling with given number of channels. Compared with SUC, when we develop scheduling algorithm with limited channels, the major challenge is how to assign slots to nodes when the available channels are insufficient to ensure that the state switching times is optimized. In Algorithm 2, we use another simple greedy strategy to overcome this challenge. We assume that the number of channels is k.
The Lookahead Search described in Algorithm 2. Note that the slot included in a slot slice is consecutive.

Complexity Analysis.
The main process of Algorithms 1, 2, and 3 is to collect the workload of node and assign consecutive slot to node. These two processes are completed by using DFS algorithm. The time is mainly consumed in finding adjacency nodes in routing tree, so the time complexity of these algorithms is O(n 2 ), where n denotes the number of nodes in the networks.

A Distributed Implementation
In the algorithm SUC, the time slot and channel assignment of a node are assigned by the aggregation node. The advantage is that the energy consumption is saved. However, as the network scale increases, the probability of redundant exchange of node time slot and channel assignment information in the information distribution process will be greatly increased, and frequent exchange of redundant information between nodes will be lead to the waste of energy. One of the methods of adapting the SUC to a large-scale network is to adopt a distributed implementation. In this paper, 8 Journal of Sensors a distributed implementation of SUC algorithm is described as follows.
The TOKEN for slot and channel assignment is first generated by the Sink, and TOKEN is passed to each node in the data aggregation tree by using DFS to accomplish the statistics of the total workload of the node. When TOKEN returns Sink, the total workload of any node i in the network can be calculated by W i = W si + w i , where W si is the total workload of the subtree rooted at node i, w i indicating the amount of work generated by the node itself.
In the node slot and channel assignment phase, there are two types of information that need to be carried in TOKEN: (1) node's slots, expressed as (the workload: W, the ID of first slot: t); (2) channels' slot, expressed as (channel number: c, slot list: T L ). The process consists of three steps.
Step 1. Sink passes the TOKEN to the first leaf node, such as node i. To simplify the problem, we assume that the node i has the most workload. Next, node i begins to assign slot and channels to itself and stores this information to the T L of node's schedule S, while storing the slot information into the TOKEN for return to the parent node. Since the phase of slot and channel assignment begins with node i, there is no conflict no matter slot or channel. After node i completes the assignment of slot and channel, the TOKEN is then passed to its parent.
Step 2. When the parent p receives the TOKEN from the child i, it first stores the slot information ðW, tÞ and child's ID carried in the TOKEN into the R L of its schedule, also named S. If the parent p does not complete the assignment of slot and channel, it will continue to perform slot and channel assignment. Otherwise, the parent p skips the slot and channel assignment. The slot and channel assignment of the parent p is as follows.
Based on the slot information ðW, tÞ carried in the TOKEN, p can calculate its slot interval as ½t + W, t + W + W p − 1. In the process of channel assignment, p looks for the T L related with each channel to find a channel that can place its slot ½t + W, t + W + W p − 1. If the channel cannot be found, an idle channel is added and the slot of p is associated with the new channel. After completing the slot and channel assignment, p stores the slot into its' T L and then calls the TOKEN processing routine.
TOKEN processing routine: when p completes or skips the slot and channel assignment, the TOKEN may be delivered to p's child or parent, which are handled as follows: (1) If TOKEN is passed to the child, p selects the child with the largest workload from the unassigned child set and passes the TOKEN. Before passing the TOKEN, p needs to specify the minimum slot number t min in the schedule S to t and initialize w to 0 (2) If TOKEN is passed to the parent, and t = t p , w = w p , where t p is the first transmitted slot number of p, and w p denotes the total workload of p Step 3. Assign slot and channel to child: when child, such as k, receives TOKEN, node k first calculates node's first slot number t k = t − w k according to t in TOKEN and determines that node's slot interval is ½t k , t k + w k − 1. In the process of assigning channels, node k looks for each T L associated to channel to find the channels that can satisfy node k's slot requirements. If not found, a new idle channel is added, and the slot interval ½t k , t k + w k − 1 of node k is arranged to the channel. After the slot and channel assignment is completed, node k first stores the slot assignment into the T L of k's schedule S and then calls the aforementioned TOKEN processing routine.
After all the nodes in the network have completed the slot and channel assignment, TOKEN will return to the sink. Note that the above distributed implementation completes the slot and channel assignment only by token transfer. The overhead of the algorithm is only caused by the TOKEN transfer between the nodes. The algorithm has a low complexity.

Simulation Results
This section summarizes the performance of proposed algorithm. The MATLAB is used as the simulation platform, and implements one-shot TDMA scheduling and two comparison algorithms centralized TDMA scheduling (named centralized) [5] and multihop-TDMA. The centralized is proposed to reduce the energy consumption of nodes' state transition. It reduces the number of slots used for scheduling by reusing slots. The main difference between our algorithms and centralized is that centralized uses only one channel. Therefore, when the centralized reduces the number of node state switching, it cannot guarantee that the transmitting slot and the receiving slot of the node are completely Input: Data Collection Tree: T The node set: V the number of available channel k (1 ≤ k) Output: Scheduling frame for T 1: whileV ≠ ∅do 2: Finding the node v j by using DFS 3: Assigning slots AS j = ½t j , t j − W j + 1 to v j 4: ch j =1; 5: t l = t j − W j + 1; 6: whilet l ≤ t j and ch j ≤ kdo 7: ift l ∈ AS ch j then 8: ch j = ch j + 1; 9: t l = t j − W j + 1; 10: ift l ≤ t j and ch j > kthen 11: Calling Algorithm 3 12: else 13: AS ch j = AS ch j ∪ AS j 14: Assigning AS j and ch j to v j 15: V = V − v j Algorithm 2: Scheduling With Limited Channels (SLC). 9 Journal of Sensors continuous. In addition, we also implemented a multihop-TDMA without slot reuse as the baseline. Since the distributed scheduling is the same as the centralized scheduling on the core mechanism, we only report the results of the centralized scheduling.
The typical topology used in our all experiments shown in Figure 5. The experimental results are the mean value of 10 random network topology. All nodes are randomly placed in a 2D region of no more than 100 m × 100 m. The transmission distance is 12 m. Each node produces only a unit data which can be transmitted completely in a slot in a data collection cycle. In other words, the initial workload of the node is one packet. We form a shortest-path data collection tree to study these algorithms. In our simulations, each node produces one packet in a data collection cycle. Our simulations use the Tmote Sky mote, and its parameters are shown in Table 2.
6.1. Impact of the Network Scale. Figure 6 shows the number of channels used by our algorithm in a network topology with different hop counts. We can conclude that the number of channels used by our algorithm is increasing as the number of hops in the network increases. Furthermore, N-ray regular tree uses the most channels to guarantee the oneshot scheduling in the most simulation experiments. The main reason is that nodes with different hops in the N-tree will reuse the same time slot. Therefore, in order to avoid wireless interference between these nodes, each node must use a different channel, resulting in the number of channels being equal to the height of the tree. In a random shortest path tree, the probability that the same time slot is reused by nodes located at different hop counts is low, and therefore, less time slot reuse between nodes reduces the number of channels.
The number of slots required for scheduling generated by different algorithm is shown in Figure 7. Compared with SUC, the number of slots is large due to the lack of slot reuse when nodes use multihop-TDMA algorithm. As shown in the figure, as the number of nodes continues to increase, the number of slots required for scheduling generated by all algorithms is also significantly increased. Since multihop-TDMA does not employ the slot reuse mechanism, it generated the scheduling with the largest number of slots.
Correspondingly, the data delivery delay is also the largest. As for the SUC and centralized, since both algorithms have a slot reuse mechanism, the number of slots they need is not much different. Since data transmission occurs on orthogonal channels, SUC can provide the reliable data delivery. However, the centralized uses the protocol interference model. Since the protocol interference model only models the wireless interference between nodes in the twohop range, it cannot fully represent the wireless interference between nodes in the actual environment. The scheduling produced by the centralized may not easy to guarantee the reliable data transmission.
The energy consumption of nodes' state switching is shown in Figure 8. Since the number of orthogonal channels that a node can use is unlimited, the scheduling generated by SUC ensures that each node only need to switch states once and thus has the lowest energy consumption. For multihop-TDMA and centralized, since the receiving slots and transmitting slots of the node are discontinuous, the node has to switch from sleep to receiving or from sleep to the transmitting state many times, thereby increasing the energy consumption of node.
6.2. Impact of the Number of Channels. In a real-world network, the number of channels that a node can use is very limited. Therefore, we evaluate the performance of SLC in this section. We first measure the energy consumption for state switching and then evaluate the data collection time derived by SLC. In all experiments, we use the multihop-TDMA and centralized as the benchmark. Figure 9 shows the total energy consumption of state switching during a data collection cycle. It can be concluded that as the number of available channels increases, more nodes can complete one-shot TDMA scheduling, thereby reducing the energy consumption of sate switching. After the number of channels is 6, all the nodes in the network need only switch the state once to complete the data collection, and the energy consumption of state switching is the least.
The relationship between the number of available channels and the data collection time is shown in Figure 10. Among the three algorithms, the scheduling generated by multihop-TDMA requires the most slots. When the number of available channels is less than 4, the scheduling derived by SLC requires more slots than the centralized algorithm.
Input: an initial slot slice ½t j , t j + W j − 1 assigned to node j; the channel ch j which has the minimum traffic load Output: a new slot slice ½t m − W j , t m for node v j 1: ift l ∈ ½t j , t j + W j − 1 and t l is the slot assigned to nodes by all k channels then 2: Calculating the maximum unassigned slot number t m = t l − 1 and a new slot slice ½t m − W j , t m 3: for each slot t k ∈ ½t m − W j , t m do 4: t k is unassigned in channel ch j and so could be allocated to node v j 5: ift k cannot be assigned to node v j then 6: t m = t k 7: Recalculating slot slice ½t m − W j , t m 8: Assigning slot slice ½t m − W j , t m and the channel ch j to node v j Algorithm 3: Lookahead Search.

Journal of Sensors
When the number of available channels exceeds 4, the SLC is equivalent to the slot requirement of the centralized algorithm. In addition, when the number of nodes increases to 800, the slots difference between the two algorithms is significantly reduced. The reason for this is more slots are reused by nodes on different channel when the sufficient channels are available and then shortens the data collection time.
The number of state-transition is shown in Figure 11. It can be concluded from the figure that although the single channel centralized can reduce the number of statetransition by allocating consecutive slots for nodes, in fact, only a small part can be reused between nodes due to the existence of wireless interference. Centralized cannot guarantee that the nodes have consecutive slot assignment. For SLC, when the number of available channels is 2, the number of state transition is not much different from that of centralized. However, when the number of channels is increased to 4, the number of state-transitions is significantly different.

Journal of Sensors
When the number of channels is increased to 6, each node needs only one state transition to complete the receiving and transmitting data, thereby obtaining optimal energy efficiency.
Based on the experimental results, it can be found that when the available channels increase, the receiver-based slot assignment makes the slot of the node as continuous as possible, so as to minimize the number of state switching of the   Journal of Sensors node. In fact, because the node always receives child's data through continuous slots firstly, and then forwards all data to its parent, the data transmission delay has also been optimized. Therefore, our algorithm is helpful to design delay-aware routing protocol. Considering that IEEE 802.15.4e [31] has supported the multichannel communication technology, our algorithm is feasible to a certain extent. However, because the slots allocated to nodes can be reused  13 Journal of Sensors only when nodes use different channels, the algorithm in this paper does not fully realize the optimization of data transmission scheduling. In addition, our algorithm does not consider the performance of nodes with different initial workload or under different network topology [32]. These problems are also worthy of further consideration.

Conclusion
In this paper, the one-shot TDMA scheduling algorithm is proposed for the energy consumption of state switching. The one-shot TDMA scheduling algorithm uses a continuous slot allocation algorithm based on the receiver to ensure that each node only needs to wake up once during data aggregation, and at the same time, by arranging the slots on different channels, the data transmission of the node is guaranteed to be interference-free. We considered the case where the number of available channels is limited and developed the SLC algorithm. The extensive simulation results show that the proposed algorithm can effectively reduce the number of node state switching and obtain the optimal data collection time.
However, our algorithm does not provide optimal data collection time when the number of available channels is small. Therefore, in our future research work, we plan to implement intrachannel and interchannel slot reuse based on the wireless interference model to further reduce data collection time.

Data Availability
The data used to support the findings of this study are included within the article.

Disclosure
An earlier version of this paper was presented at the "2013 IEEE/CIC International Conference on Communications in China (ICCC 2013)."

Conflicts of Interest
The authors declare that they have no conflicts of interest.