Development of FSM corrosion monitoring system based on Cloud Server

FSM (field signature method) is a new non plug-in on-line monitoring method for pipeline corrosion. The traditional FSM corrosion monitoring equipment is generally a single machine to copy data or collect terminal client wireless transmission data, which is not convenient for data management. In this paper, cloud service is introduced into the monitoring system, and the FSM corrosion monitoring system based on cloud server is developed, which realizes the functions of real-time, online and remote control. The monitoring system can obtain the current status data of the monitored pipeline in real time, and calculate the corrosion parameters of the pipeline according to the data sent back by the measuring device. The system can draw trend diagram and morphology diagram according to the calculated corrosion parameters, display database data tables and relevant charts, and send monitoring information regularly.


Introduction
Oil and gas transmission pipeline is the main artery of national energy transmission, and its smooth and efficient operation is related to national energy security and public security [1]. With the increase of service time, there are more accidents caused by pipeline corrosion. Breaking through the key technologies and bottlenecks of corrosion monitoring and detection is an important basis for safe operation .
FSM (field signature method) field fingerprint method is a new non plug-in pipeline corrosion on-line monitoring method [2], which can realize the full circumferential in-service pipeline monitoring of the pipeline and record the metal loss, corrosion rate, pitting corrosion, uniform corrosion and other conditions of the pipeline. The world's leading supplier of pipeline inspection and monitoring equipment -corosion has commercial FSM based monitoring equipment, but its products fsm-it or fsm-log do not realize cloud transmission function. Domestic universities such as Sichuan University and China University of Petroleum (East China) [3][4] are also conducting research on FSM, and have made some important achievements in theory. There is no FSM product based on cloud server.
The medium and long term oil and gas pipeline network plan ([2017] No. 965) issued by China's national development and Reform Commission clearly puts forward: strengthening the integration of advanced technologies such as Internet plus, big data and cloud computing with oil and gas pipelines. It can be predicted that pipeline corrosion monitoring will develop towards real-time, online and remote control [5]. In this project, the FSM corrosion monitoring system is designed in an all-round way, and a cloud server is built to realize the functions of real-time, online and remote control.

FSM corrosion monitoring principle
A constant excitation current is applied to the pipeline monitoring area. When the pipeline wall thickness is corroded, the corresponding resistance at the electrode will change. The corrosion status of the pipeline can be obtained through the voltage acquisition and analysis of the electrode matrix [6][7]. The schematic diagram is shown in Figure 1.
Where: ( 0 ) ( ) are the voltages of the electrode pair at 0 and , and ( 0 ) and ( )are the voltages of the reference electrode pair at 0 and .It can be seen from the above that the FC value is 0 during the initial measurement; if the pipeline is corroded at the time of tx measurement, the resistance and voltage at the electrode will increase, and the corresponding FC value will change.

System architecture and technology selection
The system architecture adopts the common cloud platform architecture in the industry, which is mainly composed of terminal acquisition system, cloud server and client. Compare and analyze the cloud service mode, wireless transmission mode, C / S and B / S mode, and select the best scheme suitable for the project.
(1) Choice of cloud services At present, cloud services can be divided into three categories: public cloud, private cloud and hybrid cloud. These three modes constitute the basis for the construction and consumption of cloud infrastructure. Private cloud is an extension and optimization of the traditional data center of enterprises, which can provide storage capacity and processing capacity for various functions. The private cloud is built for the sole use of a customer, so these data, security and quality of service are better guaranteed than the public cloud. Considering the later expansion and maintenance, the project will build a private cloud to realize data sending and receiving.
(2) Selection of wireless transmission mode Wireless data transmission refers to the wireless communication technology that uses wireless data transmission terminals to remotely transmit the data output by industrial field equipment or various physical quantities.. At present, GPRS and 4G network are the most common in the remote transmission of industrial data. 4G network has the following advantages: 1 )The communication speed is fast, and the transmission rate of the communication system can reach 20MBps; 2 )Network spectrum width; 3) Flexible communication, two-way download and delivery. To sum up, the project selects industrial 4G DTU, which provides RS485 / RS232 interfaces, supports TCP / UDP transparent transmission and HTTP two-way communication, and fully meets the communication between the front-end acquisition equipment and the cloud server in the project. (3) C / S and B / S modes C / S mode (i.e. client / server mode) is divided into two layers: client and server. The first layer combines presentation and business logic on the client system, and the second layer combines database server through the network. Typical product representatives are QQ. C /S has the following advantages: strong interaction; More secure access mode; Reduce network traffic; The completion speed is faster than B /S. Considering the realization of some functions in this project, such as debugging the hardware acquisition system with the client, the C / S mode is finally selected.

Implementation of key modules
The FSM corrosion monitoring terminal is connected to the ECS through the 4G network module in the form of socket. I will not introduce the terminal here. It mainly introduces cloud server and client.

establishment of ECS
The ECS runs the Linux operating system (Ubuntu 16.04) and sets the fixed intranet IP address; The DMZ host forwards all traffic from the public IP address assigned to all routers to the intranet server. In this way, as long as you access the public IP address obtained on the router, you can directly access the intranet server; Set the DNS service on the router, register the private domain name with the domain name registration service provider, and use the CNAME resolution record in the domain name resolution management to convert. Using this domain name, you can access the internal server.
ECS mainly realizes data storage, data analysis, data exchange and other functions, and communicates with clients. Workflow:1) Create socket;2) Bind the socket to a local address and port;3) Set the socket to listening mode and prepare to receive customer requests;4) Waiting for the customer's request; When the request arrives, it receives the connection request, returns a new socket corresponding to the connection, and starts the thread to serve the current connection;5) Return a request with another customer6) Close the socket.

Implementation and function of client
Communication process between client and server: 1) Create socket;2) The item server sends a connection request;3) Communicate with the server section;4) Close the socket.
The client interface is shown in the figure 3:

Fig. 3 FSM client interface
The client realizes the following functions: 1) Import the data of FSM equipment, or obtain the FSM detection data remotely from the server for analysis; 2) The original FSM data and PC value calculated based on the original data are displayed in the form of two-dimensional curve to visually display the historical trend of all channels, so as to understand the corrosion condition of the inner wall of the pipeline in the area where the channel is located: 3) The inner wall area of the pipeline detected by all channels can be expanded in a plane form, and the pipeline health status and historical evolution law can be displayed statically or dynamically with three-dimensional FC value graphics

Engineering application
Two sets of FSM corrosion monitoring systems are installed on the penstock of a company. Taking zjk01 equipment as an example, the corrosion monitoring area is 8 × 8 array. The data obtained by the client is shown in Figure 4. The software can obtain the data of monitoring pipeline temperature, electric box temperature, excitation voltage, excitation current and each channel. At present, the data sampling is stable, the network download data is convenient and fast, and there is no loss of data. Taking the electrode pair M11 as an example, it can be seen from the channel trend that the absolute value of the sampling voltage will change with the change of temperature, but the FC value remains stable and fluctuates slightly near the 0 value. According to the formula, the pipeline is free of corrosion at present.
The long-term monitoring results show that the system can stably collect the monitoring data of multiple pipelines at the same time, display the data of each channel directly, and visually reflect the pipeline corrosion status in the monitoring area with the change trend of FC value.

Conclusions
FSM corrosion monitoring system is developed based on cloud server, which realizes the functions of real-time, online and remote control.
The FSM terminal acquisition system connects with the cloud server through the 4G network module by socket socket, and uploads the collected data to the cloud server in real time. The user and testing organization can easily and quickly obtain the cloud server data through the client, and timely grasp the pipeline operation and corrosion conditions The monitoring system designed and developed can obtain the current state data of the monitored pipeline in real time, and calculate the corrosion parameters of the pipeline according to the data sent back by the measuring device. The system can draw trend diagram and morphology diagram according to the calculated corrosion parameters, display database data tables and relevant charts, and send monitoring information regularly.