A downhole gas channeling detection system and method based on three-phase monitoring and component monitoring

CN122774068BActive Publication Date: 2026-10-27陕西鑫联仪器仪表有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611272339.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-08-21
Publication Date
2026-10-27
Estimated Expiration
2046-08-21

AI Technical Summary

Technical Problem

[0005]本申请实施例提供了一种基于三相监测和组分监测的井下气窜检测系统及方法,用以解决现有技术只能实现气窜定性检测的问题

Benefits of technology

第一,实现地面检测从定性判断到定量定位的升级。系统可输出气窜的最优深度值、置信深度区间和所属生产层位与气窜强度数值,将原有地面检测仅能判断有无气窜的定性能力,升级为可明确气窜位置与窜气量的定量输出,可直接为分层堵调、分层配产等气窜治理措施提供数据依据,指导堵剂用量与注入层位的确定,减少无效堵调作业,提升治理效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122774068B_ABST
    Figure CN122774068B_ABST
Patent Text Reader

Abstract

The application discloses a downhole gas channeling detection system and method based on three-phase monitoring and component monitoring, and belongs to the technical field of CO2 drive exploitation and gathering and transportation monitoring of oil and gas fields. The system adopts a ground three-phase metering device and a gas component analysis device, actively excites pressure through a wellhead regulating valve, collects dynamic response data of three-phase flow parameters and gas component parameters, simultaneously constructs a similar well gas channeling response sample library, generates a target well exclusive prior model through migration learning, adopts a Bayesian inversion framework to fuse three-phase hydrodynamic constraints and component tracing constraints, and inversely obtains a gas channeling depth interval and channeling gas intensity. The application does not need to add downhole monitoring equipment, can realize quantitative positioning of gas channeling on the basis of existing ground hardware, reduces detection cost, and is suitable for the gas channeling control demand of large-scale CO2 drive development.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of CO2 (carbon dioxide) drive-out, acquisition, and monitoring technology in oil and gas fields, and in particular to the technology of locating downhole gas channeling using the results of three-phase monitoring and component monitoring. Background Technology

[0002] my country has a high proportion of low-permeability oil and gas reserves, but the reservoirs are characterized by poor physical properties and strong heterogeneity. Conventional waterflooding development methods generally result in low recovery rates, failing to meet the demands for efficient development. CO2 flooding technology, as a core technology for improving the recovery rate of low-permeability oil reservoirs, has the dual function of enhancing recovery and carbon sequestration, and has been applied on a large scale in several low-permeability oilfields in China. During CO2 flooding development, gas channeling occurs frequently due to geological conditions such as reservoir planar and vertical heterogeneity and the development of natural fractures. Injected CO2 rapidly enters production wells along high-permeability bands and fractures, significantly reducing displacement sweep volume and oil and gas recovery. It also exacerbates CO2 corrosion rates in wellbores and surface pipelines, leading to pressure fluctuations in the gathering and transportation system and increased safety risks. Therefore, gas channeling detection is a core aspect of CO2 flooding development management.

[0003] Current gas channeling detection technologies are mainly divided into two categories: downhole detection and surface detection. Downhole detection technologies, represented by distributed fiber optic sensing and production profile logging, can achieve meter-level accuracy in locating and monitoring the intensity of gas channeling. However, these technologies require the deployment of sensors or the insertion of testing instruments in conjunction with downhole operations, resulting in high deployment and testing costs, complex operational procedures, and the need for short-term production shutdowns in some testing scenarios. Therefore, they can only be applied on a small scale in key wells and pilot test areas, failing to cover all CO2-driven production wells and thus unable to meet the control requirements of large-scale development. Surface detection technologies, centered on three-phase metering devices and gas component analysis devices, monitor parameters such as the gas-liquid ratio, water cut, and CO2 volume concentration of the produced fluid at the wellhead. Based on threshold values, they determine whether gas channeling has occurred. These technologies have low deployment costs, can operate continuously for extended periods without affecting normal production, and are currently the most widely used gas channeling detection method in oilfields.

[0004] However, existing surface monitoring technologies can only achieve qualitative detection, that is, determine whether gas channeling has occurred, but cannot obtain quantitative location results. After CO2 enters the wellbore from the formation, it mixes thoroughly with crude oil, associated gas, and formation water during the fluid lift process. Surface monitoring equipment collects fluid parameters after mixing throughout the well section, and cannot distinguish which production layer the gas channeling originated from, nor can it quantitatively calculate the amount and intensity of CO2 entering the formation. This qualitative detection result, which only knows that the gas is present but not its location, cannot support precise gas channeling control measures such as stratified plugging and stratified production allocation. On-site plugging and control operations are often highly arbitrary, with unstable control effects and high implementation costs. Summary of the Invention

[0005] This application provides a downhole gas channeling detection system and method based on three-phase monitoring and component monitoring, which solves the problem that the prior art can only achieve qualitative detection of gas channeling.

[0006] On the one hand, embodiments of this application provide a downhole gas channeling detection system based on three-phase monitoring and component monitoring, including a pressure regulating execution unit, a three-phase metering unit, a gas component monitoring unit, and a data acquisition and control unit; The pressure regulating actuator includes a pressure reducing throttle valve and a self-regulating valve. The pressure regulating actuator is connected to the wellhead gathering and transportation pipeline and is used to regulate the wellhead back pressure. The three-phase metering unit includes a gas-liquid separator, a high-humidity gas flow meter, a mass-volume analyzer, a water-cut analyzer, and a density analyzer. The three-phase metering unit is connected to the wellhead production pipeline and is used to separate the gas and liquid phases and measure the gas production, total liquid volume, water cut, and crude oil density. The gas component monitoring unit is connected to the three-phase metering unit through the gas phase outlet pipeline and is used to detect the CO2 volume concentration in the gas phase. The data acquisition and control unit is electrically connected to the pressure regulating unit, the three-phase metering unit, and the gas component monitoring unit, respectively. The data acquisition and control unit is used to perform the following operations: The pressure regulating actuator adjusts the valve opening to apply controllable pressure excitation disturbance to the wellbore; During the pressure excitation process, the output data of the three-phase metering unit and the gas component monitoring unit are collected simultaneously. Extract the steady-state characteristics of three-phase flow, the dynamic characteristics of three-phase flow, the steady-state characteristics of gas components, and the dynamic characteristics of gas components from the collected output data; The pre-trained benchmark prediction model and similar well gas channeling response sample library are retrieved, and after adaptation to the target well domain, a target well-specific prediction model is generated. The extracted features are input to obtain the prior probability distribution of gas channeling depth. By calling the wellbore multiphase flow model and the gas phase transport model, the simulated response data corresponding to different gas channeling depths and gas channeling intensities are calculated, and the likelihood function is generated by combining the measured data. By integrating prior probability distribution and likelihood function, and using an optimization algorithm to solve for the combination of gas channeling depth and gas channeling intensity with the highest posterior probability, the gas channeling localization and quantitative results are output.

[0007] On the other hand, embodiments of this application also provide a downhole gas channeling detection method based on three-phase monitoring and component monitoring, including: Connect the pressure regulating actuator to the wellhead gathering and transmission pipeline to regulate the wellhead back pressure; The three-phase metering unit is connected to the wellhead production pipeline to separate the gas and liquid phases and measure the gas production, total liquid volume, water cut and crude oil density. The gas component monitoring unit is connected to the three-phase metering unit through the gas phase outlet pipeline to detect the CO2 volume concentration in the gas phase. The pressure regulating actuator adjusts the valve opening to apply controllable pressure excitation disturbance to the wellbore; During the pressure excitation process, the output data of the three-phase metering unit and the gas component monitoring unit are collected simultaneously. Extract the steady-state characteristics of three-phase flow, the dynamic characteristics of three-phase flow, the steady-state characteristics of gas components, and the dynamic characteristics of gas components from the collected output data; The pre-trained benchmark prediction model and similar well gas channeling response sample library are retrieved, and after adaptation to the target well domain, a target well-specific prediction model is generated. The extracted features are input to obtain the prior probability distribution of gas channeling depth. By calling the wellbore multiphase flow model and the gas phase transport model, the simulated response data corresponding to different gas channeling depths and gas channeling intensities are calculated, and the likelihood function is generated by combining the measured data. By integrating prior probability distribution and likelihood function, and using an optimization algorithm to solve for the combination of gas channeling depth and gas channeling intensity with the highest posterior probability, the gas channeling localization and quantitative results are output.

[0008] The downhole gas channeling detection system and method based on three-phase monitoring and component monitoring disclosed in this application have the following advantages: First, it upgrades ground-based detection from qualitative judgment to quantitative location. The system can output the optimal depth value, confidence depth range, and corresponding production layer and gas channeling intensity value for gas channeling. This upgrades the original qualitative ability of ground-based detection, which could only determine whether gas channeling exists, to a quantitative output that can clearly identify the location and amount of gas channeling. It can directly provide data support for gas channeling control measures such as stratified plugging and stratified production, guide the determination of plugging agent dosage and injection layer, reduce ineffective plugging operations, and improve control efficiency.

[0009] Second, multi-parameter joint constraints improve the accuracy of the inversion results. The system simultaneously uses three-phase flow parameters to construct hydrodynamic constraints and gas composition parameters to construct tracer constraints. The dual-dimensional fitting compresses the inversion solution space, reducing the inherent multiple solutions in pure mechanistic model inversion, and ultimately achieving a higher positioning accuracy than single-parameter ground inversion methods.

[0010] Third, the system addresses the issue of insufficient calibration data for single wells through transfer learning from similar wells. The system builds a sample library based on validated gas channeling data from similar wells within the same block, transferring validated general gas channeling response patterns to target wells. This allows for the generation of usable prediction models without requiring a large amount of calibration data from the target wells, meeting the rapid deployment needs of newly commissioned wells and lowering the data threshold for model training in single wells.

[0011] Fourth, the system balances positioning and detection accuracy with production continuity. It features two pressure excitation modes: a step excitation mode enables periodic high-precision positioning and detection, meeting the data requirements for monthly and quarterly gas channeling control operations; and a small-fluctuation excitation mode allows for daily online monitoring with minimal impact on well production, tracking gas channeling trends and flexibly switching operating modes according to on-site production plans. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 This is a schematic diagram of the composition of a downhole gas channeling detection system based on three-phase monitoring and component monitoring, provided in an embodiment of this application. Detailed Implementation

[0014] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0015] Figure 1 This is a schematic diagram illustrating the composition of a downhole gas channeling detection system based on three-phase monitoring and component monitoring, provided in an embodiment of this application. The system includes a pressure regulating unit, a three-phase metering unit, a gas component monitoring unit, and a data acquisition and control unit. The pressure regulating actuator includes a pressure reducing throttle valve and a self-regulating valve. The pressure regulating actuator is connected to the wellhead gathering and transportation pipeline and is used to regulate the wellhead back pressure. The three-phase metering unit includes a gas-liquid separator, a high-humidity gas flow meter, a mass-volume analyzer, a water-cut analyzer, and a density analyzer. The three-phase metering unit is connected to the wellhead production pipeline and is used to separate the gas and liquid phases and measure the gas production, total liquid volume, water cut, and crude oil density. The gas component monitoring unit is connected to the three-phase metering unit through the gas phase outlet pipeline and is used to detect the CO2 volume concentration in the gas phase. The data acquisition and control unit is electrically connected to the pressure regulating unit, the three-phase metering unit, and the gas component monitoring unit, respectively. The data acquisition and control unit is used to perform the following operations: The pressure regulating actuator adjusts the valve opening to apply controllable pressure excitation disturbance to the wellbore; During the pressure excitation process, the output data of the three-phase metering unit and the gas component monitoring unit are collected simultaneously. Extract the steady-state characteristics of three-phase flow, the dynamic characteristics of three-phase flow, the steady-state characteristics of gas components, and the dynamic characteristics of gas components from the collected output data; The pre-trained benchmark prediction model and similar well gas channeling response sample library are retrieved, and after adaptation to the target well domain, a target well-specific prediction model is generated. The extracted features are input to obtain the prior probability distribution of gas channeling depth. By calling the wellbore multiphase flow model and the gas phase transport model, the simulated response data corresponding to different gas channeling depths and gas channeling intensities are calculated, and the likelihood function is generated by combining the measured data. By integrating prior probability distribution and likelihood function, and using an optimization algorithm to solve for the combination of gas channeling depth and gas channeling intensity with the highest posterior probability, the gas channeling localization and quantitative results are output.

[0016] For example, the pressure regulating actuator is connected to the main gathering and transportation pipeline between the wellhead oil production outlet and the three-phase metering unit. It consists of a pressure-reducing throttle valve and a self-regulating valve connected in series. The diameters of both types of valves match the diameter of the wellhead gathering and transportation pipeline. The valve bodies are made of 316L stainless steel, which is resistant to CO2 corrosion and suitable for the corrosive environment of the CO2-driven produced fluid. The pressure-reducing throttle valve is used for coarse adjustment of the wellhead back pressure and undertakes the main pressure drop regulation function; the self-regulating valve is used for fine pressure regulation and steady-state pressure stabilization, and cooperates in performing active pressure excitation actions. Both types of valves are equipped with electric actuators, which are electrically connected to the data acquisition and control unit through control cables to receive opening control commands and provide feedback on real-time opening values.

[0017] The function of the pressure regulating unit is to apply controllable pressure disturbances to the wellbore by changing the wellhead back pressure, causing differentiated gas production responses at gas channeling inlets at different depths, thus providing input excitation for subsequent gas channeling localization. The fluid pressure at the gas channeling inlet is balanced with the formation pressure at the corresponding depth. When the wellhead back pressure increases, the pressure profile across the entire wellbore rises synchronously, the production pressure differential at the gas channeling inlet decreases, and the amount of CO2 gas entering the wellbore from the formation decreases accordingly. When the wellhead back pressure decreases, the production pressure differential at the gas channeling inlet increases, and the amount of gas channeling increases accordingly. Because the fluid propagation path length between the gas channeling inlet and the wellhead varies at different depths, there is a time difference in the transmission of pressure disturbances. This ultimately manifests as differences in the response lag time and variation amplitude in the surface monitoring parameters, which serve as the basis for gas channeling depth inversion.

[0018] The pressure regulating unit supports two pressure excitation modes, switched and controlled by the data acquisition and control unit. The first mode is a step-type backpressure excitation mode, used for periodic high-precision positioning tests. Before the test, the data acquisition and control unit confirms that the well is in a continuous and stable production state for at least 2 hours. After the test starts, the data acquisition and control unit outputs an opening command to the self-regulating valve, completing the opening adjustment within 10 seconds, causing a step increase in wellhead backpressure of 5% to 10% of the steady-state backpressure. During the step increase, the wellhead backpressure is monitored in real time to ensure a smooth pressure transition without shock. After reaching the target pressure, the valve opening is kept constant, maintaining this backpressure state until the wellbore flow reaches a new steady state. The steady-state determination criterion is that within 5 consecutive minutes, the fluctuation range of wellhead backpressure, fluid production, and gas production does not exceed 1% of the corresponding steady-state value. The steady-state maintenance time is controlled between 30 and 60 minutes to ensure the complete and measurable dynamic response process. After the test, the control unit linearly adjusts the valve opening within 10 minutes to gradually restore the original production pressure system, avoiding the impact of sudden pressure changes on the wellbore string and downhole equipment.

[0019] The second type is a small-amplitude periodic fluctuation excitation mode, used for daily online continuous monitoring. The data acquisition and control unit outputs periodic opening commands to the self-regulating valve, causing the wellhead back pressure to fluctuate within ±2% of the steady-state back pressure. The fluctuation period is set to 10-15 minutes, and each cycle includes four stages: pressure increase, pressure stabilization, pressure decrease, and pressure stabilization, with each stage lasting for an equal duration. In this mode, the pressure fluctuation amplitude is small, and the impact on the well's production is negligible. It will not interfere with normal production operations and can be run for 2-4 hours daily at set times, or continuously at low intensity as needed to track the dynamic changes in the location and intensity of gas channeling.

[0020] Meanwhile, the pressure regulating actuator is equipped with a triple production safety constraint mechanism, which is triggered in real time by the data acquisition and control unit. The first constraint is the upper limit of pressure, meaning that the wellhead back pressure must not exceed 80% of the rated safe pressure of the tubing. If the pressure exceeds the threshold, the current excitation action is immediately terminated, and the regulating valve is fully opened to restore the normal production pressure. The second constraint is the production fluctuation constraint, meaning that if the fluctuation of the production volume exceeds 15% of the steady-state value, the excitation amplitude is immediately reduced and the test is terminated, gradually restoring the original system. The third constraint is the abnormal operating condition constraint, meaning that if signs of increased gas channeling, such as a sudden increase in CO2 concentration or abnormal pressure fluctuations, are detected, the test is immediately terminated and an alarm is triggered, restoring the system to a safe production state.

[0021] The three-phase metering unit is connected to the wellhead production pipeline downstream of the pressure regulating unit. Its inlet is connected to the mixed oil, gas, and water transport medium produced from the wellhead, completing the gas-liquid two-phase separation and independent metering of each phase parameter. It is the sole source of three-phase monitoring data for the system. The main unit consists of a gas-liquid separator, a high-humidity gas flow meter, a mass-volume analyzer, a water-cut analyzer, and a density analyzer connected in series according to the fluid flow direction. All flow-through components are made of CO2-resistant materials, suitable for long-term operation under CO2-driven production fluid conditions. All instruments within the unit are connected to the data acquisition and control unit via signal cables, uploading measurement data in real time.

[0022] The gas-liquid separation unit adopts a vertical rotating gravity separator structure and is the core separation equipment of the three-phase metering unit. The separator cylinder is vertically arranged, and the mixed medium enters tangentially from the inlet in the lower part of the cylinder. Natural separation of the gas and liquid phases is achieved by gravity: the less dense gas phase flows upward, and after being defoamed by a screen at the top of the cylinder to remove entrained droplets, it flows out from the top gas phase outlet and enters the gas phase metering branch; the denser liquid phase settles downward, accumulating in the liquid phase chamber at the bottom of the separator. After being stabilized by a level regulating valve, it flows out from the bottom liquid phase outlet and enters the liquid phase metering branch. The separator is designed with a safety margin of 1.5 times the highest back pressure at the wellhead. Internal level and pressure monitoring points ensure stable operation of the separation process, with a gas-liquid separation efficiency of no less than 95%, providing a foundation for accurate measurement of subsequent single-phase parameters.

[0023] In the embodiments of this application, the unit body also includes a filter. The filter is installed on the liquid phase outlet pipeline of the gas-liquid separation device, adopts a basket filter structure, has a filtration accuracy of 80 mesh, and the filter element material is corrosion-resistant stainless steel. Its function is to filter out solid particles such as formation sand, corrosion products, and mechanical impurities carried in the liquid phase fluid, preventing downstream water content analysis devices and density analysis devices from being worn or clogged by impurities, thus ensuring the measurement accuracy and service life of precision instruments. The filter is equipped with a differential pressure monitoring point. When the inlet and outlet pressure difference exceeds a set threshold, it prompts maintenance personnel to clean or replace the filter element. Routine maintenance can be completed without stopping production.

[0024] A high-humidity gas flow meter is installed on the gas phase outlet pipeline of the gas-liquid separator to measure the gas volumetric flow rate under standard operating conditions. The flow meter utilizes the fluid vortex precession effect to achieve flow measurement, with a measurement accuracy of no less than 1.0 class. Its range covers the entire range of normal gas production and significant gas production after gas channeling in oil wells. The flow meter has a built-in temperature and pressure compensation module, which can automatically convert the gas volumetric flow rate under operating conditions to the volumetric flow rate under standard conditions, outputting instantaneous and cumulative gas production data. The measurement results of this instrument are the basis for calculating the gas-liquid ratio and determining the degree of gas channeling, and are also key boundary parameters for subsequent wellbore multiphase flow model calculations.

[0025] The mass-volume analyzer is installed on the main liquid phase pipeline downstream of the filter. It adopts the Coriolis mass measurement principle and can simultaneously detect the mass flow rate and volume flow rate of the liquid phase. The measurement accuracy is not less than 0.2 grade. It is used to measure the total volume flow rate and cumulative total liquid volume of the liquid phase. Its output instantaneous volume flow rate is the liquid production parameter, which is the basic flow rate basis for subsequent calculation of water content, oil production, and water production.

[0026] The water content analysis device is installed on the liquid phase pipeline downstream of the mass volume analyzer. It employs the radio frequency capacitance method, with the probe directly contacting the liquid phase fluid to detect the difference in dielectric constant in real time. The water content is calculated as the proportion of water in the total liquid volume, with a measurement accuracy of no less than ±2%. The water content parameter directly reflects the composition ratio of the liquid phase within the wellbore. After gas channeling occurs, the upward flow of gas alters the liquid holdup and droplet aggregation state within the wellbore. The impact of gas channeling at different depths on the water content measured at the surface varies; therefore, water content is a crucial hydrodynamic characteristic parameter for determining the depth of gas channeling.

[0027] The density analysis device is installed on the liquid phase pipeline downstream of the water content analysis device. It employs a vibrating tube density meter structure, with the measuring element being the vibrating tube. By detecting changes in the natural vibration frequency of the tube, the density value of the fluid inside the tube is calculated, with a measurement accuracy of no less than 0.5 kg / m³. This instrument measures the density of degassed crude oil, indirectly reflecting the degree of dissolved gas escape from the crude oil. CO2 has a certain solubility in crude oil; when CO2 escapes from the formation and rises along the wellbore, it disrupts the dissolved gas balance of the crude oil, causing dissolved gas to escape and altering the crude oil density. Different gas channeling depths result in different contact times between the gas phase and crude oil, leading to variations in the degree of dissolved gas escape, ultimately reflected in the change pattern of crude oil density at the surface. Therefore, crude oil density is a supplementary characteristic parameter for assisting in the inversion of gas channeling depth.

[0028] Data acquisition by the three-phase metering unit is uniformly controlled by the data acquisition and control unit, with two sampling frequencies set. In normal production monitoring mode, all parameters are sampled at the minute level with a sampling interval of 1 minute, used for daily gas leakage identification and steady-state operation monitoring. When an active excitation positioning test is triggered, the unit automatically switches to high-frequency sampling mode, with a sampling frequency of no less than 1 time / second, which is synchronized with the excitation action of the pressure regulating execution unit to fully capture the entire dynamic response process of the three-phase parameters under pressure disturbance.

[0029] The collected raw data needs to be preprocessed before being used for subsequent calculations. The preprocessing process includes three steps. The first step is outlier removal, which uses the 3σ criterion to identify outlier data points parameter by parameter: For a segment of time series data, the arithmetic mean and standard deviation σ of the entire segment are calculated. Each data point is iterated over, and if the absolute value of the difference between the data point and the mean exceeds three times the standard deviation, it is determined to be an outlier. A single outlier is replaced by linear interpolation of the two adjacent normal data points, and consecutive outlier segments are filled point by point by linear interpolation of the first and last normal data points. The second step is smoothing filtering, which uses a 5-point moving average method to denoise the time series data: For each data point, the arithmetic mean of itself and the two adjacent data points is taken as the smoothed value. The first and last two data points of the sequence remain unchanged. This processing can eliminate high-frequency random noise from the instrument while preserving the overall trend of the dynamic response and will not cause a significant shift in the response lag time. The third step is time alignment. Taking the moment of the step change in wellhead back pressure as the time zero point, the time series data of all three-phase parameters are aligned to the same time axis to eliminate the sampling delay differences of different instruments and ensure that the time base for subsequent feature calculations is consistent.

[0030] The monitoring parameters ultimately output by the three-phase metering unit include instantaneous gas production, instantaneous liquid production, gas-liquid ratio, water cut, crude oil density, liquid phase temperature, total cumulative gas phase output, total cumulative liquid phase output, total cumulative oil output, and total cumulative water output. All parameters are stored synchronously with timestamps, providing complete hydrodynamic dimension data for subsequent feature extraction, model prediction, and inversion calculations. The total cumulative gas phase output is obtained from a high-humidity gas flow meter, the total cumulative liquid phase output is obtained from a mass-volume analyzer, and the total cumulative oil output and total cumulative water output are calculated by combining the total cumulative liquid phase output with real-time water cut.

[0031] The sampling pipeline of the gas component monitoring unit is connected to the gas phase outlet branch of the three-phase metering unit, located downstream of the high-humidity gas flow meter. A small amount of gas sample is diverted from the main gas phase pipeline into the analyzer. After component detection, the gas being measured can be vented or recirculated as needed, without affecting the normal gas phase metering and collection of the main pipeline. The main unit adopts an online gas component analyzer based on the principle of non-dispersive infrared spectroscopy, equipped with a sampling, filtering, and drying module and a signal transmission module. All pipelines and components in contact with the gas are made of CO2-resistant 316L stainless steel and polytetrafluoroethylene, suitable for long-term continuous operation of CO2-driven gas. The signal output of the analyzer is connected to the data acquisition and control unit via a shielded signal cable for real-time uploading of component concentration measurement data.

[0032] The sampling, filtering, and drying module is located at the air inlet of the analysis unit and consists of two stages of precision filters connected in series with a drying tube. The first stage filter uses a porous ceramic filter element with a filtration accuracy of 5 microns, removing tiny condensate droplets and formation solid impurities carried in the gas sample to avoid contaminating the optical detection chamber. The second stage is a molecular sieve drying tube that removes saturated water vapor from the gas sample, preventing cross-interference from water vapor in infrared spectral absorption detection and ensuring the accuracy of CO2 concentration measurement. Differential pressure monitoring points are provided at the module's inlet and outlet. When the differential pressure exceeds a set threshold, a replacement prompt is automatically issued. During operation and maintenance, the filter element and drying packing can be replaced online without stopping gas supply or production, thus not affecting normal oil well production.

[0033] The gas composition analyzer can simultaneously detect the volume concentrations of three components in the gas phase: CO2, methane, and ethane. CO2 volume concentration is the core detection indicator, with a measurement range covering 0–100% and an accuracy of at least ±0.5% of full scale. The instrument's response time (T90) is no greater than 10 seconds, enabling rapid tracking of dynamic changes in gas phase components and meeting the detection requirements for high-frequency dynamic response under active pressure excitation. Methane and ethane are auxiliary detection indicators used to calibrate the compositional baseline of primary associated gas in the formation, helping to distinguish between the increase in primary associated gas in produced gas and injected CO2, eliminating interference from non-gas channeling factors such as formation energy fluctuations and increased primary desorbed gas, and improving the accuracy of gas channeling identification.

[0034] The gas composition monitoring unit is the core tracer data source for the system to achieve gas channeling identification and location. CO2 is an artificially injected displacement medium. Under normal, non-channeling conditions, the proportion of CO2 in the primary associated gas in the formation is extremely low. Therefore, the continuous increase in the volume concentration of CO2 in the gas phase is the most direct basis for determining the occurrence of gas channeling. During active excitation and location, when the wellhead back pressure increases stepwise, the production pressure differential at the gas channeling inlet decreases, and the amount of CO2 gas channeled into the wellbore from the formation decreases accordingly. This change will be transmitted upward with the gas phase flow in the wellbore, and will eventually be reflected in the decrease of CO2 concentration at the surface. The time it takes for this change to be transmitted to the surface varies depending on the depth of the gas channeling inlet, and the rate of concentration change also varies. In shallow gas channeling, the gas phase migration path is short, the concentration response lag time is short, and the rate of increase or decrease is fast; in deep gas channeling, the gas phase migration path is long, and it is fully mixed and diluted with the primary gas phase in the wellbore along the way, resulting in a long concentration response lag time and a slow rate of change. The tracer characteristics of this component are not affected by the liquid phase flow state and water content fluctuations. It forms an independent and complementary two-dimensional constraint with the hydrodynamic characteristics provided by the three-phase metering unit, which can effectively reduce the inherent multiple solutions in the inversion of pure mechanism models and improve the inversion accuracy.

[0035] The data acquisition of the gas component monitoring unit is fully synchronized with the three-phase metering unit, and is uniformly triggered and controlled by the data acquisition and control unit. In normal production monitoring mode, a minute-level sampling interval is used to monitor the steady-state change trend of CO2 concentration in real time, serving as an early warning system for daily gas leakage. When the active excitation positioning test is initiated, the gas component monitoring unit and the three-phase metering unit synchronously switch to high-frequency sampling mode, with a sampling frequency of no less than 1 time / second, completely recording the dynamic change curve of CO2 concentration throughout the pressure excitation process, providing a high-density, high-temporal-resolution data source for subsequent dynamic feature extraction.

[0036] The acquired component time-series data and the three-phase metrology data underwent a unified preprocessing procedure. First, the 3σ criterion was used to identify and remove outliers caused by instrument jumps and electromagnetic signal interference. For a single outlier, linear interpolation of two adjacent normal data points was used to replace it, and for consecutive outlier segments, linear interpolation of the first and last normal data points was used to fill them point by point. Next, a 5-point moving average filter was used to remove high-frequency random noise from the instruments, preserving the overall trend of concentration changes without causing significant lag or offset at the start of the response. Finally, the moment of step change in wellhead back pressure was used as the unified time zero point to complete the time alignment of the component data, ensuring that the component data and the three-phase metrology data were on a completely consistent time reference, thus guaranteeing the time synchronization of subsequent multi-parameter joint calculations.

[0037] After timing alignment is completed, the module synchronously calculates four types of cumulative flow parameters: the total cumulative gas phase and total cumulative liquid phase are the instrument's native cumulative values, without moving average filtering. Anomaly correction and monotonicity verification are performed using the incremental difference method, and timing alignment is then completed synchronously. The total cumulative oil phase and total cumulative water phase are calculated from the pre-processed total cumulative liquid phase combined with real-time water content, and monotonicity verification is performed after the calculation. All cumulative parameters are synchronously stored in the local database along with the instantaneous parameters.

[0038] The gas component monitoring unit ultimately outputs monitoring parameters including CO2 volume concentration, methane volume concentration, and ethane volume concentration, all of which are stored with a synchronization timestamp. Among these, the steady-state value, response lag time, and rate of change of CO2 concentration are the core component dimension parameters for the transfer learning model's feature input and likelihood function fitting calculation.

[0039] The hardware carrier of the data acquisition and control unit is an industrial-grade station control computer, installed in the wellhead station control cabinet. It is connected to the electric valves of the pressure regulating actuator, various metering instruments (including mass and volume analysis devices) of the three-phase metering unit, and the analysis device of the gas composition monitoring unit via shielded control and signal cables. It serves as the control center and data processing core of the entire system. The unit has multiple built-in functional modules, capable of independently performing active excitation control, data acquisition and storage, feature extraction, model calculation, inversion calculation, and result output. It can automatically perform positioning tests and daily monitoring tasks without manual intervention. The unit is equipped with a local storage hard drive, a cloud data interface, and an RS485 communication interface, enabling local data retention and data synchronization with the oilfield production management platform. When the system detects and determines that gas channeling has occurred, it immediately uploads a gas channeling alarm signal and real-time monitoring data to the control room via the RS485 interface, serving as a production warning. The operation meets the environmental requirements for explosion-proof and electromagnetic interference resistance in industrial settings.

[0040] The data acquisition and preprocessing module is responsible for the unified management of the sampling actions of all instruments, issuing sampling frequency commands to each instrument, receiving raw measurement data uploaded by the instruments, performing unified preprocessing operations, and storing the data in the local database. Under normal production monitoring conditions, the module issues minute-level sampling commands to all instruments, with a sampling interval set to 1 minute. The data is stored in the steady-state database in real time for daily gas channeling monitoring. When a positioning test trigger command is received, the module simultaneously issues high-frequency sampling commands to the pressure regulating execution unit, the three-phase metering unit (including the mass volume analyzer), and the gas component monitoring unit, increasing the sampling frequency of all instantaneous measurement parameters to no less than 1 time / second. The mass volume analyzer simultaneously outputs the instantaneous liquid volumetric flow rate and the cumulative liquid flow rate. The instantaneous liquid production parameter is directly taken from the volumetric flow rate detection result of this device, and the timing is started synchronously with the valve opening adjustment action to ensure that the timestamps of all parameters are completely aligned.

[0041] The preprocessing flow of raw measurement data follows a unified set of rules, with the module automatically performing three steps: outlier removal, smoothing filtering, and time series alignment. Outlier removal employs the 3σ criterion, calculating the mean and standard deviation of single-parameter time series data. Data points exceeding three times the standard deviation are considered outliers. Individual outliers are replaced by linear interpolation of adjacent normal data, while consecutive outlier segments are filled point-by-point by linear interpolation of the first and last normal data. Smoothing filtering uses a 5-point moving average algorithm, taking the arithmetic mean of each data point and its two adjacent points as the output value. The beginning and end endpoints of the sequence retain their original values, eliminating high-frequency random noise from the instruments. Time series alignment uses the moment of a step change in wellhead backpressure as a unified zero point. The rule for determining the pressure step moment is a pressure change reaching 10% of the set step amplitude. All parameter time series data are recalibrated using this moment as a reference, eliminating sampling delays and response time differences between different instruments.

[0042] The active excitation control module is responsible for valve opening control and test process management of the pressure regulating actuator. The module has two built-in control programs: a step-back pressure excitation and a small-amplitude periodic fluctuation excitation, which can be manually switched or triggered at set times according to field requirements. The execution process of the step-back pressure excitation program is as follows: Before the test starts, at least 2 hours of production operation data are read to confirm that the wellhead back pressure, fluid production, and gas production are all in a stable state, with fluctuations not exceeding 1% of the steady-state value. If the steady-state conditions are not met, the test is postponed and a warning is issued. After steady-state confirmation, 10 minutes of baseline data are collected, and the baseline steady-state values ​​of each parameter are calculated. Then, an opening control signal is output to the self-regulating valve, and the opening adjustment is completed within 10 seconds, so that the wellhead back pressure rises to 5%~10% of the steady-state back pressure. After reaching the target pressure, the valve opening is kept constant. The system monitors the flow status in real time and uses a rolling window method to determine whether a new steady state has been reached. The rolling window duration is set to 5 minutes, and a new steady state is determined when the coefficient of variation of all parameters within the window is less than 1%. After reaching the steady state, the system is maintained for 30 to 60 minutes to ensure complete recording of the dynamic response process. After the maintenance period ends, the valve opening is linearly adjusted back within 10 minutes to gradually restore the original production pressure regime. Pressure changes are continuously monitored during the restoration process to avoid pressure shocks. After restoring the original regime, data is collected for another 10 minutes. Once the production status is confirmed to be normal, the test ends and the system switches back to normal sampling mode.

[0043] The execution flow of the small-amplitude periodic fluctuation excitation program is as follows: Periodic opening commands are generated according to the set fluctuation cycle, controlling the self-regulating valve to reciprocate and finely adjust the opening, causing wellhead back pressure fluctuations within ±2% of the steady-state back pressure. Each fluctuation cycle is set to 10-15 minutes, divided into four equal stages: pressure increase, pressure stabilization, pressure decrease, and pressure stabilization. During operation, this mode continuously monitors production fluctuations to ensure that the production fluctuation does not exceed 5% of the steady-state value, thus not significantly impacting normal production. It can operate continuously at low intensity for extended periods, tracking the dynamic changes in gas channeling.

[0044] The active excitation control module incorporates a triple safety constraint logic, monitoring operating parameters in real time throughout the process. The first constraint is a pressure upper limit constraint: when the wellhead back pressure exceeds 80% of the tubing's rated safe pressure, the current excitation action is immediately terminated, and the regulating valve is fully opened to restore normal pressure. The second constraint is a production fluctuation constraint: when the production volume fluctuation exceeds 15% of the steady-state value, the excitation amplitude is immediately reduced, gradually restoring the original regime and terminating the test. The third constraint is an abnormal operating condition constraint: when CO2 concentration suddenly increases or pressure exhibits irregular abnormal fluctuations, the test is immediately terminated, triggering a local audible and visual alarm. Simultaneously, a gas leakage alarm signal and real-time monitoring data are immediately uploaded to the control room via the RS485 interface, restoring the system to a safe production state.

[0045] The feature extraction module is responsible for extracting feature parameters from the preprocessed time-series data for model prediction and inversion calculations. The feature system includes four categories and twelve dimensions: three-phase flow steady-state features, three-phase flow dynamic features, gas component steady-state features, and gas component dynamic features. The three-phase flow steady-state features include six parameters: steady-state gas-liquid ratio, steady-state liquid production, steady-state gas production, steady-state water cut, steady-state crude oil density, and steady-state wellhead back pressure. The steady-state liquid production is taken from the baseline average volumetric flow rate of the mass volumetric analysis device, while the other parameters are taken from the baseline average values ​​of the corresponding instruments. The three-phase flow dynamic features include three parameters: gas-liquid ratio response lag time, water cut change amplitude, and crude oil density change rate. The gas-liquid ratio response lag time is the time difference between the pressure step and the gas-liquid ratio change exceeding 5% of the baseline value; the water cut change amplitude is the absolute value of the difference in steady-state water cut before and after the pressure step; and the crude oil density change rate is the ratio of the steady-state change in crude oil density to the total duration of the density change. The steady-state characteristic of the gas components is the steady-state CO2 concentration, taken from the average concentration of the baseline period. The dynamic characteristics of the gas components include two terms: CO2 concentration response lag time and CO2 concentration change rate. The CO2 concentration response lag time is the time difference between the pressure step and the CO2 concentration change exceeding 3% of the baseline value; the CO2 concentration change rate is the ratio of the steady-state change in CO2 concentration to the total duration of concentration change. After all features are extracted, they are standardized according to uniform rules and stored in the feature database.

[0046] The similar well sample library and benchmark model training module include a pre-built sample library of similar well gas channeling responses and a benchmark prediction model. The similar well sample library is constructed from historical data of oil and gas wells within the same block that meet the screening criteria, including: reservoir permeability, porosity, and formation pressure coefficient differences from the target well not exceeding 20%; tubing inner diameter and casing size deviations from the target well not exceeding 10%; injection-production well spacing deviations from the target well not exceeding 30%; and belonging to the same CO2-driven well group. Each sample in the library includes gas channeling depth, gas channeling intensity, and production group tags verified by production profile logging, distributed fiber optic monitoring, or plugging and regulating operations, as well as corresponding 12-dimensional three-phase and component characteristic data. The sample library supports dynamic expansion; newly added verification data can be automatically added to the library after standardization.

[0047] The baseline prediction model employs a lightweight gradient boosting tree structure, simultaneously outputting three categories of results: production layer group classification probability, predicted airflow depth, and predicted airflow intensity. Model training aims to minimize the joint loss across multiple tasks. The total loss is a weighted average of the classification loss and regression loss, with a classification loss weight of 0.4 and a regression loss weight of 0.6. The expression is as follows: L total =ω cls L cls +ω reg L reg Among them, L total The total loss is dimensionless; ω cls This is the classification loss weight, with a value of 0.4. It is dimensionless and used to balance the training priority of classification and regression tasks; L cls The classification loss is dimensionless and measures the difference between the hierarchical classification prediction results and the true labels; ω reg The regression loss weight is set to 0.6, which is dimensionless, highlighting the training objective of quantitative depth inversion; L reg The regression loss is dimensionless and measures the degree of difference between the quantitative prediction results of depth and intensity and the true label.

[0048] The classification loss is calculated using multi-class cross-entropy, measuring the difference between the layer group's classification prediction and the true label. The regression loss is composed of the average of the depth regression loss and the intensity regression loss, both calculated using mean squared error, measuring the difference between the quantitative prediction and the true label. The model training process is as follows: the labeled similar well gas channeling samples are randomly divided into training, validation, and test sets in an 8:1:1 ratio; Z-score standardization is performed on the 12-dimensional input features; and minimum-maximum normalization is performed on the depth and intensity regression labels to eliminate dimensional differences. A histogram gradient descent optimizer is used, with an initial learning rate of 0.05, a maximum depth of 8 for a single decision tree, a maximum total number of decision trees of 200, a minimum number of samples per leaf node of 10, and a feature and sample sampling ratio of 0.8. Training uses the weighted multi-task joint loss of classification and regression as the optimization objective. In each iteration, a decision tree is generated to fit the residual of the previous iteration. An early stopping mechanism is used, that is, when the total loss of the validation set no longer decreases for 20 consecutive iterations, the training is automatically terminated, the optimal model parameters are saved, and finally the classification accuracy and regression error are evaluated through the test set. After confirming that the target is met, the construction is completed.

[0049] The target well adaptation module is responsible for adapting the benchmark prediction model to the target well, eliminating systematic biases caused by individual differences between wells. Adaptation methods are divided into two scenarios. In the scenario without calibration data, a feature space mapping method is used for adaptation. First, the mean and standard deviation of each dimension of the features in the target well under steady-state conditions without gas channeling are calculated. Then, the mean and standard deviation of the corresponding features of all samples in the sample library are calculated. The feature data collected from the target well is first standardized, and then destandardized according to the distribution parameters of the sample library to complete the alignment of the feature space. The aligned features can be directly input into the benchmark prediction model to obtain prediction results. In the scenario with 1-3 sets of field-verified gas channeling depth calibration data, a parameter fine-tuning method is used for adaptation. All parameters of the first 150 decision trees in the benchmark prediction model are frozen, retaining the general gas channeling response rules learned by the model. Only the weights of the leaf nodes of the remaining decision trees are adjusted. A small number of iterations are performed using the calibration data of the target well. The iteration process uses a low learning rate of 0.01, and the maximum number of iterations is set to 50 to avoid overfitting due to a small amount of data. After training, a target well-specific prediction model is obtained.

[0050] The airflow depth inversion calculation module employs a Bayesian probabilistic inversion framework, fusing the prior probability distribution obtained through transfer learning with the likelihood function obtained through multi-parameter fitting to solve for the optimal airflow depth and intensity. The inversion logic dictates that the posterior probability of the airflow depth is proportional to the product of the prior probability distribution and the likelihood function value; the parameter combination with the highest posterior probability is the inversion result. The inversion formula is as follows:

[0051] Where h is the gas channeling inlet depth in meters (m), and is the main unknown parameter for the inversion solution; D is the dynamic dataset of ground-based three-phase and component monitoring, containing all time-series measurements of the entire pressure step process; and s is the gas channeling intensity in meters (m). 3 / d represents the minor unknown parameter obtained from the inversion solution; P(h) is the prior probability density of gas channeling depth h, in meters. -1 , obtained through transfer learning, represents the predicted probability based on the similarity well pattern; The likelihood function value of the observed measured dataset D is dimensionless and is calculated from the fitting error between the multiphase flow simulation results and the measured data when the gas channeling depth is h and the gas channeling intensity is s. This is the posterior probability density of gas channeling depth h after incorporating measured data, in meters. -1 This is the final output of the inversion; The sign indicates that the posterior probability is proportional to the prior probability multiplied by the likelihood value.

[0052] The prior probability distribution is generated by a target well-specific prediction model. After the model outputs the predicted value and prediction error of gas channeling depth, a continuous prior probability distribution curve in Gaussian form is generated, using the predicted value as the mean and the prediction error as the standard deviation, covering the entire production interval. Simultaneously, the curve is corrected based on the gas channeling probabilities of each layer output by the model. Layers with a gas channeling probability higher than 33.3% are considered high-probability layers, while the remaining layers are considered low-probability layers. The probability value of the interval corresponding to the high-probability layer is multiplied by 1.2 times the probability of the corresponding layer, and the probability value of the interval corresponding to the low-probability layer is multiplied by 0.8 times, strengthening the constraint effect of geological strata. The corrected prior probability curve is used to limit the inversion search range, retaining only depth intervals with a prior probability greater than 1% of the maximum prior probability as the effective search range, excluding low-probability intervals to improve computational efficiency.

[0053] The likelihood function is calculated by combining simulation results from the wellbore multiphase flow model and the gas phase transport model with measured data. The wellbore multiphase flow model adopts the Beggs-Brill gas-liquid two-phase flow calculation method, dividing the wellbore into micro-segments with a 1-meter step size along the depth. The calculation is performed segment by segment from the bottom of the well to the wellhead. During the iteration process, gravity pressure drop, friction pressure drop, and acceleration pressure drop are calculated separately, while considering the gas-liquid slippage effect to update the liquid holdup and gas phase rise velocity. When iterating to the assumed gas channeling inlet depth, the assumed gas channeling inlet volume is superimposed on the gas phase flow rate, and the iteration continues upward. Finally, the steady-state values ​​and dynamic response curves of the gas-liquid ratio, water cut, and crude oil density at the wellhead are output.

[0054] The calculation process of the aforementioned wellbore multiphase flow model serves as the implementation vehicle for hydrodynamic constraints. These constraints, based on three-phase flow parameters, limit the inversion solution space from both steady-state and dynamic perspectives, excluding depth and intensity combinations that do not conform to the flow laws of the wellbore fluid. At the steady-state constraint level, the steady-state gas-liquid ratio, steady-state water cut, and steady-state crude oil density calculated after superimposing gas channeling inflow must match the measured baseline steady-state values. Parameter combinations with deviations exceeding the allowable range of the flow laws are judged as invalid solutions and directly excluded from the search range. Dynamic constraints are implemented based on the dynamic characteristics of three-phase flow and include three specific rules: First, the gas-liquid ratio response lag time constraint corresponds to the transmission law of pressure disturbances in the wellbore fluid. The propagation speed of pressure waves in the continuous fluid of the wellbore is within a fixed range. If the assumed gas channeling depth does not match the simulated response lag time (e.g., shallow depth corresponds to an excessively long lag time, and deep depth corresponds to an excessively short lag time), it does not conform to the hydrodynamic transmission logic. Second, the water cut variation amplitude constraint corresponds to the influence law of gas phase agitation on liquid holdup. The upward movement of the gas phase affects the water droplets in the wellbore. The agitation effects of coalescence and liquid holdup distribution accumulate with increasing upward distance. The steady-state change in water cut corresponding to deep gas channeling is naturally greater than that of shallow gas channeling. Parameter combinations whose simulation results violate this gradient law do not meet the constraints. Finally, the crude oil density change rate constraint corresponds to the phase equilibrium law of dissolved gas escape. The degree of dissolved gas escape increases with the gas-liquid contact time. Deep gas channeling corresponds to a longer gas-liquid contact time, resulting in a smoother and lower rate of crude oil density change. Parameter combinations whose simulated change rates do not conform to this trend do not meet the constraints. These three dynamic constraints, along with the steady-state constraints, jointly limit the reasonable range of variation for the three-phase parameters. Ultimately, the magnitude of the fitting error is reflected in the likelihood function value. Parameter combinations with lower matching degrees have lower likelihood values ​​and will not be selected as the optimal inversion result.

[0055] The gas phase migration model adopts a push-mix calculation logic. Under steady state, the surface CO2 concentration is calculated based on the ratio of gas channeling inflow to primary associated gas flow. Under dynamic conditions, the change in gas channeling inflow is transmitted upward along the wellbore at the local gas phase rise rate, and mixed and diluted with the primary gas phase segment by segment. The dynamic response curve of the wellhead CO2 concentration is obtained by time step calculation.

[0056] After obtaining the simulated dynamic response curve, the normalized mean square error of the fit for each parameter is calculated. The error is calculated using the relative mean square error method, which is the difference between the simulated value and the measured value at each time point, divided by the baseline steady-state value, squared, and then averaged over all time points. The expression is:

[0057] Among them, E x is the normalized mean square error of the fit for parameter x, which is dimensionless; M is the total number of sampling points in the dynamic response sequence, which is also dimensionless; t is the time step index, which is a positive integer and is used to represent the time point number; xsim (t) represents the simulated value of parameter x at time t, with units consistent with the actual units of the parameter; x obs (t) represents the measured value of parameter x at time t, with units consistent with the actual units of the parameter; x base This is the baseline steady-state value of parameter x, with units consistent with the actual units of the parameter, calculated from the steady-state data before the test.

[0058] The average fitting error of the three three-phase parameters (gas-liquid ratio, water cut, and crude oil density) is obtained by averaging the fitting errors. Then, the average fitting error of the three phases is weighted and summed with the fitting error of CO2 concentration using a weighting ratio of 0.4:0.6 to obtain the total fitting error. The higher weighting of the component parameters highlights their core role in tracer positioning. The total fitting error is converted into a likelihood value using a Gaussian likelihood function. The smaller the total fitting error, the higher the likelihood value, indicating a better match between the depth and intensity parameters and the measured data.

[0059] The optimal parameters are determined using a particle swarm optimization (PSO) algorithm. The search range is limited to the depth interval selected by prior probability and the gas channeling intensity range of 5% to 50% of the baseline gas production. The algorithm uses 30 particles, each corresponding to a set of depth and intensity parameters. Initially, particle positions and velocities are randomly generated within the search range. During iteration, each particle records its historical best position, and the population records the global best position. In each iteration, the particle's velocity is updated based on its own inertia, its individual historical best position, and the global best position. The particle position is then updated based on the velocity. After each update, the parameters are checked to ensure they do not exceed the search range; if they do, they are limited to boundary values. The maximum number of iterations is set to 50. After all iterations are complete, the depth and intensity corresponding to the global best position are the final inversion results.

[0060] After the inversion calculation is completed, the confidence interval of the result is generated simultaneously. The depth interval with a posterior probability greater than 60% of the maximum posterior probability is taken as the gas channeling depth interval with a 95% confidence level. The width of the interval can reflect the reliability of the inversion result.

[0061] The results output and model iteration module is responsible for outputting the inversion results in the form of standardized reports and visualization curves, while managing the iterative updates of the model. The output includes the qualitative judgment results of gas channeling, the optimal depth value for gas channeling, the 95% confidence depth range, the corresponding production layer group, the gas channeling intensity value, the gas channeling severity level, and the cumulative data for the gas phase, liquid phase, oil phase, and water phase during the same period. When the system determines that gas channeling has occurred, it immediately transmits the above results to the control room via the RS485 interface, serving as a production warning. It also outputs prior probability distribution curves and comparison curves of measured and simulated responses to assist technicians in verifying the rationality of the results.

[0062] The model iteration and update mechanism is as follows: After the target well completes production profile logging, plugging and adjustment operations, and obtains gas channeling depth verification data, the corresponding test data is processed into labeled samples and added to the target well sample set. The target well-specific model is fine-tuned and updated quarterly using the newly added samples to improve model prediction accuracy. When labeled data of similar wells are added within the block, the gas channeling response sample library of similar wells is updated synchronously. The benchmark prediction model is retrained annually to improve the overall generalization ability of the model.

[0063] This application also provides a downhole gas channeling detection method based on three-phase monitoring and component monitoring, including: Connect the pressure regulating actuator to the wellhead gathering and transmission pipeline to regulate the wellhead back pressure; The three-phase metering unit is connected to the wellhead production pipeline to separate the gas and liquid phases and measure the gas production, total liquid volume, water cut and crude oil density. The gas component monitoring unit is connected to the three-phase metering unit through the gas phase outlet pipeline to detect the CO2 volume concentration in the gas phase. The pressure regulating actuator adjusts the valve opening to apply controllable pressure excitation disturbance to the wellbore; During the pressure excitation process, the output data of the three-phase metering unit and the gas component monitoring unit are collected simultaneously. Extract the steady-state characteristics of three-phase flow, the dynamic characteristics of three-phase flow, the steady-state characteristics of gas components, and the dynamic characteristics of gas components from the collected output data; The pre-trained benchmark prediction model and similar well gas channeling response sample library are retrieved, and after adaptation to the target well domain, a target well-specific prediction model is generated. The extracted features are input to obtain the prior probability distribution of gas channeling depth. By calling the wellbore multiphase flow model and the gas phase transport model, the simulated response data corresponding to different gas channeling depths and gas channeling intensities are calculated, and the likelihood function is generated by combining the measured data. By integrating prior probability distribution and likelihood function, and using an optimization algorithm to solve for the combination of gas channeling depth and gas channeling intensity with the highest posterior probability, the gas channeling localization and quantitative results are output.

[0064] Experimental process To verify the gas channeling localization effect of this system, a field verification experiment was conducted on Well A in a low-permeability reservoir in the Ordos Basin. This well is a CO2-driven vertical well with a total drilling depth of 2250 meters. The production formations are divided into three groups: Chang 61, Chang 62, and Chang 63, corresponding to depths of 1820–1910 meters, 1960–2060 meters, and 2110–2220 meters, respectively. The wellhead is equipped with complete surface gathering and monitoring equipment, including a pressure-reducing throttle valve, a self-regulating valve, a vertical rotary gravity gas-liquid separator, a high-humidity gas flow meter, a mass volume analyzer, a water cut analyzer, a density analyzer, and an online gas composition analyzer. This equipment is fully compatible with the hardware configuration of the pressure regulating unit, three-phase metering unit, and gas composition monitoring unit of this system. The experiment only requires upgrading the control program and analysis algorithm of the data acquisition and control unit; no additional hardware is needed.

[0065] In the experimental preparation phase, a sample library of gas channeling responses from similar wells was first constructed. Twelve CO2-driven production wells within the same block that met the screening criteria were selected as similar wells. These criteria included: reservoir permeability, porosity, and formation pressure coefficient differences from well A not exceeding 20%; tubing inner diameter and casing size deviations from well A not exceeding 10%; injection-production well spacing deviations from well A not exceeding 30%; and belonging to the same injection-production well group. Historical gas channeling monitoring and validation data from these similar wells were collected, resulting in 42 sets of valid labeled samples. Each sample included gas channeling depth, gas channeling intensity, and the corresponding formation group label verified by production profile logging, as well as 12-dimensional three-phase monitoring and component monitoring feature data from the corresponding tests. All samples were randomly divided into training, validation, and test sets in an 8:1:1 ratio to train a baseline gradient boosting tree prediction model. The model training aimed to minimize the multi-task joint loss, with a classification loss weight of 0.4 and a regression loss weight of 0.6. An early stopping mechanism was implemented during training; training was stopped when the validation set loss did not decrease for 20 consecutive rounds. After training, the baseline prediction model achieved a layer classification accuracy of 88% on the test set and a mean absolute error of 92 meters for depth regression, meeting the baseline accuracy requirements.

[0066] Subsequently, model transfer and adaptation for the target well were completed. Well A contains one set of production profile logging data from March 2025, including corresponding gas channeling depth verification results and concurrent monitoring data, belonging to a scenario with a small amount of calibration data. A parameter fine-tuning method was used for adaptation. All parameters of the first 150 decision trees in the baseline prediction model were frozen, and only the weights of the leaf nodes of the remaining decision trees were adjusted. Fine-tuning training was conducted using the calibration samples from Well A, with a training learning rate set to 0.01 and a maximum iteration count of 50 epochs to avoid overfitting caused by a small number of samples. After fine-tuning, a prediction model specific to Well A was obtained, which was used for prior probability calculation in subsequent inversion.

[0067] The active excitation test was conducted on June 12, 2025, using a step-back pressure excitation mode. Prior to the test, it was confirmed that the well had been in continuous and stable production for more than 48 hours, with steady-state production parameters of 2.45 MPa back pressure, 12.7 cubic meters of liquid production per day, 860 cubic meters of gas production per day, a gas-liquid ratio of 67.7, and a gas phase CO2 volume concentration of 18.2%. The fluctuation range of each parameter was less than 1%, meeting the steady-state test conditions. After the test was initiated, 10 minutes of baseline data were collected to calculate the baseline steady-state values ​​of each parameter. Then, the self-regulating valve was controlled to adjust its opening, raising the wellhead back pressure to 2.65 MPa within 8 seconds, a step increase of approximately 8.2% of the steady-state back pressure, within the design range of 5% to 10%. Once the target pressure was reached, the valve opening was kept constant, and the flow status was continuously monitored. Using the rolling window method, it was determined that the wellbore flow reached a new steady state 32 minutes after pressure adjustment. The steady-state state was maintained until 45 minutes, after which the valve opening was linearly adjusted back over 10 minutes to gradually restore the original production pressure. After restoration, data was collected for another 10 minutes to confirm normal production. Throughout the test, all monitoring instruments used high-frequency sampling at 1 time per second, with a total effective test data collection time of approximately 58 minutes.

[0068] After testing, inversion calculations were performed. First, a 12-dimensional feature vector was extracted from the preprocessed time-series data. After domain adaptation, this vector was input into the prediction model specific to Well A to obtain the prior probability distribution of gas channeling depth. The high-value region of the prior probability was concentrated in the 1950-2100 meter range, corresponding to the upper part of layers 62 and 63. Then, the wellbore multiphase flow model and gas phase transport model were invoked. Within the search range after prior probability filtering, simulated response curves corresponding to different depths and intensity parameters were calculated. The total fitting error and likelihood value were calculated in conjunction with measured data. A particle swarm optimization algorithm was used to solve for the posterior probability optimal solution. With 30 particles and a maximum of 50 iterations, the globally optimal parameter combination was obtained after convergence.

[0069] The final inversion results of the system are as follows: the optimal gas channeling depth is 2052 meters, the 95% confidence depth range is 2002-2101 meters, the dominant gas channeling layer is identified as layer group 62, and the gas channeling intensity is approximately 143 cubic meters of CO2 injected per day. To verify the accuracy of the results, a downhole test was conducted simultaneously using a coiled tubing-mounted production profiler. The measured results showed that gas channeling mainly occurred in the 1990-2040 meter well section, belonging to layer group 62, with a midpoint depth of 2015 meters and a measured daily gas channeling volume of approximately 158 cubic meters. Comparison shows that the layer group identification results of this system are completely consistent with the actual measurements, with an absolute depth inversion error of 37 meters, a relative error of approximately 1.8%, and a relative error of approximately 9.5% for gas channeling intensity. The positioning accuracy meets the requirements of field engineering applications. The experimental results indicate that this system can achieve accurate quantitative positioning of downhole gas channeling using only existing surface three-phase monitoring and component monitoring hardware, without the need for additional downhole monitoring equipment, demonstrating good engineering application value and prospects for large-scale promotion.

[0070] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0071] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A downhole gas channeling detection system based on three-phase monitoring and component monitoring, characterized in that, It includes a pressure regulating actuator, a three-phase metering unit, a gas composition monitoring unit, and a data acquisition and control unit; The pressure regulating actuator includes a pressure reducing throttle valve and a self-regulating valve. The pressure regulating actuator is connected to the wellhead gathering and transportation pipeline and is used to regulate the wellhead back pressure. The three-phase metering unit includes a gas-liquid separation device, a high-humidity gas flow meter, a mass-volume analysis device, a water content analysis device, and a density analysis device. The three-phase metering unit is connected to the wellhead production pipeline and is used to separate the gas and liquid phases and measure the gas production, total liquid volume, water content, and crude oil density. The gas component monitoring unit is connected to the three-phase metering unit through a gas phase outlet pipeline and is used to detect the CO2 volume concentration in the gas phase. The data acquisition and control unit is electrically connected to the pressure regulating execution unit, the three-phase metering unit, and the gas component monitoring unit, respectively. The data acquisition and control unit is used to perform the following operations: The pressure regulating actuator is controlled to adjust the valve opening and apply controllable pressure excitation disturbance to the wellbore; During the pressure excitation process, the output data of the three-phase metering unit and the gas component monitoring unit are collected simultaneously; The steady-state characteristics, dynamic characteristics, and gas component characteristics of the three-phase flow are extracted from the collected output data. The steady-state characteristics of the three-phase flow include the steady-state gas-liquid ratio, steady-state liquid production, steady-state gas production, steady-state water cut, steady-state crude oil density, and steady-state wellhead back pressure. The dynamic characteristics of the three-phase flow include the gas-liquid ratio response lag time, water cut change amplitude, and crude oil density change rate. The steady-state characteristic of the gas component is the steady-state CO2 concentration. The dynamic characteristics of the gas component include the CO2 concentration response lag time and the CO2 concentration change rate. A pre-trained benchmark prediction model and a similar well gas channeling response sample library are retrieved. After adaptation to the target well domain, a target well-specific prediction model is generated. The extracted features are input to obtain the prior probability distribution of gas channeling depth. This prior probability distribution is generated by the target well-specific prediction model. After the model outputs the predicted value and prediction error of gas channeling depth, a continuous prior probability distribution curve in Gaussian form is generated using the predicted value as the mean and the prediction error as the standard deviation. The curve is corrected based on the gas channeling probabilities of each layer output by the model. Layers with a gas channeling probability higher than 33.3% are considered high-probability layers, and the remaining layers are considered low-probability layers. The probability value of the interval corresponding to the high-probability layer is multiplied by 1.2 times the probability of the corresponding layer, and the probability value of the interval corresponding to the low-probability layer is multiplied by 0.8 times. The corrected prior probability distribution curve retains only the depth interval with a prior probability greater than 1% of the maximum prior probability as the effective search range. The model is defined as follows: the baseline prediction model adopts a lightweight gradient boosting tree structure, and the model training aims to minimize the joint loss of multiple tasks. The total loss is composed of a weighted average of classification loss and regression loss. Each sample in the similar well gas channeling response sample library contains gas channeling depth labels, gas channeling intensity labels, and labels of the production layer group verified by production profile logging, distributed optical fiber monitoring, or plugging and regulating operations, as well as steady-state and dynamic feature data of corresponding three-phase monitoring and component monitoring. The target well domain adaptation is divided into two scenarios: when there is no calibration data, the features of the target well are aligned to the distribution space of the similar well gas channeling response sample library through feature space mapping; when there are 1 to 3 sets of field-verified gas channeling depth calibration data, all parameters of the first 150 decision trees in the baseline prediction model are frozen, and only the weights of the leaf nodes of the remaining decision trees are fine-tuned to generate the target well-specific prediction model. The wellbore multiphase flow model and gas phase transport model are used to calculate the simulated response data corresponding to different gas channeling depths and intensities. The likelihood function is generated by combining the measured data. The average fitting error of gas-liquid ratio, water cut and crude oil density is taken to obtain the three-phase average fitting error. The three-phase average fitting error and the CO2 concentration fitting error are weighted and summed according to the weight of 0.4:0.6 to obtain the total fitting error. The total fitting error is converted into a likelihood value through a Gaussian likelihood function. A Bayesian inversion framework is used to fuse the prior probability distribution and the likelihood function. An optimization algorithm is used to solve for the combination of air channeling depth and air channeling intensity with the highest posterior probability, and the results of air channeling localization and quantification are output. The posterior probability is proportional to the product of the values ​​of the prior probability distribution and the likelihood function, and the combination of parameters with the highest probability is used as the inversion result.

2. The downhole gas channeling detection system based on three-phase monitoring and component monitoring according to claim 1, characterized in that, The data acquisition and control unit controls the pressure regulating execution unit to execute two pressure excitation modes. One is a step-type back pressure excitation, which adjusts the valve opening within 10 seconds to cause a step change in the wellhead back pressure with an amplitude of 5% to 10% of the steady-state back pressure, and then restores the original production system after maintaining the steady state. The other is a small-amplitude periodic fluctuation excitation, which adjusts the valve opening to cause the wellhead back pressure to produce a reciprocating fluctuation with an amplitude within ±2% of the steady-state back pressure and a period of 10 to 15 minutes.

3. The downhole gas channeling detection system based on three-phase monitoring and component monitoring according to claim 1, characterized in that, The sample library of similar well gas channeling responses is constructed from oil and gas well data within the same block that meet the following conditions: the difference between reservoir permeability, porosity and formation pressure coefficient and the target well is less than or equal to 20%; the deviation between tubing inner diameter and casing size and the target well is less than or equal to 10%; the deviation between injection and production well distance and the target well is less than or equal to 30% and they belong to the same CO2 drive well group.

4. The downhole gas channeling detection system based on three-phase monitoring and component monitoring according to claim 1, characterized in that, The wellbore multiphase flow model is calculated by iterating segment by segment along the well depth. When iterating to the gas channeling inlet depth, the gas channeling inlet volume is superimposed on the gas phase flow rate, and then the three-phase parameter response at the wellhead is calculated by iterating upward.

5. The downhole gas channeling detection system based on three-phase monitoring and component monitoring according to claim 1, characterized in that, The optimization algorithm employs a particle swarm optimization algorithm. Within the depth range where the prior probability distribution is greater than 1% of the maximum prior probability and the gas production range is 5% to 50% of the baseline gas channeling intensity, the algorithm iteratively updates the position and velocity of the particles to find the parameter combination with the highest posterior probability.

6. The downhole gas channeling detection system based on three-phase monitoring and component monitoring according to claim 1, characterized in that, The gas channeling location and quantitative results output by the data acquisition and control unit include the optimal gas channeling depth value, the depth range with 95% confidence, the production layer group to which it belongs, the gas channeling intensity value, and the gas channeling severity level, as well as the total cumulative data of the gas phase, liquid phase, oil phase, and water phase during the same period.

7. A method applied to the downhole gas channeling detection system based on three-phase monitoring and component monitoring as described in any one of claims 1-6, characterized in that, include: Connect the pressure regulating actuator to the wellhead gathering and transmission pipeline to regulate the wellhead back pressure; The three-phase metering unit is connected to the wellhead production pipeline to separate the gas and liquid phases and measure the gas production, total liquid volume, water cut and crude oil density. The gas component monitoring unit is connected to the three-phase metering unit through the gas phase outlet pipeline to detect the CO2 volume concentration in the gas phase. The pressure regulating actuator is controlled to adjust the valve opening and apply controllable pressure excitation disturbance to the wellbore; During the pressure excitation process, the output data of the three-phase metering unit and the gas component monitoring unit are collected simultaneously; Extract the steady-state characteristics of three-phase flow, the dynamic characteristics of three-phase flow, the steady-state characteristics of gas components, and the dynamic characteristics of gas components from the collected output data; Retrieve the pre-trained benchmark prediction model and the gas channeling response sample library of similar wells, and generate a target well-specific prediction model after adapting it to the target well domain. Input the extracted features to obtain the prior probability distribution of gas channeling depth. By calling the wellbore multiphase flow model and the gas phase transport model, the simulated response data corresponding to different gas channeling depths and gas channeling intensities are calculated, and the likelihood function is generated by combining the measured data. By integrating the prior probability distribution and the likelihood function, an optimization algorithm is used to solve for the combination of gas channeling depth and gas channeling intensity with the highest posterior probability, and the gas channeling localization and quantitative results are output.

Citation Information

Patent Citations

  • Real-time Calibration Method and System for Three-Phase Flowmeters Based on Smart Sensors

    CN122670964A