A gas-liquid two-phase flow pattern recognition method based on wavelet analysis
By determining the optimal wavelet basis function and the number of decomposition layers, and combining wavelet thresholding and wavelet packet decomposition, the problem of poor denoising effect in gas-liquid two-phase flow pattern identification is solved, and efficient and accurate flow pattern identification is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HAINAN UNIV
- Filing Date
- 2023-12-11
- Publication Date
- 2026-06-23
Smart Images

Figure CN117725362B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of multiphase flow technology, and in particular to a method for identifying gas-liquid two-phase flow patterns based on wavelet analysis. Background Technology
[0002] Due to the wide range of applications and importance of multiphase flow systems in nature and industrial processes, research in the field of multiphase flow has developed rapidly, becoming a cutting-edge discipline that has attracted great attention from scholars both domestically and internationally. Gas-liquid two-phase flow is particularly important in multiphase flow research. Currently, many production equipment in industries such as power, chemical, nuclear energy, refrigeration, petroleum, and metallurgy involve gas-liquid two-phase flow conditions. Flow pattern greatly affects the flow and heat transfer characteristics of gas-liquid two-phase flow, as well as the accurate measurement of flow parameters and the operating characteristics of two-phase flow systems. Therefore, the study of gas-liquid two-phase flow pattern identification has always been an important research direction in two-phase flow parameter measurement, and it also provides strong technical support for the safe and economical operation of related industrial production equipment. During pressure data acquisition, noise signals are inevitable. To improve the accuracy of flow pattern identification, it is necessary to perform error analysis and noise reduction on the obtained pressure pulsation signals. Furthermore, the noise reduction process should not only eliminate the noise portion of the signal but also effectively retain the useful signals.
[0003] Therefore, it is necessary to remove noise interference through reasonable methods to obtain a more accurate structural response signal. Wavelet analysis is a commonly used method for noise removal. For pressure signals with a large amount of collected data, discrete wavelet transform is usually used for wavelet analysis. However, in the implementation process, the selection of wavelet basis functions, the number of decomposition layers, and the threshold processing function are often based on experience, which affects the denoising effect to some extent. In addition, when measuring the denoising effect, three evaluation indicators are usually used: signal-to-noise ratio (SNR), root mean square error (RMSE), and smoothness (R). The smaller the RMSE, the higher the SNR, and the smaller the smoothness, the better the denoising effect. This has a certain impact on the energy and wavelet packet entropy value analyzed during subsequent wavelet packet decomposition and reconstruction. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention proposes a flow pattern identification method for gas-liquid two-phase flow based on wavelet analysis. This method solves the problems of selecting wavelet basis functions and decomposition levels, and uses the calculated total energy of the signal, energy components at each scale, and wavelet packet entropy as characteristic values of the flow pattern to distinguish the signal to be identified.
[0005] To achieve the above objectives, the technical solution of the present invention is as follows:
[0006] A method for identifying flow patterns in gas-liquid two-phase flow based on wavelet analysis includes the following steps:
[0007] Acquire pressure fluctuation signals, determine the optimal wavelet basis function and the optimal decomposition level n, and perform n-level wavelet decomposition on the pressure fluctuation signals based on the determined optimal wavelet basis function and the optimal decomposition level n to obtain n-level wavelet approximation coefficients and wavelet detail coefficients.
[0008] Threshold quantization is performed on the wavelet detail coefficients of each layer obtained after decomposition to obtain the denoised wavelet detail coefficients of each layer.
[0009] Wavelet reconstruction is performed using the denoised wavelet detail coefficients of each layer and the nth layer wavelet approximation coefficients to obtain a denoised signal with the same number of original signals.
[0010] The denoised signal is decomposed into eight frequency bands by three-level wavelet packet decomposition. The power spectrum energy, energy ratio, and wavelet packet entropy value of the eight frequency bands under different gas-liquid two-phase flow patterns are calculated as the feature values of the flow pattern. Based on the feature values of the flow pattern, the flow pattern of the gas-liquid two-phase flow to be identified is judged and identified.
[0011] Preferably, determining the optimal wavelet basis function and the optimal decomposition level n specifically includes the following steps:
[0012] Several wavelet basis functions were used to decompose the pressure fluctuation signal under different two-phase flow patterns to obtain the improved SNR value corresponding to different wavelet basis functions. The wavelet basis function with the largest SNR value was selected as the optimal wavelet basis function.
[0013] The energy of the wavelet detail coefficients at each decomposition level is calculated using the optimal wavelet basis function, and the corresponding time-domain plot is plotted. The energy gradually decreases as the decomposition level increases, and when the energy begins to rise, the level at this point is the optimal decomposition level.
[0014] Preferably, the formula for calculating the SNR value is:
[0015]
[0016] Where N is the length of the signal, f(i) is the original acquired pressure signal, and s(i) is the signal after wavelet denoising decomposition and reconstruction.
[0017] Preferably, the calculation formula for the wavelet detail coefficients of each layer after noise reduction is as follows:
[0018]
[0019] in, W j,k To obtain the wavelet detail coefficients of the k-th node in the j-th layer from the wavelet decomposition, n represents the number of decomposition levels.
[0020] Preferably, the denoised signal is decomposed into eight frequency bands using a three-level wavelet packet decomposition method. The power spectral energy, energy ratio, and wavelet packet entropy value of the eight frequency bands are calculated under different gas-liquid two-phase flow patterns. The specific steps include the following:
[0021] The denoised pressure pulsation signal was decomposed into three-level wavelet packet decomposition to obtain wavelet packet signals in eight frequency bands.
[0022] Wavelet packet decomposition coefficients were used to reconstruct the wavelet packet signals from eight frequency bands to obtain eight reconstructed wavelet packet signals.
[0023] Calculate the power spectral energy of the wavelet packet reconstructed signal in 8 frequency bands, and calculate the energy proportion of the wavelet packet reconstructed signal in 8 frequency bands based on the power spectral energy;
[0024] The wavelet packet entropy values of the eight frequency bands are calculated based on the energy ratio.
[0025] Preferably, the formula for reconstructing the wavelet packet decomposition coefficients is as follows:
[0026]
[0027] in: f(t) is the wavelet packet reconstructed signal of the i-th signal at the k-th node of the j-th layer; f(t) is the input denoising pressure signal. The wavelet packet decomposition result of the i-th signal at the k-th node of the j-th layer; t is the time variable; i = 1, 2, ..., N,
[0028] The formula for calculating the power spectrum energy is as follows:
[0029]
[0030] Where: E(m) is the power energy spectrum of the wavelet packet in the m-th frequency band; Reconstruct the signal from the wavelet packet of the i-th signal at the k-th node of the j-th layer.
[0031] The formula for calculating the energy percentage is as follows:
[0032]
[0033] Where: P m The energy percentage of the wavelet packet in the m-th frequency band.
[0034] The formula for calculating the wavelet packet entropy is as follows:
[0035]
[0036] Preferably, the process of determining and identifying the flow pattern of the gas-liquid two-phase flow based on the characteristic values of the flow pattern specifically includes the following steps:
[0037] As the gas velocity gradually increases, the flow pattern of the gas-liquid two-phase flow changes sequentially from bubble flow, bubbly flow, slug flow, and annular flow. The power spectrum energy, energy ratio, and wavelet packet entropy value of eight frequency bands under different gas-liquid two-phase flow patterns are obtained as characteristic values of the flow pattern.
[0038] Based on the changing trend of eigenvalues, the flow patterns of the gas-liquid two-phase flow to be determined are identified according to the calculated power spectrum energy, energy ratio, and wavelet packet entropy value.
[0039] Based on the above technical solution, the beneficial effects of this invention are as follows: This invention uses wavelet analysis to identify gas-liquid two-phase flow patterns from pressure data. It collects pressure pulsation signals under different flow patterns. However, due to the high-speed gas lift during the acquisition process, the collected pressure signals contain a certain degree of noise. Therefore, wavelet threshold denoising is performed on the collected signals. When determining the wavelet basis function, the optimal wavelet basis function is selected based on the improved signal-to-noise ratio. When determining the number of wavelet decomposition levels, the optimal decomposition level is determined based on the energy change of wavelet detail coefficients during wavelet transformation. This process has low computational complexity and fast analysis speed. An improved threshold processing function, different from the soft and hard value functions, is applied to the decomposed wavelet coefficients, resulting in a higher signal-to-noise ratio. The denoised pressure signal is then subjected to three-level wavelet packet decomposition to obtain eight frequency bands. The power spectral energy, energy ratio, and wavelet packet entropy value of the wavelet packet coefficients in different frequency bands are calculated as characteristic values of the flow pattern to distinguish between different flow pattern signals. Attached Figure Description
[0040] Figure 1 This is a schematic diagram of a flow pattern identification method for gas-liquid two-phase flow based on wavelet analysis in one embodiment. Detailed Implementation
[0041] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0042] like Figure 1 As shown, this embodiment provides a method for identifying the flow pattern of a gas-liquid two-phase flow based on wavelet analysis, including the following steps:
[0043] S1. Acquire the pressure fluctuation signal, determine the optimal wavelet basis function and the optimal decomposition level n, and perform n-level wavelet decomposition on the pressure fluctuation signal based on the determined optimal wavelet basis function and the optimal decomposition level n to obtain the n-level wavelet approximation coefficients and wavelet detail coefficients.
[0044] S2, threshold quantization is performed on the wavelet detail coefficients of each layer obtained after decomposition to obtain the denoised wavelet detail coefficients of each layer.
[0045] S3, use the wavelet detail coefficients of each layer after denoising and the wavelet approximation coefficients of the nth layer to perform wavelet reconstruction, and obtain a denoised signal with the same number of original signals;
[0046] S4. The denoised signal is decomposed into 8 frequency bands by three-level wavelet packet decomposition. The power spectrum energy, energy ratio and wavelet packet entropy value of the 8 frequency bands under different gas-liquid two-phase flow patterns are calculated as the feature values of the flow pattern. Based on the feature values of the flow pattern, the flow pattern of the gas-liquid two-phase flow to be identified is judged and identified.
[0047] In one embodiment of a wavelet analysis-based gas-liquid two-phase flow pattern identification method, a process for selecting a suitable wavelet basis function and an optimal decomposition level n is also provided, specifically including the following steps:
[0048] Several wavelet basis functions were used to decompose the pressure fluctuation signal under different two-phase flow patterns to obtain the improved SNR value corresponding to different wavelet basis functions. The wavelet basis function with the largest SNR value was selected as the optimal wavelet basis function.
[0049] The energy of the wavelet detail coefficients at each decomposition level is calculated using the optimal wavelet basis function, and the corresponding time-domain plot is plotted. The energy gradually decreases as the decomposition level increases, and when the energy begins to rise, the level at this point is the optimal decomposition level.
[0050] In this implementation, the optimal wavelet basis function is determined by the best improveable SNR in the convection pattern. A higher SNR value indicates a better decomposition effect of the wavelet basis function on the pressure signal. Commonly used db, sym, and coif wavelet basis functions are used to calculate the SNR of different two-phase flow patterns under acquired pressure pulsation signals to determine the optimal wavelet basis function. The formula for calculating the SNR value is as follows:
[0051]
[0052] Where N is the length of the signal, f(i) is the original acquired pressure signal, and s(i) is the signal after wavelet denoising decomposition and reconstruction.
[0053] The energy of wavelet detail coefficients obtained at each decomposition level of the noisy signal is calculated, and the corresponding time-domain plots are plotted. The energy should initially decrease gradually with increasing decomposition level; the optimal decomposition level is indicated when the energy begins to rise again. Simultaneously, the signal-to-noise ratio (SNR), root mean square error (RMSE), and smoothness (R) are calculated. These SNR, RMSE, and smoothness (R) are used to validate the subsequent method of using the entropy weight method to fuse multiple indicators into a single indicator, providing theoretical objectivity.
[0054] The formula for calculating the root mean square error (RMSE) index is as follows:
[0055]
[0056] Where N is the length of the signal, f(i) is the original acquired pressure signal, and s(i) is the signal after wavelet denoising decomposition and reconstruction.
[0057] The formula for calculating the smoothness (R) index value is as follows:
[0058]
[0059] Where N is the length of the signal, f(i) is the original acquired pressure signal, and s(i) is the signal after wavelet denoising decomposition and reconstruction.
[0060] In one embodiment of a wavelet analysis-based gas-liquid two-phase flow pattern identification method, a threshold function is also provided to perform threshold quantization on the wavelet detail coefficients of each layer obtained after decomposition. The wavelet coefficients after threshold processing are... The calculation formula is as follows:
[0061]
[0062] in, W j,k To obtain the wavelet detail coefficients of the k-th node at the j-th level through wavelet decomposition, a fixed threshold is used. n represents the number of decomposition levels. As the number of decomposition levels changes, the threshold also changes.
[0063] In one embodiment of a wavelet analysis-based gas-liquid two-phase flow pattern identification method, a process is also provided to perform three-level wavelet packet decomposition on the denoised signal to obtain eight frequency bands, and to calculate the power spectral energy, energy ratio, and wavelet packet entropy value of the eight frequency bands under different gas-liquid two-phase flow patterns. Specifically, the process includes the following steps:
[0064] The denoised pressure pulsation signal was decomposed into three-level wavelet packet decomposition to obtain wavelet packet signals in eight frequency bands.
[0065] Wavelet packet decomposition coefficients are used to reconstruct the wavelet packet signals from eight frequency bands to obtain eight reconstructed wavelet packet signals. The formula for wavelet packet decomposition coefficient reconstruction is as follows:
[0066]
[0067] in: f(t) is the wavelet packet reconstructed signal of the i-th signal at the k-th node of the j-th layer; f(t) is the input denoising pressure signal. The wavelet packet decomposition result of the i-th signal at the k-th node of the j-th layer; t is the time variable; i = 1, 2, ..., N,
[0068] Calculate the power spectral energy of the wavelet packet reconstructed signal in eight frequency bands, and then calculate the energy proportion of the wavelet packet reconstructed signal in each of the eight frequency bands based on the power spectral energy; among which,
[0069] The formula for calculating the power spectrum energy is as follows:
[0070]
[0071] Where: E(m) is the power energy spectrum of the wavelet packet in the m-th frequency band; Reconstruct the signal from the wavelet packet of the i-th signal at the k-th node of the j-th layer.
[0072] The formula for calculating the energy percentage is as follows:
[0073]
[0074] Where: P m The energy percentage of the wavelet packet in the m-th frequency band.
[0075] The wavelet packet entropy values of the eight frequency bands are calculated based on the energy proportion. The formula for calculating the wavelet packet entropy value H is as follows:
[0076]
[0077] In one embodiment of a wavelet analysis-based gas-liquid two-phase flow pattern identification method, a process is also provided for judging and identifying the flow pattern of the gas-liquid two-phase flow to be identified based on the feature values of the flow pattern, specifically including the following steps:
[0078] As the gas velocity gradually increases, the flow pattern of the gas-liquid two-phase flow changes sequentially from bubble flow, bubbly flow, slug flow, and annular flow. The power spectrum energy, energy ratio, and wavelet packet entropy value of eight frequency bands under different gas-liquid two-phase flow patterns are obtained as characteristic values of the flow pattern.
[0079] Based on the changing trend of eigenvalues, the flow patterns of the gas-liquid two-phase flow to be determined are identified according to the calculated power spectrum energy, energy ratio, and wavelet packet entropy value.
[0080] Observations show that as the gas velocity gradually increases, the flow pattern changes sequentially, from bubbly flow to slug flow to annular flow. As the gas velocity increases, the collisions between liquids and between the liquid and the pipe wall become more intense, leading to a decrease in the power spectral energy in the low-frequency band. The power spectral energy is mainly distributed in the first and second frequency bands. With increasing flow velocity, the power spectral energy in the first frequency band decreases sequentially, while the power spectral energy in the second frequency band begins to rise. The wavelet packet entropy value corresponds to the analysis of the complexity and diversity of the flow pattern. With the change in flow pattern, the wavelet packet entropy value shows a trend of first increasing and then decreasing. Based on the obtained trend, the relevant characteristic values of the gas-liquid two-phase flow pattern to be identified are calculated, and the flow pattern is determined and identified through these characteristic values.
[0081] It should be understood that although the steps in the flowchart above 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 flowchart above 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. The execution order of these sub-steps or stages 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.
[0082] The above are merely preferred embodiments of the present application and are not intended to limit the embodiments of the present application. For those skilled in the art, the embodiments of the present application can have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of the present application should be included within the protection scope of the embodiments of the present application.
Claims
1. A method for identifying the flow pattern of a gas-liquid two-phase flow based on wavelet analysis, characterized in that, Includes the following steps: Acquire pressure fluctuation signals, determine the optimal wavelet basis function and the optimal decomposition level n, and perform n-level wavelet decomposition on the pressure fluctuation signals based on the determined optimal wavelet basis function and the optimal decomposition level n to obtain n-level wavelet approximation coefficients and wavelet detail coefficients. Threshold quantization is performed on the wavelet detail coefficients of each layer obtained after decomposition to obtain the denoised wavelet detail coefficients of each layer. Wavelet reconstruction is performed using the denoised wavelet detail coefficients of each layer and the nth layer wavelet approximation coefficients to obtain a denoised signal with the same number of original signals. The denoised signal is decomposed into eight frequency bands by three-level wavelet packet decomposition. The power spectrum energy, energy ratio and wavelet packet entropy value of the eight frequency bands under different gas-liquid two-phase flow patterns are calculated as the feature values of the flow pattern. Based on the feature values of the flow pattern, the flow pattern of the gas-liquid two-phase flow to be identified is judged and identified. The process of determining the optimal wavelet basis function employs an improved SNR value, and the formula for calculating the improved SNR value is as follows: , where N is the length of the signal, f(i) is the original collected pressure signal, and s(i) is the signal after wavelet denoising decomposition and reconstruction; The calculation formulas for the wavelet detail coefficients of each layer after noise reduction are as follows: ,in, , t=1, W j,k To obtain the wavelet detail coefficients of the k-th node in the j-th layer from the wavelet decomposition, , , where n represents the number of decomposition levels.
2. The method for identifying gas-liquid two-phase flow patterns based on wavelet analysis according to claim 1, characterized in that, Determining the optimal wavelet basis function and the optimal decomposition level n specifically includes the following steps: Several wavelet basis functions were used to decompose the pressure fluctuation signal under different two-phase flow patterns to obtain the improved SNR value corresponding to different wavelet basis functions. The wavelet basis function with the largest SNR value was selected as the optimal wavelet basis function. The energy of the wavelet detail coefficients at each decomposition level is calculated using the optimal wavelet basis function, and the corresponding time-domain plot is plotted. The energy gradually decreases as the decomposition level increases, and when the energy begins to rise, the level at this point is the optimal decomposition level.
3. The method for identifying gas-liquid two-phase flow patterns based on wavelet analysis according to claim 1, characterized in that, The denoised signal is decomposed into eight frequency bands using a three-level wavelet packet decomposition method. The power spectral energy, energy ratio, and wavelet packet entropy of the eight frequency bands are calculated under different gas-liquid two-phase flow patterns. The specific steps include the following: The denoised pressure pulsation signal was decomposed into three-level wavelet packet decomposition to obtain wavelet packet signals in eight frequency bands. Wavelet packet decomposition coefficients were used to reconstruct the wavelet packet signals from eight frequency bands to obtain eight reconstructed wavelet packet signals. Calculate the power spectral energy of the wavelet packet reconstructed signal in 8 frequency bands, and calculate the energy proportion of the wavelet packet reconstructed signal in 8 frequency bands based on the power spectral energy; The wavelet packet entropy values of the eight frequency bands are calculated based on the energy ratio.
4. The method for identifying gas-liquid two-phase flow patterns based on wavelet analysis according to claim 3, characterized in that, The formula for reconstructing the wavelet packet decomposition coefficients is as follows: ,in: f(t) is the wavelet packet reconstructed signal of the i-th signal at the k-th node of the j-th layer; f(t) is the input denoising pressure signal. The wavelet packet decomposition result of the i-th signal at the k-th node of the j-th layer; t is the time variable; i = 1, 2, ..., N, The formula for calculating the power spectrum energy is as follows: Where: E(m) is the power energy spectrum of the wavelet packet in the m-th frequency band; Reconstruct the signal from the wavelet packet of the i-th signal at the k-th node of the j-th layer. The formula for calculating the energy percentage is as follows: , where: P m The energy percentage of the wavelet packet in the m-th frequency band. The formula for calculating the wavelet packet entropy is as follows: 。 5. The method for identifying gas-liquid two-phase flow patterns based on wavelet analysis according to claim 1, characterized in that, The process of identifying the flow pattern of a gas-liquid two-phase flow based on the characteristic values of the flow pattern includes the following steps: As the gas velocity gradually increases, the flow pattern of the gas-liquid two-phase flow changes sequentially from bubble flow, bubbly flow, slug flow, and annular flow. The power spectrum energy, energy ratio, and wavelet packet entropy value of eight frequency bands under different gas-liquid two-phase flow patterns are obtained as characteristic values of the flow pattern. Based on the changing trend of eigenvalues, the flow patterns of the gas-liquid two-phase flow to be determined are identified according to the calculated power spectrum energy, energy ratio, and wavelet packet entropy value.