Intelligent detection method for downhole casing collar
By combining deep data alignment and feature extraction with a deep learning model, the problem of low accuracy in identifying downhole casing couplings was solved, and high-precision coupling point identification was achieved in complex downhole environments.
Patent Information
- Application Number
- CN202511541478.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-27
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2045-10-27
AI Technical Summary
Existing methods for identifying downhole casing couplings suffer from ambiguous signal characteristics and susceptibility to interference, resulting in low identification accuracy and difficulty in meeting automation requirements.
By using deep data alignment, denoising, correction, and compensation of voltage signals, multi-source anomaly features are extracted, an anomaly weight map is constructed, and hoop point identification is performed by combining temporal convolutional networks, bidirectional long short-term memory networks, and temporal attention mechanisms.
It improves the accuracy and robustness of coupling point identification, enabling accurate identification of coupling positions in complex downhole environments and adapting to signal changes under different working conditions.
Smart Images

Figure CN121006998B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of casing coupling inspection technology, and specifically to an intelligent inspection method for downhole casing couplings. Background Technology
[0002] Deep well logging technology is a crucial aspect of oil and gas exploration and development. Casing couplings, as an important component of the well structure, are essential for accurate identification in subsequent well workover, fracturing, and casing integrity assessment. In recent years, with the development of sensor and downhole instrument technology, coupling location is often identified using voltage (CCL signal), which exhibits obvious pulse fluctuations at the coupling. However, due to the complex downhole environment, CCL signals are easily affected by various interference factors such as tension fluctuations, velocity changes, and equipment noise, resulting in blurred signal characteristics and a significant decrease in the accuracy and robustness of coupling identification.
[0003] Traditional coupling identification methods largely rely on human experience, analyzing abrupt changes in the CCL voltage waveform to determine coupling location. However, this method is highly dependent on expert judgment and easily affected by voltage signal noise and external interference, leading to decreased identification accuracy and failing to meet the automation requirements of modern downhole operations. To improve the accuracy and efficiency of coupling identification, researchers have introduced machine learning methods such as deep learning, including deep learning-based automatic feature extraction models such as Convolutional Neural Networks (CNN), Long Short-Term Memory Networks (LSTM), and Autoencoders. These models can learn the characteristic patterns of coupling points from large amounts of voltage data, achieving automatic identification.
[0004] However, existing identification methods are insufficient in CCL signal processing, suffer from abnormal data interference, and have insignificant features, resulting in low identification accuracy of coupling points when using neural networks for identification. Summary of the Invention
[0005] To address the aforementioned shortcomings in existing technologies, this invention provides an intelligent detection method for downhole casing couplings, which solves the problem of low accuracy in coupling point identification in existing technologies.
[0006] To achieve the above-mentioned objectives, the technical solution adopted by this invention is: an intelligent detection method for downhole casing couplings, comprising the following steps:
[0007] S1. Obtain depth data, voltage signal, velocity data and tension data through downhole logging equipment. Based on the depth data, align the voltage signal, velocity data and tension data, denoise the voltage signal, correct it based on the velocity data and compensate it based on the tension data to obtain a clean voltage signal.
[0008] S2. Perform Z-score normalization on the pure voltage signal to obtain a standard voltage signal sequence;
[0009] S3. Extract the maximum response feature value, standard transient energy anomaly degree, standard spectral kurtosis and pitch deviation degree from the standard voltage signal sequence respectively, and perform feature splicing to obtain multi-source anomaly degree features;
[0010] S4. Map the multi-source anomaly features to obtain the anomaly weight map;
[0011] S5. The abnormal region enhancement and abnormal region suppression of the standard voltage signal sequence are performed using the abnormal weight map to obtain the abnormal enhanced voltage signal sequence and the abnormal suppressed voltage signal sequence.
[0012] S6. The abnormally enhanced voltage signal sequence and the abnormally suppressed voltage signal sequence are concatenated into a two-dimensional sequence tensor and input into the coupling recognition model to obtain the coupling point recognition result.
[0013] Furthermore, S1 includes the following sub-steps:
[0014] S11. Align the voltage signal, velocity data, and tension data according to the depth data.
[0015] S12. Perform wavelet denoising on the aligned voltage signal to obtain the denoised voltage signal;
[0016] S13. Based on the speed data, the denoised voltage signal is corrected according to the speed correction model to obtain the corrected voltage signal;
[0017] S14. Based on the tension data, the voltage signal is compensated and corrected according to the tension interference model to obtain a pure voltage signal.
[0018] The beneficial effects of the above-mentioned further scheme are as follows: Deep correction is performed on the voltage signal, velocity data, and tension data to ensure consistent alignment of all parameters in the depth dimension; subsequently, wavelet transform is used to denoise the voltage signal, filtering out high-frequency interference and low-frequency drift. After denoising, velocity and tension effects are further compensated to eliminate the influence of different operating conditions on the signal waveform and improve signal quality.
[0019] Furthermore, S13 includes the following sub-steps:
[0020] S131. When a speed in the speed data meets the speed anomaly condition, that speed is an abnormal speed. The speed anomaly condition is: ,
[0021] Among them, v i Let μ be the i-th velocity in the velocity data. v σ is the global average value of the velocity data.v Let be the standard deviation of the velocity data, || be the absolute value operation, δ be the adjustment coefficient, and i be the velocity number;
[0022] S132. Based on the abnormal speed, estimate the voltage disturbance using the speed correction model;
[0023] S133. Based on the depth location of the abnormal velocity, select the corresponding voltage in the denoised voltage signal for voltage correction to obtain the corrected voltage signal. The corrected voltage is equal to the voltage before correction minus the voltage disturbance.
[0024] Furthermore, the velocity correction model in S132 is as follows: ,
[0025] Wherein, △e i Let k be the voltage disturbance estimated when the i-th speed in the speed data is an abnormal speed, and k is the scaling factor.
[0026] The beneficial effects of the above-mentioned further solution are as follows: The present invention sets speed anomaly conditions. When the speed meets the speed anomaly conditions, the corresponding speed is classified as an abnormal speed. For the depth where the abnormal speed is located, the corresponding voltage is extracted, a speed correction model is constructed to correct the voltage, eliminate the influence of speed anomaly on voltage, and make the voltage signal closer to the real characteristics of the coupling.
[0027] Furthermore, S14 includes the following sub-steps:
[0028] S141. When tension data contains tension that meets the abnormal tension condition, the tension is considered abnormal fluctuation tension. The abnormal tension condition is as follows: ,
[0029] Among them, t k Let μ be the k-th tension in the tension data. t σ is the global mean of the tension data. t represents the standard deviation of the tension data, || represents the absolute value operation, γ is the adjustment coefficient, and k is the tension number;
[0030] S142. Calculate the disturbance scaling factor of abnormal fluctuation tension using the tension disturbance model:
[0031] S143. Based on the depth location of the abnormal fluctuation tension, select the corresponding voltage in the correction voltage signal and multiply it by the disturbance scaling factor to obtain the pure voltage signal.
[0032] Furthermore, the tension disturbance model in S142 is as follows: ,
[0033] Where, α k λ is the disturbance proportional factor calculated when the k-th tension in the tension data is an abnormal fluctuation tension, and λ is the compression control parameter.
[0034] The beneficial effects of the above-mentioned further solution are as follows: the present invention sets tension anomaly conditions, accurately identifies abnormal fluctuation tension, adapts to tension changes under different well conditions, converts abnormal tension into a disturbance proportional factor, and quantifies the interference of tension on voltage signals; then, according to the depth position of abnormal tension, the corresponding voltage of the corrected voltage signal is selected and multiplied with it, effectively eliminating signal distortion caused by tension fluctuations.
[0035] Furthermore, S3 includes the following sub-steps:
[0036] S31. Construct a set of window scales, and calculate the local Z-score of the standard voltage signal sequence based on each window scale in the set of window scales.
[0037] S32. Take the absolute value of each local Z-score, and take the maximum absolute value at the same depth d under multiple window scales as the maximum response feature value.
[0038] S33. Apply the Teager-Kaiser energy operator to the standard voltage signal sequence to obtain the transient energy anomaly.
[0039] S34. The transient energy anomaly is normalized by Z-score to obtain the standard transient energy anomaly.
[0040] S35. Perform a short-time Fourier transform (STFT) on the standard voltage signal sequence, calculate the spectral kurtosis of each window, and normalize the spectral kurtosis to obtain the standard spectral kurtosis.
[0041] S36. The standard voltage signal sequence is subjected to joint threshold coarse detection using the maximum response eigenvalue and the standard transient energy anomaly to obtain the spacing sequence;
[0042] S37. Perform sliding statistics on the spacing sequence to obtain the local adaptive pitch.
[0043] S38. Calculate the pitch deviation at each depth based on the local adaptive pitch.
[0044] The beneficial effects of the above-mentioned further solutions are as follows:
[0045] 1. This invention employs sliding processing of a standard voltage signal sequence at each window scale to obtain a local Z-score, quantifies the deviation of the current signal from the local reference, and then takes the maximum response feature value as the statistical anomaly. This not only integrates multi-scale information to comprehensively capture local abrupt change signals such as couplings, but also effectively filters background noise and highlights the abnormal features of the coupling position.
[0046] 2. This invention uses the Teager-Kaiser energy operator to process standard voltage signal sequences, highlighting the spikes and abrupt changes in the signal, which meets the requirements for identifying voltage pulse fluctuations at the coupling.
[0047] 3. This invention calculates and normalizes the spectral kurtosis of each window in a standard voltage signal sequence by performing a short-time Fourier transform (STFT) on its sliding window sequence. Spectral kurtosis is sensitive to non-stationary, narrow-band burst components, and can accurately identify anomalies caused by such components. It focuses on the frequency domain feature abrupt changes caused by local pulses in the coupling signal, supplementing the deficiencies of time domain feature extraction, and strengthening the capture of abnormal features from the spectral domain dimension, providing a frequency domain anomaly index for coupling identification.
[0048] 4. This invention first performs joint threshold coarse detection on the standard voltage signal sequence using the maximum response eigenvalue and standard transient energy anomaly to obtain the spacing sequence between adjacent candidate peaks. Then, it obtains the local adaptive pitch through sliding statistics. Based on this, the pitch deviation is defined, breaking through the fixed period limitation and adapting to the non-rigid distribution of coupling spacing in complex downhole environments. By comparing the actual spacing with the local expected spacing, it accurately measures the abnormal peaks outside the suspected coupling neighborhood.
[0049] Furthermore, the mapping formula in S4 is: ,
[0050] Where W(d) represents the anomaly weight at depth d in the anomaly weight map, σ is the Sigmoid function, α is the linearly fused weight vector, T is the transpose operation, and b is the bias vector. Let be a 4-dimensional real vector, and let a(d) be the multi-source anomaly feature.
[0051] Furthermore, the formula for enhancing abnormal regions in S5 is: ,
[0052] Where x1(d) is the voltage at depth d in the abnormally enhanced voltage signal sequence. Let ε be the voltage at depth d in the standard voltage signal sequence. z To enhance the scaling factor, W(d) represents the anomaly weight at depth d in the anomaly weight map;
[0053] The formula for suppressing abnormal regions in S5 is: ,
[0054] Where x2(d) is the voltage at depth d in the abnormal suppression voltage signal sequence, ε I To suppress the proportional coefficient.
[0055] The beneficial effects of the above-mentioned further solutions are as follows: By amplifying the abnormal related region, the present invention strengthens the characteristics of the coupling signal, highlights key information, suppresses and reduces the abnormal region, and guides the network to learn complementary information of abnormal features and background. This not only enhances the recognizability of coupling features, but also enriches the data representation dimension, allowing the network to understand the signal from two perspectives and improves the robustness of coupling recognition in complex downhole environments.
[0056] Furthermore, the coupling recognition model includes: a temporal convolutional network module (TCN), a bidirectional long short-term memory network module, a temporal attention mechanism module, a fully connected layer, and an output transformation module.
[0057] The beneficial effects of this invention are as follows:
[0058] 1. This invention aligns voltage, velocity, and tension data based on depth data, eliminating timing deviations caused by downhole equipment movement and ensuring data spatiotemporal consistency. Velocity data is used to correct voltage, eliminating the impact of velocity variations on voltage. Tension data is combined to compensate for mechanical vibration interference, reducing voltage distortion. This invention eliminates interference from abnormal data.
[0059] 2. This invention extracts the maximum response feature value, standard transient energy anomaly degree, standard spectral kurtosis, and pitch deviation degree, and performs feature splicing to obtain multi-source anomaly degree features. An anomaly weight map is constructed, and anomaly region enhancement is performed based on the anomaly weight map to further highlight the amplitude of the coupling pulse and emphasize the coupling feature. Anomaly region suppression is also performed to obtain the background signal pattern. The enhanced and suppressed signals are spliced into a two-dimensional tensor, providing two perspectives: "significant coupling features" and "background patterns". This allows the coupling recognition model to learn coupling features from two aspects, improving the accuracy of coupling point recognition. Attached Figure Description
[0060] Figure 1 A flowchart of a method for intelligent detection of downhole casing couplings;
[0061] Figure 2 This is a structural schematic diagram of the coupling identification model;
[0062] Figure 3 This is a schematic diagram illustrating the recognition effect of the first coupling.
[0063] Figure 4 This is a schematic diagram illustrating the recognition effect of the second coupling. Detailed Implementation
[0064] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.
[0065] like Figure 1 As shown, a method for intelligent detection of downhole casing couplings includes the following steps:
[0066] S1. Obtain depth data, voltage signal, velocity data and tension data through downhole logging equipment. Based on the depth data, align the voltage signal, velocity data and tension data, denoise the voltage signal, correct it based on the velocity data and compensate it based on the tension data to obtain a clean voltage signal.
[0067] S2. Perform Z-score normalization on the pure voltage signal to obtain a standard voltage signal sequence;
[0068] S3. Extract the maximum response feature value, standard transient energy anomaly degree, standard spectral kurtosis and pitch deviation degree from the standard voltage signal sequence respectively, and perform feature splicing to obtain multi-source anomaly degree features;
[0069] S4. Map the multi-source anomaly features to obtain the anomaly weight map;
[0070] S5. The abnormal region enhancement and abnormal region suppression of the standard voltage signal sequence are performed using the abnormal weight map to obtain the abnormal enhanced voltage signal sequence and the abnormal suppressed voltage signal sequence.
[0071] S6. The abnormally enhanced voltage signal sequence and the abnormally suppressed voltage signal sequence are concatenated into a two-dimensional sequence tensor and input into the coupling recognition model to obtain the coupling point recognition result.
[0072] In this embodiment, S1 includes the following sub-steps:
[0073] S11. Align the voltage signal, velocity data, and tension data according to the depth data.
[0074] S12. Perform wavelet denoising on the aligned voltage signal to obtain the denoised voltage signal;
[0075] S13. Based on the speed data, the denoised voltage signal is corrected according to the speed correction model to obtain the corrected voltage signal;
[0076] S14. Based on the tension data, the voltage signal is compensated and corrected according to the tension interference model to obtain a pure voltage signal.
[0077] This embodiment first performs depth correction based on depth data. That is, according to the depth benchmark, the three measurement data of voltage, velocity, and tension are precisely aligned in the depth dimension to ensure that the measurement values of various signals correspond to the same depth point. Then, wavelet transform is performed on the original voltage signal after alignment to suppress high-frequency interference and low-frequency drift, thereby improving the stability and clarity of the coupling signal characteristics.
[0078] This invention utilizes a velocity correction model to eliminate the influence of velocity changes on voltage, and then uses a tension effect correction method to compensate for voltage signal distortion caused by tension fluctuations, thereby obtaining a stable and accurate standardized signal sequence that reflects the characteristics of the downhole coupling, which is a pure voltage signal.
[0079] In this embodiment, to ensure the data conforms to the ideal state and its effectiveness for model training, a method of cross-correction using multiple well run-in data is employed. Since the measurement depth and environmental conditions differ in each well run, the downhole signal may be affected by temporary variables. To eliminate these inconsistencies, multiple well run-in data sets for each well are compared. By comparing the actual coupling signal position with the expected coupling position in different well run-in runs, abnormal data is identified. The best-performing well run-in data set is selected, and the abnormal signals in this set are replaced with normal signals from other well run-in runs, thus obtaining more consistent and reliable well run-in data. The well run-in data includes: depth data, voltage signal, velocity data, and tension data.
[0080] In S12, the specific process of wavelet denoising includes: using the detail coefficients (high-frequency part) and approximation coefficients (low-frequency part) obtained by wavelet decomposition of the voltage signal at different scales for targeted thresholding. Specifically, the detail coefficients at different scales contain signal components of different frequencies. Noise often exists in the high-frequency part. Therefore, by adaptively selecting the threshold for each scale (each frequency band), the useful information of the signal is preserved and noise is removed.
[0081] In this embodiment, S13 includes the following sub-steps:
[0082] S131. When a speed in the speed data meets the speed anomaly condition, that speed is an abnormal speed. The speed anomaly condition is: ,
[0083] Among them, v i Let μ be the i-th velocity in the velocity data. v σ is the global average value of the velocity data. v Let be the standard deviation of the velocity data, || be the absolute value operation, δ be the adjustment coefficient, and i be the velocity number;
[0084] S132. Based on the abnormal speed, estimate the voltage disturbance using the speed correction model;
[0085] S133. Based on the depth position of the abnormal velocity, select the corresponding voltage in the denoised voltage signal for voltage correction to obtain the corrected voltage signal. The corrected voltage is equal to the voltage before correction minus the voltage disturbance. The voltage corresponding to the depth position of other normal velocities remains unchanged.
[0086] In this embodiment, the adjustment coefficient δ is set to 2.5.
[0087] In this embodiment, the velocity correction model in S132 is: ,
[0088] Wherein, △e i Let k be the voltage disturbance estimated when the i-th speed in the speed data is an abnormal speed, and k is the scaling factor.
[0089] In this embodiment, S14 includes the following sub-steps:
[0090] S141. When tension data contains tension that meets the abnormal tension condition, the tension is considered abnormal fluctuation tension. The abnormal tension condition is as follows: ,
[0091] Among them, t k Let μ be the k-th tension in the tension data. t σ is the global mean of the tension data. t represents the standard deviation of the tension data, || represents the absolute value operation, γ is the adjustment coefficient, and k is the tension number;
[0092] S142. Calculate the disturbance scaling factor of abnormal fluctuation tension using the tension disturbance model:
[0093] S143. Based on the depth location of the abnormal fluctuation tension, select the corresponding voltage in the correction voltage signal and multiply it by the disturbance scaling factor to obtain the pure voltage signal. The voltage corresponding to the depth location where the tension is normal remains unchanged.
[0094] In this embodiment, when the adjustment coefficient γ is set to 2, it can cover regions with obvious abrupt changes.
[0095] In this embodiment, the tension disturbance model in S142 is: ,
[0096] Where, α k λ is the disturbance proportional factor calculated when the k-th tension in the tension data is an abnormal fluctuation tension, and λ is the compression control parameter.
[0097] The compression control parameter λ is used to control the intensity of the intervention to prevent over-compression.
[0098] In this embodiment, S3 includes the following sub-steps:
[0099] S31. Construct a set of window scales (e.g., 0.2m, 0.5m, 1.0m), calculate the local Z-score of the standard voltage signal sequence based on each window scale in the set of window scales: ,
[0100] in, For depth d at the window scale Local Z-scores below The voltage at depth d in the standard voltage signal sequence. To use window scale The sliding mean during sliding. To use window scale The slip standard deviation during slip, For numerically stable terms, The number representing the window size;
[0101] S32. Take the absolute value of each local Z-score, and use the maximum absolute value at the same depth d under multiple window scales as the maximum response feature value: ,
[0102] Among them, Z max(d) denoted as the maximum response feature value at depth d, where max is the maximum absolute value across multiple window scales at the same depth.
[0103] S33. Apply the Teager-Kaiser energy operator to the standard voltage signal sequence to obtain the transient energy anomaly: ,
[0104] in, The transient energy anomaly at depth d, This represents the voltage at depth d-1 in a standard voltage signal sequence. This refers to the voltage at depth d+1 in the standard voltage signal sequence.
[0105] S34. The transient energy anomaly is normalized by Z-score to obtain the standard transient energy anomaly.
[0106] S35. Perform a short-time Fourier transform (STFT) on the standard voltage signal sequence, calculate the spectral kurtosis of each window, and normalize the spectral kurtosis to obtain the standard spectral kurtosis.
[0107] S36. For the standard voltage signal sequence, the maximum response eigenvalue and the standard transient energy anomaly are used for joint threshold discrimination to extract candidate peaks at suspected coupling locations; based on the depth difference between adjacent candidate peaks, a spacing sequence is constructed.
[0108] S37. Perform sliding statistical processing on the spacing sequence, calculate the local average or median by setting a sliding window, and obtain the local adaptive pitch that dynamically changes with depth.
[0109] S38. Based on the local adaptive pitch, calculate the pitch deviation at each depth to characterize the degree of deviation from the normal coupling pattern.
[0110] Further explanation: In S36, the maximum response characteristic value and standard transient energy anomaly degree are first calculated for each sampling point of the standard voltage signal sequence, and a joint threshold is set. When both indicators exceed the corresponding thresholds simultaneously, the point is determined to be a candidate peak. Then, the depth difference between adjacent candidate peaks is used as a spacing value, thus forming a spacing sequence. In S37, a sliding window method is used to smooth the spacing sequence statistically, taking the moving average or moving median as local statistics to adaptively reflect the local variation law of the coupling pitch within different depth intervals. Finally, in S38, the difference between the locally adaptive pitch and the actual spacing is used to calculate the deviation degree, achieving further discrimination of abnormal peaks.
[0111] In this embodiment, the specific processes of S36, S37, and S38 include: extracting the structural prior deviation degree without forcibly fixing the 10m period, based on adjacent candidate peaks (via Z... max(d) and normalization (Joint threshold coarse detection) to obtain the spacing sequence With local adaptive pitch (As obtained from sliding statistics) is used as a priori, and a pitch deviation degree is defined to measure "abnormal spikes outside the suspected coupling neighborhood": in, The pitch deviation at depth d is the value of the pitch deviation. This represents the actual spacing between adjacent candidate peaks at depth d. For local adaptive pitch, For numerically stable terms, || represents the absolute value.
[0112] In this embodiment, the multi-source anomaly characteristic is: ,
[0113] Where a(d) is the multi-source anomaly feature, Z max(d) The maximum response eigenvalue at depth d. To normalize the transient energy anomaly, For standard spectral kurtosis, The pitch deviation is at depth d.
[0114] In this embodiment, the mapping formula in S4 is: ,
[0115] Where W(d) represents the anomaly weight at depth d in the anomaly weight map, σ is the Sigmoid function, α is the linearly fused weight vector, T is the transpose operation, and b is the bias vector. Let be a 4-dimensional real vector, and let a(d) be the multi-source anomaly feature.
[0116] In this embodiment, the formula for enhancing the abnormal region in S5 is: ,
[0117] Where x1(d) is the voltage at depth d in the abnormally enhanced voltage signal sequence. Let ε be the voltage at depth d in the standard voltage signal sequence. z To enhance the scaling factor, W(d) represents the anomaly weight at depth d in the anomaly weight map;
[0118] The formula for suppressing abnormal regions in S5 is: ,
[0119] Where x2(d) is the voltage at depth d in the abnormal suppression voltage signal sequence, ε I To suppress the proportional coefficient.
[0120] like Figure 2 As shown, the coupling recognition model includes: a temporal convolutional network module (TCN), a bidirectional long short-term memory network module, a temporal attention mechanism module, a fully connected layer, and an output transformation module.
[0121] The Temporal Convolutional Network (TCN) module extracts local temporal features to obtain the first feature information. The Bidirectional Long Short-Term Memory (LSTM) network module, leveraging its bidirectional temporal information capture capability, mines feature associations between distant locations within the first feature information, constructing long-distance dependencies to obtain the second feature information. The Temporal Attention mechanism module is used to assign weights to the second feature information to obtain weighted feature information, highlighting key regions of the coupling signal and achieving feature enhancement and information focusing. The weighted feature information is fed into the fully connected layer to achieve feature fusion and mapping. Finally, the output transformation module (e.g., using the sigmoid function) transforms the model output into the confidence score or classification result of the coupling point, achieving accurate identification of the downhole coupling location.
[0122] In this embodiment, the temporal attention mechanism module uses the softmax function to calculate the weight of each input feature of the temporal attention mechanism module, and multiplies each weight by the corresponding input feature to obtain weighted feature information.
[0123] During model training, the L2 dynamic regularization method is introduced to dynamically adjust the regularization strength according to the number of training iterations and the change of the loss function, thereby effectively suppressing model overfitting and improving the generalization ability and stability of the identification model under different well conditions. The coupling identification results output by the coupling identification model are further processed and combined with depth information to locate the specific location of each coupling point downhole, forming a complete coupling identification result. The result can be used for casing integrity analysis, tubing structure optimization and related engineering decision support.
[0124] In this embodiment, the loss function of the coupling recognition model is: , ,
[0125] Among them, L reg λ(k) is the loss value of the k-th training iteration, λ(k) is the regularization coefficient of the k-th training iteration, and w n Let θ be the nth trainable parameter in the coupling recognition model, where n is the number of the trainable parameter, θ is the rate of change of the regularization coefficient, λ0 is the initial regularization coefficient, and k is the number of training iterations.
[0126] To avoid the suppression of early model learning by fixed regularization strength and to improve generalization ability in later stages, this embodiment introduces a dynamic L2 regularization strategy. This design can avoid the suppression of model learning in the early stages by fixed regularization strength and enhance generalization ability in later stages.
[0127] In this embodiment, other existing loss functions can also be used to train the coupling recognition model.
[0128] like Figure 3 As shown, the predicted coupling interval by the model closely matches the actual peak value in the signal, with no missed detections or misjudgments, indicating that the model has good robustness and recognition ability in complex waveform backgrounds. In particular, based on preprocessing techniques (such as wavelet denoising and velocity and tension effect correction), the model's discrimination boundary is clearer, effectively improving the accuracy and stability of coupling point recognition.
[0129] To evaluate the model's effectiveness in identifying coupling points across the entire well logging data, Figure 3 and 4The labels indicate the coupling intervals predicted by the model. Considering a sampling interval of 0.0125 meters per point, each typical coupling signal interval roughly corresponds to about 30 sampling points, or approximately 0.375 meters in actual width. During model training, to more effectively extract the features of the coupling signal, the model typically learns contextual information within a certain range before and after the coupling, thus potentially labeling the adjacent area of the coupling as a coupling interval during the prediction phase. Based on this characteristic, this invention allows for a 0.4-meter redundancy allowance before and after each coupling interval during evaluation, forming a total matching window of 0.8 meters. A prediction is considered correct as long as the prediction result falls within this interval.
[0130] like Figure 4 As shown, the yellow area represents the coupling interval predicted by the model, with a tolerance zone extending 0.4m forward and backward from the interval boundary to comprehensively account for actual measurement errors in the complex downhole environment. The red dashed line represents the manually marked actual coupling point locations. If the red dashed line falls within the yellow tolerance zone, the coupling point is considered accurately identified. The figure shows that almost all actual coupling points are included within the predicted tolerance zone, indicating that the constructed model exhibits high accuracy and positioning capability in coupling point identification tasks, possesses good robustness and practical application value, and can effectively cope with the challenges posed by downhole signal interference and fluctuations.
[0131] To further verify the robustness of the model under complex operating conditions, this invention selected a section with severe signal interference for visualization analysis. For example... Figure 4 As shown, this section exhibits several abnormal fluctuations with high intensity that are not at the coupling points. However, the model is still able to accurately identify the actual coupling locations and successfully eliminate interference fluctuations caused by non-coupling points, demonstrating strong discrimination capabilities.
[0132] In the prediction results, the yellow area represents the coupling interval identified by the model (including a tolerance range extending forward and backward by 0.4m), and the red dashed line represents the actual coupling point location manually marked. Despite a significant increase in interference signals, the model can still effectively separate the coupling points from the noise, indicating that the proposed method is not only applicable to sections with good signal quality but also adaptable to the actual situation of complex waveform interference in downhole drilling, demonstrating good generalization performance and engineering application potential. To ensure the completeness of the experiments, ablation experiments and comparative tests were conducted to verify the effectiveness of the model:
[0133] Table 1 summarizes the comprehensive evaluation results of each model in the joint point recognition task, further verifying the effectiveness and complementarity of each component module in the model structure.
[0134] Table 1
[0135] Model Structure Accuracy (%) Accuracy (%) Recall rate (%) Specificity (%) F1 score (%) TCN 89.37 88.21 86.45 90.78 87.32 BiLSTM 91.85 90.42 89.13 92.67 89.77 Contemplation + Billet 94.22 93.18 91.95 94.91 92.56 TCN+Billet 95.74 94.60 93.87 96.53 94.23 TCN+Contemplation 96.43 95.28 94.11 97.35 94.69 This invention model 98.08 97.35 96.90 98.72 97.12
[0136] The results show that the accuracy of models using TCN or Billet alone is 89.37% and 91.85%, respectively, indicating generally average recognition performance. However, by introducing the Contemplation module, the model's expressive ability for key temporal features is enhanced, with precision and recall increasing to 93.18% and 91.95%, respectively, and an F1 score of 92.56%. This demonstrates that the model can more accurately focus on the features of the coupling point, effectively reducing missed detections and false positives.
[0137] When the combined structure of TCN and Billet is adopted, the model accuracy is improved to 95.74%, while the precision and recall are improved to 94.60% and 93.87% respectively, and the F1 value is 94.23%, which shows the complementary role of local pattern extraction and global temporal modeling in joint point recognition.
[0138] Building upon this foundation, a fusion model (TCN+Contemplation+Billet) was further constructed using Contemplation. This model achieved optimal performance across all metrics, including an accuracy of 98.08%, precision of 97.35%, recall of 96.90%, specificity of 98.72%, and an F1 score of 97.12%. Compared to other structures, this model not only more accurately locates the coupling points but also effectively filters out interference fluctuations, improving the stability and robustness of the identification process, demonstrating strong engineering adaptability and practical application value.
[0139] To further verify the effectiveness and advantages of the proposed model in the joint point recognition task, this invention conducted comparative experiments with three common representative methods: the Amplitude Method, Support Vector Machine (SVM), and CNN+LSTM structure model. All methods were trained and tested under the same preprocessing procedures and dataset conditions to ensure the fairness and consistency of the comparison.
[0140] Experimental results show that the traditional amplitude method performs poorly in complex interference environments. Although it can detect some typical coupling points, it lacks robustness to interference fluctuations, resulting in numerous false positives and false negatives, with an F1 score of only 63.97%. The SVM method, as a representative of traditional machine learning, while possessing some classification ability, struggles to fully extract contextual information from time-series signals, limiting its overall recognition performance. The CNN+LSTM method, which integrates spatial and temporal feature extraction capabilities, improves both accuracy and recall, but its specificity remains unsatisfactory, indicating that it is still prone to false positives for non-coupling point noise.
[0141] In comparison, the TCN+Contemplation+Billet fusion model proposed in this invention achieves the best results in all five indicators, with an accuracy of 98.08% and an F1 value of 97.12%. It is significantly better than other comparative methods in terms of recognition accuracy, stability and anti-interference ability, further verifying the recognition advantages and practical application potential of the model in complex downhole environments.
[0142] This invention combines the physical mechanism of downhole casing coupling signal characteristics with a depth time-series modeling method. Addressing the shortcomings of traditional identification methods in extracting complex signal features and their susceptibility to interference from multiple factors, this invention introduces a depth correction mechanism to ensure the alignment consistency of measurement data in the depth dimension. Combined with wavelet denoising technology, it significantly improves signal quality. Furthermore, through velocity and tension effect correction, it effectively suppresses the impact of external operating condition changes on voltage, enhancing signal stability.
[0143] This invention further extracts the maximum response feature value, standard transient energy anomaly degree, standard spectral kurtosis and pitch deviation degree, and performs feature splicing to obtain multi-source anomaly degree features. An anomaly weight map is constructed, and anomaly region enhancement is performed based on the anomaly weight map to further highlight the amplitude of the coupling pulse, highlight the coupling feature, and perform anomaly region suppression to obtain the background signal pattern.
[0144] Finally, this invention constructs a recognition model that integrates a Temporal Convolutional Network (TCN), a Bidirectional Long Short-Term Memory Network (Billet), and a temporal attention mechanism to achieve accurate extraction and feature enhancement of coupling signals. By introducing L2 dynamic regularization, the model's generalization ability under different well conditions is improved, avoiding overfitting. This invention fully explores the temporal correlation between signals and coupling positions, significantly improving the accuracy and robustness of coupling recognition, and providing efficient and reliable technical support for downhole tubing structural integrity analysis.
[0145] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for intelligent detection of downhole casing couplings, characterized in that, Includes the following steps: S1. Obtain depth data, voltage signal, velocity data and tension data through downhole logging equipment. Based on the depth data, align the voltage signal, velocity data and tension data, denoise the voltage signal, correct it based on the velocity data and compensate it based on the tension data to obtain a clean voltage signal. S2. Perform Z-score normalization on the pure voltage signal to obtain a standard voltage signal sequence; S3. Extract the maximum response feature value, standard transient energy anomaly degree, standard spectral kurtosis and pitch deviation degree from the standard voltage signal sequence respectively, and perform feature splicing to obtain multi-source anomaly degree features; S3 includes the following steps: S31. Construct a set of window scales, and calculate the local Z-score of the standard voltage signal sequence based on each window scale in the set of window scales. S32. Take the absolute value of each local Z-score, and take the maximum absolute value at the same depth d under multiple window scales as the maximum response feature value. S33. Apply the Teager-Kaiser energy operator to the standard voltage signal sequence to obtain the transient energy anomaly. S34. The transient energy anomaly is normalized by Z-score to obtain the standard transient energy anomaly. S35. Perform a short-time Fourier transform (STFT) on the standard voltage signal sequence, calculate the spectral kurtosis of each window, and normalize the spectral kurtosis to obtain the standard spectral kurtosis. S36. For the standard voltage signal sequence, the maximum response eigenvalue and the standard transient energy anomaly are used for joint threshold discrimination to extract candidate peaks at suspected coupling locations; based on the depth difference between adjacent candidate peaks, a spacing sequence is constructed. S37. Perform sliding statistical processing on the spacing sequence, calculate the local average or median by setting a sliding window, and obtain the local adaptive pitch that dynamically changes with depth. S38. Based on the aforementioned local adaptive pitch, calculate the pitch deviation at each depth to characterize the degree of deviation from the normal coupling pattern: , in, The pitch deviation at depth d is the value of the pitch deviation. This represents the actual distance between adjacent candidate peaks at depth d. For local adaptive pitch, For numerically stable terms, || represents the absolute value; S4. Map the multi-source anomaly features to obtain the anomaly weight map; S5. The abnormal region enhancement and abnormal region suppression of the standard voltage signal sequence are performed using the abnormal weight map to obtain the abnormal enhanced voltage signal sequence and the abnormal suppressed voltage signal sequence. S6. The abnormally enhanced voltage signal sequence and the abnormally suppressed voltage signal sequence are concatenated into a two-dimensional sequence tensor and input into the coupling recognition model to obtain the coupling point recognition result.
2. The intelligent detection method for downhole casing couplings according to claim 1, characterized in that, S1 includes the following steps: S11. Align the voltage signal, velocity data, and tension data according to the depth data. S12. Perform wavelet denoising on the aligned voltage signal to obtain the denoised voltage signal; S13. Based on the speed data, the denoised voltage signal is corrected according to the speed correction model to obtain the corrected voltage signal; S14. Based on the tension data, the voltage signal is compensated and corrected according to the tension interference model to obtain a pure voltage signal.
3. The intelligent detection method for downhole casing couplings according to claim 2, characterized in that, S13 includes the following steps: S131. When a speed in the speed data meets the speed anomaly condition, that speed is an abnormal speed. The speed anomaly condition is: , Among them, v i Let μ be the i-th velocity in the velocity data. v σ is the global average value of the velocity data. v Let be the standard deviation of the velocity data, || be the absolute value operation, δ be the adjustment coefficient, and i be the velocity number; S132. Based on the abnormal speed, estimate the voltage disturbance using the speed correction model; S133. Based on the depth location of the abnormal velocity, select the corresponding voltage in the denoised voltage signal for voltage correction to obtain the corrected voltage signal. The corrected voltage is equal to the voltage before correction minus the voltage disturbance.
4. The intelligent detection method for downhole casing couplings according to claim 3, characterized in that, The velocity correction model in S132 is as follows: , Wherein, △e i Let k be the voltage disturbance estimated when the i-th speed in the speed data is an abnormal speed, and k is the scaling factor.
5. The intelligent detection method for downhole casing couplings according to claim 3, characterized in that, S14 includes the following sub-steps: S141. When tension data contains tension that meets the abnormal tension condition, the tension is considered abnormal fluctuation tension. The abnormal tension condition is as follows: , Among them, t k Let μ be the k-th tension in the tension data. t σ is the global mean of the tension data. t γ represents the standard deviation of the tension data, || represents the absolute value operation, γ is the adjustment coefficient, and k is the tension number. S142. Calculate the disturbance scaling factor of abnormal fluctuation tension using the tension disturbance model: S143. Based on the depth location of the abnormal fluctuation tension, select the corresponding voltage in the correction voltage signal and multiply it by the disturbance scaling factor to obtain the pure voltage signal.
6. The intelligent detection method for downhole casing couplings according to claim 5, characterized in that, The tension disturbance model in S142 is as follows: , Where, α k λ is the disturbance proportional factor calculated when the k-th tension in the tension data is an abnormal fluctuation tension, and λ is the compression control parameter.
7. The intelligent detection method for downhole casing couplings according to claim 1, characterized in that, The mapping formula in S4 is: , Where W(d) represents the anomaly weight at depth d in the anomaly weight map, σ is the Sigmoid function, α is the linearly fused weight vector, T is the transpose operation, and b is the bias vector. Let be a 4-dimensional real vector, and let a(d) be the multi-source anomaly feature.
8. The intelligent detection method for downhole casing couplings according to claim 1, characterized in that, The formula for enhancing the abnormal region in S5 is as follows: , Where x1(d) is the voltage at depth d in the abnormally enhanced voltage signal sequence. Let ε be the voltage at depth d in the standard voltage signal sequence. z To enhance the scaling factor, W(d) represents the anomaly weight at depth d in the anomaly weight map; The formula for suppressing abnormal regions in S5 is as follows: , Where x2(d) is the voltage at depth d in the abnormal suppression voltage signal sequence, ε I To suppress the proportional coefficient.
9. The intelligent detection method for downhole casing couplings according to claim 1, characterized in that, The coupling recognition model includes: a temporal convolutional network module (TCN), a bidirectional long short-term memory network module, a temporal attention mechanism module, a fully connected layer, and an output transformation module.
Citation Information
Patent Citations
Detection and correction of false positive classifications from a product sand detection tool
WO2023146833A1
Casing collar locator detection and depth control
WO2023177767A1