Real-time distance measurement while drilling

By deploying a three-axis accelerometer group and a three-axis magnetometer group in the drill collar, synchronous measurements are performed while drilling are calculated and the interfering magnetic field is calculated to determine the distance or direction of the magnetic target, the defects in the prior art need to stop drilling are solved, and high-density magnetic distance measurement is achieved while drilling is saved, and the drilling rig time is saved.

CN119630992APending Publication Date: 2025-03-14SCHLUMBERGER TECHNOLOGY BV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380054990.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-07-06
Filing Date
2023-07-03
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The existing magnetic ranging technology requires stopping drilling and keeping the drill string stationary in underground drilling operations, which leads to high operational costs and time-consuming, making it impossible to achieve magnetic ranging measurement while drilling.

Method used

A three-axis accelerometer group and a three-axis magnetometer group are deployed in the drill collar, and multiple sets of synchronous accelerometer and magnetometer measurements are performed while drilling. By processing the measurement results, the interference magnetic field is calculated, and the distance or direction of the magnetic target located outside the wellbore is determined.

Benefits of technology

It realizes the magnetic ranging measurement of the target structure in basically real time during the drilling process, improves the magnetic ranging measurement density, saves the drilling rig time, and avoids the need to stop drilling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119630992A_ABST
    Figure CN119630992A_ABST
Patent Text Reader

Abstract

A method for drilling a subterranean wellbore includes rotating a downhole tool combination (BHA) in the subterranean wellbore to drill the wellbore, the BHA including a drill collar, a drill bit, and a triaxial accelerometer set and a triaxial magnetometer set in or coupled to the drill collar. And the triaxial accelerometer group and the triaxial magnetometer group carry out multi-group synchronous accelerometer measurement and magnetometer measurement while drilling. These synchronized measurements are processed to calculate a disturbing magnetic field, which is then processed to calculate at least one of a distance or a direction to a magnetic target located outside the wellbore.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This disclosure claims priority to U.S. Provisional Application No. 63 / 367,754, filed on July 6, 2022, which is incorporated herein by reference in its entirety. Background Art

[0003] In underground drilling operations, it is often necessary to determine the relative position of a wellbore being drilled (drilling well) relative to a pre-existing offset wellbore (target well) or other underground structure. This need may exist for collision avoidance purposes, for interception purposes, or for the purpose of maintaining a specific separation distance between wells (e.g., in a twin well operation). Magnetic ranging techniques may be used to determine the relative position of the target well (or structure), such as by performing magnetic field measurements in the borehole. The measured magnetic field may be induced in part by ferromagnetic material or an electromagnetic source (or multiple electromagnetic sources) in the target well, so that the relative position of the target well can be calculated from the measured magnetic field vector.

[0004] Existing magnetic ranging techniques are generally similar to conventional static surveys in that they require stopping drilling and holding the drill string stationary in the borehole while each magnetic survey is obtained. As a result, such magnetic ranging operations are costly and time consuming. There is a need in the art for methods for performing magnetic ranging measurements while drilling (i.e., without stopping drilling and holding the drill string stationary). Summary of the invention

[0005] A method for drilling a subterranean wellbore includes rotating a bottom hole assembly (BHA) in a subterranean wellbore to drill the wellbore, the BHA including a drill collar, a cutting tool, and a triaxial accelerometer group and a triaxial magnetometer group deployed in the drill collar. The triaxial accelerometer group and the triaxial magnetometer group perform multiple sets of synchronous accelerometer measurements and magnetometer measurements while drilling. These synchronous measurement results are processed to calculate a disturbing magnetic field, and the disturbing magnetic field is further processed to calculate at least one of a distance or a direction to a magnetic target located outside the wellbore.

[0006] This Summary is provided to introduce a selection of concepts that are further described below in the Detailed Description. This Summary is not intended to identify key or essential features of the claimed subject matter, nor is it intended to be used as an aid in limiting the scope of the claimed subject matter. BRIEF DESCRIPTION OF THE DRAWINGS

[0007] For a more complete understanding of the disclosed subject matter and advantages thereof, reference is now made to the following description taken in conjunction with the accompanying drawings, in which:

[0008] Figure 1 An example drilling environment is shown in which the disclosed embodiments may be utilized.

[0009] Figure 2 Shows Figure 1 The lower BHA section of the drill string is shown in .

[0010] Figure 3 is a cross-sectional view of an example measurement tool including an off-center transverse magnetic field sensor.

[0011] Figure 4 This is a graph showing the relationship between the interference magnetic field Delta (nT) of an eccentric transverse magnetic field sensor and the offset distance.

[0012] Figure 5-1 and Figure 5-2 (collectively, FIG5 ) is a flow chart of an example method of drilling a subterranean wellbore.

[0013] Figure 6 is a schematic diagram of an embodiment of a system suitable for performing a method of drilling a subterranean wellbore, such as the method of FIG. 5 .

[0014] Figure 7 is a block diagram of an example method implementation for performing magnetic ranging measurements on a target.

[0015] Figure 8 is a graph of magnetic field strength versus time when the magnetometer rotates at 240 rpm.

[0016] Fig. 9 An example RC filter circuit is shown.

[0017] Fig.10 is a block diagram of the first and second cascaded low-pass filters. DETAILED DESCRIPTION

[0018] A method for drilling a subterranean wellbore includes rotating a downhole tool assembly (BHA) in a subterranean wellbore to drill the wellbore, the BHA including a drill collar, a drill bit or other cutting tool, and a triaxial accelerometer group and a triaxial magnetometer group deployed in the drill collar. The triaxial accelerometer group and the triaxial magnetometer group perform multiple sets of synchronous accelerometer measurements and magnetometer measurements while drilling. These synchronous measurements are processed to calculate a perturbation magnetic field, which in turn is processed to calculate at least one of a distance or a direction to a magnetic target located outside the wellbore. In certain advantageous embodiments, the triaxial magnetometer may include at least one eccentric transverse magnetic field sensor that is radially offset relative to a centerline of the drill collar. In such an embodiment, the perturbation magnetic field may include a difference between a first magnetic field measurement and a second magnetic field measurement made by the eccentric sensor at a diametrically opposite tool face angle.

[0019] The disclosed embodiments may provide various technical advantages and improvements over the prior art. For example, in some embodiments, the disclosed embodiments provide improved methods and systems for drilling underground wellbores, wherein it is desirable to perform magnetic ranging measurements of target structures in substantially real time while drilling (e.g., several measurements per minute or several measurements per foot or per meter of measured wellbore depth). Thus, the disclosed embodiments may provide a much higher density of magnetic ranging measurements and / or may save a significant amount of rig time, since ranging measurements do not require stopping drilling. Ranging measurements may be advantageously used, for example, in wellbore interception, wellbore avoidance, and dual well operations.

[0020] Figure 1 A drilling rig 10 suitable for using various method embodiments disclosed herein is shown. A semi-submersible drilling platform 12 is positioned above an oil or gas layer located below a seabed 16. A subsea conduit 18 extends from a deck 20 of the platform 12 to a wellhead 22. The platform may include a derrick and a hoisting device for raising and lowering a drill string 30, as shown, which extends into a wellbore 40 and includes a cutting tool such as a drill bit 32 and a rotating steerable tool 60. In some embodiments, the drill bit 32 is a fixed cutting edge drill bit, a roller cone drill bit, an impregnated drill bit, or a hybrid drill bit (e.g., a combination of a fixed cutting edge blade and a roller cone). In the same or other embodiments, the cutting tool may be other components other than the drill bit 32, or other components different from the drill bit 32, including a fixed reamer, a hole opener, an expansion reamer, a window milling cutter, a column head milling cutter, a taper milling cutter, a trim milling cutter or other cutting tools.

[0021] The drill string 30 may also include a downhole drilling motor, a downhole telemetry system, and one or more MWD or LWD tools including various sensors for sensing downhole properties of the wellbore and surrounding formations. The disclosed embodiments are not limited in these respects.

[0022] A person skilled in the art can understand that Figure 1 The deployment shown is only an example. It will be further understood that the disclosed embodiments are not limited to the Figure 1 The disclosed embodiments are also well suited for use in any kind of subsurface drilling operations, whether offshore or onshore.

[0023] Figure 2The lower BHA portion of the drill string 30 is shown, which includes a drill bit 32 and a rotary steerable tool 60. In the illustrated embodiment, the rotary steerable tool body 62 is connected to the drill bit 32 and may (or may not) be configured to rotate with the drill bit 32. The rotary steerable tool 60 includes a steering element that can be actuated to control and / or change the direction of drilling the wellbore 40. In embodiments that employ a rotary steerable tool, substantially any suitable rotary steerable tool configuration may be used. Various rotary steerable tool configurations are known in the art. For example, The rotary steerable system (available from BakerHughes) and the GEOPILOT rotary steerable system (available from Sperry Drilling Services) include a substantially non-rotating (or slowly rotating) housing that employs blades that engage the wellbore wall. The engagement of the blades with the wellbore wall is intended to eccentric the tool body, thereby pointing or pushing the drill bit or other cutting tool in a desired direction while drilling. During drilling, a rotating shaft deployed within the housing transfers rotational power and axial drill bit weight to the cutting tool. An accelerometer array and a magnetometer array may be deployed in the housing so that it does not rotate or rotates slowly relative to the wellbore wall.

[0024] The POWERDRIVE rotary steerable system (available from SLB, Inc., Houston, Texas) rotates fully with the drill string (i.e., the housing rotates with the drill string). The POWERDRIVE XCEED system employs an internal guide mechanism that does not require contact with the wellbore wall and enables the tool body to rotate fully with the drill string. The POWERDRIVE X5, X6, and ORBIT rotary steerable systems utilize mud-actuated blades (or pads) that contact the wellbore wall. The extension of the blades (or pads) is adjusted rapidly and continuously as the system rotates in the wellbore. The POWERDRIVE ARCHER system utilizes a lower guide section that is coupled to the upper section at a swivel. The swivel is actively tilted by a piston to change the angle of the lower section relative to the upper section and maintain the desired drilling direction as the downhole tool assembly rotates in the wellbore. The accelerometer group and magnetometer group may rotate with the drill string, or may alternatively be deployed in an internal roll-stabilized housing so that they remain essentially stationary (in the bias phase) or rotate slowly relative to the wellbore (in the neutral phase). To drill a desired curvature, the bias phase and the neutral phase are alternated during drilling at a predetermined ratio, called the steering ratio.

[0025] Although Figure 2 A rotary steerable tool 60 is shown, but it should be understood that the disclosed embodiments are not limited to use with a rotary steerable tool. In addition, although the accelerometer sensor group and the magnetometer sensor group 65 and 67 can be deployed and processed in a rotary steerable tool (such as Figure 2), but they can also be located elsewhere in the drill string. Figure 1 , the drill string 30 may also include a measurement while drilling tool 80, which includes corresponding accelerometer sensor groups and magnetometer sensor groups 65 and 67. As shown, the MWD tool 80 is typically deployed in the upper layer of the drill string (i.e., above the rotating steerable tool 60). As known to those of ordinary skill in the art, such an MWD tool 80 may rotate with the drill string and may also include a mud pulse telemetry transmitter or other telemetry system, an alternator for generating electricity, and an electronic controller. It should therefore be understood that the disclosed embodiments are not limited to any particular deployment location of the accelerometer sensor group and the magnetometer sensor group 65 and 67 in the drill string.

[0026] Continue to refer Figure 1 and Figure 2 , the illustrated rotary steerable tool 60 and / or MWD tool includes a triaxial accelerometer 65 and triaxial magnetometer 67 navigation sensor set, which may include any suitable commercially available devices. Suitable accelerometers for use in the sensor set 65 may be selected from substantially any suitable commercially available devices known in the art. Suitable accelerometers may alternatively include micro-electro-mechanical systems (MEMS) solid-state accelerometers, which tend to be shock-resistant, high-temperature-resistant, and inexpensive. Suitable magnetic field sensors for use in the sensor set 67 may include conventional toroidal fluxgate magnetometers or conventional magnetoresistive sensors.

[0027] Figure 2 Also included are schematic diagrams of triaxial accelerometer and magnetometer sensor groups 65 and 67. Triaxial means that each sensor group includes three mutually perpendicular sensors, and the accelerometer is referred to as A x , A y and A z , the magnetometer is called B x , B y and B z By convention, a right-handed system is specified where the z-axis accelerometer and magnetometer (A z and B z ) are oriented substantially parallel to the tool axis (and therefore the wellbore axis) as shown (although the disclosed embodiments are not limited by this convention). Thus, each set of accelerometers and magnetometers can be viewed as defining a plane (the x-axis and y-axis) and a pole (the z-axis along the axis of the BHA). It should be understood that Figure 2 The vector representations in are diagrammatic and schematic and are not necessarily intended to disclose or imply that the accelerometers and magnetometers are deployed at the exact same locations in the tool body 62 .

[0028] By convention, the gravity field is considered to be a positive field pointing downward (i.e., toward the center of the Earth), while the magnetic field is considered to be a positive field pointing in the direction of magnetic north. In addition, by convention, the y-axis is considered to be the tool face reference axis (i.e., the gravity tool face T is equal to zero when the y-axis is at the top, and the magnetic tool face M is equal to zero when the y-axis points to the projection of magnetic north on the xy plane). The magnetic tool face M is projected on the xy plane and can be expressed mathematically as:

[0029] tanM=B x / B y .

[0030] Similarly, the gravity tool face T can be expressed mathematically as:

[0031] tanT=(-A x ) / (-A y ).

[0032] The negative sign in the gravity toolface expression is due to the convention that the gravity vector is positive in the downward direction and the toolface angle T is positive on the high side (the side facing up) of the wellbore.

[0033] The disclosed method embodiments are not limited to the above conventions for defining wellbore coordinates. These conventions may affect the form of certain mathematical formulas followed in the present disclosure. A person of ordinary skill in the art will be able to easily utilize other conventions and derive equivalent mathematical formulas.

[0034] The accelerometer group and magnetometer group 65, 67 can be configured to perform downhole navigation (survey) measurements during drilling operations. Such measurements are well known and are commonly used to determine, for example, wellbore inclination, wellbore azimuth, gravity tool face, magnetic tool face, and tilt angle (inclination). In addition, the magnetometer is also configured to measure one or more external magnetic fields, such as magnetic fields from external magnetic targets. The accelerometer and magnetometer can be electrically coupled to a digital signal processor (or other digital controller) via corresponding signal analog signal conditioning circuits, as described in more detail below. The signal conditioning circuit may include a low-pass filter element intended to band-limit sensor noise, thereby tending to improve sensor resolution and survey accuracy.

[0035] Although the disclosed embodiments are not limited in this respect, it has been discovered that in certain example embodiments, the sensitivity to external interfering magnetic fields can be improved by using an eccentric (radially offset) transverse magnetic field sensor. For example, in using a three-axis magnetic field sensor (e.g., Figure 2 In the embodiment of the sensor 67), B x and / or B y It may be advantageous to eccentrically position the magnetic field sensor (transverse magnetic field sensor). Eccentricity means that B x and / or By The magnetic field sensor is relative to the tool body (e.g. Figure 2 The tool body 62 in the embodiment of the present invention is radially offset from the center of rotation of the tool body 62 in the embodiment of the present invention. In various embodiments, the transverse magnetic field sensors can have equal or different eccentric distances. For example, in one exemplary embodiment, B x and B y The magnetic field sensors can have equal eccentric distances (so that e x =e y In another exemplary embodiment, B x and B y The magnetic field sensors can have different eccentric distances (so that e x ≠e y ).

[0036] Figure 3 is a cross-sectional view of an example measurement tool 60, 80 including at least one eccentric transverse magnetic field sensor. The tool 60, 80 may include, for example, a rotary steerable tool or an MWD tool, as described above with respect to Figure 1 and Figure 2 The tool 60, 80 includes a sensor housing 63, 83, which is optionally disposed at the center of the tool collar 62, 82. The sensor housing 63, 83 includes a three-axis magnetic field sensor 67 disposed therein, including a central axial magnetic field sensor B z and at least one eccentric transverse magnetic field sensor B x and / or B y In the exemplary embodiment shown, the transverse magnetic field sensor B x and B y The eccentric distance e is radially offset relative to a central position (such as the tool center along the central longitudinal axis) x and e y As mentioned above, the eccentric distance e x and e y In addition, in some embodiments, the transverse magnetic field sensor B x and B y Only one of them is eccentric (so that e x or e y is equal to zero).

[0037] It has been surprisingly found that using at least one eccentric transverse magnetic field sensor advantageously increases the interfering magnetic field when measuring distance. Therefore, using at least one eccentric transverse magnetic field sensor can improve the sensitivity and / or accuracy of ranging. For example, increasing the strength of the interfering magnetic field can advantageously enable magnetic detection and ranging of targets that are far away from the drilling, or can enable ranging of weaker magnetic targets. In addition, increasing the strength of the interfering magnetic field may also advantageously increase the signal-to-noise ratio, thereby improving the accuracy of the calculated distance and direction to the magnetic target.

[0038] Figure 4 6 is a graph of the interfering magnetic field strength (on the vertical axis) and the transverse magnetic field sensor eccentric distance (on the horizontal axis) of an example laboratory calibration measurement, wherein the magnetic object is located within the sensing range of the magnetic field sensor 67. In this example, the interfering magnetic field is the difference between the first magnetic field measurement and the second magnetic field measurement at the tool face angles opposite on the diameter (for example, the tool face angles in the figure are 90 degrees and 270 degrees). In certain embodiments, the interfering magnetic field is maximized when the first magnetic field measurement and the second magnetic field measurement are performed at the tool face angles of 90 degrees and 270 degrees. It is also noted that the difference in magnetic field strength (interfering magnetic field) increases substantially linearly with increasing eccentric distance. As described in more detail below, the above-mentioned interfering magnetic field can be advantageously used for magnetic ranging.

[0039] Continue to refer Figure 3 and Figure 4 In example embodiments where at least one transverse magnetic field sensor is eccentric, the sensor can be eccentric by substantially any suitable eccentric distance. For example, in certain embodiments, the eccentric distance can be 0 mm to 40 mm (e.g., 10 mm to 30 mm, 15 mm to 30 mm, or 20 mm to 25 mm). The eccentric distance can also be specified relative to the diameter of the sensor housing 63, 83. For example, the eccentric distance can be 10% to 40% of the sensor housing diameter (e.g., 20% to 40% or 25% to 35% of the sensor housing diameter).

[0040] Figure 5-1 and Figure 5-2 (collectively, FIG. 5 ) is a flow chart of an exemplary method embodiment 100 for performing magnetic ranging measurements while drilling a subterranean wellbore. Figure 1 and Figure 2 ) is rotated in a wellbore at 102 to drill a well. While drilling at 102 (i.e., while rotating a downhole tool assembly in a wellbore to drill a well), a plurality of sets of synchronized accelerometer and magnetometer measurements (e.g., three-axis accelerometer measurements and three-axis magnetometer measurements) are acquired at 104. For example, Figure 5-2As shown, acquiring multiple sets of simultaneous accelerometer and magnetometer measurements at 104 may include repeatedly performing triaxial accelerometer and triaxial magnetometer measurements while drilling at 114 and synchronizing these measurements at 116. In such an embodiment, the multiple sets of simultaneous accelerometer and magnetometer measurements may be performed sequentially and thus may be spaced apart along the axis of the wellbore as drilling progresses (e.g., several sets of simultaneous measurements may be performed per minute or several sets of simultaneous measurements may be performed per foot (or meter) of measured wellbore depth).

[0041] Continue to refer Figure 5-1 , the synchronized accelerometer measurements and the magnetometer measurements are processed at 106 to calculate the interfering magnetic field (e.g., as described above with respect to Figure 4 Although not shown, the interfering magnetic field may be further processed (in certain example embodiments) to calculate a local magnetic field distribution, for example, including a magnetic vector measured at each measurement position along the wellbore axis. The interfering magnetic field and / or the magnetic field distribution may be further processed at 108 to calculate at least one of a distance or a direction to a magnetic target. Then, while drilling in 102, the calculated distance and / or direction to the magnetic target may optionally be used to perform wellbore position and trajectory control at 110. For example, the drilling direction in 102 may be adjusted in response to survey parameters (e.g., by adjusting the position of a blade or other actuating component in a rotary steerable tool) to continue drilling along a predetermined path.

[0042] Reference again Figure 3 and Figure 4 5, method 100 may utilize an off-center transverse magnetic field sensor as described above. Additionally, in such an embodiment, calculating the interfering magnetic field at 106 may also include calculating the difference in the transverse magnetic field when the off-center sensor is oriented at opposite tool face angles (e.g., at tool face angles of 90 degrees and 270 degrees).

[0043] Figure 6 1 is an example schematic diagram of an embodiment of a system 120 suitable for acquiring multiple sets of synchronous accelerometer measurements and magnetometer measurements and performing method 100. System 120 includes a drill collar 122 (such as a drill string 30 including a rotary steerable tool 60 and / or MWD tool 80) that rotates in a subterranean wellbore (e.g., while rotating the wellbore). Figure 1 As described, the drill collar 122 may include a triaxial accelerometer set and a triaxial magnetometer set 65, 67 deployed therein, which are configured to measure the Earth's gravity field and the local magnetic field (including the Earth's magnetic field and any interfering fields) while rotating. The gravity field and magnetic field are shown at 124 and 126 as acceleration vectors and field vector Due to the rotation of the drill collar 122, each accelerometer in the three-axis accelerometer set 65 measures a corresponding time-varying gravity field, A x (t), A y (t), A z (t). Similarly, each magnetometer in the three-axis magnetometer group 67 measures a corresponding time-varying magnetic field B x (t), B y (t), B z (t). These time-varying gravitational and magnetic field measurements are received (and filtered) by respective signal conditioning circuits 140 and 150. The time-varying measurements are then digitized at some predetermined frequency (e.g., in the range of 100 Hz to 1000 Hz) by analog-to-digital converter 160. The digitized measurements A are then received by digital signal processor 180. x , A y , A z and B x , B y , B z , which processes these measurements to calculate the distance and / or direction to the target (as well as various survey parameters, including, for example, wellbore inclination, wellbore azimuth, gravity tool face, magnetic tool face, and dip) in real time while drilling. Real time refers to the magnetic ranging measurements being calculated while the drill string is rotating to drill the wellbore (as opposed to conventional static measurements taken when drilling is stopped). Real time measurements can be calculated at essentially any frequency, for example, in the range of 0.1 Hz to 100 Hz, depending on how much averaging is employed. Such measurement frequencies correspond to measurement depth intervals from a fraction of an inch to several inches.

[0044] It should be understood that the rotation of the drill collar 122 in the local magnetic field (or in the presence of other magnetic interference) may generate an additional magnetic field in the drill collar hole. This additional field may cause the time-varying magnetic field measured by each magnetometer in the magnetometer group 67 to lag behind the local magnetic field. This drill collar lag is shown at 130 and represented by τ1. The time-varying gravity field measurement results and the magnetic field measurement results are first received by the corresponding accelerometer electrical signal conditioning circuit and magnetometer electrical signal conditioning circuit 140 and 150, and then the signals are digitized by ADC 160. As shown, the accelerometer circuit 140 causes a corresponding time lag and attenuation τ3 in the accelerometer measurement results, and the magnetometer circuit 150 causes a corresponding time lag and attenuation τ2 in the magnetometer measurement results. In general, the product (or convolution) of the lag τ1 and τ2 is not equal to the lag τ3, so that the time-varying gravity field measurement results and the magnetic field measurement results are usually out of phase (i.e., asynchronous). This may cause errors in the calculated survey parameters and magnetic ranging measurements using the accelerometer measurements and magnetometer measurements.

[0045] Figure 7 2 is a block diagram of an example method 200 for performing real-time magnetic ranging while drilling a subterranean wellbore. For example, a digital signal processor (e.g., Figure 6 180) to perform the method. In the example embodiment shown, the method 200 includes four blocks: (i) a bandwidth compensation block 220, (ii) a radial disturbance compensation block 240, (iii) a dynamics block 260, in which the position, velocity, and acceleration of the drill collar are calculated, and (iv) a drilling mode survey block 280, in which magnetic ranging parameters (e.g., including distance and / or direction to a magnetic target) are calculated. Figure 7 In the illustrated example embodiment, the digitized accelerometer measurements and magnetometer measurements are first processed by the bandwidth compensation block 220 and then by the radial disturbance compensation block 240 (block 240 receives the output of block 220 as input). It should be understood that such illustration is merely for convenience, as the processing in block 240 may alternatively precede the processing in block 220 (such that the output of block 240 is received as input in block 220). The disclosed embodiments are not limited in this respect.

[0046] Continue to refer Figure 7 , digitized accelerometer measurements and magnetometer measurements A x , A y , A z and B x , B y , B z and the corresponding temperature measurement T are processed in bandwidth correction block 220 to compensate (correct) for the front-end analog measurement introduced by signal conditioning circuits 140 and 150 (described above with respect to Figure 6 Bandwidth correction block 220 may optionally be configured to correct for temperature variations in the time constants of signal conditioning circuits 140 and 150 (which cause hysteresis τ3 and τ2). In various additional embodiments, bandwidth correction block 220 may also apply drill collar hysteresis compensation to correct for the effects of hysteresis τ1 on magnetometer measurements.

[0047] Figure 8is a graph of magnetic field strength versus time when the magnetometer is rotated at 240 rpm. The input magnetic field is shown at 302, and the magnetometer output is shown at 304. Note that in the example shown, the magnetometer output is attenuated by 1% to 5%, such as 2% or 4%, and experiences a phase delay of 5 to 15 degrees, such as 7 degrees, 10 degrees, or 13 degrees. Although not shown, it is understood that the accelerometer output may also be attenuated and phase delayed (although typically to a different degree than the magnetometer output). The attenuation and phase delay may vary depending on the circuit used, temperature, and various other factors.

[0048] Signal conditioning circuits 140 and 150 can be modeled as low pass filters with corresponding time constants over a frequency range of interest (e.g., 5 to 500 rpm). For example, each conditioning circuit can be modeled (e.g., approximated) as an RC filter circuit, such as Fig. 9 As shown, S uf represents the unfiltered sensor signal, S f represents the filtered sensor signal. In other words, for the signal conditioning circuit 140, S uf represents the input accelerometer signal (the accelerometer signal received by the circuit 140), S f represents the output accelerometer signal. For the signal conditioning circuit 150, S uf represents the input magnetometer signal (the magnetometer signal received by the circuit 150), S f Represents the output magnetometer signal.

[0049] Continue to refer Fig. 9 , the unfiltered sensor signal S uf and the filtered sensor signal S f can be related mathematically, for example, as follows:

[0050]

[0051] Where τ represents the time constant of the circuit, represents the first derivative of the filtered sensor signal with respect to time. This paper uses the symbol τ to represent the time constant (as shown in Equation 1) and the corresponding time lag and attenuation caused by the time constant (for example, as shown in Figure 6 Those skilled in the art will readily recognize that the time constants of circuits such as signal conditioning circuits 140 and 150 can be considered to cause corresponding time lags and attenuations in the signal, and that the induced lags and attenuations vary with the signal frequency.

[0052] The instantaneous filtered sensor signal S(i) can be f For the instantaneous unfiltered sensor signal S(i) uf(signal at any time) to perform mathematical calculations, such as the following:

[0053]

[0054] Where S ⊥ represents the measured lateral component of the gravitational or magnetic field (e.g., such that and ), ψ represents the rotational position of the drill collar, represents the rotation speed of the rotating drill collar, and represents the rotational acceleration of the rotating drill collar. For example, ψ may be related to the magnetic or gravity tool face, while and may be related to the first and second derivatives of the toolface. Note that ψ, and may be calculated in and received from the dynamics block 260 , as described in more detail below.

[0055] Reference again Figure 7 , the bandwidth correction block 220 may compensate for attenuation and phase delay in the accelerometer measurements and the magnetometer measurements (e.g., synchronize the measurements) by processing the digitized measurements according to Equation 2. For example, compensated x, y, and / or z-axis accelerometer measurements may be calculated from corresponding uncompensated measurements as follows:

[0056]

[0057] Among them A c represents the compensated accelerometer measurement result, A uc Represents the uncompensated accelerometer measurement result (for example, the measured A x , A y and / or A z ), A ⊥ represents the lateral component of the gravity field. In Formula 3, τ3 represents the time constant of the accelerometer adjustment circuit 140. In addition, ψ, and represents the rotational position, rotational velocity, and rotational acceleration of the drill collar (or accelerometer in the tool collar), and may be determined, for example, as described below with respect to block 260. In some embodiments, each triaxial accelerometer measurement (A) may be calculated according to Equation 3. x , A y and A z ) is compensated. In some embodiments, only the horizontal axis (lateral) measurement result (A x and A y ) for compensation.

[0058] Likewise, the compensated magnetometer measurements can be calculated from the uncompensated measurements as follows:

[0059]

[0060] Among them B c represents the compensated magnetometer measurement result, B uc represents the uncompensated magnetometer measurement, B ⊥ represents the transverse component of the magnetic field. In Formula 4, τ2 represents the time constant of the magnetometer adjustment circuit 150. In addition, ψ, and represents the rotational position, rotational velocity, and rotational acceleration of the drill collar (or the magnetometer in the tool collar), and can be determined, for example, as described in more detail below. In some embodiments, each three-axis magnetometer measurement result (B x , B y and B z ) is compensated. In some embodiments, only the horizontal axis (lateral) measurement result (B x and B y ) for compensation.

[0061] Continue to refer Figure 7 , bandwidth correction block 220 may further correct for temperature variations in the time constants τ3 and τ2 of signal conditioning circuits 140 and 150. For example, in Equations 3 and 4, τ3 and τ2 may be expressed as respective functions of the measured downhole temperature T, such that τ3=f3(T) and τ2=f2(T). The time constants τ3 and τ2 of each of the signal conditioning circuits 140 and 150 may be measured at various temperatures (e.g., ranging from 25 to 175 degrees Celsius). These temperature-dependent time constant measurements may then be fitted to respective functions f3 and f2 (such as to polynomial functions) or stored in respective lookup tables. Block 220 may be configured to process the downhole temperature measurements T to calculate respective values ​​of τ3 and τ2 based on f3 and f2 (or retrieve these values ​​from respective lookup tables). These temperature-dependent values ​​τ3 and τ2 may then be used in Equations 3 and 4 to calculate respective compensated measurements.

[0062] Further references Figure 7, the bandwidth correction block 220 may further apply drill collar hysteresis compensation to correct for drill collar hysteresis. As described above, drill collar hysteresis may result from the earth's magnetic field (or other interfering magnetic field) inducing currents in the rotating drill collar wall. This current in turn induces a magnetic field in the drill collar hole (e.g., at the location of the magnetometer). The net effect often results in the measured magnetic field lagging behind the earth's true magnetic field (i.e., having a phase delay relative to the earth's true magnetic field). Drill collar hysteresis may be modeled (or approximated) as a low-pass filter with a time constant τ1 (in a manner similar to that described above for signal conditioning circuits 140 and 150). Therefore, in some embodiments, the magnetometer measurement results may be compensated for attenuation and delay introduced by both the drill collar hysteresis and the conditioning circuit 150.

[0063] Fig.10 is a block diagram of an example embodiment in which the attenuation and delay introduced by the drill collar hysteresis and conditioning circuit 150 is modeled as first and second cascaded low pass filters 310 and 320. Fig.10 In the example, the unfiltered magnetometer input B uf (representing the true magnetic field of the earth) is attenuated and delayed by a first low pass filter 310, which models the effect of the drill collar hysteresis. Then, the first low pass filter 310B f1 The output of is input to a second low pass filter 320 (which models the magnetometer conditioning circuit 150), where it is further attenuated and delayed. The second low pass filter 320B is then f12 The output of (which has been attenuated and delayed by two low-pass filters) is input to the ADC.

[0064] Continue to refer Fig.10 And refer again Figure 7 , the bandwidth correction block 220 can compensate for both the drill collar hysteresis and the conditioning circuit 150. Fig.10 , compensation proceeds from right to left. In other words, the digitized magnetometer measurements are first compensated for the delay caused by the conditioning circuit 150 (second low pass filter 320), and then the resulting partially compensated amount is further compensated for the delay caused by the drill collar lag (first low pass filter 310). For example, the digitized magnetometer measurements may be compensated according to equations 5 and 6.

[0065]

[0066] Among them B uc represents the uncompensated (digitized) magnetometer measurement, B c2 represents partial compensation, where the measurement is compensated for the delay caused by the conditioning circuit 150 (and similar to Fig.10 B f1 ), and B c12represents full compensation, where the measurement is compensated for the delay caused by both the drill collar hysteresis and the conditioning circuit 150 (and similar to Fig.10 B uf ), τ1 represents the time constant of the first low-pass filter 310 (drill collar hysteresis), and τ2 represents the time constant of the second low-pass filter 320 (regulation circuit 150). and As defined above.

[0067] As described above with respect to equations 3 and 4, correction box 220 may further correct for temperature variations in time constants τ1 and τ2. For example, τ1 and τ2 may be expressed as functions of the measured downhole temperature T such that τ1=f1(T) and τ2=f2(T). As described above, f2 may be a polynomial function obtained by empirically fitting temperature-dependent time constant data (e.g., within a temperature range of 25 to 175 degrees Celsius). It has been found that drill collar lag tends to vary linearly with temperature (within the temperature range described above) such that f1 may sometimes be approximated as a linear function (a first-order polynomial). Box 220 may be configured to process the downhole temperature measurement T to calculate corresponding values ​​of τ1 and τ2 based on f1 and f2 (or to obtain these values ​​from corresponding lookup tables). These temperature-dependent values ​​τ1 and τ2 may then be used in equations 5 and 6 to calculate the fully compensated magnetic field measurement B c12 (i.e. fully compensated magnetometer measurement).

[0068] Go to again Figure 7 The compensated accelerometer and magnetometer measurements may be further processed by radial disturbance compensation block 240 to remove the lateral components of the magnetometer measurements (e.g., B x and B y ). In the absence of such distortion and / or interference, when the drill string rotates in the wellbore (e.g., while drilling), B x and B y A circle will be drawn on the xy graph. This circle is centered at the origin and has a radius equal to B. ⊥ Local disturbances or magnetic interferences can produce an inhomogeneous magnetic field, causing B x and B y The trajectory of B is not centered at the origin and / or describes an ellipse (rather than a circle). For example, such perturbations or magnetic interferences may be caused by currents flowing through the power bus near the magnetometer. Also, mismatches in the calibration gain and offset of the x-axis and y-axis magnetometers may cause B to x and B y The trajectory describes an eccentric ellipse.

[0069] Block 240 is configured to correct B for such distortion and / or interference.x and B y The resulting distortion measurement trajectory can be represented as an ellipse, for example, as shown below:

[0070]

[0071] Among them, x and O y Indicates the offset along the x-axis and y-axis, At x and At y represents the attenuation along the x-axis and y-axis. In some embodiments, magnetometer measurements B may be collected while rotating (drilling). x and B y , and binned into a predefined number of azimuth sectors at 242. For example, the magnetometer measurements may be binned into 36 azimuth sectors (each extending 10 degrees). When an acceptable number of measurements are collected (e.g., when a buffer having a predetermined size is full, or when a predetermined number of measurements are received in each azimuth sector), the binned measurements are received by the fitting algorithm at 244, including N B x and B y Measurement results. Assume that there are N pairs of B x and B y Measurement results, which can generate the following vector descriptions of measurement results:

[0072]

[0073] Among them B x1 , B x2 , …, B xN and B y1 , B y2 , …, B yN Indicates N to B x and B y The measurement result, p, represents a vector of offset and attenuation values ​​as follows:

[0074]

[0075] For each pair of B in Formula 8 x and B y The best-fit vector p is iteratively calculated from the measurements, e.g., from the estimated Start and generate a Taylor series expansion around the estimate. When the higher-order terms in the Taylor series approach zero (i.e., less than a threshold), the vector p approaches the best fit. Once solved, the best fit vector p can be used in the loop algorithm 246 to calculate the corrected (undistorted) measurement results based on the distorted measurement results, for example, as shown below:

[0076]

[0077] Among them B cx and B cy represents the corrected (undistorted) x-axis and y-axis magnetometer measurements, B x and B y represents the compensated magnetometer measurement received from block 220 or alternatively the digitized magnetometer measurement from the ADC, and G x and G y Representation and attenuation At x and At y The related gains are as follows:

[0078] At x =(1+ΔG)B ⊥ =G x B ⊥

[0079] At y =(1+ΔG)B ⊥ =G y B ⊥

[0080] where ΔG is defined as follows:

[0081]

[0082] Continue to refer Figure 7 The rotational position, velocity and acceleration of the drill collar may be calculated at block 260 using substantially any suitable method. The compensated magnetometer measurements calculated at block 220 may be processed to calculate the rotational position, for example using ψ = arctan(B x / B y ). The rotational speed can then be calculated, for example, by differentiating consecutive magnetic tool face measurements, e.g. using where ψ(n) and ψ(n-1) represent consecutive rotational position measurements and Δt represents the time between consecutive measurements (e.g., 5, 10, 15, 25 milliseconds). The rotational acceleration can then be calculated, for example, by differentiating consecutive rotational speed measurements, e.g. using in and Represents continuous magnetic tool face measurement results.

[0083] The rotational position, velocity, and acceleration of the drill collar may also be calculated alternatively (or additionally) using a finite impulse response (FIR) filter. For example, in one such embodiment, a set of compensated magnetometer measurements may be evaluated using an FIR filter, for example, as follows:

[0084] x=(H T H) -1 H T ψ (11)

[0085] where x represents the unknown vectors including the rotational position, velocity and acceleration of the drill collar, ψ represents the rotational position measurements obtained from a set of K compensated magnetometer measurements, and H represents the fully determined transfer matrix such that:

[0086]

[0087] The right side of Equation 11 represents a FIR filter structure, where (H T H) -1 H T is a 3×K matrix and ψ is a moving window of K×1 observations. Thus, for each new value of ψ available, new (or updated) values ​​of the position, velocity, and acceleration of the drill collar can be calculated. As shown in FIG. 5 , the output from block 260 (e.g., vector x in Equation 11) can be provided to blocks 220 and 240.

[0088] Further references Figure 7 Various survey parameters may be calculated at block 280 based on the compensated accelerometer measurements and magnetometer measurements received from blocks 220 and 240. The calculated survey parameters may include, for example, wellbore inclination, wellbore azimuth, gravity tool face, magnetic tool face, and dip. Wellbore inclination Inc may be calculated based on the compensated accelerometer measurements, for example, as follows:

[0089]

[0090] Among them A c⊥ represents the compensated lateral component of the gravity field received from block 220, A cz represents the compensated axial component of the gravitational field. In some embodiments, A c⊥ and A cz The average may be taken over several tool revolutions while drilling.

[0091] The wellbore azimuth Azi can be calculated from the compensated accelerometer and magnetometer measurements, for example as follows:

[0092]

[0093] Wherein, α represents the tool face offset (the angular offset between the magnetic tool face and the gravity tool face), γ represents the angle between the longitudinal axis of the drill string (z-axis) and the compensated magnetic field vector, and Inc represents the wellbore inclination, for example, calculated according to Formula 12.

[0094] The inclination angle can also be calculated from the compensated accelerometer and magnetometer measurements, for example as follows:

[0095]

[0096] Where α, γ, and Inc are as defined above. Angles α and γ can be calculated based on compensated accelerometer measurements and magnetometer measurements, for example as follows:

[0097]

[0098] Among them B c⊥ represents the compensated transverse component of the magnetic field (eg, received from block 240), B cz represents the compensated axial component of the magnetic field, and

[0099]

[0100] in:

[0101] A c⊥ sinɑ=A cx cosΨ m +A cy sinΨ m

[0102] A c⊥ cosɑ=A cy cosΨ m -A cx sinΨ m

[0103] Among them A cx and A cy Represents the accelerometer measurements after compensation for the x-axis and y-axis.

[0104] The magnetic tool face angle and the gravity tool face angle can also be calculated, for example, as follows:

[0105]

[0106] Among them B cx and B cy represents the x- and y-axis compensated magnetometer measurement results, and the angle β can be determined, for example, as follows:

[0107]

[0108] Ksinβ=-sin(Dip)·sin(Inc)·sin(ɑ)

[0109] Kcosβ=sinγ-sin(Dip)·sin(Inc)·cos(α)

[0110] Shock and vibration of the drill string may be a potential source of error during drilling mode survey operations. Shock and vibration are particularly problematic during vertical or near-vertical drilling operations. The above embodiments may also optionally include an additional vibration compensation module, such as a Kalman filter and / or an averaging routine to compensate for such shock and vibration.

[0111] Continuing with reference to FIG. 5 , in an embodiment utilizing a magnetic field sensor 67 including at least one eccentric transverse magnetic field sensor, block 280 may be configured to calculate a magnetic field difference between the relative tool face angles on the first and second diameters (measured using the eccentric sensor). As described above, such a difference has been found to be sensitive to the interfering magnetic field emitted by the target. In such embodiments, block 280 may be further configured to process the difference to calculate at least one of a distance or a direction to the target in substantially real time while drilling. For example, block 280 may be configured to process the difference to calculate a magnetic field gradient, which in turn may be processed to calculate a distance and a direction to the target.

[0112] The calculated survey parameters and / or ranging measurements can be stored in downhole memory and / or transmitted to the surface, such as by mud pulse telemetry, electromagnetic telemetry (or other telemetry techniques). In some embodiments, the accuracy of the calculated parameters may be sufficient so that the drilling operation can forgo the use of conventional static survey techniques and / or conventional static ranging techniques. In such embodiments, wellbore survey and ranging measurements can be constructed at the surface based on the transmitted measurements.

[0113] Reference again Figure 3, the survey parameters measured at 108 (and in box 280 of FIG. 5 ) can be used to control and / or change the drilling direction in 110. For example, in many drilling operations, the wellbore (or a portion of the wellbore) is drilled according to a drilling plan, such as according to a predetermined direction (e.g., defined by the wellbore inclination and the wellbore azimuth) or a predetermined curvature. In some ranging embodiments, the drilling direction can be selected to intercept a magnetic target, such as another cased wellbore. In other operations, the drilling direction can be selected to avoid one or more magnetic targets. In other embodiments (such as in a twin well), the drilling direction can be selected to be parallel to the magnetic target. The change in drilling direction can be changed, for example, by actuating a guide element in a rotating steerable tool deployed above the drill bit. In some embodiments, the survey parameters can be sent directly to the RSS, which processes the survey parameters compared to the drilling plan (e.g., a predetermined direction or a predetermined curve) and changes the drilling direction to meet the plan. In some embodiments, the survey parameters can be sent to the ground using telemetry so that the survey parameters can be analyzed. Taking into account the survey parameters, drilling parameters (eg, drill bit weight, rotation rate, mud pump rate, etc.) may be modified and / or a downlink may be sent to the RSS to change drilling direction. In some embodiments, downhole and surface control may be used simultaneously.

[0114] It should be understood that the methods disclosed herein may be configured to be implemented by one or more controllers deployed downhole (e.g., in a rotary steerable tool or MWD tool). Suitable controllers may include, for example, a programmable processor, such as a digital signal processor or other microprocessor or microcontroller and a processor-readable or computer-readable program code embodying logic. Suitable processors may be used, for example, to execute the above-described instructions with respect to FIGS. 5 to 6. Figure 7 and Fig.10 The method embodiments (or various steps in the method embodiments) described herein may also include other controllable components, such as sensors (e.g., temperature sensors), data storage devices, power supplies, timers, etc. The controller may also be configured to communicate electronically with an accelerometer and a magnetometer, such as Figure 6 As shown. A suitable controller may also optionally communicate with other instruments in the drill string, such as, for example, a telemetry system that communicates with the surface. A suitable controller may also optionally include volatile or non-volatile memory or data storage.

[0115] Although the survey while drilling method and some of its advantages have been described in detail, it should be understood that various changes, substitutions and modifications may be made herein without departing from the spirit and scope of the present disclosure. In addition, in order to provide a brief description of these embodiments, all features of the actual embodiments may not be described in the specification. It should be understood that when developing any such actual implementation in any engineering or design project, numerous implementation-specific decisions will be made to achieve the developer's specific goals, such as meeting system-related and business-related constraints, which may vary from one implementation to another. In addition, it should be understood that such development work may be complex and time-consuming, but for ordinary technicians who benefit from the present disclosure, this will still be a routine task in design, production and manufacturing.

[0116] In addition, it should be understood that reference to "one embodiment" or "an embodiment" of the present disclosure is not intended to be interpreted as excluding the existence of additional embodiments that also incorporate the described features. For example, any element described with respect to an embodiment herein may be combined with any element of any other embodiment described herein.

[0117] All numbers or values ​​provided include numbers or values ​​that are "approximately" equal to or equivalent to the number, unless the context clearly indicates the opposite interpretation. For example, unless it is explicitly described as exactly 10%, the reference to 10% should be interpreted as "approximately 10%". The term "approximately" and other terms including "approximately", "substantially", etc. represent an amount close to the amount within standard manufacturing or process tolerances or still performing the desired function or achieving the desired result. For example, the terms "approximately", "approximately" and "substantially" may refer to an amount within the range of less than 5%, less than 1%, less than 0.1% and less than 0.01% of the amount. In addition, it should be understood that any direction or reference frame in the foregoing description is only a relative direction or movement. For example, any reference to "up" and "down" or "above" or "below" only describes the relative position or movement of the relevant elements.

Claims

1. A method for drilling a subterranean wellbore, the method comprising: drilling the wellbore by rotating a downhole tool assembly (BHA), the BHA comprising a drill collar, a cutting tool, a triaxial accelerometer set and a triaxial magnetometer set coupled to or within the drill collar; While drilling the wellbore, performing multiple sets of synchronous accelerometer measurements and magnetometer measurements using the three-axis accelerometer set and the three-axis magnetometer; calculating an interfering magnetic field by processing the synchronized accelerometer measurements and the magnetometer measurements; as well as At least one of a distance or a direction to a magnetic target located outside the wellbore is calculated by processing the interfering magnetic field.

2. The method of claim 1, further comprising: In response to calculating the at least one of the distance or the direction to the magnetic target, a direction of drilling the subsurface wellbore is changed.

3. The method of claim 2, wherein the drill string further comprises a rotationally steerable drilling tool located above the cutting tool, and the method further comprises: A steering element on the rotationally steerable tool is actuated to change the drilling direction.

4. The method of claim 1 , wherein calculating the interfering magnetic field comprises calculating a plurality of interfering magnetic fields and calculating at least one of the distance or the direction to the magnetic target located outside the wellbore, further comprising: calculating a magnetic field gradient by processing the plurality of interfering magnetic fields; as well as The at least one of the distance or the direction to the magnetic target is calculated by processing the magnetic field gradient.

5. The method of claim 1, wherein the three-axis magnetometer set includes at least one off-center transverse magnetic field sensor that is radially offset from a center position on the drill collar.

6. The method of claim 5, wherein the at least one transverse magnetic field sensor is radially offset from the central position by an eccentric distance of 10 mm to 40 mm or 10% to 40% of the diameter of the sensor housing in the drill collar. 7 . The method of claim 6 , wherein calculating the interfering magnetic field comprises magnetic field measurements made using the off-center transverse magnetic field sensor.

8. A method as claimed in claim 7, wherein the interfering magnetic field is the difference between a first magnetic field measurement and a second magnetic field measurement made using the eccentric transverse magnetic field sensor, the first magnetic field measurement and the second magnetic field measurement being made at diametrically opposite tool face angles while rotating the BHA and drilling the wellbore.

9. The method of claim 1, wherein performing the multiple sets of synchronized accelerometer and magnetometer measurements comprises synchronizing by removing a first time lag from the magnetometer measurements and removing a second time lag from the accelerometer measurements, wherein the first time lag is not equal to the second time lag.

10. The method of claim 1, wherein performing the multiple sets of synchronized accelerometer and magnetometer measurements comprises synchronizing by removing a first time lag and a second time lag from the magnetometer measurements and removing a third time lag from the accelerometer measurements, wherein the convolution of the first time lag and the second time lag is not equal to the third time lag.

11. The method of claim 1 , wherein making the multiple sets of simultaneous accelerometer measurements and magnetometer measurements comprises: while rotating the BHA and drilling the wellbore, causing a temperature sensor to measure a downhole temperature; processing the downhole temperature to calculate a first time lag and a second time lag; as well as The synchronized accelerometer and magnetometer measurements are obtained by removing the first time lag from the magnetometer measurements and removing the second time lag from the accelerometer measurements.

12. The method of claim 1, wherein making the multiple sets of synchronized accelerometer measurements and magnetometer measurements comprises synchronizing the accelerometer measurements and magnetometer measurements, comprising: While rotating the BHA and drilling the wellbore, measuring downhole temperature with a temperature sensor; calculating a first time constant and a second time constant by processing the downhole temperature; calculating the rotational position, rotational velocity and rotational acceleration of the drill string by processing the magnetometer measurements; removing a first time lag from the magnetometer measurements by processing the first time constant and the rotational position, the rotational velocity, and the rotational acceleration of the drill string; as well as A second time lag is removed from the accelerometer measurements by processing the second time constant and the rotational position, the rotational velocity, and the rotational acceleration of the drill string.

13. The method of claim 1 , wherein making the multiple sets of synchronized accelerometer and magnetometer measurements comprises synchronizing the accelerometer and magnetometer measurements, comprising: While rotating the BHA and drilling the wellbore, measuring downhole temperature with a temperature sensor; calculating a first time constant, a second time constant, and a third time constant by processing the downhole temperature; calculating the rotational position, rotational velocity and rotational acceleration of the drill string by processing the magnetometer measurements; removing a first time lag and a second time lag from the magnetometer measurements in sequence by processing the first time constant, the second time constant and the rotational position, the rotational velocity and the rotational acceleration of the drill string; as well as A third time lag is removed from the accelerometer measurements by processing the third time constant and the rotational position, the rotational velocity, and the rotational acceleration of the drill string.

14. The method of claim 1, wherein performing the plurality of sets of synchronized accelerometer measurements and magnetometer measurements comprises synchronizing the accelerometer measurements and magnetometer measurements by: calculating first and second offsets and first and second attenuations of the lateral components of the magnetometer measurements by fitting them to an ellipse; and The synchronized accelerometer and magnetometer measurements are obtained by removing the first and second offsets and the first and second attenuations from the magnetometer measurements.

15. A system for drilling a subterranean wellbore, comprising: a downhole tool assembly (BHA) coupled to the drill string and configured to rotate and thereby drill the subterranean wellbore; as well as a triaxial magnetometer group and a triaxial accelerometer group in the downhole tool assembly, the triaxial magnetometer group being in electrical communication with a first analog circuit, and the triaxial accelerometer group being in electrical communication with a second analog circuit, wherein the first analog circuit and the second analog circuit are in electrical communication with an analog-to-digital converter, the analog-to-digital converter being configured to digitize signals received from the first analog circuit and the second analog circuit, and wherein the analog-to-digital converter is in electronic communication with a digital signal processor, the digital signal processor being configured to: removing a first time lag by processing the digitized magnetometer measurements and removing a second time lag by processing the digitized accelerometer measurements, thereby synchronizing the accelerometer measurements with the magnetometer measurements; calculating an interfering magnetic field by processing the synchronized accelerometer measurements and the magnetometer measurements; as well as At least one of a distance or a direction to a magnetic target located outside the wellbore is calculated while drilling by processing the interfering magnetic field.

16. The system of claim 15, wherein the BHA further comprises a rotary steerable drilling tool configured to change the direction of drilling the subsurface wellbore in response to at least one of the distance or the direction to the magnetic target calculated by the digital signal processor.

17. The system of claim 16, wherein the three-axis magnetometer set includes at least one off-center transverse magnetic field sensor that is radially offset from a center position on the drill collar.

18. The system of claim 17, wherein the at least one transverse magnetic field sensor is radially offset from the central axis of the drill collar by an eccentric distance of 10 mm to 40 mm or 10% to 40% of the diameter of the sensor housing in the drill collar.

19. The system of claim 18, the digital signal processor configured to calculate the interfering magnetic field using magnetic field measurements made by the off-center transverse magnetic field sensor.

20. The system of claim 19, the interfering magnetic field being a difference between a first magnetic field measurement and a second magnetic field measurement made using the eccentric transverse magnetic field sensor, the first magnetic field measurement and the second magnetic field measurement being made at diametrically opposed tool face angles.