Acoustic Emission and Echo Signal Compensation Techniques Applied to an Ultrasonic Logging-While-Drilling Caliper

A logging-while-drilling (LWD) caliper is a tool used for the real-time measurement of a borehole diameter in oil drilling engineering. This study introduces the mechanical structure and working principle of a new LWD caliper based on ultrasonic distance measurement (UDM). The detection range is a major performance index of a UDM system. This index is determined by the blind zone length and remote reflecting interface detection capability of the system. To reduce the blind zone length and detect near the reflecting interface, a full bridge acoustic emission technique based on bootstrap gate driver (BGD) and metal-oxide-semiconductor field effect transistor (MOSFET) is designed by analyzing the working principle and impedance characteristics of a given piezoelectric transducer. To detect the remote reflecting interface and reduce the dynamic range of the received echo signals, the relationships between the echo amplitude and propagation distance of ultrasonic waves are determined. A signal compensation technique based on time-varying amplification theory, which can automatically change the gain according to the echo arrival time is designed. Lastly, the aforementioned techniques and corresponding circuits are experimentally verified. Results show that the blind zone length in the UDM system of the LWD caliper is significantly reduced and the capability to detect the remote reflecting interface is considerably improved.


Introduction
Logging-while-drilling (LWD) is a well logging technology used in drilling wells. The rock physical parameters and petroleum engineering parameters (e.g., lithology, porosity, permeability, saturation, borehole diameter) of underground formations can be measured in real time by using this technology [1][2][3]. At present, most loggings in highly-deviated wells, horizontal wells, and offshore wells rely on LWD.
Unlike in conventional cable logging, the LWD tools are mounted directly on drill collars [4]. While drilling wells, LWD tools are brought into the target layers to measure specific parameters. Drill collars rotate at a high speed during well drilling, and traditional calipers with mechanical eccentering arms can barely fulfill the measurement tasks. By contrast, a borehole diameter measurement system based on ultrasonic distance measurement (UDM) has many advantages, including non-contact, high speed, and simple information processing [5,6]. Hence, such system is more suitable for borehole diameter measurement during well drilling. Data obtained from caliper logs play an important role in lithology discrimination, borehole correction and cement consumption estimation.
The existence of a measurement blind zone is a major technical defect in a UMD system, which causes several difficulties in measuring near the reflection interface. The blind zone length in a LWD Sensors 2017, 17, 1351 2 of 13 caliper tool that was recently developed by Sinopec Corp is 25 mm [7], and this performance index in most other similar tools is no better. In recent years, slim hole (diameters less than 220 mm) logging and drilling are becoming more and more popular, and a large blind zone is harmful to the measurement near the reflection interface. Thus, a further reduction of the blind zone is necessary. Normally, the length of the blind zone is determined by the impedance characteristics of the acoustic transducer and the performance of the acoustic emission circuit. Therefore, the emission circuit must be designed appropriately to reduce the blind zone length when using a given transducer.
With long travel distance, high mud density, and a low reflection coefficient, ultrasonic attenuation is considerable, and the dynamic range of the echo signal is wide. LWD tools typically have to work in a highly-complicated environment (e.g., strong vibration, high temperature, and high pressure), and tools that are not equipped with mechanical eccentralizers may be affected by adverse situations while working in a borehole, such as serious eccentricity caused by sidewall contact and detection range alteration caused by borehole collapse. To address such situations, the measurement range of the UDM system must be improved, thereby indicating that an ultrasonic caliper should be capable of simultaneously realizing a "zero distance" measurement when the tool comes in contact with the sidewall and the remote reflecting interface measurement when the borehole collapses.
The rest of the paper is organized as follows: Section 2 introduces the tool structure and basic measurement principles of the ultrasonic LWD caliper. Section 3 discusses the generation mechanism of the blind zone in a UDM system, and studies an acoustic emission technique for reducing the blind zone. Section 4 discusses a signal compensation technique for detecting echo signals that vary in a wide dynamic range, and verifies the technique with several comparative experiments. Finally, some conclusions are put forward in Section 5. Figure 1 illustrates the mechanical profile of the ultrasonic LWD caliper. The outside diameter ranges from 6 to 10 inches (150 mm to 250 mm). On the cross-section of the tool, three cylindrical piezoelectric transducers (Φ 35 mm × 30 mm, 220 kHz) are uniformly embedded into the tool housing at an angle of 120 degrees. The circuit system is installed into the groove on the tool housing and separated from the drilling fluid (borehole mud) by cover plates. The nozzle provides a transport channel for the drilling fluid. The existence of a measurement blind zone is a major technical defect in a UMD system, which causes several difficulties in measuring near the reflection interface. The blind zone length in a LWD caliper tool that was recently developed by Sinopec Corp is 25 mm [7], and this performance index in most other similar tools is no better. In recent years, slim hole (diameters less than 220 mm) logging and drilling are becoming more and more popular, and a large blind zone is harmful to the measurement near the reflection interface. Thus, a further reduction of the blind zone is necessary. Normally, the length of the blind zone is determined by the impedance characteristics of the acoustic transducer and the performance of the acoustic emission circuit. Therefore, the emission circuit must be designed appropriately to reduce the blind zone length when using a given transducer.

Tool Structure and Measurement Principle of Ultrasonic LWD Caliper
With long travel distance, high mud density, and a low reflection coefficient, ultrasonic attenuation is considerable, and the dynamic range of the echo signal is wide. LWD tools typically have to work in a highly-complicated environment (e.g., strong vibration, high temperature, and high pressure), and tools that are not equipped with mechanical eccentralizers may be affected by adverse situations while working in a borehole, such as serious eccentricity caused by sidewall contact and detection range alteration caused by borehole collapse. To address such situations, the measurement range of the UDM system must be improved, thereby indicating that an ultrasonic caliper should be capable of simultaneously realizing a "zero distance" measurement when the tool comes in contact with the sidewall and the remote reflecting interface measurement when the borehole collapses.
The rest of the paper is organized as follows: Section 2 introduces the tool structure and basic measurement principles of the ultrasonic LWD caliper. Section 3 discusses the generation mechanism of the blind zone in a UDM system, and studies an acoustic emission technique for reducing the blind zone. Section 4 discusses a signal compensation technique for detecting echo signals that vary in a wide dynamic range, and verifies the technique with several comparative experiments. Finally, some conclusions are put forward in Section 5. Figure 1 illustrates the mechanical profile of the ultrasonic LWD caliper. The outside diameter ranges from 6 to 10 inches (150 mm to 250 mm). On the cross-section of the tool, three cylindrical piezoelectric transducers (Ф 35 mm × 30 mm, 220 kHz) are uniformly embedded into the tool housing at an angle of 120 degrees. The circuit system is installed into the groove on the tool housing and separated from the drilling fluid (borehole mud) by cover plates. The nozzle provides a transport channel for the drilling fluid.  The transducers transmit ultrasonic waves and receive echoes through the acoustic windows on the tool housing. To reduce the influence on the mechanical strength of the drill collar, and to save space, the number of transducers should be kept to a minimum while satisfying the necessary conditions for borehole diameter measurement. Accordingly, the transducers embedded into the tool housing have to work in the pulse-echo mode. Compared with the pitch-catch mode, the number of transducers used in the UDM system is halved.

Tool Structure and Measurement Principle of Ultrasonic LWD Caliper
As shown in Figure 2, an ultrasonic transducer transmits ultrasonic waves to the borehole wall when excited by voltage pulses. The waves propagate through the mud medium (acoustic velocity is ν m ) and reflected by the borehole wall. Then, the reflected waves (echoes) are received by the transducer. The transducers transmit ultrasonic waves and receive echoes through the acoustic windows on the tool housing. To reduce the influence on the mechanical strength of the drill collar, and to save space, the number of transducers should be kept to a minimum while satisfying the necessary conditions for borehole diameter measurement. Accordingly, the transducers embedded into the tool housing have to work in the pulse-echo mode. Compared with the pitch-catch mode, the number of transducers used in the UDM system is halved.
As shown in Figure 2, an ultrasonic transducer transmits ultrasonic waves to the borehole wall when excited by voltage pulses. The waves propagate through the mud medium (acoustic velocity is νm) and reflected by the borehole wall. Then, the reflected waves (echoes) are received by the transducer.

Figure 2.
Principle diagram of the pulse-echo mode ultrasonic distance measurement system. O is the tool axis, dT is the distance between the tool axis and the transducer, l is distance between the transducer and the borehole wall, and tr is the arrival time of the first echo.
The shortest distance between the tool axis and the borehole wall can be calculated based on the arrival time of the first echo, as follows: In the case of a constant νm, the length of r depends on the arrival time of the first echo. The caliper consists of three independent distance measurement systems based on the aforementioned principle. In Figure 3a, the transducers are indented in the tool housing to avoid the influence of the blind zone. In Figure 3b, ultrasonic waves transmitted by transducers T1, T2, and T3 are reflected by the borehole wall, and the nearest reflection points are A, B, and C, respectively. Reflecting interface distances l1, l2, and l3 can be measured when the three distance measurement systems are working concurrently. According to Equation (1), the distances between the tool axis and each nearest reflection point can be obtained as follows: r 1 = d T + l 1 , r 2 = d T + l 2 , and r 3 = d T + l 3 . The circumcircle of points A, B, and C is uniquely determined, and its radius and center are also derived. Let symbols O' and R denote the borehole axis and borehole radius, respectively; tool To facilitate calculation and representation, the temporary variable T = R 2 -d 2 is defined. Then, the borehole radius, tool eccentricity, and eccentric angle can be obtained by solving Equation (2): Principle diagram of the pulse-echo mode ultrasonic distance measurement system. O is the tool axis, d T is the distance between the tool axis and the transducer, l is distance between the transducer and the borehole wall, and t r is the arrival time of the first echo.
The shortest distance between the tool axis and the borehole wall can be calculated based on the arrival time of the first echo, as follows: In the case of a constant ν m , the length of r depends on the arrival time of the first echo. The caliper consists of three independent distance measurement systems based on the aforementioned principle. In Figure 3a, the transducers are indented in the tool housing to avoid the influence of the blind zone. In Figure 3b, ultrasonic waves transmitted by transducers T 1 , T 2 , and T 3 are reflected by the borehole wall, and the nearest reflection points are A, B, and C, respectively. Reflecting interface distances l 1 , l 2 , and l 3 can be measured when the three distance measurement systems are working concurrently. According to Equation (1), the distances between the tool axis and each nearest reflection point can be obtained as follows: r 1 = d T + l 1 , r 2 = d T + l 2 , and r 3 = d T + l 3 . The circumcircle of points A, B, and C is uniquely determined, and its radius and center are also derived.  To facilitate calculation and representation, the temporary variable T = R 2 − d 2 is defined. Then, the borehole radius, tool eccentricity, and eccentric angle can be obtained by solving Equation (2): When correlating Equation (3) with Equation (1), the borehole radius and tool eccentric position at the current logging depth can be evaluated by measuring the arrival time of the echoes.
When correlating Equation (3) with Equation (1), the borehole radius and tool eccentric position at the current logging depth can be evaluated by measuring the arrival time of the echoes.

Generation Mechanism and Theorical Calculation of the Blind Zone in a UDM System
As mentioned earlier, three piezoelectric ceramic transducers are adopted in the tool. During the excitation stage, an electric pulse with a certain frequency is applied to the transducer, which generates a mechanical vibration that causes the transducer to emit ultrasonic waves. When the excitation pulse is removed, the transducer continues to vibrate due to mechanical inertia. Such a vibration is called the residual vibration or "tailing" of the transducer. During the tailing stage, the echo signal is superimposed on the residual vibration of the transducer, which cannot be distinguished from the residual vibration until the vibration stops or is sufficiently small. Then, half of the acoustic travel distance is called the blind zone length of the UDM system.
If tailing time is tb, then blind zone size lb can be calculated using: where ν is the acoustic velocity of the medium. The residual vibration of transducers is a type of underdamping vibration, and the blind zone can be reduced if the vibration is rapidly attenuated. The ultrasonic transducer has an equivalent circuit, as shown in Figure 4a. The entire circuit can be regarded as an RLC underdamping oscillation model, where R1 is the dynamic resistance, also known as the mechanical loss resistance, and C0, C1, and L1 are the static capacitance, dynamic capacitance, and dynamic inductance, respectively. If the transducer is excited by an electric pulse with amplitude U0 and frequency f s = 1/2π L 1 C 1 , then series-resonance occurs in the branch L1C1R1. This branch has minimum impedance and functions as a pure resistance, where fs is the series-resonant frequency of the

Generation Mechanism and Theorical Calculation of the Blind Zone in a UDM System
As mentioned earlier, three piezoelectric ceramic transducers are adopted in the tool. During the excitation stage, an electric pulse with a certain frequency is applied to the transducer, which generates a mechanical vibration that causes the transducer to emit ultrasonic waves. When the excitation pulse is removed, the transducer continues to vibrate due to mechanical inertia. Such a vibration is called the residual vibration or "tailing" of the transducer. During the tailing stage, the echo signal is superimposed on the residual vibration of the transducer, which cannot be distinguished from the residual vibration until the vibration stops or is sufficiently small. Then, half of the acoustic travel distance is called the blind zone length of the UDM system.
If tailing time is t b , then blind zone size l b can be calculated using: where ν is the acoustic velocity of the medium. The residual vibration of transducers is a type of underdamping vibration, and the blind zone can be reduced if the vibration is rapidly attenuated. The ultrasonic transducer has an equivalent circuit, as shown in Figure 4a. The entire circuit can be regarded as an RLC underdamping oscillation model, where R 1 is the dynamic resistance, also known as the mechanical loss resistance, and C 0 , C 1 , and L 1 are the static capacitance, dynamic capacitance, and dynamic inductance, respectively. If the transducer is excited by an electric pulse with amplitude U 0 and frequency f s = 1/2π √ L 1 C 1 , then series-resonance occurs in the branch L 1 C 1 R 1 . This branch has minimum impedance and functions as a pure resistance, where f s is the series-resonant frequency of the transducer. When the excitation pulse is removed, C 0 and C 1 are connected in series. Let C = C 0 C 1 /(C 0 +C 1 ), then the equivalent circuit can be transformed into the form shown in Figure 4b. Capacitor C is used as the energy storage element and is discharged through R 1 and L 1 . Voltage u c on capacitor C is a function of time, and its initial value is U 0 , which means u c (0)= U 0 . transducer. When the excitation pulse is removed, C0 and C1 are connected in series. Let C = C 0 C 1 /(C 0 +C 1 ), then the equivalent circuit can be transformed into the form shown in Figure 4b. Capacitor C is used as the energy storage element and is discharged through R1 and L1. Voltage uc on capacitor C is a function of time, and its initial value is U0, which means u c (0) = U 0 . In the circuit shown in Figure 4b, the voltage at C is equal to the sum of the voltages at R1 and L1; that is: There are relationships u l = -L 1 di/dt = -L 1 Cd 2 u c /dt 2 and u r = -R 1 i = -R 1 Cdu c /d t , then Equation (5) can be rewritten as: Voltage at C at a certain time can be evaluated by solving the second-order differential equation: In Equation (7), As shown in Equation (7), uc decays exponentially along with time, and simultaneously, voltage oscillates periodically with angular frequency ωd. Table 1 displays the main impedance-admittance parameters of a given transducer, where Q and Keff are the quality factor and effective electromechanical coupling coefficient, respectively. As shown in Figure 5, the residual vibration waveform of the transducer can be drawn by using the aforementioned parameters.   In the circuit shown in Figure 4b, the voltage at C is equal to the sum of the voltages at R 1 and L 1 ; that is: There are relationships u l = −L 1 di/dt = −L 1 Cd 2 u c /dt 2 and u r = −R 1 i = −R 1 Cdu c /d t , then Equation (5) can be rewritten as: Voltage at C at a certain time can be evaluated by solving the second-order differential equation: In Equation (7), As shown in Equation (7), u c decays exponentially along with time, and simultaneously, voltage oscillates periodically with angular frequency ω d . Table 1 displays the main impedance-admittance parameters of a given transducer, where Q and K eff are the quality factor and effective electromechanical coupling coefficient, respectively. As shown in Figure 5, the residual vibration waveform of the transducer can be drawn by using the aforementioned parameters. transducer. When the excitation pulse is removed, C0 and C1 are connected in series. Let C = C 0 C 1 /(C 0 +C 1 ), then the equivalent circuit can be transformed into the form shown in Figure 4b. Capacitor C is used as the energy storage element and is discharged through R1 and L1. Voltage uc on capacitor C is a function of time, and its initial value is U0, which means u c (0) = U 0 . In the circuit shown in Figure 4b, the voltage at C is equal to the sum of the voltages at R1 and L1; that is: There are relationships u l = -L 1 di/dt = -L 1 Cd 2 u c /dt 2 and u r = -R 1 i = -R 1 Cdu c /d t , then Equation (5) can be rewritten as: Voltage at C at a certain time can be evaluated by solving the second-order differential equation: In Equation (7), α d = R 1 /2L 1 , ω s = 2πf s , ω d = 2πf d = ω s 2 -α d 2 , and ϕ = tan -1 (ω d /α d ). As shown in Equation (7), uc decays exponentially along with time, and simultaneously, voltage oscillates periodically with angular frequency ωd. Table 1 displays the main impedance-admittance parameters of a given transducer, where Q and Keff are the quality factor and effective electromechanical coupling coefficient, respectively. As shown in Figure 5, the residual vibration waveform of the transducer can be drawn by using the aforementioned parameters.    Let variable τ represent the time when u c decays from its maximum amplitude U 0 ω d √ L 1 C to a value that 10 −5 times of the amplitude. Then: Variable τ can be obtained by solving Equation (8), as follows: where Q = ω d L 1 /R 1 . When the parameters in Table 1 are inputted to Equation (9), we can obtain τ ≈ 98 µs. Then, the blind zone length l b can be calculated by combining this result with that of Equation (4). If the acoustic velocity of the medium is 1600 m/s, then l b = 0.5 ν m τ ≈ 78.5 mm.
A large blind zone is harmful to measuring borehole diameter, and residual vibration must be reduced as quickly as possible. To solve this problem, an acoustic emission circuit is provided.

Circuit Design for Reducing Blind Zone
In general, the underdamping oscillation frequency of a transducer is similar to its series-resonant frequency. In accordance with the parameters in Table 1, the calculated frequency f d is 214 kHz, which is extremely close to f s (221 kHz). Hence, the residual vibration can hardly be distinguished from echo signal via filtering. Equations (7) and (9) show that the methods for increasing attenuation coefficient α d and reducing excitation pulse voltage U 0 can reduce the residual vibration. However, α d is determined by the impedance characteristics of the transducer, which cannot be changed by the external circuit. The reduction of emission power will reduce the detection range of the UDM system. Therefore, these two methods are undesirable.
The energy stored in the static capacitor C 0 must be released quickly to reduce residual vibration. As shown in Figure 6, the solution adopted for this circuit design is as follows: connecting the transducer in parallel to a switch K and a resistance R d in series. During the excitation stage, switch K is off and R d cannot access the loop. When the excitation pulse is removed, switch K is closed, R d and C 0 form an RC discharge circuit, and energy stored in C 0 is consumed by R d . The time constant of the RC discharge circuit is τ d , and τ d = R d C 0 . Moreover, when τ d is smaller, the discharge time is shorter. Evidently, to eliminate residual vibration as soon as possible, the smallest R d should be selected while ensuring that the current flowing through K is lower than the maximum pulse current that can be tolerated by the switch. Let variable τ represent the time when uc decays from its maximum amplitude to a value that 10 −5 times of the amplitude. Then: Variable τ can be obtained by solving Equation (8), as follows: where Q = ω d L 1 /R 1 . When the parameters in Table 1 are inputted to Equation (9), we can obtain τ ≈ 98 µs. Then, the blind zone length lb can be calculated by combining this result with that of Equation (4). If the acoustic velocity of the medium is 1600 m/s, then l b = 0.5 ν m τ ≈ 78.5 mm.
A large blind zone is harmful to measuring borehole diameter, and residual vibration must be reduced as quickly as possible. To solve this problem, an acoustic emission circuit is provided.

Circuit Design for Reducing Blind Zone
In general, the underdamping oscillation frequency of a transducer is similar to its series-resonant frequency. In accordance with the parameters in Table 1, the calculated frequency fd is 214 kHz, which is extremely close to fs (221 kHz). Hence, the residual vibration can hardly be distinguished from echo signal via filtering. Equations (7) and (9) show that the methods for increasing attenuation coefficient αd and reducing excitation pulse voltage U0 can reduce the residual vibration. However, αd is determined by the impedance characteristics of the transducer, which cannot be changed by the external circuit. The reduction of emission power will reduce the detection range of the UDM system. Therefore, these two methods are undesirable.
The energy stored in the static capacitor C0 must be released quickly to reduce residual vibration. As shown in Figure 6, the solution adopted for this circuit design is as follows: connecting the transducer in parallel to a switch K and a resistance Rd in series. During the excitation stage, switch K is off and Rd cannot access the loop. When the excitation pulse is removed, switch K is closed, Rd and C0 form an RC discharge circuit, and energy stored in C0 is consumed by Rd. The time constant of the RC discharge circuit is τd, and τ d = R d C 0 . Moreover, when τd is smaller, the discharge time is shorter. Evidently, to eliminate residual vibration as soon as possible, the smallest Rd should be selected while ensuring that the current flowing through K is lower than the maximum pulse current that can be tolerated by the switch. The role of switch K can be replaced by a high-speed N-channel MOSFET (NMOS). As shown in Figure 7, NMOSs Q1, Q2, Q3, and Q4 form a full bridge excitation circuit. Freewheeling diodes D2, D3, D5, and D6 are connected to the source and drain of NMOSs, which will protect the NMOSs from the reverse current produced by their sudden shutdown. According to the command of the complex programmable logic device (CPLD), bootstrap gate drivers BGD1 and BGD2 control the on-off function of the NMOS by adjusting Vgs (NMOS gate-source voltage) [8,9]. The role of switch K can be replaced by a high-speed N-channel MOSFET (NMOS). As shown in Figure 7, NMOSs Q 1 , Q 2 , Q 3 , and Q 4 form a full bridge excitation circuit. Freewheeling diodes D 2 , D 3 , D 5 , and D 6 are connected to the source and drain of NMOSs, which will protect the NMOSs from the reverse current produced by their sudden shutdown. According to the command of the complex programmable logic device (CPLD), bootstrap gate drivers BGD 1 and BGD 2 control the on-off function of the NMOS by adjusting V gs (NMOS gate-source voltage) [8,9]. The control sequence of the CPLD is shown in Figure 8. During the acoustic emission stage tf, the CPLD controls the bootstrap drivers BGD1 and BGD2 to turn on Q1 and Q4, and turn off Q2 and Q3. The voltage of pin Vs of the bootstrap driver is pulled to HV and HVGND levels, respectively; and the transducer is excited by a rectangular pulse with amplitude HV and frequency fs. A simplified diagram of the excitation circuit at this stage is provided in Figure 9a. After excitation, Q1 and Q3 are turned off, whereas Q2 and Q4 are turned on. The circuit is simplified into the form shown in Figure  9b, and the transducer is discharged through resistors R3 and R7. The residual vibration of the transducer has been eliminated outside tb. During this stage, all NMOSs are turned off to prepare for echo detection, and the simplified circuit is shown in Figure 9c.  The control sequence of the CPLD is shown in Figure 8. During the acoustic emission stage t f , the CPLD controls the bootstrap drivers BGD 1 and BGD 2 to turn on Q 1 and Q 4 , and turn off Q 2 and Q 3 . The voltage of pin V s of the bootstrap driver is pulled to HV and HVGND levels, respectively; and the transducer is excited by a rectangular pulse with amplitude HV and frequency f s . A simplified diagram of the excitation circuit at this stage is provided in Figure 9a. After excitation, Q 1 and Q 3 are turned off, whereas Q 2 and Q 4 are turned on. The circuit is simplified into the form shown in Figure 9b, and the transducer is discharged through resistors R 3 and R 7 . The residual vibration of the transducer has been eliminated outside t b . During this stage, all NMOSs are turned off to prepare for echo detection, and the simplified circuit is shown in Figure 9c. The control sequence of the CPLD is shown in Figure 8. During the acoustic emission stage tf, the CPLD controls the bootstrap drivers BGD1 and BGD2 to turn on Q1 and Q4, and turn off Q2 and Q3. The voltage of pin Vs of the bootstrap driver is pulled to HV and HVGND levels, respectively; and the transducer is excited by a rectangular pulse with amplitude HV and frequency fs. A simplified diagram of the excitation circuit at this stage is provided in Figure 9a. After excitation, Q1 and Q3 are turned off, whereas Q2 and Q4 are turned on. The circuit is simplified into the form shown in Figure  9b, and the transducer is discharged through resistors R3 and R7. The residual vibration of the transducer has been eliminated outside tb. During this stage, all NMOSs are turned off to prepare for echo detection, and the simplified circuit is shown in Figure 9c.

Circuit Test
To test the function of the emission circuit and the actual blind zone length, a reasonable CPLD control sequence is designed; thus, the circuit can produce a rectangular single pulse (15 V, 2.25 µs) to excite the transducer. Figure 10 shows the waveforms after the excitation pulse being removed. Observed by a digital comparator, when td is continuously changed, residual vibration is eliminated at t d ≥ 10 µs, and it will not affect the echo detection anymore.

Circuit Test
To test the function of the emission circuit and the actual blind zone length, a reasonable CPLD control sequence is designed; thus, the circuit can produce a rectangular single pulse (15 V, 2.25 µs) to excite the transducer. Figure 10 shows the waveforms after the excitation pulse being removed. Observed by a digital comparator, when t d is continuously changed, residual vibration is eliminated at t d ≥ 10 µs, and it will not affect the echo detection anymore.

Circuit Test
To test the function of the emission circuit and the actual blind zone length, a reasonable CPLD control sequence is designed; thus, the circuit can produce a rectangular single pulse (15 V, 2.25 µs) to excite the transducer. Figure 10 shows the waveforms after the excitation pulse being removed. Observed by a digital comparator, when td is continuously changed, residual vibration is eliminated at t d ≥ 10 µs, and it will not affect the echo detection anymore.  In mud medium with acoustic velocity ν m = 1600 m/s, and blind zone time t b = t f + t d = 12.25 µs, on the basis of Equation (4), the blind zone length can be calculated: l b = 0.5 × 1600 m/s × 12.25 µs = 9.8 mm, which shows that the blind zone of the UDM system has been significantly reduced.
During drilling and well logging, the influence of the blind zone on diameter measurement is inevitable when the outer surface of the tool is close to the borehole wall. As mentioned in Section 2 and Figure 3a, the transducers are indented into the tool housing to cope with this situation. "Zero distance" measurement can be realized as long as the indentation length l in > 9.8 mm. When the mechanical structure of indented-in transducers is adopted, the equivalent length of the blind zone can be considered zero.

Echo Signal Compensation Technique
As mentioned in Section 1, the signal dynamic range is wide in diameter loggings, which may produce amplifier saturation overload, thereby causing the amplifier output to exceed the input range of the A/D converter. If an amplification circuit is present [10][11][12][13], whose gain changes with l, i.e., the distance between the sound source and the reflecting interface, then the dynamic range of the amplified signal can be reduced, and the diameter alteration effect on measurement is diminished. Evidently, this amplification circuit is highly beneficial for detecting echo signals.

Principle of Time-Varying Amplification
The main factors that cause acoustic attenuation are geometric diffusion, medium absorption, and scattering loss. The directivity of a high-frequency circular piston transducer is strong, and the acoustic waves propagating along the normal direction of the transducer plane can be regarded approximately as plane waves [14,15], i.e., geometric diffusion can be ignored, and acoustic attenuation is mainly determined by medium absorption and scattering loss. In this case, the amplitude of acoustic waves decrease exponentially with increasing propagation distance [16]. From the acoustic emission to the arrival of the first echo, the total travel distance of acoustic waves is 2l, and the signal amplitude of the first echo is as follows: where Re is the reflection coefficient of the interface; E is the electromechanical coupling coefficient of the transducer; U 0 is the excitation pulse voltage; and α is the acoustic attenuation coefficient of the mud medium, which is determined by the mud density and acoustic wave frequency. It can be concluded from Equation (10) that if the mud density, acoustic wave frequency, and reflecting interface material are known, then the echo signal amplitude is determined only by distance l. When Equation (10) is combined with Equation (1): where α and ν m are the parameters that are related only to the property of mud. Let β = αν m , then β is a constant in the specific mud medium. The echo signal amplitude U can be regarded as a function of travel time t, and Equation (11) can be rewritten as: From Equation (12), in the situation of constant mud property, U is related only to travel time t. Based on this relationship, a time-varying amplification method is proposed for detecting echo signals, which indicates that the gain of the signal amplification circuit can be changed regularly according to arrival time of echo, and the amplitudes of the output signal compensated by the circuit are consistent. Let C u (t) be the voltage compensation of the echo signal at time t. Then: Let C be the voltage compensation constant of the echo signal at the initial time of echo detection. Then: U(0)C u (0) = U(t)C u (t) (14) when Equations (12) and (14) are merged: K and B are set as constants, where K = 20 ln β, and B = 20 log C, then further derivation provides the gain compensation at time t as follows: Equation (16) shows that the gain compensation curve of the echo signal is a straight line with a certain slope (constant K). Time-varying compensation can be realized by linearly adjusting the gain of the amplification circuit as the law in Equation (16). The amplitude of the compensated signal is only determined by the excitation voltage and the reflection coefficient of the interface, and not related to travel time. Let C be the voltage compensation constant of the echo signal at the initial time of echo detection. Then:

Circuit Design for Time-Varying Amplification
when Equations (12) and (14) are merged: K and B are set as constants, where K = 20 ln β, and B = 20 log C, then further derivation provides the gain compensation at time t as follows: Equation (16) shows that the gain compensation curve of the echo signal is a straight line with a certain slope (constant K). Time-varying compensation can be realized by linearly adjusting the gain of the amplification circuit as the law in Equation (16). The amplitude of the compensated signal is only determined by the excitation voltage and the reflection coefficient of the interface, and not related to travel time.  The gain control voltage generation circuit mainly consists of a field-programmable gate array (FPGA) and a digital-to-analog converter (DAC). A number of gain compensation curves are stored in the on-chip ROM of the FPGA to match the mud medium with different densities. When detecting the acquisition synchronization signal, the FPGA chooses a corresponding compensation curve according to the received control command [17]. The 12-bit digital values of compensation voltage are read out from the ROM and transmitted to the DAC, where the digital values are converted into analog voltages [18]. After filtering via a low-pass filter (LPF), the gain control voltage VG is finally generated. The gain control voltage generation circuit mainly consists of a field-programmable gate array (FPGA) and a digital-to-analog converter (DAC). A number of gain compensation curves are stored in the on-chip ROM of the FPGA to match the mud medium with different densities. When detecting the acquisition synchronization signal, the FPGA chooses a corresponding compensation curve according to the received control command [17]. The 12-bit digital values of compensation voltage are read out from the ROM and transmitted to the DAC, where the digital values are converted into analog voltages [18]. After filtering via a low-pass filter (LPF), the gain control voltage V G is finally generated.

Circuit Design for Time-Varying Amplification
The amplitude limiter consists of clamping diodes and resistive dividers, high-voltage emission pulses and large echo signals are limited within a reasonable range by the amplitude limiter to protect subsequent circuits. The instrumentation amplifier converts a differential signal into a single-ended signal. Then, the single-ended signal is amplified by the voltage controlled amplifier, and the gain of this amplifier is linearly changed along with V G : when Equations (17) and (16) are combined, V G at time t can be derived as follows: Ambient noise and amplifier noise coupled with amplified signals will interfere with echo detection. Hence, a band-pass filter (BPF, 150-300 kHz) is adopted to suppress these noises. After amplifying and filtering, the analog signal is finally outputted to the data acquisition circuit for discretization, processing, and storage.
All of the devices used in the circuit should be able to adapt to the working environment; that is, they should have a small package, high temperature tolerance, and high pressure tolerance. Moreover, the power supply for LWD tools originates from batteries when it is working downhole. Hence, electronic devices with low power consumption are preferred to improve the continuous working time of the tool.

Circuit Test
To verify the practical results of the echo signal compensation circuit, a comparison test was carried out in a water-based mud medium (1520 m/s, 1.25 g/mL). Figure 12 presents the signal amplitudes of the first echoes that are reflected by the interfaces, and the interface distances range from 20 mm to 200 mm. By exponential fitting, an attenuation curve of echoes before compensation was drawn. After compensation, the amplitudes are basically consistent and are rarely related to the propagation distance or arrival time.
According with the maximum amplitude and the minimum amplitude of echo signals, the dynamic ranges of echo signals before and after compensation can be calculated to be 40.7 dB and 1.2 dB, respectively. The dynamic range of echo signals is reduced by 39.5 dB. The amplitude limiter consists of clamping diodes and resistive dividers, high-voltage emission pulses and large echo signals are limited within a reasonable range by the amplitude limiter to protect subsequent circuits. The instrumentation amplifier converts a differential signal into a single-ended signal. Then, the single-ended signal is amplified by the voltage controlled amplifier, and the gain of this amplifier is linearly changed along with VG: when Equations (17) and (16) are combined, VG at time t can be derived as follows: Ambient noise and amplifier noise coupled with amplified signals will interfere with echo detection. Hence, a band-pass filter (BPF, 150-300 kHz) is adopted to suppress these noises. After amplifying and filtering, the analog signal is finally outputted to the data acquisition circuit for discretization, processing, and storage.
All of the devices used in the circuit should be able to adapt to the working environment; that is, they should have a small package, high temperature tolerance, and high pressure tolerance. Moreover, the power supply for LWD tools originates from batteries when it is working downhole. Hence, electronic devices with low power consumption are preferred to improve the continuous working time of the tool.

Circuit Test
To verify the practical results of the echo signal compensation circuit, a comparison test was carried out in a water-based mud medium (1520 m/s, 1.25 g/mL). Figure 12 presents the signal amplitudes of the first echoes that are reflected by the interfaces, and the interface distances range from 20 mm to 200 mm. By exponential fitting, an attenuation curve of echoes before compensation was drawn. After compensation, the amplitudes are basically consistent and are rarely related to the propagation distance or arrival time.
According with the maximum amplitude and the minimum amplitude of echo signals, the dynamic ranges of echo signals before and after compensation can be calculated to be 40.7 dB and 1.2 dB, respectively. The dynamic range of echo signals is reduced by 39.5 dB.   As shown in Figure 13, the first echoes and multiple echoes are all compensated by the circuit. The amplitudes of the first echoes are consistent, and the amplitudes of multiple echoes are smaller due to the multiple reflection losses and coupling losses. As shown in Figure 13, the first echoes and multiple echoes are all compensated by the circuit. The amplitudes of the first echoes are consistent, and the amplitudes of multiple echoes are smaller due to the multiple reflection losses and coupling losses.

Conclusions
The performance of an ultrasonic LWD caliper depends highly on the functions of its electronic system. Research on the electronic system also provides important guidance for designing the mechanical structure. To realize a "zero distance" measurement, a mechanical structure with indented-in transducers is designed, which solves the measurement problem caused by borehole wall contact. When the blind zone is smaller, the indentation length is shorter, and the influence on the mechanical strength of the drill collar is less. Therefore, in addition to choosing high-performance transducers, blind zone length was reduced by optimizing the design of the acoustic emission circuit and enhancing the capability of the caliper to detect near the reflecting interface. As mentioned in Sections 1 and 3.3, the blind zone length in [7] and this design are 25 mm and 9.8 mm, respectively. The comparison shows that the blind zone length is reduced by 60%.
In the case of borehole wall collapse or tool eccentricity, diameter alteration will cause a change in the echo signal amplitude, and ordinary program-controlled amplification circuits cannot cope with this situation. However, the gain of time-varying amplification can be changed along with the echo arrival time to compensate for the acoustic attenuation. Therefore, the influence of the propagation distance is eliminated, and the signal dynamic range of the amplified echo is significantly reduced, which is very helpful in signal detection and the processing of subsequent circuits.

Conclusions
The performance of an ultrasonic LWD caliper depends highly on the functions of its electronic system. Research on the electronic system also provides important guidance for designing the mechanical structure. To realize a "zero distance" measurement, a mechanical structure with indented-in transducers is designed, which solves the measurement problem caused by borehole wall contact. When the blind zone is smaller, the indentation length is shorter, and the influence on the mechanical strength of the drill collar is less. Therefore, in addition to choosing high-performance transducers, blind zone length was reduced by optimizing the design of the acoustic emission circuit and enhancing the capability of the caliper to detect near the reflecting interface. As mentioned in Sections 1 and 3.3, the blind zone length in [7] and this design are 25 mm and 9.8 mm, respectively. The comparison shows that the blind zone length is reduced by 60%.
In the case of borehole wall collapse or tool eccentricity, diameter alteration will cause a change in the echo signal amplitude, and ordinary program-controlled amplification circuits cannot cope with this situation. However, the gain of time-varying amplification can be changed along with the echo arrival time to compensate for the acoustic attenuation. Therefore, the influence of the propagation distance is eliminated, and the signal dynamic range of the amplified echo is significantly reduced, which is very helpful in signal detection and the processing of subsequent circuits.