Multi-Hop Routing Protocols for Oil Pipeline Leak Detection Systems

: In recent years, various applications have emerged requiring linear topologies of wireless sensor networks (WSN). Such topologies are used in pipeline (water/oil/gas) monitoring systems. The linear structure has a signiﬁcant impact on network performance in terms of delay, throughput, and power consumption. Regarding communication efﬁciency, routing protocols play a critical role, considering the special requirements of linear topology and energy resources. Therefore, the challenge is to design effective routing protocols that can address the diverse requirements of the monitoring system. In this paper, we present various wireless communication technologies and existing leak detection systems. We review different routing protocols focusing on multi-hop hierarchical protocols, highlighting the limitations and design issues related to packet routing in linear pipeline leak detection networks. Additionally, we present a LoRa multi-hop model for monitoring aboveground oil pipelines. A set of model parameters are identiﬁed such as the distance between sensors. In addition, the paper determines some calculations to estimate trafﬁc congestion and energy consumption. Several alternative model designs are investigated. The model is evaluated using different multi-hop communication scenarios, and we compare the data rate and energy to provide an energy-efﬁcient and low-cost leak detection system. Author Contributions: Conceptualization, H.A. and N.D.; methodology, H.A. and N.D.; validation, N.D., M.F. and H.B.; investigation, H.A.; writing—original draft preparation, H.A.; writing—review and editing, N.D., M.F. and S.A.; visualization, H.A.; supervision, M.F. and N.D.; project administra-tion, G.A.; All authors have read and agreed to the published version of the manuscript.


Introduction
Pipelines are cost-effective; clean in transporting water, oil, or gas; and provide greater supply rates and capacity. There are different pipelines in terms of topology, design, fluid type, and operational condition. The pipe may carry water, gas, or oil. Some pipelines are underground, and others are aboveground [1]. Considering the length of the pipelines and the state of the terrain, many problems can occur, such as pipeline leakage and corrosion [2]. A leak in oil and gas pipelines causes extreme environmental pollution and economic losses. Hence, the need for pipeline monitoring and leak detection systems is immense.
A Wireless Sensor Network (WSN) is suitable for monitoring the pipeline to provide leakage detection and has many advantages. Wireless sensors can cover the area where there are no wired connections, and sensors are low in cost and easy to deploy and maintain, which increases network reliability and security [2]. There are many challenges in using WSNs in oil and gas pipelines, such as minimizing energy consumption, avoiding congestion in large-scale networks, and dealing with the constraints imposed by the linear topologies [2]. Sensors consume energy during their long duty cycle. A massive number of sensors leads to huge energy consumption that affects network lifetime and reliability. The It is designed to be used in the local area, such as homes, offices, and hospitals. It ranges up to 250 m. The data rate is high, around 600 Mbps. On the other hand, it needs a large amount of energy. Wi-Fi uses a star topology, where all communications go through the access point. This standard is easy to use and very common in IoT applications [14].

• Sigfox
Sigfox is a wide-area low-power technology. It uses an ultra-narrow band. The Sigfox structure is similar to the cellular network, but it consumes less power and transmits small data packets [15]. The topology is a single-hop star, the area is divided into cells, and each cell has a base station. Sigfox provides low-noise communication and a wide range of up to 30 km. The data rate is around 100 bps. It is suitable for low data rate applications. Streetlights are an example of the Sigfox application [15,16].
DASH7 Alliance supports mid-range communication where the range reaches 5 km. It requires low power and provides a 20-kbps data rate. The DASH7 network is similar to the star LoRa network; however, it commonly uses a tree topology [16]. It provides good results in applications that need low latency. DASH7 is used, for example, in the location-based application and tracking cars [17].
• LoRa LoRa is a low-power, long-range topology. LoRa networks consist of the node, gateway, network server, and application server. The node senses the data and sends them to the gateway, then to the network server where the data packets are processed. After that, the data are sent to the application [18]. LoRa-WAN is responsible for communication protocols. The data rate reaches up to 50 kbps. The technology provides a range of 2-15 km [19]. LoRa has many uses, such as environmental applications, healthcare, oil and gas pipelines, and smart farms [20]. Table 1 shows a comparison between the technologies. The pipeline network requirements are low power, wide range, and low cost. The most suitable technologies for pipeline monitoring are Zigbee, Sigfox, and LoRa. The Zigbee range can be extended using more routers, yet even so, it does not cover hundreds of kilometers. Sigfox can address the wide-range requirement; however, it needs subscriptions. In contrast, LoRa covers large ranges, consumes low energy, and does not require a subscription, which means there is no cost to use this technology, as it is open software.

Routing in Wireless Sensor Networks
Communication in WSNs can follow single-hop or multi-hop routing. In a single hop routing, the packet is sent from source to destination through the central point (access point), and the coverage range is fixed, whereas, in multi-hop routing, there is no central point. The packets are sent from one device to another. Additionally, it extends the coverage area and preserves energy.
In multi-hop communications, the nodes can perform both sensing and data relaying. Routing protocols are used to discover an efficient path to transmit data from source to destination. Additionally, the protocols provide reliable and energy-efficient communication [21]. This section provides an overview of the classification of routing protocols based on network topology and route processing. There are two types of network topology: flat and hierarchical [22].

•
Flat routing is a simple structure. The node senses the data and acts as a relay node. It reduces the communication overhead but consumes a large amount of power. In a flat topology, examples of the routing protocols are AODV, DSDV, OLSR, STAR, and ETSP [22]. This type of routing consumes energy.

•
In hierarchical routing, the area is divided into sub-areas or clusters. Each one has a cluster head (CH). The sensors send the data to the CH, and CH sends it to the destination. Hierarchical topology is efficient and increases scalability [23].
In route processing, there are three types: static routing protocols, dynamic routing protocols, and hybrid protocols [21].

•
In static routing, the network administrator generates the static routing protocols. The routing table is built before the communication takes place, and it is fixed. Hence, it requires low energy. The IPv4 protocol uses static routing. Static routing is not suitable if the network changes [24].

•
The dynamic routing protocol is used in environmental applications. The nodes know the routes and the paths from their neighbors. It uses two ways to discover the route: proactive and reactive [24]. Proactive routing, also known as table-driven routing, is one in which all routing information is stored in a table. To discover the paths, each node sends a broadcasting message to all nodes. These paths are stored in the routing table, which is continually updated [24]. There are many proactive protocols, such as DSDV, STAR, OLSR, HOLSR, and RPL. Reactive protocols discover the route on demand. Unlike proactive routing, reactive routing reduces the communication overhead. AODV, DSR, and TORA are examples of reactive protocols [24]. The dynamic protocol is adaptable and scalable. However, it needs more energy because of the routing process and additional resources like bandwidth, memory, and CPU, which may decrease network performance [24]. • Hybrid routing combines both static and dynamic routing, such as link-state routing (LSR). It has a low overhead. These protocols do not work well in large-scale networks [24].
The next section mentions some of the existing leak detection systems and routing protocols. Additionally, we present some studies that applied multi-hop communication with the LoRa network.
This paper focuses on the multi-hop routing protocols, which can be applied to linear oil pipelines and focuses on LoRa multi-hop topologies along the pipelines. The paper also aims to provide essential technological elements and concepts needed to support a monitoring system for oil leak detection. More specifically, it addresses issues from the point of view of energy efficiency. We define the network parameters and estimate network density and energy. Additionally, we test various multi-hop scenarios at different system parameters such as packet sizes and transmit ranges.
The rest of this paper is organized as follows: Related work in multi-hop routing protocols used in the pipeline monitoring networks is described in Section 2. Section 3 presents the LoRa multi-hop technology model, results, and analysis. Section 4 concludes the paper.

Related Work
In this section, we present the related systems that are used in pipeline leakage detection and specifically the routing protocols that are used in these systems.

Related Leak Detection Systems
Over the last years, researchers have proposed pipeline leak detection systems based on WSNs. The systems use different types of sensors to monitor the different types of pipelines. Additionally, they use diverse communication technologies such as ZigBee and Bluetooth. In this part, we highlight some of these leak detection systems to define the main specifications of these systems such as the type of sensors they used, WSN technology, and the type of communication being they applied.
In [25], the Steamflood and Waterflood Pipeline Monitoring System (SWATS) design is presented. The system detects leakage in aboveground pipelines. It provides good coverage but consumes energy. The system uses temperature and pressure sensors. A different system for underwater applications was proposed in [26]. The channel-aware routing protocol (CARP) enhances the link quality by using the link state as one of the parameters to select the route. This system can be used in underwater oil pipes and monitoring pollution in the sea. CARP uses multi-hop routing.
A hierarchical network was proposed as a solution with single-hop communication as in [27,28] and with multi-hop communication [29,30]. In [27], a hierarchical representation of LSN was proposed. Dividing the networks into layers, first, they have the Basic Sensor Node (BSN), then the Relay Node (RN), Data Dissemination Node (DDN), and finally Network Control Center (NCC). Each layer uses different wireless standards, the first one uses Zigbee, and Bluetooth and the layer after that used culler technology. An improved scheme was designed, along with a routing protocol and an addressing scheme considering the Zigbee standard [27]. In this work, they used different standards at each layer. That can be used in our pipeline system. The author in [28] introduced monitoring systems for underground water pipelines (PIPENET) using Bluetooth considering a hierarchical topology with different standards that are different from the ones used in the previous work. The disadvantages are high delay and energy consumption, as well as low reliability. Another system that is described in [29] is magnetic induction-based wireless sensor networks. This study addressed the requirements of an underground pipeline monitoring (MISE-PIPE) system using a hierarchical, cluster-based system including pressure, acoustic, and temperature sensors. Additionally, the work in [31] presented a Sensor-based Pipeline Autonomous Monitoring and Maintenance System (SPAMMS) for monitoring an aboveground water pipe using a heterogeneous network (the network has three devices basic sensors, mobile sensors, and robot agent). SPAMMS requires a large amount of energy. Furthermore, the authors in [32] present an oil and gas leakage detection system, called Reliable Monitoring of Oil and Gas Pipelines using Wireless Sensor Network (REMONG), which was designed for above-ground pipes. It uses two types of sensors for temperature and pressure. It uses Zigbee technology and AODV routing protocol. The limitations are low scalability and the network lifetime, and the fact that when the density of the network increases it consumes high energy. Table 2 shows detailed specifications of these systems.

Multi-Hop Routing Protocols for Leak Detection Systems
As mentioned in the previous section, the oil and gas pipelines laid over hundreds of miles can be monitored using multi-hop linear sensor networks in a fixed infrastructure of nodes, statically arranged in a line like a chain. The data can be transmitted from a source node to the destination through intermediate nodes [33]. In this section, we present multi-hop routing protocols and review their energy consumption, delay, scalability, and network traffic. The protocols apply either linear routing or hierarchical routing. The author in [34] proposed a hierarchical multi-hop routing called Chain-Based protocol. The protocol divides the area into multiple vertical chains according to x-coordinates (x-coordinates are similar in all subarea nodes). The top node of each chain is the leader node. The communication inside the chain is from one node to another up to the leader node, and it is multi-hop. In contrast, the connection between the leader and the base station is done via a single hop. The protocol exhibits low delays and traffic volumes. However, the leader nodes require high energy, and the scalability of the protocol has not been tested. In [35], an alternative scheme was proposed to reduce transmission energy. The protocol creates a new chain between the leader nodes. The communication between the leader and the base station is done in a multi-hop fashion. Packets are sent to the base station through the chain's leader node, which transmits from one leader node to another until reaching the nearest leader node from the base station. The protocol provides low delay, but the network exhibits unbalanced energy consumption among the sensors. There are many data packets generated which create considerable network traffic. The work [36] suggested a hierarchical Chain-Cluster Based Routing Protocol (RFC+) to avoid unbalanced energy consumption along the chain of sensors. The authors assumed that the base station has complete knowledge of the nodes' power characteristics and locations. When the communication begins, the base station calculates the energy and delay, then selects suitable cluster heads, and then defines each cluster's size. The process repeats in each communication which causes a high overhead [36]. The RFC+ consumes low energy and has good scalability, but in some cases, it is not applicable, because nodes cannot always Electronics 2022, 11, 2078 7 of 17 connect directly to the BS. Additionally, the base station does not always have complete information about the sensors. Low-Energy Adaptive Clustering Hierarchy (LEACH) is another cluster-based routing protocol. The cluster heads aggregate the received packets before sending them to the base station to reduce the data packets. The CH dynamically changes during the communications to save the node's energy. LEACH is presented as for single-hop communications in [37]. A multi-hop LEACH variant was proposed in [38]. First, the data are sent from the source sensor node to the CH. After that, CH aggregates and relays the data to the base station through other CHs. This protocol increases the range of transmission without consuming more power. However, although it provides scalability and low energy, it increases network traffic. Additionally, the author in [39] introduced a Distributed Algorithm for Multi-Hop Communication (MH-LEACH). This protocol reduces energy by decreasing the transmission ranges. The CH sends the data packets to the nearest neighbor MH-LEACH has low power consumption, at the cost of generated network traffic volumes. Table 3 shows a comparison of Hierarchical Multi-Hop Routing Protocols. For inter and intra-communication, each protocol may apply single-hop or multi-hop routing. The route from the node to the leader node is an intra-communication, and the inter communication is from the leader node and the base station.

LoRa Multi-Hop
LoRaWAN technology can address the pipeline system requirements in terms of range and power. LoRaWAN systems have been mainly introduced for single-hop topologies, but in recent years many studies have applied them for multi-hop communication as well. In [40] it is discussed that LoRa multi-hop and mesh solutions require targeted design to address the specific requirements from each use case scenario, highlighting scalability, management, and complexity issues. In [41] the authors studied the various deployment options of LoRa mesh and multi-hop topologies, denoting the use of nodes as intermediate relays and additionally highlighting power consumption and optimum sensor placement tradeoffs. In [42] a multi-hop protocol for LoRa is presented, which also considers an SDN network architecture, which demonstrated acceptable trade-offs among performance and scalability. In [43], the authors suggested the use of multi-hop LoRa in Smart City applications to extend the range and reduce the energy dissipated in each sensor node. The authors compared LoRa single-hop and multi-hop communication, and the results showed that the multi-hop option provides better performance, with some concerns about the achieved scalability. In [44], the authors compared the packet delivery in single-hop and multi-hop LoRa to monitor a large area using mesh topology. This system consumed excessive energy and had many limitations in terms of security and latency. The work in [45] proposed routing protocols to minimize the latency, using LoRa multi-hop hierarchical routing and assuming tree-based topologies. The system increased reliability and provided low latency. However, energy issues are not addressed. Additionally, a new multi-hop LoRa communication was proposed in [46] for a linear network. The system enhanced the packet delivery and delay, but when the network scalability increased, it led to low performance in terms of delay. Additionally, the work did not evaluate the system's energy requirements. In [47], an underground monitoring system was studied considering a linear sensor topology. The authors considered a multi-hop LoRa network, consisting of various sensors for measuring water and air indicators and developed an energy cost per sensor.
Using multi-hop extends the LoRa network coverage and provides reliability. However, some constraints must be considered to achieve energy efficiency and low overhead routing. The proposed networking protocol assumes LoRa multi-hop links serving a linear topology of deployed sensors over the pipeline, considering the tradeoffs presented in the related state of the art research. The system is described in the next section.

System Architecture, Scenarios of Multi-Hop LoRa, and Results
In our envisaged system for monitoring the oil transport infrastructures, the pipeline is considered to run through the desert where wired connections and power supplies are not usually available. The pipeline length is up to 1200 km. Furthermore, 266 km of the pipeline run through the desert where there are no cities around [3]. In this research, the system is designed supposed to use a WSN consisting of two types of sensors: temperature and pressure sensors, both battery-powered. The sensors send the measurements to the gateway (GW) in a multi-hop fashion. The GW needs a power source, so it is under consideration for placement in the nearest town. The data are sent from the GWs to the control center where they are analyzed to detect leakages. LoRaWAN multi-hop technology will be considered, assuming a bandwidth of 125 kHz.
Three different scenarios are tested to build and evaluate our model. The first scenario is the simplest multi-hop formation, according to which the source node sends the packet to its neighbor (and then on each node to its immediate neighbor) until reaching the GW. The node only connects to the previous and next neighbors. This type of communication is easy to develop. In this scenario, all nodes will be involved in the communication. In the second scenario, not all nodes cooperate in the communication. Each node will send packets to the third neighbor. In the last scenario, the node will transmit packets to its ninth neighbor. Both scenarios 2 and 3 increase the time of sleep state for network nodes. Figure 1 shows the three scenarios. In each scenario, we estimate network capacity and coverage planning and calculate the energy consumed when receiving and sending packets of various sizes towards the gateway. In LoRa technology, sending the packets to a specific neighbor node is done in two ways, either by broadcasting using address 0 or using the neighbor node's address [47]. Since in our scenario the node may send the packets to its second or third neighbor, the communication in our model is achieved through the node's addresses.

R REVIEW
9 of 18 Figure 1 shows the three scenarios. In each scenario, we estimate network capacity and coverage planning and calculate the energy consumed when receiving and sending packets of various sizes towards the gateway. In LoRa technology, sending the packets to a specific neighbor node is done in two ways, either by broadcasting using address 0 or using the neighbor node's address [47]. Since in our scenario the node may send the pack ets to its second or third neighbor, the communication in our model is achieved through the node's addresses. Furthermore, a comparison between flat and two hierarchical topologies is presented In flat topologies, the nodes are arranged in a line, and each node connects with its adjacent neighbors (next and previous). The packets are sent from one node to another unti they reach the GW. On the other hand, in the first hierarchical topologies, the area is divided into clusters. Each cluster has a cluster head (CH) and three nodes. The communication is done from each node to its CH and then from the CH to the GW through other CHs. In the second hierarchical scenario, each cluster has nine nodes instead of three. The two hierarchical scenarios are shown in Figure 2. As can be seen, in each scenario, nodes Furthermore, a comparison between flat and two hierarchical topologies is presented. In flat topologies, the nodes are arranged in a line, and each node connects with its adjacent neighbors (next and previous). The packets are sent from one node to another until they reach the GW. On the other hand, in the first hierarchical topologies, the area is divided into clusters. Each cluster has a cluster head (CH) and three nodes. The communication is done from each node to its CH and then from the CH to the GW through other CHs. In the second hierarchical scenario, each cluster has nine nodes instead of three. The two hierarchical scenarios are shown in Figure 2. As can be seen, in each scenario, nodes are numbered sequentially, and cluster heads nodes are labeled with CH and a number representing their order in the sequence of all nodes of the scenario. they reach the GW. On the other hand, in the first hierarchical topologies, the area is divided into clusters. Each cluster has a cluster head (CH) and three nodes. The communication is done from each node to its CH and then from the CH to the GW through other CHs. In the second hierarchical scenario, each cluster has nine nodes instead of three. The two hierarchical scenarios are shown in Figure 2. As can be seen, in each scenario, nodes are numbered sequentially, and cluster heads nodes are labeled with CH and a number representing their order in the sequence of all nodes of the scenario. We evaluate our model to validate the network parameters and assumptions. In this section, we show and discuss our results. We compare the consumed energy and number of bytes for different transmission ranges.
The results will be presented in the following four sections. The first section studies the measurement ranges and the traffic size, whereas the second section focuses on the energy consumption of LoRa devices. The third section examines two different types of sensors, and the last section compares the energy consumption of LoRa devices in a flat and hierarchical topology. All tests focus on flat topology, except the fourth one; it compares flat and hierarchical topologies. We evaluate our model to validate the network parameters and assumptions. In this section, we show and discuss our results. We compare the consumed energy and number of bytes for different transmission ranges.
The results will be presented in the following four sections. The first section studies the measurement ranges and the traffic size, whereas the second section focuses on the energy consumption of LoRa devices. The third section examines two different types of sensors, and the last section compares the energy consumption of LoRa devices in a flat and hierarchical topology. All tests focus on flat topology, except the fourth one; it compares flat and hierarchical topologies.

Measurement Ranges and Traffic Size Calculations
We calculate the measurement range and the density along 10 km of linear pipeline. Table 4 shows the three scenarios of the different multi-hop routing, where the system may deploy one of the available packet sizes: 1 byte and 255 bytes. Various distances between sensors from 10 m to 500 m are analyzed. For each distance, the number of hops is calculated for one packet. The network density and the number of hops give a good indication of the different possible traffic sizes. For the density of the sensor's calculation, we must consider the measurement types, since they have different requirements in terms of measurement ranges and consequently network densities. Based on the inner distances between the devices, we spread the devices along the 10 km of the pipeline and calculate the number of devices required for each distance [10 m, 50 m, . . . , 500 m]. The number of hops was obtained for the three communication scenarios. For example, at the distance of 200 m (the inner distance between the devices), we need 50 sensors to cover all the 10 km of the pipeline. If we are using the second communication scenario, fewer sensors cooperate, so there are 17 hops to transmit data to the gateway. When we deploy more sensors with less distance between them, it increases the number of packets generated, which leads to more energy being consumed. The amount of energy consumption also depends on the sensor's role within the communication chain: if it only transmits its data or if it is a cluster head.  Figure 3 compares the number of generated and transmitted bytes via the sensor network according to scenarios 1, 2, and 3 where packet size is 255 bytes at different distance ranges, starting from 50 m to 500 m. To find the number of transmitted bytes in one day, we determine the number of packets forwarded at each hop. Each sensor will send its packets and resend its neighbors' packets. For each inner distance, there is a different number of hops and a different number of transmitted packets. The following equation was used: Electronics 2022, 11, x FOR PEER REVIEW 11 of 18 · Figure 3. The number of bytes/days at different sensor distances (packet size is 255 bytes).

The Energy Consumption of LoRa Nodes Calculations
In Figures 4 and 5, we calculate the energy consumption per node for one day. We consider energy consumption only for the send and receive modes. We select 200 m as the distance between sensors based on the previous traffic calculations. From [47], we used the same value of the current for send and receive mode. The energy value in joules was calculated; for sending mode, it is 0.323 joule, and for receiving mode, it is 0.218 joule. To calculate the energy consumption for a single node, we use Equation (2), where N is the sequence number of the sensor in the communication, ERm is the energy for receiving mode, ESm is the energy needed to send the packets, and Ps is the packet size.

E = [(N − 1) ERm + N ESm] Ps
Each sensor sends one byte every 3 h. As an example, node 2 in the first scenario will send the two packets (packet of node 1 and its packet) and receive one packet, so it consumes around 1 joule per day. Table 5 shows energy assumptions.  Results show an increase in the traffic that will be generated as the inner-sensor distance decreases. Scenario 3 has a lower number of bytes than other scenarios. To design a sensor network with low requirements in terms of the number of generated bytes, we can decrease the network density (use a large inner distance ex. 200 m) and send it through a smaller number of hops (scenario 3 has minimum hops).

The Energy Consumption of LoRa Nodes Calculations
In Figures 4 and 5, we calculate the energy consumption per node for one day. We consider energy consumption only for the send and receive modes. We select 200 m as the distance between sensors based on the previous traffic calculations. From [47], we used the same value of the current for send and receive mode. The energy value in joules was calculated; for sending mode, it is 0.323 joule, and for receiving mode, it is 0.218 joule. To calculate the energy consumption for a single node, we use Equation (2), where N is the sequence number of the sensor in the communication, E Rm is the energy for receiving mode, E Sm is the energy needed to send the packets, and P s is the packet size.   Moreover, to show the communication scenarios' effect on energy consumption, we applied Equation (2) on the 50 nodes and calculate the total energy per day in the three scenarios. For example, in scenario 1, the devices consume around 11,674 joules, whereas in the third scenario the devices consume 148 joules. This can be observed in Figure 6, where the y-axis shows the number of the scenarios, and the x-axis shows the total amount of energy consumed by the nodes of the corresponding scenario. When the number of hops decreases, the total required energy decreases, as shown in Figure 6. We observed that the second scenario improve energy by 88% and the third scenario by 98%.    Moreover, to show the communication scenarios' effect on energy consumption, we applied Equation (2) on the 50 nodes and calculate the total energy per day in the three scenarios. For example, in scenario 1, the devices consume around 11,674 joules, whereas in the third scenario the devices consume 148 joules. This can be observed in Figure 6, where the y-axis shows the number of the scenarios, and the x-axis shows the total amount of energy consumed by the nodes of the corresponding scenario. When the number of hops decreases, the total required energy decreases, as shown in Figure 6. We observed that the second scenario improve energy by 88% and the third scenario by 98%. Figure 6. The total energy consumption in the multi-hop scenarios. Each sensor sends one byte every 3 h. As an example, node 2 in the first scenario will send the two packets (packet of node 1 and its packet) and receive one packet, so it consumes around 1 joule per day. Table 5 shows energy assumptions. In Figure 4, the energy consumption per node is presented. The node IDs (1, 10, and 40) are shown in the x-axis where the distance between sensors is 200 m. The nodes which cooperate for the communication in the three scenarios are selected. The amount of energy consumed per node is shown in Figure 5. The x-axis shows the node's IDs, on the other hand the values of the y-axis are presented in logarithmic-scale. We calculate the energy consumption to show the difference between the three communication scenarios. We first determine the number of received and transmitted packets for each node included in the communication, then apply Equation (1) to find the nodes' energy consumptions. Device 1 consumes around 0.2 joules in all three scenarios, depicted in Figure 5. Device 40 consumes around 440 joules in the first scenario whereas it consumes around 10 joules in scenario 3, which are shown in Figure 5. Less energy consumption is observed in scenario 3 due to the smaller number of hops.
Moreover, to show the communication scenarios' effect on energy consumption, we applied Equation (2) on the 50 nodes and calculate the total energy per day in the three scenarios. For example, in scenario 1, the devices consume around 11,674 joules, whereas in the third scenario the devices consume 148 joules. This can be observed in Figure 6, where the y-axis shows the number of the scenarios, and the x-axis shows the total amount of energy consumed by the nodes of the corresponding scenario. When the number of hops decreases, the total required energy decreases, as shown in Figure 6. We observed that the second scenario improve energy by 88% and the third scenario by 98%. Moreover, to show the communication scenarios' effect on energy consumption, we applied Equation (2) on the 50 nodes and calculate the total energy per day in the three scenarios. For example, in scenario 1, the devices consume around 11,674 joules, whereas in the third scenario the devices consume 148 joules. This can be observed in Figure 6, where the y-axis shows the number of the scenarios, and the x-axis shows the total amount of energy consumed by the nodes of the corresponding scenario. When the number of hops decreases, the total required energy decreases, as shown in Figure 6. We observed that the second scenario improve energy by 88% and the third scenario by 98%. Figure 6. The total energy consumption in the multi-hop scenarios. Figure 6. The total energy consumption in the multi-hop scenarios.
The three scenarios have different results because of the number of nodes involved in the communication (number of hops). In scenario 1, all nodes cooperate, which leads to more energy consumption in each node, whereas in the second scenario, less than half of the nodes are involved in forwarding other nodes' packets, so the average energy consumption is less. Furthermore, the smaller number of hops leads to lower end-end delay and higher throughput. This is via either appropriate dimensioning of their transceivers and processors or via appropriate scheduling of the transmitted packets by different cluster nodes to avoid packet collisions and packet queuing. Moreover, the distance between sensors is related to the application type and requirements. For example, in LoRa underground monitoring applications, the maximum distance is 200 m and, in some cases, is 150 m, as in [48], whereas the distances are larger in aboveground applications. Calculations in Table 4 show that the communication range can reach 500 m, which is within the achievable range defined for LoRa-WAN via link budget calculations, such as those mentioned in [49].

Temperature and Pressure Sensor Calculations
We performed another set of tests on temperature and pressure sensors and compared the results to determine the optimal inner distance between the sensing devices (sensor) and the suitable number of bytes for both sensor types. We set the packet size to be 255 bytes, and the pipeline length to be 10 km. The temperature sensors were assumed to transmit a sample every 3 h, and the pressure sensors sent a measurement every 1 h for one day. The test calculated the network density, the energy transmitting and receiving packets, and the total number of bytes at different distances between sensors. Each type of sensor generates a different number of bytes, The pressure sensors need a higher sampling rate and lower distances between sensors than temperature sensors [48,49]. Figure 7 presents the energy consumed by all nodes located within the inner distances specified by the x-axis, for both pressure and temperature sensors. As can be observed from the figure, the pressure sensors need more energy than the temperature sensors for the same network density. For inter-sensor distances between 200 m and 500 m, the energy consumption is low for both sensor types. Figure 8 shows the total number of bytes for all nodes located within the inner distances specified by the x-axis, for both pressure and temperature sensors. Pressure 7 presents the energy consumed by all nodes located within the inner distances specified by the x-axis, for both pressure and temperature sensors. As can be observed from the figure, the pressure sensors need more energy than the temperature sensors for the same network density. For inter-sensor distances between 200 m and 500 m, the energy consumption is low for both sensor types. Figure 8 shows the total number of bytes for all nodes located within the inner distances specified by the x-axis, for both pressure and temperature sensors. Pressure sensors have a higher number of bytes than temperature sensors, as can be seen in Figure 8. Therefore, pressure sensors require high energy consumption.

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 topologiesrepresented 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.

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.
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.   Moreover, to show the energy consumption for simple sensors (cluster memb calculated the energy per node for 20 sensors in the first hierarchical scenario chical-1) and compared the result with the flat scenario. In the hierarchical-1 scen simple sensors also consume energy, but it is much lower than in the flat scenari case), as shown in Figure 11. The energy required for simple sensors in the hier topology is improved by 69% compared with the energy needed for the flat topo Figure 11, devices IDs (4, 8, 12, 16, and 20) are cluster heads). 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 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].
There is a tradeoff involving different issues related to measurement precision, network capacity, network coverage, and energy efficiency; therefore, multi-hop communication may enhance coverage, but it is important to design the network in such a way that balances energy consumption and network traffic volumes. 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

Conclusions-Future Work
This paper discussed wireless communication solutions and multi-hop routing as solutions for pipeline networks' leak detection systems. The main objectives of the survey presented in this study are to review the existing multi-hop systems and routing protocols and define the limitations, like the network energy and the volume of data traffic. We studied how the various network parameters, which are important for WSN multi-hop networks, are deployed along oil pipelines.
In future work, we will focus on investigating energy-efficient, reliable routing protocols for the oil pipeline use cases, including throughput, energy, and reliability performance indicators. It would be desirable to have sensors spaced quite close to each other to detect with high accuracy inconsistencies caused by various events such as leaks, fire, loss of pressure, corrosion, impact, etc. Such dense sensor deployment may lead to the generation of excessive measurement traffic leading to congestion, packet collisions, interference, and loss of communication for various nodes within the networks. Additionally, a dense network using multi-hop connections (either flat or hierarchical) may lead to heavy-duty operation of devices that will have to relay the packets of their neighbors towards the destination gateway, affecting their energy autonomy and operational efficiency. There are multiple approaches to addressing such challenges. For example, we could space the sensors further apart and reduce the network node density, or we could schedule specific devices to relay the generated measurements. We must also consider other criteria, such as delay criticality of data and the "coherence time" of the different measurement types to ensure that the network optimizes its operation according to the transported information. This tradeoff will be investigated in future work that will expand on the presented methodology.