Gas-liquid two-phase flow optical cross-correlation flow velocity measurement method based on peak mass gating and residual compensation

By employing peak quality gating and residual compensation, the flow velocity measurement error problem of the optical cross-correlation method under high humidity/wet conditions was solved, achieving high-precision and stable flow velocity output and enhancing the robustness and continuity of the system.

CN121856587APending Publication Date: 2026-04-14SOUTHEAST UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-04
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Under high humidity/wet conditions, the optical cross-correlation method is prone to reduced signal-to-noise ratio, peak misalignment, sudden time delay jumps, and increased error in the measurement of gas-liquid two-phase flow velocity. Traditional threshold determination is difficult to guarantee robustness and continuity.

Method used

An adaptive flow velocity measurement system is constructed by using peak quality gating and residual compensation methods. This is achieved through peak quality feature scoring and continuous gating weight scheduling, combined with a ridge regression residual model.

Benefits of technology

It improves the accuracy and stability of flow velocity measurement under high humidity/wet conditions, reduces error abruptness and output discontinuity, and enhances the robustness and engineering usability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121856587A_ABST
    Figure CN121856587A_ABST
Patent Text Reader

Abstract

The invention discloses a gas-liquid two-phase flow optical cross-correlation flow velocity measurement method based on peak quality gating and residual compensation. The method comprises the following steps: acquiring upstream and downstream light intensity signals, and carrying out denoising and standardization processing according to a time window; a physically feasible time delay search interval is limited according to the distance between the sensors and a preset speed range, cross-correlation main peak positioning and sub-sampling time delay estimation are completed in the interval, and a reference flow velocity is obtained; peak quality characteristics such as cross-correlation main peak intensity and attenuation characterization quantity are extracted, a peak quality score is constructed and mapped into a continuous gating weight, and gating weight lower limit constraint is carried out on a wet degradation window to inhibit abnormal window influence; and establishing a ridge regression compensation model by taking the reference flow velocity residual error as a learning target, carrying out compensation amplitude calibration, and finally outputting the gating fusion flow velocity. According to the method, the wet degradation criterion is explicitly incorporated into the estimation process, and the stability and precision of flow velocity measurement under the high-humidity working condition are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to fluid velocity measurement methods, specifically to a gas-liquid two-phase flow optical cross-correlation velocity measurement method based on peak quality gating and residual compensation. Background Technology

[0002] Optical cross-correlation is a commonly used method for measuring fluid velocity. It involves collecting two light intensity signals from upstream and downstream optical sensors arranged along the flow direction, estimating the propagation time using the time delay corresponding to the cross-correlation peak, and then combining this with the sensor spacing to obtain the flow velocity. However, gas-liquid two-phase flows (such as wet steam, mist, bubbly flow, and slug flow) are often accompanied by high humidity, high noise, and strong fluctuations. Under high humidity / wet conditions, the optical cross-correlation method is prone to the following problems:

[0003] (1) The optical path attenuation and scattering enhancement caused by wet conditions weaken the effective fluctuation amplitude of the upstream and downstream optical intensity signals and reduce the signal-to-noise ratio, which in turn leads to the deterioration of the cross-correlation function, such as the broadening of the main peak, the enhancement of the side lobes, and the coexistence of multiple peaks. When the peak position criterion of "the propagation delay corresponding to the maximum correlation peak" is adopted, it is easy to cause peak selection and time delay jump, resulting in increased flow velocity error and even abnormal output.

[0004] (2) Under wet conditions, there are often a few short-term strong attenuation or strong noise windows. Traditional reliability judgment based on a single threshold (such as peak threshold or correlation coefficient threshold) is difficult to reflect both "peak intensity" and "peak position stability". There may be mismatches such as high peak value but unreliable peak position, or relatively stable peak position but the threshold cannot effectively distinguish between usable and unusable windows. As a result, a few abnormal windows have a dominant influence on the overall error index, making it difficult to meet the requirements of continuous measurement and robustness in engineering. Summary of the Invention

[0005] Purpose of the invention: The purpose of this invention is to provide a gas-liquid two-phase flow optical cross-correlation velocity measurement method based on peak quality gating and residual compensation that can achieve high-precision and high-stability flow velocity output under high humidity / wet conditions.

[0006] Technical solution: The present invention provides a method for measuring the optical cross-correlation velocity of gas-liquid two-phase flow based on peak quality gating and residual compensation, comprising:

[0007] S1: Acquire upstream and downstream optical intensity signals, and divide the two optical intensity signals into preset time windows. Windowing is used to obtain the upstream and downstream light intensity signals for each time window;

[0008] S2: Denoise and standardize the upstream and downstream light intensity signals within each time window to obtain a standardized signal sequence;

[0009] S3: Calculate the cross-correlation function between normalized signals for each time window, and based on the sensor spacing... and preset speed range Construct a physically feasible time-delay search interval; within this time-delay search interval, determine the main cross-correlation peak and obtain the time-delay estimate. Calculate the cross-correlation reference velocity ;

[0010] S4: Extract peak quality features that characterize the reliability of the cross-correlation estimation for each time window. The peak quality features should include at least the main peak value of the cross-correlation. With decay characterization Attenuation characterization quantity The standard deviation of the downstream light intensity signal within the time window Standard deviation of upstream light intensity signal within the time window The ratio;

[0011] S5: Main peak value of cross-correlation based on low-humidity training data With decay characterization Robust standardization was performed, and a peak quality score was constructed. Then score the peak quality. Monotonic mapping to gate weights The low-humidity training data includes upstream and downstream optical intensity signals and reference flow velocities collected synchronously under low-humidity conditions.

[0012] S6: Based on attenuation characterization With wetness determination threshold When the window satisfies < When this occurs, the window is identified as a wet-state degradation window; a lower bound constraint is applied to the gating weight corresponding to the wet-state degradation window to ensure that it meets the following conditions. , The preset threshold;

[0013] S7: Based on reference flow rate Cross-correlation reference velocity Using the difference residuals as the learning objective, a ridge regression residual model is constructed to predict the compensation amount. ;

[0014] S8: Calculate the compensation amplitude calibration coefficient using wet calibration data. And the compensation amount is calibrated as The wet calibration data includes upstream and downstream light intensity signals and reference flow velocities collected synchronously under high humidity conditions.

[0015] S9: Output fusion flow rate .

[0016] Furthermore, in step S1, the sensor spacing Configuration is 6-30mm, sampling frequency Configured to 10–50 kHz, adjacent time windows are divided into non-overlapping or overlapping windows with a set overlap rate.

[0017] Furthermore, in step S2, wavelet denoising is used for denoising and Z-score normalization is used for normalization.

[0018] Furthermore, in step S3, subsampling interpolation is performed on the time delay estimates corresponding to the main cross-correlation peaks to improve the accuracy of time delay estimation.

[0019] Furthermore, in step S5, robust normalization uses the dominant peak value of cross-correlation in the low-humidity training data. With decay characterization The median and absolute deviation statistics were scaled uniformly to reduce the impact of a small number of outlier windows on the scoring; peak quality scoring The dominant peak value of the cross-correlation after robust normalization With decay characterization Obtained by weighting according to preset weights; gate weights It employs a continuously monotonic sigmoid mapping function; the gating parameters include robust normalization parameters and gating scoring thresholds. The robust normalization parameters include the dominant peak value of cross-correlation in the low-humidity training data. With decay characterization The median and absolute deviation statistics; the gating scoring threshold is determined by the peak quality score in the low-humidity training data. The quantile statistics are determined and used to divide the "more reliable region" and the "significantly deteriorated region" to achieve adaptive calibration of the gating parameters for different sensors, different installation conditions and different signal amplitude scales.

[0020] Furthermore, in step S5, when the peak quality score... When a time window reaches or exceeds a trusted threshold, the gating weight adopts a soft-close strategy: the gating weight of this type of window is limited to no more than a preset threshold. ,and .

[0021] Furthermore, in step S6, the wetness determination threshold... The attenuation characterization of low-humidity training data and wet calibration segment The statistical measures are jointly determined, and several consecutive time windows are selected from the wet calibration data to form a wet calibration segment.

[0022] Furthermore, let This represents the median of the decay representation in the low-humidity training data. If the median of the attenuation characterization quantity in the wet calibration data is taken, then take... .

[0023] Furthermore, in step S7, the regularization parameter of the ridge regression residual model is selected from a preset candidate set through cross-validation to minimize the validation error; the compensation amount of the model output is then adjusted. Set an amplitude limit threshold to make it fall within a preset compensation range in order to suppress output abrupt changes caused by abnormal predictions.

[0024] Furthermore, in step S8, the compensation amplitude calibration coefficient The error is obtained by minimizing the weighted residual squared error of the wet calibration segment. The minimized wet calibration segment is a small "calibration window" that is drawn out separately from the high humidity data. This makes the "compensation amount predicted by the model" as close as possible to the actual residual in this wet data segment. The high humidity data includes upstream and downstream light intensity signals and reference flow velocity collected synchronously under high humidity conditions.

[0025] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages:

[0026] (1) Peak quality criteria are closer to the wet degradation mechanism: The cross-correlation main peak intensity characteristics and signal attenuation characteristics are combined for peak quality scoring. Compared with the judgment method that only relies on the cross-correlation peak value / correlation coefficient threshold, it can simultaneously reflect the impact of wet attenuation, noise enhancement and signal mismatch on the cross-correlation peak shape and peak position reliability, thereby alleviating the criterion mismatch problem of "high peak value but unreliable peak position" and "reliable peak position but insensitive peak value index".

[0027] (2) Continuous gating avoids output discontinuity: Continuous gating weights are generated based on peak quality scores, and the participation of compensation quantities is scheduled with weights so that the compensation intensity changes continuously with peak quality, reducing estimation jumps and output jitter caused by hard threshold switching, and improving the availability of continuous measurement.

[0028] (3) Apply a lower bound constraint to the gating weight of the wet degradation window to provide engineering-level robust protection: Apply a lower bound constraint to the gating weight of the wet degradation window so that the extreme attenuation / strong noise window will not be undercompensated due to gating misjudgment, thereby suppressing the "drag effect" of a small number of abnormal windows on the overall error index and improving the system robustness and engineering deployability.

[0029] (4) Residual learning and calibration take into account interpretability and generalization: Ridge regression is used to learn the cross-correlation benchmark estimation residuals, and the compensation amplitude is calibrated through the wet calibration segment. While maintaining the simplicity of the model structure and controllability of parameters, it can adapt to the changes in error amplitude distribution under wet conditions, and improve the measurement accuracy and stability under high humidity / wet conditions. Attached Figure Description

[0030] Figure 1This is a flowchart of a gas-liquid two-phase flow optical cross-correlation velocity measurement method based on peak quality gating and residual compensation provided by an embodiment of the present invention;

[0031] Figure 2 This is a schematic diagram of the experimental system in an embodiment of the present invention;

[0032] Figure 3 This is a heatmap of speed measurement error under different sampling frequencies and sensor spacing conditions in the embodiments of the present invention;

[0033] Figure 4 (a) is a comparison chart of the cross-correlation coefficient distribution under low humidity and high humidity in an embodiment of the present invention. Figure 4 (b) is a comparison diagram of the cross-correlation flow velocity distribution under low humidity and high humidity in an embodiment of the present invention;

[0034] Figure 5 This is a schematic diagram illustrating the mapping relationship between peak quality score and gating weight in an embodiment of the present invention;

[0035] Figure 6 This is a schematic diagram of the wetness determination threshold in an embodiment of the present invention;

[0036] Figure 7 This is a schematic diagram of the mechanism for applying a lower bound constraint to the gating weight of the wet degradation window in an embodiment of the present invention;

[0037] Figure 8 This is a comparison chart of flow velocities measured by different methods in the embodiments of the present invention. Detailed Implementation

[0038] The invention will now be further described with reference to the accompanying drawings.

[0039] This invention provides a method for measuring velocity in gas-liquid two-phase flow based on peak quality gating and residual compensation using optical cross-correlation. While maintaining the physical constraint framework of two-point cross-correlation, it explicitly incorporates wet degradation characteristics into the reliability assessment and output scheduling. Through peak quality gating and wet protection mechanisms, it adaptively adjusts the compensation participation, and combines ridge regression residual compensation and compensation amplitude calibration to improve the stability and accuracy of velocity output under high humidity / wet conditions.

[0040] like Figure 1 As shown, the optical cross-correlation velocity measurement method for gas-liquid two-phase flow includes the following steps:

[0041] S1: Upstream and downstream optical sensors are arranged along the flow direction to collect light intensity signals from both upstream and downstream sources. The sensor spacing is [not specified]. The sampling frequency is configured to be 6–30 mm, preferably 12 mm; The frequency is configured to be 10–50 kHz, preferably 50 kHz. The two optical intensity signals are then processed according to a time window. By dividing the time window, the upstream and downstream light intensity signals are obtained for each time window. (Time window) For a preset duration (e.g., 1 second), adjacent time windows are divided into windows with no overlap or a set overlap rate.

[0042] S2: Denoising and standardization are performed on the upstream and downstream light intensity signals within each time window to obtain a standardized signal sequence. The purpose of denoising and standardization is to suppress the influence of random noise, low-frequency drift, and amplitude scale differences between different windows on the cross-correlation peak shape and peak position estimation. In this embodiment, wavelet denoising is used for denoising, and Z-score standardization is used for standardization.

[0043] S3: Calculate the cross-correlation function between normalized signals for each time window, and based on the sensor spacing... and preset speed range Construct a physically feasible time-delay search interval; within this time-delay search interval, determine the main cross-correlation peak and obtain the time-delay estimate. Calculate the cross-correlation reference velocity This serves as the baseline estimate for the corresponding time window. To improve the accuracy of the time delay estimation, subsampling interpolation is performed on the time delay estimates corresponding to the main cross-correlation peaks.

[0044] The time delay search range is determined by the sensor spacing. With preset speed range This is calculated. Since the propagation time from the upstream optical sensor to the downstream optical sensor satisfies the physical relationship "propagation time = distance / velocity", there is a propagation time delay. The physically feasible range is: the minimum propagation time corresponds to the maximum speed, and the maximum propagation time corresponds to the minimum speed. Falling on and Within a defined interval. Under discrete sampling conditions, the time delay of cross-correlation is represented by the number of sampling points (lag points). With time delay The conversion relationship is as follows Therefore, by converting the aforementioned physically feasible time delay range into a lag point search range, the main peak of the cross-correlation is limited to this lag point search range, thereby excluding time delay candidates that clearly do not conform to the physical propagation time and reducing the risk of peak misalignment and time delay jumps. In this embodiment, since the downstream signal has a propagation delay relative to the upstream signal, the cross-correlation is only searched for the main peak within the non-negative lag range.

[0045] S4: Extract peak quality features that characterize the reliability of the cross-correlation estimation for each time window. The peak quality features should include at least the main peak value of the cross-correlation. With decay characterization Attenuation characterization quantity The standard deviation of the downstream light intensity signal within the time window Standard deviation of upstream light intensity signal within the time window The ratio (i.e.) This is used to reflect the relative changes in the intensity of upstream and downstream signal fluctuations under wet conditions, thereby characterizing the impact of wet attenuation on the reliability of cross-correlation peak shape.

[0046] S5: Main peak value of cross-correlation based on low-humidity training data With decay characterization Robust standardization was performed, and a peak quality score was constructed. Then score the peak quality. Monotonic mapping to gate weights .

[0047] Low humidity training data from Figure 2 The experimental system shown acquires upstream and downstream light intensity signals and reference flow velocities (obtained by an ultrasonic velocimeter) synchronously under low humidity conditions. Gating parameters, including robust normalization parameters and gating scoring thresholds, are both statistically derived from the low humidity training data and remain fixed during subsequent high humidity testing to verify cross-condition generalization capability. Robust normalization parameters include the dominant cross-correlation peak value in the low humidity training data. With decay characterization The median and absolute deviation statistics.

[0048] Robust standardization uses the peak cross-correlation value in low-humidity training data. With decay characterization The median and absolute deviation statistics were scaled uniformly to reduce the impact of a small number of outlier windows on the scoring. Peak quality score The dominant peak value of the cross-correlation after robust normalization With decay characterization The peak quality score is obtained by weighting according to preset weights. It can simultaneously reflect the combined impact of "clarity of the main peak of cross-correlation" and "degree of wet attenuation" on peak position reliability.

[0049] Gating weights It is implemented using a continuously monotonic sigmoid mapping function, preferably a Logistic (Sigmoid) function, so that the compensation participation changes continuously with the peak quality: when the peak quality score A higher gating weight indicates a more reliable peak shape and a weaker attenuation effect. Take a smaller value to reduce compensation participation; when peak quality score A lower value indicates that peak shape degradation is more severe, so the gating weight should be adjusted accordingly. A larger value is chosen to increase compensation participation. Compared to on / off decision-making based on hard thresholds, this continuous mapping reduces gating jitter and output discontinuity. (When peak quality score...) When the confidence threshold (corresponding to the highly confident window) is reached or exceeded, the gating weight is not hard-closed by setting it to zero, but instead a soft-close strategy is adopted: the gating weight of this type of window is limited to no more than a preset threshold. ,and By retaining a non-zero minimum compensation participation, the risk of the compensation channel being completely shut down under wet conditions due to the fact that the peak appearance is reliable but the peak position may still be distorted can be reduced, thereby improving output continuity and robustness.

[0050] In addition, the gating scoring thresholds include , Peak quality score from low-humidity training data The quantile statistics are determined and used to divide the "more reliable region" and the "significantly deteriorated region", thereby enabling adaptive calibration of the gating parameters for different sensors, different installation conditions and different signal amplitude scales. Indicates the boundary of a more credible region. This indicates the boundary of a clearly deteriorated area.

[0051] S6: Based on attenuation characterization With wetness determination threshold When the window satisfies < When this occurs, the window is identified as a wet degradation window. A lower bound constraint is applied to the gating weights corresponding to the wet degradation window to ensure that they meet the following conditions: , A preset threshold is set to avoid insufficient compensation due to insufficient gating weight when a small number of "disaster windows" (short-term strong attenuation / strong noise causing peak shifts or time delay jumps) occur under wet conditions, which would drag down the overall error index.

[0052] wet state determination threshold The attenuation characterization from low-humidity training data and wet calibration segment The statistical measures were jointly determined, including the wet calibration data, which consisted of upstream and downstream light intensity signals and reference flow velocities (measured by an ultrasonic velocimeter) collected synchronously under high humidity conditions; several consecutive time windows were selected from the wet calibration data to form the wet calibration segment.

[0053] wet state determination threshold A preferred approach is to combine statistically representative values ​​(e.g., the median) from the low-humidity training segment and the wet-condition calibration segment to obtain the global threshold, thus taking into account the distribution differences between low-humidity and wet-condition operating conditions. Taking the median as an example, let... This represents the median of the decay representation in the low-humidity training data. If the median of the attenuation characterization quantity in the wet calibration data is taken as the median, then we can take... This allows for the formation of a stable discrimination boundary between the two types of operating conditions.

[0054] S7: Based on reference flow rate Cross-correlation reference velocity The difference residual (i.e. Using this as the learning objective, a ridge regression residual model is constructed to predict the compensation amount. .

[0055] Reference flow rate The residual label is obtained from the ultrasonic velocimeter, and the cross-correlation reference flow velocity is obtained from step S3. Therefore, the residual label is directly calculated from the synchronously acquired experimental data and no additional manual labeling is required.

[0056] The model input is a feature vector for each time window, including: cross-correlation baseline velocity, cross-correlation main peak value, and attenuation characterization, which are used to characterize the reliability of the cross-correlation peak shape and the degree of wet attenuation, thereby learning "systematic error components under specific degradation characteristics".

[0057] This embodiment uses ridge regression as the residual model, through... Regularization improves parameter stability and generalization ability under multiple feature conditions, and the model structure is simple, parameters are controllable, and it is easy to implement and calibrate in engineering. Training data can be jointly constructed from low-humidity training data and wet-state calibration data to alleviate the migration problem caused by changes in error distribution across humidity conditions. Ridge regression regularization parameters are optimally selected from a preset candidate set through cross-validation to minimize validation error. The model output compensation is adjusted accordingly. Set an amplitude limit threshold to make it fall within a preset compensation range in order to suppress output abrupt changes caused by abnormal predictions and improve the robustness of continuous measurement.

[0058] S8: Since the error amplitude distribution may differ between the training (low humidity) and testing (high humidity) sections, compensation amplitude calibration coefficients are calculated using wet calibration data to improve cross-condition adaptability. And the compensation amount is calibrated as .

[0059] Compensation Amplitude Calibration Coefficient This can be obtained by minimizing the weighted residual squared error of the wet calibration segment. The wet calibration segment is a small "calib segment" extracted from the high humidity data, on which a coefficient is adjusted. This ensures that the "compensation amount predicted by the model" in this wet data is as close as possible to the actual residual, thereby reducing the problem of under-compensation or over-compensation caused by the migration of operating conditions. High humidity data includes upstream and downstream light intensity signals and reference flow velocities synchronously collected under high humidity conditions.

[0060] S9: Output fusion flow rate This enables a window-by-window continuous output strategy that involves "cross-correlation baseline estimation - residual compensation correction - gating adaptive scheduling - applying lower bound constraints to the gating weights of the wet-state degradation window".

[0061] This invention uses physical constraint cross-correlation as the baseline estimation skeleton, implements adaptive scheduling of compensation channels with peak quality gating, and reduces the impact of extreme abnormal windows on output stability by applying lower bound constraints to the gating weights of wet degradation windows.

[0062] like Figure 2 The experimental system shown includes a gas-liquid two-phase flow generator, a transparent glass tube, two sets of optical measurement units arranged along the flow direction (upstream and downstream), and an ultrasonic velocimeter. The two sets of optical measurement units are used to collect upstream and downstream light intensity signals, while the ultrasonic velocimeter provides a reference flow velocity as a true comparison. The upstream and downstream optical measurement units are arranged coaxially along the flow direction to ensure a correlation between upstream and downstream light intensity fluctuations caused by convective propagation, thus meeting the basic premise of cross-correlation velocimetry. The transparent glass tube is used to improve optical path stability and signal repeatability. The gas-liquid two-phase flow generator is used to construct two operating conditions: low humidity and high humidity, to form a comparative data system of "low humidity training—high humidity testing."

[0063] like Figure 3 As shown, tests were conducted on combinations of different sampling frequencies (10, 20, 30, 40, 50 kHz) and different upstream and downstream distances (6, 12, 18, 24, 30 mm), and the relative speed measurement error for each combination was presented using a heatmap. Figure 3 Quantifiable results show that spacing has a significant dominant effect on error. When the spacing is 6mm and 12mm, the overall error is relatively low across all frequencies: the average error for a 6mm row is 2.908%, reaching a minimum of approximately 1.99% at 30kHz; the average error for a 12mm row is 2.532%, reaching a minimum of approximately 0.94% at 50kHz. When the spacing increases to 18mm, 24mm, and 30mm, the average error rises to 15.032%, 14.860%, and 20.752%, respectively. The 30mm spacing shows errors exceeding 21% at multiple points within the 20-50kHz range (the highest being approximately 21.63%). Frequency has a secondary effect on error, but higher frequencies are generally better. Average error by column: approximately 11.184% at 10kHz, approximately 12.604% at 20kHz, approximately 10.932% at 30kHz, approximately 12.812% at 40kHz, and the lowest at 50kHz (approximately 8.552%). This indicates that increasing the sampling frequency is beneficial for improving the time delay resolution and peak position estimation accuracy, but its benefits are still limited by the "correlation degradation caused by spacing".

[0064] When the spacing is too large, the flow structure corresponding to the upstream and downstream light intensity fluctuations undergoes morphological evolution and amplitude attenuation during propagation, resulting in the widening of the main cross-correlation peak, enhancement of side lobes, or multi-peak competition, thereby causing peak instability and peak misalignment. When the spacing is too small, although the correlation is strong, the propagation delay difference is smaller, making it more sensitive to noise and discrete delay resolution. Figure 3 The observed pattern of "6~12mm being the low error range and ≥18mm showing a significant increase in error" reflects the constraints of system parameters on the reliability of cross-correlation, providing an engineering basis for introducing peak quality gating and wet robustness mechanisms.

[0065] like Figure 4 As shown, comparing the statistical changes in cross-correlation output under low humidity (training conditions) and high humidity (testing conditions) includes two parts: (1) Changes in the distribution of cross-correlation coefficients: as shown in the figure. Figure 4 As shown in (a), under low humidity conditions, the cross-correlation coefficients are generally in a higher range and relatively concentrated (mainly falling above about 0.8), while under high humidity conditions, the cross-correlation coefficient distribution is significantly wider and low values ​​appear (there is a significant low correlation window). This phenomenon indicates that high humidity / wet conditions will reduce the synchronicity and similarity of upstream and downstream signals, and the peak shape of the cross-correlation function is more likely to degenerate. (2) Changes in cross-correlation velocity distribution: such as Figure 4 As shown in (b), under low humidity conditions, the cross-correlation velocity is closer to the reference velocity and has a smaller dispersion; under high humidity conditions, the cross-correlation velocity distribution shifts overall and the dispersion increases, resulting in more deviation windows. This is consistent with the light intensity attenuation, noise enhancement, and waveform distortion caused by humidity: the broadening of the main peak of the cross-correlation or the coexistence of multiple peaks weakens the condition that "the maximum peak corresponds to the actual propagation delay," thus causing delay jumps and increased velocity errors.

[0066] Figure 4 Statistically, it has been proven that "wet conditions reduce the reliability of cross-correlation." Therefore, using only a single threshold (such as relying solely on the cross-correlation peak value or correlation coefficient) for elimination / recalculation often fails to simultaneously meet the requirements of continuous output and accuracy.

[0067] like Figure 5 Peak quality score shown With gate weights The mapping relationship is defined, and the threshold is labeled. =-0.9363 and =-1.5164. Peak quality score. A higher gating weight indicates a clearer main peak of cross-correlation and a weaker decay effect. Reduce (lower residual compensation channel participation); peak quality score The lower the value, the more severe the peak shape degradation, and the lower the gating weight. Increase (enhance the participation of the residual compensation channel). To quantify the gating effect, statistics are collected during the training (low-humidity) phase. The percentage of windows with a value <0.2 was 79.5% (compensated suppression percentage), according to statistics from the testing (high humidity) phase. The percentage of windows with a value >0.5 was 97.7% (compensation enabled percentage). This result is consistent with... Figure 5 The consistent distribution trends shown indicate that gating can adaptively respond to wet degradation. Furthermore, no highly confident window is used. Hard shutdown with =0, while setting a lower limit (e.g.) =0.15), to reduce the risk that compensation will be completely turned off when the cross-correlation peak is high but the peak position may still be distorted by wet perturbation.

[0068] Figure 6 Attenuation characterization quantity The statistical distribution and wetness determination threshold, Figure 7 The decay characterization quantity in the high humidity test is shown. With gate weights The relationship between the wet clamping effect and the wet clamping effect. Figure 6 Provide the decay characterization parameters under low humidity (training) and high humidity (testing) conditions. The distribution differences are shown, and the wetness determination threshold is given by dashed lines. In this embodiment, the low humidity statistic... =1.0399, High Humidity Calibration Section Statistics =1.3200, the overall global decision threshold is obtained. =1.1800. Based on this threshold, the proportion of high-humidity wet windows identified is wet_teratio=0.605 (approximately 60.5% of windows are judged as wet-degraded windows). A lower bound constraint on the gating weights is applied to the windows judged as wet-degraded to ensure they meet the following conditions. This embodiment takes =0.85. The weights of the test set after clamping are as follows: (min / median) = 0.850 / 1.000, in the evaluation segment The number of windows with a value less than 0.5 is 0. Figure 7 After clamping Constrained =Above 0.85, and with most window weights close to 1, it indicates that the system enters a strong compensation mode under high humidity conditions. Clamping is mainly used to correct a few windows with abnormally low weights before clamping, thereby avoiding error amplification caused by insufficient compensation of wet windows. This phenomenon also explains the result that the gated fusion output and the residual compensation output are close in the high humidity stage.

[0069] Under wet conditions, cross-correlation may exhibit peak shifts or jumps, and such windows are highly destructive to overall indicators such as RMSE. The clamping mechanism is equivalent to a "robust protection term" for extreme risks: even if the gated score misjudges in individual windows, the lower limit constraint ensures that the compensation channel is not excessively suppressed, thereby suppressing the dominant effect of abnormal windows on the overall error at the system level.

[0070] like Figure 8 As shown, this embodiment provides a reference speed based on high humidity data. Cross-correlation reference velocity Residual compensation output and gated fusion output Window-by-window comparison. Residual compensation output. The direct output of the "compensation channel" is obtained by superimposing the cross-correlation reference velocity with the residual compensation amount after amplitude calibration; gated fusion output. Based on this, a gating weight is introduced to weight and adjust the compensation participation, that is, to achieve adaptive residual correction on the skeleton of the cross-correlation benchmark estimation. The horizontal axis represents the window number, and the vertical axis represents the flow velocity. In this embodiment, Under high humidity conditions, the results showed greater deviation and fluctuation, with significant deviations in some windows, indicating that relying solely on the cross-correlation peak delay estimation is susceptible to humidity decay and peak shape degradation. After residual learning and amplitude calibration in steps S7-S8, It can significantly approximate This indicates that there are learnable systematic components in the high humidity error; after further gated fusion in step S9, While maintaining the compensation benefits, the compensation participation is adaptively adjusted to make the output smoother and more continuous; for windows judged as wet-state deterioration, the clamping mechanism further reduces the drag effect of a small number of abnormal windows on the overall output.

[0071] This embodiment illustrates from a time series perspective that the present invention not only improves the average error index, but also enhances the continuity and stability of window-by-window output under high humidity conditions, meeting the availability requirements of online measurement scenarios.

[0072] As shown in Table 1, this embodiment compares the error metrics (RMSE, MAE) of different methods on the training set (low humidity) and the test evaluation set (high humidity Eval).

[0073] Table 1

[0074]

[0075] In this embodiment, the indicators of each method are as follows:

[0076] Cross-correlation baseline (XCORR): Training RMSE=0.1170, MAE=0.0896; Testing RMSE=0.2487, MAE=0.2291.

[0077] Ridge Regression Residual Compensation (XCORR+Residual): Training RMSE=0.0548 (a decrease of 53.16% compared to XCORR), MAE=0.0508 (a decrease of 43.30%); Testing (Eval) RMSE=0.0292 (a decrease of 88.26%), MAE=0.0239 (a decrease of 89.57%).

[0078] Gated Fusion (FUSE): Training RMSE=0.0986 (a decrease of 15.73% compared to XCORR), MAE=0.0734 (a decrease of 18.08%); Testing (Eval) RMSE=0.0326 (a decrease of 86.89%), MAE=0.0264 (a decrease of 88.48%).

[0079] The training configuration in this embodiment is as follows: the regularization parameter is selected from the candidate set through cross-validation, and Lambda=0.03 is finally selected; the compensation amplitude calibration coefficient is obtained by wet calibration. =0.9802. The number of evaluation windows is 32, of which 11 are calibration windows.

[0080] The results show that residual compensation significantly reduces the error on the high-humidity Eval, indicating that the wet-state error contains a modelable systematic component. Gated fusion is close to residual compensation on Eval because the wet-state window accounts for a higher proportion in this embodiment, and the clamping mechanism increases the compensation participation in the high-humidity segment, thus maintaining the compensation benefit. Meanwhile, the contribution of the gating mechanism is mainly reflected in the following aspects:

[0081] (i) In the low-humidity training phase, the confidence window is suppressed to suppress overcompensation, making the model output more conservative and reducing the risk of overfitting;

[0082] (ii) Reduce the significant impact of a small number of abnormal windows on the overall index by clamping constraints in the wet state determination window;

[0083] (iii) Continuous gating is used to compensate for smooth changes in participation and improve the continuity of window-by-window output.

[0084] Therefore, gating and clamping are not just used to improve a single error metric, but to simultaneously improve interpretability, robustness and continuous availability in cross-condition measurements.

Claims

1. A method for measuring the velocity of gas-liquid two-phase flow based on peak quality gating and residual compensation using optical cross-correlation, characterized in that, include: S1: Acquire upstream and downstream optical intensity signals, and divide the two optical intensity signals into preset time windows. Windowing is used to obtain the upstream and downstream light intensity signals for each time window; S2: Denoise and standardize the upstream and downstream light intensity signals within each time window to obtain a standardized signal sequence; S3: Calculate the cross-correlation function between normalized signals for each time window, and based on the sensor spacing... and preset speed range Construct a physically feasible time-delay search interval; Within the time delay search interval, the main peak of cross-correlation is determined and the time delay estimate is obtained. Calculate the cross-correlation reference velocity ; S4: Extract peak quality features that characterize the reliability of the cross-correlation estimation for each time window. The peak quality features should include at least the main peak value of the cross-correlation. With decay characterization Attenuation characterization quantity The standard deviation of the downstream light intensity signal within the time window Standard deviation of upstream light intensity signal within the time window The ratio; S5: Main peak value of cross-correlation based on low-humidity training data With decay characterization Robust standardization was performed, and a peak quality score was constructed. Then score the peak quality. Monotonic mapping to gate weights The low-humidity training data includes upstream and downstream optical intensity signals and reference flow velocities collected synchronously under low-humidity conditions. S6: Based on attenuation characterization With wetness determination threshold When the window satisfies < When this occurs, the window is identified as a wet-state degradation window; a lower bound constraint is applied to the gating weight corresponding to the wet-state degradation window to ensure that it meets the following conditions. , The preset threshold; S7: Based on reference flow rate Cross-correlation reference velocity Using the difference residuals as the learning objective, a ridge regression residual model is constructed to predict the compensation amount. ; S8: Calculate the compensation amplitude calibration coefficient using wet calibration data. And the compensation amount is calibrated as The wet calibration data includes upstream and downstream light intensity signals and reference flow velocities collected synchronously under high humidity conditions. S9: Output fusion flow rate .

2. The method for measuring the optical cross-correlation velocity of gas-liquid two-phase flow based on peak quality gating and residual compensation according to claim 1, characterized in that, In step S1, the sensor spacing Configuration is 6-30mm, sampling frequency Configured to 10–50 kHz, adjacent time windows are divided into non-overlapping or overlapping windows with a set overlap rate.

3. The method for measuring the optical cross-correlation velocity of gas-liquid two-phase flow based on peak quality gating and residual compensation according to claim 1, characterized in that, In step S2, wavelet denoising is used for denoising and Z-score normalization is used for normalization.

4. The method for measuring the optical cross-correlation velocity of gas-liquid two-phase flow based on peak quality gating and residual compensation according to claim 1, characterized in that, In step S3, subsampling interpolation is performed on the time delay estimates corresponding to the main cross-correlation peaks to improve the accuracy of time delay estimation.

5. The method for measuring the optical cross-correlation velocity of gas-liquid two-phase flow based on peak quality gating and residual compensation according to claim 1, characterized in that, In step S5, robust normalization uses the dominant peak value of cross-correlation in the low-humidity training data. With decay characterization The median and absolute deviation statistics were scaled uniformly to reduce the impact of a small number of outlier windows on the scoring; peak quality scoring The dominant peak value of the cross-correlation after robust normalization With decay characterization Obtained by weighting according to preset weights; gate weights It employs a continuously monotonic sigmoid mapping function; the gating parameters include robust normalization parameters and gating scoring thresholds. The robust normalization parameters include the dominant peak value of cross-correlation in the low-humidity training data. With decay characterization The median and absolute deviation statistics; the gating scoring threshold is determined by the peak quality score in the low-humidity training data. The quantile statistics are determined and used to divide the "more reliable region" and the "significantly deteriorated region" to achieve adaptive calibration of the gating parameters for different sensors, different installation conditions and different signal amplitude scales.

6. The method for measuring the optical cross-correlation velocity of gas-liquid two-phase flow based on peak quality gating and residual compensation according to claim 1, characterized in that, In step S5, when the peak quality score is... When a time window reaches or exceeds a trusted threshold, the gating weight adopts a soft-close strategy: the gating weight of this type of window is limited to no more than a preset threshold. ,and .

7. The method for measuring the optical cross-correlation velocity of gas-liquid two-phase flow based on peak quality gating and residual compensation according to claim 1, characterized in that, In step S6, the wetness determination threshold is... The attenuation characterization of low-humidity training data and wet calibration segment The statistical measures are jointly determined, and several consecutive time windows are selected from the wet calibration data to form a wet calibration segment.

8. The method for measuring the optical cross-correlation velocity of gas-liquid two-phase flow based on peak quality gating and residual compensation according to claim 7, characterized in that, make This represents the median of the decay representation in the low-humidity training data. If the median of the attenuation characterization quantity in the wet calibration data is taken, then take... .

9. The method for measuring the optical cross-correlation velocity of gas-liquid two-phase flow based on peak quality gating and residual compensation according to claim 1, characterized in that, In step S7, the regularization parameters of the ridge regression residual model are selected from a preset candidate set through cross-validation to minimize the validation error; the compensation amount of the model output is adjusted. Set an amplitude limit threshold to make it fall within a preset compensation range in order to suppress output abrupt changes caused by abnormal predictions.

10. The method for measuring the optical cross-correlation velocity of gas-liquid two-phase flow based on peak quality gating and residual compensation according to claim 1, characterized in that, In step S8, the compensation amplitude calibration coefficient The error is obtained by minimizing the weighted residual squared error of the wet calibration segment. The minimized wet calibration segment is a small "calibration window" drawn out separately from the high humidity data, so that the "compensation amount predicted by the model" is as close as possible to the actual residual in this wet data segment. The high humidity data includes upstream and downstream light intensity signals and reference flow velocity collected synchronously under high humidity conditions.