A Filter-Enhanced Method and Device for Multiphase Flow Measurement

By fusing multilayer perceptron and multiscale convolutional neural network based on filter enhancement to process multiphase flow data, the error and noise problems in multiphase flow measurement in the prior art are solved, and higher accuracy flow estimation and multi-task learning are achieved.

CN118999702BActive Publication Date: 2026-03-10TSINGHUA SHENZHEN INTERNATIONAL GRADUATE SCHOOL
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-01
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

In existing technologies, multiphase flow measurement methods have errors under complex flow conditions. Sensor data is directly input into the neural network without noise processing, causing noise signals to be interpreted as flow characteristics. Traditional filtering algorithms require manual setting of the filtering range, resulting in insufficient filtering and time consumption.

Method used

A filter-enhanced approach is adopted, which fuses data from a differential pressure flow meter and a capacitance tomography sensor using a multilayer perceptron, performs adaptive filtering using a filter enhancement module, and processes feature vectors using a multi-scale convolutional neural network to achieve multi-task learning to estimate the single-phase flow rate of multiphase flow.

Benefits of technology

It effectively reduces the impact of noise, improves the accuracy and robustness of flow estimation, and can simultaneously estimate multiple single-phase flow values ​​under a single model, reducing overfitting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118999702B_ABST
    Figure CN118999702B_ABST
Patent Text Reader

Abstract

This application relates to the field of machine learning technology and discloses a method and apparatus for measuring multiphase flow based on filter enhancement. A differential pressure flowmeter module collects first data, and a capacitance tomography sensor collects second data. A multilayer perceptron fuses the first and second data to obtain fused data, reducing the impact of different sensor data on model performance. Multiple filter enhancement modules adaptively filter the fused data channel by channel, attenuating data noise and mitigating overfitting. A multi-scale convolutional neural network processes the filtered data to obtain multi-scale feature vectors, enabling parallel learning of rich flow information at different scales from random flow points. Finally, multiple fully connected layers process the multi-scale feature vectors, outputting multiple single-phase flow values ​​for the multiphase flow. Multi-task learning allows for simultaneous estimation of the single-phase flow of the multiphase flow.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of machine learning technology, specifically to a method and apparatus for measuring multiphase flow rate based on filter enhancement. Background Technology

[0002] Moist gas generally refers to a fluid containing a large amount of liquid within a large gas phase, including humid gases and multiphase flows with a liquid content of less than 5% to 10%. The most common methods for measuring moist gas include tracer methods, microwave, ultrasonic, terahertz, and Venturi tube differential pressure measurements. In oil and gas extraction, natural gas produced directly from the wellhead without dehydration treatment and condensate recovery is usually referred to as moist gas. Moist gas contains a certain amount of water vapor and liquid hydrocarbons, and its main sources include shale gas and other types of unconventional natural gas resources.

[0003] Shale gas is a clean, efficient, low-carbon, and high-quality energy source that plays a vital role in current energy consumption. However, shale gas production, liquid production, and wellhead pressure gradually decrease with increasing extraction time. Compared to conventional natural gas production, shale gas wellhead production declines much faster, with most wellhead production decreasing by about 40% in the first year. Therefore, it is necessary to monitor shale gas production, obtain reservoir information, and evaluate well productivity, which is crucial for optimizing gas field development plans and making production decisions. However, due to the complexity of this gas-liquid two-phase flow, flow measurement is prone to errors. Existing measurement methods, such as tracer methods, microwave, ultrasonic, terahertz, and Venturi pressure differential methods, are mostly developed under stable flow conditions, where the test conditions are manually controlled, and the test points are limited to a few dozen manually set flow points.

[0004] Furthermore, these flow measurement methods directly input sensor data into neural network-based models without noise processing, causing most neural networks to interpret noise signals as flow characteristics. Additionally, traditional filtering algorithms require manual setting of the filtering range in the frequency domain, which also leads to insufficient filtering and time consumption in these flow measurement methods. Summary of the Invention

[0005] This application provides a multiphase flow measurement method based on filter enhancement to solve the problems in the prior art, which directly inputs sensor data into a neural network-based model without noise processing, causing most neural networks to interpret noise signals as flow characteristics, and traditional filtering algorithms still require manual setting of the filtering range in the frequency domain.

[0006] Accordingly, this application also provides a filter-enhanced multiphase flow measurement device, an electronic device, and a computer-readable storage medium to ensure the implementation and application of the above method.

[0007] To address the aforementioned technical problems, this application discloses a multiphase flow rate measurement method based on filter enhancement, the method comprising:

[0008] Acquire multiphase flow rate data samples; the multiphase flow rate data samples include the first data collected by the differential pressure flow meter module and the second data collected by the capacitance tomography sensor;

[0009] The first and second data are fused using a multilayer perceptron to obtain fused data;

[0010] The filter enhancement module is used to perform adaptive filtering on each channel of the fused data to obtain filtered data;

[0011] The filtered data is processed using a multi-scale convolutional neural network to obtain feature vectors of multiple different scales, and the features of multiple different scales are fused to obtain a multi-scale feature vector.

[0012] The multi-scale feature vectors are processed by multiple fully connected layers, which output multiple single-phase flow values ​​for the multiphase flow.

[0013] This application also discloses a multiphase flow measurement device based on filter enhancement, the device comprising:

[0014] The data acquisition module is used to acquire multiphase flow rate data samples; the multiphase flow rate data samples include the first data acquired by the differential pressure flow meter module and the second data acquired by the capacitance tomography sensor.

[0015] The data fusion module is used to fuse the first data and the second data using a multilayer perceptron to obtain fused data;

[0016] The filter enhancement module is used to perform adaptive filtering on the fused data channel by channel to obtain filtered data;

[0017] The feature extraction module is used to process the filtered data using a multi-scale convolutional neural network to obtain feature vectors of multiple different scales, and to fuse the features of multiple different scales to obtain a multi-scale feature vector.

[0018] The prediction module processes multi-scale feature vectors through multiple fully connected layers, corresponding to the output of multiple single-phase flow values ​​for multiphase flow.

[0019] This application also discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement one or more of the methods described in this application.

[0020] This application also discloses a computer-readable storage medium storing a computer program that, when executed by a processor, implements one or more of the methods described in this application.

[0021] This application acquires multiphase flow rate data samples, including first data collected by a differential pressure flowmeter module and second data collected by a capacitance tomography sensor. A multilayer perceptron is used to fuse the first and second data to obtain fused data, reducing the impact of different sensor data on model performance. Multiple filter enhancement modules are used to adaptively filter each channel of the fused data to obtain filtered data, which can attenuate data noise and reduce overfitting. A multi-scale convolutional neural network is used to process the filtered data to obtain multiple feature vectors at different scales, and these features are fused to obtain a multi-scale feature vector, allowing for parallel learning of rich flow information at different scales from random flow points. Finally, multiple fully connected layers process the multi-scale feature vectors to output multiple single-phase flow values ​​for the multiphase flow, enabling simultaneous estimation of the single-phase flow of the multiphase flow through multi-task learning.

[0022] Additional aspects and advantages of this application will be set forth in the following description, and will become apparent from the description or may be learned by practice of this application. Attached Figure Description

[0023] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0024] Figure 1 A flowchart of a filter-enhanced multiphase flow measurement method provided in this application embodiment;

[0025] Figure 2 A flowchart of a gas-liquid two-phase flow rate measurement method provided in this application embodiment;

[0026] Figure 3 This is a schematic diagram of the differential pressure flow meter module provided in the embodiments of this application;

[0027] Figure 4 This is a schematic diagram of the structure of the capacitance tomography module provided in the embodiments of this application;

[0028] Figure 5 A graph showing the flow measurement results obtained by the single-scale convolutional neural network method without filter enhancement provided in this application embodiment;

[0029] Figure 6 The flow measurement result diagram is provided by the multi-scale convolutional neural network method without filter enhancement provided in the embodiments of this application.

[0030] Figure 7 A flow measurement result diagram obtained by the filter-enhanced single-scale convolutional neural network method provided in the embodiments of this application;

[0031] Figure 8 The flow measurement result diagram is provided by the multi-scale convolutional neural network method with filter enhancement in the embodiments of this application.

[0032] Figure 9 A schematic diagram of the structure of the multiphase flow measurement device based on filter enhancement provided in the embodiments of this application;

[0033] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0034] Among them, 301-long throat venturi tube, 3011-upstream pipeline, 3012-contraction section, 3013-straight pipe section, 3014-expansion section, 3015-downstream pipeline, 302-front differential pressure sensor, 303-rear differential pressure sensor, 304-pressure sensor, 305-temperature sensor; 401-support tube, 402-integrated structure of electrode and shielding layer, 4021-inner covering film, 4022-electrode sheet, 4023-insulating layer, 4024-shielding layer, 4025-outer covering film, 403-control circuit, 4031-DDS signal generation module, 4032-C / V conversion module, 4033-ADC module, 4034-FPGA board. Detailed Implementation

[0035] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.

[0036] Those skilled in the art will understand that, unless explicitly stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this application means the presence of features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or combinations thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.

[0037] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0038] The solutions provided in this application can be executed by any electronic device, such as a terminal device or a server. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited herein. Regarding the technical problems existing in the prior art, the filter-enhanced multiphase flow measurement method and apparatus provided in this application aim to solve at least one of the technical problems of the prior art.

[0039] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0040] This application provides a possible implementation method, such as... Figure 1 The diagram shows a flowchart of a multiphase flow measurement method based on filter enhancement. This method can be executed by any electronic device, optionally on a server or a terminal device.

[0041] like Figure 1 As shown, the method may include the following steps:

[0042] Step 101: Obtain multiphase flow rate data samples; the multiphase flow rate data samples include the first data collected by the differential pressure flow meter module and the second data collected by the capacitance tomography sensor.

[0043] The first data includes pressure differences between multiple locations and temperature values ​​of the pipe wall, while the second data includes multiple independent capacitance values ​​collected from the pipe wall.

[0044] In this embodiment, a flow dataset is constructed by collecting a large number of different multiphase flow data samples from two sensors—a differential pressure flow meter module and a capacitance tomography sensor—on a semi-industrial platform. This dataset is used to train the flow measurement model. The flow measurement model in this embodiment includes at least the following components: a multilayer perceptron, multiple filter enhancement modules, a multi-scale convolutional neural network, and multiple fully connected layers.

[0045] Step 102: Use a multilayer perceptron to fuse the first data and the second data to obtain fused data.

[0046] like Figure 2 As shown, a multilayer perceptron is used to fuse the input data (capacitance, pressure difference, and temperature). This part integrates data from multiple sensors, which can reduce the impact of different sensor data on model performance.

[0047] Step 103: Use the filter enhancement module to perform adaptive filtering on each channel of the fused data to obtain filtered data.

[0048] To reduce noise from multiple sensors and enhance the robustness of the method, embodiments of this application incorporate insights from the field of digital signal processing to mitigate the impact of noise on the data. The concept of globally learnable filtering, used in image processing and natural language processing, is applied to gas-liquid two-phase flow estimation. Unlike traditional filtering algorithms, embodiments of this application employ a learnable filter enhancement module that eliminates the need for manual selection of the filtering range. It can adaptively focus on noise in the fused data, thereby reducing the neural network's fitting to noise and improving the performance of flow estimation.

[0049] Step 104: Use a multi-scale convolutional neural network to process the filtered data to obtain multiple feature vectors of different scales, and fuse the features of multiple different scales to obtain a multi-scale feature vector.

[0050] Step 105: The multi-scale feature vector is processed through multiple fully connected layers to output multiple single-phase flow values ​​of the multiphase flow.

[0051] Previous methods required separate model parameters to estimate the flow rate of each phase. This application addresses these issues through a multi-task learning approach. During training, the errors of multiple single-phase flow rate values ​​for multiphase flow can be adjusted simultaneously, continuously supplementing multiple tasks and effectively achieving the estimation of multiple single-phase flow rate values ​​under a single model parameter.

[0052] In this embodiment, multiphase flow data samples are acquired, including first data collected by a differential pressure flowmeter module and second data collected by a capacitance tomography sensor. A multilayer perceptron is used to fuse the first and second data to obtain fused data, reducing the impact of different sensor data on model performance. Multiple filter enhancement modules are used to adaptively filter each channel of the fused data to obtain filtered data, which can attenuate data noise and reduce overfitting. A multi-scale convolutional neural network is used to process the filtered data to obtain multiple feature vectors of different scales, and these features are fused to obtain a multi-scale feature vector, allowing for parallel learning of rich flow information at different scales from random flow points. Finally, multiple fully connected layers process the multi-scale feature vectors to output multiple single-phase flow values ​​of the multiphase flow, enabling simultaneous estimation of the single-phase flow of the multiphase flow through multi-task learning.

[0053] In an optional embodiment, such as Figure 3 As shown, the differential pressure flow meter module includes a long-throat venturi tube 301 and a front differential pressure sensor 302, a rear differential pressure sensor 303, a pressure sensor 304, and a temperature sensor 305 disposed on the long-throat venturi tube 301. The long-throat venturi tube 301 includes an upstream pipe 3011, a contraction section 3012, a straight pipe section 3013, an expansion section 3014, and a downstream pipe 3015. The front differential pressure sensor 302 is installed between the inlet of the contraction section 3012 and the inlet of the straight pipe section 3013. The pressure sensor 304 is generally installed in the upstream pipe 3011, and the temperature sensor 305 is generally installed in the downstream pipe 3015.

[0054] In this embodiment of the application, the first data collected by the differential pressure flow meter module includes the pressure difference between three different locations measured by the front differential pressure sensor 302, the rear differential pressure sensor 303, and the pressure sensor 304, as well as the temperature value of the pipe wall.

[0055] like Figure 4As shown, the capacitance tomography sensor includes a support tube 401, an integrated electrode and shielding structure 402, and a control circuit 403. The integrated electrode and shielding structure 402 is composed of five layers of dielectric material stacked sequentially, from the inside out: an inner cover film 4021, electrode sheets 4022, an insulating layer 4023, a shielding layer 4024, and an outer cover film 4025. Multiple electrode sheets 4022 are evenly distributed circumferentially on the inner cover film 4021. The control circuit 403 includes a DDS signal generation module 4031, a C / V conversion module 4032, an ADC module 4033, and an FPGA board 4034. In this embodiment, eight electrode sheets 4022 are used as an example; each electrode sheet 4022 can be used as a transmitter or a detector. In an 8-electrode capacitance tomography sensor setup, one electrode 4022 is excited at once, while the other electrodes 4022 remain at zero potential. The total number of independent capacitance measurements is 8 × (8-1) / 2 = 28. In the capacitance tomography sensor, the boundary conditions require the potential distribution of the excited electrode 4022 to be φ = V, and the potential distribution of the remaining electrodes 4022 to be φ = 0. The relationship between capacitance and dielectric constant distribution can be expressed as:

[0056]

[0057] Where Q is the charge, ε(x,y) and φ(x,y) are the allowable activity distribution and potential distribution of the sensing region, respectively, and Γ is the electrode surface. This is the gradient operator.

[0058] In this embodiment of the application, the second data acquired by the capacitance tomography sensor includes 28 independent capacitance values ​​acquired from the tube wall.

[0059] As a first example, the differential pressure flow measurement module uses a sampling frequency of 10Hz, and the capacitance tomography sensor uses a sampling frequency of 40Hz. The data sampled using both the differential pressure flow meter module and the capacitance tomography sensor lasts for one minute. The different sampling frequencies of the differential pressure flow meter module and the capacitance tomography sensor are then unified into a single time step, resulting in a data sample with a dimension of 600×32. Unstable and incorrectly sampled flow data points are removed, and these data points are then divided into training, validation, and test sets.

[0060] In an optional embodiment, the multilayer perceptron includes two fully connected layers; the multilayer perceptron is used to fuse the first data and the second data to obtain fused data, including:

[0061] The first and second data are fused using two fully connected layers to obtain fused data.

[0062] Based on the first example above, each data sample is input into a multilayer perceptron, which consists of two fully connected layers. The hidden layer dimension of each fully connected layer is 64, and the final output data dimension is 600×64.

[0063] The multilayer perceptron uses two fully connected layers to fuse the first and second data to obtain the fused data. The specific implementation is as follows:

[0064]

[0065] Where g is the activation function, W1 is the weight matrix of the first layer, W2 is the weight matrix of the second layer, b1 is the bias vector of the first layer, b2 is the bias vector of the second layer, these are all trainable parameters, parameter d represents the new channel dimension, and parameter l represents the length of the sequence sample timestamp.

[0066] The first and second data are then fused using this multilayer perceptron for better subsequent processing.

[0067] In an optional embodiment, the filter enhancement module includes a plurality of filter blocks arranged in series, each filter block including a filter layer, with a skip connection between the input and output of the filter layer.

[0068] The fused data is adaptively filtered channel by channel using a filter enhancement module to obtain filtered data, including:

[0069] The fused data is adaptively filtered along the channels using a filtering layer to obtain denoised data;

[0070] The denoised data is processed based on the skip connection, layer normalization operation and random deactivation operation to obtain single-pass filtered output data.

[0071] The output of the current filter block is used as the input of the next filter block, and the single-pass filter output data corresponding to the last filter block is used as the filter data.

[0072] In an optional embodiment, the fused data is adaptively filtered along the channels using a filtering layer to obtain denoised data, including:

[0073] In the filtering layer, the fused data is subjected to a fast Fourier transform along the channel to convert it to the frequency domain;

[0074] Adaptive filtering is performed on each channel in the frequency domain to obtain the modulation spectrum;

[0075] The modulation spectrum is transformed to the time domain using the inverse fast Fourier transform to obtain denoised data.

[0076] As a second example, such as Figure 2As shown, the filter enhancement module performs noise filtering and adaptive filtering, and uses skip connections. Specifically, the filter enhancement module uses three superimposed filter blocks, each including a filter layer. In the filter enhancement module, filtering is performed on each channel of the feature matrix in the frequency domain. First, a Fast Fourier Transform is performed along the channel to convert the output of the multilayer perceptron to the frequency domain. Specific implementation details are as follows:

[0077]

[0078] Where F1 represents the spectrum of the complex tensor Y. This represents a one-dimensional fast Fourier transform.

[0079] A learnable filter The specific implementation details of modulating the spectrum through successive multiplication are as follows:

[0080]

[0081] Where ⊙ represents element-wise multiplication, learnable filters can be optimized through stochastic gradient descent, and any filter can be adaptively represented in the frequency domain.

[0082] Using inverse fast Fourier transform to convert the modulation spectrum The specific implementation details for transforming back to the time domain are as follows:

[0083]

[0084] in This represents the filtered feature matrix. This represents the inverse fast Fourier transform operation, which converts a complex tensor into a real tensor. By combining fast Fourier transform and inverse fast Fourier transform operations, noise in the fused data can be effectively reduced.

[0085] The vanishing gradient and unstable training problems are mitigated by using skip connections, layer normalization, and random deactivation operations. The specific implementation methods are as follows:

[0086]

[0087] in This is the output of the filter enhancement module. Specifically, the denoised data output from the filtering layer is randomly deactivated. Then, based on skip connections, the denoised data after the random deactivation operation is superimposed with the input of the filtering layer to form a new data. Finally, layer normalization is performed to obtain the single-pass filtering output data of the filtering block.

[0088] use As input to the next learnable filter, the feature matrix is ​​finally obtained after multiple filtering processes. The specific implementation method is as follows:

[0089]

[0090] In this embodiment of the application, the superimposed filter enhancement module can adaptively attenuate noise of different frequencies in each channel. After several iterations of filtering, it can be considered that most of the noise in the fused data has been attenuated.

[0091] In an optional embodiment, the multi-scale convolutional neural network includes multiple convolutional neural network modules with different kernel sizes, each of which utilizes dilated convolution and causal convolution to achieve a larger receptive field with fewer parameters.

[0092] As a third example, such as Figure 2 As shown, in the feature extraction module, the characteristics of multi-scale convolutional neural networks include: multi-scale kernels, large receptive range, dilated convolution, and causal convolution. The specific implementation is as follows:

[0093] The initial operation uses a feedforward neural network, which enables subsequent convolutional layers to better extract traffic features. The specific implementation method is as follows:

[0094]

[0095] Where Z1 represents the output of the feedforward neural network, g represents the activation function, and W z1 The weight matrix b of the feedforward neural network z1 This represents the bias vector of the feedforward neural network.

[0096] Three convolutional neural network modules are provided, with kernel sizes K of 3, 5, and 7 respectively. The filtered data is processed using a convolutional neural network module with a kernel size of 3. The specific implementation method is as follows:

[0097] H1=g(Conv(g(Conv(g(Conv(Z1))))))

[0098] Where Conv(·) represents a one-dimensional convolution operation, and H1 represents the output of a convolution with a kernel size of 3. In this embodiment, layer normalization and random deactivation are applied to alleviate problems related to gradient vanishing and unstable training. The specific implementation is as follows:

[0099] H′1=LayerNorm(Dropout(H1))

[0100] Where H'1 represents the output of a convolutional neural network module with a kernel size of 3.

[0101] Similarly, the outputs of convolutional neural network modules with kernel sizes of 5 and 7 are represented as H'2 and H'3, respectively. Concatenating H'1, H'2, and H'3 yields the multi-scale feature vector Q, as detailed below:

[0102]

[0103] Following the above steps, Q contains a multi-scale representation of the data, ensuring that each output component is complementary and avoiding information overlap. Compared to traditional convolutional neural networks, the multi-scale convolutional neural network proposed in this application has advantages in extracting richer and more complementary traffic features. The kernel size used in the third convolutional neural network module is 7, exceeding the typical kernel size. This larger kernel helps to better capture global features, thereby enhancing the understanding of traffic features. In this application embodiment, the kernel sizes of the three convolutional neural network modules are 3, 5, and 7, respectively, with an inflation factor of 2 and padding factors of 2, 4, and 6, respectively.

[0104] In an optional embodiment, Figure 2 The prediction module shown has two fully connected layers. These two layers process the multi-scale feature vectors and output the two-phase flow rates of the multiphase flow, which are the gas phase velocity Q. Gas and liquid phase flow rate Q Liquid The specific implementation method is as follows:

[0105] [Q Gas Q Liquid ]=g((g(W Q Q+b Q ))W Q' +b Q' )

[0106] Where g is the activation function, W Q W is the weight matrix for the first layer. Q' b is the weight matrix for the second layer. Q b is the bias vector for the first layer. Q' These are the bias vectors for the second layer, and they are all trainable parameters.

[0107] In an optional embodiment, after processing the multi-scale feature vector through multiple fully connected layers to output multiple single-phase flow values ​​for the multiphase flow, the method further includes:

[0108] Training is performed using a pre-defined multi-task loss function;

[0109] The multiple single-phase flow rates of a multiphase flow include gas phase flow rate and liquid phase flow rate. The multi-task loss function is expressed as:

[0110]

[0111] In this embodiment, training is performed through multi-task learning, and the multi-task loss function used for final training is a mixture function, wherein... and These represent the first loss function value for the gas phase flow rate measurement task and the second loss function value for the liquid phase flow rate measurement task, respectively. λ and μ are hyperparameters that adjust the influence of the corresponding tasks.

[0112] like Figure 2 As shown, when outputting gas phase flow rate and liquid phase flow rate, Huber loss and multi-task learning need to be considered. Specifically, this is implemented based on the aforementioned multi-task loss function.

[0113] In an optional embodiment, both the first loss function value and the second loss function value are calculated using the Huber loss function;

[0114] The Huber loss function is expressed as:

[0115]

[0116] Among them, y i This represents the target value for the corresponding task. The output value is the estimated value for the corresponding task, i.e., the single-phase flow rate value obtained; the hyperparameter δ represents the sensitivity to outliers.

[0117] Optionally, in the gas phase flow rate measurement task of this application embodiment, the sensitivity δ to outliers is adjusted. Gas =10, Sensitivity δ to outliers in liquid phase flow rate measurement tasks Liquid =0.5, λ=0.1, μ=3.

[0118] In this embodiment, a robust differentiable Huber loss function is used for model training, which can mitigate the impact of outliers on model performance.

[0119] The flow measurement model trained as described above can be directly used to measure multiple single-phase flow rates in multiphase flow. In this embodiment, the measurement of gas phase velocity and liquid phase velocity is taken as an example. Figure 5 The image shows the flow measurement results obtained by a single-scale convolutional neural network method without filter enhancement. Specifically, Figure 5 (a) shows the gas phase measurement results. Figure 5 (b) is a graph showing the liquid phase measurement results; Figure 6 This is a graph showing the flow measurement results obtained using a multi-scale convolutional neural network method without filter enhancement. Specifically, Figure 6 (a) shows the gas phase measurement results. Figure 6 (b) is a graph showing the liquid phase measurement results; Figure 7The flow measurement results obtained by the method of single-scale convolutional neural network for filter enhancement are shown in the figure. Figure 7 (a) shows the gas phase measurement results. Figure 7 (b) shows the liquid phase measurement results; Figure 8 The image shows the flow measurement results obtained by the multi-scale convolutional neural network method enhanced with filters, specifically the flow measurement results obtained by the method proposed in the embodiments of this application. Figure 8 (a) represents the relative error of gas phase measurement. Figure 8 (b) represents the relative error of liquid phase measurement. Figures 5-8 In the graph, the horizontal axis represents the reference flow rate, the vertical axis represents the measured flow rate, and the points on the graph represent the measured flow rate data points. Specifically... Figure 5 (a)- Figure 8 (a) The horizontal axis represents the reference gas flow rate, and the vertical axis represents the measured gas flow rate. Figure 5 (b)- Figure 8 (b) The horizontal axis represents the reference liquid flow rate, and the vertical axis represents the measured liquid flow rate. According to Figures 5-8 It can be seen that before filter enhancement, the flow measurement results using a single-scale convolutional neural network are poor. The flow measurement results using a multi-scale convolutional neural network are better than those using only a single-scale convolutional neural network, but the measurement results still need improvement. After adding filter enhancement, the flow measurement results using a single-scale convolutional neural network are improved to some extent. Similarly, after using filter enhancement, the flow measurement results using a multi-scale convolutional neural network are also improved to some extent. That is, the proposed method, after using filter enhancement and then using a multi-scale convolutional neural network, shows good flow measurement accuracy in multiphase flow measurement.

[0120] Based on the same principle as the method provided in the embodiments of this application, the embodiments of this application also provide a multiphase flow measurement device based on filter enhancement, such as... Figure 9 As shown, the device includes:

[0121] Data acquisition module 901 is used to acquire multiphase flow rate data samples; the multiphase flow rate data samples include first data acquired by differential pressure flow meter module and second data acquired by capacitive tomography sensor;

[0122] Data fusion module 902 is used to fuse the first data and the second data using a multilayer perceptron to obtain fused data;

[0123] The filter enhancement module 903 is used to perform adaptive filtering on the fused data channel by channel to obtain filtered data;

[0124] The feature extraction module 904 is used to process the filtered data using a multi-scale convolutional neural network to obtain feature vectors of multiple different scales, and to fuse the features of multiple different scales to obtain a multi-scale feature vector.

[0125] The prediction module 905 is used to process multi-scale feature vectors through multiple fully connected layers, and output multiple single-phase flow values ​​of multiphase flow.

[0126] In this embodiment, multiphase flow data samples are acquired, including first data collected by a differential pressure flowmeter module and second data collected by a capacitance tomography sensor. A multilayer perceptron is used to fuse the first and second data to obtain fused data, reducing the impact of different sensor data on model performance. Multiple filter enhancement modules are used to adaptively filter each channel of the fused data to obtain filtered data, which can attenuate data noise and reduce overfitting. A multi-scale convolutional neural network is used to process the filtered data to obtain multiple feature vectors of different scales, and these features are fused to obtain a multi-scale feature vector, allowing for parallel learning of rich flow information at different scales from random flow points. Finally, multiple fully connected layers process the multi-scale feature vectors to output multiple single-phase flow values ​​of the multiphase flow, enabling simultaneous estimation of the single-phase flow of the multiphase flow through multi-task learning.

[0127] The filter-enhanced multiphase flow measurement device provided in this application embodiment can achieve… Figures 1 to 8 The various processes implemented in the method embodiments are not described in detail here to avoid repetition.

[0128] The filter-enhanced multiphase flow measurement device of this application can execute the filter-enhanced multiphase flow measurement method provided in this application. The implementation principle is similar. The actions performed by each module and unit in the filter-enhanced multiphase flow measurement device in each embodiment of this application correspond to the steps in the filter-enhanced multiphase flow measurement method in each embodiment of this application. For detailed functional descriptions of each module of the filter-enhanced multiphase flow measurement device, please refer to the descriptions in the corresponding filter-enhanced multiphase flow measurement methods shown above. They will not be repeated here.

[0129] Based on the same principles as the methods shown in the embodiments of this application, embodiments of this application also provide an electronic device, which may include, but is not limited to: a processor and a memory; the memory for storing computer programs; and the processor for executing the filter-enhanced multiphase flow measurement method shown in any optional embodiment of this application by calling the computer program. Compared with the prior art, the filter-enhanced multiphase flow measurement method provided in this application acquires multiphase flow data samples, including first data collected by a differential pressure flowmeter module and second data collected by a capacitance tomography sensor. A multilayer perceptron is used to fuse the first and second data to obtain fused data, reducing the impact of different sensor data on model performance. Multiple filter enhancement modules are used to adaptively filter the fused data channel by channel to obtain filtered data, which can attenuate data noise and reduce overfitting. A multi-scale convolutional neural network is used to process the filtered data to obtain multiple feature vectors of different scales, and the features of multiple different scales are fused to obtain a multi-scale feature vector, which can learn rich flow information of different scales in parallel from random flow points. Finally, the multi-scale feature vectors are processed through multiple fully connected layers, which output multiple single-phase flow values ​​of the multiphase flow. The flow rates of each single phase of the multiphase flow can be estimated simultaneously through multi-task learning.

[0130] In an alternative embodiment, an electronic device, such as Figure 10 As shown, Figure 10 The illustrated electronic device 1000 can be a server, including a processor 1001 and a memory 1003. The processor 1001 and the memory 1003 are connected, for example, via a bus 1002. Optionally, the electronic device 1000 may also include a transceiver 1004. It should be noted that in practical applications, the transceiver 1004 is not limited to one type, and the structure of this electronic device 1000 does not constitute a limitation on the embodiments of this application.

[0131] Processor 1001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 1001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0132] Bus 1002 may include a pathway for transmitting information between the aforementioned components. Bus 1002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 1002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 10 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0133] The memory 1003 may be a ROM (Read Only Memory) or other type of static storage device capable of storing static information and instructions, RAM (Random Access Memory) or other type of dynamic storage device capable of storing information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto.

[0134] The memory 1003 is used to store application code that executes the solution of this application, and its execution is controlled by the processor 1001. The processor 1001 is used to execute the application code stored in the memory 1003 to implement the content shown in the foregoing method embodiments.

[0135] Among them, electronic devices include, but are not limited to: mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and in-vehicle terminals (such as in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 10 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0136] The server provided in this application can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited herein.

[0137] This application provides a computer-readable storage medium storing a computer program that, when run on a computer, enables the computer to execute the corresponding content in the aforementioned method embodiments.

[0138] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0139] It should be noted that the computer-readable storage medium described above in this application can also be a computer-readable signal medium or a combination of computer-readable storage media and computer-readable storage media. Computer-readable storage media can be, for example,—but not limited to—electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0140] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0141] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above embodiments.

[0142] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the filter-enhanced multiphase flow measurement method and apparatus provided in the various optional implementations described above.

[0143] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0144] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0145] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the module itself; for example, a data acquisition module can also be described as "a data acquisition module for acquiring multiphase flow data samples; the multiphase flow data samples include first data acquired by a differential pressure flow meter module and second data acquired by a capacitance tomography sensor."

[0146] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.

Claims

1. A filter enhancement based multiphase flow measurement method, characterized in that, The method comprises: acquiring a multiphase flow data sample; the multiphase flow data sample comprises first data collected by a differential pressure flowmeter module and second data collected by a electrical capacitance tomography sensor; fusing the first data and the second data by using a multilayer perceptron to obtain fused data; performing adaptive filtering processing on the fused data by using a filter enhancement module channel by channel to obtain filtered data; processing the filtered data by using a multi-scale convolutional neural network to obtain a plurality of feature vectors of different scales, and fusing the plurality of features of different scales to obtain a multi-scale feature vector; processing the multi-scale feature vector through a plurality of fully connected layers to correspondingly output a plurality of single-phase flow values of the multiphase flow; wherein the filter enhancement module comprises a plurality of filtering blocks, and the plurality of filtering blocks are arranged in series; the filtering block comprises a filtering layer, and a jump connection is used between the input and the output of the filtering layer; wherein the adaptive filtering processing on the fused data by using the filter enhancement module channel by channel to obtain the filtered data comprises: performing adaptive filtering on the fused data along the channel by using the filtering layer to obtain denoised data; processing the denoised data based on the jump connection, layer normalization operation and random inactivation operation to obtain single filtering output data; taking the output of the current filtering block as the input of the next filtering block, and taking the single filtering output data corresponding to the last filtering block as the filtered data; wherein the adaptive filtering on the fused data along the channel by using the filtering layer to obtain the denoised data comprises: performing fast Fourier transform along the channel to convert the output of the multilayer perceptron to the frequency domain; in the frequency domain, modulating the spectrum by using a learnable filter through element-by-element multiplication to obtain a modulated spectrum; transforming the modulated spectrum back to the time domain by using inverse fast Fourier transform to obtain the denoised data.

2. The filter enhancement based multiphase flow rate measurement method of claim 1, wherein, The multilayer perceptron comprises two fully connected layers; the fusing of the first data and the second data by using the multilayer perceptron to obtain the fused data comprises: fusing the first data and the second data by using the two fully connected layers to obtain the fused data.

3. The filter enhancement based multiphase flow rate measurement method of claim 1, wherein, the adaptive filtering on the fused data along the channel by using the filtering layer to obtain the denoised data comprises: in the filtering layer, performing fast Fourier transform on the fused data along the channel to convert to the frequency domain; performing adaptive filtering on each channel in the frequency domain to obtain a modulated spectrum; transforming the modulated spectrum to the time domain by using inverse fast Fourier transform to obtain the denoised data.

4. The filter enhancement based multiphase flow rate measurement method of claim 1, wherein, The multi-scale convolutional neural network comprises a plurality of convolutional neural network modules with different convolution kernel sizes, and each convolutional neural network module uses dilated convolution and causal convolution.

5. The filter enhancement based multiphase flow rate measurement method of claim 1, wherein, After the processing of the multi-scale feature vector through the plurality of fully connected layers to correspondingly output the plurality of single-phase flow values of the multiphase flow, the method further comprises: training by using a preset multi-task loss function; the plurality of single-phase flow values of the multiphase flow comprises a gas-phase flow value and a liquid-phase flow value, and the multi-task loss function is represented as: wherein, and are a first loss function value for the gas phase flow rate value measurement task and a second loss function value for the liquid phase flow rate value measurement task, respectively, and are hyperparameters that regulate the influence of the respective task.

6. The filter enhancement based multiphase flow rate measurement method of claim 5, wherein, the first loss function value and the second loss function value are both obtained by Huber loss function calculation; The Huber loss function is represented as: wherein, is the target value for the corresponding task, is the estimated value for the corresponding task, i.e. the output obtained single-phase flow value; hyperparameters represents the sensitivity to outliers.

7. A filter-based enhanced multiphase flow measurement device, comprising: The device comprises: a data acquisition module configured to acquire multiphase flow data samples, the multiphase flow data samples comprising first data acquired by a differential pressure flowmeter module and second data acquired by a electrical capacitance tomography sensor; a data fusion module configured to fuse the first data and the second data using a multilayer perceptron to obtain fused data; a filter enhancement module configured to perform adaptive filtering on the fused data channel by channel to obtain filtered data; a feature extraction module configured to process the filtered data using a multi-scale convolutional neural network to obtain a plurality of feature vectors of different scales, and fuse the plurality of feature vectors of different scales to obtain a multi-scale feature vector; a prediction module configured to process the multi-scale feature vector through a plurality of fully connected layers to correspondingly output a plurality of single-phase flow values of the multiphase flow; wherein the filter enhancement module comprises a plurality of filter blocks, the plurality of filter blocks are arranged in series and stacked, and each filter block comprises a filter layer, and a jump connection is used between the input and the output of the filter layer; wherein the adaptive filtering on the fused data channel by channel to obtain the filtered data comprises: performing adaptive filtering on the fused data along the channel using the filter layer to obtain denoised data; processing the denoised data based on a jump connection, a layer normalization operation, and a random deactivation operation to obtain single-filtered output data; taking the output of the current filter block as the input of the next filter block, and taking the single-filtered output data corresponding to the last filter block as the filtered data; wherein the adaptive filtering on the fused data along the channel using the filter layer to obtain the denoised data comprises: performing fast Fourier transform along the channel to convert the output of the multilayer perceptron to the frequency domain; in the frequency domain, modulating the frequency spectrum by element-by-element multiplication using a learnable filter to obtain a modulated frequency spectrum; converting the modulated frequency spectrum back to the time domain using inverse fast Fourier transform to obtain the denoised data.

8. An electronic device, comprising: A computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method of any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method of any one of claims 1-6.

Citation Information

Patent Citations

  • Magnetic particle imaging time-frequency domain signal filtering method based on multi-scale feature fusion

    CN115640501A