1 Introduction

Wireless sensor network consists of hundreds and even thousands of small tiny devices called sensor nodes distributed autonomously to observe physical or environmental conditions like temperature, pressure, vibration and motion at different locations such as landslides [3]. Every node in a sensor network usually is equipped with one sensor, a wireless communication device like radio transceiver, a small micro-controller, and an energy supply or a battery. Since the nodes are based on battery, the energy plays a vital role.

The application of the WSN involves several fields, like military battleground, fire detection, and other hostile environments. In these situations, it is difficult to replace the dead nodes caused by energy’s depletion with new ones to operate the network. Therefore, making the sensor nodes operational as long as possible is the main challenge to maximize the network lifetime. The energy consumption of sensor nodes primarily is due to the long distance of data transmission. So, an efficient routing protocol could preserve such energy. Hence, how to design an energy efficient routing protocol becomes the main objective for the wireless sensor networks [5].

The basic objective of any routing protocol is to make the network operational as longer as possible. A cluster-based routing protocol is one of the existing schemes. It groups the sensor nodes where each group of nodes has a Cluster Head (CH). The sensed data are sent to the CH rather than the sink. The CH performs some aggregation functions on the received data and sends them to the sink. LEACH [6] is considered as the most popular routing protocol that uses cluster-based routing mechanism in order to minimize the energy consumption.

The main contribution of this paper is a modified protocol design called TVLEACH that uses two Vice-Cluster Head (V-CH). The first V-CH will take the role of the CH even if the CH is still alive, which will decrease the energy spent on the re-clustering process by delaying the coming of the new round. The second V-CH will be the alternate CH only when the new CH is died.

The remainder of the paper is organized as follows: Sect. 2 presents the LEACH variant protocols. Section 3 presents the proposed protocol. Section 4 shows the simulation results and we conclude the work in Sect. 5.

2 LEACH Variants

LEACH, is a low-energy adaptive clustering hierarchy for WSN. The operation of LEACH can be divided into rounds (Fig. 1).

Fig. 1.
figure 1

LEACH network model

Each round begins with a set-up phase in which the clusters are organized and followed by a steady-state phase where several frames of data are transferred from the nodes to the cluster head and thus, to the sink [1]. Its main objectives are prolonging the network lifetime, reducing the consumed energy, and using the data aggregation to reduce the number of exchanged massages.

In the standard LEACH, the CH always receives the data from the cluster members, aggregates them and then, sends them to the sink that might be located far away from it. Thus, the CH will die earlier than the other nodes in the cluster. When the CH die, the cluster will become useless because the data gathered by the cluster nodes will never reach the sink. In order to overcome this problem, a modified version of LEACH was proposed in the literature and called V-LEACH. In V-LEACH protocol [1], there is a vice-CH that takes the role of the CH (Fig. 2) when the CH dies. By considering these vices-CH, the cluster nodes’ data will always reach the sink and there is no need to elect a new CH each time the CH dies. Consequently, this will extend the network lifetime.

Fig. 2.
figure 2

VLEACH network model

In [2], an extended vice-CH selection is proposed to improve the V-LEACH protocol. The selection process of the vice-CH is based on three factors: the minimum distance, the maximum residual energy, and the minimum energy. In [3], another improvement of V-LEACH was proposed. The vice-CH will be the node that has the maximum energy in the cluster. The vice-CH will take the role of the CH in the later steady-state phase of the current round. Then, the CH itself will become a standard member node because of the too much energy consumption. This will decrease the frequency of the re-clustering process and extend the time of being in the steady-state phase, which could prolong the network lifetime. Although the V-LEACH protocol acts in a very sensible manner, it also suffers from several limits, such as: In the first rounds of the network lifetime (before that the first CH dies), the calculation of the VCH in [1, 2] (which consumes energy) is useless, because the VCH will be operational only when the CH dies. When the CH dies, the VCH will take its place. So, the common nodes will consume much more energy to send their data to the new CH than to the previous CH, if the new CH is situated at the border of the cluster.

3 The Proposed Protocol TV-LEACH

In our improved TV-LEACH protocol, besides having a CH in the cluster, there are two VCH (Vice-Cluster Head), as it is shown in Fig. 3.

Fig. 3.
figure 3

Proposed TV-LEACH

In fact, the Vice CH selection criteria are: the maximum residual energy and the minimum distance from the CH. Thus, the protocols proposed in [2, 3] combine this two criteria. We have found that the protocol in [2] was better than the protocol in [3] in the first rounds of the network lifetime. However, the protocol in [3] was better than that of [2] in the last rounds of the network lifetime. From this, it come the idea of using 2 vice-CH since we have only two criteria.

3.1 Cluster Heads (CHs) Selection (Set-Up Phase)

LEACH ignores the residual energy of each node during the CH selection process. The better results were obtained by just taking the ratio of the current energy and the initial energy instead of taking the square root in the formula for the threshold calculation T(n) [8]:

$$\begin{aligned} T(n)=\left\{ \begin{array}{l} \frac{P}{(1-P*(r \; mod (1/P)))})*\frac{E_{residual}}{E_{initial}}, n\in G \\ 0 \;otherwise \end{array} \right. \end{aligned}$$
(1)

Based on such threshold, we propose a new formula, which will increase the probability of nodes having the higher residual energy to become the cluster head. The threshold is set as follows:

$$\begin{aligned} T(n)=\left\{ \begin{array}{l} ((\frac{P}{(1-P*(r \; mod ((1/P)))})*((1+\frac{E_{residual}}{E_{initial}})*((1-P)\\ +\,(1+\frac{E_{residual}}{2*E_{initial}})))), n\in G \\ 0 \;otherwise \end{array} \right. \end{aligned}$$
(2)

Where: p is the percentage of cluster heads over all the nodes within the network, r: is the number of selection rounds in the current time, G: is the set of nodes that haven’t been selected as cluster heads in the round \(\frac{1}{P}\), \(E_{residual}\): is the residual energy of the node and \(E_{initial}\): is the initial energy of each node.

3.2 Vices Cluster Heads (VCHs) Selection

In the steady-state phase, the cluster head will record the residual energy (\(E_{residual}\)) and the distance from the CH (\(d_{toCH}\)) to each member node. Thus, the CH can have global information (\(id_{node}\), \(E_{residual}\), \(d_{toCH}\)) about its member nodes.

Using this information, the CH will be able to calculate its vices-CH. The process of the 1st Vice-Cluster Head selection criteria is based on the value of \(\lambda \) considered as follows:

$$\begin{aligned} \lambda =\frac{E_{residual}}{d_{toCH}} \end{aligned}$$
(3)

Where \(E_{residual}\) is the residual energy and \(d_{toCH}\) is the distance of the node from the CH. \(\lambda \) is only calculated among cluster heads. The node that has the highest value of \(\lambda \) will become the 1st Vice-Cluster Head. The 2nd Vice-Cluster Head will be the node with the highest residual energy in the cluster. The CH broadcasts a message containing the VCHs id to all the member nodes. The heavy tasks on CH will cause an excessive amount of consumed energy. So, to delay the arriving of a new round which will increase the energy spent on the re-clustering process, the first vice-CH will take the role of the CH and the CH itself will become a standard member node. The new CH also consumes too much energy as the previous CH. A new round begins and new clusters are going to be rebuilt in the set-up phase. The second V-CH will act as a CH only if the new CH dies in order to guaranty the deliverance of the data gathered by the cluster nodes.

4 Simulation

In order to show the effectiveness of the proposed variant, we simulate LEACH variant protocols that use a vice-CH scheme and the improved protocol (Two V-LEACH). The test network parameters are shown in Table 1. The simulation parameters is inspired from previous works [2, 3] to give a fair comparison. Since the network density causes messages’ overhead, we choose a dense network (1000 nodes) to show the effectiveness of the new variant.

Table 1. Simulation parameters
Fig. 4.
figure 4

Consumed energy

Figure 4 shows the result for the energy consumption between VLEACH1 [2], VLEACH2 [3] and TVLEACH. The results show that our proposed TVLEACH protocol is better than the two variants VLEACH1 and VLEACH2 since it consumes less energy.

Fig. 5.
figure 5

The network lifetime

Figure 5 illustrates the performance of our protocol comparing to VLEACH1 and VLEACH2 in terms of network lifetime. As shown in Fig. 5, the sensor network performs longer with TVLEACH in comparison to VLEACH1 and VLEACH2.

In fact, the TV-LEACH protocol is better because in the first rounds when the CH dies, the first Vice-CH (selected on the basis of the distance to the CH and the remaining energy) will be the new CH. So, the common nodes of the cluster will consume less energy when sending their data to the new CH (since it is close to the old CH) than the VLEACH2 protocol where the Vice-CH (selected only on the basis of the remaining energy) could be at the border of the cluster. In the last rounds, TV-LEACH will deliver more data to the sink than VLEACH1 where the nodes at this phase exhaust their energy. On the other hand, the Vice-CH selected only by using the remaining energy has a better chance to send its data to the sink (as is the case of the second Vice-CH of our TV-LEACH protocol) than the Vice-CH selected by using the distance to the CH and the remaining energy.

5 Conclusion

Wireless Sensor Networks consists of a huge number of small self-contained devices with limited computational, sensing and wireless communication capabilities. LEACH is the earliest cluster-based routing protocol. Compared to the flat network where multi-hop algorithm is adopted, it gains features of low energy consuming, self-adaptive and cluster-organized. However, when the CH die, the cluster will become useless since the data gathered by the cluster nodes will never reach the sink. Many improvements were proposed to overcome this problem. This paper proposed a new improved protocol which uses two Vice-Cluster Head to extend the lifetime of the entire network. The new improved protocol is simulated. The simulation results shown that the energy efficiency of the proposal is better than that of the LEACH variants.