1 Introduction

Simple wireless sensor networks (WSNs) usually have a flat topology and transmit data using a flooding scheme, of which there are several variants. However, flooding can cause the broadcast storming problem [1], reducing the efficiency and reliability of the WSN.

Hierarchical topology control (TC) schemes [25] are designed to overcome the broadcast storming problem and to support in-network processing, which improves network performance. A drawback of hierarchical TC schemes is that an imbalance in residual energy between aggregation nodes and general nodes can occur over time, since the aggregation nodes can be expected to consume energy faster than the others [6]. It is even possible for some aggregation nodes to cease participation in the network because they lack energy. In previous schemes [2, 4, 7], this problem has been overcome by getting nearby energy-rich nodes to take over the roles of defunct aggregation nodes; or new aggregation nodes must be deployed to extend the lifetime of the WSN.

In a WSN which uses hierarchical TC and operates for a long period, the imbalance in residual energy between the nodes can become serious as the number of failed and insertions or removals replacement nodes recounts of [8]. Draconian changes to the network topology are also likely to be necessary over time.

We propose new TC scheme designed specially for WSNs which are to be maintained for a long period. It minimizes the variation in residual energy between nodes, and thus extends the network lifetime. This goal is achieved by replacing the usual one- or two-layered topology with multiple layers, which can accommodate a wide range of node energy levels more precisely. This new scheme also gets nodes to change roles dynamically as the energy and traffic context changes. This is necessary because the energy level of each node and the network topology can both change radically in long-term WSNs. In our scheme, each node periodically determines its own layer in response to its energy status, with traffic and topology information. There has been a lot of research on hierarchical topologies for WSNs; but, to the best of our knowledge, this is the first context-aware multi-layer TC scheme for long-term WSNs.

The rest of this article is organized as follows: We explain the outline of the hierarchical TC and its problems in the next section. In Section 3 we describe our layer-based TC scheme for long-term WSNs. We then evaluate the performance of our algorithm in Section 4 and draw conclusions in Section 5.

2 Background

2.1 Preliminaries

Hierarchical TC schemes have been shown to produce considerable savings in the total energy consumption of a WSN because of data aggregation [7]. In a hierarchical TC scheme, the nodes are clustered and a head node is assigned to each cluster. A head node is the leader of its group, with the primary responsibility of collection and aggregation of data from its cluster, and transmission of the aggregated data to the sink. Data aggregation greatly reduces energy consumption, because it reduces the total number of messages to be sent to sink, and hence extends network life time. Clustering involves a configuration and maintenance overhead; but in practice it has been demonstrated that clustering improves both energy consumption and performance in large WSNs.

Clustering is not without its problems: a node that cannot act as a cluster head and is not near to a cluster head becomes void, as shown in Figure 1a; and the cluster heads consume much more energy than the other nodes, leading to an imbalance across the network. This effect also occurs in a tree-based hierarchical topology, as nodes near the sink node have to transmit considerably more data than those at the rim of the network [9], as shown in Figure 1b.

Figure 1
figure 1

Problems in cluster and tree topologies. Void problem in a cluster topology and energy imbalance of tree topology.

2.2 Related work

Oyman and Ersoy [8] investigated the choice of multiple sinks. They use a cluster scheme in which the sinks act as cluster-heads, and each node only reports to one cluster-head. Das and Dutta [10] proposed a similar method of sink selection, designed to minimize overall energy consumption.

Buratti et al. [1113] considered the reachability of multiple sinks in tree-based topologies with fixed node and sink densities.

Kim and Lee [14], and Fan et al. [15] used a spanning tree to control a topology in multi-sink WSNs. Kim and Lee's scheme reconfigures itself automatically when nodes fail, increasing network lifetime.

Fan et al. [15] proposed a three-layer topology for large-scale WSNs in which each layer has its own role. They provide an algorithm that finds all the bottleneck nodes and eliminates them.

Ciciriello et al. [16] introduced a scheme in which the search for a multi-sink topology is mapped to a multi-commodity network design problem. This scheme periodically adapts message paths to reduce the number of network links that are used, increasing the efficiency of data transmission.

Intanagonwiwat et al. [17] create a tree which is limited to a single sink at its root. Paths from sensor nodes nearer to the sink are added earlier gradually.

Other authors [1820] have also utilized a three-layer topology as the basis for control algorithms for static WSNs. Sharma et al. [18] create high-performance clusters and zonal sink nodes in order to increase the lifetime of sensor nodes. Duan et al. [19] used several fusion nodes and a control node to reduce the energy consumption of mobile nodes. Ming et al. [20] introduced a logical three-tiered TC model which consist of relay nodes, application nodes and sensor nodes. Their cluster-heads organize themselves into a near-uniform distribution across the network.

3 Layer-based TC

We will now introduce the architecture of our scheme and explain how the nodes decide which layer they should belong to. The network we will discuss is composed of battery-based sensor nodes, each of which periodically transmits the data it has acquired to a sink node.

3.1 Proposed scheme

Each node selects a layer to join from its context, which is primarily its residual energy and the amount of traffic it has to handle, and the nodes in each layer treat the nodes in higher layers as sinks, as they would in a multi-sink network. Figure 2 shows a simple three-layer topology that might be constructed at a particular time by our scheme. If a node can send its data to an upper-layer node directly, it does so; otherwise it sends it to a neighbor on the same layer for relaying. In Figure 2, for example, nodes n3, n5, n7, n8 and n10 in Layer 2 send data to the upper-layer nodes. Node n5, for example, can send data to a higher-layer node directly; but nodes n1 and n2 have to transmit data through neighboring nodes.

Figure 2
figure 2

Overview of our layer-based topology. The simple three-layered topology which is constructed on a certain time by the proposed scheme.

Since our scheme uses same-layer nodes for relaying, fewer void nodes are caused by the absence of cluster heads, as shown in Figure 3. We will explain this in more detail in Section 3.2.

Figure 3
figure 3

Prevention of void nodes. Our scheme avoids void node problem by using same-layer nodes as a relaying node.

3.2 The layering algorithm design

We consider each node n i to have a set N i of neighbor nodes and each node sends data towards the sink node s at the end of every period P G . The sink node s broadcasts topology control information (TCI) messages at the start of every setup period P S by using data flooding. This data determines the layer of each node.

Figure 4 shows the stages in our algorithm. First, the sink node s0 (in Layer 0) broadcasts a TCI message for the current round, of length P S . This message is composed by the sink node, using information gathered from all the nodes in the WSN before the setup period. We assume that P S is even greater than P G because our target is long-term WSN in which layer selection is rarely occurred. Thus the overhead of flooding TCI message is little enough to be negligible.

Figure 4
figure 4

Stages in the TC process.

A node n i can determine its layer j from this information, and can be written n i j . If a node n i j receives another TCI message from a node in a layer higher than j, it re-determines its layer from the new TCI message; but this layer must not be higher than the layer of the sender of the TCI message. Otherwise, the node would become void, as shown in Figure 5, and the data sent to it from lower-layer nodes would be lost. After it has determined its layer, a node adds that information to the TCI message it received, and broadcasts the revised message to its neighbors. Repetition of this process makes it possible for all the nodes to determine their own layer. Algorithm 3.2 is a formal statement of this procedure.

Figure 5
figure 5

Void node created by incorrect delivery of TCI messages.

Algorithm 1 Layer-based TC algorithm

Require: Sink node s broadcasts the TCI message.

Require: The layer j of each node is MAX_LAYER

Require: s calculates R ̄ , the average expected lifetime of all nodes.

Ensure: Determining the layer j for n i j

1: if n i j receives the TCI message from n k a then

2:  if j > a then

3:   lj

4:   ja

5:   while j < l do

6:    calculating the estimated lifetime R i j of n i j {Equation (6)}

7:    if R i j > R ̄ then

8:     broadcasting the TCI message {j is selected as the new layer for n i j }

9:     return

10:    else

11:     jj + 1

12:    end if

13:   end while

14:  end if

15: end if

3.3 Layer determination

Each node determines its layer by comparing its expected lifetime with the average lifetime of all the nodes. We will now explain this layer-determination algorithm in detail.

3.3.1 TCI message

All the nodes in the WSN send the information described in Table 1 to the sink node s, so that it can prepare the TCI message. From this information the sink node calculates Cj , the number of nodes currently in each layer, the average lifetime of all nodes, R, and the expected amount of data that each layer should relay, L ̄ relay j . This information is put into the TCI message; Table 2 describes all the information contained in a TCI message.

Table 1 Node information required in preparing a TCI message
Table 2 Information in a TCI message

3.3.2 How a node selects its layer

A node receiving a TCI message determines its layer by comparing R ̄ with its expected lifetime. This is calculated from the following energy model [21]:

e consume  =  e trans + e receive + e elec ,
(1)

where etrans and ereceive respectively are the amount of energy consumed when the node sends and receives packets, and eelec is the energy consumed by the electronics. If packets are transmitted for P seconds and the transmission range is tr, the amount of energy consumed is

P e consume  =  L trans β t r α + P ( e receive + e elec ) ,
(2)

where Ltrans is the number of bits in packets transmitted for P seconds, α is the path loss (2 ≤ α ≤ 5), and β is the energy used by the power amplifier for transmitting 1 bit over a distance of 1 m. Thus we can calculate the energy consumed in one round by a node n i belonging to layer j, as follows:

e round i j = P P G L trans j β t r i α + P S ( e receive + e elec ) .
(3)

L trans j is the size of a packet, which is the sum of the packet header size Lhead, the amount of data c i j received from a lower layer, and the amount of data L relay j to be relayed from nodes on the same layer, as follows:

L trans j = L head + L data c i j + L relay j ,
(4)

where c i j is the number of lower-layer nodes that send data to n i j . However, we cannot measure the value of c i j accurately because it can change with the topology. Therefore we estimate c i j from h i j , the number of nodes in each layer that sent data to n i j during a previous round, and Nj , the total number of nodes in each layer, as follows:

c i j = k = j + 1 , h i k = - 1 M N k k = 0 j N j + 1 + k = j + 1 , h i k - 1 M h i k , initial h i k =-1
(5)

If use replace L relay j in Equation 4 with L ̄ relay j , and use an average path loss calculated during a previous round as α because we can not get an accurate value, then we use the modified equation to determine the energy consumed by node n i j in layer j during the current round. The lifetime of n i j can be calculated from e round i j as follows:

R i j = e remain i e round i j .
(6)

This computation is repeated for decreasing values of j: the first value of j which satisfies R j j > R ̄ determines the layer of the node. If this inequality is never satisfied, the node enters the lowest layer M. Getting nodes to choose their layers dynamically in this way moves nodes with a lot of energy into higher layers, where they will work harder, while nodes that are nearly exhausted go to lower layers, where they can conserve energy.

4 Simulation

We wrote a simulation in C++ to evaluate the performance of the proposed scheme.

4.1 Simulation environment

From the simulation results, we computed the average lifetime of sensor nodes, and its standard deviation, the average number of data packets transmitted, and the number of dead nodes. We considered a flat network topology, and two, three, and four layers. We simulated a network of 1,000 nodes at a density of 0.02 to 0.1 nodes/m2, and each test set was run for 6,000 rounds and repeated ten times; then the results use averaged. At the beginning of each round, all nodes were classified into layers (except for the flat topology) using Algorithm 3.2. For example, Figure 6 shows the distribution of nodes in each of three layers. The nodes transmitted data to a sink node using the AODV algorithm [22] at an interval of P G . Each sink node broadcasts a TCI message (similar to a Routing REQuest message in AODV) and all nodes send their data along the reverse of the path that TCI message pass through (similar to a Routing REPly message in AODV). Then the nodes in a higher layer aggregate the data received from the lower-layer nodes with their own data, and transmit all the data to the next node. Figure 7 depicts an example of our simulation process. Each node is powered by a battery of finite life, and dead nodes are immediately replaced with new nodes in the same position. Table 3 contains the important parameters used in our simulation.

Figure 6
figure 6

Distribution of nodes in each layer in a three-layer simulation. The layer topology organized by our TC scheme.

Figure 7
figure 7

An example of our simulation process.

Table 3 Important simulation parameters

4.2 Simulation results

Figures 8 and 9 respectively show the number of packets in the network and the average lifetime of the nodes, measured from our simulation. Figure 9 shows that the layered topologies increased the average lifetime of a node by 2.1 to 22%, compared to the flat topology. In general more layers give a higher performance. Figure 8 shows that the number of packets transmitted decreased by between 30 and 50% as the density of the nodes increased. As node density decreases, the opportunity to receive a TCI message direct from a higher layer decreases. Thus there are fewer nodes in the higher layers, and there is less data aggregation. Conversely, as the density of nodes increases, the fewer packets are transmitted, and the lifetime of the WSN increases, as shown in Figure 8. Our simulation used a simple data aggregation strategy, in which a node which receives data from a lower layer removes the headers and forwards the incoming data with its own data. This strategy only eliminates the packet headers received from lower-layer nodes, and thus the average lifetime of the WSN did not increase very greatly. A more efficient aggregation scheme would have much more effect on the amount of data to be sent to upper-layer nodes and we could expect the lifetime of the WSN to improve significantly.

Figure 8
figure 8

Number of packets transmitted. The number of gathered packets in our simulation according to the density of nodes.

Figure 9
figure 9

Average lifetime of nodes. The average lifetime of the nodes measured in our simulation according to the density of nodes.

Figure 10 shows the standard deviation of the lifetime of nodes. This is quite high because the nodes closer to the sink node have a shorter lifetimes since they have to relay more data. Depending on the density of the nodes, the standard deviation is reduced by 9 to 36% by our scheme, compared to the flat topology.

Figure 10
figure 10

The effect of node density on the standard deviation of node lifetime. The standard deviation of the lifetime of nodes according to the density of nodes.

Figure 11 shows the cumulative number of dead nodes. Using the flat topology, many nodes died early because of the high standard deviation of lifetime, whereas nodes separated into layers survived longer. This shows how our scheme can prolong the lifetime of a WSN.

Figure 11
figure 11

Cumulative number of dead nodes. The change in the number of dead nodes with the passage of time.

Our scheme makes adjusts the number of layers adaptively, in response to the changing situations of the nodes, up to a specified maximum. Our experiments suggest that performance is usually improved by increasing the maximum number of layers, up to a certain number, after which there is no further improvement. For example, in Figure 9, when the density is 0.1, the average lifetime of a node is not increased by going from three layers to four. This suggests that the maximum number of layers should be determined by simulation before deployment, since it varies with the number of nodes, their density and distribution.

5 Conclusions

We have proposed a new TC scheme for long-term WSNs. In this scheme, each node deter-mines its own layer, which depends on its residual energy and the current network status. This allows the WSN to balance itself by allocating energy-intensive roles to energy-rich nodes, thus extending the network lifetime.

As sensors become more efficient, long-term WSNs will become more common, and require more sophisticated TC, which we believe can be built on the adaptive layer-based scheme reported in this article.