Online real flow calibration method and device

By combining gamma-ray technology and AI algorithms, online real-time calibration of miscible flow at oil and gas wellheads has been achieved, solving the problem of inaccurate measurement by traditional methods, improving measurement accuracy and intelligence, and reducing costs.

CN119290116AActive Publication Date: 2025-01-10CHINA NAT PETROLEUM CORP +2

Patent Information

Application Number
CN202310795897.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-01
Publication Date
2025-01-10
Estimated Expiration
2043-07-01

AI Technical Summary

Technical Problem

Existing technologies are insufficient to accurately measure the mixed flow at oil and gas wellheads. Traditional single-phase flow instruments cannot effectively measure the flow rate of multiphase fluids, and static and dynamic calibration methods cannot fully simulate the mixed flow state on site, resulting in insufficient measurement accuracy.

Method used

By employing gamma-ray technology combined with artificial intelligence algorithms, and utilizing an online real-time calibration method, a quantum flowmeter and an AI neural network model are used to monitor and optimize the flow rates of each phase of the miscible flow at the oil and gas wellhead in real time, thereby achieving online real-flow calibration.

Benefits of technology

It improves the accuracy and intelligence of miscible flow measurement at oil and gas wellheads, reduces the development cost of oil and gas fields, and enhances the scientific nature and real-time performance of the measurement. It is applicable to real-time online measurement of miscible flow at wellheads on land, at sea, and underwater.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119290116A_ABST
    Figure CN119290116A_ABST
Patent Text Reader

Abstract

The invention discloses an online real flow calibration method and device, relates to the technical field of mixed-phase fluid metering, and mainly aims to improve the metering accuracy of mixed-phase fluid at an oil-gas wellhead. According to the main technical scheme, the light quantum mixed-phase flow meter is developed on the basis of the characteristic that the reaction probabilities of gamma rays and different substances are different, a measuring system of the light quantum mixed-phase flow meter can accurately measure the mass phase fractions of various phase-state fluids in well mouth mixed-phase flow, and the total mass flow rate measured by a throttling device is matched. The mass flow of the fluid in various phase states can be obtained through comprehensive calculation by combining with a multi-parameter sensor; the phase fraction of each phase fluid in the oil-gas well mouth mixed-phase flow is measured by using the gamma-ray technology, then the flow of each phase fluid is obtained, on the basis, aiming at the calibration problem of the oil-gas mixed-phase flow, an artificial intelligence algorithm is put forward to realize online real-flow calibration, and then the intelligent level of oil-gas production is improved. The field application effect is good, the intelligent level of the oil and gas field is improved, and the method is suitable for application and popularization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of mixed-phase fluid metering, and relates to an online real-flow calibration method and device, and in particular to an online real-flow calibration method and device suitable for a mixed-phase fluid measuring device. Background Art

[0002] The fluid at the oil and gas wellhead generally presents a complex mixed phase flow, that is, oil, gas, water, and solid phase fluids are mixed together. Taking gas wells as an example, the solid substances contained in the produced gas at the wellhead include rock cuttings, sand particles, sulfides, etc., and the liquid substances include fracturing water, reverse flow, formation water, hydrocarbons, condensate oil, etc.

[0003] In view of this situation, the measurement of mixed-phase flow at the oil and gas wellhead has been a difficult problem for a long time in the past. Traditional single-phase flow instruments widely used in the oil and gas industry can only measure single-phase fluids, such as natural gas with low liquid content or oil with low gas content. For oil and gas wellhead measurement, mixed-phase flow instruments must be used to measure flow rates of more than two phases, such as oil-water, liquid-solid, gas-solid, etc. for two-phase flow, oil-gas-water, gas-liquid-solid, etc. for three-phase flow, and oil-gas-water-solid for four-phase flow, which can be further subdivided into oil-gas-water-sand, oil-gas-water-sulfur, etc. Equipment that can monitor wellhead mixed-phase flow in real time online is the key to building intelligent oil and gas fields, optimizing production processes, reducing costs and increasing efficiency in the current oil production field. It has also been a topic of concern and a hot topic of research in the oil and gas industry.

[0004] According to the principles of metrology, any instrument must be calibrated for accuracy (precision) according to regulations before and during use. For flow meters in the oil and gas industry, static or dynamic calibration is traditionally used. In recent years, artificial intelligence technology has developed rapidly, and AI algorithms have been widely used in the field of test metrology, achieving continuous iterative optimization of test measurement accuracy. Summary of the invention

[0005] In view of this, the embodiment of the present invention provides an online real flow calibration method and device, the main purpose of which is to improve the measurement accuracy of oil and gas wellhead mixed phase flow. That is, the phase fraction of each phase fluid in the oil and gas wellhead mixed phase flow is measured by using gamma ray technology, and then the flow rate of each phase fluid is obtained. On this basis, in view of the calibration problem of oil and gas mixed phase flow, it is proposed to use artificial intelligence algorithm to realize online real flow calibration, thereby improving the intelligent level of oil and gas production.

[0006] In order to achieve the above object, the present invention mainly provides the following technical solutions:

[0007] On the one hand, an embodiment of the present invention provides an online real flow calibration method, comprising:

[0008] Step 1: Assume that the mixed flow metering results and various influencing factors can be described by a linear relationship:

[0009]

[0010] The solution of the model is to fit each ω j and b, where ω j and b represent the weight and bias of the linear model respectively. In the calibration of mixed phase flowmeter, x j represents the set of input parameters to be calibrated under a certain mixed-phase flow state, which is the input quantity used in the above linear relationship; z represents the output flow rate under this state, which is the output quantity in the above linear relationship;

[0011] Step 2: In the standard structure of a neural network, each neuron is composed of weighted and nonlinear transformations, and then multiple neurons are arranged in layers and connected to form a neural network;

[0012] Step 3: After the model design is completed, the optimal value of the model is found through training configuration, and the quality of the model is measured by the loss function. Through model calculation, when measuring the flow rate of a certain phase fluid at a certain time, the predicted output flow rate is z, but the actual displayed flow rate is y. Ideally, z = y, which is defined as follows:

[0013] Loss = (yz) 2

[0014] The Loss in the above formula is called the loss function, which is an indicator to measure the quality of the model. When calculating the loss function, the loss function value of each sample needs to be taken into account. The loss function of a single sample is summed and divided by the total number of samples N, expressed as:

[0015]

[0016] Step 4: During the training process, select the gradient descent method to solve;

[0017] Introducing the factor 1 / 2 into the loss function, the loss function is defined as follows:

[0018]

[0019] where z i is the network's prediction for the i-th sample:

[0020]

[0021] Definition of gradient:

[0022]

[0023] Consider the case of only one sample and calculate the gradient:

[0024]

[0025]

[0026] The gradient calculation formula is:

[0027]

[0028] Calculate the partial derivatives of L with respect to w and b:

[0029]

[0030]

[0031] According to the above formula, when there is only one sample, calculate a certain w j ;

[0032] Step 5: Get the optimal parameter set.

[0033] Specifically, in step 1, in the one-dimensional case, ω j and b are the slope and intercept of the line.

[0034] Specifically, in step 4, the gradient of w0 is calculated. Based on the principle of vectors and matrices, the gradient from w0 to w is calculated by programming. 15 Gradients of all weights. For the case of N samples, the contribution of all samples to the gradient is calculated by programming. According to the gradient calculation formula, the total gradient is the average of the contribution of each sample to the gradient:

[0035]

[0036] Specifically, during the mixed-phase flow calibration process, the flow pattern and state of the mixed-phase flow changes in real time, which is equivalent to generating a large number of sample training models, obtaining 16 parameter values, and realizing online real-flow process calibration for oil, gas, water, and solid mixed-phase flow metering.

[0037] On the other hand, an embodiment of the present invention further provides a device for the method of the present invention, comprising: a main body, a photon source, a photon detector, an instrument compartment and a photon computer, wherein the main body is provided with an embedded threaded hole, the photon source is provided with an external thread, the photon source is screwed into the main body by a tool, and a relevant thread fastener is added to fasten the thread;

[0038] The optical quantum computer is connected into a whole by a PCBA board through a plug-in connector. The PCBA board is provided with an opening, and a mounting bracket is fixed to the upper cavity boss of the instrument compartment by bolts to ensure that the optical quantum computer is placed in the center of the instrument compartment.

[0039] The photon detector is inserted as a whole into the lower cavity of the instrument compartment and installed in the cavity. The photon detector is pressed against the bottom of the lower cavity of the instrument compartment by a spring to ensure that the end face of the photon detector is perpendicular to the end face. After the upper and lower cavities of the instrument compartment are connected into one by bolts, the lower cavity of the instrument compartment is provided with an external thread, and the main body is provided with an internal thread, which is screwed into the main body through the thread, and the main body and the instrument compartment are connected into one by the thread locking force.

[0040] Furthermore, the number of PCBA boards is 3.

[0041] Furthermore, the mounting bracket is L-shaped.

[0042] On the other hand, an embodiment of the present invention further provides an online real flow calibration system, comprising:

[0043] A memory and one or more processors, wherein the processor is configured to execute program instructions stored in the memory, and the program instructions execute the above-mentioned online real flow calibration method when running.

[0044] On the other hand, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, wherein the computer program implements the above-mentioned online real-flow calibration method when executed by one or more processors.

[0045] An online real-flow calibration method and device proposed in an embodiment of the present invention use gamma-ray technology to measure oil and gas mixed-phase flow, and apply AI algorithm to the measurement calibration. During the on-site measurement process, multiple key parameters are continuously optimized and updated based on the evaluation of on-site data, thereby realizing online real-flow process calibration of oil and gas wellhead mixed-phase flow measurement. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 A flow chart of an online real flow calibration method provided by an embodiment of the present invention;

[0047] Figure 2 A schematic diagram of the hardware structure of a photon-based mixed-phase fluid phase fraction measurement device provided in an embodiment of the present invention, wherein A is an overall schematic diagram and B is a cross-sectional diagram of A;

[0048] Figure 3 for 133 Ba photon full energy spectrum;

[0049] Figure 4 The neural network structure for the linear regression model;

[0050] Figure 5 Schematic diagram of the gradient descent direction;

[0051] Figure 6Scatter plot of gas flow data before and after self-calibration of the mixed phase flow meter using AI algorithm;

[0052] In the figure, 1-main body, 2-photon source, 3-photon detector, 4-instrument compartment, 5-photon computer. DETAILED DESCRIPTION

[0053] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.

[0054] The embodiment of the present invention provides an online real flow calibration method, the specific steps of the method are as follows: Figure 1 shown.

[0055] Based on the different reaction probabilities of gamma rays with different substances, a photon mixed phase flowmeter has been developed. Its measurement system can accurately measure the mass phase fraction of various phase fluids in the wellhead mixed phase flow, and the total mass flow measured by the throttling device, combined with the comprehensive calculation of the multi-parameter sensor, can obtain the mass flow of various phase fluids. Figure 2 As shown. The device comprises: a main body 1, a photon source 2, a photon detector 3, an instrument compartment 4 and a photon computer 5. The main body 1 is provided with an embedded threaded hole, and the photon source 2 is provided with an external thread. The photon source 2 is screwed into the main body 1 by a tool, and a relevant thread fastener is added to tighten the thread. The photon computer 5 is connected into a whole by three PCBA boards through a plug-in connector. The upper and lower PCBA boards are provided with openings, and an L-shaped mounting bracket is used to fix the upper cavity boss of the instrument compartment 4 by bolts to ensure that the photon computer 5 is placed in the center of the instrument compartment 4. The photon detector 3 is inserted into the lower cavity of the instrument compartment 4 as a whole and installed in the cavity. The photon detector 3 is pressed against the bottom of the lower cavity of the instrument compartment 4 by a spring to ensure that the end face of the photon detector 3 is perpendicular to the end face. After the upper and lower cavities of the instrument compartment 4 are connected into one by bolts, the lower cavity of the instrument compartment 4 is provided with an external thread, and the main body 1 is provided with an internal thread, which is screwed into the main body 1 by threads, and the main body 1 and the instrument compartment 4 are connected into one by the thread locking force.

[0056] Photon measurement system selection exemption level 133 As a photon source, Ba has low photon activity and energy, and a high probability of interaction with different substances (reaction cross section constant). All peaks in the photon energy spectrum are concentrated within 30 to 420 keV, with a small number of characteristic peaks, making spectrum measurement relatively easy. 133 Ba photon full energy spectrum Figure 3shown.

[0057] Photon Source 133 Ba emits nearly one million photons per second in a solid angle in one direction. When used for mixed-phase flow measurement, during the process of gamma rays passing through the mixed-phase fluid, the four energy photons of 31keV, 81keV, 160keV, and 356keV in the full energy spectrum produce photoelectric effect and Compton effect, which is manifested as different degrees of absorption effect of different energy photons by different phases of oil, gas, water, and solid fluids. The energy relationship can be expressed as:

[0058]

[0059] Taking the logarithm of the above equation gives:

[0060]

[0061] Among them, N 01 、N 02 、N 03 、N 04 is the initial number of the four energy photons, which is a known quantity. N1, N2, N3, and N4 are the transmission energies of the four energy photons, which are measured by the multi-energy photon semiconductor detection array at the receiving end. Therefore, the logarithm of the ratio of the two is known; Q o , Q g , Q w , Q s are the linear masses of oil, gas, water and solid phase fluids (the mass of the fluid passed by the light quantum); a is the linear mass absorption coefficient of the mixed phase fluid to the light quantum, and the subscripts represent different phase fluids and different energy light quantum.

[0062] The Venturi tube can measure the total flow rate of the mixed flow through the differential pressure principle, which is equal to the sum of the flow rates of various phase fluids in the mixed flow, that is:

[0063]

[0064] Q tm is the total linear mass of the mixed phase flow, C is the outflow coefficient of the throttling flowmeter structure, K is the structural constant, ε is the expansion coefficient; ΔP is the differential pressure value of the throttling device, ρ mix is the average density of the mixed phase flow on the measurement cross section. The above equations constitute a set of five-variable linear equations. Solving them can obtain the phase fraction and total flow rate of the four phase fluids of oil, gas, water and solid.

[0065] The photon mixed phase metering device can meet the real-time online measurement of mixed phase flow on land, offshore platforms and underwater wellheads. It has high measurement accuracy and a wide range of applications. It can obtain the flow type and flow state information of mixed phase fluids, such as gas-liquid two-phase, oil-gas-water three-phase, oil-gas-water-solid four-phase and other mixed phase flows. In particular, it has a relatively ideal effect on the measurement of wet natural gas, which is the difficulty of mixed phase flow metering, such as wet gas oil-gas-water three-phase, wet gas gas-liquid-solid three-phase, wet gas oil-gas-water-solid four-phase and other wet gas mixed phase flow metering, and realizes the acquisition of wellhead mixed phase flow data that was difficult to obtain in the past at the perception layer of the oil and gas intelligent system. While eliminating traditional ground metering systems such as metering separation tanks and reducing the cost of oil and gas field development, it also improves the scientific nature of production metering. Moreover, compared with the international mainstream ray multiphase flowmeter, this photon mixed phase flowmeter has a cost advantage and is an ideal solution for oil and gas wellhead mixed phase flow metering.

[0066] For a mixed-phase flowmeter, calibration is to determine the optimal values ​​of multiple coefficients in the flowmeter principle formula. Specifically for the photon mixed-phase flowmeter of the present invention, according to formulas (1) and (2), the key to achieving accurate measurement is to calibrate a o1 、a g1 、a w1 、a s1 、a o2 、a g2 、a w2 、a s2 、a o3 、a g3 、a w3 、a s3 、a o4 、a g4 、a w4 、a s4 The reaction probability constant (mass absorption coefficient) of 16 different substances (phases) to the action of light quanta of different energies is calculated to determine its optimal value.

[0067] If the static calibration method is used, it is necessary to calculate and measure the mass absorption coefficient of the single-phase medium to a photon energy when the flowmeter is full of single-phase medium. For example, when the flowmeter is full of oil, the absorption capacity of the oil body to 31keV photons is measured, and the first formula in formula 2 is simplified to:

[0068]

[0069] N 01 Measured by the photon detector, N1 and Q o If a is a known quantity, then we can get o1Theoretically, the same method can be used to calibrate by filling the flow meter with pure media of different phases and measuring the mass absorption coefficient of light quanta of different energies. However, static calibration itself ignores the flow of the medium, and the mass absorption coefficient obtained is somewhat different from the actual situation. It is also impossible to achieve static calibration of a full tube solid phase, and the operation itself is relatively cumbersome.

[0070] If the dynamic calibration method is used, a loop test is performed before the mixed phase flowmeter leaves the factory, and the ratio of oil-gas-water-solid fluids in different phases is designed to simulate the mixed phase flow at the oil and gas wellhead as much as possible. Then, a large number of loop tests are performed to compare the measured values ​​with the standard values, and the parameters are continuously optimized to achieve calibration. However, dynamic calibration cannot well simulate the actual state of the mixed phase flow at the oil and gas wellhead, especially the wet gas metering at the shale gas wellhead, which has low liquid content and high pressure, and it is difficult to simulate the mixed phase flow at the field under laboratory conditions.

[0071] In oil and gas wellhead flow metering, the flow pattern and state of the mixed flow are very complex, and multiple parameters need to be calibrated. Traditional static and dynamic calibrations often cannot fully simulate the flow pattern and state of the mixed flow at the wellhead throughout its life cycle. In addition, at the oil and gas production site, as the state of the wellhead mixed flow continues to change, in theory, the instrument needs to be recalibrated within a certain period of time to ensure the measurement accuracy. However, it is inconvenient to stop the flow meter installed on site and move the machine for calibration. Therefore, it is of great practical significance to study a method to realize online real-flow calibration for oil and gas wellhead mixed flow metering.

[0072] Regarding the measurement of mixed-phase flow at the oil and gas wellhead, due to continuous data collection, the data collection time interval generally reaches the millisecond level, which fully meets the needs of wellhead flow measurement. Therefore, under normal circumstances, the wellhead oil, gas and water flow measurement data is a continuously changing quantity that can reflect the trend of change. On this basis, the prediction of the flow at the next moment is predictable. Under normal conditions at the oil and gas wellhead, there will not be metering data that deviates too much from the previous and next data. In terms of AI algorithms, mixed-phase flow measurement prediction can be considered a regression task. The simplest linear regression model is used to solve this problem, and the neural network algorithm is used to implement this model.

[0073] Assume that the mixed flow metering results and various influencing factors can be described by a linear relationship:

[0074]

[0075] The solution of the model is to fit each ω through the data j and b. Among them, ω j and b represent the weight and bias of the linear model respectively. In one-dimensional case, ω j and b are the slope and intercept of the straight line. In the calibration of mixed phase flowmeter, X jrepresents the set of input parameters to be calibrated under a certain mixed-phase flow state, that is, the input quantity used in the above linear relationship, and z represents the output flow under this state, that is, the output quantity in the above linear relationship. Obviously, we hope that z is infinitely close to the actual value, which means that the mixed-phase flowmeter has high accuracy.

[0076] In the standard structure of a neural network, each neuron is composed of weighted and nonlinear transformations, and then multiple neurons are arranged in layers and connected to form a neural network. The linear regression model can be considered as a very simple special case of the neural network model, which is a neuron with only weights and no nonlinear transformations, and does not need to form a network. Figure 4 shown.

[0077] After the model design is completed, it is necessary to find the optimal value of the model through training configuration, that is, to measure the quality of the model through the loss function. Through model calculation, when measuring the flow rate of a certain phase fluid at a certain moment, the predicted output flow rate is z, but the actual displayed flow rate is y (ideally z = y). At this time, we need some kind of indicator to measure the difference between the predicted value z and the actual displayed value y. For regression problems, the most commonly used measurement method is to use the root mean square error as an indicator to evaluate the quality of the model. The specific definition is as follows:

[0078] Loss = (yz) 2 (6)

[0079] The Loss in the above formula is called the loss function, which is an indicator of the quality of the model. Because the loss function value of each sample needs to be taken into account when calculating the loss function, we need to sum the loss function of a single sample and divide it by the total number of samples N, which can be expressed as:

[0080]

[0081] The next step is the training process, the goal of which is to make the defined loss function Loss as small as possible, that is, to find a parameter solution w and b that minimizes the loss function, which means that the displayed value is closer to the expected value. According to the principle of calculus, the slope of a curve at a certain point is equal to the derivative value of the function at that point. The slope is 0 at the extreme point of the curve, that is, the derivative of the function at the extreme point is 0. Therefore, w and b that minimize the loss function should be the solution of the following system of equations:

[0082]

[0083]

[0084] Substituting the sample data (x, y) into the above equations can solve the optimal values ​​of w and b that minimize the loss function, but this method is only effective for solving simple tasks such as linear regression. If the model contains nonlinear transformations, or the loss function is not in the form of mean square error, it is difficult to solve it using the above formula. The metering of mixed flow contains nonlinear transformations, so a more universal numerical solution method, the gradient descent method, is chosen to solve it.

[0085] In order to make the gradient calculation more concise, a factor of 1 / 2 is introduced into the loss function, and the loss function is defined as follows:

[0086]

[0087] where z i is the network's prediction for the i-th sample:

[0088]

[0089] Definition of gradient:

[0090]

[0091] From the calculation process of the derivative, we can see that the factor 1 / 2 is eliminated. This is because factors are generated when the quadratic function is differentiated, which is why the loss function is rewritten. Next, consider the case of only one sample, that is, a mixed flow pattern, and calculate the gradient:

[0092]

[0093] because

[0094] The gradient calculation formula is:

[0095]

[0096] The partial derivatives of L with respect to w and b can be calculated:

[0097]

[0098]

[0099] According to the above formula, when there is only one sample, a certain w can be calculated j , such as the gradient of w0. Based on the principles of vectors and matrices, we can calculate the gradient from w0 to w through programming. 15The gradient of all weights. For the case of N samples, the contribution of all samples to the gradient can also be calculated by programming. To summarize this calculation process, on the one hand, the dimension of the parameters is expanded to calculate the gradient of a sample to all 16 parameters; on the other hand, the dimension of the sample is expanded to calculate the gradient of the parameters under various mixed flow conditions. According to the gradient calculation formula, the total gradient is the average value of the contribution of each sample to the gradient:

[0100]

[0101] Therefore, the overall implementation logic of the AI ​​algorithm is: calculate the Loss based on the output value (also known as the displayed value) y and the predicted value z, calculate the gradient based on the Loss and the input value (also known as the true value) x, and update the parameter value w according to the gradient. Repeat the above steps until the loss function is minimized. The direction of the gradient descent is shown in Figure 5:

[0102] During the mixed-phase flow calibration process, the flow pattern and state of the mixed-phase flow changes in real time, which is equivalent to generating a large number of sample training models. The best 16 parameter values ​​are obtained through the above algorithm to realize the online real-flow process calibration of oil, gas, water and solid mixed-phase flow metering.

[0103] The present invention uses gamma-ray technology to measure the oil and gas mixed phase flow, and applies AI algorithm to the measurement calibration. During the on-site measurement process, multiple key parameters are continuously optimized and updated based on the evaluation of on-site data, thereby realizing the online real flow process calibration of the oil and gas wellhead mixed phase flow measurement.

[0104] The photon mixed phase flowmeter of the present invention has been used in the well fields of several oil and gas units of CNPC and Sinopec, and several photon flowmeters have applied the above AI algorithm to realize mixed phase flow self-calibration. Select a mixed phase flowmeter that uses the AI ​​algorithm for self-calibration, and compare the gas phase flow measurement data before and after the use of the AI ​​algorithm within one day. The blue is the original data, and the orange is the data using the AI ​​algorithm for self-calibration (unit: m 3 / h), such as Figure 6 shown.

[0105] The data of the day selected is one per minute, with a total of 1440 groups, which can show the changing trend of the wellhead flow. The original data and the data processed by the AI ​​self-calibration algorithm are studied:

[0106] Table 1 AI algorithm gas flow self-calibration data comparison analysis table

[0107]

[0108] Combining the scatter plot and data table, it can be seen that the flow output value after online real-flow self-calibration by the AI ​​algorithm is more stable, that is, the volatility is smaller, avoiding some jump data with obvious large errors, and is more in line with the actual situation of oil and gas wellhead flow changes.

[0109] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0110] It is understandable that the related features in the above methods and devices can be referenced to each other. In addition, the "first", "second" and the like in the above embodiments are used to distinguish the embodiments, but do not represent the advantages and disadvantages of the embodiments.

[0111] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0112] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages ​​can be utilized to realize the content of the present invention described herein, and the description of the above specific languages ​​is for disclosing the best mode of the present invention.

[0113] In addition, the memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0114] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0115] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0116] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0117] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0118] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0119] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0120] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0121] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0122] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0123] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. An online real flow calibration method, characterized in that: include: Step 1: Assume that the mixed flow metering results and various influencing factors can be described by a linear relationship: The solution of the model is to fit each ω j and b, where ω j and b represent the weight and bias of the linear model respectively. In the calibration of mixed phase flowmeter, x j represents the set of input parameters to be calibrated under a certain mixed-phase flow state, which is the input quantity used in the above linear relationship; z represents the output flow rate under this state, which is the output quantity in the above linear relationship; Step 2: In the standard structure of a neural network, each neuron is composed of weighted and nonlinear transformations, and then multiple neurons are arranged in layers and connected to form a neural network; Step 3: After the model design is completed, the optimal value of the model is found through training configuration, and the quality of the model is measured by the loss function. Through model calculation, when measuring the flow rate of a certain phase fluid at a certain time, the predicted output flow rate is z, but the actual displayed flow rate is y. Ideally, z = y, which is defined as follows: Loss=(y-z) 2 The Loss in the above formula is called the loss function, which is an indicator to measure the quality of the model. When calculating the loss function, the loss function value of each sample needs to be taken into account. The loss function of a single sample is summed and divided by the total number of samples N, expressed as: Step 4: During the training process, select the gradient descent method to solve; Introducing the factor 1 / 2 into the loss function, the loss function is defined as follows: where z i is the network's prediction for the i-th sample: Definition of gradient: Consider the case of only one sample and calculate the gradient: The gradient calculation formula is: Calculate the partial derivatives of L with respect to w and b: According to the above formula, when there is only one sample, calculate a certain w j ; Step 5: Get the optimal parameter set.

2. The method according to claim 1, characterized in that In step 1, in one dimension, ω j and b are the slope and intercept of the line.

3. The method according to claim 1, characterized in that In step 4, the gradient of w0 is calculated. Based on the principle of vectors and matrices, the gradient from w0 to w is calculated by programming. 15 Gradients of all weights. For the case of N samples, the contribution of all samples to the gradient is calculated by programming. According to the gradient calculation formula, the total gradient is the average of the contribution of each sample to the gradient:

4. The method according to any one of claims 1 to 3, characterized in that During the mixed-phase flow calibration process, the flow pattern and state of the mixed-phase flow changes in real time, which is equivalent to generating a large number of sample training models and obtaining 16 parameter values, thus realizing the online real-flow process calibration of oil, gas, water and solid mixed-phase flow metering.

5. A device for the method according to any one of claims 1 to 4, characterized in that: include: A main body, a photon source, a photon detector, an instrument compartment and a photon computer. The main body is provided with an embedded threaded hole, and the photon source is provided with an external thread. The photon source is screwed into the main body by a tool, and a relevant thread fastener is added to fasten the thread. The optical quantum computer is connected into a whole by a PCBA board through a plug-in connector. The PCBA board is provided with an opening, and a mounting bracket is fixed to the upper cavity boss of the instrument compartment by bolts to ensure that the optical quantum computer is placed in the center of the instrument compartment. The photon detector is inserted as a whole into the lower cavity of the instrument compartment and installed in the cavity. The photon detector is pressed against the bottom of the lower cavity of the instrument compartment by a spring to ensure that the end face of the photon detector is perpendicular to the end face. After the upper and lower cavities of the instrument compartment are connected into one by bolts, the lower cavity of the instrument compartment is provided with an external thread, and the main body is provided with an internal thread, which is screwed into the main body through the thread, and the main body and the instrument compartment are connected into one by the thread locking force.

6. The device according to claim 5, characterized in that The number of the PCBA boards is 3.

7. The device according to claim 5, characterized in that The mounting bracket is L-shaped.

8. An online real flow calibration system, characterized in that: include: A memory and one or more processors, wherein the processors are configured to execute program instructions stored in the memory, and when the program instructions are executed, the online real flow calibration method according to any one of claims 1 to 4 is executed.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program, when executed by one or more processors, implements the online real-flow calibration method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Oil, gas and water three phase oil well continuous metering device and its measurement method

    CN101260802A

  • Multiphase flow calibration system

    CN111289062A

  • Oil-gas two-phase flow parameter measuring device and method

    CN111537032A

  • Flow calibration system and method

    CN112903067A

  • Method and device for measuring miscible-phase flow of large-diameter thickened oil

    CN114440990A

Cited By

  • Mixed-phase flow online metering method and system based on light particles

    CN121476260A