NOISE SUBTRACTION FILTER
Field of the Invention
This invention relates to methods and apparatus for filtering noise signals that occur on a periodic basis. The invention is particularly suitable for use in filtering pump noise in telemetry systems in which data is transmitted in the form of pressure pulses through the fluid that is employed in drilling a well. In well drilling the oscillating component of the pump pressure signal that is generated by the pump or pumps is often much larger than the pulses that are telemetered through the well drilling fluid, and hence it is essential that the pump noise be removed so that the telemetered pulses can be recognized and detected.
The Prior Art
The prior art arrangements for filtering pump noise include frequency responsive electric networks, and subtraction circuitry in which pump noise is largely cancelled out by subtracting a preceding pump noise signal from a current pump noise signal.
In order for a frequency responsive electric network to function satisfactorily the frequencies of the pump noise signals must be significantly different
from the frequencies of the telemetered pulse signals. Hence, such filters are satisfactory only when the frequency characteristics of the telemetered data pulse signals are different from the frequency characteristics of the pump noise signals.
Subtraction circuitry in which a preceding pump noise signal is subtracted from a current pump noise signal has been limited to the use of a single pump because the noise signals of plural pumps interact and beat with one another to produce combined signals which change with time.
Summary of the Invention
The aforesaid difficulties are overcome in the present invention by continuously developing and updating an "average pump signature" over a certain number of pump cycles so that the average pump signature is representative of the pressure signals that are produced by the pump during a predetermined interval of time, e.g. one pump cycle. The time scale of the average pump signature is continuously compared witn the time scale of the current pump noise signal, and if necessary, the average pump signature is compressed or expanded in time by linear interpolation to correspond with the time scal of the current pump noise signal. The resultant average pump signature is then subtracted from the current pressure noise signal to leave a "residual" signal which contains the telemetered data pulses.
The updating of the average pump signature combines a portion of the last average pump signature witn a portion of the last residual signal. The data pulses have little effect upon the average pump signature since that signature is obtained by averaging over several pump cycles and hence the probability of several data pulses
occurring in synchronism with the pump pressure signals is very low. This method and apparatus functions satisfactorily when plural pumps (such as three) are used simultaneously because the pump noise signals are represented by a sum of the average pump signatures.
The invention may be carried out by programming a computer or by circuit hardware.
Brief Description of the Drawings
Fig. 1 illustrates one form of a pulse code for producing pressure pulses that may be employed in telemetering data from the interior of a well to the surface;
Fig. 2 illustrates how encoded pressure pulses may be processed at the surface to provide a read-out of the parameters that are measured downnole;
Fig. 3 illustrates four of the signals that are produced by the apparatus of this invention;
Fig. 4 illustrates the sequence of operations during data acquisition while operating with one pump;
Fig. 5 illustrates the sequence of operations during the subtraction procedure while operating with one pump;
Fig. 6 illustrates the sequence of operations during data acquisition while operating with multiple pumps;
Fig. 7 illustrates the sequence of operations during the subtraction procedure while operating with multiple pumps;
Fig. 8 shows circuit nardware that may be employed to carry out the steps of Figs. 4 and 5 with a single pump; and
Fig. 9 snows circuit hardware that may be employed to carry out the steps of Figs. 6 and 7 with multiple pumps.
Description of the Preferred Embodiments
Pulse Encoding
Copending application Serial No. 405,063 discloses and claims methods and apparatus for encoding and synchronizing data in a pulse telemetry system.
Fig. 1 illustrates one of the encoding arrangements that is disclosed in that application. A pulse is considered to be a drop in pressure for a fixed period of time (e.g. 0.5 second) followed by one second of normal pressure. Synchronization pulses are produced at the beginning of each synchronization interval. The time intervals between the successive data pulses (D1, D2, D3 ) in a sync interval provides an analog measurement of the data parameters that are to be telemetered to the surface, and three data words may be produced during each synchronization interval.
Redundant pulses (R1, R2) are provided midway in time betweeen adjacent pairs of data pulses. The redundant pulses provide a means for discriminating between data pulses and noise pulses. Thus, data pulses can be considered to be data pulses (D1, D2, D3) only if a redundant pulse exists midway in time between adjacent pairs of data pulses.
Each sync interval is a sub-frame of information, and a selected number of sub-frames (e.g. 11) comprise a frame which constitutes one complete set of data.
During certain sub-frames a particular pattern of frame identification pulses is produced and telemetered to the surface to enable the apparatus at the surface to identify the sequence of data transmission.
Processing the Encoded Data
Fig. 2 illustrates one arrangement for processing the encoded data.
The drilling rig includes the usual rotary table 10, kelly 12, swivel 14, traveling block 16, mud pumps 18, mud pit 20, and a drill string made up of drill pipe sections 22 secured to the lower end of the kelly 12 and to the upper end of a drill collar 24 and terminating in the drill bit 26. The downhole pulse encoding apparatus and a valve for producing negative pressure pulses in the drilling fluid may be located in a drill collar 28 located above the drill bit 26.
A pressure transducer 30 is coupled to the conduit for the drilling fluid and it senses the negative pressure pulses that are produced downhole.
The mud pumps 18 produce pressure signals that have certain characteristics which constitute noise with respect to the data pulses.
A strobe generator 32 produces strobe signals that represent the time required for each cycle of each mud pump.
The signals from tne pressure transducer 30 and the strobe generator 32 are applied to an input module 34 where the pressure signals are passed througn a low-pass filter and then are averaged in pairs and the average is stored 50 or 100 times per second in a ouffer until required by the filter module 36.
The filter module 36 is the subject of this invention. It serves to remove or reduce the noise signals produced by the mud pumps 18.
The output of the filter 36 is applied to a detector 38 which employs a matched fiiter to enhance the detectability of the encoded pulses.
The pulse signature used in the matched filter is a first order approximation to a rectangular pulse which has been high-pass filtered at a frequency corresponding to 1/(4*pulse width) hz. The use of a high-pass filter allows a simple level detector to be used for pulse identification.
"Ideal" mud pulse:
Actual matched filter pulse signature:
Output from matched filter:
The lowest sharp peak corresponds to the best match between actual psipulse and filter signature. seconds
A high speed FFT convolution technique is used to implement the matched filter convolution. In operation, the convolution is performed approximately once every 20 seconds whenever data is made available by the filter module 36. The output of the matched filter is stored in a "Detection Buffer" which can hold data for more than one complete sub-frame. (If the sub-frame is 60 seconds long, tne buffer is set up to hold data for a 64-second interval.)
A simple level detection scheme is performed on the (overlapping) 64-second intervals. (The detection level
is a user-controlled parameter.) Pulse position (time) is assigned at the pulse minimum; pulse height and width are also determined. The decoded pulses are stored in a "Pulse Table" for use by the decoder module 40. If pulse width does not fit witnin certain predefined limits, then the pulse is considered to be "noise" and discarded.
Sub-frame sync pulses are found by a search of invariant pulses of one-minute periods over the last three minutes. When these pulses are found, the detection buffer is shifted in time to ensure that the start of the sub-frame will be located at the start of the buffer. The time of the sync pulse is recorded for use by the decoder module 40.
The first time a downhole Tool starts up downhole, a search for frame ident pulses is enabled within the detector module 38 before the sub-frame sync pulses are identified. This enables the apparatus to synchronize on the first sub-frame that is transmitted from downhole.
The output of the detector 38 is applied to a decoder 4ϋ which identifies tne pulses and calculates the values.
This module operates once every sub-frame. Every time the detection buffer is filled, the decoder module 40 uses the information within the Pulse Table set-up by the detector module 38 to identify pulse types.
Sync pulses are first identified by their position in time. Frame ident pulses are then searched for, again at predefined time positions. All pulses are allowed a small error in time setup as a user setpoint called "Pulse Position Variance" (typically 0.1 second). All remaining pulses are searcned to identify the "groups of three equally spaced pulses" which identify data and redundant pulses.
Once the pulses are identified sub-frame numbers and data values can be calculated and supplied to the output buffer 42 via the Decoder Buffer.
The output buffer 42 transmits tne data within the decoder 40 to a computer 46 or a printer 44 for setting forth the data parameters that are transmitted to the surface.
The Pump Noise Subtraction Filter
Fig. 3A illustrates the pump strobe signals when one pump is operating. Each strobe signal is produced at the time of one pump cycle.
Fig. 3B illustrates the pump pressure signals when one pump is operating. These signals are much larger than the data pulses, and hence the pump noise signals must be removed or reduced in order to recognize and detect the data pulses.
Fig. 3C illustrates an "average pump signature" 50 that is obtained over a certain number of pump cycles. It is shown inverted with respect to tne pressure signals of Fig. 3B to illustrate the subtraction process.
The currently updated average pump signature of Fig. 3C is subtracted from eacn cycle of the pump pressure signals of Fig. 3B to expose a residual signal constituting the data signals, as illustrated in Fig. 3D.
There are two processes running simultaneously during tne pump noise filter operation. The first is tne data acquisition, shown m Figure 4 (this is the i.nput module 34 of Figure 2); the second is the subtraction process, snown in Figure 5 (this is trie filter module 36 of Figure 2).
In a computer base-d process the acquisition process will typically operate on "interrupts" generated by an external clock, with the subtraction process being the "main line" program.
Fig. 4 shows pressure data sampled at 100 times per second being stored into a n input buffer. The current
pressure data is transferred periodically to the current pressure buffer. Every time the leading edge of a Pump Strobe signal is recognized an entry is made in the Strobe Table.
The pump noise subtraction process of Fig. 5 starts every time a new Pump Strobe entry is made in the Pump Strobe Table. Since the pump speed can vary with time, the period of one cycle will change and therefore the total number of samples in one cycle will change. The current pump signature 50 may require to be compressed or expanded to match the latest pump period. The pump signature 52 illustrates the circumstance where the current pump signature is expanded so that the time base 54 is equal to the time of the current pump cycle. After this process there will be the same number of samples in the Pump Signature as there are in the current pump cycle.
The output of the pump noise subtraction filter is the "residual" 56 which is the difference between the pump pressure signals of the latest pump cycle and the current average pump signature.
The Pump Signature is updated by adding a fraction of the residual (known as the Weighting factor) to a fraction of the current signature. (Typically i/15 and 14/15 respectively.) This produces a new average pump signature 58. As the portions of the fractions are cnanged the filter can be made to distribute its "weight" over many cycles (and reduce the effect of any noise, including data pulses, on the signature) or fewer cycles, to make the signature more responsive to changes in pump signature.
The Strobe Table and Pressure Buffer are next reset to make space for new data.
When the filter is started (from scratch) the average Pump Signature is assumed to be zero for all points in the cycle. Normal operation of the filter will cause the signature to gradually take on the characteristics of the actual pump signature. For a weighting factor of W (0 < W < 1) the Calculated Pulse Signature will be the following if the last
Dump cycle was cycle "i" :
Signature=W(Residual of Pump Cycle(i))+W2(Residual of Cycle(i-l)) +W3(Residual of Cycle (i-2))+...
Figs. 6 and 7 show the changes required to operate the model using multiple pumps (simultaneously).
Fig. 6 shows that the Pump Strobe Table must now identify the pump number as well as the time of arrival of the Pump Strobe signal.
Fig. 7 shows that the subtraction process must wait until a pump strobe signal has been obtained from each operating mud pump. The "predicted" pressure is the sum of all the signatures of the operating pumps, taking into account the relative pnase position of each pump.
The residual pressure is now the difference between the current pressure data and the predicted pressure. As before, the residual pressure is the desired output from the filter.
The signatures are updated as before except that only i/(total pumps operating) of the residual is assigned to each signature.
The Strobe Table and Pressure Buffer are reset to end the process.
The algorithm for tne pump noise subtraction filter described above is set forth in detail in Appendix I hereto.
Fig. 8 illustrates how the input module 34 and filter 36 for removing pump noise can be implemented for one pump with circuit hardware.
Signals from the pressure transducer 30 are applied through a bandpass filter 60 to an analog-to-digital converter 62 where the pressure signals are sampled at 100 cycles per second. The pressure signals are averaged in pairs and the average is stored 50 times a second in a current pressure buffer 64. The current pressure buffer 64 accepts data from the analog-to-digital converter 62 during the interval of time between successive pump strobe signals (Fig. 3A).
A certain number of memory locations for data words in the current pressure buffer 64 are filled with the digital data when the pump strobe signals are one second apart. However, the pump speed can vary with time, and tne period of one pump cycle will change. Therefore the number of samples in one pump cycle will change. The current pressure buffer 64 will accept up to five seconds of digital data, so as to encompass all practical pump speeds.
The pump strobe signals of Fig. 3A are produced by the strobe generator 32 and applied to a strobe table register 66 whicn enters the successive strobe times. The register 66 is coupled to a microprocessor 67 which controls the sequence of operations. The microprocessor 67 controls the transfer of data from the buffer 64 and the transfer of signatures from buffers 74 and 76.
One subtraction process is initiated each time that a new entry is made in tne strobe table register 66.
Upon the occurrence of a new entry in the strobe table register 66, the data in the current pressure buffer 64 and the current average pump signature are shifted to the subtractor circuit 68 wnich subtracts one from tne other
to produce at its output 70 the residual signal of Fig. 3D. The residual signal is stored in a residual buffer 72 until it is called for by the detector 38.
The average pump signature is obtained by averaging the pressure signals that are produced over a selected number of the current pump cycles in an update pump signa ture averaging buffer 74.
Preferably, the average pump signature is also updated periodically by the addition of a fraction of the current residual signal in the residual buffer 72 to a fraction of the current average pump signature. The fraction of the current residual signal that is added to the current average pump signature is called the "weighting factor". The proportions of the fractions can be cnanged to acnieve particular results. For example, a large number of pump cycles may be employed in developing a signature wherein the effect of any noise, including mud pulses, is reduced. If fewer pump cycles are employed in developing the signature, the average pump signature is more responsive to changes in the pump signature.
Typical operating parameters for producing an updated average pump signature employ 14/15 of the old average pump signature plus 1/15 of the current residual signal.
The averaging of the pressure signals that are produced during a predetermined number of pump cycles and the addition of a fractional part (e.g. 14/15) to a fractional part (e.g. 1/15) of the residual signal is performed by the update pump signature averaging buffer 74. The current residual signal .from the residual buffer 72 is shifted into the averaging buffer during each pump cycle where the 14/15 and 1/15 addition is effected. The resultant current average pump signature is snifted into the average pump signature buffer 76.
A compressor/expander 78 serves to compress or expand the time scale of the current average pump signature in buffer 76 so that it corresponds to tne time scale of the current pressure in buffer 64. Subtraction occurs on a data word by data word basis.
Thus the appropriate word from the pump signature buffer is subtracted from the current word in the data buffer. The word selected from the average pump signature buffer 76 is selected by the compressor/expander 78 under the control of microprocessor 67 according to the following formula: m = s
where m is the index of the word selected from the pump signature buffer, s is the total number of words in the pump signature buffer, i is the index of the current word m the data buffer 64 and n is the length, in words of the pressure data stored in tne data buffer 64.
When the filter operation commences the average pump signature is zero for all points in the cycle. As the initial current pressure cycles are stored in the buffer 64, tney are shifted through the subtractor 68 and the residual buffer 72 into tne buffer 74 wnere tne pump signature gradually takes on the characteristics of the actual average pump signature. The average pump signatur is continually updated by the Duffer 74 and the current average pump signature is stored in the buffer 76. The proper data points in the buffer 76 are selected by the compressor/expander 73 and shifted into the subtractor 68 where the current average pump signature and the current pump pressure are subtracted from one another to produce the residual signal that is shifted into the buffer 72.
Fig. 9 illustrates how the filter 36 for removing pump noise can be implemented for two or more pumps with circuit hardware.
The current pressure data input circuitry is the same as that shown on Fig. 8.
An average pump signature is obtained for eacn pump, with the circuitry for the respective pumps being identified by the letters A and B.
Tne outputs of the compressor/expanders 78A and 78B are applied to an adder 80 which produces the sura of all of the signatures ot the operating pumps, taking into account the relative phase position of each pump.
The signatures are updated as before except that only 1/(number of pumps operating) of the residual is assigned to each signature.
The residual pressure is then the difference between the current pressure data in buffer 64 and the predicted pressure signature in adder 80.
It will be apparent that the noise subtraction filter 36 may be expanded to function with any desired number of pumps.
APPENDIX 1
Detailed Description of the Filter Section Algorithm
The filtering algorithm employed in this section is the pump phase partition model, and the assumptions upon which this model is based have been stated in the description of the pump noise subtraction filter. The implementation details are described in the following: SYMBOL DEFINITIONS
P.in(i) = Input pressure data at the i-th sample.
S(j,i) = Input strobe data at i-th sample from pump j (l<j<3)
Is(j,k) = Sample index for k-th strobe from pump j
P.pred(i) = Predicted pressure for the i-th sample
P.sig(j,m) = Pump j's AC pressure profile at its m-th stroke phase position. 0 < m < Signature size - 1. The signature size is 123.
P.mean(i) = Predicted mean pressure for the i-th sample.
P.res(i) = Residual pressure at the i-th sample =
P.in(i) - P.pred(i). This is the filter sections output to the detector.
P.ave(j) = Pump j's average signature value.
P.ran(i) = Computer generated random pressure data.
= Pump j ' s signature update weight ; 0 <U< Update weight l imit .
The filter section receives pressure data, P.in(i), and pump strobe indices, Is (j,k), from the input section. Strobe data, S(j,i), has been evaluated for strobe sample index (strobe occurrence time) by the Input Section. The kth index has been assigned for pump j at data sample i
Is(j,k) = i whenever
S(j,i)+S(j,i-1)+S(j,i-2)-S(j,i-3)-S(j,1-4)-S(j,i -5) > (3/4) * Strobe height (j) and
Minimum (S(j,i),3(j,i-1),S(j,i-2))
> Maximum (S(j,i-3),S(j,i-4),S(j,i-5))
(The strode height is a user controlled parameter.) This particular algorithm searcnes for the leading edge of a strooe, and it is somewhat noise tolerant due to the two tescs described above.
The q-th pump's contribution to the pressure for the i-th sample is referenced in its pump signature table, P.sig, by linearly interpolating the index, m(q), for the sample index bracketed by the indices of two nearest strobes. That is,
m(q) = Signature size * (i-Is(q,kq-l))/(Is(q,kq)-Is (q,kq-1))
where kq is selected on the basis that
Is(q,kq) > i > Is (q,kq-1)
This linear interpolation of the index estimates the phase of the pump.
The predicted pressure for the i-th sample is computed by summing the individual pump pressure contributions of each pump that is "in operation" to the mean pressure, P.mean(i),
P.pred(i)=P.mean (i)-t-[sum q over all pumps in operation:
P.sig(q,m(q))]
The j-th pump is considered "in operation" if its last strobe occurred less than five seconds from the current input sample, i.e., if at the i-tn sample and for last strobe index, Is(j,k),
i-Is(j,k) < 500 (= 5 seconds)
If the pump is considered "off", its signature and update weight are initilized to zero.
The difference between the predicted pressure, P.pred, and the pressure input, P. in, composes the residual pressure.
P.res(i) = P.in(i) - P.pred(i)
which is passed to the detector section.
pump signatures, P.sig(q,m(q) ), are updated at every sample point by the relation
P.sig(q,m(q)) =
(P.sig(q,m(q))*U(q)+P.res(i))/(number of pumps in operation)
Maximum (l,U(q)+1)
After a pump stroke is complete, i.e., i=Is(q,kq), the predicted mean pressure is updated by
P.mean(i)=(P.mean(i)+P.ave(q))/2
where P.ave(q) is the mean value of the pump signature for q-th pump.
After the predicted mean pressure is updated, this average signature value is subtracted from the elements of the pump's signature table.
Also, the signature update weight is incremented until its maximum is reached,
U(q) =Minimum(U(q)+1, Signature Update Weight Limit)
Whenever there are no pumps in operation and for five seconds after this conαitions ceases to exist, the filter algorithm generated random pressure data for the residual pressure so that sample timing can be maintained,
P.res(i)=P.ran(i).