1 Introduction

Wireless sensor networks consist of a large number of inexpensive devices that are networked via wireless communication subsystems. The proposed applications for wireless sensor networks include: environmental monitoring, natural disaster prediction, healthcare, manufacturing and transportation. Wireless sensor networks consist of inexpensive devices that are networked via wireless communication subsystems. The architecture of a wireless sensor network is shown in Fig. 1; the sensor nodes are usually deployed randomly inside the region of interest, known as the sensor field [6, 12, 19, 33]. The base station connected to the Internet is usually more powerful than the sensor nodes because it has power supplied. It needs to collect the sensed data from the sensor nodes and send it to users.

Fig. 1
figure 1

The architecture of a wireless sensor network in which sensor nodes are deployed randomly into the sensor field

Clustering has been well received as an effective way to reduce the energy consumption of wireless sensor networks. The idea of clustering is to select a subset of sensor nodes to be cluster heads for a given wireless sensor network. Therefore, data traffic generated at the sensor node can be sent to the base station via cluster heads [3, 4, 12].

When the sensor nodes are organised in clusters, they can use either single-hop or multihop modes of communication to send their data to the base station. Since the sensor nodes send their data to the base station or cluster heads for processing, the many-to-one communication paradigm is common.

The sensor nodes also have limited energy because it is not convenient to recharge or replace the batteries. This is a major limitation of wireless sensor networks because it affects the network’s lifetime. Energy-efficient protocols in wireless sensor networks are essential because the sensor nodes always utilise a certain amount of energy while sending sensed data to the cluster head or the base station. In order to address this limitation, several protocols have been proposed for wireless sensor networks. They can be classified into direct communication, conventional clustering protocols, dynamic clustering protocols and multihop clustering protocols [2, 11, 15, 28].

Using direct communication [15, 34, 35, 38], all the sensor nodes directly communicate with the base station, as shown in Fig. 2. Consequently, the sensor nodes located far away from the base station consume large amounts of energy when transmitting the data to the base station. This quickly drains their energy and reduces the network’s lifetime.

Fig. 2
figure 2

An example of direct communication in which all sensor nodes can communicate with the base station directly

In terms of conventional clustering protocols [11, 15, 25], the sensor nodes are organised into clusters that communicate with the cluster heads. Each cluster head collects sensed data from the member nodes, aggregates the sensed data and then sends the aggregated data to the base station, as shown in Fig. 3. Since the cluster heads have responsibility for collecting, aggregating and sending data to the base station, they drain energy much faster than the member nodes, thus reducing the network’s lifetime.

Fig. 3
figure 3

An example of conventional clustering

Dynamic clustering protocols [2, 5, 16, 26] have been proposed to solve a problem in conventional clustering protocols. Sensor nodes are organised into clusters that communicate with the cluster heads. During data-gathering, each sensor node senses the environment and sends its sensed data to the cluster head. Each cluster head collects the sensed data from the member nodes, aggregates the sensed data and then sends the aggregated data to the base station. The cluster head nodes act as a local control centre to coordinate the data transmission in their clusters. The cluster head will setup a time division multiple access TDMA schedule and then send this schedule to the sensor nodes within the cluster.

These protocols rotate the role of cluster head among the sensor nodes to balance the energy dissipation of the sensor nodes. Consequently, they periodically re-cluster the network in order to select new cluster heads and distribute the energy consumption among all of the sensor nodes in a wireless sensor network. These protocols suffer from consuming more energy due to the cluster formation overheads. Additionally, each sensor node transmits data to its cluster head, even when the cluster head resides at a greater distance from the base station.

In terms of multihop clustering protocols [13, 17, 24, 2831, 39], the sensor nodes are organised into clusters. Each cluster has one cluster head and other sensor nodes; the sensor node sends its sensed data to the cluster head within the cluster and the cluster head collects sensed data from the member nodes and aggregates the data. Consequently, the cluster head also acts as a router, routing data received from their peer cluster heads towards the base station, as shown in Fig. 4. The data routing from the cluster heads to the base station is done over multihop paths. Since the cluster heads have responsibilities for collecting, aggregating and routing data to the base station, they drain energy much faster than the sensor nodes, thus reducing the network’s lifetime.

Fig. 4
figure 4

An example of multihop clustering

In order to avoid these situations, this study proposes a protocol for forming clusters, selecting cluster heads, selecting cluster senders and determining the appropriate routings, in order to reduce the overall energy consumption and enhance the network’s lifetime. This clustering protocol is called efficient cluster-based communication protocol for wireless sensor networks (ECOMP).

The remainder of this paper is structured as follows: Sect. 2 will provide an overview of related work; Sect. 3 will present the ECOMP; Sect. 4 will provide details of the algorithm; Sect. 5 presents the simulation set-up and the results; and finally, Sect. 6 will conclude the paper.

2 Related work

CPEQ [8] is a cluster-based routing protocol that groups the sensor nodes to route the sensed data to the base station. It uses a random node to elect the cluster head, instead of using the randomly elected sensor node as the cluster head. In the CPEQ protocol, the sensor nodes with more energy are elected as the cluster heads to route data to the base station by uniformly distributing energy dissipation among the sensor nodes. To build clusters, the CPEQ uses a time to live, to limit the size of the cluster, and calculates the routes from the member nodes to the cluster head. By checking the time to live, the node will join the cluster that is closest to the cluster head.

After receiving data from the sensor nodes within the cluster, the cluster head sends this data to the base station using multihop routes. CPEQ uses the optimised routes among the cluster heads and the base station. It reduces traffic collision and delay by performing data aggregation and selecting the most optimal routes. The disadvantage of CPEQ is that it uses the flooding mechanism which can cause redundancy—a node sends data to its neighbour irrespective of whether it already has it or needs it.

RRCH [26] forms clusters in the set-up phase. Once the clusters are formed, RRCH keeps the fixed clusters and uses a round robin method to select the cluster heads from the sensor nodes within the clusters. RRCH forms clusters and avoids energy consumption during the set-up phase. When a sensor node has been detected as an abnormal node it consumes its initial energy level, the RRCH broadcasts information to the entire cluster during frame modification, and then each sensor node deletes the abnormal node from its schedule.

The RRCH protocol is able to implement load-balancing among the sensor nodes to enhance energy consumption in sensor networks. Since RRCH keeps the fixed clusters, it cannot handle clusters with poor quality, those which are too small or too big in cluster size, or those which overlay other clusters.

The PEBECS [32] protocol divides the sensor network into several partitions with equal areas and then groups the sensor nodes into unequally sized clusters. A set of sensor nodes in each partition are elected as cluster heads. PEBECS can elect the sensor nodes as cluster heads by using a set of metrics with certain weighting factors. This means that a node decides to become a cluster head depending on its combined weight metric. These metrics include: remaining energy, degree difference and the relative location in the network.

The elected cluster heads broadcast messages to advertise their status; upon receiving the message, each sensor node joins a cluster and becomes a cluster member. PEBECS groups the sensor nodes into smaller clusters to save energy within intra-cluster communication, thus prolonging the network’s lifetime, reducing the energy consumption and improving the network’s scalability.

In proposed energy-efficient multihop polling [37], there are two types of sensor node: the basic sensor nodes and the cluster heads. The basic sensor nodes are simple and have limited power supplies, while the cluster head nodes are more powerful because they have greater power supplies. The basic sensor nodes can be deployed randomly, whereas the cluster heads should be carefully deployed so that each sensor node can communicate with at least one cluster head.

This protocol divides the network into clusters and selects powerful cluster heads by letting the cluster head know which sensor nodes are in its cluster and by informing the sensor nodes which cluster they belong to. This consumes less energy because it polls data from the sensor nodes, instead of letting the sensor nodes send data randomly. However, the cluster heads need to be very powerful and carefully deployed.

EAD [7] presents an energy-aware protocol—a broadcast tree with leaves. It extends the network’s lifetime by turning off the transceivers of all the leaf nodes in the tree and allows only non-leaf nodes to control the data aggregation and the relaying of tasks. Each round comprises an initial phase and a transmit phase. In the initial phase, the objective of EAD is to identify the non-leaf nodes and set up the backbone. Once completed, the sensor nodes proceed to the transmit phase and transmit data to the base station. After each transmit phase, the EAD will rebuild the broadcast tree to identify all of the dead nodes.

The disadvantages of EAD are concerned with the randomly selected cluster heads which may have a high communication cost; if periodic cluster head rotation is used to reduce the communication costs, the selection of the cluster heads uses extra energy to rebuild the clusters. Furthermore, the random selection of cluster heads cannot guarantee good protocol performance. A Power-Efficient Routing Protocol for Wireless Sensor Network [36] performs cluster formation at the beginning of the first round. Once the clusters are setup, this protocol keeps the fixed clusters and uses the energy level of each sensor node to select new cluster heads. Also the cluster is divided into two clusters if the number of sensor nodes within a cluster is greater than the threshold.

PEGASIS [21] is an improvement of the well-known LEACH protocol for clustering-based communication in sensor networks. Rather than forming multiple clusters, PEGASIS forms chain from sensor nodes so that each node transmits and receives from a neighbour and only one node is selected from that chain as leader node to transmit to the base station. The main objectives of PEGASIS are to increase the lifetime of networks and allow only local coordination between nodes that are close together so that the bandwidth consumed in communication is reduced. PEGASIS eliminates the overhead caused by dynamic cluster formation in LEACH, and decreases the number of transmissions and reception by using data aggregation although the clustering overhead is avoided. However, this achievement is faded by the excessive delay introduced by the single chain for the distant node.

In [15] the operation of LEACH is divided into rounds and each round separated into two phases, the set-up phase and the steady state phase. In the set-up phase, each node decides whether or not to become a cluster head for the current round. Cluster head broadcasts an advertisement message to the rest of the nodes. Depending on the signal strength of the advertisement messages, each node selects the cluster head it will belong to. The cluster head creates a Time Division Multiple Access (TDMA) scheme and assigns each node a time slot. In the steady state phase, the cluster heads collect data from sensor nodes, aggregate the data and send it to the base station.

LEACH-Centralised [16] uses a centralised clustering algorithm. In set-up phase, the base station receives all information about each node regarding their location and energy status. The base station runs a local algorithm for the formation of cluster heads and clusters and broadcasts a message that contains the cluster head ID for each node. The steady state phase of LEACH-C is identical to that of the LEACH protocol. Because the clustering set-up is done every round, a significant amount of energy is consumed and communication latency is increased.

TEEN [22] is designed for time-critical applications to respond to changes in sensed attributes such as temperature. After the clusters are formed, the cluster head broadcasts two thresholds to the nodes. These are hard and soft thresholds for sensed attributes. The hard threshold aims to reduce the number of transmissions by allowing the nodes to transmit only when the sensed attribute is in the range of interest. The soft threshold will further reduce the number of transmissions if there is little or no change in the value of sensed attribute. One can adjust both hard and soft threshold values in order to control the number of packet transmissions. The advantage of this scheme is its suitability for time-critical applications and also the fact that it significantly reduces the number of transmissions.

APTEEN [23] is an extension to TEEN and aims to capture periodic data collections and react to time-critical events. Once a node senses a value beyond the hard threshold, it transmits data only when the value of that attribute changes by an amount equal to or greater than the soft threshold. The main drawbacks of TEEN and APTEEN are the overheads and complexity associated with forming clusters at multiple levels.

HEED [35] provides balanced cluster heads and smaller-sized clusters. They use two radio transmission power levels; one for intra-cluster communication and the other for inter-cluster communication. HEED does not select cluster head nodes randomly. Sensor nodes that have a high residual energy can become cluster head nodes.

UDACH [10] operates in three stages. In the first stage, cluster heads are selected and each sensor node selects its cluster head. In the second stage, cluster heads form the tree structure. In the last stage, each sensor node sends the data to its cluster head. The cluster head aggregates the received data and sends it to the base station.

In [9], MECH (Maximum Energy Cluster Head) uses the number of wireless sensor nodes and radio range to construct a cluster in a certain area. Also it uses a hierarchical tree to improve the distance of cluster head communication with the base station. The disadvantage of MECH is that it uses more control messages than LEACH.

MESH [20] is based on LEACH. MESH selects cluster heads and a strong head. Each sensor node sends the data to the cluster head. The cluster head aggregates the data and sends the aggregated data to the strong head. Since there is more than one cluster head, strong head aggregates data that is received from cluster heads and sends it to the base station.

3 ECOMP protocol

The ECOMP can form clusters, select cluster heads, select cluster senders and determine appropriate routings in order to reduce the overall energy consumption and enhance the network’s lifetime. The ECOMP protocol is organised into rounds; some rounds begin with a set-up phase when the clusters are formed, and this is followed by a steady state phase which is divided into several frames and sensor nodes that transmit and receive data at each frame.

3.1 Set-up phase

The set-up phase allows the sensor nodes to exchange necessary information with the base station, such as node ID, location and remaining energy. The base station uses this information to identify the number of cluster heads and cluster senders, whilst ensuring that only the sensor nodes with enough energy participate in the cluster head and cluster sender selection. The sensor nodes are organised into clusters; each cluster has the following: one sensor node which is promoted as the cluster head; one sensor node which is promoted as the cluster sender; and the other sensor nodes.

The cluster heads are responsible for creating and distributing the time division multiple access (TDMA) schedule to the sensor nodes. They send the data over the multihop paths to the base station; therefore, they act as routers since they route data received from the cluster senders or the peer cluster heads toward the base station, through the neighbouring cluster heads.

The cluster senders are responsible for sending the aggregated data to the base station using multihop or single-hop communication. The formation of clusters allows the ECOMP to organise the sensor nodes within the cluster into a ring topology, to ensure that each sensor node receives data from a previous neighbour and then transmits data to a next neighbour.

The sensor node has two connections which point to the clockwise neighbour and the counter-clockwise neighbour, on the ring, respectively. They form a bidirectional ring structure. Once the cluster heads and cluster senders are determined, the base station broadcasts to all sensor nodes information including cluster heads, cluster senders, neighbour cluster heads and the sensor node’s IDs within the ring.

3.2 Steady state phase

During the steady state phase, the cluster head creates and distributes the TDMA schedule, which specifies the time slots allocated for each member sensor node of the cluster to receive and transmit data. Since the sensor node has two connections which point to the clockwise neighbour and its counter-clockwise neighbour, in the ring, respectively, the sensor node can therefore transmit the sensed data in a bidirectional way.

In order to gather data in the first round, the cluster senders sense their environment, collect sensed data and transmit the data to the next neighbour, in a clockwise direction. Each sensor node receives data from the previous neighbour, aggregates this with its own data and then transmits it to the next neighbour on the ring. Upon receiving the aggregated data from the previous neighbours, the cluster senders transmit it to the base station using multihop or single-hop communication.

In the next round, the cluster senders sense their environment, collect sensed data and transmit the data to the next neighbour, in a counter-clockwise direction. Each sensor node receives data from the previous neighbour, aggregates this with its own data and then transmits it to the next neighbour on the ring. Upon receiving the aggregated data from the previous neighbours, the cluster senders transmit it to the base station using multihop or single-hop communication, as shown in Fig. 5.

Fig. 5
figure 5

An example of multihop clustering in which cluster senders transmit data to the base station

In order to distribute energy consumption over the sensor nodes, the cluster sender’s role should be rotated among the sensor nodes to prevent their exhaustion. ECOMP uses the remaining energy for the cluster sender’s rotation. The sensor nodes with the highest remaining energy are selected as cluster senders. A sensor node is considered dead if it consumes more than 99 % of its initial energy level. If any sensor nodes die within the cluster, the cluster sender sends a message to base station to instigate the cluster’s set-up phase, thus ensuring that the sensor nodes use the remaining energy levels to select new cluster senders with the highest energy for the next round.

4 ECOMP algorithm details

4.1 Initial configuration

In this stage, the sensor nodes send an updated information packet concerning the remaining energies and locations to the base station. The sensor nodes gather their current location by using global positioning system (GPS) receivers that are activated in the initial set-up phase.

4.2 Cluster configuration

On receiving the energy status and location data, the ECOMP calculates the energy value of all the sensor nodes and then selects the cluster heads by minimising the total sum of the distance between the cluster heads and the sensor nodes. Furthermore, the ECOMP ensures that only the nodes with enough energy participate in the cluster heads selection.

4.3 Ring configuration

The ECOMP aims to form a bidirectional ring structure among the sensor nodes; within these clusters, each sensor node will receive from a previous neighbour and transmit to the next neighbour clockwise and then counter-clockwise. The cluster heads are inside the clusters; therefore, to build the ring, the ECOMP divides the cluster into two parts, the upper and the lower parts, as shown in Fig. 6. The ECOMP initially starts with the upper part: first, the ECOMP selects the sensor node that is furthest away from the cluster head as the last node; second, the sensor node closet to the last node is added to the upper part; finally, all of the sensor nodes are selected in this manner, from the remaining nodes, until all the sensor nodes are added to the upper part, see Fig. 7.

Fig. 6
figure 6

Upper and lower parts

Fig. 7
figure 7

Upper part

To construct the lower part, the ECOMP repeats the steps described for the upper part, as shown in Fig. 8. Consequently, the ECOMP creates a ring by linking the upper part with the lower part (see Fig. 9). If there is only one part within the cluster, the ECOMP creates a ring by linking the first and the last nodes, as shown in Fig. 10.

Fig. 8
figure 8

Lower part

Fig. 9
figure 9

An example of the ring configuration

Fig. 10
figure 10

An example of the ring configuration with one part

The sensor nodes are assigned identities, 1 through M, where M is the total number of sensor nodes within the ring. Every sensor node knows its previous and next neighbours based on the identities within the ring.

4.4 Advertisement

During the advertisement stage, the base station broadcasts set-up information to the sensor nodes. This set-up information includes the cluster heads, cluster senders, neighbour cluster heads, the distance to the base station and the node’s ID within the ring. Every sensor node receives this broadcasted information, it initialises its distance and cost. If a node’s cluster head ID matches its own ID, the node is a cluster head; although, if a node’s cluster sender ID matches its own ID, the node is a cluster sender. Consequently, if no ID matches, the node is a sensor node.

4.5 Balanced routing

The sensor node’s energy is a major concern in wireless sensor networks. ECOMP therefore forms clusters; within each cluster there is one sensor node which is promoted as a cluster head; one sensor node which is promoted as a cluster sender; and a set of member nodes. The cluster heads also act as routers because they route data received from the cluster senders or the peer cluster heads towards the base station through the neighbour cluster heads.

Within this research, the routing task to cluster heads was restricted since the cluster heads were more eligible than the other sensor nodes because of their remaining energy and because they had fewer responsibilities than the other dynamic cluster-based protocols [1, 15, 30].

The ECOMP uses cluster senders to transmit data to the base station; the data from the cluster senders is routed among the neighbouring cluster heads (one or multiple) until it reaches the base station. The proposed protocol sends data through energy-efficient paths to ensure that the total energy needed to route the data is kept to a minimum.

The definition of energy cost, EC, for transmission from cluster sender, CS, to the cluster head, CH, and the base station, BS, is:

$$ \mathit{EC}_{\mathit{CS} \mbox{--} \mathit{BS}} = E_{\mathit{CS} \mbox{--} \mathit{CH}} + E_{\mathit{CH} \mbox{--} \mathit{BS}} $$
(1)

where EC CSCH is the energy cost from the CS to the neighbour CH, and EC CHBS is the energy cost from the CH to the base station.

The energy used to send n-bit data, a distance, d, for each sensor node is:

$$ E_{TX}(n,d) = n\times E_{elec} + n\times \varepsilon_{fs}\times d^{2} $$
(2)

where E elec is the electronic energy, and ε fs is the power loss of free space.

The idea of ECOMP is to save energy by using a path with the minimum distance. When the cluster sender sends data to the base station, it can transmit data to the base station directly or route the data to the neighbour cluster heads. To evaluate these alternatives, a cluster sender (CS) that wants to send data to the base station (BS) could calculate the sum of the squared distance from the cluster sender (CS) to the neighbour cluster head (I) and from the neighbour cluster head (I) to the base station (BS) which is defined as:

$$ D(I) = d_{\mathit{CS} \mbox{--} I}^{2} + d_{I \mbox{--} \mathit{BS}}^{2}\quad I \in \{ \mbox{neighbour cluster heads}\} $$
(3)

Based on this third equation, the cluster sender can select the best neighbour cluster head node, in terms of the minimum distance for an intermediate node. The intermediate node would then be compared with the squared distance from the cluster sender to the base station (direct communication).

$$ \operatorname{Min}\bigl(D(I)\bigr) < d_{\mathit{CS} \mbox{--} \mathit{BS}}^{2} $$
(4)

If the distance of the intermediate node is less than the distance of direct communication, the cluster sender would select the intermediate node as the next hop; otherwise, the cluster sender would transmit the data to the base station directly.

When the data arrives at the intermediate node, the above steps would be repeated to determine whether the intermediate node should select another intermediate node or choose to transmit the data to the base station directly. The process would be repeated until the data arrives at the base station.

Figure 11 shows an example of balanced routing. The cluster sender (CS1) has three alternative paths to the base station: one is direct to the base station, and two are indirect, via neighbouring cluster heads. The cluster sender (CS1) calculates the D(I) value using the third equation, for each alternative route, as shown in Table 1.

Fig. 11
figure 11

An example scenario: node CS1 needs to send data to the base station

Table 1 Alternative routes for transmission are available

The second column shows the distance from the cluster sender (CS1) to the neighbour cluster heads, and the third column shows the distance from the neighbour cluster heads to the base station. By totalling the second and third column, a total distance for each route can be calculated, as shown in the fourth column. The computational results indicate that route1 is the minimum distance; thus, it is the most energy-efficient, in terms of cost. The cluster sender (CS1) chooses the cluster head as the intermediate node and sends the data to (CH2). After receiving this data from the cluster sender (CS1), cluster head (CH2) repeats the routing process until the base station receives the data.

4.6 TDMA schedule

Once the clusters have been formed, the sensor nodes must send their data to the next neighbour. The sensor node has two connections which point to its clockwise neighbour and its counter-clockwise neighbour, on the bidirectional ring, respectively. However, the ECOMP uses the TDMA model as the MAC protocol, thus allowing the sensor nodes to enter a sleep mode when they are not transmitting data to the next neighbour. The TDMA approach, for intra-cluster communication, ensures that no collisions of data occur within the cluster.

Based on the number of nodes within the cluster, the cluster head node creates a TDMA schedule telling each node when it can receive and transmit data to the next neighbour. The TDMA schedule divides time into a set of slots; the number of slots is equal to the number of nodes within the cluster.

The responsibilities of the cluster head are distributed more evenly among the sensor nodes when compared with other dynamic cluster-based protocols [15, 16, 18]; thus, the ECOMP keeps the cluster heads for sets of rounds and the cluster sender’s role is rotated to different sensor nodes.

4.7 Data transmission

The sensor nodes are distributed over the cluster area; these sensor nodes, within the cluster, form a bidirectional ring structure. Each sensor node has two connections which point to its clockwise neighbour and its counter-clockwise neighbour, on the bidirectional ring, respectively.

In the first round, the cluster senders sense their environment, collect sensed data and transmit the data to the next neighbours, in a clockwise direction. In the following round, the cluster senders sense their environment, collect sensed data and transmit the data to the next neighbours, in a counter-clockwise direction, in order to distribute the energy consumption evenly among the sensor nodes.

During the data-gathering process, the cluster heads do not need to receive any sensed data from the member nodes; therefore, the cluster heads save their energy for receiving data. Each sensor node receives data from the previous neighbour, aggregates this with its own data and then transmits it to the next neighbour on the ring. Upon receiving the aggregated data from the previous neighbours, the cluster senders transmit it to the base station either directly or through neighbour cluster heads. The ECOMP performs data aggregation at every sensor node in the bidirectional ring. Each sensor node aggregates its previous neighbour’s data with its own data and then transmits aggregated data to its next neighbour.

Figures 12 and 13 illustrate data transmission in bidirectional and unidirectional rings, respectively. The cluster has the following sensor nodes:

  • There are seven sensor nodes in this cluster: A, B, C, D, E, F and G.

  • G is the cluster head.

  • A is the cluster sender.

Fig. 12
figure 12

Bidirectional ring

Fig. 13
figure 13

Unidirectional ring

In round i, the cluster sender, A, senses the environment, collects the sensed data and transmits the data to the next neighbour, B, in a clockwise direction. B aggregates the data with its own data and transmits the aggregated data to the next neighbour, C, in a clockwise direction. Upon receiving the aggregated data from F, the cluster sender, A, transmits it to the base station.

In round i+1, the cluster sender, A, senses the environment, collects sensed data and transmits the data to the next neighbour, F, this time in a counter-clockwise direction. F aggregates the data with its own data and transmits the aggregated data to the next neighbour, E, again counter-clockwise. Upon receiving the aggregated data from B, the cluster sender, A, transmits it to the base station.

Table 2 shows the distance for each transmission in round i (clockwise), while Table 3 shows the distance for each transmission in round i+1 (counter-clockwise) and Table 4 shows the total distance for round i and round i+1 in the bidirectional ring.

Table 2 Distance of each transmission in the bidirectional ring (clockwise)
Table 3 Distance of each transmission in the bidirectional ring (counter-clockwise)
Table 4 Total distance in the bidirectional ring

In the unidirectional ring, the sensor node collects the sensed data and transmits the data to the next neighbour, in a clockwise direction for all of the rounds.

Table 5 shows the distance for each transmission in the unidirectional ring. The second column shows the distances for round i (clockwise) and the third column shows the distances for round i+1 (clockwise). By totalling these two columns, the total distance for each transmission is shown in the last column. In Table 4, the third column shows the total distance for the bidirectional ring with a variance of 13.06 and the fourth column in Table 5 shows the total distance for the unidirectional ring with a variance of 67.87. In this example, a significant decrease in variance of the transmission distance in the bidirectional ring was observed.

Table 5 Distance of each transmission in the unidirectional ring

4.8 Cluster sender selection

Since the cluster senders transmit data to the base station using multihop or single-hop communication, the cluster senders drain energy much faster, thus reducing the network’s lifetime. In order to balance the energy consumption among all of the sensor nodes in the network, the cluster sender’s role should be rotated among the sensor nodes to prevent their exhaustion. Sensor nodes with the highest remaining energy are selected as the cluster senders. In cases where there is more than one sensor node with equally high remaining energy levels, one of these sensor nodes is randomly selected from this cluster.

In frame number n−1, the sensor node sends data to the next neighbour, including its remaining energy. Based on the collected information, the sensor node compares the energy levels and selects the highest remaining energy.

The mechanism for selecting the new cluster sender is as follows:

  • The sensor node, Sp, sends data and its remaining energy, ESp, to the next neighbour, Sn.

  • Based on the collected information, the sensor node, Sn, compares its energy level, ESn, with the previous neighbour’s energy level, ESp.

  • If ESnESp, the sensor node, Sn, selects itself as the provisional cluster sender and sends data with its energy level to the next neighbour.

  • If ESn<ESp, the sensor node, Sn, selects Sp as the provisional cluster sender and sends data with ESp to the next neighbour.

  • When the node with the highest remaining energy is selected as the new cluster sender, the current cluster sender informs the cluster head to build a TDMA schedule with a new cluster sender at the beginning.

  • Each cluster follows the same procedure for selecting a new cluster sender.

5 Simulation and discussion

This section will analyse the performance of the ECOMP protocol using simulations. Simulation experiments were conducted in the network simulator OMNET++ [27]. Three metrics were used to analyse and compare the experimental simulation results: network lifetime, energy dissipation and communication overhead.

5.1 Simulation set-up

As shown in Fig. 14, it was assumed that 100 sensor nodes were randomly scattered into the sensing field, with dimensions of 100 m × 100 m, and the base stations were located at positions 50 and 350. All of the sensor nodes periodically sense the environment and transmit the data to the next neighbours. Every result shown is an average of 10 experiments, with a 95 % confidence interval and each experiment uses a different randomly generated topology. We compare the ECOMP with the LEACH-C [16]. Both ECOMP and LEACH-C offer methods for selecting higher energy nodes for intense use, also allowing sensor nodes to sleep periodically to save energy. Table 6 summarises the parameters used in this study’s simulation.

Fig. 14
figure 14

Snapshot of random deployment of the sensor nodes in the field

Table 6 Simulation parameters

5.2 Radio model

We use the radio model similar to that described in [16]. The following equations present the calculation of transmission and receiving energy consumption for n-bit data over distance d. In the equations, E Tx and E RX are the energy dissipation of transmitter and receiver circuitry, respectively. E DA is the energy for data aggregation. The initial energy of each sensor node is 1 J, and the base station has unlimited energy.

As described in Eq. (2), the energy used to send n-bit data a distance d for each sensor node is

$$ E_{TX}(n,d) = n\times E_{elec} + n\times \varepsilon_{fs}\times d^{2} $$
(5)

The energy used to receive n-bit data a distance d for each sensor node is

$$\begin{aligned} E_{Rx}(n) = nE_{elec} \end{aligned}$$
(6)

The energy for data aggregation is

$$\begin{aligned} E_{DA}=5~\mathrm{nJ}/\mathrm{bit}/\mathrm{signal} \end{aligned}$$
(7)

where E elec is the electronics energy, and ε fs is power loss of free space.

5.3 Simulation results

5.3.1 Network lifetime

We validate the effectiveness of the proposed ECOMP protocol using a sensor network’s lifetime as the performance measure. To evaluate the network lifetime, we compare the ECOMP with the LEACH-C [16]. The performance metrics used to evaluate the system lifetime are FD (First Node Dies), HD (Half of the Nodes Alive), and LD (Last Node Dies) [14]. Since more than one node is necessary to perform the clustering algorithm. The LD represents the overall lifetime of the wireless sensor network when 80 % of sensor nodes die.

In Fig. 15, the first column corresponds to ECOMP protocol and the second column corresponds to LEACH-C. This figure shows the number of rounds when the first sensor node dies. From the figure, we can see that until round 349, ECOMP is able to collect data from the whole network with sensor nodes alive in the sensor network, while LEACH-C operates for 254 rounds before the first node dies. The stability period of ECOMP is much longer than that of LEACH-C. This is because ECOMP is an energy-aware protocol. ECOMP obtains 27 % more rounds than LEACH-C.

Fig. 15
figure 15

Performance comparison of the network lifetime metric FD

Figures 16 and 17 show the number of rounds when 50 % and 80 % of sensor nodes die. The network lifetime in LEACH-C is only 267 rounds because the majority of sensor nodes have run out of energy. The ECOMP protocol runs longer than LEACH-C with a network lifetime of up to about 394 rounds. ECOMP obtains 32 % more rounds than LEACH-C.

Fig. 16
figure 16

Performance comparison of the network lifetime metric HD

Fig. 17
figure 17

Performance comparison of the network lifetime metric LD

In LEACH-C, a cluster head is responsible for inter-cluster communication and intra-cluster communication. In intra-cluster communication the cluster head is an aggregation point where the sensor nodes transmit their data to the cluster head. The sensor nodes located furthest from the cluster head have to spend the maximum amount of energy. The cluster head aggregates the data. The aggregation is performed only at the cluster head. In inter-cluster communication, the cluster heads forward the aggregated data to the base station directly.

On the other hand, in the ECOMP protocol each sensor node receives data from its previous neighbour, aggregates it with its own data, and transmits the data to the next neighbour on the bidirectional ring. The cluster senders transmit the aggregated data to the base station using multihop or single-hop communication. That means the ECOMP protocol has successfully distributed the energy among all sensor nodes over the whole sensor network.

5.3.2 Energy dissipation

Figures 18 and 19 show the energy dissipation of the protocols over the time of operation. The first column corresponds to the ECOMP protocol and the second column corresponds to LEACH-C. LEACH-C consumes more energy because the sensor nodes which are far away from the cluster heads send their data to the cluster heads. The cluster heads collect data from the sensor nodes in their clusters, aggregate the data and send it to the base station. The cluster heads which are far away from the base station send their data directly towards the base station. Due to this scheme of communication, the cluster heads and sensor nodes spend more energy to transmit at longer distance.

Fig. 18
figure 18

Energy dissipation comparison of ECOMP and LEACH-C

Fig. 19
figure 19

Average energy dissipation

This is avoided in the ECOMP protocol because each sensor node consumes a small amount of transmitting energy in order to reach the neighbour sensor node in bidirectional ring, the cluster heads do not need to receive any sensed data from member nodes. The communication between cluster senders and the base station is multihop or single-hop. The cluster sender sends its data through the shortest path to the base station.

5.3.3 Communication overhead

Protocols often rotate the cluster head functionality among sensor nodes to distribute the energy among sensor nodes. Clustering protocols need balance between how often to reform clusters and the energy saving from cluster reformation.

LEACH-C suffers from cluster formation overhead. It consumes more energy due to the cluster formation overhead. Additionally, each sensor node transmits data to its cluster head even if the cluster head resides further from the base station.

Since ECOMP uses the remaining energy for cluster sender’s rotation, sensor nodes with the highest remaining energy are selected as cluster senders without communicating with the base station. Thus, it reduces a large number of communication overheads. As shown in Fig. 20, ECOMP can reduce communication overheads during the initial phase by 97 %.

Fig. 20
figure 20

Performance comparison of the communication overhead

6 Conclusion

Since wireless sensor nodes are low-powered, constraints on the power consumption are an important issue when designing wireless sensor network protocols. Many clustering protocols have been proposed, with different clustering criteria, to reduce the energy consumption of a wireless sensor network. This research has introduced a protocol which can form clusters, select cluster heads, select cluster senders and determine appropriate routings in order to reduce the overall energy consumption and enhance the network’s lifetime. Our proposed clustering protocol is called efficient cluster-based communication protocol for wireless sensor networks (ECOMP).

A set of sensor nodes are distributed over the cluster area. These sensor nodes, within the cluster, form a bidirectional ring structure. Each sensor node has two connections which point to its clockwise neighbour and its counter-clockwise neighbour, on the bidirectional ring, respectively. During the data-gathering process, the cluster heads do not need to receive any sensed data from the member nodes; therefore, the cluster heads save the energy for receiving the data. Each sensor node receives data from the previous neighbour, aggregates this with its own data and then transmits it to the next neighbour on the ring.

The performance of the ECOMP protocol, via simulation, needs evaluating. Our simulation model uses a sensor network with a number of sensor nodes that were randomly distributed in the sensor field. The ECOMP was compared to the well-known protocol LEACH-C, and was measured against the following three metrics: the network’s lifetime, the energy dissipation and the communication overheads. The results show that ECOMP outperformed LEACH-C across all of the metrics. The simulation results confirm that ECOMP provides a higher energy efficiency which meets the constraints of the wireless sensor networks.