# Noise Cancellation Method for Mud Pulse Telemetry Based on Discrete Fourier Transform
## 2 Methods
### Pump Noise Cancellation Based on DFT  
As stated earlier, traditionally used signal de-noising methods usually rely on the pump noise period to process signals in the time domain, and these methods have yielded good results. However, for mixed signals comprising the original signal and the noise generated by multiple pumps operating at different frequencies, the accuracy and effectiveness of noise cancellation cannot meet the requirements. This is primarily because no specific pump noise period can be identified. Therefore, it is indispensable to devise a noise cancellation method capable of handling a multi-pump condition. In this section, a method for pump noise cancellation based on DFT is presented. The purpose is to overcome the shortcomings of traditional methods and provide an effective and reliable approach to eliminating the noise produced by multi-pumps operating at different frequencies. Discrete Fourier transform (DFT) is based on Fourier transform and is one of the most common transformation techniques used in signal analysis [36]. The principle of the algorithm is simple, the amount of computation is small, and the output signal-to-noise ratio is often high. The definition of discrete Fourier transform is as follows [37]:  
Figure 3: Flow chart of traditional pump noise cancellation based on standard pump signature. Given discrete time series, \(f_{1}\), \(f_{2}\),...\(f_{n}\), assume that the sequence is absolutely integrable, and its Fourier transform \(F(k)\) is  
\[F(k)=\sum_{n=0}^{N-1}f(n)e^{\frac{2\pi kn}{N}} \tag{4}\]  
where \(k\) is a positive integer. Correspondingly, the transformation process is reversible, and the inverse discrete Fourier transformation \(f(n)\) is  
\[f(n)=\frac{1}{N}\sum_{k=0}^{N-1}F(k)e^{\frac{2\pi kn}{N}} \tag{5}\]  
where \(k\) is a positive integer. Fourier transform is a tool for converting the time domain to the frequency domain. Signal function and its Fourier transform function are two different forms of the same energy signal. The former shows the time information but hides the frequency signal, and the latter shows the frequency information but hides the time information [38]. Compared with the earlier mentioned scheme using an empirical waveform (standard pump signature), the essential difference in this method is that it maps the similar operation from the original time domain to the corresponding frequency domain through DFT so as to cancel the multi-pump noise in the frequency domain. In this way, it can better solve the problem of the unsatisfactory de-noising effect in some time domains. Compared with the existing schemes using continuous Fourier transform or continuous Morlet wavelet transform, this method can adaptively update the standard pump noise samples point by point in the frequency domain and more accurately eliminate the pump noise. The whole flow chart of the DFT de-noising method is shown in Figure 4, and it mainly includes the following steps:  
(1) Acquire the data \(r(t)\) of double pumps in real wells. (2) According to the characteristics of modulation, carrier frequency, and symbol bandwidth of mud pulse communication, determine the performance index of the low-pass filter and use the low-pass filter to eliminate the out-band noise. (3) Obtain the noise spectrum of the multi-pump. Step 1, extract the pure pump noise signal from the noise signal. Step 2, calculate the cycles of each pump. Firstly, decompose the waveforms of multiple pump noise signals using frequency point separation; secondly, map the pure pump noise from the time domain to different frequency points in the frequency domain according to the different periods of each pump; thirdly, find the rising edge of the signal to determine the starting point and ending point of the pump noise period. Step 3, perform DFT for pump noise. Take the number of pumps per minute from multiple pumps as prior information. Find the fundamental frequency peak in the spectrum obtained by DFT. (4) Carry out DFT for the received signal after filtering. (5) Calculate the initial phase and amplitude.