Acoustic Wave-Based Method of Locating Tubing Leakage for Offshore Gas Wells

: This paper presents a novel acoustic wave-based method for the detection of leakage in downhole tubing of offshore gas wells. The localization model is developed on the basis of analyzing the propagation model of leakage acoustic waves and the critical factors in localization. The proposed method is validated using experimental laboratory investigations that are conducted to locate tubing leakage by setting ﬁve holes at different positions on the tubing wall. A detection system is developed for the leakage acoustic waves in the tubing-casing annulus, where one acoustic sensor is installed at the annulus top. Laboratory experimental results show that the depth of downhole leakage can be effectively located by using the proposed localization model. The localization errors are kept at a very low level, and are mainly generated from extracting the characteristic time and calculating annular acoustic velocity. A case study focusing on an offshore gas well is presented to illustrate the feasibility of the proposed method, and to demonstrate that the proposed model can locate the liquid level and leakage points under ﬁeld conditions. The test can be performed without interrupting the production of gas wells.


Introduction
Downhole tubing is an important structure in a gas well and provides a flow path for natural gas in a reservoir. Downhole tubing is susceptible to leakage due to downhole operation, corrosion, and aging. Tubing leakage is a common issue, especially in offshore gas fields [1]. A case study of the Gulf of Mexico Outer Continental Shelf shows that such leaks will cause sustainable annulus pressure, interrupt the safe production of natural gas, and even result in blowout incidents [2,3]. Therefore, addressing downhole leakage is necessary to guarantee the safe operation of gas wells and further enhance the integrity management of offshore gas wells.
In general, downhole leaks are detected by measuring and analyzing the abnormal signals that are generated as leak flow moves through holes in the tubing, e.g., temperature, flow rate, and acoustic signals. Traditional logging methods, including flowmeter logging [4], temperature logging, ultrasonic logging [5], noise logging [6], and the integrated approach [7], can be used to measure abnormal signals by placing logging tools in the tubing. The abnormal signals in the tubing are measured and recorded by the sensors installed on the logging tools during lifting. The positions that correspond to the abnormal signals are considered as the depth of the leakage. However, the logging methods do not always produce the best results and might provide questionable results to operators. Recently, distributed sensor arrays (such as hydrophone, fiber-optic acoustic sensor, and fiber-optic temperature sensor) have been applied to measure these signals in onshore oil and gas wells [8][9][10]. Leakage is detected by performing beamforming and comprehensive analysis of the signals measured

Principles
As shown in Figure 1, the wellbore consists of several concentric tubular columns. The annular space between the adjacent tube strings is known as the annulus. Under normal conditions, the natural gas in the reservoir completely flows to the wellhead through the tubing and then flows into the next pipeline through the Christmas tree. When tubing leaks, natural gas will leak into the tubingcasing annulus. Figure 1. Schematic of the wellbore structure [24] and the detection principle of tubing leakage acoustic waves. Acoustic waves will be generated by tubing leakage and then propagated in the wellbore. As shown, acoustic waves have four propagation paths, namely tubing fluids, tubing, annulus fluids, and production casing. The acoustic waves can be monitored by acoustic sensors installed in these media. However, the acoustic sensor cannot be easily installed in the tubing fluids during production. The cement sheath outside the production casing would affect the measurement of acoustic waves that propagate in the casing [25]. The vibration of the tubing causes difficulties in installing the sensor and measuring the acoustic waves. Installing the sensor in the annulus to monitor acoustic waves in the annulus is the best way to detect the leakage waves [26]. Figure 1 shows the schematic of the proposed method. With the use of a designed device, the microphone sensor is placed in the annulus. The leakage waves that propagate in the annulus are collected at the ground.
The tubing-production casing annulus is a closed space, both ends of which are sealed through the tubing spool and packer fluid. Two main reflecting discontinuities in the annulus are the liquid surface and tubing hanger. The leakage acoustic waves will travel upward and downward in the annulus simultaneously. The portion of the acoustic waves that travel to the annular top will be reflected by the tubing hanger and travel down to the liquid level. Similarly, the portion of the acoustic waves that travel to the annular liquid level will be reflected and travel to the top. These processes will continue until the acoustic energy is completely attenuated. As shown in Figure 2, three types of propagation modes of leakage acoustic waves in the annulus are analyzed. P1 is the portion of acoustic waves traveling downward and then upward. P2 is the portion of acoustic waves traveling upward. P3 represents the acoustic waves after multiple reflections. Therefore, the signals gathered by the microphone sensor simultaneously contain P1, P2, and P3. A time delay exists when Figure 1. Schematic of the wellbore structure [24] and the detection principle of tubing leakage acoustic waves. Acoustic waves will be generated by tubing leakage and then propagated in the wellbore. As shown, acoustic waves have four propagation paths, namely tubing fluids, tubing, annulus fluids, and production casing. The acoustic waves can be monitored by acoustic sensors installed in these media. However, the acoustic sensor cannot be easily installed in the tubing fluids during production. The cement sheath outside the production casing would affect the measurement of acoustic waves that propagate in the casing [25]. The vibration of the tubing causes difficulties in installing the sensor and measuring the acoustic waves. Installing the sensor in the annulus to monitor acoustic waves in the annulus is the best way to detect the leakage waves [26]. Figure 1 shows the schematic of the proposed method. With the use of a designed device, the microphone sensor is placed in the annulus. The leakage waves that propagate in the annulus are collected at the ground.
The tubing-production casing annulus is a closed space, both ends of which are sealed through the tubing spool and packer fluid. Two main reflecting discontinuities in the annulus are the liquid surface and tubing hanger. The leakage acoustic waves will travel upward and downward in the annulus simultaneously. The portion of the acoustic waves that travel to the annular top will be reflected by the tubing hanger and travel down to the liquid level. Similarly, the portion of the acoustic waves that travel to the annular liquid level will be reflected and travel to the top. These processes will continue until the acoustic energy is completely attenuated. As shown in Figure 2, three types of propagation modes of leakage acoustic waves in the annulus are analyzed. P1 is the portion of acoustic waves traveling downward and then upward. P2 is the portion of acoustic waves traveling upward. P3 represents the acoustic waves after multiple reflections. Therefore, the signals gathered by the microphone sensor simultaneously contain P1, P2, and P3. A time delay exists when P1, P2, and P3 propagate to the microphone sensor, which can be obtained through proper signal processing. The process will be described later.
Energies 2018, 11, x FOR PEER REVIEW 4 of 22 P1, P2, and P3 propagate to the microphone sensor, which can be obtained through proper signal processing. The process will be described later. The following expressions show the relationship between the distances in Figure 2: where v is the average acoustic velocity in the annulus (m/s); t1 is the time delay between P1 and P2, which is equal to the travel time of the acoustic waves from the leak depth to the liquid level then back to the leak depth (s); t2 is the time delay in P3, which is equal to the travel time of the acoustic waves from the tubing hanger to the liquid level then back to the tubing hanger (s); L is the liquid level in annulus (m); and x is the leak depth (m). The leak depth can be expressed by Therefore, the critical factors for the accurate localization of tubing leakage using this method are the characteristic time (t1 and t2) and acoustic velocity in the annulus.

Acoustic Velocity in the Annulus
American Gas Association (AGA) Report 10 gives the acoustic velocity of natural gas [27], which is mainly affected by the composition, temperature, and pressure of the gas. The following expressions show the relationship between the distances in Figure 2: where v is the average acoustic velocity in the annulus (m/s); t 1 is the time delay between P1 and P2, which is equal to the travel time of the acoustic waves from the leak depth to the liquid level then back to the leak depth (s); t 2 is the time delay in P3, which is equal to the travel time of the acoustic waves from the tubing hanger to the liquid level then back to the tubing hanger (s); L is the liquid level in annulus (m); and x is the leak depth (m). The leak depth can be expressed by Therefore, the critical factors for the accurate localization of tubing leakage using this method are the characteristic time (t 1 and t 2 ) and acoustic velocity in the annulus.

Acoustic Velocity in the Annulus
American Gas Association (AGA) Report 10 gives the acoustic velocity of natural gas [27], which is mainly affected by the composition, temperature, and pressure of the gas.
where k is the ratio of specific heats (dimensionless), R is the mole gas constant (J/(mol·K)), M g is the molar mass of natural gas (kg/mol), T is the gas temperature (K), Z g is the compressibility factor of natural gas (dimensionless), and ρ is the gas molar density (mol/m 3 ). The molar density and compressibility factor are calculated by the empirical equations proposed by Coquelet [28], which utilize the PR equation of state. Before calculating the acoustic velocity in the annulus, the annular temperature and pressure need to be determined.

Temperature Distribution in Annulus
Heat transfer occurs between the production fluids and the surrounding media in a flowing well due to the temperature difference. The temperature distribution in the wellbore can be derived on the basis of the fluid-energy balance and heat transfer equations. It is assumed that [29,30] (1) the heat transfer in the wellbore is in a steady state, while the heat transfer from wellbore to the formation is in a non-steady state; (2) only radial heat transfer is considered; and (3) the formation temperature varies proportionally with depth. Therefore, the equilibrium equation for the element dH, which is shown in Figure 3, can be expressed as where T f is the tubing fluid temperature (K), H is the measured well depth (m), c pm is the heat capacity of the tubing fluid at constant pressure (J/(mol·K)), Q is the heat flow rate (J/s), w t is the mass flow rate (kg/s), g is the gravitational constant (m/s 2 ), θ is the angle of inclination (degrees), u is the gas velocity (m/s), C J is the Joule-Thomson coefficient (K/Pa), and p f is the pressure in the tubing (Pa). Heat transfer occurs between the production fluids and the surrounding media in a flowing well due to the temperature difference. The temperature distribution in the wellbore can be derived on the basis of the fluid-energy balance and heat transfer equations. It is assumed that [29,30] (1) the heat transfer in the wellbore is in a steady state, while the heat transfer from wellbore to the formation is in a non-steady state; (2) only radial heat transfer is considered; and (3) the formation temperature varies proportionally with depth. Therefore, the equilibrium equation for the element dH, which is shown in Figure 3, can be expressed as where Tf is the tubing fluid temperature (K), H is the measured well depth (m), cpm is the heat capacity of the tubing fluid at constant pressure (J/(mol·K)), Q is the heat flow rate (J/s), wt is the mass flow rate (kg/s), g is the gravitational constant (m/s 2 ), θ is the angle of inclination (degrees), u is the gas velocity (m/s), CJ is the Joule-Thomson coefficient (K/Pa), and pf is the pressure in the tubing (Pa). On the basis of the principles of heat transfer, the heat transfers from tubing fluids to the cementformation interface, and from this interface to formation can be described by  On the basis of the principles of heat transfer, the heat transfers from tubing fluids to the cement-formation interface, and from this interface to formation can be described by where U is the overall heat transfer coefficient, which is related to the heat resistance from the structures between the tubing fluids and the formation [32,33] (W/(m 2 ·K)); r ti is the inner radius of the tubing (m); K e is the thermal conductivity of the formation (W/(m·K)); D(t) is the dimensionless temperature function [34]; T cfi is the temperature at the interface (K); and T e is the formation temperature (K). Combining Equations (4) and (5), the following differential equation can be obtained: where A = 2π c pm w t r ti UK e K e +r ti UD(t) and φ = C J dp f dH − udu c pm dH , which can be calculated by an empirical formula [31].
Then, the iterative formula for the temperature of tubing fluids can be derived by solving Equation (6).
Similarly, the heat transfer from outside of the tubing to the cement-formation interface, and from the inside of the casing to this interface, can be expressed as where U 1 is the heat transfer coefficient between the outer tubing surface and the cement-formation interface (W/(m 2 ·K)), U 2 is the heat transfer coefficient between the inner casing surface and the cement-formation interface (W/(m 2 ·K)), r to is the outer radius of the tubing (m), r ci is the inner radius of the casing (m), T to is the temperature at the outer tubing surface (K), and T ci is the temperature at the inner casing surface (K).
Combining Equations (5) and (8) obtains the expression of annular temperature

Pressure Distribution in the Annulus
The annulus pressure can be calculated by using the integration method [24], which can be expressed as dp a dH = gρ g sin θ where p a is the annulus pressure (Pa) and ρ g is the natural gas density (kg/m 3 ). The annular gas density can be derived from the gas state equation Substituting Equation (11) into Equation (10) and making an integral, the annulus pressure in element dH can be obtained.
where p ai represents the outlet pressure of segment i, which is equal to the inlet pressure of segment i + 1. As shown in Figure 3b, the wellbore is first divided into N segments from the wellhead to the bottom-hole. The parameters of every segment can be obtained by successive iterations using Equations (9) and (12). After obtaining the annular temperature and pressure, the acoustic velocity in the annulus can be calculated.

Extraction of Characteristic Time
Original signals usually contain noise. This noise affects the accuracy of characteristic time extraction and must be eliminated. In this paper, the wavelet threshold de-noising method is used to filter noise in original signals. With the use of wavelet decomposition, wavelet coefficients correction, and wavelet reconstruction, the noise can be largely eliminated [35]. When performing wavelet decomposition, the db10 wavelet is used as the wavelet basis, and the decomposition level is five.
The autocorrelation function can reflect the correlation of two values of a random signal at the time interval τ [36], which is defined by where τ is the time delay. In practice, R ss (τ) can only be estimated, and the basic estimator is given by where Tim is the time window. Generally, the autocorrelation function is expressed in a normalized form [37]. It is defined as which means that ρ ss (τ) will reach the peak value if s(t) and s(t + τ) are correlated. Theoretically, the leakage acoustic signals generated at the same position and time are strongly correlated, whereas those generated at different positions or different times lack correlation. Therefore, the characteristic time can be obtained through autocorrelation analysis of de-noised signals.
Next, t 1 and t 2 are obtained by extracting the extreme values of ρ ss (τ). Figure 4 shows the autocorrelation curve of the acoustic signals collected in tubing leakage. The method of extracting the characteristic time is presented, with t 1 corresponding to the first negative peak and t 2 corresponding to the first positive peak in the autocorrelation curve.  Figure 4 shows the autocorrelation curve of the acoustic signals collected in tubing leakage. The method of extracting the characteristic time is presented, with t1 corresponding to the first negative peak and t2 corresponding to the first positive peak in the autocorrelation curve.

Model for Locating Downhole Tubing Leakage
As analyzed in Section 2.2, the temperature and pressure in the testing annulus can be expressed as a function of depth and time. Generally, the acoustic waves reach the wellhead in seconds. During this time, the state parameters of the annular gas do not change. Therefore, the acoustic velocity in the annulus can be expressed as a single-valued function of depth.
Equation (1) can be rewritten as The liquid level L and leakage depth x can be obtained by solving Equation (16). The following functions are established.
Then, the problem is transformed into solving φ(L) = 0 and ϕ(x) = 0, which can be achieved by using the dichotomy searching method [38].
In summary, as shown in Figure 5, the locating procedures are divided into three steps: Step 1: Acoustic velocity and characteristic time are calculated. First, the temperature and pressure distributions in the annulus are obtained based on wellhead temperature, pressure, and the specific gravity of production gas, using Equations (9) and (12). The acoustic velocity distribution in the annulus is calculated using Equation (3). Then, noise reduction and autocorrelation analysis are performed on the measured acoustic signals. The characteristic times t 1 and t 2 are extracted from the autocorrelation curves according to the method proposed in Section 2.3.
Step 2: The liquid level is calculated. The liquid level is acquired by solving the first function in Equation (17), with the use of the dichotomy searching method. The value L mid is equal to (L 1 + L 2 )/2 in each iterative step.
Step 3: Leak depth is calculated. The leak depth is obtained by solving the second function in Equation (17), with the use of the dichotomy searching method. The value x mid is equal to (x 1 + x 2 )/2.

Experimental System
To study the effectiveness of the proposed method, a series of laboratory experiments were designed and conducted with the experimental system, as shown in Figures 6 and 7. The system contained a 47 m long tube string, tubing spool, gate valve, a set of compressors, high-pressure and low-pressure buffer tanks, many valves, and an acoustic data acquisition system. The tube string was a double-layered structure. Tubing with an outer diameter of 88.9 mm and casing with an outer diameter of 244.5 mm were used to simulate the wellbore structure, to which a full-scale tubing spool was connected at one end and sealed on the other. To simulate the liquid level in the annulus, a bent tube filled with water was added to the end of the tube string. A completely sealed annulus with a length of 46.9 m was formed. The experimental platform was horizontally placed, and the distance between the tubing spool and leak points on the tubing was the simulated depth of the leak location.

Experimental System
To study the effectiveness of the proposed method, a series of laboratory experiments were designed and conducted with the experimental system, as shown in Figures 6 and 7. The system contained a 47 m long tube string, tubing spool, gate valve, a set of compressors, high-pressure and low-pressure buffer tanks, many valves, and an acoustic data acquisition system. The tube string was a double-layered structure. Tubing with an outer diameter of 88.9 mm and casing with an outer diameter of 244.5 mm were used to simulate the wellbore structure, to which a full-scale tubing spool was connected at one end and sealed on the other. To simulate the liquid level in the annulus, a bent tube filled with water was added to the end of the tube string. A completely sealed annulus with a length of 46.9 m was formed. The experimental platform was horizontally placed, and the distance between the tubing spool and leak points on the tubing was the simulated depth of the leak location.  Compressed nitrogen was used as the gas source in the experiments, which was generated by a nitrogen generator and stored in low-pressure buffer tanks. Before the experiments, the gas was compressed and injected into high-pressure buffer tanks. From the high-pressure buffer tanks, the gas entered the tubing strings, flowed into the terminal buffer tank, and was finally discharged into the environment. The data acquisition system contained an acoustic sensor, a signal conditioner, a data acquisition unit, and a computer. A CHZ401 pre-polarized condenser microphone with YG-401 preamplifier was chosen, with a sensitivity of 2.85 mV/Pa. The lower frequency response of the microphone was 1 Hz and the lower detection limit was 36 dB. The signal conditioner was a PM20B, which was manufactured by Beijing Acoustic Technology Company (Beijing, China), who also manufactured the microphone. A MCC E-1608 DAQ device was used to collect data. As shown in Figure 7, the acoustic sensor was installed in the annulus top using a designed device.
In addition, a Rosemount 644H temperature transmitter and 3051T pressure transmitter were used to monitor the corresponding parameters in the annulus and the tubing.

Experimental Design
As shown in Figure 8, five leak positions were set on the tubing string and were labeled a, b, c,   Compressed nitrogen was used as the gas source in the experiments, which was generated by a nitrogen generator and stored in low-pressure buffer tanks. Before the experiments, the gas was compressed and injected into high-pressure buffer tanks. From the high-pressure buffer tanks, the gas entered the tubing strings, flowed into the terminal buffer tank, and was finally discharged into the environment. The data acquisition system contained an acoustic sensor, a signal conditioner, a data acquisition unit, and a computer. A CHZ401 pre-polarized condenser microphone with YG-401 preamplifier was chosen, with a sensitivity of 2.85 mV/Pa. The lower frequency response of the microphone was 1 Hz and the lower detection limit was 36 dB. The signal conditioner was a PM20B, which was manufactured by Beijing Acoustic Technology Company (Beijing, China), who also manufactured the microphone. A MCC E-1608 DAQ device was used to collect data. As shown in Figure 7, the acoustic sensor was installed in the annulus top using a designed device.
In addition, a Rosemount 644H temperature transmitter and 3051T pressure transmitter were used to monitor the corresponding parameters in the annulus and the tubing.

Experimental Design
As shown in Figure 8  Compressed nitrogen was used as the gas source in the experiments, which was generated by a nitrogen generator and stored in low-pressure buffer tanks. Before the experiments, the gas was compressed and injected into high-pressure buffer tanks. From the high-pressure buffer tanks, the gas entered the tubing strings, flowed into the terminal buffer tank, and was finally discharged into the environment. The data acquisition system contained an acoustic sensor, a signal conditioner, a data acquisition unit, and a computer. A CHZ401 pre-polarized condenser microphone with YG-401 preamplifier was chosen, with a sensitivity of 2.85 mV/Pa. The lower frequency response of the microphone was 1 Hz and the lower detection limit was 36 dB. The signal conditioner was a PM20B, which was manufactured by Beijing Acoustic Technology Company (Beijing, China), who also manufactured the microphone. A MCC E-1608 DAQ device was used to collect data. As shown in Figure 7, the acoustic sensor was installed in the annulus top using a designed device.
In addition, a Rosemount 644H temperature transmitter and 3051T pressure transmitter were used to monitor the corresponding parameters in the annulus and the tubing.

Experimental Design
As shown in Figure 8, five leak positions were set on the tubing string and were labeled a, b, c, d, and e. The distances between the acoustic sensor and the five positions were 45.75, 42.18, 39.18, 35.84, and 32.84 m, respectively. Only one hole leaked in each experiment. When the gas flowed through the tubing, some nitrogen would leak into the annulus, and acoustic waves would be generated and measured.
Energies 2018, 11, x FOR PEER REVIEW 11 of 22 through the tubing, some nitrogen would leak into the annulus, and acoustic waves would be generated and measured.  Table 1 shows the experimental design, in which the controlled variables are leak depth, orifice diameter, and differential pressure. The differential pressure refers to the difference between the tubing pressure and the casing pressure. During experiments, the gas supply was stopped when the differential pressure reached a certain level, as shown in Figure 9. The acoustic signals were measured when the differential pressure in the BC segment reached the preset values. The sampling frequency of the acoustic signals was 30,000 Hz, and the sampling frequency of the pressure and temperature signals was 10 Hz. The measurements were repeated several times to ensure reproducibility.

Experimental Results and Discussion
The acoustic signals collected at the annulus top were analyzed before making localization analysis. Figure 10 shows the time and frequency domain distributions of acoustic signals collected at leak position a, at a differential pressure of 2.0 MPa and orifice diameter of 1.5 mm. The leak acoustic signals are random signals with a broadband frequency. The collected acoustic signals are mainly distributed in multiple frequency bands of 0-2500 Hz, and the energies are mainly distributed  Table 1 shows the experimental design, in which the controlled variables are leak depth, orifice diameter, and differential pressure. The differential pressure refers to the difference between the tubing pressure and the casing pressure. During experiments, the gas supply was stopped when the differential pressure reached a certain level, as shown in Figure 9. The acoustic signals were measured when the differential pressure in the BC segment reached the preset values. The sampling frequency of the acoustic signals was 30,000 Hz, and the sampling frequency of the pressure and temperature signals was 10 Hz. The measurements were repeated several times to ensure reproducibility. through the tubing, some nitrogen would leak into the annulus, and acoustic waves would be generated and measured.  Table 1 shows the experimental design, in which the controlled variables are leak depth, orifice diameter, and differential pressure. The differential pressure refers to the difference between the tubing pressure and the casing pressure. During experiments, the gas supply was stopped when the differential pressure reached a certain level, as shown in Figure 9. The acoustic signals were measured when the differential pressure in the BC segment reached the preset values. The sampling frequency of the acoustic signals was 30,000 Hz, and the sampling frequency of the pressure and temperature signals was 10 Hz. The measurements were repeated several times to ensure reproducibility.

Experimental Results and Discussion
The acoustic signals collected at the annulus top were analyzed before making localization analysis. Figure 10 shows the time and frequency domain distributions of acoustic signals collected at leak position a, at a differential pressure of 2.0 MPa and orifice diameter of 1.5 mm. The leak acoustic signals are random signals with a broadband frequency. The collected acoustic signals are mainly distributed in multiple frequency bands of 0-2500 Hz, and the energies are mainly distributed in the range of 0-130 Hz.

Experimental Results and Discussion
The acoustic signals collected at the annulus top were analyzed before making localization analysis. Figure 10 shows the time and frequency domain distributions of acoustic signals collected at leak position a, at a differential pressure of 2.0 MPa and orifice diameter of 1.5 mm. The leak acoustic signals are random signals with a broadband frequency. The collected acoustic signals are mainly

Leak Localization for Different Positions
First, the acoustic velocity in the annulus was calculated based on Equation (3). As shown in Figure 11, the acoustic velocities in the experimental annulus are approximately 357 m s −1 to 359 m s −1 . Then, the characteristic time was extracted, as shown in Figure 12a-e. After repeated verification, the optimal time window in the autocorrelation analysis was set as 0.4 s. A threshold for autocorrelation coefficients was set when extracting t1 and t2. The threshold was ±0.3. The characteristic time t1 varies with the leak positions, while t2 has the same value. This is due to the fact that t1 characterizes the distance between the leak point and liquid level, while t2 characterizes the length of the annulus (i.e., liquid level). Figure 13 shows the theoretically predicted and extraction values of t1 and t2. The predicted values were calculated on the basis of Equation (16). When the leak point approaches the wellhead, the characteristic time t1 becomes larger. Conversely, the characteristic time t1 approaches zero. When t1 is small enough, the liquid level can be considered as the leak depth. As shown, the errors of extracting t1 are −2.44% to −0.20%, and the errors of extracting t2 are −1.14% to −0.37%.

Leak Localization for Different Positions
First, the acoustic velocity in the annulus was calculated based on Equation (3). As shown in Figure 11, the acoustic velocities in the experimental annulus are approximately 357 m s −1 to 359 m s −1 .

Leak Localization for Different Positions
First, the acoustic velocity in the annulus was calculated based on Equation (3). As shown in Figure 11, the acoustic velocities in the experimental annulus are approximately 357 m s −1 to 359 m s −1 . Then, the characteristic time was extracted, as shown in Figure 12a-e. After repeated verification, the optimal time window in the autocorrelation analysis was set as 0.4 s. A threshold for autocorrelation coefficients was set when extracting t1 and t2. The threshold was ±0.3. The characteristic time t1 varies with the leak positions, while t2 has the same value. This is due to the fact that t1 characterizes the distance between the leak point and liquid level, while t2 characterizes the length of the annulus (i.e., liquid level). Figure 13 shows the theoretically predicted and extraction values of t1 and t2. The predicted values were calculated on the basis of Equation (16). When the leak point approaches the wellhead, the characteristic time t1 becomes larger. Conversely, the characteristic time t1 approaches zero. When t1 is small enough, the liquid level can be considered as the leak depth. As shown, the errors of extracting t1 are −2.44% to −0.20%, and the errors of extracting t2 are −1.14% to −0.37%. Then, the characteristic time was extracted, as shown in Figure 12a-e. After repeated verification, the optimal time window in the autocorrelation analysis was set as 0.4 s. A threshold for autocorrelation coefficients was set when extracting t 1 and t 2 . The threshold was ±0.3. The characteristic time t 1 varies with the leak positions, while t 2 has the same value. This is due to the fact that t 1 characterizes the distance between the leak point and liquid level, while t 2 characterizes the length of the annulus (i.e., liquid level). Figure 13 shows the theoretically predicted and extraction values of t 1 and t 2 . The predicted values were calculated on the basis of Equation (16). When the leak point approaches the wellhead, the characteristic time t 1 becomes larger. Conversely, the characteristic time t 1 approaches zero. When t 1 is small enough, the liquid level can be considered as the leak depth. As shown, the errors of extracting t 1 are −2.44% to −0.20%, and the errors of extracting t 2 are −1.14% to −0.37%.   Table 2 shows the localization results, in which the relative error is equal to the ratio between the distance difference and the actual length of the annulus. The distance difference is equal to the calculated distance minus the actual value. As shown, the leak points are effectively located. The absolute location error is on the order of cm. The relative errors generated in calculating the annulus length are −1.14% to −0.37%, and the relative errors for locating leaks are −0.97% to −0.33%. The errors generated in calculating annulus length are equal to the errors of extracting t2. The negative sign means that the calculated distances are smaller than the actual distances.   Table 2 shows the localization results, in which the relative error is equal to the ratio between the distance difference and the actual length of the annulus. The distance difference is equal to the calculated distance minus the actual value. As shown, the leak points are effectively located. The absolute location error is on the order of cm. The relative errors generated in calculating the annulus length are −1.14% to −0.37%, and the relative errors for locating leaks are −0.97% to −0.33%. The errors generated in calculating annulus length are equal to the errors of extracting t2. The negative sign means that the calculated distances are smaller than the actual distances.  Table 2 shows the localization results, in which the relative error is equal to the ratio between the distance difference and the actual length of the annulus. The distance difference is equal to the calculated distance minus the actual value. As shown, the leak points are effectively located. The absolute location error is on the order of cm. The relative errors generated in calculating the annulus length are −1.14% to −0.37%, and the relative errors for locating leaks are −0.97% to −0.33%. The errors generated in calculating annulus length are equal to the errors of extracting t 2 . The negative sign means that the calculated distances are smaller than the actual distances.

Leak Localization for Different Differential Pressures
The autocorrelation coefficients of the acoustic signals generated at different differential pressures are shown in Figure 14a-f. The theoretically predicted and extraction values for t 1 and t 2 are shown in Figure 15. The predicted values of t 1 and t 2 increase with differential pressure, because the large differential pressure corresponds to a small annulus pressure. This will result in a large propagation velocity and short propagation time for the leakage acoustic waves. The errors of extracting t 1 are −1.94% to −0.81%, and the errors of extracting t 2 are −1.07% to −0.82%. Moreover, the curves still have slight fluctuations even if the measured signals are subjected to noise reduction. The fluctuations are relatively obvious, especially when the differential pressure decreases. Thus, to extract the characteristic time more easily, the differential pressure should be increased as much as possible. In field testing, this can be actualized by bleeding the annulus pressure.     Figure 16 shows the autocorrelation curves of the measured signals for different orifice diameters. Figure 17 shows the corresponding characteristic time. Theoretically, t1 and t2 should be consistent for different orifice diameters, because the propagation of leakage acoustic waves is not affected by the leak size. Nevertheless, slight differences exist among the predicated values due to the difference in annular pressure and temperature in each experiment. The feature points are apparent and easily determined, even under the orifice diameter of 0.5 mm. In other words, a small leakage can be identified. From Figure 16, the errors of extracting t1 are 0.64% to 2.32%, and the errors of t2 are −1.59% to −0.45%.

Leak Localization for Different Orifice Diameters
The localization results for different orifice diameters are also shown in Table 2. The absolute location error is on the order of cm. The relative errors generated in calculating the annulus length are −1.59% to −0.45%, and the relative errors for locating leaks are −1.97% to −0.56%. For the leak hole of 0.5 mm, the locating accuracy is still high. The localization results for different differential pressures are shown in Table 2. The absolute location error is on the order of cm. The relative errors generated in calculating annulus length are −1.07% to −0.82%, and the relative errors for locating leaks are −0.92% to −0.55%. Figure 16 shows the autocorrelation curves of the measured signals for different orifice diameters. Figure 17 shows the corresponding characteristic time. Theoretically, t 1 and t 2 should be consistent for different orifice diameters, because the propagation of leakage acoustic waves is not affected by the leak size. Nevertheless, slight differences exist among the predicated values due to the difference in annular pressure and temperature in each experiment. The feature points are apparent and easily determined, even under the orifice diameter of 0.5 mm. In other words, a small leakage can be identified. From Figure 16, the errors of extracting t 1 are 0.64% to 2.32%, and the errors of t 2 are −1.59% to −0.45%.    The errors generated in locating leaks results from the distance measurement and distance calculation. The reasons mainly come from the following aspects:

Leak Localization for Different Orifice Diameters
1. Errors in measuring actual distance. The errors are caused by the system design and distance measurement, which occur in the laboratory experiments only. This type of error can be greatly reduced by repeating measurements.
• Extraction of the characteristic time. This type of error comes from signal measurement, signal processing, and characteristic time extraction.
Errors in measuring acoustic signals are caused by internal and external factors. The internal factors come from the signal acquisition system, which affects the comprehensiveness and authenticity of the measured signals. The external factors include environmental noise, airflow noise, and facility operation noise. This noise mixes with the useful signals and is difficult to eliminate completely.
Wavelet threshold denoising and autocorrelation analysis are the primary error sources in signal processing. The wavelet scale and the threshold decide the frequency band and amplitude of the The localization results for different orifice diameters are also shown in Table 2. The absolute location error is on the order of cm. The relative errors generated in calculating the annulus length are −1.59% to −0.45%, and the relative errors for locating leaks are −1.97% to −0.56%. For the leak hole of 0.5 mm, the locating accuracy is still high.
The errors generated in locating leaks results from the distance measurement and distance calculation. The reasons mainly come from the following aspects: 1. Errors in measuring actual distance. The errors are caused by the system design and distance measurement, which occur in the laboratory experiments only. This type of error can be greatly reduced by repeating measurements.
• Extraction of the characteristic time. This type of error comes from signal measurement, signal processing, and characteristic time extraction.
Errors in measuring acoustic signals are caused by internal and external factors. The internal factors come from the signal acquisition system, which affects the comprehensiveness and authenticity of the measured signals. The external factors include environmental noise, airflow noise, and facility operation noise. This noise mixes with the useful signals and is difficult to eliminate completely.
Wavelet threshold denoising and autocorrelation analysis are the primary error sources in signal processing. The wavelet scale and the threshold decide the frequency band and amplitude of the signals used for autocorrelation analysis. A large scale will make the signals smooth but have less information. Generally, the scale should be set to make the frequency band of de-noised signals locate in the 1-130 Hz range.
Errors generated in extracting t 1 and t 2 come from the interference of abnormal fluctuations on the autocorrelation curves. These fluctuations are caused by the echoes of the collars and obstacles in the annulus and some periodic interference signals. The fluctuations affect the precise extraction of t 1 and t 2 .
• Calculation of the acoustic velocity in the annulus. The acoustic velocity increases with temperature and pressure. The accuracy of measuring annular temperature and pressure affects the calculation of acoustic velocity, and further affects the localization. The experimental nitrogen had a purity of 99.9%, which is considered as pure nitrogen during calculations. This approximate approach will produce errors as well.
Although the errors of each factor are difficult to quantify, the total errors are known. As mentioned above, the errors of t 1 and t 2 can be quantified. The errors of t 2 are equal to the errors in calculating the annulus length. This shows that the errors of t 1 and t 2 are actually the combination of errors in calculating acoustic velocity and extracting characteristic time, and the errors in the process of locating leakages are smaller than the errors of t 1 . The total error is reduced during the localization process. Consequently, the process of extracting characteristic time and calculating acoustic velocity are the main error sources for this method.
To reduce the errors, relevant measures should be taken. First, the signal acquisition system and denoising method should be improved. Appropriate sampling frequency and time windows must be set to acquire more comprehensive leakage signals and characteristic time. Then, the temperature, pressure, and composition of annulus gas must be accurately measured or calculated.
Despite the above errors, this method is proven to be applicable in effectively locating leaks in downhole tubing.

Description of Field Test
To verify the applicability of the proposed method in the field, an offshore gas well with serious tubing-casing annulus pressure was selected as a case study for analysis. The bleeding-off and build-up history of the annulus pressure shows that the annulus pressure is caused by downhole leakage. The pressure at the annulus top is almost equal to the pressure at the wellhead. The parameters of the gas well are shown in Table 3. A test system was designed as shown in Figure 18. The type and installation of the acoustic sensor was the same as the laboratory experiments. As shown in Figure 18a, the flange was first connected to the gate valve, and the gate valve was opened slowly. Then the sensor was pushed into the annulus along the flow passage by rotating the driving gear. To adapt the field conditions, the signal conditioner, data acquisition unit, and power supply were integrated in an explosion-proof box.  Before testing, the annulus pressure needs to be relieved to form a large differential pressure between the tubing and the annulus. The sample frequency was set as 30,000 Hz. The temperature and pressure at the annulus top were measured during testing, as listed in Table 3. Before testing, the annulus pressure needs to be relieved to form a large differential pressure between the tubing and the annulus. The sample frequency was set as 30,000 Hz. The temperature and pressure at the annulus top were measured during testing, as listed in Table 3.

Field Results and Discussion
First, the acoustic velocity distribution along the annulus was calculated on the basis of the method mentioned in Section 2.2, as shown in Figure 19. The acoustic velocity varied from 415 m/s to 455 m/s and increased with depth. Before testing, the annulus pressure needs to be relieved to form a large differential pressure between the tubing and the annulus. The sample frequency was set as 30,000 Hz. The temperature and pressure at the annulus top were measured during testing, as listed in Table 3.

Field Results and Discussion
First, the acoustic velocity distribution along the annulus was calculated on the basis of the method mentioned in Section 2.2, as shown in Figure 19. The acoustic velocity varied from 415 m/s to 455 m/s and increased with depth.  Then, the characteristic time was extracted, as shown in Figure 20. The curve has the same distribution features as the laboratory experiments, but with more interference. This interference is mainly caused by the echoes of collars, the subsurface safety valve, and other obstacles in the annulus. The threshold for the autocorrelation coefficient was set to ±0.3. The extraction results are shown in Table 4. Notably, a significant positive peak S also exists on the curve. A comparison with the downhole string information shows that the S peak is caused by the echo of the subsurface safety valve. Then, the characteristic time was extracted, as shown in Figure 20. The curve has the same distribution features as the laboratory experiments, but with more interference. This interference is mainly caused by the echoes of collars, the subsurface safety valve, and other obstacles in the annulus. The threshold for the autocorrelation coefficient was set to ±0.3. The extraction results are shown in Table 4. Notably, a significant positive peak S also exists on the curve. A comparison with the downhole string information shows that the S peak is caused by the echo of the subsurface safety valve.  Finally, the liquid level and the depth of S were calculated in step 2, as mentioned in the Section  Finally, the liquid level and the depth of S were calculated in step 2, as mentioned in the Section 2.4, and the leakage depth was calculated in step 3. As shown in Table 4, the testing well has leak points at depths of 1799.80 m. The liquid level in the tubing-production casing annulus is 2207.98 m. No excess structures exist, except for the tubing string around the leakage depth, as indicated by a comparison of the well completion information. The calculation depth of S is 240.57 m, which agrees with the depth of the subsurface safety valve at 238.23 m. The relative error is 0.98%. As shown in Table 5, the determined measurement errors in the laboratory and the field are compared. Despite the difference in test conditions between the laboratory and the field, the relative errors are close to each other, all within 1%. This further illustrates the accuracy of the proposed method. The result also shows that the obstacle will have no effect on the localization method, as long as the leak acoustic waves can propagate to the annulus top. During the field test, the gas well was in production, and tubing leaks could be detected and located without interrupting the production of the gas well. The test only requires the acoustic sensor to be set in the annulus, which is simple and riskless, and the accuracy is satisfactory.

Conclusions
A novel method for locating downhole tubing leakage was developed in this study. The accuracy of the model in locating leakage points is validated through a series of laboratory experiments and field application. The following important conclusions can be drawn:

1.
The leakage acoustic waves of downhole tubing can be measured by an installed acoustic sensor in the annulus top, and the downhole leakage can be detected at the ground.

2.
The position of tubing leakage is located by autocorrelation analysis of the acoustic signals in the annulus. The localization model is developed. The fundamental steps and equations for this method are concluded.

3.
Though errors exist, the proposed model is able to locate the tubing leakage effectively. In the laboratory experiments, leaks as small as 0.5 mm in diameter could be located. The errors generated in the localization process were kept at very low levels. The absolute localization errors were on the order of cm, and the relative errors were within 1%. The errors are mainly determined by characteristic time and annular acoustic velocity.

4.
Field application demonstrated that the proposed method performs well in locating the depth of downhole leakage and the liquid level in the annulus. Therefore, the merits of the methods are concluded.
The acoustic wave-based method presents a novel method to deal with the issue of tubing leakage in gas wells. It provides guidance in annulus pressure management and downhole repair, as well as integrity management in production wells. In the near future, this improved method can be used for better long-term monitoring in the production field.
Author Contributions: Each of the authors contributed to performing the experiments and writing the article. D.L. is the main author of this manuscript, and this work was conducted under the advisement of J.F. S.W. reviewed the manuscript and made contributions to its structure.