# Real-Time Intelligent Recognition Method for Horizontal Well Marker Bed

Authors: Xuning Wu; Qian Li; Hu Yin; Zaoyuan Li; Jianhua Jiang; Menghan Si; Yangyang Zhang
Journal: Mathematical Problems in Engineering
 (2020)

---

## Abstract

The accurate identification of the horizontal well marker bed is to guarantee the soft landing of the well trajectory. With the intelligent development of the petroleum industry, it is feasible to apply computers to identify the marker bed automatically. In case-based reasoning technology, the data of well logging while drilling (LWD) as characteristic parameters are compared with those of adjacent well. By taking the depth sequence of LWD data as time series and using Dynamic Time Warping (DTW) similarity measure algorithm, the similarity index of each drilling depth is calculated corresponding to the marker bed in the adjacent well. The total similarity curve is obtained by giving different weights of different feature parameters. Selecting natural gamma, deep resistivity, and shallow resistivity LWD curves as characteristic parameters, two horizontal wells in JL block of Junggar basin are analysed by this method. The result of similarity curve indicates the location of the marker bed and the total similarity value reaches 78%. The research shows that the method based on case-based reasoning can identify the marker bed of the horizontal well accurately and effectively, assist the geologist to carry out formation correlation of multiple wells at the same time, reduce the cost of human labour force, and improve work efficiency.


---

## Body

## 1. Introduction

In the entire process of geosteering, comprehensive interpretation of geological information based on logging-while-drilling data plays a vital role. Stratigraphic identification is realized through real-time strata correlation after determining the marker beds [1–3]. At present, this method mainly depends on geologists to observe LWD curves and compare the microscopic characteristics of the curves artificially, so as to find out the location of the marker bed while drilling. This artificial method requires geologists with abundant experience and extensive knowledge to do a great deal of data calculation and analysis. The guidance software can improve the efficiency and accuracy of on-site analysis. At present, the research on intelligent stratigraphic comparison has some theoretical results.Pan et al. [4] used a combination of wavelet transform and Fourier transform to identify formation interfaces from the logging data, but its computational complexity was high. Wu et al. [5] established a support vector machine classification model based on logging data, but the real-time performance of formation classification and recognition needs to be improved. Gong et al. [6] used the string dynamic matching algorithm to realize the intelligent layering of logging curves and compared the curves by using the dynamic programming method. Most of the research studies are based on the complete logging curve of the drilling well and the identification of formation lags behind the bit position. However, the analysis of LWD data can reflect the formation of drill bit in real time. The identification process of marker bed is similar to that of case-based reasoning (CBR) [7, 8]. It is a process of solving the current new problem by using similar problems previously processed. The problem solved in the past is the establishment of the adjacent well contrast marker bed, and the new problem is the identification of the drilling well marker bed. For this reason, the idea of case-based reasoning can be introduced into the identification of the marker bed of horizontal wells, assisting the geosteering director to improve the accuracy and efficiency of formation identification.


## 2. Establishment of Case Base for Marker Bed

The conventional application of CBR technology is to calculate the similarity between the new problem and multiple cases in the case library to find the most similar one. This method is often used in the fields of medical diagnosis and language recognition, where the problem case and cases in the case library are known and fixed [9–12]. Figure 1 shows a schematic diagram of speech recognition. In this mode, the data of the words in the speech database are obvious.Figure 1
Schematic diagram of problem case and case library in speech recognition based on CBR.However, the marker bed recognition based on CBR can be said to be an inverse use of this method. As shown in Figure2, assuming that the thickness of the marker bed of an adjacent well is L, and this is taken as a problem case, the data segment of L length intercepted by each point on the LWD curve is the case base, and each new measurement point, a case is added to the case library. The similarity between the data of the adjacent well marker bed and the case corresponding to each well depth point in the case library is calculated on the curve value and the morphology. When the total similarity (TS) index exceeds 60%, the well depth point can be considered as the well drilling marker bed position.Figure 2
Schematic diagram of similarity calculation of drilling well LWD curve and adjacent well marker bed in marker bed recognition based on CBR.Theoretically, as long as the LWD curve used for similarity calculation has obvious contrast characteristics, and this characteristic can reflect the special formation lithology downhole, then the marker bed intelligent recognition method established in this paper can accurately identify the position of the marker bed. Due to the limited scope of data collection during the research process, onshore drilling sites usually only perform gamma and resistivity logging while drilling. The natural gamma curve has a very good effect when dividing the stratum and stratigraphic contrast, while the curve change characteristics of deep and shallow resistivity logging while drilling can be used for stratigraphic contrast. Therefore, in this paper, natural gamma, deep resistivity, and shallow resistivity are used to verify the accuracy of the marker bed intelligent identification method. The representation of the case is shown in Table1.Table 1
Case representation in the marker bed intelligent recognition method.
DepthNatural gammaDeep resistivityShallow resistivityh1GR1RD1RS1h2GR2RD2RS2…………hiGRiRDiRSi


## 3. Similarity Calculation Method

The marker bed recognition method for horizontal well based on CBR calculates the similarity between the problem case and the adjacent well on the characteristic parameters and identifies the marker bed by using the relevant information of the similar case in time. Considering the different effects of the characteristic parameters, the calculation is divided into partial similarity and total similarity. The partial similarity is the similarity degree between two cases on the same feature parameter. The total similarity is obtained by weighting each feature parameter and then calculating the total similarity of two cases by weighted average algorithm.Time series are data values that are sequentially recorded according to chronological order. When collecting LWD data, they are monotonically extended on the basis of depth, which is equivalent to the representation of time series. Therefore, the similarity search algorithm based on time series can be used when calculating the similarity between cases in the recognition problem of the marker bed. At present, many similarity search methods for time series have been researched, such as time series Fourier transform, wavelet transform, various segmentation calculations, and time series dimensionality reduction. In horizontal well drilling, the formation dip angle varies with depth, and the thickness of the marker bed may be varying in different wells.As shown in Figure3, suppose that curves one and two are the same logging-while-drilling curves of two wells. When calculating the similarity of the marker bed, in situation A, the traditional method is to calculate the Euclidean distance one by one from the depth of the well. Then, point a will correspond to point b’, and the calculated distance value will be too large. However, according to the shape of the curve, in the process of artificial cognition of the marker beds, points a and b are partial peaks, which should correspond to each other when calculating similarity. Therefore, when using a computer to calculate the similarity, the Euclidean distance should also be calculated according to the situation B where point a corresponds to point b, so that the similarity between the curves can be more truly reflected.Figure 3
Schematic diagram of calculating distance by DTW algorithm.In the intelligent recognition problem of the marker bed, the DTW algorithm with better applicability is introduced, which effectively solves the limitation of the Euclidean distance calculation method in terms of time axis expansion and curvature [13–17]. The DTW algorithm is based on the idea of dynamic programming to find the shortest path between two pieces of data, that is, the total distance (similarity) between the two pieces of LWD curves. As shown by situation B in Figure 3, the DTW algorithm can calculate the similarity of data segments of different lengths based on the extension and shortening of the time series. This characteristic is consistent with the principle of artificially contrasting the marker bed in the geosteering.Suppose there are two depth sequencesQ=q1,q2,…,qn and C=c1,c2,…,cn, whose data length is n and m. Generally, n is not equal to m. In order to match two depth sequences by DTW, a similarity matrix of n row and m column is defined in advance. Its elements are Euclidean distances dqi,cj=qi−cj2 between data object points of different depth sequences. This matrix is called the distance matrix D of depth sequences Q and C:(1)D=dqn,c1dqn,c2dqn−1,c1dqn−1,c2⋯dqn,cm⋯dqn−1,cm⋮⋮dq1,c1dq1,c2⋰⋮⋯dq1,cm.In the distance matrixD, a set of consecutive matrix elements defining the similarity relation of the depth sequence is called the warping path W=w1,w2,…,wk. The warping path must satisfy the following conditions:(1)
Boundary conditions: the warping path starts from the lower left corner of the total matrix and ends to the upper right corner, that is,w1=dq1,c1 and wk=dqn,cm(2)
Boundedness:maxn,m≤k≤n+m−1(3)
Continuity: ifwk−1=dqa,cb, then for the next point wk=dqa′,cb′ of the path, a′−a≤1 and b′−b≤1 must be satisfied, which is in order to ensure that every two elements on the warping path must be continuous and uninterrupted(4)
Monotonicity: ifwk−1=dqa,cb, then for the next point wk=dqa′,cb′ of the path, a′−a≥0 and b′−b≥0 needs to be satisfied, which limits the point in W to be monotonic with depthCombined with continuity and monotonicity, there are only three directions for the next path of each grid point. For example, if the warping path has passed through grid pointdqi,cj, then the next optional points that can be passed are only dqi+1,cj, dqi,cj+1, and dqi+1,cj+1. Figure 4 shows a curved path in the distance matrix of curves Q and C.Figure 4
Path graph for element selection of curved paths in distance matrix.Obviously, there are multiple paths satisfying the above constraints. Assuming that the cumulative distance of each warping path can be calculated, then the path with the minimum cumulative distance is the best path. The DTW algorithm is to find an optimal warping path that minimizes the distance of the two depth sequences. The shortest path between two segments is defined as(2)DTWQ,C=min1k∑i=1kwi.Define a cumulative distanceSi,j, matching the two sequences Q and C from the point dq1,c1. Each time one new point is reached, the distance calculated by all previous points will be accumulated. At the endpoint dqn,cm, the cumulative distance is the total distance of the warping path, which is the similarity between the sequences Q and C.The cumulative distanceSi,j is the sum of the distance dqi,cj of the current grid point (i.e., the Euclidean distance of points qi and cj) and the cumulative distance of the smallest neighbouring element that can reach this point. Si,j can be given as follows:(3)Si,j=dqi,cj+minSi−1,j−1,Si−1,j,Si,j−1.The distance measurement results are inversely proportional to the similarity of the depth sequences. The greater the distance, the smaller the similarity between the sequences, and vice versa. Therefore, the similarity between two segments of data is defined as(4)simQ,C=1−1kSn,m.


## 4. Example Calculation and Analysis

To calculate the similarity between cases, the true formation thickness needs to be corrected to reduce the effects of deviation angle and formation dip. When drilling in the building up section of a horizontal well, the deviated depthh obtained by LWD curves is obviously different from the vertical depth H [18, 19]. As shown in Figure 5, the vertical depth of each newly acquired measuring point needs to be corrected starting from the kickoff point. The specific steps are as follows:(1)
Suppose that the vertical depth of the kickoff point (KOP) isH0, the deviated depth is h0, the deviation angle is α0, and H0 = h0 at the kickoff point.(2)
Assume thatA and B are adjacent points of the building up section, and their deviated depth and deviation angle are (hi, αi) and (hi+1, αi+1). Let the change rate of the deviation angle α between the two points A and B be a constant, that is, dα/dh = C; then,(5)dαdh=αi+1−αihi+1−hi,dh=hi+1−hiαi+1−αidα.(3)
Take a small segment of dh on the AB section as a straight line, and its vertical distance dH is(6)dH=dh⋅cosα.Figure 5
Vertical correction for the building up section.Therefore, the vertical thickness betweenA and B are(7)Hi+1−Hi=∫hihi+1dH=hi+1−hiαi+1−αisinαi+1−sinαi.The vertical depthHi+1 of B point can be obtained:(8)Hi+1=hi+1−hiαi+1−αisinαi+1−sinαi+Hi.According to equation (8), the vertical depth of each subsequent measurement point can be calculated from the kickoff point. If the calculation does not start from the kickoff point, the value of Hi+1 can be calculated by combining the vertical depth Hi of the upper point with the deviated depth and the deviation angle between the two points.As shown in Figure6, when the formation dip is not equal to zero, the true vertical thickness (TVT) obtained by subtracting the vertical depth of the bottom from the top surface is obviously different from the true stratum thickness (TST). Assuming that the top and bottom surfaces of the formation are parallel or almost parallel, that is, the formation dips of the top and bottom surfaces of the strata are approximately the same, the true thickness of the formation can be corrected by the following equation:(9)TST=TVT⋅cosβ.where β is the formation dip. The correction formula for the true stratum thickness Ti+1 can be obtained by combining equation (8) and (9):(10)Ti+1=Hi+1⋅cosβ=hi+1−hiαi+1−αisinαi+1−sinαi+Hi⋅cosβ.Figure 6
Comparison of measure, vertical, and true stratum thickness at different formation dip angles.Taking the well J208 and the adjacent well J209 in the Jinlong 2 well area of the Junggar Basin as an example, after calculating the depth coordinates through true stratum thickness correction, the LWD curves of well J209 and well J208 are shown in Figure7.Figure 7
LWD curves of well J209 and well J208.At first, the correlation marker bed of adjacent well J209 should be determined to establish the case base. There are three principles for selecting the marker bed: (1) the selected stratum should have obvious physical and electrical characteristics; (2) the lateral distribution of the selected stratum should be relatively stable; (3) the characteristics of the selected stratum on the LWD curves should be relatively obvious. According to these three principles, the hard limestone layer in the upper part of the J209 well reservoir is selected as the marker bed. As shown in the red frame of well J209 in Figure7, the logging curve characteristics of this layer are as follows: the value of natural gamma is low, and the value of deep and shallow resistivity is high. Therefore, a section of LWD data of a marker bed with a length of 11 m is obtained.Then, the weight is determined according to the contribution rate of the three LWD curves in the formation comparison. In the LWD curves of well J209, the interfaces of natural gamma and deep resistivity curves are clear and the curves corresponding to the interfaces have obvious abrupt changes, which can better reflect the formation. The shallow resistivity curve reflects the formation performance relatively weak. The weight of each parameter set manually is shown in Table2.Table 2
Weight allocation table for each parameter.
ParameterGRRDRSWeight0.40.40.2Finally, when the forward drilling data are transmitted, a segment of 11 m in length is searched upward for the similarity calculation according to the depth of each data point. The similarity value is calculated according to the method established above. When the similarity calculation result is negative, it is set to zero. As shown in Figure8, the similarity calculation results between the marker bed of Well J209 and the LWD curve of Well J208 are obtained.Figure 8
Calculation results of the similarity between the parameters of well J208 and well J209.It can be seen from Figure8 that when the vertical depth is about 3920m or less, the calculation results of each parameter similarity are all negative, and there is no change after setting 0 value, which indicates that so far, no stratum similar to the marker bed of J209 has appeared. When the drilling depth is 3920 m, the calculation results of each parameter similarity appear positive and gradually increase, indicating that there may be a drilling marker bed. Until the drilling depth reaches 3921.5 m, the maximum value of the total similarity curve is 78%, and then it begins to decrease. Therefore, it is judged that when the drilling depth is 3921.5 m, the marker bed is drilled in a J208 horizontal well. When the drilling depth reaches 3943.75 m, the similarity curves of each parameter fluctuate again, and the total similarity value is 43%, indicating that the formation drilled here may be another formation that is similar to the marker bed of well J209.Finally, the results of the similarity calculation for marker bed intelligent recognition are compared with the actual situation. Figure7 shows the complete LWD curves of well J208. From the analysis of the curve values and morphology, it can be seen that when drilling to 3921.5 m, all the three curves have obvious wave interfaces. Cutting logging also shows that this location is a hard limestone formation. All these show that this is indeed the marker bed. The combination of these information can indicate that the location of 3921.5 m in the well J208 is indeed the marker bed. When drilling to 3943.75 m, the LWD curve showed the characteristics of another prominent stratum, but it was not the marker bed set by well J209 and only the curve characteristics were similar.Through the above analysis, the two characteristics in the actual LWD curves in well J208 have been significantly reflected in the results identified by the intelligent calculations in this study. It was identified as the location of the marker bed, which is in line with the actual situation. Therefore, the intelligent method established in this paper can accurately identify the marker bed of horizontal wells and improve the efficiency of marker bed recognition through rapid computer calculation.


## 5. Conclusions

(1)
The inverse application of case-based reasoning technology sets the LWD curves of the adjacent well marker bed as a problem case and continuously compares it with the LWD curves of drilling well. The similarity is calculated using the DTW algorithm, which has computational advantages in both stretching and bending of the curve. This method is consistent with the theory of artificially identifying the marker bed.(2)
Considering the depth sequence of LWD data as a time series, the DTW algorithm is used to intelligently identify the marker bed of the horizontal well. When the marker bed is drilled, the similarity curve has a sudden change, which can accurately and effectively identify the marker bed position, and provide a reliable basis for the subsequent adjustment of the wellbore trajectory.(3)
When establishing a marker bed case, those strata with significant changes should be selected. It is also possible to select multiple marker beds and establish different case data. The richer the cases, the more the marker beds can be identified, providing a basis for landing and steering of horizontal wells and improving the rate of drilling encounters.(4)
As the LWD curve also changes significantly when drilling into the reservoir, subsequent studies can build a case from the LWD data of the reservoir and use the method established in this paper to identify the reservoir.



---

*Source: 8583943-2020-06-17.xml*