CN116337946A - Device and method for measuring water content of crude oil based on GRU neural network model - Google Patents
Device and method for measuring water content of crude oil based on GRU neural network model Download PDFInfo
- Publication number
- CN116337946A CN116337946A CN202310264018.1A CN202310264018A CN116337946A CN 116337946 A CN116337946 A CN 116337946A CN 202310264018 A CN202310264018 A CN 202310264018A CN 116337946 A CN116337946 A CN 116337946A
- Authority
- CN
- China
- Prior art keywords
- neural network
- measuring
- network model
- water content
- circuit
- 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.)
- Pending
Links
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 title claims abstract description 57
- 238000003062 neural network model Methods 0.000 title claims abstract description 51
- 239000010779 crude oil Substances 0.000 title claims abstract description 48
- 238000000034 method Methods 0.000 title claims abstract description 25
- 238000012545 processing Methods 0.000 claims abstract description 41
- 230000005284 excitation Effects 0.000 claims abstract description 37
- 238000005259 measurement Methods 0.000 claims abstract description 35
- 238000012544 monitoring process Methods 0.000 claims abstract description 23
- 239000012530 fluid Substances 0.000 claims abstract description 7
- 238000005070 sampling Methods 0.000 claims description 32
- 238000012549 training Methods 0.000 claims description 23
- 238000011176 pooling Methods 0.000 claims description 12
- 230000005684 electric field Effects 0.000 claims description 4
- 229910001220 stainless steel Inorganic materials 0.000 claims description 4
- 239000010935 stainless steel Substances 0.000 claims description 4
- 238000012360 testing method Methods 0.000 claims description 4
- 230000001133 acceleration Effects 0.000 claims description 3
- 230000003321 amplification Effects 0.000 claims description 3
- 238000003199 nucleic acid amplification method Methods 0.000 claims description 3
- 238000006243 chemical reaction Methods 0.000 abstract description 2
- 238000005265 energy consumption Methods 0.000 abstract description 2
- 238000013528 artificial neural network Methods 0.000 description 7
- 238000001514 detection method Methods 0.000 description 6
- 238000004519 manufacturing process Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 239000002184 metal Substances 0.000 description 4
- 230000005405 multipole Effects 0.000 description 4
- 239000003921 oil Substances 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 238000003860 storage Methods 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 230000015572 biosynthetic process Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000013527 convolutional neural network Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000018109 developmental process Effects 0.000 description 2
- 238000003786 synthesis reaction Methods 0.000 description 2
- 230000005514 two-phase flow Effects 0.000 description 2
- ORILYTVJVMAKLC-UHFFFAOYSA-N Adamantane Natural products C1C(C2)CC3CC1CC2C3 ORILYTVJVMAKLC-UHFFFAOYSA-N 0.000 description 1
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000009825 accumulation Methods 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000033558 biomineral tissue development Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000005260 corrosion Methods 0.000 description 1
- 230000007797 corrosion Effects 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 238000013178 mathematical model Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002035 prolonged effect Effects 0.000 description 1
- 230000000306 recurrent effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N27/00—Investigating or analysing materials by the use of electric, electrochemical, or magnetic means
- G01N27/02—Investigating or analysing materials by the use of electric, electrochemical, or magnetic means by investigating impedance
- G01N27/04—Investigating or analysing materials by the use of electric, electrochemical, or magnetic means by investigating impedance by investigating resistance
- G01N27/06—Investigating or analysing materials by the use of electric, electrochemical, or magnetic means by investigating impedance by investigating resistance of a liquid
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N27/00—Investigating or analysing materials by the use of electric, electrochemical, or magnetic means
- G01N27/02—Investigating or analysing materials by the use of electric, electrochemical, or magnetic means by investigating impedance
- G01N27/04—Investigating or analysing materials by the use of electric, electrochemical, or magnetic means by investigating impedance by investigating resistance
- G01N27/045—Circuits
- G01N27/046—Circuits provided with temperature compensation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/044—Recurrent networks, e.g. Hopfield networks
- G06N3/0442—Recurrent networks, e.g. Hopfield networks characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A90/00—Technologies having an indirect contribution to adaptation to climate change
- Y02A90/30—Assessment of water resources
Abstract
The invention relates to the technical field of fluid measurement, in particular to a device and a method for measuring the water content of crude oil based on a GRU neural network model. The device comprises a longitudinal five-electrode array sensor, a front-end signal processing and measuring circuit module, a microprocessor control module and a temperature monitoring module; the longitudinal five-electrode array sensor is connected with the front-end signal processing and measuring circuit module, and the front-end signal processing and measuring circuit module is connected with the microprocessor control module; the microprocessor control module is connected with the temperature monitoring module, and the temperature monitoring module is connected with the longitudinal five-electrode array sensor. The invention adopts a microprocessor control module as a main controller and combines various conversion circuits to finish the measurement of signal excitation, phase content and related flow rate. Low energy consumption, strong anti-interference capability and high automation degree.
Description
Technical Field
The invention relates to the technical field of fluid measurement, in particular to a device and a method for measuring the water content of crude oil based on a GRU neural network model.
Background
The water content of the crude oil is important data of crude oil production and storage and transportation, is also an important parameter index for researching the development condition of an oil field, and is very important in the process of crude oil production and storage and transportation. The water content of crude oil is a complex parameter which is easily influenced by multiple factors, and uncertain relations exist among factors, so that the crude oil is difficult to characterize by a unified mathematical model or formula. The single algorithm has own limitation, so that the existing online instrument is difficult to achieve the accuracy of sampling detection, and the development of a crude oil water content measuring method is limited. The water content of the produced crude oil is higher at the end of the exploitation of the oil field, the change amplitude of the water content of wellhead sampling is larger, and the difficulty of manual sampling is increased. The manual sampling measurement has higher precision, but the sampling period is long, the change of the water content of the extracted crude oil can not be mastered in real time to meet the requirements of production, storage and transportation, and the automatic production can not be met. The on-line instrument can realize real-time measurement, but is difficult to meet the requirements of reliability and stability of actual production of oil fields under the action of external influencing factors such as temperature, mineralization degree and the like. Therefore, the research of the method for measuring the water content of the crude oil is a key for improving the precision of the crude oil water content detection instrument and the automatic production level.
Disclosure of Invention
In view of the defects and shortcomings of the prior art, the invention provides a crude oil water content measuring device and method based on a GRU neural network model, which solve the technical problems of long measuring period and low precision in the prior art.
In order to achieve the above purpose, the main technical scheme adopted by the invention comprises the following steps:
in one aspect, the invention provides a crude oil water content measuring device based on a GRU neural network model, which comprises a longitudinal five-electrode array sensor, a front-end signal processing measuring circuit module, a microprocessor control module and a temperature monitoring module; the longitudinal five-electrode array sensor is connected with the front-end signal processing and measuring circuit module, and the front-end signal processing and measuring circuit module is connected with the microprocessor control module; the microprocessor control module is connected with the temperature monitoring module, and the temperature monitoring module is connected with the longitudinal five-electrode array sensor.
Further, the longitudinal five-electrode array sensor comprises a cylinder, a pair of excitation electrodes, a pair of related flow rate measuring electrodes and an independent phase content measuring electrode, wherein the excitation electrodes, the pair of related flow rate measuring electrodes and the independent phase content measuring electrode are sleeved on the cylinder; the excitation electrodes are arranged at two ends of the cylinder, the related flow velocity measurement electrodes are arranged on the cylinder at the inner side of the excitation electrodes, and the phase content measurement electrodes are arranged in the middle of the cylinder; the excitation electrode is connected with the front-end signal processing and measuring circuit module; the related flow velocity measuring electrode is connected with the front-end signal processing measuring circuit module; the phase content measuring electrode is respectively connected with the front-end signal processing measuring circuit module and the temperature monitoring module.
Further, the excitation electrode, the related flow rate measurement electrode and the phase content measurement electrode are all made of stainless steel rings.
Further, the front-end signal processing and measuring circuit module comprises a signal generating circuit, a differential amplifying circuit, a limiting circuit and an ADC sampling circuit; the signal generating circuit is connected with the excitation electrode through the differential amplifying circuit; the differential amplification circuit is connected with the amplitude limiting circuit, the amplitude limiting circuit is connected with the ADC sampling circuit, and the ADC sampling circuit is connected with the microprocessor control module.
Further, the microprocessor control module is a single chip microcomputer, the microprocessor control module is connected with the ADC sampling circuit, and the other end of the ADC sampling circuit is connected with the front-end signal processing and measuring circuit module; and the microprocessor control module is used for completing measurement of the water content of the crude oil by utilizing a cross-correlation flow rate algorithm based on Fourier transform of the DSP library and a water content algorithm based on Fourier transform of the DSP library.
Further, the temperature monitoring module comprises an analog quantity output temperature sensor, a constant current source circuit and an OLED screen; the analog output temperature sensor is connected with the constant current source circuit, and the OLED screen is connected with the microprocessor control module.
On the other hand, the invention provides a crude oil water content measuring method based on a GRU neural network model, which comprises the following steps:
s1, supplying alternating current with the amplitude of 5V and the output frequency of 18KHz to an excitation electrode of a longitudinal five-electrode array sensor as an excitation power supply of the longitudinal five-electrode array sensor;
s2, when fluid flows through the longitudinal five-electrode array sensor, an electric field generated by a pair of excitation electrodes generates weak signals at the phase-content measuring electrodes, after the weak signals are processed by the front-end signal processing and measuring circuit module, the signals are processed by the ADC sampling circuit to obtain an array composed of 4096 voltage elements, the array is subjected to fast Fourier transform based on the number of points of a DSP library of 4096 by adopting a GRU neural network model, the water-content information of crude oil is intensively distributed in a certain fixed frequency section, and the measurement of the phase-content can be completed by calibrating according to the water-content data;
and S3, calculating by adopting a microprocessor control module and utilizing a cross-correlation flow rate algorithm based on FFT acceleration of a DSP library and a water content algorithm based on FFT of the DSP library, and outputting a result value to an OLED screen of the temperature monitoring module.
Further, in step S2: the GRU neural network model specifically comprises:
s21, training data: training 4096 voltage elements acquired by the ADC sampling circuit in the GRU neural network model as a training set; the convolution layer is provided with a 125 multiplied by 1 large-size convolution kernel, the GUR neural network model uses overlapped pooling with the pooling kernel length being larger than the step length, the pooling kernel sizes are 5 multiplied by 1 and 3 multiplied by 1 respectively, and two pooling layer step lengths are set as 2, so that a preliminary model is obtained;
s22, model training: the essence of the water content data measurement through the GRU neural network model is to classify the key features of the extracted corresponding samples, and a logarithmic loss function is used for measuring the difference between the predicted value and the input true value; defining a GRU neural network model final loss function L, and then the hidden layer gradient is as follows:
the gradients corresponding to the different parameter matrixes are calculated:
s23, evaluating model performance: the GRU neural network model carries out self-adaptive crude oil water content measurement on the acquired phase content signals, firstly, a divided data set is input into the GRU neural network model for training, parameters are adjusted through a self-adaptive moment estimation algorithm, the GRU neural network model is converged, and the model is stored after an optimal training result is obtained; and then, measuring the water content of crude oil on the test set, and analyzing and diagnosing results to verify the effectiveness of the GRU neural network model.
Further, in step S3: outputting a result value to an OLED screen of the temperature monitoring module, wherein the result value is specifically as follows: and sending the temperature value detected by the analog quantity output temperature sensor to a microprocessor control module for processing through an ADC sampling circuit and a constant current source circuit, and outputting the result to an OLED screen.
The invention provides a crude oil water content measuring device and method based on a GRU neural network model, and compared with the prior art, the invention has the beneficial effects that:
1. the crude oil water content measuring method based on the GRU neural network model has good data processing effect, and the GRU neural network model algorithm is utilized to predict the phase content of the oil-water two-phase flow of the vertical riser. The experimental data under various working conditions are processed, the characteristic quantity is extracted in the time domain and the frequency domain respectively, then the GRU neural network model is utilized for analysis, and the water content prediction result with higher precision is obtained.
2. The invention adopts a singlechip as a main controller, and completes the measurement of signal excitation, phase content and related flow rate by combining various conversion circuits. Low energy consumption, strong anti-interference capability and high automation degree.
3. According to the invention, the stainless steel metal ring is adopted, and the 18KHz sinusoidal signal is adopted as an excitation signal in consideration of ionization, so that the corrosion problem of the metal ring is effectively prevented, and the service life of the sensor is prolonged.
Drawings
FIG. 1 is a schematic diagram of a conductive longitudinal multipole array sensor according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of the structure and functional modules of a conductive longitudinal multipole array sensor according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a signal excitation circuit of a conductive longitudinal multipole array sensor according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a signal processing circuit of a conductive longitudinal multipole array sensor according to an embodiment of the present invention.
In the figure: 1. a cylinder; 2. an excitation electrode; 3. a related flow rate measurement electrode; 4. phase content measuring electrode.
Detailed Description
The present invention will be described in detail below with reference to specific embodiments for better explaining the present invention.
The invention provides a crude oil water content measuring device and method based on a GRU neural network model, which are used for improving the measurement accuracy of crude oil water content based on an embedded system combined with five metal rings arranged on a pipeline as detection sensors. The five metal rings include: a pair of excitation electrodes, a pair of relative flow rate measurement electrodes, and an independent phase content measurement electrode. At the same time, a temperature detection system is designed for correcting the influence of temperature on the conductivity.
Example 1:
referring to fig. 1 to 3, the invention provides a crude oil water content measuring device based on a GRU neural network model. The crude oil water content measuring device based on the GRU neural network model comprises a longitudinal five-electrode array sensor, a front-end signal processing and measuring circuit module, a microprocessor control module and a temperature monitoring module. The longitudinal five-electrode array sensor is connected with a front-end signal processing and measuring circuit module, and the front-end signal processing and measuring circuit module is connected with a microprocessor control module. The microprocessor control module is connected with the temperature monitoring module, and the temperature monitoring module is connected with the longitudinal five-electrode array sensor.
Specifically, the longitudinal five-electrode array sensor comprises a cylinder 1, a pair of excitation electrodes 2 sleeved on the cylinder 1, a pair of related flow rate measurement electrodes 3 and an independent phase content measurement electrode 4. Wherein the excitation electrodes 2 are arranged at two ends of the cylinder 1, the related flow velocity measurement electrodes 3 are arranged on the cylinder 1 inside the excitation electrodes 2, and the phase content measurement electrodes 4 are arranged in the middle of the cylinder 1. The exciting electrode 2 is connected with a front-end signal processing and measuring circuit module. The relevant flow rate measuring electrode 3 is connected with the front-end signal processing measuring circuit module. The phase content measuring electrode 4 is respectively connected with the front-end signal processing measuring circuit module and the temperature monitoring module. When the crude oil with water flows through the longitudinal five-electrode array sensor, the equivalent impedance of the longitudinal five-electrode array sensor depends on the water content of the crude oil. Thus, when an excitation voltage signal is applied between the excitation electrodes of the longitudinal five-electrode array sensor, a voltage signal is also output between the relevant flow rate measurement electrodes, and the amplitude of the voltage signal is related to the water content.
The exciting electrode, the related flow velocity measuring electrode and the phase content measuring electrode are all made of stainless steel circular rings.
Specifically, the front-end signal processing and measuring circuit module comprises a signal generating circuit and a signal detecting circuit, wherein the signal detecting circuit comprises a differential amplifying circuit, a limiting circuit and an ADC sampling circuit; the model of the ADC sampling circuit is AD7906. The signal generating circuit is connected with the excitation electrode through the differential amplifying circuit; the differential amplifying circuit is connected with the amplitude limiting circuit, the amplitude limiting circuit is connected with the ADC sampling circuit, and the ADC sampling circuit is connected with the microprocessor control module.
The signal generating circuit is composed of a direct digital frequency synthesis high-frequency waveform generator, a direct digital fitting (DDS) chip is adopted to generate a high-frequency sinusoidal voltage source, and a voltage-controlled current source (VCCS) is utilized to convert a sinusoidal voltage signal into a sinusoidal current excitation source signal.
The signal detection circuit comprises a differential amplification circuit, a limiting circuit and an ADC sampling circuit, and is used for amplifying an input signal, eliminating high-frequency noise generated by the DDS chip and collecting data.
Those skilled in the art will appreciate that other similar demodulation schemes may implement the present invention. Such as PXI-4472 data communication acquisition cards.
Specifically, the microprocessor control module is a single-chip microcomputer, and the model of the single-chip microcomputer is STM32F107. The microprocessor control module is connected with the ADC sampling circuit, and the other end of the ADC sampling circuit is connected with the front-end signal processing and measuring circuit module; and the microprocessor control module is used for completing the measurement of the water content of the crude oil by utilizing a cross-correlation flow rate algorithm based on Fourier transform of the DSP library and a water content algorithm based on Fourier transform of the DSP library.
Specifically, the temperature monitoring module comprises an analog output temperature sensor, a constant current source circuit and an OLED screen; the analog output temperature sensor is connected with the constant current source circuit, and the OLED screen is connected with the microprocessor control module. The model of the constant current source circuit is XTR105.
When the measuring device works, a sine signal of 18KHz is generated by direct digital frequency synthesis and is used as an excitation signal, and the microprocessor control module periodically generates an interrupt signal to control the signal generating circuit to output strictly symmetrical excitation voltage signals to the longitudinal five-electrode array sensor; the measuring signals output by the relevant flow velocity measuring electrodes of the longitudinal five-electrode array sensor are directly input into a signal detection circuit to be subjected to effective value processing, and then are fed back to a microprocessor control module to be subjected to data fitting; the signal generating circuit can discharge at fixed time according to the signal provided by the microprocessor control module, so as to eliminate charge accumulation and improve measurement accuracy.
Example 2:
the invention provides a crude oil water content measuring method based on a GRU neural network model, which comprises the following steps:
s1, supplying alternating current with the amplitude of 5V and the output frequency of 18KHz to an excitation electrode of a longitudinal five-electrode array sensor as an excitation power supply of the longitudinal five-electrode array sensor;
s2, when fluid flows through the longitudinal five-electrode array sensor, an electric field generated by the pair of excitation electrodes can generate abnormal complex distortion and deformation due to oil bubbles randomly distributed in two-phase fluid, so that a pair of related flow velocity measurement electrodes respectively detect flow velocity related signals, the signals are identical in frequency and amplitude, only different in phase, and the flow velocity relation can be measured by utilizing the phase relation. Specifically, when fluid flows through the longitudinal five-electrode array sensor, an electric field generated by a pair of excitation electrodes generates weak signals at the phase-content measuring electrodes, after the weak signals are processed by the front-end signal processing and measuring circuit module, the signals are processed by the ADC sampling circuit to obtain an array composed of 4096 voltage elements, the array is subjected to fast Fourier transform based on the number of points of a DSP library of 4096 by adopting a GRU neural network model, the crude oil water-content information is intensively distributed in a certain fixed frequency section, and the measurement of the phase-content can be completed by calibrating according to the water-content data;
s3, calculating by adopting a microprocessor control module and utilizing a cross-correlation flow rate algorithm based on FFT acceleration of a DSP library and an FFT water content algorithm based on the DSP library; and sending the temperature value detected by the analog output temperature sensor to an STM32F107 singlechip for processing through an ADC sampling circuit and an XTR105 constant current source circuit, and outputting the result to an OLED screen.
The signal detected by the phase content measuring electrode contains historical data about the phase content and is a relation curve about the voltage and the phase content, and a neural network is needed to process the data because the time for processing the data is long. The present invention uses a GRU neural network to solve this problem.
Firstly, to collect relevant historical data, the invention divides the historical data into two parts according to date and time: some are the last 4096 pieces of history data, and some are the last 4096 pieces of history data. In order to make the GRU neural network more convenient in processing, the invention takes the first 4096 data as training sets and the last 4096 data as test sets. Since the last 4096 pieces of data are not representative, modeling is performed using nearest neighbor (Neural Network). The first 4096 historical samples contained most of the variables related to phase content. The invention uses a gated loop unit (Gated Recurrent Unit, GRU) in the GRU neural network model to process this portion of the sample.
Because the historical data are collected, the training of the last month data is only needed to obtain good effect. This is a GRU neural network model consisting of LSTM networks. The method mainly comprises the following steps:
1. training data: the original acquisition voltage is acquired and used as a training set, and then the part is trained in the GRU neural network to obtain a preliminary model.
2. Initializing: the preliminary model is then input into a neural network for training, with parameters adjusted to obtain optimal performance. If a GRU neural network is used, this process can be used as a Convolutional Neural Network (CNN). And finally, finishing the data processing of the phase content.
Specifically, in step S2: the GRU neural network model specifically comprises:
s21, training data: 4096 voltage elements acquired by the ADC sampling circuit are used as a training set to train in the GRU network model. The convolution layer designs a 125 multiplied by 1 large-size convolution kernel, accelerates the convergence speed of the model, and in order to prevent local key features from being missed in the convolution process, the GUR network model uses overlapped pooling with the pooling kernel length being larger than the step length, the pooling kernel sizes are 5 multiplied by 1 and 3 multiplied by 1 respectively, and the step length of two pooling layers is set as 2, so that a preliminary model is obtained;
s22, model training: the GRU network model training aims to continuously update weight information and fit the data distribution of input samples. The essence of the water cut data measurement by the GRU network model is to extract the key features of the corresponding sample and classify it, so a logarithmic loss function is used to measure the difference between the predicted value and the input true value. Defining a final loss function L of the model, and then the gradient of the hidden layer is as follows:
the gradients corresponding to the different parameter matrixes are calculated:
s23, evaluating model performance: the GRU method carries out self-adaptive crude oil water content measurement on the acquired phase content signals, firstly, the divided data sets are input into a model for training, the model is converged by adjusting parameters through a self-adaptive moment estimation algorithm (Adam), and the model is stored after the optimal training result is obtained. And then, measuring the water content of crude oil on the test set, and analyzing and diagnosing results to verify the effectiveness of the GRU method. The GRU method is constructed based on a TensorFlow deep learning framework developed by Google corporation, the version number is TensorFlow-2.1.0, an experimental model is developed by Python3.6 programming language, and the experimental model is deployed on an Intel I7-6900K CPU computer.
Specifically, in step S3: outputting a result value to an OLED screen of the temperature monitoring module, wherein the result value is specifically as follows: the temperature value detected by the analog quantity output temperature sensor is sent to the microprocessor control module for processing through the ADC sampling circuit and the constant current source circuit, and the result is output to the OLED screen
On the curtain.
The crude oil water content measuring method based on the GRU neural network model has good data processing effect, and the GRU neural network model algorithm is utilized to predict the phase content of the oil-water two-phase flow of the vertical riser. The experimental data under various working conditions are processed, the characteristic quantity is extracted in the time domain and the frequency domain respectively, then the GRU neural network model is utilized for analysis, and the water content prediction result with higher precision is obtained.
While certain exemplary embodiments of the present invention have been described above by way of illustration only, it will be apparent to those of ordinary skill in the art that modifications may be made to the described embodiments in various different ways without departing from the spirit and scope of the invention. Accordingly, the drawings and description are to be regarded as illustrative in nature and not as restrictive of the scope of the invention, which is defined by the appended claims.
Claims (9)
1. The crude oil water content measuring device based on the GRU neural network model is characterized by comprising a longitudinal five-electrode array sensor, a front-end signal processing and measuring circuit module, a microprocessor control module and a temperature monitoring module; the longitudinal five-electrode array sensor is connected with the front-end signal processing and measuring circuit module, and the front-end signal processing and measuring circuit module is connected with the microprocessor control module; the microprocessor control module is connected with the temperature monitoring module, and the temperature monitoring module is connected with the longitudinal five-electrode array sensor.
2. The crude oil water content measuring device based on the GRU neural network model according to claim 1, wherein the longitudinal five-electrode array sensor comprises a cylinder (1), a pair of excitation electrodes (2), a pair of related flow rate measuring electrodes (3) and an independent phase content measuring electrode (4) sleeved on the cylinder (1); the excitation electrodes (2) are arranged at two ends of the cylinder (1), the related flow velocity measurement electrodes (3) are arranged on the cylinder (1) at the inner side of the excitation electrodes (2), and the phase content measurement electrodes (4) are arranged at the middle part of the cylinder (1); the excitation electrode (2) is connected with the front-end signal processing and measuring circuit module; the related flow velocity measuring electrode (3) is connected with the front-end signal processing measuring circuit module; the phase content measuring electrode (4) is respectively connected with the front-end signal processing measuring circuit module and the temperature monitoring module.
3. The crude oil water content measuring device based on the GRU neural network model according to claim 2, wherein the exciting electrode (2), the related flow rate measuring electrode (3) and the phase content measuring electrode (4) are all made of stainless steel rings.
4. The crude oil water content measuring device based on the GRU neural network model according to claim 1, wherein the front-end signal processing measuring circuit module comprises a signal generating circuit, a differential amplifying circuit, a limiting circuit and an ADC sampling circuit; the signal generating circuit is connected with the excitation electrode (2) through the differential amplifying circuit; the differential amplification circuit is connected with the amplitude limiting circuit, the amplitude limiting circuit is connected with the ADC sampling circuit, and the ADC sampling circuit is connected with the microprocessor control module.
5. The device for measuring the water content of crude oil based on the GRU neural network model according to claim 4, wherein the microprocessor control module is a single chip microcomputer, the microprocessor control module is connected with the ADC sampling circuit, and the other end of the ADC sampling circuit is connected with the front-end signal processing and measuring circuit module; and the microprocessor control module is used for completing measurement of the water content of the crude oil by utilizing a cross-correlation flow rate algorithm based on Fourier transform of the DSP library and a water content algorithm based on Fourier transform of the DSP library.
6. The crude oil water content measuring device based on the GRU neural network model according to claim 1, wherein the temperature monitoring module comprises an analog output temperature sensor, a constant current source circuit and an OLED screen; the analog output temperature sensor is connected with the constant current source circuit, and the OLED screen is connected with the microprocessor control module.
7. The crude oil water content measuring method based on the GRU neural network model is characterized by comprising the following steps of:
s1, supplying alternating current with the amplitude of 5V and the output frequency of 18KHz to an excitation electrode of a longitudinal five-electrode array sensor as an excitation power supply of the longitudinal five-electrode array sensor;
s2, when fluid flows through the longitudinal five-electrode array sensor, an electric field generated by a pair of excitation electrodes generates weak signals at the phase-content measuring electrodes, after the weak signals are processed by the front-end signal processing and measuring circuit module, the signals are processed by the ADC sampling circuit to obtain an array composed of 4096 voltage elements, the array is subjected to fast Fourier transform based on the number of points of a DSP library of 4096 by adopting a GRU neural network model, the water-content information of crude oil is intensively distributed in a certain fixed frequency section, and the measurement of the phase-content can be completed by calibrating according to the water-content data;
and S3, calculating by adopting a microprocessor control module and utilizing a cross-correlation flow rate algorithm based on FFT acceleration of a DSP library and a water content algorithm based on FFT of the DSP library, and outputting a result value to an OLED screen of the temperature monitoring module.
8. The method for measuring the water content of crude oil based on the GRU neural network model according to claim 7, wherein in step S2: the GRU neural network model specifically comprises:
s21, training data: training 4096 voltage elements acquired by the ADC sampling circuit in the GRU neural network model as a training set; the convolution layer is provided with a 125 multiplied by 1 large-size convolution kernel, the GUR neural network model uses overlapped pooling with the pooling kernel length being larger than the step length, the pooling kernel sizes are 5 multiplied by 1 and 3 multiplied by 1 respectively, and two pooling layer step lengths are set as 2, so that a preliminary model is obtained;
s22, model training: the essence of the water content data measurement through the GRU neural network model is to classify the key features of the extracted corresponding samples, and a logarithmic loss function is used for measuring the difference between the predicted value and the input true value; defining a GRU neural network model final loss function L, and then the hidden layer gradient is as follows:
the gradients corresponding to the different parameter matrixes are calculated:
s23, evaluating model performance: the GRU neural network model carries out self-adaptive crude oil water content measurement on the acquired phase content signals, firstly, a divided data set is input into the GRU neural network model for training, parameters are adjusted through a self-adaptive moment estimation algorithm, the GRU neural network model is converged, and the model is stored after an optimal training result is obtained; and then, measuring the water content of crude oil on the test set, and analyzing and diagnosing results to verify the effectiveness of the GRU neural network model.
9. The method for measuring water content of crude oil based on the GRU neural network model according to claim 7, wherein in step S3: outputting a result value to an OLED screen of the temperature monitoring module, wherein the result value is specifically as follows: and sending the temperature value detected by the analog quantity output temperature sensor to a microprocessor control module for processing through an ADC sampling circuit and a constant current source circuit, and outputting the result to an OLED screen.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310264018.1A CN116337946A (en) | 2023-03-02 | 2023-03-02 | Device and method for measuring water content of crude oil based on GRU neural network model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310264018.1A CN116337946A (en) | 2023-03-02 | 2023-03-02 | Device and method for measuring water content of crude oil based on GRU neural network model |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116337946A true CN116337946A (en) | 2023-06-27 |
Family
ID=86875689
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310264018.1A Pending CN116337946A (en) | 2023-03-02 | 2023-03-02 | Device and method for measuring water content of crude oil based on GRU neural network model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116337946A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116540316A (en) * | 2023-07-06 | 2023-08-04 | 华设检测科技有限公司 | Geological soil layer testing method based on SVM classification algorithm and clustering algorithm |
-
2023
- 2023-03-02 CN CN202310264018.1A patent/CN116337946A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116540316A (en) * | 2023-07-06 | 2023-08-04 | 华设检测科技有限公司 | Geological soil layer testing method based on SVM classification algorithm and clustering algorithm |
CN116540316B (en) * | 2023-07-06 | 2023-09-01 | 华设检测科技有限公司 | Geological Soil Layer Testing Method Based on SVM Classification Algorithm and Clustering Algorithm |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102109451A (en) | Non-contact conductive gas/liquid two-phase flow pattern identifying device and method | |
CN116337946A (en) | Device and method for measuring water content of crude oil based on GRU neural network model | |
CN116933044B (en) | Intelligent processing method and system for power supply data | |
KR102409155B1 (en) | System for Predicting Groundwater Level based on LSTM | |
CN110261746B (en) | Cable defect detection method based on periodic attenuation characteristics of oscillating wave voltage | |
CN108549875A (en) | A kind of brain electricity epileptic attack detection method based on the perception of depth channel attention | |
Ma et al. | A novel broad learning system based leakage detection and universal localization method for pipeline networks | |
Wang et al. | Prediction model of natural gas pipeline crack evolution based on optimized DCNN-LSTM | |
CN111046327A (en) | Prony analysis method suitable for low-frequency oscillation and subsynchronous oscillation identification | |
CN103970124A (en) | On-line detection method for industrial control loop multi-period oscillation | |
CN109359692A (en) | A kind of crude oil water content on-line measurement model and its construction method, application | |
Shen et al. | Data validation and validated uncertainty estimation of multifunctional self-validating sensors | |
Song et al. | Data and decision level fusion-based crack detection for compressor blade using acoustic and vibration signal | |
CN117312997A (en) | Intelligent diagnosis method and system for power management system | |
CN108549847A (en) | A kind of girder structure crack damage recognition methods under the conditions of no reference data | |
CN111412959A (en) | Flow online monitoring calculation method, monitor and monitoring system | |
CN103924963B (en) | Indicator sampling rate automatic switchover method | |
CN109580224A (en) | Rolling bearing fault method of real-time | |
CN108345289A (en) | A kind of industrial process stationarity detection method based on substituted plane | |
Zhang et al. | The method for determining optimal analysis length of vibration data based on improved multiscale permutation entropy | |
Gao et al. | Feature extraction method of ball mill load based on adaptive variational mode decomposition and improved power spectrum analysis | |
CN105607477B (en) | A kind of process control loops detection method of oscillations decomposed based on improvement local mean value | |
CN111007220B (en) | Method for agile monitoring of water quality of live pig breeding sewage | |
CN106556682A (en) | Animal farm wastewater treatment effect method of real-time | |
CN106596637B (en) | Sewage of farm water grade judgment method based on 3V 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 |