Energy Aware IoT Routing Algorithms in Smart City Environment

Energy efficiency is one of the key aspects of IoT and Wireless Sensor Networks (WSNs) since the nodes of the network are running on battery power and the lifespan of the system is an important mission-critical parameter. In WSNs, where the energy consumption mainly depends on the radio interface and the transmission protocols, reliable packet forwarding from the source node to Base Station (BS) is crucial. In this paper, we focus on developing new routing algorithms which extend the lifespan of WSNs by achieving optimal energy balancing subject to the criterion that the packets must reach the BS with a predefined probability. We will propose novel two-hop and multi-hop routing algorithms to achieve this objective. The performance of the novel algorithms is compared with the LEACH routing protocol. Extensive simulations prove that the new routing methods are indeed energy efficient, and they are able to meet the predefined reliability criteria as well. The results given in this paper can contribute to reliable communication in IoT or WSN networks and result in lower energy consumption.


I. INTRODUCTION
Wireless sensor networks (WSNs) are deployed in many different applications, such as agriculture [1], [2], border surveillance [3], [4], [5], industry [6], manufacturing [7], [8], wireless body area networks [9], [10], [11] and in other different IoT (Internet of Things) based solutions [12], [13]. WSNs collect information from the environment and provide different services and efficient decision support [14], [15]. Their key advantage is that the sensors can locally monitor, identify and share crucial changes in the observed system with the whole network. The collected data can then be used for various data analysis functions, like predictions and optimization.
Installing and integrating WSNs in existing infrastructures is not always an easy task, especially if the environment is not permanent. For example, a surveillance network may only be The associate editor coordinating the review of this manuscript and approving it for publication was Javed Iqbal .
used for a few weeks in a specific area, and then it may need to be re-deployed in another location. In most applications, the nodes (sensors) run on battery power [16], therefore the energy consumption and the network lifetime are regarded as key performance indicators of the application.
In order to cope with the limited battery power of the nodes, packets are conveyed to the Base Station (BS) in a multi-hop manner. The sequence of the nodes in which the packet is relayed to the BS is a route governed by a routing algorithm. The energy consumption and the lifetime of the network highly depend on these routing algorithms. On the other hand, the reliability of the network is also vital in real-life applications where missing information may lead to fatal consequences (e.g. skipping necessary maintenance actions or missing critical system shut-downs). The objective of the paper is to develop new routing algorithms which meet the requirements of energy efficiency and reliability at the same time. Traditional routing algorithms, like LEACH [17], Directed Diffusion [18], and PEGASIS [19] do VOLUME 10, 2022 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ not provide reliability guarantees, as they merely focus on energy efficiency. The major contributions of this paper are as follows: • Introducing a model capable of providing reliability values for transmissions in wireless sensor networks.
• The development of an energy-aware routing algorithm that is able to provide reliability guarantees for successful packet transmission.
• Providing different variants of the proposed algorithm for different numbers of hops.
• Comparing the performance of the different variants of the algorithm to each other and LEACH.
• Evaluating the energy efficiency.
To the authors' best knowledge, there is no existing work on other routing algorithms considering the random nature of successful packet transmissions.
The rest of the paper is organized as follows: Section II briefly summarizes the related work in the field of Wireless Sensor Networks and routing algorithms. Section III introduces the model in which the new algorithms are described. Section IV extends the one-hop approach and introduces a multi-hop solution. Section V proposes node clustering. Section VI describes the simulation environment while Section VII shows the measurement results and comparisons where the advantages of the proposed algorithms are shown. Section VIII examines the average energy usage of nodes in a network. Finally, Section IX concludes the results and proposes further research directions.

II. RELATED WORK
In Wireless Sensor Networks (WSN), energy-efficient communication and throughput are key performance indicators. Routing algorithms have a great impact on these key attributes, thus methods were proposed in the literature to improve network performance. A comparison of some of the related routing algorithms can be seen in Table 1.
Wireless Sensor Networks are a group of sensor nodes dispatched in an area for a defined objective. These sensor nodes are characterized by the limited capacity of communication, computation, and especially energy source. Hierarchical protocols are divided into 3 types: cluster based routing [20], [21], grid based routing [22], [23] and chain based routing protocol [24], [25].
In [26] the authors have analyzed and compared the two popular routing protocols. Both protocols are simulated with Matlab in order to evaluate their performances against the different users and the WSNs objectives defined. They concluded that PEGASIS outperforms LEACH in the simulation. However, these results may not be satisfactory when other parameters are to be taken into account, such as larger areas with a high number of nodes. A longer delay is also caused by the long chain constructed in PEGASIS. Also, the chain created by PEGASIS does not form the overall optimal path for transmission in some cases.
Another aspect of routing emerges in security-critical applications. WSNs, because of their inherent resourceconstrained characteristics, are prone to various security attacks. For example, a black hole attack is a type of attack that may seriously affect data collection. To meet these challenges, an active detection-based security and trusted routing scheme named ActiveTrust is proposed for WSNs in [27]. The most important innovation of ActiveTrust is that it avoids black holes through the active creation of a number of detection routes to quickly detect and obtain nodal trust and thus improve the data route security. More importantly, the generation and the distribution of detection routes are given in the ActiveTrust scheme, which can fully use the energy in nonhotspot nodes to create as many detection routes as needed to achieve the desired security and energy efficiency. Both comprehensive theoretical analysis and experimental results indicate that the performance of the ActiveTrust scheme is better than that of the previous studies. ActiveTrust can significantly improve the data route success probability and ability against black hole attacks and can optimize network lifetime. In this paper, we propose routing algorithms that mainly focus on energy efficiency and quality of service.
In [28] the authors argue that by carefully considering spatial reusability of the wireless communication media, the end-to-end throughput in multi-hop wireless networks can greatly be improved. To support this argument, the authors propose spatial reusability-aware single-path routing (SASR) and any path routing (SAAR) protocols and compare them with existing single-path routing and anypath routing protocols, respectively.
Another direction of research takes advantage of the collaboration of nodes in cognitive wireless networks. In [29] the authors study the collaborative multi-hop routing in cognitive networks. The authors propose a new algorithm to construct collaborative routing in multi-hop cognitive networks. The proposed algorithm takes into account the interference among nodes, including primary and secondary users. The clustering and collaboration are exploited to improve the performance of collaborative routing in multi-hop cognitive wireless networks with multiple primary and secondary users. By analyzing the maximum transmission distance, collaborations, transmission angle control, power control and channel allocation, a new clustering-based collaborative multi-hop cognitive routing algorithm is proposed to attain better network performance. Simulation results show that the approach is feasible and effective.
Directed diffusion is a classic data-centric routing protocol in Wireless Sensor Networks (WSNs). In directed diffusion based WSNs, data generated by sensor nodes are named by attribute-value pairs. A sink requests data by sending interests. The data that matches the interests are then ''drawn'' down towards the sink. Intermediate nodes cache or transform data, and direct the interests based on previously cached data.
In general, energy resources are limited in WSNs, therefore energy saving becomes the most important consideration in designing routing protocols. In the directed diffusion, the path reinforcement scheme is designed for minimum delay and maximum data received during a certain period of time. However, the communication cost and energy balance over the whole WSNs have not been paid enough attention. To address these issues, in [30] the authors propose a novel path reinforcement scheme. Their proposed protocol is simulated and compared with directed diffusion. The simulation results show that the proposed protocol outperforms directed diffusion in energy efficiency, energy balance over WSNs, and network lifetime.
The backpressure algorithm was introduced in [35], which deals with routing and scheduling (forwarding) processes. In the routing process, the most effective path is found, while in the scheduling process, the decision to activate the proposed route is taken. The backpressure is a well-known distributed and adaptive routing/scheduling algorithm where nodes only need the queue length information of neighboring nodes to make routing decisions, and packets are routed in the network according to congestion information, which makes the algorithm resilient to traffic and topology changes. However, this algorithm requires maintaining a separate queue for each destination, which prevents its implementation in large-scale networks.
The authors considered a multi-hop packet radio network with random packet arrivals and a fixed set of link selection options. Their algorithm consisted of a max-weight link selection stage and a differential backlog routing stage. An algorithm related to backpressure, designed for computing multicommodity network flows, was developed by Awerbuch and Leighton [36]. The backpressure algorithm was later extended by Neely, Modiano, and Rohrs to treat scheduling for mobile networks [37].

III. THE MODEL
The IoT network is regarded as a 2D graph G(V , E, d), where set V refers to the nodes |V | = N , while set E denotes the edges and d ij , i, j = 1, . . . , N are the distances between the nodes. When packets are sent from one node to another, we use the Rayleigh fading for a zero-interference network to model the radio propagation based on [38]: where parameters , σ 2 Z , α are related to the propagation model signal-to-noise ratio and path loss exponent, while d ij is the distance between the sender and the source node and P ij is the probability of successful packet transfer from the sender node i to the source node j. The energy of the network at time instant k is described by an energy-state vector represents the available battery power of node i at time instant k. We assume that initial energy state at time instant 0 is uniform, i.e. c i (0) = E, ∀i = 1, . . . , N .
A path from the source node to the BS is denoted by a set of indices referring to the nodes included in the multihop packet transfer (either being a sender node or a relay node) from the source to the BS: = {s, l 1 , l 2 , . . . ., l m } Here s refers to the sender node, while l 1 , l 2 , . . . , l m are the relay nodes. The end of the path is the BS but is omitted from the path as in our model, it only receives packets while the other nodes in the path are actively involved in packet sending or forwarding. The routing strategy we pursue should guarantee that when sending a packet to the Base Station (BS), the minimum remaining energy on the path is maximized, i.e. a packet forwarding strategy (denoted by ) is optimal if subject to the constraints that P (success) ≥ 1 − ε. This strategy aims at optimizing the network lifespan (by minimizing the energy differences) and guarantees a given level of reliability at the same time. In the following discussion, we assume that the hop-count of the packet transfers has been set prior to sending the packet to the BS.

IV. TWO-HOP ROUTING
For the sake of simplicity, let us first assume that packets are forwarded to the BS in a two-hop path including a single relay node.
At time instant k, a sender node denoted by index s sends a packet to the BS via the relay node denoted by index l. In this case, only two components of the global energy vector c(k) will change c s (k + 1) = c s (k) − g sl and c l (k + 1) = c s (k) − g l,BS , where g sl is the transmission energy used to forward the packet from the sender node s to the relay node l and g l,BS is the transmission energy used to forward the packet from the relay node the BS, respectively. In order to guarantee a reliable packet transfer, one must ensure that the probability of the packet arriving at the BS must exceed a given threshold defined by , such that P sl P l,BS ≥ 1 − . This casts two-hop routing as the following constrained optimization problem: subject to the constraint P sl P l,BS ≥ 1 − .
If a particular relay node l has been selected then the condition P sl P l,BS ≥ 1 − can be rewritten into ln If node l is selected as the relay node then minimum energy difference can be achieved when the source and relay node reach the same energy level, represented by the following equation If node l is selected, the equations above will determine the value of g ls . As a result, for all possible relay node l ∈ V one can calculate g l,BS and g sl via solving the equations above. Thus, the optimal selection of the relay node is given as Note that this selection of the relay node not only ensures maximized remaining energy levels but also guarantees reliable packet transfers by enforcing that the probability of successful packet transfer at the BS exceeds a given threshold. The algorithmic complexity defined in terms of how many times the equations are to be solved is O(| V |).

V. EXTENSION TO MULTI-HOP ROUTING
Following the reasoning given above, the routing protocol can easily be extended to the multi-hop case where we seek the optimal path = {l 0 , l 1 , l 2 , . . . ., l m } which guarantees successful transfer of the packet with the given probability while minimizing the energy consumption. Since there are m + 1 node involved in the packet transfer (i.e. the sender node now denoted by s = l 0 and the m relay nodes indexed as l j , j = 1, . . . , m), the changes in the energy vector will appear in the following components c l j (k + 1) = c l j (k) − g l j l j+1 , j = 0, . . . , m.
Similarly to the previous constraint, if one wants to ensure that the packet sent by node s reaches the BS with a given probability (1 − ), then the reliability constraint can be expressed as Thus the optimization problem of m-hop routing can be formulated as follows: opt : max l 1 ,...,l m minc l j (k + 1) = c l j (k) − g l j l j+1 (8) subject to the constraint of P l j l j+1 ≥ 1 − .
If one selects a path denoted by = {l 0 , l 1 , l 2 , . . . ., l m } then the reliability constraint can be rewritten into the equation from which it follows that To maximize the minimum remaining energy one needs to set The m equations above determine the transmission energies g = g l 0 ,l 1 , g l 1 ,l 2 , . . . , g l m−1 ,l m expressed as a vector of an m-hop route which minimizes the energy differences and fulfills the reliability constraint at the same time. Since, in theory, one can calculate vector g for all possible m-hop path, thus the optimal path can be selected as l 1,opt , l 2,opt , . . . , l m,opt : max c l 0 (k) − g l 0 ,l 1 (12)

VI. ALGORITHM AND SIMULATION ENVIRONMENT
We tested the performance of the different routing algorithms in a Matlab based simulation environment. While equation 12. gives us the solution, to calculate it numerically still remains a challenge. For the two-hop variant, we can explicitly calculate the solution. From the Rayleigh fading model (eq. 1) we know that g ij ln P ij = ω ij , where ω ij = −d α ij σ 2 Z is a constant between two stationary nodes. Using equation 3 for finding the optimal common energy (denoted by c), we can write: Arranging the equation for c will get us the following quadratic formula: where Taking into account the constraints on the variables (ω < 0), only one solution is possible: If c < 0, then the energy needed for reliable communication is higher than the nodes can provide, and so the packet cannot be sent with the required reliability.
Using equation 18, we can calculate the common energy needed for a given node in a two-hop scenario. Note that if we choose the middle node to be the BS, ω l,BS = 0, the solution becomes the transfer energy needed between the source and BS. Calculating for every node in our network, we can find the optimal middle node for every scenario, making the complexity of this algorithm O(| V |) Calculating the solution for multi-hop routing requires significantly more calculations. First, we would have to calculate the common energy level solution for a given permutation, which requires finding the root of an (n-1)-degree complete polynomial that satisfies our quality-of-service criteria. After that, we must check every permutation of nodes for the optimal solution, making the complexity at least O(| V |!) Because of this, we opted to use an approximating solution.
Instead of solving the optimal common energy level problem, let us first find the path for a given energy distribution guaranteeing the highest probability with which a message can be sent from the source node to the BS. This can be written into the following equation 9: Since ω must be a negative number, for a given path, the maximum transmission probability can be reached if g l j l j+1 = c j (k), meaning that every node along the path is using its remaining energy to send the message. Since we know the energy level of every node before the transmission, we can calculate γ j,j+1 ≡ ω j,j+1 g j,j+1 , leading to max m j=0 γ j,j+1 = min m j=0 −γ j,j+1 (20) which makes this problem equivalent to finding the shortest path in a graph with the edges having weight −γ j,j+1 . This can easily be solved using Dijkstra's algorithm for directed graphs, which has a worst-case complexity of O(| V | 2 ). This solution can then be generalized for k-hop routing with any given k. In this case, the Dijkstra algorithm is to be replaced with the modified Bellman-Ford algorithm capable of calculating the shortest path in a graph consisting of at most k edges. The algorithm is described in Algorithm 1.
With this solution, we can approximate the optimal solution for multi-hop routing. We know that on the optimal path, every node participating in the transmission should reach the same common energy level. The goal is to find the highest possible common energy level while maintaining our qualityof-service criteria. Let us denote this common energy level by c. From this, we can calculate the maximum possible Algorithm 1 Maximum Transmission Probability With at Most k Hops Require: k ≥ 0, c source ≥ c ≥ 0, G = (V , E), ω ≤ 0 Ensure: p out = p max , l out = l opt for v in V do Transmission energy for every node if c j ≥ c then The node cannot participate end if end for for e(u,v) in E do Transmission probability for every Initialize starting variables for one hop transmission probability for any given common energy level using the previous solution.
Looking at the relation between c and the maximum transmission probability, we can intuitively see that if we lower the common energy level (c), the transmission probability rises since the nodes use more energy in the transmission. Because of this, we can use binary search over the interval (0, c source ) for the common energy level where the maximum transmission probability reaches the given ln (1 − ). This gives us an approximate solution with complexity O(| V | 2 ln c max δc ), where δc is the maximum absolute error between the optimal and approximated solution. This is described in Algorithm 2.
The presented approach will give us an optimal solution.

VII. MEASUREMENTS AND NUMERICAL RESULTS
We have tested the proposed algorithms on different configurations and scenarios.
In our simulations, we have set θ to be 1.15, σ 2 Z to 1.86 and α to 4 based on the transmission parameters of the nrf24l01 chip. We have generated a number of random network layouts, and for each network, we have run the simulation ten times, and finally we averaged the results over these runs.
At first, we compared the different hop-count algorithms to each other. We run the simulations on a small network (10 nodes), a medium network (100 nodes), and a large network (250 nodes). For each size, we created 20 configurations (where nodes are placed at random subject to uniform distribution), and for each configuration we ran the simulation ten times and stored the number of messages sent before the first node died. The results are then summarized, and the relative performance of each algorithm is compared in a graph. As can be seen in figure 1, k-hop routing is a noticeable improvement over direct sending. In particular, the 4-hop variant proves to be the best strategy at this size, with the higher hop variants providing similar results. Meanwhile, the 2-hop and 3-hop variants have lower efficiency, being capable of only sending 73% and 93% messages compared to 4-hop. However, these numbers are still more than triple than directly sending the messages from the source to the base station.
Since we have run the simulations for every possible k-hop variant, we can see how increasing the k value affects the number of messages sent by the network. In this case, we can see that the efficiency improves until the 4-hop variant and then slightly decreases. This can be explained by two opposing factors balancing each other.
On the one hand, increasing the number of allowed hops reduces the average distance between hops, allowing messages to be sent with less energy. On the other hand, due to how our algorithm works, more hops will result in more nodes being used in a transmission, equalizing the energy levels of every node in the transmission. For example, let us suppose every node has an energy level of X ; running the 4-hop variant will result in a common energy level of 1 2 X /2, while the 10-hop variant may reach 3 4 X . In this case, the 4-hop uses a total of 2X energy, while the 10-hop variant uses 2, 5X . This shows that higher-numbered variants may deplete the energy of the whole network faster.
For our medium-sized network (figure 2), we have changed the number of hops we use in the simulations to better cover a range of different possible values. We can see similar trends as in the small network tests, only with different k values. In this case, directly sending the messages proved to be highly inefficient, only capable of reaching a fraction of the other variant's results.
Of these variants, the 10-hop algorithm reached the highest efficiency, while the 5-hop variant only reached 62% compared to it. Afterward, we can see a clear downward trend for higher-numbered variants, with the 50-hop variant reaching only 91% compared to the higher-performing 10-hop algorithm. In the case of large networks (figure 3), the 20-hop algorithm proved to be the best variant, while the other tested algorithms all reached only around 93%.
Looking at the data, we can conclude that as the size of our network grows, higher-numbered k variant algorithms will become more efficient. As can be seen, for our small network, the 4-hop algorithm allowed us to send the highest number of messages, while the 10-hop variant was better for our medium-sized network layouts.
For our next simulations, we compare LEACH with our proposed algorithms.

A. COMPARISON WITH LEACH
LEACH is used in sensor networks where each node sends exactly one message periodically, and sending a message between two nodes takes a predefined amount of energy (depending on the distance) while not taking into account the probability of the packet reaching the base station. Furthermore, in LEACH, a cluster head collects messages in every round, compresses them, and sends it to the base station, making the transmitting packets different in size.
To compare the two algorithms, we have decided to modify the original LEACH algorithm to take the probability of the transmissions into account. We set the probability of the cluster head receiving a node message and the base station receiving a cluster head message to be the same. For a given qualityof-service criteria, we can calculate these probabilities and then the energy required for the transmission according to equation 1. Since the QoS criteria is now achieved in the case of LEACH, we can adequately compare the results of our simulations.
We use the same testing methodology as described at the beginning of this chapter.
In the case of small networks, we can see how LEACH performs in figure 4. We can see that every tested k-hop variant outperforms LEACH, which only reaches 24% of the 4-hop variant.    This poor result can probably be attributed to the network being small and the probabilistic nature of the cluster head selection algorithm. Because of this, LEACH's result is closer  to the direct message sending results, since only a few nodes will be capable of utilizing a cluster head. Figure 5 shows the comparison of LEACH in the mediumsized network. As can be seen, while LEACH is still not as good as the 10-hop variant, it is significantly closer than it was 87740 VOLUME 10, 2022 in the small network layout, reaching 74% of the messages sent compared to the 10-hop algorithm. Figure 6 shows the results of the LEACH comparison in large networks. In this case, the network size seems to work against the algorithm: too many cluster heads will result in more nodes communicating directly with the base station, depleting its energy faster.
As can be seen from our results, LEACH performs poorly compared to our algorithms. This can be attributed to the following facts: • LEACH is usually used in environments where nodes are placed farther away from the BS. Thus, reaching the BS requires significantly more power than inter-node communication.
• In our definition, the network's lifespan has been defined by the time interval until the first node goes flat, while LEACH is optimized for continuous message sending even after some nodes' energy has run out. Due to how our algorithm works, almost all of our nodes will have little energy left when the first node runs out, while LEACH does not balance the energy levels.

VIII. AVERAGE ENERGY USAGE
Based on how our algorithm works, we expect that the energy levels of the nodes will deplete similarly (since every node must arrive at the same energy level after a transmission). This is confirmed by simulation, and the results can be seen in figure 7 (note that this is a zoomed-in version of a complete run). If the average energy consumption needed for transmitting a single packet is known, then we could estimate the number of packets the node can still send being on a given energy level. This is a valuable metric to know of our algorithms.
However, it is hard to calculate this average value explicitly. To give an approximation, we can simulate a given number of steps and calculate the average used energy from these steps. To do this, however, we must know how fast this average energy usage converges to a given value for any network layout and simulation. If it converges fast, we could extrapolate the data from up until then to calculate the approximate remaining messages left. We are also interested in how the average energy usage varies between different layouts.
To test this, we have used one predefined and ten randomly generated sensor networks and run 100 different simulations VOLUME 10, 2022 on them (meaning that the layout of the nodes was the same, but the order of the nodes selected for message sending was different). We calculated the average used energy per transmission for each simulation and plotted them on the same graph. On this graph, we also show the average energy use of every simulation and the point where the average energy starts converging (which we defined to be the point where the difference between the minimum and maximum average energy use is lower than 3%). We also show the layout of the network containing edges where communication frequently occurs (at least 0.1% of messages go through these edges).
In our first simulation, we compared two special layouts. In both cases, we used a hexagonal shape for the nodes and placed the base station on the other side of the square. The only difference between the two networks is in the placement of one node: in one case, it is placed inside the hexagon, while in the other case, it is placed at the middle point between the hexagon and the base station, as can be seen on Figure 8 and Figure 9. This allows us to compare the effects of the nodes being relatively close to each other to layouts where some nodes are more important in the transmission of messages than others. An interesting observation can be made in this case: while the completely hexagonal network converges two times faster, it also uses, on average, around 10% more energy, meaning that in this case, a node being closer is more beneficial for the network.
For the next experiments, we investigated the number of steps required for the average energy usage to converge. We have run this simulation for a number of randomly generated network layouts. Figures 10, 11 and 12 show that none of them reaches the predefined target of 3% maximum difference, meaning that no accurate approximation can be given for these networks. While there were some networks in our simulations that successfully met this 3% target, these were rare compared to the cases where the average energy usage did not converge. From these results, we have concluded that we cannot extrapolate data from a number of simulated steps, and we must fully run our simulations to get precise results.
For our next experiments, we wanted to characterize the average energy usage of the network by the average of the fourth power of the distances between the BS and every other node. This idea can be traced back to the Rayleigh  fading model: keeping the probability fixed, doubling the distance between two nodes will increase the needed energy for transfer 16-fold.
We plotted the correlation in the figure. The number of nodes in the network was also increased between simulations. The result of the 15 node count networks can be seen in figure 13.
Drawing these scatter plots on the same graph results in figure 14.
As can be seen from these figures, the averaged fourth power of the distance can be used to give a broad approximation for the efficiency of our routing strategy in a given network without running any simulations.

IX. CONCLUSION
In this paper we have introduced several routing algorithms in wireless sensor networks focusing on energy efficiency and reliability at the same time. As the performance analysis has revealed, our algorithms performed better compared to LEACH or directly sending messages when the nodes were placed at random. We have also seen that as the number of nodes increases, higher numbered k-hop algorithms outperform lower ones. It is also noteworthy that our algorithms have always provided reliable packet transfers in terms of the BS receiving the packets with a predefined probability.
We investigated the average energy usage of our algorithms for predefined-as well as randomly generated network layouts. In the case of a given layout where the nodes were randomly generating packets, we have found that the average energy usage will converge to a given value irrespective of the packet generation mode. Due to this effect, we managed to evaluate the average energy usage in the case of some layout metrics. We have found that the averaged fourth power of the distance between the nodes can be used as a good indicator for the average energy usage. In the future, we would like to incorporate further optimizations in our approach, e.g. Network Coding is frequently used to improve the throughput of communication networks. We would also like to implement other routing protocols with regards to the Rayleigh fading model and compare the performances to our algorithm.