A method and device for processing mud pulse signals
Through adaptive wavelet transformation and frame synchronization peak detection, combined with cyclic redundancy verification and error correction processing, the problems of low detection accuracy of mud pulse signal and insufficient synchronization mechanism in the prior art are solved, and higher signal detection accuracy and data transmission reliability are achieved.
Patent Information
- Application Number
- CN202411046381.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-08-01
AI Technical Summary
In complex downhole environments, the existing mud pulse signal processing technology has low signal detection accuracy and lacks an effective synchronization mechanism and error correction mechanism, which makes it difficult to accurately locate and reliable decoding of the instruction signal.
Adaptive wavelet transformation and frame synchronization peak detection methods are adopted to denoising and frame synchronization positioning of mud pulse signals, combined with cyclic redundancy verification and error correction processing, to improve signal detection accuracy and data transmission reliability.
Through adaptive wavelet transformation and frame synchronization peak detection, the detection accuracy of mud pulse signals and the accuracy of signal synchronization are significantly improved; cyclic redundancy verification and error correction processing effectively improves the transmission reliability of the command signal.
Smart Images

Figure CN119070949B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of mud signal processing, and in particular to a mud pulse signal processing method and device. Background Art
[0002] With the continuous expansion of coal mining, oil and gas exploration and development to deep, complex formations and oceans, the underground environment is deteriorating, which puts higher requirements on logging technology. In the logging process, mud pulse signals are needed to achieve two-way communication between ground and underground measuring instruments, transmit command data and collect data. Mud pulse signals use underground mud as the transmission medium and are generated by modulating mud pressure or flow. During the propagation process, they will be affected by noise, attenuation and other factors, resulting in a decrease in signal quality, which brings challenges to the detection and identification of mud pulse signals.
[0003] The existing mud pulse signal processing technology mainly adopts traditional filtering algorithms and fixed threshold detection methods, such as bandpass filtering, matched filtering, etc., which have poor noise resistance and adaptability. In complex downhole environments, the signal detection accuracy is greatly reduced. In addition, the existing technology lacks effective synchronization mechanism and error correction mechanism, making it difficult to accurately locate the starting position of the command signal and unable to achieve reliable decoding of the command signal, which limits the working performance and data transmission quality of the mud pulse telemetry system.
[0004] In the related art, for example, Chinese patent document CN111832332A provides a mud pulse signal processing method and device, which includes: using frame synchronization wavelet denoising to forcibly denoise the mud pulse sampling signal to obtain a denoised frame synchronization signal; performing peak detection on the denoised frame synchronization signal to obtain a frame synchronization peak detection result; determining the original command signal in the mud pulse sampling signal according to the frame synchronization peak detection result; using command wavelet denoising to forcibly denoise the original command signal to obtain a denoised command signal, and the length of the mud pulse sampling signal is twice the length of the command signal. However, this scheme uses a fixed wavelet basis function and decomposition layer number to denoise the mud pulse signal, without considering the differences in noise characteristics under different downhole environments. The selection of wavelet basis function and decomposition layer number is not adaptive enough, and it is difficult to match the time-frequency characteristics of the mud pulse signal, resulting in limited denoising performance and more residual noise, which affects subsequent signal detection. Summary of the invention
[0005] In view of the problem of low mud pulse signal detection accuracy in the prior art, the present application provides a mud pulse signal processing method and device, which improves the detection accuracy of mud pulse signals through frame synchronization peak detection and cyclic redundancy check.
[0006] The purpose of this application is achieved through the following technical solutions.
[0007] One aspect of the present specification provides a mud pulse signal processing method, comprising the following steps: collecting a mud pulse signal x(n): obtaining a mud pulse signal through a mud pulse signal receiving device, and performing analog-to-digital conversion to obtain a digital mud pulse sampling signal x(n). Preprocessing the collected mud pulse signal x(n): performing preliminary filtering on x(n) using a bandpass filter to remove noise interference beyond the frequency band of the mud pulse signal, and obtaining a preprocessed mud pulse signal xp(n). Performing frame-synchronized wavelet denoising on the preprocessed mud pulse signal xp(n): performing wavelet decomposition on xp(n) using an adaptive wavelet transform, filtering out drilling noise by dynamically selecting the optimal wavelet basis function and the number of decomposition layers, and combining adaptive threshold processing to obtain a denoised frame synchronization signal xs(n). Performing peak detection on the denoised frame synchronization signal xs(n): performing peak search and positioning on xs(n) using an adaptive threshold strategy, accurately extracting the frame synchronization peak position by dynamically adjusting the threshold, and obtaining a frame synchronization peak detection result and a frame synchronization period T. According to the frame synchronization peak detection result, the original command signal s(n) is extracted from the mud pulse signal xp(n): using the frame synchronization peak position and frame synchronization period T, the signal segment between two adjacent frame synchronization peaks is extracted as the original command signal s(n), and its length is equal to the length of the complete command cycle. The extracted original command signal s(n) is subjected to band-limited filtering and downsampling processing to filter out high-frequency noise and compress the data volume to obtain the downsampled command signal sd(n). According to the length characteristics of the command signal, the downsampled command signal sd(n) is divided into several command signal segments si(n), i=1, 2,..., M: using the command length judgment criterion, through sliding window and correlation peak search, M command signal segments si(n) are extracted from sd(n), each segment corresponds to a complete command cycle. Use instruction wavelet denoising to denoise each instruction signal segment si (n): Adopt an adaptive wavelet transform and threshold processing method similar to step 3, optimize the wavelet basis function and the number of decomposition layers according to the characteristics of each instruction signal segment si (n), effectively remove the residual noise, and obtain the denoised instruction signal segment sdi (n). Splice the denoised instruction signal segments sdi (n) in sequence to obtain the instruction signal sequence sd (m): According to the original order of the instruction signal, connect the M denoised instruction signal segments sdi (n) end to end to form a complete instruction signal sequence sd (m). Perform cyclic redundancy check error correction on the instruction signal sequence sd (m): According to the number of bits of the instruction signal and the generating polynomial, use the cyclic redundancy check algorithm to perform error correction coding on sd (m), generate check bits and insert them after each instruction signal, and form an instruction signal sequence sc (m) containing a check code.The receiving end determines whether sc(m) has an error based on the verification result, corrects the error command signal, and obtains the corrected command signal sequence sdc(m). The corrected command signal sequence sdc(m) is converted into the command code ic(k) and output to the subsequent control system: the command signal of sdc(m) is decoded, the corresponding command code ic(k) is extracted, and transmitted to the downhole instrument control unit to realize the accurate execution of the remote control command.
[0008] The instruction wavelet denoising is performed on the segmented instruction signal, which includes the following steps: using the same wavelet basis function as the mud pulse signal, performing wavelet decomposition on each instruction signal segment to obtain instruction wavelet coefficients; calculating the standard deviation of the wavelet coefficients of each instruction signal segment, and multiplying the standard deviation by a preset factor as the initial denoising threshold of the instruction signal segment; multiplying the initial denoising threshold by an adaptive adjustment factor according to the frequency domain energy distribution of each instruction signal segment to obtain an adaptive denoising threshold, specifically including: calculating the frequency domain energy distribution of the instruction signal segment to determine the frequency component corresponding to the maximum energy; if the frequency component corresponding to the maximum energy exceeds the preset frequency range, setting the adaptive adjustment factor to a value greater than 1; if the frequency component corresponding to the maximum energy does not exceed the preset frequency range, setting the adaptive adjustment factor to a value less than or equal to 1; setting the high-frequency detail coefficients whose absolute values in the instruction wavelet coefficients are less than the adaptive denoising threshold to zero, and retaining the high-frequency detail coefficients and all low-frequency approximate coefficients whose absolute values are greater than or equal to the adaptive denoising threshold; performing soft threshold shrinkage processing on the retained instruction wavelet coefficients; and performing wavelet reconstruction on the instruction wavelet coefficients after the soft threshold shrinkage processing to obtain the denoised instruction signal segment.
[0009] Furthermore, the preprocessing method of the mud pulse signal includes the following steps: segment processing of the collected mud pulse signal x(n): setting the segment length N, dividing x(n) into a number of signal segments xi(n) of length N, i=1, 2, ..., M, where M is the total number of signal segments, and N is the number of sampling points contained in each signal segment, which is a positive integer greater than 1. Each signal segment xi(n) can be expressed as: xi(n)=x((i-1)*N+n), n=1, 2, ..., N. Calculate the mean mi of each segment of the mud pulse signal xi(n) as the DC component of the segment signal: mi=(1 / N)*Σ(n=1toN)xi(n). Subtract the DC component mi of the corresponding segment from each sampling point of each segment of the mud pulse signal xi(n) to obtain the signal segment xdi(n) after removing the DC component: xdi(n)=xi(n)-mi, n=1, 2, ..., N. Calculate the maximum absolute value of each de-DC signal segment xdi(n) as the global maximum absolute value xmax: xmax=max{|xdi(n)|}, i=1, 2, ..., M, n=1, 2, ..., N. Divide the sampling points of each de-DC signal segment xdi(n) by the global maximum absolute value xmax to obtain the normalized signal segment xni(n): xni(n)=xdi(n) / xmax, n=1, 2, ..., N. Splice the normalized signal segments xni(n) in the original order to obtain the preprocessed mud pulse signal xp(n): xp(n)=xni(mod(n-1, N)+1), n=1, 2, ..., M*N. Among them, mod(n-1, N)+1 means performing a modulo N operation on n-1 and adding 1 to realize the cyclic splicing of signal segments. The present application adopts the method of segmented processing and removal of DC components, which can effectively eliminate the low-frequency drift and baseline drift in the mud pulse signal and improve the stability of the signal; by calculating the global maximum absolute value and normalizing it, the signal amplitude can be unified to the range of [-1, 1], which is convenient for subsequent threshold judgment and feature extraction.
[0010] Further, the frame synchronization wavelet denoising method of the mud pulse signal includes the following steps: according to the frequency domain characteristics of the mud pulse signal, the optimal wavelet basis function ψ(t) and the decomposition layer number L are selected: by analyzing the spectrum of the mud pulse signal, its main frequency range and frequency band distribution characteristics are determined. According to the frequency domain characteristics, the wavelet basis function ψ(t) that best matches it is selected from the commonly used wavelet basis function library (such as Daubechies, Symlets, Coiflets, etc.), so that it has good locality and concentration in both time and frequency domains. According to the sampling frequency and frequency band range of the signal, the appropriate wavelet decomposition layer number L is determined, so that the decomposed wavelet coefficients can effectively characterize the multi-scale characteristics of the mud pulse signal. The pre-processed mud pulse signal xp(n) is subjected to multi-layer wavelet decomposition using the selected wavelet basis function ψ(t) and the decomposition layer number L: xp(n) is subjected to L-layer wavelet decomposition to obtain the low-frequency approximation coefficient aL(k) of the Lth layer and the high-frequency detail coefficients dj(k) of each layer, j=1, 2, ..., L. The wavelet decomposition process can be expressed as: aL(k)=Σ(n)xp(n)*ψ(2^Lk-n), dj(k)=Σ(n)xp(n)*ψ(2^jk-n), j=1, 2, ..., L, where ψ represents the wavelet basis function and k is the time translation factor of the wavelet coefficient. According to the signal-to-noise ratio (SNR) of the mud pulse signal, the threshold λj of each layer of wavelet coefficients is calculated, j=1, 2, ..., L: λj=σj*sqrt(2*log(N) / log2(j+1)), where σj is the standard deviation of the high-frequency coefficient dj(k) of the jth layer, and N is the signal length. The threshold λj decreases with the increase of the decomposition scale j, which meets the denoising requirements of different frequency bands. The high-frequency coefficients of the wavelet coefficients dj(k) of each layer that are less than the threshold λj of the corresponding layer are set to zero to obtain the wavelet coefficients d'j(k) after threshold processing: d'j(k)=dj(k), if|dj(k)|>=λj, d'j(k)=0, if|dj(k)|<λj, the high-frequency wavelet coefficients d'j(k) after threshold processing are shrunk: 5.1 According to the difference between the absolute value of the high-frequency coefficients |d'j(k)| and the threshold λj, and the preset shrinkage factor α (0<α <1), calculate the shrinkage amount Δj(k): Δj(k)=α*(|d'j(k)|-λj), if|d'j(k)|>=λj, Δj(k)=0, if|d'j(k)|<λj, 5.2 Subtract the shrinkage amount Δj(k) from the high-frequency coefficient d'j(k) to obtain the shrunk high-frequency coefficient d"j(k): d"j(k)=sgn(d'j(k))*(|d'j(k)|-Δj(k)), where sgn(x) represents the sign function.Using the selected wavelet basis function ψ(t), the wavelet coefficients {aL(k), d"j(k)} after the high-frequency coefficients are shrunk are reconstructed by L layers of wavelets to obtain the denoised frame synchronization signal xs(n): xs(n)=Σ(k)aL(k)ψ(2^Ln-k)+Σ(j=1toL)Σ(k)d"j(k)ψ(2^jn-k). The wavelet denoising method of the present application makes full use of the time-frequency characteristics of the mud pulse signal, and matches the multi-scale characteristics of the signal by adaptively selecting the wavelet basis function and the number of decomposition layers; adopts the soft threshold and high-frequency coefficient shrinkage strategy to retain the detailed information of the signal while removing noise; and realizes signal smoothing and enhancement through wavelet reconstruction. Compared with existing denoising methods such as Fourier transform and empirical mode decomposition, the wavelet denoising method of the present application has higher time-frequency resolution and adaptability, can more effectively extract the characteristics of the frame synchronization signal, and improve the accuracy and reliability of mud pulse signal detection.
[0011] Furthermore, the method for adaptively selecting the wavelet basis function and the number of decomposition layers includes the following steps: performing Fourier transform on the pre-processed mud pulse signal xp(n) to obtain its time-frequency distribution characteristics: performing fast Fourier transform (FFT) on xp(n) to obtain the frequency domain signal Xp(k): Xp(k)=Σ(n=0toN-1)xp(n)*exp(-j2πn*k / N), k=0, 1, ......, N-1, where N is the signal length and j is the imaginary unit. Calculating the amplitude spectrum A(k) and phase spectrum P(k) of the frequency domain signal Xp(k): A(k)=|Xp(k)|, P(k)=angle(Xp(k)), and obtaining the time-frequency distribution diagram of the signal xp(n) based on the amplitude spectrum A(k) and the phase spectrum P(k), reflecting its energy distribution on different frequency components. According to the time-frequency distribution characteristics, the main frequency component f0 of the mud pulse signal is determined: the maximum value Amax in the amplitude spectrum A(k) is found, and its corresponding frequency index is kmax: Amax=max{A(k)}, k=0, 1,..., N-1, kmax=argmax{A(k)}. According to the frequency index kmax and the sampling frequency fs, the main frequency component f0 of the mud pulse signal is calculated: f0=kmax*fs / N. The amplitude-frequency response of the commonly used wavelet basis function at the main frequency component f0 is calculated, and the optimal wavelet basis function is selected: Daubechies wavelet (dbN), Symlet wavelet (symN) and Coiflet wavelet (coifN) are selected as candidate wavelet basis functions, where N represents the order of the vanishing moment, reflecting the orthogonality and smoothness of the wavelet basis function. For each wavelet basis function, calculate its amplitude-frequency response H(f0) at the main frequency component f0: H(f0)=|Ψ(2πf0)|, where Ψ(ω) represents the Fourier transform of the wavelet basis function, called the wavelet mother function. Compare the amplitude-frequency responses H(f0) of different wavelet basis functions, and select the wavelet basis function ψ(t) with the largest response as the optimal basis function.
[0012] According to the sampling frequency fs of the mud pulse signal and the scale function of the selected wavelet basis function ψ(t), the maximum decomposition layer number L is determined: the scale function φ(t) of the wavelet basis function ψ(t) satisfies the two-scale equation: φ(t)=Σ(k)h(k)*φ(2t-k), where h(k) is the low-pass filter coefficient, which determines the translation and expansion characteristics of the scale function. According to the sampling frequency fs and the bandwidth BW of the scale function φ(t), the maximum decomposition layer number L is calculated: L=floor(log2(fs / BW)), where floor(x) represents the rounding operation. The decomposition layer number L determines the frequency resolution and time resolution of the wavelet transform. The adaptive selection method of the present application fully considers the frequency domain characteristics and energy distribution of the mud pulse signal, and realizes the optimal matching of the wavelet basis function through the Fourier transform and the amplitude-frequency response calculation of the wavelet basis function; according to the sampling frequency of the signal and the bandwidth of the scale function, the decomposition layer number is adaptively determined to balance the time-frequency resolution.
[0013] Further, the real synchronization peak is extracted from the denoised frame synchronization signal xs(n), including: calculating the global mean mean g and standard deviation std g of the denoised frame synchronization signal xs(n), setting the initial threshold thr init: global mean mean g=(1 / N)*Σ(n=1toN)xs(n), global standard deviation std g=sqrt((1 / (N-1))*Σ(n=1toN)(xs(n)-mean g)^2), initial threshold thr init=mean g+K*std g, where N is the signal length and K is a constant factor for adjusting the height of the initial threshold. The frame synchronization signal xs(n) is segmented using a sliding window with a fixed width W: the width of the sliding window is set to W, the sliding step is W / M, where M is a constant factor for controlling the overlap of the window. The sliding window is moved to different positions of the signal in turn to obtain a series of window segments xsw(m), m=1, 2, ..., P, where P is the total number of windows. For each window segment xsw(m), calculate its local mean mean loc(m), local standard deviation std loc(m) and local peak peak loc(m): mean loc(m) = (1 / W)*Σ(i=1toW)xsw(m,i), std loc(m) = sqrt((1 / (W-1))*Σ(i=1toW)(xsw(m,i)-mean loc(m))^2), peak loc(m) = max{xsw(m,i)}, i=1, 2, ..., W. Calculate the first adjustment threshold thradj1(m) and the second adjustment threshold thradj2(m): the first adjustment threshold thradj1(m) = thr init + a*(mean loc(m) - thr init), the second adjustment threshold thradj2(m) = thradj1(m) + β*(std loc(m) - thr init), where a and β are constant factors used to balance the weight between the global threshold and the local threshold. According to the local peak value peak loc(m) and the second adjustment threshold thradj2(m), calculate the optimal threshold thr adopt(m) for each window: if peak loc(m) is greater than thradj2(m), calculate the third adjustment threshold thradj3(m) = γ*peak loc(m), and use thradj3(m) as the optimal threshold thr adopt(m). If peak loc(m) is less than or equal to thradj2(m), directly use thradj2(m) as the optimal threshold thr adopt(m). Where γ is a constant factor used to adjust the height of the third adjustment threshold.The sample points in the denoised frame synchronization signal xs(n) that are greater than the optimal threshold thradopt(m) of the corresponding window are extracted as candidate synchronization peaks xcand(l), l=1, 2, ..., Q, where Q is the total number of candidate peaks. According to the peak amplitude, kurtosis and adjacent peak spacing of the candidate synchronization peak xcand(l), the real synchronization peak xsync(r), r=1, 2, ..., R, is screened out as the frame synchronization peak detection result, where R is the number of real synchronization peaks.
[0014] Peak amplitude: The amplitude of the candidate peak should be significantly higher than the amplitude of its adjacent sample points. Kurtosis: The peak shape of the candidate peak should be sharp and symmetrical, and the kurtosis index should be high. Adjacent peak spacing: The spacing between adjacent real synchronization peaks should conform to the periodic characteristics of the frame synchronization signal. In this application, the initial threshold is set according to the global statistical characteristics of the denoised frame synchronization signal xs (n); the sliding window technology is used to calculate the local statistical characteristics, and the initial threshold is adaptively adjusted to obtain the optimal threshold for each window; the candidate synchronization peak is extracted, and the real synchronization peak is obtained according to the peak characteristics, so as to achieve accurate positioning and segmentation of the frame synchronization signal. The peak detection method makes full use of the global and local statistical characteristics of the frame synchronization signal, and adaptively matches the dynamic changes of the signal through multi-level threshold adjustment; the sliding window and peak feature analysis are used to effectively suppress noise interference and false peaks, and improve the accuracy and reliability of synchronization peak positioning. Compared with existing methods such as fixed thresholds and morphological filtering, the adaptive threshold peak detection method of this application is more flexible and robust, and can adapt to frame synchronization signals under different working conditions, laying the foundation for subsequent instruction extraction and data parsing.
[0015] Further, a true synchronization peak screening method based on peak features is used to obtain the true synchronization peak xsync(r) from the candidate synchronization peaks xcand(l), including the following steps: Calculate the peak amplitude amp_peak(l), peak width width_peak(l), and the spacing dist_peak(l) between adjacent candidate synchronization peaks for each candidate synchronization peak xcand(l): The peak amplitude amp_peak(l) = xcand(l) - (xcand(l - 1) + xcand(l + 1)) / 2, which represents the difference in amplitude between the candidate peak and the sample points on its two sides. The peak width width_peak(l) = r - p, where xcand(p) and xcand(r) are the first local minimum points on the left and right sides of the candidate peak xcand(l) respectively. The adjacent peak spacing dist_peak(l) = pos(xcand(l + 1)) - pos(xcand(l)), where pos(x) represents the position index of the candidate peak in the original signal xs(n). According to the peak amplitude amp_peak(l) and the preset amplitude threshold thr_amp, screen the potential synchronization peaks xpot(j), j = 1, 2,......, J: Compare the peak amplitude amp_peak(l) with the amplitude threshold thr_amp: If amp_peak(l) > thr_amp, then take xcand(l) as the potential synchronization peak xpot(j) and keep it; If amp_peak(l) ≤ thr_amp, then delete xcand(l) and do not take it as a potential synchronization peak. The amplitude threshold thr_amp is preset according to the actual waveform and signal-to-noise ratio of the frame synchronization signal to ensure that the extracted potential synchronization peaks have significant amplitude characteristics. According to the peak width width_peak(j) of the potential synchronization peak xpot(j) and the preset peak width threshold thr_width, screen the effective synchronization peaks xeff(k), k = 1, 2,......, K: Compare the peak width width_peak(j) with the peak width threshold thr_width: If width_peak(j) < thr_width, then take xpot(j) as the effective synchronization peak xeff(k) and keep it; If width_peak(j) ≥ thr_width, then delete xpot(j) and do not take it as an effective synchronization peak. The peak width threshold thr_width is preset according to the actual peak shape and noise interference situation of the frame synchronization signal to ensure that the extracted effective synchronization peaks have sharp and symmetric peak shape characteristics.According to the adjacent peak spacing dist_peak(k) of the effective synchronization peak xeff(k) and a preset spacing threshold thr_dist, screen the true synchronization peak xsync(r), r = 1, 2,......, R: Compare the adjacent peak spacing dist_peak(k) with the spacing threshold thr_dist: If dist_peak(k) ≥ thr_dist, then take xeff(k) as the true synchronization peak xsync(r) and retain it; If dist_peak(k) < thr_dist, then delete xeff(k) and do not take it as the true synchronization peak. The spacing threshold thr_dist is preset according to the actual period and jitter of the frame synchronization signal to ensure that the spacing between the extracted true synchronization peaks conforms to the period characteristics of the frame synchronization signal.
[0016] Take the positions pos(xsync(r)) of all the true synchronization peaks xsync(r) as the frame synchronization peak detection results syncpos(r), r = 1, 2,......, R. The method for screening true synchronization peaks based on peak features screens potential synchronization peaks, effective synchronization peaks, and true synchronization peaks step by step according to features such as the peak amplitude, peak width, and adjacent peak spacing of candidate synchronization peaks, realizing the precise positioning and segmentation of the frame synchronization signal. The method for screening true synchronization peaks in this application makes full use of the time-domain morphological features of the frame synchronization signal, adaptively extracts the required true synchronization peaks by presetting reasonable feature thresholds; adopts a multi-level screening strategy, effectively suppressing noise interference and false peaks, and improving the accuracy and reliability of synchronization peak positioning. Compared with existing methods such as single-feature decision-making and fixed-threshold screening, the multi-feature adaptive screening method in this application is more flexible and robust, can adapt to frame synchronization signals under different working conditions, and provides a reliable synchronization reference for subsequent instruction extraction and data parsing.
[0017] Furthermore, a frame synchronization-based command signal extraction and downsampling method is used to obtain a normalized command signal segment xcmd(i) from a mud pulse signal xm(n), including the following steps: determining the starting position startpos(r) and the ending position endpos(r) of each frame synchronization cycle according to the frame synchronization peak detection result syncpos(r): the starting position startpos(r) of the r-th frame synchronization cycle = syncpos(r), that is, the position of the r-th true synchronization peak. The ending position endpos(r) of the r-th frame synchronization cycle = syncpos(r+1)-1, that is, the previous sample point of the r+1-th true synchronization peak position. The length of the frame synchronization cycle Tcmd = endpos(r)-startpos(r)+1, which represents the number of sample points in each command cycle. Extract the mud pulse signal segment between two adjacent frame synchronization peaks as the original command signal xcmd_raw (r, t): the rth original command signal xcmd_raw (r, t) = xm (startpos (r) + t), t = 0, 1, ..., Tcmd-1. The length of the original command signal xcmd_raw (r, t) is equal to the frame synchronization period length Tcmd. Use a low-pass filter to perform band-limited filtering on the extracted original command signal xcmd_raw (r, t): Design a low-pass filter hlpf (k) with a cutoff frequency equal to the upper limit of the command signal frequency band fmax, k = 0, 1, ..., Nlpf-1, where Nlpf is the filter order. The original command signal xcmd_raw (r, t) is low-pass filtered to obtain the filtered command signal xcmd_lpf (r, t): xcmd_lpf (r, t) = Σ (k = 0 to Nlpf-1) hlpf (k) * xcmd_raw (r, tk), t = 0, 1, ..., Tcmd-1. 3.3 Low-pass filtering can filter out high-frequency noise higher than the command signal frequency band and improve the signal-to-noise ratio. The command signal xcmd_lpf (r, t) after band-limited filtering is downsampled: the Nyquist frequency of the command signal fNyq = 2fmax, where fmax is the highest frequency component of the command signal. Downsampling frequency fs_cmd = fNyq, downsampling factor D = round (fs / fs_cmd), where fs is the original sampling frequency of the mud pulse signal, and round (x) represents rounding operation.
[0018] The filtered command signal xcmd_lpf(r, t) is downsampled to obtain the downsampled command signal xcmd_ds(r, m): xcmd_ds(r, m)=xcmd_lpf(r, Dm), m=0, 1, ..., Mcmd-1, where Mcmd=floor(Tcmd / D) is the length of the downsampled command signal, and floor(x) represents the rounding down operation. Normalize the downsampled command signal xcmd_ds(r,m): calculate the maximum value max_cmd(r) and the minimum value min_cmd(r) of the downsampled command signal xcmd_ds(r,m): max_cmd(r)=max{xcmd_ds(r,m)}, m=0,1,...,Mcmd-1, min_cmd(r)=min{xcmd_ds(r,m)}, m=0,1,...,Mcmd-1, normalize the amplitude of the downsampled command signal xcmd_ds(r,m) to obtain the normalized command signal fragment xcmd(r,m): xcmd(r,m)=(xcmd_ds(r,m)-min_cmd(r)) / (max_cmd(r)-min_cmd(r)), m=0,1,...,Mcmd-1.
[0019] Normalization processing can unify the amplitude of the command signal in different command cycles to the range of [0, 1], which is convenient for subsequent command recognition and decoding. Through the above-mentioned frame synchronization-based command signal extraction and downsampling method, each command cycle is automatically located according to the frame synchronization peak detection result, and the original command signal is extracted; a low-pass filter is used to filter out high-frequency noise to improve signal quality; downsampling processing is performed according to the frequency band characteristics of the command signal to reduce the amount of data; the command signal is normalized to achieve amplitude unification. The command signal extraction and downsampling method of the present application makes full use of the timing characteristics of the frame synchronization signal to realize automatic segmentation and extraction of the command signal; the combination of frequency domain filtering and time domain downsampling is used to effectively balance the fidelity and data volume of the command signal; through amplitude normalization, the signal representation in different command cycles is unified, which lays the foundation for subsequent command recognition. Compared with the existing fixed-length interception, simple downsampling and other methods, the adaptive extraction, filtering downsampling and normalization method of the present application is more intelligent and efficient, can adapt to the command signal under different working conditions, and improves the accuracy and real-time performance of command parsing.
[0020] Furthermore, a command signal downsampling method based on the Nyquist frequency is used to downsample the original command signal xcmd_lpf (r, t) after band-limited filtering to obtain a downsampled command signal xcmd_ds (r, m), including the following steps: Determine the Nyquist frequency fNyq according to the highest frequency fmax of the command signal: The highest frequency fmax of the command signal can be obtained by analyzing the spectrum of the command signal, or preset according to prior knowledge. Nyquist frequency fNyq=Q*fmax, where Q is a multiple relationship between the Nyquist frequency and the highest frequency, and Q=2 is usually taken to meet the requirements of the Nyquist sampling theorem. Calculate the downsampling factor D: The sampling frequency fs of the original command signal xcmd_lpf (r, t) is equal to the original sampling frequency of the mud pulse signal. Downsampling factor D=round(fs / fNyq), where round(x) represents rounding operation. The downsampling factor D means that a sample is taken every D sample points in the original instruction signal xcmd_lpf (r, t) to obtain the downsampled instruction signal xcmd_ds (r, m). The original instruction signal xcmd_lpf (r, t) after band-limited filtering is downsampled by D times: for the original instruction signal xcmd_lpf (r, t) in the rth instruction cycle, t=0, 1, ..., Tcmd-1, D times downsampling is performed. The relationship between the sample point index m of the downsampled instruction signal xcmd_ds (r, m) and the sample point index t of the original instruction signal xcmd_lpf (r, t) is: m=floor(t / D), t=0, 1, ..., Tcmd-1, where floor(x) represents a rounding down operation. The sample value of the downsampled command signal xcmd_ds(r, m) is equal to the first sample value of each D sample point in the original command signal xcmd_lpf(r, t): xcmd_ds(r, m)=xcmd_lpf(r, D*m), m=0, 1, ..., Mcmd-1, where Mcmd=floor(Tcmd / D) is the length of the downsampled command signal. Through the above-mentioned Nyquist frequency-based command signal downsampling method, the downsampling frequency and downsampling factor are adaptively determined according to the frequency band characteristics of the command signal; the original command signal after band-limited filtering is equally spaced to obtain a downsampled command signal sequence, thereby realizing data compression and information retention of the command signal. The command signal downsampling method of the present application makes full use of the Nyquist sampling theorem, sets a reasonable downsampling frequency according to the spectral characteristics of the command signal, avoids spectrum aliasing and information loss; adopts an integer multiple downsampling factor to simplify the downsampling process and reduce the computational complexity; and retains the key sample points of the command signal through equal-interval extraction to reduce data redundancy.Compared with existing methods such as fixed downsampling frequency and arbitrary decimation, the adaptive downsampling method of the present application is more flexible and efficient. It can significantly reduce data transmission and storage overhead while ensuring the quality of instruction signals, thereby improving the real-time and reliability of instruction parsing.
[0021] Furthermore, a command signal error correction method based on cyclic redundancy check is used to perform error correction processing on the command signal sequence xcmd (i) to obtain the corrected command signal xcmd_crc (i), including the following steps: calculating the remainder bit number Rcrc of the cyclic redundancy check according to the number of bits Ncmd of the command signal and the generating polynomial G (x), constructing the cyclic redundancy check matrix HCRC and the adjoint matrix ACRC: the number of bits Ncmd of the command signal is equal to the length Mcmd of the normalized command signal segment xcmd (r, m). The generating polynomial G (x) is pre-designed according to the number of bits Ncmd of the command signal and the bit error rate requirements, and a standard CRC generating polynomial is usually selected, such as CRC-8, CRC-16, etc. The remainder bit number Rcrc of the cyclic redundancy check is equal to the order of the generating polynomial G (x).
[0022] According to the generator polynomial G(x), construct the cyclic redundancy check matrix HCRC of (Ncmd-Rcrc)×Ncmd and the adjoint matrix ACRC of Rcrc×(Ncmd-Rcrc). Perform cyclic redundancy check encoding on each instruction signal segment xcmd(r,m) of the instruction signal sequence xcmd(i): shift the instruction signal segment xcmd(r,m) left by Rcrc bits to obtain the left-shifted instruction signal segment xcmd_ls(r,m). Perform modulo-2 division on the left-shifted instruction signal segment xcmd_ls(r,m), with the divisor being the generator polynomial G(x), and obtain the Rcrc-bit remainder rrem(r). The instruction signal segment xcmd(r,m) and the remainder rrem(r) are concatenated to obtain the instruction signal segment xcmd_crc(r,m) containing the check bit: xcmd_crc(r,m)=[xcmd(r,m),rrem(r)], m=0,1,...,Mcmd+Rcrc-1. The instruction signal segments xcmd_crc(r,m) containing the check bit are concatenated in sequence to obtain the instruction signal sequence xcmd_crc(i) containing the check bit: xcmd_crc(i)=[xcmd_crc(0,m),xcmd_crc(1,m),...,xcmd_crc(R-1,m)],i=0,1,...,R*(Mcmd+Rcrc)-1, where R is the number of instruction cycles in the instruction signal sequence. Perform cyclic redundancy check operation on the command signal sequence xcmd_crc(i) containing the check bit: divide the command signal sequence xcmd_crc(i) containing the check bit into several subsequences xcmd_crc(k,n) of Ncmd bits: xcmd_crc(k,n)=xcmd_crc(k*Ncmd+n), n=0, 1,..., Ncmd-1, k=0, 1,..., K-1, where K is the number of subsequences, K=ceil(length(xcmd_crc) / Ncmd), and ceil(x) represents rounding up operation. A cyclic redundancy check operation is performed on each subsequence xcmd_crc(k,n) to obtain the check result rcheck(k) of the Rcrc bit: rcheck(k)=mod(xcmd_crc(k,n)*HCRC,2), k=0, 1, ..., K-1, where mod(x,2) represents the modulo operation on 2, that is, the bitwise XOR operation.
[0023] According to the check result rcheck(k), it is judged whether the received command signal sequence is wrong: if the check result rcheck(k) of all subsequences is equal to zero, it is judged that the received command signal sequence xcmd_crc(i) is correct, and the check bit is removed from the command signal sequence to obtain the error-corrected command signal sequence xcmd_crc(i): xcmd_crc(i)=xcmd_crc(floor(i / Ncmd)Ncmd+mod(i,Ncmd)), i=0, 1, ..., RMcmd-1, where floor(x) represents the rounding down operation, and mod(·, Ncmd) represents the modulo operation of Ncmd. If there is any subsequence whose check result rcheck(k) is not equal to zero, it is judged that the received command signal sequence xcmd_crc(i) is wrong, and error location and correction are required. For the subsequence whose check result rcheck(k) is not equal to zero, error location and correction are performed: the product rerr(k) of the check result rcheck(k) and the companion matrix ACRC is calculated as the error pattern: rerr(k)=mod(rcheck(k)*ACRC,2), k=0,1,...,K-1, and the error position nerr(k) is determined according to the error pattern rerr(k): nerr(k)=find(rerr(k)==1), k=0,1,...,K-1, where find(x) represents the position index of the non-zero element. The instruction signal bit corresponding to the error position nerr(k) is flipped to obtain the subsequence xcmd_crc(k,n) after error correction: xcmd_crc(k,nerr(k))=~xcmd_crc(k,nerr(k)), k=0,1,...,K-1, where "~" represents the bitwise inversion operation. The error-corrected subsequence xcmd_crc (k, n) is spliced into a complete instruction signal sequence xcmd_crc (i), and the check bit is removed from the error-corrected instruction signal sequence to obtain the final instruction signal sequence xcmd (i): xcmd (i) = xcmd_crc (floor (i / Mcmd) Ncmd + mod (i, Mcmd)), i = 0, 1, ..., RMcmd-1. Through the above-mentioned instruction signal error correction method based on cyclic redundancy check, the instruction signal sequence is encoded and checked by using the generating polynomial and the cyclic redundancy check matrix, and the error location and correction functions are realized; the error pattern calculation is performed by using the adjoint matrix to simplify the error location process; the error correction efficiency is improved by subsequence division and parallel verification; finally, the check bit is removed to obtain the error-corrected instruction signal sequence, which ensures the correctness of the instruction information.The command signal error correction method of the present application makes full use of the coding and verification characteristics of the cyclic redundancy check, and enhances the error detection and correction capabilities of the command signal by adding redundant bits; it adopts generating polynomials and check matrices to achieve fast coding and parallel verification, and reduce computational overhead.
[0024] Among them, the instruction signal encoding method based on Gray code is used to convert the error-corrected instruction signal sequence xcmd (i) into the instruction code xcode (j), including the following steps: according to the Gray code mapping table, each instruction signal segment xcmd (r, m) in the error-corrected instruction signal sequence xcmd (i) is converted into the corresponding Gray code xgray (r, m): the number of bits of the instruction signal segment xcmd (r, m) is Mcmd, and the number of bits of the corresponding Gray code xgray (r, m) is also Mcmd. According to the Gray code mapping table of Mcmd bits, each bit value of the instruction signal segment xcmd (r, m) is mapped to the corresponding Gray code bit value: xgray (r, m, k) = xor (xcmd (r, m, k), xcmd (r, m, k+1)), k = 0, 1, ..., Mcmd-2, xgray (r, m, Mcmd-1) = xcmd (r, m, Mcmd-1), where xor (x) represents a bitwise exclusive OR operation, xcmd (r, m, k) represents the kth bit value of the instruction signal segment xcmd (r, m), and xgray (r, m, k) represents the corresponding Gray code bit value.
[0025] The Gray code bit values xgray(r,m,k) are concatenated in order to obtain the Gray code xgray(r,m) corresponding to the instruction signal segment xcmd(r,m): xgray(r,m)=[xgray(r,m,0), xgray(r,m,1),...,xgray(r,m,Mcmd-1)], and the Gray code xgray(r,m) is converted to the corresponding instruction code xcode(r) according to the instruction set definition: the instruction set defines the correspondence between Gray code and instruction code, which is usually implemented by table lookup. According to the mapping relationship defined by the instruction set, the Gray code xgray(r,m) is converted to the corresponding instruction code xcode(r): xcode(r)=inst_map(xgray(r,m)), r=0,1,...,R-1, where inst_map(x) represents the mapping function defined by the instruction set, which maps the Gray code of Mcmd bit to the corresponding instruction code. The converted instruction code xcode(r) is output in sequence to obtain the instruction code sequence xcode(j): xcode(j)=[xcode(0), xcode(1),..., xcode(R-1)], j=0, 1,..., R-1. The instruction code sequence xcode(j) is output to the subsequent control system for the control system to parse and execute: the instruction code sequence xcode(j) is used as the input of the control system and is passed to the instruction parsing module of the control system. The instruction parsing module of the control system parses the instruction code xcode(j) into corresponding control information such as operation code, address code, data, etc. according to the definition of the instruction set. The control system performs corresponding control operations according to the parsed control information to realize the control and scheduling of the equipment. Through the above-mentioned instruction signal encoding method based on Gray code, the single-bit change characteristic of Gray code is used to convert the error-corrected instruction signal sequence into Gray code form, thereby improving the anti-interference ability of the instruction signal; according to the definition of the instruction set, the Gray code is mapped to the corresponding instruction code, thereby realizing the correspondence between the instruction signal and the control instruction; the instruction code sequence is output in sequence for the control system to parse and execute, thereby completing the encoding and transmission process of the instruction signal. The instruction signal encoding method of the present application makes full use of the encoding characteristics of Gray code. Through Gray code mapping, the instruction signal is converted into Gray code with stronger error correction capability, reducing the error rate of the instruction signal; the mapping relationship between Gray code and instruction code is established by using instruction set definition, realizing the standardized representation of instruction signal; through sequential output and analytical execution, the instruction signal is organically combined with the control system, realizing the efficient transmission and control of the instruction. Compared with the existing direct encoding, random encoding and other methods, the Gray code encoding method of the present application is more reliable and efficient, improves the transmission quality and control accuracy of the instruction signal, and enhances the stability and reliability of the system.
[0026] Another aspect of the present specification also provides a mud pulse signal processing device for executing a mud pulse signal processing method of the present application, including: a data acquisition module for receiving the original mud pulse signal y(n) collected by the mud pulse signal sensor and passing it to a preprocessing module: the data acquisition module is connected to the mud pulse signal sensor and receives the original mud pulse signal y(n) output by the mud pulse signal sensor in real time. The data acquisition module quantizes and encodes the original mud pulse signal y(n) and converts it into a digital mud pulse signal sequence y(n). The data acquisition module passes the digital mud pulse signal sequence y(n) to the preprocessing module for further processing. The preprocessing module is used to denoise and normalize the original mud pulse signal y(n) to obtain a normalized mud pulse signal s(n) and pass it to a matched filter module: the preprocessing module receives the digital mud pulse signal sequence y(n) transmitted by the data acquisition module, performs denoising on it, and filters out high-frequency noise and low-frequency interference components in the mud pulse signal. The preprocessing module normalizes the denoised mud pulse signal and maps its amplitude range to the interval [0, 1] to obtain the normalized mud pulse signal s(n). The preprocessing module passes the normalized mud pulse signal s(n) to the matched filter module for further processing. The matched filter module is used to perform matched filtering on the normalized mud pulse signal s(n) to obtain the matched filtered mud pulse signal x(n), and pass it to the instruction parsing module: the matched filter module receives the normalized mud pulse signal s(n) transmitted by the preprocessing module, and performs matched filtering on it according to the preset reference signal p(n). The matched filter module uses the cross-correlation algorithm to calculate the cross-correlation function r(n) between the normalized mud pulse signal s(n) and the reference signal p(n) to obtain the matched filtered mud pulse signal x(n). The matched filter module passes the matched filtered mud pulse signal x(n) to the instruction parsing module for further processing.
[0027] The instruction parsing module is used to extract and parse the mud pulse signal x(n) after matched filtering, obtain the control instruction sequence c(k), and pass it to the control system: the instruction parsing module receives the mud pulse signal x(n) after matched filtering transmitted by the matched filtering module, and performs instruction extraction and parsing processing on it.
[0028] The instruction parsing module adopts a threshold judgment algorithm to binarize the mud pulse signal x(n) after matched filtering according to the preset threshold value to obtain a binary instruction sequence b(k). The instruction parsing module parses the binary instruction sequence b(k) according to the preset instruction format and protocol to obtain a control instruction sequence c(k), including control information such as operation code, address code, and data. The instruction parsing module transmits the control instruction sequence c(k) to the control system for the control system to perform corresponding control operations. The control system is used to receive the control instruction sequence c(k) transmitted by the instruction parsing module and perform corresponding control operations according to the control instruction sequence c(k): the control system receives the control instruction sequence c(k) transmitted by the instruction parsing module, interprets and executes it. The control system determines the corresponding control operation, such as data reading and writing, status query, parameter configuration, etc., according to the operation code in the control instruction sequence c(k). The control system accesses the corresponding memory address or I / O port according to the address code and data in the control instruction sequence c(k) to perform data transmission or device control operations. According to the execution result, the control system sends a response signal or status information to the upper computer or other devices to realize closed-loop control and communication. Through the above-mentioned mud pulse signal processing device, a series of processing processes such as automatic collection, preprocessing, matched filtering, command parsing and control execution of the original mud pulse signal are realized, and the mud pulse signal is converted into a control command that can be recognized and executed by the control system, realizing the demodulation and control of the mud pulse signal. The mud pulse signal processing device of the present application adopts a modular design, and each functional module is connected through a standard interface, and the data stream is transmitted in an orderly manner between the modules, realizing the systematization and standardization of mud pulse signal processing; the preprocessing module effectively improves the signal-to-noise ratio of the mud pulse signal, the matched filtering module significantly enhances the recognition rate of the command signal, the command parsing module accurately extracts the control command information, and the control system flexibly executes the corresponding control operation. The entire device works in coordination to complete the demodulation and control tasks of the mud pulse signal, and improves the reliability and effectiveness of mud pulse telemetry.
[0029] Beneficial effects: Compared with the prior art, the advantages of this application are:
[0030] Adaptive wavelet transform is used to preprocess mud pulse signals. By adaptively selecting wavelet basis functions and optimal decomposition layers that match signal characteristics, the time-frequency characteristics of mud pulse signals are fully utilized to improve the effective suppression of drilling noise.
[0031] An adaptive threshold strategy and a dynamic sliding window mechanism were introduced to perform frame synchronization peak detection on the denoised mud pulse signal. Through multi-level threshold adjustment and comprehensive judgment, the influence of noise and signal strength changes on synchronization detection was overcome, and the precise positioning of the frame synchronization position was improved.
[0032] Combined with the frame synchronization results, the mud pulse signal within the complete instruction cycle is extracted as the original instruction signal, and band-limited filtering and downsampling processing are performed. While filtering out high-frequency interference, the data volume of the instruction signal is reduced, reducing the computational complexity of subsequent processing.
[0033] The cyclic redundancy check algorithm is used to perform error correction coding on the command signal sequence, and the check bits are used to improve the error positioning and automatic correction of the command signal, effectively improving the reliability of command transmission.
[0034] Through the normalization processing and quantization coding of the command signal, the reversible mapping from the mud pulse signal to the digital command code is improved, and the integrity and consistency of the command information are ensured. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 is an exemplary flow chart of a mud pulse signal processing method according to some embodiments of this specification;
[0036] Figure 2 is an exemplary flow chart of obtaining a frame synchronization signal according to some embodiments of this specification;
[0037] Figure 3 is an exemplary flow chart of obtaining frame synchronization peak detection results according to some embodiments of this specification;
[0038] Figure 4 is an exemplary flow chart of obtaining a command signal sequence according to some embodiments of this specification;
[0039] Figure 5 is an exemplary flow chart of obtaining a final instruction signal sequence according to some embodiments of this specification. DETAILED DESCRIPTION
[0040] The method and system provided in the embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0041] Figure 1is an exemplary flow chart of a mud pulse signal processing method according to some embodiments of the present specification, a mud pulse signal processing method comprising: collecting mud pulse signals; preprocessing the collected mud pulse signals; performing frame synchronization wavelet denoising on the preprocessed mud pulse signals, and obtaining denoised frame synchronization signals through wavelet transform and threshold processing; performing peak detection on the denoised frame synchronization signals to obtain frame synchronization peak detection results; extracting original command signals from the mud pulse signals according to the frame synchronization peak detection results, performing band-limited filtering and downsampling on the extracted original command signals, and obtaining downsampled command signals; the original command signals represent complete The invention discloses a method for obtaining a mud pulse signal fragment within the whole instruction cycle; according to the length characteristics of the instruction signal, the downsampled instruction signal is divided into several instruction signal fragments, each instruction signal fragment corresponds to a complete instruction; each instruction signal fragment is denoised by instruction wavelet denoising to obtain a denoised instruction signal fragment; the denoised instruction signal fragments are spliced in sequence to obtain an instruction signal sequence; a cyclic redundancy check error correction process is performed on the instruction signal sequence, and whether the instruction signal sequence has errors is determined according to the check result, and the erroneous instruction signal is corrected to obtain an error-corrected instruction signal sequence; the error-corrected instruction signal is converted into an instruction code, and output to a subsequent control system.
[0042] Data acquisition, obtain the mud pulse signal through the mud pulse signal receiving device, and perform analog-to-digital conversion to obtain the mud pulse sampling signal x (n). Obtain the mud pulse signal through the mud pulse signal receiving device, and perform analog-to-digital conversion to obtain the digital mud pulse sampling signal x (n): The mud pulse signal receiving device uses piezoelectric sensors, acceleration sensors and other sensors to convert the mud pulse signal at the drilling site into an electrical signal. The analog-to-digital converter (ADC) built into the mud pulse signal receiving device converts the electrical signal into a digital signal to obtain the mud pulse sampling signal x (n), where n is the sampling point number. The collected mud pulse signal x (n) is segmented: each segment of the mud pulse signal is set to contain N sampling points, N is a positive integer greater than 1, and is usually 128, 256, 512, etc. The mud pulse signal x (n) is segmented according to the N sampling points to obtain M segments of mud pulse signals x_m (n), where m is the segment number, m = 1, 2, ..., M. Calculate the mean value of each segment of mud pulse signal x_m(n) as the DC component dc_m of the signal: dc_m=(1 / N)*sum(x_m(n)), n=1, 2, ..., N, where sum(x) represents the sum of N sampling points. Subtract the DC component dc_m of the corresponding segment from each sampling point of each segment of mud pulse signal x_m(n) to obtain the signal segment x_m_ac(n) after removing the DC component: x_m_ac(n)=x_m(n)-dc_m, n=1, 2, ..., N. Calculate the maximum absolute value of each signal segment x_m_ac(n) as the global maximum absolute value max_abs: max_abs=max(abs(x_m_ac(n))), m=1, 2, ..., M, n=1, 2, ..., N, where abs(x) represents the absolute value and max(x) represents the maximum value. Divide the sampling points of each signal segment x_m_ac(n) by the global maximum absolute value max_abs to obtain the normalized signal segment x_m_norm(n): x_m_norm(n)=x_m_ac(n) / max_abs, m=1, 2,...,M, n=1, 2,...,N.
[0043] The normalized signal segments x_m_norm(n) are spliced in the original order to obtain the preprocessed mud pulse signal x_pre(n): x_pre(n)=[x_1_norm(n), x_2_norm(n),..., x_M_norm(n)], n=1, 2,..., N*M. Specifically, the segmented processing can select the appropriate segment length N according to the periodic characteristics of the mud pulse signal, so that each segment signal contains a complete pulse cycle to avoid signal truncation and distortion; DC component removal can eliminate the low-frequency drift and baseline drift in the mud pulse signal, and improve the dynamic range and signal-to-noise ratio of the signal; amplitude normalization can unify signal segments of different amplitudes into the same amplitude range, which is convenient for subsequent feature extraction and parameter estimation.
[0044] Figure 2 This is an exemplary flow chart for obtaining a frame synchronization signal according to some embodiments of this specification, and an adaptive wavelet transform is used to denoise the mud pulse sampling signal x(n). According to the time-frequency characteristics of the mud pulse signal, the wavelet basis function and the number of decomposition layers are adaptively selected to construct an optimal wavelet decomposition tree: the pre-processed mud pulse signal x_pre(n) is Fourier transformed to obtain the spectrum X_pre(f) of the mud pulse signal. According to the spectrum X_pre(f), the frequency component f_max corresponding to the maximum energy of the mud pulse signal is determined as the main frequency component of the mud pulse signal. Commonly used wavelet basis functions such as Daubechies wavelet, Symlet wavelet and Coiflet wavelet are selected, and their amplitude-frequency response H(f_max) at the main frequency component f_max is calculated. The wavelet basis function with the largest amplitude-frequency response is selected as the optimal wavelet basis function, which is recorded as ψ(t). According to the sampling frequency f_s of the mud pulse signal and the scale function φ(t) of the selected wavelet basis function, the maximum number of decomposition layers L is determined.
[0045] The pre-processed mud pulse signal x_pre(n) is subjected to wavelet decomposition to obtain the wavelet coefficients of each layer: the optimal wavelet basis function ψ(t) and the maximum decomposition layer number L are used to perform L-layer wavelet decomposition on the signal x_pre(n). After decomposition at the lth layer, the low-frequency approximate coefficient a_l(k) and the high-frequency detail coefficient d_l(k) are obtained, where l=1, 2, ..., L, k is the coefficient sequence number. According to the statistical characteristics of the wavelet coefficients, the thresholds of the wavelet coefficients of each layer are adaptively calculated, and the wavelet coefficients are subjected to soft threshold processing: for the high-frequency detail coefficient d_l(k) of the lth layer, its standard deviation σ_l is calculated. According to the standard deviation σ_l and the preset threshold factor λ, the threshold τ_l=λ*σ_l of the lth layer is calculated. The high-frequency detail coefficient d_l(k) is subjected to soft threshold processing to obtain the high-frequency detail coefficient d_l_t(k) after threshold processing: d_l_t(k)=sign(d_l(k))*max(|d_l(k)|-τ_l, 0), where sign(x) represents the sign function and |x| represents the absolute value. The high-frequency detail coefficient d_l_t(k) after threshold processing is subjected to shrinkage processing: according to the difference between the absolute value of the high-frequency detail coefficient d_l_t(k) and the threshold τ_l, and the preset shrinkage factor α, the shrinkage amount δ_l(k) is calculated: δ_l(k)=α*(|d_l_t(k)|-τ_l), and the shrinkage amount δ_l(k) is subtracted from the high-frequency detail coefficient d_l_t(k) to obtain the shrunk high-frequency detail coefficient d_l_s(k): d_l_s(k)=d_l_t(k)-δ_l(k).
[0046] The optimal wavelet basis function ψ(t) is used to perform wavelet reconstruction on the wavelet coefficients after threshold processing and shrinkage to obtain the denoised mud pulse signal y(n): the low-frequency approximate coefficient a_L(k) of the maximum decomposition layer number L and the high-frequency detail coefficient d_l_s(k) after shrinkage (l=1, 2,..., L) are used as the initial coefficients for reconstruction. The optimal wavelet basis function ψ(t) is used to perform L-layer wavelet reconstruction on the initial coefficients to obtain the denoised mud pulse signal y(n). Specifically, the wavelet basis function and the number of decomposition layers are adaptively selected to construct the optimal wavelet decomposition tree matching the signal according to the time-frequency characteristics of the mud pulse signal, thereby improving the representation efficiency and denoising performance of the wavelet transform; wavelet decomposition can decompose the mud pulse signal into wavelet coefficients of different scales and frequencies to achieve multi-scale representation of the signal and separation of noise; soft threshold processing can adaptively set the threshold according to the statistical characteristics of the wavelet coefficients, perform nonlinear filtering on the wavelet coefficients, and remove high-frequency noise components; wavelet reconstruction can resynthesize the denoised wavelet coefficients into a time domain signal to obtain the denoised mud pulse signal.
[0047] Figure 3This is an exemplary flow chart for obtaining the frame synchronization peak detection result according to some embodiments of this specification, and the frame synchronization peak detection is performed on the denoised mud pulse signal y (n). The adaptive threshold strategy is used to perform peak detection on the denoised mud pulse signal y (n) to obtain the initial frame synchronization position: the mean mean_g and standard deviation std_g of the signal y (n) are calculated. The initial threshold thr_init is calculated, thr_init=mean_g+K*std_g, where K is a preset constant. The signal y (n) is peak detected, and the sample points greater than the initial threshold thr_init are used as the initial frame synchronization position. Near the initial frame synchronization position, a dynamic sliding window is used to extract local signal segments, and the frame synchronization position is accurately located by correlation peak search and peak comparison: a sliding window with a fixed width of W is set, and the sliding step is W / M, where M is a preset constant. The signal segments in each sliding window are processed: the mean mean_loc, standard deviation std_loc and peak peak_loc of the signal in the window are calculated. Calculate the first adjustment threshold thr_adj1, thr_adj1=thr_init+α*(mean_loc-thr_init), where α is a preset constant. Calculate the second adjustment threshold thr_adj2, thr_adj2=thr_adj1+β*(std_loc-thr_init), where β is a preset constant. Compare the peak value peak_loc with the second adjustment threshold thr_adj2: -If peak_loc is greater than thr_adj2, calculate the third adjustment threshold thr_adj3, thr_adj3=γ*peak_loc, and use thr_adj3 as the threshold thr_adopt of the corresponding window, where γ is a preset constant; -If peak_loc is less than or equal to thr_adj2, use thr_adj2 as the threshold thr_adopt of the corresponding window. Take the sample points in the window that are greater than the threshold thr_adopt as candidate synchronization peaks. According to the peak amplitude, peak width and adjacent peak distance of the candidate synchronization peak, obtain the real synchronization peak as the frame synchronization peak detection result: calculate the peak amplitude amp_peak, peak width width_peak of each candidate synchronization peak, and the distance dist_peak between adjacent candidate synchronization peaks. Compare the peak amplitude amp_peak with the preset amplitude threshold thr_amp: if amp_peak is greater than thr_amp, the corresponding candidate synchronization peak is used as a potential synchronization peak; if amp_peak is less than or equal to thr_amp, the corresponding candidate synchronization peak is deleted.Compare the peak width width_peak of the potential synchronization peak with the preset peak width threshold thr_width: if width_peak is greater than thr_width, the corresponding potential synchronization peak is taken as the effective synchronization peak; if width_peak is less than or equal to thr_width, the corresponding potential synchronization peak is deleted. Compare the spacing dist_peak of the effective synchronization peaks with the preset spacing threshold thr_dist: if dist_peak is greater than thr_dist, the corresponding effective synchronization peak is taken as the true synchronization peak; if dist_peak is less than or equal to thr_dist, the corresponding effective synchronization peak is deleted. The positions of all true synchronization peaks are taken as the frame synchronization peak detection results. According to the frame synchronization peak detection results, the frame synchronization period T is calculated: the number of sample points between adjacent true synchronization peaks is counted to obtain the estimated value of the frame synchronization period. All estimated values are averaged to obtain the final frame synchronization period T. Through the above frame synchronization peak detection steps, accurate frame synchronization of the denoised mud pulse signal is achieved, and reliable frame synchronization position and period are obtained. Specifically, the adaptive threshold strategy calculates the statistical characteristics of the signal and adaptively sets the initial threshold to effectively cope with signal amplitude changes and noise interference; the dynamic sliding window accurately locates the true synchronization peak near the initial frame synchronization position through local peak search and threshold adjustment, thereby improving the accuracy and robustness of frame synchronization; the joint judgment of indicators such as peak amplitude, peak width and adjacent peak spacing further screens out reliable true synchronization peaks and eliminates false peaks and missed peaks; the estimation and averaging of frame synchronization period improves the accuracy and stability of frame synchronization period.
[0048] Figure 4This is an exemplary flow chart for obtaining a command signal sequence according to some embodiments of the present specification. According to the frame synchronization peak detection result, the original command signal s(n) in the mud pulse signal y(n) is extracted. According to the frame synchronization peak position and the frame synchronization period T, the original command signal s(n) is extracted: the starting position and the ending position of each frame synchronization period are determined, and the frame synchronization period represents the length of the command period. The mud pulse signal segment located between two adjacent frame synchronization peaks is extracted as the original command signal s(n), and its length is equal to the length of the frame synchronization period. The extracted original command signal s(n) is band-limited filtered. A low-pass filter is designed, and its cutoff frequency is the highest frequency component of the command signal. The original command signal s(n) is filtered using a low-pass filter to filter out high-frequency noise higher than the command signal frequency band, and obtain the command signal s_lp(n) after band-limited filtering. The command signal s_lp(n) after band-limited filtering is downsampled: according to the frequency band characteristics of the command signal, its Nyquist frequency f_ny is calculated, which is twice the frequency band of the command signal. The command signal s_lp(n) after band-limited filtering is downsampled, and the downsampling frequency is the Nyquist frequency f_ny, and the downsampled command signal s_ds(n) is obtained. The downsampled command signal s_ds(n) is normalized: the maximum value max_s and the minimum value min_s of the command signal s_ds(n) are calculated. The command signal s_ds(n) is normalized so that its amplitude range is mapped to the interval [0, 1], and the normalized command signal segment s_norm(n) is obtained: s_norm(n) = (s_ds(n)-min_s) / (max_s-min_s). Through the above command signal extraction steps, the original command signal is accurately extracted from the mud pulse signal, and the separation and reconstruction of the command signal are realized. Specifically, the frame synchronization peak detection result provides the position and period information of the command signal in the mud pulse signal, based on which the signal fragments within each command cycle can be accurately located and extracted, avoiding missed extraction and false extraction of the command signal; the band-limited filtering processing utilizes the frequency band characteristics of the command signal to filter out high-frequency noise interference, thereby improving the signal-to-noise ratio and quality of the command signal; the downsampling processing downsamples the signal after band-limited filtering according to the Nyquist frequency of the command signal, while retaining the complete information of the command signal, reducing the data volume and processing complexity; the normalization processing maps the amplitude of the command signal to a uniform range, which is convenient for subsequent feature extraction and parameter estimation.
[0049] Figure 5This is an exemplary flow chart for obtaining the final command signal sequence shown in some embodiments of this specification, and the extracted original command signal s(n) is downsampled. The original command signal s(n) is band-limited filtered: according to the frequency band characteristics of the command signal, a low-pass filter is designed, and its cut-off frequency is the highest frequency of the command signal. The original command signal s(n) is filtered using a low-pass filter to filter out noise higher than the command signal frequency band to obtain a filtered command signal sf(n). Determine the Nyquist frequency of the command signal: according to the highest frequency f_max of the command signal, calculate its Nyquist frequency f_ny. 2.2 The Nyquist frequency f_ny is equal to Q times the highest frequency f_max of the command signal, that is, f_ny=Q*f_max, where Q is a preset constant, usually 2. Calculate the downsampling factor D: Calculate the downsampling factor D based on the sampling frequency f_s and the Nyquist frequency f_ny of the original command signal. The downsampling factor D is equal to the ratio of the sampling frequency f_s to the Nyquist frequency f_ny, that is, D=f_s / f_ny, rounded down. Downsample the filtered command signal sf(n) by D times: downsample the filtered command signal sf(n) by D times, retain the first sample point of every D sample points, and obtain the downsampled command signal sd(n). The length of the downsampled command signal sd(n) is 1 / D of the length of the original command signal, and the sampling frequency is the Nyquist frequency f_ny. Through the above-mentioned downsampling processing steps, the sampling rate reduction and data compression of the original command signal are realized, while retaining the complete information of the command signal, the data volume and processing complexity are reduced. Specifically, the band-limited filtering process utilizes the frequency band characteristics of the command signal to filter out the noise interference higher than the frequency band of the command signal, improves the signal-to-noise ratio and quality of the command signal, and provides a high-quality input signal for the downsampling process; the determination of the Nyquist frequency is based on the sampling theorem, that is, the sampling frequency is at least twice the highest frequency of the signal, which ensures the complete reconstruction of the down-sampled signal and avoids spectrum aliasing and information distortion; the calculation of the downsampling factor comprehensively considers the sampling frequency and Nyquist frequency of the original command signal, selects a suitable downsampling multiple, and minimizes the sampling rate under the premise of satisfying the sampling theorem; the downsampling process extracts sample points of the filtered command signal at equal intervals to obtain the down-sampled command signal, whose sampling rate is the Nyquist frequency and the data volume is 1 / D of the original signal. Compared with directly downsampling the original command signal, the present embodiment first performs band-limited filtering on the original command signal and then performs downsampling processing, which effectively suppresses noise interference and spectrum aliasing and improves the quality and reliability of the down-sampled signal.
[0050] Normalize the downsampled command signal sd(n), map the amplitude to the interval [0, 1], and obtain the normalized command signal sn(n). Determine the amplitude range of the downsampled command signal sd(n): find the maximum value max_sd and the minimum value min_sd of the signal sd(n). The amplitude range of the signal sd(n) is [min_sd, max_sd]. Normalize the signal sd(n): Normalize each sample point sd(i) of the signal sd(n) to obtain the normalized sample point sn(i): sn(i) = (sd(i)-min_sd) / (max_sd-min_sd). The normalization process maps the amplitude range of the signal sd(n) to the interval [0, 1] to obtain the normalized command signal sn(n). Characteristics of the normalized command signal sn(n): The length of the normalized command signal sn(n) is the same as the length of the downsampled command signal sd(n). The sampling frequency of the normalized command signal sn(n) is the same as the sampling frequency of the downsampled command signal sd(n), which is equal to the Nyquist frequency. The amplitude range of the normalized command signal sn(n) is [0, 1], with a maximum value of 1 and a minimum value of 0. Through the above normalization processing steps, the amplitude of the downsampled command signal is normalized and mapped to a unified interval of [0, 1], which is convenient for subsequent feature extraction, parameter estimation, and pattern recognition. Normalization processing: eliminates the absolute difference in signal amplitude, highlights the relative change characteristics of the signal, and is conducive to the comparison and analysis of different command signals. Unifying the signal amplitude to the interval of [0, 1] facilitates the design of subsequent algorithms and the selection of parameters, and improves the adaptability and robustness of the algorithm. The amplitude of the normalized signal is in the interval [0, 1], and the numerical range is bounded, which avoids numerical overflow and distortion and improves the stability and accuracy of numerical calculation. Normalization processing does not change the time domain and frequency domain characteristics of the signal, retains the original information and characteristics of the signal, and provides a reliable input for subsequent processing.
[0051] The normalized command signal sn(n) is quantized and encoded, converted into a binary command signal sb(n), and multiple binary command signals are spliced into a command signal sequence sb(m). Determine the parameters of the quantization encoding: According to the encoding method and error requirements of the command signal, select an appropriate quantization bit number N, usually 4 to 8 bits. Calculate the quantization step length delta, delta=1 / (2^N-1), where ^ represents the power operation. Quantize the normalized command signal sn(n): quantize each sample point sn(i) of the normalized command signal sn(n) to obtain the quantized sample point sq(i): sq(i)=round(sn(i) / delta), where round(x) represents the rounding function. The value range of the quantized sample point sq(i) is [0, 2^N-1], which is a non-negative integer. Convert the quantized sample point sq(i) into binary code: Binary encode each quantized sample point sq(i) to obtain the corresponding N-bit binary code sb_i. The number of bits of the binary code sb_i is N, each bit is 0 or 1, the high bit is in front, and the low bit is in the back. Splice the binary codes of all sample points in sequence to obtain a binary command signal sb(n). Splice multiple binary command signals sb(n) into a command signal sequence sb(m): According to the frame structure and synchronization method of the command signal, determine the length L of each frame command signal and the frame interval T. Splice L consecutive binary command signals sb(n) into a frame command signal sb_f(k), where k is the frame number. Insert T zero-valued sample points between two adjacent frames of command signals sb_f(k) as the frame interval. Splice all frame command signals sb_f(k) and frame intervals in sequence to obtain a command signal sequence sb(m). Through the above-mentioned quantization coding and sequence splicing steps, the conversion of the normalized command signal to the binary command signal is realized, and multiple binary command signals are combined into a complete command signal sequence, which is convenient for subsequent storage, transmission and analysis. Specifically, the quantization coding divides the amplitude range [0, 1] of the normalized command signal into 2^N equally spaced quantization intervals by uniform quantization, and the width of each interval is the quantization step delta. Each sample point of the normalized command signal is quantized into a corresponding non-negative integer code according to the quantization interval where its amplitude is located, and the value range is [0, 2^N-1]. Quantization coding reduces the data volume and storage space of the signal, achieves higher signal fidelity with a smaller quantization bit number N, and improves data compression efficiency. Quantization coding is uniform quantization, the quantization step is fixed, and the quantized code is linearly related to the original amplitude, which is convenient for the interpretation and restoration of the code. The sample points after quantization coding are non-negative integers with a limited numerical range, which is convenient for subsequent binary coding and data transmission.The splicing of the command signal sequence combines L consecutive binary command signals into one frame according to the frame structure and synchronization method of the command signal, and inserts T zero-value sample points between frames as frame intervals, thereby realizing frame synchronization and separation of the command signal, which is convenient for frame positioning and analysis at the receiving end.
[0052] The cyclic redundancy check algorithm is used to perform error correction coding on the instruction signal sequence sb (m). Specifically, it includes: according to the number of bits of the instruction signal and the generating polynomial, the number of remainder bits of the cyclic redundancy check is calculated, and the cyclic redundancy check matrix and the adjoint matrix are constructed; each instruction signal of sb (m) is encoded, the corresponding check bit is generated, and it is inserted after the instruction signal to form an instruction signal sequence sc (m) containing the check bit. Determine the parameters of the cyclic redundancy check: according to the number of bits k of the instruction signal, select a suitable generating polynomial g (x), usually the commonly used standard polynomials such as CRC-8, CRC-16 or CRC-32. According to the order r of the generating polynomial g (x), the number of remainder bits r of the cyclic redundancy check is calculated, and r is equal to the highest power of g (x). Construct the cyclic redundancy check matrix and the adjoint matrix: According to the generating polynomial g (x), the cyclic redundancy check matrix H of (k+r)xr is constructed, the first row of H is the coefficient of g (x), and the remaining rows are obtained by cyclic right shift. Divide the cyclic redundancy check matrix H into a kxr submatrix H1 and an rxr submatrix H2, H=[H1;H2]. Calculate the adjoint matrix A of the cyclic redundancy check matrix H, A=[IkA2;0Ir], where Ik is the kxk identity matrix, Ir is the rxr identity matrix, and A2 is the kxr submatrix, satisfying H1+A2H2=0.
[0053] Perform cyclic redundancy check encoding on the instruction signal sequence sb(m): divide the instruction signal sequence sb(m) into several instruction signals sb_i of length k, where i is the instruction signal number. Perform cyclic redundancy check encoding on each instruction signal sb_i to obtain r-bit check bits c_i: c_i=sb_i*A2, where * represents matrix multiplication, sb_i is a 1xk row vector, A2 is a kxr submatrix, and c_i is a 1xr row vector. Insert the check bits c_i after the corresponding instruction signal sb_i to form a command signal sc_i with a length of k+r containing check bits: sc_i=[sb_ic_i], and splice all the instruction signals sc_i containing check bits in sequence to obtain a command signal sequence sc(m) containing check bits. Through the above cyclic redundancy check encoding steps, error correction encoding of the instruction signal sequence is realized, and check bits are inserted after each instruction signal for error detection and correction at the receiving end, thereby improving the reliability of instruction signal transmission.
[0054] Specifically, cyclic redundancy check is a commonly used error correction coding method. By generating polynomials and cyclic redundancy check matrices, the check bits of the command signal are calculated to achieve redundant coding of the command signal. Generator polynomials and cyclic redundancy check matrices are used to map the command signal to the check bits, which achieves redundant representation of the command signal and enhances the anti-interference and error correction capabilities. The generation of the check bits is achieved through matrix multiplication, which is simple to calculate, easy to implement in hardware, has low coding complexity, and is suitable for real-time processing. The number of check bits r is determined by the order of the generator polynomial. By selecting a suitable generator polynomial, the number of check bits and error correction capabilities can be flexibly adjusted to meet different application requirements. Cyclic redundancy check coding has good random error detection and correction capabilities, and is particularly suitable for communication scenarios such as command signals with short frames and low bit error rates. At the receiving end, the command signal sequence containing the check bits is checked and corrected through the cyclic redundancy check matrix to determine whether there is a transmission error, and perform corresponding correction processing to ensure the correct reception and execution of the command signal.
[0055] The received command signal sequence sc(m) is error detected and corrected using a cyclic redundancy check algorithm. Specifically, it includes: performing a cyclic redundancy check operation on sc(m), judging whether an error occurs based on the check result; if an error occurs, using the check result and the adjoint matrix to calculate the error pattern, determine the error location and correct it, and output the error-corrected command signal sequence sb'(m); if no error occurs, directly output sc(m). Receive the command signal sequence sc(m) containing check bits: The receiving end receives the command signal sequence sc(m) containing check bits sent by the transmitting end. The received command signal sequence sc(m) is divided into several command signals sc_i containing check bits of length k+r, where i is the command signal number. Perform a cyclic redundancy check operation on each command signal sc_i containing check bits: extract the first k bits of the command signal sc_i to obtain the received command signal sb'_i, and extract the last r bits to obtain the received check bits c'_i.
[0056] Perform a cyclic redundancy check operation on the received command signal sb'_i to obtain a check result s_i: s_i=sb'_i*H1+c'_i*H2, where * represents matrix multiplication, and H1 and H2 are sub-matrices of the cyclic redundancy check matrix H. Determine whether the check result s_i is a zero vector. If so, the command signal sc_i is not wrong. If not, the command signal sc_i is wrong. Correct the error of the erroneous command signal sc_i: calculate the error pattern e_i using the check result s_i and the companion matrix A: e_i=s_i*A, where A is the companion matrix of the cyclic redundancy check matrix H. The error pattern e_i is a vector of length k+r, in which the position of the non-zero element corresponds to the error position. Determine the error position according to the error pattern e_i, invert the corresponding position, and obtain the error-corrected command signal sc'_i. Extract the first k bits of the error-corrected command signal sc'_i to obtain the error-corrected command signal sb'_i.
[0057] Output the error-corrected command signal sequence sb'(m): splice the error-corrected command signal sb'_i and the error-free command signal sb'_i in sequence to obtain the error-corrected command signal sequence sb'(m). Output the error-corrected command signal sequence sb'(m) as the final output of the receiving end. Through the above-mentioned cyclic redundancy check error detection and correction steps, the error detection and correction of the received command signal sequence is realized, the errors in the transmission process are eliminated, the original command signal sequence is restored, and the correct reception and execution of the command signal are guaranteed. Specifically, the cyclic redundancy check error detection determines whether the received command signal is erroneous through a check operation. The check operation uses the received command signal and the check bit, calculates the check result through the cyclic redundancy check matrix, and determines whether an error is made according to whether the check result is a zero vector. The check operation is realized by matrix multiplication, which is simple in calculation, easy to implement in hardware, has low detection complexity, and is suitable for real-time processing. The check operation uses the redundant information of the command signal and the check bit to realize effective error detection, with high detection probability and low missed detection rate. The result of the check operation directly reflects the error situation. Whether an error occurs can be determined based on whether the check result is a zero vector. The judgment is simple and reliable. When an error is detected, the cyclic redundancy check error correction determines the error position and corrects it through the error pattern. The error pattern is calculated by the check result and the adjoint matrix. The position of the non-zero element corresponds to the error position. The error can be eliminated by inverting the error position and restoring the original command signal. The calculation of the error pattern is realized by matrix multiplication. The calculation is simple, easy to implement in hardware, and has low error correction complexity, which is suitable for real-time processing. The error pattern directly gives the error position without complex search and judgment. The error correction speed is fast and the error correction delay is low. The calculation of the error pattern utilizes the adjoint matrix of the cyclic redundancy check matrix, makes full use of redundant information, has strong error correction capability, and has a high error correction probability. The error-corrected command signal sequence is consistent with the original command signal sequence, which restores the correctness of the command signal and ensures the reliable execution of the command signal.
[0058] Decode the error-corrected command signal sequence sb'(m) into the corresponding command code to realize the conversion from mud pulse signal to command code, and transmit the command code to the downhole instrument to control its working state. Divide the error-corrected command signal sequence sb'(m) into several command signals sb'_i: According to the frame structure and synchronization mode of the command signal, determine the length L and frame interval T of each frame command signal. Divide the error-corrected command signal sequence sb'(m) into several command signals sb'_i of length L according to the frame structure, where i is the command signal number. Remove the frame interval between the command signals sb'_i to obtain a continuous command signal sequence. Decode each command signal sb'_i into the corresponding command code: According to the encoding mode and code book of the command signal, decode the command signal sb'_i into the corresponding command code c_i. The command code c_i is an element in the predefined command set, representing a specific control command or data information. Commonly used command codes include but are not limited to: tool address code, tool status code, sensor data code, control command code, etc. Transmit the decoded instruction code c_i to the downhole instrument: Transmit the decoded instruction code c_i to the downhole instrument through wired or wireless communication. Common communication methods include but are not limited to: cable communication, acoustic wave communication, electromagnetic wave communication, etc. According to the address and interface protocol of the downhole instrument, the instruction code c_i is sent to the corresponding instrument. The downhole instrument performs corresponding operations according to the received instruction code c_i: After the downhole instrument receives the instruction code c_i, it performs corresponding operations according to the type and content of the instruction code. For the tool address code, the downhole instrument determines whether it matches its own address. If it matches, it is ready to receive subsequent instruction codes. For the tool status code, the downhole instrument updates its own working status according to the content of the status code, such as switch status, parameter settings, etc.
[0059] For the sensor data code, the downhole instrument extracts the sensor data in the data code to monitor and record the downhole environmental parameters. For the control instruction code, the downhole instrument performs the corresponding control operation according to the content of the instruction code, such as opening and closing valves, adjusting parameters, etc. The downhole instrument returns the operation result and status information: After the downhole instrument performs the operation corresponding to the instruction code, the operation result and status information are encoded into a response code a_i. The response code a_i represents the execution status of the operation and the current status of the instrument, which is used to feedback to the ground control system. The downhole instrument sends the response code a_i to the ground control system through wired or wireless communication. Through the above-mentioned instruction signal decoding and transmission steps, the error-corrected instruction signal sequence is converted into the corresponding instruction code, and the instruction code is transmitted to the downhole instrument to control its working state, completing the conversion and transmission of the mud pulse signal to the instruction code, and realizing the effective control of the downhole instrument by the ground control system. Specifically, the instruction signal decoding converts the instruction signal into the corresponding instruction code through a predefined encoding method and code book, realizes the mapping of the instruction signal to the instruction code, and restores the control instruction or data information represented by the instruction signal. The transmission of the instruction code is done by wired or wireless communication, and the instruction code is reliably sent to the target downhole instrument, realizing the remote control of the downhole instrument by the ground control system. The downhole instrument performs corresponding operations according to the received instruction code, such as status update, data acquisition, control execution, etc., realizing the monitoring and control of the downhole equipment. After the downhole instrument completes the operation, it encodes the operation result and status information into a response code and sends it to the ground control system through communication, realizing two-way communication and interaction between the downhole instrument and the ground control system. The ground control system can grasp the working status and execution results of the downhole instrument in real time, which is convenient for subsequent analysis and decision-making.
Claims
1. A mud pulse signal processing method, comprising: Collect mud pulse signals; Preprocessing the collected mud pulse signal; The pre-processed mud pulse signal is subjected to frame synchronization wavelet denoising, and the denoised frame synchronization signal is obtained through wavelet transform and threshold processing; Performing peak detection on the denoised frame synchronization signal to obtain a frame synchronization peak detection result; According to the frame synchronization peak detection result, the original command signal is extracted from the mud pulse signal, and the extracted original command signal is subjected to band-limited filtering and down-sampling to obtain a down-sampled command signal; the original command signal represents a mud pulse signal segment within a complete command cycle; According to the length characteristics of the command signal, the downsampled command signal is divided into a number of command signal segments, each command signal segment corresponds to a complete command; Using command wavelet denoising to denoise each command signal segment, and obtaining a denoised command signal segment; The denoised command signal segments are sequentially spliced to obtain a command signal sequence; Perform cyclic redundancy check error correction on the command signal sequence, determine whether the command signal sequence has errors based on the check results, correct the erroneous command signals to obtain the corrected command signal sequence, convert the corrected command signals into command codes, and output them to the subsequent control system.
2. The mud pulse signal processing method according to claim 1, characterized in that: Preprocess the collected mud pulse signal, including: The mud pulse signal is segmented, each segment of the mud pulse signal includes N sampling points, where N is a positive integer greater than 1; Calculate the mean value of each mud pulse signal as the DC component; Subtract the DC component of the corresponding segment from each sampling point of each mud pulse signal to obtain a signal segment after the DC component is removed; Calculate the maximum absolute value of each signal segment as the global maximum absolute value; Divide the sampling points of each signal segment by the global maximum absolute value to obtain a normalized signal segment; The normalized signal segments are spliced together as the preprocessed mud pulse signal.
3. The mud pulse signal processing method according to claim 2, characterized in that: The pre-processed mud pulse signal is subjected to frame-synchronized wavelet denoising, including: According to the frequency domain characteristics of the mud pulse signal, the wavelet basis function and the number of decomposition layers are selected; The pre-processed mud pulse signal is subjected to multi-layer wavelet decomposition using the selected wavelet basis function and decomposition layer number to obtain the wavelet coefficients of each layer, wherein the wavelet coefficients include low-frequency coefficients and high-frequency coefficients; According to the signal-to-noise ratio of the mud pulse signal, the threshold of the wavelet coefficient of each layer is calculated; The high-frequency coefficients of each layer of wavelet coefficients that are less than the threshold of the corresponding layer are set to zero to obtain the wavelet coefficients after threshold processing; Performing shrinkage processing on the high-frequency coefficients in the wavelet coefficients after threshold processing, calculating the shrinkage amount according to the difference between the absolute value of the high-frequency coefficient and the threshold and the preset shrinkage factor, and subtracting the shrinkage amount from the high-frequency coefficient to obtain the shrunken high-frequency coefficient; The selected wavelet basis function is used to perform wavelet reconstruction on the wavelet coefficients after the high-frequency coefficients are shrunk to obtain the denoised frame synchronization signal.
4. The mud pulse signal processing method according to claim 3, characterized in that: Select the wavelet basis function and the number of decomposition levels, including: Perform Fourier transform on the pre-processed mud pulse signal to obtain the time-frequency distribution characteristics of the mud pulse signal; According to the time-frequency distribution characteristics, the frequency component corresponding to the maximum energy of the mud pulse signal is determined as the main frequency component of the mud pulse signal; Calculate the amplitude-frequency response of Daubechies wavelet, Symlet wavelet and Coiflet wavelet basis functions at the main frequency components, and select the wavelet basis function with the largest amplitude-frequency response; The maximum number of decomposition layers is determined according to the sampling frequency of the mud pulse signal and the scale function of the selected wavelet basis function.
5. The mud pulse signal processing method according to any one of claims 2 to 4, characterized in that: Perform peak detection on the denoised frame synchronization signal to obtain a frame synchronization peak detection result, including: Calculate the mean of the frame synchronization signal after denoising g and standard deviation std g , calculate the initial threshold thr init : thr init =mean g +K×std g A sliding window with a fixed width W is used to segment the frame synchronization signal. The sliding step is W / M, and the mean of the signal in each window is calculated. loc , standard deviation std loc and peak loc ; Calculate the first adjustment threshold thr adj1 , thr adj1 =thr init +α×(mean loc -thr init ); Calculate the second adjustment threshold thr adj2 , thr adj2 =thr adj1 +β×(std loc -thr init ); Compare peak value loc The second adjustment threshold thr adj2 If the size of peak loc Greater than thr adj2 , then calculate the third adjustment threshold thr adj3 , thr adj3 =γ×peak loc , will thr adj3 As the threshold thr of the corresponding window adopt ; if peak loc Less than or equal to thr adj2 , then thr adj2 As the threshold thr of the corresponding window adopt ; The denoised frame synchronization signal is greater than the threshold thr of the corresponding window. adopt The sample points are taken as candidate synchronization peaks; According to the peak amplitude, kurtosis and adjacent peak distance of the candidate synchronization peak, the real synchronization peak is obtained as the frame synchronization peak detection result.
6. The mud pulse signal processing method according to claim 5, characterized in that: According to the peak amplitude, kurtosis and adjacent peak distance of the candidate synchronization peak, the real synchronization peak is obtained as the frame synchronization peak detection result, including: Calculate the peak amplitude amp of each candidate synchronization peak peak , peak width peak , and the distance between adjacent candidate synchronization peaks dist peak ; Compare the peak amplitude amp peak and the preset amplitude threshold thr amp , if amp peak Greater than thr amp , then the corresponding candidate synchronization peak is taken as a potential synchronization peak, otherwise, the corresponding candidate synchronization peak is deleted; Compare the peak widths of potential synchronous peaks peak The preset peak width threshold thr width If width peak Greater than thr width , then the corresponding potential synchronization peak is taken as the effective synchronization peak, otherwise, the corresponding potential synchronization peak is deleted; Compare the effective synchronization peak distance dist peak The preset spacing threshold thr dist , if dist peak Greater than thr dist , the corresponding valid synchronization peak value is taken as the real synchronization peak value, otherwise, the corresponding valid synchronization peak value is deleted; The positions of all true synchronization peaks are taken as the frame synchronization peak detection results.
7. The mud pulse signal processing method according to claim 6, characterized in that: According to the frame synchronization peak detection result, the original command signal is extracted from the mud pulse signal, and the extracted original command signal is downsampled, including: Determine the starting position and the ending position of each frame synchronization cycle according to the frame synchronization peak detection result, wherein the frame synchronization cycle represents the instruction cycle length; Extracting a mud pulse signal segment between two adjacent frame synchronization peaks as an original command signal, wherein the length of the original command signal is equal to the length of the frame synchronization period; A low-pass filter is used to perform band-limited filtering on the extracted original command signal to filter out high-frequency noise that is higher than the command signal frequency band; Downsampling the original command signal after band-limited filtering, the downsampling frequency is the Nyquist frequency of the command signal, and a downsampled command signal is obtained; The downsampled command signal is normalized to obtain a normalized command signal segment.
8. The mud pulse signal processing method according to claim 7, characterized in that: The filtered original command signal is downsampled, and the downsampling frequency is the Nyquist frequency of the command signal to obtain the downsampled command signal, including: The Nyquist frequency is determined according to the highest frequency of the command signal, and the Nyquist frequency is Q times the highest frequency of the command signal; Calculate the downsampling factor D, where D is equal to the ratio of the sampling frequency of the original command signal to the Nyquist frequency; The original command signal after band-limited filtering is downsampled by D times, and the first sample point of every D sample points is retained to obtain a downsampled command signal sequence.
9. The mud pulse signal processing method according to claim 8, characterized in that: Performing cyclic redundancy check error correction processing on the command signal sequence to obtain a corrected command signal, and converting the corrected command signal into a command code, including: According to the number of bits of the command signal and the generator polynomial, the number of remainder bits of the cyclic redundancy check is calculated, and a cyclic redundancy check matrix and an adjoint matrix are constructed; Performing cyclic redundancy check encoding on each instruction signal segment of the instruction signal sequence to obtain an instruction signal segment including check bits, wherein the number of check bits is equal to the number of remainder bits; Sequentially splicing the command signal segments containing the check bits to obtain a command signal sequence containing the check bits; For the instruction signal sequence including the check bit, a cyclic redundancy check operation is performed using a cyclic redundancy check matrix; If the check result is zero, it is determined that the received command signal sequence is correct, and the check bit is removed from the command signal sequence to obtain a corrected command signal sequence; If the check result is not zero, the product of the check result and the adjoint matrix is calculated as the error pattern; The error position is determined according to the error pattern, and the instruction signal bit corresponding to the error position is flipped to obtain the error-corrected instruction signal sequence; the check bit is removed from the error-corrected instruction signal sequence to obtain the final instruction signal sequence.
10. A device based on the mud pulse signal processing method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Mud pulse signal processing method
CN111535802A
Mud pulse signal processing method and device
CN111832332A