A Measuring System for Well Logging Attitude and a Method of Sensor Calibration

This paper proposes an approach for measuring the azimuth angle and tilt angle of underground drilling tools with a MEMS three-axis accelerometer and a three-axis fluxgate sensor. A mathematical model of well logging attitude angle is deduced based on combining space coordinate transformations and algebraic equations. In addition, a system implementation plan of the inclinometer is given in this paper, which features low cost, small volume and integration. Aiming at the sensor and assembly errors, this paper analyses the sources of errors, and establishes two mathematical models of errors and calculates related parameters to achieve sensor calibration. The results show that this scheme can obtain a stable and high precision azimuth angle and tilt angle of drilling tools, with the deviation of the former less than ±1.4° and the deviation of the latter less than ±0.1°.


Introduction
In oil, gas or geological exploration well logging work, acquiring the posture and orientation of the drilling tool in real-time [1,2], and transmitting the related information to the decision-making control side to adjust the action of drill accurately, will efficiently improve the quality of drilling engineering.

OPEN ACCESS
Inertial navigation has an explicit definition of the space attitude information which will be reflected by the tilt angle, the azimuth angle and the tool face angle specifically [3]. Since the 1970s, inertial technology has developed rapidly and the corresponding tools, like dynamic debugging gyro inclinometers, optical fiber gyro inclinometers and so on have been implemented, but all these instruments have the shortcomings of high cost, large size and poor vibration resistance [4]. At present, the commonly used logging inclinometers include inclinometers based on fiber optic gyro or magnetic sensors. The former, free from any external magnetic disturbance, is of large volume, and high cost with accumulative errors existing in the measurement while drilling; the latter, with small volume and low cost, acts instantly when measuring and has no accumulated error [5,6].However, the existing logging inclinometers based on magnetic sensor systems still have some disadvantages such as low systematic digitalization, low precision of the attitude results and incomprehensive error calibration or complex calibration methods. In the existing products used in the oil drilling industry, the general azimuth measuring accuracy is ±3° and the tilt angle one is ±0.3°.
Consequently this paper proposes a scheme to develop a measuring system for well logging attitude by using a MEMS three-axis accelerometer and a three-axis fluxgate sensor which has small size [7], light weight, low power consumption and no gyroscope. As there are various sensor errors which affect the accuracy of the calculated angle [8][9][10][11], it is particularly important to find a way to effectively reduce these errors. Traditionally, the inertial navigation sensor calibration algorithms described in many literatures includes the commonly used ferromagnetic effect calibration method as well as genetic algorithm and BP neural network methods and the least square method. The ferromagnetic effect algorithm is used to obtain the maximum and minimum output by rotating the magnetic sensor and thereby acquire the offset and scale factor of the magnetic sensor. This method with its simple principle is easy to operate and implement, but on the other hand, it only completes the calibrations of the hard iron interference errors and tri-axial sensitiveness errors and fails to realize the calibration of alignment errors which is an indispensible process to achieve the accord between two sensor axes and equipment axes. To obtain calibration parameters with a genetic algorithm or BP neural network in practice, which is theoretically feasible, involves a large amount of programming with computational complexity, so it is generally not used. In addition, many of the traditional navigation algorithms are not entirely suitable for well logging. On the basis of the traditional calibration method [12][13][14][15], a newly proposed calibration method can improve the accuracy.

Systematic Design
For directional well logging attitude measurement, the guiding parts mainly include a sensor module, signal acquisition module, microcontroller module and communication interface (SPI, SCI). All these component are assembled in a probe casing with small size and diameter (φ35 mm × 260 mm), and a PC works as the remote control and display device. The mechanical configuration of a logging tool can be expressed as shown in Figure 1. It includes a variety of mechanical fittings and a guiding probe which is the core measurement device. A picture of the designed measuring probe is shown in Figure 2. The measuring probe is used to measure and respond in real time to the posture information of the drilling tool, and it is also designed as an aluminum cylinder structure, so that the device is compact, nonmagnetic and especially convenient for other mechanical adaptations and subsequent turntable experiments. The main function of the measuring probe based on accelerometers and fluxgate sensors designed in this paper is to measure the azimuth angle and tilt angle of the well logging tool. The system principle block diagram of the hardware for the measuring device is shown in Figure 3. The accelerometer uses an ADIS16210 which combines a high accuracy MEMS tri-axial acceleration sensor with ±1.7 g measurement range and ±0.061 mg sensitivity. The selected tri-axial fluxgate sensor measurement range is 0~±100,000 nT and the resolution can reach 1 nT. The main microcontroller uses a MC9S12XEP100 Freescale MCU.

Mathematical Calculating of Attitude Angle
The equipment used for measuring the attitude of a directional well logging tool is usually called a well logging inclinometer. Acquiring the posture and orientation uses the gravity field and magnetic field which have relative stability characteristics. Under different orientations, the fluxgate sensor and acceleration sensor data output will have different values. By 3D coordinate rotation and transformation, the current attitude angle and azimuth angle of the equipment can be uniquely determined.
As shown in Figure 4, the navigation coordinates E/N/U are defined as east/north/up based on the right-hand rule, and the device body coordinates X b /Y b /Z b are defined as forward/right/down based on the right-hand rule. H represents the horizontal plane; V the borehole bending plane; and P the drill cross section. The tilt angle (θ) is an angle between Z b axis and the vertical direction, and the azimuth angle (Ψ) is an angle between the horizontal projection of Z b axis and north. A device can always transform a fixed location to the current location through a rotation matrix. As shown in Figure 5, the navigation coordinates ox 0 y 0 z 0 (oENU) are used as a reference frame and clockwise rotation is positive. Firstly rotate an angle of ψ around oz 0 to the coordinates ox 1 y 1 z 1 , then an angle of θ around oy 1 to the coordinates ox 2 y 2 z 2 , finally an angle of T around oz 2 to the coordinates oX ' b Y ' b Z ' b which are the device body coordinates.
Therefore the rotation matrix can be expressed as Equation (1) in which ψ is the azimuth angle, θ is the tilt angle, and T is the tool face angle. The relationship between X ' b Y ' b Z ' b and x 0 y 0 z 0 is expressed by Equation (2): cos  sin  sin  sin  cos   T  sin  sin  T  cos  cos  T  sin  cos  sin  T  cos  sin  T  sin  cos  cos   T  cos  sin  T  sin  cos  T  cos  cos  sin  T  sin  sin  T  cos cos cos  T  sin  sin  T  cos  cos  T  sin  cos  sin  T  cos  sin  T  sin  cos  cos   T  cos  sin  T  sin  cos  T  cos  cos  sin  T  sin  sin  T  cos  cos Let A x , A y and A z be the normalized accelerometer output values after filtering and M x , M y and M z the normalized fluxgate sensor output values after filtering. In the local horizontal plane, A x0 = A y0 = 0, A z0 = +1 g, then Equation (2) becomes: Therefore, θ and T can be calculated as follows: In the local horizontal plane, the values of the fluxgate sensor in the E/N/U direction can be calculated as M x0 = 0, M y0 = Mcosφ, M z0 = Msinφ. Here M is the magnetic value of the local geomagnetic field and φ is the local latitude, so Equation (2) becomes: And ψ can be calculated as follows: Here (7) shows that the value of daz is not related to φ or M.

The Proposed Calibration Method
The acceleration sensors and fluxgate sensors used in this paper have been strictly calibrated before they leave the factory, and their accuracy has a certain guarantee. However, in considering the overall measurement equipment, after the device is assembled in the mechanical aspects, this will cause new errors due to the inevitable mechanical installation axial misalignment, circuit effects, hard-iron interference, etc.
The actual device axis (Z-axis) is defined as the reference axis for calibration. Taking the errors of the sensors and the types of errors after completion of the sensors assembly into unified consideration and fusion processing, the errors of the system after assembly are mainly the result of four aspects: (1) Misalignment error is defined as the angles between the sensor sensing axes and the device body axes, caused by manufacturing and installation; (2) Hard-iron interference magnetic field is normally generated by ferromagnetic materials with permanent magnetic fields that are part of the device structure. These materials could be permanent magnets, magnetized iron or steel; (3) A soft-iron interference magnetic field is generated by the uncertain magnetically soft materials surrounding the device or the items inside current carrying traces on the PCB. For some platforms, hard-iron interference is the primary source of error and soft-iron distortion is minimal or non-existent; (4) The scale factor error is defined as the mismatch of the sensitivity of the sensor sensing axes. Ideally, the three-axis sensors that make up the triad are identical. In reality, however, this may not be the case. Each sensor channel may have different sensitivities. Calibration is designed to reduce these errors.
To calibrate these errors, the existing least square method is, through the establishment of multi-parameter equation, used to collect multiple samples to calculate the calibration parameters. However, they have the following shortcomings. First, some perform the error correction incompletely. For example, it only corrects two or three of the four errors. Second, the number of samples limits the accuracy of the parameters. Third, a variety of established equations are not simple and clear with complicated solving processes for the parameter equations. Additionally, the ellipsoidal model is also established in some papers to achieve the magnetic calibration, but it involves a complex parameter solving process and adopts a simplified approximation to replace the parameter values, which cannot fully represent the types of errors. This paper establishes a comprehensive error model based on the above four errors, and uses the least square method to calculate a calibration matrix. A simple and practical calibration process is thus designed.

Accelerometer Calibration Model
The error model of the accelerometer can be expressed as follows [16,17]: Here [A m ] 3×3 is a 3 × 3 misalignment matrix between the accelerometer sensing axes and the device body axes; k i (i = x,y,z) is the scale factor and e i (i = x,y,z) is the offset, a 10~a33 are the calibration parameters, A x0 , A y0 , A z0 are raw measurements and A x , A y , A z are normalized values. Equation (8) (9) or N = A·a where, Matrix a is composed of 12 calibration parameters that need to be determined. Matrix A is composed of sensor raw data collected at several stationary positions. Matrix N is the known normalized Earth gravity vector. The goal of the accelerometer calibration is to determine 12 parameters from a 10 to a 33 , and with any given normalized values in a position, the raw measurements can be obtained. For example, at Z b down position where the tilt angle scale indicating on the standard turntable is zero, [A x A y A z ] = [0 0 1] and a set of accelerometer raw data A x0 , A y0 and A z0 can be collected. According to the standard turntable, we choose 10 positions with X b down and up, Y b down and up Z b down and up, A x = 0, A y = ±0.707 g, A z = −0.707 g and A x = ±0.707 g, A y = 0, A z = −0.707 g and collect several a second set of accelerometer raw data at each position with known A x0 , A y0 and A z0 . The calibration parameter matrix a can be determined by the least square method as: If the raw data of accelerometer is [A x1 A y1 A z1 ], the calibrated data which be used to calculate the attitude angle can be expressed as The calculation process of the accelerometer calibration parameters is shown in Figure 6. The corresponding data A x0 A y0 A z0 (matrix A)

Equation (9)
Vetor a Parameters a 10 -a 33 Equation (8) The known normalized data A x A y A z in different directions(matrix N)

Fluxgate Sensor Calibration Model
The relationship between the normalized data M x , M y , M z and the magnetic sensor raw measurements M x0 , M y0 , M z0 can be expressed as Equation (11) Here [M m ] is a 3 × 3 misalignment matrix between the magnetic sensor sensing axes and the device body axes; k mi (i = x,y,z) is the scale factor and e mi (i = x,y,z) is the offset caused by hard-iron distortion; [M s ] is a 3 × 3 matrix caused by soft-iron distortion. The goal of the magnetic sensor calibration is to determine the parameters from m 10 to m 33 , and with any given raw measurements at arbitrary positions, the normalized values can be obtained. It is always good to know if the device has the above interference before choosing which model to use for the identification of the calibration parameters, tilted ellipsoid, or non-tilted ellipsoid. This can be done by performing 3D rotations in a clean environmental area. Then we plot the collected magnetic sensor raw data with MATLAB to check if there is any interference field inside the device. This set of data is not used for the subsequent magnetic sensor calibration. However in practical situations, three 2D full round rotations may not be easy to perform. Then an amount of 3D rotation data can be used for rough field calibration. If there is soft-iron distortion, the 3D rotations show a tilt ellipsoid which can be described by the following equation: Here x 0 , y 0 , z 0 are the offsets e mi (i = x, y, z), x, y, z are magnetic sensor raw data, a, b, c, are the semi-axes lengths, d, e, f, are cross axis effect to make the ellipsoid tilted, R is a constant of the Earth's magnetic field strength. Actually, the designed device doesn't utilize any magnetically soft materials in the hardware design and mechanical assembles, and there are no soft materials in the application environment. The calibration parameters are acquired in the open field which has no magnetically soft materials. Additionally, the soft-iron interference magnetic field from the current on PCB is weak and fixed and it is calibrated together with the hard-iron interference. It is discovered that the model is a normal ellipsoidal without tilt described in Figure 9a when MATLAB is used to simulate and test the magnetic data of instruments, so the soft-iron interference is negligible and can be ignored. The ellipsoid can be simplified as the following equation: Then Equation (13) becomes: So the parameters from m 10 to m 33 can be calculated by Equation (11). The calculation process of fluxgate sensor calibration parameter is shown in Figure 7.

Experiments and Analysis
For attitude measurement of exploring casinga in production and practice, a non-magnetic and omnibearing standard turntable, which can display and inspect the tilt angle (ranging 0 to ±90°) and the azimuth (ranging 0 to 360°), is often used as the test platform. Moreover the standard turntable is strictly adjusted by precise third party calibration instruments before the experiment, and then we can examine the resulting precision of the angle measurement based on the turntable. The adjusted turntable can guarantee the tilt angle is 0° and the azimuth is 0° when it is at the zero position, and the reading error of the turntable calibration is within ±0.1°; That is, the experimental turntable guarantees the tile angle scale indicates 0° with the exploring casing is vertically direct to the ground, and it also guarantees the azimuth scale indicates 0° with the exploring casing is directed to the magnetic north.
The system adopts the output value of the final calculated measurement result by comparing the current value of the turntable calibration as the relative error for measurements, which is a conventional method for cylindrical, probe tubular underground inclinometer devices, this method is simple, easily used, and also able to test the measurement precision.
The test calibration and experiment platform is shown in Figure 8. The 3D movable platform is used to collect multiple sets of data by soft filtering. The more data are collected, the more accurate the calibration parameters that will be adopted in the least square method to calculate the 12 calibration parameters of the accelerometer and the fluxgate sensor separately. In the experiment, the calibration parameters of the fluxgate sensor are calculated by reading 360 datum of the fluxgate sensor under different spatial orientations. There is a standard method to show the fluxgate calibration results. As shown in Figure 9, Figure 9a is an ellipsoid before fluxgate calibration and Figure 9b is a normal sphere, which proves that the fluxgate errors of the scale factor and center offset have been calibrated. The turntable is use to test the designed inclinometer. The inclinometer needs keep the same center with the turntable. Taking eight tilt angles (3°, 15°, 30°, 60°, −3°, −15°, −30°, −60°), and rotating eight  azimuth angles, respectively (0°, 45°, 90°, 135°, 180°, 225°, 270°, 315°) at each tilt angle, we then record and save the current measurement result values. Comparing these values with the standard tilt angle and azimuth angle, Table 1 shows that dev is the tilt angle calculated by this scheme, dev 0 is the tilt angle calculated with no accelerometer calibration, v_err 0 is the deviation between dev 0 and the stander value of tilt and v_err is the deviation between dev and the standard tilt value.  Table 2 shows that daz is the azimuth angle calculated by this scheme, daz 0 is the azimuth angle calculated after fluxgate sensor calibration using the traditional ellipse matching error compensation algorithm [12,13], z_err0 is the deviation between daz 0 and the stander values of azimuth and z_err is the deviation between daz and the standard value of azimuth. dev 0 , dev, daz 0 and daz are angles which have the biggest deviation compared with the standard values when recorded. The two forms of data above show that the azimuth angle error with traditional compensation will reach ±4° and the tilt angle error with no calibration will reach ±0.4°. As for the errors of the accelerometer (scale factor error, misalignment error, external disturbance) and fluxgate sensor (hard-iron interference, soft-iron interference, scale factor error, misalignment error), the azimuth error is less than ±1.4° and tilt angle error is less than ±0.1° after calibration by the proposed method, so we can state that the calibration method improves the accuracy of the attitude angle and is proved to be effective, so it can be applied to actual well logging work.

Conclusions
Based on the design of a measuring system for well logging attitude, this paper proposes a concise formula for attitude angle calculation, and establishes mathematical models to calibrate errors. Taking the error of the sensor itself and the four main types of errors after completion of the sensor assembly into unified consideration and fusion processing, a comprehensive error model has been established. Based on this model, a simple and practical calibration process is designed, which can be completed using a standard test turntable. Furthermore, it can complete the calibration of equipment errors, including installation errors and sensor errors, so the measurement accuracy can then be improved. The test results show that these schemes are effective and highly precise. The designed measuring equipment has utility in engineering applications and has the characteristics of small size, high integration, low-cost and easy adaptation to other devices. The measuring deviation of azimuth angle and tilt angle of drilling tools are thus greatly reduced. The calibration parameters can be calculated in advance and be used in the soft system to acquire the attitude angle of directional well logging.