Abstract

In order to equalize network energy consumption, and extend the life cycle, the optimized protocol based on low-power adaptive cluster stratification (LEACH) is proposed. Firstly, considering residual energy and distance of nodes, the threshold function of the cluster head is modified, and the network region division strategy is optimized, to reasonably adjust the size of clusters. For intracluster transmission, a sleep mechanism is added to balance node energy consumption. And a new barycenter node is added to assist cluster head (CH) to complete the transmission task, thereby extending the service lifetime. In the multihop communication between clusters, in order to calculate the fitting factor of the next hop, we derived a new formula, which takes into account the angle, remaining energy, and distance. Simulation results show that the total remaining energy of the optimized LEACH protocol is reduced by 31.4%, and the network life cycle is increased by about 52%.

1. Introduction

Wireless sensor network (WSN) is one of the powerful tools of remote monitoring. With the advent of the information era, it has important applications in all walks of life. In WSNs, in order to obtain and transmit data, it is usually necessary to deploy many nodes to the target monitoring area. Due to the special nature of the monitoring environment, it is often difficult for nodes to maintain energy by replacing batteries. Therefore, the life cycle of a node has become the main standard for the design of sensor network data acquisition schemes [1]. In order to solve the problem of limited node power in WSN, it is necessary to use appropriate routing protocol to extend the life cycle of the network. Currently, the routing protocol is mainly divided into planar routing protocol and hierarchical routing protocol [2]. Since planar routing protocols need to maintain large routing tables and the transmission distance between sensor nodes is limited, they are not suitable for large-scale networks, while hierarchical routing protocol can not only improve these problems, but also reduce network energy consumption and extend network life cycle [3]. Therefore, hierarchical routing protocol (LEACH protocol) is selected in this paper.

LEACH protocol adopts a hierarchical network structure and is the first clustering routing protocol designed by Cui et al. [4]. To extend the network lifetime, each node selects the cluster head through the election mechanism, and each “round” in the network will conduct the cluster head election and network reorganization, to prevent the cluster head from energy failure due to excessive energy consumption.

On the basis of LEACH protocol, subsequent researchers conducted many optimization studies and proposed DEEC [5], CRBED [6], and other methods. In [7], aiming at the deficiency of the classical clustering LEACH protocol, the GA-LEACH routing protocol is proposed, which is a combination of microgenetic algorithm with LEACH protocol, to enhance the cluster head (CH) selection and also reduce the energy consumption of the network. In [8], in each round of cluster reconstruction, leach-F algorithm was proposed to select cluster heads in the cluster to reduce the energy loss. In [9], the nonuniform clustering EEUC algorithm was proposed. Clusters of different sizes are set according to the distance to the gateway node, which protects the hot nodes and equalizes energy consumption. In [10], an algorithm based on distributed learning automata was designed. By selecting a subset of nodes in the network, each node was protected by at least one active node to achieve the global goal of the network, and each node realized self-protection, thus prolonging the life cycle of the node. Article [11] presented a Modified Threshold-based Cluster Head Replacement (MT-CHR) protocol. A new probability of being a cluster head, for any node in any round, was proposed which agreed fairly with the assumptions introduced in LEACH protocol. A new expression of threshold energy is proposed, which takes into account delaying the death of first node and avoiding any data. In literature [12], H-LEACH technology was proposed to solve the energy consideration problem in the election of cluster heads. The threshold condition was used to select channel heads, and the residual energy and maximum energy of nodes in each round were considered. Article [13] proposed a greedy partial coverage (GPC) algorithm, which used neighbor nodes to maintain the connectivity of selected nodes, and used the overlap between nodes to achieve the required coverage rate, which improved the coverage rate and connectivity between nodes, and effectively reduced the energy consumption of the network. In [14], the new LEACH protocol based on affinity propagation (AP) was proposed; it enables a fully distributed control and resolves practical limitations of conventional LEACH-based protocols by simplifying network functionalities and reducing sensor hardware costs. In [15], an efficient cluster head selection algorithm, pSO-ECHS, based on particle swarm optimization was proposed, and an effective particle coding and fitness function scheme were adopted to improve the energy efficiency of particle swarm optimization. In [16], it concentrated on recent hierarchical routing protocols, which were depending on LEACH protocol to enhance its performance and increase the lifetime of wireless sensor network. Node rank algorithm depends on both path cost and number of links between nodes to select the cluster head of each cluster. Article [17] proposed pDCDs algorithm which was a learning automaton based algorithm for PCP. It found nodes to monitor p-percent coverage in deployed network, which achieved full network coverage and significantly improved the life cycle of the network. In [18], an improved energy-saving (IEE-LEACH) protocol was proposed, which considered the energy of the remaining nodes and the average energy of the network. To obtain the optimal number of cluster heads, the nodes close to the base station are prohibited from joining the cluster, which greatly reduced the energy consumption of the wireless sensor network.

The predecessors have done a lot of research on LEACH protocol to solve the problems existing in LEACH protocol itself. But they often optimize the LEACH protocol from a single perspective, rather than from multiple perspectives. Literature studies [7] and [13] optimized LEACH protocol through other algorithms and focused on energy research while ignoring other problems of LEACH protocol, such as data volume. Literature studies [8], [10], and [14] achieved the purpose of optimization by studying the location selection of cluster head nodes, while ignoring other aspects of LEACH protocol, such as network coverage. Literature [12] optimized LEACH protocol by reducing the hardware overhead of wireless sensor networks. From what has been discussed above, the above research was all focused on the residual energy of nodes or distance, using other algorithms optimizing LEACH agreement and prolonging the network life cycle. However, it ignored the impact of cluster size on network life cycle and had no comprehensive optimization of energy, distance, angle, and other influencing factors. So the research angle is relatively single.

In conclusion, this paper optimizes and improves the clustering method in LEACH protocol, adjusts the size of clusters, and avoids the formation of extremely large clusters and extremely small clusters. Considering the impact of many factors such as the residual energy of cluster head and center of gravity node, distance, and angle, by selecting the center of gravity node a new cluster formation and data transmission mechanism are proposed. Simulation results show that the new clustering mechanism can effectively balance the energy consumption of nodes and extend the life cycle of wireless sensor networks.

2. LEACH Protocol Optimization

2.1. LEACH Protocol

LEACH protocol is a low-power adaptive routing protocol based on clustering. Its working mechanism is that all nodes take the responsibility of cluster head in turn. The purpose of the cluster head is to collect information and send it to the next cluster head until Gate Node (GN). Generally, the energy consumption of cluster heads is much higher than that of ordinary nodes. Therefore, the rotation mechanism of cluster heads avoids excessive consumption and death of cluster heads, equalizes energy consumption between nodes, and extends the life cycle of the network [19]. In each election of cluster heads, those who have served as cluster heads before no longer participate in the election.

Suppose that, at the beginning, a node randomly chooses a number between 0 and 1. If the random number generated by a node is less than T (n), it will become the cluster head of the current round. The expression of T (n) is as follows:

In equation (1), r is the current rounds, P is the percentage of nodes which become cluster heads, and G is the set of nodes that have not been elected cluster heads in the 1/P round before the current round.

2.2. Energy Model

The node communication model and energy consumption formula of WSN (wireless sensor network) were proposed in literature [20] and are shown in Figure 1 and formula (2), respectively.

When the transmission distance is d, the transmission energy consumption of k-bit information is

In equation (2), is a free space model and is a multipath attenuation model. In general, intracluster calculations use and intercluster transmission . is receiver sensitivity related amplification. is magnification energy related to the received noise image. is electricity related to factors such as digital coding.

According to the above, the received energy consumption Er can be defined as

WSN energy consumption mainly includes transmission energy consumption, reception energy consumption, idle energy consumption, and sleep energy consumption [21]. Research shows that receiving and transmitting energy are the main energy loss. In addition, during data transmission, many redundant nodes will appear. Their idle energy consumption is far greater than the sleep energy consumption, so the sleep mechanism is used to the energy consumption of nodes in the cluster.

3. Improvements to the LEACH Protocol

The election mechanism of the LEACH routing protocol has a good self-organization. Compared with the traditional routing protocol, it can efficiently transmit information to GN. However, its election mechanism has some problems. That is, the node becoming the cluster head depends on the random number generated by itself and T (n), which is too random, and the residual energy of the node is not considered. In the communication process, the cluster head far away from GN consumes more energy than the node close to GN and is more likely to be exhausted in the long transmission process, which affects life cycle of the network. In the transmission phase, the cluster head is randomly generated. The public nodes in the cluster use a single hop to transmit information to the cluster head. If the cluster head deviates from the center of gravity, it will increase the transmission energy consumption. Moreover, the LEACH protocol is dynamically adjusted, and the number of cluster heads in each round is also indefinite. If the number of cluster heads is too large, the number of hops between the cluster head and GN will increase, increasing the multihop traffic. If the number is too small, the cluster head will be over-utilized and die due to excessive energy consumption. At the same time, it will inevitably produce maximum clusters (too many nodes in the cluster) and minimum clusters (too few nodes in the cluster or even only one). Maximum clusters will generate many redundant nodes which will cause idle energy consumption. A minimum cluster will be a great load leading to the early death of the first node. Therefore, the size of clusters should be controlled to solve the problem of maximal clusters and minimal clusters.

WSN life is usually defined by its role. At present, there are three mainstream evaluation methods [22]: the first node death evaluation method. In WSN, the death of the first node will affect the performance of the whole network, so we should try our best to delay the appearance of the first node. Second is evaluating for the death of half the nodes. This evaluation method is suitable for the area with dense nodes. The death of a single node or a small number of nodes will not affect the performance of the network, and the death time of half the nodes will be available for reference. Thirdly, it is time evaluation of all node deaths. In this paper, the three evaluation methods are used simultaneously.

In this paper, we defined three types of nodes: cluster head nodes, ordinary nodes, and center of gravity nodes. The cluster head node collects the information of common nodes in the cluster and fuses it. Then, the information is transmitted between cluster heads until the data packet is forwarded to GN. Common nodes are used to collect surrounding information and transmit it to the cluster head. The center of gravity node is the node closest to the center of gravity of the cluster (selected during each round calculation). The center of gravity node does not participate in the election of cluster heads, only taking functions as a normal node and an auxiliary cluster head.

To describe more clearly, the LEACH protocol is divided into four stages: cluster stage, stable transmission stage, auxiliary transmission stage, and failure reforming stage.

3.1. Clustering Stage

In the practical application, the energy consumption of each node is different due to the influence of many factors such as distance and data volume. For the long-term running network, some nodes are easily depleted of energy prematurely, so that the selected cluster head is not necessarily the best cluster head. Therefore, during the election, the energy of the nodes and distance are considered and a new T (n) is proposed:

In equation (4), Esv represents the remaining energy of the node, represents the average value of the energy of all nodes, dcs represents the distance between nodes and GN, represents the average distance between nodes and GN, and and are weight impact factors, respectively; .

Considering the energy and distance of nodes comprehensively, more advantageous nodes can be selected as cluster heads by equation (4), so that they can transmit data through the shortest distance. It can realize energy balance, protect nodes with lower residual energy, and extend the network life cycle.

Because clusters adopt the multihop communication method, the cluster head node closer to the gateway consumes energy quickly for transmitting more information and leads to the formation of “hot spots.” For solving this problem, this paper proposed a new type of partition which is the larger cluster radius and the more nodes in the cluster being away from GN.

The wireless sensor network is partitioned according to rules (d, d/2, ..., d/2 ∗ n). As shown in Figure 2, if CH appears in the first divided area, its diameter range is (0, d). When a circle crosses the divided region, three situations occur. When the center of the circle is at the bottom and on the line of the center, the diameter is (0, d), while when it is at the top, its diameter is (0, d/2).

3.2. Smooth Transmission Phase

In the stable transmission process, CH is not far away from the center of gravity. Currently, the center of gravity node is just a normal node and only undertakes the task of collecting data. This stage is divided into intracluster transmission and intercluster transmission.

In order to find redundant nodes in the cluster, when intracluster transmission is performed, computer perception intensity and detection contribution rate of nodes are first calculated, and then the sleep mechanism is used to make these nodes enter the sleep state. When a node chooses to sleep, a sleep message is issued to notify the surrounding nodes that it is not working. At the end of a round, nodes choose to start or sleep based on perceived intensity and detection contribution, as well as coverage and connectivity, and inform their neighbors of their decision.

When performing intercluster transmission, CH forwards packets to adjacent nodes. When cluster head selects the next jump, factors such as the remaining energy, distance, and angle of cluster head should be considered at the same time. Energy is the first element, and distance is the second element. When the difference between energy and distance is not big, the appropriate angle should be considered. Therefore, we propose the measurement formula (5):

The value of F in formula (5) can be used as the metric for choosing the next hop CH. The greater the value of F, the more likely the CH will be the next hop, where E is the remaining energy of the next hop CH, α is the angle formed by CH, the next hop CH and GN, in which CH is the vertex, and d is the distance from GN to CH.

According to Figure 3, the nodes close to the gateway node bear heavy transmission load, so these nodes are set as cluster heads, which only assumes the responsibility of collecting the previous hop information and transmitting the information to GN, so as to reduce the burden. In the next round, when the residual energy value of these nodes is lower than the remaining energy value of the whole node, they should consider going to the cluster close to them with the highest total residual energy, so as to avoid the situation of premature exhaustion of the minimal cluster energy. Then, they become ordinary nodes, thus enhancing the transmission capacity of adjacent clusters and saving minimal clusters.

3.3. Auxiliary Transmission Phase

In this stage, CH is far from the center of gravity of the network, which takes over the work of CH. At this stage, it has two characteristics: high energy value and never acting as a CH. The working mechanism is that the center of gravity node transmits the collected information to CH, which then forwards the information to the next hop.

3.4. Failure Reforming Phase

In this stage, if the energy consumption of CH is serious, the center of gravity node is started, and by comparing the distance between CH and the center of gravity node to GN, it determines whether the information needs to be transmitted to GN. Currently, CH determines its function above and below the center of gravity node. As shown in the left figure of Figure 4, the center of gravity node assumes CH work and then transmits the information to CH, which then transmits the information to GN. As shown in the right figure of Figure 4, the center of gravity node is close to the gateway node; at this situation, CH becomes an ordinary node, and the center of gravity node becomes a new CH. At the same time, considering CH as a node with higher energy in the cluster, if it does not reflect the function that CH should have, the cluster is basically in a state of failure and needs to be redeployed (rotation mechanism).

4. Experiment and Discussion

In the same simulation environment, the optimized LEACH protocol is compared with LEACH and LEACH-C [23]. They mainly compare the number of dead nodes, the number of data packets, and the remaining energy of the network under the same number of rounds.

Suppose the network was composed of 200 nodes, distributed in the plane of 200 ∗ 200. When the remaining energy of the node was 10% of the initial energy, the node died. I-LEACH in all simulation figures of this article represented the optimized LEACH protocol.

Table 1 is the LEACH protocol operation flow chart, and Table 2 is simulation experiment parameters.

4.1. Comparison of the Three Numbers of Dead Nodes

As shown in Figure 5, the bar graph shows the comparison of the corresponding round numbers under the three protocols such as one node dying, half of the nodes dying, and all nodes dying during the 1500 rounds of CH elections in the network. The abscissa is the number of dead nodes, and the ordinate is the number of rounds. From the first node death indicator, the optimized LEACH protocol achieved a performance improvement of about 87.5% compared with the LEACH protocol. According to the index of half node death, the multidimensional optimized LEACH protocol extends the life cycle by 30% compared with the LEACH protocol and about 35% longer than the LEACH-C [23]. According to the index of death of all nodes, LEACH protocol died when it was around 1200 rounds, LEACH-C [23] died when it was around 1100 rounds, and the multidimensional optimized LEACH died when it was around 1500 rounds. The network life was increased by 16.7% compared to LEACH protocol and 26.7% compared to LEACH-C [23]. From the above comparison, we can see that it can balance the network energy. Its advantages are as follows: the delay of the death of the first node reflects the efficiency of the network’ utilization energy; the death time of the last node is prolonged, which realizes the purpose of prolonging the network life cycle. Compared with the Leach-Mac proposed by [22], it has a great improvement in the death time of the first node, half of the nodes, and all the nodes. The reason for this improvement is that the optimal cluster head is selected. Therefore, it significantly improves the network life cycle by saving energy.

4.2. Comparison of the Number of Alive Nodes

As shown in Figure 6, the curve shows the comparison of the number of alive nodes when the protocol runs 1500 rounds. The abscissa indicates the number of rounds, and the ordinate indicates the number of alive nodes. As can be seen from Figure 6, the number of alive nodes of the optimized LEACH protocol is basically much more than that of LEACH protocol in 1500 rounds. Compared with LEACH-C [23] protocol, the number of alive nodes before 700 rounds of the optimized LEACH protocol has little difference. After 700 rounds, it is obviously more than that of LEACH-C. This is because in the election stage, by improving the election function, the nodes with lower energy are protected and the energy consumption of the network is balanced. In general, the optimized LEACH protocol focuses on protecting the lifetime of nodes, so it is better than the other two algorithms in the performance of node alive number.

4.3. Comparison of the Number of Dead Nodes

As shown in Figure 7, the curve shows the comparison of the number of dead nodes when the protocol runs 1500 rounds. The abscissa is the number of rounds, and the ordinate is the number of dead nodes. As can be seen from Figure 7, the first dead node appears around round 400 between LEACH-C [23] and the optimized LEACH. Before 700 rounds, the optimized LEACH protocol and LEACH-C perform significantly better than LEACH in terms of the number of dead nodes, and there is little difference between the two protocols. After 700 rounds, LEACH nodes die significantly less than the other two algorithms. On the whole, the number of deaths of optimized LEACH nodes is balanced, which maximizes the lifetime of nodes. By improving the election function and adding new threshold function, the optimized LEACH-C protocol is designed to delay the time of the first dead node, so that more nodes can run until the end, so as to realize the balanced development of the network and improve the scalability of wireless sensor networks.

4.4. Comparison of the Number of Data Packets

As shown in Figure 8, the curve shows the comparison of the number of packets when the protocol runs 1500 rounds. The abscissa indicates the number of rounds, and the ordinate indicates the number of data packets. As can be seen from Figure 8, the LEACH protocol is compared with LEACH-C and the optimized LEACH, and the number of packets exceeds LEACH and LEACH-C [23]. It can be seen that 500 rounds is a turning point which has little difference before 500 rounds and an increasing trend after 500 rounds. This is because a new measurement formula compared with [24] proposed considered the relevant factors of CH election and CH transmission, resulting in uniform energy consumption, reducing the variation of cluster heads and energy consumption, and optimizing the energy receiving efficiency of gateway nodes. The final optimized LEACH significantly transmits twice more packets than LEACH, and about 30% more packets than LEACH-C [23]. It further optimized the scalability of the protocol and made transmission increase twice.

4.5. Comparison of Network Residual Energy

Node energy consumption is mainly generated when collecting and sending data packets. Only the balanced energy consumption between nodes can bring long-term vitality to wireless sensor network. The load should be evenly distributed among the nodes. Figure 9 shows the residual energy of the network under the three protocols in 1500 cycles. Compared with LEACH, the optimized protocol is about 30% more than the original LEACH’s total residual energy, and about 15% more than LEACH-C [23], and there is a certain linear relationship reflecting the lower energy consumption and its better balance. It can be seen from Figure 9 that the residual energy distribution of nodes is uneven, showing polar weathering for LEACH protocol. Especially after the death of the first node, the change of the original threshold function value gives all nodes a chance to become cluster heads, which increases the randomness and brings more energy consumption. Some nodes die prematurely, while a few nodes have high energy. It optimizes CH selection by considering the residual energy of nodes, and nodes in the network consume energy evenly; almost all nodes in the network run out of energy at the same time. The simulation results are compared with [4] in the case of the same initial energy; its nodes have higher energy at any time and a better convergence rate. Therefore, the optimized LEACH protocol has better energy balance and extends the life cycle of the network.

In conclusion, by observing Figures 59, in the early stage of WSN, the optimized LEACH protocol can effectively delay the first dead node time and protect the life of the node and increase the network energy on the basis of the transmission of the same data packet. In the middle and later part of transmission, it ensures that more data packets are transmitted, and the energy of the nodes is balanced. The nodes in the network are almost exhausted at the same time and realized the purpose of extension of the network life cycle.

5. Conclusion

Aiming at the disadvantages of the existing LEACH protocol, this paper comprehensively considers the residual energy, transmission angle, and distance and successively improves the formation of clusters, transmission within clusters, communication between clusters, auxiliary transmission, and other links in the LEACH protocol. Through simulation comparison, it is found that it has great advantages in terms of the number of surviving nodes, network life cycle, and network residual energy. However, judging from the number of rounds when all nodes die, it only has more than 300 rounds of time, which is not ideal and greatly limits the scope of application. Future research goals are to improve the performance of the network from the number of rounds when all nodes die, reduce energy consumption, and extend the life cycle of the network. At the same time, we try to bring an optimized LEACH heterogeneous network and real-time environment.

Data Availability

The initial nodes are generated randomly in the network, and there are no observation data used in the simulation experiments.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

The authors acknowledge the Changsha Science and Technology Program Project (Grant no. KQ1901139).