Water content measuring method based on deep learning and application of water content measuring method in oil well exploitation

文档序号:1228029 发布日期:2020-09-08 浏览:8次 中文

阅读说明:本技术 基于深度学习的含水率测量方法及其在油井开采中的应用 (Water content measuring method based on deep learning and application of water content measuring method in oil well exploitation ) 是由 高忠科 侯林华 曲志勇 马文庆 于 2020-05-31 设计创作,主要内容包括:一种基于深度学习的含水率测量方法及其在油井开采中的应用,包括:利用四扇区电导传感器采集井口油气管道中不同工况的流体数据,获取标签,并上传至上位机保存;构建数据集,具体是对流体数据进行预处理后,使用有重叠的滑动窗口从流体数据中获取样本,为样本添加相应的标签,再将80%样本作为训练集,10%样本作为验证集,剩余的10%样本作为测试集;构建卷积神经网络模型,用于完成对流体样本的特征提取和含水率值预测;对卷积神经网络模型进行优化、训练以及参数调整,得到当前架构下的最优的卷积神经网络模型,并完成参数测量。本发明可以实时精确测量井口环境下油水两相流的含水率数值并保存,提升含水率测量的准确率。(A water content measuring method based on deep learning and application thereof in oil well exploitation comprise: collecting fluid data of different working conditions in a wellhead oil and gas pipeline by using a four-sector conductivity sensor, acquiring a label, and uploading the label to an upper computer for storage; constructing a data set, specifically, after preprocessing fluid data, obtaining a sample from the fluid data by using a sliding window with overlap, adding a corresponding label to the sample, taking 80% of the sample as a training set, 10% of the sample as a verification set, and taking the remaining 10% of the sample as a test set; constructing a convolutional neural network model for completing the feature extraction and the water content value prediction of the fluid sample; and optimizing, training and adjusting parameters of the convolutional neural network model to obtain the optimal convolutional neural network model under the current architecture, and completing parameter measurement. The invention can accurately measure and store the water content value of the oil-water two-phase flow under the wellhead environment in real time, and improves the accuracy of water content measurement.)

1. A moisture content measuring method based on deep learning is characterized by comprising the following steps:

1) collecting fluid data of different working conditions in a wellhead oil and gas pipeline by using a four-sector conductivity sensor, acquiring a label, and uploading the label to an upper computer for storage;

2) constructing a data set, specifically, after preprocessing fluid data, obtaining a sample from the fluid data by using a sliding window with overlap, adding a corresponding label to the sample, taking 80% of the sample as a training set, 10% of the sample as a verification set, and taking the remaining 10% of the sample as a test set;

3) constructing a convolutional neural network model for completing the feature extraction and the water content value prediction of the fluid sample;

4) and optimizing, training and adjusting parameters of the convolutional neural network model to obtain the optimal convolutional neural network model under the current architecture, and completing parameter measurement.

2. The deep learning-based water cut measuring method according to claim 1, wherein the step 1) comprises:

(1) connecting the four-sector conductivity sensor arranged on the transparent pipe section with a wellhead oil and gas acquisition pipeline through a flange, acquiring fluid data of oil-water two-phase flow under different working conditions in the wellhead oil and gas pipeline, and uploading the fluid data to an upper computer for storage;

(2) collecting an oil-water sample flowing through a transparent pipe section in the working time of the four-sector conductivity sensor to obtain a water content label of the oil-water sample, determining the overall range of the water content according to the characteristics of an oil well, taking 3% of the water content in the overall range as a step point, and selecting fluid data for subsequent model training.

3. The method for measuring the water cut based on deep learning according to claim 1, wherein the step 2) comprises:

(1) fluid data is pre-processed, with the following formula:

wherein the content of the first and second substances,

Figure FDA0002517563550000012

(2) intercepting fluid data of each working condition as a single sample through a sliding window with overlap, wherein the label of the sample refers to a water content label, each group of water content labels is regarded as one type, obtaining a class label of the sample, and setting the length of the sliding window as M and the overlap rate as PoThen the single sample is a two-dimensional matrix of M × 4, obtained in the length L of the fluid data

Figure FDA0002517563550000016

(3) randomly using 80% of N samples as training set, 10% as verification set and the rest 10% as test set.

4. The method for measuring the water content based on deep learning of claim 1, wherein the convolutional neural network model in step 3) is used for extracting spatial information and time domain characteristics in two-phase flow data and measuring the water content through a multitask output module; the convolutional neural network model has 19 layers and comprises 4 convolutional modules and 1 multitask output module; the layers 1-4 are first convolution modules, the layers 5-8 are second convolution modules, the layers 9-12 are third convolution modules, the layers 13-15 are fourth convolution modules, and the layers 16-19 are multitask output modules.

5. The method for measuring the water content based on the deep learning of claim 4, wherein the first convolution module, the second convolution module and the third convolution module have the same structure and respectively comprise the following components which are connected in sequence: a temporal convolution layer, a spatial convolution layer, an average pooling layer, and a discard layer; the fourth convolution module comprises the following components which are connected in sequence: a temporal convolution layer, a spatial convolution layer, and a discard layer; wherein the content of the first and second substances,

(1) the time convolution layer is used for filtering the four-channel samples along the time dimension and extracting time domain characteristics; the time convolution layer usesEach convolution kernel is corresponding to a first convolution module, a second convolution module, a third convolution module and a fourth convolution module, wherein k is 1,2,3 and 4, and different feature maps are obtained after each convolution kernel and the input sample are subjected to convolution operation to obtain the different feature mapsA feature map; the formula for this layer convolution is as follows:

Figure FDA0002517563550000023

wherein the content of the first and second substances,is an input for the time convolution layer,

Figure FDA0002517563550000026

the boundary value is extended by complementing 0, and the size of each feature graph is IT/StT×STIn which IT,STIs the dimension of the time convolution layer input; carrying out batch normalization processing on the convolved features to accelerate convergence;

(2) the space convolution layer is used for integrating the samples of the four channels along the space dimension to obtain space information; the space convolution layer is usedA convolution kernel, wherein k is 1,2,3,4, respectively corresponding to the first convolution module, the second convolution module, the third convolution module and the fourth convolution module,

Figure FDA00025175635500000211

wherein the content of the first and second substances,

Figure FDA00025175635500000215

the input boundary value is extended by complementing 0, and the size of each feature map is IC/StC×SCIn which IC,SCThe dimension of the input dimension of the space convolution layer is used for carrying out batch normalization processing on the feature graph after convolution so as to accelerate convergence;

(3) the average pooling layer is used for selecting representative values in the pooling region to reduce feature dimensionality, remove redundant information and simplify subsequent calculation, and a formula is described as follows:

Figure FDA0002517563550000031

wherein the content of the first and second substances,to average out the characteristics of the pooled layer output,in order to average the inputs to the pooling layer,

Figure FDA0002517563550000034

(4) and a discarding layer, wherein a part of neurons and connections thereof are discarded randomly according to a discarding rate, so that the dense neural network model is forced to learn more global characteristics.

6. The method for measuring the water content based on the deep learning as claimed in claim 4, wherein the multitask output module comprises a flattening layer, a discarding layer and a full connection layer which are connected in sequence, and the output of the full connection layer is respectively connected with a numerical value full connection layer and an auxiliary full connection layer; wherein:

(1) the flattening layer is used for integrating input multi-dimensional features into one-dimensional comprehensive information; the output dimension of the layer is IF×SF×NFIn which IF,SFIs the dimension of the size of the input of the flattening layer, NFIs the number dimension of the flattening layer input;

(2) the discarding layer discards part of neurons and connection thereof randomly according to a discarding rate, and the output dimension isIs provided with

Figure FDA0002517563550000036

(3) The full connection layer obtains brand new output characteristics by weighting and recombining the input characteristics; the formula is as follows:

wherein the content of the first and second substances,

Figure FDA0002517563550000038

(4) the numerical fully-connected layer is provided with 1 neuron, and the activation function of the layer is Sigmoid; the auxiliary full connection layer has Nu19And (4) a neuron, wherein the layer activation function is Softmax.

7. The method for measuring the water cut based on deep learning according to claim 1, wherein the step 4) comprises the following steps:

(1) constructing a loss function between a label and an output of the convolutional neural network model, describing a difference between the label and the output by using the loss function, and guiding the optimization of the convolutional neural network model by taking the minimum difference as a principle; loss L of convolutional neural network modeltotalComprises two parts, respectively: a) loss of numerically fully connected layers LpredSelecting the average absolute error as a loss function; b) loss L of auxiliary full link layerclaSelecting a cross entropy loss function; loss LtotalThe expression is as follows:

Lcla=-∑p(x)×log q(x)

Ltotal=α×Lpred+β×Lcla

wherein, yi,

Figure FDA0002517563550000042

(2) setting parameters of each layer in the convolutional neural network model, performing iterative training on the weight of the convolutional neural network model under the parameter combination by adopting an Adam-based gradient descent method, and updating the weight of the network by a gradient back propagation method; during training, the learning rate is set to LrThe number of running steps is set to nepoch

(3) And optimizing the parameter setting of the convolutional neural network model according to the performance of the convolutional neural network model on the verification set under different parameter combinations, so that the performance of the convolutional neural network model on the verification set is continuously improved, the optimal convolutional neural network model weight is obtained, and the moisture content parameter measurement is completed.

8. The application of the deep learning based water cut measuring method in oil well exploitation is characterized by comprising the following steps:

(1) starting a four-sector conductivity sensor, measuring fluid data of oil-water two-phase flow in a wellhead oil-gas pipeline, uploading the fluid data to an upper computer, and obtaining a sample at the current moment according to the water content measuring method based on deep learning;

(2) taking the current time sample as the input of a convolutional neural network model, and obtaining the water content output of the current sample through the calculation and analysis of the convolutional neural network model;

(3) the water content output is associated with the corresponding sample and stored in an upper computer as the current processing information;

(4) and (4) repeating the steps (2) to (3), continuously obtaining the water content value corresponding to the fluid sample in real time, storing the water content value as the state information of the current wellhead oil and gas pipeline until the four-sector conductivity sensor is closed, and analyzing historical data to obtain the total water content in the measuring time.

Technical Field

The invention relates to a method for measuring water content. In particular to a water content measuring method based on deep learning and application thereof in oil well exploitation.

Background

The oil-water two-phase flow is widely existed in the industrial fields of oil and gas exploitation, transportation, processing and the like. In an oil-water two-phase flow system, due to the difference of properties such as density, viscosity and the like, the distribution of two-phase media in a pipeline has changes in both space and time, and a specific flow form, namely a flow pattern, is formed. In the oil and gas exploitation process, along with the change of the flow pattern in the two-phase flow system, the whole flow information is continuously changed, so that the key flow parameters (phase flow rate, phase content and the like) are also in violent change, the difficulty is brought to the wellhead content measurement of the oil and gas, and the further processes of transportation, storage and the like are influenced. Currently, the mainstream method for determining the water content of the wellhead is to perform manual assay on a sampling product so as to obtain the water content of the current sample. However, this method has large error, low precision and large time delay. A model of fluid signals and flow parameters in a wellhead pipeline is built, the model can be used for measuring the flow parameters of different fluid signals, the model is continuously optimized from two angles of fluid signal acquisition and model optimization, and the performance of the model is improved. Traditional annular conductivity sensors, double helix capacitance sensors and the like only contain single-channel fluid information and cannot accurately reflect flow structures. The distributed conductivity sensor design can acquire richer spatial information, and the flow state is reflected more accurately through multi-channel signals, so that technical support is provided for accurate measurement of flow parameters.

The deep learning method is an important technical route for realizing artificial intelligence under the current technological background. Through the simulation of a human brain processing mechanism, the deep learning method utilizes the integration of artificial neurons to complete large-scale nonlinear calculation. In recent years, with the solution of corresponding optimization problems, the deep learning method obtains the accuracy rate close to or even exceeding that of human brain recognition in a plurality of fields, and the development of artificial intelligence is powerfully promoted. The convolutional neural network is a branch which is widely applied, and has excellent performance in the fields of image segmentation, natural language processing, signal analysis and the like by virtue of the advantages of local perception, parameter sharing and multi-core processing. Meanwhile, with the continuous improvement of the convolutional neural network, the processing performance of the convolutional neural network is also continuously improved. Compared with the traditional analysis method, the convolutional neural network can acquire representative characteristics through analysis of a large amount of data, and is beneficial to analysis of new data. The network has a plurality of feature extraction processes, so that the nonlinear features in the signals can be fully discovered through the action of the nonlinear function, and the network has unique advantages in the processing of complex signals.

Disclosure of Invention

The invention aims to solve the technical problem of providing a deep learning-based water content measuring method capable of solving the problem of measuring the water content of oil-water two-phase flow and application thereof in oil well exploitation

The technical scheme adopted by the invention is as follows: a moisture content measuring method based on deep learning comprises the following steps:

1) collecting fluid data of different working conditions in a wellhead oil and gas pipeline by using a four-sector conductivity sensor, acquiring a label, and uploading the label to an upper computer for storage;

2) constructing a data set, specifically, after preprocessing fluid data, obtaining a sample from the fluid data by using a sliding window with overlap, adding a corresponding label to the sample, taking 80% of the sample as a training set, 10% of the sample as a verification set, and taking the remaining 10% of the sample as a test set;

3) constructing a convolutional neural network model for completing the feature extraction and the water content value prediction of the fluid sample;

4) and optimizing, training and adjusting parameters of the convolutional neural network model to obtain the optimal convolutional neural network model under the current architecture, and completing parameter measurement.

An application of a water content measuring method based on deep learning in oil well exploitation comprises the following steps:

(1) starting a four-sector conductivity sensor, measuring fluid data of oil-water two-phase flow in a wellhead oil-gas pipeline, uploading the fluid data to an upper computer, and obtaining a sample at the current moment according to the water content measuring method based on deep learning;

(2) taking the current time sample as the input of a convolutional neural network model, and obtaining the water content output of the current sample through the calculation and analysis of the convolutional neural network model;

(3) the water content output is associated with the corresponding sample and stored in an upper computer as the current processing information;

(4) and (4) repeating the steps (2) to (3), continuously obtaining the water content value corresponding to the fluid sample in real time, storing the water content value as the state information of the current wellhead oil and gas pipeline until the four-sector conductivity sensor is closed, and analyzing historical data to obtain the total water content in the measuring time.

According to the deep learning-based water content measuring method and the application thereof in oil well exploitation, the oil-water two-phase flow water content measuring model is combined with the four-sector conductivity sensor, and the water content measuring system is constructed together with the storage module and the display module, so that the water content value of the oil-water two-phase flow under a wellhead environment can be accurately measured in real time and stored, the accuracy of water content measurement is improved, and a beneficial thought is provided for solving the problem of water content measurement of the oil-water two-phase flow.

Drawings

FIG. 1 is a flow chart of the method for measuring moisture content based on deep learning of the present invention;

FIG. 2 is a schematic diagram of a four-sector conductivity sensor of the present invention for acquiring a multi-channel fluid signal;

in the figures, 1-4: an excitation electrode; 5-8: a signal acquisition electrode;

FIG. 3 is a flow chart of the convolutional neural network model construction for measuring water cut of the present invention;

fig. 4 is a convolutional neural network architecture based on a four-sector fluid signal of the present invention.

Detailed Description

The deep learning-based water cut measuring system and the application thereof in oil well exploitation are described in detail below with reference to the embodiments and the accompanying drawings.

The water content measuring method based on deep learning uses the deep learning method of the convolutional neural network to train on four-sector experimental data of vertical oil-water two-phase flow, obtains a model capable of accurately measuring the water content in real time, is deployed in a water content measuring system, solves the problems of complex change and difficult prediction of fluid signals to a certain extent, and can apply the measuring system to the actual wellhead environment for field measurement.

As shown in FIG. 1, the method for measuring moisture content based on deep learning of the present invention comprises the following steps:

1) collecting fluid data of different working conditions in a wellhead oil and gas pipeline by using a four-sector conductivity sensor shown in figure 2, acquiring a label, and uploading the label to an upper computer for storage; the method comprises the following steps:

(1) the four-sector conductivity sensor arranged on the transparent pipe section is connected with a wellhead oil and gas acquisition pipeline through a flange, fluid data of oil-water two-phase flow under different working conditions in the wellhead oil and gas pipeline are acquired, the measurement time is 20min, the sampling frequency of the sensor is 2000Hz, and the data are uploaded to an upper computer for storage;

(2) collecting an oil-water sample flowing through a transparent pipe section in the working time of the four-sector conductivity sensor to obtain a water content label of the oil-water sample, determining the overall range of the water content according to the characteristics of an oil well, taking 3% of the water content in the overall range as a step point, and selecting fluid data for subsequent model training.

2) Constructing a data set, specifically, after preprocessing fluid data, obtaining a sample from the fluid data by using a sliding window with overlap, adding a corresponding label to the sample, taking 80% of the sample as a training set, 10% of the sample as a verification set, and taking the remaining 10% of the sample as a test set; the method comprises the following steps:

(1) fluid data is pre-processed, with the following formula:

Figure BDA0002517563560000031

wherein the content of the first and second substances,is the ith fluid data of the jth sector,

Figure BDA0002517563560000033

andrespectively the mean and standard deviation of the j-th sector fluid data,the ith fluid data of the preprocessed jth sector;

(2) intercepting fluid data of each working condition as a single sample through a sliding window with overlap, wherein the label of the sample refers to a water content label, each group of water content labels is regarded as one type, obtaining a class label of the sample, and setting the length of the sliding window as M and the overlap rate as PoThen the single sample is a two-dimensional matrix of M × 4, obtained in the length L of the fluid dataA sample of, wherein,the representative data is rounded down, and N samples of the fluid data under all working conditions are obtained;

in the embodiment of the present invention, the length of the sliding window used is 3000, the overlap ratio is 35%, then a single sample is a two-dimensional matrix of 3000 × 4, 1230 samples can be cut out from the signal with the length of L, and a total of 13530 data samples are obtained from 11 operating conditions.

(3) Randomly using 80% of N samples as training set, 10% as verification set and the rest 10% as test set.

3) Constructing a convolutional neural network model for completing the feature extraction and the water content value prediction of the fluid sample;

the convolutional neural network model is used for extracting spatial information and time domain characteristics in two-phase flow data and measuring the water content through a multi-task output module, as shown in fig. 3; the convolutional neural network model has 19 layers as shown in FIG. 4, and comprises 4 convolutional modules and 1 multitask output module; the layers 1-4 are first convolution modules, the layers 5-8 are second convolution modules, the layers 9-12 are third convolution modules, the layers 13-15 are fourth convolution modules, and the layers 16-19 are multitask output modules. Wherein the content of the first and second substances,

A) the first convolution module, the second convolution module and the third convolution module have the same structure and respectively comprise: a temporal convolution layer, a spatial convolution layer, an average pooling layer, and a discard layer; the fourth convolution module comprises the following components which are connected in sequence: a temporal convolution layer, a spatial convolution layer, and a discard layer; wherein the content of the first and second substances,

(1) the time convolution layer is used for filtering the four-channel samples along the time dimension and extracting time domain characteristics; the time convolution layer uses

Figure BDA0002517563560000038

Each convolution kernel is corresponding to a first convolution module, a second convolution module, a third convolution module and a fourth convolution module, wherein k is 1,2,3 and 4, and different feature maps are obtained after each convolution kernel and the input sample are subjected to convolution operation to obtain the different feature mapsA feature map; the formula for this layer convolution is as follows:

wherein the content of the first and second substances,

Figure BDA0002517563560000043

is an input for the time convolution layer,is a characteristic map of the time convolution layer output, fTIs the activation function of the time convolution layer, kTIndex of points in the convolution kernel for time convolution layer, GTFeature dimension, g, input for time convolution layerTThe feature index input for the time convolution layer,and

Figure BDA0002517563560000046

respectively, the p-th in the time convolution layerTA convolution kernel and an offset, and,is the size of the time convolution layer convolution kernel, where k is 1,2,3,4, corresponding to the first, second, third and fourth convolution modules, respectively, StTIs the step size of the time convolution layer convolution kernel, subTSubscript shorthand for time convolution layer input, mT,nTA location index of features extracted for the time convolution layer;

the boundary value is extended by complementing 0, and the size of each feature graph is IT/StT×STIn which IT,STIs the dimension of the time convolution layer input; carrying out batch normalization processing on the convolved features to accelerate convergence;

in the embodiment of the present invention, the step size of the convolution kernel used by the time convolution layer is 1, and the activation function is Relu. The time convolution layer in the first convolution module uses 20 convolution kernels, the size of the time convolution layer is 30, the time convolution layer in the second convolution module uses 20 convolution kernels, the size of the time convolution layer is 30, the time convolution layer in the third convolution module uses 20 convolution kernels, the size of the time convolution layer is 10, and the time convolution layer in the fourth convolution module uses 20 convolution kernels, the size of the time convolution layer is 10.

(2) The space convolution layer is used for following the space dimensionIntegrating the samples of the four channels to obtain spatial information; the space convolution layer is used

Figure BDA0002517563560000048

A convolution kernel, wherein k is 1,2,3,4, respectively corresponding to the first convolution module, the second convolution module, the third convolution module and the fourth convolution module,the convolution cores integrate the input feature maps to obtain a total

Figure BDA00025175635600000410

The characteristic diagram is as follows:

Figure BDA00025175635600000412

wherein the content of the first and second substances,is an input for the space convolution layer,

Figure BDA00025175635600000414

is a characteristic map of the space convolution layer output, fCIs the activation function of the space convolution layer, kCIndex of points in convolution kernel for spatial convolution layer, GCFeature dimension, g, input for space convolution layerCThe feature index input for the spatial convolution layer,

Figure BDA00025175635600000415

andrespectively being the p-th in the space convolution layerCA convolution kernel and an offset, LeCAnd StCRespectively, size and step size of the convolution kernel of the space convolution layer,subCSubscript abbreviation, m, of space convolution layer inputC,nCA location index of features extracted for the spatial convolution layer;

the input boundary value is extended by complementing 0, and the size of each feature map is IC/StC×SCIn which IC,SCThe dimension of the input dimension of the space convolution layer is used for carrying out batch normalization processing on the feature graph after convolution so as to accelerate convergence;

in the embodiment of the present invention, the size of the convolution kernel used by the spatial convolution layer is 4, the step size is 1, and the activation function is Relu. The space convolution layer in the first convolution module uses 20 convolution kernels, the space convolution layer in the second convolution module uses 20 convolution kernels, the space convolution layer in the third convolution module uses 20 convolution kernels, and the space convolution layer in the fourth convolution module uses 20 convolution kernels.

(3) The average pooling layer is used for selecting representative values in the pooling region to reduce feature dimensionality, remove redundant information and simplify subsequent calculation, and a formula is described as follows:

wherein the content of the first and second substances,to average out the characteristics of the pooled layer output,in order to average the inputs to the pooling layer,

Figure BDA0002517563560000054

for averaging the size of the pooling kernel, where k is 1,2,3, corresponding to the first, second and third convolution modules, gA,mA,nAIndex for average pooling layer characteristics, kAAn index of points in the average pooled kernel;

in the embodiment of the present invention, the pooling kernel size of the first convolution module is 5, the pooling kernel size of the second convolution module is 5, and the pooling kernel size of the third convolution module is 3.

(4) And a discarding layer, wherein a part of neurons and connections thereof are discarded randomly according to a discarding rate, so that the dense neural network model is forced to learn more global characteristics. In the present embodiment, the discard rate is set to 0.4.

B) The multitask output module comprises a flattening layer, a discarding layer and a full connection layer which are sequentially connected, wherein the output of the full connection layer is respectively connected with a numerical value full connection layer and an auxiliary full connection layer; wherein:

(1) the flattening layer is used for integrating the input multi-dimensional features into one-dimensional comprehensive information, so that the features which have important influence on the water content measurement can be conveniently obtained in the subsequent processing; the output dimension of the layer is IF×SF×NFIn which IF,SFIs the dimension of the size of the input of the flattening layer, NFIs the number dimension of the flattening layer input;

(2) the discarding layer discards part of neurons and connection thereof randomly according to a discarding rate, and the output dimension is N1 DHaving N of1 D=IF×SF×NF

(3) The full connection layer obtains brand new output characteristics by weighting and recombining the input characteristics; in the output characteristics, the effective characteristics are enhanced, and the formula is as follows:

wherein the content of the first and second substances,

Figure BDA0002517563560000056

for the features of the full link layer output,for input of full connection layer, fDFor the activation function of the fully connected layer,

Figure BDA0002517563560000058

the number of neurons input to the fully connected layer,weight and offset, k, of the full connection layer, respectivelyDInput index, g, for the full connection layerDThe index is output for the full-link layer,is the number of output neurons;

in the embodiment of the present invention, the activation function Relu of the fully-connected layer is 50 for the number of fully-connected layer output neurons.

(4) The numerical fully-connected layer is provided with 1 neuron, and the activation function of the layer is Sigmoid; the auxiliary full connection layer has Nu19And (4) a neuron, wherein the layer activation function is Softmax.

In the present example, the number of auxiliary full-link layer neurons was set to 11.

4) Optimizing, training and adjusting parameters of the convolutional neural network model to obtain the optimal convolutional neural network model under the current architecture, and completing parameter measurement; the method comprises the following steps:

(1) constructing a loss function between a label and an output of the convolutional neural network model, describing a difference between the label and the output by using the loss function, and guiding the optimization of the convolutional neural network model by taking the minimum difference as a principle; loss L of the convolutional neural network modeltotalComprises two parts, respectively: a) loss of numerically fully connected layers LpredSelecting a Mean Absolute Error (MAE) as a loss function; b) loss L of auxiliary full link layerclaSelecting a cross entropy loss function; loss LtotalThe expression is as follows:

Figure BDA0002517563560000061

Lcla=-∑p(x)×log q(x)

Ltotal=α×Lpred+β×Lcla

wherein, yi,Respectively the label and the output of the water content of the convolutional neural network model, n is the number of samples, p (x), q (x) are respectively the probability distribution of the class label and the class output, α is the weight of the two-part loss function;

in the present embodiment, α is set to 10 and β is set to 0.8.

(2) Setting parameters of each layer in the convolutional neural network model, performing iterative training on the weight of the convolutional neural network model under the parameter combination by adopting a gradient descent method based on adam (adaptive motion), and updating the weight of the network by a gradient back propagation method; during training, the learning rate is set to LrThe number of running steps is set to nepoch

In the embodiment of the present invention, the learning rate is set to 0.005 and the number of operation steps is set to 200.

(3) And optimizing the parameter setting of the convolutional neural network model according to the performance of the convolutional neural network model on the verification set under different parameter combinations, so that the performance of the convolutional neural network model on the verification set is continuously improved, the optimal convolutional neural network model weight is obtained, and the moisture content parameter measurement is completed.

The application of the water content measuring method based on deep learning in oil well exploitation comprises the following steps:

(1) starting a four-sector conductivity sensor, measuring fluid data of oil-water two-phase flow in a wellhead oil-gas pipeline, uploading the fluid data to an upper computer, and obtaining a sample at the current moment according to the water content measuring method based on deep learning;

(2) taking the current time sample as the input of a convolutional neural network model, and obtaining the water content output of the current sample through the calculation and analysis of the convolutional neural network model;

(3) the water content output is associated with the corresponding sample and stored in an upper computer as the current processing information;

(4) and (4) repeating the steps (2) to (3), continuously obtaining the water content value corresponding to the fluid sample in real time, storing the water content value as the state information of the current wellhead oil and gas pipeline until the four-sector conductivity sensor is closed, and analyzing historical data to obtain the total water content in the measuring time.

The above description of the present invention and the embodiments is not limited thereto, and the description of the embodiments is only one of the implementation manners of the present invention, and any structure or embodiment similar to the technical solution without inventive design is within the protection scope of the present invention without departing from the inventive spirit of the present invention.

14页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种乙醇传感器、合成方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类