9. Simulation and Results Analysis
In order to measure the performance of the proposed protocol, we have designed many scenarios with an optimal number of gateways. We have run simulations approximately 25 times and take the 95% confidence interval of values to validate the efficiency of the MGBEHA. Large area sizes have been taken to test the scalability of the protocol. The performance of the protocol is measured in terms of throughput, network lifetime, stability period, residual energy, and the number of packets transmitted to the sink. Parameters and their values used in the simulation have been shown in
Table 1. In order to prove the efficiency of the protocol, the LEACH [
4], the MGEAR [
5] and the GSEP [
6] protocols are used for comparison.
An area can be divided into multiple equal cluster regions and gateways can be deployed as shown in
Table 2. According to the
Table 2, when the size of an area increases, the size of Areas 1 and 2 also increases. However, if the number of gateways increases in the area, the size of Areas 1 and 2 decreases. Through extensive simulations, we have concluded the appropriate domain values for different area sizes, as shown in
Table 3.
In the proposed algorithm, if the initial value of the area is 100 × 100 m2, the initial value of Area 1 = Area 2 is 20 × 20 m2 and the initial value of R is 4, take the midpoint of the x-axis and y-axis and divide the area into R regions by joining the midpoints. Deploy one gateway node at the midpoint of the line which separates two regions. Set Area 1 around the sink and Area 2 around the gateway nodes by using coordinates points (x ± 10, y ± 10) of the sink and gateways, respectively. However, if the initial value of the R is 8, take the midpoint of the x-axis and y-axis and divide the area into four regions by joining the mid points. Next, take the min and max coordinates of the x-axis and y-axis and intersect the area into R regions through the diagonals.
In the proposed algorithm, if the initial value of the area is 500 × 500 m2, the initial value of Area 1 = Area 2 is 100 × 100 m2 and the initial value of R is 4 or R is 8, the area is divided in a similar manner as for Area = 100 × 100 m2. However, if the Area 1 = Area 2 is 75 × 75 m2 and number of regions R is 12, take the min and max values of the x-axis coordinates and divide the area into four equal parts and using the min and max values of the y-axis coordinates again divided the area into 12 regions. Set the Area 1 around the sink and Area 2 around the gateway nodes by using coordinates points (x ± (Area 1 = Area 2)/2, y ± (Area 1 = Area 2)/2) of the sink and gateways, respectively.
Similarly, if the area is 1000 × 1000 m2 and R = 20, divide the area into R regions by using the min and max values of the x-axis and y-axis coordinates. If the area is 2000 × 2000 m2 and R = 42, divide the area into R regions by using the min and max values of the x-axis and y-axis coordinates. In general, as the size of the area and number of regions (R) increase, divided the area into equal sized regions by using the min and max values of the x-axis and y-axis coordinates, respectively.
At each round, every normal sensor node sends data to its respective cluster head. The cluster heads perform data aggregation and send data to the gateway node which, again, aggregates data received from CHs and nodes in the gateway region (GR). After completing the data aggregation process, the gateway node transmits the data to the sink. The data aggregation is performed twice, which reduces the energy consumption to a great extent. Moreover, if some CH is nearer to the sink than a gateway node, it transmits data directly to the sink instead of the gateway node. This reduces the delay and increases the throughput in the network. Therefore, total data packets received by the sink from all gateway nodes and from nearby CHs are known as the throughput of the WSN.
The stability period of the network is defined by the round number when the first node in the network exhausts its energy and dies (FND). The network lifetime is defined by the round number when all nodes of the network die (AND). HND denotes the round number when 50% of the nodes in the network die. Packets transmitted to the sink are the total number of packets sent by all sensor nodes to CHs, from CHs to gateway nodes, and from the gateways to the sink. Residual energy is the total remaining energy in the network per round.
Figure 4a,b describe and compare all protocols’ throughput for 100 sensor nodes in 100 × 100 m
2 area and 500 × 500 m
2 areas, respectively. By using the optimal number of gateways at proper positions, network throughput can be increased and a larger area can be monitored very well. The MGBEHA protocol outperforms other protocols in small areas as well as large areas. It is capable of producing throughput for a large number of rounds. When the number of gateways increases from 6 to 8, there is no difference in the throughput of the area. Other than LEACH, all protocols are gateway-based protocols. The results show that a gateway between the sink and the sensor nodes reduces transmission distance and, hence, increases the performance of the system.
In the LEACH protocol, data packets are directly transmitted from a CH to the sink. If the distance between the CH and the sink is large, after some time the CH node starts depleting its energy and cannot transmit more data. In a large area some CHs will be distant from the sink node and will exhaust their energy very soon. Cluster members will not be able to transmit their data to sink via the CH. Hence, there is a major decrease in throughput of the network for the LEACH protocol.
The M-GEAR protocol consists of a single gateway at the center of the area; it helps in efficient energy consumption, but it fails as the size of the area increases. The cluster heads, which are far away from the gateway node, consume large amounts of energy in transmission. Therefore, most of the nodes in the remote area die soon. Thus, these nodes are not able to sense any event and cannot transmit any data. A similar problem exists in the GSEP protocol.
It is evident from
Figure 4a that the M-GEAR and the GSEP is able to produce throughput until round number 2400, but the amount of throughput is very low as compared to the MGBEHA protocol. GSEP is able to produce more throughput than the M-GEAR, because nodes near the gateway nodes have residual energy until the end of network operation. These nodes can directly communicate with gateway nodes and do not carry the extra load, but nodes which are far away have to use a CH for data transmission towards the gateway node. Furthermore, there is no need of so many gateways at such a small distance from one another. Gateways are not deployed at the required place in the area. All of the gateways are at the same height in an area. For one part of an area many gateways are available and for another part of the area no gateway is available. This kind of gateway placement just increases network cost and reduces its efficiency. The throughput of MGBEHA (2GW and 4 GW) remains stable for a large number of rounds and after that it drops gradually.
We performed an indepth analysis of the throughput improvement ratio per round for all protocols. The throughput improvement ratio is calculated for different scenarios. It is defined as follows:
where X * = {MGBEHA (2 GW/4 GW/6 GW/8 GW)/M-GEAR/GSEP/LEACH} and
g is the number of gateways. Results of the throughput improvement ratio per round (TIRPR) are shown in
Table 3 and
Table 4.
- (a)
CASE 1: Results analysis of 100 nodes in 100 × 100 m2 area (Table 3)
The MGBEHA protocol with 4 GW has 1.9 TIRPR over the MGBEHA with 2 GW because it has two additional gateways and the area is further divided into a greater number of regions. An additional support of two gateways reduces energy consumption and the nodes can work longer, can transmit packets for a longer time, and produce good throughput. The TIRPR of the MGBEHA protocol over LEACH is 26.7, as LEACH does not use the gateway node to reduce power consumption. The TIRPR of the MGBEHA over M-GEAR is the greatest as compared to other protocols because, for the M-GEAR protocol, the first node dies very soon in the network and connectivity of the network start declining. Although AND for M-GEAR are 2500 rounds, the value of throughput becomes low when connectivity of the region gets lost. Nodes are not able to forward other nodes’ data and most of the packets transmitted with nodes get lost. Only nodes near the gateway nodes remain alive and keep producing throughput up to the 2500th round.
In the case of the GSEP protocol FND at round 983, its stability period is more than M-GEAR and LEACH protocols and, hence, the network remains connected for 983 rounds and produces throughput, but after 50% nodes of the network die, throughput keeps on decreasing, although AND at round 2500, but very few nodes remain alive in the network after round 1300 as shown in
Figure 5. Large numbers of rounds and lesser throughput in the last rounds reduce TIRPR of GSEP as compared to MGBEHA protocol.
- (b)
CASE 2: Results analysis of 100 nodes in 200 × 200 m2 area/300 ×300 m2 area/500 ×500 m2 area (Table 4)
As the size of the area increases, the first node dies very soon in all protocols. However, the value of AND drops slowly for MGBEHA protocol and rapidly for other protocols. In case of LEACH, for a small area (100 × 100 m
2), value of AND is round 1800, but for large area (500 × 500 m
2) it drops below round 1300. For the M-GEAR protocol value of AND drops up to 1838 and for the GSEP, it drops up to 1972. The TIRPR of the MGBEHA protocol increases as compared to other protocols for large areas. Optimal number and correct position of gateways also improves network lifetime as shown in
Figure 5a and
Table 4.
In a large area the MGBEHA protocol has a lifetime more than other protocols as shown in
Table 5 and
Figure 5b. By increasing the number of gateways in a large area, the stability period and the lifetime of the network improves, as shown in
Table 5. When the number of gateways increased from 4 to 6 in the 500 × 500 m
2 area, its stability period increased from 87 to 102 and its lifetime improved from 2490 to 2525, and the TIRP also improved from the previous value. However, when the number of gateways was further increased from 6 to 8, there was no improvement in the performance metrics, which implies that there are an appropriate number of gateways for each area size, after which there is no improvement in the network lifetime.
The M-GEAR protocol has a single gateway in the center of the area; if the area increases, the distance between CH and the gateway node also increases, so it is not capable of handling distant node communication. Moreover, if there is any CH near the sink area, it does not consider the distance between itself and the sink, CH will always transmit to the gateway node. This results in doubling the communication power consumption. As a result, residual energy in the network will be very low, as shown in
Figure 6a,b. More energy can be saved if the distance between CH and the sink node is also considered.
In the GSEP protocol, before initiating the transmission, a node always computes the distance between itself and all gateways and then chooses the gateway with the minimum distance. This method increases the lifetime in a small area, but in a large area most of the nodes have a large distance from all gateways. Although the total number of gateways in the GSEP protocol is much higher than the MGBEHA protocol, but the residual energy (shown in
Figure 6a,b) of GSEP is much lower than the MGBEHA because all of the gateways are at the edge of the network. Nodes which are distant will deplete their energy faster. The number of live nodes becomes less in the network and they have to find alternative paths for data transmission. Further, in each round a node has to compute the distance between itself and all gateways, increasing the computation overhead. In our experiment, we have tested the GSEP protocol in a homogeneous (all nodes with equal initial energy) environment.
In case of the MGBEHA protocol, gateways are not concentrated in an area; a separate gateway node is present to cover a part of the area, so the distance between CH and gateway nodes is always less, as a result less energy is consumed in communication and sufficient live nodes are present in the network. The number of live nodes in the network affects the number of packets transmitted to the sink. With more live nodes present in the network, more packets will be transmitted to the sink. The MGBEHA protocol has a higher number of live nodes for a higher number of rounds; therefore, the number of packets transmitted to the sink by the MGBEHA protocol is greater than other protocols, as shown in
Figure 7a,b. However, there is a very small difference in the number of packets transmitted to the sink for 4 GW, 6 GW, and 8 GW in 500 × 500 m
2 area.
A variation in simulation results is represented by the 95% confidence interval and is shown in
Figure 8a. In LEACH, energy holes can be created around the sink if large size clusters are formed near the sink. The energy of cluster members and CH will deplete with prolonged communication. Holes can also be created in remote areas if CHs are formed there, as CHs in remote area need more power to transmit data. The MGBEHA protocol avoids the energy holes problem as follows: holes cannot be created in the sink area, as nodes near the sink node do not transmit other node’s data and these are not involved in cluster setup phase, which further saves their energy. Similarly, holes cannot be created in a gateway region, as nodes here transmit only their data to the gateway and do not act as a relay node. Instead a gateway node acts as a relay node for CHs and reduces power depletion of the CHs.
This well-adjusted energy consumption maintains an energy level in the network per round as shown in
Figure 8b. All nodes exhaust their energy in a uniform way.
Figure 8b shows an energy map of whole topology at different rounds. The initial energy of all nodes is 0.5 J. After 500 rounds, the energy of all nodes lies between 0.46 J and 0.38 J, after 1000 rounds, the energy lies between 0.33 and 0.18 J. This concludes that none of the nodes die in the network, up to 1000 rounds. The network remains stable until the first node dies and energy holes are not created until the 1083 round.
In order to test the efficiency of the protocol in very large areas, we have designed two scenarios, one with a 1000 × 1000 m
2 area and another with a 2000 × 2000 m
2 area. We have also analyzed the performance metrics for different node densities (λ = Number of nodes/area) in the area.
Figure 9a shows the number of alive nodes in a 1000 m × 1000 m area. The maximum lifetime and the stability period of the network are approximately 1700 rounds and 10 rounds, respectively. A high node density does not affect the performance of the network.
Figure 9b illustrates the effect of different node densities on the MGBEHA protocol in the 2000 × 2000 m
2 area. The maximum lifetime in this area is 600 rounds. Node density does not have a significant impact on the lifetime of the network. Although the number of gateways has been increased in the network, the lifetime is reduced with an increase in the size of the area.
Figure 10a,b illustrates the residual energy of the network in a 1000 × 1000 m
2 area and in a 2000 × 2000 m
2 area, respectively. In a large area, energy is available in the network, but the lifetime of the network is reached very early.
Figure 11a,b illustrates the total throughput of the network in a 1000 × 1000 m
2 area and in a 2000 × 2000 m
2 area, respectively. For a high node density, throughput of the network is very high, but it falls sharply in later rounds. Total throughput in a large area is much less than the throughput of the MGBEHA protocol in small areas.
Figure 12a,b illustrate the total number of packets transmitted towards the sink in 1000 × 1000 m
2 area and in 2000 × 2000 m
2 area, respectively. The number of packets transmitted for high density is much more than the number of packets for the low density. However, transmission of packets halts after the 17,000 rounds in 1000 m
2 area, and after approximately 500 rounds in the 2000 m
2 area.
Figure 13a,b give the validation of simulation results against the theoretical analysis of energy consumption of the network for the MGBEHA protocol. According to the figure, our simulation results are very close to the theoretical results. It proves that average energy consumption of the network in the presence of different number of gateways. The number of alive nodes is directly related to the available energy in the network. The total number of packets transmitted to the sink and received throughput of the network depends on the number of alive nodes in the network.