# Multi-Hop Routing Protocols for Oil Pipeline Leak Detection Systems
## 3 System Architecture, Scenarios of Multi-Hop LoRa, and Results
### Hierarchical Topology calculations  
Energy Consumption per Node for Flat and Hierarchical Topology  
A further test has been conducted for comparing the flat and hierarchical (cluster) topologies with similar parameters: the distance between sensors is 200 m, and the calculations assume one day where sensors send 1 byte every 3 h and multi-hop communication mode as described in scenario 1 (shown in Figure 2). The network has 50 nodes. Three topologies are analyzed: The first topology is flat, and the other two are hierarchical. In the first hierarchical scenario, devices are divided into 12 clusters. Each cluster has four sensors. The cluster head is the last node in the cluster (sensor IDs 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48). In the second hierarchical scenario, there are five clusters. Each cluster has 10 sensors. The cluster head also is the last node in the cluster (sensor IDs 10, 20, 30, 40, 50). Figure 9 depicts the energy consumed by each node--represented with its ID--for all three topologies. The energy levels for the cluster heads of the hierarchical topologies--represented as orange and yellow dots--are interleaved with the energy levels of the flat topology. The energy levels, of the other nodes within the clusters of both hierarchical topologies are shown overriding each other--the yellow dots overriding the orange dots. The total amounts of energy consumed by the network of the three topologies are shown in Figure 10. The results show that the sensors consume high energy in the flat topology compared with the hierarchical topology. Clustering improved the energy consumption by 80% in the first hierarchical scenario and by 87% in the second hierarchical scenario. In a hierarchical topology, only the cluster heads need more energy. Hierarchical topology provides better energy efficiency, as shown in Figures 9 and 10. In Figure 9, the hierarchical-1 chart is hidden by the scenario hierarchical-2 chart. Figure 8: The number of bytes for temperature and pressure sensors at different distances. Figure 7: Energy for temperature and pressure sensors at different distances. Moreover, to show the energy consumption for simple sensors (cluster members), we calculated the energy per node for 20 sensors in the first hierarchical scenario (hierarchical-1) and compared the result with the flat scenario. In the hierarchical-1 scenario, the simple sensors also consume energy, but it is much lower than in the flat scenario (worst case), as shown in Figure 11. The energy required for simple sensors in the hierarchical topology is improved by 69% compared with the energy needed for the flat topology. (In Figure 11, devices IDs (4, 8, 12, 16, and 20) are cluster heads). To have an effective network for different requirements, in terms of applications that we need to run across the pipeline, we must optimize the traffic generated and energy consumed, considering parameters such as measurement type and rate, sensor ranges and coverage, capacity limit, and the required density for each type of sensor. In this paper, we determined the parameters of the model such as throughput, energy consumption, number of sensors, and the inner distance between sensors to show how the parameters selection affect the model performance. As an example, we noticed that setting the size of the packet to the maximum size (255 bytes) resulted in the estimated energy consumption of around 1800 joule within a day for pressure sensors (when the inner distance is 200 m). We also determined the possible values and limitations of the model parameters. For example, we cannot set distances more than 500 m, even though LoRa Technology has the capability of higher coverage. However, due to application  
Figure 10: The total energy consumption (for all devices) for different topologies. Figure 9: Energy consumption for different topologies. requirements, setting the distance between sensors to more than 500 m will have the risk of missing the existence of leakage along the pipeline [48; 49].