# An Energy-Balanced Geographic Routing Algorithm for Mobile Ad Hoc Networks
## 3 Em-Gpsr
### Energy-Balanced Model  
The SU-GPSR algorithm takes into account the remaining energy and the mobility of the node, the distance to the destination node and the remaining time of the packet. The OPNET simulations show that SU-GPSR has a longer network lifetime than GPSR under different network densities. When some nodes in the network are mobile, the delay of SU-GPSR is lower and the number of hops is less. However, the algorithm has the following defects:  
1. The best next-hop node cannot be selected according to geographical location. If the node with the most energy and the least energy is in the same area, the selection may not fall in this region;
2. The mobility of nodes is only distinguished by zero and one. Obviously, it cannot reflect the motion characteristics of nodes;
3. Although the prediction model of energy consumption is proposed, the energy consumption rate of nodes is not taken into account.
4. Energy harvesting is not a common function of mobile ad-hoc network nodes at present. Harvesting devices bring additional cost and the energy harvesting efficiency is not clearly stated.  
Aiming at the problems of SU-GPSR, an improved GPSR algorithm, EM-GPSR, is proposed in this paper, which comprehensively considers the mobility and the remaining energy of the node. The EM-GPSR algorithm categorizes the next-hop region into four sub-regions with equal area, then calculates the average remaining energy of each sub-region, integrating the node energy consumption rate and the node remaining energy.  
First of all, the four sub-regions categorized on the basis of SU-GPSR, shown in Figure 3, have the same area, thus the radius of inner circle equals \(\sqrt{2}R/2\).  
The number of nodes in each sub-region is different. Each node in the same area has its own movement velocity. According to the information of node velocity and position, we calculate the remaining lifetime of the perimeter node leaving the current communication range. If the remaining lifetime is below the threshold, it means this node does not belong to the candidate set. The threshold  
Figure 3: Speed up-greedy perimeter stateless routing (SU-GPSR) region partition diagram.  
value is set to ensure that 25% of the nodes have a remaining lifetime larger than the threshold value. Finally, the next-hop node is selected in the candidate set according to Equation (9):  
\[\psi_{j}=\frac{N_{j}}{\sum\limits_{i=0}^{q}N_{i}}\cdot\left(1-\frac{L_{j}}{\sum \limits_{i=0}^{q}L_{i}}\right)\cdot\cos\theta\cdot\frac{TNL_{j}}{\sum\limits_{i =0}^{q}TNL_{i}} \tag{9}\]  
where \(TNL_{i}\) represents the remaining life-time of node \(i\), which can be expressed as  
\[TNL_{i}=\frac{E_{i}}{r_{i}} \tag{10}\]  
where \(E_{i}\) represents the remaining energy of node \(i\) and \(r_{i}\) the energy consumption rate. We use the HELLO packet in the EM-GPSR algorithm to update the position and velocity periodically. The remaining lifetime of the node link is calculated by the velocity and distance of the node. The next-hop node is selected according to the weight \(\psi_{j}\).  
When node \(S\) is ready to transmit data to node \(D\), we first select the candidate set according to the node state information (speed and distance) in the routing table. As shown in Figure 4, the candidate set selected according to the link remaining lifetime and the threshold value are yellow nodes \(a,b\) and \(c\). Then, from Equation (9) we select \(c\) as the best next-hop node in the candidate set and repeat this strategy in further selections, until the packet reaches the destination node or there appears a routing void. The selection example can be demonstrated in Figure 5. When a routing void is encountered, the data are forwarded according to GPSR's planar perimeter forwarding mode (right-hand rule).