# Multi-Gateway-Based Energy Holes Avoidance Routing Protocol for WSN
## 6 Proposed Algorithm
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 (2 GW 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:

\[\text{Throughput Improvement Ratio per round}=\frac{\text{Average Throughput of MGBEHA($g$GW) protocol}}{\text{Average throughput of X* protocol}} \tag{25}\]

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 Tables 3 and 4. #### (a) **Case 1:** Results analysis of 100 nodes in 100 \(\times\) 100 m\({}^{2}\) 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 2500 th round.