CWP-814 Simultaneous correlation of multiple well logs Loralee Wheeler & Dave Hale Center for Wave Phenomena, Colorado School of Mines, Golden, CO 80401, USA Figure 1. Six Teapot Dome velocity logs before (a) and after (b) automatic simultaneous correlation. ABSTRACT Well log correlation is an important step in geophysical interpretation, but as the number of wells increases, so does the complexity of the correlation process. We propose a new method for automatic and simultaneous well log correlation that provides a globally optimal alignment of all logs, and in addition, is relatively insensitive to large measurement errors common in well logs. First, for any number of well logs, we use a new variant of the dynamic warping method, requiring no prior geologic information, to find for each pair of logs a set of corresponding depths. Depths in one log may have one or more corresponding depths in another log, and many such pairs of corresponding depths can be found for any pair of well logs. Requiring consistency among all such pair-wise correlations gives rise to an overdetermined system of linear equations, with unknown depth shifts to be computed for each log sample. A least-squares solution of these equations, found using the conjugate gradient method, yields for every well log a sequence of depth shifts that optimally align all well logs. Key words: well logs correlation alignment dynamic warping least-squares 1 INTRODUCTION Correlation of well logs is an important step in geophysical and geological interpretation tasks, such as building geologic models and time-depth conversion. Well log correlation is the process of determining corresponding depths among well logs. A single set of such corresponding depths often represents a single geologic time in which sediments with similar properties were deposited over large areas. Today these properties are measured in well logging. We can therefore view well log correlation as the task of mapping each well log from depth to geologic time. An example of this mapping is illustrated in Figure 1, where we use the phrase “relative geologic time” to indicate that the geologic time scale used here is arbitrary. We know only that sediments with larger relative geologic time (RGT) were deposited before those with smaller RGT. For each RGT in Figure 1, we have a set of six corresponding depths, one for each well log. While a small number of well logs can be manu- 276 L.Wheeler & D.Hale Figure 2. Locations of six Teapot Dome velocity logs overlain on a constant-time slice (at one second) of a corresponding 3D seismic image. Line segments denote pairs of logs to be correlated. ally correlated by interpreters in a matter of minutes, this task becomes factorially more difficult as the number of logs increases. For example, for any six well logs, such as those shown in Figure 1a, 15 = 6×(6−1) 2 pair-wise correlations can be made, as indicated by the 15 edges (line segments) in the graph shown in Figure 2. However, in this same graph there exist 342 = 3 × 4 × 5 × 6 × ( 13 + 41 + 15 + 16 ) cycles, 342 distinct walks along three or more edges, beginning and ending at the same vertex, without repetition. To see why this large number of cycles poses a problem in well log correlation, suppose that in pairwise correlations of logs we find that a depth z1 in log 1 corresponds to another depth z2 in log 2, which in turn corresponds to a third depth z3 in log 3. Then, in the pair-wise correlation of logs 1 and 3, we should find that depth z1 corresponds to depth z3 . Imposing this sort of constraint for all 342 cycles among three or more well logs is an impossible task for human interpreters to perform in pair-wise correlation of six logs. Moreover, because the number of cycles (constraints) grows factorially with the number of logs, this task is usually infeasible even for computers. Several methods for automatic correlation have been developed to solve two main problems: correlation of a single pair of well logs and correlation of many well logs. Cross correlation methods, such as that described by Rudman and Lankston (1973), have been used to perform log correlation on a single pair of logs, but these methods fall short when logs contain gaps in geologic time due to faults or erosion. With this shortcoming in mind, Smith and Waterman (1980) developed a dynamic waveform matching approach that finds an optimal alignment between two well logs and is not affected by gaps in geologic sequences. Also using dynamic warping, Wu and Nyland (1987) perform pair-wise well log correlation in two main steps: contact recognition and interval identification. Contact recognition uses a statistical approach to partition a log into distinct segments that highlight contacts between beds. Interval identification uses dy- namic warping to align corresponding segments among two well logs. Any of the aforementioned methods could be used to correlate any of the 15 log pairs represented by line segments in Figure 2. For correlating many well logs, many different approaches exist. The method developed by Le Nir et al. (1998) uses the most geologically complete well as a key well to which all other well logs are aligned. Alternatively, Fang and Chen (1992) and Kovalevskiy et al. (2007) propose divide-and-conquer methods for correlating multiple well logs. In these methods, correlations are first performed for the three pairs that can be formed from only three logs. After an acceptable alignment is found, a larger number of logs are correlated using the alignment of the previous well logs as constraints for the new correlations. This process of increasing the number of logs in the correlation is continued until all logs have been aligned. Due to the propagation of error in such methods, the final correlation of all logs depends on the order in which the wells are correlated. In this paper, we propose a method for automatically and simultaneously correlating any number of well logs. Our method is relatively insensitive to large measurement errors that are common in well logs and provides a globally optimal (least-squares best) alignment of all logs. Using the six deepest velocity logs from Teapot Dome as an example, we first explain our modifications to the dynamic warping algorithm and show how it can be used to find corresponding depths for any pair of logs. We then show how to use these corresponding depths to find shifts for all logs that optimally align them. 2 CORRELATING TWO LOGS In general, the range of depths sampled within a set of well logs varies. Therefore, before log correlation, we resample all logs such that each log has Nz = (zmax − zmin )/∆z + 1 samples, where zmin and zmax denote the minimum and maximum depths sampled in all logs and ∆z is a specified sampling interval. In practice, missing data commonly occur within well logs due to gaps in acquisition, and null values serve as placeholders for any missing data in a log. For the Teapot Dome example shown in Figure 1, we chose a depth sampling interval ∆z = 1 m. 2.1 Alignment errors Dynamic warping is commonly used in automatic well log correlation to estimate a sequence of pairs of indices (i, j), called a path, that optimally aligns a pair of well logs (Smith and Waterman, 1980; Lineman et al., 1987; Le Nir et al., 1998). The first step in finding this optimal path is to compute alignment errors for each sample fI [i] Simultaneous correlation of multiple well logs 277 where k indexes depth and l indexes lag, a difference between two depths. In the new kl-coordinate system, alignment errors are now p k−l k + l eIJ [k, l] ≡ fI (4) − fJ 2 2 Figure 3. Two possible warping paths a and b in the original ij-coordinate system (a) and the same paths in the new klcoordinate system (b). of log I and each sample fJ [j] of log J as follows: eIJ [i, j] ≡ |fI [i] − fJ [j]|p (1) for i = 0, 1, . . . , Nz − 1 and j = 0, 1, . . . , Nz − 1, where I and J are indices of two logs, i and j are indices of depths sampled in those two logs, and p is any positive value. Beginning at (i = 0, j = 0), alignment errors are accumulated along all possible paths across the ij-grid to find the accumulated alignment errors at the end of each path. The accumulated alignment error D at the end of the optimal path is therefore defined as X D = min eIJ [i, j]. (2) path (i,j)∈path Figure 3a shows two possible warping paths a and b for logs I and J on the ij-coordinate system. Each point on a path represents a pair of corresponding depths in logs I and J. A path along the diagonal of the ij-grid, from (0, 0) to (Nz − 1, Nz − 1), implies that log values for indices i = 0, 1, 2, . . . , Nz − 1 in log I are already aligned with those for indices j = 0, 1, 2, . . . , Nz − 1 in log J, respectively. Path b lies relatively close to the diagonal of the ij-grid, which implies that the pairs of log values in path b are reasonably well-aligned without warping. However, for path b, depths in log I are greater than corresponding depths in log J, because this path lies below the diagonal. The opposite is true for path a; depths in log I are shallower than corresponding depths in log J. Additionally, path a has fewer (i, j) pairs than path b and is therefore likely to have less accumulated alignment error, simply because it is shorter. For this reason, some authors force the optimal path to pass through points (0, 0) and (Nz − 1, Nz − 1), but this requires manual interpretation of the first and last corresponding depths (Le Nir et al., 1998; Wu and Nyland, 1987). To address this problem, we instead compute alignment errors in a rotated kl-coordinate system with k =j+i i= k−l 2 j= k+l 2 ⇐⇒ l =j−i , (3) for k = 0, 1, . . . , Nk − 1, l = lmin , . . . , lmax , where Nk = 2Nz − 1, lmin and lmax are specified bounds on lag (depth difference), and p is any positive value. We chose p = 0.25 to reduce the influence of large measurement errors in well logs. As the value of p decreases, the alignment error eIJ [k, l] becomes less sensitive to such outliers. Because i and j must be integers, equation 4 implies that alignment errors eIJ [k, l] are calculated only for values of k and l for which k +l (and k −l) is even. In dynamic warping, we now seek a path, a sequence of (k, l) pairs, that minimizes the accumulated alignment errors: X D = min eIJ [k, l] . (5) path (k,l)∈path Figure 3b shows paths a and b on the kl-coordinate system with path a extending into areas where either fI [i] or fJ [j] are null. Both paths begin at k = 0 and end at k = Nk −1, so that accumulated alignment errors for path a will not be less than those for path b, simply because path a is shorter, as in Figure 3a. 2.2 Replacing missing data In practice, it is common for the optimal path to pass through (i, j) pairs where either fI [i] or fJ [j] is null, as for path a in Figure 3b. When calculating alignment errors, we temporarily replace null values in fI [i] and fJ [j] with randomly chosen non-null values from these respective logs. Replacing missing data in this way yields alignment errors comparable to those computed from non-null values. Suppose, instead, that null values are replaced with zeros. An alignment error eIJ [k, l] calculated for nonnull fI [i] and fJ [j] = 0 would be equal to a power p of the non-null value of fI [i]. Paths passing through several (i, j) pairs for which either fI [i] or fJ [j] are null would therefore have relatively large accumulated alignment errors and would not be optimal. Alternatively, if both fI [i] and fJ [j] are null, the alignment error eIJ [k, l] would equal zero and the optimal path would tend to pass through the point (i, j). 278 L.Wheeler & D.Hale Figure 4. New computational stencil on a close up view of alignment errors computed for logs I = 1 and J = 3. Alignment errors eIJ [k, l] are computed only when k + l is even. 2.3 Accumulation and backtracking From the alignment errors eIJ [k, l], we recursively compute accumulated alignment errors dIJ [k, l] as follows: dIJ [0, l] = eIJ [0, l], (6) dIJ [1, l] = eIJ [1, l] + min dIJ [0, l − 1] , dIJ [0, l + 1] dIJ [k − 1, l − 1] dIJ [k − 2, l] dIJ [k, l] = eIJ [k, l] + min , dIJ [k − 1, l + 1] (7) Figure 5. (a) Alignment errors computed from logs I = 1 and J = 3 with the optimal sequence of (k, l) pairs overlain in (b). The red line denotes sample j = k+l = 1312 and 2 = 1401. The pair the yellow line denotes sample i = k−l 2 (i, j) = (1401, 1312) is not on the optimal path. pairs of velocity logs before and after alignment using our modified dynamic warping algorithm. Figures 6b, 6d, and 6f show log values for only the computed corresponding log depths. Although several measurement errors are apparent in log 4, they have little effect on the alignment of the logs in Figure 6f. (8) for k = 2, 3, . . . , Nk − 1. All lags l in the specified range [lmin , lmax ] must be considered in the calculation of accumulated alignment errors dIJ [k, l] because we do not yet know which lags lie on the optimal path. The computational stencil for equation 8 is shown in Figure 4 for one sample of dIJ [k, l]. Like eIJ [k, l], dIJ [k, l] is computed only where k + l (and hence k − l) is even. After accumulation, we scan the accumulated alignment errors dIJ [k, l] at index k = Nk − 1 to find the indices (k, l) for the minimum accumulated alignment error D at the end of the optimal path. From equation 8, it is clear that the previous sample on the path must be (k − 1, l − 1), (k − 2, l), or (k − 1, l + 1), depending upon which of the three accumulated alignment errors there is smallest. This backtracking is performed for k = Nk − 1, Nk − 2, . . . , 0 to find the optimal sequence of (k, l) pairs, which in turn represent pairs of corresponding depths. The solid white curve in Figure 5b represents the optimal sequence of (k, l) pairs (the optimal path) for velocity logs I = 1 and J = 3 from Teapot Dome. The diagonal white line of large alignment errors near index i = 1401 is due to a large measurement error (velocity = 6880 m/s) in log 1 at index i = 1391. By warping each of the 15 log pairs (denoted by line segments in Figure 2), we obtain for each log pair a sequence of corresponding depths. Figure 6 displays three 3 CORRELATING ALL LOGS Although optimal correlations have been found for each pair of well logs, we require that pair-wise correlations be consistent for all logs. For example, suppose we choose a depth zI in log I and find corresponding depths in all other logs. From Figure 7 we can see that corresponding depths zI and zJ in logs I and J are offset by some depth shift s. If we sum depth shifts like this one, for each pair of corresponding depths along any of the 342 cycles in Figure 2, we expect the sum of all of the shifts to be zero when we return to depth zI in log I. This consistency cannot be achieved with dynamic warping alone. Therefore, after computing many pairs of corresponding depths like that illustrated in Figure 7, we must find depth shifts s so that all pairs of corresponding depths are consistent. For every depth zI in log I, let τI denote a corresponding relative geologic time defined by τI (zI ) ≡ zI + sI (zI ), (9) where sI (zI ) represents the depth shift for log I at depth zI , I = 1, . . . , L, and L is the number of logs. Depths zI in log I and zJ in log J correspond if they have the same relative geologic time, τI = τJ , so that zI + sI (zI ) = zJ + sJ (zJ ). (10) Simultaneous correlation of multiple well logs 279 Figure 6. Three velocity log pairs before (a, c, e) and after (b, d, f) warping. Log indices (I, J) are denoted in black and red corresponding to the colors of the logs. After shifts s have been computed in this way, equation 9 can be used to compute a time τI for each sampled depth zI and thereby find a log value f˜I (τI ) for every time τI . Specifically, we first convert the function τI (zI ) to zI (τI ) and then compute f˜I (τI ) = fI (zI (τI )). Figure 1a shows velocity logs fI (zI ) for I = 1, 2, . . . , 6; and Figure 1b shows the same logs f˜I (τI ) after correlation. 4 Figure 7. Each depth zI in log I has one or more corresponding depths zJ in log J. For such pairs of depths, log values fI (zI ) and fJ (zJ ) should be similar. Rearranging equation 10 so that corresponding depths are on the right and unknown shifts are on the left, we have sI (zI ) − sJ (zJ ) = zJ − zI . (11) Every depth in every log will have a corresponding shift, yielding Nz ×L unknown shifts s. The number of pairs of corresponding depths we can find in all logs depends on the number of non-null values in the logs, but typically is much greater than the number of shifts. Therefore, equation 11 gives rise to a system of linear equations with many more equations than unknowns. We use the conjugate gradient method to find a least-squares solution to these equations. The solution is not unique, because correlated well logs, such as those in Figure 1b, will remain aligned if all logs are shifted or squeezed or stretched vertically. To prevent such unnecessary shifting while correlating, a preconditioner for the conjugate gradient method is applied to constrain the average shift over all logs to be zero for all depths. DISCUSSION In our least-squares solution for shifts sI (zI ), weights can be assigned to each equation 11 to improve the accuracy of well log correlations. For example, other information, perhaps from human interpreters, can be used to determine pairs of corresponding depths for which higher weights might be assigned. When such information is not available, weights might be assigned in other ways. For instance, we might assign weights that decrease with distance between wells. In all examples shown in this paper, all corresponding depths in all wells were weighted equally. Even so, resulting correlations reveal consistent thin beds in the velocity logs displayed in Figure 8a. Consider the 11 gamma ray logs from Teapot Dome shown after correlation in Figure 8b. In this example, there are 55 possible pair-wise correlations and over 30 million cycles among the well locations. Consistent manual correlation of these 11 logs is therefore infeasible. Note also that, although many large measurement errors are apparent in the gamma ray logs, our automatic method yields consistent correlations. 5 CONCLUSION Our method for automatic and simultaneous correlation of well logs is twofold. First, we use our modified dynamic warping algorithm to find for each log pair a 280 L.Wheeler & D.Hale ACKNOWLEDGMENTS We thank the sponsor companies of the Consortium Project on Seismic Inverse Methods for Complex Structures, whose support made this research possible. Thanks also to the Rocky Mountain Oilfield Test Center, a facility of the U.S. Department of Energy, for providing the 3D seismic image and well logs used in this study. REFERENCES Figure 8. Close up of (a) deepest six velocity logs and (b) deepest 11 gamma ray logs from Teapot Dome after correlation. sequence of corresponding depths. Our procedure for pair-wise log correlation is similar to existing automatic well log correlation methods, but differs primarily in the calculation of alignment errors. Using a transformed coordinate system, we ensure that all possible warping paths have equal length, so that a path will not be optimal solely due to its short length. At the end of this first step, we’ve done nothing yet to guarantee consistency of pair-wise correlations over all wells. Using a least-squares method, we then find depth shifts for every depth in every log that maximize consistency among all pairs of corresponding depths. By applying these depth shifts, we are able to find relative geologic times for every log depth, and thereby map the well logs from depth to relative geologic time. With examples from Teapot Dome, we have shown that our method yields consistent correlations and is robust in the presence of large measurement errors frequently found in well logs. Fang, J. H., and C. Chen, 1992, Computer-aided well log correlation: The American Associate of Petroleum Geologists Bulletin, 76, 307–317. Kovalevskiy, E. V., G. N. Gogonenkov, and M. V. Perepechkin, 2007, Automatic well-to-well correlation based on consecutive uncertainty elimination: Presented at the 69th EAGE Conference and Exhibition, London, Extended Abstracts. Le Nir, I., N. Van Gysel, and D. Rossi, 1998, Crosssection construction from automated well log correlation: a dynamic programming approach using multiple well logs: Presented at the SPWLA 39th Annual Logging Symposium. Lineman, D., J. Mendelson, and M. Toksöz, 1987, Wellto-well log correlation using knowledge-based systems and dynamic depth warping: Presented at the SPWLA 28th Annual Logging Symposium. Rudman, A. J., and R. W. Lankston, 1973, Stratigraphic correlation of well-logs by computer techniques: American Association of Petroleum Geologists Bulletin, 57, 577–588. Smith, T., and M. Waterman, 1980, New stratigraphic correlation techniques: Journal of Geology, 88, 451– 457. Wu, X., and E. Nyland, 1987, Automated stratigraphic interpretation of well-log data: Geophysics, 52, 1665– 1676.