Self-adaptive extraction and denoising method, system and equipment for magnetic signals at measuring point positions of underground pipeline and medium
The magnetic signal at the downhole pipeline measurement point position is extracted through adaptive short-time Fourier transform, and the non-convex one-dimensional fully variable noise denoising model is used to denoise, which solves the problem of poor extraction and denoising effect of measuring point position magnetic signal in the prior art, and achieves accurate positioning and efficient denoising.
Patent Information
- Application Number
- CN202510173025.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-17
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2045-02-17
AI Technical Summary
The prior art is difficult to adaptively extract the magnetic signal at the measurement point position of the downhole pipeline and cannot achieve the optimal effect during the denoising process, especially in the handheld and non-orbital measurement trajectories, the non-stationarity of the signal is significant.
Adaptive short-time Fourier transform (STFT) is used to extract the magnetic signal at the measurement point position, and the denoising process is modeled as a non-convex one-dimensional fully variable noise denoising model, and an arctangent non-convex penalty function is introduced to adjust the convexity of the model to realize the denoising of the magnetic signal at the measurement point position.
It realizes accurate and comprehensive positioning and denoising of the magnetic signal at the measuring point position, improves the practicality and convenience of the algorithm, and can remove tiny interference noise while ensuring signal stability.
Smart Images

Figure CN120028868A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of signal feature extraction, and in particular relates to a method, system, equipment and medium for adaptively extracting and denoising magnetic signals of underground pipeline measuring point positions. Background Art
[0002] When using a magnetometer to perform inversion detection of underground oil casing or buried pipelines, point-by-point measurement can ensure the acquisition of stable magnetic signals along the predetermined route. The magnetic signal at the measuring point is the magnetic signal synthesized by the magnetometer when the measuring point is stationary. The existing method for extracting magnetic signals at measuring point locations is usually artificially selected from the observed signals. How to adaptively extract the magnetic signal of the time period where the measuring point location is located from the observed signals and filter and denoise it is a task with important engineering significance and practical value in the field of magnetic detection engineering.
[0003] Theoretically, the magnetometer at the measuring point position remains stationary, and the fluctuation range of the measured value is small. The magnetic signal at the measuring point position can be extracted by limiting the time window threshold range. However, in practice, although it is observed that the magnetometer carrier has been stationary, the collected magnetic signal still has a quasi-periodic change phenomenon, especially in handheld and non-orbital measurement trajectories, the non-stationarity of the signal is more significant. The most direct way to extract the magnetic signal at the measuring point position from the original observation signal is manual selection. Through approximate time positioning, the time domain characteristics of the observation signal are estimated, and the magnetic signal at the measuring point position is extracted. However, manual selection is usually subjective, and there will inevitably be deviations in the boundary judgment of the measuring point position time window, which makes it impossible to accurately judge the specific range of the measuring point position time window.
[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 smoothes the signal and reduces noise by averaging adjacent data points of the signal, while median filtering can retain mutations between measurement points, distinguish different measurement points, and retain edges. Both denoising methods use a neighborhood window to calculate the filtering results, usually operating on the neighborhood data around the current signal.
[0005] Kalman filtering obtains accurate results by assuming the system state and observation model and using the current observation data to update the estimate of the system state. It can be attributed to a recursive filtering technology based on the state space model and is widely used in dynamic systems. However, since the assumed model is linear and the noise must be Gaussian distributed, the most important thing is to have an accurate system and noise model. If an incorrect or fuzzy model is established for Kalman filtering, it will lead to inaccurate estimates. In magnetic detection, the startup process of the magnetometer from one measuring point position to the next measuring point position usually generates an impact signal. At the measuring point position, some measuring point signals are quasi-attenuated sinusoidal signals. It can be seen that nonlinear signals will be generated regardless of whether it is at the measuring point or non-measuring point position.
[0006] Wavelet transform filtering analyzes the signal's behavior at different frequencies and times, decomposes the signal into sub-signals of different frequencies, and uses the characteristics of wavelets to extract the signal's features, thereby removing noise. Compared with mean filtering, median filtering, and Kalman filtering, wavelet transform filtering denoising has more comprehensive denoising performance. It can analyze signals at different scales, and can well preserve the edges and details between signals at different measurement points while denoising. It can also perform stably when denoising non-stationary signals. However, choosing the appropriate wavelet basis and threshold requires certain experience, and the wavelet denoising algorithm has certain challenges in computational complexity.
[0007] The existing pipeline magnetic signal feature extraction technology focuses on the stable magnetic signals that have been obtained. The main method of extracting the magnetic signals at the measuring point is to manually locate the measuring point and then select the magnetic signals at the measuring point. However, the denoising process of the magnetic signals at the measuring point cannot achieve the optimal effect using the above commonly used denoising methods. Summary of the invention
[0008] In order to overcome the shortcomings of the above-mentioned prior art, the purpose of the present invention is to provide a method, system, equipment and medium for adaptive extraction and denoising of magnetic signals at measuring point positions of downhole pipelines. First, the flexibility of time window changes in adaptive short-time Fourier transform (STFT) is used to automatically extract magnetic signal data at the measuring point position, and then the denoising process is modeled as a non-convex one-dimensional total variation denoising model. A non-convex penalty function is introduced as a regularization term of the objective function, and the non-convexity of the penalty function is adjusted so that the objective function still maintains strict convexity, thereby finally achieving denoising of the magnetic signals at the measuring point position and obtaining a stable magnetic signal at the measuring point position.
[0009] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0010] A method for adaptively extracting and denoising magnetic signals of underground pipeline measuring point positions, comprising 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: Initialize the magnetic signal y in the time window w Perform adaptive short-time Fourier transform to obtain the time-frequency spectrum F w ; Use the inverse step function to scale the time-frequency spectrum F w Convert to get a time-like spectrum
[0013] Step 3: Magnetic signal y in the time window w Time-like spectrum To determine the sparsity, the criteria are: 1. Time spectrum Whether it is highly sparse; 2. The magnetic signal y in the time window w Sampling frequency f in the frequency domain c and its harmonic k*f c Whether the sparsity of each moment in the time window is consistent;
[0014] Step 4: If the results of both judgment conditions in step 3 are yes, then the magnetic signal y in the judgment window w is the magnetic signal y at the measuring point c , merged into the magnetic signal vector y at the measuring point c (t); if the two judgment conditions in step 3 are not all yes, then the magnetic signal y in the judgment window w Not the magnetic signal y of the measuring point c ; Then go to step 2 until all magnetic signals y in the time window are traversed w , extract the magnetic signal y of all measuring points c , get the complete magnetic signal vector y of the measuring point position c (t);
[0015] Step 5: Introduce the inverse tangent non-convex penalty function and construct a non-convex one-dimensional total variation denoising model;
[0016] Step 6: Based on the optimal control minimization strategy, the non-convex one-dimensional total variation denoising model is simplified to obtain the alternative iterative function; based on the bisection method, the parameter λ in the alternative iterative function is set to calculate the complete magnetic signal vector y of the measuring point position. c (t) De-noising is performed to obtain a stable magnetic signal at the measuring point.
[0017] The specific process of step 2 is as follows:
[0018] Step 2.1: Define a rectangular window function g σ (t), the magnetic signal y in the time window w Perform adaptive short-time Fourier transform to obtain the magnetic signal y in the time windoww The time spectrum F w ;
[0019] The rectangular window function g σ The expression of (t) is as follows:
[0020]
[0021] Where σ represents the scale factor, σ>0, And g(0)≠0; t represents the time of the measuring point;
[0022] The expression of the adaptive short-time Fourier transform is as follows:
[0023]
[0024] In the formula, represents the short-time Fourier transform of the magnetic signal at time t and sampling frequency f in the time domain, y(τ) represents the input signal, and the magnetic signal y in the instantaneous window w ; τ represents the integral variable, i represents the complex unit, g σ(t) represents the short-time Fourier transform window function, σ(t) represents the scaling function;
[0025] Step 2.2: Time spectrum F w Logarithmic scaling is performed, and the formula is as follows:
[0026] LogMagnitude(F w )=20log 10 |F w |
[0027] Step 2.3: Logarithmically scale the time-frequency spectrum F w Multiplying with the inverse step function gives a time-like spectrum The inverse step function is as follows:
[0028]
[0029] Where t represents the measuring point time.
[0030] In step 3,
[0031] Judgment condition 1: Setting the time spectrum is an m*n matrix, then the time-frequency spectrum The sparsity variable s is:
[0032]
[0033] In the formula, Time spectrum The L0-norm of , that is, the number of non-zero elements in the matrix;
[0034] If the time spectrum If the sparsity variable s is higher than 90%, it indicates a time-frequency spectrum. It exhibits high sparsity;
[0035] Judgment condition 2: Magnetic signal y within the time window w Sampling frequency f in the frequency domain c and its harmonic k*f c The sparsity of each moment in the time window is expressed as:
[0036]
[0037] In the formula, Indicates the sampling frequency f at the i-th moment in the time window c and its harmonics k*f c The sparsity of , z is a Boolean variable;
[0038] If the sampling frequency f at the i-th moment c The value is 0, then the Boolean variable z=0, and we have:
[0039]
[0040] Conversely, if the Boolean variable z=1, we have:
[0041]
[0042] Therefore, within the time window, the magnetic signal y w Sampling frequency f in the frequency domain c and its harmonic k*f c At each moment, the sparsity is consistent, with one and only one value.
[0043] In step 4, the magnetic signal y in the time window is determined w is the magnetic signal y at the measuring point c After that, the time window is expanded by one unit, that is, the left boundary remains unchanged, w = w + 1; if the magnetic signal y in the time window is determined w Not the magnetic signal y of the measuring point c , the time window size is still the time window size after initialization, that is, w = f*t min , the left boundary of the time window moves one unit to the right.
[0044] The process of the non-convex one-dimensional total variation denoising model constructed in step 5 is as follows:
[0045] Step 5.1: Establish a classic one-dimensional total variation denoising model, and the expression of its objective function F(x) is as follows:
[0046]
[0047] In the formula, λ represents the regularization parameter, φ represents the penalty function, The penalty function in the classic one-dimensional total variation denoising model is the L1-norm; x represents the magnetic signal y at the measuring point c Estimated value after denoising; [Dx] n represents the nth component of the vector Dx; D represents the first-order difference matrix of size (N-1)×N;
[0048] The objective function F(x) is related to For minimization, the expression is as follows:
[0049]
[0050] Step 5.2: Replace the penalty function φ(x) in the objective function F(x) with the inverse tangent non-convex penalty function φ 1 (x, a), is brought into the classic one-dimensional total variation denoising model to obtain a complete non-convex one-dimensional total variation denoising model;
[0051] The inverse tangent non-convex penalty function φ 1 The expression of (x,a) is as follows:
[0052]
[0053] Where a represents the inverse tangent non-convex penalty function φ 1 (x,a) is a tuning parameter for the degree of non-convexity, λ represents the regularization parameter;
[0054] The objective function F of the non-convex one-dimensional total variation denoising model is 1 The expression of (x) is as follows:
[0055]
[0056] In the formula, φ 1 represents the inverse tangent non-convex penalty function.
[0057] The present invention also provides an adaptive extraction and denoising system for magnetic signals of underground pipeline measuring point positions, 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 to convert the magnetic signal y in the initialized time window w Perform adaptive short-time Fourier transform to obtain the time-frequency spectrum F w ; Use the inverse step function to scale the time-frequency spectrum F w Convert to get a time-like spectrum
[0060] Sparsity determination module: used to determine the magnetic signal y within the time window w Time-like spectrum To determine the sparsity, the criteria are: 1. Time spectrum Whether it is highly sparse; 2. The magnetic signal y in the time window w Sampling frequency f in the frequency domain c and its harmonic k*f c Whether the sparsity of each moment in the time window is consistent;
[0061] Extraction module: If the results of both judgment conditions are yes, the magnetic signal y in the judgment window w is the magnetic signal y at the measuring point c , merged into the magnetic signal vector y at the measuring point c (t); if the two judgment conditions in step 3 are not all yes, then the magnetic signal y in the judgment window w Not the magnetic signal y of the measuring point c ; Then go to step 2 until all magnetic signals y in the time window are traversed w , extract the magnetic signal y of all measuring points c , get the complete magnetic signal vector y of the measuring point position c (t);
[0062] Denoising model construction module: Introducing the inverse tangent non-convex penalty function to construct a non-convex one-dimensional total variation denoising model;
[0063] Denoising module: Based on the optimal control minimization strategy, the non-convex one-dimensional total variation denoising model is simplified to obtain the alternative iterative function; based on the dichotomy method, the parameter λ value in the alternative iterative function is set to calculate the complete magnetic signal vector y of the measuring point position. c (t) De-noising is performed to obtain a stable magnetic signal at the measuring point.
[0064] The present invention also provides an adaptive extraction and denoising device for magnetic signals of underground pipeline measuring point positions, comprising:
[0065] Memory: a computer program for storing the above-mentioned method for adaptively extracting and denoising magnetic signals of downhole pipeline measuring point positions, which is a computer-readable device;
[0066] Processor: used to implement the above-mentioned method for adaptively extracting and denoising magnetic signals of measuring points at downhole pipeline locations when executing the computer program.
[0067] The present invention also provides a computer-readable storage medium storing a computer program, which can implement the above-mentioned method for adaptively extracting and denoising magnetic signals of measuring points at downhole pipelines when executed by a processor.
[0068] Compared with the prior art, the present invention has the following beneficial effects:
[0069] 1. The present 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, so as to more accurately and comprehensively locate the magnetic signal of the measuring point.
[0070] 2. The present invention introduces the inverse tangent non-convex penalty function into the classic one-dimensional total variation denoising model (TVD) as a penalty function, constructs a non-convex one-dimensional total variation denoising model, denoises the magnetic signal at the measuring point, and uses the non-convexity of the inverse tangent function to adjust the convexity of the model. On the premise of ensuring that the optimization model is convex, the sparsity of the denoising result is maximized, and while ensuring the mutation of the magnetic signal at the measuring point, the tiny interference noise at the measuring point is removed.
[0071] In summary, the present invention proposes a method for extracting a stable magnetic signal of a measuring point position directly from an original noisy mixed magnetic signal, which not only realizes accurate and comprehensive positioning of the measuring point position of the magnetic signal, but also adds a denoising function, thereby improving the practicability and convenience of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] Figure 1 The flowchart of the adaptive extraction and denoising method of magnetic signals at downhole pipeline measuring point locations.
[0073] Figure 2 This is the original noisy mixed magnetic signal spectrum obtained from the well magnetic detection test.
[0074] Figure 3 is the original noisy mixed magnetic signal obtained from the borehole magnetic detection test and its time spectrum at the initial position, where: Figure 3 (a) is the enlarged image of the initial position of the original noisy mixed magnetic signal. Figure 3 (b) is the time-frequency spectrum of the original noisy mixed magnetic signal at the initial position.
[0075] Figure 4 is the original noisy mixed magnetic signal obtained from the borehole magnetic detection test and its time-like spectrum at the initial position, where: Figure 4 (a) is the enlarged image of the initial position of the original noisy mixed magnetic signal. Figure 4 (b) is the time-like spectrum diagram at the initial position of the original noisy mixed magnetic signal.
[0076] Figure 5This is the original noisy mixed magnetic signal obtained from the borehole magnetic detection test and the time-frequency spectrum of the first measuring point position, where: Figure 5 (a) is the enlarged view of the first measuring point position of the original noisy mixed magnetic signal. Figure 5 (b) is the time-frequency spectrum of the first measuring point of the original noisy mixed magnetic signal.
[0077] Figure 6 This is the magnetic signal map 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 map of magnetic signals at all measuring points in the well magnetic detection test.
[0079] Figure 8 This is the result diagram of the denoised magnetic signal of the measuring point in the magnetic detection test in the well.
[0080] Fig. 9 This is a comparison diagram of the magnetic signals before and after denoising at the measuring point of the magnetic detection test in the well. DETAILED DESCRIPTION
[0081] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0082] The original noisy mixed signal acquisition location in the present invention example is located in Xianyang City, Shaanxi Province, China, with a latitude and longitude range of N34°34'29.6385"-N34°34'30.3783", E108°55'37.4147"-E108°55'37.6466", field acquisition map. The magnetic probe measurement system is a plane cross type, and four three-axis magnetometers are installed in the test prototype. The magnetic probe sensors are all produced by Bartington Company, model Mag648.
[0083] like Figure 1 As shown, a method for adaptively extracting and denoising magnetic signals of underground pipeline measuring point positions 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, 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 original noisy mixed magnetic signal y is loaded and observed. Figure 2 The original noisy mixed magnetic signal y is the full-process magnetic signal of a well detection, and the signal sampling frequency f=5Hz.
[0086] The initialization formula of the time window size w is:
[0087] w=f*t min
[0088] Where, t min represents the shortest measurement time, and f represents the sampling frequency of the original noisy mixed magnetic signal y; in this embodiment, the shortest measurement time t min for 30 seconds.
[0089] Step 2: Initialize the magnetic signal y in the time window w Perform adaptive short-time Fourier transform (S TFT) to obtain the time-frequency spectrum F w , and logarithmically scale it; the scaled time-frequency spectrum F is calibrated using an inverse step function w Convert to get a time-like spectrum
[0090] Step 2.1: Define a rectangular window function g σ (t), the magnetic signal y in the time window w Perform adaptive short-time Fourier transform to obtain the magnetic signal y in the time window w The time spectrum F w ;
[0091] The rectangular window function g σ The expression of (t) is as follows:
[0092]
[0093] Where σ represents the scale factor, σ>0, And g(0)≠0; t represents the time of the measuring point;
[0094] The expression of the adaptive STFT is as follows:
[0095]
[0096] In the formula, represents the short-time Fourier transform of the magnetic signal at time t and sampling frequency f in the time domain, y(τ) represents the input signal, and the magnetic signal y in the instantaneous window w ; τ represents the integral variable, i represents the complex unit, g σ(t) represents the short-time Fourier transform window function, σ(t) represents the scaling function;
[0097] In this embodiment, the magnetic signal y in the time window after initialization w The data length is 150. Since the data length is 150, the calculated parameter σ = w min / 2=75,w min represents the minimum time window. In order to improve the frequency resolution by zero padding while maintaining a 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, and the formula is as follows:
[0099] LogMagnitude(F w )=20log 10 |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: Logarithmically scale the time-frequency spectrum F w Multiplying with the inverse step function gives a time-like spectrum like Figure 4 As shown, the inverse step function is as follows:
[0102]
[0103] In the formula, t represents the measuring point time;
[0104] Step 3: Magnetic signal y in the time window w Time-like spectrum To determine the sparsity, the criteria are: 1. Time spectrum Whether it is highly sparse; 2. The magnetic signal y in the time window w Sampling frequency f in the frequency domain c ( f represents the angular frequency) and its harmonic k*f c (k<π,k∈Z), whether the sparsity is consistent at each moment;
[0105] Judgment condition 1: through time-like spectrum The ratio of non-zero elements in the time-frequency spectrum is used to measure the time-frequency spectrum. Sparsity, set the class time spectrum is an m*n matrix, then the time-frequency spectrum The sparsity variable s is:
[0106]
[0107] In the formula, Time spectrum The L0-norm of , that is, the number of non-zero elements in the matrix;
[0108] If the time spectrum The proportion of non-zero elements in the time spectrum is higher than 90%, indicating that the It shows high sparsity, so the judgment condition 1 is yes;
[0109] In this embodiment, the time spectrum function The sparsity variable s = 0.9287, which is a time-frequency spectrum 92.87% of the elements are 0, indicating a time-frequency spectrum. It shows high sparsity, so the judgment condition 1 is yes;
[0110] Judgment condition 2: Sampling frequency f in the frequency domain c and its harmonic k*f c The sparsity of each moment in the time window is expressed as:
[0111]
[0112] In the formula, Indicates the sampling frequency f at the i-th moment in the time window c And k*f at harmonics c The sparsity of , z is a Boolean variable;
[0113] If the sampling frequency f at the i-th moment c The value is 0, then the Boolean variable z=0, and we have:
[0114]
[0115] Conversely, if the Boolean variable z=1, we have:
[0116]
[0117] Therefore, within the time window, the magnetic signal y w Sampling frequency f in the frequency domain c and its harmonic k*f c At each moment, the sparsity is consistent, and there is only one value, so the judgment condition 2 is yes.
[0118] In this embodiment, when the harmonic k*f in the frequency domain c k = 1, that is, at the sampling frequency f c Where Figure 4 As shown, the sparsity at each moment in the time window is inconsistent, so the second condition is determined to be no.
[0119] Step 4: If the results of both judgment conditions in step 3 are yes, then the magnetic signal y in the judgment window w is the magnetic signal y at the measuring point c , merged into the magnetic signal vector y at the measuring point c (t), and expand the time window by one unit, that is, the left boundary remains unchanged, w = w + 1; if the results of the two judgment conditions in step 3 are not all yes, then it is judged that the magnetic signal in the time window is not the magnetic signal of the measuring point position, and the time window size is still the time window size after initialization, that is, w = f*tmin , the left boundary of the time window moves one unit to the right;
[0120] In this embodiment, the first judgment result in step 4 is yes, and the second judgment result is no, so the signal in the time window is judged not to be a magnetic signal of the measuring point position, and the time window size is still the time window size after initialization, that is, w = f*t min , the left boundary of the time window moves one unit to the right.
[0121] Step 5: Go to step 2 until all magnetic signals y in the time window are traversed w , extract the magnetic signal y of all measuring points c , get the complete magnetic signal vector y of the measuring point position c (t);
[0122] When the measuring point position is not determined, the time window size is the initial value: w = f*t min =5*30=150. When traversing to the measuring point, if Figure 5 As shown, Figure 5 It shows that the first measuring point has been traversed. Through step 4, the two judgment results are both yes, and the magnetic signal y in the window is judged. w is the magnetic signal y at the measuring point c Traverse all the noisy mixed magnetic signals y and determine the magnetic signal y at the measuring point c ,like Figure 6 As shown, the magnetic signals y at all measuring points are c Merge to get the complete magnetic signal vector y of the measuring point position c (t), such as Figure 7 shown.
[0123] Step 6: By introducing the inverse tangent non-convex penalty function to replace the regularization term of the classic one-dimensional total variation denoising model (TVD), a non-convex one-dimensional total variation denoising model is constructed;
[0124] Step 6.1: Extract the magnetic signal y of the measuring point c It is regarded as a piecewise constant signal and a classic one-dimensional total variation denoising model is established. The expression of its objective function F(x) is as follows:
[0125]
[0126] In the formula, λ represents the regularization parameter, φ represents the penalty function, The penalty function in the classic one-dimensional total variation denoising model is the L1-norm; x represents the magnetic signal y at the measuring point c Estimated value after denoising; [Dx] n represents the nth component of the vector Dx; D represents the first-order difference matrix of size (N-1)×N, and the expression is as follows:
[0127]
[0128] The objective function F(x) is related to For minimization, the expression is as follows:
[0129]
[0130] The penalty function φ(x)=|x| in the above objective function F(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 restoring the signal in the flat area, improve the overall sparsity of the objective function, and maintain strict convexity, the penalty function φ(x) is replaced by the inverse tangent non-convex penalty function and introduced into the classic one-dimensional total variation denoising model to obtain a complete non-convex one-dimensional total variation denoising model;
[0132] The inverse tangent non-convex penalty function φ 1 The expression of (x,a) is as follows:
[0133]
[0134] Where a represents the inverse tangent non-convex penalty function φ 1 (x,a) is a tuning parameter for the degree of non-convexity, λ represents the regularization parameter;
[0135] The objective function F of the non-convex one-dimensional total variation denoising model is 1 The expression of (x) is as follows:
[0136]
[0137] In the formula, φ 1 represents the inverse tangent non-convex penalty function;
[0138] Through the inverse tangent non-convex penalty function φ 1 The parameter a in (x, a) is used to adjust the sparsity of the optimization model as the penalty function in the optimization model established by the present invention, so that the objective function F 1 (x) The overall property is convex.
[0139] Step 7: Based on the optimal control minimization strategy, the magnetic signal y at the measuring point is c The non-convex one-dimensional total variation denoising model is simplified, and an alternative iterative function x that is easier to solve is constructed for each iteration. (k+1) ; Based on the binary search method, set the alternative iteration function x (k+1)The parameter λ in the measurement point position magnetic signal vector y c (t) De-noising is performed, and iterative calculation is performed to achieve the optimal de-noising effect, and a stable magnetic signal at the measuring point is obtained, such as Fig. 9 As shown;
[0140] Based on the optimal control minimization strategy, determine the objective function F in step 6 1 Upper bound of (x):
[0141]
[0142] Where Λ is a diagonal matrix, v is the parameter of the inverse tangent function in the optimal control minimization strategy to optimize the operator; [Dv] n represents the nth component of the vector Dv; c(v) represents a function about v and is independent of x;
[0143] According to the objective function F 1 The upper bound of (x) is calculated for a banded matrix F which is more suitable for iterative computation:
[0144]
[0145] Where D represents the first-order difference matrix of size (N-1)×N, and T represents transpose;
[0146] Then set the number of iterations Nit to get the alternative iteration function x (k+1) , loop iteratively calculates the denoised signal:
[0147] x (k+1) =y c -D T F\Dy c
[0148] Where Dy c Represents the vector Dy c The nth component of ;
[0149] Compared with the magnetic signal before denoising ( Fig. 9 ), the denoising method of the present invention introduces a non-convex penalty function to replace the regular term of the classical one-dimensional total variation denoising model (TVD), and constructs a non-convex one-dimensional total variation denoising model for denoising. On the basis of ensuring that the model presents convexity, the sparsity of the model is further enhanced, and the magnetic signal mutation of the extracted measuring point position is ensured, while the tiny interference noise of the measuring point position is removed. Figure 8 shown.
[0150] The present invention also provides an adaptive extraction and denoising system for magnetic signals of underground pipeline measuring point positions, 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 to convert the magnetic signal y in the initialized time window w Perform adaptive short-time Fourier transform to obtain the time-frequency spectrum F w ; Use the inverse step function to scale the time-frequency spectrum F w Convert to get a time-like spectrum
[0153] Sparsity determination module: used to determine the magnetic signal y within the time window w Time-like spectrum To determine the sparsity, the criteria are: 1. Time spectrum Whether it is highly sparse; 2. The magnetic signal y in the time window w Sampling frequency f in the frequency domain c and its harmonic k*f c Whether the sparsity of each moment in the time window is consistent;
[0154] Extraction module: If the results of both judgment conditions are yes, the magnetic signal y in the judgment window w is the magnetic signal y at the measuring point c , merged into the magnetic signal vector y at the measuring point c (t); if the two judgment conditions in step 3 are not all yes, then the magnetic signal y in the judgment window w Not the magnetic signal y of the measuring point c ; Then go to step 2 until all magnetic signals y in the time window are traversed w , extract the magnetic signal y of all measuring points c , get the complete magnetic signal vector y of the measuring point position c (t);
[0155] Denoising model construction module: Introducing the inverse tangent non-convex penalty function to construct a non-convex one-dimensional total variation denoising model;
[0156] Denoising module: Based on the optimal control minimization strategy, the non-convex one-dimensional total variation denoising model is simplified to obtain the alternative iterative function; based on the dichotomy method, the parameter λ value in the alternative iterative function is set to calculate the complete magnetic signal vector y of the measuring point position. c (t) De-noising is performed to obtain a stable magnetic signal at the measuring point.
[0157] The present invention also provides an adaptive extraction and denoising device for magnetic signals of underground pipeline measuring point positions, comprising:
[0158] Memory: a computer program storing the above-mentioned method for adaptively extracting and denoising magnetic signals of downhole pipeline measuring point positions, which is a computer-readable device;
[0159] Processor: used to implement the above-mentioned method for adaptively extracting and denoising magnetic signals of measuring points at downhole pipelines when executing the computer program.
[0160] The present invention also provides a computer-readable storage medium storing a computer program, which can implement the above-mentioned method for adaptively extracting and denoising magnetic signals of downhole pipeline measuring point positions when executed by a processor.
Claims
1. A method for adaptively extracting and denoising magnetic signals from underground pipeline measuring points, characterized in that: The following steps are involved: 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; Step 2: Initialize the magnetic signal y in the time window w Perform adaptive short-time Fourier transform to obtain the time-frequency spectrum F w ; Use the inverse step function to scale the time-frequency spectrum F w Convert to get a time-like spectrum Step 3: Magnetic signal y in the time window w Time-like spectrum To determine the sparsity, the criteria are:
1. Time spectrum Whether it is highly sparse; 2. The magnetic signal y in the time window w Sampling frequency f in the frequency domain c and its harmonic k*f c Whether the sparsity of each moment in the time window is consistent; Step 4: If the results of both judgment conditions in step 3 are yes, then the magnetic signal y in the judgment window w is the magnetic signal y at the measuring point c , merged into the magnetic signal vector y at the measuring point c (t) medium; If the two judgment conditions in step 3 are not all yes, then the magnetic signal y in the judgment window w Not the magnetic signal y of the measuring point c ; Then go to step 2 until all magnetic signals y in the time window are traversed w , extract the magnetic signal y of all measuring points c , get the complete magnetic signal vector y of the measuring point position c (t); Step 5: Introduce the inverse tangent non-convex penalty function and 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 the alternative iterative function; based on the bisection method, the parameter λ in the alternative iterative function is set to calculate the complete magnetic signal vector y of the measuring point position. c (t) De-noising is performed to obtain a stable magnetic signal at the measuring point.
2. The method for adaptively extracting and denoising magnetic signals of underground pipeline measuring point positions according to claim 1 is characterized in that: The specific process of step 2 is as follows: Step 2.1: Define a rectangular window function g σ (t), the magnetic signal y in the time window w Perform adaptive short-time Fourier transform to obtain the magnetic signal y in the time window w The time spectrum F w ; The rectangular window function g σ The expression of (t) is as follows: Where σ represents the scale factor, σ>0, And g(0)≠0; t represents the time of the measuring point; The expression of the adaptive short-time Fourier transform is as follows: In the formula, represents the short-time Fourier transform of the magnetic signal at time t and sampling frequency f in the time domain, y(τ) represents the input signal, and the magnetic signal y in the instantaneous window w ; τ represents the integral variable, i represents the complex unit, g σ(t) represents the short-time Fourier transform window function, σ(t) represents the scaling function; Step 2.2: Time spectrum F w Logarithmic scaling is performed, and the formula is as follows: LogMagnitude(F w )=20log 10 |F w | Step 2.3: Logarithmically scale the time-frequency spectrum F w Multiplying with the inverse step function gives a time-like spectrum The inverse step function is as follows: Where t represents the measuring point time.
3. The method for adaptively extracting and denoising magnetic signals of underground pipeline measuring point positions according to claim 1, characterized in that: In step 3, Judgment condition 1: Setting the time spectrum is an m*n matrix, then the time-frequency spectrum The sparsity variable s is: In the formula, Time spectrum The L0-norm of , that is, the number of non-zero elements in the matrix; If the time spectrum If the sparsity variable s is higher than 90%, it indicates a time-frequency spectrum. It exhibits high sparsity; Judgment condition 2: Magnetic signal y within the time window w Sampling frequency f in the frequency domain c and its harmonic k*f c The sparsity of each moment in the time window is expressed as: In the formula, Indicates the sampling frequency f at the i-th moment in the time window c and its harmonics k*f c The sparsity of , z is a Boolean variable; If the sampling frequency at time i is f c The value is 0, then the Boolean variable z=0, and we have: Conversely, if the Boolean variable z=1, we have: Therefore, within the time window, the magnetic signal y w Sampling frequency f in the frequency domain c and its harmonic k*f c At each moment, the sparsity is consistent, with one and only one value.
4. The method for adaptively extracting and denoising magnetic signals of downhole pipeline measuring point positions according to claim 1, characterized in that: In step 4, the magnetic signal y in the time window is determined w is the magnetic signal y at the measuring point c After that, the time window is expanded by one unit, that is, the left boundary remains unchanged, w = w + 1; if the magnetic signal y in the time window is determined w Not the magnetic signal y of the measuring point c , the time window size is still the time window size after initialization, that is, w = f*t min , the left boundary of the time window moves one unit to the right.
5. The method for adaptively extracting and denoising magnetic signals of downhole pipeline measuring point positions according to claim 1, characterized in that: The process of the non-convex one-dimensional total variation denoising model constructed in step 5 is as follows: Step 5.1: Establish a classic one-dimensional total variation denoising model, and the expression of its objective function F(x) is as follows: In the formula, λ represents the regularization parameter, φ represents the penalty function, φ: The penalty function in the classic one-dimensional total variation denoising model is the L1-norm; x represents the magnetic signal y at the measuring point c Estimated value after denoising; [Dx] n represents the nth component of the vector Dx; D represents the first-order difference matrix of size (N-1)×N; The objective function F(x) is related to For minimization, the expression is as follows: Step 5.2: Replace the penalty function φ(x) in the objective function F(x) with the inverse tangent non-convex penalty function φ1(x,a), and bring it into the classic one-dimensional total variation denoising model to obtain a complete non-convex one-dimensional total variation denoising model; The inverse tangent non-convex penalty function φ1(x,a) is expressed as follows: Where a represents the adjustment parameter of the non-convexity of the inverse tangent non-convex penalty function φ1(x,a), λ represents the regularization parameter; The objective function F1(x) of the non-convex one-dimensional total variation denoising model is expressed as follows: Where φ1 represents the inverse tangent non-convex penalty function.
6. An adaptive extraction and denoising system for magnetic signals of downhole pipeline measuring point positions based on the method according to any one of claims 1 to 5, characterized in that: include: 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; Adaptive conversion module: used to convert the magnetic signal y in the initialized time window w Perform adaptive short-time Fourier transform to obtain the time-frequency spectrum F w ; Use the inverse step function to scale the time-frequency spectrum F w Convert to get a time-like spectrum Sparsity determination module: used to determine the magnetic signal y within the time window w Time-like spectrum To determine the sparsity, the criteria are:
1. Time spectrum Whether it is highly sparse; 2. The magnetic signal y in the time window w Sampling frequency f in the frequency domain c and its harmonic k*f c Whether the sparsity of each moment in the time window is consistent; Extraction module: If the results of both judgment conditions are yes, the magnetic signal y in the judgment window w is the magnetic signal y at the measuring point c , merged into the magnetic signal vector y at the measuring point c (t) medium; If the two judgment conditions in step 3 are not all yes, then the magnetic signal y in the judgment window w Not the magnetic signal y of the measuring point c ; Then go to step 2 until all magnetic signals y in the time window are traversed w , extract the magnetic signal y of all measuring points c , get the complete magnetic signal vector y of the measuring point position c (t); Denoising model construction module: Introducing the inverse tangent non-convex penalty function to construct a non-convex one-dimensional total variation denoising model; Denoising module: Based on the optimal control minimization strategy, the non-convex one-dimensional total variation denoising model is simplified to obtain the alternative iterative function; based on the dichotomy method, the parameter λ value in the alternative iterative function is set to calculate the complete magnetic signal vector y of the measuring point position. c (t) De-noising is performed to obtain a stable magnetic signal at the measuring point.
7. An adaptive extraction and denoising device for magnetic signals of underground pipeline measuring point positions, characterized in that: include: Memory: a computer program storing the method for adaptively extracting and denoising the magnetic signal of a downhole pipeline measuring point position as described in any one of claims 1 to 5, which is a computer-readable device; Processor: used to implement the method for adaptively extracting and denoising magnetic signals of measuring points at downhole pipelines as described in any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it can implement the method for adaptively extracting and denoising magnetic signals of measuring point positions of downhole pipelines as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Extremely low frequency ocean electromagnetic signal detection method based on dynamic Kalman filtering
CN114578436A
Computer room data processing system based on compressed sensing and application method thereof
CN115378438A
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
System and method for constrained least-squares spectral processing and analysis of seismic data
US20140067273A1