1 Introduction

WSNs—wireless sensor networks—play a significant role in the term wireless communication. They are useful for many applications, such as healthcare applications, civil applications, and military applications. Wireless sensor networks include nodes that have the ability to sense humidity, temperature level, and conditions of pressure. They can also gather information of the physical area then process and transfer them to the base station (BS) [1].

Internet of Things (IoT) is a general technology for applications ranging from smart grid to vehicular networking and smart homes to smart workplace. IoT is growing as a framework to cover all identifiable things, in a dynamic and interacting network. The promise of clever approaches and dynamic systems that could benefit from the aggregation and analysis of information over the IoT infrastructure is quite pervasive. Scientists in networking, R&D divisions, and many businesses are in the race to develop an achievable and robust architecture to realize the IoT paradigm [2, 3].

WSNs are figured to play a dominant role in the IoT paradigms. The resilience, autonomous, and energy-efficient traits of WSNs render them a vital candidate for dominating the information collection task of an IoT framework [4].

However, many requirements are needed in these networks, such as low-latency transmission of data, long-lifetime system, and a smooth deployment that is easy to deal with. So, the major objective of a sensor node in the network is to achieve fast processing of data, detect events, and transfer data.

WSN’s three main parts that help in doing the processing are the sensing part, the communication part, and the processing part. Firstly, the sensing part that includes ADC (analogue-digital converter) and sensors is provided by expired able battery that is hard to be replaced in the following applications: environmental sensing, military surveillance, homeland defense, etc. Accordingly, a WSN has a problem in energy in which such energy consumption in a network falls in computing, sensing, and communicating. Moreover, in this part, i.e., the sensing part, the signal change from analogue to digital is done by ADC. Sensors sense environmental or physical phenomena and create an analogue signal; the ADC is used to change this signal to a digital one. Secondly, the communication part is responsible for transferring data and reception over a channel. Thirdly, the processing part includes a microcontroller and a microprocessor, which provides a control to the sensor node.

In indirect communication, wireless sensor nodes immediately shift their sensing data to the base station without any intermediate coordination nodes between both of them. However, in WSNs’ cluster-based mode, the network area is separated into clusters, which can be referred to as clustering. It refers to the separation of data into groups that share the same object. In a WSN that has a big amount of energy-restricted sensor, the importance to divide sensors into clusters is to decrease the consumption of energy and scalability to make the network lifetime longer, minimize the delay, and handle the network heterogeneity.

Only the cluster head (CH) in the network is allowed to take the information exchanged by a sensor node, in which CH transfers the BS aggregated data. This aggregation of data of sensor node happens in CH due to its important fusion role that decreases the data sent to the BS and thus saves energy and bandwidth resources. But, clustering can be crucial in forming the network to thousands and hundreds. The cluster also plays a role in organizing applications, so it is for many applications a natural method to combine sensor nodes that are spatially closed to take advantage of correlations and minimize the revealed redundancy in the readings of the sensor [5].

However, by comparing these benefits to WSN direct communication, results in the formation of message exchanges are highly positioned according to the cluster.

Because the power consumption of a wireless radio routing basically depends on the distance and the presence of problems, the multi-hop connection will reduce the network power consumption comparatively to direct connection.

However, applying the multi-hop routing technique will surely lead to weighty overhead for network topology managing and medium access control. Direct one-hop routing will be more effective if the whole sensor nodes were very close to the sink node [6].

Challenges facing the network occur in transferring the data in or outside the network while a cluster-based track protocol is used. For instance, some cluster-based track protocol works for small areas or a little number of nodes, while some other cluster-based track protocol works in deploying the node statistically which makes it unhelpful for mobile nodes.

However, the portion of a CH in other cluster-based track protocol focuses on a single area which makes them unsuitable for critical applications that need time. Hence, some cluster-based track protocol provides a space for every CH to forward aggregated data to base stations which decreases the energy consumption [7].

2 LEACH: the low energy adaptive clustering hierarchy protocol

LEACH is a hierarchical routing protocol used in wireless sensor networks to expand the network lifetime. In the LEACH protocol, sensors arrange themselves in a cluster, and a single node of these nodes performs a cluster head. Only the head of a cluster is allowed to forward the data to the base station; the cluster head gathers data from all nodes then accumulates and compresses them to be sent to the base station. LEACH is capable of adapting, self-organizing, and clustering protocol. LEACH has the hypothesis according to the features of sensors and base station [8].

A cluster head in the LEACH protocol is not stabilized; LEACH is established over the round concept and each round includes two stages: a setup stage and a steady-state stage. The setup stage is separated into advertisement aspect and cluster setup aspect, while the steady stage includes the creation of schedule and transferring of data [9].

The LEACH protocol suits WSNs under the following suppositions:

  • Every sensor node is static, exactly alike, and charged with the identical quantity of initial energy.

  • Every node consumes energy at the same degree and is capable to identify its remaining energy and controls power transferring and distance.

  • All nodes can directly connect to every other node, as well as the sink node.

  • The sink node is determined and in a distance from the wireless network. Thus, the energy consumed by the sink node is ignored.

  • All nodes have transferred data in each period. The data transmitted by sobering nodes are connected and can be combined [10].

Correspondingly, LEACH has some defects such as:

  • LEACH does not set clarity about the position of sensor nodes and the number of cluster heads in the network.

  • Every cluster head immediately connects with the BS, not dealing about a distance between it and the BS. So, if there is a far distance, energy will be consumed.

  • The cluster head uses high quantity energy for transferring and combining data, as it will be damaged quicker than others.

  • The cluster head is always on, and when it is damaged, the cluster will have no use because the data gathered by the cluster nodes will never be obtained by the base station [11].

3 Related work

Power reduction is the major interest in developing the applications of wireless sensor networks. Consequently, many strategies have been discussed for measuring the power dispersion of a certain application. These strategies are useful in predicting the WSN lifetime, providing recommendations to application developers and may improve the energy dispersion by the applications in WSN.

Heinzelman et al. (2000) introduced a clustering mechanism for sensor networks, namely LEACH (low energy adaptive clustering hierarchy). LEACH conducts clusters by forming a distributed algorithm, but nodes present independent decisions away from any centralized control. LEACH arranges the nodes in the network by clusters and sets one of them as a CH. The operation sequence of LEACH includes rounds. So, each round starts with a setup stage; once the clusters are arranged, the second is the steady-state stage that occurs when data is transmitted from nodes to the cluster head and then to the base station [12].

Energy low energy adaptive clustering hierarchy (LEACH-E) provides a new method to define the sensor lifetime, in which all nodes have the exact amount of energy and the chance to become a cluster head; then, after the first round, the remaining energy will differ and the cluster head will provide the nodes with much of the remaining energy; thus, the nodes themselves decide about becoming cluster heads and when it is not necessary to connect with the base station [13].

Kumar et al. (2011) elaborated that fixed count of the cluster low energy adaptive clustering hierarchy (LEACH-F) protocol uses centralized method for cluster representation. When the process of representation is formed, then the need for the re-clustering stage in the next round is not necessary. The topology of the clusters is stabilized and only rotating cluster head nodes are formed within their clusters; the same as the steady stage in classical LEACH. This protocol has many benefits; re-clustering does not need to be formed, the number is stabilized; their maintenance occurs throughout the network. On the other hand, this protocol has disadvantages in which it has no flexibility of adding or eliminating the nodes once clusters are formed and nodes cannot modify their activity on node damaging [14].

Sindhwani and Vaid (2013) addressed a vice cluster head low energy adaptive clustering hierarchy which enhances the difficulty in the LEACH protocol by giving a vice cluster head to each cluster which plays the function of the cluster head when the cluster head is damaged; this minimizes the high amount of selecting a new cluster head each time when a cluster head is damaged and the data will always be obtained by the base station and enlarge a network lifetime [15].

Abdellah and Hssane (2010) stated that A-LEACH (advanced low energy adaptive clustering hierarchy) is an expansion of the LEACH, which enhances the fixed area of the clustering hierarchy and minimizes the probability of node failure in employing the specific parameters of heterogeneity in networks. In these networks, some CAG which are high energy nodes become cluster head to combine the data of their cluster aspects and transmit it to the sink or gateways to reduce the energy consumption of the cluster head, since it is formed to route data from the cluster head to the sink, which enables in reducing the cluster head failure probability which in turn improves the network lifetime [16].

Farooq et al. (2010) addressed that multi-hop routing with low energy adaptive clustering hierarchy divided the network into various layers of clusters, in which there is a cluster head in each layer that coordinates with the adjacent layers to transfer data in the sensor to the base station. MH-LEACH provides an optimal way to the base station and CH [17].

Liao and Zhu (2013) showed that an energy-balanced clustering algorithm based on the LEACH protocol relies on the remaining energy and distance agents, which improves the strategies of selection and not the selection of the cluster head along with the optimal cluster head selection [18].

Bakaraniya and Mehta (2013) presented K-LEACH to enhance the sensor network lifetime by normal clustering through a k-medoids algorithm and scale the capacity of the entire network among all the active nodes. It assures by giving normal clustering of nodes that is provided with the suitable place of CH. It uses the clustering union, maximum remaining energy criterion, and the choice of CHs only after almost 50% of round operations randomly of the network, whereas the LEACH protocol provides a totally random selection of CHs, which leads to a very poor choice of CHs and consequently leads to a high degree of lifetime reduction and energy maintenance by the network [19].

Kole et al. (2014) discussed the distance-based cluster formation improves the LEACH protocol in enlarging the lifetime of the network. The distance of the node from the base station is important in forming the cluster that will reduce other transference in the current LEACH protocol [20].

4 Proposed enhancement of LEACH

The proposed method is the same as LEACH that has two stages: the setup and steady stages; but a difference occurs in the setup stage in which, in the setup stage, all the regular nodes select a random number between zero and one, then if that number is less than or equal to the threshold (T (n)) as calculated according to the next equation, the node becomes a cluster head (CH); otherwise, a node will remain ordinary.

$$ T(n)=\Big\{{\displaystyle \begin{array}{cc}\frac{p}{1-p\left[r\ast \mathit{\operatorname{mod}}\left(\frac{1}{p}\right)\right]}& n\in G\\ {}0& Otherwise\end{array}}\operatorname{} $$

where P is the desired percentage to become a cluster head, r is the current round, and G is a set of nodes that have not been selected as a cluster head in the last 1/P rounds.

That process is repeated until all cluster heads are chosen; after the cluster heads are chosen, they broadcast advertisement messages to the overall network informing that it became a CH. Here is a difference in LEACH in which such a node must select a CH according to distances to reach the base station, not a CH that is closest to it. Distances in a proposed approach were calculated according to the next equation—the distances calculated from a node to every CH and from CH to base station and the minimum distances chosen.

$$ D(x.y)=\sqrt{{\left(x1-x2\right)}^2+{\left(y1-y2\right)}^2} $$

After the ordinary node selects a cluster head that has the minimum distance, it sends a message to inform a cluster head that through it, the distance is minimum and that it will be a member of its cluster; this process has frequency to all nodes until all select an appropriate cluster head for it and according to number of rounds that is required.

After receiving a request message from ordinary nodes, the cluster heads conduct a time-division multiple access (TDMA) schedule for each member in it. The TDMA schedule assigns a timescale for every ordinary member node in it; it means that every ordinary member node is only allowed to send in its specific timescale, or else it waits to allow time and go in sleep mode then a setup stage is done.

The following is the algorithm for the proposed approach where the improvement is shown in a bold line.

figure a

Algorithm 1: Setup phase algorithm

After a setup stage is completed, a steady stage starts; a steady phase is the same as in the LEACH protocol, such that an ordinary node collects a data from the surrounding environment and then sends this data (in its allowed time slot for it) to the cluster heads chosen in the setup phase; the energy consumed to transmit data through the cluster head is calculated as the formula below [21].

$$ {\mathrm{E}}_{\mathrm{Tx}}\left(\mathrm{l},\mathrm{d}\right)={{\mathrm{E}}_{\mathrm{elec}}}^{\ast}\mathrm{l}+{\varepsilon_{\mathrm{fs}}}^{\ast }{\mathrm{l}}^{\ast }{\mathrm{d}}^2 $$

where ETx (l,d) is the reduction of the energy to send l bit of data, Eelec is the energy reduced by the conveyor and the receiver circuit, €fs is the amplifier parameters of transformation corresponding to the free-space technique, d is the Euclidean distance between an ordinary node and cluster head as shown above, and l is the packet data.

The cluster heads get gathered data from its parts and run the data compression algorithm to aggregate the combined data. The cluster heads send a compressed data to the base station. The reduction degree of the energy is calculated by the following equation [21]:

$$ {\mathrm{E}}_{\mathrm{Tx}}\ \left(\mathrm{l},\mathrm{d}\right)={{\mathrm{E}}_{\mathrm{elec}}}^{\ast}\mathrm{l}+{\varepsilon_{\mathrm{mp}}}^{\ast }{\mathrm{l}}^{\ast }{\mathrm{d}}^4 $$

where €mp is the amplifier parameters of transformation correspondent to the multi-path fading model.

Pseudo code for manipulating the process of the proposed steady-state stage method is presented below:

figure b

Algorithm 2: Steady-state phase algorithm

5 Simulation results and analysis

There have been many protocols approached for wireless sensor networks. In this research, we investigate two such protocols, the LEACH protocol and the proposed method.

Using the LEACH protocol, a node selects a CH that is closest to it regardless of the distance of the CH to the base station. Using the proposed method, a node selects a low distance that is calculated from a node to every CH to the base station.

The following Table 1 summarizes the hypothesis we have made in evaluating the LEACH and the proposed method.

Table 1 Simulation parameters

The performance of the suggested proposed method is compared with the basic LEACH protocol in terms of average power reduction.

The following Table 2 reveals a result of power consumption in cluster head nodes in LEACH and power consumption in the proposed approach. So, when there is a high number of nodes, the power consumption in the proposed method is minimized because a normal node must select a cluster head with a minimum distance so that extra transferring will not occur and a cluster head places between a normal node to a base station; so, a power reduction for cluster heads will be consumed.

Table 2 Simulation results

As simulation began with the hypothesis, Fig. 1 reveals the degree of average energy reduction comparison at different times between LEACH and the proposed method for a various number of nodes and eight rounds.

Fig. 1
figure 1

Cluster head power consumption in LEACH and the proposed approach

The final extracted result plot for cluster heads reveals improvement over a LEACH protocol in such a LEACH line above the proposed line means the proposed approach reduces power less than the LEACH protocol. Table 3 and Fig. 2 reveal the influence of power reduction on the whole network nodes when using the LEACH protocol with a various number of nodes and eight rounds for each of them.

Table 3 Simulation result
Fig. 2
figure 2

Power consumption in overall network

As can be seen, the average energy reduction in LEACH is more than that of the proposed method with various numbers of nodes.

Improvements happen because the enhanced algorithm selects a cluster head based on distances, and the node selection of a distant cluster head through it to the base station is decreased, in which the network dispersion of energy is minimized; thus, the lifetime of the network will be enhanced.

6 Conclusions

The aim of this paper was to investigate the power sensitivity when normal nodes select appropriate cluster heads that have a minimum distance to the base station and have affected and reduced battery power consumption, therefore prolonging the lifetime of the network.

A simulation-based performance study was conducted to investigate the power consumption of the suggested proposed approach strategy compared with LEACH. The results reveal that the consumption of power is minimized, and hence, the lifetime of a network will be enhanced. As the number of rounds is maximized, the decreased power consumption will reduce more. Finally, in comparison with LEACH, the proposed method performs better.

The subject of reducing power consumption in WSNs is an interesting topic due to the importance of extending a lifetime of a WSN. Future work of this thesis is to extend it in multi-hop routing.