**6. Simulation**

## **6.1. Parameter settings**

We use a 100m×100m region of 100 sensor nodes scattered randomly. MATLAB is used to implement the simulation. To make a fair comparison, we introduce advanced energy levels to LEACH and SEP nodes with same settings as in our HABRP protocol, so as to assess the performance of these protocols in the presence of heterogeneity.

Hierarchical Adaptive Balanced Routing Protocol

(29)

for Energy Efficiency in Heterogeneous Wireless Sensor Networks 329

ܪܥܣܧܮ ݂ ݀݅ݎ݁ ܾ݈ܽ݁ݐܵ െ ܴܲܤܣܪ ݂ ݀݅ݎ݁ ܾ݈ܽ݁ݐܵ

ܪܥܣܧܮ ݂ ݀݅ݎ݁ ܾ݈ܽ݁ݐܵ

The performance of HABRP is compared with that of the original LEACH and SEP in terms

With the use of gateway nodes for data transmission from cluster heads to the sink, the energy consumption of the network is decreased. This is due to the gain of the energy dissipated by cluster heads to the base station. From the graph it is clear that HABRP can

**Figure 10.** Energy analysis comparison of HABRP, LEACH and SEP in Homogeneous WSN (100m x

The number of nodes alive for each round of data transmission is observed for the HABRP protocol to evaluate the lifetime of the network. Fig.12 shows the performance of HABRP compared to LEACH and SEP. It is observed that the HABRP outperforms LEACH and SEP due to balanced energy dissipation of individual node through out the

Fig.11 illustrates the energy performance of HABRP in heterogeneous WSNs.

ൌ ݐ݁݉݁݊ݒݎ݉ܫ

*6.3.1. Energy consumption analysis* 

of energy and is shown in Fig.10 and Fig.11.

100m, 100 nodes, 0.5J/node, a=0(Homogeneous WSNs))

*6.3.2. Network lifetime* 

network.

achieve twice the energy savings than LEACH and SEP protocol.

Fig.10 illustrates the energy performance of HABRP in homogeneous WSNs.

**6.3. Simulation results** 


Specifically, we have the parameter settings:

**Table 1.** Simulation parameter

#### **6.2. Simulation metrics**

Performance metrics used in the simulation study are:


$$Improvement = \frac{\text{Stable period of HABRP} - \text{Stable period of LeACH}}{\text{Stable period of LeACH}} \tag{29}$$

#### **6.3. Simulation results**

328 Energy Efficiency – The Innovative Ways for Smart Energy, the Future Towards Modern Utilities

performance of these protocols in the presence of heterogeneity.

**Notation Description Value**

N Number of the sensors 100, 900

E0 Initial energy 0.5 J Eelec Electronics energy 50nJ/bit EDA Energy of data aggregation 5nJ/bit d0 The threshold distance 87m

M x M Area 100x100, 300x300

50x300, 300x300

sinkX, sinkY Sink node location 50x50, 50x200,

εfs Amplified transmitting energy using free space 10pJ/bit/ m 2 εmp Amplified transmitting energy using multipath 0.0013pJ/bit/ m4

• Length of stable region for different values of heterogeneity. Stability period is the period from the start of the network operation and the first dead node. We also refer to

k Data packet size 500bytes kbroad Broadcast packet size 25 bytes Popt Probability 0.05 Copt optimum number of clusters 5 Ng number of gateway nodes 4

Specifically, we have the parameter settings:

We use a 100m×100m region of 100 sensor nodes scattered randomly. MATLAB is used to implement the simulation. To make a fair comparison, we introduce advanced energy levels to LEACH and SEP nodes with same settings as in our HABRP protocol, so as to assess the

**6. Simulation** 

**6.1. Parameter settings** 

**Table 1.** Simulation parameter

**6.2. Simulation metrics** 

• Energy consumption analysis

• Percentage of Node death

this period as "stable region" • Number of alive nodes per round.

• Improvement of Stability period:

• Variation of the Base Station Location

Performance metrics used in the simulation study are:

• Sensitivity to degree of heterogeneity in large-scale networks.

#### *6.3.1. Energy consumption analysis*

The performance of HABRP is compared with that of the original LEACH and SEP in terms of energy and is shown in Fig.10 and Fig.11.

With the use of gateway nodes for data transmission from cluster heads to the sink, the energy consumption of the network is decreased. This is due to the gain of the energy dissipated by cluster heads to the base station. From the graph it is clear that HABRP can achieve twice the energy savings than LEACH and SEP protocol.

Fig.10 illustrates the energy performance of HABRP in homogeneous WSNs.

**Figure 10.** Energy analysis comparison of HABRP, LEACH and SEP in Homogeneous WSN (100m x 100m, 100 nodes, 0.5J/node, a=0(Homogeneous WSNs))

Fig.11 illustrates the energy performance of HABRP in heterogeneous WSNs.

#### *6.3.2. Network lifetime*

The number of nodes alive for each round of data transmission is observed for the HABRP protocol to evaluate the lifetime of the network. Fig.12 shows the performance of HABRP compared to LEACH and SEP. It is observed that the HABRP outperforms LEACH and SEP due to balanced energy dissipation of individual node through out the network.

330 Energy Efficiency – The Innovative Ways for Smart Energy, the Future Towards Modern Utilities

Hierarchical Adaptive Balanced Routing Protocol

SEP LEACH HABRP

SEP

LEACH

HABRP

for Energy Efficiency in Heterogeneous Wireless Sensor Networks 331

network? To answer these questions, we ran simulations where we varied the location of

100m x 100m, 100 nodes, m=0.2, a=3, BS(50,200)

**Figure 13.** Number of alive nodes per round with 100m x 100m, 100 nodes, 0.5J/Normal node,

0 500 1000 1500 2000 2500 3000 3500 4000

100m x 100m, 100 nodes, m=0.2, a=3, BS(50,300)

Number of rounds

**Figure 14.** Number of alive nodes per round with 100m x 100m, 100 nodes, 0.5J/Normal node,

0 500 1000 1500 2000 2500 3000 3500 4000

Number of rounds

network, the performance of HABRP improves compared to LEACH and SEP.

For all base station locations we simulated, as the base station moves further away from the

the base station from (x= 50, y= 50) to (x =50, y=300).

2J/Advanced node, m=0.2, a=3, BS(50,200)

0

20

40

60

Number of alive node

80

100

120

2J/Advanced node, m=0.2, a=3, BS(50,300)

0

20

40

60

Number of alive node

80

100

120

**Figure 11.** Energy analysis comparison of HABRP, LEACH and SEP (100m x 100m, 100 nodes, 0.5J/node, m=0.2, a=3(Heterogeneous WSNs))

100m x 100m, 100 nodes, m=0.2, a=1, BS(50,50)

**Figure 12.** Number of alive nodes per round with 100m x 100m, 100 nodes, 0.5J/Normal node, 1J/Advanced node m=0.2, a=1, BS(50,50)

#### *6.3.3. Variation of the Base Station Location*

The results presented in the previous section show that HABRP is more energy-efficient than LEACH and SEP routing. Is this just a function of the simulation parameters? What happens if the base station is actually located within the network or very far away from the network? To answer these questions, we ran simulations where we varied the location of the base station from (x= 50, y= 50) to (x =50, y=300).

330 Energy Efficiency – The Innovative Ways for Smart Energy, the Future Towards Modern Utilities

**Figure 11.** Energy analysis comparison of HABRP, LEACH and SEP (100m x 100m, 100 nodes,

100m x 100m, 100 nodes, m=0.2, a=1, BS(50,50)

SEP

LEACH HABRP

**Figure 12.** Number of alive nodes per round with 100m x 100m, 100 nodes, 0.5J/Normal node,

0 500 1000 1500 2000 2500

Number of rounds

The results presented in the previous section show that HABRP is more energy-efficient than LEACH and SEP routing. Is this just a function of the simulation parameters? What happens if the base station is actually located within the network or very far away from the

0.5J/node, m=0.2, a=3(Heterogeneous WSNs))

1J/Advanced node m=0.2, a=1, BS(50,50)

0

20

40

60

Number of alive node

80

100

120

*6.3.3. Variation of the Base Station Location* 

**Figure 13.** Number of alive nodes per round with 100m x 100m, 100 nodes, 0.5J/Normal node, 2J/Advanced node, m=0.2, a=3, BS(50,200)

**Figure 14.** Number of alive nodes per round with 100m x 100m, 100 nodes, 0.5J/Normal node, 2J/Advanced node, m=0.2, a=3, BS(50,300)

For all base station locations we simulated, as the base station moves further away from the network, the performance of HABRP improves compared to LEACH and SEP.

### *6.3.4. Percentage of Node death*

The number of rounds for 1%, 20%, 50%, 80% of node death is observed for HABRP, LEACH and SEP in Fig.13 and Fig.14. From the results of Fig.13 the stability period of LEACH and SEP protocols is limited to 892 rounds and the HABRP protocol extents up to 1335 rounds in homogeneous WSNs. In heterogeneous WSNs HABRP provides an extended lifetime of approximately twice LEACH protocol. HABRP has longer lifetime than LEACH and SEP.

#### 100m x 100m, 100 nodes, 0.5J/node, a=0

Hierarchical Adaptive Balanced Routing Protocol

for Energy Efficiency in Heterogeneous Wireless Sensor Networks 333

In fig.15 the length of stable region for differnet values of energy heterogeneity is simulated, we observed that if we increase the number of NCG nodes with ��� , the stability period is extended of approximately twice as LEACH protocol. In heterogeneous WSNs, HABRP has longer stable region than LEACH and SEP for differnet values of energy heterogeneity.

100m x 100m, 100 nodes, 0.5J/node, a=1

**Figure 17.** Length of stable region for differnet values of energy heterogeneity with 100m x 100m, 100

0 0.1 0.3 0.5 0.7 0.9

Total additive energy(a x m) percentage

We simulated the performance changes in large network with 900 nodes in area 300mx300m.

LEACH SEP HABRP

**Figure 18.** Sensitivity of HABRP, LEACH and SEP to degree of heterogeneity in large scale networks

Percentage of total additive energy (a.m)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

*6.3.5. Stable region in heterogeneous WSNs* 

HABRP LEACH SEP

nodes, 0.5J/node, a=1

0

500

1000

Number of Rounds

1500

2000

2500

*6.3.6. Heterogeneity in large-scale networks* 

with 900 nodes in an 300mx300m field.

0

200

400

600

Length of stable region (in rounds)

800

1000

1200

**Figure 15.** Node death percentage per number of Rounds with 100m x 100m, 100 nodes, 0.5J/node, a=0

100m x 100m, 100 nodes, 0.5J/Normal node, 1.0J/Advanced node

**Figure 16.** Node death percentage per number of Rounds with 100m x 100m, 100 nodes, 0.5J/Normal node, 1.0J/Advanced node m=0.2, a=1

#### *6.3.5. Stable region in heterogeneous WSNs*

332 Energy Efficiency – The Innovative Ways for Smart Energy, the Future Towards Modern Utilities

LEACH SEP HABRP

LEACH SEP HABRP

The number of rounds for 1%, 20%, 50%, 80% of node death is observed for HABRP, LEACH and SEP in Fig.13 and Fig.14. From the results of Fig.13 the stability period of LEACH and SEP protocols is limited to 892 rounds and the HABRP protocol extents up to 1335 rounds in homogeneous WSNs. In heterogeneous WSNs HABRP provides an extended lifetime of approximately twice LEACH protocol. HABRP has longer lifetime than LEACH and SEP.

100m x 100m, 100 nodes, 0.5J/node, a=0

**Figure 15.** Node death percentage per number of Rounds with 100m x 100m, 100 nodes, 0.5J/node, a=0

100m x 100m, 100 nodes, 0.5J/Normal node, 1.0J/Advanced node m=0.2, a=1

1% 20% 50% 80%

Node Death Percentage

**Figure 16.** Node death percentage per number of Rounds with 100m x 100m, 100 nodes, 0.5J/Normal

Node Death Percentage

1% 20% 50% 80%

*6.3.4. Percentage of Node death* 

0

500

1000

1500

Number of Rounds

2000

2500

node, 1.0J/Advanced node m=0.2, a=1

Number of Rounds

In fig.15 the length of stable region for differnet values of energy heterogeneity is simulated, we observed that if we increase the number of NCG nodes with ��� , the stability period is extended of approximately twice as LEACH protocol. In heterogeneous WSNs, HABRP has longer stable region than LEACH and SEP for differnet values of energy heterogeneity.

**Figure 17.** Length of stable region for differnet values of energy heterogeneity with 100m x 100m, 100 nodes, 0.5J/node, a=1

#### *6.3.6. Heterogeneity in large-scale networks*

We simulated the performance changes in large network with 900 nodes in area 300mx300m.

**Figure 18.** Sensitivity of HABRP, LEACH and SEP to degree of heterogeneity in large scale networks with 900 nodes in an 300mx300m field.

In Fig.16. the simulation result shows, that the network lifetime decrease in large area network and the period that the first dead node appears is earlier than those of previous cases. The phenomenon is caused by the fact that the cluster heads waste the considerable amount of energy for transmitting their data to the far away base station. In HABRP cluster head would transmit data to base station through gateway to eliminate that the cluster head far away from the base station dissipate their energy much faster than those close to the BS. HABRP outperforms LEACH and SEP for different values of total additive energy a ∗ m. Because in LEACH and SEP, all cluster heads transmits aggregated data to the BS directly.

Hierarchical Adaptive Balanced Routing Protocol

for Energy Efficiency in Heterogeneous Wireless Sensor Networks 335

The simulation results show that HABRP protocol could suitably form clusters and

Energy efcient routing is paramount to extend the stability and lifetime of the wireless sensor networks. Routing in sensor networks is very challenging due to several characteristics that distinguish them from traditional communications and wireless ad-hoc networks since several restrictions, e.g., limited energy supply, computing power, and bandwidth of the wireless links connecting sensor nodes. The major difference between the WSN and the traditional wireless network is that sensors are very sensitive to energy consumption. Introducing clustering into the networks topology has the goal of reducing

In this chapter, we have proposed an Hierarchical Adaptive Balanced energy efficient Routing Protocol (HABRP) for wireless sensor networks. The energy efciency and ease of deployment make HABRP a desirable and robust protocol for wireless sensor networks. In order to improve the lifetime and performance of the network, routing in HABRP works in rounds and each round is divided into two phases, the Set-up phase and the Steady State phase. During the set-up phase some high-energy nodes called NCG nodes are elected gateways, other choised cluter heads and the clusters are organized. During the steady-state phase, data are transmitted from the cluster members nodes to the cluster head to agregate data and transmit it to the base station through a chosen gateways that requires the minimum communication energy to reduce the energy consumption of cluster head and

Simulation results shows that the HABRP improves the stable region of the clustering hierarchy and decrease probability of failure nodes and increase the lifetime of the network due to balanced energy dissipation of individual node through out the network and extends network lifetime. Balancing the energy consumption, reducing the phenomenon of rapid death of the cluster head caused by excessive energy consumption, also preventing the situation of instability period caused by one cluster head failure to work, ensure that the

Finally, HABRP is scalable and achieves better performance compared to SEP and LEACH

W. Heinzelman, A. Chandrakasan and H. Balakrishnan. (2000). Energy-Efficient Communication Protocol for Wireless Microsensor Networks. Proceedings of HICSS '00.

the number of message that need to be delivered to the sink in large-scale WSNs.

effectively prolonging the survival time of the entire networks .

**7. Conclusion** 

decrease probability of failure nodes.

in both heterogeneous and homogenous environments.

Said Ben Alla, Abdellah Ezzati and Ahmed Mohsen

*Science and Technical Faculty Hassan 1 University, Settat, Morocco* 

network work normally.

**Author details** 

**8. References** 

### *6.3.7. Improvement of stability period*

The comparison results are shown in Table2. show that HABRP is more energy-efficient and the stability period is extended than LEACH in both homogeneous and heterogeneous WSNs.


**Table 2.** Improvement of HABRP compared to LEACH with ���

#### **6.4. Result analysis**

From our simulations, we observed the followings:


The simulation results show that HABRP protocol could suitably form clusters and effectively prolonging the survival time of the entire networks .
