Design and implementation of an integrated pipeline security system with optmized scheduling

Received Nov 4, 2020 Revised Jan 22, 2021 Accepted Feb 8, 2021 Offshore equipment and facilities are some of the most capital intensive and strategically located assets that require millions to billions of dollars to setup. Thus, it is important to put in place a stout security and surveillance system to ultimately protect these assets from vandalisation and theft. Monitoring of intruders/ unfamiliar objects within and outside the offshore platform requires a round-the-clock observation through provided security personnel who are stationed so as to quickly respond to any threat within a safe distance in the event of any physical intrusion but this measure is fraught with some challenges. Some of these challenges include fatigue, error in human judgement, and the limited vision of humans to mention but a few. To remedy these weaknesses and ensure a robust protection, the design and implementation/ setting up of a surveillance system to detect and track real time security concerns with a much wider and effective coverage area to enable the control unit make a well informed decision appropriately is an imperative. The system presented in this paper is designed to operate in harsh (sea waves, and fog) and unprotected (extreme heat, cold precipitation) environment.


INTRODUCTION
Since offshore equipment and facilities are about the most capital intensive and strategically located assets that require a colossal amount of capital ranging from millions to billions of dollars to setup, it is absolutely necessary to put in place a robust security and surveillance system to ultimately protect these capital intensive investment. This is not only due to their vital economic importance to our country, Nigeria, but also due to their high rate of vulnerability to both internal and external threat which could result to a potential nightmare to lives and property on board the various offshore platforms. Over the years, many technologies have evolved in the area of security and surveillance. Video surveillance, closed-circuit TV, IP Camera system, Digital or Network Video recorder (DVR/NVR) among other systems have become so ubiquitous and have become almost absolutely necessary to business organisations, homes, and industries' security and safety [1]. As of date, Video Surveillance System, (VSS) has become indispensable to virtually every sphere of human endeavour in this century.
Monitoring of unfamiliar objects within and outside the platform requires a round-the-clock observation by the provided security agents, who in the event of any physical intrusion, quickly respond within a safe distance; however, this measure is fraught with some challenges. Some of these challenges include fatigue, error in human judgement, and the limited vision of humans to mention but a few. To remedy these weaknesses and ensure a robust protection, the design and implementation/ setting up of a surveillance system to detect and track real time security concerns with a much wider and effective coverage area to enable the control unit make a well informed decision appropriately is an imperative [2,3]. The designed system which addresses the issues of security and safety as presented in this paper, can be implemented on industrial facility, oil and gas platform, as well as residential building and environs.
A security system based on the internet-of-things in which an IOT device, Raspberry Pi was used is presented in [4].The surveillance system incorporates a camera that serves as the sensor of the system. The camera detects motion and automatically captures a video of the region where the motion is detected. The proposed design only focuses on detecting motion and relies on the interpretation of the captured video for appropriate action(s) to be taken. An error in human judgement might lead to false alarm among other shortfalls and defeat the aim of setting up the system. The authors in [5] developed a home security system using internet -of -things with online data server based on FAVORIOT platform. Their design incorporates among other things, a microcontroller equipped with internet module, both Passive infrared (PIR), and infrared sensors which detect the intruders/unauthorized entry. The data received are sent to the microcontroller for transmission to the end user. The sensors used in this work can be tricked by a smart criminal and the data sent compromised.
A proposed design which is an improvement on the traditional home security system, CCTV was implemented in [6] using Raspberry Pi 3, Arduino, webcam, and a PIR sensor. In this proposed system, the PIR detects movements and activates the webcam to capture; and upon successful capturing, triggers an alarm to warn the end user. Issues of safety from possible gas attack and imminent fire outbreak were not contemplated. The authors in [7] built their system around a microcontroller, the Arduini uno, to interconnect the various components, a magnetic Reed sensor to monitor the status, a buzzer for blaring the alarm, and a WiFi module, ESP8266, to interface and communicate utilizing the Internet. Again, the vulnerability of the internet to hackers and the possibility to tamper with the data being sent are of major concern in this system. A modern home security system that is capable of noticing an intruder, whether the intruder's face is slightly or totally concealed with materials of fabric, leather, fibre or plastic is proposed in [8]. The proposed system is also able to detect invaders/burglars utilizing CCTV camera not having night vision features. The issue of error in human judgement in interpreting the captured video, and the possible delay before appropriate action(s) is taken is a concern here. The works, [4][5][6][7][8], rely only on the detection of movement and eventual video capture to secure the home and facilities where such security system is deployed. Factors that may jeopardize human life and property were not contemplated. Our work in addition to the detection of movement/intrusion either by humans or animals through its motion sensor is also able to sense gas leakages which may be coming from a cracked or damaged pipe or from a possible gas attack through the incorporated gas sensor, and detects high temperature which may lead to fire outbreak on oil platforms using the temperature sensor and alerts personnel in real time; thus guaranteeing safety. Since many of the existing systems rely on camera to detect intrusion and identify the intruders, real time alert to personnel to take immediate action(s) against intruders and possible attackers will not be possible. The intruders may only be identified after the theft or attack had been committed.
The power supply used in this work is designed to obtain a stabilized +12v and +5v dc power to the main circuit. The ICs used are low power ICs, each of which can take a dc voltage ranging from 3v to 6v (for the ICs requiring 5v) and 3v to 15v (for the ICs requiring 12v) for proper operation. 220/240Vac, 2000mA with a turn's ratio of 16: 1 was used for its complexity of the circuit which would require substantial amount of power to operate properly. A 50V, 3300µF in the design was used to maximize dc voltage obtain from rectified output which should be at least twice less than the voltage needed by the filtering capacitor. In order to obtain the regulated +12v and +5v, voltage regulators of 7812 and 7805 were used in the design. However, 7815 was used to turn on the relay. At the heart of the smart pipeline security system, is a controller unit acting as a Processor. The controller unit is designed to power actuators like LEDs, LCD-display, Buzzer, and LCD screen. The design consists of the following sensors: Motion, Gas and Temperature sensors.

LITERATURE REVIEW
Security which is generally the state of being free from danger or threat can in another sense be said to be the safety of a State, Organization or Industry against criminal activities such as terrorism, theft, piracy, espionage, or vandalization of pipe lines both in offshore and onshore. A major measure that has over the years been adopted to ensure proper security of offshore equipment and facilities is surveillance. Surveillance is simply the monitoring of behaviour, activities, or other changing information for the purpose of influencing, managing, directing, or protecting people. This can include observation from a distance by means of electronic equipment such as closed-circuit television (CCTV) cameras or interception of electronically transmitted information such as Passive Infrared detector or phone calls. Over the years, many security systems have been developed and deployed to ensure adequate security of equipment and facilities both in residences and industries, but a number of concerns have cropped up regarding the effectiveness, stability and the security of these security systems.
A number of worries regarding Video Surveillance System are connected to privacy concerns for palpable reasons. The consequences of the privacy of VSS are crucial considering the disclosures circulating around universal surveillance programme [9], and the unethical behaviours emanating from video surveillance especially [10]. Outside these worries, a Video Surveillance System that is vulnerable or tampered with could give rise to a plethora of other concerns that are not associated with privacy. For instance, a breach of the VSS was sported to have put the security of a correctional facility in jeopardy [11], exposed organisations that deal in currency like banks, and clubs [12] to the danger of robbery, or interrupt the operations of Cops and law-enforcement [13]. In [14], the passkey used in the work is different for each individual at home, which improves the odds for hacking the keypad. Moreover, these passkeys are chosen by users who are vulnerable to social engineering and other hacks.
In a number of the proposed systems assumptions of possible sophisticated attackers were not made; thereby making such systems to be no match for sophisticated attackers. The systems also do not consider any other entry points into the home apart from the front door, thus, a home secured with such systems is still very vulnerable to unauthorised entrants who can gain entry through other openings other than the front door. The LED and IR sensors used by [15] to identify intrusions could easily be spoofed by a sophisticated attacker. In [16], the authors pointed out the increase in security of the home because of remote access. The user can be made aware of an intrusion as soon as it happens, so that he can view the home through various cameras installed at different parts of the home. The paper completely ignores the plethora of security vulnerabilities that exist in the devices used to connect and automate a home. Moreover, the chance of an attacker exploiting these vulnerabilities is increased significantly when the home is connected to the Internet. In addition, the cameras used in this work have security issues, which are discussed as follows: The works of [17][18][19] implement cameras at home. Streaming live video feeds over the Internet is never a good idea, especially when it is from inside the home. If these implemented cameras are compromised, then the attacker will have an eye inside the home. A BBC report by [20] highlighted the vulnerabilities in wireless cameras. Moreover, people do not like to be watched; it affects their normal behaviour and makes them uncomfortable. The infrared sensor-based intrusion detection system specified by [18] can be spoofed by a skilled intruder, so its ability to identify intruders can be queried. In [19], the authors provided users access to the home using a web browser. This opens the home to a different set of browsing-related security issues like session hijacking, cookie stealing, and cross-site scripting. The work done by [17] can only provide limited security, as they only used cameras and no other security mechanisms in their system.

MATERIALS AND METHOD
This section describes the selection of the different components, the approximate calculations and design specifications of the work. The Integrated Pipeline security system with optimised scheduling is an integration of automation system and security. The design analysis begins with a detail engineering design of the power pack, transceiver, amplifier units and the various sensors that make up the system. The block diagram of the design is as shown in Figure 1.

Power supply unit
The aim of this unit is to obtain a stabilized +12v and +5v dc power supply to the main circuit. The ICs used are low power ICs, each of which can take a dc voltage ranging from 3v to 6v (for the ICs requiring 5v) and 3v to 15v (for the ICs requiring 12v) for proper operation.

The transformer
The ratings of the transformer used in this work is as follows. The calculation below shows how a perfectly regulated voltage of +12v and +5v dc were obtained. The transformer, T1 is a step-down transformer of 220/240Vac to 15Vac. This a.c voltage is rectified to d.c by the bridge rectifier D1-D4, while capacitors C1 and C2 serve as filter capacitors as shown in Figure 2.

Rectifying diode
The

Capacitor specification C1
= 3300 x 10 -6 f, 50V, C2 = 0.1uf +5%, A 50V, 3300µF was used in the design, owing to the fact that maximum dc voltage obtain from rectified output should be at least twice less than the voltage needed by the filtering capacitor. C2 is an optional capacitor but put in place to remove any residual a.c ripples from the supply and the chosen value is, 0.1 µF.

Voltage regulator
To obtain the regulated +12V and +5V, positive voltage regulators 7812 and 7805 were used in the design. However, 7815 was used to turn on the relay as shown in Figure 2.

Transistor/relay switching and operation
Whenever the designed system is powered on, voltage flows from the mains supply into it. The rectified voltage in the secondary winding is regulated to 15Vac by the 15V fixed voltage regulator. This regulated voltage is fed through the base of the transistor to turn 'ON' the relay. The relay is introduced into the power pack basically to interface between battery and mains supply such that if mains supply fails, the battery powers the system until power is restored.

Microcontroller unit
The PIC18F2520 is an Enhanced Flash microcontroller with 10-bit A/D and nanowatt technology. The PIC18F2520 family introduces design enhancement that make these microcontrollers a logical choice for many high-performance and power sensitive applications. The PIC18F2520 device includes an internal oscillator block which generates two different clock signals; either can be used as the microcontroller's clock source. The PIC18F2520 is the microcontroller used in this work. Its pin configuration is shown in Figure 3  and a transistor is directly coupled to it, which is meant to switch a buzzer alarm, thereby creating an audio alert notification of the presence of abnormal situation. Pin 15 is used as an output pin as well, coupled to it is an actuator of type LED. The LED is called system state monitor. This LED blinks every 10 seconds indicating that the smart pipe monitoring system is active. Pin 17 is also used as an output pin. An active HIGH LED is attached to it. The LED is ON when the gas level is normal but goes off as soon smoke is detected. It is through those pins that data enters the microcontroller. In order to allow for internal program execution without resetting itself frequently, MCLR pin is connected to Vcc (+5v) through a pull up resistor of value 10kn. If the device is to be allowed to fetch code from external program memory locations starting at 0000H up to FFFFH, the power pins of the controller must be connected to VCC (pin 20) and ground GND(pin 8 and 19) respectively.
Pin 10 (CLK2) is an output from the inverting oscillator amplifier which is connected through a 22pf capacitor to ground as recommended. Pin 9 (CLK1) is an input to the inverting oscillator amplifier which is connected through a 22pf capacitor to ground as recommend. The connection of pin 9 and 10 helps to determine the frequency of operation of the microcontrollers. Port 1 (Pin 9) is used as reset switching To determine reset time One machine cycle is the time taken to execute an instruction Machine cycle = 12 pulses of crystal oscillator.

12
(1) For one machine cycle Recall that it takes two machine cycles to reset. Hence, time to execute reset instruction. = 2 x time of one machine cycle = 2 x 1.333s = 2.666s Reset time = 2.666µs

Software design/Implementation
The software consists of the program or set of instructions upon which microcontroller runs; thus the software program determines the operation of the system in general. The first step in the development of the program code was generating of the program algorithm. Thereafter an effective source code was developed and transferred to the microcontroller to enable it receive analogue input from the sensor, process the received input signal and send output to the actuators which display the system's status on the LEDs and 'Turn' Buzzers accordingly. Embedded "C++" programming language was used in this work. The written codes enable communication between the microcontroller, sensors, LEDs and Buzzers. Figure 4 is the program flowchart used for this work. From the diagram above, the security and surveillance system, the various units and their functions are explained thus: − Proximity Sensor: A proximity sensor is a sensor that is able to detect the presence of nearby objects without any physical contact. A proximity sensor often emits an electromagnetic field or a beam of electromagnetic radiation (infrared, for instance), and looks for changes in the field or return signal. The object being sensed is often referred to as the proximity sensor's target − Gas Sensor: The gas sensor senses gas or smoke, typically as an indicator of pipeline leakage or fire. − Temperature Sensor: The temperature sensor detects and measures hotness and coldness and converts it into an electrical signal. − Processor: The processor receives multiple queries from the various sensors, processes these data and sends them to the control unit for further action. − Control Unit: Based on the processed data the control unit makes the final decision which becomes evident in the output line. − Schedule Unit: The schedule unit is responsible for scheduling of processes in such a way that each sensor's value gets read and the read data get sent and displayed accordingly. As such all three sensors work together without conflict, while the processor processes all the al the data from all sensor as though it is processing data from a single sensor. − Output: The output unit receives instructions from the control unit to drive the output devices -the actuators like buzzer, LCDs and LEDs intended to be driven. − Display Unit: This unit is responsible for displaying relevant actions and keeping track of records. Figure 5 is showing when the integrated pipeline security system is powered on, an initialization process is established. This process makes a welcome remark and designation and displays same on the LCD screen. After this, it immediately creates a secure connection with the sensors attached to the processor. If the communication/connection is successful, there is a handshake between the processor and all the peripheral devices connected; this handshake is also broadcast through the buzzer and LCD screen. Due to the fact that each of the attached sensor has a transient starting time, which present itself as start-up noise, the processor unit create a 60 seconds stabilizing window for all the sensors. During this stabilization window, the control unit is oblivious of any signal received. After the stabilization window, the system enters into an active state, at which point the integrated pipeline security responds to any increase in temperature beyond the preset threshold of 40 o C, intruder alert, and presence of gas/smoke above the reference value. There is a white blinker LED that blinks every ten seconds indicating that the system and together with the components as designed is perfect and in normal working condition. A green light indicates acceptable gas level in the environment the system monitors, while red LED indicates the presence of gas/smoke above the preset threshold value.

TEST AND RESULT
The system consists of a software portion and a hardware portion. The software portion was first realized using mikroC PRO for PIC™ to develop the code for the project in embedded "C++" programming language. The circuit was then designed in Proteus 8 Professional™ and the software was loaded into the circuit, then extensive simulation and testing were carried out to ensure the system performs without errors and at maximum efficiency. After simulating the system and modifying it as necessary, construction of the hardware portion commenced. The overall circuit was broken into units and each unit was first tested on a breadboard before they were transferred to a Vero board and electrically linked by soldering after this, several tests were carried out on the device to confirm the level of its performance and efficiency. Thereafter, it was confirmed that the system was functioning well and in line with overall design aim and objectives as shown in Figure 6 and

CONCLUSION
The design and implementation of an integrated pipeline security system with optimized scheduling, a security and surveillance system in oil production platform to be deployed to secure and survey oil platform, has been actualized. It can also be deployed to secure homes, business places, and schools. Unlike other designs which are restricted only to the detection of intruders, our design in addition to detecting intrusion also addresses the safety of the people and property within the facility where it is deployed. It ensures safety from incidences of inferno resulting from excessive temperature, gas leaks or outright gas attack by notifying personnel appropriately utilizing the temperature sensor, and the gas sensor respectively. The various sensors-Motion, Gas and Temperature sensors work together to make the device an effective one. The sensors are active LOW sensors, meaning that when not triggered, they output a HIGH signal on their signal line but when triggered i.e when variables of interest within the environment of operation are detected, they send a LOW signal and the control unit reacts appropriately. The device is automated, thus can function without human intervention.