Keywords

1 Introduction

The rise of the Internet of Things (IoT) has expanded the scope of Wireless Sensor Network (WSN) demand.

WSN is made up of hundreds of tiny sensor nodes that are distributed over a certain geographical monitoring area either in an organized or unstructured manner [1,2,3,4,5]. Each sensor node is formed of a power unit (irreplaceable battery), sensing unit and a processing unit [6,7,8,9]. These nodes are used in monitoring various environmental conditions such as temperature, motion, pressure, vibration, sound, or pollutants [10,11,12].When designing a WSN-based system for monitoring environmental phenomena, we have to take into consideration the limitation of power resource of sensor nodes. So, multiple efficient hierarchical clustering approaches were used to enhance data routing and reducing energy consumption. Clustering reduces data transmission by grouping similar nodes together and selecting one node as a Cluster Head (CH). Low Energy Adaptive Clustering Hierarchy (LEACH) is a well-known and more efficient hierarchical clustering approach used in WSN to cope with the energy limitations of sensor nodes [13,14,15,16,17]. The election of the CH in a given cluster of sensors is repeated over a series of rounds and utilizing a stochastic technique [18]. This clustering technique provides lower energy dissipation [19, 20].

Low Energy Adaptive Clustering Hierarchy (LEACH) is a well-known and more efficient hierarchical clustering approach used in WSN to cope with the energy limitations of sensor nodes. The election of the CH in a given cluster of sensors is repeated over a series of rounds and utilizing a stochastic technique. This clustering technique provides lower energy dissipation.

In this research, we used a modified K-means clustering method with LEACH to improve network efficiency and network lifetime. The K-means algorithm creates clusters by computing the shortest distance between nodes and the CH, as well as the residual energy level. As a result, this technique aids in decreasing sensor node energy consumption when transmitting data to the CH in their cluster, ensuring an efficient and alive network for as long as feasible.

In this paper, we present a smart light-weight clustering approach that helps in increasing full network activity lifetime of the original K-LEACH algorithm. Our main contribution is the proposed clustering algorithm and its exploitation for enabling long-term IoT operations via increasing the full network activity lifetime and optimizing network energy consumption.

The rest of this paper is organized as follows. Section 2 discusses different clustering approaches for enabling efficient data routing and clarifies other researches results. Section 3 presents the proposed Full Connectivity Driven K-LEACH algorithm (FCDK-LEACH). Section 4 discusses the simulation results showing a set of studied scenarios at various operating contexts and discusses the findings. Section 5 concludes the paper.

2 Literature Review

Energy consumption is considered one of the most important challenges facing WSN, which can be adjusted with the usage of effective routing protocol. There are mainly three basic types of routing protocols suggested for WSNs, flat, location-based and hierarchical routing protocols [19]. The hierarchical routing protocols are the best in terms of energy efficiency, due to classification of nodes into clusters [19, 20].

There are many clustering techniques used in WSN such as: LEACH, LEACH-C, LEACH-based K-Means, balanced K-Means LEACH and others. We studied the LEACH and the LEACH-based K-means clustering technique due to their impact on improving energy consumption and prolonging network lifetime of WSN [19, 20].

  1. A.

    LEACH Protocol

LEACH is a hierarchical protocol in which nodes send data to CH, who then send it to the base station (sink) [21]. The LEACH protocol’s fundamental idea is to partition the whole WSN into multiple clusters. LEACH picks a few sensor nodes randomly as CHs and rotates this role to balance the energy load across the network’s sensors, each node has a chance to be chosen as a CH node. The LEACH procedure operates for a specified number of rounds, with each round consisting of two states: cluster setup state and steady-state. It establishes a cluster in self-adaptive mode during the cluster setup state; during the steady-state, it transmits data [22].

In LEACH, CH selection is based on an energy threshold value. If the remaining energy is less than a certain amount, the node is designated as a CH for the current round. Nodes that have previously been CHs’ are not eligible to become CHs’ again for P rounds, where P is the required proportion of CHs’. Following that, each node has a 1/P chance of becoming a CH in each round. Each node that is not a CH chooses the nearest CH and joins that cluster at the conclusion of each cycle [24]. The threshold is set as shown in (1):

$$ T\left( n \right) = \left\{ {\begin{array}{*{20}c} {\frac{P}{{1 - P*\left( {r*\bmod \frac{1}{P}} \right) }}} & { {\text{if}}\;n \in G} \\ 0 & {{\text{else}}} \\ \end{array} } \right\} $$
(1)

where:

  • P is the desired percentage of CHs’

  • r is the current round

  • G is the set of nodes that have not been CH in the last 1/p rounds.

Using this criterion, each node will be a CH at sometime within 1/p rounds. For 1/p−1 rounds, nodes that have been CH cannot become CHs’ again. The CHs aggregate and compress data before forwarding it to the Base Station (BS), therefore extending the life of key nodes. However, one of the primary problems with LEACH is the non-uniform distribution of CH nodes in the network, which renders it inapplicable in vast regions.

  1. B.

    LEACH-based K-means algorithm

The K-means clustering algorithm is one of the well-known machine learning algorithms. In contrast to the LEACH protocol, the K-LEACH protocol employs the K-means clustering method to achieve consistent node clustering and improved CH selection [23]. The K-LEACH assumes a random initial CH location during the first cycle. Following that, K-LEACH considers the shorter distance from the cluster center to be the criterion for a node being chosen as a CH during the CH selection process. The K-LEACH procedure is broken into rounds, with each round consisting of a cluster formation phase and a stable state round. The usage of K-means clustering method help in reducing overhead during CH re-election.

The K-LEACH method is similar to the LEACH algorithm, but with some machine intelligence added to minimize energy usage and extend total network longevity. The K-LEACH algorithm selects CH depending on the remaining energy level and distance to cluster members. The K-LEACH method is based on grouping things based on a certain criterion; the algorithm’s input is the number of K groups. The next step is to calculate the Euclidean distance between each node and the cluster centers; the shortest distance is chosen to include this node in the cluster center closest to it. After all of the nodes have been aggregated, the algorithm finds the new center of gravity for each cluster at each round. When the groups become almost stable, the algorithm stops.

Bidaki et al. [23] has proved in their research work that LEACH-based K-means has a major effect on increasing network lifetime, as CH is elected based on the remaining energy level and distance to the sensor nodes. According to the evaluations, their proposed solution (modified version from LEACH-based K-means) can decrease the energy consumption of the sensor nodes throughout the simulation, which will result in increased network lifetime compared to the LEACH and default LEACH-based K-means [23].

3 Proposed Algorithm

In this section, our proposed Full Connectivity Driven K-LEACH algorithm (FCDK-LEACH) is presented in detail. As discussed previously, there are various K-LEACH-based approaches in the literature; however, the implementations mainly differ in the enduring and dynamic behavior of the most recent cluster-heads.

Our modification relies on two important concepts which are proposing a new cluster-head selection criteria and fitting the energy consumption model to this new cluster-head selection criteria.

  • Cluster-head selection criteria

Figure 2, clarifies our proposal of two separate sets of nodes. Supposing a K-Means scenario that converges within 3 rounds/iterations, our FCDK-LEACH proposal seeks to record the positions of the cluster centroids each iteration so nodes can be placed in these positions and be elected as cluster-head nodes whenever they are cluster centroids. It is noticed that the blue circles represent the normal nodes, black circles represent cluster centroids to be elected as cluster-heads, red circles represent previous/upcoming cluster centroids which are converted to normal nodes and green circles represent the dead nodes.

We propose two sets of nodes; a set of nodes \({\varvec{n}}_{{\varvec{s}}}\) that include the blue circles (normal nodes) and another set of nodes \({\varvec{n}}_{{\varvec{c}}}\) that includes the black and red circles (These are the recorded positions where nodes are to be placed).

  • Energy consumption model

Hence, K-Means is utilized to structure the \({\varvec{n}}_{{\varvec{c}}}\) set of nodes. This set of nodes grows until the K-Means algorithm converges, which is when there will be a cluster centroid that will remain as a cluster-head for the rest of the simulation. In order to have a sustainable network, these cluster-heads have to be preserved throughout the simulation right until the last active normal node in their clusters die out.

Therefore, the following energy consumption model [24] is used to calculate the necessary excess energy needed for each cluster-head to endure and to stay alive throughout the simulation and die right after the last dead node in their clusters:

$$ E_{{{\text{Tx}}}} \left( {k,d} \right) = \left\{ {\begin{array}{*{20}c} {E_{{{\text{elec}}}} *k + \epsilon_{fs} *k*d^{2} , \quad d < d_{0} } \\ {E_{{{\text{elec}}}} *k + \epsilon_{mp} *k*d^{4} , \quad d \ge d_{0} } \\ \end{array} } \right. $$
(2)
$$ E_{{{\text{Rx}}}} \left( k \right) = E_{{{\text{elec}}}} *k $$
(3)

Such that \(E_{{{\text{Tx}}}}\) is energy consumption by transmission, \(E_{Rx}\) is energy consumption by receival, \(E_{{{\text{elec}}}}\) is the energy required to process 1-bit of data and \(k\) is the size of the packet. \(\epsilon_{fs}\) , \( \varepsilon_{mp} \)denote the energy needed to transmit 1-bit data while having an acceptable but error rate in case of free space model and multipath model, respectively. \(d\) is the distance of transmission and \(d_{0}\) is the threshold calculated as follows:

$$ d_{0} = \sqrt {\frac{{\epsilon_{fs} }}{{\epsilon_{mp} }}} $$
(4)

Accordingly, by applying the two mentioned concepts, Fig. 1 showcases a simple scenario of our FCDK-LEACH algorithm for only one cluster with K-Means converging within 3 rounds. Round 1 starts with having a set of nodes \({\varvec{n}}_{{\varvec{s}}}\) and another set of nodes \({\varvec{n}}_{{\varvec{c}}}\) that has nodes in the cluster centroids positions calculated by K-Means algorithm. Cluster centroid is changed to a different position in Round 2 and gets elected as a cluster-head node and the cluster centroid from the previous round gets converted to a normal node. It is changed once again in Round 3 which is when K-Means converges and the newly elected cluster-head (current cluster centroid) remains as a cluster-head throughout the simulation. Round n−1 shows the cluster-head alive and all the other nodes in the cluster dead except for one last node. Round n shows all the normal nodes dead and the cluster-head is the only alive node in the cluster. Round n + 1 shows the cluster with all its nodes dead which marks the end of the simulation.

Fig. 1
An illustration depicts dotted circular structures labeled as rounds 1, 2, 3, n minus 1, n, and n plus 1 of the F C D K LEACH algorithm.

FCDK-LEACH algorithm

Fig. 2
A line graph of the number of nodes versus round depicts the curve for classical K LEACH and modified K LEACH algorithms. The line for the former takes the shape of a step input function. The line for the latter ascends as a sigmoidal curve.

Death of nodes in FCDK-LEACH versus classical K-LEACH

4 Results

In this section, our proposed FCDK-LEACH is analyzed and compared with the classical implementation of K-LEACH algorithm as depicted in [24]. Table 1 contains the parameters used for our simulation.

Table 1 FCDK/K-LEACH parameters setting

Figure 2, depicts the number of dead nodes in FCDK-LEACH and Classical K-LEACH. According to the results of the simulations, K-LEACH outperforms the classical K-LEACH in terms of preserving all the network’s nodes alive until the first node dies out in the network so it has a longer full network activity lifetime than the classical approach. Our proposed algorithm provides longer network lifetime based on first node death lifetime approach in the literature. On the other hand, the classical K-LEACH implementation has the upper hand in terms of durability and endurance as it has a much longer overall lifetime.

FCDK-LEACH Algorithm Procedure

Input: set of nodes \(n_{s}\), number of clusters

1. Perform K-Means to store the cluster centroid positions until K-Means converges

2. Create a new set of nodes \(n_{c}\) in the stored positions

3. Perform the energy consumption model to calculate the necessary excess energy needed for the most recent cluster-heads to endure throughout the simulation and boost them with it

Re-simulate the energy consumption model with the newly structured network

Furthermore, Table 2 discusses the rounds at which the first and last nodes in the network die out in both the modified FCDK-LEACH and classical implementations. It is noticed that the first node dies at the 370th round in the modified version while the first node dies at the 159th round in the classical implementation which shows that our modified algorithm preserves the network at the beginning of its lifetime better than the classical approach. While the classical approach outperforms our modified implementation in terms of durability and overall lifetime, as the last dead node in the classical implementation died at the 1495th round while the last dead node in the modified implementation died at the 501st round.

Table 2 Death of nodes

5 Conclusion

In this paper, we have studied a smart light-weight content-aware hierarchical clustering approach for enhanced data-driven operations in WSNs. We have presented the utilization of the LEACH algorithm in our WSN environment and its impact on energy consumption and network lifetime. LEACH helps in reducing nodes’ energy consumption, but its CH non-uniform distribution increases overload in the network. So, to enhance the full network connectivity lifespan and ensuring efficiency, we have proposed our FCDK-LEACH clustering algorithm. Our proposed algorithm can be a good candidate for applications which require long time for first node deaths such as healthcare applications. As a future scope, we are planning to apply this idea to the fixed clustering protocols such as LEFCA and EAMR [25, 26] which were designed by our team. In addition to them, we are planning to improve our algorithm by adding some software defined networking solutions to obtain more intelligent algorithm for different scenarios.