Analysis of ultrasound Doppler flow pattern recognition method for drilling gas intrusion monitoring Authors: Qingfeng Guo, Xiao Cai, Lijun Geng, Minglei Men, Pengfei Li, Qing Liu, Guolang Shen Published: 2026 ABSTRACT AbstractHigh-pressure gas intrusion during drilling operations poses significant well control challenges, heightening blowout risks. To address this critical safety concern, this paper proposes a real-time monitoring framework by characterizing gas–liquid flow pattern transitions through ultrasonic Doppler detection and time–frequency analysis. The proposed methodology systematically integrates three innovative processes: (1) gas-phase channel enumeration for spatial quantification of gas distribution patterns, (2) Doppler frequency shift range analysis enabling dynamic flow characteristic resolution, and (3) flow pattern threshold calibration to establish robust classification criteria. The thresholds of various flow patterns are obtained by the number of gas-phase channels and Doppler frequency shift range to achieve the purpose of real-time monitoring of gas intrusion status. To validate the methodology, an experimental gas intrusion simulation system was developed, comprising a wellbore pipeline integrated with a drilling fluid circulation pool and an ultrasound Doppler detection array. This system replicates downhole flow pattern transitions by injecting controlled gas velocities (0.1–5 m/s) at multiple axial positions, enabling spatial–temporal analysis of gas–liquid phase redistribution under simulated drilling conditions. The results show that, our method effectively explain the dynamic evolution of two-phase flow under different flow regimes and achieved early detection of phase transitions. This method provide a non-invasive ultrasound-based pipeline, offering a high-responsiveness solution for gas kick monitoring in high-risk drilling.Keywords: Wellbore pipeline, Time–frequency analysis, Air intrusion monitoring, Ultrasound Doppler, Flow pattern identificationSubject terms: Energy science and technology, Engineering, Mathematics and computing Introduction In deepwater drilling, well control events frequently escalate from gas kicks in high pore pressure formations, leading to substantial economic losses and casualties1. For example, 2010 Macondo well blowout on the Deepwater Horizon semisubmersible platform leaded to more than $480 billion in direct economic losses. Early monitoring of gas intrusion is crucial to increase well control time and prevent accidents such as blowouts. Current gas kick detection methods mainly include conventional wellhead monitoring method, mud pool level method, downhole monitoring method with drilling, and seawater section monitoring method2,3. The conventional wellhead monitoring method mainly analyzes the standpipe pressure and flow-out rate of the wellhead, which is limited in deepwater drilling as well as high-pressure gas well drilling2. The mud pool level monitoring method tracks the volume and density change of drilling fluid, but the overflow is poor in real-time and the monitoring accuracy2. The downhole follow-drill monitoring method is to install monitoring sensors on the drilling column to carry out follow-drill monitoring, but this method is costly and also has strict requirements for the formation environment2. The seawater section monitoring method is a unique technology in offshore drilling with good real-time performance, but it is susceptible to the undulating motion of the platform leading to signal interference3. Doppler ultrasound technology is widely used in medical imaging4,5, military monitoring, and meteorological observation6,7 and is beginning to be investigated in conjunction with intrusion monitoring. Yin et al.1 proposed a Doppler ultrasound gas intrusion monitoring method which employs continuous Doppler technology to quantitatively characterize the gas void fraction, thus enabling early monitoring of gas intrusion in deepwater drilling wells. Li et al.8 used the continuous Doppler technique to obtain the aberrations of Doppler signals to identify gas intrusion. Xia et al.9 analyzed the feasibility of early monitoring and designed a method for early monitoring of gas intrusion using the continuous Doppler principle. Abbagoni et al.10 processed ultrasound signals with Artificial Neural Networks to identify two-phase flow patterns. A large number of experimental studies on gas intrusion monitoring using Doppler technology has been carried out by previous authors11–14, which verified the feasibility and correctness of Doppler ultrasound technology for real-time monitoring of gas intrusion in drilling wells15. However, most of the Doppler ultrasound research used the continuous Doppler techniques, which do not have axial resolution and are unable to obtain fluid information at a given location. The intuitive ultrasound signal is irregular with the increase of gas void fraction, resulting in the inability to directly use the ultrasound characteristic parameters to judge the state of gas intrusion. Pulsed Doppler ultrasound technology was used to identify the flow pattern changes during bubble rise in wellbore tubing16. Firstly, the simulation experiment platform verified the flow pattern changes in the upper, middle, and lower parts of wellbore pipeline under different gas void fraction17. Then experiments were carried out on the propagation of pulsed Doppler ultrasound in a two-phase gas–liquid flow. The orthogonal demodulation technology was used to process the echo signal. According to the amplitude of the acoustic reflection at the gas–liquid interface to separate the Gas–Liquid Two-Phase. Setting thresholds for the two-phase flow pattern of the number of measurement channels and Doppler shift range. The time–frequency spectrogram of the gas–liquid two-phase flow pattern is obtained by using the Short-term Fourier transform (STFT). According to the setting threshold, to obtain the time–frequency spectrograms of the upper, middle, and lower parts of the pipeline under different gas void fraction. The results verified the reasonableness and accuracy of the flow pattern identification in the early monitoring of gas intrusion. Most importantly, the equipment used in this method is simple, real-time, and independent of the undulating motion of the platform. Principles and techniques of gas intrusion monitoring Principles of Doppler ultrasound monitoring As shown in Fig. 1, the ultrasound transducer transmits a pulsed wave with a center frequency of f0 along the angle of incidence θ into the wellbore pipeline, after which it switches to the receive mode. When the incoming ultrasound waves encounter with the bubble along the axis of the fluid, theyreflect on the contact surface of bubble, and part of the waves returns to the ultrasound transducer. The distance between the bubble and the ultrasound transducer is: where c is the velocity of ultrasound in the drilling fluid and t is the time from emission to reception of the ultrasound transducer. Principle of Doppler ultrasound monitoring technology. Supposed the bubble enters the measurement channel with a non-zero velocity component, there is a frequency difference between the ultrasound echo signal received by the transducer and the ultrasound emission signal. The frequency difference fD is the Doppler shift. When the scatterer and the ultrasound transducer move relative to each other, the wavelength is compressed, the frequency increases, and in this case the Doppler shift signal is positive. When they move opposite to each other, the wavelength is stretched, the frequency decreases, and in this case the Doppler shift signal is negative. By the Doppler principle and the Doppler shift fD, the velocity of a single bubble is calculated as: where f0 is the emission frequency of ultrasound and θ is the angle of incidence. The measurable depth range in which the ultrasound transducer carries out the inspection contains a plurality of measurement channels, the measurement channel width W is expressed as: where n is the number of pulses emitted in a single pulse cycle. The measurement channel width W is the width of the measurement volume with good spatial resolution. With a sound velocity of 1480 m/s in the water and frequency of 4 MHz, the theoretical minimum measurable channel width is 0.74 mm. Considering the overlapping phenomenon between two measuring bodies, the channel distance of the set measurement is greater than the channel width. Time–frequency analysis of Doppler signals The transducer continuously emits pulse waves at a certain angle in the measurement experiment between the gas–liquid two-phase flow. The acoustic wave contacts different sizes and shapes of the scatterers, the gas–liquid interface for the acoustic reflection of different strengths, the received echo signals with an amplitude differences in the time domain, and different scatterers in the fluid move at different speeds. The ultrasound wavelength is compressed, the corresponding frequency increases and the bandwidth decreases when the transducer and the scatterer do the same direction movement. The ultrasound wavelength is elongated, the frequency decreases and the bandwidth increases while doing the reverse movement. Generally speaking, the received echo signals have a distributional difference in the frequency domain18. The ultrasound transducer receives the echo signal where the reception time of the xth pulse wave at the measurement channel y is expressed as: where dy is the distance between the measured scatterer,the ultrasound transducer, and T is the period. The expression for the echo signal A(t) reflects the motion of the measured reflector received by the ultrasound transducer, as followed: where Ax,y is the amplitude of the xth pulse at y, and ∆d is the distance traveled by the measured scatterer during the pulse repetition time tprf. The initial echo signal received is firstly processed for noise clutter removal using the quadrature demodulation technique as shown in Fig. 2, multiplying A(t) by the sine and cosine components, respectively. The carrier components, as well as the fundamental frequency component of the signal, are then canceled using low-pass and high-pass filters to obtain a continuous Doppler signal Dy(t) as: Signal processing identification flowchart. Sampling the continuous Doppler signal at the moment tm,p yields the discrete Doppler signal Dy(x) as: where φp denotes the initial phase of the isotropic signal XI and the quadrature signal XQ. The obtained Doppler signal Dy(x) is a time-varying, multi-frequency, non-stationary, complex communication signal. Processing of the Doppler signal using the short-time Fourier transform to divide Dy(x) into multiple neighboring Fourier windows. The Doppler signals with non-stationary characteristics within each window are analyzed according to the time step Sx. Combining the time domain analysis as well as the frequency domain analysis to build a joint distribution function V(t,fD) with time and frequency as variables: where Wx is the window length. The Fourier window taken in this experiment is a Hamming window with a window length of 8 and a time step of 1. According to the time–frequency distribution function V(t,fD), it is shown that the Doppler frequency shift fD and the Doppler amplitude A(t,fD) of the measured bubble at time t in the wellbore pipeline: where ∠X(t, fD) is the phase angle function of the Doppler shift fD and the short-time Fourier transform coefficients at this moment. In the gas–liquid two-phase flow system, the contact area and velocity distribution of the gas–liquid interface are different in different flow patterns. The ultrasound echo signals are also different between flow patterns, which can be identified by pulsed Doppler acoustic wave technique19. When gas intrusion occurs, the flow pattern in the wellbore pipeline changes as the amount increase trend of gas intrusion, and the degree of gas intrusion is reflected by monitoring and identifying these changes in the flow pattern. Construction of air intrusion simulation experiment platform Experimental platform construction In order to verify the feasibility of gas intrusion monitoring by the change of flow pattern in the pipeline, a simulation experiment platform for early gas intrusion monitoring was constructed according to the internal structure of the drilling wellbore and the ultrasound Doppler detection method as shown in Fig. 3. Figure 3a is the system flowchart and (b) is the physical platform. The system mainly contains the drilling fluid pool, the pool, the pump, the wellbore pipeline, the ultrasound transducers (1, 2, 3) (Model: 4 MHz), the ultrasound detector (Model: JPR10CN), ultrasound detector (Model: JPR-10CN), digitizer (Model: NI PXI-5114), computer, air compressor (Model: YOTS-2020), as well as gas and liquid flow meters. The drilling rod and the wall of the wellbore form the wellbore pipeline. The drilling fluid in the drilling fluid pool is injected into the wellbore pipeline through the water pump and then return to the drilling fluid pool through the upper part of the pipeline, simulating the working environment of the genuine drilling fluid; The gas encroachment simulation device consists of an air compressor, a pool of water, a gas (liquid) flowmeter, and a bubble crusher device; The air compressor pressurizes the gas, forming the pressure difference between the inside and outside of the wellbore to simulate the actual under-equilibrium conditions, the gas flow meter monitors the rate of gas injected into the air compressor, simulating the rate of gas erosion during an underbalanced condition. Simulation experiment platform for early gas intrusion monitoring. The wellbore is made of a Plexiglas tube with an inner diameter of 38 mm, a wall thickness of 2 mm, and a height of 950 mm. For the gas intrusion experiments, the liquid and gas are fed into the wellbore piping through the pump and the air pump, respectively, and the regulating valve control the flow rate of the incoming gas. Experimental methodology for air intrusion simulation The computer controls the ultrasound detector to emit pulse signals, and the emitted pulse signals are converted into ultrasound waves by the ultrasound transducer to be emitted into the wellbore pipeline. After the ultrasound waves enter the wellbore pipeline, the ultrasound waves meet the moving scattering body to be reflected and generate echo signals. The ultrasound transducer receives the echo signals. The final echo signals received have a certain degree of variability. By controlling the gas flow rate (0 L/min-3.0 L/min) at intervals of 0.5 L/min, the ultrasound transducer was set up according to the parameters in Table 1, and the signal acquisition was set up for the bubbles in the upper, middle, and lower parts of the wellbore pipeline at incrementally adjusted gas flow rates. The experimental steps were: The ultrasound detector controls the ultrasound transducer to emit an ultrasound signal with a center frequency of 4 MHz and a pulse repetition frequency of 8 kHz into the pipeline; The ultrasound detector controls the ultrasound transducer to emit an ultrasound signal with a center frequency of 4 MHz and a pulse repetition frequency of 8 kHz into the pipeline; Adjust the angle of incidence of the ultrasound transducer to 45°20; Adjust the angle of incidence of the ultrasound transducer to 45°20; Fill the wellbore pipeline with drilling fluid and use a high-speed camera to photograph the flow conditions in the upper, middle, and lower parts of the wellbore pipeline (at 200 mm, 500 mm, and 800 mm of the pipeline) and record the echo signals; Fill the wellbore pipeline with drilling fluid and use a high-speed camera to photograph the flow conditions in the upper, middle, and lower parts of the wellbore pipeline (at 200 mm, 500 mm, and 800 mm of the pipeline) and record the echo signals; Inject air from the bottom of the pipeline into the wellbore pipeline at an air intrusion rate of 0.5 L/min, photograph the flow pattern of the three parts of the pipeline, and record the ultrasound echo signals at this time; Inject air from the bottom of the pipeline into the wellbore pipeline at an air intrusion rate of 0.5 L/min, photograph the flow pattern of the three parts of the pipeline, and record the ultrasound echo signals at this time; Repeat step four at 0.5 L/min intervals until the gas invasion rate is 3.0 L/min. Repeat step four at 0.5 L/min intervals until the gas invasion rate is 3.0 L/min. Table 1Control parameter settings.Setting parametersNumerical valueAngularity of acoustic incidence45°Centre frequency4 MHzPulse Repetition Frequency8 kHzNumber of pulse repetitions128Number of pulse cycles8Measurement channel width0.74 mm Control parameter settings. For the ultrasound transducer to receive the echo signal, the orthogonal demodulation technique is used to extract the required Doppler signals from the cluttered signals. The extracted Doppler signals are subjected to a short-time Fourier transform to obtain the time–frequency spectrograms, identify the flow pattern, and then obtain the change of the flow pattern in the pipeline under different gas flow rates. Dimension analysis of the Doppler signal Gas–liquid phase separation The ultrasound experiments were performed on the wellbore pipeline without gas intrusion compared with gas intrusion (2.5 L/min gas intrusion rate), and 1000 sets of time–frequency data were collected in each of the upper parts of the pipeline. The gas-phase distributions were plotted as shown in Fig. 4, where the horizontal coordinates represent the number of frames (time–frequency data sequence number), the vertical coordinates represent the number of measurement channels, and the legend represents the Doppler amplitude of the echo signals. Gas phase distribution without gas intrusion and at 2.5 L/min gas intrusion rate. Figure 4a illustrates the gas-phase distribution observed in a state of no gas intrusion. The entire graph surface is covered in blue, indicating that the pipeline contains only pure water, with no bubbles passing through the measurement channel during the statistical observation period. Figure 4b presents the gas-phase distribution obtained at a gas intrusion rate of 2.5 L/min. In this state, most of the figure is characterized by densely distributed blue, light blue, and green areas, with red regions appearing intermittently. This distribution indicates a gas–liquid two-phase flow. During the statistical observation period, the size of the bubbles affects the ultrasound waves interacting with the gas–liquid interface, resulting in variations in the Doppler amplitude of the reflected ultrasound signals. According to the Doppler amplitude of the echo signals, the gas–liquid phases in the wellbore pipeline at the time of gas intrusion are separated, and the change of the gas–liquid two-phase flow pattern in the wellbore pipeline is identified through the phase separation development. Doppler threshold setting Different degrees of gas intrusion cause different changes in the gas–liquid two-phase flow pattern in the pipeline. Figure 5 gives the pure water condition using a high-speed camera as well as the three types of flow patterns when gas intrusion occurs, the actual photographs, where (a) is pure water and (b) is the flow pattern in the upper part of the wellbore pipeline when the aeration rate is 0.5 L/min, at which time the bubbles with a diameter of about 5 mm are dispersed in the pipeline as a bubble flow; (c) for the ventilation rate of 1.5 L/min when the flow pattern of the upper part of the wellbore pipeline, this time the bubble in the pipeline increases due to the ventilation rate. During the plug flow regime, the number of bubbles increases at the bottom of the pipeline. As these bubbles rise, they coalesce into large-sized bubbles with diameters approaching the pipeline’s inner diameter; (d) is the flow pattern in the upper part of the wellbore pipeline at a ventilation rate of 2.5 L/min, at which time the large-sized bubbles appear in irregular size and mixed distribution due to a further increase in the ventilation rate. Table 2 shows the shooting parameters of the high-speed camera; Table 3 shows a summary of the gas–liquid two-phase flow pattern conditions in the upper, middle, and lower portions of the wellbore tubing taken with a high-speed camera (model AZ9501) under different aeration conditions. Flow pattern. Table 2High-speed camera shooting parameters.parametricParameter valueFrame rate1:500 sPixels1280 × 1024Number of images100MethodInterrelation High-speed camera shooting parameters. Table 3Flow patterns at different ventilation rates.Ventilation rate (L/min)Gas void fractionStreaming (bottom)Streaming (centre)Flow type (upper)00Purified waterPurified waterPurified water0.51.88%Bubble flowBubble flowBubble flow1.03.76%Bubble flowBubble flowBubble flow1.55.64%Bubble flowBubble flowSegmental flow2.07.52%Bubble flowSegmental flowSegmental flow2.59.40%Bubble flowSegmental flowHybrid flow3.011.28%Bubble flowHybrid flowHybrid flow Flow patterns at different ventilation rates. The Doppler threshold is set when plotting the time–frequency spectrogram for flow pattern identification. Figure 6 shows the channel-frequency shift variation trend after preprocessing (orthogonal demodulation) of the three flow patterns. The data are collected in the middle of the wellbore at ventilation rates of 1.0 L/min, 2.0 L/min, and 3.0 L/min, respectively. There is a more noticeable difference between the different flow patterns in the amount of Doppler shift range and the number of measurement channels. Channel-frequency shift variation for different flow patterns. For X-coordinate measurement channels in Fig. 6, fifty groups of experimental data were taken for three flow types. The data were averaged into ten groups to screen out the amplitude occupancy channels at amplitudes more significant than 2 mV (to avoid the influence of extreme clutter). The number of occupancy channels for different flow types was plotted in Fig. 7, with the colored shaded portion being the standard error band under this data. It is known that the bubble flow occupies the number of channels less than or equal to 15, the segmented plug flow occupies the number of channels greater than 15 less than or equal to 20, and the mixing flow occupies the number of channels greater than or equal to 25. Explained in physical phenomena, the bubble flow diameter is small, occupying a small number of measurement channels; segment plug flow indicates a large bubble tail followed by tiny bubbles, occupying a large ratio of measurement channels; mixing flow is a small and medium-sized type of bubbles chaotically filled with the entire pipeline part of the measurement, occupying the most significant number of measurement channels. The upper and lower error limits of the three flow types are clearly distinguished in the figure. However, the standard error bands when the segmented plug flow and the bubble flow have contact in the tenth set of data, due to the extreme error limits. The threshold above the division of occupied channels is consistent with physical phenomena. Number of occupied channels for different flow patterns n. For the Y-coordinate Doppler shift in Fig. 6, fifty sets of experimental data were taken for each flow type. The data were averaged into ten groups to screen out the range of variation of the amplitude shift at amplitudes more significant than 2 mV (to avoid the effect of extreme clutter) to plot the Doppler shift ranges for the different flow types shown in Fig. 8. It can be seen that the Doppler shift variations are less than or equal to 750 Hz for bubble flow, greater than 750 Hz and less than 1500 Hz for segmented plug flow, and greater than 2000 Hz for mixed flow. Bubble flows have smaller bubble diameters and small velocities at the bubble boundaries, resulting in a tiny Doppler shift range. Segmental plug flow has large bubble diameters and higher velocities at the bubble boundary, so the Doppler shift range is higher in segmental plug flow than in bubble flow. The reason why the Doppler shift range of the mixing flow is significantly higher than that of the other two is that the large bubbles in the segmented plug flow are torn apart to form several small and medium-sized bubbles in the process of rising and moving irregularly, which results in the velocity at the boundary of the bubbles to be significantly larger than that of the bubble flow and the segmented plug flow. The velocity distributions of the three flow patterns in the pipeline are significantly different from each other, and according to Eq. (2), the Doppler shift ranges of the three flow patterns are apparent. The standard errors are clearly distinguished, so the results are reliable. Doppler shift ranged volume Hz for different flow patterns. The Z-coordinate energy magnitude in Fig. 7 is not thresholded, taking into account the effect of impurities and wellbore piping. According to the previous analyses, the Doppler shift ranges Hz, and the number of channels n of the bubble flow, the segment plug flow, and the mixing flow have obvious range intervals. Table 4 shows a summary of the above threshold analyses. When the number of channels greater than 20 less than or equal to 25 and Doppler shift variations are greater than 1500 Hz and less than or equal to 2000 Hz, the flow pattern was transition zone between segmental flow and hybrid flow, the flow pattern are difficult to be clearly distinguished within this range. Table 4Summary of threshold analyses.Gas–liquid two-phase flow patternBubble flowSegmental flowTransition zoneHybrid flowNumber of occupied channels n≤ 1515 < n ≤ 2020 < n ≤ 2525 < nDoppler shift range F/Hz≤ 750750 < F ≤ 15001500 < F ≤ 20002000 ≤ F Summary of threshold analyses. In order to identify the flow pattern changes in the upper, middle, and lower parts of the wellbore tubing under different gas intrusion conditions, the ultrasound Doppler data were sampled and processed under the ventilated conditions in Table 3 to obtain the number of occupied channels n and the Doppler shift ranges Hz under different gas intrusion conditions as shown in Figs. 9 and 10. The ultrasound signals from the wellbore’s upper, middle, and lower parts at six gas intrusion velocities from 0.5 L/min to 3.0 L/min were recognized according to the threshold division intervals in Table 4. The results were obtained by identifying the number of channels in different condition, and identified according to the Doppler shift ranges compared with those taken with the high-speed camera in Table 3. Number of occupied channels at different air intrusion velocities n. Doppler shift Hz for different air intrusion velocities. Threshold setting is performed by analyzing and processing the Doppler shift range, and the number of occupied channels. Flow pattern identification is performed on the plotted time–frequency spectrograms. The time–frequency-amplitude analysis of different echo signals using STFT to extract the Doppler frequency shift from the echo signals. And then plot the time–frequency spectrograms, which can be obtained for bubble flow, segmented plug flow, and mixing flow. The horizontal coordinates show the measurement channel in which the bubbles (scatterers) are located when they are reflecting on the received acoustic signals. The vertical coordinates represent the frequency shifts between the emitted Doppler frequency and the received Doppler frequency. The legend represents the energy amplitude of the Doppler signal. As shown in Fig. 11, from top to bottom, the spectrograms of the upper part of the wellbore (left figure), middle (middle figure) and lower part (correct figure) at ventilation rates of 1.5 L/min, 2.0 L/min, 2.5 L/min and 3.0 L/min are in order (the temporal spectrograms of the three positions of the wellbore at 0.5 L/min and 1.0 L/min are identified as bubble flow, and therefore they are not shown). Take the time–frequency spectrum at a ventilation rate of 2.5 L/min as an example, the gas–liquid two-phase flow patterns in the lower, middle and upper parts of the wellbore pipeline are different in this time. There are three types of flow patterns in the pipeline, namely, bubble flow, segmented plug flow and mixing flow. There are no bubbles in this measurement channel when the spectrogram section shows dark blue. Within the lower time–frequency spectrogram, the energy amplitude occupies measurement channels between 25 and 35, fewer channels, and at this time the Doppler shift range is less than 750 Hz; within the time–frequency spectrogram in the center, the energy amplitude occupies the measurement channel between 10 and 30, when the Doppler shift range is about 1000 Hz; within the upper time–frequency spectrogram, the energy amplitude occupies the measurement channel between 20 and 45, when the Doppler shift range is about 2500 Hz, The results are consistent with the identification of bubble flow, segment plug flow, and mixing flow within Table 4, which verifies the reliability of the previous threshold classification for different flow types. Time–frequency plots for different air intrusion velocities. Summary and conclusions In this paper, a time–frequency analysis technique of ultrasound Doppler is proposed to identify the change of gas–liquid two-phase flow pattern in the pipeline under different gas intrusion conditions. An experimental platform for early gas intrusion monitoring is constructed, which consists of a drilling fluid pool and wellbore pipeline, etc. The gas–liquid experiments are carried out at intervals of 0.5 L/min for the gas intrusion rate in the pipeline, and the gas–liquid experiments are carried out at intervals of 0–3 L/min by adjusting the intrusion rate of gas in the pipeline and combining with ultrasound Doppler technique. The results are as follows: As gas intrusion occurs, ultrasound waves are reflected at the gas–liquid interface on the measurement axis, and the Doppler amplitude of the return signal changes significantly, achieving gas–liquid two-phase separation; As gas intrusion occurs, ultrasound waves are reflected at the gas–liquid interface on the measurement axis, and the Doppler amplitude of the return signal changes significantly, achieving gas–liquid two-phase separation; As the ventilation volume increases, the density of bubbles at the bottom of the pipeline increases, and the bubbles coalesce during the ascent process, evolving towards the trend of bubble flow-segment plug flow-mixed flow, thus occupying an increasing number of ultrasound measurement channels in the detection window; As the ventilation volume increases, the density of bubbles at the bottom of the pipeline increases, and the bubbles coalesce during the ascent process, evolving towards the trend of bubble flow-segment plug flow-mixed flow, thus occupying an increasing number of ultrasound measurement channels in the detection window; With different degrees of aggregation of bubbles in the process of rising, the bubble velocity distribution in the measurement axis is significantly different. The greater the velocity difference, the greater the Doppler frequency difference in the echo signal, the more significant the Doppler frequency shift; With different degrees of aggregation of bubbles in the process of rising, the bubble velocity distribution in the measurement axis is significantly different. The greater the velocity difference, the greater the Doppler frequency difference in the echo signal, the more significant the Doppler frequency shift; Setting thresholds for the differences in the number of occupied channels and Doppler shifts for different flow types, with the number of occupied channels for bubbles being less than 10 and the Doppler shift less than 750 Hz, the number of occupied channels for plugged flow being between 15 and 20, and the Doppler shift being between 750 and 1500 Hz, and the number of occupied channels for turbulent flow being more significant than 25, and the Doppler shift being more significant than 2000 Hz. By setting the thresholds for different flow types, we can identify the changes in bubble, slug, and hybrid flows in the wellbore tubing under different gas intrusions; Setting thresholds for the differences in the number of occupied channels and Doppler shifts for different flow types, with the number of occupied channels for bubbles being less than 10 and the Doppler shift less than 750 Hz, the number of occupied channels for plugged flow being between 15 and 20, and the Doppler shift being between 750 and 1500 Hz, and the number of occupied channels for turbulent flow being more significant than 25, and the Doppler shift being more significant than 2000 Hz. By setting the thresholds for different flow types, we can identify the changes in bubble, slug, and hybrid flows in the wellbore tubing under different gas intrusions; Using this method, the gas–liquid phases in the wellbore tubing under different gas intrusion conditions can be separated, the changes in the flow pattern of the gas–liquid two-phase flow are identified and monitored in real-time, and this method is expected to increase the time of the control operation in the gas intrusion event while kicking. Meanwhile the use of a single transducer avoids the influence on the drilling fluid in the tubing, as well as the cavitation of bubbles in the course of the complex acoustic wave propagation process. Author contributions Qing Liu performed the numerical experiments, analyzed the modeling results and wrote the manuscript; Guolang Shen, Qingfeng Guo and Lijun Geng proposed the re-search topic and supervised the entire project; Xiao Cai, Pengfei Li and Minglei Men offered assistance and suggestions in the conduct of the experiments. All authors have read and agreed to the published version of the manuscript. All authors have read and agreed to the published version of the manuscript. Funding The research work is financially supported by National Natural Science Foundation of China (No. 52265020), China National Petroleum Corporation Key Core Technology Major Scientific and Technological Breakthrough Project (No. 2024ZG35), Youth Science Foundation of Jiangxi Province (No. GJJ211345 and GJJ2400904). Data availability The datasets used and/or analysed during the current study available from the corresponding author on reasonable request. Declarations Competing interests The authors declare no competing interests. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. References Associated Data Data Availability Statement The datasets used and/or analysed during the current study available from the corresponding author on reasonable request.