An automatic well logging depth correction method based on correlation coefficient and dynamic time warping method

The automatic logging depth correction method based on correlation coefficient and dynamic time warping solves the problems of low automation and insufficient accuracy in oil logging depth correction, and achieves efficient and accurate logging curve correction, which is suitable for field operation and interpretation personnel.

CN117145457BActive Publication Date: 2026-06-09CHINA INST OF RADIO PROPAGATION

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA INST OF RADIO PROPAGATION
Filing Date
2023-07-21
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing methods for correcting oil well logging depth have low automation and high error rates, and existing commercial software has low efficiency and insufficient accuracy in its correction functions.

Method used

By employing a correlation coefficient and dynamic time warping method, two natural gamma curves are processed through resampling and normalization. Combined with a dual-window sliding mechanism, the correlation coefficient and dynamic time warping distance are calculated to filter out windows with poor quality, thereby achieving automatic depth correction.

Benefits of technology

It improves the automation and calibration accuracy of logging curves, solves the problems of inconsistent zero length and depth misalignment of curves from different wells, shortens the processing cycle, and improves work efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117145457B_ABST
    Figure CN117145457B_ABST
Patent Text Reader

Abstract

This invention discloses an automatic logging depth correction method based on correlation coefficient and dynamic time warping, comprising the following steps: Step 1, reading the benchmark natural gamma curve and the natural gamma curve to be corrected; Step 2, resampling the natural gamma curve to be corrected using the Akima method to make its sampling rate consistent with that of the benchmark natural gamma curve; Step 3, calculating the correlation coefficient and the dynamic time warping distance; Step 4, performing depth correction on the natural gamma curve to be corrected step by step according to the benchmark window. The method disclosed in this invention combines the correlation coefficient algorithm and the dynamic time warping algorithm to correct the logging curve depth. The correlation coefficient algorithm matches curve peaks to determine depth error, while the dynamic time warping algorithm filters and controls curve quality. A dual-window sliding mechanism is used to filter out windows with poor curve quality, making it suitable for automated logging depth correction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of oil well logging interpretation, and specifically relates to an automatic well logging depth correction method based on correlation coefficient and dynamic time warping method. Background Technology

[0002] To address the challenges of depth correction in oil well logging, Liu Ziyun et al. (1990) proposed using a high-quality curve as a reference curve and employing a correlation comparison analysis method to achieve depth correction. However, this method has drawbacks: it cannot effectively control curve quality and correction accuracy; if a window of correction fails, recalibration is required, resulting in low efficiency. Wang Hui (2012) proposed using the Hausdorff distance correlation method to identify peaks in similar curves and calculate depth correction values. However, this method suffers from the drawback of easily misidentifying curve peaks, leading to larger depth errors. Furthermore, the depth correction functions in existing commercial oil well logging software suffer from low automation and high error rates, necessitating the development of new depth correction methods to solve these problems. Summary of the Invention

[0003] To address the issues of low automation and high error rate in current well logging depth correction, this invention proposes a method for automatically correcting well logging curves by controlling curve quality based on correlation coefficients and dynamic time warping. This method offers higher reliability and accuracy when used in actual data processing.

[0004] The present invention adopts the following technical solution:

[0005] An automatic logging depth correction method based on correlation coefficient and dynamic time warping method is improved by including the following steps:

[0006] Step 1: Read the baseline natural gamma curve and the natural gamma curve to be corrected;

[0007] Step 2: The Akima method is used to resample the natural gamma curve to be corrected so that its sampling rate is consistent with that of the reference natural gamma curve; the MinMaxScaler normalization method is used to normalize the natural gamma curve to be corrected and the reference natural gamma curve so that the data distribution range of the two natural gamma curves is scaled to 0-1.

[0008] Step 3, calculate the correlation coefficient and the dynamic time-warped distance:

[0009] The correlation coefficient between the baseline natural gamma curve x and the natural gamma curve y to be corrected is expressed as follows:

[0010]

[0011] In the above formula, N is the number of samples;

[0012] The process of matching two natural gamma curves using the dynamic time warping method is as follows:

[0013] To match the peak and trough points of the two natural gamma curves as closely as possible, the minimum distance is solved using the dynamic time warping method, and D is used. min =D(G n S m ) represents the distance of the regular path, where G n With G m Let represent the baseline natural gamma curve and the natural gamma curve to be corrected, respectively. The normalized path needs to satisfy the boundary constraints shown in the following formula: continuity constraint and monotonicity constraint.

[0014] i k-1 ≤i k j k-1 ≤j

[0015] i k -i k-1 ≤1,j k -j k-1 ≤1

[0016] 1≤i k ≤L,1≤j k ≤L

[0017] In the above formula, L is the number of sampling points for the natural gamma curve, and i k With j k These represent the sequences of the two matching points at point k on the baseline natural gamma curve and the natural gamma curve to be corrected, respectively.

[0018] Sequence G n and sequence S m The dynamic time-warped distance Dist(n, m) between any two alignment points is:

[0019]

[0020] In the above formula: R is the sequence G n and sequence S m The dimension of the eigenvectors;

[0021] Step 4: Perform depth correction on the natural gamma curve to be corrected step by step according to the reference window:

[0022] Divide the two natural gamma curves into several reference windows, and determine the reference window length L, the sliding window length WL, and the sliding distance SL. Within the reference window length L, calculate the dynamic time warping distance between the reference natural gamma curve and the natural gamma curve to be corrected. If it is greater than the threshold, filter out this reference window.

[0023] Moving along the sampling interval of the natural gamma curve, the correlation coefficient is calculated for each movement. The maximum correlation coefficient over the entire sliding distance is the depth error Δd. The depth correction formula for the reference window is:

[0024] L = L m +Δd

[0025] In the above formula, L m The window length corresponding to the maximum value of the correlation coefficient is given by Δd, where Δd is the depth error.

[0026] The natural gamma curve to be calibrated is resampled based on the depth error to complete the depth calibration of one reference window, and then the depth calibration is performed on the remaining reference windows in sequence.

[0027] Furthermore, in step 3, R equals 2.

[0028] Furthermore, in step 4, the threshold for the dynamic time warping distance is 40.

[0029] The beneficial effects of this invention are:

[0030] The method disclosed in this invention combines a correlation coefficient algorithm and a dynamic time warping algorithm to correct the depth of logging curves. The correlation coefficient algorithm matches curve peaks to determine depth errors, while the dynamic time warping algorithm filters and controls curve quality. A dual-window sliding mechanism is used to filter out windows with poor curve quality, making it suitable for automated logging depth correction.

[0031] The method disclosed in this invention solves various depth correction problems of logging curves, such as the inconsistency of zero length of curves in different wells and the depth misalignment caused by the elongation or compression of logging cables. It can quickly complete the depth correction of logging curves, greatly improve the accuracy and automation of logging digital processing, and significantly improve work efficiency. It can be widely used for depth correction work by field operators and logging interpreters, shortening the processing cycle and improving the utilization efficiency of logging data. Attached Figure Description

[0032] Figure 1 This is a flowchart illustrating the method of the present invention;

[0033] Figure 2 This is the result of interpolating a selected segment of a natural gamma curve;

[0034] Figure 3 This is a schematic diagram of the processing result of the dynamic time warping algorithm;

[0035] Figure 4 This is a schematic diagram of a dual-window sliding window;

[0036] Figure 5 This is a schematic diagram of the depth correction results for the dielectric logging curve of Check 22;

[0037] Figure 6 This is a schematic diagram of the depth correction results of the SU2010 dielectric logging curve. Detailed Implementation

[0038] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0039] Example 1 discloses an automatic logging depth correction method based on correlation coefficient and dynamic time warping, such as... Figure 1 As shown, it includes the following steps:

[0040] Step 1: Read the baseline natural gamma curve and the natural gamma curve to be corrected;

[0041] Step 2: The Akima method is used to resample the natural gamma curve to be corrected so that its sampling rate is consistent with that of the reference natural gamma curve; the MinMaxScaler normalization method is used to normalize the natural gamma curve to be corrected and the reference natural gamma curve so that the data distribution range of the two natural gamma curves is scaled to 0-1.

[0042] (1) Natural gamma curve resampling normalization:

[0043] The first step in depth correction data preprocessing is resampling the natural gamma curve to be corrected. Because different measurements from a single well result in different sampling rates between the natural gamma curve to be corrected and the baseline natural gamma curve, they cannot be matched. Therefore, the resampling rate of the natural gamma curve to be corrected must be consistent with that of the baseline natural gamma curve. This embodiment uses the Akima method, which is highly efficient and accurate, to resample the natural gamma curve. The Akima method is a local interpolation method constructed from piecewise cubic polynomials. The interpolated curve ensures the continuity of the first derivative. Compared with linear interpolation and cubic spline interpolation methods, the curve is smoother and more natural, avoiding excessive local fluctuations. The detailed derivation of the Akima interpolation method can be found in the literature and will not be elaborated here.

[0044] Figure 2 This image shows the results of interpolating a selected segment of natural gamma curve, including results from linear interpolation, cubic spline interpolation, and the AKima method. The image shows that the curve obtained by the AKima method is closer to the original curve and smoother, while the curve obtained by cubic spline interpolation has larger amplitude fluctuations, especially noticeable at peaks, and the curve obtained by linear interpolation lacks smoothness. The comparison demonstrates that the AKima interpolation method is more suitable for processing well logging curves, producing a smoother and more natural result that closely resembles the original curve shape.

[0045] (2) Normalization of natural gamma curve:

[0046] Logging data from different wells exhibit variations in dimensions and amplitudes, necessitating normalization of the standard natural gamma curve and the gamma curve to be corrected. This embodiment employs the MinMaxScaler normalization method to normalize the two natural gamma curves, scaling the data to a distribution range of 0-1. This prevents the different orders of magnitude between the input data from affecting the prediction results and improves the similarity between the two curves. (Assuming sample data...) The normalization formula is:

[0047]

[0048] In the above formula, x represents the input natural gamma curve data sample. This represents the normalized natural gamma curve data, min n (x (n) ) represents the minimum value of the sample, and max represents the maximum value. n (x (n) The maximum value of the sample is represented by ), and normalization not only does not change the correlation of the curves, but also solves the problem of the different dimensions and orders of magnitude of the two curves, thus improving the accuracy of the calculation.

[0049] Step 3: Construct a dual-window sliding mechanism and calculate the correlation coefficient and dynamic time warping distance:

[0050] The Pearson correlation coefficient, also known as the Pearson product-moment correlation coefficient, is used to measure the correlation (linear correlation) between two variables X and Y. Its value ranges from -1 to 1. -1 represents a negative linear correlation, 0 represents no correlation, and 1 represents a positive linear correlation.

[0051] The correlation coefficient between the baseline natural gamma curve x and the natural gamma curve y to be corrected is expressed as follows:

[0052]

[0053] In the above formula, N is the number of samples;

[0054] The process of matching two natural gamma curves using the dynamic time warping method is as follows:

[0055] The idea behind Dynamic Time Warping (VTW) is to stretch or shorten a time series until it matches the length of a reference template. During this process, the two time axes will be distorted or bent to a certain extent so that their feature quantities correspond to the standard pattern. VTW can solve problems of misaligned time points and stretching / expanding between patterns, resulting in better matching performance. A warping path distance is defined, and the similarity between two time series is measured by summing the distances between all similar points. The greater the similarity between the two curves, the smaller the calculated distance.

[0056] The baseline natural gamma curve and the natural gamma curve to be corrected have a very similar matching relationship. Taking two natural gamma curves within a window as an example, the process of matching natural gamma curves using the dynamic time warping algorithm is briefly introduced:

[0057] To match the peak and trough points of the two natural gamma curves as closely as possible, the minimum distance is solved using the dynamic time warping method, and D is used. min =D(G n S m ) represents the distance of the regular path, where G n With G m Let represent the baseline natural gamma curve and the natural gamma curve to be corrected, respectively. The normalized path needs to satisfy the boundary constraints shown in the following formula: continuity constraint and monotonicity constraint.

[0058] i k-1 ≤i k j k-1 ≤j

[0059] i k -i k-1 ≤1,j k -j k-1 ≤1

[0060] 1≤i k ≤L,1≤j k ≤L

[0061] In the above formula, L is the number of sampling points for the natural gamma curve, and i k With j k These represent the sequences of the two matching points at point k on the baseline natural gamma curve and the natural gamma curve to be corrected, respectively.

[0062] Sequence G n and sequence S m The dynamic time-warped distance Dist(n, m) between any two alignment points is:

[0063]

[0064] In the above formula: R is the sequence G nand sequence S m The dimension of the feature vector; in this embodiment, the sequence G n and sequence S m All are two-dimensional vectors. Under the constraints of the above formula, the formula for calculating the shortest regularized path is:

[0065] D(i,j)=Dist(i,j)+min[D(i-1,j),D(i,j-1),D(i-1,j-1)]

[0066] In the above formula, D(i,j) represents the normalized path distance between two curves of length i and length j. The optimization process starts from the point (0,0) and matches these two sequences G. n and S m At each point reached, the distances calculated from all previous points are accumulated. After reaching the destination (n, m), an optimal path is found that minimizes the cumulative distance calculated at each intersection.

[0067] Select a reference natural gamma curve and the natural gamma curve to be corrected, and calculate the dynamic time warp distance between the two curves, such as... Figure 3 As shown in the figure, the upper curve GR_REF is the baseline natural gamma curve, and the lower curve GR_DESY is the natural gamma curve to be corrected. Compared with the GR_REF curve, the GR_DESY curve has inconsistent depth and is compressed. The line between the upper and lower curves represents the matching result of the dynamic time warping distance calculation process, reflecting the degree of matching between the two time series shapes. It can be seen that the dynamic time warping method can effectively and automatically distort the shape of the curves, thereby achieving optimal matching between the two curves. This solves the problem of quantitatively calculating the similarity of natural gamma data shapes under compression or expansion, and automatically controls the curve quality.

[0068] Step 4: Perform depth correction on the natural gamma curve to be corrected step by step according to the reference window:

[0069] A dual-window sliding mechanism is constructed, which divides two natural gamma curves into several reference windows and calculates the correlation coefficient and dynamic time warping distance of the two curves within the window.

[0070] First, determine the lengths of the two windows and a sliding distance, such as... Figure 4The diagram shows the determination of the baseline window length L, the sliding window length WL, and the sliding distance SL. Within the baseline window length L, the dynamic time warping distance between the baseline natural gamma curve and the natural gamma curve to be corrected is calculated. If it exceeds a threshold, the baseline window is filtered out; a threshold of 40 is recommended. Setting a sliding window within the baseline window can better handle complex curve problems, such as leaving a sliding window distance near the initial depth of the curve, and also correcting zero lengths for different curves. Using the depth of the baseline natural gamma curve as a reference, within the baseline window length L, the sliding window length WL moves upwards by a distance SL / 2 and downwards by a distance SL / 2 at the bottom of the window, according to the sampling interval of the natural gamma curve. The correlation coefficient is calculated after each movement. The maximum correlation coefficient within the entire sliding distance is the depth error Δd. The depth correction formula for the baseline window is:

[0071] L = L m +Δd

[0072] In the above formula, L m The window length corresponding to the maximum value of the correlation coefficient is given by Δd, where Δd is the depth error.

[0073] The natural gamma curve to be calibrated is resampled based on the depth error to complete the depth calibration of one reference window, and then the depth calibration is performed on the remaining reference windows in sequence.

[0074] The method of this invention was used to automatically correct the depth of the logging curves of two wells, and both achieved good results. It is not only reliable, but also highly automated.

[0075] Figure 5 This refers to the dielectric logging curves (GLP-22). In the curve, GR_REF is the baseline natural gamma ray curve, GR_DESY is the natural gamma ray curve to be corrected (not from the same measurement as GR_REF), and GR_CORR is the natural gamma ray curve corrected from GR_DESY. From... Figure 5 As can be seen, after processing by the method of the present invention, the curve automatically shifts down by 1.1 meters. After resampling the curve, the curve peaks are automatically aligned at 1874 meters, 1884 meters, and 1900 meters, and the depths are completely aligned.

[0076] Figure 6 This is a schematic diagram of the depth correction results for the SU2010 dielectric logging curve. From... Figure 6 As can be seen, at a depth of 3483, the peak of the natural gamma curve GR_DESY differs greatly from that of the curve GR_REF, and the peaks of the two curves have different shapes in many places, making the situation quite complicated. After processing by the method of this invention, the curve shapes and peaks are automatically aligned at 3483.5 meters, 3490 meters, and 3502.5 meters, and the depths are completely aligned.

Claims

1. An automatic logging depth correction method based on correlation coefficient and dynamic time warping, characterized in that, Includes the following steps: Step 1: Read the baseline natural gamma curve and the natural gamma curve to be corrected; Step 2: The Akima method is used to resample the natural gamma curve to be corrected so that its sampling rate is consistent with that of the reference natural gamma curve; the MinMaxScaler normalization method is used to normalize the natural gamma curve to be corrected and the reference natural gamma curve so that the data distribution range of the two natural gamma curves is scaled to 0-1. Step 3, calculate the correlation coefficient and the dynamic time-warped distance: The correlation coefficient between the baseline natural gamma curve x and the natural gamma curve y to be corrected is expressed as follows: In the above formula, N is the number of samples; The process of matching two natural gamma curves using the dynamic time warping method is as follows: To match the peak and trough points of the two natural gamma curves as closely as possible, the minimum distance is solved using the dynamic time warping method, and D is used. min =D(G n S m ) represents the distance of the regular path, where G n With G m Let represent the baseline natural gamma curve and the natural gamma curve to be corrected, respectively. The normalized path needs to satisfy the boundary constraints shown in the following formula: continuity constraint and monotonicity constraint. i k-1 ≤i k ,j k-1 ≤j i k -i k-1 ≤1,j k -j k-1 ≤1 1≤i k ≤L,1≤j k ≤L In the above formula, L is the number of sampling points for the natural gamma curve, and i k With j k These represent the sequences of the two matching points at point k on the baseline natural gamma curve and the natural gamma curve to be corrected, respectively. Sequence G n and sequence S m The dynamic time-warped distance Dist(n, m) between any two alignment points is: In the above formula: R is the sequence G n and sequence S m The dimension of the eigenvectors; Step 4: Perform depth correction on the natural gamma curve to be corrected step by step according to the reference window: Divide the two natural gamma curves into several reference windows, and determine the reference window length L, the sliding window length WL, and the sliding distance SL. Within the reference window length L, calculate the dynamic time warping distance between the reference natural gamma curve and the natural gamma curve to be corrected. If it is greater than the threshold, filter out this reference window. Moving along the sampling interval of the natural gamma curve, the correlation coefficient is calculated for each movement. The maximum correlation coefficient over the entire sliding distance is the depth error Δd. The depth correction formula for the reference window is: L=L m +Δd In the above formula, L m The window length corresponding to the maximum value of the correlation coefficient is given by Δd, where Δd is the depth error. The natural gamma curve to be calibrated is resampled based on the depth error to complete the depth calibration of one reference window, and then the depth calibration is performed on the remaining reference windows in sequence.

2. The automatic logging depth correction method based on correlation coefficient and dynamic time warping method according to claim 1, characterized in that: In step 3, R equals 2.

3. The automatic logging depth correction method based on correlation coefficient and dynamic time warping method according to claim 1, characterized in that: In step 4, the threshold for dynamic time warping distance is 40.