## 4 AODV-EM Routing Protocol Design
### Workflow Design  
The AODV-EM protocol proposed in this paper, by modifying the workflow of the original AODV protocol in the process of route discovery and route recovery, abandons the \"minimum hop count\" as the only criterion for route selection, and calculates the route cost to the next hop node according to the energy consumption level and relative mobility of the neighboring nodes, so as to ensure the minimum cost value of the selected route. Next, the implementation of the AODV-EM protocol in the process of route discovery and route reply is introduced in detail. The route discovery and route reply processes are illustrated in Figure 5.  
The source node broadcasts the RREQ data frames during the route discovery process. At this time, the node energy consumption and route cost value in these data frames are set to the initial value of 0. When an intermediate node receives the RREQ data frame, this node must verify whether this is the first reception and whether a reverse route already exists. If so, then perform the following steps. First, calculate the energy consumption based on node degree balance according to Equation (5) and update the energy information in the RREQ data frame. Next, calculate the relative mobility with respect to the previous hop according to Equation (8) and update the speed information in the RREQ data frame. Finally, compute the route cost value relative to previous hop node using Equation (9) and accumulate it with the route cost value stored in the RREQ data frame. If the route cost value of the current link is less than the cached value in the routing table, the routing information in the routing table will be updated, otherwise the RREQ data frame will be discarded.  
Figure 5: Route discovery and route reply processes.  
When receiving the RREQ data frame, each intermediate node will determine whether it is the destination node. If not, it will continue the above process to update the relevant information in the RREQ data frame and add up the route cost value, while also continuing to broadcast and forward the RREQ data frame. The route discovery process continues until the destination node is found. At this time, the route cost value stored in the RREQ data frame represents the total route cost of the communication link between the source node and the destination node. The route discovery process of AODV-EM protocol is shown in Figure 6.  
The destination node replies the RREP data frames to the source node after receiving the RREQ data frames during the route reply process. When an intermediate node receives a RREP data frame, it first checks whether there is a forward route in the routing table. If so, it calculates and accumulates the route cost value of the entire link based on the data frame information and compares it with the route cost value stored in the routing table. If the newly computed route cost value is smaller, the routing table will be updated accordingly.  
When receiving the RREP data frame, each intermediate node will determine whether it is the source node. If not, it will continue the above process to update the relevant  
Figure 6: Route discovery process of AODV-EM protocol.  
information in the RREP data frame and send the RREP data frame along the reverse route unicast in the routing table. Until the source node is found, the route reply process ends, and the source node starts data transmission to the destination node. The route reply process of AODV-EM protocol is shown in Figure 7.