## 4 Proposed Metrics
### Simulation Environment  
One aim of this work is to define important metrics that influence energy consumption in a WSN. In order to assess the performance of the mentioned protocols, we use the same simulator that was validated in Section 2 with the MPH protocol and a real network. For the simulations, we use a regular topology with a well-defined arrangement, with the purpose of having a more exact reproduction and having more accuracy when measurements are collected. Thus, in the simulations, we used a grid topology of 49 nodes; each node has a separation distance of 5 m and a coverage range of 8 m. The coordinator node is located in a corner, establishing crowns or rings of nodes around the root node, as shown in Figure 10.  
The advantage of using a topology comprised of rings around the coordinator node is that it allows one to analyze groups of nodes with similar features. The nodes belonging to the same ring carry approximately the same traffic, from themselves or from other nodes, and hence, they have approximately similar energy consumption. In this way, we can make both global and local topology analysis. All network nodes must forward packets to the coordinator node directly (one hop) or indirectly (multiple hops, forming a route with intermediate nodes). It is clear that nodes closer to the coordinator node will carry a larger number of packets than the nodes farther away and this will produce an unbalance in the energy depleted in different parts of the network. For example, nodes in the first ring in Figure 10  
Figure 10: Network topology. (Nodes 1, 2 and 3) are the only ones with a direct link to the coordinator, and all other nodes must send packets through these nodes, making them deplete their batteries more rapidly. A summary of the features of the simulation scenario can be seen in Table 2. Nodes generate packets with inter-arrival times given by a random variable \(T\) with exponential distribution with parameter \(\lambda\), as in Equation (1):  
\[F_{T}(t)=P(T\leq t)=1-e^{-\lambda t},t\geq 0 \tag{1}\]  
where \(\lambda\) represents the average number of arrivals per time unit. Thus, packet arrivals follow a Poisson distribution. In the AODV routing protocol, route search is done as follows. A node sends a RREQ packet (route request) in broadcast mode in order to apply for a route, indicating the destination node, the source node identifier, hop count initialized to zero and its sequence number. If a node receives this packet, it first checks if it has previously received a record of this RREQ packet. If the packet is not registered, the node retransmits it again, increasing the number of hops and creating a reverse path (the path to the node that this RREQ has reached). A node that has received an RREQ packet can respond with an RREP packet (route reply) to confirm a route in only two cases: if the node is already the destination or if the node has an available route to the destination. When a node responds with an RREP, this packet is sent, with the corresponding path, in unicast mode to the neighbor who had sent the RREQ. This procedure continues until the source is reached; at this point, the route has been formed. The source node may receive RREP packets from different nodes as a confirmation of various possible routes to the destination. In this case, the source node has two criteria for selecting the best route: the route that has the least number of hops or the route that has the highest sequence number. In this way, in the AODV routing protocol, nodes can have multiple routes to the same destination; the node generally chooses the shortest route (the route with fewer hops). The route search of the DSR routing protocol is as follows. When a source node has a packet to send to a destination, it first looks in its cache to see if it has a route to that destination; if so, it creates a new packet header containing the path with the necessary hops to reach the destination and sends it. Normally, the source obtains the route by searching in its cache for routes previously discovered.