Wellbore Surveying While Drilling Based on Kalman Filtering

Problem statement: Oil and gas are global fuels obtained primarily fro m drilling wells in underground terrestrial reservoirs. Vertical drilli ng is preferred because of its simplicity and there fore low cost, but subsurface targets can often be procu red only by directing the wellbore along predefined non-vertical trajectories. For instance, directiona l drilling must be employed to reach locations inaccessible to the drilling rig, to side track an existing well (multilateral drilling), or to drill multiple wells from the same offshore platform (horizontal d ri ling). Approach: A complete knowledge of the wellbore direction and orientation during the drill ing process is essential to guarantee proper directional drilling procedure. Results: Thus, besides the conventional drilling assembly, d irectional drilling operations require sensors to provide azim uth, inclination and toolface angles of the drill. These sensors are part of the Measurement-While-Dri ling (MWD) tool, which in current technology is installed several feet behind the drill bit. In suc h systems, values for inclination and toolface angl es are determined from accelerometer measurements at prede te mined stationary surveying stations; these values are then incorporated with magnetometer meas ur ments to deliver the azimuth angle. Values for inclination and azimuth angles at the current surve ying station are combined with those from the previous station to compute the position of the pro be. However, there is no accurate information about the wellbore trajectory between survey stations. Ad ditionally, the magnetic field of the magnetometers has deleterious effect on the overall accuracy of s urveying measurements. Conclusion: A method to provide continuous information about the wellbore t rajectory has been developed in this study. The module developed integrates a Rotary Steerable Syst em (RSS) and MWD tool into one drilling probe utilizing Inertial Navigation System (INS) technolo gy. This is achieved by designing a reliable realtime low cost MWD surveying system based on MEMS in ertial sensors miniaturized inside the RSS housing installed directly behind the drill bit. A continuous borehole surveying module based on MEMS inertial sensors integrated with other drillin g measurements was developed using Kalman filtering.


INTRODUCTION
Directional drilling is the science of directing a wellbore along a predefined trajectory leading to a subsurface target (Bourgoyne et al., 1986). Directional drilling is essential for many reasons such as inaccessible surface locations to the drilling rig, side tracking of an existing well, drilling multiple wells from the same offshore platform, multilateral drilling and horizontal drilling. Additionally, horizontal wells have higher oil and gas deliverability where they have larger contact area with oil and gas reservoirs (Joshi and Ding, 1991). This in turn substantially reduces the cost and time of drilling operations. Thus, in recent years, the development of directional well drilling technologies has gained more attention than improvements in vertical drilling technologies in Canadian global oil and gas industries.
Current MWD surveying is performed along the well path at stationary survey stations. The well path computation is based on three measurements repeated at each surveying station. They are the drilled length, inclination and azimuth. In addition, the orientation of the survey instrument inside the hole (toolface) is determined after deviating from the vertical direction of the well. There are two conventional systems for measurements while drilling based on magnetometers and gyroscope. The strengths and limitation of these systems are discussed below.
Magnetometers based system: Present MWD tools employ three orthogonal fluxgate saturation induction magnetometers inside the direction and inclination sensors package (Bourgoyne et al., 1986). The earth's magnetic field can be measured using magnetometers and the magnetic azimuth angle can be derived. Magnetometers require a nonmagnetic environment in order to function properly, as the measured azimuth is referenced to the magnetic north (Ripka, 2001). Magnetometers are sensitive to the earth's magnetic field; each magnetometer has two primary coils and a pick up secondary coil surrounds the primary coils. An alternating current passes through the two primary coils; symmetrical voltage pulses are then generated in the secondary coil each time the AC current changes direction. However, if an external magnetic field exists, it can distort the voltage pulses in the secondary coil. The magnetometer reacts by supplying a buckling current through the second coil to drive the voltage pulses back to their symmetric state. The magnitude of the buckling current is proportional to the earth's magnetic field strength and aligned to the axis of the magnetometers (Ripka, 2001).
The magnetic field strength has horizontal and vertical components. The horizontal component points from the magnetic north to the magnetic south, while the vertical component points down into or up out of the ground. We rely mainly on the horizontal component to calculate the magnetic azimuth direction of the BHA. The horizontal component is small close to the poles and errors introduced due to magnetic interference significantly affect magnetic azimuth measurements (Parkinson, 1983). The most important challenge the current magnetometer MWD tools encounter is magnetic interference and Bottom Hole Assembly (BHA) sag. Two types of magnetic interference disturb magnetometer readings. The first is the drill string magnetic interference and the second is the external magnetic interference due to the surrounding environment.
The drill string can be considered as a long slender magnet that has both ends acting as magnetic poles. As a result, drill string steel components become magnetized due to the presence of the earth's magnetic field lines. A magnetometer based MWD tool is therefore placed inside a nonmagnetic drill collar in an effort to eliminate this effect, but the nonmagnetic drill collar can only minimize the influence of the other steel components in the drill string (Thorogood and Knott, 1990;Grindord and Wolf, 1983). As the inclination angle builds up from the vertical direction or the direction of the bore hole (azimuth angle) deviates away from the north-south direction, the effect of magnetic interference on magnetometer measurements due to the drill string increases significantly (Thorogood and Knott, 1990). Drill string magnetic interference only affects magnetometer measurements aligned along the tool rotation axis, assuming the three magnetometers are orthogonal.
Unlike drill string magnetic interference that affects only one magnetometer, the external magnetic interference affects all three magnetometers in the triad. External magnetic interference can be introduced by the following: (1) Presence of Iron, pyrite and hematite formations and ferromagnetic material near the tool such as nearby casing collars greatly affects magnetometer measurements (Bourgoyne et al., 1986).
(2) Solar storms and diurnal variations of the field greatly affect magnetic azimuth accuracy and hence magnetometer measurements must be corrected for these effects (Thorogood and Knott, 1990;Wolf and De Wardt, 1981). (3) Drilling fluid can degrade the magnetic azimuth accuracy if it contains magnetized contaminants. (4) When a nonmagnetic drill collar exceeds its magnetic tolerance, magnetic hot spots develop and the nonmagnetic drill collar has to be replaced (Zijsling and Wilson, 1989).
BHA sag refers to a misalignment along the MWD tool rotation axis and the well bore centre axis, where the MWD tool does not lie centrally inside the borehole. The MWD tool tends to lie on the low side of the borehole due to gravitational forces acting on the drill string. The sag relies on BHA design, number and sizes of stabilizers, position and degree of bend of the steerable motor, mud weight and the borehole inclination angle. The effect of BHA sag on the direction and inclination sensors package can be significant and leads to a large system error especially in a wellbore with high inclination. Thus, measurements have to be corrected for this error (Berger and Sele, 1998).

Gyroscope based system:
A gyroscope measures angular velocity and is used for monitoring angular rotation along the sensitive axis of a MWD tool sensor. Gyroscope technology is used in some directional drilling applications, however, it is not utilized in RSS technology and it has limited use in MWD tools. The advantage of gyroscope technology is that interruptions in the earth's magnetic field or surrounding magnetic interference has no effect on gyroscope performance. At present, gyroscopes are utilized in hole orientation tool, single-axis and double-axes based MWD tool.
Recent research has investigated three types of gyroscope sensors to be employed in MWD tools. They are the Mechanical Based Gyro (MBG), the Ring Laser Gyro (RLG) and the FOG. Performance of the MBG is unacceptable due to moving parts that are susceptible to shock and vibration while drilling. The RLG is a navigation grade gyroscope used mainly in commercial and military aircraft as a primary navigation sensor due to the high accuracy and the relatively small error drift rate of this sensor. The RLG gyroscope sensor is expensive and has limited use because its large size makes it difficult to install inside the MWD tool collar. Cost and size restrict the use of RLGs in measurementwhile-drilling applications (Estes and Epplin, 2000). The FOG is relatively smaller than the RLG and the FOG's susceptibility to shocks and vibrations is lower than that of the MBG. However, a complete set of three orthogonal FOGs cannot be installed in a MWD tool collar due to the size of the instruments. Efforts have been made to solve this problem by using a single axis gyroscope with a dual axes gyroscope in MWD applications (Noureldin, 2002;Binder et al., 2005).
A single axis FOG gyroscope is integrated with three orthogonal accelerometers in order to continuously measure the azimuth, tool-face and inclination of the well bore. It is based on the assumption that the changes in inclination and toolface are very small if they are monitored at a high rate. Because the sensitive axis of the gyroscope is along the MWD tool rotation axis, the tool can only detect the tool direction while the bore hole is vertical or nearly vertical. In faster drilling formations, the inclination build up rate angle can reach up to 40°/h (Joshi and Ding, 1991). The single axis gyroscope MWD tool cannot be relied on in such a condition (Noureldin, 2002). In summary, a single axis gyroscope MWD tool is limited to drilling a bore holes in vertical and near vertical directions, with slow build up rate angles.
An MWD tool with a dual-axes spinning mass Gas Bearing Rate (GBR) gyroscope with a stepper motordriven indexing mechanism has been developed (Estes and Epplin, 2000). A limitation of this tool is the use of an indexing motor in order to rotate the gyroscope around its spin axis. The motor moves the sensors chassis to a set of positions to estimate the run to run bias of the sensor measurements. Field tests failed due to the failure of the indexing motor, where a coupling fracture between the indexing motor and the sensor chassis prevented the motor from rotating properly (Estes and Epplin, 2000). A stationary based surveying technique was implemented at certain stations. The tool was not able to provide continuous azimuth, inclination and toolface measurements while drilling, which imposed another limitation. A third limitation is that dual-axes gyroscopes cannot resolve well bore azimuths for horizontal drilling; this is a problem when the inclination is 60° and higher (Estes and Epplin, 2000).
Another implementation of dual-axes gyroscopes MWD tools has been proposed, but with the use of two FOGs instead of GBR gyroscopes. The study proposed an improved algorithm to derive the continuous azimuth at highly inclined and horizontal sections of the well (Noureldin, 2002). This was accomplished by changing of the gyroscopes body axes orientation at high inclination sections. In a different study, two dualaxes gyroscopes were integrated with three orthogonal accelerometers. However, the gyroscopes were arranged in the cross-section plane of the borehole and an inclinometer system with a transverse gyroscope was developed (Binder et al., 2005). An indexing motor was utilized in the research to calibrate the gyroscope at surveying stations. The motor rotates the gyroscopes' housing about two mutually perpendicular axes. The last two studies have not been field tested yet.

Rotary steerable system technology: The Rotary
Steerable System (RSS) is a recent technology that allows drilling at faster rates by rotating the entire drill string all the time. This differs from conventional technology that uses a PDM with a bent housing to provide a side force to the bit to deflect the well bore in the desired direction. In conventional technology, drilling is done in sliding and rotary modes. A sliding mode is defined when the entire drill string is not rotating and only the drill bit is rotating. This takes advantage of the bent housing in the PDM to divert the well bore to a desired direction. As soon as the well bore direction and build angle are established, drilling enters into a rotary mode where the entire drill string rotates to hold direction.
The sliding mode is considerably slower than the rotary mode and is associated with many problems. The emerging RSS technology is highly desirable because it completely eliminates sliding problems and has several additional advantages (Edmondson and Chris, 2002) which can be listed as: (1) Increase the rate of penetration of the drill bit to allow faster directional drilling.
(2) Help optimize drilling parameters such as weight on bit and Revolutions Per Minute (RPM), which optimizes drilling operation. (3) Improve the wellbore quality and provide an in gauge hole with no ledges; it also reduces wellbore tortuosity (Weijermans et al., 2001). (4) Reduce the torque and drag that cause fatigue of the drill string. (5) Provide better wellbore cleaning, where the continuous rotation of the drill string agitates wellbore cuttings in the annulus; this facilitates moving the cutting out of the hole. If using the conventional PDM, additional wiper trips are needed for the hole cleaning after drilling is completed. Therefore, RSS eliminates the additional time required for wiper trips. (6) Eliminate the time of the toolface orientation at each tool joint when using the conventional PDM. (7) Eventually decrease the cost per foot of drilling operations. An RSS can turn the wellbore while rotating by pushing or pointing the bit toward the desired direction using a shaft drive attached to the bit. Each directional drilling service company has a unique design to mechanically control the bit direction while drilling.

RSS challenges:
Recent advances in RSS technology increased the demand for the use of MWD technology for directional control of the well bore. However, the RSS is installed directly behind the bit followed by the MWD tool. This leads to an offset of at least 15 m between the current MWD surveying sensors package and the bit, as shown in Fig. 1.
The average drill bit length is 300 mm and the average length of an RSS (Fig. 1C) is 8 m. The flex sub (Fig. 1B) and the spiral stabilizer extend for 6-9 m. The MWD collar (Fig. 1A) length is approximately 9 m. The surveying sensor package is usually installed on the lower part of the MWD tool collar. Under these conditions drilling proceeds blindly for 15 m and the directional driller has to wait to drill 50 feet to know the location of the wellbore. An average formation can be drilled at a rate of 10 ft/h, this count for 5 h of drilling blindly. This leads to a high cost if the wellbore is diverted significantly from the planned trajectory especially for offshore operations. Additionally, MWD tools available in the market cannot provide a continuous wellbore trajectory while drilling. Furthermore, the MWD tool does not communicate its measurements to the RSS while drilling. If the RSS does not deviate in the correct direction, drilling has to stop and different commands have to be down-linked to the RSS. This is indeed very time consuming and imposes constraints on the use of an RSS. Thus, the full advantages of the RSS are yet to be realized with the present implementation. This shortcoming of the current technology has motivated this research study.

Objectives:
The aforementioned challenges of the current technologies available for the hydrocarbon drilling industry and the potential for significant improvements have motivated this research study. It aims to develop an integrated solution to enhance directional drilling by integrating an RSS with MWD direction and inclination sensors and packaging the two systems into one collar installed less than 1.5 m behind the drill bit. This study proposes an advanced direction and inclination sensor package based on the Inertial Navigation System (INS). The strict size limitation inside the RSS collar makes MEMS inertial sensors perfect candidates for this application.

MATERIALS AND METHODS
MEMS inertial sensor are utilized in this study to enable RSS and monitoring of position and attitude of the drill fit due to their small size, light weight, low power consumption and immunity to shock and vibration.
INS mechanization equations are implemented to derive a continuous wellbore trajectory. The inputs to the mechanization equations are the accelerometer and gyroscope sensor measurements, while the outputs are position, velocity and attitude of the platform where the inertial sensors are installed (Titterton and Weston, 1997). INS mechanization equation outputs are derived with respect to a specific reference frame. When installing the inertial sensors inside the rotary steerable system closely behind the drill bit, the accelerometer triad measures the accelerations of the drill bit in three orthogonal directions, the directions of the sensitive axes of the accelerometers which coincide with the axes of the rotary steerable system. At this stage, all measurements will be taken in reference to these axes which are known as the body frame.
In addition to accelerometer measurements, gyroscope measurements are essential to determine the orientation of the drill bit with respect to the navigation frame. This is achieved by integration of the gyroscope measurements and knowledge of the initial attitude angles which are the pitch, roll and azimuth (Titterton and Weston, 1997). The attitude angles need to be known in order to transform the accelerometer measurements from the body frame to the navigation frame. If the initial velocity of the drill bit in the three orthogonal directions is known, the continuous velocities in the navigation frame can be determined by the time integral of each transformed acceleration component. The second integration derives the drill bit position in the navigation frame with respect to the initial position.
It must be noted that accelerometer readings are contaminated by the earth's gravitational field. The acceleration of gravity is added to the accelerometer measurements. Therefore, it is crucial to know the exact acceleration of the earth's gravity at the location where the accelerometer will be run. This will separate the acceleration due to the earth's gravitational force from the acceleration due to the drill string motion.

Transformation between coordinates frames:
The accelerometer and gyroscope sensors are mounted inside the rotary steerable system collar and their sensitive axes are aligned toward the forward direction (y), the transverse direction (x) and the (z) direction perpendicular to the xy plane. These three axes form the body frame (b-frame). Illustration of the b-frame inside the rotary steerable system collar is presented in Fig. 2. Therefore, the original accelerometer and gyroscope measurements represent the linear acceleration and angular velocities in the b-frame. However, the measurements are normally transformed into the navigation reference frame in order to provide the position, velocity and attitude of the moving drill bit and drill collars. Main benefit of selecting the n-frame is, the azimuth, inclination and toolface angles of the drill collar are obtained directly as outputs of the INS mechanization equation in the n-frame. Another advantage of using the n-frame is computational errors of the navigation parameters in the north-east plane are bound (Titterton and Weston, 1997;Mohamed, 1999), where they are coupled together and produce the Schuler loop. These errors oscillate with a Schuler frequency of 1/5000 Hz. As stated earlier, accelerometer and gyroscope measurements are taken in the body frame (b-frame). The matrix n b R is used to transform these measurements into the navigation frame. n b R is a combination of azimuth (ψ), pitch (θ) and toolface (ξ) angles; it is expressed as follows: n b cos cos sin sin sin sin cos sin cos cos sin sin cos cos cos sin sin R cos sin sin sin cos sin sin cos sin cos cos cos Accordingly, transformation of the measurements from n-frame to b-frame can be implemented by using the inverse of the transformation matrix n b R .

Mechanization equations:
The inertial measurements unit provides three angular velocity b The derived angular increments capture the drill collar angular increments in addition to the earth's rotation and the change of orientation of the navigation frame with respect to the earth-fixed frame. The last two effects must be taken into account. Their expression b in ω is derived in Eq. 2. The angular increments can then be presented at a given time k t as in the following expression: It is possible now to determine the actual angular increment of the drill string at a given time b (t ) θ as follows: The following step updates the quaternion vector. The initial quaternion vector 0 Q(t ) is computed using the initial rotation matrix n b 0 R (t ) derived from the initial alignment during a stationary period. The quaternion vector is updated by using Eq. 4 applied as: The updated rotation matrix n b R is determined afterward from the direct relationship with the updated quaternion vector in Eq. 4. Finally the azimuth (ψ), toolface (ξ) angles and pitch pitch (θ(90-inclination I)) of the drill string can be derived using the relationship explained before. As a result they are obtained using the following expressions: The following step updates the velocity components at t k+1 . This can be accomplished by using Eq. 8 to determine drill string velocity changes along the navigation frame as follows: Finally, the updated velocity components The updated positions (latitude φ, longitude λ and true vertical depth h) of the drill string at t k+1 are computed using modified Euler formulas. h is computed using the relationship with the vertical component of the velocity vector in Eq. 9. It is expressed as: Equation 11 and 12 compute the drill string latitude φ longitude λ, at t k+1 : The continuous update of the drill string position, velocity and attitude angles are computed using the measurements from the accelerometer triad and the gyroscope triad without regard to contaminating errors. However, the long term accuracy deteriorates due to integration of accelerometer and gyroscope sensor errors and computational errors.
Drill bit synthetic attitude angles: In a stationary mode, the pitch and toolface of the drill bit can be derived using only accelerometer measurements based on the following relationship between the accelerometer measurement vector f b and the gravity vector g n : where gravity vector g n is derived from the normal gravity model. The rotation matrix b n R transforms the gravity vector defined in the n-frame into the b-frame and it is expressed as in Eq. 1. Accelerometer measurement vector f b can be written as: According to Eq. 14-16, the pitch θ and toolface ξ angles can be derived as: When the drill bit rate of penetration is very slow, synthetic pitch and toolface angles can be derived by using only the accelerometer measurements as shown in Eq. 17 and 18. The comparison with drill bit inclination and toolface reference angles is presented in the following discussion.
Surveying error modeling using linear state equations: Surveying errors must be estimated to a certain level in order to achieve an acceptable system performance. Given the nonlinear nature of the system, the system is perturbed in order to derive a set of linear differential equations. This is done using the linearization approach of the nonlinear dynamic system (Jekeli, 2000).
The surveying errors of the coordinate errors ). Inertial sensor measurements contain biases and constant drifts defined as the deterministic parts, which are determined by field calibration. The remaining errors are considered random and modeled as stochastic processes, where these errors are correlated in time and modeled as first order Gauss-Markov (GM) processes (ElGizawy, 2009). Measurement errors of the inertial sensors are known to drift with time in the absence of external measurement updates. This error growth is limited by applying an optimal estimation tool such as Kalman filtering.
Kalman filtering algorithm: The Kalman filter is a computational algorithm that deduces a minimum error estimate of the state of a system by considering the dynamics of the system, characteristics of the system noise, measurements errors and the initial condition information. Inertial sensor errors and surveying errors are combined to form the error state vector X k at time t k : The sequential recursive algorithm of Kalman filtering for the optimal least mean variance estimation of the error states is best described by the following Fig. 3.

Drilling observation updates for Kalman filtering:
The proposed drilling surveying system will exhibit an unlimited growth of position, velocity and attitude errors if there are no external observations to update the surveying system. Two external update schemes can limit the error growth of the inertial sensor measurements while drilling. The first is based on the continuous source of drilled pipe length measurements which can be used to determine the drill bit rate of penetration. This can be further translated to the continuous velocity measurements' update of the inertial sensor measurements. Additionally, a continuous position is applied based on the position computed by the MCM (ElGizawy et al., 2006). The second external update scheme is based on stationary measurements taken when the drilling operation stops on a regular basis to connect a new stand of pipes. Stationary updates are Zero velocity Updates (ZUPT), stationary MCM position updates, as well as magnetic heading angle updates.
The inertial sensor measurements and the observation updates are processed through the Kalman filter algorithm to optimally estimate the surveying parameters as Fig. 4. The efficiency of these observation updates depends on the accuracy of these observations and on the how often they are available.

Continuous surveying observations updates while drilling:
The rate of penetration of the drill bit while drilling is available continuously by making use of the information of the drilled pipe length and time. The drilled pipe length measurement is based on the measurements of the drill line movements by monitoring revolutions of the draw works drum to record incremental additions to the drill string. This is done with an optical encoder installed on the drum of the draw works. The pulses per foot measured by the encoder vary at each wrap on the draw works. This is compensated for by calibrating the total number of pulses per wrap to the corresponding depth variation as the block is pulled up. Depth is incremented only when the drill pipes are moving. When making a connection while the drill string is stationary, depth updates stop (Bourgoyne et al., 1986 The design matrix H k that exhibits the noiseless relationship between the observation vector Z k and the error state vector X k is written as: The second term on the right hand side represents the uncertainty of the drill bit rate of penetration and MCM position measurements. When the drilling stops in order to connect new pipe stands, stationary external observations are utilized that is discussed in detail as follows: . Stationary surveying observation updates: In large drilling rigs, drilling has to stop every 30 m for at least 5-10 min in order to connect a new drill pipe stand. In smaller drilling rigs, drilling stops every 10 m for the same purpose. During this period, stationary measurements are applied as observations updates to the INS. The first stationary update is the Zero velocity Update (ZUPT). In reality, the drill string is stationary; any velocity output of the inertial surveying system is accelerometer bias errors. This information is fed into the Kalman filter in order to estimate and remove the velocity errors. The design matrix H k of the observations update equation is expressed in Eq. 23, while the observation vector Z k is expressed in Eq. 24: k 3 3 3 3 3 3 3 3 1 0 0 Drill string heading observations are obtained from a magnetometer triad that is able to provide heading observations only while the drill string is stationary (ψ update ). The magnetic heading is referenced to the magnetic north and the gyroscope heading is referenced to the true north, therefore, the magnetic heading has first to be corrected to reference to the true north before it is compared to the heading derived from the gyroscope. This is done by applying a magnetic declination correction to the magnetic heading. The magnetic declination is defined as the angle between the true and magnetic north as measured from the true north. Its value depends on the location and time of applying the correction; the correction is usually obtained from the British Geological survey global Geo-Magnetic (BGGM) Model.
The heading observation after referencing to the true north ψ update is used as a direct observation update in Kalman filtering to estimate the random errors in the measurement of the inertial derived heading ψ INS . The relationship between the observation vector Z k and the error state vector X k are contained within the design matrix H k as: In addition to utilizing the heading observation as a direct update, it is utilized along with the inclination of the drill string during the stationary period to compute the position coordinates of the drill string in a manner similar to the continuous MCM position update. However, during stationary periods whenever the drilling stops for addition of a new pipe stand, the MCM position (φ update λ update h update ) is computed. The design matrix H k that conveys the relationship between the observation vector Z k and the error state vector X k is: The Kalman filter performs an estimation of the random errors contaminating the inertial sensor measurements (ElGizawy, 2009). This in turn enhances the performance of the surveying system while stationary and before commencing the drilling after the connection. For updates, the MCM position, ZUPT and heading while stationary, the observation vector Z k and update expression are presented as follows:    The external observations random noise vector V k includes the uncertainty in the MCM position, ZUPT and heading updates.

Setup of soft and hard formation drilling tests:
INS based directional drilling surveying systems were conducted in a laboratory environment to simulate drilled well trajectories through hard (slow drilling) and soft (faster drilling) formations. Tests were conducted at the Royal Military College of Canada in Kingston, Ontario, Canada. The test setup is illustrated in Fig. 5, where the inertial measurement unit is mounted on the three-axis positioning and rate turn table mode l 2103HT (Ideal Aerosmith, 2006). The rotation table provides accurate rotation around inner, middle and outer axes. This produces changes in toolface, inclination and heading of the drill string and thus provides the desired simulated trajectory. The rotation table was controlled through a profile mode, where it was programmed with specific rotation rates around the three axes of the rotation table. The start of the test with the drill string in the vertical position is shown in Fig. 5a. Figure 5b illustrates the rotation table at an orientation equivalent to drill string in an inclined section of the well. The end of the trip at the high inclined and horizontal sections of the well is demonstrated by the rate table in the orientation shown in Fig. 5c. Two tests were conducted with two different trajectory profiles to simulate drilling through soft and hard formations. The two tests differed mainly on the middle axis rotation rate which represents the inclination angle build up rate. It was chosen to be 0.1°/s for the first (soft formation) test and 0.01°/s for the second (hard formation) test. The inclination changed from 0-90° for both tests.
In the first test a drilling inclination build up rate of 0.1°/s was applied, suitable for soft formation drilling. The first test began with a 10 min stationary period that corresponds to the required time to make a drill string connection. The rate table was programmed to perform change in the inclination angle from 0-9° by performing rotation at a rate of 0.1°/s before staying stationary for 10 min. In practice, stationary intervals are used to connect new drilling pipes. To explore the system's long-term performance, we rotated the rate table so that it would go from 90-0° inclination and stay stationary for another 10 min. The above procedure was repeated one more time giving a total of 4 trips between 0 and 90°.
During each of the above trips, rotations along the inner axis of the rate table were performed in order to simulate changes in the toolface angle. The rotation rate was set at 1°/s and the toolface angle was set to change 30° in 30 sec then rotate back to the initial toolface angle in another 30 sec. The toolface angle kept fluctuating with 30o intervals during the change of the inclination angle from 0-90° and back to 0°.
In a similar manner, the rotation rate of the outer axis which represents the azimuth of the drill string was set to 1 o /s, where the azimuth experienced a similar fluctuating motion, but with 75° intervals. From the initial azimuth angle, the azimuth changed 75° to the right in 75 sec, then changed back to the initial azimuth angle in another 75 sec. Figure 6 demonstrates the rotation rates along the middle, inner and outer axes of the rate table. The upper panel presents the rotation rate of the middle axis. The middle panel shows the rotation rate of the outer axis and the lower panel demonstrates the rotation rate of the inner axis.
The second test was conducted with a drilling inclination build up rate of 0.01°/s. This was slower than the first test and more suitable for hard formation drilling. The rotation rate of the middle axis was set to 0.01°/s. At this rotation rate, a period of 2.5 h was required to drill from an inclination angle 0° to inclination angle of 90°. The rotation profile stopped for a period of 10 min corresponding to the time of installing a new connection to the drill pipe, then continued in the reverse direction until the inclination angle was again 0°. The outer and inner axes were changed in a manner similar to the first test throughout the entire trip. The rotation rate of the middle, outer and inner axes are presented in Fig. 7. The total time of the second test was 5.5 h.

Inertial sensors used for the experiments:
The inertial sensors used for this research are from the MEMS grade Crossbow IMU300CC, while the reference solution to asses the proposed technique is based on the Honeywell HG1700 AG11 tactical grade IMU. Table 1 summarizes the physical and operating characteristics of each of the sensors. The Crossbow IMU is a six degree of freedom inertial system that uses solid state devices to measure angular rate and linear acceleration. The three angular rate sensors are bulk micro-machined vibratory MEMS sensors that make use of Coriolis force to measure angular rate independent of acceleration (Bernstein, 2003). The three accelerometers are surface micro-machined silicon devices that employ differential capacitance to sense acceleration.
The reference position, velocity and attitude were extracted from the Honeywell HG1700 AG11 IMU installed inside the NovAtel (2008) Synchronized Position Attitude and Navigation (SPAN) system. The SPAN system was mounted on the rotation table top and ran throughout the same trajectory profiles for the two tests in order to provide an accurate reference to the Crossbow IMU. The NovAtel SPAN system integrates a GPS receiver and the HG1700 Honeywell IMU. The SPAN unit provides the position, velocity and attitude based on a tightly coupled INS/GPS integration solution. The HG1700 IMU was mounted on the table top while the GPS antenna was mounted on the roof of the laboratory building.

Analysis of test results for soft formation drilling:
The first test simulated drilling through a soft formation with a relatively faster inclination build up rate. Position, velocity and attitude information was extracted from the measurements after they were processed through INS mechanizations and Kalman filtering and the results were analyzed. The position and attitude results are presented in results.

RESULTS
North, East and vertical positions and position errors of the drill bit throughout the drilling test, are presented in two different scenarios. Additionally, a proposed solution is presented in order to limit the position error growth during periods of telemetry interruption.

Drilling with continuous updates and no telemetry interruption:
During the first scenario, the inertial sensor measurements were processed through the Kalman filter with continuous uninterrupted updates of drill bit rate of penetration and MCM position. North, east and altitude positions derived by the Kalman filter during the drilling test were compared to the reference positions as shown in the upper panels of Fig. 8-10, respectively, while the lower panels of Fig. 8-10 present the observed position errors during the test. Maximum errors of 0.24, 0.72 and 0.36 m were observed over the entire drilling tests along the north, east and altitude directions, respectively. The reference position was obtained from the tightly coupled INS/GPS integration solution provided by the SPAN unit. Although the utilized rotation table provides only rotation motions around its three axes, the rotation table top (where the sensors were mounted) exhibited a position displacement from the initial position. The relatively low values of the position errors are due to the continuous updates of the computed MCM position. Slow drilling along a predetermined well path had the advantage of providing good external position updates that limit the growth of position error components during drilling and provided RMS values of north, east and altitude position errors of 0.012, 0.05 and 0.14 m, respectively.

Drilling with continuous updates Except during telemetry interruption periods:
The second scenario is similar to the previous one, but it contains some periods of interruption of the continuous updates. These periods of interruptions can exist in actual drilling processes due to telemetry problems between the downhole equipment and the surface control station. These interruptions prevent the INS from being continuously updated with external measurements by the Kalman filter. Twelve telemetry interruption periods were introduced during drilling for a period of 60 sec each. The observed position error in north (upper panel), east (middle panel) and altitude (lower panel) directions are presented in Fig. 11. Limiting position error growth during telemetry interruption: A slow drill bit rate of penetration limits position error growth at periods of telemetry interruption. To further reduce position error growth, zero integrated velocity and position error drift at periods of telemetry interruptions is proposed. In this technique, the velocity and position of the drill bit along the entire interruption period are fixed at the last velocity and position reading before the interruption. This significantly improved the north, east and altitude position errors during periods of telemetry interruption as shown in Fig. 12-14, respectively.  Attitudes results: Drill bit inclination and toolface results analysis the reference 3-axis rotation table of the inclination angle is presented in the upper panel of Fig. 15 and compared to the KF inclination angle during the entire drilling test. The lower panel of Fig. 15 depicts the observed error of the KF inclination angle. Similarly, the KF output toolface angle is compared to the reference drill bit toolface angle as shown in the upper panel of Fig. 16; the observed error of the KF toolface angle is shown in the lower panel of Fig. 16. Although there is a continuous velocity update available from the drill bit rate of penetration, which should influence inclination and toolface angle accuracies, the slow penetration rates limited the effects of velocity updates on the attitude errors. Consequently, the inclination and toolface angle accuracies deteriorate in the long term ( Fig. 15 and 16). We also noticed that such effects were stronger when the drill bit was in vertical or near vertical sections of the well (small inclination angles). Over the entire test period, the inclination angle error RMS value was 14° while the toolface angle error had a RMS value of 21°. Such accuracy levels are not acceptable and other methods should be considered for the computation of both inclination and toolface angles.
Synthetic drill bit inclination angle and toolface angle: Synthetic inclination and toolface angles are proposed in order to overcome the deterioration in accuracies of the KF drill bit inclination and toolface angles in vertical or near vertical sections of the well. The synthetic angles are based entirely on accelerometer measurements and are derived using Eq. 17 and 18. They are only valid at slow speed applications such as the one discussed in this dissertation. Synthetic pitch angles compared to the 3axes table reference pitch angle and the KF derived angle are presented in the upper panel of Fig. 17, while the lower panel of this Fig. 17 presents the synthetic pitch angle error that did not exceed a RMS value of 0.19°. Figure 18 presents similar plots for the toolface angles with an observed RMS value of 0.69°. Figure 17 and 18 show that significant accuracy improvement of inclination and toolface angles was achieved by utilizing the synthetic angles technique.

Analysis of azimuth angle results:
Values for KF azimuth angles during the soft formation drilling test are presented in Fig. 19 and compared to the reference azimuth angle in the upper panel; azimuth angle errors are shown in the lower panel. Continuous updates for the drill bit rate of penetration and the MCM position were applied to the Kalman filter. The observed RMS value of the azimuth errors was 55° with a maximum error of 126° It is believed that the main source of this large azimuth error was the relatively large scale factor of MEMS gyroscope errors.
In the experiment conducted here, significant rotations around the tool spin axes were simulated. Such large values of rotation rates modulated the scale factor errors of the MEMS gyroscopes and led to large azimuth errors. The azimuth accuracy can be improved by applying external stationary heading updates as explained as follows.
The sharp spikes around 2000 and 5000 sec noted in Fig. 19 occur in the transition periods from stationary to drill-ahead modes. Improper denoising in these transition periods may be the reason for this undesirable behavior. Stationary azimuth angle updates: When the drill string is stopped to add new pipe stands, heading stationary information can be obtained from installed magnetometers inside the drilling probe. The measured magnetic azimuth is converted to the true azimuth and applied as heading updates during stationary periods. In Fig. 20, the KF azimuth with applied stationary heading updates is compared to the reference azimuth (upper panel); the azimuth error is presented in the lower panel of Fig. 20. It can be seen in the Fig. 20 that the azimuth error increases between the heading update stations prior to resetting at the commencement of each update station. The observed azimuth error during the first drilling period reached a maximum of 36°, then decreased to 0.06° due to the stationary heading update. The maximum azimuth error during the second drilling trip was 35° before it was reduced to 0.052° when stationary heading updates were applied; similar behavior is true for the rest of the test. Over the entire drilling test, the observed azimuth RMS value was 15°.

Analysis of test results from hard formation drilling:
Drilling in a hard formation is slower than drilling in a soft formation. Thus, the hard formation test was conducted with a slower drilling inclination build-up rate, where the rotation rate of the middle axis was set to 0.01°/s. This translates to a change of inclination from 0-90° over a period of 9000s (2.5 h). This test included two trips for a period of 5 h with a 10 min stationary period in between trips in order to connect a new drill pipe stand. The outer and inner axes were changed in a manner similar manner to the first test throughout the entire trip. Rotation rates of the middle, outer and inner axes are presented in Fig. 7. Procedures in the hard formation test were similar to those of the soft formation test. Position, velocity and attitude of the drill bit were similar in both tests. This confirms the consistency of the developed drilling navigation algorithm. Position and attitude measurements for the hard formation test are presented in the following discussion.
Continuous updates of the MCM position and the continuous drill bit rate of penetration were applied while drilling except at periods of telemetry interruptions. Sixteen interruptions of 60 sec each were introduced during this drilling test. A zero integrated velocity and position error drift at periods of telemetry interruptions was applied, where the velocity and position of the drill bit along the entire interruption period were fixed as the last velocity and position reading before the interruption. A summary of position, velocity and attitude results of the hard formation test is provided as follows:  The maximum observed position errors during telemetry interruption periods was 2.73, 6.32 and 5.02 m for north, east and vertical directions, respectively. RMS position errors over the entire drilling process were 0.18, 0.29 and 0.26 m along the north, east and vertical directions, respectively.
Attitude results: Synthetic inclination and toolface angles were used to overcome accuracy deterioration of the KF drill bit inclination and toolface angles in vertical or near vertical directions. The advantages of this method are discussed later. Synthetic pitch angles used during this test were compared to reference and KF derived angles in the upper panel of Fig. 24. The lower panel of Fig. 25 depicts the error in the pitch angle-a RMS pitch error of 0.11° was observed. Synthetic toolface angles are presented in the upper panel of Fig. 25 where they are compared to reference and KF toolface angles; the observed synthetic toolface errors are shown in the lower panel of Fig. 25. The observed RMS toolface error was 0.30° during the entire drilling period. The KF azimuth is compared to the reference azimuth and presented in the upper panel of Fig. 26, while azimuth error is presented in the lower panel. Stationary heading updates were applied when drilling was stopped to add a new pipe stand. Drilling was stopped for 10 min after the first trip at time 9400 sec. Continuous MCM position and drill bit rate of penetration updates were available and utilized in the Kalman filter. The observed RMS azimuth error was 11° during drilling. The observed azimuth error during the first drilling period reached a maximum 28° then decreased to 0.6° due to the stationary heading update. The maximum azimuth error during the second drilling trip was 35.5°.

DISCUSSION
The continuous surveying of a well trajectory while drilling is a highly desirable application in the oil and gas drilling industry. This was difficult to achieve due to two limitations: The size of gyroscopes prevents their installation inside the drilling housing and the current directional drilling technology relies only on magnetometer and accelerometer measurements at stationary surveying stations. This study s describes the development of a continuous borehole surveying system based on a complete low cost MEMS INS package.
A novel update scheme based on Kalman filtering was developed integrating INS measurements with external drilling parameter updates. The continuous drill bit rate of penetration and MCM position were applied as external measurement updates while drilling. Moreover, stationary updates of ZUPT, MCM position and a magnetometer heading were applied to the Kalman filter when drilling was stopped so a new drill pipe stand could be connected.
Two experiments simulating the drilling through soft and hard for were conducted. The two tests differ in the build up rate of the inclination angle. The inclination build up rate was 0.1°/s while drilling in a soft formation and a slower rate of 0.01°/s while drilling in a hard formation. The first test extended for a period of approximately two h with an achieved position accuracy of 0.24, 0.72 and 0.36 m along the drill bit North, East and vertical directions, respectively. The second test was run for over 5 h and had a maximum position error of 0.25, 1.2 and 0.41 m in North, East and vertical directions, respectively. It should be noted that this particular analysis/results is valid only for the class of the utilized inertial hardware and the defined test parameters. More analysis is required for other inertial sensors and inclination build up rates in order to generalize the results.

Limiting errors at telemetry interruption periods:
A telemetry interruption is a period when a communication problem prevents transferring of the external measurements updates to the Kalman filter. The position components of error begin to grow if there is a telemetry interruption of the continuous drill bit rate of penetration and MCM position updates; these errors continue to grow until continuous updates become available again. To reduce position error growth, zero integrated velocity and position error drift at periods of telemetry interruption was proposed. In this technique, the velocity and position of the drill bit along the entire interruption period are fixed at the last velocity and position reading before the interruption. This significantly reduced the magnitude of errors during periods of telemetry interruption. Synthetic attitude angles: Synthetic inclination and toolface angles based on accelerometer measurements were established in this study by making a use of the slow drilling operation. Improvements of 75 times for drill bit inclination angle and 30 times for toolface angle were achieved by utilizing the synthetic angles technique. The advantage of the synthetic inclination and toolface angles is their dependence only on accelerometer measurements. Accelerometer measurements are more stable and exhibit less error drift than gyroscope measurements.

CONCLUSION
This study investigated the potential of low cost MEMS inertial sensors as a borehole surveying system for oil and gas directional drilling applications. Such a system can be miniaturized on the electronic chassis inside an MWD tool or inside an RSS electronic section. This study validated and qualified the MEMS INS for drilling applications where the hostile drilling environment is a limiting factor to most commercially available inertial navigation systems. A method utilizing a complete MEMS-based INS was employed to continuously survey a well trajectory while drilling. The MEMS sensor measurements were processed through Kalman filtering and unique external aiding measurements while drilling. The performance of the surveying technique was enhanced during periods of telemetry interruptions of continuous update measurements. This was achieved by employing the proposed zero integrated velocity and position error drift. Finally, the inclination and toolface accuracies of the drill bit were improved by using synthetic inclination and toolface angles based entirely on accelerometer measurements.