An optical particle-based on-line metering method and system for a mixed-phase flow
By collecting pressure and density data in oil and gas wells, constructing flow pattern time periods, and analyzing photoparticle energy spectra, the problem of flow state changes interfering with the metering of miscible flow was solved, and more accurate calculation of each phase fraction was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- DAQING YILAI TESTING TECH SERVICE CO LTD
- Filing Date
- 2026-01-09
- Publication Date
- 2026-04-17
AI Technical Summary
Existing optical particle metering methods suffer from interference with flow meter accuracy due to changes in the flow state of mixed-phase flow in oil and gas wells, affecting the effectiveness of the energy spectrum signal and the accuracy of each phase fraction.
By collecting pressure and density data, a neighborhood window is constructed to obtain the flow pattern change coefficient, the flow pattern time period and the interference time period are divided, and first-order difference and spectral peak analysis are performed using optical particle energy spectrum data to obtain the energy spectrum reference weight and eliminate the influence of interference factors.
It improves the accuracy of mixed-phase flow metering, reduces the deviation of energy spectrum data due to noise interference, and ensures the calculation accuracy of each phase fraction.
Smart Images

Figure CN121476260B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of mixed-phase fluid metering technology, specifically to an online metering method and system for mixed-phase flow based on optical particles. Background Technology
[0002] The fluids in oil and gas wells are generally complex miscible fluids, meaning they contain at least two or more different phases, such as oil, gas, and water. Taking oil well production as an example, waterflooding is often used in the mid-to-late stages of well development, producing fluids that include oil-water mixtures, and in some wells, even gaseous fluids. Therefore, accurate measurement of the miscible flow at the wellhead is a crucial issue. Real-time, online, and accurate measurement and detection of miscible flow in oil and gas wells has always been a key research area in the oil and gas industry.
[0003] In fluid metering and testing, optical particle metering is a relatively advanced non-separate metering technology. It utilizes the difference in energy attenuation when light particles emitted from an optical particle source interact with substances of different phases. An energy detector then captures the absorption signal data between the mixed-phase flow and the light particles to determine the phase fractions (content parameters of different phases) for measurement. Compared to separate metering, optical particle-based mixed-phase flow metering requires the installation of flowmeters at critical locations in oil and gas wells (such as the throat). The acquired raw signals often contain significant noise interference, and the flow state of the mixed-phase flow in oil and gas well pipelines is highly variable. This complex flow state significantly interferes with the measurement accuracy of the flowmeter, reducing the effectiveness of the acquired energy spectrum signal and affecting the accuracy of subsequent calculations of phase fractions. Summary of the Invention
[0004] This invention provides an online metering method and system for mixed-phase flow based on optical particles, to solve the problem of interference from changes in the flow state of mixed-phase flow in existing oil and gas well pipelines on the measurement effectiveness of flow meters. The specific technical solution adopted is as follows:
[0005] This invention proposes an online metering method for mixed-phase flow based on optical particles, which includes the following steps:
[0006] Pressure and density data were collected at various times over a period of time using a mixed-phase flow meter, and the photoparticle energy spectrum at each time point was obtained.
[0007] A neighborhood window is constructed for each time point. Based on the differences in pressure and density data between each time point and its neighborhood window, the flow pattern change coefficient is obtained for each time point. Several flow pattern change points are then selected. Based on the temporal distribution of the flow pattern change points, several flow pattern time periods and interference time periods are divided. The energy spectrum data of each time point in each flow pattern time period is obtained through optical particle energy spectroscopy.
[0008] For any flow pattern time period, the photoparticle counting sequence of the energy spectrum data at any time is obtained, and the photoparticle change sequence is obtained through first-order difference; based on the similarity of the photoparticle change sequences at different times in the same flow pattern time period, the energy spectrum change difference factor at each time is obtained; the peak corresponding energy performance in the energy spectrum data at each time is analyzed, and the spectral peak energy of the energy spectrum data at each time is obtained; based on the performance of the spectral peak energy sum of the energy spectrum data at different times in the same flow pattern time period, the energy spectrum energy drift factor at each time is obtained.
[0009] Based on the energy spectrum variation difference factor and the energy spectrum energy drift factor, the energy spectrum reference weight at each time moment is obtained, and then the comprehensive energy spectrum data of each flow pattern time period is obtained; in this way, the phase fraction in the mixed flow is calculated, and the fluid of each phase in the mixed flow is metered.
[0010] Optionally, the flow pattern change coefficients at each time point are obtained using the following method:
[0011] For any given time and the pressure data of each time in its neighborhood window, calculate the mean and standard deviation and obtain the coefficient of variation, which is used as the flow pattern change coefficient of the pressure data at that time.
[0012] Based on the density data at this moment and at each moment in its neighborhood window, the mean and standard deviation are calculated, and the coefficient of variation is obtained, which is used as the flow pattern change coefficient of the density data at this moment.
[0013] Optionally, the specific method for obtaining several flow pattern change points through screening includes:
[0014] Neighborhood pressure thresholds are constructed based on the mean and standard deviation of the flow pattern change coefficients of pressure data at all times; neighborhood density thresholds are constructed based on the mean and standard deviation of the flow pattern change coefficients of density data at all times.
[0015] If the flow pattern change coefficient of the pressure data at any given time is greater than the neighborhood pressure threshold, and the flow pattern change coefficient of the density data at that time is greater than the neighborhood density threshold, then that time is considered a flow pattern change point.
[0016] Optionally, the specific methods for obtaining several flow pattern time periods and interference time periods include:
[0017] The first moment in all moments is taken as a flow pattern change point. For all flow pattern change points, all moments between two adjacent flow pattern change points, as well as the previous flow pattern change point between two adjacent flow pattern change points, are combined into a time period. The last moment in all moments is added to the last time period.
[0018] The preset base length of the time period is used. If the length of any time period is less than the base length, the time period is regarded as an interference time period; otherwise, the time period is regarded as a flow pattern time period.
[0019] Optionally, the specific method for obtaining the photoparticle count sequence from the energy spectrum data at any time within any flow pattern time period, and obtaining the photoparticle change sequence through first-order difference, includes:
[0020] For any flow pattern time period, the energy spectrum data at any time is represented by the number of energy points on the horizontal axis and the number of light particles on the vertical axis. The number of light particles is arranged in ascending order of the number of energy points from smallest to largest, and the resulting sequence is used as the light particle counting sequence of the energy spectrum data.
[0021] The optical particle counting sequence is subjected to first-order backward difference. The difference is obtained by subtracting the previous one from the next one of two adjacent optical particle counts. This difference is used as the first-order backward difference value. All first-order backward difference values are arranged in the order of the corresponding optical particle counts in the optical particle counting sequence. The resulting sequence is used as the optical particle change sequence of the energy spectrum data.
[0022] Optionally, the specific method for obtaining the energy spectrum variation difference factor at each time point is as follows:
[0023] For the optical particle variation sequence of the energy spectrum data at any time in any flow pattern time period, the DTW distance between the optical particle variation sequence of the optical particle variation sequence and the optical particle variation sequence of the energy spectrum data at any other time in the same flow pattern time period is obtained. The average DTW distance between the optical particle variation sequence of the optical particle variation sequence and the optical particle variation sequence of the energy spectrum data at all other times in the same flow pattern time period is used as the energy spectrum variation difference coefficient at that time.
[0024] The energy spectrum variation difference coefficients for all times in all flow pattern time periods are obtained and linearly normalized. The results are used as the energy spectrum variation difference factors for each time period.
[0025] Optionally, the sum of the peak energies of the energy spectrum data at each time point is obtained using the following method:
[0026] For the photonic particle counting sequence of the energy spectrum data at any time within any flow pattern time period, the AMPD peak detection algorithm is used to obtain several peak points and their corresponding energy point counts from the photonic particle counting sequence. The sum of the energy point counts corresponding to all peak points is taken as the sum of the spectral peak energies of the energy spectrum data at that time.
[0027] Optionally, the specific method for obtaining the energy shift factor of the energy spectrum at each time point is as follows:
[0028] For the energy spectrum data at any time within any flow pattern time period, obtain the sum of the peak energies of the energy spectrum data at each time within that flow pattern time period, and take the average of the sums of all peak energies as the standard peak energy of that flow pattern time period.
[0029] The ratio of the absolute value of the difference between the peak energy of the energy spectrum data at that moment and the standard energy of the peak energy to the standard energy of the peak energy is used as the energy drift factor of the energy spectrum at that moment.
[0030] Optionally, the specific method for obtaining the energy spectrum reference weights at each time point, and then obtaining the comprehensive energy spectrum data for each flow pattern time period, includes:
[0031] Based on the energy spectrum change difference factor and energy spectrum energy drift factor at any given time, the energy spectrum reference coefficient at that time is obtained. The energy spectrum reference coefficient is negatively correlated with both the energy spectrum change difference factor and the energy spectrum energy drift factor.
[0032] The energy spectrum reference coefficients at each time point in any flow pattern time period are weighted and normalized, and the result is used as the energy spectrum reference weight at each time point in that flow pattern time period.
[0033] Based on the energy spectrum reference weights at each time point within the flow pattern time period, the energy spectrum data at each time point are weighted and fused, and the result is used as the comprehensive energy spectrum data for the flow pattern time period.
[0034] The present invention also proposes an online metering system for mixed-phase flow based on optical particles. The system includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of the above method.
[0035] The beneficial effects of this invention are as follows: Based on the scenario of measuring the phase fractions in a mixed-phase flow using optical particles, this invention addresses the problem that traditional methods of acquiring optical particle energy spectrum data rely on weighted averaging of multiple instantaneous energy spectrum data to obtain stable energy spectrum data, which does not consider the deviations in energy spectrum data caused by the flow pattern and other factors in the actual scenario. This invention divides the flow pattern into time periods by measuring the pressure and density data of the mixed-phase flow in the pipe, and further constructs an energy spectrum change difference factor and an energy spectrum drift factor based on the differences in the spectral shapes of various energy spectrum data within the same flow pattern time period and the drift performance between the number of energy points corresponding to the spectral peaks of various energy spectrum data. This allows for the acquisition of energy spectrum reference weights at each moment within the flow pattern time period, eliminating the deviation problem in energy spectrum data caused by interference factors in the scenario, improving the accuracy of the measured energy spectrum data, and facilitating subsequent measurement of the mixed-phase flow. Attached Figure Description
[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0037] Figure 1 This is a schematic diagram of a method for online metering of mixed-phase flow based on optical particles, provided in one embodiment of the present invention.
[0038] Figure 2 This is a schematic diagram of the structure of the optical particle mixed-phase flow meter of the present invention. Detailed Implementation
[0039] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0040] Please see Figure 1 The diagram illustrates a flowchart of an online metering method for mixed-phase flow based on optical particles, according to an embodiment of the present invention. The method includes the following steps:
[0041] Step S001: Collect pressure and density data at various times over a period of time using a mixed-phase flow meter, and obtain the photoparticle energy spectrum at each time.
[0042] The purpose of this embodiment is to collect relevant data on the mixed-phase flow using a mixed-phase flow meter. The relevant data includes pressure and density data. The flow pattern of the mixed-phase flow is divided based on the relevant data, and a comprehensive analysis of the flow pattern over a time period is performed based on the energy spectrum information of optical particles. This reduces noise and interference from the complex and variable flow state of the mixed-phase flow. Therefore, it is necessary to first collect pressure data, density data, and optical particle energy spectrum using a mixed-phase flow meter.
[0043] Specifically, miscible flow meters are installed at critical locations in oil and gas well pipelines (such as the throat); for example... Figure 2 As shown, Figure 2In this diagram, A represents a particle detector, B represents a flow computer, C represents a venturi tube, D represents a particle emitter, and E represents a multi-parameter sensor. The mixed-phase flow meter includes a photonic sensor (comprising a particle emitter and a particle detector), a differential pressure sensor, and a density sensor, used to acquire the photonic energy spectrum, pressure data, and density data of the mixed-phase flow, as well as the flow computer and venturi tube. The radiation emitted by the photonic particle source in the photonic sensor is set by the implementer according to the implementation scenario; this embodiment does not impose any limitations. The sampling frequency of the photonic, differential pressure, and density sensors is 10Hz, and the mixed-phase flow metering statistical window duration is 10 minutes. This means that the actual flow rate of each phase within the statistical window is calculated based on the total volume of the mixed-phase flow flowing through the pipe within 10 minutes and related data. A time period of 10 minutes is defined as 100ms intervals, thus obtaining the pressure data, density data, and photonic energy spectrum at each time point.
[0044] It should be noted that in the process of acquiring energy spectrum data of miscible flow based on optical particle sensors, a certain amount of time is generally required to form a specific energy spectrum. Then, the phase fractions in the miscible flow are calculated based on the acquired energy spectrum data. However, in the later stages of oil and gas well production, various displacement methods (such as water drive) are required to displace oil, resulting in a miscible flow containing multiple different phases at the wellhead. Furthermore, with changes in production conditions, the flow pattern of the miscible flow changes, and issues such as oil-water emulsification may occur, affecting the energy spectrum data of the mixed flow collected by optical particle sensors. Traditional energy spectrum data is obtained by collecting short-time energy spectra under multiple counting windows and performing weighted averaging, statistically calculating the average count value of the corresponding energy range as the final energy spectrum data. This does not consider the different flow patterns of the miscible flow and the interference of noise in the scene on the statistical results. The energy spectrum data obtained by directly using weighted averaging has a large deviation under various influences, affecting the accuracy of subsequent calculations of phase fractions.
[0045] It should be further noted that during the extraction of oil and gas wells, the miscible flow in the underground reservoir is affected by factors such as fluctuations in operating conditions or the injection of displacing media. This leads to changes in the fraction of each phase in the miscible flow, resulting in short-term changes in the flow pattern (such as slug flow and foam flow). The flow state of the fluid is maintained for a short time before switching. This short-term change in flow pattern affects the accuracy of the data measured by the flow meter. For example, the distribution of oil, gas, and water phases in the miscible flow in the pipeline differs significantly under different flow patterns (e.g., in foam flow, there is oil-water emulsification, and the gas-liquid interface causes a large amount of scattering of light particles, affecting the count of light particles in different energy ranges). The energy absorption attenuation coefficient and effective penetration length of the light particles emitted by the light particle sensor are affected by the differences in the distribution of each phase, resulting in large differences in the spectral shape of the energy spectrum data of different flow patterns. If the weighted average is not taken into account for the instantaneous energy spectrum changes caused by the differences, the final energy spectrum data will be distorted, resulting in a large error in the subsequent inversion calculation of each phase fraction.
[0046] Step S002: Construct a neighborhood window for each time point. Based on the differences in pressure and density data between each time point and its neighborhood window, obtain the flow pattern change coefficient for each time point. Use this to filter out several flow pattern change points. Based on the temporal distribution of the flow pattern change points, divide the flow pattern time period and interference time period. Obtain the energy spectrum data of each time point in each flow pattern time period through optical particle energy spectrum.
[0047] It should be noted that, firstly, the data collected under the data statistics window is classified into flow patterns. In the mixed flow in oil and gas well pipelines, the flow state changes due to the changes in the fractions of each phase, resulting in different flow patterns. The changes in the fractions of each phase will also cause fluctuations in the pressure and density data measured at the throat. If the flow pattern is stable, the content of different phases in the fluid is close over a period of time, and the actual measured pressure and density data are close. When the flow pattern changes, such as an increase in the gas phase, the measured pressure and density decrease.
[0048] Preferably, in one embodiment of the present invention, a neighborhood window is constructed for each time point, and the flow pattern change coefficient is obtained based on the differences in pressure and density data between each time point and its neighborhood window. This is used to filter out several flow pattern change points. The specific method includes:
[0049] A neighborhood window is constructed centered on any given moment, with the size of the neighborhood window ranging from 3 to 11. This embodiment uses a neighborhood window size of 7 for description. It is worth noting that if the moment is close to the beginning or end of a time period, making it impossible to obtain its complete neighborhood window, the actual moments within that time period are used to construct its neighborhood window. For the pressure data of any given moment and each moment in its neighborhood window, the mean and standard deviation are calculated, and the coefficient of variation is obtained, which serves as the flow pattern change coefficient for the pressure data at that moment. Similarly, based on the density data of that moment and each moment in its neighborhood window, the mean and standard deviation are calculated, and the coefficient of variation is obtained, which serves as the flow pattern change coefficient for the density data at that moment. The coefficient of variation is the ratio of the standard deviation to the mean.
[0050] Furthermore, based on the mean and standard deviation of the flow pattern change coefficients of the pressure data at all times, a neighborhood pressure threshold is constructed. In this embodiment, the three-standard-deviation method is used to obtain the neighborhood pressure threshold. That is, based on the normal distribution, the mean of the flow pattern change coefficients of the pressure data is added to three times the standard deviation to obtain the result as the neighborhood pressure threshold. Based on the mean and standard deviation of the flow pattern change coefficients of the density data at all times, a neighborhood density threshold is constructed, and the three-standard-deviation method is used similarly. If the flow pattern change coefficient of the pressure data at any time is greater than the neighborhood pressure threshold, and the flow pattern change coefficient of the density data at that time is greater than the neighborhood density threshold, that time is regarded as a flow pattern change point. The flow pattern change coefficients of the pressure data and density data at each time are judged according to the above method, and then several flow pattern change points are obtained.
[0051] It should be further noted that in different flow patterns of the mixed-phase flow, the duration of the flow pattern generally ranges from tens of seconds to tens of minutes. If the flow pattern changes frequently in a short period of time, the mixed-phase flow data during this period is unreliable and it is difficult to provide enough time to obtain stable energy spectrum data. Therefore, the period of frequent flow pattern switching in a short period of time is regarded as the interference period and is not included in the subsequent statistical calculation.
[0052] Preferably, in one embodiment of the present invention, based on the temporal distribution of the flow pattern change points, several flow pattern time periods and interference time periods are obtained, and the energy spectrum data of each time period in each flow pattern time period is obtained through optical particle energy spectroscopy. The specific method includes:
[0053] The first moment of all moments is taken as a manifold change point. For all manifold change points, all moments between two adjacent manifold change points, as well as the preceding manifold change point between two adjacent manifold change points, constitute a time period. The last moment of all moments is added to the last time period. A preset base length for the time period is used, which is described as 5 seconds in this embodiment. If the length of any time period is less than the base length, the time period is taken as an interference time period; otherwise, the time period is taken as a manifold time period. The photonic energy spectrum of any moment in each manifold time period is taken as the energy spectrum data for that moment. It should be noted that the energy spectrum change difference factor and energy spectrum drift factor of each moment in the interference time period are not included in the calculation of the energy spectrum change difference factor and energy spectrum drift factor of all subsequent moments.
[0054] Thus, we have obtained the energy spectrum data for several flow pattern time periods and each time point within them.
[0055] Step S003: Obtain the photoparticle counting sequence of the energy spectrum data at any time within any flow pattern time period, and obtain the photoparticle change sequence through first-order difference; based on the similarity of the photoparticle change sequences at different times within the same flow pattern time period, obtain the energy spectrum change difference factor at each time; analyze the energy performance corresponding to the peak values in the energy spectrum data at each time, obtain the sum of the peak energies of the energy spectrum data at each time, and obtain the energy spectrum energy drift factor at each time based on the performance of the sum of the peak energies of the energy spectrum data at different times within the same flow pattern time period.
[0056] It should be noted that the energy spectrum data of mixed-phase flow obtained under the same flow pattern are relatively stable in terms of macroscopic flow state. Because the phase fractions of the fluid in the mixed-phase flow of the same flow pattern are close and the fluid state is relatively stable, the energy absorption effect of the emitted light particles is similar. Therefore, the light particle count and light particle distribution probability in the same energy range are similar in the energy spectrum data, that is, the spectral peaks of the energy spectrum data do not drift and the overall peak shape is similar. However, in actual measurement scenarios, the distribution of each phase medium in the mixed-phase flow in the pipeline is uncertain in the local space. The distribution of some phase mediums is relatively random (such as the size of solid particles and the degree of aggregation of gas bubbles, which can lead to severe local scattering). This causes fluctuations in the effective absorption length and scattering probability of light particles in the penetration path, and the energy spectrum data will show a certain deviation and drift in the spectral shape. Therefore, even under the same flow pattern, the spectral peak amplitude, energy range and spectral shape stability of the energy spectrum data will still show a certain degree of dispersion in actual industrial measurement scenarios. If these deviations are not considered and weighted average statistics are used, systematic bias will be introduced.
[0057] It should be further explained that by analyzing the differences between energy spectrum data under the same flow pattern and the variability of spectral peaks in individual energy spectrum data, a basis is provided for constructing energy spectrum reference weights for energy spectrum data at each time point, eliminating the deviation problem of energy spectrum data caused by interference factors in the scene. In different energy spectrum data under the same flow pattern, there may be different volumes of fluid flowing through the pipe, resulting in differences in the amplitude of the spectral peaks. However, this difference changes linearly with the volume, that is, the overall spectral shape of the energy spectrum data remains stable. Therefore, by analyzing the changes in the number of light particles at different energies in different energy spectrum data, the differences between energy spectrum data can be reflected.
[0058] Preferably, in one embodiment of the present invention, the method for obtaining the photoparticle count sequence of energy spectrum data at any time within any flow pattern time period, and obtaining the photoparticle change sequence through first-order difference, includes the following specific method:
[0059] For any energy spectrum data at any time within any flow pattern time period, the horizontal axis represents the number of energy points, and the vertical axis represents the number of light particles. The number of light particles is arranged in ascending order according to the number of energy points, and the resulting sequence is used as the light particle counting sequence of the energy spectrum data. The light particle counting sequence is then subjected to a first-order backward difference, which is obtained by subtracting the previous value from the next value of two adjacent light particle counts. This difference is used as the first-order backward difference value. All first-order backward difference values are arranged according to the order of the corresponding light particle counts in the light particle counting sequence, and the resulting sequence is used as the light particle change sequence of the energy spectrum data.
[0060] Preferably, in one embodiment of the present invention, the energy spectrum variation difference factor at each time point is obtained based on the similarity of the light particle change sequence at different times within the same flow pattern time period. The specific method includes:
[0061] For the photonic variation sequence of the energy spectrum data at any time within any flow pattern time period, the DTW distance between this photonic variation sequence and the photonic variation sequence of the energy spectrum data at any other time within the same flow pattern time period is obtained. The average DTW distance between this photonic variation sequence and the photonic variation sequences of the energy spectrum data at all other times within the same flow pattern time period is used as the energy spectrum variation difference coefficient at that time. The energy spectrum variation difference coefficients for all times within all flow pattern time periods are obtained using the above method, and linear normalization is performed. The results are used as the energy spectrum variation difference factors for each time period.
[0062] It should be noted that different energy spectrum data may be affected by fluid volume, resulting in different numbers of light particles. However, in the absence of interference, the overall similarity of the spectral peaks is high, meaning that the changes in the number of light particles at different energies in energy spectrum data of the same flow pattern are similar. If interference exists, it will cause local changes in the spectral peaks of a certain energy spectrum data, resulting in significant differences in the changes in the number of light particles at different energies. Through similarity analysis between light particle change sequences, the larger the mean DTW distance, the more interference there is, leading to local anomalies in the spectral peaks and a greater difference in spectral shape from most energy spectrum data. Conversely, the smaller the mean DTW distance, the less interference there is and the more similar the spectral shape is to other energy spectrum data.
[0063] Preferably, in one embodiment of the present invention, the peak energy corresponding to the energy spectrum data at each time point is analyzed to obtain the sum of the peak energies of the energy spectrum data at each time point. Based on the performance of the sum of the peak energies of the energy spectrum data at different times within the same flow pattern time period, the energy spectrum energy drift factor at each time point is obtained. The specific method includes:
[0064] For the photonic particle counting sequence of the energy spectrum data at any time within any flow pattern time period, the AMPD peak detection algorithm is used to obtain several peak points and their corresponding energy point counts from the photonic particle counting sequence. The sum of the energy point counts corresponding to all peak points is taken as the sum of the peak energies of the energy spectrum data at that time. The AMPD peak detection algorithm is a well-known technology and will not be described in detail in this embodiment. The sum of the peak energies of the energy spectrum data at each time within the flow pattern time period is obtained according to the above method. The average of the sums of all peak energies is taken as the standard peak energy of the flow pattern time period. The ratio of the absolute value of the difference between the sum of the peak energies of the energy spectrum data at that time and the standard peak energy to the standard peak energy is taken as the energy drift factor of the energy spectrum at that time.
[0065] It should be noted that within the same flow pattern and time period, under conditions of no external interference, the energy spectrum data of the same flow pattern will have a small shift, and the energy points corresponding to each peak will remain the same. When subjected to external interference, the interference of local phases in the fluid will cause the peaks to drift, and the corresponding energy points will also increase or decrease. That is, the peak energy is obtained by extracting the peak points, and the greater the deviation of the peak energy from the mean, the greater the corresponding energy spectrum energy drift factor.
[0066] Thus, the energy spectrum variation difference factor and energy spectrum energy drift factor at each time point are obtained.
[0067] Step S004: Based on the energy spectrum change difference factor and the energy spectrum energy drift factor, obtain the energy spectrum reference weight at each time point, and then obtain the comprehensive energy spectrum data of each flow pattern time period; calculate the phase fraction in the mixed flow to realize the metering of each phase fluid in the mixed flow.
[0068] Specifically, based on the energy spectrum change difference factor and energy spectrum energy drift factor at any given time, an energy spectrum reference coefficient is obtained at that time. The energy spectrum reference coefficient is negatively correlated with both the energy spectrum change difference factor and the energy spectrum energy drift factor.
[0069] As an example, the energy spectrum change difference factor and energy spectrum energy shift factor at that moment are respectively inversely proportionalized. This embodiment uses... The model is used to present the inverse proportional processing. As input to the model, The energy spectrum reference coefficient at that moment is the mean of the inverse proportional results obtained from the energy spectrum variation difference factor and the energy spectrum energy drift factor, which are exponential functions with the natural constant as the base. In this embodiment, the energy spectrum variation difference factor and the energy spectrum energy drift factor are considered to be equally important, so the energy spectrum reference coefficient is obtained by averaging them.
[0070] As another example, the difference obtained by subtracting the energy spectrum change difference factor at that moment from 1 is used as the energy spectrum reference coefficient at that moment. In order to avoid the denominator being 0 during the ratio calculation, a hyperparameter is added to both the denominator and the numerator. In this embodiment, the hyperparameter is described as 0.001.
[0071] It should be noted that, since both the energy spectrum variation difference factor and the energy spectrum energy drift factor reflect that the energy spectrum data at the corresponding moment does not conform to the overall change in the corresponding flow pattern over the time period, the larger the energy spectrum variation difference factor and the energy spectrum energy drift factor are, the greater the interference on the energy spectrum data, and the smaller the corresponding energy spectrum reference coefficient needs to be.
[0072] Furthermore, the energy spectrum reference coefficients at each moment within any flow pattern time period are weighted and normalized, and the results are used as the energy spectrum reference weights at each moment within that flow pattern time period. Based on the energy spectrum reference weights at each moment within that flow pattern time period, the energy spectrum data at each moment are weighted and fused, and the results are used as the comprehensive energy spectrum data for that flow pattern time period. The weighted fusion is to weight and sum the number of light particles with the same energy point in multiple energy spectrum data, thereby obtaining the weighted sum of the number of light particles with the same energy point, and thus forming the comprehensive energy spectrum data.
[0073] Furthermore, the comprehensive energy spectrum data for each flow pattern time period is obtained according to the above method. For the comprehensive energy spectrum data of any flow pattern time period, the phase fractions of the mixed-phase flow are obtained. Given the known ray activity emitted by the optical particle sensor, the ray transmission activity at different energy levels, the penetration length, and the gamma ray linear absorption coefficients of different phases (oil, gas, and water phases) at different energy levels, the phase fractions of different phases are calculated. This embodiment will not elaborate further. The penetration length is a fixed parameter for installing the optical particle sensor. The gamma ray linear absorption coefficients of different phases (oil, gas, and water phases) at different energy levels are inherent physical properties of the material and are obtained directly. The emitted ray activity and the ray transmission activity at different energy levels are obtained by integrating the energy spectrum data. This embodiment will not elaborate further. Based on the comprehensive energy spectrum data for each flow pattern time period, the phase fractions are obtained. Combined with the comprehensive energy spectrum data, fluid metering for each phase medium in the mixed-phase flow can be achieved.
[0074] This concludes the embodiment.
[0075] Another embodiment of the present invention provides an online metering system for mixed-phase flow based on optical particles. The system includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the above-described method steps S001 to S004.
[0076] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for online metering of mixed-phase flow based on optical particles, characterized in that, The method includes the following steps: Pressure and density data were collected at various times over a period of time using a mixed-phase flow meter, and the photoparticle energy spectrum at each time point was obtained. A neighborhood window is constructed for each time point. Based on the differences in pressure and density data between each time point and its neighborhood window, the flow pattern change coefficient is obtained for each time point. Several flow pattern change points are then selected. Based on the temporal distribution of the flow pattern change points, several flow pattern time periods and interference time periods are divided. The energy spectrum data of each time point in each flow pattern time period is obtained through optical particle energy spectroscopy. For any flow pattern time period, the photoparticle counting sequence of the energy spectrum data at any time is obtained, and the photoparticle change sequence is obtained through first-order difference; based on the similarity of the photoparticle change sequences at different times in the same flow pattern time period, the energy spectrum change difference factor at each time is obtained; the peak corresponding energy performance in the energy spectrum data at each time is analyzed, and the spectral peak energy of the energy spectrum data at each time is obtained; based on the performance of the spectral peak energy sum of the energy spectrum data at different times in the same flow pattern time period, the energy spectrum energy drift factor at each time is obtained. Based on the energy spectrum variation difference factor and the energy spectrum energy drift factor, the energy spectrum reference weight at each time moment is obtained, and then the comprehensive energy spectrum data of each flow pattern time period is obtained; in this way, the phase fraction in the mixed flow is calculated, and the fluid of each phase in the mixed flow is metered. Specifically, for any given time and the pressure data of each time in its neighborhood window, the mean and standard deviation are calculated, and the coefficient of variation is obtained, which serves as the flow pattern change coefficient for the pressure data at that time. Based on the density data of that time and the density data of each time in its neighborhood window, the mean and standard deviation are calculated, and the coefficient of variation is obtained, which serves as the flow pattern change coefficient for the density data at that time. The method for obtaining several flow pattern change points is as follows: a neighborhood pressure threshold is constructed based on the mean and standard deviation of the flow pattern change coefficients of the pressure data at all times; a neighborhood density threshold is constructed based on the mean and standard deviation of the flow pattern change coefficients of the density data at all times; if the flow pattern change coefficient of the pressure data at any time is greater than the neighborhood pressure threshold, and the flow pattern change coefficient of the density data at that time is greater than the neighborhood density threshold, then that time is taken as a flow pattern change point. The method for obtaining several flow pattern time periods and interference time periods is as follows: the first moment among all moments is taken as a flow pattern change point. For all flow pattern change points, all moments between two adjacent flow pattern change points, as well as the previous flow pattern change point among two adjacent flow pattern change points, constitute a time period. The last moment among all moments is added to the last time period. A preset basic length of time period is used. If the length of any time period is less than the basic length of time period, the time period is taken as an interference time period; otherwise, the time period is taken as a flow pattern time period. The process of obtaining the light particle variation sequence through first-order difference includes: for energy spectrum data at any time within any flow pattern time period, with energy as the horizontal axis and the number of light particles as the vertical axis, arranging the number of light particles in ascending order of energy, and obtaining the sequence as the light particle counting sequence of the energy spectrum data; performing first-order backward difference on the light particle counting sequence, subtracting the previous value from the next value of two adjacent light particle counts to obtain the difference value, and arranging all first-order backward difference values according to the order of the corresponding light particle counts in the light particle counting sequence, and obtaining the sequence as the light particle variation sequence of the energy spectrum data; The method for obtaining the energy spectrum variation difference factor at each time point is as follows: For the photonic particle variation sequence of the energy spectrum data at any time point within any flow pattern time period, the DTW distance between the photonic particle variation sequence and the photonic particle variation sequence of the energy spectrum data at any other time point within the same flow pattern time period is obtained. The average DTW distance between the photonic particle variation sequence and the photonic particle variation sequences of the energy spectrum data at any other time point within the same flow pattern time period is used as the energy spectrum variation difference coefficient at that time point. The energy spectrum variation difference coefficients at all times within all flow pattern time periods are obtained and linearly normalized. The results are used as the energy spectrum variation difference factor at each time point. The method for obtaining the sum of peak energies of the energy spectrum data at each moment is as follows: For the photonic particle counting sequence of the energy spectrum data at any moment in any flow pattern time period, the AMPD peak detection algorithm is used to obtain several peak points and their corresponding energies from the photonic particle counting sequence. The sum of the energies corresponding to all peak points is taken as the sum of peak energies of the energy spectrum data at that moment. The method for obtaining the energy drift factor at each moment is as follows: For the energy spectrum data at any moment in any flow pattern time period, obtain the sum of the peak energies of the energy spectrum data at each moment in that flow pattern time period, and take the average of the sums of all peak energies as the standard peak energy of that flow pattern time period; take the absolute value of the difference between the sum of the peak energies of the energy spectrum data at that moment and the standard peak energy as the ratio obtained by dividing the standard peak energy by the standard peak energy as the energy drift factor at that moment.
2. The online metering method for mixed-phase flow based on optical particles according to claim 1, characterized in that, The specific method for obtaining the energy spectrum reference weights at each time point, and then obtaining the comprehensive energy spectrum data for each flow pattern time period, includes: Based on the energy spectrum change difference factor and energy spectrum energy drift factor at any given time, the energy spectrum reference coefficient at that time is obtained. The energy spectrum reference coefficient is negatively correlated with both the energy spectrum change difference factor and the energy spectrum energy drift factor. The energy spectrum reference coefficients at each time point in any flow pattern time period are weighted and normalized, and the result is used as the energy spectrum reference weight at each time point in that flow pattern time period. Based on the energy spectrum reference weights at each time point within the flow pattern time period, the energy spectrum data at each time point are weighted and fused, and the result is used as the comprehensive energy spectrum data for the flow pattern time period.
3. An online metering system for mixed-phase flow based on optical particles, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the online metering method for mixed-phase flow based on optical particles as described in any one of claims 1-2.
Citation Information
Patent Citations
Gamma ray detection system and signal calibration and mixed medium phase fraction calculation method
CN109655930A
Light quantum mixed phase mass fraction measurement method and device
CN113984719A