## 3 Proposed Architecture
### System Architecture  
The architecture is the integration of these five different systems, namely: detection end device, monitoring end device, safety operation controller, drone yard, and the LoRa gateway as shown in Figure 2. The method implemented behind this work is based on the flow of the oil in the pipeline. Here, the ultrasonic flow sensor is mainly utilized for identifying the flow of oil in the pipeline. This sensor calculates the flow of the oil by calculating the time takes for sound to travel downstream and upstream. Moreover, the pressure sensor activates when the flow sensor identifies the passes of oil in the pipeline. The proposed architecture illustrates that the detection end device and monitoring end devices are the two distinct nodes that are specifically embedded for monitoring the pipeline from inside and outside. These two nodes are positioned for the pipeline according to the requirement and infrastructure. The monitoring end device is utilized for sensing the critical parameters of the pipeline such as vibration, flow rate, temperature, humidity, and pressure. The LoRa communication protocol in the monitoring end device can communicate long-range, it enables the monitoring end device to communicate the critical parameter of the pipeline to the LoRa based gateway. A detection end device is employed for detecting the corrosion, fire, leakage, and location, so with the assistance of ZigBee communication protocol, it sends the information to the safety operation controller unit. In case of any emergency, the hooter alerts the author ities and workers to act accordingly for reducing the damage and loss of life. Additionally, the monitoring end device is also integrated with the ZigBee communication protocol for receiving the sensory data from the detection end device and communicating it to the LoRa based gateway via LoRa communication. LoRa based gateway is an integration of LoRa and Wi-Fi module, so it communicates the sensory data received from the monitoring end device and detection end device to the cloud server. Cloud server visualizes the sensory data of both detection end devices and monitoring end devices from any remote location. This indeed assists authorities to visualize the data graphical user interface and record the data for enhancing the drawbacks that are identified through analytics. In the proposed system, instead of sensing the present values of the individual sensors, our onboard algorithms evaluate the difference between the sensor parameters between the adjacent nodes. In case when the difference value obtained crosses a defined threshold set by the auto-configuring Kalman function, the system flags the involved nodes as a case of possible damage-prone. The same case is then verified by the values received from the consequent nodes and, if the same is confirmed, a confirmed damaged flag is initiated. The pressure monitoring is evaluated with the following mathematical model. The mathematical model behind this work is based on the pressure pulse generated from the pipe during damage. Here, the pressure pulse propagates in either direction from the locality of the damage and these pulses are reflected when they attain the edges of the oil pipeline. This work analyzed the vibration-based events of the oil pipeline by integrating the sensor on both ends of the event. The transmission duration of pressure pulses is calculated through pressure measurement sampling with maximum frequency at numerous sites along a pipeline. The arrival times of pulses in a pipeline and sensor placements along the pipe can be utilized to monitor a pipe and establish the location of an event. The events are established either due to penetrating or explosion, as shown in Figure 3.  
Figure 2: Hybrid Architecture of LoRa and Zigbee modem for pipeline parameters monitoring in Oil field. Figure 3 presents the placement of the five-detection end device (D.N 1 to D.N 5) on the pipeline for detecting the location of the event. The distances are represented as D1, D2, D3, D4, and D5.