# UAV Based on Communication Network to Obtain Oil Pipeline Data and 3D Modeling

Authors: Minggao Zheng; Qihua Liu
Journal: Mobile Information Systems
 (2022)

---

## Abstract

With the advancement of science and technology and the development of industry, the demand for oil is increasing, and the measurement of oil is becoming more and more reliable and accurate. The communication network refers to the physical connection of various isolated devices to realize the link of information exchange between people, people and computers, and computers and computers, so as to achieve the purpose of resource sharing and communication. Oil and natural gas pipelines are an important strategic resource and the economic lifeline of a country. China’s long-distance oil and natural gas pipelines have developed rapidly in recent years, and the Beijing-Shijiazhuang Pipeline, the “West-East Gas Pipeline,” and the western crude oil and refined oil pipeline projects have been completed. The UAV can produce geometric data with high precision and build its 3D model. Therefore, this study proposed a UAV based on the communication network to obtain oil pipeline data and 3D modeling. The study mainly talked about the energy consumption in the era of communication. The energy acquisition was analyzed, the pipeline transportation measures for petroleum energy under UAV technology were focused on, the three-dimensional modeling of its terrain capture was carried out, and then the experimental data were analyzed after the equipment was debugged in the experimental part. The final experimental results showed that, under different frequencies, the data collected by the host computer were compared with the field measurement data, and the errors of the water and oil phases were calculated. It can be clearly seen from the data that the error was less than 5%, which also proved that this method was feasible.


---

## Body

## 1. Introduction

Due to the signing of the Sino-Russian oil transportation agreement, the Sino-Russian crude oil pipeline in the Central Siberia-Pacific region is also stepping up. In the construction stage of China’s rapid economic development, ensuring the safe operation of long-distance oil and natural gas pipelines plays an important role in the national economy and strategy. Due to the increase in oil production and stricter production requirements, the previous measurement methods could not meet the needs of the current industrial production. Many oil production sites still require workers to read real-time data at the production site. The methods of measurement are relatively advanced.UAV flight can obtain high-precision image data, so as to achieve high-precision DEM, architectural geometric data, and high-precision digital orthoimage DOM. It is a solid ground model that represents ground elevation in the form of a set of ordered numerical arrays and is a branch of the Digital Terrain Model (DTM for short), from which various other terrain feature values can be derived. The drone can get the whole picture of the building, and the structure is simple. This method overcame the problem that only multiple images can be acquired in the case of dense buildings and trees occluded. Through the direct extraction of UAV flight data, the workload of field operations can be effectively reduced. Therefore, it is a very practical and feasible method to use the data collected by UAV for 3D modeling. The intelligent metering system can effectively reduce the demand for labor, and the measurement accuracy of the system is more accurate than that of the system. Through the cooperation between the upper computer and the metering control equipment, the remote collection of data and intelligent control are completed to achieve more accurate measurement.The study focused on the energy consumption and energy collection in the information age, the application of UAVs in oil pipelines, and how to use UAVs to collect 3D models. The innovation of this article was that the study used the most advanced equipment and has been tested and debugged many times before the test to ensure the accuracy of the experimental data. Judging from the domestic numerical simulation research on the pipeline UAV working flow field, most of the research studies were based on the two-dimensional model, and the three-dimensional modeling used in this study was also more accurate.


## 2. Related Work

Previous LCA studies of transportation fuels have not adequately considered the full variability of crude oil transportation phases, for example, the transportation of light crude oil through large diameter pipelines versus the transportation of heavy crude oil through small diameter pipelines. Choquette-Levy et al. have developed a fluid mechanics-based first-principles crude oil pipeline transportation emissions model (COPTEM), which calculates pipeline transportation-related greenhouse gas (GHG) emissions based on crude oil parameters, pipeline dimensions, and external factors [1]. Butchibabu et al. designed to protect crude oil pipelines buried at shallow depths from possible environmental hazards and theft. Surface and borehole geophysical techniques, such as resistivity tomography (ERT), ground penetrating radar (GPR), surface seismic refraction tomography (SRT), cross-hole seismic tomography (CST), and cross-hole seismic profiling (CSP), are used to map vulnerable areas [2]. Li et al. used 500 historical data from the monitoring and data acquisition (SCADA) system and established a neural network-based pipeline temperature and pressure prediction model according to the temperature and pressure changes in the pipeline. The remaining life of corroded oil and gas pipelines was predicted, which provided a reference for the optimization of maintenance decisions [3]. In view of the changes of pipeline corrosion conditions, Zhang et al. introduced the inverse Gaussian stochastic process theory into the corrosion assessment of oil pipelines and established a mathematical model of inverse Gaussian state pipeline corrosion deterioration and an optimal maintenance decision model [4]. They just analyzed their pipeline data and its significance, but did not model it in 3D.There is no very effective and advanced technology in the geological research work of oilfield development. Reservoir geological research also mainly relied on manually compiled thickness maps, reservoir profiles, and connectivity maps. There is a great need for new technologies to be supplemented and improved. In the whole development stage of geological research work, the only thing that can be called new technology is 3D geological modeling. Therefore, 3D geological modeling can play a more prominent role in geological research in the development stage. In fact, 3D geological modeling should and can become the core technology for fine reservoir description and production measures deployment in the reservoir development stage. The CompuCell3D modeling environment provided a convenient platform for biofilm simulation using the (GGH) model, a cell-oriented framework designed to stimulate growth and pattern formation due to the behavior of biological cells. James et al. showed how to develop such simulations, based on the mixed (continuous discrete) model of Picioreanu, van Loosdrecht, and Heijnen (PLH), to simulate the growth of bacterial biofilms of a single species and to study cell-cell roles and cell field interactions to determine biological Membrane morphology [5]. Based on the premise that 2D modeling is assumed to be overstretched for practical purposes in various environments, Bybordiani and Arici aimed to critically evaluate the application of 2D modeling in predicting the seismic demands of these systems [6]. Terrestrial Laser Scanning (TLS) is a newly developed technology that can collect thousands of data points in minutes and has broad application prospects in tunnel deformation monitoring. The raw point cloud collected by TLS cannot show tunnel deformation. Therefore, Xie and Lu developed a new 3D modeling algorithm [7]. They all introduced the three-dimensional modeling technology of oil pipeline transportation machines, but they did not use the survey technology of unmanned aerial vehicles and wireless communication technology. Therefore, the experimental data and research results had a certain deviation from this study.


## 3. UAV Based on Communication Network to Obtain Oil Pipeline Data and 3D Modeling Algorithm

### 3.1. Energy Efficiency Based on Communication Network

Due to the rapid development of smart phones, the demand for high-speed data services is increasing day by day, and traditional mobile communication networks can no longer meet the increasing customer demands. Therefore, the development and commercialization of a new generation of mobile communication systems has become an important topic. 5G is expected to provide 1,000 times the network capacity of 4G, with features such as high bandwidth, high speed, and low latency. In order to meet the exponential growth of data traffic, the 5G network must be a multilayer heterogeneous network with multiple network architectures coexisting. With the continuous development of human society and economy, the exchange and transmission of information has become an indispensable part of people’s life as well as clothing, food, housing, and transportation. In order to achieve this purpose, the communication technology has shown an unusually prosperous scene in the past 50 years, which has also brought about the coexistence of various types of communication networks, that is, heterogeneous networks. As shown in Figure1, Macrocell undertakes the task of basic coverage, covering a wide range and serving many users. Microcell and Picocell are responsible for the coverage of hotspot areas. Compared with macro cell base stations (MBS), their corresponding base stations have lower transmit power and smaller coverage. In addition, D2D is d2d three-dimensional map. It presents the industry information of local cities through the virtual representation of three-dimensional reality. The existence of D2D and cooperative relay can also improve the coverage of cellular network blind spots and improve the user experience at the cell edge [8, 9]. Obviously, 5G using this multilayered heterogeneous network will achieve better performance in terms of increasing network capacity, increasing coverage, and improving spectral efficiency. At the same time, the unprecedented rapid development of wireless communication technology has also resulted in huge energy consumption and increasingly serious environmental problems.Figure 1
Multilayer heterogeneous grid architecture model.In the past ten years, the rapid development of information and communication technology (ICT) has further intensified energy consumption and the problem of environmental pollution has become increasingly serious. Currently, there are more than 4 million base stations around the world to provide communication services for cell users (CUs), and each base station consumes an average of 25 MWh of electricity per year. According to statistics, in 2007, the total carbon emissions from cellular communication networks were 86 million tons. It is estimated that, by 2020, the total carbon emissions from cellular communication networks will reach 235 million tons. With the continuous increase of carbon gas emissions, at the same time, due to the expansion of the network scale, the energy consumption of the cellular network further increases, which also leads to the OPEX becoming nonnegligible [10, 11]. In the total operating cost of MNO, energy cost can account for about 30%, and the energy consumption cost is higher than the revenue growth rate, which brings huge challenges to mobile network operators. Taking China as an example, it consumes about 20 billion kilowatts of electricity every year to maintain the normal operation of the communication network, costing more than one billion yuan, and with the rapid development of the communication industry, the energy cost will further increase.It is foreseeable that if the existing wireless communication technology continues to be used, along with the further expansion of the network architecture, the resulting energy consumption, environment, and pollution problems will be more serious. Therefore, how to realize green communication with low pollution and low energy consumption under the premise of ensuring the quality of service (QoS) of mobile users and the benefits of operators has become an urgent problem to be solved in the new generation of mobile communication [12].


### 3.2. Terrain Reconstruction Technology of UAV Remote-Sensing Terrain

Due to its advantages of low cost, simple operation, flexible maneuverability, and the ability to obtain high-resolution images, its application on Earth has been rapidly developed. In the past, the remote-sensing image analysis of UAVs mainly analyzed the targets such as roads and vehicles in the two-dimensional image, mainly to extract and identify the image of the target and then gradually convert it into a three-dimensional image in the two-dimensional image. This is a leap. Therefore, the study of terrain 3D reconstruction using UAV remote-sensing images has attracted the attention of many scholars. Unmanned reconnaissance aircraft are used to shoot three-dimensional images of targets and ground objects in the air and analyze their internal mutual constraints. The three-dimensional position, shape, and three-dimensional structure of objects are obtained [13, 14]. It includes the principle of image-based three-dimensional reconstruction, that is, recovering the relative movement of the camera and the three-dimensional structure of the spatial scene through different feature points at different positions. By 3D reconstruction of UAV remote-sensing images, 3D stereo reconstruction of UAV can be achieved [15].


#### 3.2.1. Video Mode

The imaging model is a geometric perspective transformation, which reflects the mapping relationship between three-dimensional objects and two-dimensional objects. This imaging mode can be simply classified as perspective projection, also known as center projection or pinhole imaging mode, which is characterized by changes in the distance of the target from the camera. Its core is that the optical center, the object point, and the image point form a straight line, as shown in Figure2.Figure 2
Coordinate system and imaging geometry.Conversion between world coordinate system and camera coordinate system [16]:(1)aobolo1=Kd0D1asbsls1,where K is the rotation matrix of the space point from the world coordinate system to the camera coordinate system, which represents the cosine of the direction of the optical axis to the coordinate axis of the world coordinate system. In practice, it only contains three independent variables. d is the three-dimensional translation vector, which is usually called the external parameter of the camera and determines the position of the camera’s optical axis in the world coordinate system.Conversion between camera coordinate system and image physical coordinate system:(2)A=gaolo,B=gbolo,where g is the main distance of the camera, and the conversion relationship between the two is expressed in homogeneous coordinates as(3)loAB1=g000g0001000aobolo1.Conversion between image physical coordinate system and image pixel coordinate system:(4)v−v0=Ata,u−u0=Btb.Then, the coordinates are expressed as(5)vu1=1ta0v001tau0001AB1.Combining the three coordinate processes, the imaging formula can be obtained:(6)ϕvu1=gv0v00guu0001000Kd0D1asbsls1.It is shown in the following formula in matrix form, which is usually called the internal matrix:(7)R=gv0v00guu0001.At the same time, the rotation matrixK and translation matrix d representing the transformation relationship between the camera coordinate system and the world coordinate system are collectively called external parameters. It can be represented in matrix form, called extrinsic matrix [17]:(8)Z=Kd=k1k2k3k4k5k6k7k8k9dadbdl.The projection imaging relationship between the space point in the world coordinate system and the image pixel coordinate system can be expressed in the form of a projection matrix:(9)N=gv0v00guu0001000Kd0D1=RKd.Then, the central projection imaging relationship is transformed into(10)ϕvu1=Nasbsls1.


#### 3.2.2. Stereoscopic Vision

In computer vision, recovering the three-dimensional information of an object from a two-dimensional image can actually be regarded as extracting the third-dimensional information implicit in the two-dimensional image, thereby constructing the three-dimensional structural information of the object. However, a single image cannot complete the three-dimensional description of an object, and it is necessary to use multiple images to observe the same object from different angles to complete the three-dimensional reconstruction of the target object [18–20].Two or more images are often a constraint relationship, and this constraint relationship plays a very important role in the calibration of the camera and the three-dimensional reconstruction of the object. In research, epipolar geometry is often used to develop this confinement relationship. This method is not affected by the environment and exhibits the inherent photographic geometry between the two images, which depends only on the internal parameters of the camera and the relative position of the camera. This is the antipolar geometry of the two images, as shown in Figure3.Figure 3
Schematic diagram of the epipolar geometry.When the position of the P-space point changes, the pair of polar faces rotates around the base line, thereby forming the beam of the opposite polar face, as shown in Figure4:Figure 4
Properties of epipolar lines.The epipolar constraint geometric relationship can usually be represented by a rank 2 matrixG of order 3:(11)qkDGqz=0,where G is called the fundamental matrix [21].There are many ways to calculate the fundamental matrixG, generally including linear algorithm, iterative algorithm, and robust algorithm. In this study, the robust RANSAC algorithm is used to solve the problem. The main steps areThere is a pair of matching pointsqz and qk on the two images.The coordinate values of all input matching points are normalized, the centroid of the matching points as the new coordinate origin is taken, and the average distance from these points to the new coordinate origin is D. Formula is normalized:(12)q^z=Dqz,q^k=D′qk.The essential matrix satisfiesqkG^qz=0, that is,(13)v′u′1G11G12G13G21G22G23G31G32G33vu1=0.The formula contains 9 unknowns; therefore, at least 8 matching points are required to solve a fundamental matrix with scale coefficients.


### 3.3. Key Technologies of 3D Reconstruction Based on GPU

#### 3.3.1. Parallel Computing

Parallel computing refers to that, on a parallel computer, multiple processors work together in parallel subtasks to complete the total task and ultimately improve the processing speed [22, 23]. Among them, task decomposition is the core of parallel computing, and the key is to find “exploitable parallelism.” Generally, a directed data correlation graph is drawn to represent the interdependence between tasks. Through task decomposition, the parallelism between processing tasks can be divided into data parallelism, functional parallelism, and pipeline parallelism, as shown in Figure 5.Figure 5
Data correlation plot.


#### 3.3.2. Normal Vector Calculation

When using the method based on local surface fitting to calculate the point cloud normal vector, it is assumed that the point cloud data are relatively smooth locally. Therefore, each data point can complete the plane fitting based on its local field points and indirectly obtain its normal vector. In practical applications, it is difficult to determine the number of neighborhood points due to the image of the point cloud density, the number of noise points, and the curvature. Delaunay-based methods first perform Delaunay triangulation on the point cloud and then solve for the normal vectors. The normal vector is solved by judging the position of the pointp and the convex hull. If the point p is in the convex hull of the point cloud, then the connection between the point p and the Voronoi vertex farthest from p is the normal vector of the point p. If the point p is on the convex hull, then the point that is infinitely far outside the convex hull in the direction of the average normal vector of the convex hull plane adjacent to the point p is taken as the pole. The method based on Lupin statistics is based on the theory of robust statistics and is mainly aimed at the point cloud model containing outliers and noise points, but the computational load is large. The solution of the normal vector in this study adopted the method based on local surface fitting, which is mainly used for the neighborhood point projection and sorting in the later work.Assuming that a point isq, and its r neighbor set is P=pj, and applying the least squares method to fit the tangent plane D of the point at this point, there is a normal vector m of the plane. That is the normal vector m of the point. The formula min−ujDm is the smallest, and uj=pj−q:(14)min∑pj∈P−ujDm2=min−ujDm−ujDm.O can be a3×3 matrix:(15)O=∑j=1rujDuj.After completing the normal vector calculation for the point cloud, the next step is to project the point and itsr neighbor points onto the tangent plane D passing through the point:(16)pj′=q+p^j−qp^j−qujp^j=pj−mujm.Then, there are(17)ηj=arccosu0Dui′.In practice, in order to reduce the cost of calculation, the value ofη¯j is(18)η¯j=u′uj′0DnDuj≥0,−2−u′uj′0DnDuj<0.Next, theq point is taken as the center, q0 closest to the q point is taken as the starting point, and the size of the η¯j value is sorted to form a continuous point ring around the point q.


## 3.1. Energy Efficiency Based on Communication Network

Due to the rapid development of smart phones, the demand for high-speed data services is increasing day by day, and traditional mobile communication networks can no longer meet the increasing customer demands. Therefore, the development and commercialization of a new generation of mobile communication systems has become an important topic. 5G is expected to provide 1,000 times the network capacity of 4G, with features such as high bandwidth, high speed, and low latency. In order to meet the exponential growth of data traffic, the 5G network must be a multilayer heterogeneous network with multiple network architectures coexisting. With the continuous development of human society and economy, the exchange and transmission of information has become an indispensable part of people’s life as well as clothing, food, housing, and transportation. In order to achieve this purpose, the communication technology has shown an unusually prosperous scene in the past 50 years, which has also brought about the coexistence of various types of communication networks, that is, heterogeneous networks. As shown in Figure1, Macrocell undertakes the task of basic coverage, covering a wide range and serving many users. Microcell and Picocell are responsible for the coverage of hotspot areas. Compared with macro cell base stations (MBS), their corresponding base stations have lower transmit power and smaller coverage. In addition, D2D is d2d three-dimensional map. It presents the industry information of local cities through the virtual representation of three-dimensional reality. The existence of D2D and cooperative relay can also improve the coverage of cellular network blind spots and improve the user experience at the cell edge [8, 9]. Obviously, 5G using this multilayered heterogeneous network will achieve better performance in terms of increasing network capacity, increasing coverage, and improving spectral efficiency. At the same time, the unprecedented rapid development of wireless communication technology has also resulted in huge energy consumption and increasingly serious environmental problems.Figure 1
Multilayer heterogeneous grid architecture model.In the past ten years, the rapid development of information and communication technology (ICT) has further intensified energy consumption and the problem of environmental pollution has become increasingly serious. Currently, there are more than 4 million base stations around the world to provide communication services for cell users (CUs), and each base station consumes an average of 25 MWh of electricity per year. According to statistics, in 2007, the total carbon emissions from cellular communication networks were 86 million tons. It is estimated that, by 2020, the total carbon emissions from cellular communication networks will reach 235 million tons. With the continuous increase of carbon gas emissions, at the same time, due to the expansion of the network scale, the energy consumption of the cellular network further increases, which also leads to the OPEX becoming nonnegligible [10, 11]. In the total operating cost of MNO, energy cost can account for about 30%, and the energy consumption cost is higher than the revenue growth rate, which brings huge challenges to mobile network operators. Taking China as an example, it consumes about 20 billion kilowatts of electricity every year to maintain the normal operation of the communication network, costing more than one billion yuan, and with the rapid development of the communication industry, the energy cost will further increase.It is foreseeable that if the existing wireless communication technology continues to be used, along with the further expansion of the network architecture, the resulting energy consumption, environment, and pollution problems will be more serious. Therefore, how to realize green communication with low pollution and low energy consumption under the premise of ensuring the quality of service (QoS) of mobile users and the benefits of operators has become an urgent problem to be solved in the new generation of mobile communication [12].


## 3.2. Terrain Reconstruction Technology of UAV Remote-Sensing Terrain

Due to its advantages of low cost, simple operation, flexible maneuverability, and the ability to obtain high-resolution images, its application on Earth has been rapidly developed. In the past, the remote-sensing image analysis of UAVs mainly analyzed the targets such as roads and vehicles in the two-dimensional image, mainly to extract and identify the image of the target and then gradually convert it into a three-dimensional image in the two-dimensional image. This is a leap. Therefore, the study of terrain 3D reconstruction using UAV remote-sensing images has attracted the attention of many scholars. Unmanned reconnaissance aircraft are used to shoot three-dimensional images of targets and ground objects in the air and analyze their internal mutual constraints. The three-dimensional position, shape, and three-dimensional structure of objects are obtained [13, 14]. It includes the principle of image-based three-dimensional reconstruction, that is, recovering the relative movement of the camera and the three-dimensional structure of the spatial scene through different feature points at different positions. By 3D reconstruction of UAV remote-sensing images, 3D stereo reconstruction of UAV can be achieved [15].


### 3.2.1. Video Mode

The imaging model is a geometric perspective transformation, which reflects the mapping relationship between three-dimensional objects and two-dimensional objects. This imaging mode can be simply classified as perspective projection, also known as center projection or pinhole imaging mode, which is characterized by changes in the distance of the target from the camera. Its core is that the optical center, the object point, and the image point form a straight line, as shown in Figure2.Figure 2
Coordinate system and imaging geometry.Conversion between world coordinate system and camera coordinate system [16]:(1)aobolo1=Kd0D1asbsls1,where K is the rotation matrix of the space point from the world coordinate system to the camera coordinate system, which represents the cosine of the direction of the optical axis to the coordinate axis of the world coordinate system. In practice, it only contains three independent variables. d is the three-dimensional translation vector, which is usually called the external parameter of the camera and determines the position of the camera’s optical axis in the world coordinate system.Conversion between camera coordinate system and image physical coordinate system:(2)A=gaolo,B=gbolo,where g is the main distance of the camera, and the conversion relationship between the two is expressed in homogeneous coordinates as(3)loAB1=g000g0001000aobolo1.Conversion between image physical coordinate system and image pixel coordinate system:(4)v−v0=Ata,u−u0=Btb.Then, the coordinates are expressed as(5)vu1=1ta0v001tau0001AB1.Combining the three coordinate processes, the imaging formula can be obtained:(6)ϕvu1=gv0v00guu0001000Kd0D1asbsls1.It is shown in the following formula in matrix form, which is usually called the internal matrix:(7)R=gv0v00guu0001.At the same time, the rotation matrixK and translation matrix d representing the transformation relationship between the camera coordinate system and the world coordinate system are collectively called external parameters. It can be represented in matrix form, called extrinsic matrix [17]:(8)Z=Kd=k1k2k3k4k5k6k7k8k9dadbdl.The projection imaging relationship between the space point in the world coordinate system and the image pixel coordinate system can be expressed in the form of a projection matrix:(9)N=gv0v00guu0001000Kd0D1=RKd.Then, the central projection imaging relationship is transformed into(10)ϕvu1=Nasbsls1.


### 3.2.2. Stereoscopic Vision

In computer vision, recovering the three-dimensional information of an object from a two-dimensional image can actually be regarded as extracting the third-dimensional information implicit in the two-dimensional image, thereby constructing the three-dimensional structural information of the object. However, a single image cannot complete the three-dimensional description of an object, and it is necessary to use multiple images to observe the same object from different angles to complete the three-dimensional reconstruction of the target object [18–20].Two or more images are often a constraint relationship, and this constraint relationship plays a very important role in the calibration of the camera and the three-dimensional reconstruction of the object. In research, epipolar geometry is often used to develop this confinement relationship. This method is not affected by the environment and exhibits the inherent photographic geometry between the two images, which depends only on the internal parameters of the camera and the relative position of the camera. This is the antipolar geometry of the two images, as shown in Figure3.Figure 3
Schematic diagram of the epipolar geometry.When the position of the P-space point changes, the pair of polar faces rotates around the base line, thereby forming the beam of the opposite polar face, as shown in Figure4:Figure 4
Properties of epipolar lines.The epipolar constraint geometric relationship can usually be represented by a rank 2 matrixG of order 3:(11)qkDGqz=0,where G is called the fundamental matrix [21].There are many ways to calculate the fundamental matrixG, generally including linear algorithm, iterative algorithm, and robust algorithm. In this study, the robust RANSAC algorithm is used to solve the problem. The main steps areThere is a pair of matching pointsqz and qk on the two images.The coordinate values of all input matching points are normalized, the centroid of the matching points as the new coordinate origin is taken, and the average distance from these points to the new coordinate origin is D. Formula is normalized:(12)q^z=Dqz,q^k=D′qk.The essential matrix satisfiesqkG^qz=0, that is,(13)v′u′1G11G12G13G21G22G23G31G32G33vu1=0.The formula contains 9 unknowns; therefore, at least 8 matching points are required to solve a fundamental matrix with scale coefficients.


## 3.2.1. Video Mode

The imaging model is a geometric perspective transformation, which reflects the mapping relationship between three-dimensional objects and two-dimensional objects. This imaging mode can be simply classified as perspective projection, also known as center projection or pinhole imaging mode, which is characterized by changes in the distance of the target from the camera. Its core is that the optical center, the object point, and the image point form a straight line, as shown in Figure2.Figure 2
Coordinate system and imaging geometry.Conversion between world coordinate system and camera coordinate system [16]:(1)aobolo1=Kd0D1asbsls1,where K is the rotation matrix of the space point from the world coordinate system to the camera coordinate system, which represents the cosine of the direction of the optical axis to the coordinate axis of the world coordinate system. In practice, it only contains three independent variables. d is the three-dimensional translation vector, which is usually called the external parameter of the camera and determines the position of the camera’s optical axis in the world coordinate system.Conversion between camera coordinate system and image physical coordinate system:(2)A=gaolo,B=gbolo,where g is the main distance of the camera, and the conversion relationship between the two is expressed in homogeneous coordinates as(3)loAB1=g000g0001000aobolo1.Conversion between image physical coordinate system and image pixel coordinate system:(4)v−v0=Ata,u−u0=Btb.Then, the coordinates are expressed as(5)vu1=1ta0v001tau0001AB1.Combining the three coordinate processes, the imaging formula can be obtained:(6)ϕvu1=gv0v00guu0001000Kd0D1asbsls1.It is shown in the following formula in matrix form, which is usually called the internal matrix:(7)R=gv0v00guu0001.At the same time, the rotation matrixK and translation matrix d representing the transformation relationship between the camera coordinate system and the world coordinate system are collectively called external parameters. It can be represented in matrix form, called extrinsic matrix [17]:(8)Z=Kd=k1k2k3k4k5k6k7k8k9dadbdl.The projection imaging relationship between the space point in the world coordinate system and the image pixel coordinate system can be expressed in the form of a projection matrix:(9)N=gv0v00guu0001000Kd0D1=RKd.Then, the central projection imaging relationship is transformed into(10)ϕvu1=Nasbsls1.


## 3.2.2. Stereoscopic Vision

In computer vision, recovering the three-dimensional information of an object from a two-dimensional image can actually be regarded as extracting the third-dimensional information implicit in the two-dimensional image, thereby constructing the three-dimensional structural information of the object. However, a single image cannot complete the three-dimensional description of an object, and it is necessary to use multiple images to observe the same object from different angles to complete the three-dimensional reconstruction of the target object [18–20].Two or more images are often a constraint relationship, and this constraint relationship plays a very important role in the calibration of the camera and the three-dimensional reconstruction of the object. In research, epipolar geometry is often used to develop this confinement relationship. This method is not affected by the environment and exhibits the inherent photographic geometry between the two images, which depends only on the internal parameters of the camera and the relative position of the camera. This is the antipolar geometry of the two images, as shown in Figure3.Figure 3
Schematic diagram of the epipolar geometry.When the position of the P-space point changes, the pair of polar faces rotates around the base line, thereby forming the beam of the opposite polar face, as shown in Figure4:Figure 4
Properties of epipolar lines.The epipolar constraint geometric relationship can usually be represented by a rank 2 matrixG of order 3:(11)qkDGqz=0,where G is called the fundamental matrix [21].There are many ways to calculate the fundamental matrixG, generally including linear algorithm, iterative algorithm, and robust algorithm. In this study, the robust RANSAC algorithm is used to solve the problem. The main steps areThere is a pair of matching pointsqz and qk on the two images.The coordinate values of all input matching points are normalized, the centroid of the matching points as the new coordinate origin is taken, and the average distance from these points to the new coordinate origin is D. Formula is normalized:(12)q^z=Dqz,q^k=D′qk.The essential matrix satisfiesqkG^qz=0, that is,(13)v′u′1G11G12G13G21G22G23G31G32G33vu1=0.The formula contains 9 unknowns; therefore, at least 8 matching points are required to solve a fundamental matrix with scale coefficients.


## 3.3. Key Technologies of 3D Reconstruction Based on GPU

### 3.3.1. Parallel Computing

Parallel computing refers to that, on a parallel computer, multiple processors work together in parallel subtasks to complete the total task and ultimately improve the processing speed [22, 23]. Among them, task decomposition is the core of parallel computing, and the key is to find “exploitable parallelism.” Generally, a directed data correlation graph is drawn to represent the interdependence between tasks. Through task decomposition, the parallelism between processing tasks can be divided into data parallelism, functional parallelism, and pipeline parallelism, as shown in Figure 5.Figure 5
Data correlation plot.


### 3.3.2. Normal Vector Calculation

When using the method based on local surface fitting to calculate the point cloud normal vector, it is assumed that the point cloud data are relatively smooth locally. Therefore, each data point can complete the plane fitting based on its local field points and indirectly obtain its normal vector. In practical applications, it is difficult to determine the number of neighborhood points due to the image of the point cloud density, the number of noise points, and the curvature. Delaunay-based methods first perform Delaunay triangulation on the point cloud and then solve for the normal vectors. The normal vector is solved by judging the position of the pointp and the convex hull. If the point p is in the convex hull of the point cloud, then the connection between the point p and the Voronoi vertex farthest from p is the normal vector of the point p. If the point p is on the convex hull, then the point that is infinitely far outside the convex hull in the direction of the average normal vector of the convex hull plane adjacent to the point p is taken as the pole. The method based on Lupin statistics is based on the theory of robust statistics and is mainly aimed at the point cloud model containing outliers and noise points, but the computational load is large. The solution of the normal vector in this study adopted the method based on local surface fitting, which is mainly used for the neighborhood point projection and sorting in the later work.Assuming that a point isq, and its r neighbor set is P=pj, and applying the least squares method to fit the tangent plane D of the point at this point, there is a normal vector m of the plane. That is the normal vector m of the point. The formula min−ujDm is the smallest, and uj=pj−q:(14)min∑pj∈P−ujDm2=min−ujDm−ujDm.O can be a3×3 matrix:(15)O=∑j=1rujDuj.After completing the normal vector calculation for the point cloud, the next step is to project the point and itsr neighbor points onto the tangent plane D passing through the point:(16)pj′=q+p^j−qp^j−qujp^j=pj−mujm.Then, there are(17)ηj=arccosu0Dui′.In practice, in order to reduce the cost of calculation, the value ofη¯j is(18)η¯j=u′uj′0DnDuj≥0,−2−u′uj′0DnDuj<0.Next, theq point is taken as the center, q0 closest to the q point is taken as the starting point, and the size of the η¯j value is sorted to form a continuous point ring around the point q.


## 3.3.1. Parallel Computing

Parallel computing refers to that, on a parallel computer, multiple processors work together in parallel subtasks to complete the total task and ultimately improve the processing speed [22, 23]. Among them, task decomposition is the core of parallel computing, and the key is to find “exploitable parallelism.” Generally, a directed data correlation graph is drawn to represent the interdependence between tasks. Through task decomposition, the parallelism between processing tasks can be divided into data parallelism, functional parallelism, and pipeline parallelism, as shown in Figure 5.Figure 5
Data correlation plot.


## 3.3.2. Normal Vector Calculation

When using the method based on local surface fitting to calculate the point cloud normal vector, it is assumed that the point cloud data are relatively smooth locally. Therefore, each data point can complete the plane fitting based on its local field points and indirectly obtain its normal vector. In practical applications, it is difficult to determine the number of neighborhood points due to the image of the point cloud density, the number of noise points, and the curvature. Delaunay-based methods first perform Delaunay triangulation on the point cloud and then solve for the normal vectors. The normal vector is solved by judging the position of the pointp and the convex hull. If the point p is in the convex hull of the point cloud, then the connection between the point p and the Voronoi vertex farthest from p is the normal vector of the point p. If the point p is on the convex hull, then the point that is infinitely far outside the convex hull in the direction of the average normal vector of the convex hull plane adjacent to the point p is taken as the pole. The method based on Lupin statistics is based on the theory of robust statistics and is mainly aimed at the point cloud model containing outliers and noise points, but the computational load is large. The solution of the normal vector in this study adopted the method based on local surface fitting, which is mainly used for the neighborhood point projection and sorting in the later work.Assuming that a point isq, and its r neighbor set is P=pj, and applying the least squares method to fit the tangent plane D of the point at this point, there is a normal vector m of the plane. That is the normal vector m of the point. The formula min−ujDm is the smallest, and uj=pj−q:(14)min∑pj∈P−ujDm2=min−ujDm−ujDm.O can be a3×3 matrix:(15)O=∑j=1rujDuj.After completing the normal vector calculation for the point cloud, the next step is to project the point and itsr neighbor points onto the tangent plane D passing through the point:(16)pj′=q+p^j−qp^j−qujp^j=pj−mujm.Then, there are(17)ηj=arccosu0Dui′.In practice, in order to reduce the cost of calculation, the value ofη¯j is(18)η¯j=u′uj′0DnDuj≥0,−2−u′uj′0DnDuj<0.Next, theq point is taken as the center, q0 closest to the q point is taken as the starting point, and the size of the η¯j value is sorted to form a continuous point ring around the point q.


## 4. Experiment on the Acquisition of Oil Pipeline Data and 3D Modeling by UAV Based on Communication Network

### 4.1. Debugging of Oil Pipeline Data System

Siemens S7–200CN series PLC has five different types of CPU, namely, CPU221, CPU222CN, CPU224CN, CPU224XPCN, and CPU226CN. Here, the PLC of the CPU224CN model is selected in this study, which can be connected to 7 expansion modules, and the interface is RS485 communication mode. The communication mode of S7-200PLC in this system is the free port mode, which communicates with other instruments through the MODBUS communication protocol. As a lower computer, PLC can not only accept commands from the upper computer but also output the programmed commands to the controlled equipment through PLC programming. EM235CN is an extension module of S7-200, which can accept 4 channels of input signals and send 2 channels of output signals. S7-200PLC and EM235 expansion module are used together, which can not only send instructions but also collect data from field devices to the host computer.In this system, S7-200PLC needs 240 VAC power supply, while EM235 analog input/output expansion module uses 24VDC power supply, so the system is equipped with a 24 V power supply. The main variable settings in this system are shown in Tables1 and 2.Table 1
System configuration main variables.
Water cumulative flowI/O realWater flow meter41265Read onlyInstantaneous flow of waterI/O realWater flow meter41287Read onlyCumulative oil flowI/O realMass flowmeter40135Read onlyInstantaneous flow of oilI/O realMass flowmeter40146Read onlyGas cumulative flowI/O realBarometer41155Read onlyInstantaneous gas flowI/O realBarometer41578Read onlyTable 2
Main variables of software design.
Variable nameVariable typeConnect the deviceRegisterType of dataRead and write typeLiquid depthI/O realADAM401740001USHORTRead onlyDO0I/O integerADAM406900018BitRead and writeDO1I/O integerADAM406900019BitRead and writeDO2I/O integerADAM406900020BitRead and writeADAM module is an input and output device developed based on PC serial port. ADAM4520, ADAM4069, and ADAM4017+ are mainly used in this system. ADAM-4520 is a conversion device that realizes from RS-232 interface standard to RS-422/485 interface standard. It does not need to install any driver and only needs the correct connection of the device to complete the interface conversion. Because all ADAM modules support the RS485 serial port protocol, S7-200PLC and other ADAM modules communicate with the host computer through the ADAM4520 module. ADAM-4017+ is an analog signal acquisition module with 8 16 bit input ports. For example, 0–5 V voltage signal and 4–20 mA current signal can be collected by the 4017+ module. Each input channel of the 4017+ module has several different analog signal input ranges. This function increases the range of signal acquisition for this module in signal acquisition and data monitoring. The 4–20 mA analog signal output by the liquid level gauge is converted into a digital signal through the 4017+ module and then sent to the host computer. The function of ADAM-4069 is simply to output eight high and low level signals, which can realize the design of remote switch by controlling the relay. The blue wire in ADAM4017+ module and ADAM4069 module is connected to DATA+, and the green wire is connected to DATA. Then, the blue and green wires are connected to the DATA+ and DATAports of the ADAM4520. Thus, the parallel connection mode of ADAM modules in the system is realized.Expansion tank consists of four parts: tank body, air bag, water connection port, and exhaust port. Used in a closed water circulation system, it plays the role of balancing water volume and pressure, avoiding frequent opening of safety valve and frequent replenishment of automatic water supply valve. The external structure of the surge tank is shown in Figure6. Since the surge tank is a large pressure vessel, for safety reasons, a safety valve should be set at the top of its sealing end to avoid safety accidents caused by excessive pressure. In order to ensure the stable pressure of the storage tank, a gas filling valve is designed. When the dirt is mixed into the sealed tank, it can be discharged quickly, or when the pressure vessel is not used for a long time, it can be discharged to avoid its corrosion and rust.Figure 6
Schematic diagram of the structure of the surge tank.The central control center is far away from the gas, oil, and water pumps. In order to solve the problem of starting and controlling each pump, the system adopts the upper computer operation to realize the remote control of the pump and can also realize the fault stop or emergency stop control of the pump on-site. The function is realized through the control of Adam ADAM4069 and electromagnetic relay. The host computer refers to a computer that can directly issue control commands. Generally, a PC screen that displays various signal changes (hydraulic pressure, water level, temperature, etc.). The electromagnetic relay uses a 250 VAC or 30 VDC power supply. The upper computer controls the I/O output of Adam ADAM4069 to control the contact closure and disconnection of the relay to realize the start and stop control of the pump and the emergency stop of the flow acquisition system when it fails. In the system, a total of three remote switches controlled by electromagnetic relays are used in this study, which are the “Drive” button and the “Stop” button of the inverter and the switch of the air compressor. In the central control room, there are host computer, PLC, and ADAM series modules. In this central control room, the staff can intuitively understand the instantaneous flow of oil, water, and gas in the system and the cumulative amount of time within a period of time through the host computer. The flow rate can also clearly know the liquid level in the mixed liquid separator. This is the most fundamental function to be realized by the data acquisition system.There are always interfering signals in the laboratory where the data acquisition equipment is located, and sometimes these interfering signals may have a greater impact on the measurement results. Some of the interfering signals come from the surrounding environment and some come from the system itself. The main interference signal of this system is the strong EMI caused by the frequency shift. The electromagnetic interference of variable frequency speed control system mainly includes radio frequency radiation interference, harmonic interference, and radio frequency radiation interference. In order to avoid this situation, both hardware anti-jamming and software anti-jamming are used. Among these methods, hardware anti-jamming is the most basic and effective method. Therefore, the anti-interference of the system should be fully considered in the design. The system adopts the following anti-interference measures:(1)
Shielded twisted pair for data signal transmission is used to ensure that the shielding layer and the protective ground are connected.(2)
All equipment and instruments are reliably grounded.(3)
The signal line and the power line should be avoided as much as possible. Although the signal interference problem was considered in the system design, the interference signal generated by the frequency converter during the experiment still affects the stability of data acquisition.Before using the signal isolator, when the system uses the inverter to control the frequency of the pump to control the flow of the oil phase or the water phase in the pipeline, the mass flowmeter will not be able to display the real-time collected data in the configuration system due to the signal interference of the inverter. After the signal isolator is added to the inverter control circuit, the electromagnetic interference phenomenon of the system has been effectively solved. When the system is running, the data of the mass flowmeter can be normally transmitted to the host computer for display.


### 4.2. Experimental Data

After the on-site and system configuration of the simulated oil production data acquisition system is completed and no signal interference is ensured, the system enters the operation experiment stage. In the system, the frequency converter is used to control the flow in the pipeline, so the frequency set in Kingview and the actual frequency of the frequency converter should be calibrated first. The frequency in the configuration software in the host computer is changed, and the frequency value actually displayed by the inverter at the same time is read, and the frequency comparison in Tables3 and 4 is obtained. Among them, the frequency and the actual frequency value are the variables defined in the Kingview software before this study.Table 3
Frequency calibration results (a).
Frequency value setin Kingview (Hz)Frequency value displayed in the inverter (Hz)11.0021.9532.8744.0955.0465.98Table 4
Frequency calibration results (b).
Frequency value set in Kingview (Hz)Frequency value displayed in the inverter (Hz)76.9487.9899.041010.021111.091212.03Kingview, namely, Kingview development monitoring system software, is a new type of industrial automatic control system. It replaces the traditional closed system with an integrated system composed of standard industrial computer software and hardware platforms. After calibrating the frequency, it can be seen that the error between the frequency set in Kingview and the actual frequency of the inverter is basically within ±0.1 Hz, and the error rate is less than 1%, which is within a reasonable error range, so the calibration result is ideal. After calibrating the frequency, this study starts to carry out the experiment of system data acquisition. During the experiment, this study divides the flow collection into two parts, respectively, testing the stability and accuracy of the data collection system. For stability, the test method in this study is to adjust the frequency of the frequency converter to a certain fixed value, keep it unchanged, and observe the change of the flow in the pipeline. In this study, the frequency is fixed at 15 Hz and the stability test is carried out. The set acquisition time interval is 2000 ms. The flow data of the water and oil phases are shown in Figures7 and 8.Figure 7
Water flow at a fixed frequency.Figure 8
Oil flow at a fixed frequency.From the data in Figures7 and 8, it can be seen that the stabilization time for the flow in the water pipeline is about 20 s, while the time for the flow in the oil pipeline to stabilize is longer, about 25 s. After a period of time, the flow of the fluid in the oil pipeline and the water pipeline will gradually tend to a stable state, and the fluctuation of the flow is relatively small. Finally, the data obtained by the host computer and the field data of the flowmeter at different frequencies are observed, the two types of data obtained are analyzed and compared, and the accuracy of the data acquisition system is analyzed. The control program can also be adjusted and revised to improve the control system. Fluctuations will occur when the flow in the system changes. In the accuracy test of the flow, each time the frequency is changed, and the displayed data in the host computer and the on-site data of the flowmeter are observed and compared within a certain period of time to determine the accuracy of the data acquisition system. In the experiment, by comparing the data of the host computer and the data of the on-site flowmeter, the two-phase data of oil and water are shown in Figures 9 and 10.Figure 9
Water flow data relationship.Figure 10
Oil flow data relationship.By observing the two sets of data, it can be seen that there is still a certain error between the data collected in the host computer and the data collected on-site. This error is unavoidable due to pressure changes in the pipeline, accuracy of metering equipment, data collection intervals, etc. By comparing the data obtained in the host computer with the on-site data of the flowmeter at different frequencies, the errors of the two-phase data of water and oil are calculated. In Figures9 and 10, it is clearly observed that the error does not reach 5%. Because the system requires that the error should be less than 5% to meet the requirements of the data acquisition system on the oil production site, although there are certain errors in the experimental results of the system, the method meets the design requirements of the system and also achieves good experimental results.


## 4.1. Debugging of Oil Pipeline Data System

Siemens S7–200CN series PLC has five different types of CPU, namely, CPU221, CPU222CN, CPU224CN, CPU224XPCN, and CPU226CN. Here, the PLC of the CPU224CN model is selected in this study, which can be connected to 7 expansion modules, and the interface is RS485 communication mode. The communication mode of S7-200PLC in this system is the free port mode, which communicates with other instruments through the MODBUS communication protocol. As a lower computer, PLC can not only accept commands from the upper computer but also output the programmed commands to the controlled equipment through PLC programming. EM235CN is an extension module of S7-200, which can accept 4 channels of input signals and send 2 channels of output signals. S7-200PLC and EM235 expansion module are used together, which can not only send instructions but also collect data from field devices to the host computer.In this system, S7-200PLC needs 240 VAC power supply, while EM235 analog input/output expansion module uses 24VDC power supply, so the system is equipped with a 24 V power supply. The main variable settings in this system are shown in Tables1 and 2.Table 1
System configuration main variables.
Water cumulative flowI/O realWater flow meter41265Read onlyInstantaneous flow of waterI/O realWater flow meter41287Read onlyCumulative oil flowI/O realMass flowmeter40135Read onlyInstantaneous flow of oilI/O realMass flowmeter40146Read onlyGas cumulative flowI/O realBarometer41155Read onlyInstantaneous gas flowI/O realBarometer41578Read onlyTable 2
Main variables of software design.
Variable nameVariable typeConnect the deviceRegisterType of dataRead and write typeLiquid depthI/O realADAM401740001USHORTRead onlyDO0I/O integerADAM406900018BitRead and writeDO1I/O integerADAM406900019BitRead and writeDO2I/O integerADAM406900020BitRead and writeADAM module is an input and output device developed based on PC serial port. ADAM4520, ADAM4069, and ADAM4017+ are mainly used in this system. ADAM-4520 is a conversion device that realizes from RS-232 interface standard to RS-422/485 interface standard. It does not need to install any driver and only needs the correct connection of the device to complete the interface conversion. Because all ADAM modules support the RS485 serial port protocol, S7-200PLC and other ADAM modules communicate with the host computer through the ADAM4520 module. ADAM-4017+ is an analog signal acquisition module with 8 16 bit input ports. For example, 0–5 V voltage signal and 4–20 mA current signal can be collected by the 4017+ module. Each input channel of the 4017+ module has several different analog signal input ranges. This function increases the range of signal acquisition for this module in signal acquisition and data monitoring. The 4–20 mA analog signal output by the liquid level gauge is converted into a digital signal through the 4017+ module and then sent to the host computer. The function of ADAM-4069 is simply to output eight high and low level signals, which can realize the design of remote switch by controlling the relay. The blue wire in ADAM4017+ module and ADAM4069 module is connected to DATA+, and the green wire is connected to DATA. Then, the blue and green wires are connected to the DATA+ and DATAports of the ADAM4520. Thus, the parallel connection mode of ADAM modules in the system is realized.Expansion tank consists of four parts: tank body, air bag, water connection port, and exhaust port. Used in a closed water circulation system, it plays the role of balancing water volume and pressure, avoiding frequent opening of safety valve and frequent replenishment of automatic water supply valve. The external structure of the surge tank is shown in Figure6. Since the surge tank is a large pressure vessel, for safety reasons, a safety valve should be set at the top of its sealing end to avoid safety accidents caused by excessive pressure. In order to ensure the stable pressure of the storage tank, a gas filling valve is designed. When the dirt is mixed into the sealed tank, it can be discharged quickly, or when the pressure vessel is not used for a long time, it can be discharged to avoid its corrosion and rust.Figure 6
Schematic diagram of the structure of the surge tank.The central control center is far away from the gas, oil, and water pumps. In order to solve the problem of starting and controlling each pump, the system adopts the upper computer operation to realize the remote control of the pump and can also realize the fault stop or emergency stop control of the pump on-site. The function is realized through the control of Adam ADAM4069 and electromagnetic relay. The host computer refers to a computer that can directly issue control commands. Generally, a PC screen that displays various signal changes (hydraulic pressure, water level, temperature, etc.). The electromagnetic relay uses a 250 VAC or 30 VDC power supply. The upper computer controls the I/O output of Adam ADAM4069 to control the contact closure and disconnection of the relay to realize the start and stop control of the pump and the emergency stop of the flow acquisition system when it fails. In the system, a total of three remote switches controlled by electromagnetic relays are used in this study, which are the “Drive” button and the “Stop” button of the inverter and the switch of the air compressor. In the central control room, there are host computer, PLC, and ADAM series modules. In this central control room, the staff can intuitively understand the instantaneous flow of oil, water, and gas in the system and the cumulative amount of time within a period of time through the host computer. The flow rate can also clearly know the liquid level in the mixed liquid separator. This is the most fundamental function to be realized by the data acquisition system.There are always interfering signals in the laboratory where the data acquisition equipment is located, and sometimes these interfering signals may have a greater impact on the measurement results. Some of the interfering signals come from the surrounding environment and some come from the system itself. The main interference signal of this system is the strong EMI caused by the frequency shift. The electromagnetic interference of variable frequency speed control system mainly includes radio frequency radiation interference, harmonic interference, and radio frequency radiation interference. In order to avoid this situation, both hardware anti-jamming and software anti-jamming are used. Among these methods, hardware anti-jamming is the most basic and effective method. Therefore, the anti-interference of the system should be fully considered in the design. The system adopts the following anti-interference measures:(1)
Shielded twisted pair for data signal transmission is used to ensure that the shielding layer and the protective ground are connected.(2)
All equipment and instruments are reliably grounded.(3)
The signal line and the power line should be avoided as much as possible. Although the signal interference problem was considered in the system design, the interference signal generated by the frequency converter during the experiment still affects the stability of data acquisition.Before using the signal isolator, when the system uses the inverter to control the frequency of the pump to control the flow of the oil phase or the water phase in the pipeline, the mass flowmeter will not be able to display the real-time collected data in the configuration system due to the signal interference of the inverter. After the signal isolator is added to the inverter control circuit, the electromagnetic interference phenomenon of the system has been effectively solved. When the system is running, the data of the mass flowmeter can be normally transmitted to the host computer for display.


## 4.2. Experimental Data

After the on-site and system configuration of the simulated oil production data acquisition system is completed and no signal interference is ensured, the system enters the operation experiment stage. In the system, the frequency converter is used to control the flow in the pipeline, so the frequency set in Kingview and the actual frequency of the frequency converter should be calibrated first. The frequency in the configuration software in the host computer is changed, and the frequency value actually displayed by the inverter at the same time is read, and the frequency comparison in Tables3 and 4 is obtained. Among them, the frequency and the actual frequency value are the variables defined in the Kingview software before this study.Table 3
Frequency calibration results (a).
Frequency value setin Kingview (Hz)Frequency value displayed in the inverter (Hz)11.0021.9532.8744.0955.0465.98Table 4
Frequency calibration results (b).
Frequency value set in Kingview (Hz)Frequency value displayed in the inverter (Hz)76.9487.9899.041010.021111.091212.03Kingview, namely, Kingview development monitoring system software, is a new type of industrial automatic control system. It replaces the traditional closed system with an integrated system composed of standard industrial computer software and hardware platforms. After calibrating the frequency, it can be seen that the error between the frequency set in Kingview and the actual frequency of the inverter is basically within ±0.1 Hz, and the error rate is less than 1%, which is within a reasonable error range, so the calibration result is ideal. After calibrating the frequency, this study starts to carry out the experiment of system data acquisition. During the experiment, this study divides the flow collection into two parts, respectively, testing the stability and accuracy of the data collection system. For stability, the test method in this study is to adjust the frequency of the frequency converter to a certain fixed value, keep it unchanged, and observe the change of the flow in the pipeline. In this study, the frequency is fixed at 15 Hz and the stability test is carried out. The set acquisition time interval is 2000 ms. The flow data of the water and oil phases are shown in Figures7 and 8.Figure 7
Water flow at a fixed frequency.Figure 8
Oil flow at a fixed frequency.From the data in Figures7 and 8, it can be seen that the stabilization time for the flow in the water pipeline is about 20 s, while the time for the flow in the oil pipeline to stabilize is longer, about 25 s. After a period of time, the flow of the fluid in the oil pipeline and the water pipeline will gradually tend to a stable state, and the fluctuation of the flow is relatively small. Finally, the data obtained by the host computer and the field data of the flowmeter at different frequencies are observed, the two types of data obtained are analyzed and compared, and the accuracy of the data acquisition system is analyzed. The control program can also be adjusted and revised to improve the control system. Fluctuations will occur when the flow in the system changes. In the accuracy test of the flow, each time the frequency is changed, and the displayed data in the host computer and the on-site data of the flowmeter are observed and compared within a certain period of time to determine the accuracy of the data acquisition system. In the experiment, by comparing the data of the host computer and the data of the on-site flowmeter, the two-phase data of oil and water are shown in Figures 9 and 10.Figure 9
Water flow data relationship.Figure 10
Oil flow data relationship.By observing the two sets of data, it can be seen that there is still a certain error between the data collected in the host computer and the data collected on-site. This error is unavoidable due to pressure changes in the pipeline, accuracy of metering equipment, data collection intervals, etc. By comparing the data obtained in the host computer with the on-site data of the flowmeter at different frequencies, the errors of the two-phase data of water and oil are calculated. In Figures9 and 10, it is clearly observed that the error does not reach 5%. Because the system requires that the error should be less than 5% to meet the requirements of the data acquisition system on the oil production site, although there are certain errors in the experimental results of the system, the method meets the design requirements of the system and also achieves good experimental results.


## 5. Conclusion

According to the overall design idea of the system, hardware of the system was selected and configured, then the overall design of the system was improved, the design of each component was refined, and finally the configuration function of the system in Kingview was realized. The system has a high degree of automation and is easy to operate and has the following characteristics: the mass flowmeter and the turbine flowmeter are used as data acquisition equipment, and the two instruments have higher accuracy, better environmental adaptability, and wider measurement range. These fully meet the accuracy and reliability requirements of the data acquisition system on the production site. However, some parts of the system were still not perfect, and functions to make the system more intelligent can continue to be added on the basis of the existing system, and the degree of automation needs to be further improved. Although the system realized the functions of data acquisition and monitoring, there are still many tasks that need to be further studied and explored.



---

*Source: 6860631-2022-09-22.xml*