An online real-flow calibration method and apparatus

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 that traditional metering methods cannot accurately measure the flow, and improving the accuracy and intelligence of metering.

CN119290116BActive Publication Date: 2025-10-31CHINA NAT PETROLEUM CORP +2
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies are insufficient to accurately measure the mixed-phase fluids at the wellhead of oil and gas wells. Traditional single-phase flow instruments cannot effectively measure the flow rate of multiphase fluids, and traditional calibration methods cannot simulate the actual state of the mixed-phase flow at the wellhead, resulting in insufficient measurement accuracy.

Method used

By employing gamma-ray technology combined with artificial intelligence algorithms, and through online real-time calibration methods, the parameters of the quantum flowmeter and AI algorithm are optimized to achieve the measurement of the miscible flow at the oil and gas wellhead.

Benefits of technology

It improves the accuracy and intelligence of miscible flow metering at oil and gas wellheads, reduces metering costs, is suitable for real-time monitoring and data prediction of complex flow patterns, and improves production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119290116B_ABST
    Figure CN119290116B_ABST
Patent Text Reader

Abstract

This invention discloses an online real-flow calibration method and device, relating to the field of miscible fluid metering technology, with the main objective of improving the accuracy of miscible flow metering at oil and gas wellheads. The main technical solution of this invention is as follows: Based on the characteristic that gamma rays react with different substances at different probabilities, a quantum optical flowmeter for miscible flow has been developed. Its measurement system can accurately measure the mass phase fraction of various phase fluids in the wellhead miscible flow. Combined with the total mass flow rate measured by a throttling device, and further calculated using multi-parameter sensors, the mass flow rate of each phase fluid can be obtained. The phase fraction of each phase fluid in the oil and gas wellhead miscible flow is measured using gamma-ray technology, thereby obtaining the flow rate of each phase fluid. Based on this, addressing the calibration challenges of oil and gas miscible flows, an artificial intelligence algorithm is proposed to achieve online real-flow calibration, thereby improving the level of intelligence in oil and gas production. This invention has shown good results in field applications, improving the level of intelligence in oil and gas fields and is suitable for widespread application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of multiphase fluid metering technology, and specifically to an online real-flow calibration method and apparatus, and more particularly, to an online real-flow calibration method and apparatus suitable for multiphase fluid measurement devices. Background Technology

[0002] The fluids at the wellhead of oil and gas wells are generally complex miscible flows, meaning that oil, gas, water, and solid phases are mixed together. Taking gas wells as an example, the solid substances contained in the gas produced at the wellhead include rock cuttings, sand particles, sulfides, etc., while the liquid substances include fracturing water, flowback fluid, formation water, hydrocarbons, condensate oil, etc.

[0003] For a considerable period, measuring miscible flows at oil and gas wellheads has been a significant challenge. 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 wellhead metering, miscible flow instruments are essential to measure the flow rates of two or more phases, such as two-phase flows (oil-water, liquid-solid, gas-solid), three-phase flows (oil-gas-water, gas-liquid-solid), and four-phase flows (oil-gas-water-solid, which can be further subdivided into oil-gas-water-sand and oil-gas-water-sulfur). Equipment capable of real-time online monitoring of wellhead miscible flows is crucial for building smart oil and gas fields, optimizing production processes, and reducing costs and increasing efficiency in the oil production sector. It has also been a key focus and research topic in the oil and gas industry.

[0004] According to metrology principles, the accuracy (precision) of any instrument must be calibrated according to regulations before and during use. For flow meters in the oil and gas industry, calibration is traditionally performed using either static or dynamic methods. In recent years, with the rapid development of artificial intelligence technology, AI algorithms have been widely applied in the field of testing and metrology, enabling continuous iterative optimization of testing and measurement accuracy. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide an online real-flow calibration method and apparatus, the main purpose of which is to improve the accuracy of miscible flow measurement at oil and gas wellheads. Specifically, it utilizes gamma-ray technology to measure the phase fraction of each phase fluid in the miscible flow at the oil and gas wellhead, thereby obtaining the flow rate of each phase fluid. Based on this, and addressing the calibration challenges of oil and gas miscible flows, it proposes the application of artificial intelligence algorithms to achieve online real-flow calibration, thereby improving the level of intelligence in oil and gas production.

[0006] To achieve the above objectives, the present invention mainly provides the following technical solutions:

[0007] On one hand, embodiments of the present invention provide an online real-flow calibration method, including:

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

[0009]

[0010] The model is solved by fitting each ω to the data. j and b, where ω j and b represent the weights and biases of the linear model, respectively. In the calibration of the multiphase flow meter, x j The set of input parameters to be calibrated represents a certain mixed-phase flow state, which is the input quantity used in the above linear relationship. z represents the output flow rate in 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 consists of weighted and nonlinear transformations. 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. The loss function is used to measure the quality of the model. 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, defined as follows:

[0013] Loss=(yz) 2

[0014] In the above formula, Loss is called the loss function, which is a metric for evaluating the quality of the model. Calculating the loss function requires considering the loss function value for each sample. The loss function for each individual sample is summed and divided by the total number of samples N, expressed as:

[0015]

[0016] Step 4: During the training process, the gradient descent method is selected for solving the problem;

[0017] By introducing a factor of 1 / 2 into the loss function, the loss function is defined as follows:

[0018]

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

[0020]

[0021] Definition of gradient:

[0022]

[0023] Calculate the gradient when there is only one sample:

[0024]

[0025]

[0026] Substituting into the gradient calculation formula, we get:

[0027]

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

[0029]

[0030]

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

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

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

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

[0035]

[0036] Specifically, during the calibration process of the miscible flow, the flow pattern and flow state of the miscible flow change in real time, which is equivalent to generating a large number of samples to train the model and obtain 16 parameter values, thereby realizing the online real flow process calibration of oil, gas, water and solid miscible flow metering.

[0037] On the other hand, embodiments of the present invention also provide an apparatus for the method described in the present invention, comprising: a main body, a quantum light source, a quantum light detector, an instrument compartment, and a quantum light computer. The main body is provided with an embedded threaded hole, and the quantum light source is provided with an external thread. The quantum light source is screwed into the main body using a tool, and a relevant thread-fastening agent is added to tighten the threads.

[0038] The optical quantum computer is a whole composed of PCBA boards connected by through-hole connectors. The PCBA boards have openings and are fixed to the upper cavity boss of the instrument compartment by bolts using mounting brackets to ensure that the optical quantum computer is placed in the center of the instrument compartment.

[0039] The photonic quantum detector is inserted into the lower cavity of the instrument compartment and installed inside the cavity. A spring is used to press the photonic quantum detector firmly against the bottom of the lower cavity of the instrument compartment, ensuring that the end face of the photonic quantum detector is perpendicular to the end face. The upper and lower cavities of the instrument compartment are connected as one unit by bolts. The lower cavity of the instrument compartment has external threads, and the main body has internal threads. It is screwed into the main body through the threads, and the main body and the instrument compartment are connected as one unit 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, embodiments of the present invention also provide an online real-flow calibration system, comprising:

[0043] A memory and one or more processors, the processors being configured to execute program instructions stored in the memory, which, when executed, perform the online real-current calibration method described above.

[0044] On the other hand, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program, when executed by one or more processors, implements the above-described online real-flow calibration method.

[0045] The present invention proposes an online real-flow calibration method and device, which uses gamma-ray technology to measure oil and gas miscible flow and applies AI algorithms to the calibration of the measurement. During the on-site measurement process, based on the evaluation of on-site data, multiple key parameters are continuously optimized and updated, thereby realizing the online real-flow calibration of oil and gas wellhead miscible flow measurement. Attached Figure Description

[0046] Figure 1 A flowchart of an online real-flow calibration method provided in an embodiment of the present invention;

[0047] Figure 2 This is a schematic diagram of the hardware structure of the photonic quantum 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 view of A;

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

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

[0050] Figure 5 This is a schematic diagram illustrating the gradient descent direction;

[0051] Figure 6Scatter plot of gas flow data before and after self-calibration of a multiphase flow meter using an AI algorithm;

[0052] In the diagram, 1-main body, 2-light quantum source, 3-light quantum detector, 4-instrument compartment, 5-light quantum computer. Detailed Implementation

[0053] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.

[0054] This invention provides an online real-flow calibration method, the specific steps of which are as follows: Figure 1 As shown.

[0055] Based on the characteristic that gamma rays react with different substances with varying probabilities, a quantum optical flowmeter was developed. Its measurement system can accurately measure the mass phase fraction of various phases in a wellhead miscible flow. Combined with the total mass flow rate measured by a throttling device, and further calculated using multi-parameter sensors, the mass flow rate of each phase can be obtained. A schematic diagram of the flowmeter product is shown below. Figure 2 As shown. The device includes: a main body 1, a quantum light source 2, a quantum light detector 3, an instrument compartment 4, and a quantum light computer 5. The main body 1 has an internal threaded hole, and the quantum light source 2 has an external thread. The quantum light source 2 is screwed into the main body 1 using a tool, and the threads are tightened with a thread-locking agent. The quantum light computer 5 is composed of three PCBA boards connected as a whole by a through-hole connector. The upper and lower PCBA boards have openings, and an L-shaped mounting bracket is used to fix it to the upper cavity boss of the instrument compartment 4 with bolts, ensuring that the quantum light computer 5 is placed in the center of the instrument compartment 4. The quantum light detector 3 is inserted into the lower cavity of the instrument compartment 4 and installed inside the cavity. A spring is used to press the quantum light detector 3 tightly against the bottom of the lower cavity of the instrument compartment 4, ensuring that the end face of the quantum light detector 3 is perpendicular to the end face. After the upper and lower cavities of the instrument compartment 4 are connected as a whole by bolts, the lower cavity of the instrument compartment 4 has an external thread, and the main body 1 has an internal thread. The quantum light source 2 is screwed into the main body 1, and the main body 1 and the instrument compartment 4 are connected as a whole by the thread locking force.

[0056] The optical quantum measurement system uses an exemption-level method. 133 Ba, as a photon source, has low photon activity and energy, a high probability of interacting with different substances (reaction cross-section constant), and all peaks in the photon energy spectrum are concentrated in the range of 30 to 420 keV. It has few characteristic peaks and is relatively easy to measure the energy spectrum. 133 Ba photon total energy spectrum as follows Figure 3As shown.

[0057] Photonic quantum source 133 Ba emits nearly a million photons per second in one solid angle. When used for measuring miscible flow, as gamma rays pass through the miscible fluid, photons with energies of 31 keV, 81 keV, 160 keV, and 356 keV in the full energy spectrum undergo the photoelectric effect and the Compton effect. This manifests as different phases of the fluid (oil, gas, water, and solid) absorbing photons of different energies to varying degrees. The energy relationship can be expressed as:

[0058]

[0059] Taking the logarithm of the above equation, we get:

[0060]

[0061] Where, N 01 N 02 N 03 N 04 N1, N2, N3, and N4 are the initial quantities of the four energy photons, which are known quantities. N1, N2, N3, and N4 are the transmission energies of the four energy photons, measured by the multi-energy photon semiconductor detector array at the receiving end. Therefore, the logarithm of the ratio between the two can be used to determine Q. o Q g Q w Q s These are the linear masses of oil, gas, water, and solid fluids (the fluid mass through which the photon passes); 'a' is the linear mass absorption coefficient of the photon by the mixed-phase fluid, and the subscripts represent different phase fluids and different energy photons.

[0062] The Venturi tube can measure the total flow rate of a miscible flow using the differential pressure principle. This total flow rate is equal to the sum of the flow rates of all phases of fluid in the miscible flow, i.e.:

[0063]

[0064] Q tm Let C be the total linear mass of the mixed-phase flow, C be the structural discharge coefficient of the throttling flowmeter, K be the structural constant, and ε be the expansion coefficient; ΔP be the differential pressure value of the throttling device, and ρ be the total linear mass of the mixed-phase flowmeter. mix Let be the average density of the miscible flow across the measurement cross section. The above equations constitute a system of five linear equations, which, when solved, can reveal the phase fractions and total flow rate of the four phases of the fluid: oil, gas, water, and solid.

[0065] The quantum optical miscibility metering device meets the real-time online measurement needs of miscible flows on land, offshore platforms, and subsea wellheads. It boasts high measurement accuracy and a wide range of applications, capable of obtaining flow pattern and flow regime information for miscible fluids such as gas-liquid two-phase, oil-gas-water three-phase, and oil-gas-water-solid four-phase flows. In particular, it demonstrates ideal performance for measuring wet natural gas, a challenging aspect of miscible flow measurement, including wet gas-oil-gas-water three-phase, wet gas-gas-liquid-solid three-phase, and wet gas-oil-gas-water-solid four-phase flows. This allows for the acquisition of wellhead miscible flow data—previously difficult to obtain—at the sensing layer of intelligent oil and gas systems. It eliminates the need for traditional ground-based metering systems such as metering separators, reducing oil and gas field development costs while enhancing the scientific rigor of production metering. Furthermore, compared to internationally mainstream X-ray multiphase flow meters, this quantum optical miscibility flow meter offers a cost advantage, making it an ideal solution for oil and gas wellhead miscible flow metering.

[0066] For multiphase flow meters, calibration involves determining the optimal values ​​of multiple coefficients in the flow meter's principle formula. Specifically, for the quantum optical multiphase flow meter of this invention, according to formulas (1) and (2), the key to achieving accurate measurement is calibrating 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 optimal value of the reaction probability constant (mass absorption coefficient) of 16 different substances (phases) to the action of photons of different energies was determined.

[0067] If a static calibration method is used, the mass absorption coefficient of the single-phase medium to a certain photon energy needs to be calculated when the flowmeter is filled with a single-phase medium. For example, when the pipe is full of oil, to measure the absorption capacity of the oil for a 31keV photon, the first formula in Formula 2 simplifies to:

[0068]

[0069] N 01 Measured by a photonic quantum detector, N1 and Q o Given a quantity, we can obtain a. o1Theoretically, the same method can be used to calibrate a flow meter by measuring the mass absorption coefficient of photons with different energies when the flow meter is filled with simple media of different phases. However, static calibration ignores the flow of the medium, and the obtained mass absorption coefficient differs from the actual situation. Furthermore, it cannot achieve static calibration with a full-pipe solid phase, and the operation itself is relatively cumbersome.

[0070] If a dynamic calibration method is used, loop tests are performed before the miscible flowmeter leaves the factory, and the proportions of different phases of fluid (oil, gas, water, and solid) are designed to simulate the miscible flow at the oil and gas wellhead as closely as possible. Then, through numerous loop tests, the measured values ​​are compared with the standard values, and the parameters are continuously optimized to achieve calibration. However, dynamic calibration cannot accurately simulate the actual state of miscible flow at the oil and gas wellhead, especially for wet gas metering at shale gas wellheads, where the liquid content is low, the pressure is high, and laboratory conditions make it difficult to simulate the miscible flow in the field.

[0071] In oil and gas wellhead flow measurement, the flow patterns and states of miscible flows are highly complex, requiring calibration of multiple parameters. Traditional static and dynamic calibrations often cannot fully simulate the flow patterns and states of miscible flows throughout their entire lifecycle at the wellhead. Furthermore, in oil and gas production sites, as the state of the miscible flow at the wellhead continuously changes, theoretically, the instruments need to be recalibrated periodically to ensure measurement accuracy. However, it is inconvenient to shut down and relocate flowmeters for calibration at the site. Therefore, researching a method to achieve online, real-flow calibration for oil and gas wellhead miscible flow measurement has significant practical implications.

[0072] For the metering of miscible flows at oil and gas wellheads, continuous data acquisition, typically at millisecond intervals, fully meets the requirements for wellhead flow measurement. Therefore, under normal circumstances, the wellhead oil, gas, and water flow measurement data is a continuously changing quantity, reflecting a trend. Based on this, the flow rate prediction for the next moment is predictable; under normal wellhead conditions, measurement data will not deviate significantly from previous data. In terms of AI algorithms, miscible flow metering prediction can be considered a regression task. The simplest linear regression model can be used to solve this problem, and a neural network algorithm can be used to implement this model.

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

[0074]

[0075] Solving the model involves fitting each ω to the data. j and b. Where, ω j Let ω and b represent the weights and biases of the linear model, respectively. In the one-dimensional case, ω j and b are the slope and intercept of the straight line. In the calibration of a multiphase flow meter, X jLet z represent the set of input parameters to be calibrated under a certain mixed-phase flow state, i.e., the input quantities used in the above linear relationship. Let z represent the output flow rate under this state, i.e., the output quantity in the above linear relationship. Obviously, we hope that z approaches the actual value infinitely, which means that the mixed-phase flow meter has high accuracy.

[0076] In the standard structure of a neural network, each neuron consists of weighted and nonlinear transformations. Multiple neurons are then arranged hierarchically and connected to form the neural network. A linear regression model can be considered a simplified special case of a neural network model; it consists of neurons with only weighted sums and no nonlinear transformations, and does not require forming a network. For example... Figure 4 As shown.

[0077] After the model design is complete, the optimal value of the model needs to be found through training configuration, that is, the model's performance is measured by a loss function. The model calculates the predicted flow rate as z when measuring the flow rate of a fluid in a certain phase at a certain moment, but the actual displayed flow rate is y (ideally z = y). At this point, we need some metric to measure the difference between the predicted value z and the actual displayed value y. For regression problems, the most commonly used metric is the root mean square error (RMSE), which is defined as follows:

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

[0079] In the above formula, Loss is called the loss function, which is a metric for evaluating the quality of the model. Because calculating the loss function requires considering the loss function value for each sample, we need to sum the loss functions for each individual sample and divide 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 minimize the defined loss function, Loss. This means finding a solution for the parameters w and b that minimizes the loss function, indicating that the displayed value is closer to the expected value. According to the principles of calculus, the slope of a curve at a point is equal to the derivative of the function at that point. At the extreme points of the curve, the slope is 0, meaning the derivative of the function at those points is zero. Therefore, the w and b that minimize the loss function should be the solution to the following system of equations:

[0082]

[0083]

[0084] Substituting the sample data (x, y) into the above system of equations allows us to find the optimal values ​​of w and b that minimize the loss function. However, this method is only effective for simple tasks like linear regression. If the model contains nonlinear transformations, or the loss function is not in the form of mean squared error, it is difficult to solve using the above formula. The measurement of mixed-phase flow involves nonlinear transformations, so a more general numerical solution method—gradient descent—is chosen.

[0085] To simplify gradient calculation, a factor of 1 / 2 is introduced into the loss function, which is defined as follows:

[0086]

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

[0088]

[0089] Definition of gradient:

[0090]

[0091] As can be seen from the derivative calculation process, the factor 1 / 2 is eliminated. This is because a factor is generated when differentiating a quadratic function, which is also the reason for rewriting the loss function. Next, consider the case with only one sample, i.e., a mixed-phase flow pattern, and calculate the gradient:

[0092]

[0093] because

[0094] Substituting into the gradient calculation formula, we get:

[0095]

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

[0097]

[0098]

[0099] According to the formula above, when there is only one sample, a certain w can be calculated. j For example, the gradient of w0. Based on the principles of vectors and matrices, the gradient from w0 to w can be calculated through programming. 15The gradient of all weights. For the case with N samples, the contribution of each sample to the gradient can also be calculated programmatically. To summarize this calculation process, it expands the dimension of the parameters by calculating the gradient of a single sample with respect to all 16 parameters; it also expands the dimension of the samples by calculating the gradients of the parameters under various mixed-phase flow states. According to the gradient calculation formula, the total gradient is the average contribution of each sample to the gradient:

[0100]

[0101] Therefore, the overall implementation logic of the AI ​​algorithm is as follows: calculate the loss based on the output value (i.e., the displayed value) y and the predicted value z, calculate the gradient based on the loss and the input value (i.e., the true value) x, and update the parameter value w based on the gradient. This process is repeated until the loss function is minimized. The gradient descent direction is shown in Figure 5.

[0102] During the calibration process of the miscible flow, the flow pattern and flow state of the miscible flow change in real time, which is equivalent to generating a large number of samples to train the model. The above algorithm is used to obtain the optimal 16 parameter values, so as to realize the online real flow process calibration of oil, gas, water and solid miscible flow metering.

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

[0104] The quantum flow meter of this invention has been used in well sites of several oil and gas companies, including CNPC and Sinopec. Several of these quantum flow meters utilize the aforementioned AI algorithm for self-calibration of the mixed-phase flow. A selected mixed-phase flow meter that used the AI ​​algorithm for self-calibration was compared with the gas phase flow measurement data before and after using the AI ​​algorithm over a one-day period. Blue represents the original data, and orange represents the data calibrated using the AI ​​algorithm (unit: m³). 3 / h), such as Figure 6 As shown.

[0105] The selected data for the day was one per minute, totaling 1440 sets, which shows the changing trend of the wellhead flow rate. The study compares the raw data with the data processed by the AI ​​self-calibration algorithm:

[0106] Table 1 Comparison and Analysis of Gas Flow Self-Calibration Data from AI Algorithms

[0107]

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

[0109] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0110] It is understood that the relevant features in the above methods and apparatus can be referenced interchangeably. Furthermore, the terms "first," "second," etc., in the above embodiments are used to distinguish between embodiments and do not represent the superiority or inferiority of any particular embodiment.

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

[0112] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, this invention is not directed to any particular programming language. It should be understood that the contents of the invention described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of the invention.

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

[0114] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0115] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0116] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0117] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function 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] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0120] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, 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 technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0121] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0122] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0123] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. An online real-flow calibration method, characterized in that, include: Step 1: Assume that the metering results of the miscible flow and the various influencing factors can be described by a linear relationship: The model is solved by fitting each ω to the data. j and b, where ω j and b represent the weights and biases of the linear model, respectively. In the calibration of the multiphase flow meter, x j The set of input parameters to be calibrated represents a certain mixed-phase flow state, which is the input quantity used in the above linear relationship. z represents the output flow rate in this state, which is the output quantity in the above linear relationship. Step 2: In the standard structure of a neural network, each neuron consists of weighted and nonlinear transformations. 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. The loss function is used to measure the quality of the model. 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, defined as follows: Loss=(y-z) 2 In the above formula, Loss is called the loss function, which is a metric for evaluating the quality of the model. Calculating the loss function requires considering the loss function value for each sample. The loss function for each individual sample is summed and divided by the total number of samples N, expressed as: Step 4: During the training process, the gradient descent method is selected for solving the problem; By introducing a factor of 1 / 2 into the loss function, the loss function is defined as follows: Where z i This is the network's prediction for the i-th sample: Definition of gradient: Calculate the gradient when there is only one sample: Substituting into the gradient calculation formula: Calculate the partial derivatives of L with respect to w and b: According to the formula above, when there is only one sample, calculate a certain w. j ; Step 5: Obtain the optimal parameter set.

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

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

4. The method according to any one of claims 1 to 3, characterized in that, During the calibration process of the miscible flow, the flow pattern and flow state of the miscible flow change in real time, which is equivalent to generating a large number of samples to train the model and obtain 16 parameter values, so as to realize the online real flow process calibration of oil, gas, water and solid miscible flow metering.

5. An apparatus for use in the method according to any one of claims 1 to 4, characterized in that, include: The system comprises a main body, a quantum light source, a quantum light detector, an instrument compartment, and a quantum light computer. The main body has an embedded threaded hole, and the quantum light source has an external thread. The quantum light source is screwed into the main body using a tool, and the threads are tightened by adding a thread-locking agent. The optical quantum computer is a whole composed of PCBA boards connected by through-hole connectors. The PCBA boards have openings and are fixed to the upper cavity boss of the instrument compartment by bolts using mounting brackets to ensure that the optical quantum computer is placed in the center of the instrument compartment. The photonic quantum detector is inserted into the lower cavity of the instrument compartment and installed inside the cavity. A spring is used to press the photonic quantum detector firmly against the bottom of the lower cavity of the instrument compartment, ensuring that the end face of the photonic quantum detector is perpendicular to the end face. The upper and lower cavities of the instrument compartment are connected as one unit by bolts. The lower cavity of the instrument compartment has external threads, and the main body has internal threads. It is screwed into the main body through the threads, and the main body and the instrument compartment are connected as one unit by the thread locking force.

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

7. The apparatus 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, the processors being configured to execute program instructions stored in the memory, which, when executed, perform the online real-current calibration method according to any one of claims 1 to 4.

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

  • Flow calibration system and method

    CN112903067A

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

    CN114440990A