CN113670384B - Multi-variable time sequence diagram convolution multiphase flow virtual metering method and system - Google Patents

Multi-variable time sequence diagram convolution multiphase flow virtual metering method and system Download PDF

Info

Publication number
CN113670384B
CN113670384B CN202110953143.4A CN202110953143A CN113670384B CN 113670384 B CN113670384 B CN 113670384B CN 202110953143 A CN202110953143 A CN 202110953143A CN 113670384 B CN113670384 B CN 113670384B
Authority
CN
China
Prior art keywords
data
revised
flow
flow rate
pressure
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110953143.4A
Other languages
Chinese (zh)
Other versions
CN113670384A (en
Inventor
周建峰
李晓芳
安军刚
朱运周
田小凯
刘凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Haimo Technology Group Co ltd
Original Assignee
Heimer Pandora Data Technology Shenzhen Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Heimer Pandora Data Technology Shenzhen Co ltd filed Critical Heimer Pandora Data Technology Shenzhen Co ltd
Priority to CN202110953143.4A priority Critical patent/CN113670384B/en
Publication of CN113670384A publication Critical patent/CN113670384A/en
Application granted granted Critical
Publication of CN113670384B publication Critical patent/CN113670384B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D21/00Measuring or testing not otherwise provided for
    • G01D21/02Measuring two or more variables by means not covered by a single other subclass

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Testing Or Calibration Of Command Recording Devices (AREA)

Abstract

The invention discloses a multivariable time sequence chart convolution multiphase flow virtual metering method, which comprises the steps of firstly obtaining n groups of corresponding pressure, differential pressure and temperature, and calculating the association degree between the input and the output of the n groups of corresponding pressure, differential pressure and temperature, and then carrying out data enhancement on the corresponding pressure, differential pressure and temperature according to the association degree, training and testing a virtual metering model to obtain a flow metering model. The corresponding system comprises a data exploratory analysis module, an algorithm module and a predictive analysis output value module. The method has the remarkable effects that the liquid quantity measurement precision of the virtual flowmeter is improved through the graph neural network iterative algorithm when the multiphase fluid is measured, the measurement precision is higher than that of the impedance water-containing meter under the gas-containing working condition, the debugging is convenient, the purchasing and maintenance cost of the multiphase flowmeter of the oil field can be effectively reduced, the continuous real-time metering of the multiphase flow is realized, and the method has higher data reference value for the production dynamic monitoring, the flow assurance and the oil reservoir management of the oil field.

Description

一种多变量时序图卷积多相流虚拟计量方法及系统A multi-variable time series diagram convolution multi-phase flow virtual metering method and system

技术领域Technical field

本发明涉及油气工程,具体涉及石油工程中的虚拟计量技术。The invention relates to oil and gas engineering, and in particular to virtual measurement technology in petroleum engineering.

背景技术Background technique

随着人工智能技术和大数据算法的发展应用,并且受全球油价低迷及放射源安全管控的影响,国内外油田市场对于低成本非放型的多相流量计有迫切而旺盛的需求。当前的在线多相流量计(MPFM)测量大部分是基于总体流量使用放射性、电磁电子、超声波等技术结合相分率测量组合进行的。然而,这些相分率测量技术具有一定的局限性,一方面,虽然迄今为止放射性技术仍然是最准确可靠的多相流测量方法,但是全球范围内很多国家对放射源技术使用严格限制;另一方面,在技术层面,当介质中的气体含量达到一定限度后流量计的测量误差会急剧恶化,即使采用特殊设计的也不例外。因而可以采用特殊的低成本设计方案,使其能够满足流量计测量范围。With the development and application of artificial intelligence technology and big data algorithms, and affected by the downturn in global oil prices and the safety control of radioactive sources, the domestic and foreign oilfield markets have urgent and strong demand for low-cost, non-discharge type multiphase flow meters. Most current online multiphase flow meter (MPFM) measurements are based on overall flow using radioactive, electromagnetic electronics, ultrasonic and other technologies combined with phase fraction measurement. However, these phase fraction ratio measurement technologies have certain limitations. On the one hand, although radioactive technology is still the most accurate and reliable multi-phase flow measurement method so far, many countries around the world have strict restrictions on the use of radioactive source technology; on the other hand, On the technical level, when the gas content in the medium reaches a certain limit, the measurement error of the flow meter will deteriorate sharply, even if it adopts a special design. Special low-cost design solutions can therefore be used to meet the flow meter measurement range.

发明内容Contents of the invention

有鉴于此,本发明提供了一种基于软件系统的数学算法计量模型,该模型可以输入特征和预测值数据学习非线性关系从而求得计量结果。In view of this, the present invention provides a mathematical algorithm measurement model based on a software system, which can input feature and predicted value data to learn non-linear relationships to obtain measurement results.

其技术方案如下:The technical solution is as follows:

一种多变量时序图卷积多相流虚拟计量方法,其特征在于按以下步骤进行:A multi-variable time series diagram convolution multi-phase flow virtual measurement method, which is characterized by following the following steps:

步骤一、获取与流量相关的历史数据,包括n组相互对应的压力P、差压DP、温度T、液流量L、水流量W、油流量O、气流量G共七列数据;Step 1: Obtain historical data related to flow, including n sets of corresponding seven columns of data including pressure P, differential pressure DP, temperature T, liquid flow L, water flow W, oil flow O, and air flow G;

步骤二、分别从压力P、差压DP、温度T三列数据中单独取出每一列数据Xi,分别从液流量L、水流量W、油流量O、气流量G四列数据中单独取出每一列数据Yi,X=P,DP,T,Y=L,W,O,G,i=1,2,3,...,n,使用以下公式计算其两两关联程度,得到相关系数rX→YStep 2: Take out each column of data For a column of data Y i , rX →Y ;

其中:in:

n为每列数据的数据总量;n is the total amount of data in each column;

为对应列数据的算数平均值; is the arithmetic mean of the corresponding column data;

为对应列数据的算数平均值; is the arithmetic mean of the corresponding column data;

步骤三、根据相关系数rX→Y的大小评价Xi中的每列数据对Yi中的每列数据的重要程度,并根据重要程度分别赋予压力P、差压DP、温度T各自的权重系数a、b、c;Step 3: Evaluate the importance of each column of data in X i to each column of data in Y i based on the magnitude of the correlation coefficient r Coefficients a, b, c;

步骤四、将压力P、差压DP、温度T中的每个数据乘以各自对应的权重系数,得到修订压力a*P、修订差压b*DP、修订温度c*T;Step 4: Multiply each data in pressure P, differential pressure DP, and temperature T by its corresponding weight coefficient to obtain revised pressure a*P, revised differential pressure b*DP, and revised temperature c*T;

步骤五、以修订压力a*P、修订差压b*DP、修订温度c*T作为输入,以液流量L、水流量W、油流量O、气流量G作为输出,训练并测试虚拟计量模型,得到流量计量模型:L,W,O,G=F(P,T,DP)。Step 5. Use the revised pressure a*P, revised differential pressure b*DP, and revised temperature c*T as inputs, and use the liquid flow rate L, the water flow rate W, the oil flow rate O, and the air flow rate G as the outputs to train and test the virtual metering model. , get the flow measurement model: L, W, O, G = F (P, T, DP).

同时,本发明提供一种多变量时序图卷积多相流虚拟计量系统,其要点在于:包含依次设置的数据探索性分析模块,算法模块和预测性分析输出值模块;At the same time, the present invention provides a multi-variable time sequence diagram convolution multi-phase flow virtual metering system, the key points of which are: including a data exploratory analysis module, an algorithm module and a predictive analysis output value module set in sequence;

所述数据探索性分析模块用于获取与流量相关的历史数据,所述算法模块用于计算相关系数rX→Y,所述预测性分析输出值模块用于训练并测试虚拟计量模型。The data exploratory analysis module is used to obtain historical data related to traffic, the algorithm module is used to calculate the correlation coefficient r X→Y , and the predictive analysis output value module is used to train and test the virtual metering model.

附图说明Description of the drawings

图1为本发明涉及到的原理图;Figure 1 is a schematic diagram related to the present invention;

图2为本发明涉及到的流程图。Figure 2 is a flow chart related to the present invention.

具体实施方式Detailed ways

以下结合实施例和附图对本发明作进一步说明。The present invention will be further described below in conjunction with the examples and drawings.

一种多变量时序图卷积多相流虚拟计量方法,按以下步骤进行:A multi-variable time series diagram convolution multi-phase flow virtual measurement method, which is carried out according to the following steps:

步骤一、获取与流量相关的历史数据,包括n组相互对应的压力P、差压DP、温度T、液流量L、水流量W、油流量O、气流量G共七列数据,分别验算每列数据的连续性,然后再分别进行离散数据连续数据的序列化,最后将数据读取以直方图的形式初步定性,分析数据的类间距离和数量差异指标;Step 1: Obtain historical data related to flow, including n sets of corresponding seven columns of data including pressure P, differential pressure DP, temperature T, liquid flow L, water flow W, oil flow O, and air flow G, and check each data separately. Continuity of column data, and then serialize discrete data and continuous data respectively. Finally, the data is read in the form of a histogram to make a preliminary qualitative analysis, and the inter-class distance and quantitative difference indicators of the data are analyzed;

步骤二、分别从压力P、差压DP、温度T三列数据中单独取出每一列数据Xi,分别从液流量L、水流量W、油流量O、气流量G四列数据中单独取出每一列数据Yi,X=P,DP,T,Y=L,W,O,G,i=1,2,3,...,n,使用以下公式计算其两两关联程度,得到相关系数rX→YStep 2: Take out each column of data For a column of data Y i , rX →Y ;

其中:in:

n为每列数据的数据总量;n is the total amount of data in each column;

为对应列数据的算数平均值; is the arithmetic mean of the corresponding column data;

为对应列数据的算数平均值; is the arithmetic mean of the corresponding column data;

步骤三、根据相关系数rX→Y的大小评价Xi中的每列数据对Yi中的每列数据的重要程度,并根据重要程度分别赋予压力P、差压DP、温度T各自的权重系数a、b、c;Step 3: Evaluate the importance of each column of data in X i to each column of data in Y i based on the magnitude of the correlation coefficient r Coefficients a, b, c;

步骤四、将压力P、差压DP、温度T中的每个数据乘以各自对应的权重系数,得到修订压力a*P、修订差压b*DP、修订温度c*T;Step 4: Multiply each data in pressure P, differential pressure DP, and temperature T by its corresponding weight coefficient to obtain revised pressure a*P, revised differential pressure b*DP, and revised temperature c*T;

步骤五、以修订压力a*P、修订差压b*DP、修订温度c*T作为输入,以液流量L、水流量W、油流量O、气流量G作为输出,训练并测试虚拟计量模型,得到流量计量模型:L,W,O,G=F(P,T,DP)。Step 5. Use the revised pressure a*P, revised differential pressure b*DP, and revised temperature c*T as inputs, and use the liquid flow rate L, the water flow rate W, the oil flow rate O, and the air flow rate G as the outputs to train and test the virtual metering model. , get the flow measurement model: L, W, O, G = F (P, T, DP).

所述虚拟计量模型可选择多种现有模型,本案中以图卷积神经网络模型为例:首先根据修订压力a*P、修订差压b*DP、修订温度c*T、液流量L、水流量W、油流量O、气流量G读入邻接矩阵,再通过图卷积神经网络向下计算以实现图网络间数据传播,最后通过全连接回归的方式输出相关系数,从而训练得到流量计量模型:L,W,O,G=F(P,T,DP)。The virtual metering model can choose from a variety of existing models. In this case, the graph convolutional neural network model is taken as an example: first, according to the revised pressure a*P, revised differential pressure b*DP, revised temperature c*T, liquid flow rate L, The water flow rate W, the oil flow rate O, and the air flow rate G are read into the adjacency matrix, and then calculated downward through the graph convolutional neural network to realize data propagation between graph networks. Finally, the correlation coefficient is output through full connection regression, thereby training to obtain flow measurement. Model: L, W, O, G = F (P, T, DP).

实施例2:Example 2:

一种基于实施例1的多变量时序图卷积多相流虚拟计量系统,包含依次设置的数据探索性分析模块,算法模块和预测性分析输出值模块;A multi-variable time series diagram convolution multi-phase flow virtual metering system based on Embodiment 1, including a data exploratory analysis module, an algorithm module and a predictive analysis output value module set in sequence;

所述数据探索性分析模块用于获取与流量相关的历史数据,所述算法模块用于计算相关系数rX→Y,所述预测性分析输出值模块用于训练并测试虚拟计量模型。The data exploratory analysis module is used to obtain historical data related to traffic, the algorithm module is used to calculate the correlation coefficient r X→Y , and the predictive analysis output value module is used to train and test the virtual metering model.

实施例3:Example 3:

图卷积神经网络模型总共分为三个模块:空间关联图学习模块、时间关联图多步Transformer模块,损失函数和全连接模块,其核心思想是通过邻接矩阵和系数矩阵的非线性映射加权实现边随机游走找到最佳预测点构建有效图然后通过全连接方式输出预测值。图学习模块通常是为了学习到一个邻接矩阵从而实现时序数据中自适应获取变量之间时间和空间的变化关系。The graph convolutional neural network model is divided into three modules: the spatial correlation graph learning module, the temporal correlation graph multi-step Transformer module, the loss function and the fully connected module. The core idea is to implement the nonlinear mapping weighting of the adjacency matrix and the coefficient matrix. The edge random walk finds the best prediction point to construct an effective graph and then outputs the prediction value through full connection. The graph learning module is usually designed to learn an adjacency matrix to adaptively obtain the temporal and spatial changing relationships between variables in time series data.

由于图卷积网络是基于邻接矩阵描述边和顶点之间的关系,该计算核心为如下频率响应矩阵。Since the graph convolution network is based on the adjacency matrix to describe the relationship between edges and vertices, the core of the calculation is the following frequency response matrix.

X=σ(v·diag[θN]vTx)X=σ(v·diag[θ N ]v T x)

在上面式子中v表示点,diag表示对角矩阵,X表示输出层特征图,x表示输入层特征图,[θN]表示边特征输入,vT表示点转置矩阵。In the above formula, v represents a point, diag represents a diagonal matrix, X represents the output layer feature map, x represents the input layer feature map, [θ N ] represents the edge feature input, and v T represents the point transpose matrix.

图学习的数学原理是首选我们将读取的数据经过转换为m行n列的矩阵,经过图学习模块卷积核h计算如下:The mathematical principle of graph learning is the first choice. We convert the read data into a matrix of m rows and n columns. The convolution kernel h of the graph learning module is calculated as follows:

多步Transformer将获得的图卷积特征通过图卷积模块计算The multi-step Transformer calculates the obtained graph convolution features through the graph convolution module

经过拉普拉斯变换After Laplace transform

上面式子中为拉普拉斯变换矩阵特征值,y为需要输出的预测值,H输出层归一化矩阵。In the above formula is the Laplace transformation matrix eigenvalue, y is the predicted value to be output, and H outputs the layer normalization matrix.

采用人工智能算法中神经网络的设计深度回归树,针对深度学习型回归树模型选择标准残差平方和及最小残差平方和控制树的输出和生长过程。随机森林之间存在的弱链接,同时该方法可以避免树生长过程中贪婪算法带来误差。首选我们定义损失函数为L,其中y为预测值,使用虚拟计量分析模型同时使用MSE(均方误差)来评估损失误差。The deep regression tree is designed using the neural network in the artificial intelligence algorithm, and the standard residual sum of squares and the minimum residual sum of squares are selected to control the output and growth process of the tree for the deep learning regression tree model. There are weak links between random forests, and this method can avoid errors caused by greedy algorithms during the tree growth process. First, we define the loss function as L, where y is the predicted value, use a virtual econometric analysis model and use MSE (mean squared error) to evaluate the loss error.

令导数为0,最小化均方误差。Let the derivative be 0 to minimize the mean square error.

综上述计算可以通过全连接层得到预测y是均方误差最小最佳。为余弦损失值。Based on the above calculations, the predicted y can be obtained through the fully connected layer with the smallest mean square error. is the cosine loss value.

时间序列预测任务可以按照不同的方法执行。最经典的是基于统计和自回归的方法。更准确的是基于增强和集成的算法,我们必须使用滚动周期生成大量有用的手工特性。另一方面,我们可以使用在开发过程中提供更多自由的神经网络模型,提供对顺序建模的可定制的特性。Time series forecasting tasks can be performed following different methods. The most classic methods are based on statistics and autoregression. To be more accurate with augmentation and ensemble based algorithms, we have to use rolling cycles to generate a large number of useful handcrafted features. On the other hand, we can use neural network models that provide more freedom during development, providing customizable features for sequential modeling.

循环和卷积结构在时间序列预测中取得了巨大的成功。该领域中有趣的方法是通过采用最初在序列数据中本地的Transformers和Attention架构。Recurrent and convolutional structures have achieved great success in time series forecasting. Interesting approaches in this area are by employing Transformers and Attention architectures that are originally native to sequence data.

结构的使用似乎不常见,在图结构中,我们有一个由不同节点组成的网络,这些节点之间通过某种链接相互关联。我们尝试做的是使用时间序列的图形表示来产生未来的预测。The use of structures seems unusual, in a graph structure we have a network of different nodes that are related to each other by some kind of link. What we try to do is use graphical representations of time series to generate future forecasts.

我们利用图卷积神经网络探索数据的嵌套结构。采用了图形神经网络在不常见的情况下,如时间序列预测。在我们的深度学习模型中,图依赖与递归部分相结合,试图提供更准确的预测。这种方法很适合我们的问题,因为我们可以强调数据中的基本层次结构,并用相关矩阵对其进行编码。We exploit graph convolutional neural networks to explore the nested structure of the data. Graph neural networks are employed in uncommon situations such as time series forecasting. In our deep learning model, graph dependencies are combined with the recursive part in an attempt to provide more accurate predictions. This approach is well suited to our problem because we can emphasize the underlying hierarchical structure in the data and encode it with a correlation matrix.

图学习模块首先通过将清洗过的数据通过GCN读取到内存中然后使用GNN实现将输入特征和输出预测值转换为稀疏图邻接矩阵,通过对稀疏图的邻接矩阵之间的系数矩阵分析可以得到参数之间的存在的关系为线性还是非线性并将其可视化,在此过程为了降低计算量我们使用单方向的计算图来实现图学习模块的计算来缓解过度平滑可能存在的过拟合从而降低计算量实现稳定的图学习模块,该模块主要完成了从数据输入经过隐含层映射特征图层。The graph learning module first reads the cleaned data into memory through GCN and then uses GNN to convert the input features and output prediction values into a sparse graph adjacency matrix. By analyzing the coefficient matrix between the adjacency matrices of the sparse graph, we can get Is the relationship between parameters linear or non-linear and visualized? In order to reduce the amount of calculations in this process, we use a single-direction calculation graph to implement the calculation of the graph learning module to alleviate the possible over-fitting of over-smoothing and thereby reduce The calculation amount is stable and the graph learning module is realized. This module mainly completes the mapping of feature layers from data input through hidden layers.

在图卷积模块中首选我们图学习模块分析到输入特征关系,然后将输入特征通过编码器分配到网络中的结构学习特征权重并且映射到低维空间这个过程通过一个特征嵌入式矩阵实现,这个学习过程通过优化编码器的参数保证节点的学习效率和实现图卷积模块,该模块主要是将特征图层的特征经过图卷积分析游走边的权重。In the graph convolution module, our graph learning module is the first choice to analyze the input feature relationship, and then assign the input features to the structure in the network through the encoder to learn the feature weights and map them to a low-dimensional space. This process is implemented through a feature embedding matrix. This The learning process ensures the learning efficiency of nodes by optimizing the parameters of the encoder and implements a graph convolution module. This module mainly analyzes the weight of the wandering edges by analyzing the features of the feature layer through graph convolution.

实施例4:Example 4:

本发明使用是一种时序图卷积神经网络算法,通过该算法我们设计如下解决问题的系统方法。该系统可以为我们更好的处理压力Pressure、差压Dp、温度Temp或其他高能、低能甚至多个输入自变量特征并且分析特征之间的关系和自变量与因变量之间非线性映射从而预测出液量、油量、气量。This invention uses a sequential graph convolutional neural network algorithm. Through this algorithm, we design the following systematic method to solve the problem. This system can better handle pressure, differential pressure Dp, temperature Temp or other high-energy, low-energy or even multiple input independent variable features for us, and analyze the relationship between features and the non-linear mapping between independent variables and dependent variables to predict Liquid output, oil volume, gas volume.

(1)第一步:使用read__sql_query读取真实含液量、含油量、含水量、含气量、压力、压差、温度作为训练集输经过切片取出需要分析的季度、月、日数据然后将离散的数据存在确实的使用随机数填充后进行序列化后读取到数据EDA分析模块中。(1) Step one: Use read__sql_query to read the real liquid content, oil content, water content, gas content, pressure, pressure difference, and temperature as a training set. After slicing, extract the quarterly, monthly, and daily data that need to be analyzed and then discrete The data must be filled with random numbers and serialized before being read into the data EDA analysis module.

(2)第二步:使用前保留六位小数点方法放缩误差,然后将压力、差压、温度分别进行分布可视乎分析可以得到趋势变化的定性问题和去除噪声点数据的范围,然后分析自变量之间的皮尔森相关系数。(2) The second step: scale the error by retaining six decimal points before use, and then distribute the pressure, differential pressure, and temperature respectively. You can analyze the qualitative issues of trend changes and remove the range of noise point data, and then analyze Pearson correlation coefficient between independent variables.

(3)第三步:通过自变量压力、压差、温度与因变量之间的皮尔森相关系数使用pyheatmap可视化热力图分析,经过以上分析通过热力图直接定性分析自变量和因变量之间的数据关系类型和相关性强度。(3) The third step: Use pyheatmap to visualize the heat map analysis through the Pearson correlation coefficient between the independent variables pressure, pressure difference, temperature and the dependent variable. After the above analysis, directly analyze the relationship between the independent variables and the dependent variable qualitatively through the heat map. Data relationship type and correlation strength.

(4)第四步:经过前三步我们获取了完善的序列化数据,将数据划分为训练集、测试集、验证集,将训练集、测试集的数据经过图卷积神经网络模型后获取训练权重文件。(4) Step 4: After the first three steps, we obtained complete serialized data, divided the data into training set, test set, and verification set, and obtained the training set and test set data through the graph convolutional neural network model. Training weights file.

(5)第五步:将训练好的权重文件通过模型加载部分进行在验证集数据上测试优化模型后通过在线部署系统部署然后通过每个不同的井读取的自变量特征通过输出值模块输出预测值含液量、含水量、含气量、含油量。(5) Step 5: Pass the trained weight file through the model loading part. Test the optimized model on the validation set data and deploy it through the online deployment system. Then, the independent variable features read through each different well are output through the output value module. Predicted values of liquid content, water content, gas content, and oil content.

实施例5:Example 5:

一种虚拟计量模型的学习训练方法,第一步:采用传统的流量计系统测量一段时间在某个井厂的数据,然后将其数据通过数据传输设备或者私有云传输到云端或者直接将数据传输到边缘计算平台。A learning and training method for a virtual metering model. The first step is to use a traditional flow meter system to measure data at a certain well plant for a period of time, and then transmit the data to the cloud through a data transmission device or a private cloud or directly transmit the data. to edge computing platforms.

第二步:将第一步获得的数据经过数据预处理的清洗转为序列数据,该序列数据被分为离散型和连续型。Step 2: Convert the data obtained in the first step into sequence data through data preprocessing and cleaning. The sequence data is divided into discrete and continuous types.

第三步:将第二步获得的数据进行数据探索性分析,获得最佳预测因子和变化影响的主成分因子。Step 3: Conduct exploratory data analysis on the data obtained in Step 2 to obtain the best predictors and principal component factors affected by changes.

第四步:将特征因子和预测值进行模型训练和迁移学习获得模型的权重文件,然后将模型获得的权重文件进行部署为在线算法系统。Step 4: Perform model training and transfer learning on the feature factors and predicted values to obtain the weight file of the model, and then deploy the weight file obtained by the model as an online algorithm system.

第五步:通过第四步预测计算得到的数据进行分析验证优化更新模型。Step 5: Analyze, verify, optimize and update the model through the data obtained from the prediction calculation in step 4.

经在油田项目的实施验证,统计计算得到由本发明得到的虚拟计量误差很小,均方误差(MSE)小于0.05。Verified by the implementation of oil field projects, statistical calculations show that the virtual measurement error obtained by the present invention is very small, and the mean square error (MSE) is less than 0.05.

有益效果:采用本发明的技术方案通过图神经网络迭代算法改善了虚拟流量计在测量多相流体时的液量测量精度,比阻抗含水仪在含气工况下测量精度更高,调试方便,且可有效降低油田多相流量计采购和维护成本,实现多相流的连续实时计量,对于油田的生产动态监控,流动保障和油藏管理具有较高的数据参考价值。Beneficial effects: The technical solution of the present invention is used to improve the liquid volume measurement accuracy of the virtual flow meter when measuring multi-phase fluids through the graph neural network iterative algorithm. It has higher measurement accuracy than the impedance water meter under gas-containing conditions and is easy to debug. It can effectively reduce the purchase and maintenance costs of multi-phase flow meters in oil fields, realize continuous real-time measurement of multi-phase flow, and has high data reference value for dynamic monitoring of oil field production, flow assurance and reservoir management.

最后需要说明的是,上述描述仅仅为本发明的优选实施例,本领域的普通技术人员在本发明的启示下,在不违背本发明宗旨及权利要求的前提下,可以做出多种类似的表示,这样的变换均落入本发明的保护范围之内。Finally, it should be noted that the above descriptions are only preferred embodiments of the present invention. Under the inspiration of the present invention, those of ordinary skill in the art can make a variety of similar embodiments without violating the purpose and claims of the present invention. It means that such transformations fall within the protection scope of the present invention.

Claims (4)

1.一种多变量时序图卷积多相流虚拟计量方法,其特征在于按以下步骤进行:1. A multi-variable time series diagram convolution multi-phase flow virtual metering method, which is characterized by following the following steps: 步骤一、获取与流量相关的历史数据,包括n组相互对应的压力P、差压DP、温度T、液流量L、水流量W、油流量O、气流量G共七列数据;Step 1: Obtain historical data related to flow, including n sets of corresponding seven columns of data including pressure P, differential pressure DP, temperature T, liquid flow L, water flow W, oil flow O, and air flow G; 步骤二、分别从压力P、差压DP、温度T三列数据中单独取出每一列数据Xi,分别从液流量L、水流量W、油流量O、气流量G四列数据中单独取出每一列数据Yi,X=P,DP,T,Y=L,W,O,G,i=1,2,3,...,n,使用以下公式计算其两两关联程度,得到相关系数rX→YStep 2: Take out each column of data For a column of data Y i , rX →Y ; 其中:in: n为每列数据的数据总量;n is the total amount of data in each column; 为对应列数据的算数平均值; is the arithmetic mean of the corresponding column data; 为对应列数据的算数平均值; is the arithmetic mean of the corresponding column data; 步骤三、根据相关系数rX→Y的大小评价Xi中的每列数据对Yi中的每列数据的重要程度,并根据重要程度分别赋予压力P、差压DP、温度T各自的权重系数a、b、c;Step 3: Evaluate the importance of each column of data in X i to each column of data in Y i based on the magnitude of the correlation coefficient r Coefficients a, b, c; 步骤四、将压力P、差压DP、温度T中的每个数据乘以各自对应的权重系数,得到修订压力a*P、修订差压b*DP、修订温度c*T;Step 4: Multiply each data in pressure P, differential pressure DP, and temperature T by its corresponding weight coefficient to obtain revised pressure a*P, revised differential pressure b*DP, and revised temperature c*T; 步骤五、以修订压力a*P、修订差压b*DP、修订温度c*T作为输入,以液流量L、水流量W、油流量O、气流量G作为输出,训练并测试虚拟计量模型,得到流量计量模型:L,W,O,G=F(P,T,DP)。Step 5. Use the revised pressure a*P, revised differential pressure b*DP, and revised temperature c*T as inputs, and use the liquid flow rate L, the water flow rate W, the oil flow rate O, and the air flow rate G as the outputs to train and test the virtual metering model. , get the flow measurement model: L, W, O, G = F (P, T, DP). 2.根据权利要求1所述的一种多变量时序图卷积多相流虚拟计量方法,其特征在于:所述步骤一中,获取与流量相关的历史数据后,分别验算每列数据的连续性,然后再分别进行离散数据连续数据的序列化,最后将数据读取以直方图的形式初步定性,分析数据的类间距离和数量差异指标;再进行步骤二。2. A multi-variable time series diagram convolution multi-phase flow virtual metering method according to claim 1, characterized in that: in the step one, after obtaining the historical data related to the flow rate, the continuous data of each column of data is separately checked. properties, and then serialize the discrete data and continuous data respectively, and finally read the data in the form of a histogram to make a preliminary qualitative analysis, and analyze the inter-class distance and quantitative difference indicators of the data; then proceed to step two. 3.根据权利要求1所述的一种多变量时序图卷积多相流虚拟计量方法,其特征在于:所述步骤五中,首先根据修订压力a*P、修订差压b*DP、修订温度c*T、液流量L、水流量W、油流量O、气流量G读入邻接矩阵,再通过图卷积神经网络向下计算以实现图网络间数据传播,最后通过全连接回归的方式输出相关系数,从而训练得到流量计量模型:L,W,O,G=F(P,T,DP)。3. A multi-variable time sequence diagram convolution multi-phase flow virtual metering method according to claim 1, characterized in that: in the step five, first, according to the revised pressure a*P, the revised differential pressure b*DP, the revised Temperature c*T, liquid flow rate L, water flow rate W, oil flow rate O, and air flow rate G are read into the adjacency matrix, and then calculated downward through the graph convolutional neural network to realize data propagation between graph networks, and finally through fully connected regression. Output the correlation coefficient to train the flow measurement model: L, W, O, G = F (P, T, DP). 4.一种基于权利要求1所述的多变量时序图卷积多相流虚拟计量方法的系统,其特征在于:包含依次设置的数据探索性分析模块,算法模块和预测性分析输出值模块;4. A system based on the multi-variable time series diagram convolution multi-phase flow virtual metering method according to claim 1, characterized in that it includes a data exploratory analysis module, an algorithm module and a predictive analysis output value module set in sequence; 所述数据探索性分析模块用于获取与流量相关的历史数据,所述算法模块用于计算相关系数rX→Y,所述预测性分析输出值模块用于训练并测试虚拟计量模型。The data exploratory analysis module is used to obtain historical data related to traffic, the algorithm module is used to calculate the correlation coefficient r X→Y , and the predictive analysis output value module is used to train and test the virtual metering model.
CN202110953143.4A 2021-08-19 2021-08-19 Multi-variable time sequence diagram convolution multiphase flow virtual metering method and system Active CN113670384B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110953143.4A CN113670384B (en) 2021-08-19 2021-08-19 Multi-variable time sequence diagram convolution multiphase flow virtual metering method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110953143.4A CN113670384B (en) 2021-08-19 2021-08-19 Multi-variable time sequence diagram convolution multiphase flow virtual metering method and system

Publications (2)

Publication Number Publication Date
CN113670384A CN113670384A (en) 2021-11-19
CN113670384B true CN113670384B (en) 2023-09-08

Family

ID=78543952

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110953143.4A Active CN113670384B (en) 2021-08-19 2021-08-19 Multi-variable time sequence diagram convolution multiphase flow virtual metering method and system

Country Status (1)

Country Link
CN (1) CN113670384B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
NO990111D0 (en) * 1999-01-11 1999-01-11 Audun Aspelund Multiphase flow measurement in tubes
CN101666770A (en) * 2009-09-18 2010-03-10 中国石油大学(华东) Device and method for measuring crude oil with low air void
WO2017112839A1 (en) * 2015-12-24 2017-06-29 General Electric Company Calibration device and sensitivity determining device for virtual flow meter, and associated methods
CN110321646A (en) * 2019-07-10 2019-10-11 海默潘多拉数据科技(深圳)有限公司 A kind of multiphase flow rates virtual metrology method promoting regression tree model based on gradient
CN113188613A (en) * 2021-03-05 2021-07-30 深圳市联恒星科技有限公司 Multiphase flow measurement method and system based on uncertainty analysis

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11280141B2 (en) * 2019-07-23 2022-03-22 Cameron International Corporation Virtual multiphase flowmeter system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
NO990111D0 (en) * 1999-01-11 1999-01-11 Audun Aspelund Multiphase flow measurement in tubes
CN101666770A (en) * 2009-09-18 2010-03-10 中国石油大学(华东) Device and method for measuring crude oil with low air void
WO2017112839A1 (en) * 2015-12-24 2017-06-29 General Electric Company Calibration device and sensitivity determining device for virtual flow meter, and associated methods
CN110321646A (en) * 2019-07-10 2019-10-11 海默潘多拉数据科技(深圳)有限公司 A kind of multiphase flow rates virtual metrology method promoting regression tree model based on gradient
CN113188613A (en) * 2021-03-05 2021-07-30 深圳市联恒星科技有限公司 Multiphase flow measurement method and system based on uncertainty analysis

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于数据融合技术的水下油气井计量方法研究;马文礼 等;《石油化工设备》;第48卷(第4期);9-14 *

Also Published As

Publication number Publication date
CN113670384A (en) 2021-11-19

Similar Documents

Publication Publication Date Title
Ju et al. An adaptive Gaussian process-based iterative ensemble smoother for data assimilation
Sahoo et al. Groundwater-level prediction using multiple linear regression and artificial neural network techniques: a comparative assessment
Weirs et al. Sensitivity analysis techniques applied to a system of hyperbolic conservation laws
Fang et al. Application of long short-term memory (LSTM) on the prediction of rainfall-runoff in karst area
CN105444923A (en) Mechanical temperature instrument error prediction method based on genetic-algorithm optimized least square support vector machine
Larestani et al. Predicting the surfactant-polymer flooding performance in chemical enhanced oil recovery: Cascade neural network and gradient boosting decision tree
CN116502539B (en) VOCs gas concentration prediction method and system
CN112862069B (en) Landslide Displacement Prediction Method Based on SVR-LSTM Hybrid Deep Learning
CN106295199A (en) Automatic history matching method and system based on autocoder and multiple-objection optimization
Barth On the propagation of statistical model parameter uncertainty in CFD calculations
CN110852415B (en) Method, system and equipment for vegetation index prediction based on neural network algorithm
Barrett et al. Statistical inference with generalized Gini indices of inequality, poverty, and welfare
CN109359692A (en) An online measurement model of crude oil water content and its construction method and application
CN115471679A (en) Method and intelligent system for synchronously assimilating water level and flow of natural river
CN112949944B (en) Intelligent groundwater level prediction method and system based on space-time characteristics
CN114841402A (en) A method and system for predicting groundwater level height based on multi-feature map network
Nasseri et al. Uncertainty assessment of monthly water balance models based on incremental modified fuzzy extension principle method
CN110263293A (en) A kind of hydrologic forecasting method based on wavelet transformation and joint probability distribution
CN115617935B (en) A method for downscaling groundwater storage deviation based on fusion model
CN103353295A (en) Method for accurately predicating vertical deformation of dam body
CN113670384B (en) Multi-variable time sequence diagram convolution multiphase flow virtual metering method and system
Bai et al. Evolving an information diffusion model using a genetic algorithm for monthly river discharge time series interpolation and forecasting
CN119046635A (en) Toxic gas diffusion prediction method based on convolution variation self-encoder and mapping neural network
CN118428272A (en) Flow field prediction method and system based on multi-agent symbolic regression algorithm
Diaz-Ortiz et al. Water distribution system calibration using the Finite Element Method coupled to a Genetic Algorithm

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20250421

Address after: 730010 Zhang Suzhou beach, Chengguan District, Lanzhou City, Gansu Province, No. 593

Patentee after: HAIMO TECHNOLOGY (GROUP) CO.,LTD.

Country or region after: China

Address before: 518063 floor 12, Sanhang science and technology building, Northwest University of technology, No. 45, Gaoxin South ninth Road, high tech Zone community, Yuehai street, Nanshan District, Shenzhen, Guangdong Province

Patentee before: Heimer Pandora Data Technology (Shenzhen) Co.,Ltd.

Country or region before: China