The Process of High-Data-Rate Mud Pulse Signal in Logging While Drilling System

We applied a mud pulse signal to transmit the downhole measured parameters in a Logging While Drilling (LWD) system. ,e high-data-rate mud pulse signal was almost completely overwhelmed by noise and difficult to be identified because of the narrow pulse width, impacts of the pump noise, and the reflected wave. ,e wavelet transform’s multiresolution is suitable for signal denoising. In this paper, during the denoising process of the wavelet transform, we used a series of evaluation parameters to select the optimal parameter combination for denoising a mud pulse signal. We verified the feasibility of the wavelet transform denoising algorithm by analysing and processing an operational high-data-rate mud pulse signal. ,e decoding algorithm was available by applying self-correlation and bit synchronization. ,e application results through a field application showed that the processing algorithm was suitable for the high-data-rate mud pulse signal’s process.


Introduction
In Measurement While Drilling/Logging While Drilling systems (MWD/LWD), mud pulse telemetry, which generally transmitted the downhole measured signal by controlling the needle's movement to instantly block mud flow inside the drill collar [1], remains the most widely used and reliable method for transmitting data from downhole sensors to the surface [2].
However, the 1.0 s positive pulse width with a transmission rate of about 0.8 bit/s [3] is usually applied for engineering services in China; it can not only meet the requirements of real-time transmission of measurement parameters but also increase drilling time and cost.
Reducing the pulse width [4] can effectively increase transmitting rates; however, the mud channel (the pipe bore filled with flowing drilling mud) causes the transmitted signal to be attenuated and further distorted [5], possibly causing the signal to be overcome by noise. Figure 1 shows the original signal waveform of 0.8 s pulse width and 0.3 s pulse width. e comparison in Figure 1 confirmed that the 0.3 s pulse width signal was further distorted by noise than the 0.8 s pulse width signal.
Depending on the severity of channel conditions, achieving signal reception can be a difficult task. e surface pipe pressure transducer's received signals include some kinds of noises.

Mud Pump Noises.
e principal noise source which is present is due to the pressure fluctuations caused by the process of pumping the mud. e pump pressure fluctuations can be as small as a few psi with adjusted dampers and can range up to hundreds of psi (500-600) with incorrect dampers.

Motor Drilling Noises.
Mud motor is usually used for steering operations. ese noises caused by the motor's drilling can range from a few psi to hundreds of psi and will tend to occupy the frequency band below the expected mud pump noise. However, the motor "noise" will tend to be more random than pump noise.

Other Noises.
Other noises include pressure change caused by the bit/formation interface, etc [6].
It could be confirmed that the noise of mud channel is complex and that high-data-rate pulse width signal was further distorted by noise.
Because the Fourier spectrum can only reflect the statistical characteristics of the signal, the time-domain information characteristics and frequency-domain information characteristics of the signal can be observed through the time-domain and frequency-domain, respectively, but the combination of the two cannot be achieved. It can be found that Fourier transform is to integrate the entire time domain, and it does not have the function of local analysis of signals, nor the information of time domain. erefore, it is impossible to determine the corresponding relationship between the information at a certain time in the time domain and a certain frequency in the frequency spectrum. In this way, there is a contradiction between time domain and frequency domain localization. e signal collected in practical engineering applications such as the mud pulse signal often contains a large number of nonlinear and nonstationary components, such as trend term and mutation. ese nonstationary components often reflect the important characteristic of signals.
Based on above all, the traditional Fourier transform did not suit to the process of high-data-rate mud pulse signal.

Proposed Methods
In this paper, we proposed a coding algorithm and signal's processing algorithm to realize the high-data-rate mud pulse signal's transmission. e processing block diagram of signal's recognition is shown in Figure 2. e main function of this signal detection part is to ensure that the data transmission reliably reduces the noise components of the received signal, improves the signal-tonoise ratio (SNR) before the signal is synchronously decoded, and reduces the bit error rate (BER). Synchronous decoding locates the starting position of the synchronization to identify each frame data and the transmission parameters first, then decodes the information data according to miller's bit synchronization and decoding algorithm and outputs the 0/1 sequence data of measurement parameters last.

Selection of Coding Algorithm.
A downhole coded signal should possess the following characteristics: (1) It should be easy to be detected and recognized (2) It should have fewer DC (Direct Current) components to avoid the stay-open or stay-closed state to ensure safety in drilling A commonly applied coding algorithm is the combination code [7]. In this algorithm, data are transmitted in a specific time frame according to the combination code. is algorithm has two parameters: pulse count M and time slot count N (i.e., M-in-N coding). It has the following two advantages: (1) e consumed time and pulse count M do not change while the measured binary parameter is changing (2) It is easy to detect whether some parts of the pulse signal is missed Because of its low efficiency, the maximum transmit rate is about 3.14 bps, which cannot meet the demand of 5 bps in a 0.2 s pulse width. erefore, we need a new coding algorithm for high-data-rate mud telemetry. As a typical type of phase delay modulation code, the Miller code has two characteristics: (1) It does not have DC components (2) e maximum width is 2T (T is the pulse width) Its encoding rules are as follows [8]: (1) e binary "1" in the message code is represented by 10 or 01. (2) e binary "0" message in code is divided into the following two cases: (i) Single 0, which does not jump even in the symbol time or to the adjacent symbols. (ii) e 0 series, in which the level does jump at the boundary of two 0 symbols. e comparison of commonly applied coding algorithms' transmission rate with 0.2 s pulse width is shown in Table 1. It could be concluded that miller code's transmission rate is higher than any other coding algorithm.

Signal Denoising Based on Wavelet Transform.
A wavelet transform inherits the short-time Fourier transform (STFT) idea; that is, its window size is constant, but the window shape can be changed. e transform is a time frequency analysis method that can be changed by time window and frequency window. In the time or frequency domain, it has a strong ability to take on the local characteristics of the signal because of its high resolution in the low-frequency part and low resolution in the high-frequency part of the domain [9] (Table1). erefore, wavelet transform has been adopted regularly for signal denoising.
In the wavelet analysis [10], the most discussed function space is L 2 (R). L 2 (R) is a function space made by R's squareintegral function, as given in the following equation: If ψ(t) ∈ L 2 (R) and its Fourier transform satisfies the admissible conditions, we have en, ψ is called a base wavelet or the mother wavelet. A wavelet sequence can be obtained by stretching and translating the mother wavelets, which can be described by where a, b ∈ R and a ≠ 0; a is called the expansion coefficient, and b is called the translation coefficient.
Defining equation (4) is the continuous wavelet transform based on ψ, as follows: e expansion of f(t) on a wavelet basis has the characteristics of multiresolution because the wavelet transform maps the one-dimensional time domain functions to twodimensional time scales.
Generally, the denoising process of the signals by wavelet transform can be described in the following three steps [11]: Step 1: signal's wavelet decomposition, decomposing the signal on a wavelet basis and decomposition level Step 2: quantify the wavelet decomposition's high-level coefficients by threshold Step 3: reconstruction of the one-dimensional wavelet Using these steps and drawing on the experience of actual signal processes, we found that the selection of parameters in denoising processing based on wavelet transform had an obvious influence on the denoising results.

Selection of Decomposition Level and Wavelet Basis.
e basis wavelet functions can be determined by a triplet (j,  n � 0, . . . , 2 j − 1 is the node number at the current level, and k � 0, . . . , (N/2 j ) − 1 is the shift value [12]. is is wavelet's multiresolution analysis [13]. For J � 3, its wavelet decomposition node tree is shown in Figure 3.
It could be confirmed from Figure 3 that S � A3 + D3 + D2 + D1, so by quantifying the wavelet decomposition's high-level coefficients with threshold, we could get the denoised signal S1 � A3 + D3 t + D2 t + D1 t .
However, during the denoising process, lower decomposition levels led to the inefficient removal of noise interference, whereas higher decomposition levels led to the filtering out of the signal as noise, so it is essential to choose an optimal decomposition level in the denoising of highdata-rate mud pulse signal.

Selection of reshold Function.
e two types of threshold functions are hard thresholds and soft thresholds. e disadvantage of the hard threshold is that some points will have discontinuities; the soft threshold makes the reconstructed signal smoother but may cause edge distortion [14].
In this paper, we adopted a threshold function designed by Zhang [15], as shown in the following equation: where u is the wavelet coefficient after decomposition, σ is the threshold, and N is a normal number. We arrived at two conclusions: (1) When σ is smaller, its effect is equivalent to the hard threshold function (2) When N tends to infinity, its effect is equivalent to the soft threshold function erefore, the process result of the threshold function is between the soft and hard threshold functions.

Selection of Decomposition Wavelet Basis.
Compared with the Fourier transform, the wavelet basis function used in wavelet analysis is not unique. erefore, the analysis of the same problem using a different wavelet basis will produce different results during the process of signal by wavelet transform [16]. In practical engineering applications, it is effective to select the wavelet basis by comparing the effects of the various wavelet basis during the actual process of signals.

Decoding Process
2.3.1. Synchronization. We applied a synchronous head to align a frame of data and determine whether the data were valid or not.
Barker code is a binary code group with a special rule. As a nonperiodic sequence, it is applied primarily for frame synchronization in communication systems. Its characteristic of sharp self-correlation function can conveniently distinguish among random digital information and can be identified easily; its possibility of pseudo-synchronization is low [17]. Hence, in this design, we applied the Barker code as the synchronous head. e algorithm achieved the signal detection and sequence synchronization by calculating self-correlation [18], and the algorithm can be described as follows, assuming the received digital signal: where s(n) is the detected signal, v(n) is the noise, and r 2 (n) � s f (n) is the local reference signal; the correlation function is given as follows: where N is the length of the reference signal and k � 0, 1, 2, . . ., N − 1.
Because the signal and the noise are not related, it could be considered R vf (k) ≈ 0, so R(k) � R sf (k). When the local reference signal was aligned with the received signal, we could obtain the maximum value, and we realized the synchronous head detection based on the above algorithm.

Decoding.
After finding the frame synchronization, according to the coding rules, the data can be applied directly to form the decoding calculation. e decoding steps are as follows: Step 1: identify each of the pulse signal peaks and troughs to determine the rising and falling edges of the pulse signal.
Step 2: continuously feedback the rising edge of local estimation clock using the bit synchronous ring [19] to synchronize the local clock with the received signal to determine the rising and falling edges of the sampling points.
Step 3: integrate and dump the first half and the second half of the bits of each set of sample data to compare the sign bits of the results. Judge results as "1" when they are different and as "0" when they are the same.
Step 4: verify the results based on the miller coding rule.

Evaluation Criteria of Denoising Result.
On the basis of actual practice, during this paper, we tested the commonly used wavelet basis at different decomposition level to evaluate its denoising effects by using series of evaluation criteria.

Selecting the Appropriate Wavelet Basis by the Calculated Correlation.
We used the correlation function to describe the degree of correlation between the values of a signal x (t) and y (t) at any time. e greater the correlation coefficient (less than 1), the greater the correlation between x (t) and y (t).
During the denoising process of the mud pulse signal, x 1 (n) is the original signal and x 2 (n) is the denoised signal. We determined the optimal wavelet basis by comparing the degree of correlation coefficient between the original signal and the denoised signal under different wavelet basis. e correlation function of x 1 (n) and x 2 (n) is described in the following equation:

Selecting the Appropriate Wavelet Basis by Evaluating
Ability to Reconstruct Signals. Assuming that the original pure signal is X, its noise signal is X 1 , and the signal after wavelet denoising is X 2 , equation (6) is proposed as a method of error calculation [20]: where X 2 � N i�1 X 2 i , N is the length of signal, r 1 is a whole deviation factor (r 1 ≥ 0), r 2 is an extreme deviation factor (r 2 ≥ 0), r 1 + r 2 = 1, and ρ is the reconstruction factor. In this paper, r 1 = r 2 = 0.5.
e Euclidean distance X − X 2 2 reflects the overall deviation between the original signal and the denoised signal, while max(|X − X 1 |) reflects the local deviation of the original signal and the denoised signal between the original signal and the denoised signal [21]. e significance of this formula lies in fully revealing the deviation between the two vectors. e greater the calculated ρ, the better the reconfiguration effect.

Selecting the Appropriate Wavelet Basis by SNR.
Assuming that the original pure signal is X and the signal after wavelet denoising is X 1 , the SNR is calculated in the following equation:

Removal of Baseline Drift.
Noise also resulted from the influence of various electric motors and magnetic fields in the drilling field. e composition of the mud pulse signal was complex, and we could not determine whether the pulse was valid; therefore, it was essential to remove the baseline   drift before the decoding process [22]. In this paper, we applied the wavelet analysis algorithm to remove the baseline drift of the original mud pulse signal [23].

Signal's Denoising.
On the basis of these evaluation criteria, we used a test signal to verify the effect of wavelet denoising. During the simulation process, only the superimposition of pump noise is considered. e test signal can almost represent the real mud pulse signal without considering the baseline drift. Parameters for generating test signals are shown below: (1) Simulated signal: the 3 bps mud pulse signal generated by the mud pulse system in laboratory environment (2) Noise: the pump noise was sampled from an actual drilling field (3) Sample rate: 2 kHz e test signal is shown in Figure 4; we confirmed a frequency aliasing problem in the low-frequency part of the signal.
According to the evaluation criteria in Section 3.1, based on the test signal, this paper tested the 47 most commonly used kinds of wavelet basis at different decomposition levels. Figures 5 and 6 show the test results of the basis haar, db8,  (1) Basis db8's process result was close to bior6.8.
(2) Basis haar's factor ρ was greater than any other basis, while its correlation coefficient was lower than any other basis. (3) When the decomposition level was less than 5, both factor ρ and the correlation coefficient increased with the decomposition level's increase, which meant the denoising effect increased with an increase in the decomposition level. e results shown in Figure 6 Result of frame synchronization  confirm that noise was not filtered out at level 4, although some signal was filtered out as noise at level 6. (4) When the decomposition level was greater than 5, both factor ρ and the correlation coefficient decreased with an increase in the decomposition level, which meant the denoising effect decreased with an increase in the decomposition level. (5) When the decomposition level was less than 5, the SNR increases with the decomposition level, while the decomposition level was greater than 5, the SNR decreases with the decomposition level According to these analyses, the wavelet transform's parameters used for high-data-rate mud pulse signal's denoising were decomposed at level 5 and basis db8.
Based on abovementioned conclusions, a section of the original mud pulse signal with 0.3 s pulse width (3.3 bps) in Ying-X well of XX oil field in China National Petroleum Corporation (CNPC) is shown in Figure 9. e pulse signal energy was reduced, which was almost completely obscured by noise because of the narrow pulse width, the influence of pump noise, and the reflected wave. e waveform of baseline removed signal from a section of the signal in Figure 9 is shown in Figure 10. e result of the denoised signal shown in Figure 10 with the algorithm is shown in Figure 11. According to the frequency domain, the noise interference of the original pulse signal was filtered out by the wavelet transform.
Based on equation (10), the calculated SNR of denoised signal is 116.2661 dB. e test results showed that the mud pulse signal processing algorithm based on wavelet transform had good adaptability, achieving 0.3 s pulse width of the original signal's denoising.

Synchronization.
In this experiment, we applied the 13 bit Barker code as the synchronous head. e data sequence was 36 bits; the data length was 490 sampling points after 10 time's extractions. Figure 12 shows the frame synchronization results after the extraction. e four sampling points were 237, 727, 1217, and 1707, the data length of each frame was 490, and all the data points were in the rising edge.

Field
Application. Based on the above signal processing algorithm, since 2016, the high-data-rate mud pulse system has been carried out more than 8 field tests at different conditions in Changqing Oilfield and Qinghai Oilfield of CNPC. Table 3 shows the preset parameters' value (in HEX). As shown in Figure 13 the signal processing system filtered out the noise, and on its left part, the decoded data are the same as the preset value.

Conclusions
In this paper, aiming at the process of high-data-rate mud pulse signal to acquire the transmitted downhole information, we proposed a signal processing algorithm including detecting part and decoding part.
In detecting part, based on the advantages of multiresolution characteristics of wavelet transform in signal analysis, we proposed a wavelet transform algorithm for denoising high-data-rate mud pulse signals. By comparing the correlation coefficient and reconstruction factor of the signal before and after denoising, we determined an optimal parameter combination for the denoising processing of a high-data-rate mud pulse signal and demonstrated the feasibility of the algorithm shown using actual data processing.
In decoding part, according to the characteristics of Barker code and Miller code, we designed a decoding algorithm and verified the correctness and feasibility of the algorithm through a field application.
To realize the higher data rate (more than 10 bps) achieved by continuous wave [24], additional research on a dual-channel sensors' signal-processing algorithm should be conducted to increase the signal's SNR.

Data Availability
e experimental data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.