{'fraction_non_alphanumeric': 0.024114449928156433, 'fraction_numerical': 0.006996938839257825, 'mean_word_length': 5.15929203539823, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Design of Intelligent Routing Inspection Underwater Robot Facing Marine Oil and Gas Pipelines

Submarine pipelines always work in the condition of complex marine environments. They are easily to be damaged, fractured and broken during a long time. We designed and intelligent equipment, which is a Remote operated vehicle(ROV). It is equipped with special underwater bow propellers and vertical thrusters. This robot is combined with optical, acoustic, electric and magnetic sensors, and also equipped with multi-angle automatic rotary High density(HD) camera, so as to ensure the reliable real-time data acquisition. Underwater communication is accomplished by long distance cable cord to achieve local Local area networks(LAN),and this underwater robot completes the tasks of data interaction, real-time data transmission through the Personal computer(PC) monitoring collection under the water. Images can be sent back to the remote client storage for graphical display. It is supposed to make real-time detection of the damages and leakages outside the pipelines, and help to take effective measures to prolong the service life of pipeline, reduce the production cost of oil and gas.1


INTRODUCTION
In the process of using marine oil and gas pipeline, the pipe of crude oil and corrosive salt outside the tube, and seabed hydrological and biological attachment, foundation instability and wave striking natural conditions, will lead to pipe wall corrosion of oil and wall crack . When these defects reach a certain extent, the pipe wall will break, leading to the leakage of crude oil. It would not only waste a lot of energy, but crude oil spills also bring great disaster to the surrounding ecological environment. Consequently submarine pipeline maintenance is very important, however there is no effective means to detect submarine pipeline at present [1]. Because the absence of detailed damage to the pipeline, the blind excavation will inevitably lead to a huge waste of human and material resources.
Therefore we need to develop a set of oil and gas pipeline intelligent underwater detection equipment based on which China's national hydrological condition, effectively detecting the submarine pipeline, assessing the damage, preventing leakage accidents; It also guarantee the normal operation of subsea oil and gas pipeline system, which has important safety and economic significance.

EQUIPMENT SELECTION AND DESIGN SCHEME
The inspection equipment developed by this subject belongs to a cable observation underwater robot. It is flexible, and it prolongs the service life, combines many functions and high-precision detection target. The inspection robot consists of three parts, the underwater pipeline inspection subsystem, the data communication subsystem, and the human-computer interaction interface. The schematic diagram of the inspection system is shown in figure 1.
Underwater robot in figure 1 cable provides a wired communication link through the umbilical. It not only can effectively realize data communication, but also can solve equipment adverse effects of accident that it cannot turn back when the machine out of control or interrupt communication. The length of the cable can be adjusted according to the depth of the underwater pipeline, so as to meet the need of long and short change of the cable at any time, and the operator only needs to carry out underwater operation on the moving vessel. The water navigation is mainly driven by brushless motor, and CNC (Computer Numerical Control) and four leaf propeller. [2] The whole system of humancomputer interaction realize the underwater control by adopting the LabVIEW. The upper machine control the device to snorkeling and bow steering movement through sending command to the main control equipment to drive the propeller. Certainly, it can also be in accordance with the route path planning of autonomous navigation to realize the true meaning of the unmanned under water. The picture taken by the underwater navigation and real-time data acquisition, the parallel processing and analysis through the man-machine interface for feedback on ships operating personnel microcontrollers, through the observation of the sea in service pipeline, to see whether it has corrosion and deformation and leakage.

THE REALIZATION OF PATROL SYSTEM
The PC part of the sea submarine pipeline detection with a good interactive interface, which includes submarine pipeline inspection robot and umbilical cable and a variety of sensors, including pipeline inspection robot equipped with the above laser sensor, attitude sensor, depth sensor and underwater camera, LED highlight and propeller. The upper computer of the sea part mainly realizes the system control, detection data and image display, processing and storage. And through the umbilical cord cable, we can achieve the instruction, the state of sending and receiving, and data and image transmission. ROV (Remote Operated Vehicle) below sea surface can detect submarine pipeline, and realize the common operation of floating, diving, water azimuth angle, realize underwater real-time picture display.
At present, the three popular open source hardware platforms, Arduino Uno [3], Beagle Bone Black (BBB) [4] and Raspberry pi [5], have their own characteristics, especially BBB which has good compatibility. The BBB used in this project is the main control panel of the whole machine, and it has good scalability. These products are very successful through the integration of hardware and software, such as smart bracelet and wearable devices which can be developed, through hardware innovation and software integration, synchronization with the user's mobile phone, to achieve the combination of software and hardware. Many large companies choose the hardware closed source, resulting in technical barriers and patent rights. And open source hardware allows entrepreneurs to transform ideas into real [6] more easily.  The device uses Arduino uno as the expansion board, and Arduino Mega 2560 is based on the ATmega2560 [7] MCU development board. The development board has 54 digital input / output pins, which can be used as 15 PWM (Pulse Width Modulation) output control, 16 analog input, 4 UART hardware serial port. The device driver programming of hardware is based on Arduino IDE, it can run in Windows Macintosh, OSX, and Linux three mainstream operating system on. This device implements a variety of functions, including camera drive, motor drive, LED light driver, and attitude sensor and depth sensor drive and other sensor drivers. The important parts and key technologies that used in this equipment are introduced below. The overall block diagram of the software and hardware is shown in figures 2 and 3.
(1) depth sensor Through the preliminary investigation, the depth sensor currently haven't high specifications on the market, even if such a sensor, is expensive enough to build multiple sets of marine oil and gas pipeline system, so our team, through the remold high voltage resistant MD-PS002-700KPapressure sensor [8,9,10] developed a depth sensor, which can measure the theoretical depth of 90 meters and cost less than a dollar. The basic idea is that two differential mode amplification of analog sampling signal, because the larger the common mode voltage of the sensor output, and effective signal from the differential signal, differential mode signal through the amplifying circuit after about 100 times higher than that of common letter has been effectively restrained, after analog digital conversion (A/D Analogy, to Digital) get different digital voltage values corresponding to the equation p gh   which 5 3 2 / 1.013 10 / 1.0 10 9.8 / 10.34 .Under a standard atmospheric pressure is 100KPa, means 10.34 meters high water column, 700KPa pressure sensor can approximately detect 90 meters of sea water depth, which basically conforms to the design requirements of offshore pipeline inspection. At the end of the module by UART (Universal Asynchronous Receiver/ Transmitter) serial communication with the Arduino expansion board achieve information interaction, resulting in ROV dive records to the ROM (Read-Only Memory), back to the PC.
(2) attitude sensor The attitude sensor is based on the MEMS (Micro-Electro-Mechanical System) 3D high performance motion attitude measurement system, which includes three axis, three axis accelerometer and three axis magnetic field of nine axis motion sensor, and use the high performance microprocessors and advanced dynamic algorithm and Kalman filter. It can fast calculate real-time motion posture of the current module accurately in dynamic environment, attitude measurement accuracy of 0.01 degrees, high stability. Moreover, the performance is even better than the professional inclinator.
This equipment adopts unique digital filtering technology, which can effectively reduce measurement noise and improve measurement accuracy. Through the embedded low-power microprocessor, the temperature compensated threedimensional pose and azimuth data are obtained. Using the three-dimensional algorithm based on four variables and special data fusion technology, the zero drift 3D attitude and orientation data represented by four variables and Euler angles are output in real time.
Because of the complexity of underwater environment, the underwater robot can operate in high precision and reliability in water, which relies on the control algorithm of PID [11,12,13]. However, the traditional simple PID control not only has a lot of interference from outside uncertain factors, but also exists errors in the system. These noises lead to poor observation accuracy, long response time and low stability. Therefore, the device uses the high-speed digital processing chip, combined with Kalman filter method and the traditional PID algorithm to control the stability of the underwater robot, by constantly updating and correcting the covariance, so as to continuously acquire system measurements, and keep the covariance recursive to estimate the optimal estimated value.
Firstly, the discrete control model of the controlled object is found, and the integral transfer function is transformed into a continuous s domain model: The mapping relation between s domain and Z domain can be obtained by using backward difference method: So you can get it Then the three parameters of KP, KI and KD can be adjusted separately, and then the model can be build. The simulation reveals that the PID controller is very sensitive to noise and it existed a steady-state error. So we thought the idea about combining Kalman filter and PID control to suppress the noise. Actually, it can be adjusted first P and then D, by increasing the differential which can improve the anti-noise performance and by decreasing the integral which can reduce the noise accumulation. 5 classical formulas of Kalman filter are introduced, and the Kalman filtering is carried out.
' k x signify multi-dimensional state vector consisting of a set of state variables, 1 k   as the excitation signal; A and B as the matrix determined by the system. When the system is dynamic and time-varying noise, we introduce formula (9) respectively in the state prediction equation, the mean square error equation, filter gain equation, filter estimate equation and mean square estimation error updating matrix equation realize Kalman filter, which filter out the system exists noise of the process and measurement in order to estimate value, and combining with the traditional PID control, the control effect was improved .     Figure 4 is based on Kalman filter algorithm and classical PID control, and then we obtains a PID control algorithm based on Kalman filter. The assumption here is that the control of interference signal W (k) and the signal V (k) are white noise signal, the simulation time is 0.6s, the input signal is a step signal, which achieve the signal filtered by Kalman filter, KP=90, KI=0.10, KD=0.90 , PID control the step response as shown in Figure 5.From Figure 5we can see the increase of Kalman [14,15,16] filter with real-time tracking is realized by measuring the signal analysis. Compared with LMS (Least Mean Square) and FIR (Finite Impulse Response filter) filter has small error and good real-time effects, smooth filter etc [17].
The equipment provides a wired communication link through the umbilical cable, in other words, the computer connect to underwater robots through the local area network [18].The two sides working in the same IP (Internet Protocol)can shake hands with each other. Drive the control action of the slave computer through the host computer, then it can realize the long distance communication. It can not only realize the data communication effectively, but also can solve the adverse effects of the equipment unexpected accident that the machine cannot be controlled or the interruption of the communication, manually dragging back the equipment.

PC SOFTWARE DESIGN
Through using the NI's LabVIEW development environment, we designed upper machine support human-computer interaction interface. The main functions of data acquisition, channel control and information storage are displayed. A plurality of data acquisition channels are set up to receive data sent by the lower computer , to save data into the spreadsheet which is convenient to query historical data. We can set the critical value of multiple parameters. When the data acquisition exceeds the critical value, the alarm indicator is always bright to prompt the user, through the Lab VIEW tool Web release monitoring interface, through set up port server, we can realize the wireless sensor network and the Internet data fusion. The machine realize remote monitoring through the formulation of network address. The whole host computer software includes parameter setting, data real-time display, alarm prompt, and other environmental parameters written into the form.
On the one hand, through the host computer PC to flexibly control the operation of underwater robots, environment parameters and image real-time transmission return. On the other hand, the use of LabVIEW spreadsheet functions for data storage read and write, a large number of data stored in the remote database cloud end and Web server, we are able to achieve cloud computing analysis and big data fusion in the future, the system also supports the query of the historical data, through the built-in web release tool which can be run on the local VI upload to the server, the client through web browser interact with front panel on the server VI. There are three ways of interaction: embedded, snapshot, display, embedded can control remote data, snapshots are static images, the display can be dynamically displayed, in order to achieve the purpose of remote inspection.

CONCLUSIONS
The development of a complete set of underwater robot is based on the related hardware and software knowledge independent design. The inspection is equipped with a variety of functions of the sensor acquisition equipment used in offshore oil and gas external pipelines. The control of underwater robot using PID algorithm based on Kalman filter theory and Realization of simulation, and on the whole the framework of system hardware and software design detail. The system test results show that the prototype design of this work has basically completed the task of offshore oil and gas pipeline detection, and achieved remote monitoring of these parameters.
The underwater robot is designed to improve the offshore oil and gas production efficiency and yield, reduce economic losses, the timely discovery and leakage of the pipeline damage, prolong the service life, thereby reducing the production cost of oil and natural gas, to avoid leakage of oil and gas, reduce the pollution of the environment, fully enhance the core competitiveness of marine industry, the protection of the marine ecological environment blue, improve the sustainable development of economy.