# An Energy-Balanced Routing Protocol for a Wireless Sensor Network

Authors: Lin Li; Donghui Li
Journal: Journal of Sensors
 (2018)

---

## Abstract

The wireless sensor network is an intelligent self-organizing network which consists of many sensor nodes deployed in the monitoring area. The greatest challenge of designing a wireless sensor network is to balance the energy consumption and prolong the lifetime of the network, seeing that the nodes can be powered only by batteries in most conditions. An energy-balanced routing protocol (EBRP) for wireless sensor networks is proposed in this paper. In EBRP, we divide the network into several clusters by usingK-means++ algorithm and select the cluster head by using the fuzzy logical system (FLS). Since the previous researches did not demonstrate how to get the fuzzy rules for different networks, we propose a genetic algorithm (GA) to obtain the fuzzy rules. We code the rules as a chromosome, and the lifetime of the network is treated as a fit function. Then, through the selection, crossover, and mutation of each generation, the best offspring can be decoded as the best rule for each network model. Through the simulation, comparing with the existing routing protocols such as low-energy adaptive clustering hierarchy (LEACH), low-energy adaptive clustering hierarchy-centralized (LEACH-C), and stable election protocol (SEP), the EBRP prolongs the network lifetime (first node dies) by 57%, 63%, and 63%, respectively.


---

## Body

## 1. Introduction

A wireless sensor network (WSN) consists of a large scale of cheap microsensor nodes deployed in the monitoring area. These nodes are usually networked in a multihop fashion, to enable cooperation among nodes and real-time delivery of sensed data to the users [1]. Due to the limited resources of the computing power, battery, and communication capacity of sensor nodes in a large scale [2, 3], it is a challenge to prolong the lifetime and balance the energy consumption in a WSN [4].One of the popular techniques to balance the energy consumption in the nodes and prolong the lifetime of the network is clustering [5]. The energy efficiency and the network lifetime of WSNs are extremely related to a self-organization and clustering mechanism, because of their benefits in these issues [6]. Clustering is a method to divide the nodes into several groups called clusters. Each cluster chooses a special node as a coordinator named the cluster head (CH). In this method, the nodes do not need to communicate with the sink node directly. Alternately, the CHs integrate the data collected in the cluster and transfer it to the sink node. As a consequence, the clustering leads to a significant reduction in the energy consumption in the network.This paper presents a routing protocol for WSN called an energy-balanced routing protocol (EBRP) for wireless sensor networks. The EBRP balances the energy consumption of the network and prolongs the lifetime of the network. The sink node divides the network intoK clusters by using a K-means++ algorithm and broadcasts the fuzzy rules. In the first round, the sink node calculates the chosen value of each node by FLS and chooses the CHs with the maximum value in each cluster. The CH records the energy and distance information of the cluster member nodes for calculating the chosen value. The CH of this round selects the node with the maximum value as a CH of the next round in each cluster. The fuzzy rules are acquired by the sink node for the current network deployment through a designed GA. We code the fuzzy rules as chromosomes of individuals in GA while the fitness function is the lifetime of a specific network model. Then, through crossover, selection, and mutation, the best individual with the longest network lifetime is obtained which is decoded as the best fuzzy rules. In this protocol, the large computation such as for clustering and acquiring fuzzy rules is undertaken by a sink node while the small one is computed by nodes in a distributed way such as the CH selection without communicating with the sink node directly. Therefore, the EBRP is propagable since we can acquire appropriate fuzzy rules for different sizes or deployment of WSNs with it.The rest of this paper is organized as follows. The related work is presented in Section2. Section 3 shows the preliminaries including the WSN model and the energy model. The details of the proposed EBRP are illustrated in Section 4. Section 5 provides the simulation results of the network performance. Finally, Section 6 concludes the paper.


## 2. Related Work

Many efforts have attempted to design a clustering routing protocol to prolong the lifetime of WSN. In this section, the authors present the related existing protocols.The most famous clustering routing protocol is LEACH [7]. Since the CH is elected randomly and circularly to balance the energy consumption in every node, the LEACH achieves low energy consumption, well energy balance, and a long lifetime of the whole network. However, there are some shortcomings in LEACH. While the CHs are selected totally randomly without considering the position in the network, sometimes it is likely that there will be no CHs in an area and it will lead to a rapid energy consumption. For another, the consumption of the clustering process is huge since the cluster is generated in every round. Then, Heinzelman et al. proposed LEACH-C [8] which is a centralized protocol. The nodes send their residual energy and position data to the sink node at the beginning of each round, and the CHs are selected by the sink node. The consumption is huge if the nodes are far away from the sink node because the nodes need to communicate with the sink node in every round. The advanced routing transfer low-energy adaptive clustering hierarchy (ART-LEACH) [9] consumed less power than LEACH, but the lifetime of the network when the first node dies is much shorter than LEACH. The ART-LEACH achieved a poor energy-balancing effect. Mehmood et al. [6] proposed a secure and low-energy zone-based wireless sensor network routing protocol where the nodes of the WSN are split into zones and each zone is separated into clusters. They focused on security and energy efficiency in a specific area. An energy-efficient multilevel and distance-aware Clustering (EEMDC) mechanism is proposed to improve the energy efficiency of the multihop WSN [10]. The hybrid energy-efficient distributed (HEED) clustering approach [11] is a protocol which chooses the CH by residual energy and communication cost to evenly distribute the CHs. While the communication cost of each node does not change much during a period, every node is required to broadcast its communication cost in every round which may bring unnecessary consumption. Mehmood et al. [12] proposed an artificial neural network for WSN monitoring which is trained by huge data of a specific monitoring environment. Indranil et al. [13] applied the fuzzy logical system to CH selection with the position and residual energy of the node which has the same shortcoming as the LEACH-C. In GCHE-FL [5], the fuzzy logical system is used to select CHs and clustering. Izadi et al. [14] used a type-2 fuzzy logical system to determine the probability of CH selection. Roslin [15] used the genetic algorithm directly in CH selection without considering the computing power of the node. SEP [16] calculates the probability of a node being a CH by its residual energy and of the whole residual energy of the network to prolong the lifetime of network, assuming that each node knows the whole residual energy of the network. The LEACH-balanced protocol focused on energy-balancing, and the parameter of residual energy was introduced [17]. However, they did not take the positions of the nodes into consideration. Khan et al. [18] balanced the energy consumption in a specific secure protocol by introducing a balanced factor. Yuea et al. [19] formulated a balanced cluster-based data aggregation algorithm. The WSN was divided into grids, and the CH was selected to manage the nodes and balance the energy consumption of the nodes.Generally, the centralized protocol requires the sink node to select CHs of each round, and the nodes must communicate with the sink node in each round. It is difficult to achieve good performance of the network with the distributed protocols since the protocol implemented should be simple because of the limited computing and energy resource of the node. The protocol in [15] is hard to apply in practice because of the large amount of computing of the GA. The fuzzy logical system is suitable for distributed computing with simple if-then rules [20]. But [5, 13, 20] only gave the fuzzy rules by experience and did not propose a common optimization method to obtain fuzzy rules for different sizes or deployment of the network. To overcome these drawbacks of the protocols mentioned above, this paper proposed an energy-balanced routing protocol for wireless sensor networks named EBRP.


## 3. Preliminaries

In this section, the WSN model and energy model we use to evaluate the protocols are presented in detail.


### 3.1. WSN Model

The WSN model considered in this paper is composed of a sink node and many sensor nodes deployed in an area randomly [21]. The sensor nodes collect the data from the area and then send to the sink node. Meanwhile, the sink node processes and transfers the data to a cloud or users [22]. There are some assumptions of the WSN model in this paper:
(a)
The position of the nodes is permanent since deployment. The unique ID and position of the nodes are recorded in the sink node.
(b)
All the sensor nodes are the same.
(c)
All the sensor nodes are supplied by batteries with the same initial energy. The sensor node dies and loses the ability to work when the battery runs out.
(d)
The sink has infinite energy and computing resource.
(e)
The sensor nodes can adjust the transmission power to the transmission distance.


### 3.2. Energy Model

We use the first-order wireless model as the energy model in [5]. The required energy for transmitting l bit to d distance can be calculated in
(1)Etx=Eelec∗l+εfs∗l∗d2,d<d0,Etx=Eelec∗l+εmp∗l∗d4,d≥d0,where Eelec is the transmitter energy or receive circuit, εfs is the parameter in a free space model, εmp is the parameter in a multipath fading model, and d0 is the threshold which is calculated in
(2)d0=εfsεmp.The required energy for receivingl bit to d distance can be calculated by (3).
(3)Erx=Eelec∗l.


## 3.1. WSN Model

The WSN model considered in this paper is composed of a sink node and many sensor nodes deployed in an area randomly [21]. The sensor nodes collect the data from the area and then send to the sink node. Meanwhile, the sink node processes and transfers the data to a cloud or users [22]. There are some assumptions of the WSN model in this paper:
(a)
The position of the nodes is permanent since deployment. The unique ID and position of the nodes are recorded in the sink node.
(b)
All the sensor nodes are the same.
(c)
All the sensor nodes are supplied by batteries with the same initial energy. The sensor node dies and loses the ability to work when the battery runs out.
(d)
The sink has infinite energy and computing resource.
(e)
The sensor nodes can adjust the transmission power to the transmission distance.


## 3.2. Energy Model

We use the first-order wireless model as the energy model in [5]. The required energy for transmitting l bit to d distance can be calculated in
(1)Etx=Eelec∗l+εfs∗l∗d2,d<d0,Etx=Eelec∗l+εmp∗l∗d4,d≥d0,where Eelec is the transmitter energy or receive circuit, εfs is the parameter in a free space model, εmp is the parameter in a multipath fading model, and d0 is the threshold which is calculated in
(2)d0=εfsεmp.The required energy for receivingl bit to d distance can be calculated by (3).
(3)Erx=Eelec∗l.


## 4. The Proposed Energy-Balanced Routing Protocol

In this section, the proposed EBRP is illustrated. Firstly, we provide the clustering method-basedK-means++ and the selection method based on FLS. Then, a new GA is developed to acquire the suitable fuzzy rules for different WSNs in our designed FLS. At last, we demonstrate the whole operation process of EBRP.


### 4.1.K-Means++ Clustering

To balance the energy and prolong the lifetime of the network, we need to design an appropriate clustering algorithm at the first time. In this paper, theK-means++ clustering algorithm [23] is modified to be suitable for WSN clustering. The sink node divides the nodes into K clusters in line with the positions of the nodes. Let X=x1,x2,…,xm,…,xn be the set of the coordinates of the node, and the algorithm is as follows:
(a)
A node in setX is chosen randomly as the number 1 cluster center c1. The distances between the new cluster center and other nodes are calculated by the sink node. A new node xm is chosen as a new cluster center cp, while the probability of being chosen is d2xm,cp/∑j=1nd2xj,cp, where p∈1,…,k. dxm,cj is the Euclidean distance between xm and cj, and the p is the cluster number.
(b)
Repeat the step b until all the cluster centers ofK clusters are calculated.
(c)
The distance between each node to each cluster center is calculated, and the node is computed to the nearest cluster center. It is denoted byxi∈Cp, where the Cp is the set of nodes in cluster p.
(d)
The new cluster center in each cluster is denoted bycp=1/Cp∑h;xh∈Cpxh, where p∈1,…,k.
(e)
Repeat steps d and e until reaching the number of setting iterations.TheK clusters are obtained through the algorithm by the sink node. Then, the sink node broadcasts the center coordinate of each cluster and the cluster number to the corresponding node.


### 4.2. The Selection of CH Based on a Fuzzy Logical System

As the clusters are formed, we need an efficient CH selection method. With a selection method in a centralized way, the energy consumption of WSN is huge since the sink node needs to transmit the information of selected CHs to all the nodes in each round. In particular, the selection method ought to be implement in a distributed way. Moreover, the lifetime of the whole network depends on the energy consumption related to the distance and residual energy of each node. It is hard to describe the exact mathematical model of the relationship between the network lifetime and the nodes’ parameters. The FLS does not need an exact mathematical model of the system as well, and it can make decisions even if there is insufficient data. Thus, the FLS is strongly recommended for WSN due to its low computational complexity and its easy application in a distributed way with low cost compared to other methods. Therefore, we develop a FLS to select the CHs.The position and residual energy of the nodes are the key parameters in the CH selection. There are three inputs in the proposed FLS: the distance from the sensor node to the sink node, the distance from the sensor node to the cluster center, and the residual energy of the node. For ease of handling, we normalize these three values to fit in [0,1] by min–max normalization [24]. The normalize function is shown in
(4)fnormx=x−xminxmax−xmin,where xmax is the maximum value and xmin is the minimum value in its cluster.The distance from the sensor node to the sink node, the distance from the sensor node to the cluster center, and the residual energy of the senor node are denoted byDtos, Dtoc, and Eres, respectively, as three inputs in FLS after the normalization. The Dtos and Dtoc are divided into three levels: L, M, and H. The Eres is divided into five levels: vL, L, M, H, and vH. The output of the FLS is the choosing priority denoted by Pchoose which is divided into nine levels: vvL, vL, L, rL, M, rH, H, vH, and vvH. The membership functions of inputs and outputs are trapezoidal-shaped or triangular-shaped that are demonstrated in Figure 1.Figure 1
Membership functions.
(a)
(b)
(c)
(d)The level number of fuzzy inputsDtos, Dtoc, and Eres is 3, 3, and 5, respectively. Therefore, the total number of fuzzy rules is 45 = 3 ∗ 3 ∗ 5 in the proposed FLS. The output has 9 levels. Thus, the total number of possible fuzzy states is 945. It is hard to develop the rules only by experience with so many states while the appropriate fuzzy rules of a specific network may be different as well. We obtain the rules by using a developed GA introduced in Section 4.3.


### 4.3. The Method to Obtain Fuzzy Rules

To obtain the fuzzy rules for different sizes or deployment of WSN, we design a specific GA to solve this problem. The GA is a metaheuristic inspired by the process of natural selection. There are some elements in GA: parameter coding, the initial population setting, and fit function. How to code the fuzzy rules and design the fitness function are the keys to implementing the GA in obtaining the fuzzy rules for CH selection.In this paper, the inputs and output are coded as integers. The states ofDtos and Dtoc are denoted by integers 1, 2, and 3. The states of Eres are denoted by integer 1, 2, 3, 4, and 5. The states of Pchoose are denoted by integers 1, 2, 3, 4, 5, 6, 7, 8, and 9. Then, the matrix form of the fuzzy rule is obtained as RuleList in Figure 2. The RuleList is a matrix of 45 rows and 4 columns.Figure 2
The matrix form of the fuzzy rules.It is demonstrated that the 1st, 2nd, and 3rd columns in the matrix include all the 45 input states. For different fuzzy rules, the first three columns of the matrix are constant which is denoted by the matrixList of 45 rows and 3 columns. The fuzzy rules are determined by the 4th column shown in the red box in Figure 2. Then, the 4th column is transposed as a chromosome and it is a row vector of 45 columns which represents 45 genes. Therefore, each gene stands for a fuzzy rule.At the first time, the initial population denoted by ps is randomly generated which represents the ps fuzzy rules. Then, the selection method used in this paper is stochastic universal sampling which can avoid the selection deviation compared to the roulette wheel selection [25]. The two-point crossover method for a chromosome is introduced which is shown in Figure 3. In the mutation process, genes are randomly changed in the range of 1–9.Figure 3
The two-point crossover.In order to apply the protocol to various types of network, the fitness function used in this GA is the lifetime of a given network. Since the sensor node is energy limited and supplied by battery with an initial energy, we define that a node “dies” when the battery runs out. That is to say, the node loses the ability to work and becomes a dead node once its residual energy denoted byEres is zero. The most important issue is to know when the network starts to fail [6]. The round when first node dies (FND) is regarded as the lifetime of the network since the network is in an abnormal condition after the first node dies [26]. After several iterations of the crossover, selection, and mutation, the optimal chromosome is acquired as the BestRule that is a row vector with 45 rows. Then, the optimal matrix form denoted by BestRuleList of the fuzzy rules is obtained by
(5)BestRuleList=List,BestRuleT.In this method, we can get suitable fuzzy rules for a particular WSN.


### 4.4. The Operation Process of EBRP

The specific steps of the proposed EBRP are shown as follows:(a)
The sink node divides the nodes of the network intoK clusters with the algorithm in Section 4.1 and then calculates the Dtoss and Dtocs of all the nodes.
(b)
The sink node obtains theBestRuleList by using the method in Section 4.3. After that, it distributes the fuzzy rules as the BestRuleList, Dtos, Dtoc, and its cluster number to each node.
(c)
In the first round, the sink node calculates the fuzzy outputPchoose of each node by the proposed FLS in Section 4.2 and chooses the node with the maximum value in each cluster as a CH. Next, the sink node informs the corresponding cluster nodes of the CHs’ IDs, and each node records its CH’s ID.
(d)
Then, the nodes can start to send packets in an allocated TDMA schedule. The last time slot of the schedule is for transmitting the CH’s ID to its cluster member nodes. The cluster member nodes send their residual energy,Dtos, Dtoc, and the collected data to their CH. Then, the CH is required to receive, integrate, and transmit the data to the sink node.
(e)
After the transmission within the cluster is completed, the CH normalizes the residual energy of each cluster member, asEres. The CH calculates the Pchoose of each node within the cluster by the proposed FLS in Section 4.2 and chooses the node with the maximum value as the CH in the next round.Repeat the step d and step e, and the whole network works normally.After the static clusters are generated, the CHs are determined by the sink node only in the first round. Then, the CH selection process works in a distributed way. The CHs can choose the CHs of the next round all by themselves without communicating with the sink node, which reduces the energy consumption.


## 4.1.K-Means++ Clustering

To balance the energy and prolong the lifetime of the network, we need to design an appropriate clustering algorithm at the first time. In this paper, theK-means++ clustering algorithm [23] is modified to be suitable for WSN clustering. The sink node divides the nodes into K clusters in line with the positions of the nodes. Let X=x1,x2,…,xm,…,xn be the set of the coordinates of the node, and the algorithm is as follows:
(a)
A node in setX is chosen randomly as the number 1 cluster center c1. The distances between the new cluster center and other nodes are calculated by the sink node. A new node xm is chosen as a new cluster center cp, while the probability of being chosen is d2xm,cp/∑j=1nd2xj,cp, where p∈1,…,k. dxm,cj is the Euclidean distance between xm and cj, and the p is the cluster number.
(b)
Repeat the step b until all the cluster centers ofK clusters are calculated.
(c)
The distance between each node to each cluster center is calculated, and the node is computed to the nearest cluster center. It is denoted byxi∈Cp, where the Cp is the set of nodes in cluster p.
(d)
The new cluster center in each cluster is denoted bycp=1/Cp∑h;xh∈Cpxh, where p∈1,…,k.
(e)
Repeat steps d and e until reaching the number of setting iterations.TheK clusters are obtained through the algorithm by the sink node. Then, the sink node broadcasts the center coordinate of each cluster and the cluster number to the corresponding node.


## 4.2. The Selection of CH Based on a Fuzzy Logical System

As the clusters are formed, we need an efficient CH selection method. With a selection method in a centralized way, the energy consumption of WSN is huge since the sink node needs to transmit the information of selected CHs to all the nodes in each round. In particular, the selection method ought to be implement in a distributed way. Moreover, the lifetime of the whole network depends on the energy consumption related to the distance and residual energy of each node. It is hard to describe the exact mathematical model of the relationship between the network lifetime and the nodes’ parameters. The FLS does not need an exact mathematical model of the system as well, and it can make decisions even if there is insufficient data. Thus, the FLS is strongly recommended for WSN due to its low computational complexity and its easy application in a distributed way with low cost compared to other methods. Therefore, we develop a FLS to select the CHs.The position and residual energy of the nodes are the key parameters in the CH selection. There are three inputs in the proposed FLS: the distance from the sensor node to the sink node, the distance from the sensor node to the cluster center, and the residual energy of the node. For ease of handling, we normalize these three values to fit in [0,1] by min–max normalization [24]. The normalize function is shown in
(4)fnormx=x−xminxmax−xmin,where xmax is the maximum value and xmin is the minimum value in its cluster.The distance from the sensor node to the sink node, the distance from the sensor node to the cluster center, and the residual energy of the senor node are denoted byDtos, Dtoc, and Eres, respectively, as three inputs in FLS after the normalization. The Dtos and Dtoc are divided into three levels: L, M, and H. The Eres is divided into five levels: vL, L, M, H, and vH. The output of the FLS is the choosing priority denoted by Pchoose which is divided into nine levels: vvL, vL, L, rL, M, rH, H, vH, and vvH. The membership functions of inputs and outputs are trapezoidal-shaped or triangular-shaped that are demonstrated in Figure 1.Figure 1
Membership functions.
(a)
(b)
(c)
(d)The level number of fuzzy inputsDtos, Dtoc, and Eres is 3, 3, and 5, respectively. Therefore, the total number of fuzzy rules is 45 = 3 ∗ 3 ∗ 5 in the proposed FLS. The output has 9 levels. Thus, the total number of possible fuzzy states is 945. It is hard to develop the rules only by experience with so many states while the appropriate fuzzy rules of a specific network may be different as well. We obtain the rules by using a developed GA introduced in Section 4.3.


## 4.3. The Method to Obtain Fuzzy Rules

To obtain the fuzzy rules for different sizes or deployment of WSN, we design a specific GA to solve this problem. The GA is a metaheuristic inspired by the process of natural selection. There are some elements in GA: parameter coding, the initial population setting, and fit function. How to code the fuzzy rules and design the fitness function are the keys to implementing the GA in obtaining the fuzzy rules for CH selection.In this paper, the inputs and output are coded as integers. The states ofDtos and Dtoc are denoted by integers 1, 2, and 3. The states of Eres are denoted by integer 1, 2, 3, 4, and 5. The states of Pchoose are denoted by integers 1, 2, 3, 4, 5, 6, 7, 8, and 9. Then, the matrix form of the fuzzy rule is obtained as RuleList in Figure 2. The RuleList is a matrix of 45 rows and 4 columns.Figure 2
The matrix form of the fuzzy rules.It is demonstrated that the 1st, 2nd, and 3rd columns in the matrix include all the 45 input states. For different fuzzy rules, the first three columns of the matrix are constant which is denoted by the matrixList of 45 rows and 3 columns. The fuzzy rules are determined by the 4th column shown in the red box in Figure 2. Then, the 4th column is transposed as a chromosome and it is a row vector of 45 columns which represents 45 genes. Therefore, each gene stands for a fuzzy rule.At the first time, the initial population denoted by ps is randomly generated which represents the ps fuzzy rules. Then, the selection method used in this paper is stochastic universal sampling which can avoid the selection deviation compared to the roulette wheel selection [25]. The two-point crossover method for a chromosome is introduced which is shown in Figure 3. In the mutation process, genes are randomly changed in the range of 1–9.Figure 3
The two-point crossover.In order to apply the protocol to various types of network, the fitness function used in this GA is the lifetime of a given network. Since the sensor node is energy limited and supplied by battery with an initial energy, we define that a node “dies” when the battery runs out. That is to say, the node loses the ability to work and becomes a dead node once its residual energy denoted byEres is zero. The most important issue is to know when the network starts to fail [6]. The round when first node dies (FND) is regarded as the lifetime of the network since the network is in an abnormal condition after the first node dies [26]. After several iterations of the crossover, selection, and mutation, the optimal chromosome is acquired as the BestRule that is a row vector with 45 rows. Then, the optimal matrix form denoted by BestRuleList of the fuzzy rules is obtained by
(5)BestRuleList=List,BestRuleT.In this method, we can get suitable fuzzy rules for a particular WSN.


## 4.4. The Operation Process of EBRP

The specific steps of the proposed EBRP are shown as follows:(a)
The sink node divides the nodes of the network intoK clusters with the algorithm in Section 4.1 and then calculates the Dtoss and Dtocs of all the nodes.
(b)
The sink node obtains theBestRuleList by using the method in Section 4.3. After that, it distributes the fuzzy rules as the BestRuleList, Dtos, Dtoc, and its cluster number to each node.
(c)
In the first round, the sink node calculates the fuzzy outputPchoose of each node by the proposed FLS in Section 4.2 and chooses the node with the maximum value in each cluster as a CH. Next, the sink node informs the corresponding cluster nodes of the CHs’ IDs, and each node records its CH’s ID.
(d)
Then, the nodes can start to send packets in an allocated TDMA schedule. The last time slot of the schedule is for transmitting the CH’s ID to its cluster member nodes. The cluster member nodes send their residual energy,Dtos, Dtoc, and the collected data to their CH. Then, the CH is required to receive, integrate, and transmit the data to the sink node.
(e)
After the transmission within the cluster is completed, the CH normalizes the residual energy of each cluster member, asEres. The CH calculates the Pchoose of each node within the cluster by the proposed FLS in Section 4.2 and chooses the node with the maximum value as the CH in the next round.Repeat the step d and step e, and the whole network works normally.After the static clusters are generated, the CHs are determined by the sink node only in the first round. Then, the CH selection process works in a distributed way. The CHs can choose the CHs of the next round all by themselves without communicating with the sink node, which reduces the energy consumption.


## 5. Performance Analysis

In this section, we use a simulation to evaluate the performance of the proposed EBRP. We have to assume and determine several parameters, and the simulation parameters are listed in Table1.Table 1
Simulation parameters.
Parameter
Value
εfs
10 pJ/bit/m2
εmp
0.0013 pJ/bit/m4
Eelec
50 nJ/bit/signal
EDA
5 nJ/bit/signal
E0
0.1 JE0 is the initial energy of each node, and EDA is the energy consumption for data integration. The size of the data packet per round per node is 4000 bits in our simulation.In this simulation, the sensor nodes are randomly deployed over a 100 m∗ 100 m square area and the sink node is in the center. We run the simulation for different sizes of networks. In this simulation, the number of nodes is set to 50, 100, 150, 200, 250, and 300, respectively. To compare with the other protocols, the CH ration is set to 10%; therefore, the number of clusters as K is n ∗ 10%. The clusters are generated by using the proposed algorithm in Section 4.1, and the iteration number is the termination condition. The iterations are 10,000 times to generate the static clusters. Figure 4 shows the formed clusters in different networks with our clustering algorithm.Figure 4
The deployment of nodes and the generated clusters in EBRP.
(a)
50 nodes
(b)
100 nodes
(c)
150 nodes
(d)
200 nodes
(e)
250 nodes
(f)
300 nodesThe blue dots are the nodes, the red X is the sink node, the points of junction are the cluster centers, and the dots connected together are a cluster. From Figure4, we can see that the networks are divided in the desired clusters by the proposed clustering algorithm and the nodes that are close in distance belong to a cluster.To acquire suitable fuzzy rules for different networks, we use the developed GA in Section4.3. In our simulation, the genetic parameters we chosen are listed in Table 2.Table 2
Genetic parameters.
Parameter
Value
Ps
20
Mds
30
Dg
0.8
Px
0.7
Pm
0.1Ps is the population of the individuals, Mds is the number of iterations, Dg is the generation gap, Px is the probability of crossover, and Pm is the probability of mutation. The fit function is the round when the first node dies (FND). The fuzzy rules for the network with 100 nodes are obtained as shown in Table3. Furthermore, the obtained appropriate fuzzy rules for 50, 150, 200, 250, and 300 nodes are listed in Tables 4, 5, 6, 7, and 8.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
L
vvH
M
L
M
vH
M
L
H
H
M
L
vH
rL
M
M
vL
L
M
M
L
L
M
M
M
rH
M
M
H
vvH
M
M
vH
H
M
H
vL
rL
M
H
L
L
M
H
M
rL
M
H
H
vH
M
H
vH
vvH
H
L
vL
vL
H
L
L
vvL
H
L
M
M
H
L
H
vH
H
L
vH
vL
H
M
vL
vvL
H
M
L
L
H
M
M
vvH
H
M
H
H
H
M
vH
H
H
H
vL
rL
H
H
L
vL
H
H
M
M
H
H
H
vL
H
H
vH
vHTable 8
The obtained fuzzy rules for 300 nodes.
Dtos
Dtoc
Eres
Pchoose
L
L
vL
vvL
L
L
L
H
L
L
M
H
L
L
H
M
L
L
vH
vvH
L
M
vL
M
L
M
L
vvL
L
M
M
vvL
L
M
H
rL
L
M
vH
H
L
H
vL
L
L
H
L
vH
L
H
M
vvH
L
H
H
vvH
L
H
vH
rH
M
L
vL
L
M
L
L
rH
M
L
M
rL
M
L
H
H
M
L
vH
vvH
M
M
vL
rL
M
M
L
vL
M
M
M
vH
M
M
H
M
M
M
vH
vvH
M
H
vL
vvL
M
H
L
rL
M
H
M
M
M
H
H
vvH
M
H
vH
vvH
H
L
vL
vvH
H
L
L
rH
H
L
M
vvL
H
L
H
H
H
L
vH
vH
H
M
vL
vvL
H
M
L
vL
H
M
M
vvH
H
M
H
M
H
M
vH
rH
H
H
vL
M
H
H
L
vL
H
H
M
H
H
H
H
H
H
H
vH
rHSince we get the suitable fuzzy rules for networks, we run our EBRP and the other three protocols (SEP, LEACH, and LEACH-C) in the network illustrated in Figure4. Figure 5 shows the FND round for the four protocols under analysis.Figure 5
The FND round comparison.The longest lifetime of network provide by EBRP is confirmed by the results in Figure5. EBRP presents the highest FND round (above 230) in the networks while the other three present shorter FND times (below 174) which indicates that when we run EBRP, the first node will die later than the other three protocols. We can see that the lifetime of networks using EBRP when all the nodes are working properly (before the FND round) is the longest of all. It is calculated that the gains of FND with EBRP on average is 63%, 63%, and 57% compared with SEP, LEACH-C, and LEACH, respectively.The numbers of dead node numbers by round with the four protocols for the networks are presented in Figure6.Figure 6
The curves of dead node numbers by rounds.
(a)
(b)
(c)
(d)
(e)
(f)Figure6 shows the comparison of the number of dead nodes along the time (rounds) in different sizes of networks in the simulation. Although the lifetime of a network defined in this paper is the FND round and the fitness function in a developed GA is the FND round as well, the round of 50% nodes have died in EBRP is much bigger than that in the other protocols when the number of nodes is 100, 150, 200, 250, and 300. Meanwhile, the EBRP within 50 nodes is better than the other protocols when 40% of the nodes have died. From Figure 6, the curves of the proposed EBRP have the largest slope related to the ones of SEP, LEACH-C, and LEACH which means the EBRP is the best energy-balanced protocol. It is illustrated that the energy of the network is mostly used to maintain the normal working state and the lifetime of the network is prolonged. The other three protocols will consume a lot of energy in the irregular period of the network when there are nodes that have died.These results proved that EBRP is able to prolong the lifetime of a network and balance the energy consumption within the network compared with SEP, LEACH-C, and LEACH.


## 6. Conclusion

To balance the energy consumption and prolong the lifetime of WSN, an energy-balanced routing protocol for a wireless sensor network is proposed in this paper named EBRP. In EBRP, the network is formed in several static clusters and the CHs in the first round are selected by the sink node. Then, the selection of CH in each cluster is operated in a distributed way with the designed FLS. Since the states of fuzzy rules are a lot and the appropriate fuzzy rules for different rules are different, it is hard to develop the rules only by experience. To obtain the fuzzy rules for different sizes of networks, we design a specific GA to solve this problem. In EBRP, the large computation such as clustering and acquiring fuzzy rules is undertaken by the sink node and the small computations such as selecting the CHs are undertaken by the nodes in a distributed way while they need not communicate with the sink node directly. Therefore, the energy consumption of the network is reduced and balanced. The most important issue is to know when the network starts to fail, and the round when the first node dies (FND) is regarded as the lifetime of the network since the network is in an abnormal condition after it. Hence, we choose the FND round as the fitness function to achieve our goal. The simulation results show that our EBRP has the best energy-balanced effect and longest lifetime in different sizes of networks compared with other existing protocols. The EBRP is propagable since the method of fuzzy rules can be acquired for different sizes of networks. It is calculated that the lifetime of the network with EBRP is prolonged on average by 63%, 63%, and 57% compared with SEP, LEACH-C and LEACH, respectively. What is more, we can design different fit functions to meet the different requirements of WSNs. For further work, the protocol can be extended in the heterogeneous networks or mobile networks.



---

*Source: 8505616-2018-05-08.xml*