A distributed energy-efficient opportunistic routing accompanied by timeslot allocation in wireless sensor networks

Sensed data can be forwarded only in one direction to the base station in one-dimensional queue wireless sensor networks different from mesh structure, so the network lifetime will be shortened if some continuous neighboring nodes have run out of their energy. So designing routing protocols for balancing energy consumption is a challenging problem. However, traditional and existing opportunistic routing protocols for one-dimensional queue wireless sensor network proposed so far have not yet addressed this problem to prolong the network lifetime by introducing sleep mode. In this article, we propose a distributed energy-efficient opportunistic routing algorithm accompanied by timeslot allocation by using specific network topology of one-dimensional queue wireless sensor network. In our new algorithm, clustering and routing tree construction is performed while introducing the optimal relay transmission distance achieved by using opportunistic routing principle, and at the same time, interference-free wake up time is scheduled, which may optimize energy consumption and decrease the number of various control messages as possible to prolong the network lifetime. Furthermore, this improves energy efficiency by introducing the operation mode giving up cluster head role. Simulation results show that the proposed protocol can significantly improve the network performance such as energy consumption and network connectivity, when compared with other existing protocols.


Introduction
Routing is one of the key techniques in wireless sensor network (WSN). Any application such as ecological environment monitoring, health care, target tracking, and agriculture surveillance needs routing technique for forwarding sensed data by sensor nodes through several relay nodes to the base station (BS) or monitoring center. So far, many routing protocols have been proposed according to the requirement of different applications in WSN. [1][2][3][4][5] This article is focused on one-dimensional queue WSN, a linear network of regular network topology. In topology such as tree or mesh structure used in many applications, sensor nodes are distributed randomly in areas that are beyond people's reach. However, in onedimensional queue WSN, nodes are uniformly and densely deployed on a line and this type of network offers many applications such as ecological environment monitoring system along a river, fire monitoring and controlling system along a corridor, smart traffic monitoring system along a road, and tunnel or bridge and petroleum pipeline remote monitoring system. In such one-dimensional queue WSN, the geographical location of each node is fixed, and the distance between two neighboring nodes is always uniform and sensed data can only be forwarded in one direction to the BS. So the network becomes more unreliable and has high probability that network may be partitioned if some continuous nodes have run out of their energy. 6 Therefore, it should be key metrics of designing routing protocol in one-dimensional WSNs to ensure energy efficiency and sensed data relay latency by balancing and optimizing energy consumption. Furthermore, including sleep mode in routing design through timeslot allocation could prolong the network lifetime by ensuring energy efficiency and also satisfy the requirement of sensed data relay latency considering interference between nodes in some degrees.
But existing routing protocols [7][8][9][10][11][12][13] in WSNs including one-dimensional queue WSN attempt to find the path of minimum energy consumption from the source node to the BS to achieve optimal energy consumption, considering that transmitting data consumes much more energy than collecting data. Besides, some other routing protocols 6,[14][15][16][17][18] are proposed to ensure energy efficiency and to improve sensed data report latency. So far, several routing protocols for one-dimensional queue WSNs have been proposed but many of them don't address the problem to improve the network lifetime by introducing sleep mode when opportunistic routing algorithms gathering constant data are adopted in one-dimensional queue WSNs having the fixed sink.
Our objective in this work is to solve the problem of energy efficiency raised when data gathering opportunistic routing algorithms are used in one-dimensional queue WSNs in the case of fixed sink. For this, we propose the distributed opportunistic routing algorithm accompanied by timeslot allocation in one-dimensional queue WSNs. The main idea of this algorithm is to achieve better energy efficiency by reducing overhead consumption of unnecessary control messages through opportunistic routing accompanied by timeslot allocation. This work should meet the goal to improve the network lifetime. For this goal, we optimize energy consumption by performing routing tree construction using predefined optimal relay distance based on opportunistic routing (OR) and interference-free timeslot allocation simultaneously and reduce various control messages used through this process by using characteristics of network topology so as to reducing energy consumption. In one-dimensional queue WSNs, the network topology is linear so identification of each node is unique and continuous and the geographical position is certain. Using such characteristic, as small number of messages as possible could be needed through clustering and constructing the routing tree accompanied by timeslot allocation. To prolong the network lifetime further by improving energy efficiency, it is crucial to reduce overhead consumption of various control messages used in constructing the routing tree by clustering and timeslot allocation on it as much as possible.
The contributions of our work are as follows: We define construction of the routing sub-tree and timeslot allocation problem to reach the main objective of our work. We present a distributed energy-efficient OR algorithm that routing tree construction and timeslot allocation are performed at the same time by using specific network topology of onedimensional queue WSN. Operation mode giving up CH role in clustering is introduced to improve the energy efficiency of the proposed algorithm more and more. We analyze several properties of the proposed algorithm. Extension simulations are conducted to demonstrate that the proposed protocol supports better energy efficiency than the other existing similar protocols.
The remainder of the work is organized as follows: section ''Related works'' gives a brief introduction of prior works in one-dimensional queue WSN. Section ''System model and problem description'' describes the network model and system model for the proposed protocol. A distributed energy-efficient opportunistic routing accompanied by timeslot allocation (DEEOR-TA) is detailed in section ''The proposed algorithm''. Section ''Protocol analysis'' considers characteristics of the proposed protocol analytically. Section ''Performance evaluation'' analyzes the performances of DEEOR-TA and simulation results in detail and this work is concluded by the conclusions in section ''Conclusion.''

Related works
Traditional routing protocols for WSNs have been proposed as the best path way by preselecting one or more fixed optimal routes before starting transmission and relaying packets through the fixed neighbors to a relay node. However, this way is not applicable to dynamic wireless environment which would trigger excessive link-level retransmission.
Therefore, OR is proposed. The main principle of OR is to overcome the drawback of unreliable wireless transmission by employing advantage of broadcast nature of the wireless medium that one transmission can be overheard by multiple neighbors. 19 Out of this, it is known that forwarding can be continued as long as at least one neighbor along a route receives packets. It can improve the performance of traditional routing.
The key issues in design of OR include forwarder set selection, prioritization, and duplicate transmission avoidance. We categorize the previously proposed OR protocols by different standards. 19 By forwarder set selection method, it is classified in end-to-end forwarder set selection and hop-to-hop forwarder set selection.
End-to-end forwarder set selection such as ExOR (Extreme Opportunistic Routing), 20 MORE (MACindependent Opportunistic Routing and Encoding), 21 and Opportunistic routing in dynamic Ad Hoc networks (OPRAN) 22 prioritizes the forwarder candidates by using predicted transmission count. ExOR integrates routing and MAC protocols. It improves routing performance by using long wireless link with high loss rate. Here, nodes closer to the destination node than a source node are included in forwarder set. MORE integrates OR and intra-flow network and is proposed for improving ExOR. Different from ExOR that uses duplicated packets, MORE uses the concept of innovative packets for judging whether received packets bring new information or not. OPRAN forms braid multipath set between source and destination through demand routing to support opportunistic forwarding. For this purpose, this protocol makes intermediate nodes record more sub-paths back to the source node and downstream to the destination station. With hopto-hop forwarder set selection such as CORE, 23 OAPF, 24 and ENS_OR, 7 each packet holder independently decides its own forwarder set along the path to the expected destination. Coding-aware opportunistic routing mechanism (CORE) makes a packet holder forward a packet to the next hop that leads to the best coding changes in its forwarder set by integrating localized network coding and OR. Such hop-to-hop forwarder set selection operation can significantly improve the end-to-end coding gain in packet delivery with little extra overhead consumption. OAPF (Opportunistic Any-Path Forwarding) introduces an any-path count (EAX) expected by possible forwarders and recursively calculates the near-optimal forwarder set at each possible forwarder to reach the destination. So extra high calculation overhead should be paid and more network state information should be gathered. Energy saving via opportunistic routing (ENS_OR) adopted the concept of an energy equivalent node for forwarder set selection based on OR principle in one-dimensional opportunistic network and derived the optimal transmission distance for energy saving and maximizing the network lifetime using it. ENS_OR with sleep mode algorithm 8 is developed to decrease energy wastage due to the idle listening of nodes in ENS_OR, which is the main drawback of ENS_OR. It derives the optimum sleep interval using the current flow rate to increase the substantial amount of energy saving and prolong the lifetime of the network. This algorithm is event triggering scheme, that is, when an event is triggered, the node awakes instantly, receives data and the received data is transmitted to the sink node via the highest priority nodes. This is not adequate in the case of data gathering like our proposed method that all nodes sense and transmit data. Routing can also be classified into event triggering scheme, which drives routing algorithms when an event occurs, and data gathering scheme that constantly collects indices such as temperature and humidity in whole surveillance region. In data gathering scheme, ways of moving the sink to enhance the energy efficiency are studied. 25,26 These studies introduce the mobile sink for data gathering to handle the problem of unbalanced energy consumption. Our work aims to solve the problem of energy efficiency raised when data gathering OR algorithms are adopted in one-dimensional queue WSNs in the case of fixed sink.
Also, OR can be classified into location-based selection and topology-based selection according to the location of node and topology of network. Topology-based selections such as ExOR, MORE, CORE, and OAPF enable efficient OR by using local or global state information. Location-based selections such as GeRaF, 27 EQGOR, 16 ENS_OR, 7 and TE-OR 6 determine a forwarder and its priority based on very little topology-based and no global topology-based network state information. GeRaF (Geographic Random Forwarding) is based on geographical location of each node and random forwarder selection via competition. In GeRaF, each packet carries the location information of the source and destination and only neighboring nodes closer to the destination than the source can be forwarder candidates. EQGOR (Efficient QoS-aware Geographic Opportunistic Routing) suggests multipurpose-multi-criteria optimal problem that satisfies various criteria together with energy efficiency, report latency and time complexity, and select forwarder candidates set and prioritize them using effective solving method. Time-aware and energy-efficient opportunistic routing (TE-OR) gathers residual energy of forward neighbors, pre-calculates, and prioritizes the forwarder set. It achieves energy efficiency and sensed data report latency goals by adopting different parameters to various types of packets.

Network model
We consider the network model of one-dimensional queue WSNs with linear topology. In this model, nodes are uniformly deployed in a line and each node is provided with a unique and successive identification from 1 to M. All nodes except BS are powered by limited unchargeable battery.
It is assumed that transmission range, one of the key parameters, is set in ½D min , D max and is changed according to the transmission of control messages and sensed data packet, where D min is the distance between two neighboring nodes.
Let the number of nodes in the maximum transmission range be j, then D max = jD min . Interference range R I (v i ) of node v i represents the range that the transmission of node v i interferes with the reception of node v k v k À v i k kł R I (v i ) when node v i transmits in fixed power. 28 The one-dimensional queue network can be modeled by a connected graph G = (V , E), where V is a set of all sensor nodes aligned on a line and E is a set of directed links between nodes. Let the specific node in V be the BS and R V is the set of data collection nodes defined by a monitor. Each directed link has a non-negative weight w, which denotes the total energy consumption in transmission and reception when node v i sends a packet to its neighboring node v j .

Energy model
In this article, we refer to transmitting and receiving energy consumption model of wireless communications as it is used by Bhardwaj et al. 29 and Min et al. 30 The energy consumption of transmitting and receiving l-bit packet, E tx and E rx , in this model can be expressed as follows where E elec is the basic energy consumption of running transmitter and receiver circuit and e amp is the power coefficient of transmitting amplifier circuit. d is the distance from source to destination node, and t is wireless channel path-loss factor on the transmission path, which depends on the condition of wireless channel and satisfies 2 ł t ł 4. In our work, we set t = 2. From above two equations, it is known that the energy consumption of transmitting l-bit packet is always much greater than packet receiving energy. In our model, it is assumed that the noise and environmental factors are constant, so only the transmitter can adjust its transmission power in the range of ½D min , D max to make E tx to reach the minimum value.

Problem description
Construction of the routing tree is the precondition for collecting sensed data in WSNs. In Luo et al., 7 the optimal transmission distance to prolong the network lifetime by maximizing energy efficiency is derived as a constant (approximately 32 m). Therefore, in our work, we will achieve energy efficiency in forwarding by adopting this optimal transmission distance in onedimensional queue WSN as the one for communication between two neighboring cluster heads (CHs). From now on, this distance will be called the optimal relay transmission distance. The optimal relay transmission distance is changed according to actual condition such as the distance to an energy equivalent node from each node and residual energy of each node in forwarder set.
In general, routing based on clustering includes clustering (deciding a cluster head and cluster members joined to it) and then constructing the routing tree for relaying. However, since the network topology is linear and the relay distance between clusters are confirmed, clustering and constructing the routing tree are performed simultaneously. Clustering and constructing the routing tree are accompanied by exchanging control messages. So simultaneous performance of these two stages enables the number of control messages to be reduced. Besides, in timeslot allocation phase, which introduces sleep mode, a timeslot is allocated to each node in the routing sub-tree that is included in data collection set following the demand of a monitor without interference based on the routing tree that includes all nodes in entire network. In general, construction of routing sub-tree consisting of the above data collection set and timeslot allocation are not performed simultaneously. First, the routing sub-tree is constructed and then control messages are used for timeslot allocation. However, special topology of one-dimensional queue WSN provides the possibility that even timeslot allocation could be simultaneously performed and enables the number of control messages to be reduced.
From above consideration, we define construction of the routing sub-tree and timeslot allocation problem to reach the main goal of our work as follows.
Definition 1. Given one-dimensional queue network G = (V , E), data collection set R and k available timeslots, constructing the routing sub-tree and timeslot allocation problem is construction of the routing tree by dividing the sensor network into clusters based on the optimal relay transmission distance and simultaneously timeslot allocation to each node without interference between nodes to reduce the overhead of the overall control messages.
Such problem is realized by following algorithm.

The proposed algorithm
Distributed Energy Efficient Opportunistic Routing accompanied by Timeslot Allocation (DEEOR-TA) is summarized as follows. DEEOR-TA algorithm is run in several rounds and each round involves two phases of clustering-based routing tree construction accompanied by timeslot allocation and data transmission.
Clustering-based routing tree construction phase accompanied by timeslot allocation contains two stages of routing tree construction and timeslot allocation. In a stage of the routing tree construction, the whole onedimensional WSN is divided into clusters by selecting cluster heads (CHs) and cluster member (CM) nodes based on the optimal relay transmission distance. During this, the routing tree for collecting and relaying sensed data is also constructed. In timeslot allocation stage, energy consumption is minimized by allocating timeslots to CH nodes and their CM nodes based on the routing tree construction (BS is located at the root, a CH at each edge and CM nodes in leaves). Considering interference between nodes, timeslot allocation and constructing the routing tree are performed at the same time so that another control messages for timeslot allocation would not be used. This enables total sensed data report latency to be minimized. So the total energy consumption could be reduced further. To balance the energy consumption and prolong the network lifetime further, CH role giving up operation mode is adopted that makes a node plays only the role of CM node if its residual energy reaches its lower threshold. In data transmission phase, each sensor node aggregates its sensing data to its CH in an interference-free timeslot allocated to itself in the whole network and each CH conducts the aggregated sensing data to BS via the constructed routing tree.
The description of control messages that are used in the proposed algorithm is illustrated in Table 1.
As shown in Table 1, distance to BS or number of relay nodes is not represented in fields of all control messages. In one-dimensional network node-ID can represent its geographical location, so it can be calculated when the identification of each node, node_ID, is received correctly.
More details are provided in the following sections.

Cluster-based routing tree construction and timeslot allocation
Clustering-based routing tree construction. At this stage, CHs are selected among sensor nodes and the routing tree is constructed via them. For this purpose, we define the wireless transmission range r inter and r intra , respectively, for inter-cluster and intra-cluster communications. Let the optimal relay transmission distance for selecting relay nodes in a linear network verified in Luo et al. 7 be D optimum . The energy consumption for relaying can be optimized by using this distance in inter-cluster communication. The inter-cluster communication distance is defined as r inter = D optimum , and the intracluster communication distance is defined as r intra = 1/ 2D optimum .
First-level cluster. At the beginning, BS initializes new data collecting task and broadcasts BS_Msg message in r inter for routing and timeslot allocation. Each node that receives BS_Msg and that its distance to BS is lower than r inter calculates its priority by the following formula (3) where P(i) represents the priority of node i. h is the level number of cluster and belongs to ½1, L (L is the number of levels). D optimum is the optimal relay transmission distance calculated in Luo et al., 7 d(i) is the distance from node i to BS, E max denotes the initial energy of nodes, and E i denotes the residual energy of node i. E threshold denotes the threshold energy. a is a weighted coefficient to coordinate distance and energy. When a is greater, the nearer to D optimum the node is, the higher priority it Table 1. Description of control messages.

Message Description
BS_Msg Tuple(token, R, (k21)) where token is initiation token and R is data collection set. (k21) means that the number of available timeslots is k and that (k21)th timeslot is allocated to BS for receiving data from the first-level CH. Hello_Msg Tuple(node_ID, node_priority, node_energy, R_membership) where node_priority is priority of a node that could be selected as CH, node_energy is residual energy of a node, and R_membership represents whether it is included in R. CH_Msg Tuple(node_ID, R, k#, (k#21)_idlesub-timeslots) where R is data collection set. (k#21)_idlesub-timeslots is sub-timeslots of (k#21)th timeslot which is not used yet. k# is a timeslot allocated to the next upper level CH. Join_Msg Tuple(node_ID, CH_ID, (k#21)_assigned_sub-timeslot) where (k#21)_allocated_sub-timeslot is a sub-timeslot allocated to itself in (k#21)th timeslot.
has. When a is smaller, the more the residual energy is, the higher priority it has. We shall set the a value in experiment suitable for environment and application of this work. For calculation of priority, relative concepts are used since it is impossible to directly compare the distance and the energy. Then, each node that receives BS_Msg massage within r inter exchanges Hello_Msg massages with its neighboring nodes within r inter to get their local information. To avoid collision of packets, each node sets the timer based on its P(i) and if the timer expires, broadcasts its Hello_Msg massage. Hello_Msg includes its node identification, residual energy, membership in R, and priority information expressed by formula (3).
After exchanging Hello_Msg messages, the first-level cluster is formed. Each node gets neighboring nodes' local information via exchanging Hello_Msg messages and compares its priority with the others. From formula (3), it is known that the node that is closer to D optimum and has more residual energy, that is, the node with highest priority is selected as CH 1 .
Afterward, CH 1 broadcasts CH_Msg in r inter . D optimum =D min Ä Å nodes (to simplify the consideration, if the number of nodes including CH in a cluster is odd, respectively D optimum =2D min Ä Å = n=2 on the right and left. And if the number of nodes in a cluster is even, D optimum =2D min Ä Å = n=2 on the right and D optimum =2D min Ä Å À 1 on the left respectively), which receive CH_Msg and its distance to CH 1 is smaller than D optimum =2, inform CH 1 that it is a member node of the first-level cluster by replying Join_Msg if it is contained in R. CH and CM nodes formed in first-level cluster are denoted as CH 1 and CM i 1 that means it is the cluster head and member node of the first-level cluster, respectively (CM i 1 : 1st member node of 1st cluster). Since the first-level cluster plays the role of relaying more than sensing, different ways may be used to balance the energy consumption: increasing density of node in a cluster, forming two-dimensional cluster in the first-level cluster, making nodes in the first-level cluster be only responsible for relaying and so on. Each member node CM i 1 transmits its sensing data to CH 1 .
CH 1 aggregates sensed data and then transmits it to BS. If a parent node of each CH is denoted as parent(CH), parent of CH 1 is parent(CH) = BS. Each node which is not joined to the first-level cluster, in so-called 0-level cluster, directly transmits sensed data to BS.
Lower level cluster. Each node in lower levels, which receives CH_Msg from the higher cluster and was not joined to the higher cluster, calculates its priority by formula (3). It represents the possibility that may be selected as a cluster head. Next, each node gets local information of neighboring nodes via exchanging Hello_Msg and CH h is selected based on that. Through broadcasting CH_Msg of the selected CH h and replying Join_Msg of nodes following that, the lower level cluster is formed. CH and CM nodes formed in lower level cluster are denoted as CH h and CM i h that represents the number of level. Note that even though no node is involved in R in constructing a cluster, one node should be selected as CH for relaying data when each level cluster is formed. At the same time as the hth level cluster is formed, the routing tree is constructed for relaying aggregated data from hth level cluster to (h À 1)th level cluster. When a cluster is formed and its CH is selected, we make the relay distance from CH h to CH hÀ1 satisfies the optimal relay transmission distance D optimum of Luo et al. 7 So a parent of CH h is parent(CH h ) = CH hÀ1 and relaying distance is the optimal relay transmission distance D optimum . In such way, the routing tree T is constructed in G = (V , E) where BS is located at the root, CH at the edge and CM nodes in leaves. Figure 1 shows formed clusters through this process and the routing tree.
CH role giving up operation mode. To balance the energy consumption and to prolong the network lifetime, CH role giving up operation mode is introduced. In this mode, a node with residual energy that reaches the predefined energy threshold gives up CH role and plays only the role of CM. In more detail, in the successive data collection process, if all nodes in hth level cluster have smaller residual energy than E threshold in Figure 1. Clustering-based routing tree construction in one-dimensional queue WSN. formula (3), the lower threshold of residual energy E lowerÀthreshold is used to form cluster. The lower threshold value is set to the half of E threshold in equation (3) according to Darabkh et al. 5 Then, formula (3) will be changed as follows All nodes in a cluster recognize whose residual energy reaches the lower threshold through taking local information by exchanging Hello_Msg. In other words, a node with residual energy that reaches the lower threshold value sets its priority to 0 as shown in formula (4) and exchanges its priority. A node with priority 0 is excluded in selection of CH and senses data playing only the role as CM. If all nodes have lower residual energy than the lower threshold E lowerÀthreshold , we will set the energy threshold to lower energy threshold and continue collecting data.
Timeslot allocation. At this stage, timeslots are allocated to each node in routing sub-tree at the same time as the routing sub-tree including all nodes in R is constructed based on the routing tree T where all nodes in the entire network are connected. Timeslot allocation must be performed in such way that nodes can be interferencefree and total sensed data report latency can be minimized. 31 We accept a time-division model that time is divided into fixed length timeslots in timeslot allocation. k consecutive timeslots are grouped together into a frame. In each frame, a timeslot ts i 2 f0, 1, 2, . . . , k À 1g is allocated to each cluster head CH i in routing tree T, where k denotes the number of timeslots allocated to the whole network, ts i is a timeslot allocated to CH i . During timeslot ts i , CH i announces a beacon to synchronize with its children and wakes them up. Then it collects sensed data from them. During other timeslots excluding ts i , CH i goes to sleep mode. The value of k should be large enough to ensure that each node can find a timeslot. 32 Because we define communication distances as r inter = D optimum and r intra = 1/2D optimum , interference range of inter-cluster communication and communication between CM and CH are 2D optimum and D optimum , size of a cluster, respectively. Since the network we consider is one dimensional, if ts i 2 f0, 1, 2g among k = 3 timeslots in total is allocated to CH i , we may perform data collecting task without interference. When the number of nodes CM in a cluster is n, ts i of CH i contains all timeslots allocated to CM i to ensure interference-free communication of n CMs toward CH. And a timeslot allocated according to whether CH i is included in R or not, and another one for relaying data that receives from the lower level CH are contained in ts i . Therefore, timeslots allocated to CH i and CM i are considered sub-timeslots of timeslot ts i 2 f0, 1, 2g. Timeslot allocation is detailed in each level as follows.
Timeslot allocation to the first-level cluster. First of all, CH 1 of the first-level cluster recognizes which node is involved in data collection set R among its CMs through receiving BS_Msg. Also, it notices that k À 1 = 2nd timeslot among k = 3 timeslots is allocated to itself for relaying data to BS. Each timeslot, which would be allocated to CH, consists of subtimeslots illustrated as Figure 2. Each node, which is not joined to the first-level cluster and so-called 0-level cluster, directly transmits the sensed data to BS by using sub-timeslots allocated to BS.
All nodes in the first-level cluster would be recognized whether the others are included in R exchanging Hello_Msg each other or not.
Once CH 1 is selected through exchanging Hello_Msg, CH 1 broadcasts CH_Msg including (k À 2)th timeslot with D optimum =D min Ä Å + 2 = n + 2 sub-timeslots, where one sub-timeslot is for relaying data that receives from the lower level CH and other (n + 1) slots are for all nodes including CH in the current level. Then, the first sub-timeslot is used for relaying data that receives from the lower level CH 2 to BS, s(CH 1 ) = (k À 2 : 1) mod (n + 2), where k À 2 : 1 denotes the first sub-timeslot of (k À 2)th timeslot.
Once the selected CH 1 is included in R, it should get the second sub-timeslot for its own sensed data, that is, s(CH 1 ) = (k À 2 : 1, 2) mod (n + 2), where s is a subtimeslot allocated to CH i . In this case, CH 1 would make CH_Msg and broadcast, including the information that the first and second sub-timeslots of (k À 2)th timeslot are allocated to itself. Each node CM i 1 , which is included in R and in the first-level cluster by replying Join_Msg including the number of a sub-timeslot allocates to it once it receives CH_Msg, declares sub-timeslot allocation. At that time, sub-timeslots are allocated to member nodes of CH 1 from the farthest forward neighboring node away CH 1 in the sequence of 3 rd , 4 th , ... If CH 1 is not the member of R, sub-timeslots are occupied from the second.
As mentioned above, in our work, a parent node just sets out sub-timeslots which are not occupied yet and a child node occupies them for itself different from prior works where a parent node allocates sub-timeslots to its child nodes. The precondition for using this method is that the network topology is one dimensional and linear. So each node has the unique and consecutive identification and certain geographical position. Timeslot allocation to the lower level cluster. In the lower level (ex. h level) cluster, timeslots are also allocated following the above allocating principle. First, a timeslot is allocated to CH h as follows where j = 1, 2, 3, . . . . Sub-timeslots of ts(CH h ) in h level of CH h are occupied in the same way as CH 1 . Sub-timeslot allocation to CM i h can be generalized as follows. The first sub-timeslot of ts(CH h ) is allocated for relaying data from CH hÀ1 . If CH h is a node in R, the second sub-timeslot is occupied for its own sensing data.
Then, the remaining is allocated to the neighboring nodes from the forward neighboring nodes CM i h of CH h , where i of CM i h denotes the sequence number of member nodes included in h level cluster. They are numbered from the farthest forward neighboring node away CH h to the farthest backward neighboring node away CH h .
Then, s(CM i h ) is denoted as follows where k 00 is a sub-timeslot allocated to CH h . It represents the case when all CM i h nodes in h level cluster are included in R. In other case, that is, when some nodes are not included in R, sub-timeslots are allocated to member nodes in turn from the second or third subtimeslot (it is determined whether CH h is contained in R or not), and inform CH h using Join_Msg. In the last L level, the first sub-timeslot is not allocated for relaying data and if CH L is involved in R, but it is allocated for sensing its own data. Figure 3 shows timeslots and sub-timeslots allocated to the nodes which are involved in R in the routing tree T. A number in circle denotes the number of timeslot allocated to CHs and a number denoted as x : y means yth sub-timeslot of xth timeslot. Algorithm 1 shows h level cluster formation algorithm accompanied by routing tree construction and timeslot allocation.

Data transmission
In this case, a CM node, which occupies a timeslot, would wake up so as to transmit its sensed data to its CH during its timeslot.
Then, it would go to sleep. Note that a CH needs to wake up to aggregate data relayed from the lower level CH and sensed data by CMs in the current level, and that relays data to the upper level CH along the routing tree T. This process is repeated until sensed data finally reach BS.
Protocol analysis Theorem 1. The overhead complexity of control messages, when DEEOR-TA is run, becomes 2M in each round.
Proof. For a new collecting task, each node within r inter exchanges Hello_Msg by initial broadcasting of BS_Msg message, and then CH 1 is selected. After CH 1 broadcasts CH_Msg, each node in lower level Algorithm 1. h Level cluster formation algorithm accompanied with routing tree construction and timeslot allocation.
Theorem 2. If the number of relay nodes interfering with each other is m, timeslot allocation without interference is possible when the number of available timeslots k satisfies k ø m + 1. And the relayed data report latency is at most (L21).
Proof. Let each node have one or two direct neighboring nodes and interfere with each node in m relay nodes in one-dimensional queue network, where m satisfies m ø 2. So the maximum neighboring limit of the interference set can be set 2 m. The interference set is considered dividing into two sets of CHs and of CMs. Each node in set S CH ={CH i |i2[1,L]} of CHs has the transmission range of R T (CH i ) = 3/2D optimum and R I (CH i ) = 2 3 R T (CH i ) = 3D optimum if the interference range is set twice of the transmission range. Thus, each CH interferes with m( = 2) CHs within interference range and k = m + 1 = 3, where CHs are included in the range. And each CM node has the transmission range R T (CM i ) = 3/4D optimum so the interference range is R I (CM i ) = 2 3 R T (CM i ) = 3/2D optimum . The distance between two neighboring CMs is D min = D optimum =n Ä Å (where n denotes the number of CMs in a cluster) and the range of a cluster is D optimum . But each CM in set S CM occupies a sub-timeslot of a timeslot allocated to its CH. So interference between CM nodes is restricted within range of a cluster unless a timeslot of CH is duplicated. Thus, m =n + 1 (where n denotes the number of CM nodes in a cluster) CM nodes interfere with each other and (n + 1) subtimeslots must be allocated to each CM in each cluster.
Eventually, the number of timeslots and subtimeslots for interference-free timeslot allocation must be set k =m + 1 = 3 and k =m + 1 =n + 2, respectively, in the case of S CH and S CM . Sensed data report latency from node i to node j is defined as the number of timeslots (or sub-timeslots) that node i should wait for transmitting to node j. Thus, the number of sub-timeslots that each node in a cluster should wait is n + 2 = D optimum =D min Ä Å + 2 if whole CM nodes in a cluster are involved in R. Namely, sensed data report latency of CM is at most n + 2 = D optimum =D min Ä Å + 2. Relayed data report latency means the number of timeslots that each CH should wait for relaying aggregated sensed data to BS.
There are L CHs, and one of them doesn't play the relaying role, so relayed data report latency is at most (L À 1).
Theorem 3. Energy consumed for timeslot allocation of DEEOR-TA never reaches by twice of optimal value.
Proof. In timeslot allocation that is interference-free timeslot allocation to each node in the data collection set R accompanied by constructing the routing tree T, time slots for transmitting and receiving are fixed. Therefore, the difference between energy consumption in different timeslot allocation is the one between cost paid for timeslot allocation and synchronizing.
Each node switches its mode (from sleep mode to active mode) at least twice in the proposed timeslot allocation. In more detail, as shown in Figure 4, CM must wake up for transmitting its own sensed data to its CH.
Besides, CH must wake up for aggregating sensed data from every CM node including itself while receiving aggregated data from the lower level cluster and for transmitting aggregated data to the upper level cluster according to its reception requirement.
As there are L CHs in the network, Lth level CH has no lower level, so the number of CHs that must wake up twice is equal to (L21). Thus, the total number of nodes that must switch its mode is at least M + (L21) and energy consumption for switching mode is [M + (L21)] times as much as that of one node. For any scheduling, each node needs to switch its mode at least once and energy consumption at this time can be considered the optimal energy consumption. If the optimal energy consumption for switching mode is denoted as E optimum state switch , then E optimum state switch ø M 3 E state switch , where E state_switch denotes the energy of a node consumed for switching mode.
The total energy consumption of the proposed protocol is expressed as formula (8) where E total active denotes energy consumed when all nodes are in active mode and E total state switch denotes total energy for switching mode. Thus, we conclude that energy consumed for timeslot allocation of DEEOR-TA never reaches by twice of the optimal value.

Performance evaluation
In this section, we evaluate the performance of our protocol in various aspects and then compare with ENS_OR and TE_OR, OR algorithms in onedimensional queue WSN.

Simulation environment
We conduct experiment by MATLAB with 200 nodes uniformly distributed over a line. The uniform distance between neighboring nodes(D min ) is 5-25 m and intercluster and intra-cluster communication distances are, respectively, set r inter =D optimum ' 32 m, Other simulation parameters are listed in Table 2.
In this article, we assume that all nodes in entire Next, network are included in data collecting set R, that is, each node in entire network generates packets periodically and relays sensed data to BS. A duty cycle of each node is 0.1%. For instance, this is the duty cycle of a sensor that wakes up once every 1 s for 10 ms.

Performance metrics
We define four measurable metrics to evaluate the performance of DEEOR-TA in one-dimensional queue WSN.
Average of residual energy: More average residual energy indicates better energy efficiency of routing algorithm and it would help to prolong the network lifetime.
Variation of residual energy: It is used as a metric to evaluate the energy balancing characteristic and deviation. The smaller it is, the better the balancing characteristic and deviation are. It is calculated as standard deviation of residual energy.
Number of dead node: It is the number of nodes that run out of energy. This metric reflects connectivity of one-dimensional WSN. If dead time of a node is long, the number of dead nodes doesn't decrease and good network connectivity can be hold.
Network lifetime: the network lifetime is defined as the time when the BS is unable to receive packet sent from the source node. It is closely related to the energy consumption and network connectivity.

Simulation results and analysis
Performance of DEEOR-TA. We assume that each node in the network periodically senses data and reports. Under this assumption, we consider the energy efficiency of DEEOR-TA.  First, we evaluate how parameter a affects to selection of CH. In this experiment, we use min-max normalization in Jain and Bhandare 33 for the purpose to get values of distance factor and energy factor in the range [0,1] because the contribution degree of distance and energy factors to calculation of priority P(i) of node i in formula (4) We use priorities calculated by formula (9) for selection of CH. It is known that the suitable range of the value of a is a = 0:4 À 0:6. So we set a = 0:5 in the following experiments.
Next, Figure 5 shows the simulation results when data is aggregated to BS using the routing tree with timeslot allocation and without timeslot allocation. DEEOR denotes the routing algorithm without timeslot allocation and DEEOR-TA denotes the routing algorithm with timeslot allocation. In addition, DEEOR-TA uses CH role giving up operation mode.
From the simulation results, if we introduce sleep mode we can prolong the network lifetime about three times compared with the case without sleep mode, where the distance between two neighboring nodes is 5 m. In the cases of extra distance between two neighboring nodes, the network lifetime can be prolonged more than twice.
Especially, Figure 5(e) and (f) illustrates that the variation of residual energy and the number of dead nodes decrease if CH role giving up operation mode is introduced so that we can balance energy consumption to prolong the network lifetime more.
Comparison with other protocols. We analyze our protocol compared with ENS_OR, 7 ENS_OR with sleep mode 8 and TE_OR. 6 We conduct following experiment considering that ENS_OR or TE-OR is an OR algorithm only for relaying data but sleep mode is not introduced and interference is not considered.
Both ENS_OR with idle mode and ENS_OR with sleep mode are event triggering schemes. ENS_OR with sleep mode is also run as the same way with ENS_OR with idle mode in data gathering scheme that all nodes sense data in cycle during a timeslot allocated to itself like our proposed algorithm. So we expand ENS_OR (ENS_OR with sleep mode) and TE-OR into the cases with timeslot allocation and compare with our protocol. We set the interference-free communication range k = 3 under the consumption that nodes within the range D optimum (approximately 32 m) and R (50 m) form a so-called cluster. Experiment results are illustrated in Figure 6. Figure 6(a) shows average residual energy of our protocol is much greater than that of ENS_OR and TE-OR and TE-OR has the worst. Figure 6(b) illustrates that variation of residual energy of the proposed protocol is greater than others in certain time (about 160 min) but as time goes, it gets much smaller so that energy consumption balance is ensured. This is because the number of CH nodes that consume much energy is small in the beginning of operation compared with the total number of nodes but after certain time, all nodes play the role of CH so variation of residual energy gets small. Especially, using CH role giving up operation mode makes this parameter smaller. And in ENS_OR and TE-OR, data are not aggregated and directly relayed by finding opportunistic relay distance. Thus, the energy consumption is balanced in certain time but it increases rapidly when nodes run out of energy. Figure 6(c) shows that ENS_OR and TE-OR are pure relay node selection algorithm without clustering and they can prolong the network lifetime before the certain time. After the certain time, the number of dead nodes increases rapidly. Especially, in TE-OR relay distance of each node is longer than of others so it has shorter latency but greater energy consumption. Thus, nodes are dead faster than ENS_OR. And in preceding two algorithms, nodes are dead at the same time since all nodes transmit data in opportunistic relay distance.
In total, Figure 6(d) shows that our protocol can significantly prolong the network lifetime compared with ENS_OR and TE-OR with rough timeslot allocation. In more detail, simulation results show that our protocol can help to prolong the network lifetime more than twice when the distance between two neighboring nodes is 5-20 m. And when the distance is 25 m, the network lifetime of our protocol is similar to that of ENS_OR because one node is just one cluster and only plays the role of relaying.

Conclusion
Optimization of energy consumption is one of the key problems in routing design in one-dimensional queue WSN. In this work, we have proposed a distributed energy-efficient opportunistic routing algorithm that routing tree construction and timeslot allocation are performed at the same time by using specific network topology of one-dimensional queue WSN. Existing opportunistic routing algorithms in one-dimensional queue WSN have been proposed as OR for ensuring energy efficiency and time limit regardless of introduction of timeslot allocation and interference between sensor nodes. Our main goal is to minimize the energy consumption derived from overhead of control messages as possible by performing timeslot allocation and routing tree construction simultaneously with the characteristic of linear network topology. For this purpose, we have given the definition of the routing tree construction and timeslot allocation problem using optimal relay transmission distance of OR in one-dimensional queue WSN and explained the detailed algorithm. We have optimized not only its energy consumption by introducing sleep mode that ensures data aggregation to BS without interference but also have improved its energy efficiency by adopting operation mode giving up CH role in clustering. Extension simulation results show that the proposed protocol supports better energy efficiency than the other existing protocols, so it can help to prolong the network lifetime.

Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.

Data availability
The data used to support the findings of this study are available from the corresponding author upon request.