Real-time, limited orientation sensor auto-calibration

SA516380312B1Undetermined Publication Date: 2021-12-26BAKER HUGHES CO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
SA516380312
Authority / Receiving Office
SA · SA
Patent Type
Patents
Current Assignee / Owner
Filing Date
2016-11-15
Publication Date
2021-12-26
Estimated Expiration
2035-05-15
Patent Text Reader

Abstract

A system method and computer-readable medium for correcting measurements obtained by a down hole tool for residual measurement errors is disclosed. A down hole tool having at least two directional field sensors is disposed in a borehole. The at least two directional sensors are substantially orthogonal to each other and to a longitudinal axis of the down hole tool. Measurements are obtained from the at least two directional sensors during rotation of the tool by at least 360 degrees around the longitudinal axis of the tool. Residual measurement errors are determined for the obtained measurements, and a quality level of the determined residual measurement errors selected. The determined residual measurement errors are applied to the obtained measurements when the determined residual measurement errors are consistent with the selected quality level. In various embodiments, the residual measurement errors are reduced from a first value that does not match the selected quality level
Need to check novelty before this filing date? Find Prior Art

Description

<h2 style=";text-align:left;direction:ltr">Full description<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Background of the invention<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> This application claims the benefit of Patent Application No. 14 / 280309, filed May 16, 2014, which is incorporated herein by reference.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The present disclosure relates to magnetic measurements obtained in a borehole and, in particular, to the determination of residual measurement error in measurements obtained using a magnetometer or accelerometer in a borehole.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Petroleum exploration generally involves transporting sensors into a wellbore to characterize downhole formations. The sensor data is used to generate various records to record formation properties. These records can be obtained either using measurement-while-drilling (MWD) or measurement-after-drilling (MAD) processes, where sensors are transported on a drill string, or using a post-drilling process, where sensors are lowered into the wellbore on a cable, drill string, or tubing (the latter three are generally described by a wire to distinguish them from MWD and MAD). Sensors such as accelerometers and magnetometers are typically included at the sensor location and are generally used to determine the position of sensors in the wellbore, regardless of the conveyance method.<h2 style=";text-align:left;direction:ltr">Accelerometer and magnetometer sensors have measurement errors that are intrinsic to the sensor and, in the case of magnetometers, to the magnetic sources in the transmission system, including sensor housings. Although accelerometer and magnetometer measurements are useful, and in many cases necessary, for data recording operations, each accelerometer and magnetometer includes several measurement errors that affect the measurements. These errors can be caused, for example, by skew (or displacement), misalignment, different axial positions, and different sensitivities of the accelerometer and magnetometer components. Therefore, there is a need to reduce measurement errors in downhole measurement sensors, such as magnetometer and accelerometer measurements.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Accelerometers and magnetometers are also used to detect anomalies in both gravity and magnetic fields. Since gravity and magnetic fields are virtual constants, these anomalies are generally determined by the slopes of a standard field model, such as the WGS-84 gravity and gravity model and the International Geomagnetic Field (IGRF) model of the United States Geological Survey. Gravity anomalies are generally below the sensitivity thresholds of accelerometers used in a typical logging system. However, some magnetic anomalies are within the sensitivity range of ideal magnetometers, and if uncorrected, magnetometer data are generally degraded. Many formation loggers incorporate accelerometer and magnetometer measurements into the formation to determine the location of the formation subsurface.<h2 style=";text-align:left;direction:ltr">Magnetometers can detect anomaly features that may indicate the presence of nearby magnetic material, such as casing, borehole debris, or large retromagnetic effects, such as the residual magnetic field in volcanoes.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> General description of the invention<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In one embodiment, the present disclosure provides a method for correcting measurements obtained by a down-hole tool for residual measurement errors. The method includes: placing the tool having at least three directional sensor assemblies in a drill hole, the first assembly containing accelerometers and the second magnetometers, wherein the three directional accelerometer and magnetometer sensors are substantially perpendicular to each other in each assembly and, preferably, one axis of each assembly is parallel to a longitudinal axis of the down-hole tool, and each axis of each assembly is substantially parallel to a corresponding axis in the other assembly; measurements are obtained from the at least two directional sensor assemblies during data logging. This configuration provides a common tri-axial system for each sensor assembly, or the entire sensor assembly. From the measurement data, the sensor and instrument magnetic field can be determined by a non-linear inversion method and used to correct the accelerometer and magnetometer sensor data.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In another aspect, from the corrected sensor measurements, along with the known values ​​of the local Earth magnetic field vector, a nonlinear transformation method extracts a magnetic anomaly field vector at each measurement position. The extracted magnetic anomaly data are recorded to an output system, the anomaly data are removed from the magnetic data, and the resulting output data provides the input for further processing output values, such as well slope and well azimuth. Taking into account the corrected orientation outputs, the magnetic anomaly vectors can be transformed into the local Earth coordinate system. From the magnetic anomaly data, the magnitude and direction of the anomaly are calculated and the log processing output is output.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In another aspect, the present disclosure provides a method for correcting magnetic measurements obtained by a down-hole tool for residual measurement errors in a reduced sensor configuration. The method comprises: placing the tool having at least two directional field sensors in a drill hole, wherein the at least two directional sensors are substantially perpendicular to each other and to a longitudinal axis of the down-hole tool; obtaining measurements from the at least two directional sensors while rotating the tool at least 360 degrees about the longitudinal axis of the tool; determining the residual measurement errors of the obtained measurements; selecting a quality level of the specified residual measurement errors; and applying the specified residual measurement errors to the obtained measurements when the specified residual measurement errors are consistent with the selected quality level.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In another aspect, the present disclosure provides a computer-readable medium having a set of instructions stored thereon accessible to a processor to allow the processor to execute a method, a method of processing the complete sensor set, the reduced sensor set and / or extracting the magnetic declination.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Examples of specific features of the device and method disclosed here are summarized in more detail so that the detailed description can be better understood. Of course, there are additional features of the device and method disclosed here that will form the subject of the claims.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Brief explanation of the drawings<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> For a detailed description of the present disclosure, reference should be made to the following detailed description with regard to the accompanying figures, where similar items are described by the same numbers and where:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 1 is a schematic diagram of an example drilling system 100 comprising a drill pipe string having a drilling assembly attached to its lower end that includes a logging instrument set (logging string) housing accelerometers and magnetometers for making acceleration and magnetic field measurements according to one embodiment of detection;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 2 shows a schematic illustration of an example of a metal wire data logging system that has attached to its lower end a data logging instrument assembly (data logging line) that houses accelerometers and magnetometers to make acceleration and magnetic field measurements according to a detection pattern;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 3 illustrates the vertical sensor axes of the accelerometers and magnetometers for the data recording line segment. The magnetometer and accelerometer are included;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 4 shows a flowchart explaining how to reduce the measurement bias by implementing an Extended Kalman Filter (EKF) in one of the embodiments of the present disclosure;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 5 shows the determination of the deviation of the magnetometer axis x obtained using the extended Kalman filter method according to the current detection;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 6 shows the magnetometer y-axis deviation determination obtained using the extended Kalman filter and user-measured magnetometer measurement data relative to the corresponding magnetometer x-axis deviation determination shown in Figure 4;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 7 shows a time of approach for different levels of drift correction accuracy using the extended Kalman filter method disclosed here;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 8 shows an exemplary measurement situation for calibrating magnetometer measurements using the min-max method according to the current detection;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 9 shows an ideal measurement case where many difficult downhole conditions and deviant drill tool behavior can be considered for the min-max method disclosed;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 10 shows a flow chart illustrating an exemplary method for correcting magnetic deflection in one embodiment of the present detection;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 11 explains the effects of accelerometer and magnetometer deviation correction method and deviation corrections on accelerometer and magnetometer measurements on the calculated gravity and magnetic fields and on the calculated magnetic inclination before and after corrections to the measurement data shown for all depths in the wellbore log; and<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 12 illustrates the effects of the magnetic deviation correction method on magnetometer measurements obtained from a tool column with sharp magnetization near the magnetometer sensors before and after extended correction at all depths in the borehole log.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Detailed description:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 1 is a schematic diagram of an example drilling system 100 comprising a drill pipe string having a drilling assembly attached to its lower end that includes a magnetometer and an accelerometer for making various formation measurements according to one embodiment of detection. Figure 1 shows a drill pipe string 120 comprising a drilling assembly or bottom hole assembly (“BHA”) 190 transported in a drill hole 126. The drilling system 100 includes a conventional derrick 111 mounted on a platform or floor 112 that supports a rotary table 114 that is rotated by a prime mover, such as an electric motor (not shown), at a desired rotational speed. Pipes (such as the jointed drill pipe) 122, which have the drill assembly 190 attached at their lower end, extend from the surface to the bottom 151 of the drill hole 126. The drill bit 150, attached to the drill assembly 190, breaks up the geological formations when it is rotated to drill the drill hole 126. The drill pipe column 120 is coupled to the drawworks 130 via a Kelly joint 121, a swivel bridge 128, and a line 129 through a drum.<h2 style=";text-align:left;direction:ltr">Levers 130 are operated to control the weight on bit (“WOB”). The drill pipe column 120 may be rotated by an overhead motor (not shown) rather than by the main motor and rotary table 114. The operation of levers 130 is known in the art and therefore is not described in detail here.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In one aspect, a suitable drilling fluid 131 (also referred to as “mud”) from a respective source 132, such as a mud pit, is circulated under pressure through the drill pipe column 120 by a mud pump 134. The drilling fluid 131 passes from the mud pump 134 into the drill pipe column 120 via a de-surger 136 and a fluid line 138. The drilling fluid 131a is discharged from the drill pipe at the borehole bottom 151 through holes in the drill bit 150. The return drilling fluid 131b circulates up the hole through the annular space 127 between the drill pipe column 120 and the drill hole 126 and returns to the mud pit 132 via the return line 135 and a drill cutting screen 185 that removes the cuttings 186 from the return drilling fluid 131b. Sensor S1 in line 138 provides information about the fluid flow rate. Surface torque sensor S2 and sensor S3 connected to the drill pipe shaft 120 provide information about the torque and rotational speed of the drill pipe shaft 120.<h2 style=";text-align:left;direction:ltr">The penetration rate of the drill pipe column 120 can be determined from sensor S5, while sensor S6 can provide the hook load of the drill pipe column 120.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In some applications, the drill bit 150 is rotated by the rotation of the drill pipe 122. However, in other applications, a downhole motor 155 (mud motor) located in the drilling assembly 190 also rotates the drill bit 150. The rate of penetration (“ROP”) of a given drill bit and downhole assembly depends largely on the weight on the bit or the thrust force on the drill bit 150 and its rotational speed.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The surface control unit or controller 140 receives signals from downhole sensors and instruments via sensor 143 positioned in the fluid line 138 and signals from sensors S1-S6 and other sensors used in the system 100 and processes the signals according to programmed instructions provided by software to the surface control unit 140. The surface control unit 140 displays required drilling variables and other information on a monitor / display 141 used by an operator to control drilling operations. The surface control unit 140 may be a computer-based unit that may include a processor 142 (such as a microprocessor), a storage device 144, such as a solid-state memory, tape, hard disk, or other non-transitory storage medium, and one or more computer programs 146 in the storage device 144 that access the processor 142 to execute instructions contained in those programs.<h2 style=";text-align:left;direction:ltr">The surface control unit 140 may also communicate with a remote control unit 148. The surface control unit 140 may process data relating to drilling operations, data from surface sensors and instruments, and data received from downhole and may control one or more downhole operations and surface instruments.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The drilling assembly 190 also includes formation evaluation sensors or devices (also referred to as measurement-while-drilling, MWD, or data-logging-while-drilling, MWD, sensors) for determining resistivity, density, porosity, permeability, acoustic properties, nuclear-magnetic resonance properties, corrosive properties of the downhole fluids or formation, salt or brine content, and other selected properties of the formation 195 surrounding the drilling assembly 190. These sensors, generally known in the art and for general convenience, are herein designated by the number 165.<h2 style=";text-align:left;direction:ltr">The drilling assembly 190 may also include a variety of other sensors and communication devices 159 to control and / or determine one or more functions and properties of the drilling assembly (e.g., speed, vibration, bending moment, acceleration, oscillations, rotation, sticking, slip, etc.) and drilling operating variables, such as weight on the drill bit, fluid flow rate, pressure, temperature, rate of penetration, azimuth, tool face, drill bit rotation, etc. The downhole assembly 190 may include multiple survey instruments that locate and orient the drill pipe column 120 in the drill hole 126. In many embodiments, these instruments may include a magnetometer 167 and an accelerometer 169, such as those shown in FIG. 2. A wireline system for performing data logging measurements is discussed below relative to FIG. 9.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The orientation sensor correction method may be used in a wireline system (in addition to logging-while-drilling (LWD) and measurement-while-drilling (MWD) systems) to determine a deviation correction tool at the logging depth. Figure 9 shows a schematic illustration of an example wireline data logging system 900. The system 900 is illustrated to include a data logging tool or tool 910 transported in a wellbore or drill hole 901 formed in an earth formation 913. The tool 910 may be transported in the wellbore 901 by any suitable member 914, such as an electrical armored cable (also referred to as “wireline”), slick line, coiled-tubing, etc. The conveying member 914 may be coiled onto a winch 917 or similar device known in the art. The conveying member 914 may be transported in the wellbore 901 using a platform or fixture 915 at the surface. The conveying member 914 is electrically connected at one of the The terminals are connected to a control unit on the surface 990 and to the other end of the tool 910.<h2 style=";text-align:left;direction:ltr">The control unit 990 may be a computer-based system configured to process data or signals provided by the instrument 910 to estimate one or more desired variables, send command signals to the plurality of instrument components 910, and generally control the operation of the instrument 910. The control unit 990 includes a processor 992, a data storage device 194, and software for processing data and controlling operations of the instrument 910. The control unit 910 may include a display unit and peripheral devices for data input and to provide a human interface. A telemetry system 912 may be used to establish bidirectional data communication between the instrument 910 and the control unit 990. The control unit 990 and the instrument 910 may include, respectively, signal decoding and interpretation units 998 and 916 and recording units 994 and 918. The device 910 may include a control unit 970, which also includes a processor 972 (such as a microprocessor), a data storage device 974, such solid-state memory, and computer programs 976 configured to be used by the processor 972 to execute instructions contained in such programs 976.<h2 style=";text-align:left;direction:ltr">Signals sent by the tool 910 to the surface control unit 990 are decoded, interpreted, recorded, and processed by the corresponding control units. The tool 910 also includes a magnetometer 924 exemplary as a tri-axial magnetometer according to FIG. 2. An example of an accelerometer 922 such as a tri-axial magnetometer according to FIG. 2 is also illustrated. Magnetometer and / or accelerometer measurements may be obtained during the wirelines system data logging process or during the wirelines tool separation from the wellbore.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 2 illustrates a section of the downhole assembly 190 that may include a magnetometer 167 and an accelerometer 169. The magnetometer 167 may be a triaxial magnetometer with magnetometers (mx, my, mz) aligned perpendicularly to each other. The triaxial magnetometer includes a z-axis-oriented magnetometer mz 206 oriented along the longitudinal axis of the drill pipe column and two magnetometers (e.g., an x-mx magnetometer 204 and a y-my magnetometer 205) oriented transversely to the longitudinal axis 210 of the drill pipe column. Similarly, the accelerometer 169 may be a tri-axial accelerometer with three accelerometers (ax, ay, az) aligned perpendicularly to each other. The triaxial accelerometer 202 may include an az accelerometer 203 oriented along the z axis (longitudinal axis 210) of the drill pipe column and two accelerometers (an x accelerometer 201 and a y accelerometer 202) oriented transversely to the longitudinal axis 210 of the drill pipe column.<h2 style=";text-align:left;direction:ltr">Accelerometer and magnetometer measurements can be used to determine the position of the downhole assembly 190 and / or the drill bit 150, the inclination of the drill pipe column 120, the azimuthal orientation of the drill pipe column 120 (e.g., the angle of the drilling direction), and many other survey measurements. In general, accelerometer measurements (ax, y, az) and magnetometer measurements (mx, my, mz) can be taken while the drill pipe column 120 rotates about its longitudinal axis. Generally, measurements are taken at a relatively fast sampling frequency to obtain an acceptable number of measurements during a single rotation of the downhole assembly 190.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The magnetometers 167 and accelerometers 169 may incorporate systemic sensor errors that distort the accelerometer and / or magnetometer measurements, thereby providing residual measurement errors. Systemic sensor errors can be related to many factors, including: drift or offset, different sensor sensitivities (scale factors), differences in the axial positions of magnetometer and / or accelerometer components, misalignment errors, etc. The methods disclosed herein may be used to determine instrument sensor corrections that can be used to correct accelerometer and / or magnetometer measurements for systemic instrument errors. These calibrations are self-reliant when compared to a complementary laboratory calibration.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In many of the methods disclosed herein, the deviation correction instrument disclosed herein may determine the errors of a system sensor, such as a deviation magnetometer or deviation accelerometer, at a selected resolution before applying the selected deviation to correct the magnetometer and / or accelerometer measurements. The present disclosure may include reducing the residual measurement error (instrument deviation) from a first value outside a selected quality threshold value to a second value at the selected quality threshold value, using any of the methods disclosed herein. For example, in one embodiment, an extended Kalman filter may be used to obtain the deviation of the magnetometer instrument over a selected threshold value. In other embodiments, a min-max method may be used to determine the min-max values ​​of the magnetometer measurements during a full rotation of the drill pipe column, thereby allowing the deviation correction instrument to be based on the min-max values.<h2 style=";text-align:left;direction:ltr">In a third embodiment, survey measurements obtained from accelerometer and magnetometer measurements may be used to convert magnetometer measurements from a ground-based coordinate system into an instrument-based coordinate system where the instrument deviation is a constant value and can therefore be determined. The instrument deviation is then determined to correct the survey measurements. An iterative loop may be formed where the corrected survey measurements are used again to convert measurements from the ground-based coordinate system to the instrument-based coordinate system, allowing subsequent iterations of the instrument deviation to be determined in the instrument-based coordinate system. The deviation correction procedure may be repeated for a selected number of iterations or until the instrument deviation is less than a selected threshold value. Various embodiments are discussed in more detail below.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Tool Auto-Calibration using local Earth gravity and magnetic field<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In one embodiment, instrument bias can be determined as a result of converting standard values ​​of the Earth's gravity and magnetic field from an Earth-based frame of reference into a reference instrument-based frame using transformation variables based on magnetometer and / or accelerometer measurements from a pair of vertical triaxial accelerometer and magnetometer sensors. Once the standard magnetic and accelerometer components are obtained in the reference instrument-based frame, they can be compared to measured values ​​of the Earth's gravity and magnetic field obtained using the accelerometer 169 and magnetometer 167. Differences between the standard and measured values ​​can therefore lead to tool sensor bias vector, misalignment, and scale factor corrections. Specific sensor corrections can be used to correct the accelerometer and magnetometer measurements and, further, to correct or adjust the transformation variables.<h2 style=";text-align:left;direction:ltr">The modified variable transformation can then be used to perform another transformation of the standard values ​​of the Earth's gravitational field and Earth's magnetic field in the instrument reference frame for iterative convergence with a solution to the instrument sensor corrections.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The following definitions, assumptions, and observations are used as follows:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Definitions<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The geomagnetic fields specified in the selected geospatial base field models are assumed to be accurate, e.g., World Geodetic System 1984, WGS-84, maintained by the National Imagery and Mapping Agency (NIMA), and the International Geomagnetic Reference Field (IGRF), maintained by the US Geological Survey (USGS).<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Any measured field differences will be described by deviations.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The Earth's fields will always be overridden by "ground", as in the Earth's magnetic field.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Accelerometer measurements, which include an acceleration sensor, will be referenced to the gravitational field of the accelerometer's observation point. The gravitational field and acceleration are indistinguishable.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Magnetometer measurements will be referred to as the magnetic field.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Hypotheses:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The ground fields are constant over the time and spatial range of the logging run.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Local magnetic deviations are constant throughout the data recording cycle.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Systemic sensor errors include magnetization of the instrument shaft on the data recording cycle.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Notes:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The Earth's fields are fixed in the local Earth coordinate system.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> System sensor errors are fixed in the sensor coordinate system, unless otherwise specified.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 10 shows a flow chart 1000 illustrating an exemplary method for extracting magnetic deflection in one embodiment of the present disclosure. In block 1002, standard values ​​for the Earth's magnetic field and / or gravity field are obtained. For example, the Earth's magnetic field may be a known value estimated from the field and length in the International Geophysical Reference Sphere or another suitable value. In block 1004, magnetic field and gravity field measurements are obtained using a magnetometer and an accelerometer for the wireline system. The magnetic field and gravity field measurements are contained within a reference instrument-based framework. In block 1006, the obtained magnetic field and gravity field measurements are used to determine the orientation and direction variables of a drill pipe column. These variables may include tool tilt, tool relative load, and borehole azimuth (AZ) (or wireline drift azimuth). Where these variables are determined experimentally, they may contain errors which may be due, for example, to instrument drift or residual measurement error.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Angles such as declination (wireline deviation (DEV)) and relative bearing (RB) to the tool's highside can be calculated using accelerometer measurements. Declination is the angle between the vertical plane and the drillhole at the point of measurement. Relative bearing is the angle between the x-axis projection of the vertical tools and the tool's highside. Horizontal azimuth (HAZI) (wireline AZ) can be defined as the projection of the magnetic vector relative to the direction of the drilling tools (i.e., perpendicular to the z-axis) on the positional horizontal plane. We will use the DWD conventions, rather than the wireline conventions, except for DWD declination, where wireline deviation will be used to avoid any disturbance related to magnetic declination. Drillhole azimuth or drift azimuth (AZ) is the projection of the z-axis of the wellbore to the horizontal plane. These reference angles are related by the equations:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (1)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Which can be used as a data orientation consistency check. Data orientation can be calculated from raw accelerometer data using, for example, a right-hand z-down, x-north, and y-east coordinate system. The slope can be calculated by:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (2)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Relative load can be determined by:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (3)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The azimuth can be determined by:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (4)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> where<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (5)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> and<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (6)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> where (ax, ay, az) and (mx, my mz) are the measured components of the acceleration force and magnetic field, respectively, at each sample position in the instrument's coordinate system. 'A' is the magnitude of the acceleration, which represents the acceleration due to gravity. A bold Italian line indicates a vector. A bold natural line will indicate a matrix.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In Equations (1)-(6), the magnetic and accelerometer components are assumed to be accurate (after accelerometer component filtering, where necessary). However, an error in the system sensor, the accelerometer, or another magnetic source near the sensors affects the estimation of the borehole azimuth, magnetic field strength, and magnetic inclination. The measured fields are the vector sum of the Earth's fields (gravity, magnetic field), and errors in the system sensor and the accelerometer or the skewed gravity field of the sensor's magnetic field.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (7)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (8)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Sensor measurements are performed in the tool body's coordinate system. The x- and y-axes are perpendicular to the tool's longitudinal axis, while the z-axis is parallel to the tool's longitudinal axis, forming a right-handed coordinate system. The positive z-axis increases downhole, where positive z increases depth. This detection method estimates the value of correction vectors.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Due to system sensor errors, the calculated orientation, drill hole azimuth and magnetic inclination are in error in Equations (1)-(6). Equations (4) and (6) can be modified to obtain Equations (9) and (10), as follows:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (9)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (10)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Using the following substitutions:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">An additional complication arises because the known components of the ground fields are not known in the instrument's coordinate system. Obtaining values ​​for the ground field components in the instrument's coordinate system requires several twists. First, there is a rotation of the geomagnetic bottom-northeast coordinate system about the z-axis by the azimuth angle to align the y-axis of the ground coordinate system with the y-axis of the drill hole in a local vertical reference frame. Second, there is a rotation about the borehole diffractometer (Equation (2)) to align the z-axis of the rotating ground coordinate system with the borehole. Third, there is a rotation about the z-axis of the tool column by the relative load on the high side of the rotating ground coordinate system with the tool's x- and y-axes. At this point, if the vector correction is zero, the instrument field measurements are equal to the ground field, as depicted in the instrument's coordinate accuracy in the accuracy and disturbance constraints of the sensors. In general, however, the correction vector will not be zero, and the magnetic disturbance vector is effectively large enough to cause directional errors.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In block 1008, the standard values ​​of the Earth's magnetic field and Earth's gravitational field are converted from the Earth-coded frame of reference to the instrument-based frame using the definition of angles δ, ψ, φ, and θ determined from equations (1)–(6). The conversion of the standard values ​​of the Earth's magnetic field in the instrument coordinate system can be specified by the standard rotation vectors:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (11)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> where are orthonormal rotation matrices, and is a unit vector in the direction of the Earth's magnetic field in the geostationary coordinate system and depends on the magnetic declination, where, . Similarly, the transformation of the gravitational field in a tool coordinate system can be defined by<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (12)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Where is a unit vector in the direction of the Earth's gravitational field in the Earth's positional coordinate system, and is determined by, where<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In block 1012, components of the first defined bias correction vector are applied to the magnetometer and accelerometer measurements to correct those measurements for instrument bias. In block 1014, a determination is made as to whether the defined instrument bias measurements converge to a selected value. The defined instrument bias may be compared to a selected threshold value. Alternatively, where the method described by flowchart 1000 is an iterative process, the defined instrument bias may be compared to the defined instrument bias from one or more previous iterations. The process also agrees to a bias correction obtained after a predetermined number of method flowcharts 1000.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">If the tool bias is met with a selected value, the process terminates at block 1018. Otherwise, the process continues to block 1016, where the transformed variables, i.e., δ, φ, ψ, and θ, are recalculated using the tool values ​​measured by the magnetometer and accelerometer correcting the selected bias tool. The process then returns to block 1008, where the normalized values ​​are converted back into the reference tool-based framework.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Earth's gravitational field coordinates in the tool<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> As defined, the term used to describe Earth's gravity is gravitational field strength. Gravitational field strength and acceleration due to gravity describe the same physical quantity. However, acceleration due to gravity can have a restricted meaning for some readers. For example, the global average acceleration due to gravity for Earth is 9.80665 m / s². The spatial definition of space is based on the acceleration due to gravity at mean sea level.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In general, the gravitational field is known in the Earth's coordinate system, while the accelerometer takes measurements in the instrument's coordinate system. To process accelerometer data, the data is transformed into the same coordinate system. As with the magnetometer data mentioned above, the orientation of the information is influenced by accelerometer deviations.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The method here rotates the gravity vector from the natural ground coordinate system into the tool coordinate system. First, there is a rotation about the y-axis by the deviation of the ground z-axis alignment with the wellbore. Next, there is a rotation about the z-axis by the relative load to align the ground frame with the tool body coordinate system (=wellbore deviation, =wellbore drift azimuth). These rotations are shown below in Equation (13):<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (13)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> where is a unit vector in the direction of the magnetic field, R are rotation matrices and expand below, is the load relative to the upper side, θ is the diffraction and θ is the azimuth.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Equation (14)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> by stretch<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (15)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> This equation gives the x-, y-, and z-axis components of the Earth's gravitational field in a tool body coordinate system, where<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (16)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The components of the ground field in the instrument's coordinate system.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The Earth's magnetic field, in the lower magnetic north z coordinate system, can be represented by a magnitude and slope such that<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (17)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In the geostationary coordinate system, where x is magnetic north, y is magnetic east, z is down (NED), where Be is the magnitude of the Earth's magnetic field strength and θ is the magnetic inclination at the desired location. The Earth's magnetic field can be estimated spatially and longitudinally in the International Geophysical Reference Sphere, updated every five years by the U.S. Geological Survey, or the British Geological Geomagnetic Model (BGGM), updated annually, etc. Or the field can be measured at the desired location using established methods. With the magnetic north system chosen, there is, of course, no y-axis component.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Earth's magnetic field coordinates in the tool<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">To obtain the Earth's magnetic field in the instrument's coordinate system, the first one is rotated about the z-axis by azimuth, 𝜙, to align the Earth's coordinate system y-axis with the wellbore's y-axis. Next, one is rotated about the y-axis by diffraction to align the Earth's z-axis with the wellbore. Next, one is rotated about the z-axis by relative load to align the Earth frame with the instrument body's coordinate system. (𝛿 = wellbore diffraction, 𝜙 = wellbore azimuth, ψ = relative load to the high side, and θ = magnetic inclination). These rotations are given in Equation (18):<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (18)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> where is the unit vector in the direction of the magnetic field, R are rotation matrices and extend below. ψ is the load relative to the high side, θ is the diffraction, Ι is the azimuth, and θ is the magnetic declination.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (19)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> by stretching<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Complete the expansion<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The completion of the expansion is also obtained, Equation (20).<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (20)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Equation (20) gives the x-, y- and z-axes of the Earth's magnetic field in the instrument body's coordinate system, where<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (21)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The components of the ground field in the instrument's coordinate system.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Properties of measured data, instrument body coordinate system<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Magnetic field measurements can be obtained using a three-axis vertical sensor with the x- and y-axes perpendicular to the tool's longitudinal axis, and the z-axis parallel to the longitudinal axis. The sensors define a right-handed coordinate system with z increasing downhole. Generally, the x-axis is defined as the rotation of the reference tool. Measurements with the results from this system yield a measurement of the magnetic field vector.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> where i', j', and k' are vector units in the tool body.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">For measurements affected by magnetometer and / or instrument (or tool string) deflection, borehole magnetic fields, or previous magnetic fields, an additional vector field component is added to the measured field. This additional vector field is a magnetic correction vector and is given by Equation (22):<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (22)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (22) includes magnetic deflection errors, systematic errors of the magnetic field and deviations of the local fields in a single term.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Therefore, the measurement of the Earth's magnetic field can be:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (23)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Provides the corrected measured magnetic field.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (24)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (25)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">When a tri-axial magnetometer sensor is combined with a tri-axial accelerometer subsystem, where each accelerometer is parallel to one of the magnetometer axes, additional measurements of acceleration due to gravity can be determined. Since gravity and Earth magnetic vectors typically point in different directions (except when very close to the magnetic poles), gravity and magnetic vectors can be used to define a positional coordinate system that can be determined by sensor measurements, e.g., a z-down, magnetic north, or east coordinate system.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The equations for accelerometer measurements proceed in a similar straight line:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (26)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (27)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> where is the measured magnitude of the gravitational field. A is the measured acceleration due to the vector's gravity. However, physical accelerometers generally include systematic sources of error,<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> These systematic errors modify the measured acceleration in a similar way to the magnetization systematic errors mentioned above. Therefore, the corrected acceleration measurements can be written as:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (28)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> where is the true gravitational field strength, is the measured gravitation field strength, and is the correction vector for accelerometers. The correction vector for the gravitational field strength can thus be defined by<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The magnitude of the correction wave for the gravitational field can be determined as follows:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (29)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> where θ are the individual accelerometer measurements, and θ are the components of the correction vector. Thus, the instrument's tilt from the vertical plane with the accelerometer deflection is determined by:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (30)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The rotation angle to the high side becomes:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (31)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Where the Earth's gravity and magnetic vectors naturally point in different directions (except very close to the magnetic poles), gravity and magnetic vectors can be used to determine a z-coordinate system: down, magnetic north, east, and NED. With two coordinate systems defined, the magnetic inclination and azimuth of the drill hole can be determined. The magnetic inclination can be used as a quality check once the tool drifts have been resolved.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In one embodiment, the measured ground field is essentially corrected to equal the ground field. From Equation (23)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (32)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> From equation (28):<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (33)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equations (32) and (33) can be solved to estimate the correction vectors. The systematic error sources, acceleration, and skewed magnetic fields are contained in the correction terms. However, the vectors also appear in the sensor orientation calculations. Thus, the magnitude of the error depends on the magnitude of the sensor correction vectors. These can be formulated in a matrix equation of the form<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (34)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">where D is a data vector, 𝜳 is a matrix operator, and a is a correction vector. Since we take three independent measurements, the data vector D contains an N×3 matrix (N rows and 3 columns) where N is the number of data points. Since we are interested in solving the model vector, we can invert Equation (33) to get:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (35)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The inverse shown in equation (33) is generally an approach to a nonlinear level:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (37)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (38)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The residual wave for magnetometers is determined as follows:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (39)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (40)<h2 style=";text-align:left;direction:ltr"> Where G and B are the gravitational and magnetic field volumes on the Earth's surface, respectively. The remaining vector 𝜺 is the error for each component of the data vectors, and it can be represented either as an N×3 matrix or a 3N×1 vector. Equations (37)-(40) can be combined into a single six-variable model. The methods presented here aim to reduce or minimize the remaining error. Using the non-standard form of equations (37) and (38), the error volume can be calculated by the sum of the squared errors in each component, which are determined in a register matrix by 𝜺T 𝜺. The minimum condition is: Equation (41) Where the derivatives include partial differentiations with respect to the components of the model vector a. Equation (37) can be solved using the Levenberg-Marquardt method Equation (42) <h2 style=";text-align:left;direction:ltr">where is the Jacobian, is the identity matrix, 𝜆 is the non-negative scalar damping parameter evaluated at the kth iteration, and 𝜆 is the step direction at the kth iteration. The larger 𝜆 is, the larger the damping effect. The choice of the damping parameter is a matter of subjective and dependency data, and can vary specifically from zero to a large number (arithmetically to infinity). The Jacobian is defined by:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (43)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> where M is the number of model variables and the Jacobian is evaluated at each data point i. The problem can be solved iteratively using the recurrence relation<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (44)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> where m is the iteration counter, λ is a damping factor, and Δa is an update vector. The new model estimate becomes<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (45)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The initial estimate of a is a sophisticated guess. The guess is based primarily on some knowledge of the expected solution values ​​and the expected range of the solution's expected values. The method iterates until the residual vector reaches some predetermined clearance, or the number of iterations is exceeded, in which case it either does not iterate or iterates very slowly. The damping factor 𝜆 incorporates the effect of a low-pass filter and reduces the model's availability from iteration to iteration, helping to stabilize the solution.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> From equations (7) and (8), the overall measured field obtained at a sensor array in the instrument axes can be determined by the equation:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (46)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> where either is any of the general Earth fields, is a scale factor matrix, is a misalignment matric, and is a correction vector. The scale factor matrix is ​​a matrix that provides the correct scale factor to each of the triaxial measurements:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (47)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> With Sx=Sy=Sz=1 specifically.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The misalignment matrix of equation (46) describes any misalignment of the x-, y- and z-axes relative to the tool axis and is determined by a triangular matrix product of three rotation coordinates, one about each axis, by the misalignment relative to the coordinate system:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> An orientation sensor is selected to provide a standard factor calibration in a system with a rotation speed of 100°, which is the orientation that satisfies the following cosine orientation condition: where the angles are the angle from each axis of the sensor's coordinate system perpendicular to the rotation axis, the angle x from the x-axis, the angle y from the y-axis, the angle z from the z-axis, subject to the condition where the angles then satisfy<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> By specifying a coordinate system such that the z-axis is not misaligned, where, it is perfectly aligned by a sensor coordinate system, and misalignment is<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (48)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Which becomes<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (49)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> When the misalignment is observed to be very small, small angle approximations can be applied: () to obtain<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (50)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Now we will define A, so that<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (51)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> and<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (52)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (46) can be rewritten to be<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (53)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> From equations (37) - (40) we have:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (54)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (55)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Where we substitute the symbol Λ for misalignment to avoid disturbance to the gravitational field measurement<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (56)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (57)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The problem to be solved extends to include a scalar factor and axes misalignment; therefore, equations (32) and (33) can be rewritten as:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (58)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (59)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> where<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (60)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> and<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (61)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> For magnetometers and accelerometers, respectively, the functional dependencies of B and G have been added to the notation for concentration.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The method described above can be applied to the correction vector to determine the correction vector, which essentially shifts the origin to (0,0). Using the corrected data, the method can solve for the standard factor and then use the corrected standard factor data to correct the misalignment, or vice versa. Multiple iterations can be used. The number of iterations can be reduced after a few acquisition cycles by first correcting the standard factor and then updating the misalignment with the final correction values.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Since accelerometer solutions do not apply to magnetometer data, accelerometer corrections can be defined first and then used to solve the magnetometer data. Equations (58) and (59) describe the systems of equations to be solved. These methods can be extended to include temperature errors, using temperature equivalents, e.g.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Magnetometer correction using an extended Kalman filter<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In one embodiment, regular magnetometer measurement errors can be rapidly determined using an extended Kalman filter (EKF) in a rotating system. The EKF allows for correction of drift, scalar factor, and misalignment errors on the x- and y-oriented magnetometers during data acquisition. The EKF also allows the scalar factor of the x- and y-oriented magnetometers to be calibrated so that relative measurement errors or sensitivities between the x- and y-oriented magnetometers do not affect drilling angle calculations. Due to the use of the EKF, the uncertainty in the estimated drift can be obtained after each magnetometer measurement. Therefore, the operator can specify a chosen level of accuracy and choose not to have an output if this level is not achieved. Thus, the operator can ensure that the downhole calibration of the x- and y-oriented magnetometers to a specified level of accuracy at any inclination and / or azimuth of the drill pipe column is achieved. In an exemplary embodiment, the specified level of accuracy can be less than about 10 nanotesla.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Equations (56)-(59) reveal an ideal model for determining actual magnetometer measurements from measured magnetic field values. The measured magnetic field obtained at the magnetometer at the instrument axes can be determined by the equation (where the convention has been modified in this particular way:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (62)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> where is the true or actual value of the magnetic field, S is a scale factor matrix where the components relate to the scales of the triaxial magnetometer and are determined by<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (63)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> With Sx=Sy=Sz=1 specifically. The matrix M in equation (1) describes any misalignment of the x- and y-axes relative to the tool axis and is determined by<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (64)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The vector b in equation (57) is a vector deflection related to the deflection instrument of the magnetometer and is determined as follows:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (65)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Some of these error variables (i.e., scaling factor S, misalignment M, skew b, etc.) can be estimated based on knowledge of where the magnetic measurements Bz and are constant values ​​for the magnetometer rotation at a chosen depth. Due to the orientation tool and rotation angles, suitable values ​​for the constant magnetic measurements Bz and may not be available. However, an extended Kalman filter method is capable of processing false measurements, which is the difference between estimates of constant (unknown) values ​​from the enclosed magnetic field and the corrected radial and axial magnetic field values.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (62) can be solved for BTF first to get:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (66)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Thus, the true values ​​of the magnetic field BTF can be determined from the measured values ​​BmTF using Equation (66). It is clear that all error terms in Equation (66) are instantaneously observable from a rotation about the z-axis when the rotation angle and orientation tool are unknown. In addition, Sx and Sy are not instantaneously observable without knowing the axial field strength. However, a mean correction to a scalar factor can be estimated using a single scalar correction variable, S. Applying the observable corrections to the vector magnetic field measurement, one obtains:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (67)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Although the exact values ​​of Bz and are considered unknown due to the unknown instrument orientation, they are constant during rotation about the z-axis. Therefore, these exact values ​​can be passed in an extended Kalman filter to identify many observed deviations, measurements, and misalignment values. The measurements are formulated based on the components of Equation (7) as follows:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (68)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> and<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (69)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> where x is a state vector defined by:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (70)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Cxy and Cz are unknown constants that represent the actual values ​​of the radial and axial magnetic fields, respectively. Equations (68) and (69) are pseudo-measurements, in that they can be obtained, but are not actually measured. The pseudo-measurements (Equations (68) and (69)) are mapped to an extended Kalman filter with a zero value, indicating that<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (71)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> and<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (72)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The partial derivatives obtained from equation (68) are defined in the following equations:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equations (73)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The partial derivatives obtained from equation (69) are given by the following equations.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equations (74)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> where<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (75)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The undefined partial derivatives in equations (73) and (74) are generally zero. The partial derivative vector from each measurement can be measured in the extended Kalman filter formula and is determined by<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (76)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Equation (77)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Methods for implementing an extended Kalman filter to identify instrument drift are discussed below. In an extended Kalman filter, , represents the true value at time of the state vector containing the variables to be estimated. Furthermore, , represents the estimate of the state vector at time based on the measurements obtained up to time , and , represents the estimate of the state vector at time based on all measurements obtained up to time . Also, , represents the state error covariance matrix. The nonlinear measurement thus includes the form<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (78)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> where is the state function and is the noise that is independent of one measurement relative to the other. A straightening around the last estimated vector state results in the following equation:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (79)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> where<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (80)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> is the measure matrix of the evaluated partial derivative of the last measure, and<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (81)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Rearranging equation (79) and obtaining an exception for the first truncated expansion leads to the remaining measure<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (82)<h2 style=";text-align:left;direction:ltr"> Updating a candidate such as a Kalman extended measurement extends the measurement information from the latest measurement in the state estimate. The process of updating a candidate such as a Kalman extended measurement is performed using: Equations (83) where Equation (84) Figure 3 shows a flow chart 300 that illustrates a method of reducing measurement deviation by implementing an extended Kalman candidate in one of the current detection models. In box 301, the filtering process is started. The index k is set to k = 1 and the initial values of are set. In box 303, the following notes will be made for the magnetic field and the noise covariance matrix difference matrix. In box 305, variables from the state vector are used to calculate the values of the magnetic field and the remainder to be determined from equations (68), (69), (76) and (77). The remaining materials can be determined by: Equation (85) And the partial derivative can be determined by: In box 309, the increment is determined. The Kalman increment can be determined using the DeVries equation masked by the equations: <h2 style=";text-align:left;direction:ltr">Equation (86)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (87)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (88)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In block 311, the state vector is estimated and the variance is determined. The state vector's estimate and variance can be determined using the De Vries formula, where:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (89)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (90)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (91)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (92)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In Block 313, it will be determined whether the values ​​of the deviation tool converge. The square root of the diagonal elements of a matrix can be compared to the threshold values ​​of the chosen convergence to determine convergence. If the square root of the diagonal elements is at the threshold value of the chosen convergence, the Extended Kalman Filter is considered to have converged. If convergence is not achieved, the Extended Kalman Filter method returns to Block 303 with updated vectors, such that:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (93)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (94)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (95)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 4 shows the determination of the magnetometer x-axis deviation obtained using the extended Kalman filter method according to the present disclosure. The time along the abscissa is given in seconds and the deviation error along the ordinate is given in nano-teslas. The deviation error is determined using about 30 samples (magnetometer readings) per second with the magnetometer rotating at about 90 revolutions per minute. It can be seen that in about 5 seconds, the deviation error (residual measurement error) 402 is reduced to a 2-sigma uncertainty level of about 25 nano-teslas (404) using the extended Kalman filter method disclosed herein.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 5 shows a magnetometer y-axis deviation determined using an extended Kalman filter and the user's measured magnetometer measurement data relative to the corresponding magnetometer x-axis deviation determined in Figure 4. The time along the ordinate is shown in seconds and the deviation error along the ordinate is shown in nano-Tesla. Similarly to Figure 4, it can be seen that at approximately 5 seconds, the deviation error (residual measurement error) 502 was also reduced to a 2-sigma uncertainty level of around 25 nano-Tesla (504) using the extended Kalman filter method disclosed here.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 6 shows the approach time for different levels of bias correction accuracy using the extended Kalman filter method discussed here. For example, to obtain bias correction at a threshold value for a one-sigma bias uncertainty of 25 nanoTesla, the extended Kalman filter can be run for approximately 1.5 seconds. To obtain bias correction at a threshold value for a one-sigma bias uncertainty of 15 nanoTesla, the extended Kalman filter can be run for approximately 3.5 seconds. Limiting the bias correction to less than about 10 nanoTesla involves running the extended Kalman filter for approximately 7.5 seconds.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Correction of sensor error due to sensor deviations and magnetic interference<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Accelerometer error corrections<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> For a slowly rotating system, the Jacobian method can be used as shown in Equations (37)-(41). Using Equation (41) where H represents the gravitational acceleration variable:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (96)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The equation for the determinant can be differentiated by equation (38) to obtain:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (97)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (98)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The Jacobian can be defined as:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (99a)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (99b)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (99c)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> and<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (100)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The Jacobian is represented by a 3×3 Jacobian matrix, where j is the number of iterations, i is the number of data samples, A, ax, ay and az are the corrected acceleration components at iteration j for each data point i, and the relative load, ψi and bias, θi, are recalculated using the updated acceleration components at iteration j; where s is the updated acceleration, . and is the solution to the current bias vector.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Magnetometer error corrections<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> For a slowly rotating system, the Jacobian method can be used as shown in Equations (37)-(41). Using Equation (41) where H represents the magnetometry variable:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The Jacobian can be solved using the equation defined by Equation (40) to obtain<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (101a)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (101b)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (101c)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">where j is the number of iterations, i is the number of data samples, a(b) and b(b) are the numbered and labeled arc arguments in the equation for the azimuth shift and<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The Jacobian is represented by a 3×3 Jacobian matrix. The following temporary variables will simplify the Jacobian matrix for the magnetic field:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> And by substitution to Jacobian<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> where i is the number of data samples and j is the number of iterations. Consider the load equations that give the final solution to the Jacobian matrix.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> These equations produce an Nx3 or 3Nx1 Jacobian matrix depending on the implementation details.<h2 style=";text-align:left;direction:ltr"> There is a method for determining an error, which is discussed below. The magnetic field of the earth is obtained, and the magnetic field inclination of the earth at the test site is obtained. This can be done either by direct measurement or from a model such as the International Geophysical Reference Field model and the WGS - 84. The acceleration measurement is data selected to condition the acceleration measurement data of the previous generation. The magnetic measurement data is first selected to condition the magnetic measurement data. The navigation data is calculated using the data obtained. The method for calculating the navigation data will be described below. There is also an initial estimate of the navigation. The appropriate initial estimate can be a navigation parallel to the longitudinal axis of the instrument column. The initial estimate can be implemented by: Equation (102) Or Equation (103) For example. The remaining direction 𝜺 is calculated. Using the recurrence relation, a new model direction is obtained as shown in Equation (104). There is also a matrix intersection by any of several methods, for example, single - value decomposition, LU decomposition, Gaussian elimination, etc. Equation (104)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The model vector can then be updated via Equation (105).<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Equation (105) =I<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> where is an estimate of the initial solution. If the size of the update vector is larger than the convergence clearance, and the number of iterations is less than a pre-selected maximum value, a residual vector can be chosen and Equations (104) and (105) are repeated. When the calculated model vector, displacement azimuth, magnetic inclination, and magnetic field strength are satisfied, the magnetic field strength can be calculated.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The methods disclosed above are also discussed in relation to equations (104) to (105) for the two cases.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Case 1 processes the entire data and estimates the stationary component of the toolbar's magnetic field relative to the non-stationary tool. This method determines all or most of the toolbar's magnetization. In Case 1, the largest valid data range is selected and the entire selected interval is processed as a single data set. Case 1 uses only a single implementation of the basic algorithm.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Case 2 handles very short intervals, 1 < t << L, where L can be the number of data acquisition points over which the anomaly is observed, after correction for the static field component leads to a time- or space-dependent magnetic disturbance. The interval length is generally longer than a single data point and can be determined by a log analyst and / or interpreter.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Case 2 selects a processing interval, e.g., 0.1 to 1 foot or longer. Shorter intervals will involve higher resolution and higher noise. The interval will be processed according to basic methods; the steps are described relative to Equations (101)–(104), and the initial guess for the selected interval is the solution to the predetermined interval. Intervals can be processed by advancing to a completely new interval after convergence (or a non-convergent output), or a sliding solution can be developed where the current value is calculated by advancing along the data by one (or more) data points after each solution, producing a continuously variable output data set. By controlling the damping variable and the convergence clearance, the level of disturbance in the solution data set can be minimized (hopefully to acceptable levels). The noise level in the solution is determined in absolute terms by the noise sources in the sensor, related electronics, and processor. Analysis techniques such as extrapolation from the regression of the residual data set history will determine the time decay of the tool shaft magnetization. If the tool magnetization is to be restarted, each interval between restarts will need to be processed separately.<h2 style=";text-align:left;direction:ltr">At this point, the tool column magnetization can be removed. By extracting the constant and decayed elements of the tool column magnetization from the original measurements, only the ground and drill hole magnetic fields (and, of course, noise) remain. Extracting the rotating ground magnetic field from the corrected measured data produces specific magnetic declination data along the drill hole path. By performing the inverse rotation used to obtain the ground field in tool body coordinates, the magnetic field declination can be placed in the ground coordinate system northeast and down.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> If the deflection dataset has sufficient resolution and the deflection field is strong enough (how many in volcanic formations), then the pseudomagnetic record can be used with the dataset to determine the age of the formation.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 11 illustrates a method for extracting the effects of magnetic deflection on accelerometer measurements obtained at various depths in a borehole. The accelerometer measurements are illustrated in curve 1102. The accelerometer measurements are approximately 1005.34 mG, which differs from the standard value by 998.65 mG, as indicated by the dotted line 1106. Curve 1104 represents the accelerometer measurements corrected for instrument deflection using the magnetic deflection extraction method disclosed herein.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 12 shows several variables obtained using the deviation extraction method. Records 1202, 1208, and 1216 show magnetometer measurements. Record 1202 shows the (mx) measurements 1204 obtained at the x-oriented magnetometer, along with the corrected values ​​1206. Record 1208 shows the (my) measurements 1210 obtained at the y-oriented magnetometer, along with the corrected values ​​1212. Record 1214 shows the (mz) measurements 1216 obtained at the z-oriented magnetometer, along with the corrected values ​​1218. Record 1220 shows the measured gravitational field values ​​1222 and the corrected gravitational field values ​​1224. Record 1226 shows the measured total magnetic field values ​​1228 and the corrected total magnetic field values ​​1230. The corrections to transformation variables are also described in records 1232, 1234, and 1236.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In one embodiment, magnetometer and accelerometer measurements may be obtained during a data logging process or during a wireline separation process. A separation process may be provided for an angular rotation of the wireline tool. Thus, the magnetic deflection extraction method disclosed herein may be a post-processing method. Once the wireline is separated from the wellbore, the deflection of the error tool may be determined over all or substantially all of the data logging process. The overall data processing separator estimates the stationary component of the tool column's magnetic field, thereby determining most or all of the tool column's magnetization.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In other embodiments, the constant field component or instrument deflection may be applied over a shorter interval to determine time-dependent magnetic disturbances in the intervals.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Min-max skew correction tool<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The min-max method uses a method where the deflection of a magnetometer instrument is determined using sensor readings, i.e., magnetometers, such that the instrument is oriented along one direction, generally the topside direction, and the instrument is oriented along an opposite direction, generally counter-parallel to the topside direction. As the magnetometer rotates, the static Earth field measurements in that configuration are taken over a 360-degree angle. During rotation, the formation field measurement passes through a maximum and a minimum value, and at a position 90 degrees before and after these maximum and minimum values, the output is essentially zero. The difference between the absolute maximum and minimum values ​​can be attributed to the deflection error of the magnetometer. Thus, determining the difference between the maximum value obtained during one rotation of the drill pipe and the minimum value obtained during the same rotation of the drill pipe can result in twice the deflection error caused by the magnetometer.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">As the drill pipe column rotates, magnetometer measurements are acquired at a selected sampling frequency. The sampling frequency must be fast enough to ensure that the magnetometer peaks are captured at the maximum expected rotational speed. Generally, sampling speeds of 200 Hz and 1000 Hz are used for optimal dynamic drilling motion. Slower sampling rates can miss peak values ​​and lead to incorrect dynamic corrections. Each measurement is compared to a maximum current value and a minimum current value. If the measurement is greater than the maximum current value, the maximum current value is updated. Similarly, if the measurement is less than the minimum current value, the minimum current value is updated. Once the drill pipe column has undergone at least 360° of rotation, the difference between the minimum and maximum values ​​can be determined to represent the magnetometer's instrument deflection.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">During the measurement process, the drill string is subject to various drilling dynamics, including sticking and slipping, which prevent the smooth rotation of the drill string tool for a selected period of time and can contribute to the rotation of the drill string in the opposite direction.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In many respects, the min-max method applies to checking the quality of magnetometer measurements used to determine magnetometer drift correction. In one embodiment, the min-max method determines the column tooling, and thus the magnetometer, is rotated in a quadrant and records the number of quadrants during which the drill pipe column is rotated. Counting the quadrants provides a check to ensure that the magnetometer has rotated a full 360 degrees from a selected starting angle from which the measurements are calibrated. In one embodiment, the min-max method infers that measurements have been obtained for a full 360 degrees of rotation when six consecutive quadrants are recorded along any selected directional configuration (i.e., clockwise or counterclockwise). Because of the differences between the number of quadrants and the angle at which the magnetometer measurement is taken, counting five quadrants can guarantee that magnetometer measurements have been obtained over a full 360°. Counting six quadrants, therefore, guarantees that magnetometer measurements have been obtained over a full 360°.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The entry of a new quadrant can be identified by recording the signal measurements obtained from the magnetometer components oriented along the x- and y-axes of the measured magnetic field. As the tool rotates, the change in the signals is interpreted as a curve. A lower threshold value for magnetometer measurements can be set to detect a quadrant transition to exclude false starts due to measurement noise. Thus, a quadrant can be counted as the tool passes through the quadrant, obtaining measurements from the quadrant in excess of the threshold value. The min-max method restarts the quadrant count when the x- and y-magnetometer readings indicate that the drill pipe string has rotated backward into a previously counted quadrant.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 7 shows an exemplary measurement condition for calibrating magnetometer measurements using the min-max method. At time 'A', the direction of the drilling tool 710 is indicated by arrow 701. Four quadrants (NE quadrant 702, SE quadrant 704, SW quadrant 706, and NE quadrant 708) indicate the quadrants in which it rotates. At time 'B' (after time 'A'), the tool rotates through six quadrants in a clockwise direction. The order in which the tool passes through the quadrants is indicated by quadrant numbers 702, 704, 706, and 708. As shown, NE quadrant 702 is the first quadrant to be counted, plus the fifth quadrant to be counted. Also, quadrant 704 is the second and fourth quadrants to be counted. The measurement condition at time 'B' is derived once the sixth quadrant has been counted.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 8 illustrates an ideal measurement scenario that can be performed considering challenging downhole conditions and tool behavior. The measurement scenario starts at time 'C', where the drilling tool direction is generally facing the northwest quadrant 708 and proceeds through times 'D', 'E', 'F', 'G', and 'H'. From time 'C' to 'D', the tool rotates toward the northeast quadrant 702. However, the rotation of the drilling tool direction is insufficient for the min-max method to count the northeast quadrant 702. From time 'D' to time 'E', the tool rotates counterclockwise to counterclockwise. The tool passes through the northwest quadrant 708, and the northwest quadrant 708 is counted as '1'. As the tool rotates counterclockwise, quadrants 706, 704, and 702 are connected sequentially. Quadrant 708 is counted as the fifth quadrant. At time 'E', the drilling tool direction rotates away to count the southwest quadrant 706 as the sixth quadrant. Also at time 'E', once the instrument is reversed to rotate clockwise, the min-max method begins counting quarters. From time 'E' to 'F', the northwest quarter 508 is counted as '1' and the northeast quarter 502 is counted as '2'.<h2 style=";text-align:left;direction:ltr">From time 'F' to time 'G', the drilling tool direction continues to rotate to complete six consecutive quarters in a counterclockwise direction.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In many models, there is a time limit for obtaining a count of six consecutive quarters. Therefore, if six quarters are counted within the required time, an error message may be sent to the operator and / or the max-min calibration method may be restarted. This prevents the system from applying deviation corrections that may be incorrectly determined.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Once six quadrants have been successfully counted, ensuring that the measurements obtained are consistent with a full drill pipe rotation, the obtained maximum and minimum values ​​are checked. For additional quality control, the maximum-minimum difference is compared to a threshold value to ensure that the actual rotation has occurred, not just noise. The threshold value is set to a predetermined value above the noise level and represents the maximum-minimum difference that should be observed on the X- and Y-type magnetometers at a lower bound for a true reference position. An ideal reference position, for example, would be a rotation with a directional instrument aligned at least one degree away from the Earth's magnetic vector. The minimum maximum values ​​can be used to determine the magnetometer instrument's deflection, which can be used to correct magnetometer measurements.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Thus, in one aspect, the present disclosure provides a method for correcting measurements obtained by a down-hole tool for residual measurement errors, the method comprising: placing the tool having at least two directional field sensors in a drill hole, wherein the at least two directional sensors are substantially perpendicular to each other and to the longitudinal axis of the down-hole tool; obtaining measurements from the at least two directional sensors while rotating the tool at least 360 degrees about the longitudinal axis of the tool; determining the residual measurement errors of the obtained measurements; selecting a quality level for the specified residual measurement errors; and applying the specified residual measurement errors to the obtained measurements when the specified residual measurement errors are consistent with the selected quality level. In one embodiment, the residual measurement errors may be determined using an extended Kalman filter. The extended Kalman filter may determine the residual measurement error between an actual down-hole magnetic field value and the obtained measurements.<h2 style=";text-align:left;direction:ltr">Residual measurement errors using the extended Kalman filter method without knowledge of the total downhole magnetic field. In other embodiments, measurement errors may be determined by determining a maximum and a minimum for a set of magnetometer measurements obtained while at least two of the directional sensors rotated through at least 360 degrees about the longitudinal axis. At least six quadrants in a specified direction of rotation were successfully counted through at least 360 degrees. In other embodiments, the residual measurement error may be determined by: obtaining magnetometer and accelerometer measurements at the instrument; determining transformation variables using the magnetometer and accelerometer measurements; converting standard values ​​of at least one of the Earth's magnetic field and Earth's gravitational field into the instrument's reference frame using the specified transformation variables; and determining the residual measurement error from the difference between the magnetometer and accelerometer measurements and the converted standard values ​​of the Earth's magnetic field and Earth's gravitational field.<h2 style=";text-align:left;direction:ltr">Modified values ​​of the transformation variables may be used to convert standard values ​​of at least one of the Earth's magnetic field and Earth's gravitational field into an instrument reference frame to replicate the instrument's deflection determination. In one embodiment, magnetometer and accelerometer measurements may be obtained at the instrument during separation.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In another aspect, the present disclosure provides a wellbore drilling system, the system comprising: a downhole tool movable on a drill pipe column; a magnetometer disposed on the downhole tool, the magnetometer comprising at least two magnetometer component sensors substantially perpendicular to each other and to a longitudinal axis of the drill pipe column; and a processor configured to: obtain measurements from at least two directional sensors while the tool is rotated at least 360 degrees about the longitudinal axis of the tool; determine residual measurement errors for the obtained measurements; select a quality level for the specified residual measurement errors; and apply the specified residual measurement errors to the obtained measurements when the specified residual measurement errors are consistent with the selected quality level. In one embodiment, the processor may include determining the residual measurement errors using an extended Kalman filter. Using the extended Kalman filter, the processor may determine a residual measurement error between an actual value of the downhole magnetic field and the obtained measurements.<h2 style=";text-align:left;direction:ltr">The processor may determine residual measurement errors without obtaining knowledge of the total downhole magnetic field. In other embodiments, the processor may determine measurement errors by specifying a maximum and minimum for a set of magnetometer measurements obtained while the at least two directional sensors rotate through at least 360 degrees about a longitudinal axis. The processor may count the tool rotation through at least six quadrants in a selected direction to determine a rotation through at least 360 degrees. In other embodiments, the processor may determine residual measurement errors by performing the steps of: obtaining magnetometer and accelerometer measurements at the tool; specifying transformation variables using the magnetometer and accelerometer measurements; converting standard values ​​of at least one of the Earth's magnetic field and Earth's gravity field into the tool's reference frame using the specified transformation variables; and determining the residual measurement error from the difference between the magnetometer and accelerometer measurements and the converted standard values ​​of the Earth's magnetic field and Earth's gravity field.<h2 style=";text-align:left;direction:ltr">The processor may specify modified values ​​for the transformation variables and convert standard values ​​for at least one of the Earth's magnetic field and the Earth's gravitational field into the tool's reference frame using the modified values ​​for the transformation variables. The processor may also obtain magnetometer and accelerometer measurements at the tool while the tool is disengaging from a drill hole.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In another aspect, the present disclosure provides a computer-readable medium having a set of instructions stored thereon that can be accessed by a processor to enable the processor to execute a method, the method comprising: receiving measurements from at least two directional field sensors in a drill hole, wherein the at least two directional sensors are substantially perpendicular to each other and to the longitudinal axis of the downhole tool while the tool is rotated at least 360 degrees about the longitudinal axis of the tool; determining residual measurement errors for the obtained measurements; selecting a quality level of the determined residual measurement errors; and applying the determined residual measurement errors to the obtained measurements when the determined residual measurement errors are consistent with the selected quality level. In one embodiment, the method further comprises determining the residual measurement errors using an extended Kalman filter applied between an actual value of the downhole magnetic field and the obtained measurements.<h2 style=";text-align:left;direction:ltr">In other embodiments, the method further comprises determining measurement errors by determining a maximum and a minimum for a set of magnetometer measurements obtained while the at least two of the directional sensors are rotating through at least 360 degrees about a longitudinal axis, wherein determining at least 360 degrees also comprises obtaining a number of six-quarters while the sensors are rotating. In still other embodiments, the method may further comprise: obtaining magnetometer and accelerometer measurements at the instrument; determining transformation variables using the magnetometer and accelerometer measurements; converting standard values ​​of at least one of the Earth's magnetic field and the Earth's gravitational field into an instrument reference frame using the determined transformation variables; and determining the residual measurement error from the difference between the magnetometer and accelerometer measurements and the converted standard values ​​of the Earth's magnetic field and the Earth's gravitational field.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> While the disclosure relates to ideal disclosure models, there are many modifications that will become apparent to an expert in the field. It is intended that there will be differences in the scope and spirit of the safeguards attached by the previous disclosure.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Sequence list:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> "A" to the levers<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> b) X-axis deviation error and 2-σ sigma uncertainty versus time<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> "C" Miscalculation<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> "d" uncertainty -2-σ<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> "e" deviation error (nT)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> "and" time (in seconds)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> "z" time to converge to a specified level of accuracy<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> "H" Time to convergence (convergence cases)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 1- Initial uncertainty of deviation (nT)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> "Y" time "A"<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> "K" time "B"<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> "l" time "d"<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> "M" time "C"<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> "n" time "w"<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> "S" time "H"<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> "A" time "Z"<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 130 to the cranes<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 301 Starting values ​​set k=1, xk=x0 , pk=p0<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 303 Rk, and Btfm (tk) Obtain the following measurement<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 305 Get Cxy, Cz, bx, by, S, Ox, Oy, BTFcorr, from a state vector to calculate BTFCorr<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 307 Determine the Remainders and Partial Derivative Matrices<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 309 Specify Kalman gain<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 311 Update status and contrast estimate<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">313 Determine if convergence has been achieved.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 1002 Obtain a standard value for the Earth's magnetic field and / or gravitational field.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 1004 Obtain magnetometer measurements of the Earth's magnetic field at a specified borehole depth and accelerometer measurements of the Earth's gravitational field at a specified borehole depth.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 1006 Determine the conversion variables between a geocentric and instrument-centric reference frame using measurements from a magnetometer and accelerometer.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 1008 Convert standard values ​​from a ground-based reference frame to a tool-based reference frame.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 1010 Compare the converted values ​​to the magnetometer and wheel gauge measurements to determine the instrument deflection correction.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 1012 Correct the magnetometer and wheel gauge measurements to determine the instrument deflection.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 1014 Tool drift correction converged<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 1016 Specify the conversion variables adjusted from the corrected magnetometer and wheel gauge measurements.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 1018 End

Claims

<h2 style=";text-align:left;direction:ltr">Protection elements<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 1. A limited self-calibration method obtained by a down hole tool to correct sensor measurement errors, including:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Placing a down-hole tool having at least two sets of directional field sensors into a borehole, wherein at least one of the sets of directional sensors measures the magnetic field and at least one of the sets measures the gravity field, wherein the directional sensors are perpendicular to each other, and one sensor in each set is oriented parallel to the longitudinal axis of the down-hole tool;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Obtain measurements from at least two sets of field sensors;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Determine calibration corrections for the measurements obtained;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Select the quality level of calibration corrections; and<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Apply the specified calibration corrections to measurements obtained when the specified calibration correction errors are consistent with the chosen quality level.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 2. The method according to claim 1, the method of correcting measurements obtained by a down hole tool to correct sensor measurement calibration errors, comprising:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> placing a down hole tool having at least two directional field sensors into a borehole, wherein the at least two directional sensors are essentially perpendicular to each other and to a longitudinal axis of the down hole tool;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Obtain measurements from at least two directional sensors while the tool is rotating at least 360 degrees about the longitudinal axis of the tool;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Determine calibration corrections for the measurements obtained;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Select the quality level of calibration error correction; and<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Apply the specified calibration corrections to measurements obtained when the specified calibration correction errors are consistent with the chosen quality level.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 3. The method according to claim 2, wherein the calibration corrections are determined using an Extended Kalman Filter (EKF).<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 4. The method according to claim 3, wherein an Extended Kalman Filter determines the calibration corrections between an actual value of the down hole magnetic field and the measurements obtained.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 5. The method according to claim 4, further comprising determining calibration corrections without obtaining knowledge of the total down hole magnetic field.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">6. The method according to claim 1, wherein the process of determining the calibration corrections further includes determining a maximum and a minimum for a set of measurements obtained during rotation of at least two of the direction sensors through at least 360 degrees about the longitudinal axis, wherein the measurements include at least one of the magnetometer measurements and the accelerometer measurements.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 7. The method according to claim 5, further comprising rotating the tool through at least six quarters in a chosen direction to determine a rotation through at least 360 degrees.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 8. The method according to claim 1, wherein the process of determining calibration corrections also includes:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Obtain magnetometer and accelerometer measurements at the tool during tool rotation by at least 90 degrees about the longitudinal axis of the tool or changes in the tilt of the tool by at least the smallest measuring angle, namely 30 degrees;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Determine transformation variables using magnetometer and accelerometer measurements;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Converting standard values ​​of at least one of the Earth's magnetic field and the Earth's gravitational field into an instrument reference frame using the specified transformation variables; and<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Determine calibration corrections from the difference between magnetometer and accelerometer measurements and converted standard values ​​of the earth's magnetic field and earth's gravitational field.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 9. The method according to claim 8, further comprising determining modified values ​​of the transformation variables and transforming the standard values ​​of at least one of the earth's magnetic field and the earth's gravitational field in an instrument reference frame using the modified values ​​of the transformation variables.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 10. The method according to claim 8, further comprising obtaining magnetometer and accelerometer measurements at the instrument while recording the data.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">11. A system for obtaining magnetometer and / or accelerometer data, comprising:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> A down hole tool carried on a drill string, drill pipe, tubing, or wireline;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> At least two vertical triaxial sets of magnetometers and magnetometers placed on a down hole tool<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Positioned so that each sensor in a triaxial assembly is tilted from the tool's rotational axis such that the orientation of each sensor satisfies the x, y, and z direction cosine angles of its corresponding axes to the tool's rotational axis, i.e., x is the angle from the x-axis to the rotational axis.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> A device where sensors rotate rapidly either due to a drill string, pipes, drill pipe, or a rotational drive system, e.g., a motor.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Processor optimized for:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Obtain measurements from at least two directional sensors while the tool is rotating at least 360 degrees about the longitudinal axis of the tool;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Determine calibration corrections for the measurements obtained;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Select the quality level of the specified residual measurement errors; and<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Apply calibration corrections to measurements obtained when the calibration correction errors are consistent with the selected quality level.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 12. The system according to claim 11, wherein the processor is configured to determine calibration corrections on all three axes for each triaxial assembly using an Extended Kalman Filter.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 13. The system according to claim 12, wherein calibration corrections are made between an actual value of the down hole Earth's field and the measurements obtained.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 14. A system for obtaining magnetometer and / or accelerometer data, comprising:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Down hole tool is a tool that is moved on a rotating drill string, drill pipe or pipes:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> A magnetometer mounted on a down hole tool, the magnetometer comprising at least sensors of the magnetometer component substantially perpendicular to each other and to a longitudinal axis of the drill string; and<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Processor configured for:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Obtain measurements from at least two directional sensors while the tool is rotating at least 360 degrees about the longitudinal axis of the tool;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Determine the residual measurement errors of the obtained measurements;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Select the quality level of the specified residual measurement errors; and<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Apply the specified residual measurement errors to measurements obtained when the specified residual measurement errors are consistent with the chosen quality level.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">15. The system according to claim 14, wherein the processor is configured to determine residual measurement errors using an Extended Kalman Filter.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 16. The system according to protection element 15, where the residual measurement error is between the actual value of the down hole magnetic field and the measurements obtained.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 17. The system according to protection element 16, wherein the processor is configured to determine the residual measurement errors without obtaining knowledge of the total down hole magnetic field.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 18. The system according to claim 17, wherein the processor is configured to determine measurement errors by setting a maximum and a minimum for a set of measurements obtained during rotation of at least two of the direction sensors through at least 360 degrees about the longitudinal axis, wherein the measurements include at least one of a magnetometer and an accelerometer.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">19. The system according to claim 14, wherein the processor is configured to count the rotation of the tool through at least six quarters in a direction selected to determine rotation through at least 360 degrees.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 20. The system according to protection element 11, wherein the processor is configured to determine residual measurement errors by executing:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Obtain magnetometer and accelerometer measurements at the instrument;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Determine transformation variables using magnetometer and accelerometer measurements;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Transforming standard values ​​of at least one of the Earth's magnetic field and the Earth's gravitational field into an instrument reference frame using the specified transformation variables; and<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Determine the residual measurement error from the difference between magnetometer and accelerometer measurements and the converted standard values ​​of the earth's magnetic field and the earth's gravitational field.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">21. The system according to claim 20, wherein the processor is configured to determine modified values ​​of the transformation variables, and to transform the standard values ​​of at least one of the Earth's magnetic field and the Earth's gravitational field into an instrument reference frame using the modified values ​​of the transformation variables.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 22. The system according to claim 21, wherein the processor is configured to obtain magnetometer and accelerometer measurements at the device during disconnection.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 23. A computer-readable medium that has a set of instructions stored in it that can access a processor capable of enabling the processor to complete a method. The method includes:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Receiving measurements from at least two directional field sensors in a borehole, wherein the at least two directional sensors are essentially perpendicular to each other and to the longitudinal axis of the down hole tool while the tool is rotated at least 360 degrees about the longitudinal axis of the tool;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Determine the residual measurement errors of the obtained measurements;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Select the quality level of the specified residual measurement errors; and<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Apply the specified residual measurement errors to measurements obtained when the specified residual measurement errors are consistent with the chosen quality level.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 24. The computer-readable medium of claim 19, wherein the method further comprises determining the residual measurement errors using an Extended Kalman Filter applied between an actual value of the down hole magnetic field and the measurements obtained.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">25. The computer-readable medium according to claim 19, wherein the method further comprises determining the measurement errors by determining a maximum and a minimum for a set of measurements obtained during rotation of the at least two of the direction sensors through at least 360 degrees about the longitudinal axis, wherein determining at least 360 degrees also comprises obtaining a number of six quarters during rotation of the sensors, wherein the measurements include at least one of a magnetometer and an accelerometer measurement.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> 26. The computer-readable medium according to claim 19, wherein the method further includes<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Obtain magnetometer and accelerometer measurements at the instrument;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Determine transformation variables using magnetometer and accelerometer measurements;<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Transforming standard values ​​of at least one of the Earth's magnetic field and the Earth's gravitational field into an instrument reference frame using the specified transformation variables; and<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Determine the residual measurement error from the difference between magnetometer and accelerometer measurements and the converted standard values ​​of the earth's magnetic field and the earth's gravitational field.