Real-Time Intelligent Recognition Method for Horizontal Well Marker Bed

,


Introduction
In the entire process of geosteering, comprehensive interpretation of geological information based on logging-whiledrilling data plays a vital role. Stratigraphic identification is realized through real-time strata correlation after determining the marker beds [1][2][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. is artificial method requires geologists with abundant experience and extensive knowledge to do a great deal of data calculation and analysis. e 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. e 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. e 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.

Establishment of Case Base for Marker Bed
e 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. is 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][10][11][12]. Figure 1 shows a schematic diagram of speech recognition. In this mode, the data of the words in the speech database are obvious.
However, the marker bed recognition based on CBR can be said to be an inverse use of this method. As shown in Figure 2, 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. e 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.
eoretically, 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. e 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. erefore, in this paper, natural gamma, deep resistivity, and shallow resistivity are used to verify the accuracy of the marker bed intelligent identification method. e representation of the case is shown in Table 1.

Similarity Calculation Method
e 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. e partial similarity is the similarity degree between two cases on the same feature parameter. e 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. erefore, 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 Figure 3, 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. en, 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. erefore, 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.
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][14][15][16][17]. e 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.
is characteristic is consistent with the principle of artificially contrasting the marker bed in the geosteering.
Suppose there are two depth sequences Q � (q 1 , q 2 , . . . , q n ) and C � (c 1 , c 2 , . . . , c n ), 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 d(q i , c j ) � (q i − c j ) 2 between data object points of different depth sequences. is matrix is called the distance matrix D of depth sequences Q and C: In the distance matrix D, a set of consecutive matrix elements defining the similarity relation of the depth sequence is called the warping path W � (w 1 , w 2 , . . . , w k ). e 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, (q a , c b ), then for the next point w k � d(q a′ , c b′ ) 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: if w k −1 � d(q a , c b ), then for the next point w k � d(q a′ , c b′ ) of the path, a ′ − a ≥ 0 and b ′ − b ≥ 0 needs to be satisfied, which limits the point in W to be monotonic with depth Combined 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 point d(q i , c j ), then the next optional points that can be passed are only d(q i+1 , c j ), d(q i , c j+1 ), and d(q i+1 , c j+1 ). Figure 4 shows a curved path in the distance matrix of curves Q and C.
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. e DTW algorithm is to find an optimal warping path that minimizes the distance of the two depth sequences. e shortest path between two segments is defined as Define a cumulative distance S(i, j), matching the two sequences Q and C from the point d(q 1 , c 1 ). Each time one new point is reached, the distance calculated by all previous points will be accumulated. At the endpoint d(q n , c m ), the cumulative distance is the total distance of the warping path, which is the similarity between the sequences Q and C. e cumulative distance S(i, j) is the sum of the distance d(q i , c j ) of the current grid point (i.e., the Euclidean distance of points q i and c j ) and the cumulative distance of the smallest neighbouring element that can reach this point. S(i, j) can be given as follows: e distance measurement results are inversely proportional to the similarity of the depth sequences. e greater the distance, the smaller the similarity between the sequences, and vice versa. erefore, the similarity between two segments of data is defined as

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 depth h 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. e specific steps are as follows: (1) Suppose that the vertical depth of the kickoff point (KOP) is H 0 , the deviated depth is h 0 , the deviation angle is α 0 , and H 0 � h 0 at the kickoff point. (2) Assume that A and B are adjacent points of the building up section, and their deviated depth and deviation angle are (h i , α i ) and (h i+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, (3) Take a small segment of dh on the AB section as a straight line, and its vertical distance dH is dH � dh · cos α. (6) erefore, the vertical thickness between A and B are e vertical depth H i+1 of B point can be obtained: 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 H i+1 can be calculated by combining the vertical depth H i of the upper point with the deviated depth and the deviation angle between the two points.
As shown in Figure 6, 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: TST � TVT · cos β. (9) where β is the formation dip. e correction formula for the true stratum thickness T i+1 can be obtained by combining equation (8) and (9): 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 Figure 7.
At first, the correlation marker bed of adjacent well J209 should be determined to establish the case base. ere 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 Figure 7, 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. erefore, a section of LWD data of a marker bed with a length of 11 m is obtained. en, 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. e shallow resistivity curve reflects the formation performance relatively weak. e weight of each parameter set manually is shown in Table 2.
Finally, 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. e 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 Figure 8, the similarity calculation results between the marker bed of Well J209 and the LWD curve of Well J208 are obtained. It can be seen from Figure 8 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. erefore, 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 Well trajectory Mathematical Problems in Engineering actual situation. Figure 7 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. e 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.
rough 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. erefore, 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.

Conclusions
(1) e 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. e similarity is calculated using the DTW algorithm, which has computational advantages in both stretching and bending of the curve. is 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. e 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.

Data Availability
e data used to support the findings of this study are included within the article.

Conflicts of Interest
e authors declare that they have no conflicts of interest.