A Near-Vertical Well Attitude Measurement Method with Redundant Accelerometers and MEMS IMU/Magnetometers

: Vertical drilling is the first stage of petroleum exploitation and directional well technology. The near-vertical attitude at each survey station directly determines the whole direction accuracy of the borehole trajectory. However, the attitude measurement for near-vertical wells has poor azimuth accuracy because the poor signal-to-noise ratio of radial accelerometers hardly obtains the correct horizontal attitude, especially the roll angle. In this paper, a novel near-vertical attitude measurement method was proposed to address this issue. The redundant micro-electromechanical system (MEMS) accelerometers were employed to replace the original accelerometers from MEMS inertial measurement unit (IMU)/magnetometers for calculating horizontal attitude under near-vertical conditions. In addition, a simplified four-position calibration method for the redundant accelerometers was proposed to compensate for the installation and non-orthogonal error. We found that the redundant accelerometers enhanced the signal-to-noise ratio to upgrade the azimuth accuracy at the near-vertical well section. Compared with the traditional method, the experiment results show that the average azimuth errors and roll errors are reduced from 34.45 ◦ and 27.09 ◦ to 5.7 ◦ and 0.61 ◦ , respectively. The designed configuration scheme is conducive to the miniaturized design and low-cost requirements of wellbore measuring tools. The proposed attitude measurement method can effectively improve the attitude accuracy of near-vertical wells.


Introduction
Attitude measurement is the foundation for controlling carrier motion to a specified coordinate point, which occupies an essential position in various fields, such as aircraft, land carriers, ships and underground energy extraction [1,2].The attitude measurement of the wellbore is crucial for locating the reservoir position.A highly accurate wellbore attitude can improve oil and gas recovery and reduce operating costs in an internationally tight energy inventory situation [3].
Generally, after completing the drilling operation, the driller drops the attitude measurement instrument at the specified survey site to obtain 3D attitude information from static sensor data.Then, the communication system is employed for data transmission to the drilling platform.Such a single-point measurement mode is widely applied to vertical drilling or sidetracking wells.Wellbore attitude measurement technology has been developed for decades.In the 1970s, patents reported electronic devices consisting of three-axis magnetometers and three-axis accelerometers to measure well inclination and azimuth angles [4,5].With the development of technology and the iteration of research findings, the current measuring instruments have been diversified to include gyroscopes, accelerometers, magnetometers and combinations between sensors [6].
To enhance borehole planning and reservoir positioning, numerous researchers have concentrated on improving wellbore attitude accuracy through optimal algorithms and system construction.J. Yang et al. proposed a robust Mag/INS-based orientation estimation algorithm that utilizes the failure detection and integration techniques to establish a federal Kalman filter framework fusing gravity and the magnetic field [7].The robust combined algorithm effectively eliminates the anomalous magnetic azimuth by comparing it to the true azimuth from INS. K. Ursenbach et al. developed a motor-driven IMU-based Measurement While Drilling (MWD) system to enhance the gyroscope bias estimation effect and achieve high accuracy in attitude measurements [8].The MWD systems with motors may not be suitable for strong downhole vibrations.However, the rotary modulation scheme is effective for continuous trajectory measurements in cased wells.H. Yang et al. established a neural network model that combines the K-proximity method to enhance the accuracy of drilling tool attitude [9].The proposed Support Vector Classification Machine method was utilized to train the measured data for calibrating the errors of magnetometerbased MWD.U. Iqbal et al. introduced a Bi-orthonormal Optimal Signal Search-based de-noising for improving wellbore continuous MWD surveying utilizing a MEMS-reduced inertial sensor system algorithm together with an extended Kalman filtering module [10].Only four-axis low-cost sensors are used to calculate the wellbore attitude.However, accurate attitude information is hard to obtain for some specific boreholes such as horizontal wells.Q. Xue et al. reported a novel state-space model based on the rotational angular velocity of a rotary-steerable drilling system in each axial direction.The dynamic measuring algorithm with two Kalman Filters was established to solve the spatial attitude of the bottom rotating drilling string and minimize the inclination azimuth errors [11].The various optimization techniques discussed in the literature have proven to be successful in improving wellbore attitude accuracy.However, the attitude measurement in near-vertical boreholes has been addressed with less attention.
The near-vertical attitudes affected by radial accelerometers have low-precision horizontal attitudes causing large azimuth deviation.The present near-vertical measurements are performed with the equivalent tool face angle measured by radial magnetometers or gyroscopes together with the marked points of the instrument to judge the approximate direction.This particular angle is defined as the magnetic tool face or gyroscopic tool face.W. Cheng et al. reported a balance correction method with a non-unit correction matrix for the near-vertical position to reduce the correction errors and improve the accuracy of the attitude estimation [12].Bowler et al. proposed the inclination and azimuth calculation method with a weight function that assigned separate weights to the established axial equation and all-axis equation for continuous inclination and azimuth in the near-vertical position [13].The reported weight function requires a large volume of cases and data to estimate the weighting factors.The current technology is not capable of applying this method to actual borehole measurement projects.W. Cheng et al. established the IMU system based on four Euler rotations for vertical attitude measurement to enhance the amplitude and signal-noise ratio of the original signal from radial accelerometers [14].However, the additional Euler rotation will not reduce sensor noise in practical engineering applications.
The aforementioned methods study the near-vertical attitude calculation with the optimal algorithm that enhances inclination and azimuth accuracy; unfortunately, they missed the actual attitude error propagation mechanism and azimuth accuracy under the near-vertical position.The fundamental reason affecting near-vertical attitude accuracy is that the true physical magnitude of the horizontal accelerometer is much less than the noise.To increase the signal-to-noise ratio of the horizontal accelerometer, this paper will develop an optimal redundant MEMS-IMU/magnetometer system to improve the accuracy of the horizontal attitude measured by the horizontal accelerometers.In addition, a near-vertical attitude accuracy improvement method based on the redundant system will be designed.
The contributions of the proposed method are as follows: (1) The wellbore attitude accuracy with the normal wellbore and near-vertical wellbore is demonstrated in combination with the error simulation.(2) A redundant MEMS-IMU/magnetometer system calculation method is reported to highlight compensation for non-orthogonal errors of redundant accelerometers.
(3) A near-vertical attitude optimal algorithm with a redundant system is proposed to improve the near-vertical azimuth and roll angle accuracy.
The structure of the main text contains four sections.In Section 2, typical wellbore attitude calculation methods are discussed, where we explain the attitude error specificities with simulation analysis in the near-vertical position.In Section 3, the redundant sensors configuration design and calibration method are reported, where we proposed a nearvertical attitude optimal algorithm-based redundant MEMS/magnetometer system.The experiments are designed to verify the proposed method in Section 4. In Section 5, we summarize the study.

Wellbore Attitude Measurement Method and Error Analysis
2.1.Wellbore Attitude Calculating Method 2.1.1.Accelerometer-Based Horizontal Attitude Calculation Before describing the attitude measurement method, the relevant reference coordinate frames are defined in this paper.As shown in Figure 1, the main four coordinate frames are utilized to describe the wellbore attitude.We define I to denote the Earth-centered inertial frame (I frame), and E denotes the Earth-centered Earth-fixed frame (E frame).G denotes the geographic coordinate frame (G frame), and D denotes the drilling tool coordinate frame (D frame).
(1) The wellbore attitude accuracy with the normal wellbore and near-vertical wellbore is demonstrated in combination with the error simulation.(2) A redundant MEMS-IMU/magnetometer system calculation method is reported to highlight compensation for non-orthogonal errors of redundant accelerometers.(3) A near-vertical attitude optimal algorithm with a redundant system is proposed to improve the near-vertical azimuth and roll angle accuracy.
The structure of the main text contains four sections.In Section 2, typical wellbore attitude calculation methods are discussed, where we explain the attitude error specificities with simulation analysis in the near-vertical position.In Section 3, the redundant sensors configuration design and calibration method are reported, where we proposed a near-vertical attitude optimal algorithm-based redundant MEMS/magnetometer system.The experiments are designed to verify the proposed method in Section 4. In Section 5, we summarize the study.

Accelerometer-Based Horizontal Attitude Calculation
Before describing the attitude measurement method, the relevant reference coordinate frames are defined in this paper.As shown in Figure 1, the main four coordinate frames are utilized to describe the wellbore attitude.We define I to denote the Earth-centered inertial frame (I frame), and E denotes the Earth-centered Earth-fixed frame (E frame).G denotes the geographic coordinate frame (G frame), and D denotes the drilling tool coordinate frame (D frame).The wellbore attitudes are usually described in terms of inclination angle, hole direction angle and tool face angle, which correspond to the pitch, azimuth and roll angles in the inertial navigation system, respectively.To regulate the formulas and parameters, we adopt the description in inertial navigation to uniformly denote the pitch, azimuth and roll angles as the symbol inc , az and tf .The wellbore attitudes are the angular rela- tionship between the D frame and the G frame.The Euler rotation matrix of the three attitude angles is represented by C D G .The elements of the matrix are shown in Equation (1).
cos az costf sin az sininc sintf sin az costf cos az sininc sintf cos inc sintf sin az cos inc cos az cos inc sininc cos az sintf sin az sininc costf sin az sintf cos az sininc costf cos inc costf (1) The three-axis accelerometers are the basic devices for measuring horizontal angles.The angle between the component of the gravity field from the axial accelerometer and The wellbore attitudes are usually described in terms of inclination angle, hole direction angle and tool face angle, which correspond to the pitch, azimuth and roll angles in the inertial navigation system, respectively.To regulate the formulas and parameters, we adopt the description in inertial navigation to uniformly denote the pitch, azimuth and roll angles as the symbol inc, az and t f .The wellbore attitudes are the angular relationship between the D frame and the G frame.The Euler rotation matrix of the three attitude angles is represented by C D G .The elements of the matrix are shown in Equation (1).
cos az cost f − sin az sin inc • sin t f sin az cost f + cos az sin inc sin t f −cos inc sin t f −sin az cos inc cos az cos inc sin inc cos az sin t f + sin az sin inc • cos t f sin az sin t f − cos az sin inc cos t f cos inc cos t f The three-axis accelerometers are the basic devices for measuring horizontal angles.The angle between the component of the gravity field from the axial accelerometer and the gravity field indicates the inclination angle of the instrument.The radial accelerometers can be used to calculate the tool face angle.The vector of the gravity field in the G frame is denoted as frame is a D = [a x a y a z ] T .Therefore, the tri-axial accelerometers can be rewritten as Thus, the expression for pitch and roll angle are given as Equation (3).

Magnetometer-Based Azimuth Calculation
A magnetometer is sensitive to the weak magnetic field of the Earth.The geomagnetic field has a fixed magnetic azimuth at a fixed place and time.Therefore, the angle between the direction of the instrument and the magnetic north can be calculated from the tri-axial magnetometers.The geomagnetic field vector in the G frame is denoted as T .The spatial relation of the geomagnetic field vector and the magnetic declination and magnetic dip is shown in Figure 2. Noting that the magnetic north is regarded as the northward reference, the eastward component of the magnetic field is 0 [15].The detailed form is written as the gravity field indicates the inclination angle of the instrument.The radial accelerometers can be used to calculate the tool face angle.The vector of the gravity field in the G frame is denoted as 0 0 -g , and the output of the tri-axial accelerometers in the a a a .Therefore, the tri-axial accelerometers can be rewritten as Thus, the expression for pitch and roll angle are given as Equation ( 3).

Magnetometer-Based Azimuth Calculation
A magnetometer is sensitive to the weak magnetic field of the Earth.The geomagnetic field has a fixed magnetic azimuth at a fixed place and time.Therefore, the angle between the direction of the instrument and the magnetic north can be calculated from the tri-axial magnetometers.The geomagnetic field vector in the G frame is denoted as The spatial relation of the geomagnetic field vector and the magnetic declination and magnetic dip is shown in Figure 2. Noting that the magnetic north is regarded as the northward reference, the eastward component of the magnetic field is 0 [15].The detailed form is written as The matrix expression of the magnetometers in the D frame is written as T , which can be expressed as Equation ( 5) concerning the attitude The final azimuth is calculated by Equation ( 6) or (7), which is the conventional method of calculating the azimuth with magnetometers [16].δm is the magnetic declination.

Gyroscope-Based Attitude Tracking
The MEMS gyroscopes are typically utilized to track the attitude variations with measured rotational angular velocities ω D = ω x ω y ω z T of the D frame.The quadratic differential equation (QDE) expressed by Equation ( 8) is the commonly used continuous attitude calculating method [17].
Here, q = q 0 q 1 q 2 q 3 and ω D is the rotational angular velocities measured by the gyroscopes.The detailed expression is written as Equation (9).
The transformation rule between quaternions and an attitude matrix is expressed as Equation (10).
2(q 1 q 2 − q 0 q 3 ) 2(q 1 q 3 + q 0 q 2 ) 2(q 1 q 2 + q 0 q 3 ) q 2 0 − q 2 1 + q 2 2 − q 2 3 2(q 2 q 3 − q 0 q 1 ) 2(q 1 q 3 − q 0 q 2 ) 2(q 2 q 3 + q 0 q 1 ) The general attitude measurement schematic block diagram is shown in Figure 3.The MEMS gyroscope with low accuracy is not sensitive to the angular velocity of the Earth.Therefore, the initial attitudes are measured by the tri-axial magnetometers and the tri-axial accelerometers.The rotational angle of the carrier is identified by the quaternionic attitude tracking method combined with the tri-axial gyroscopes.If the wellbore attitude measurement tool is stationary, the magnetometer will be utilized to calculate the azimuth angle to calibrate the accumulated attitude errors from the gyroscope.

Near-Vertical Wellbore Attitude Errors Characteristics
The actual signal of the accelerometer includes the specific force and the measure errors introduced by circuit and manufacturing processes.The horizontal attitude equation for the error model is given by ( ) ( ) ( ) where the symbol  δ denotes the measurement errors of the accelerometer.The radial accelerometer output in the near-vertical position has a small amplitude.Notably, the measurement error of MEMS accelerometers may exceed the component of the gravity field.Consequently, considerable errors will be introduced into the calculation of the roll angle, which usually exists in two cases:

Near-Vertical Wellbore Attitude Errors Characteristics
The actual signal of the accelerometer includes the specific force and the measure errors introduced by circuit and manufacturing processes.The horizontal attitude equation for the error model is given by where the symbol δ• denotes the measurement errors of the accelerometer.The radial accelerometer output in the near-vertical position has a small amplitude.Notably, the measurement error of MEMS accelerometers may exceed the component of the gravity field.Consequently, considerable errors will be introduced into the calculation of the roll angle, which usually exists in two cases: Appl.Sci.2024, 14, 6138 6 of 17 (1) a x ≪ δa x , a z ≪ δa z .The theoretical value is swamped by the accelerometer errors, and the roll angle is calculated incorrectly.(2) a x /(a x + δa x ) < δa x /(a x + δa x ) < 1, a z /(a z + δa z ) < δa z /(a z + δa z ) < 1. Accelerometer errors have a larger weight in the true value, and the roll angle calculation errors increase.
An inaccurate horizontal angle will induce an increased azimuth error.Figure 4 depicts the attitude error trends for a pitch varying from 55 degrees to 89 degrees.In order to recognize the effect of the accelerometer error on the attitude, the simulation parameters for the magnetometer errors are contained at a low magnitude.The bias errors of the accelerometer and magnetometer are set to 5 mg and 0.5 nT, respectively.The standard deviation of the random error for the accelerometer is 2.5 mg.The random error of the magnetometer is 5 nT.The true azimuth and roll were set as 45 • and 15 • , respectively.The orange curve shows that the azimuth error increases rapidly at the pitch angle above 85 • .Similarly, the red curve shows that the roll angle error has the same trend at pitch angles above 85 degrees.It is concluded that the azimuth and roll errors increase with magnitudes of ±10 • and ±15 • , respectively.Notably, if the magnetometer error is added to the simulation, the azimuth error will exceed the current simulation results.
measurement error of MEMS accelerometers may exceed the component of the gravity field.Consequently, considerable errors will be introduced into the calculation of the roll angle, which usually exists in two cases: ( An inaccurate horizontal angle will induce an increased azimuth error.Figure 4 depicts the attitude error trends for a pitch varying from 55 degrees to 89 degrees.In order to recognize the effect of the accelerometer error on the attitude, the simulation parameters for the magnetometer errors are contained at a low magnitude.The bias errors of the accelerometer and magnetometer are set to 5 mg and 0.5 nT, respectively.The standard deviation of the random error for the accelerometer is 2.5 mg.The random error of the magnetometer is 5 nT.The true azimuth and roll were set as 45° and 15°, respectively.The orange curve shows that the azimuth error increases rapidly at the pitch angle above 85°.Similarly, the red curve shows that the roll angle error has the same trend at pitch angles above 85 degrees.It is concluded that the azimuth and roll errors increase with magnitudes of ±10° and ±15°, respectively.Notably, if the magnetometer error is added to the simulation, the azimuth error will exceed the current simulation results.Only one group of attitude error trends with pitch is simulated in Figure 4.In order to describe the error characteristics in different azimuths and rolls, the static Monte Carlo simulation of the attitude error is designed to discuss the error mechanism with a pitch range of 0-89 degrees.Both azimuth and roll are calculated from 0 to 180 degrees.As shown in Figure 5a, the pitch error has consistent characteristics at all attitude angles.Theoretically, the pitch is only related to the y-axis accelerometer and gravity.The fraction of Equation (3) calculating inc can also be expressed as the equivalent form given by −a y / g 2 − a 2 y .Figure 5b depicts that the roll error at different roll angles has the same trend with the increase in pitch.As can be seen from Figure 5c,d, the azimuth error increases rapidly at near-vertical conditions.The roll error in the near-vertical position is interfered with by the error of the radial accelerometer leading to uncertainty on the calculation results.If the azimuth calculation formula is expressed as a function az = f (inc, tf, mx, my, mz), the independent variable tf will have a dramatic effect on the azimuth.
Low-noise and high-end accelerometers have a significant effect on improving horizontal attitude accuracy, which will negatively impact the small-size design of the drilling instrument and the cost control of drilling engineering.Utilizing the auxiliary equipment to achieve combined attitude measurement is the other solution such as the estimation of sensor errors through a combined navigation algorithm [18,19].Unfortunately, the harsh conditions of the downhole make it difficult to combine the other sensors.A redundant configuration of inertial sensors has the potential to improve the measurement performance of the wellbore attitude with low developing costs.In addition, the miniature MEMS sensors have perfect size adaptability on the cylindrical logging instrument.In the follow-ing sections, we concentrate on studying the near-vertical attitude measurement methods based on the redundant MEMS accelerometers for improving the azimuth and roll accuracy.
of Equation ( 3) calculating inc can also be expressed as the equivalent form given by

Redundant Accelerometers Configuration
Accelerometers that are perpendicular to the axial direction in the near-vertical state are unable to accurately calculate the horizontal angle.Increasing the signal-to-noise ratio of the radial accelerometers is beneficial for improving horizontal attitude accuracy.In this section, a scheme with redundant accelerometer configurations is used to achieve accurate azimuth measurement in the near-vertical well.As shown in Figure 6, we can rotate the λ degree around the x-axis to obtain the new coordinate frame D', which has a rotational angle of λ compared to the original D frame.Two additional accelerometers are employed for the Z ′ and Y ′ axes to form a redundant solution, which enables the signal-to-noise ratio of the radial accelerometers to be improved in the near-vertical position.
curate azimuth measurement in the near-vertical well.As shown in Figure 6, we can rotate the λ degree around the x-axis to obtain the new coordinate frame D', which has a rota- tional angle of λ compared to the original D frame.Two additional accelerometers are employed for the Z' and Y' axes to form a redundant solution, which enables the sig- nal-to-noise ratio of the radial accelerometers to be improved in the near-vertical position.The transform of the accelerometers between the D frames and D' frame can be expressed as The transform of the accelerometers between the D frames and D' frame can be expressed as If the error of the radial accelerometer in the near-vertical position is less than the true result from the radial accelerometer, the horizontal attitude accuracy will be improved.We define the ratio of the error to the measured value as the relative error of the accelerometer.The relative errors of the Y ′ and Z ′ accelerometers are denoted as r y ′ and r z ′ , respectively.Assuming that the horizontal errors are approximated as dinc = dt f , then the relative error of the Y ′ and Z ′ accelerometers can be defined as r y ′ = ∆a y ′ a y ′ = −cos inc cos t f − sin inc sin λ cos t f − cos inc sin t f sin λ −sin inc cos λ + cos inc cos t f sin λ dinc (13) Because the error characteristics are analyzed for near-vertical conditions, Equations ( 13) and ( 14) can be approximated to the form of Equation (15) when the pitch angle is close to 90 degrees.
Assuming that cost f dinc is constant, the curves of relative errors and λ are drawn in Figure 7.The relative errors of the Y ′ and Z ′ accelerometers reach a minimum at λ = 45 • , which ensures the optimal calculation of the horizontal attitude and azimuth in the nearvertical position.Consequently, the installation angle of Y ′ and Z ′ accelerometers relative to the Y-axis should be close to 45 degrees and 135 degrees, respectively.However, a calibration method that calculates the actual installation angle and non-orthogonal error is fundamental to improving attitude accuracy.in Figure 7.The relative errors of the Y' and Z' accelerometers reach a minimum at =  45 λ , which ensures the optimal calculation of the horizontal attitude and azimuth in the near-vertical position.Consequently, the installation angle of Y' and Z' accelerom- eters relative to the Y-axis should be close to 45 degrees and 135 degrees, respectively.However, a calibration method that calculates the actual installation angle and non-orthogonal error is fundamental to improving attitude accuracy.

Calibration of Redundant Accelerometers
Conventional multi-position calibration and Ellipsoid Fitting calibration can be employed to compensate for the regular nine-axis MEMS-IMU and tri-axial magnetometer [20].In this section, we concentrate on the compensation methods for redundant accelerometers.As shown in Figure 8a, the installation error leads to the actual angle between the redundant accelerometer and gravitational direction deviating theoretical angle, which will degrade the calculating precision of the wellbore azimuth.
Firstly, a simplified four-position calibration method is designed to estimate the mounting angles of the redundant accelerometers.Assuming that the true angle between

Calibration of Redundant Accelerometers
Conventional multi-position calibration and Ellipsoid Fitting calibration can be employed to compensate for the regular nine-axis MEMS-IMU and tri-axial magnetometer [20].In this section, we concentrate on the compensation methods for redundant accelerometers.As shown in Figure 8a, the installation error leads to the actual angle between the redundant accelerometer and gravitational direction deviating theoretical angle, which will degrade the calculating precision of the wellbore azimuth.Then, the error parameters of the redundant accelerometer can be written as Equation ( 17) by solving Equation ( 16).Firstly, a simplified four-position calibration method is designed to estimate the mounting angles of the redundant accelerometers.Assuming that the true angle between gravity and the redundant axis is α, the expression can be written as ( 16) using the fourposition calibration method shown in Figure 8b.The four calibration positions are the Z-axis pointing up and down, and the Y-axis pointing up and down, respectively.
Here, f i (i = 1, 2, 3, 4) is the true measuring value of the redundant accelerometer in four directions.f b and K are the bias of the accelerometer and scale factor, respectively.Then, the error parameters of the redundant accelerometer can be written as Equation ( 17) by solving Equation (16).
The calibration method for the first step misses the non-orthogonal error (NOE) of the two redundant accelerometers.The redundant accelerometers Racc ′ 1 and Racc ′ 2 have the installation angle α 1 and α 2 , respectively.As shown in Figure 9, Racc 1 and Racc 2 are the desirable orthogonal mounting positions.Assuming that Racc ′ 1 and Racc 1 are parallel, Racc ′ 2 has a non-orthogonal error angle ε with the theoretical accelerometer Racc 2 .Therefore, the orthogonality of the two redundant accelerometers can be achieved by compensating for the NOE with Equation (18).
Appl.Sci.2024, 14, x FOR PEER REVIEW 11 of 18 To verify the validity of the calibration method, a hexahedron structure is employed to install MEMS-IMU/magnetometers and redundant accelerometers in Figure 10, where two single-axis AXO315 are symmetrically mounted on both surfaces of the hexahedron.The nine-axis sensor, model N100, is mounted on the front of the hexahedron as the MEMS-IMU/magnetometer system.The parameters of the AXO315 and N100 are listed in Table 1.To verify the validity of the calibration method, a hexahedron structure is employed to install MEMS-IMU/magnetometers and redundant accelerometers in Figure 10, where two single-axis AXO315 are symmetrically mounted on both surfaces of the hexahedron.The nine-axis sensor, model N100, is mounted on the front of the hexahedron as the MEMS-IMU/magnetometer system.The parameters of the AXO315 and N100 are listed in Table 1.
To verify the validity of the calibration method, a hexahedron structure is employed to install MEMS-IMU/magnetometers and redundant accelerometers in Figure 10, where two single-axis AXO315 are symmetrically mounted on both surfaces of the hexahedron.The nine-axis sensor, model N100, is mounted on the front of the hexahedron as the MEMS-IMU/magnetometer system.The parameters of the AXO315 and N100 are listed in Table 1.The comparison of the calibration results among 65 • -85 • pitch angles is presented in Table 2, which demonstrates the validity of the calibration method for the redundant accelerometers.The statistics show that the pitch angle error after compensation is within 0.1 • , which is about a 5-8 times improvement compared to the pre-compensation.Theoretically, the deflection angle of the redundant accelerometer is 45 • , so the horizontal attitude calculation method can be written as Equation ( 19) by solving Equation (12).
To overcome the problem of singular values of trigonometric functions, the Equation ( 19) is refined as Considering the mounting error, the installation angle of the redundant accelerometers can rarely be equal to 45 • ; therefore, the accurate angle α obtained by the aforementioned calibration method is introduced in Equations ( 19) and (20).Finally, the updated wellbore attitudes calculation simultaneous equations are written as Equation (21).
The near-vertical approach based on redundant accelerometers can be summarized in the flowchart shown in Figure 11.The main application is that the instrument is dropped to the survey station for measuring the azimuth and inclination of the straight well section.In order to guarantee measurement accuracy, the instrument needs to be kept stationary while measuring.If the pitch is less than 85 • , the attitude can be calculated by the conventional method utilizing the standard equipment.If the pitch is above 85 • , the redundant accelerometers are employed to calculate the attitude.The installation angle α and ε are calibrated before calculating the attitude using the new forms inc ′ , t f ′ and az ′ .The parameters K, P and L are intermediate variables that prevent the final computation from being singular.In the following paper, we will validate the proposed method using the constructed test platform depicted in Figure 10.

Results and Discussion
This section focuses on the measurement accuracy of roll and azimuth angles at different pitch angles from 60° to 89°.The dual-axis position turntable shown in Figure 12 is employed to provide the attitude reference for comparing the accuracy of the near-vertical attitude method.The angular accuracy of the dual-axis turntable is ±0.01°, and the 0-degree scale of the azimuth axis points to the geographic north.The test equipment consists of a nine-axis inertial measurement unit and two accelerometers as shown in Figure 10.The sensor parameters are listed in Table 1.ARM of the STM32F4 series is utilized for data acquisition and synchronization.The UART interface connected to the PC is employed to calculate attitude and store data.To reduce magnetic interference from the electrical environment, the turntable was operated by a handle to prevent the motor from turning.Four sets of attitudes were designed to verify the proposed approach:

Results and Discussion
This section focuses on the measurement accuracy of roll and azimuth angles at different pitch angles from 60 • to 89 • .The dual-axis position turntable shown in Figure 12 is employed to provide the attitude reference for comparing the accuracy of the nearvertical attitude method.The angular accuracy of the dual-axis turntable is ±0.01 • , and the 0-degree scale of the azimuth axis points to the geographic north.The test equipment consists of a nine-axis inertial measurement unit and two accelerometers as shown in Figure 10.The sensor parameters are listed in Table 1.ARM of the STM32F4 series is utilized for data acquisition and synchronization.The UART interface connected to the PC is employed to calculate attitude and store data.To reduce magnetic interference from the electrical environment, the turntable was operated by a handle to prevent the motor from turning.Four sets of attitudes were designed to verify the proposed approach: (1) The referenced azimuth and roll are 330 The pitch error curves compared with the conventional algorithm at four referenced attitudes are depicted in Figure 13.The burgundy error curves representing the conven-tional method have less deviation from the gray curve representing the proposed algorithm.The maximum errors for the conventional and proposed methods are 0.25 and 0.2 degrees, respectively.The pitch errors are nearly close from 60 degrees to 89 degrees.The results of the pitch error validate the conclusions given in Section 2.2.The RMSE curves show that the near-vertical optimization method is more stable compared to the conventional method.The reason is that the near-vertical algorithm uses accelerometers with much lower noise levels.
gree scale of the azimuth axis points to the geographic north.The test equipment consists of a nine-axis inertial measurement unit and two accelerometers as shown in Figure 10.The sensor parameters are listed in Table 1.ARM of the STM32F4 series is utilized for data acquisition and synchronization.The UART interface connected to the PC is employed to calculate attitude and store data.To reduce magnetic interference from the electrical environment, the turntable was operated by a handle to prevent the motor from turning.Four sets of attitudes were designed to verify the proposed approach: (1) The referenced azimuth and roll are 330° and 0°, respectively.
(2) The Y-axis of the instrument is rotated 90° making the reference azimuth and roll 330° and 90°, respectively.(3) The outer axis of the turntable is rotated 180°, and the reference azimuth and roll are 150° and 90°, respectively.(4) The Y-axis of the instrument is rotated 90° making the reference azimuth and roll 150° and 90°, respectively.The pitch error curves compared with the conventional algorithm at four referenced attitudes are depicted in Figure 13.The burgundy error curves representing the conventional method have less deviation from the gray curve representing the proposed algorithm.The maximum errors for the conventional and proposed methods are 0.25 and 0.2 degrees, respectively.The pitch errors are nearly close from 60 degrees to 89 degrees.The results of the pitch error validate the conclusions given in Section 2.2.The RMSE curves show that the near-vertical optimization method is more stable compared to the conventional method.The reason is that the near-vertical algorithm uses accelerometers with much lower noise levels.As shown in Figure 14, the blue curves are the roll errors of the conventional algorithm, and the red curves represent the proposed method.The roll angle error is under 5 degrees for pitch angles less than 84 degrees.However, the accuracy of the proposed method is obviously higher than the traditional method.For pitch angles above 85 degrees, the roll error calculated by the conventional method increases rapidly, with the maximum error exceeding 25 degrees.For the proposed method, the roll errors are less than 1 degree for all four positions.The RMSE of the roll at each position exceeded 4 de- As shown in Figure 14, the blue curves are the roll errors of the conventional algorithm, and the red curves represent the proposed method.The roll angle error is under 5 degrees for pitch angles less than 84 degrees.However, the accuracy of the proposed method is obviously higher than the traditional method.For pitch angles above 85 degrees, the roll error calculated by the conventional method increases rapidly, with the maximum error exceeding 25 degrees.For the proposed method, the roll errors are less than 1 degree for all four positions.The RMSE of the roll at each position exceeded 4 degrees, affected by the noise of the horizontal accelerometer.Notably, the near-vertical optimization algorithm based on the redundant system makes the errors of the roll stable for all pitch angles.With the discussion in Section 2.2, the azimuth angle can be expressed as a function of the roll angle.Therefore, as shown in Figure 15, the azimuth and roll errors have a similar trend with the increase in pitch.The black curves marked with circles are the azimuth errors of the traditional method and the green curves marked with pentagrams are the azimuth errors of the proposed method.The difference between roll and azimuth is that the azimuth angles for the two methods are all affected by the magnetometer error.However, the black curves indicated that the conventional method gradually deviated from the green curves representing the proposed method at pitch angles greater than 85 degrees.Figure 15c,d show that the maximum value of the azimuth errors of the conventional method exceeds 35 degrees.The azimuth error of the proposed method is approximately 5 degrees at the pitch above 85 degrees.The RMSE curves for the azimuth show that the proposed method is more stable at a pitch above 85 degrees.With the discussion in Section 2.2, the azimuth angle can be expressed as a function of the roll angle.Therefore, as shown in Figure 15, the azimuth and roll errors have a similar trend with the increase in pitch.The black curves marked with circles are the azimuth errors of the traditional method and the green curves marked with pentagrams are the azimuth errors of the proposed method.The difference between roll and azimuth is that the azimuth angles for the two methods are all affected by the magnetometer error.However, the black curves indicated that the conventional method gradually deviated from the green curves representing the proposed method at pitch angles greater than 85 degrees.Figure 15c,d show that the maximum value of the azimuth errors of the conventional method exceeds 35 degrees.The azimuth error of the proposed method is approximately 5 degrees at the pitch above 85 degrees.The RMSE curves for the azimuth show that the proposed method is more stable at a pitch above 85 degrees.
In this paper, we focus on analyzing the attitude accuracy in the near-vertical station.In Table 3, we conclude the attitude angle error data for pitch angles over 85 degrees.M1 indicates the conventional method, and M2 refers to the near-vertical method proposed in this paper.As for the conventional method, the pitch errors from 85 degrees to 89 degrees have similar results within ±0.2 • .The proposed method has a pitch accuracy of ±0.1 • .The maximum roll errors of the conventional method and the near-vertical optimization algorithm are 28.56 • and 0.73 • at a pitch of 89 • , respectively.The azimuth errors of the conventional method and the proposed method are 35.4• and 6.1 • at a pitch of 89 • , respectively.As for the conventional method, the mean roll error and azimuth error for a pitch changing from 87 degrees to 88 degrees grows about 6 degrees and 4 degrees, respectively.The average roll error and azimuth angle error for the conventional method increases approximately 12 degrees and 16 degrees from a pitch of 88 degrees to a pitch of 89 degrees, respectively.The proposed method has the average azimuth errors changing from 5.13 • to 5. In this paper, we focus on analyzing the attitude accuracy in the near-vertical station.In Table 3, we conclude the attitude angle error data for pitch angles over 85 degrees.M1 indicates the conventional method, and M2 refers to the near-vertical method proposed in this paper.As for the conventional method, the pitch errors from 85 degrees to 89 degrees have similar results within ±0.2°.The proposed method has a pitch accuracy of ±0.1°.The maximum roll errors of the conventional method and the near-vertical optimization algorithm are 28.56° and 0.73° at a pitch of 89°, respectively.The azimuth errors of the conventional method and the proposed method are 35.4°and 6.1° at a pitch of 89°, respectively.As for the conventional method, the mean roll error and azimuth error for a pitch changing from 87 degrees to 88 degrees grows about 6 degrees and 4 degrees, respectively.The average roll error and azimuth angle error for the conventional method increases approximately 12 degrees and 16 degrees from a pitch of 88 degrees to a pitch of 89 degrees, respectively.The proposed method has the average azimuth errors changing from 5.13° to 5.7° as the pitch increases from 85° to 89°.
The average attitude error data reveal that the azimuth and roll angle errors calcu- The average attitude error data reveal that the azimuth and roll angle errors calculated by the conventional method will increase rapidly at a pitch close to 90 • .The data of the roll errors and azimuth errors suggest that our proposed near-vertical method based on redundant accelerometers can significantly improve the static measurement accuracy in the near-vertical state.The experimental results show that our proposed method can provide a theoretical basis for the borehole attitude measurement method in near-vertical well sections.

Figure 1 .
Figure 1.The spatial relationships of the coordinate frame.

Figure 1 .
Figure 1.The spatial relationships of the coordinate frame.

Figure 2 .Figure 2 .
Figure 2. Schematic diagram of magnetic field components.The matrix expression of the magnetometers in the D frame is written as = m [ ] D T x y zm m m , which can be expressed as Equation (5) concerning the attitude transformation matrix.

Figure 5 .Figure 5 .
Figure 5. Monte Carlo simulation of attitude errors.(a) The error characteristics of pitch at different roll and pitch angles.(b) The error variation of roll angle at different pitch and roll angles.(c) Figure 5. Monte Carlo simulation of attitude errors.(a) The error characteristics of pitch at different roll and pitch angles.(b) The error variation of roll angle at different pitch and roll angles.(c) The error variation of azimuth angle at different roll and pitch angles.(d) The error variation of azimuth angle at different azimuth and pitch angles.

Figure 7 .
Figure 7. Accelerometer relative error and offset angle curves.

Figure 7 .
Figure 7. Accelerometer relative error and offset angle curves.

Figure 8 .
Figure 8. Schematic of installation angle and calibration for redundant accelerometers.(a) Installation angle and calibration.(b) Four-position calibration method.
, , , ) is the true measuring value of the redundant accelerometer in four directions.b f and K are the bias of the accelerometer and scale factor, respectively.

Figure 8 .
Figure 8. Schematic of installation angle and calibration for redundant accelerometers.(a) Installation angle and calibration.(b) Four-position calibration method.

19 Figure 11 .
Figure 11.Schematic of near-vertical algorithm and well section types.

Figure 11 .
Figure 11.Schematic of near-vertical algorithm and well section types.
• and 0 • , respectively.(2) The Y-axis of the instrument is rotated 90 • making the reference azimuth and roll 330 • and 90 • , respectively.(3) The outer axis of the turntable is rotated 180 • , and the reference azimuth and roll are 150 • and 90 • , respectively.(4) The Y-axis of the instrument is rotated 90 • making the reference azimuth and roll 150 • and 90 • , respectively.
and the output of the tri-axial accelerometers in the D

Table 1 .
The parameters of AXO315 and N100.

Table 1 .
The parameters of AXO315 and N100.

Table 1 .
The parameters of AXO315 and N100.

Table 2 .
Redundant accelerometer calibration results and comparison.