An adaptive extraction and denoising method, system, device and medium for a downhole pipeline measuring point position magnetic signal

By using adaptive short-time Fourier transform and a non-convex one-dimensional total variational denoising model, the problem of accurate positioning and denoising of magnetic signals at measuring points in downhole pipelines was solved, achieving more efficient extraction and denoising of magnetic signals at measuring points.

CN120028868BActive Publication Date: 2026-03-10XIDIAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-17
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing methods for extracting magnetic signals from measuring points in downhole pipelines suffer from subjective bias and poor noise reduction, especially in non-stationary signals where it is difficult to accurately determine the measuring point location time window and effectively reduce noise.

Method used

An adaptive short-time Fourier transform combined with a non-convex one-dimensional total variational denoising model is adopted. By adaptively adjusting the time window size and introducing an arctangent non-convex penalty function, a non-convex one-dimensional total variational denoising model is constructed to achieve accurate positioning and denoising of the magnetic signal at the measurement point.

Benefits of technology

It achieves accurate and comprehensive positioning and denoising of magnetic signals at measurement points in underground pipelines, improving the practicality and convenience of the algorithm and enhancing the denoising effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120028868B_ABST
    Figure CN120028868B_ABST
Patent Text Reader

Abstract

The application discloses a kind of well down pipeline measuring point position magnetic signal self-adapting extraction and denoising method, system, equipment and medium, method includes: by original noisy mixed magnetic signal is carried out frequency domain conversion to self-adapting STFT, utilize the flexibility of time window variation, automatically extract the magnetic signal of measuring point position;Then introduce arctangent non-convex penalty function into classical one-dimensional total variation denoising model as penalty function, construct non-convex one-dimensional total variation denoising model, and denoising is carried out to measuring point position magnetic signal;System, equipment and medium are used to realize the method;The application not only realizes accurate and comprehensive positioning to the measuring point position of magnetic signal, and the convex degree of model is adjusted using the non-convexity of arctangent function, under the premise that model is convex, maximum limit enhances the sparsity of denoising result, while ensuring that the measuring point position magnetic signal is abrupt, remove the tiny interference noise of measuring point position, obtain the stable magnetic signal of measuring point position.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of signal feature extraction technology, and particularly relates to an adaptive extraction and denoising method, system, equipment and medium for magnetic signals at the location of measuring points in downhole pipelines. Background Technology

[0002] When using a magnetometer to perform inversion detection on downhole oil casing or buried pipelines, point-by-point measurements ensure the acquisition of stable magnetic signals along a predetermined route. The magnetic signal at the measurement point is the magnetic signal synthesized by the magnetometer when the target is stationary at the measurement point. Existing methods for extracting the magnetic signal at the measurement point usually involve manually selecting it from the observed signal. How to adaptively extract the magnetic signal of the time period in which the measurement point is located from the observed signal and then filter and denoise it is a task of significant engineering importance and practical value in the field of magnetic detection engineering.

[0003] Theoretically, if the magnetometer remains stationary at the measuring point, the measured value will fluctuate within a small range, and the magnetic signal at the measuring point can be extracted by limiting the time window threshold. However, in practice, although the magnetometer carrier is observed to be stationary, the acquired magnetic signal still exhibits quasi-periodic variations, especially in handheld and non-track-based measurement trajectories, where the non-stationarity of the signal is more pronounced. The most direct way to extract the magnetic signal at the measuring point from the raw observation signal is through manual selection. By roughly locating the time and observing the time-domain characteristics of the signal, the time window at the measuring point is estimated, and then the magnetic signal at the measuring point is extracted. However, manual selection is usually subjective, and the judgment of the boundary of the time window at the measuring point is inevitably biased, making it impossible to accurately determine the specific range of the time window at the measuring point.

[0004] In the field of signal denoising, traditional denoising methods include mean filtering, median filtering, Kalman filtering, wavelet transform filtering, and empirical mode decomposition filtering. Mean filtering smooths the signal and reduces noise by averaging adjacent data points, while median filtering preserves abrupt changes between measurement points, distinguishes different measurement points, and retains edges. Both of these denoising methods utilize a neighborhood window to calculate the filtering result, typically operating on the neighborhood data surrounding the current signal.

[0005] Kalman filtering, by making assumptions about the system state and the observation model, updates the estimate of the system state using current observation data, thus obtaining accurate results. It can be summarized as a recursive filtering technique based on a state-space model and has wide applications in dynamic systems. However, because it assumes a linear model and that the noise must follow a Gaussian distribution, accurate system and noise models are crucial. Using an incorrect or ambiguous model for Kalman filtering will lead to inaccurate estimations. In magnetic detection, the start-up process of a magnetometer moving from one measuring point to the next typically generates an impulse signal. At the measuring point, some of the signals are attenuated sinusoidal signals, indicating that nonlinear signals are generated both at measuring and non-measuring points.

[0006] Wavelet transform filtering analyzes the signal's behavior at different frequencies and times, decomposing the signal into sub-signals of different frequencies. It then utilizes the characteristics of wavelets to extract signal features, thereby removing noise. Compared to mean filtering, median filtering, and Kalman filtering, wavelet transform filtering offers more comprehensive denoising performance. It can analyze signals at different scales and effectively preserves edges and details between different measurement points while denoising. It also performs stably when denoising non-stationary signals. However, selecting appropriate wavelet bases and thresholds requires some experience, and wavelet denoising algorithms present certain challenges in terms of computational complexity.

[0007] Existing pipeline magnetic signal feature extraction technologies focus on the already acquired stable magnetic signals. The main extraction method is to manually locate the measurement point and then select the magnetic signal at the measurement point location. However, the above-mentioned common denoising methods cannot achieve optimal results in the denoising process of the magnetic signal at the measurement point location. Summary of the Invention

[0008] To overcome the shortcomings of the prior art, the present invention aims to provide an adaptive extraction and denoising method, system, device, and medium for magnetic signals at measuring points in downhole pipelines. First, it utilizes the flexibility of time window variations in the adaptive short-time Fourier transform (STFT) to automatically extract magnetic signal data at the measuring point location. Then, it models the denoising process as a non-convex one-dimensional total variational denoising model, introducing a non-convex penalty function as a regularization term for the objective function. By adjusting the degree of non-convexity of the penalty function, the objective function maintains strict convexity, ultimately achieving denoising of the magnetic signals at the measuring point location and obtaining stable magnetic signals at the measuring point location.

[0009] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0010] An adaptive extraction and denoising method for magnetic signals at measurement points in downhole pipelines includes the following steps:

[0011] Step 1: Set the first magnetic signal data of the original noisy mixed magnetic signal y as the left boundary of the time window, and initialize the time window size w;

[0012] Step 2: For the initialized magnetic signal y within the time window w Perform an adaptive short-time Fourier transform to obtain the time spectrum F. w The scaled time spectrum F is processed using an inverse step function. w Perform the conversion to obtain the time-like spectrum.

[0013] Step 3: Measure the magnetic signal y within the time window. w Time-like spectrum Sparsity determination is performed based on the following criteria: 1. Time-like spectrum Does it exhibit high sparsity? II. Magnetic signal y within the time window. w Sampling frequency f in the frequency domain c and its harmonics k*f c At this point, is the sparsity consistent at every moment within the time window?

[0014] Step 4: If both judgment conditions in Step 3 are true, then determine the magnetic signal y within the time window. w The magnetic signal y at the measurement point position c The magnetic signal vector y at the measurement point location is merged into the magnetic signal vector. c In (t); if the results of the two judgment conditions in step 3 are not both yes, then the magnetic signal y in the judgment window is determined. w The magnetic signal y at the measurement point position is not the given value. c Then proceed to step 2, until all magnetic signals y within the time window have been traversed. w Extract the magnetic signals y at all measuring points. c The complete magnetic signal vector y at the measurement point location is obtained. c (t);

[0015] Step 5: Introduce the arctangent non-convex penalty function to construct a non-convex one-dimensional total variational denoising model;

[0016] Step 6: Based on the optimization and minimization strategy, the non-convex one-dimensional total variational denoising model is simplified to obtain the alternative iterative function; based on the bisection method, the parameter λ value in the alternative iterative function is set, and the complete magnetic signal vector y at the measurement point position is obtained. c (t) is used to denoise and obtain a stable magnetic signal at the measurement point.

[0017] The specific process of step 2 is as follows:

[0018] Step 2.1: Define a rectangular window function g σ (t), for the magnetic signal y within the time window w An adaptive short-time Fourier transform is performed to obtain the magnetic signal y within the time window.w Time spectrum F w ;

[0019] The rectangular window function g σ The expression for (t) is as follows:

[0020]

[0021] In the formula, σ represents the scaling factor, and σ > 0. And g(0)≠0; t represents the measurement time;

[0022] The expression for the adaptive short-time Fourier transform is as follows:

[0023]

[0024] In the formula, This represents the short-time Fourier transform of the magnetic signal at time t and sampling frequency f in the time domain, where y(τ) represents the input signal, i.e., the magnetic signal within the window. w τ represents the integral variable, i represents the complex unit, and g σ(t) Let σ(t) represent the short-time Fourier transform window function, and σ(t) represent the scaling function.

[0025] Step 2.2: Time spectrum F w Logarithmic scaling is performed using the following formula:

[0026] LogMagnitude(F w ) = 20log 10 |F w |

[0027] Step 2.3: Scale the logarithmically-scaled time-frequency spectrum F w Multiplying by the inverse step function yields the time-like spectrum. The inverse step function is as follows:

[0028]

[0029] In the formula, t represents the measurement time.

[0030] In step 3

[0031] Judgment condition 1: Setting the time-like spectrum Given an m*n matrix, the time-like spectrum... The sparse variable s is:

[0032]

[0033] In the formula, For time-like spectrum The L0 norm is the number of non-zero elements in a matrix.

[0034] If the time-like spectrum If the sparsity of the variable s is higher than 90%, it indicates a time-like spectrum. It exhibits high sparsity;

[0035] Judgment condition two: The magnetic signal y within the time window w Sampling frequency f in the frequency domain c and its harmonics k*f c The sparsity at each moment within the time window is represented as follows:

[0036]

[0037] In the formula, The sampling frequency f at time i within the time window is represented. c and its harmonics at k*f c The sparsity of z, where z is a Boolean variable;

[0038] If the sampling frequency at time i is f c If the value is 0, then the Boolean variable z = 0, and we have:

[0039]

[0040] Conversely, if the Boolean variable z = 1, then:

[0041]

[0042] Therefore, within the time window, the magnetic signal y w Sampling frequency f in the frequency domain c and its harmonics k*f c At any given moment, the sparsity is consistent, and there is exactly one value.

[0043] In step 4, the magnetic signal y within the time window is determined. w The magnetic signal y at the measurement point position c Then, the time window is expanded by one unit, i.e., the left boundary remains unchanged, w = w + 1; if the magnetic signal y within the time window is determined... w The magnetic signal y at the measurement point position is not the given value. c The window size remains the same as the initialized window size, i.e., w = f * t min The left edge of the time window is shifted one unit to the right.

[0044] The process of constructing the non-convex one-dimensional total variational denoising model in step 5 is as follows:

[0045] Step 5.1: Establish a classic one-dimensional total variational denoising model, the expression of which is as follows:

[0046]

[0047] In the formula, λ represents the regularization parameter. φ represents the penalty function. In the classic one-dimensional total variational denoising model, the penalty function is the L1 norm; x represents the magnetic signal at the measurement point location y. c The denoised estimated value; [Dx] n Let represent the nth component of vector Dx; D represents a first-order difference matrix of size (N-1)×N;

[0048] The objective function F(x) is related to To minimize the process, the expression is as follows:

[0049]

[0050] Step 5.2: Replace the penalty function φ(x) in the objective function F(x) with the arctangent non-convex penalty function φ1(x,a), and substitute it into the classic one-dimensional total variation denoising model to obtain the complete non-convex one-dimensional total variation denoising model;

[0051] The expression for the arctangent non-convex penalty function φ1(x,a) is as follows:

[0052]

[0053] In the formula, 'a' represents the adjustment parameter for the degree of non-convexity of the arctangent non-convex penalty function φ1(x,a). λ represents the regularization parameter;

[0054] The objective function F1(x) of the non-convex one-dimensional total variational denoising model is expressed as follows:

[0055]

[0056] In the formula, φ1 represents the arctangent non-convex penalty function.

[0057] This invention also provides an adaptive extraction and denoising system for magnetic signals at measurement points in downhole pipelines, comprising:

[0058] Time window initialization module: used to set the first magnetic signal data of the original noisy mixed magnetic signal y as the left boundary of the time window and initialize the time window size w;

[0059] Adaptive conversion module: used for converting the magnetic signal y within the initialized time window. w Perform an adaptive short-time Fourier transform to obtain the time spectrum F. w The scaled time spectrum F is processed using an inverse step function. w Perform the conversion to obtain the time-like spectrum.

[0060] Sparsity determination module: used for determining the magnetic signal y within the time window.w Time-like spectrum Sparsity determination is performed based on the following criteria: 1. Time-like spectrum Does it exhibit high sparsity? II. Magnetic signal y within the time window. w Sampling frequency f in the frequency domain c and its harmonics k*f c At this point, is the sparsity consistent at every moment within the time window?

[0061] Extraction module: If both judgment conditions are true, then the magnetic signal y within the judgment window is determined. w The magnetic signal y at the measurement point position c The magnetic signal vector y at the measurement point location is merged into the magnetic signal vector. c In (t); if the results of the two judgment conditions in step 3 are not both yes, then the magnetic signal y in the judgment window is determined. w The magnetic signal y at the measurement point position is not the given value. c Then proceed to step 2, until all magnetic signals y within the time window have been traversed. w Extract the magnetic signals y at all measuring points. c The complete magnetic signal vector y at the measurement point location is obtained. c (t);

[0062] Denoising model building module: Introduces the arctangent non-convex penalty function to build a non-convex one-dimensional total variational denoising model;

[0063] Denoising Module: Based on the optimization and minimization strategy, the non-convex one-dimensional total variational denoising model is simplified to obtain a replacement iterative function; based on the bisection method, the parameter λ value in the replacement iterative function is set to obtain the complete magnetic signal vector y of the measurement point position. c (t) is used to denoise and obtain a stable magnetic signal at the measurement point.

[0064] This invention also provides an adaptive extraction and denoising device for magnetic signals at measurement points in downhole pipelines, comprising:

[0065] Memory: A computer program that stores the above-mentioned adaptive extraction and denoising method for magnetic signals at the location of measuring points in a downhole pipeline, and is a computer-readable device;

[0066] Processor: Used to implement the above-described adaptive extraction and denoising method for magnetic signals at the location of a downhole pipeline measuring point when executing the computer program.

[0067] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, enables the implementation of the above-described adaptive extraction and denoising method for magnetic signals at the location of a downhole pipeline measuring point.

[0068] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0069] 1. This invention performs frequency domain conversion on the original noisy mixed magnetic signal through adaptive short-time Fourier transform, and utilizes the adaptive adjustability of the time window in the adaptive SFTF to flexibly change the size of the time window, thereby enabling more accurate and comprehensive positioning of the magnetic signal at the measurement point.

[0070] 2. This invention introduces the non-convex arctangent penalty function into the classical one-dimensional total variational denoising model (TVD) as a penalty function to construct a non-convex one-dimensional total variational denoising model to denoise the magnetic signal at the measurement point. By utilizing the non-convexity of the arctangent function, the convexity of the model is adjusted. Under the premise of ensuring that the optimized model is convex, the sparsity of the denoising result is maximized, ensuring that the magnetic signal at the measurement point changes abruptly while removing the small interference noise at the measurement point.

[0071] In summary, this invention proposes a method for directly extracting stationary magnetic signals at measurement points from original noisy mixed magnetic signals. This method not only achieves accurate and comprehensive positioning of the measurement points in the magnetic signal, but also adds a denoising function, thereby improving the practicality and convenience of the algorithm. Attached Figure Description

[0072] Figure 1 The flowchart shows an adaptive extraction and denoising method for magnetic signals at measurement points in underground pipelines.

[0073] Figure 2 This is the original noisy mixed magnetic signal spectrum obtained from the well magnetic detection experiment.

[0074] Figure 3 The image shows the original noisy mixed magnetic signal obtained from the well magnetic detection experiment and its time-frequency spectrum at the initial position. Figure 3 (a) is an enlarged view of the initial position of the original noisy mixed magnetic signal. Figure 3 (b) is the time spectrum diagram of the original noisy mixed magnetic signal at the initial position.

[0075] Figure 4 The image shows the original noisy mixed magnetic signal obtained from the well magnetic detection experiment and its time-like spectrum at the initial position. Figure 4 (a) is an enlarged view of the initial position of the original noisy mixed magnetic signal. Figure 4 (b) is the time-like spectrum of the original noisy mixed magnetic signal at its initial position.

[0076] Figure 5 The image shows the original noisy mixed magnetic signal obtained from the well magnetic detection experiment and its time-like spectrum at the location of the first measuring point. Figure 5 (a) is an enlarged view of the location of the first measurement point of the original noisy mixed magnetic signal. Figure 5 (b) is the time-like spectrum of the first measurement point of the original noisy mixed magnetic signal.

[0077] Figure 6 This is a magnetic signal diagram of all measuring points in the original noisy mixed magnetic signal obtained from the well magnetic detection test.

[0078] Figure 7 This is a combined image of the magnetic signals at all measuring points in the well magnetic detection test.

[0079] Figure 8 The image shows the denoised magnetic signal results of the magnetic signal at the measurement point location in the well magnetic detection test.

[0080] Figure 9 This is a comparison of the magnetic signals at the measurement points in the well magnetic detection test before and after denoising. Detailed Implementation

[0081] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0082] In this invention example, the original noisy mixed signal was acquired in Xianyang City, Shaanxi Province, China, with latitude and longitude ranging from N34°34'29.6385" to N34°34'30.3783" and E108°55'37.4147" to E108°55'37.6466". The magnetic probe measurement system is a planar cross-shaped design, with four triaxial magnetometers installed in the prototype. All magnetic probe sensors are manufactured by Bartington Corporation, model Mag648.

[0083] like Figure 1 As shown, an adaptive extraction and denoising method for magnetic signals at the location of measuring points in downhole pipelines includes the following steps:

[0084] Step 1: Obtain the original noisy mixed magnetic signal y, set the sampling frequency f of the original noisy mixed magnetic signal y, and set the first magnetic signal data of the original noisy mixed magnetic signal y as the left boundary of the time window; then initialize the time window size w.

[0085] like Figure 2 As shown, the observed original noisy mixed magnetic signal y is loaded. Figure 2 The original noisy mixed magnetic signal y is the magnetic signal from the entire well exploration process, with a sampling frequency f = 5Hz.

[0086] The initialization formula for the time window size w is:

[0087] w = f * t min

[0088] In the formula, t min The shortest measurement time is denoted by f, where f represents the sampling frequency of the original noisy mixed magnetic signal y; in this embodiment, the shortest measurement time t minIt lasts for 30 seconds.

[0089] Step 2: For the initialized magnetic signal y within the time window w Perform adaptive short-time Fourier transform (STFT) to obtain the time spectrum F. w The scaled time spectrum F is then logarithmically scaled; an inverse step function is used to scale the scaled time spectrum F. w Perform the conversion to obtain the time-like spectrum.

[0090] Step 2.1: Define a rectangular window function g σ (t), for the magnetic signal y within the time window w An adaptive short-time Fourier transform is performed to obtain the magnetic signal y within the time window. w Time spectrum F w ;

[0091] The rectangular window function g σ The expression for (t) is as follows:

[0092]

[0093] In the formula, σ represents the scaling factor, and σ > 0. And g(0)≠0; t represents the measurement time;

[0094] The expression for the adaptive STFT is as follows:

[0095]

[0096] In the formula, This represents the short-time Fourier transform of the magnetic signal at time t and sampling frequency f in the time domain, where y(τ) represents the input signal, i.e., the magnetic signal within the window. w τ represents the integral variable, i represents the complex unit, and g σ(t) Let σ(t) represent the short-time Fourier transform window function, and σ(t) represent the scaling function.

[0097] In this embodiment, the magnetic signal y within the initialized time window w The data length is 150. Since the data length is 150, the calculated parameter σ = w min / 2 = 75, w min This represents the minimum time window. In order to improve frequency resolution by zero padding while maintaining high time resolution, the block length is set to 8 and the Fourier transform length is set to 128.

[0098] Step 2.2: Time spectrum F w Logarithmic scaling is performed using the following formula:

[0099] LogMagnitude(F w ) = 20log10 |F w |

[0100] The time spectrum F w Visualization, such as Figure 3 As shown, the time spectrum F w The matrix size is 128*39.

[0101] Step 2.3: Scale the logarithmically-scaled time-frequency spectrum F w Multiplying by the inverse step function yields the time-like spectrum. like Figure 4 As shown, the inverse step function is as follows:

[0102]

[0103] In the formula, t represents the measurement time;

[0104] Step 3: Measure the magnetic signal y within the time window. w Time-like spectrum Sparsity determination is performed based on the following criteria: 1. Time-like spectrum Does it exhibit high sparsity? II. Magnetic signal y within the time window. w Sampling frequency f in the frequency domain c ( f represents the angular frequency and its harmonic k*f c Is the sparsity consistent at every time step (k<π,k∈Z)?

[0105] Judgment condition 1: Passing through the time-like spectrum The proportion of non-zero elements is used to measure the time-like spectrum. Sparsity, setting time-like spectrum Given an m*n matrix, the time-like spectrum... The sparse variable s is:

[0106]

[0107] In the formula, For time-like spectrum The L0 norm is the number of non-zero elements in a matrix.

[0108] If the time-like spectrum If the proportion of non-zero elements is higher than 90%, it indicates a time-like spectrum. It exhibits high sparsity, therefore the first criterion is true;

[0109] In this embodiment, the time-like spectrum function The sparsity of the variable s = 0.9287, i.e., the time-like spectrum. With 92.87% of the elements being 0, it indicates that the time-like spectrum... It exhibits high sparsity, therefore the first criterion is true;

[0110] Judgment condition two: The sampling frequency f in the frequency domain c and its harmonics k*f c The sparsity at each moment within the time window is represented as follows:

[0111]

[0112] In the formula, The sampling frequency f at time i within the time window is represented. c and harmonics k*f c The sparsity of z, where z is a Boolean variable;

[0113] If the sampling frequency at time i is f c If the value is 0, then the Boolean variable z = 0, and we have:

[0114]

[0115] Conversely, if the Boolean variable z = 1, then:

[0116]

[0117] Therefore, within the time window, the magnetic signal y w Sampling frequency f in the frequency domain c and its harmonics k*f c At each time step, the sparsity is consistent, and there is only one value. Therefore, the second condition is true.

[0118] In this embodiment, when the harmonic k*f in the frequency domain c k=1, that is, at the sampling frequency f c Place, such as Figure 4 As shown, the sparsity is inconsistent at each moment within the time window, so condition two is not true.

[0119] Step 4: If both judgment conditions in Step 3 are true, then determine the magnetic signal y within the time window. w The magnetic signal y at the measurement point position c The magnetic signal vector y at the measurement point location is merged into the magnetic signal vector. c In (t), the time window is expanded by one unit, i.e., the left boundary remains unchanged, w = w + 1; if the results of the two judgment conditions in step 3 are not both yes, then it is determined that the magnetic signal in the time window is not the magnetic signal of the measurement point position, and the size of the time window is still the initialized time window size, i.e., w = f * t min The left edge of the time window shifts one unit to the right;

[0120] In this embodiment, the first determination result in step 4 is yes, and the second determination result is no. Therefore, it is determined that the signal within the time window is not the magnetic signal of the measuring point position, and the time window size remains the initialized time window size, i.e., w = f * t. min The left edge of the time window is shifted one unit to the right.

[0121] Step 5: Proceed to Step 2 until all magnetic signals y within the time window have been traversed. w Extract the magnetic signals y at all measuring points. c The complete magnetic signal vector y at the measurement point location is obtained. c (t);

[0122] When the measurement point location is not determined, the time window size is the initial value: w = f * t min =5 * 30 = 150. When traversing to the measurement point location, if... Figure 5 As shown, Figure 5 The display shows that the first measurement point has been reached. Based on the judgment in step 4, both judgment results are "yes". Therefore, the magnetic signal y within this window is determined. w The magnetic signal y at the measurement point position c Traverse all noisy mixed magnetic signals y to determine the magnetic signal y at the measurement point location. c ,like Figure 6 As shown, the magnetic signals y at all measuring points are... c By merging, the complete magnetic signal vector y at the measurement point position is obtained. c (t), such as Figure 7 As shown.

[0123] Step 6: Construct a non-convex one-dimensional total variation denoising model by introducing an arctangent non-convex penalty function to replace the regularization term of the classic one-dimensional total variation denoising model (TVD).

[0124] Step 6.1: Extract the magnetic signal y of the measurement point position. c Treating the signal as a piecewise constant, a classic one-dimensional total variational denoising model is established, and the expression for its objective function F(x) is as follows:

[0125]

[0126] In the formula, λ represents the regularization parameter. φ represents the penalty function. In the classic one-dimensional total variational denoising model, the penalty function is the L1 norm; x represents the magnetic signal at the measurement point location y. c The denoised estimated value; [Dx] n Let represent the nth component of vector Dx; D represents a first-order difference matrix of size (N-1)×N, expressed as follows:

[0127]

[0128] The objective function F(x) is related to To minimize the process, the expression is as follows:

[0129]

[0130] In the above objective function F(x), the penalty function φ(x) = |x| is a convex function. In this case, since the minimum value of the objective function F(x) is unique, the objective function F(x) is strictly convex.

[0131] Step 6.2: In order to achieve better denoising effect in the process of recovering signals in flat regions, improve the overall sparsity of the objective function, and maintain strict convexity, the penalty function φ(x) is replaced with the arctangent non-convex penalty function and substituted into the classic one-dimensional total variation denoising model to obtain the complete non-convex one-dimensional total variation denoising model.

[0132] The expression for the arctangent non-convex penalty function φ1(x,a) is as follows:

[0133]

[0134] In the formula, 'a' represents the adjustment parameter for the degree of non-convexity of the arctangent non-convex penalty function φ1(x,a). λ represents the regularization parameter;

[0135] The objective function F1(x) of the non-convex one-dimensional total variational denoising model is expressed as follows:

[0136]

[0137] In the formula, φ1 represents the arctangent non-convex penalty function;

[0138] The sparsity of the optimization model is adjusted by using the parameter a in the arctangent non-convex penalty function φ1(x,a), which serves as the penalty function in the optimization model established in this invention, so that the objective function F1(x) exhibits convexity as a whole.

[0139] Step 7: Based on the optimal control minimization strategy, analyze the magnetic signal y at the measurement point location. c The non-convex one-dimensional total variational denoising model is simplified by constructing a more easily solvable alternative iteration function x for each iteration. (k+1) Based on the bisection method, a replacement iteration function x is set. (k+1) The parameter λ value in the measurement point is related to the magnetic signal vector y. c (t) Denoising is performed, and iterative calculations are used to achieve the optimal denoising effect, resulting in a stable magnetic signal at the measurement point location, such as Figure 9 As shown;

[0140] Based on the optimal control minimization strategy, the upper bound of the objective function F1(x) in step 6 is determined:

[0141]

[0142] In the formula, Λ is a diagonal matrix, and v is the parameter of the arctangent function in the optimization operator of the control minimization strategy; [Dv] n Let c(v) represent the nth component of vector Dv; c(v) represents a function of v, independent of x.

[0143] Then, based on the upper bound of the objective function F1(x), calculate the strip matrix F, which is more suitable for iterative calculation:

[0144]

[0145] In the formula, D represents a first-order difference matrix of size (N-1)×N, and T represents the transpose;

[0146] Next, we set the iteration count Nit to obtain the alternative iteration function x. (k+1) The denoised signal is calculated iteratively.

[0147] x (k+1) =y c -D T F\Dy c

[0148] In the formula, Dy c Represents vector Dy c The nth component;

[0149] Comparison with magnetic signal before denoising ( Figure 9 The denoising method of this invention introduces a non-convex penalty function to replace the regularization term of the classic one-dimensional total variational denoising model (TVD), constructing a non-convex one-dimensional total variational denoising model for denoising. While ensuring the model exhibits convexity, it further enhances the sparsity of the model, ensuring that the extracted magnetic signal changes abruptly at the measurement point location while removing minute interference noise at the measurement point location, such as... Figure 8 As shown.

[0150] This invention also provides an adaptive extraction and denoising system for magnetic signals at measurement points in downhole pipelines, comprising:

[0151] Time window initialization module: used to set the first magnetic signal data of the original noisy mixed magnetic signal y as the left boundary of the time window and initialize the time window size w;

[0152] Adaptive conversion module: used for converting the magnetic signal y within the initialized time window. w Perform an adaptive short-time Fourier transform to obtain the time spectrum F. w The scaled time spectrum F is processed using an inverse step function. w Perform the conversion to obtain the time-like spectrum.

[0153] Sparsity determination module: used for determining the magnetic signal y within the time window. w Time-like spectrum Sparsity determination is performed based on the following criteria: 1. Time-like spectrum Does it exhibit high sparsity? II. Magnetic signal y within the time window. w Sampling frequency f in the frequency domain c and its harmonics k*f c At this point, is the sparsity consistent at every moment within the time window?

[0154] Extraction module: If both judgment conditions are true, then the magnetic signal y within the judgment window is determined. w The magnetic signal y at the measurement point position c The magnetic signal vector y at the measurement point location is merged into the magnetic signal vector. c In (t); if the results of the two judgment conditions in step 3 are not both yes, then the magnetic signal y in the judgment window is determined. w The magnetic signal y at the measurement point position is not the given value. c Then proceed to step 2, until all magnetic signals y within the time window have been traversed. w Extract the magnetic signals y at all measuring points. c The complete magnetic signal vector y at the measurement point location is obtained. c (t);

[0155] Denoising model building module: Introduces the arctangent non-convex penalty function to build a non-convex one-dimensional total variational denoising model;

[0156] Denoising Module: Based on the optimization and minimization strategy, the non-convex one-dimensional total variational denoising model is simplified to obtain a replacement iterative function; based on the bisection method, the parameter λ value in the replacement iterative function is set to obtain the complete magnetic signal vector y of the measurement point position. c (t) is used to denoise and obtain a stable magnetic signal at the measurement point.

[0157] This invention also provides an adaptive extraction and denoising device for magnetic signals at measurement points in downhole pipelines, comprising:

[0158] Memory: A computer program that stores the above-mentioned adaptive extraction and denoising method for magnetic signals at the location of measuring points in a downhole pipeline, and is a computer-readable device;

[0159] Processor: Used to implement the above-mentioned adaptive extraction and denoising method for magnetic signals at the location of a downhole pipeline measuring point when executing the computer program.

[0160] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, enables the aforementioned adaptive extraction and denoising method for magnetic signals at the location of a downhole pipeline measuring point.

Claims

1. A method for adaptive extraction and denoising of magnetic signals from downhole pipe gauge locations, characterized in that, The method comprises the following steps: Step 1: setting the first magnetic signal data of the original noisy mixed magnetic signal y as the left boundary of a time window, and initializing the size w of the time window; Step 2: Perform adaptive short-time Fourier transform on the initialized time windowed magnetic signal y w to obtain time-frequency spectrum F w ; apply an inverse step function to the scaled time-frequency spectrum F w to obtain a quasi-time-frequency spectrum Step 3: Sparsity determination of the time-frequency-like spectrum of the time-windowed magnetic signal y w with the condition that:

1. the time-frequency-like spectrum is highly sparse; 2. the sparsity of each time instant within the time-windowed magnetic signal y w in the frequency domain at the sampling frequency f c and its harmonics k*f c is consistent.​ Step 4: If both decision criteria in step 3 result in yes, then decide the magnetic signal y w for the measurement point position c , is merged into the measurement point position magnetic signal vector y c (t) ; If the results of the two decision conditions of step 3 are not all yes, then determine the magnetic signal y w within the time window c ; then go to step 2 until all the magnetic signals y w within the time window are extracted c , and the complete magnetic signal vector y c (t) of the measuring point position is obtained Step 5: introducing an inverse tangent non-convex penalty function to construct a non-convex one-dimensional total variation denoising model; Step 6: Based on the optimal control minimization strategy, the non-convex one-dimensional total variation denoising model is simplified to obtain a substitute iterative function; based on the bisection method, the parameter λ value in the substitute iterative function is set to obtain the complete measured point position magnetic signal vector y c (t) denoising to obtain the stationary magnetic signal of the measured point position.

2. The adaptive extraction and denoising method of the magnetic signal of the measuring point position of the downhole pipe according to claim 1, characterized in that, The specific process of the step 2 is as follows: Step 2.1: Define a rectangular window function g σ (t) to the magnetic signal y w (t) within the time window, and get the time-frequency spectrum F w w of the magnetic signal y w (t) within the time window by adaptive short-time Fourier transform. The rectangular window function g σ The expression for (t) is as follows: wherein σ denotes a scale factor, σ > 0, and g(0)≠0; t denotes the time of the measuring point; The expression of the adaptive short-time Fourier transform is as follows: wherein denotes the short-time Fourier transform of the magnetic signal at time t and sampling frequency f in the time domain, y(τ) denotes the input signal, i.e. the magnetic signal y within the time window w ; τ denotes the integration variable, i denotes the imaginary unit, g σ(t) denotes the short-time Fourier transform window function, σ(t) denotes the scale function; Step 2.2: Log scaling of the time-frequency spectrum F w is performed, with the formula as follows: LogMagnitude(F w ) = 20 log 10 |F w | Step 2.3: Log-scaled time-frequency spectrum F w Multiplying with the inverse step function, we obtain the quasi-time- frequency spectrum The inverse step function is as follows: In the formula, t represents the time of a measuring point.

3. The adaptive extraction and denoising method of magnetic signal of downhole pipe measuring point position according to claim 1, characterized in that, In the step 3, Condition 1: Set class time-frequency spectrum For m*n matrix, the sparse variable s of class time-frequency spectrum is: wherein L0-norm of the class of time-frequency spectra L0-norm, i.e. the number of non-zero elements in the matrix; If the class time-frequency spectrum The sparsity variable s is higher than 90%, indicating that the class time-frequency spectrum Present high sparsity; Decision condition two: the magnetic signal y w Sampling frequency f in the frequency domain c And its harmonics k*f c The sparsity of each time in the time window is represented as: wherein represents the sparsity of the sampling frequency f at the i-th time instant within the time window c and its harmonics k*f c , z is a Boolean variable; If the sampling frequency f c If the value is 0, the Boolean variable z = 0, and we have: On the contrary, the Boolean variable z = 1, and Thus, within the time window, the magnetic signal y w has a sampling frequency f c in the frequency domain, and its harmonics k*f c At each time instant, the sparsity is consistent, and there is only one value.

4. The adaptive extraction and denoising method of magnetic signal of downhole pipe measuring point position according to claim 1, characterized in that, The step 4 determines whether the magnetic signal y in the time window w The magnetic signal y at the measuring point position c Then, the time window is enlarged by one unit, i.e. the left boundary is unchanged, w=w+1; if the magnetic signal y in the determination time window w The magnetic signal y at the measuring point position c The size of the time window is still the size of the initialized time window, i.e. w=f*t min The left boundary of the time window is right shifted by one unit.

5. The adaptive extraction and denoising method of magnetic signal of downhole pipe measuring point position according to claim 1, characterized in that, The process of constructing the non-convex one-dimensional total variation denoising model in the step 5 is as follows: Step 5.1: establishing a classical one-dimensional total variation denoising model, and the expression of the objective function F(x) of the classical one-dimensional total variation denoising model is as follows: where λ denotes a regularization parameter, φ denotes a penalty function, φ: In the classical one-dimensional total variation denoising model, the penalty function is L1-norm; x denotes the position of the measurement point c denotes the denoised estimate; [Dx] n denotes the n-th component of the vector Dx; D denotes a first-order difference matrix of size (N-1) x N; The objective function F(x) is minimized with respect to minimization process, expressed as follows: Step 5.2: replacing the penalty function φ(x) in the objective function F(x) with an inverse tangent non-convex penalty function φ1(x, a), and bringing the inverse tangent non-convex penalty function φ1(x, a) into the classical one-dimensional total variation denoising model to obtain a complete non-convex one-dimensional total variation denoising model; The expression of the inverse tangent non-convex penalty function φ1(x, a) is as follows: In the formula, a represents an adjustment parameter of the non-convex degree of the inverse tangent non-convex penalty function φ1(x, a), λ represents a regularization parameter; The expression of the objective function F1(x) of the non-convex one-dimensional total variation denoising model is as follows: In the formula, φ1 represents the inverse tangent non-convex penalty function.

6. A system for adaptive extraction and denoising of magnetic signals from downhole tubing measurement point locations based on the method of any one of claims 1 to 5, characterized in that, The method comprises the following steps: The time window initialization module is used for setting the first magnetic signal data of the original noisy mixed magnetic signal y as the left boundary of a time window, and initializing the size w of the time window; adaptive conversion module: for performing an adaptive short-time Fourier transform on the initialized time windowed magnetic signal y w to obtain a time-frequency spectrum F w ; using an inverse step function on the scaled time-frequency spectrum F w to obtain a quasi-time-frequency spectrum Sparse determination module: used for determining the sparsity of the quasi-time-frequency spectrum of the magnetic signal y w in the time window , with the following conditions: one, whether the quasi-time-frequency spectrum is highly sparse; two, whether the sparsity of each time point in the time window is consistent at the sampling frequency f c and its harmonic k*f c in the frequency domain of the magnetic signal y w ​ Extraction module: if both decision condition results are yes, then the magnetic signal y w at the measurement point position is determined as the magnetic signal y c at the measurement point position is determined as the magnetic signal y c (t) is combined into the measurement point position magnetic signal vector y If the results of the two decision criteria of step 3 are not all yes, then determine the magnetic signal y w within the time window c ; then go to step 2 until all the magnetic signals y w within the time window are traversed c , extract all the magnetic signals y c (t) at the measurement point positions c (t) The denoising model construction module is used for introducing an inverse tangent non-convex penalty function to construct a non-convex one-dimensional total variation denoising model; The denoising module: based on the optimal control minimization strategy, a non-convex one-dimensional total variation denoising model is simplified to obtain a substitute iterative function; based on the bisection method, the parameter λ value in the substitute iterative function is set to obtain the complete measurement point position magnetic signal vector y c (t) denoising to obtain the stationary magnetic signal of the measurement point position.

7. An adaptive extraction and denoising device of magnetic signals of downhole pipe measurement point position, characterized in that, The method comprises the following steps: The memory is used for storing a computer program of the adaptive extraction and denoising method of the downhole pipe measuring point position magnetic signal in any one of claims 1-5, and is a device readable by a computer; The processor is used for executing the computer program to realize the adaptive extraction and denoising method of the downhole pipe measuring point position magnetic signal in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that: The computer readable storage medium stores a computer program, and the computer program can realize the adaptive extraction and denoising method of the downhole pipe measuring point position magnetic signal in any one of claims 1-5 when executed by the processor.

Citation Information

Patent Citations

  • Pipeline leakage detection method fusing vibration signal multivariate time-frequency domain characteristics

    CN118687097A

  • Artificial source electromagnetic exploration denoising method and system based on STL-FMD decomposition algorithm, terminal and medium

    CN119165544A