12
SPE 96026 Determination of Optimal Window Size in Pressure-Derivative Computation Using Frequency-Domain Constraints Y. Cheng, SPE, W.J. Lee, SPE, and D.A. McVay, SPE, Texas A&M U. Copyright 2005, Society of Petroleum Engineers This paper was prepared for presentation at the 2005 SPE Annual Technical Conference and Exhibition held in Dallas, Texas, U.S.A., 9 – 12 October 2005. This paper was selected for presentation by an SPE Program Committee following review of information contained in a proposal submitted by the author(s). Contents of the paper, as presented, have not been reviewed by the Society of Petroleum Engineers and are subject to correction by the author(s). The material, as presented, does not necessarily reflect any position of the Society of Petroleum Engineers, its officers, or members. Papers presented at SPE meetings are subject to publication review by Editorial Committees of the Society of Petroleum Engineers. Electronic reproduction, distribution, or storage of any part of this paper for commercial purposes without the written consent of the Society of Petroleum Engineers is prohibited. Permission to reproduce in print is restricted to a proposal of not more than 300 words; illustrations may not be copied. The proposal must contain conspicuous acknowledgment of where and by whom the paper was presented. Write Librarian, SPE, P.O. Box 833836, Richardson, TX 75083-3836, U.S.A., fax 01-972-952-9435. Abstract Analysts commonly use the pressure derivative to identify flow regimes and well-test-interpretation models in pressure- transient test analysis. Analysts and commercial analysis software commonly use Bourdet’s approach to calculate derivatives from measured pressure data. Bourdet’s algorithm includes a weighted central-difference approximation with a certain “window” size based on an increment in the logarithm of time, represented by the symbol L. Although test analysts commonly select L in the range of 0.1 to 0.3 log cycle, no criterion is available for choosing the optimal value of L. An unresolved issue in pressure transient test analysis is how to determine the optimal L based on the data for each individual data set such that the data are smoothed sufficiently to remove noise that obscures the signal but not smoothed to the extent that the signal itself is changed. This paper presents a new approach to calculate the pressure derivative, and improves the results compared to those we achieved in a previous paper, SPE 84471. This approach determines the optimal window size to use with Bourdet’s algorithm by employing the fast Fourier transform, Gaussian filtering, and frequency-domain constraints. Our approach denoises the data in the frequency domain, determines the optimal window size, and, when coupled with Bourdet’s algorithm in the time domain using the optimal window size, provides an improved pressure derivative. We also developed a novel adaptive smoothing algorithm by recursive differentiation-integration to further improve pressure derivative calculation. Our method can efficiently suppress measurement errors and produce smooth pressure derivatives from well-test data. Equally important, it can prevent over-smoothing of the data by inappropriate use of large window size, and it can preserve the characteristic behavior of the pressure derivative. We validate our approach with a synthetic example and demonstrate its applicability to actual field examples. Introduction Use of derivative of pressure response with respect to logarithmic time in well-test interpretation was proposed by Bourdet, Ayoub, and Pirard 1 in 1989. There are many advantages in diagnosis and identification of reservoir–well system of using pressure derivative rather than directly using pressure response in pressure-transient-test analysis. On the pressure derivative plot, characteristics of well configurations, types of reservoirs, flow regimes, and boundary effects are exhibited much more clearly compared to those on the pressure response plot. Also, pressure derivative can help to prevent us from selecting the incorrect straight line on the pressure response to estimate reservoir parameters. Analysts use the pressure derivative response curve, called for diagnostic plot, as basic information to determine an appropriate reservoir model for reservoir description. However, differentiation of measured pressure response to obtain the pressure derivative is a process of noise amplification when measured pressure data contains noise; as a result, the calculated derivative can be quite noisy. In practice, the actual pressure response is always contaminated by noise, and consequently the calculated pressure derivative does not always allow us to diagnose and identify reservoir behavior. Therefore, many attempts have been made to find efficient derivative calculation algorithms which can handle noisy pressure measurements. In the existing literature, the algorithms for calculation of a smooth pressure-derivative are basically classified as Bourdet et al.’s 1 , local least-square 2 , curve fitting 3-4 and wavelet 4 approaches. Bourdet et al.’s 1 approach has been a standard algorithm to calculate pressure derivatives from measured well-test data since it was presented in 1989. It uses a weighted central-difference approximation with a certain window size of logarithmic time, known as the parameter L. This algorithm is commonly used in commercial software of petroleum industry for well test analysis. However, the window size, L, chosen depends on individual choice. There is no criterion available for choosing an optimal L. In commercial softwares, L=0.1 is often used as a default value, and the value of L can be optional for user input. One reference 5 suggests general choices of L in the range of 0.1 to 0.3. In Ref. 2, L=0.5 is used in the first field example, and L=0.6 and L=0.25 (corresponding to shut-in time less than 0.75 hrs and larger than 0.75 hrs, respectively) were used in the second field example. Ref. 4 used L=0.3, 0.12, and 0.15 in three field examples, respectively. No justifications were presented for the choice of these L values. Although a large

[Society of Petroleum Engineers SPE Annual Technical Conference and Exhibition - Dallas, Texas (2005-10-09)] SPE Annual Technical Conference and Exhibition - Determination of Optimal

Embed Size (px)

Citation preview

Page 1: [Society of Petroleum Engineers SPE Annual Technical Conference and Exhibition - Dallas, Texas (2005-10-09)] SPE Annual Technical Conference and Exhibition - Determination of Optimal

SPE 96026

Determination of Optimal Window Size in Pressure-Derivative Computation Using Frequency-Domain ConstraintsY. Cheng, SPE, W.J. Lee, SPE, and D.A. McVay, SPE, Texas A&M U.

Copyright 2005, Society of Petroleum Engineers This paper was prepared for presentation at the 2005 SPE Annual Technical Conference and Exhibition held in Dallas, Texas, U.S.A., 9 – 12 October 2005. This paper was selected for presentation by an SPE Program Committee following review of information contained in a proposal submitted by the author(s). Contents of the paper, as presented, have not been reviewed by the Society of Petroleum Engineers and are subject to correction by the author(s). The material, as presented, does not necessarily reflect any position of the Society of Petroleum Engineers, its officers, or members. Papers presented at SPE meetings are subject to publication review by Editorial Committees of the Society of Petroleum Engineers. Electronic reproduction, distribution, or storage of any part of this paper for commercial purposes without the written consent of the Society of Petroleum Engineers is prohibited. Permission to reproduce in print is restricted to a proposal of not more than 300 words; illustrations may not be copied. The proposal must contain conspicuous acknowledgment of where and by whom the paper was presented. Write Librarian, SPE, P.O. Box 833836, Richardson, TX 75083-3836, U.S.A., fax 01-972-952-9435. Abstract Analysts commonly use the pressure derivative to identify flow regimes and well-test-interpretation models in pressure-transient test analysis. Analysts and commercial analysis software commonly use Bourdet’s approach to calculate derivatives from measured pressure data. Bourdet’s algorithm includes a weighted central-difference approximation with a certain “window” size based on an increment in the logarithm of time, represented by the symbol L. Although test analysts commonly select L in the range of 0.1 to 0.3 log cycle, no criterion is available for choosing the optimal value of L. An unresolved issue in pressure transient test analysis is how to determine the optimal L based on the data for each individual data set such that the data are smoothed sufficiently to remove noise that obscures the signal but not smoothed to the extent that the signal itself is changed.

This paper presents a new approach to calculate the pressure derivative, and improves the results compared to those we achieved in a previous paper, SPE 84471. This approach determines the optimal window size to use with Bourdet’s algorithm by employing the fast Fourier transform, Gaussian filtering, and frequency-domain constraints. Our approach denoises the data in the frequency domain, determines the optimal window size, and, when coupled with Bourdet’s algorithm in the time domain using the optimal window size, provides an improved pressure derivative. We also developed a novel adaptive smoothing algorithm by recursive differentiation-integration to further improve pressure derivative calculation. Our method can efficiently suppress measurement errors and produce smooth pressure derivatives from well-test data. Equally important, it can prevent over-smoothing of the data by inappropriate use of large window size, and it can preserve the characteristic behavior of the pressure derivative.

We validate our approach with a synthetic example and demonstrate its applicability to actual field examples.

Introduction Use of derivative of pressure response with respect to logarithmic time in well-test interpretation was proposed by Bourdet, Ayoub, and Pirard1 in 1989. There are many advantages in diagnosis and identification of reservoir–well system of using pressure derivative rather than directly using pressure response in pressure-transient-test analysis. On the pressure derivative plot, characteristics of well configurations, types of reservoirs, flow regimes, and boundary effects are exhibited much more clearly compared to those on the pressure response plot. Also, pressure derivative can help to prevent us from selecting the incorrect straight line on the pressure response to estimate reservoir parameters. Analysts use the pressure derivative response curve, called for diagnostic plot, as basic information to determine an appropriate reservoir model for reservoir description.

However, differentiation of measured pressure response to obtain the pressure derivative is a process of noise amplification when measured pressure data contains noise; as a result, the calculated derivative can be quite noisy. In practice, the actual pressure response is always contaminated by noise, and consequently the calculated pressure derivative does not always allow us to diagnose and identify reservoir behavior. Therefore, many attempts have been made to find efficient derivative calculation algorithms which can handle noisy pressure measurements.

In the existing literature, the algorithms for calculation of a smooth pressure-derivative are basically classified as Bourdet et al.’s1, local least-square2, curve fitting3-4 and wavelet4 approaches. Bourdet et al.’s1 approach has been a standard algorithm to calculate pressure derivatives from measured well-test data since it was presented in 1989. It uses a weighted central-difference approximation with a certain window size of logarithmic time, known as the parameter L. This algorithm is commonly used in commercial software of petroleum industry for well test analysis. However, the window size, L, chosen depends on individual choice. There is no criterion available for choosing an optimal L. In commercial softwares, L=0.1 is often used as a default value, and the value of L can be optional for user input. One reference5 suggests general choices of L in the range of 0.1 to 0.3. In Ref. 2, L=0.5 is used in the first field example, and L=0.6 and L=0.25 (corresponding to shut-in time less than 0.75 hrs and larger than 0.75 hrs, respectively) were used in the second field example. Ref. 4 used L=0.3, 0.12, and 0.15 in three field examples, respectively. No justifications were presented for the choice of these L values. Although a large

Page 2: [Society of Petroleum Engineers SPE Annual Technical Conference and Exhibition - Dallas, Texas (2005-10-09)] SPE Annual Technical Conference and Exhibition - Determination of Optimal

2 SPE 96026

value of L may better smooth the derivative plot, it might distort the plot and cause the loss of its characteristic shape. On the other hand, for pressure data containing a high level of noise, it is still difficult to produce smooth pressure-derivatives even a large value of L is used.

The local least-square method2 defines a region around the point of interest, and within which a line representing the gradient at the point is fit. This algorithm has a tendency to produce unpredictable end effects, and its applicability is obviously limited when pressure response deviates from a linear tendency.

The curve fitting approach3-4 uses a set of characteristic functions to fit measured data points and thus the pressure derivative can be obtained analytically. For example, Ref. 3 used a spline approximation with a nonlinear least-squares technique, while Ref. 4 used the linear combination of power functions and logarithm functions, such as 1, t1/2, t, t3/2, 1/t, log t, (log t)/t, t1/4, 1/t1/2, with a linear regression technique. However, the problem is that not all situations can be covered by these functions, and it is quite uncertain whether the fitted functions properly characterize the true pressure response.

Ref. 4 presents the wavelet method used to obtain smooth pressure derivative. The procedure is as follows: first the observed pressure response is filtered with a wavelet and the thresholds for wavelet coefficients for each level is adjusted based on a noise estimate; then the filtered pressure response is used to calculate the pressure derivative using Bourdet et al.’s1 approach with a selected value of L. The noise estimate is obtained by subtracting the pressure values of the fitted function from the noisy measured pressures. The pressures from the fitted function seem to be taken as representative of the true response. The wavelet method worked well in the demonstration of synthetic example, but was not effective for the field examples as illustrated in the paper.4

In this paper, we present a new methodology to calculate the pressure derivative response from measured pressure data. Our approach consists of three major components: we first determine the optimal window size to use with Bourdet’s algorithm by employing the fast Fourier transform and frequency-domain constraints; we then improve the quality of the pressure derivative diagnostic plot by denoising the calculated pressure derivative in the frequency domain using Gaussian filtering; to further improve pressure derivative calculation, we propose an adaptive smoothing algorithm using recursive differentiation and integration. Application of our approach to synthetic and actual examples has demonstrated that the new methodology presented in this paper can efficiently suppress measurement errors and produce smooth pressure derivatives from well-test data. Equally important, it can prevent over-smoothing of the data by inappropriate use of large window size, and preserve the characteristic behavior of the pressure derivative.

Background As mentioned before, Bourdet et al.’s algorithm is a weighted central-difference method for a derivative calculation. For an arbitrary point i in a data set of measured pressure, its corresponding derivative can be defined by Eq. 1, based on a preceding point i-1 and a following point i+1:

( ) ( )⎥⎦

⎤⎢⎣

⎡−

−−

+−−−

=⎟⎠⎞

⎜⎝⎛

−+

++

−1

1

11

1

1ii

ii

iiii

ii

ii

i

XXXXpp

XXXXpp

dxdp

( )11/ −+ − ii XX …………………………..…………………(1) where X represents the logarithmic time function, and p represents corresponding pressure. Selection of appropriate points (i-1 and i+1) before and after the point of interest (i) is critical for obtaining a useful pressure-derivative curve. A window size, characterized by the parameter L, defines the minimum time interval (logarithmic) of point i+1 and point i-1 away from point i. If this window size (L) is too small, significant noise is introduced into the process of a numerical differentiation. When L is too large, the pressure derivative can be over-smoothed and the characteristic shape of the derivative plot distorted. When L is equal to 0, two points adjacent to point i from left and right are applied in Eq. 1. The resulting derivative is quite noisy and is impossible to use for interpretation of reservoir system behavior in general.

To illustrate the influence of window size (L) on the behavior of calculated pressure derivative, we studied a synthetic case (Fig. 1) which contains simulated noise. Details of this synthetic case will be discussed in the example section. Fig. 2 demonstrates the calculated pressure derivatives with different window sizes of L, (0.1, 0.2, 0.3, 0.5 and 0.8), along with the derivative obtained with using consecutive points (i.e. L=0) and the true pressure derivative. We observe that, as L increases, the derivative plots become smoother. However, as L is increased beyond 0.2, a visuable distortion of the underlying characteristic shape occurs as the unit-slope trend at later times flattens. As L increases beyond 0.5, the overall shape of the pressure derivative is altered. In this case, we should not use a window size of L>0.2 to avoid potential distortion of the underlying characteristic shape of the pressure derivative plot.

For this synthetic case, we know the true pressure derivative, so that we know when the pressure derivative starts to be distorted as the window size increases. In reality, we don’t know the true pressure derivative behavior. The question arises: how can we determine an appropriate window size that can avoid possible distortion of the characteristics of underlying pressure derivative? Furthermore, when the pressure derivative provided by this optimal window size is not smooth enough to be used in pressure transient analysis, how can we further remove the noise to produce a smooth pressure derivative?

In following sections, we address these issues and develop a systematic methology for reliable calculation of smooth pressure derivatives from noisy pressure measurment data. Methodology Our methodology consists of the following major components: we apply the FFT analysis to determine the optimal window size in pressure derivative calculation associated with Bourdet et al’s algorithm. We use the frequency-domain constraints as criteria of optimal window size (L). We use Gaussian filtering to further denoise the derivative response obtained with the optimal value of L. Finally we use an adaptive smoothing

Page 3: [Society of Petroleum Engineers SPE Annual Technical Conference and Exhibition - Dallas, Texas (2005-10-09)] SPE Annual Technical Conference and Exhibition - Determination of Optimal

SPE 96026 3

technique to produce smooth yet reliable pressure derivative curve. Fourier Transforms.

The Fourier transform is a broad technique of mathematical analysis, applicable in almost all areas of science and engineering. The fast Fourier transform, FFT, is a fast algorithm for computing the discrete Fourier transform, DFT, and can provide efficient and exact transformation of a discrete set of data.7-8

The Fourier integral transform is used to investigate the frequency signatures of nonperiodic continuous functions. A nonperiodic function subject to the Dirichlet conditions can be transformed from a time-domain function to a frequency-domain function by using

∫∞

∞−

−= dtetxfx fti π2)()(~ …………………………….…… (2)

where )(~ fx is referred to as the Fourier transform of x(t). Similarly, )(~ fx can be inversely transformed back to the time domain by using

∫∞

∞−= dfefxtx fti π2)(~)( …………….…………………..… (3)

where x(t) is referred to as the inverse Fourier transform of

)(~ fx . In the above expressions, e is the base of natural logarithms, i is the imaginary unit of the complex system, and f is the frequency. The Fourier integral exists only for a continuous function. If a set of data cannot be described mathematically as a continuous function, the above integral Fourier transform pair cannot be used.

The discrete Fourier transform (DFT) is a digital approach to Fourier transformation and is defined only for discrete data over a finite interval. We can obtain the Fourier transform to observed discrete data through the DFT, using the following expression:

∑−

=

∆∆−∆∆=∆1

0

2)()(~ N

n

tfnkidd etnxtfkx π ...………………...… (4)

Eq. 4 can transform a series of time-domain samples to a series of frequency-domain samples. The inverse DFT can be written as:

∑−

=

∆∆∆∆=∆1

0

2)(~)(N

k

tfnkidd efkxftnx π ……………………... (5)

With this equation, a series of frequency-domain samples can be transformed back to a series of time-domain samples.

In both Eqs. 4 and 5, N is the number of samples, n is the time index (n = 0, 1, 2, …, N-1), and k is the frequency index (k = 0, 1, 2, …, N-1). ∆t is the time interval between samples and ∆f is the frequency interval, ∆f = 1/(N∆t). xd(n∆t) is the set of time data and is the set of Fourier

coefficients of x

)(~ fkxd ∆

d(n∆t). The subscript d stands for “discrete”. The DFT and FFT operate on a finite set of data with each point discretely and evenly spaced in time. Note that FFT is equivalent to DFT. The difference between DFT and FFT is that FFT is a fast and efficient algorithm for computing DFT.

The time-domain function becomes a complex function after transformation; i.e., the result in the frequency domain is

)Im()Re()(~ fiffxd += ………………………………… (6)

where Re represents the real part and Im the imaginary part. In polar coordinates, the result can be expressed with magnitude and phase, which are defined in Eq. 6 and Eq. 7, respectively.

)(Im)(Re)(~ 22 fffxd += ……………………..…...... (7)

)]Re(/)[Im(tan 1 ff−=θ …………………………….…… (8) Determination of Optimal Window Size.

To determine the optimal window size, we investigate the spectral behavior of pressure derivatives obtained with different L values. We transform the calculated pressure derivatives into the frequency domain using FFT, and then calculate the magnitudes of each frequency components. The spectral behavior is demonstrated by the relationship between magnitude and frequency index. We notice that noise mainly contaminates the spectral information in the mid- and high-frequency bands while the signal information is preserved in low-frequency components. With Bourdet’s algorithm, the spetral energy in the mid- and high-frequency bands is damped, so that a smoother pressure derivative is produced. The larger the size of L, the more significant the damping effect on the spectral energy in the mid- and high-frequency bands. However, we have to be very careful since the spetral information in the low-frequency band is also altered although this alteration is insignificant when a small L is used. When an inappropriately large L value is used, the spectral information in the low-frequency band can be significantly altered. In other words, the signal information contained in the low-frequency components is damaged; consequently, the pressure derivative behavior in the time domain is seriously distorted. We will illustrate these concepts in more detail in the following example section that follows.

Based on the understanding that smoothing is achieved by damping the the spectral energy in the mid- and high-frequency components and distortion is caused by significant alteration of low-frequency components, we construct frequency-domain constraints to determine the optimal window size of L. The idea is to reduce the spectral energy of the pressure derivative response as largely as possible while maintaining insignificant change of the low-frequency components. We define two criteria to mathematically represent the above ideas. The first criterion is called the total energy factor and expressed in Eq. 9. It is used to quantify the spectral energy reduction of the pressure derivative associated with a specific value of L compared to the spectral energy of the pressure derivative obtained using L=0.

Page 4: [Society of Petroleum Engineers SPE Annual Technical Conference and Exhibition - Dallas, Texas (2005-10-09)] SPE Annual Technical Conference and Exhibition - Determination of Optimal

4 SPE 96026

( )∑=

=−=

2/

0

2

01 )(~)(~)(N

jLjdLjd fxfxLI ……………....… (9)

where

Ljd fx )(~ represents the magnitude of frequency

component j corresponding to a specific value of L and

0)(~

=Ljd fx represents the magnitude of frequency component j

corresponding to L=0. N/2 corresponds to the Nyquiest frequency, which is the highest-frequency component of a wave form.7

The second criterion is called low-frequency deviation factor and expressed in Eq. 10. It is used to quantify the alteration in low frequency spectral components of pressure derivative associated with a specific value of L compared with the low frequency spectral components of the pressure derivative obtained using L=0.

( )∑=

=−=

n

ojLjdLjd fxfxLI

2

02 )(~)(~)( …………….… (10)

where n represents a frequency index which defines low frequency band between zero frequency and this frequency fn. We found that this frequency index can be reasonably defined by observing the point at which the magnitude of frequency components starts to oscillate.

It is obvious that an appropriate compromise between I1 and I2 is needed for proper window size of L. We found empirically that the inflection points on I1 ~L and I2~L usually indicate such optimal balance, therefore, the optimal window size of L can be determined by examining the plots of I1 ~L and I2~L to find the inflection points. Details will be illustrated in the example section.

Note that the optimal window size can help to avoid possible distortion of the pressure derivative, but we still may not be able to produce smooth pressure derivatives since the spectral energy in the mid/high frequency band is often not damped sufficiently using the optimal window size. We need advanced smoothing techniques to further remove the noise contained in the pressure derivative calculated using the optimal L. Gaussian Filter Smoothing Technique.

We use a Gaussian filter in Fourier domain to smooth the pressure derivative calculated using the optimal wimdow size of L. In the frequency domain, a Gaussian filter has different effects on different portions of frequency components. It attenuates high frequencies more than low frequencies, and it removes high frequency components from a signal so as to reduce the oscillations. A Gaussian smoothing filter outputs a `weighted average' of each point of interest neighborhood, with the average weighted more towards the value of the central points and provides gentler smoothing. Its definition in Fourier domain is expressed in Eq. 11.

2

)(~ fefg α−= ………………………………………(11)

where α is the attenuating coefficient which controls the degree of smoothing.

The filtering operation in the Fourier domain is expressed in Eq. (12).

)(~)(~)(~

, jjdjgd fgfxfx = …….………….……(12)

where )(~, jgd fx represents the jth frequency component after

applying the Gassian filter. By using a small Gaussian filter (with small attenuating

coefficient), a great deal of fine detail can be seen, but there will also be much unwanted oscillation due to noise. Using a larger smoothing filter (with large attenuating coefficient) may remove more unwanted oscillations, but much of the detail may also be lost. Therefore, by choosing an appropriate Gaussian filter, we can remove the unwanted oscillation while preserving necessary details in the signal. We found that the attenuating coefficient can be generally taken as 0.1 of the Nyquest frequency to generate reasonably good smoothing effectiveness. Note that although the Gassian filter removes noise and smoothes the signal efficiently, it also has limitations. One unwelcome effect of applying Gaussian filter is end distortion, such that the signal, both the early and later parts will lose its characteristics. In some cases where the level of noise is very high, oscillations are still present in the signal after filtering. Adaptive Smoothing Algorithm By Recursive Differentiation-Integration.

Because of the limitations of Gaussian filtering, we developed a novel smoothing algorithm which can be used to calculate smooth pressure derivatives reliablely. The algorithm consists of two major components. One is recursive differentiation-integration. Differentiation of pressure data points is performed using a preselected optimal window size, L, to calculate pressure derivative, and then the pressure derivative obtained is integrated to generate a new set of pressure data. This process proceeds recursively. The second main component is to use adaptively appropriate pressure derivatives at each data point for the integration. During each iteration, the pressure derivative for L=0 is also calculated. Before integration, the derivative calculated with the preselected L is compared with pressure derivative using L=0. If the relative difference is less than a predefined critical value, the pressure derivative obtained with L=0 will be used in the integration, likewise, if the relative difference is greater than the predefined critical value, the pressure derivative obtained with the preseleted L will be used in the integration. A new set of pressure is then generated with this adaptive seletion of pressure derivative at each data point. The choise of pressure derivative at each data point is also adaptive with each iteration since pressure derivatives are calculated again using the new set of pressure.

Note that this adaptive differention-integration process smooths the points containing the most noise while avoiding smoothing those data points which are already smooth enough. We have found that a value of 0.5 to 0.8 is reasonably good to define the critical relative difference between the pressure

Page 5: [Society of Petroleum Engineers SPE Annual Technical Conference and Exhibition - Dallas, Texas (2005-10-09)] SPE Annual Technical Conference and Exhibition - Determination of Optimal

SPE 96026 5

derivative calculated using the selected L and the one obtained with L=0.

This algorithm includes the following steps: 1. Data Interpolation. Interpolate the pressure data using the

Lagrange linear method into evenly-spaced data points in logarithm time scale.

2. Pressure Differentiation. Calculate pressure derivative with a preseleted window size of L using Bourdet et al.’s algorithm based on interpolated pressure data, and call it derivative set 1. Calculate a pressure derivative set with consecutive points (L=0), and call it derivative set 2. If, at a specific point, the difference between the two sets of pressure derivative relative to the value from derivative set 2 is less than a predetermined value (we usually use 0.8), adopt the value of derivative set 2 at this time point. Otherwise, if the relative difference is larger than a predetermined value, adopt the value of derivative set 1. Examined each time point in this way, and obtain a set of adpapted derivative.

3. Derivative Integration. Use the set of derivatives adopted for integration to obtain a new set of pressure data. Take the pressure at the first point as known, equal to the measured pressure. Approximate derivatives as a linear function on each integral element.

4. Recursive Operations. Repeat step 2 and step 3 iteratively using recursive differentiation and integration on the new sets of pressure data and pressure derivatives. Monitor this iterative process by observing the evolution of several indexes, which include pressure misfit, pressure derivative misfit, smoothness factor and the rate of change of smoothness of the pressure derivative. The smoothness factor, SF, is defined in Eq. 13; it quantifies the smoothness of the pressure derivative generated during the iterations.

'1

''1

1

22

21

+−

=

+−−

= ∑ iii

N

ippp

NSF ……………(13)

where SF represents smoothness factor, is the pressure derivative, and N is number of data points. The rate of chage of smoothness is nothing more than the relative percentage change of smoothness factor between two consecutive iterations.

'p

We found that the iteration can usually be stopped when the smoothness factor stabilizes and the smoothness change rate is less than 10-3. Examples We use a synthetic example to illustrate determination of the optimal window size for derivative calculations and to validate the smoothing algorithms proposed in this paper. We also present two field examples to demonstrate the applicability of the algorithms presented.

Synthetic Example.

This example is for an oil well centered in a square drainage area of a homogeneous reservoir with no-flow outer boundaries. We simulated a 24-hour drawdown test. Wellbore

storage (0.0274 STB/psi) and skin effects (3) were considered in analytical solution, and the flow rate was 2000 STB/D. Random noise, following a normal distribution with a mean of 0 and a standard deviation of 0.25, was added to the analytical solution to simulate a noisy measured pressure response. This pressure response is shown in Fig. 1.

For this pressure response, we calculated pressure derivatives with respective to logarithmic time, using a window size, L, of 0.0, 0.1, 0.2, 0.3, 0.5 and 0.8. Fig. 2 shows the changing trend of the derivative behavior for various values of L, along with the derivative from the analytical solution. As L increase, the derivative plots become smoother and smoother, but the derivatives also deviate increasingly from the true value.

We transformed the derivatives obtained for the various values of L to the Fourier domain and calculated their magnitudes for each of the frequency components. Fig. 3 provides plots of magnitude versus frequency index. For comparison, Fig. 3 also includes analytical or the true solution. It shows that noise contaminates information significantly in the mid- and high-frequency band. On the other hand, low-frequency information is essentially preserved, as the low-frequency components corresponding to small L’s (0.0 to 0.2) are quite consistent with those of the true pressure derivative respose.

Bourdet et al.’s method uses L to suppress noise and smooth the derivative response due to the reduction of the energy in mid- and high-frequency band. When L is equal to or less than 0.2, the spectral behavior in the low-frequency band is basically preserved, consistent with the true solution. However, when L is equal to or larger than 0.3, we observe that the spectral behavior even in the low-frequency band has deviated substantially from the true solution. In other words, the increasing smoothing with larger L comes at the expense of increasingly losing the information of low frequency components; as a result, the signal behavior is increasingly distorted as L increases. Therefore, the optimal value of L in frequency domain should be one that reduces the total energy of the entire frequency band as much as possible while maintaining the characteristics of the low-frequency band as much as possible (i.e., keep the low-frequency deviation factor as small as possible).

Fig. 4 presents the total energy and low-frequency deviation factor for different window sizes. We can identify the range of L between 0.15 and 0.2 as the best widow size based on the selection criteria we presented earlier. With this window size, the total energy has dropped substantially while the low-frequency deviation factor has not been significantly increased. However, the derivate plot with L=0.2, as shown in Fig. 5, demonstrates that the noise level is still considerable. The Gaussian filtering result, also included in Fig. 5, indicates that the derivative can be smoothed significantly without loss of its inherent features except at the ends. The end effect exists only in a small portion of data around the ends, so we do not expect that it will result in a significant influenence on the utility of the Gaussian filter.

Fig. 6 shows the pressure derivative produced using the adaptive differentiation-integration algorithm. We see that new algorithm has provided a smoother derivative without obvious distortion at ends, compared to Gaussian filtering.

Page 6: [Society of Petroleum Engineers SPE Annual Technical Conference and Exhibition - Dallas, Texas (2005-10-09)] SPE Annual Technical Conference and Exhibition - Determination of Optimal

6 SPE 96026

Fig. 7 compares the results from a 160-iteration run and a 60-iteration run. We observe that more iterations generate only a slightly smoother derivative curve. Few iterations can also produce a reasonablely smooth derivative.

Fig. 8 illustrates the relative misfit between iterative pressure and original measured pressure response, and the relative misfit between iterative pressure derivative and original pressure derivative calculated from the initial iteration. Note that the pressure misfit is insignificant and essentially constant, indicating that the iterative pressure obtained from integration of the derivative remains close to the original pressure response while it is continuously smoothed. The derivative misfit increases significantly in the first 20 iterations and then increases slowly afterward. This is what we should expect: the first iterations should remove most of the noise and smooth pressure and pressure derivative significantly. Later iterations simply smooth more fine detail. Fig. 9 shows the smoothness factor and its change rate vs. the number of iterations on a semi-log scale. The smoothness factor basically stablizes at 10-3, while its rate of change decreases to the same level. We believe that 10-3 is an acceptable order of magnitude. Thus, we stopped at the 160th iteration.

Field Examples.

Example 1. This example is an oil well from reference 6. Fig. 10 shows the measured pressure.

We calculated pressure derivatives with L equal to 0.0, 0.05, 0.1, 0.2 0.3, 0.5, and 0.8, and show the results in Fig. 11. Similar to the synthetic example, the derivative begins to distort visually during the late-time horizontal segment for L=0.3. Fig. 12 shows that spectral features of the derivative in the frequency domain increasingly attenuate energies at mid- and high-frequency as L is increasing, but when L is greater than or equal to 0.3, the low frequency components deviate significantly from those of L=0. Fig. 13 displays the total energy and low-frequency deviation factor versus window size, we can see that the optimal window size is within the range 0.1–0.2 since this window size gives the optimal balance between spectral energy reduction and low-frequency deviation.

Fig. 14 shows the derivative resulting from Gaussian filtering, which is much smoother than before filtering. End effects appear within small time ranges at both ends. The smoothed derivative resulting from the adaptive smoothing algorithm is shown in Fig 15, which indicates that the smoothing algorithm can effectively suppress noise and also provide good control of the end effect at the right end.

Pressure and derivative relative misfits are presented in Fig. 16. This actual case exhibits a slight increase in pressure misfit as the derivative misfit increases. In other words, pressure changes slightly as the derivative is adjusted continuously. Although the two misfits increase as the iteration proceeds, they are of the order of magnitude as those in synthetic example. Pressure misfit increases from 1% at the beginning of iteration to 2% after 300 iterations, representing an insignificant change in pressure. Derivative misfit reaches 7% after 300 iterations, which is smaller than that in the synthetic example. Therefore, each iteration provides a slight correction of pressure and derivative while their overall

characteristics are well preserved. We did not expect that the pressure misfit would exhibit a declining trend or reach a minimum value with increased iteration because measured pressure data in actual tests involve noise―complex, multi-sourced and unexpected.9

In the smoothness factor and its rate of change plot, we chose to stop iterations at the 180th iteration, corresponding to a stabilized smoothness factor and a reasonably small rate of change.

Fig. 18 gives the pressure response after 180 iterations of adaptive smoothing, along with the measured pressure. The figure indicates that the pressure response from adaptive smoothing is quite consistent with the actual pressure measurements.

Example 2. This is an oil well example reported first by

Meunier et al.10 In our previous paper,9 we used this example to demonstrate applicability of an FFT-based deconvolution method.

Here, we apply our method to the deconvolved pressure that we obtained in reference 9 from a direct deconvolution of the measured pressure and afterflow rate data. We know that early-time reservoir response is often masked by wellbore storage, and appears in a storage hump on the derivative plot on a log-log scale. This kind of early-time information cannot be used to identify reservoir features with well test analysis. When wellbore storage effects have ceased, the early-time data needed to characterize reservoir may have been missed. This is the situation in this example, as Fig. 19 indicates. Therefore, we applied the deconvolution technique presented in reference 9 to recover the pressure response without wellbore storage effects. Because deconvolution is a process of noise amplification, direct deconvolution of measured pressure and rate data yields an oscillating wellbore-storage-free pressure derivative response due to noise in pressure and rate measurements, as shown in Fig. 20. To obtain an identifiable derivative response, we developed denoising techniques for afterflow rate and deconvolved pressure in that study, and we presented as the final result a denoised deconvolved pressure and derivative profile.9

In this study, the result from a direct deconvolution of measured pressure and afterflow rate is used to further demonstrate the power of the proposed adaptive smoothing algorithm in suppression of pressure noise and construction of smooth derivative. We used the same procedure, as in previous examples, for the deconvolved pressure in this example. Based on FFT analysis, we were led to draw a similar conclusion as in our previous examples that the optimal L is between 0.1 and 0.2.

We then applied the adaptive smoothing algorithm to compute the derivative response with L=0.1. From analysis of pressure and derivative misfits and smoothness factor behavior, we chose to stop at the 106th iteration. The resulting pressure and derivative are shown in Figs. 19 and 20, respectively. The pressure response has been significantltly smoothed and is visually very consistent with the denoised deconvolved pressure except for the first point. The derivative response is also significantly smoothed and clearly indicates dual-porosity reservoir features, which can also be concluded from the denoisd, deconvolved result. The overall shape is

Page 7: [Society of Petroleum Engineers SPE Annual Technical Conference and Exhibition - Dallas, Texas (2005-10-09)] SPE Annual Technical Conference and Exhibition - Determination of Optimal

SPE 96026 7

consistent for both derivative curves from the adaptive smoothing algorithm and from the denoised deconvolution. The dip, characterizing the dual-porosity reservoir, appears on both derivative curves and holds the minimum value at similar time points (0.095 and 0.101), but the minimum value of the two derivative dips is different. The derivative from adaptive smoothing algorithm has a deeper dip and a shape more characteristic of a dual-porosity reservoir, indicating an improved derivative calculation.

Conclusions In this paper, we present a systematic methodology to reliably calculate smooth pressure derivatives from noisy measured pressure data. We validated our approach with a synthetic example and demonstrated its applicability with actual field examples. We summarize this work with the following conclusions. 1. An optimal window size can be obtained for pressure

derivative calculations associated with Bourdet et al.’s algorithm by analyzing the spectral behavior of calculated derivatives and employing frequency-domain constraints.

2. Gaussian filtering can smooth pressure derivative response efficiently, but introduces end effects in small time ranges.

3. Our proposed adaptive differentiation-integration smoothing algorithm can smooth pressure derivative response more efficiently and can control end effects more effectively.

In future work, we may find that a more accurate integration algorithm on integral elements further improves the new smoothing algorithm. We will investigate the possibility of developing an automatic stopping criterion. More generally, we plan to investigate procedures that can make our methodology more automatic and, therefore, of more potential value in software designed for routine pressure transient test analysis. Nomenclature f = frequency, 1/sec g = Gaussian filter Im = imaginary part of frequency domain function i = time sample index or number of iteration k = frequency component index N = total number of samples n = time sample index p = pressure response, psi Re = real part of frequency domain function SF = smoothness factor t = time, hr X = logarithmic time x~ = frequency-domain function x = time-domain function α = attenuating coefficient θ = phase of frequency domain function Subscripts d = discrete g = Gaussian filtering

f = frequency domain m = measured Superscripts ~ = Fourier transform -1 = inverse Fourier transform References 1. Bourdet, D., Ayoub, J.A., and Pirad, Y.M.: “Use of Pressure

Derivative in Well-Test Interpretation,” SPEFE (June 1989) 293-302.

2. Clark, D.G. and van Golf-Racht, T.D.: “Pressure-Derivative Approach to Transient Test Analysis: A High-Permeability North Sea Reservoir Example”, JPT (Nov. 1985) 2023-39.

3. Lane, H.S., Lee, J.W., and Watson, A.T.: “An Algorithm for Determining Smooth, Continuous Pressure Derivatives from Well Test Data”, SPEFE (December 1991) 493-499.

4. González-Tamez, F., Camacho-Velázquez, R. and Escalante-Ramírez, B.: “Truncation De-noising in Transient Pressure Tests,” SPE 56422 presented at the 1999 SPE Annual Technical Conference and Exhibition, Houston, 3–6 October 1999.

5. Lee, W.J., and Wattenbarger, R.A.: Gas Reservoy Engineering, Textbook Series, SPE, Richarderson, Texas (1996) 5.

6. Horne, R.N.: Modern Well Test Analysis, Petroway Inc., Palo Alto, CA (1995).

7. Ramirez, R.W.: The FFT, Fundamentals and Concepts, Tektronix Inc., Englewood Cliffs, N.J.(1985).

8. Bracewell, R.N.: The Fourier Transform and Its Applications, McGraw-Hill, New York (1986).

9. Cheng, Y., Lee, W.J. and McVay, D.A.: “Fast-Fourier-Transform-Based Deconvolution for Interpretation of Pressure-Transient-Test Data Dominated By Wellbore Storage,” SPEREE (June 2005) 224.

10. Meunier, D., Wittmann, M.J., and Stewart, G.: “Interpretation of Pressure Buildup Test Using In-Situ Measurement of Afterflow,” JPT (Jan. 1985) 143.

0

50

100

150

200

1.E-03 1.E-02 1.E-01 1.E+00 1.E+01 1.E+02

t, hr

∆p,

psi

Fig. 1--Synthetic example: pressure drawdown response

Page 8: [Society of Petroleum Engineers SPE Annual Technical Conference and Exhibition - Dallas, Texas (2005-10-09)] SPE Annual Technical Conference and Exhibition - Determination of Optimal

8 SPE 96026

1

10

100

1.E-03 1.E-02 1.E-01 1.E+00 1.E+01 1.E+02

t, hr

p', p

si

p', L=0.0True derivative

1

10

100

1.E-03 1.E-02 1.E-01 1.E+00 1.E+01 1.E+02

t, hrp'

, psi

p', L=0.1True derivative

1

10

100

1.E-03 1.E-02 1.E-01 1.E+00 1.E+01 1.E+02

t, hr

p', p

si

p', L=0.2True derivative

1

10

100

1.E-03 1.E-02 1.E-01 1.E+00 1.E+01 1.E+02

t, hr

p', p

si

p', L=0.3True derivative

1

10

100

1.E-03 1.E-02 1.E-01 1.E+00 1.E+01 1.E+02

t, hr

p', p

si

p', L=0.5True derivative

1

10

100

1.E-03 1.E-02 1.E-01 1.E+00 1.E+01 1.E+02

t, hr

p', p

si

p', L=0.8True derivative

Fig.2--Synthetic example: behavior of pressure derivatives obtained with various window sizes (L) using Bourdet et al.’s algorithm. The derivative plot is distorted for values of L 0.3 and larger, though it may be smoother.

1

10

100

1000

10000

100000

1 10 100 1000

Frequency index

Mag

nitu

de in

freq

uenc

y do

mai

n P' w ith L=0.0p' With L=0.05p' With L=0.1True derivative

1

10

100

1000

10000

100000

1 10 100 1000

Frequency index

Mag

nitu

de in

freq

uenc

y do

mai

n p' w ith L=0.0p' With L=0.15p' With L=0.2True derivative

1

10

100

1000

10000

100000

1 10 100 1000

Frequency index

Mag

nitu

de in

freq

uenc

y do

mai

n p' w ith L=0.0p' With L=0.3p' With L=0.4True derivative

1

10

100

1000

10000

100000

1 10 100 1000

Frequency index

Mag

nitu

de in

freq

uenc

y do

mai

n p' w ith L=0.0p' With L=0.5p' With L=0.8True derivative

Fig. 3--Synthetic example: behavior of pressure derivatives in the frequency domain for various window sizes (L) after taking FFT. When the value of L is greater than or equal to 0.3, even low-frequency components begin to deviate from the true response.

Page 9: [Society of Petroleum Engineers SPE Annual Technical Conference and Exhibition - Dallas, Texas (2005-10-09)] SPE Annual Technical Conference and Exhibition - Determination of Optimal

SPE 96026 9

0

10000

20000

30000

40000

50000

60000

0.0 0.2 0.4 0.6 0.8 1.0

Smoothing window size, L

Tota

l ene

rgy

0

200

400

600

800

1000

1200

Low

-freq

. dev

iatio

n fa

ctor

Fig. 4--Synthetic example: the optimal window size is determined on the basis of total energy and the low frequency deviation factor.

1

10

100

1.E-03 1.E-02 1.E-01 1.E+00 1.E+01 1.E+02

t, hr

p', p

si

p', L=0.2After Gaussian filtering on p', L=0.2True derivative

Fig. 5--Synthetic example: Gaussian filtering smooths the pressure derivative.

1

10

100

1.E-03 1.E-02 1.E-01 1.E+00 1.E+01 1.E+02

t, hr

p', p

si

p', L=0.2True derivativeAdaptive smoothing after 160 iterations

Fig. 6--Synthetic example: adaptive differentiation-integration algorithm smooths the pressure derivative.

1

10

100

1.E-03 1.E-02 1.E-01 1.E+00 1.E+01 1.E+02

t, hr

p', p

si

p', L=0.2True derivativeAdaptive smoothing after 160 iterationsAdaptive smoothing after 60 iterations

Fig. 7--Synthetic example: pressure derivative smoothed by adaptive differentiation-integration algorithm. The derivative after 60 iterations and after 160 iterations do not differ significantly.

0.00

0.02

0.04

0.06

0.08

0.10

0 50 100 150 200 250

Iteration number

RM

S of

p a

nd p

'

Pressure relative misfit

Pressure derivative relative misfit

Fig. 8--Synthetic example: RMS of pressure and pressure derivative misfits relative to original pressure and derivative response.

1.E-04

1.E-03

1.E-02

1.E-01

1.E+00

0 50 100 150 200 250

Iteration number

Smoo

thne

ss fa

ctor

&

rate

of c

hang

e

Smoothness factor

Smoothness rate of change

Fig. 9--Synthetic example: smoothness factor and its rate of change versus iteration number.

Page 10: [Society of Petroleum Engineers SPE Annual Technical Conference and Exhibition - Dallas, Texas (2005-10-09)] SPE Annual Technical Conference and Exhibition - Determination of Optimal

10 SPE 96026

0

100

200

300

400

1.E-03 1.E-02 1.E-01 1.E+00 1.E+01 1.E+02

t, hr∆

p, p

si

Fig. 10--Field example 1: measured pressure change response

1

10

100

1000

1.E-03 1.E-02 1.E-01 1.E+00 1.E+01 1.E+02

t, hr

p', p

si

L=0 L=0.05

1

10

100

1000

1.E-03 1.E-02 1.E-01 1.E+00 1.E+01 1.E+02

t, hr

p', p

si

L=0 L=0.1

1

10

100

1000

1.E-03 1.E-02 1.E-01 1.E+00 1.E+01 1.E+02

t, hr

p', p

si

L=0 L=0.2

1

10

100

1000

1.E-03 1.E-02 1.E-01 1.E+00 1.E+01 1.E+02

t, hr

p', p

si

L=0 L=0.3

1

10

100

1000

1.E-03 1.E-02 1.E-01 1.E+00 1.E+01 1.E+02

t, hr

p', p

si

L=0 L=0.5

1

10

100

1000

1.E-03 1.E-02 1.E-01 1.E+00 1.E+01 1.E+02

t, hr

p', p

siL=0 L=0.8

Fig. 11--Field example 1: pressure derivatives obtained with various window sizes (L) using Bourdet et al.’s algorithm. The derivative plot is distorted for L greater than or equal to 0.3, though the derivative may be smoother.

1

10

100

1000

10000

100000

1 10 100 1000

Frequency index

Mag

nitu

de in

freq

uenc

y do

mai

n

L=0

L=0.05

L=0.1

1

10

100

1000

10000

100000

1 10 100 1000

Frequency index

Mag

nitu

de in

freq

uenc

y do

mai

n L=0

L=0.2

L=0.3

1

10

100

1000

10000

100000

1 10 100 1000

Frequency index

Mag

nitu

de in

freq

uenc

y do

mai

n L=0

L=0.5

L=0.8

Fig. 12--Field example 1: pressure derivatives in the frequency domain for various window sizes (L) after taking FFT. When the value of L is 0.3 and larger, even Low-frequency components begin to exhibit different trends.

Page 11: [Society of Petroleum Engineers SPE Annual Technical Conference and Exhibition - Dallas, Texas (2005-10-09)] SPE Annual Technical Conference and Exhibition - Determination of Optimal

SPE 96026 11

30000

35000

40000

45000

50000

55000

60000

65000

0.0 0.2 0.4 0.6 0.8 1.0

Smoothing window size, L

Tota

l ene

rgy

0

500

1000

1500

2000

2500

3000

Low

-freq

. dev

iatio

n fa

ctor

Fig. 13--Field example 1: the optimal window size is determined to be 0.1 to 0.2 based on the total energy and the low frequency deviation factor.

1

10

100

1000

1.E-03 1.E-02 1.E-01 1.E+00 1.E+01 1.E+02

t, hr

p', p

si

L=0.1

After Gaussian filter

Fig. 14--Field example 1: pressure derivative is smoothed by Gaussian filtering.

1

10

100

1000

1.E-03 1.E-02 1.E-01 1.E+00 1.E+01 1.E+02

t, hr

p', p

si

L=0.1

Adaptive smoothing after 180 iterations

Fig. 15--Field example 1: pressure derivative is smoothed by adaptive differentiation-integration algorithm.

0.00

0.02

0.04

0.06

0.08

0.10

0 50 100 150 200 250 300 350

Iteration number

RM

S of

p a

nd p

'

Pressure relative misfit

Pressure derivative relative misfit

Fig. 16--Field example 1: RMS of pressure and pressure derivative misfits relative to original pressure and derivative response.

1.E-04

1.E-03

1.E-02

1.E-01

1.E+00

0 50 100 150 200 250 300 350

Iteration number

Smoo

thne

ss fa

ctor

&

rate

of c

hang

e

Smoothness factor

Smoothness rate of change

Fig. 17--Field example 1: smoothness factor and its change rate versus number of iteration.

0

100

200

300

400

1.E-03 1.E-02 1.E-01 1.E+00 1.E+01 1.E+02

t, hr

∆p,

psi

Measured pressure response

Adaptive smoothing after 180iterations

Fig. 18--Field example 1: pressure response resulting from adaptive smoothing algorithm, compared to actual measured pressure data

Page 12: [Society of Petroleum Engineers SPE Annual Technical Conference and Exhibition - Dallas, Texas (2005-10-09)] SPE Annual Technical Conference and Exhibition - Determination of Optimal

12 SPE 96026

0

100

200

300

400

500

600

1.E-03 1.E-02 1.E-01 1.E+00 1.E+01

t, hr

p', p

si

Measured pressure and its derivative

Deconvolved pressure from measured pressure and measured rate

Adaptive smoothing after 106 iterations

Denoised deconvolved pressure

Fig. 19--Field example 2: pressure responses resulting from adaptive smoothing algorithm and deconvolution, along with actual measured pressure data.

1

10

100

1000

1.E-03 1.E-02 1.E-01 1.E+00 1.E+01

t, hr

p', p

si

Denoised deconvolved derivativeDeconvolved pressure derivativeAdaptive smoothing after 106 iterations

Fig. 20--Field example 2: pressure derivative responses resulting from adaptive smoothing algorithm and deconvolution.