Abstract

When the typically utilized method for detecting the drilling conditions of high-temperature geothermal wells is applied, the detection takes a long time, the detection results are inconsistent with the actual conditions, and there are problems such as low detection efficiency and large detection deviation. Therefore, a method for detecting the drilling conditions of high-temperature geothermal wells described by a unit quaternion is proposed. Based on quaternion theory, the quaternion model of the position and attitude is constructed to obtain the drilling attitude. According to the analysis results and the basic principle of kernel principal component analysis, a model is built to realize the detection of high-temperature geothermal well drilling conditions. The experimental results show that in many iterations, the time required is stable and lower than that of other comparison methods, and the detection errors are all lower than 10%. The proposed method has high detection efficiency and low detection errors.

1. Introduction

Minerals and petroleum are strategic resources that have great importance in terms of the national economy and people’s livelihood. However, the use of fossil energy has been restricted due to carbon emissions in recent years, and countries are starting to develop clean energy; thus, the development of geothermal clean energy by China is inevitable [1]. Drilling is the basic means for developing geothermal resources, but there are high risks involved [2]. These risks may come from accidents and anomalies during drilling or cause financial loss due to the absence of oil and gas underground or failure to drill into high-quality thermal reservoirs. These risks may cause large economic waste and affect drilling efficiency [3]. This scenario demands higher requirements on drilling technology with the development of high-temperature geothermal resources in China [4]. The detection of the drilling conditions of high-temperature geothermal wells is necessary to alleviate the difficulties in drilling directional wells and complex geological conditions. There are problems such as low detection efficiency and large detection error in the present detection method for determining the drilling conditions of high-temperature geothermal wells; thus, the drilling condition detection method for high-temperature thermal wells is studied.

Yin et al. [5] proposed a drilling condition detection method based on underground measurements. It collects real-time attitude data underground by a data logger, analyzes vibration signals and counts dimensionless indicators, selects margin indicators and kurtosis indicators, and detects the drilling conditions for high-temperature thermal wells by these indicators. The results obtained by this method are not consistent with the actual results, and large detection error arises. Zhang et al. [6] proposed a drilling condition detection method based on KSFDA-SVDD. This method maps the data into high-dimensional space from the original space, calculates the discriminant matrix and reduces the dimensions, and realizes drilling condition detection by SVDD. This method, however, is hindered by the long time required to calculate the discriminant matrix and its low detection efficiency. Gao et al. [7] proposed a drilling condition detection method based on ANSYS. This method establishes a longitudinal free vibration model, calculates the natural frequency of the longitudinal vibration in drilling, analyzes the drilling system by the ANSYS finite element analysis software, and obtains the variation characteristics of drilling under different depth conditions to realize the detection of drilling conditions. This method, however, also requires a long time to realize detection and leads to low efficiency.

To solve the problems listed above, a unit quaternion description method for detecting high-temperature geothermal well drilling conditions is proposed. The innovation of this method is that it is based on the updated location data and attitude data of the drilling system, analyzes the drill string forces, lays the foundation for the drilling condition detection of high-temperature geothermal wells, establishes the drilling condition detection method for high-temperature geothermal wells on the basis of the stress analysis results of drill strings, measures the deviations between the statistical model and the measured sample, reflects the changes in the monitoring data in residual space, and realizes the dynamic detection of the drilling conditions in high-temperature geothermal wells.

2. Force Analysis

The core of the drilling system is its ability to update the location data and attitude data of the drilling system. Moreover, the position attitude quaternion model is constructed by quaternion theory, the attitude information and position information are obtained, the frequency response information of the position data and attitude data is denoised by the quaternion transfer rate function, and a quaternion signal model of the drilling system is formed. The updated quaternion differential equations are as follows:

In the formula above, represents the attitude quaternion of the drilling system; represents the vector; represents the quaternion form corresponding to ; represents the angular velocity obtained by the gyroscope; represents the attitude matrix; , , and represent the velocity components that correspond to the east, north, and sky directions in the navigation coordinate system, respectively; represents the height above sea level; represents the radius of curvature corresponding to the system location; represents the Earth meridian corresponding to the location of the system; and ⊗ represents the quaternion prescribed form of operation; that is, from the direction opposite the axis of rotation, the counterclockwise angle is positive to judge the coordinate point.

The position data and attitude data of the system are obtained by the attitude quaternion based on the quaternion operation rule [8].

2.1. Force Analysis of Drill String

The stress of the drill string is complicated, involving extrusion, axial tension, a centrifugal force, a bending moment, and torque. The stress of different parts of the drill string is different in different states [9, 10].

The axial force of the drill string is usually the pressure produced by the drilling pressure, the buoyancy of the drilling fluid, and the pressure produced by the weight of the iron column [11, 12]. In addition, the frictional resistance between the drill string and the wall of the well and the drilling fluid during drilling, the pressure exerted on the wellbore and the wellbore of the drilling fluid circuit, and the change in the speed of the wellbore only during the tripping process will cause additional axial load.

During tripping, the dynamic longitudinal load generates instantaneous alternating voltage and compression voltage in the drill ring due to the change of the lifting speed of the drilling rig, which is related to the operation of the drilling rig. The tensile force corresponding to any section of the drill string in the vertical hole suspension can be calculated by the following formula:

In the formula above, represents the gravity of the drill string; represents the length of the drill string below the section; represents the gravity of the drill collar; represents the length corresponding to the drill collar.

When the borehole is filled with drilling fluid, the drill string is subjected to drilling fluid pressure and self-weight [13], as shown in Figure 1.

In Figure 1, (1) in order to prevent the drill tool from breaking and falling off, it is necessary to carry out strict inspection on the drill tool during deep hole drilling. Therefore, this fixture can be used to carefully check the drilling tool when drilling the second shift every day. The main content of the inspection is the wear resistance, camber of the drilling tool, and the tightness of the threaded joint. Nonstandard drilling tools cannot be run into the hole. (2) Suppose the drill bit diameter is 50 mm, made of platinum, and the tension and torque of the  mm drill collar locking joint are designed to be within the range of kilometers. Considering that the rock formations of different depths in the well have different characteristics, it is possible to select different drill bits according to the characteristics of different rock formations. In order to ensure the consistent cutting edge of the drill bit, it is necessary to always pay attention to the wear of the drill bit during the process of deep hole drilling. It can also ensure that the drilling efficiency at the bottom of the hole is improved. In order to prevent accidents during deep hole drilling, it is stipulated that when the deep hole is 0 ~ 1000 m, and the locking joint can be used by tightening one and a half buttons. When the drilling depth is 1000-1600 m, there must be more than two buttons; otherwise, the joint must be replaced. Half-vehicle drilling: in order to prevent abnormal phenomena in drilling, reduce drilling speed, and damage drilling tools, deep holes can be drilled by half-vehicle. The handles and linkage handles of the switch cabinet must be supervised by someone. If the drill pipe is found to stop rotating in the hole, it should be hoisted and not forced to drill in to prevent breakage.

It is found that the influence of hydrostatic pressure and drilling fluid buoyancy on the lateral extrusion of the longitudinal force of the drill string is equivalent to reducing the line weight of the drill string. Using the coefficient to describe the degree of mitigation, the formula is as follows:

In the formula above, represents the steel density of the drill string, and represents the density of the drilling fluid.

In addition to improper operation, the main problem of sand shale hole turning and jamming of drilling tools that often occur in deep hole drilling is the uniformity of the mud force. Therefore, the squeeze effect of the horizontal hydrostatic pressure and drilling fluid buoyancy is analyzed: (1)Checkout and adjust the mud performance. In order to make mud performance more suitable for drilling rock formations, inspection is performed every shift. The test content includes mud viscosity, relative density, sand content, and water loss rate. If the mud performance is unqualified, it should be adjusted immediately to keep the mud marsh funnel viscosity between 22.0 s and 25.0 s, the relative density between 1.1 and 1.5, the sand content not more than 5.0%, and the water loss rate not more than5.0 mg/l(2)The thickness of the covering soil layer is initially set as 800 m to1500 m, the mud marsh funnel viscosity is 22.0 s to 30.0 s, the relative density is 1.12 to 1.15, the sand content is not more than 3.0%, the water loss is not more than 3.0 mg/l, the hole depth is 1600 m to 3000 m, the mud marsh funnel viscosity is 35 s to 35 s, the relative density is 1.13 to 1.15, and the sand content is not more than 3.0%.(3)When lifting the drilling tool, in order to maintain the pressure balance of the borehole wall, mud must be injected into the borehole to protect the borehole wall. In this way, a certain pressure can be maintained in the hole, collapse and block collapse can be prevented, and the mud quality can be ensured

The axial tension at the cross section of any drill string is obtained by considering the lateral extrusion action of hydrostatic pressure and the buoyancy of the drilling fluid:

The axial tension of a drill string section under normal drilling conditions is

In the formula above, is the drilling pressure.

The neutral point describes the point where the axial force on the drill string is zero. Let us describe as the location of the neutral point. The formula is as follows:

Assuming is the actual length of the drill collar, the formula is as follows:

In the formula, represents the safety coefficient.

The friction of the drilling fluid and casing wall is , and is the dynamic load generated for lowering or raising the speed. The formula is as follows:

In the formula, is the velocity of down or up; is the acceleration due to gravity; is the duration of deceleration or acceleration; the effect on the drilling speed is shown in Figure 2.

Considering the friction and dynamic load , the axial force in any drill string section is obtained:

2.2. Force of Drill String Acting on the Shaft Wall

Under the influence of a distributed load, the force acting on the shaft wall is as follows:

In the formula, is the radius of the borehole curvature; is the concentrated load on the drill string; is the average coefficient of the distributed load; is the strength of the drill string.

The field-measured coefficient is introduced into the upper formula to obtain the lower formula:

It is found that the load on the drill bit is usually composed of dynamic load and static load , the formula of which is as follows:

The dynamic coefficient is set to describe the dynamic component of the drill string operation. The expression is as follows:

The drilling pressure , considering high frequency and low frequency, can be calculated by the following formula:

In the formula above, is the high-frequency amplitude; is the rotating frequency of the drill string at the bottom hole; is the low-frequency amplitude; is the rotating frequency of the tooth wheel.

In practice, compared with the formula, we can see that the force produced by the drill string on the shaft wall is less affected by the high-frequency vibration; thus, it is necessary to consider only the low-frequency vibration [14]:

2.3. The Influence of In Situ Stress and Drilling Fluid Column Pressure on the Stress Distribution of the Surrounding Rock of the Wellbore Wall

In view of the complex working conditions in the depth of the formation, this article first needs to make certain assumptions: assuming that the formation is a homogeneous macroanisotropic elastic body, and assuming that its bedding surface is horizontal, the force problem of the wellbore can be simplified to a plane strain problem to study [15, 16].

According to the actual force state of the wellbore, that is, the boundary conditions of the wellbore, this paper derives the stress equation of the surrounding rock of the wellbore on the basis of elastic mechanics theory. Firstly, the polar coordinate system is established, and the related basic mechanical equations of the surrounding rock of the shaft wall are derived and sorted out on the basis of the polar coordinate system.

Equilibrum differential equation is as follows:

In the formula, is the tangential stress, is the radial stress, is the shear stress, is the tangential volume force, is the radial volume force, is the distance from a point on the wall to the axis of the borehole, and is the angle between the line connecting a point on the wall of the borehole with the axis of the borehole and the direction of the maximum horizontal ground stress.

By balancing the actual stress of the surrounding rock, it can be known that the drill wall will change again when the load on the drilling site is drilled. The diffusion range is limited, and the ground stress is only redistributed in a certain area in the center of the borehole. Outside this area, the ground stress will obtain an initial balance of tension before drilling; so, there is no tension concentration in this area.

Since the rock formation is actually composed of rock skeletons, it is necessary to analyze the pore pressure in the rock because there are pores between the rock skeletons. If the pore pressure is considered comprehensively, the voltage distribution around the borehole can be obtained.

2.4. Influencing Factors of Borehole Stability

In the process of conventional drilling, there will be many formations, and these formations will lead to various structures. At the same time, influencing factors such as high temperature and high pressure of the rocks in deep formations can easily lead to borehole failure. Therefore, the factors that cause borehole instability can be summarized as natural factors and human factors.

2.4.1. Natural Factors

For geothermal wells, the underlying factors can be summarized as in situ stress factors and temperature factors, and geothermal factors are also included. Different layers and cracks: if there are cracks in the local formation, the drilling fluid will penetrate the rock and have a certain influence on the cohesion and internal friction angle of the rock. Due to hydraulic action, formation cracks gradually expand, and drilling fluid and rock have a certain hydration effect, which affects the time of rock properties, resulting in a decrease in the strength of the formation. These factors have a certain impact on the stability of the surrounding rock.

2.4.2. Human Factors

If the speed of the drill bit is too fast, pressure will be generated while drilling, thereby increasing the pressure in the well. If the pressure rises immediately, the stability of the wellbore will be severely impaired. If the formation fracture pressure is lower than the current pressure generated by the drill bit, a wellbore rupture will occur.

3. Drilling Condition Detection of High-Temperature Geothermal Well

When testing the drilling condition of a high-temperature geothermal well, the following items should be addressed first: (1)We should select clean water, foam, or air drilling fluid for the sand-carrying flow as much as possible, because most known geothermal wells are in environmentally sensitive areas, and the use of water-based drilling fluid or oil-based drilling fluid will greatly increase the related costs, which is not conducive to the development of economic benefits. To obtain clean geothermal resources with underground temperatures, the sand-carrying methods above should be selected. However, at the same time, the clean water drilling method may also increase the difficulties in pressure-stabilizing wellbores and protecting wellbores and increase the risk of complicated conditions under the well(2)To develop a moderately-high-temperature geothermal well efficiently and safely and to protect the formation and fluid from contamination, nearly balanced or underbalanced drilling technology should be selected, and the corresponding underbalanced drilling blowout preventer device should be matched(3)Before geothermal development, the temperature distribution should be studied; however, due to the high formation temperature and large amount of fluid returned from geothermal wells, it is difficult to understand the temperature distribution. For example, due to the large amount of return fluid and high lower resistance, electrical testing tools have difficulty arriving at the objective layer. Moreover, there is a large error between the electrical measured temperature and the real formation temperature. To ensure that the tool can enter, we must adopt the new high-density, thick-slurry pressure well operation. Finally, the actual measured temperature will be lower than expected due to the mixing of low-temperature fluid and high-temperature fluid, which further complicates the formulation of the later scheme. Therefore, transmission logging can be used without replacing the drilling fluid, and electric measuring instruments can be used under drill pipes or continuous oil pipes

To make the test more accurate, a gas-liquid separator should be prepared in the wellhead testing process and equipment after completion to measure the physical parameters of the gas-liquid, which will facilitate the collection of parameters and the development of plans in the future.

To obtain the relative position of the subject object and the aerial image, we can use the six external azimuth elements of each image that can be obtained directly or indirectly. The method of real-time acquisition of the external orientation elements by the Global Positioning System and the Internal Navigation System is a direct method that is easy to limit by high fluctuation of the accuracy and placing a high requirement on the equipment. It needs to reach a certain precision level if the higher-order term is abandoned and the lower-order term of the expansion series is selected, which leads to the problem of initial value selection. If the initial value cannot be known or is selected improperly, it will cause iterative nonconvergence. However, it is necessary to establish a certain correspondence first before using the quaternion, which is easy to calculate and has significant geometric significance, such as the point between the image point and the corresponding ground point, and then establish an important collinear theory in photogrammetry. This theory is based on the ideal relationship between the surface point, the projection center, and the corresponding image point in the same line, and its mathematical representation establishes the collinear conditional equation of the mathematical relations between the photography center, the image point, and the object point; that is, a one-to-one correspondence between the spatial coordinates of the image square and the object square is established. Using the collinear equation, which is less affected by the field and other factors, the external and internal azimuth elements can be observed in more detail, and the resolution of the near-Earth observation can be improved.

On the basis of the basic principle of core element analysis, the drilling condition detection model of a high-temperature geothermal well described by the unit quaternion is established according to the results of the drilling column force analysis, and the drilling condition detection of a high-temperature geothermal well is realized.

3.1. Basic Theory of Core Element Analysis

Kernel principal component analysis (KPCA) is a modeling method independent of process mechanism. It only needs to conduct statistical modeling through the information of process data and then use the model to realize process monitoring. Kernel principal component analysis (KPCA) is a nonlinear extension of principal component analysis (PCA). Its basic idea is to map the sample data from the input space to the high-dimensional function space by nonlinear transformation and then extract attributes from the high-dimensional function space by using PCA. Specific operation steps are as follows:

Step 1. get the data.

Step 2. subtract the mean. For PCA to work properly, the mean of the data must be subtracted, and the mean of the subtracted data is the average of each dimension.

Step 3. calculate the covariance matrix.

Step 4. calculate eigenvector and eigenvalue of covariance matrix. Since the covariance matrix is square, the eigenvectors and eigenvalues need to be calculated to obtain useful information of the data, in which the vector is the unit vector.

Step 5. select components to make up the pattern vector. In this step, data compression is used to reduce the dimension. In fact, the eigenvector of the maximum eigenvalue is the principal component of the data, and the eigenvector corresponding to the maximum eigenvalue is the vector through the middle of the data, which is the largest correlation between the data. After the eigenvectors are obtained, they are arranged according to the eigenvalues from the largest to the smallest, and the importance level of the components is given. After that, the eigenvectors are composed of pattern vectors, and an eigenvector with a small eigenvalue is ignored.

Step 6. get new data.

Select the components to be retained (feature vectors) to form a pattern vector, transpose it, and multiply it left by the transpose of the original data to get new data.

The covariance matrix corresponding to the mapping data is obtained by mapping the raw data in high-dimensional space by nonlinear mapping and setting the mean value to zero. The expressions are as follows:

The strict linearization formula of the collinear equation expressed by the unit quaternion matrix avoids frequent trigonometric function operations in the adjustment calculation. Let us assume that is the corresponding eigenvalue of , and that is the corresponding eigenvector of . The relationship between them is as follows:

Set correlation coefficients to describe eigenvectors :

Let us assume that represents the -dimensional matrix. By bringing the matrix into the upper form, we can obtain the lower form:

The problem of finding the matrix characteristic equation can be used to replace the nonlinear mapping problem through the above process.

3.2. Drilling Condition Detection of High-Temperature Geothermal Well

A lithological statistic of output fluid is established in the core principal element space, which is the sum of squares of the vector after standardized processing, reflecting the change [17] in the drilling condition monitoring data in the principal element space. The expression is as follows:

In the formula, represents the inverse matrix corresponding to the diagonal matrix composed of under high-temperature geothermal conditions, represents the significance level, and represents the confidence of the heat storage depth. These yield the control limits corresponding to .

Surface condition statistics are established in the residual space, the deviation between the statistical model and the measured sample is measured [1820], and the variation in the drilling fissure height data in residual space is reflected. is reconstructed in the feature space to obtain the expression of the surface condition statistics SPE:

Simplifying the formula above, we obtain

When the significance level of the surface condition statistics SPE is [21], the control limit obtained in the position attitude quaternion model is :

In the formula above, is the critical value of the normal distribution at the significance level [2224].

The drilling condition of a high-temperature geothermal well is then detected based on the calculated and .

The testing progress of the unit quaternion method for detecting high-temperature geothermal well drilling conditions is shown in Figure 3.

4. Result and Analysis

To confirm the overall effectiveness of the unit quaternion description method for detecting high-temperature geothermal well drilling conditions, a method for detecting the drilling conditions of high-temperature geothermal wells should be tested. The operating parameters are as shown in Table 1:

The database used in this test is access and BDE, and the testing platform used is Linux. The unit quaternion description method and the test methods were described [57] are used to detect the drilling conditions of high-temperature geothermal wells. The test results are shown in Figure 4.

According to the data shown in Figure 4, the detection time of the method of this paper is shorter than that of the other methods in multiple iterations. The drilling condition detection method of a high-temperature geothermal well under unit quaternion description constructs the position attitude quaternion model through quaternion theory, obtains the attitude information and position information of the system, and analyzes the drilling force. The detection time is shortened, and the detection efficiency of the drilling condition is improved.

In this design, the deviation degree between the statistical model and the measurement sample is measured. The measurement process reduces the model error. To verify the reduction degree, the degree of deviation between samples of different methods is compared, which is also called the detection error. The testing results are as follows.

According to Figure 5, the detection error in this method is less than 10% in many iterations. Compared with the unit quaternion description method and the method described in literature 5, 6, and 7, the method of this paper has a lower detection error because it establishes the drilling condition detection method of high-temperature geothermal wells based on core element analysis and confirms the effectiveness of drilling condition detection under unit quaternion description in high-temperature geothermal wells.

In the force analysis of the drill string in the drilling conditions of a high-temperature geothermal well, the mapping data reflect the change in monitoring data in the main element space, while the change degree of the monitoring data dynamically reflects the drilling condition of a high-temperature geothermal well. The unit quaternion description method and the test method were described [57] to test the dynamic change in the drilling conditions of high-temperature geothermal wells, that is, the number of dynamic components in the mapping data. The comparison is shown in Figure 6.

As shown in Figure 6, the number of dynamic components of this method has been kept between 70 and 80, higher than those of the other methods, mainly because the model measures the deviation between the statistical model and the measured samples in the kernel space. The square sum of the vectors after standardized treatment accurately reflects the change in the monitoring data, dynamically reflects the drilling conditions of high-temperature geothermal wells, and realizes the detection of the drilling conditions in high-temperature geothermal wells.

5. Conclusions

The continuous change in working conditions leads to different changes in the variables in the drilling process, and some uncertain factors easily cause accidents threatening safety. Therefore, it is necessary to detect the drilling conditions in high-temperature geothermal wells. A method for testing the drilling conditions of high-temperature geothermal wells under the unit quaternion description is proposed. If the set of quaternions is considered as a multidimensional real space, the quaternions represent a four-dimensional space. Compared with the complex number in two-dimensional space, a testing model for the drilling conditions of a high-temperature geothermal well can be constructed in a short time. Improving the detection efficiency and reducing the detection error ensure the safety of drilling engineering in high-temperature geothermal wells.

Data Availability

The data used to support the findings of this study are included within the manuscript.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

This work was financially supported by the National Science and Technology Major Program of China (2016ZX05047003-004). We thank the project for its support.