Gas-liquid two-phase flow gas content detection method based on dual-mode acoustic fusion

By combining ultrasonic and ultrasonic guided detection technology in the pipeline and using machine learning for signal fusion and feature extraction, the problem of difficulty in detecting the gas content of gas-liquid two-phase flow in the prior art is solved, and non-invasive high-precision detection is achieved.

CN119985686APending Publication Date: 2025-05-13TIANJIN UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510233053.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The prior art is difficult to achieve high-precision detection of the gas content rate of gas-liquid two-phase flow pipeline without destroying the pipeline, especially in complex two-phase flow environments.

Method used

Using a detection method based on dual-mode acoustic fusion, combined with ultrasonic and ultrasonic guide detection technology, the detection signals are fused and feature extracted through machine learning technology, and a one-dimensional convolutional neural network model is constructed to achieve high-precision detection of gas content.

Benefits of technology

It realizes a non-invasive high-precision detection of gas-liquid two-phase flow gas content, which improves detection accuracy and is suitable for various gas-liquid two-phase flow states, whether it is a layered flow or a plug-in flow.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119985686A_ABST
    Figure CN119985686A_ABST
Patent Text Reader

Abstract

The invention discloses a gas-liquid two-phase flow gas content detection method based on dual-mode acoustic fusion, which comprises the following steps: arranging a fusion type gas content detection device on a to-be-detected gas-liquid two-phase flow pipeline, and receiving an ultrasonic reflection signal and an ultrasonic guided wave propagation signal through the fusion type gas content detection device; splicing the received ultrasonic reflection signal and the ultrasonic guided wave propagation signal in series to obtain a fusion signal, and normalizing the fusion signal to obtain a normalized fusion signal; and constructing a fusion type gas content detection model based on a one-dimensional convolutional neural network, training the fusion type gas content detection model, and inputting the normalized fusion signal into the trained fusion type gas content detection model to obtain the gas content of the gas-liquid two-phase flow pipeline to be detected. The invention provides an innovative method for detecting the gas content of the gas-liquid two-phase flow, realizes non-invasive high-precision detection of the gas content of the gas-liquid two-phase flow by fully utilizing the ultrasonic wave and ultrasonic guided wave signal characteristics, and is high in practicability and worthy of popularization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of gas content detection, and in particular to a method for detecting gas content of a gas-liquid two-phase flow. Background Art

[0002] In many industrial fields such as petroleum, chemical industry, electricity, and food, pipeline transportation is an important way of material transmission, and gas-liquid two-phase flow is widely present in pipelines. Accurate detection of two-phase flow parameters is of great significance for the rational optimization of production control systems and the formulation and adjustment of industrial production strategies. As one of the important flow parameters of two-phase flow, gas content is important information for establishing production process models, and plays an important role in adjusting the stability of control systems and ensuring the smooth and safe operation of production systems. At present, the detection methods for gas content of gas-liquid two-phase flow in pipelines have certain limitations. For example, the electrical method has a large error when detecting pipelines with high gas content, and it is highly dependent on dielectric constant or conductivity; the optical method for detecting gas content requires that the pipeline material is transparent and cannot be disturbed by external light, and the detection accuracy will decrease with the increase of gas content; the ray method detection is radioactive when used, which is extremely harmful.

[0003] Ultrasonic detection technology has received widespread attention in the field of pipeline detection due to its advantages such as non-invasiveness, no damage to pipelines, and fast response speed. However, the existing detection methods based on a single ultrasonic principle are difficult to fully and accurately reflect the gas content in the pipeline due to the randomness of gas-liquid distribution and the diversity of flow patterns when facing a complex two-phase flow environment. Ultrasonic guided waves have unique propagation characteristics. They can propagate along long distances along the pipeline and fully interact with the gas-liquid two-phase medium in the pipeline during the propagation process, thereby reflecting the overall characteristics of the pipeline. However, relying solely on ultrasonic guided wave detection, it is impossible to fully obtain detailed information on the gas-liquid distribution in the pipeline.

[0004] With the development of machine learning technology, its powerful data processing and pattern recognition capabilities provide a new method for detecting the gas content of gas-liquid two-phase flow in pipelines. In gas content detection, machine learning can automatically extract features related to gas content in the detection data and perform training. In addition, machine learning technology can improve the adaptive ability of the detection system through continuous learning and optimization. In actual application scenarios, the state of gas-liquid two-phase flow in the pipeline will change over time, and traditional detection methods are difficult to detect the accurate value of the gas content under such dynamic changes. The detection system based on machine learning can adjust the model parameters in real time to maintain a high detection accuracy.

[0005] The ultrasonic detection method can obtain detailed information about the local area in the gas-liquid two-phase flow pipeline, and the ultrasonic guided wave detection method can obtain the overall characteristics of the gas-liquid two-phase flow pipeline. Therefore, it is considered to merge the detection data of the ultrasonic detection method and the ultrasonic guided wave detection method to improve the detection accuracy of the gas content of the gas-liquid two-phase flow in the pipeline, thereby improving production efficiency and ensuring the safe and stable operation of the production system. Summary of the invention

[0006] In view of the technical problem that the existing methods for detecting the gas content of gas-liquid two-phase flow in pipelines are difficult to ensure high-precision detection of the gas content in gas-liquid two-phase flow pipelines without damaging the pipelines, the present invention proposes a gas-liquid two-phase flow gas content detection method based on dual-mode acoustic fusion. Based on machine learning technology, it makes full use of the characteristics of ultrasonic and ultrasonic guided wave signals to achieve non-invasive high-precision detection of the gas content of gas-liquid two-phase flow.

[0007] In order to achieve the above object, the technical solution of the present invention is achieved as follows:

[0008] A method for detecting gas content of gas-liquid two-phase flow based on dual-mode acoustic fusion, comprising the following steps:

[0009] S1. A fusion type gas content detection device is arranged on the gas-liquid two-phase flow pipeline to be tested, and an ultrasonic reflection signal and an ultrasonic guided wave propagation signal are received by the fusion type gas content detection device;

[0010] S2, concatenating the ultrasonic reflection signal and the ultrasonic guided wave propagation signal received in step S1 to obtain a fused signal, and normalizing the fused signal to obtain a normalized fused signal;

[0011] S3. Construct and train a fusion gas content detection model based on a one-dimensional convolutional neural network to obtain a trained fusion gas content detection model; input the normalized fusion signal into the trained fusion gas content detection model to obtain the gas content of the gas-liquid two-phase flow pipeline to be tested.

[0012] Preferably, the fusion type gas content detection device comprises:

[0013] The excitation module is used to simultaneously generate two excitation signals of different frequencies to drive the transmitting module to transmit ultrasonic signals and ultrasonic guided wave signals;

[0014] The transmitting module is used to transmit an ultrasonic signal of a first frequency and an ultrasonic guided wave signal of a second frequency when receiving two excitation signals of different frequencies emitted by the excitation module; wherein the ultrasonic signal of the first frequency is vertically incident into the gas-liquid two-phase flow pipeline to be tested and propagates radially along the gas-liquid two-phase flow pipeline to be tested; the ultrasonic guided wave signal of the second frequency is obliquely incident into the gas-liquid two-phase flow pipeline to be tested and propagates circumferentially along the gas-liquid two-phase flow pipeline to be tested;

[0015] A receiving module, used for receiving and storing ultrasonic reflection signals and ultrasonic guided wave propagation signals;

[0016] Wherein, the excitation module is connected with the transmitting module.

[0017] Preferably, the structure of the fusion gas content detection model is: sequentially connected input layer-convolution layer I-maximum pooling layer I-convolution layer II-maximum pooling layer II-convolution layer III-maximum pooling layer III-convolution layer IV-maximum pooling layer IV-batch normalization layer-flattening layer-fully connected layer-output layer, wherein the activation functions of the convolution layer and the fully connected layer are both LeakyReLU activation functions.

[0018] Preferably, the process of inputting the normalized fusion signal into the trained fusion gas content detection model to obtain the gas content of the gas-liquid two-phase flow pipeline to be tested is:

[0019] The input layer receives the normalized fusion signal and passes it to the convolution layer I. The convolution layer I outputs the features processed by the convolution and activation functions. Figure I ,feature Figure I As the input of the maximum pooling layer I, the maximum pooling layer I has input features Figure I Sampling is performed to obtain dimension reduction features Figure I ; Dimensionality reduction features Figure I Transmitted to convolutional layer II, convolutional layer II further extracts higher-level features through one-dimensional convolution operation, and outputs features processed by convolution and activation function Figure II ,feature Figure II As the input of the maximum pooling layer II, the maximum pooling layer II Figure II Perform dimensionality reduction and retain key features to obtain dimensionality reduction features Figure II ; Similarly, convolution layer IV and maximum pooling layer IV extract the highest level features and perform the final dimensionality reduction to obtain the reduced dimensionality features Figure IV ;

[0020] Batch Normalization layer reduces the dimension of the output of Max Pooling layer IV Figure IV Perform normalization processing and output a multi-dimensional normalized feature map; the flattening layer converts the multi-dimensional normalized feature map output by the batch normalization layer into a one-dimensional vector and sends it to the fully connected layer;

[0021] The fully connected layer extracts high-level features from the one-dimensional vector and outputs a high-dimensional feature vector;

[0022] The high-dimensional feature vector enters the output layer, and the output layer uses the Sigmoid function to output the gas content.

[0023] Preferably, the expression for performing convolution operation in the convolution layer is:

[0024]

[0025] In the formula, represents the input of the jth neuron in the lth layer, represents the input of the i-th neuron in the l-1th layer, is the kernel weight from the i-th neuron in the l-1th layer to the j-th neuron in the lth layer, is the scalar bias of the jth neuron in the lth layer, conv1D represents a one-dimensional convolution operation, and N is the convolution kernel size;

[0026] The output layer uses the Sigmoid function to output the gas content expression as follows:

[0027]

[0028] Among them, z k is the kth element in the high-dimensional feature vector output by the fully connected layer, is the gas content.

[0029] Preferably, the batch normalization layer reduces the dimension of the output of the maximum pooling layer IV Figure IV After normalization, the expressions for outputting the multi-dimensional normalized feature map include:

[0030]

[0031] In the formula, x c The feature obtained for the cth input signal Figure IV c ; m is the dimension reduction feature Figure IV The batch size of μ B and For each channel mean and variance; is the normalized result; ∈ is a constant used to prevent the denominator from being 0; γ and δ are learnable parameters; y c is the final output value of batch normalization.

[0032] Preferably, the method for obtaining the trained fusion gas content detection model is:

[0033] The adaptive moment estimation algorithm is used to train the fusion gas content detection model. The steps include:

[0034] Initialize the model parameters of the fusion gas fraction detection model and the hyperparameters of the adaptive moment estimation algorithm before training;

[0035] (1) Update the first-order moment estimate and the second-order moment estimate respectively;

[0036] (2) Perform bias correction: correct the first-order moment estimate and the second-order moment estimate respectively;

[0037] (3) Update the model parameters based on the revised first-order moment and second-order moment estimates;

[0038] Repeat steps (1) to (3) to iteratively update the model parameters until the loss function of the fusion gas fraction detection model converges and the training is completed.

[0039] Preferably, the expressions for respectively updating the first-order moment estimate and the second-order moment estimate are:

[0040] m T =β1m T-1 +(1-β1)g T

[0041] In the formula, m T is the first-order moment estimate of the current time step T; β1 is the exponential decay rate of the first-order moment estimate; m T-1 is the first-order moment estimate of the previous time step T-1; g T is the gradient of the current time step T;

[0042]

[0043] In the formula, L(θ T ) is the loss function of the current time step T; θ T is the model parameter of the current time step T; It means to find the partial derivative of the model parameter θ;

[0044] v T =β2v T-1 +(1-β2)g T 2

[0045] In the formula, v T is the second-order moment estimate of the current time step T; β2 is the exponential decay rate of the second-order moment estimate; v T-1 is the second-order moment estimate of the previous time step T-1.

[0046] Preferably, the correction expressions for respectively correcting the first-order moment estimate and the second-order moment estimate are:

[0047]

[0048] In the formula, is the corrected first-order moment estimate; is the corrected second-order moment estimate; is the Tth power of the exponential decay rate of the first-order moment estimate; is the Tth power of the exponential decay rate of the second-order moment estimate;

[0049] The expression for updating the model parameters according to the modified first-order moment and second-order moment estimation is:

[0050]

[0051] In the formula, θ T+1 is the updated model parameter; θ T is the model parameter of the current time step T; α is the learning rate; ∈ is a constant.

[0052] Preferably, the loss function of the fusion gas content detection model is:

[0053]

[0054] In the formula, y p is the true gas content value of the pth sample, is the gas content value predicted by the fusion gas content detection model, and M is the total number of training samples.

[0055] Compared with the prior art, the present invention has the following beneficial effects:

[0056] The present invention provides an innovative method for detecting the gas content of gas-liquid two-phase flow. It uses machine learning technology to integrate ultrasonic detection and ultrasonic guided wave detection, fully utilizes the characteristics of ultrasonic and ultrasonic guided wave signals, and exerts a synergistic effect to comprehensively obtain information on the gas content of the pipeline profile from the axial and circumferential directions, thereby realizing non-invasive and high-precision detection of the gas content of gas-liquid two-phase flow.

[0057] The present invention realizes high-precision detection of the gas content of the gas-liquid two-phase flow in the pipeline without destroying the pipeline structure. It has great economic and social value in promoting the rapid development of my country's industrial production and is highly practical and worthy of promotion. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0059] Figure 1 It is a flow chart of the present invention.

[0060] Figure 2 This is a schematic diagram of a fusion-type gas content detection device in one embodiment of the present invention.

[0061] Figure 3 This is a diagram of ultrasonic reflection signals in one embodiment of the present invention.

[0062] Figure 4 This is a diagram of ultrasonic guided wave propagation signals in one embodiment of the present invention.

[0063] Figure 5 This is a fusion signal diagram in one embodiment of the present invention.

[0064] Figure 6 It is a structural diagram of the fusion gas content detection model of the present invention.

[0065] Figure 7 : is a prediction result error diagram of the ultrasonic gas content detection method in one embodiment of the present invention, wherein: Figure 7 - (a) is the error diagram of the prediction of gas content by the stratified flow ultrasonic detection method, Figure 7 -(b) is the error diagram of gas fraction prediction using plug flow ultrasonic testing method.

[0066] Figure 8 : is a prediction result error diagram of the ultrasonic guided wave gas content detection method in one embodiment of the present invention, wherein: Figure 8 -(a) is the error diagram of the prediction of gas content by ultrasonic guided wave detection method for stratified flow, Figure 8 -(b) is the error diagram of gas fraction prediction using plug flow ultrasonic guided wave detection method.

[0067] Fig. 9 : is a prediction result error diagram of the fusion gas content detection method in one embodiment of the present invention, wherein: Fig. 9 -(a) is the error diagram of the gas content predicted by the stratified flow fusion gas content detection method, Fig. 9 -(b) is the error diagram of gas content prediction using the plug flow fusion gas content detection method. DETAILED DESCRIPTION

[0068] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0069] like Figure 1 As shown, a gas-liquid two-phase flow gas content detection method based on dual-mode acoustic fusion is presented, which combines the two detection technologies of ultrasonic wave and ultrasonic guided wave. The liquid level information within the radial range of the pipeline section is obtained by ultrasonic wave, and the interface information between the pipe wall / liquid / gas within the circumferential range of the pipeline section is obtained by ultrasonic guided wave. The ultrasonic wave and ultrasonic guided wave signals are fused and feature extracted by machine learning methods to realize gas content prediction, thereby improving the detection accuracy of gas content in gas-liquid two-phase flow pipelines.

[0070] S1. A fusion type gas content detection device is arranged on the gas-liquid two-phase flow pipeline to be tested, and ultrasonic reflection signals and ultrasonic guided wave propagation signals are received through the fusion type gas content detection device.

[0071] like Figure 2 As shown, the fusion type gas content detection device comprises:

[0072] The excitation module is used to simultaneously generate two excitation signals of different frequencies to drive the transmitting module to transmit an ultrasonic signal, a first ultrasonic guided wave and a second ultrasonic guided wave.

[0073] The transmitting module is used to transmit an ultrasonic signal of a first frequency and an ultrasonic guided wave signal of a second frequency when receiving two excitation signals of different frequencies emitted by the excitation module; wherein the ultrasonic signal of the first frequency is vertically incident into the gas-liquid two-phase flow pipeline to be tested and propagates radially along the gas-liquid two-phase flow pipeline to be tested; the ultrasonic guided wave signal of the second frequency is obliquely incident into the gas-liquid two-phase flow pipeline to be tested and propagates circumferentially along the gas-liquid two-phase flow pipeline to be tested.

[0074] The receiving module is used to receive and store ultrasonic reflection signals and ultrasonic guided wave propagation signals.

[0075] The excitation module simultaneously generates two excitation signals of different frequencies to drive the ultrasonic transducer and ultrasonic guided wave transducer in the transmitting module to transmit ultrasonic signals and ultrasonic guided wave signals. In this embodiment, the ultrasonic signal is vertically incident from the ultrasonic transducer at the bottom of the gas-liquid two-phase flow pipeline to be tested into the gas-liquid two-phase flow pipeline to be tested, and propagates radially along the gas-liquid two-phase flow pipeline to be tested; the ultrasonic guided wave signal is obliquely incident from the two ultrasonic guided wave transducers above and below the gas-liquid two-phase flow pipeline to be tested into the gas-liquid two-phase flow pipeline to be tested, and propagates circumferentially along the gas-liquid two-phase flow pipeline to be tested.

[0076] Due to the difference in acoustic properties between the material of the gas-liquid two-phase flow pipeline to be tested and the transmission medium, the ultrasonic signal is reflected inside the gas-liquid two-phase flow pipeline to be tested. The ultrasonic transducer at the bottom of the gas-liquid two-phase flow pipeline to be tested also acts as a receiver to receive the ultrasonic reflection signal. Figure 3 shown.

[0077] The ultrasonic guided wave signal undergoes changes in amplitude, phase and mode during propagation. The two ultrasonic transducers on the left and right sides of the gas-liquid two-phase flow pipeline to be tested act as receivers to receive the propagated ultrasonic guided wave signal and obtain the ultrasonic guided wave propagation signal, such as Figure 4 shown.

[0078] Among them, the excitation module is connected to the transmitting module, the ultrasonic reflection signal received by the receiving module carries the liquid level information in the pipeline, and the ultrasonic guided wave propagation signal carries the interface information between the pipeline section wall / liquid / gas.

[0079] S2. The ultrasonic reflection signal and the ultrasonic guided wave propagation signal received in step S1 are connected in series to obtain a fused signal, and the fused signal is normalized to obtain a normalized fused signal.

[0080] The ultrasonic reflection signal and the ultrasonic guided wave propagation signal are connected in series to obtain a fusion signal, such as Figure 5 As shown, the first half is the ultrasonic reflection signal, and the second half is the ultrasonic guided wave propagation signal.

[0081] Perform mean normalization on the fusion signal to obtain a normalized fusion signal. The normalization formula is:

[0082]

[0083] In the formula, x is the sampling point value of the fusion signal, x normalized is the normalized value of the fusion signal, μ is the mean value of the fusion signal sampling points, x max and x min are the maximum and minimum values ​​of the fusion signal respectively. The normalized fusion signal is distributed in the range of [0, 1], which is convenient for subsequent model training and prediction.

[0084] S3. Construct and train a fusion gas content detection model based on a one-dimensional convolutional neural network to obtain a trained fusion gas content detection model; input the normalized fusion signal into the trained fusion gas content detection model to obtain the gas content of the gas-liquid two-phase flow pipeline to be tested.

[0085] like Figure 6 As shown in FIG. 1 , the structure of the fusion gas content detection model is: sequentially connected input layer-convolution layer I-maximum pooling layer I-convolution layer II-maximum pooling layer II-convolution layer III-maximum pooling layer III-convolution layer IV-maximum pooling layer IV-batch normalization layer-flattening layer-fully connected layer-output layer, wherein the activation functions of the convolution layer and the fully connected layer are both LeakyReLU activation functions.

[0086] The input layer receives the normalized fusion signal and passes it to the convolution layer I;

[0087] Convolution layer I extracts the local features of the input normalized fusion signal through one-dimensional convolution operation. The expression of convolution operation in the convolution layer is:

[0088]

[0089] In the formula, represents the input of the jth neuron in the lth layer, represents the input of the i-th neuron in the l-1th layer, is the kernel weight from the i-th neuron in the l-1th layer to the j-th neuron in the lth layer, is the scalar bias of the jth neuron in the lth layer, conv1D represents a one-dimensional convolution operation, and N is the size of the convolution kernel.

[0090] The LeakyReLU activation function is used to introduce nonlinearity and enhance the expressiveness of the model.

[0091] Convolutional layer I outputs features after convolution and activation function processing Figure I ,feature Figure I As the input of the maximum pooling layer I, the maximum pooling layer I has input features Figure I Sampling is performed to achieve dimensionality reduction by taking the maximum value in the local area, while retaining the most significant features to obtain the dimensionality reduction feature Figure I ; Dimensionality reduction features Figure I The data is transmitted to the convolutional layer II, which further extracts higher-level features through one-dimensional convolution operations and outputs the features processed by convolution and activation functions. Figure II ,feature Figure II As the input of the maximum pooling layer II, the maximum pooling layer II Figure II Perform dimensionality reduction and retain key features to obtain dimensionality reduction features Figure II ; Similarly, convolution layer IV and maximum pooling layer IV extract the highest level features and perform the final dimensionality reduction to obtain the reduced dimensionality features Figure IV By alternately using convolutional layers and pooling layers, the fusion gas content detection model automatically extracts key features related to gas content from the normalized fusion signal and realizes multi-level information fusion, thereby improving the detection accuracy.

[0092] Batch Normalization layer reduces the dimension of the output of Max Pooling layer IV Figure IV Normalization is performed to output a multi-dimensional normalized feature map. Figure IV The shape of is (m, C, H, W), where m is the batch size, C is the number of channels, H is the height, and W is the width. The calculation formula of the batch normalization layer is as follows:

[0093]

[0094]

[0095] In the formula, x c The feature obtained for the cth input signal Figure IV c ; m is the dimension reduction feature Figure IV The batch size of μ B and is the mean and variance of each channel; is the normalized result; ∈ is a constant used to prevent the denominator from being 0; γ and δ are learnable parameters used to scale and translate the normalized data respectively; y c is the final output value of batch normalization.

[0096] The flattening layer converts the multi-dimensional normalized feature map output by the batch normalization layer into a one-dimensional vector for easy processing by the fully connected layer. The one-dimensional vector output by the flattening layer is input to the fully connected layer, which performs high-level feature extraction on the one-dimensional vector and outputs a high-dimensional feature vector.

[0097] Finally, the high-dimensional feature vector enters the output layer, and the output layer uses the Sigmoid function to output the gas content, the formula is:

[0098]

[0099] Among them, z k is the kth element in the high-dimensional feature vector output by the fully connected layer, is the gas content. The Sigmoid function controls the output value between [0, 1], which is consistent with the physical meaning of gas content detection.

[0100] The loss function L(θ) is defined to measure the accuracy of the prediction of the fusion gas content detection model. The smaller the loss function value, the closer the predicted value is to the true value. The present invention uses the mean square error (MSE) as the loss function, and the formula is as follows:

[0101]

[0102] In the formula, y p is the true gas content value of the pth sample; is the gas content value predicted by the fusion gas content detection model; M is the total number of training samples.

[0103] Furthermore, the adaptive moment estimation algorithm is used to train the fusion gas content detection model. The training process is as follows:

[0104] (1) First, the model parameters of the fusion gas fraction detection model and the hyperparameters of the adaptive moment estimation algorithm are initialized before training:

[0105] The model parameters θ include the kernel weights of the convolutional layer and scalar bias And the weights and biases of the fully connected layers.

[0106] In this embodiment, when initializing the hyperparameters of the adaptive moment estimation algorithm, the first-order moment estimation m0 and the second-order moment estimation v0 are initialized to 0; the time step T is initialized to 0; the learning rate α is initialized to 0.001; the first-order moment decay rate β1 is initialized to 0.9; the second-order moment decay rate β2 is initialized to 0.999; the smoothing term ε is initialized to 10 -8 .

[0107] (2) First-order moment estimate update: The first-order moment estimate of the gradient is calculated by exponential weighted average to reflect the gradient mean information. The formula is as follows:

[0108] m T =β1m T-1 +(1-β1)g T

[0109] In the formula, m T is the first-order moment estimate of the current time step T; β1 is the exponential decay rate of the first-order moment estimate, which usually takes a value between 0 and 1; m T-1 is the first-order moment estimate of the previous time step T-1; g T is the gradient of the current time step T.

[0110]

[0111] In the formula, L(θ T ) is the loss function of the current time step T; θ T is the model parameter of the current time step T; It means to find the partial derivative of the model parameter θ.

[0112] (3) Second-order moment estimate update: Use exponentially weighted average to calculate the second-order moment estimate of the gradient, reflecting the gradient variance information. The formula is as follows:

[0113] v T =β2v T-1 +(1-β2)g T 2

[0114] In the formula, v T is the second-order moment estimate of the current time step T; β2 is the exponential decay rate of the second-order moment estimate, which usually takes a value between 0 and 1; v T-1 is the second-order moment estimate of the previous time step T-1; g T 2 is the square of the gradient at the current time step T.

[0115] (4) Bias correction: Since the first-order moment estimate m0 and the second-order moment estimate v0 are both initialized to 0 in the initial stage, there will be bias in the estimated values, so correction is required. The correction formula is as follows:

[0116]

[0117] In the formula, is the corrected first-order moment estimate; is the corrected second-order moment estimate; is the Tth power of the exponential decay rate of the first-order moment estimate; is the exponential decay rate of the second-order moment estimate raised to the power of T.

[0118] (5) Parameter update: Based on the revised first-order moment and second-order moment estimates, the model parameter θ is updated. The formula is:

[0119]

[0120] In the formula, θ T+1 is the updated model parameter; θ T is the model parameter of the current time step T; α is the learning rate, which is used to control the step size of parameter update; ∈ is a constant, which is used to prevent the denominator from being 0.

[0121] The model parameters are updated through multiple iterations until the loss function converges and the training is completed.

[0122] After training, the fused gas content detection model can automatically extract signal features based on the input normalized fusion signal to obtain relevant information about the gas content in the gas-liquid two-phase flow pipeline, thereby accurately predicting the gas content in the gas-liquid two-phase flow pipeline.

[0123] In order to verify the effectiveness of the present invention, a series of experiments were carried out. In the experiment, the ultrasonic gas content detection method, the ultrasonic guided wave gas content detection method and the fusion gas content detection method proposed by the present invention were used to detect the gas content of stratified flow and plug flow, and the detection results were compared and analyzed. The experiment established a gas-liquid two-phase flow model with different gas contents, in which the ultrasonic gas content detection method used an ultrasonic transducer at the bottom of the pipeline to excite the ultrasonic signal in a vertical incidence manner and received the ultrasonic reflection signal as a receiver; the ultrasonic guided wave gas content detection method used the upper and lower transducers of the pipeline to excite the ultrasonic guided wave signal in an oblique incidence manner, and the two ultrasonic guided wave transducers on the left and right of the pipeline were used as signal receivers to receive the signals excited by the upper and lower transducers; the fusion gas content detection method fused and normalized the ultrasonic reflection signal and the ultrasonic guided wave propagation signal to form a normalized fusion signal.

[0124] In the experiment, multiple simulations and calculations were performed for each detection method and different flow types, and the final results are as follows: Figure 7 , Figure 8 and Fig. 9 As shown: Among them, Figure 7 - (a) is the error diagram of the prediction of gas content by the stratified flow ultrasonic detection method, Figure 7 - (b) is the error diagram of gas void fraction prediction using plug flow ultrasonic testing method; Figure 8 -(a) is the error diagram of the prediction of gas content by ultrasonic guided wave detection method for stratified flow, Figure 8 - (b) is the error diagram of gas fraction prediction using plug flow ultrasonic guided wave detection method; Fig. 9 -(a) is the error diagram of the gas content predicted by the stratified flow fusion gas content detection method, Fig. 9-(b) is the error diagram of the predicted gas content by the plug flow fusion gas content detection method. The sample proportions with gas content errors less than 1% in the data obtained by different methods and different flow patterns are compared, and the following Table 1 is obtained. The values ​​in the table are the sample proportions with errors less than 1%:

[0125] Table 1 Comparison of gas content prediction errors of different methods

[0126] Flow type / method Ultrasonic testing method Ultrasonic guided wave testing Fusion gas content detection method Layered Flow 90% 90% 100% Plug flow 35% 50% 100%

[0127] Through comparative analysis of experimental results, it is concluded that the accuracy of ultrasonic guided wave detection of gas content fraction of gas-liquid two-phase flow in pipeline is higher than that of ultrasonic detection in plug flow type. The fusion gas content fraction detection method proposed in the present invention combines the advantages of ultrasound and ultrasonic guided waves, effectively improving the accuracy of gas content fraction detection. Whether it is stratified flow or plug flow, it can significantly reduce the prediction error, providing a reliable method for accurate detection of gas content fraction of gas-liquid two-phase flow in industrial production.

[0128] 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 spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for detecting gas content of gas-liquid two-phase flow based on dual-mode acoustic fusion, characterized in that the steps include: S1. A fusion type gas content detection device is arranged on the gas-liquid two-phase flow pipeline to be tested, and an ultrasonic reflection signal and an ultrasonic guided wave propagation signal are received by the fusion type gas content detection device; S2, concatenating the ultrasonic reflection signal and the ultrasonic guided wave propagation signal received in step S1 to obtain a fused signal, and normalizing the fused signal to obtain a normalized fused signal; S3. Construct and train a fusion gas content detection model based on a one-dimensional convolutional neural network to obtain a trained fusion gas content detection model; input the normalized fusion signal into the trained fusion gas content detection model to obtain the gas content of the gas-liquid two-phase flow pipeline to be tested.

2. The gas-liquid two-phase flow gas content detection method based on dual-mode acoustic fusion according to claim 1 is characterized in that: The fusion type gas content detection device comprises: The excitation module is used to simultaneously generate two excitation signals of different frequencies to drive the transmitting module to transmit ultrasonic signals and ultrasonic guided wave signals; The transmitting module is used to transmit an ultrasonic signal of a first frequency and an ultrasonic guided wave signal of a second frequency when receiving two excitation signals of different frequencies emitted by the excitation module; wherein the ultrasonic signal of the first frequency is vertically incident into the gas-liquid two-phase flow pipeline to be tested and propagates radially along the gas-liquid two-phase flow pipeline to be tested; the ultrasonic guided wave signal of the second frequency is obliquely incident into the gas-liquid two-phase flow pipeline to be tested and propagates circumferentially along the gas-liquid two-phase flow pipeline to be tested; A receiving module, used for receiving and storing ultrasonic reflection signals and ultrasonic guided wave propagation signals; Wherein, the excitation module is connected with the transmitting module.

3. The gas-liquid two-phase flow gas content detection method based on dual-mode acoustic fusion according to claim 1 or 2, characterized in that: The structure of the fusion gas content detection model is: sequentially connected input layer-convolution layer I-maximum pooling layer I-convolution layer II-maximum pooling layer II-convolution layer III-maximum pooling layer III-convolution layer IV-maximum pooling layer IV-batch normalization layer-flattening layer-fully connected layer-output layer, wherein the activation functions of the convolution layer and the fully connected layer are both LeakyReLU activation functions.

4. The gas-liquid two-phase flow gas content detection method based on dual-mode acoustic fusion according to claim 3 is characterized in that: The process of inputting the normalized fusion signal into the trained fusion gas content detection model to obtain the gas content of the gas-liquid two-phase flow pipeline to be tested is: The input layer receives the normalized fusion signal and passes it to the convolution layer I. The convolution layer I outputs the feature map I after the convolution and activation function processing. The feature map I is used as the input of the maximum pooling layer I. The maximum pooling layer I samples the input feature map I to obtain the reduced dimension feature map I. The reduced dimension feature map I is transmitted to the convolution layer II. The convolution layer II further extracts higher-level features through one-dimensional convolution operation and outputs the feature map II after the convolution and activation function processing. The feature map II is used as the input of the maximum pooling layer II. The maximum pooling layer II reduces the dimension of the feature map II and retains the key features to obtain the reduced dimension feature map II. Similarly, the convolution layer IV and the maximum pooling layer IV extract the highest-level features and perform the final dimensionality reduction to obtain the reduced dimension feature map IV. The batch normalization layer normalizes the dimension reduction feature map IV output by the maximum pooling layer IV and outputs a multi-dimensional normalized feature map. The flattening layer converts the multi-dimensional normalized feature map output by the batch normalization layer into a one-dimensional vector and sends it to the fully connected layer. The fully connected layer extracts high-level features from the one-dimensional vector and outputs a high-dimensional feature vector; The high-dimensional feature vector enters the output layer, and the output layer uses the Sigmoid function to output the gas content.

5. The gas-liquid two-phase flow gas content detection method based on dual-mode acoustic fusion according to claim 4 is characterized in that: The expression for the convolution operation in the convolution layer is: In the formula, represents the input of the jth neuron in the lth layer, represents the input of the i-th neuron in the l-1th layer, is the kernel weight from the i-th neuron in the l-1th layer to the j-th neuron in the lth layer, is the scalar bias of the jth neuron in the lth layer, conv1D represents a one-dimensional convolution operation, and N is the convolution kernel size; The output layer uses the Sigmoid function to output the gas content expression as follows: Among them, z k is the kth element in the high-dimensional feature vector output by the fully connected layer, is the gas content.

6. The gas-liquid two-phase flow gas content detection method based on dual-mode acoustic fusion according to claim 4 is characterized in that: The batch normalization layer normalizes the dimension reduction feature map IV output by the maximum pooling layer IV, and the expression of the output multi-dimensional normalized feature map includes: In the formula, x c The feature map IV obtained for the cth input signal c ; m is the batch size of the reduced dimension feature map IV; μ B and For each channel mean and variance; is the normalized result; ∈ is a constant used to prevent the denominator from being 0; γ and δ are learnable parameters; y c is the final output value of batch normalization.

7. The gas-liquid two-phase flow gas content detection method based on dual-mode acoustic fusion according to claim 1, 5 or 6, characterized in that: The method for obtaining the trained fusion gas content detection model is: The adaptive moment estimation algorithm is used to train the fusion gas content detection model. The steps include: Initialize the model parameters of the fusion gas fraction detection model and the hyperparameters of the adaptive moment estimation algorithm before training; (1) Update the first-order moment estimate and the second-order moment estimate respectively; (2) Perform bias correction: correct the first-order moment estimate and the second-order moment estimate respectively; (3) Update the model parameters based on the revised first-order moment and second-order moment estimates; Repeat steps (1) to (3) to iteratively update the model parameters until the loss function of the fusion gas fraction detection model converges and the training is completed.

8. The gas-liquid two-phase flow gas content detection method based on dual-mode acoustic fusion according to claim 7 is characterized in that: The expressions for respectively updating the first-order moment estimate and the second-order moment estimate are: m T =β1m T-1 +(1-β1)g T In the formula, m T is the first-order moment estimate of the current time step T; β1 is the exponential decay rate of the first-order moment estimate; m T-1 is the first-order moment estimate of the previous time step T-1; g T is the gradient of the current time step T, In the formula, L(θ T ) is the loss function of the current time step T; θ T is the model parameter of the current time step T; It means to find the partial derivative of the model parameter θ; v T =β2v T-1 +(1-β2)g T 2 In the formula, v T is the second-order moment estimate of the current time step T; β2 is the exponential decay rate of the second-order moment estimate; v T-1 is the second-order moment estimate of the previous time step T-1.

9. The gas-liquid two-phase flow gas content detection method based on dual-mode acoustic fusion according to claim 8, characterized in that: The correction expressions for respectively correcting the first-order moment estimate and the second-order moment estimate are: In the formula, is the corrected first-order moment estimate; is the corrected second-order moment estimate; is the Tth power of the exponential decay rate of the first-order moment estimate; is the Tth power of the exponential decay rate of the second-order moment estimate; The expression for updating the model parameters according to the modified first-order moment and second-order moment estimation is: In the formula, θ T+1 is the updated model parameter; θ T is the model parameter of the current time step T; α is the learning rate; ∈ is a constant.

10. The gas-liquid two-phase flow gas content detection method based on dual-mode acoustic fusion according to claim 7, characterized in that: The loss function of the fusion gas content detection model is: In the formula, y p is the true gas content value of the pth sample, is the gas content value predicted by the fusion gas content detection model, and M is the total number of training samples.