geosteering by exact inference on a bayesian network(preprint: to appear in geophysics) geosteering...

27
(Preprint: to appear in Geophysics) Geosteering by Exact Inference on a Bayesian Network Hugh Winkler * ABSTRACT I formulate geosteering as a probabilistic inverse problem: given a sequence of log and directional survey measurements along a wellbore, and a pilot well log representing the geologic column at a known position, what are the most likely spatial positions of those surveys, and how does the geologic structure vary laterally? Constraining the problem to two dimensions, I define discrete random variables over the wellbore positions, the well log, and the geologic structure. Incorporating conditional relations among the variables, I arrange the variables in a Bayesian network. After applying geological and instrument prior information, and evidence in the form of log and directional survey measurements, probability calculus determines the posterior joint marginal probability distributions for the well path and geologic structure. Na¨ ıvely performing the necessary multiplications and marginalizations would require impossible amounts of computer memory. Using variable elimination, I order the computations so as to reduce memory requirements, making it practical to execute on modern, commodity computers. From the posterior joint marginal, I extract the most likely well path and geologic structure, and characterize confidence in these measures by posterior marginal probabilities for each variable. The Bayesian network approach enables us to solve inverse problems, like this one, spanning different physical dimensions, having non-normal uncertainties, and having no direct forward modeling formula. INTRODUCTION Geologists use geological logging measurements to guide directional drilling decisions. To position a well in a target geologic zone, the geologist must interpret the physical measure- ments — directional surveys and logging while drilling (LWD) readings — to estimate two unknowns: the true well path through the earth, and lateral changes in the geology. In this study, I construct the geosteering problem formally as a probabilistic inverse problem; formulate it as a Bayesian network over discrete random variables; and use techniques from machine learning to solve the Bayesian network exactly for the maximum a posteriori probability (MAP) configuration and posterior marginal dis- tributions.

Upload: truongkhue

Post on 07-Feb-2018

232 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Geosteering by Exact Inference on a Bayesian Network(Preprint: to appear in Geophysics) Geosteering by Exact Inference on a Bayesian Network Hugh Winkler ABSTRACT I formulate geosteering

(Preprint: to appear in Geophysics)

Geosteering by Exact Inference on a Bayesian Network

Hugh Winkler ∗

ABSTRACT

I formulate geosteering as a probabilistic inverse problem: given a sequence of log anddirectional survey measurements along a wellbore, and a pilot well log representing thegeologic column at a known position, what are the most likely spatial positions of thosesurveys, and how does the geologic structure vary laterally? Constraining the problemto two dimensions, I define discrete random variables over the wellbore positions, thewell log, and the geologic structure. Incorporating conditional relations among thevariables, I arrange the variables in a Bayesian network. After applying geological andinstrument prior information, and evidence in the form of log and directional surveymeasurements, probability calculus determines the posterior joint marginal probabilitydistributions for the well path and geologic structure. Naıvely performing the necessarymultiplications and marginalizations would require impossible amounts of computermemory. Using variable elimination, I order the computations so as to reduce memoryrequirements, making it practical to execute on modern, commodity computers. Fromthe posterior joint marginal, I extract the most likely well path and geologic structure,and characterize confidence in these measures by posterior marginal probabilities foreach variable. The Bayesian network approach enables us to solve inverse problems,like this one, spanning different physical dimensions, having non-normal uncertainties,and having no direct forward modeling formula.

INTRODUCTION

Geologists use geological logging measurements to guide directional drilling decisions. Toposition a well in a target geologic zone, the geologist must interpret the physical measure-ments — directional surveys and logging while drilling (LWD) readings — to estimate twounknowns: the true well path through the earth, and lateral changes in the geology. In thisstudy, I

• construct the geosteering problem formally as a probabilistic inverse problem;

• formulate it as a Bayesian network over discrete random variables; and

• use techniques from machine learning to solve the Bayesian network exactly for themaximum a posteriori probability (MAP) configuration and posterior marginal dis-tributions.

Page 2: Geosteering by Exact Inference on a Bayesian Network(Preprint: to appear in Geophysics) Geosteering by Exact Inference on a Bayesian Network Hugh Winkler ABSTRACT I formulate geosteering

Winkler 2 Geosteering using Bayesian Networks

Consider a simplified, two-dimensional earth model as in Figure 1. A vertical well cutsthrough it at x = 0. We record a pilot log in the vertical well, typically a gamma ray log.We divide the earth laterally into blocks, characterizing the geology of each block by itsdip, and by any fault throw separating the block from its neighbor to the left. We supposethe pilot well log characterizes the geology of each of these blocks, only differing from thepilot log at x = 0 by a vertical shift. Thus the vertical position of the virtual log at the leftedge of a block is due to the dip of the previous block, and any fault between that blockand the current one.

We characterize the trajectory by inclination surveys at several lateral locations. Al-though we typically obtain LWD readings between survey locations, in this study, for sim-plicity, we will measure LWD only at the survey locations. The wellbore trajectory cutsthrough each shifted and tilted block, measuring the LWD at the same geology that gaverise to readings on the pilot log. Therefore, each LWD reading corresponds to a similarreading at some depth on the pilot log. This study will use the gamma ray LWD readingsand inclination surveys to infer the true well path and geologic structure.

Other investigators have used probabilistic approaches to estimate well position andgeologic structure, and to assist decision-making. Kullawan et al. (2014) used deep direc-tional resistivity logs to measure the distance to bed boundaries above and below the drillbit. Building a Gaussian joint distribution over the measured distances and a model forinterpolating the bed boundaries, they used Bayes’ rule to update it as new measurementsarrived. Eidsvik and Hokstad (2006) employed vertical seismic profile traveltimes with di-rectional survey measurements to invert for well position, geologic structure, and seismicvelocity. They found the model maximizing a posterior probability distribution constructedby combining prior information with a forward modeling formula. Bayesian networks havebeen employed for high-level prospect analysis (Martinelli et al., 2011) and pore pressureprediction (Oughton et al., 2015).

Prior Information

Before drilling the lateral, the geologist has some information about the well path and thegeology. They know the planned path of the wellbore. In many cases, they have seismicdata, or well logs from neighboring wells, from which they will have constructed a geologicmodel. They have a well log from the vertical section of the current hole; in the ideal case,the vertical extends below the kickoff point for the lateral, so that well log measurementsabove and below the planned lateral are available.

The estimated well path is sensitive to errors in the directional survey measurements(Williamson et al., 1999); the longer the horizontal section of the well, the wider the coneof uncertainty (Jamieson, 2012, pp. 76-79). First, the actual well path varies from theintended, planned well path, due to inaccuracies in the steering mechanism. Second, theactual well path varies from that implied by the measured surveys, due to inaccuracies inthe measuring instrumentation. Since we estimate the position of each survey by adding anoffset to the previous survey position, the errors accumulate, introducing a total positionuncertainty on the order of tens of meters at the far end of a typical lateral section.

The character of the pilot log in the zone of interest influences the outcome. In the bestcase, the pilot log value maps uniquely to depth. For example, a linearly increasing log over

Page 3: Geosteering by Exact Inference on a Bayesian Network(Preprint: to appear in Geophysics) Geosteering by Exact Inference on a Bayesian Network Hugh Winkler ABSTRACT I formulate geosteering

Winkler 3 Geosteering using Bayesian Networks

a depth interval offers no ambiguity; given a log value, we can read off a depth from thepilot log. Frequently, the pilot log varies little in the zone of interest, or varies in a periodicway, so that knowing a log value gives ambiguous information about what relative depththe reading comes from.

In this study, I do not address the uncertainty in the measured depth along the wellboreto the instrumentation package near the bit. In the following discussion, we will assumewe have exact measured depth. Incorporating measured depth as a random variable is astraightforward extension of the strategy described here.

Z1Y1

X1 X2

A1,B1

D1

F3

L1,M1

X3X0

Shifted Virtual Log

Wellbore Trajectory

Gamma Ray While Drilling

Gamma RayPilot Log

formationmarker

Lateral distance

True

Ver

tical

Dep

th Geologic Feature

Figure 1: Schematic of the geosteering problem. We measure natural gamma ray andwellbore inclination at intervals along the wellbore. We assume the pilot gamma ray logrepresents a vertical slice of the earth at position x = 0. At each lateral location i, offsetxi, we define eight random variables. Y is the depth to the wellbore; Z is the depth toan arbitrary geologic marker; D is the slope, or dip, of the geologic marker; A is the trueinclination of the wellbore; B is our measured inclination; F is the throw of a fault, wherepresent; M is the true natural gamma radiation of the earth; L is our measurement of it,while drilling. In our simplified model, the earth can only vary laterally by a vertical shift,which we represent as a copy of the pilot log, shifted to follow the geologic structure.

METHODS

I formulate the problem as a probabilistic inverse problem, in which we seek estimates ofphysical parameters, related to measurements through a theoretical relationship. Adoptingthe framework of Tarantola and Valette (1982), I characterize the theoretical relationshipin the most general way: as a joint probability distribution over the measurements andthe model parameters. The parameters are the true wellbore depths and the true geologicstructure depths, at several lateral positions along the wellbore. The measurements are thegamma ray and the inclination surveys at the same positions. We have prior informationabout the geology and about the measuring instrumentation, which I also represent asprobability distributions. We seek a posterior estimate of the model parameters, which wefind by forming the conjunction of these states of information, and, from that distribution,obtaining the MAP configuration and the marginals for the model parameters.

For each physical quantity, at each lateral position along the wellbore where we haveobservations, I define a random variable taking on discrete values. We want fine enough

Page 4: Geosteering by Exact Inference on a Bayesian Network(Preprint: to appear in Geophysics) Geosteering by Exact Inference on a Bayesian Network Hugh Winkler ABSTRACT I formulate geosteering

Winkler 4 Geosteering using Bayesian Networks

intervals so that our answers have satisfactory resolution; yet the finer the intervals, themore numerous the allowed states each variable can take on. Because we will be multiplyingmany discretized probability distributions together, too fine an interval will require morecomputer memory than is available; the number of multiplications rises exponentially asthe number of allowed, possible states.

Since many of the random variables are conditioned on other random variables, werepresent each random variable as a conditional probability table (CPT). Table 8 shows afragment of an example CPT. A CPT is a special case of a more general construct, a factor.Appendix B describes multiplication, marginalization, and maximization of factors.

Bayesian Network

Our model will require eight random variables at each of tens, or hundreds, of lateralpositions. Each of those random variables may take on tens or hundreds of states. The fulljoint probability distribution, then, has many orders of magnitude more elements (∼ 100100)than there are atoms in the universe (∼ 1080). It is impossible to load the full jointprobability distribution into computer memory. To make the problem tractable, we willnotice conditional independence relationships among the random variables, and arrangethe model as a Bayesian network (Pearl, 1985). A simple example will motivate using aBayesian network, and illustrate the approach.

From the fundamental rule of probability calculus

P (A,B) = P (A | B)P (B),

we can derive the chain rule of probability calculus, allowing us to represent a joint proba-bility over N variables as the product of N conditional probabilities. For a joint probabilityover variables A, B, and C, the chain rule permits us to write

P (A,B,C) = P (A | B,C)P (B | C)P (C), (1)

multiplying factors of dimensions 3 × 2 × 1. The factor P (A | B,C), of dimension 3,requires storage for up to NA × NB × NC elements, where the NX represent the numbersof states allowed for each dimension. If we can assert conditional independence relationsamong these variables, we can reduce the dimensions of the multiplicands on the right handside of (1). Well-studied in the machine learning literature, Bayesian networks are directedacyclic graphs in which the nodes represent CPTs associated to random variables, and theedges represent the conditions relating them. The variable associated to each node mustbe conditionally independent of its non-descendants, given its parents. In Equation 1, ifwe assert that A is independent of C given B, B is independent of A given C, and C isindependent of A and B, we can construct the Bayesian network in Figure 2, and write

P (A,B,C) = P (A | B)P (B | C)P (C), (2)

multiplying factors of dimensions 2×2×1. Equation 2 illustrates the chain rule for Bayesiannetworks. We have reduced, from three to two, the largest number of dimensions of anymultiplicand, compared to Equation 1. If we now present evidence B = b to the network,

Page 5: Geosteering by Exact Inference on a Bayesian Network(Preprint: to appear in Geophysics) Geosteering by Exact Inference on a Bayesian Network Hugh Winkler ABSTRACT I formulate geosteering

Winkler 5 Geosteering using Bayesian Networks

we obtain the posterior probability

P (A,B = b, C) = P (A | B = b, C)P (B = b | C)P (C).

We can characterize the posterior by the values of A and C giving the greatest value forP (A,B = b, C), or the MAP configuration,

{aMAP , cMAP } = arg maxA,C

P (A | B = b, C),

and by their posterior marginals

Pmarg(A) =∑C

P (A | B = b, C)

Pmarg(B) =∑A

P (A | B = b, C).

Generally, the chain rule for Bayesian networks allows us to represent the joint proba-bility over all the variables in a Bayesian network as the product of their CPTs,

P (X1, . . . , XN ) =N∏i=1

P (Xi | Parents(Xi)),

and its power lies in that it permits us to compute properties of that high-dimensionaldistribution by manipulating its far smaller constituent factors, a few at a time. Refer toDarwiche (2009) or Jensen (2002) for rigorous development of these fundamental concepts.

A

C

B

Figure 2: A Bayesian network representing the joint prior probability P (A,B,C) = P (A |B)P (B | C)P (C)

We seek a configuration, for the variables parameterizing the geology and wellbore shape,which gives the MAP, and posterior marginal probability distributions for those variables.By factoring the joint into its constituent CPTs, and ordering multiplications and summa-tions sensibly using the variable elimination technique (Darwiche, 2009, Chapter 6), we cancompute the MAP configuration and marginals in a realizable amount of computer memory,in a few minutes, on modern commodity computers. We will be able to compute propertiesof a posterior joint probability over hundreds or thousands of variables, requiring at mostfive variable dimensions in memory at once.

Bayesian networks can model continuous variables, but only under severe constraints:

Page 6: Geosteering by Exact Inference on a Bayesian Network(Preprint: to appear in Geophysics) Geosteering by Exact Inference on a Bayesian Network Hugh Winkler ABSTRACT I formulate geosteering

Winkler 6 Geosteering using Bayesian Networks

the distributions must be conditional Gaussians, and continuous variable nodes may nothave a discrete child node (Jensen, 2002, p. 67). I have used discrete variables so that we canexploit the capability of discrete Bayesian networks to model non-Gaussian distributions,most importantly with faulting. And even though in examples below, out of convenience,we will use Gaussians for several prior distributions, it is straightforward to substitute moresophisticated models where we have them.

Model

A wellbore cutting through the earth, modeled at each lateral position x by a virtual,vertical, gamma ray log, will exhibit the gamma ray value of that virtual log where itintersects the wellbore. If we constrain the earth so that, as we move away from x = 0, itis a vertically shifted version of the earth at x = 0, then the amount of vertical shift affectswhere the wellbore intersects that virtual log, and the LWD reading there.

I model the well path, the geologic structure, the log measurements, and the surveymeasurements as discrete, random variables. I restrict the model to two dimensions, xand z. At each x location, we define eight discrete, random variables; see Figure 1. Weconstruct probability distributions for each variable, representing our prior information.Because the variables are discretized, while our prior information on them is typically acontinuous probability density, we assign to each allowed state its area in that interval ofthe probability density. The following are descriptions of each random variable, and its priorinformation. In these descriptions, I mention specific, simple, distributions; these are whatI have used in my experiments, but where an interpreter knows that a different distributionis more descriptive, the algorithm should use it.

Ai True well path inclination The prior is a normal distribution centered at the plannedinclination at position i.

Bi Measured well path inclination The prior is a conditional distribution, dependenton the true well path inclination, Ai. For each possible state of Ai, we will say Bi’sprior is a normal distribution, centered about the Ai. Practical implementations maywant to use more sophisticated survey error models described by Williamson et al.(1999).

Di True geologic dip The prior is a normal distribution, based on the geologist’s regionalknowledge of the geology, centered at the expected dip value at position i.

Fi Faulting There is no vertical shifting due to faulting at most lateral positions. Occa-sionally, we do encounter a fault, and when we do, it has a certain typical throw.I model this as a bimodal distribution: a mixture of a normal distribution centeredabout zero and having a very small variance, and one centered about the expectedthrow, with a variance reflecting the geologist’s belief about the range of possiblethrow. The geologist’s belief about the frequency of faulting, specified as number offaults per thousand meters, governs the amplitudes of the two modes.

Li LWD gamma ray measurement The prior is a conditional distribution, dependenton the true value of the earth’s natural gamma radiation, Mi. Several factors cancontribute to the gamma ray detector’s reading, including eccentering of the tool in

Page 7: Geosteering by Exact Inference on a Bayesian Network(Preprint: to appear in Geophysics) Geosteering by Exact Inference on a Bayesian Network Hugh Winkler ABSTRACT I formulate geosteering

Winkler 7 Geosteering using Bayesian Networks

the hole, temperature, and calibration error (Griffiths, 2009). For each possible stateof Mi, Li’s prior distribution is a normal distribution, centered at Mi.

Mi True earth gamma ray The prior is a conditional distribution, dependent on thegeologic feature true vertical depth (TVD) (which we assume completely governs thelateral change in structure), and the true well path TVD. We assume that a verticalwell log taken in a virtual well drilled at this lateral position, is prior informationfor which we have a good estimate. One simple model for this lateral character isno change at all; that is, in many cases we believe that, allowing for lateral changesin structure due to faulting and dipping, a vertical column through the earth looksjust like the pilot log at x = 0. Rather than model this virtual vertical well logas a separate random variable, I incorporate the information into the conditionalprobability table for M . The wellbore intersects a vertical slice through a verticallyshifted earth, causing the LWD log to read the value on the vertically shifted pilotlog. At x = 0, the true earth gamma ray is the value of the pilot log at the wellboredepth Y . At arbitrary xi away from the origin, let ∆i = (Yi − Zi) − (Y0 − Z0), thechange in the relative depth between the structure and the wellbore. Then the LWDlog reading at xi is the value of the pilot log at depth Yi − ∆i. Allowing for somevariance in the natural gamma ray reading, for each possible combination of geologicstructure depth, and wellbore depth, we have a normal distribution centered at thepilot log value at depth Yi −∆i.

Yi Wellbore true vertical depth The prior is a conditional probability distribution, de-pendent on the previous wellbore TVD Yi−1, and the true wellbore inclination Ai−1.The most likely current TVD is the previous (laterally) TVD, offset by the inclinationthere, scaled by the distance between the two lateral positions. Since we are mod-eling the sum of two discrete values, the discretization error implies a uniform sumdistribution centered at their sum (see Appendix A).

Zi Geologic feature true vertical depth The prior is a conditional probability distri-bution, dependent on the previous feature depth Zi−1, the dip Di−1, and the faultingFi−1. The most likely current depth of the feature is the previous depth, offset bythe dip there, scaled by the distance between the two lateral positions; to this we addthe fault displacement. Since we are modeling the sum of three discrete values, thediscretization error implies a uniform sum distribution centered at their sum.

Practical implementations must truncate normal distributions to a few standard deviations.

We can visualize the conditional relations among these variables as the Bayesian networkin Figure 3a. Each node represents a CPT; the joint probability over all the variables isthe product of these CPTs. The directed edges represent conditional relationships; an edgeconnects the CPT for a dependent variable to the CPTs of its dependencies. To verify thatthe model variables satisfy the conditional independence criterion, consider each node andits variable’s definition above; observe that, were we to specify values for that node’s parentvariables, the node’s posterior distribution could no longer be affected by changes to anyvariables, except its descendants. For example, consider node M1, the true earth naturalgamma ray at location 1, and suppose we could declare specific values for well path depthY1 and geologic feature depth Z1. The distribution for M1 would become one-dimensional,with a peak at the earth’s expected natural gamma ray value for that combination of well

Page 8: Geosteering by Exact Inference on a Bayesian Network(Preprint: to appear in Geophysics) Geosteering by Exact Inference on a Bayesian Network Hugh Winkler ABSTRACT I formulate geosteering

Winkler 8 Geosteering using Bayesian Networks

path and vertically shifted geologic cross-section. Only evidence for its single descendant,the measured log value L1, could further refine a posterior estimate of true earth naturalgamma ray M1.

At each lateral location i, we present evidence Li = li, the measured log value, andBi = bi, the measured inclination. Presenting evidence to a CPT eliminates all rows exceptthe ones matching the evidence. Appendix C contains representative examples of CPTs foreach of the eight variable types in our network, at a specific lateral position.

Computing MAP and Marginals

Reducing the Bayesian Network

Presenting evidence to some of the variables in a Bayesian network modifies the priordistribution; this posterior distribution is the complete answer to the problem we haveposed. Two useful ways to characterize it are by the MAP configuration, and by theposterior marginal probabilities for each of the variables of interest. We want, in effect, toapply the evidence, then multiply the CPTs together for all the variables in the network,obtaining a joint posterior over hundreds of variables, over which we would maximize andmarginalize; that would be impossible. But the structure of the network in Figure 3a enablesus to divide and conquer to achieve the same result.

We can reduce the Bayesian network in Figure 3a to a collection of factors, as in Fig-ure 3b, mentioning only the Y and Z variables, making it simple to calculate the MAPconfiguration and the marginal for any Y or Z. At each lateral location i along the well-bore, we have CPTs for the eight variables, P (Ai−1), P (Bi−1 | Ai−1), P (Di−1), P (Fi−1),P (Li−1 | Mi−1), P (Mi−1 | Yi−1, Zi−1), P (Yi | Yi−1, Ai−1), and P (Zi | Zi−1, Di−1, Fi−1). Ihave arranged the nodes into ensembles, each connected to the previous ensemble only byedges from the previous Y and Z nodes. The ensemble for position i includes variablesfrom positions i− 1 and i. Presenting well log and directional survey evidence Li=li, Bi=bireduces the CPTs P (Li = li | Mi) and P (Bi = bi | Ai) to small factors having only rowscompatible with the evidence. We multiply together all the CPTs in the ensemble of nodesfor each of N lateral wellbore locations, and, as shown in Figure 3b, marginalize away allvariables except for the Y s and Zs. Define factor

ΦXi ≡ ΦX

i (Xi, Parents(Xi)) ≡ P (Xi | Parents(Xi))

to represent the CPT for a variable Xi at the ith lateral location. Multiply together thefactors, and marginalize away Ai−1, Fi−1, Di−1, and Mi−1:

Φi(Yi−1, Zi−1, Yi, Zi)

=∑

Ai−1,Fi−1,Di−1,Mi−1

ΦAi−1(Ai−1)Φ

Bi−1(bi−1, Ai−1)Φ

Yi (Yi, Yi−1, Ai−1)

ΦFi−1(Fi−1)Φ

Di−1(Di−1)Φ

Zi (Zi, Zi−1, Di−1, Fi−1)

ΦLi−1(Li−1,Mi−1)Φ

Mi−1(Mi−1, Yi−1, Zi−1). (3)

For some ensembles, well log evidence Li−1 may be available, while directional survey evi-dence Bi−1 is not; at those locations, we would include the factor ΦB

i−1(Bi−1) in the multi-

Page 9: Geosteering by Exact Inference on a Bayesian Network(Preprint: to appear in Geophysics) Geosteering by Exact Inference on a Bayesian Network Hugh Winkler ABSTRACT I formulate geosteering

Winkler 9 Geosteering using Bayesian Networks

plicand in (3), and include Bi−1 in the variables of summation.

Implementing Equation 3, as written, would require holding nine dimensions in memory,before summing out the four variables. We can order the multiplications and marginaliza-tions to reduce the number of dimensions we must hold in memory at one time. Oneelimination order requiring at most five dimensions in memory is M , D, F , A:

Φi(Yi−1, Zi−1, Yi, Zi)

=∑Ai−1

ΦAi−1(Ai−1)Φ

Bi−1(bi−1, Ai−1)Φ

Yi (Yi, Yi−1, Ai−1)∑

Fi−1

ΦFi−1(Fi−1)

∑Di−1

ΦDi−1(Di−1)Φ

Zi (Zi, Zi−1, Di−1, Fi−1)∑

Mi−1

ΦLi−1(Li−1,Mi−1)Φ

Mi−1(Mi−1, Yi−1, Zi−1). (4)

For shorthand we will sometimes write

Φi ≡ Φi(Yi−1, Zi−1, Yi, Zi).

The posterior joint marginal probability over all the Y and Z will be the product ofthese factors:

P (Y0, Z0, . . . , YN−1, ZN−1) = Φ0 · · ·ΦN−1.

Forming this collection of the Φi saves computation: when measurements arrive fora new location, we compute the new reduced factor for its ensemble and append it tothe collection. The collection forms a construct which we can query for updated MAPconfigurations and posterior marginals, as drilling proceeds.

Posterior marginals

To obtain the posterior marginals Pmarg(Yi), Pmarg(Zi) at location i, we must marginalizeout all other variables from the posterior joint marginal:

Pmarg(Yi) =∑

Y\Yi,Z

Φ0 · · ·ΦN−1,

Pmarg(Zi) =∑

Y,Z\Zi,

Φi · · ·ΦN−1,(5)

where Y = {Y0, . . . , YN−1} and Z = {Z0, . . . , ZN−1}. Implementing Equations 5 as writtenwould not be possible, because we would have to construct a factor of many dimensions; butby interleaving multiplications and marginalizations, we can do it. Proceeding inward fromthe left and right ends, multiplying and marginalizing, never holding factors of more thanfour dimensions in memory, we accumulate left and right factors for each location index i;each represents the multiplication of all the Φ left and right of i, and the summing out of

Page 10: Geosteering by Exact Inference on a Bayesian Network(Preprint: to appear in Geophysics) Geosteering by Exact Inference on a Bayesian Network Hugh Winkler ABSTRACT I formulate geosteering

Winkler 10 Geosteering using Bayesian Networks

all variables except Yi and Zi.

Φlefti ≡ Φleft

i (Yi, Zi) =∑

Yi−1,Zi−1

Φi(Yi−1, Zi−1, Yi, Zi)∑Yi−2,Zi−2

Φi−1(Yi−2, Zi−2, Yi−1, Zi−1)

· · ·∑Y1,Z1

Φ2(Y1, Z1, Y2, Z2)∑Y0,Z0

Φ0(Y0, Z0)Φ1(Y0, Z0, Y1, Z1),

Φrighti ≡ Φright

i (Yi, Zi) =∑

Yi+1,Zi+1

Φi+1(Yi, Zi, Yi+1, Zi+1)∑Yi+2,Zi+2

Φi+2(Yi+1, Zi+1, Yi+2, Zi+2)

· · ·∑YN−2,ZN−2

ΦN−2(YN−3, ZN−3, YN−2, ZN−2)∑YN−1,ZN−1

ΦN−1(YN−2, ZN−2, YN−1, ZN−1).

We obtain the marginals by multiplying the left factor by the right factor for index i, andmarginalizing away the unneeded variable:

Pmarg(Yi) =∑Zi

Φlefti Φright

i

Pmarg(Zi) =∑Y i

Φlefti Φright

i .(6)

MAP configuration

The MAP configuration for the variables {Y0, Z0, . . . , YN−1, ZN−1} gives the configurationof those variables corresponding to the greatest value of the posterior. Although it gives theglobally most probable configuration, we use the result with caution, because this config-uration may not have broad support: the posterior distribution might be high but narrowthere.

Dechter (1999) showed that we can arrive at the most probable explanation (MPE)configuration by variable elimination, in a way similar to marginalization. The MPE is aspecial case of MAP, in which we seek the most probable configuration over all the non-evidentiary variables; in contrast, MAP seeks the most probable configuration over a subsetof the non-evidentiary variables, marginalizing away the uninteresting ones. Darwiche (2009,Chapter 10) observed that applying that MPE algorithm to reduced factors like Φi is equiv-alent to estimating the MAP variables over the full joint. Maximizing a factor (Appendix

Page 11: Geosteering by Exact Inference on a Bayesian Network(Preprint: to appear in Geophysics) Geosteering by Exact Inference on a Bayesian Network Hugh Winkler ABSTRACT I formulate geosteering

Winkler 11 Geosteering using Bayesian Networks

Z0

Z1

M0

Y0

Y1

D0

Z2

M1

B0

L0

A0

Y2

F0

D1

Z3

M2

B1

L1

A1

Y3

F1

D2

Z4

M3

B2

L2

A2

Y4

F2

D3

Z5

M4

B3

L3

A3

Y5

F3

D4

B4

L4

A4

F4

Y5Z5Y4Z4

Y4Z4Y3Z3

Y3Z3Y2Z2

Y2Z2Y1Z1

Y1Z1Y0Z0Y0Z0

i = 0 1 2 3 4 5

Φ0 Φ1 Φ2 Φ3 Φ4 Φ5

i – 1FΦ

i – 1DΦ ΦA

i – 1Φi

Y ΦiZM

i – 1ΦF DMA i – 1∑=iΦ

b)

a)

Figure 3: a) Random variables of the geosteering problem, for N = 6 lateral positions alonga wellbore, configured in a Bayesian network. We present evidence at the nodes having asolid border. We want to estimate Yi, Zi for all i. Consider the ith vertical row of nodesas an ensemble, connected to the previous ensemble by incoming edges from the Yi andZi nodes. b) We multiply the factors for the CPTs corresponding to each variable Xi,ΦXi , and sum out all variables except the Yi and Zi. We obtain reduced factors for each

lateral position, each mentioning at most four variables. From these reduced factors, wecan compute the MAP configuration for the twelve Y and Z variables, and the marginalsPmarg(Yi) and Pmarg(Zi) at any i.

Page 12: Geosteering by Exact Inference on a Bayesian Network(Preprint: to appear in Geophysics) Geosteering by Exact Inference on a Bayesian Network Hugh Winkler ABSTRACT I formulate geosteering

Winkler 12 Geosteering using Bayesian Networks

B) over a variable produces a smaller factor having that variable elided. We can proceedthrough the Φi, alternately multiplying factors and maximizing away variables:

> = maxYN−1,ZN−1

(

maxYN−2,ZN−2

ΦN−1(YN−2, ZN−2, YN−1, ZN−1)

maxYN−3,ZN−3

ΦN−2(YN−3, ZN−3, YN−2, ZN−2)

· · ·maxY1,Z1

Φ2(Y1, Z1, Y2, Z2) maxY0,Z0

Φ0(Y0, Z0)Φ1(Y0, Z0, Y1, Z1)).

Maximizing and multiplying in this way through all the Φi reduces to a trivial factor >having no remaining variables and one row, whose scalar represents the maximum poste-rior probability. Darwiche (2009, Chapter 10) describes a technique for augmenting thefactors resulting from each maximization to record the instantiations associated to themaxima found at each stage. That process accumulates a collection of variable states{y0, z0, . . . , yN−1, zN−1}MAP , the MAP configuration, at which the global maximum prob-ability occurs.

Both the MAP configuration, and the posterior marginals for each variable in Equation 6,yield global solutions. New information, acquired as the well extends, updates the globalposterior, and propagates back throughout the Φright

i (the Φlefti remain unchanged). For

example, a new measurement at the end of a wellbore can grow the probability, somedistance back, that the wellbore crossed a fault; the updated MAP formation depth estimatemay now jump discontinuously there. Presenting the new evidence can increase the posteriorprobability at a previously smaller, local, maximum, so that it becomes the new globalmaximum.

RESULTS

To demonstrate the method, I generated a random earth cross-section at ten foot (3m)intervals, indicated by the black line in Figure 4a, tracking a marker at 7250 ft (2210 m).I drew the dip of each interval from a normal distribution centered at 0%, with σ = 5%(over a 10 foot (3 m) interval, the standard deviation of the vertical shift is 0.5 ft (0.15m)). Additionally, I drew the fault displacement from a distribution, as in Table 4, wherewe expect four faults every 1000 ft (305 m), having throw 10 ft (3 m), with a standarddeviation of σ = 5 ft (1.5 m). The dip and fault displacements across an interval, addedto the depth of the marker at the left end of the interval, determine the depth at the rightend of the interval.

To generate trajectory evidence, I used a simple error model to introduce noise both inthe steering of the borehole along the planned trajectory, and in the inclination measure-ments. At the same ten foot (3 m) intervals, I first designed a notional planned trajectory,not shown in the figure. Around those inclinations, I drew random variations to constructan actual trajectory, the green line. Then, using this actual trajectory as a baseline, I drewrandom variations about those inclinations to construct the measured trajectory, the redline. For both of these trajectories, to generate the inclination numbers, I used a normaldistribution having σ = 5%.

Page 13: Geosteering by Exact Inference on a Bayesian Network(Preprint: to appear in Geophysics) Geosteering by Exact Inference on a Bayesian Network Hugh Winkler ABSTRACT I formulate geosteering

Winkler 13 Geosteering using Bayesian Networks

At every ten-foot (3 m) interval, I shifted the pilot log, at left in Figure 4a, vertically,according to the shift in the earth structure (the black line). I added Gaussian noise of σ = 1gAPI to the pilot log. Where that shifted log intersects the actual trajectory determinesthe measured gamma ray LWD, rendered horizontally along the bottom of Figure 4a.

I used depth discretization intervals of 1 ft (0.3 m), and gamma ray intervals of 1 gAPI.

The planned trajectory, the regional structure (zero dip ±5%, four faults per 1000 ft(305 m), 10 ft (3 m) throw), along with the pilot log for constructing the relationshipamong structure, trajectory, and gamma ray, and the planned trajectory inclinations, con-stitute the prior information. To this we apply the evidence, in the form of the synthesizedmeasured trajectory inclinations and the LWD gamma ray, along with measurement errordistributions. I used normal distributions, with σ = 1 gAPI for log errors, and σ = 5% forinclination errors.

The resulting MAP configuration for trajectory, Y , and formation marker, Z, depthsare rendered in Figure 4a as the yellow and blue lines, respectively. Superimposed as tracesare their posterior marginals, rendered over their central 95% areas. To gauge the successof the algorithm, compare the blue line (posterior estimate of structure) to the black line(known, true structure), and the yellow line (posterior estimate of trajectory) to the greenline (known, true trajectory).

We may consider the posterior marginals as confidence indicators. The distances fromthe estimated trajectory and structure, to the actual ones, are within the confidence boundsindicated by the marginals. The estimated trajectory satisfactorily follows the actual wellpath. The estimated structure notably misses a fault near the 300 ft (91 m) horizontalposition, and a few other features do not track well. I attribute this error to the characterof the pilot log near the depth this lateral investigates, around 7370 ft (2246 m); it varieslittle with depth. An inverse mapping of log values to depth is ambiguous in this zone.

Noting that the log is less ambiguous near depth 7410 ft (2259 m), I ran another exper-iment, moving the trajectory deeper, so that the lateral portion investigates that portionof the geology; see Figure 4b. In this case, the algorithm correctly tracks the fault. Tosucceed, the algorithm requires a well log offering sufficient information that log values canguide the solution toward corresponding depths.

Sensitivity to Parameters

Figure 4 illustrates that the computation is sensitive to the character of the well log. Moregenerally, the distributions we choose for the priors influence the posteriors. How robustare the posteriors, under changes in prior estimates? We can characterize some scenarioswe might encounter in practice.

Prior estimates for the well path, dip, and faulting may dominate when there is largeprior uncertainty in the log values, as shown in Figure 5. In all cases I used linearlyincreasing, low-noise pilot and derived LWD logs, but, in the inversion, I vary their priordistributions. The low-variance prior (a) enables us to find an accurate MAP configurationfor formation depth and well path. A high-variance prior (b), in the same environment,allows the prior estimates — level dip and wellbore inclination — to dominate. Yet, usingthe same high-variance log prior in an environment with twice the fault throw (c), the

Page 14: Geosteering by Exact Inference on a Bayesian Network(Preprint: to appear in Geophysics) Geosteering by Exact Inference on a Bayesian Network Hugh Winkler ABSTRACT I formulate geosteering

Winkler 14 Geosteering using Bayesian Networks

–7450–7450

–7400–7400

–7350–7350

–7300–7300

–7250–7250

250250 500500 750750

–7450–7450

–7400–7400

–7350–7350

–7300–7300

–7250–7250

Lateral Distance (ft)Depth (ft)

b)

a)

Figure 4: (a) An example using a real well log, with a simulated earth cross-section. Thelateral portion of the trajectory investigates a zone near depth 7370 ft (2246 m) on the pilotlog. The MAP trajectory estimate (yellow line) tracks the actual trajectory (green line),but the MAP geologic structure estimate (blue line) misses a fault, and other features, onthe true structure (black line) significantly. Superimposed as curves over the trajectoryand structure estimates are their respective posterior marginals. (b) Moving the trajectoryso that the lateral investigates the zone on the pilot log near 7410 ft (2259 m) offers thealgorithm a pilot log having a less ambiguous mapping of log values to depth, enabling itto cross the fault near 300 ft (91 m) successfully.

Page 15: Geosteering by Exact Inference on a Bayesian Network(Preprint: to appear in Geophysics) Geosteering by Exact Inference on a Bayesian Network Hugh Winkler ABSTRACT I formulate geosteering

Winkler 15 Geosteering using Bayesian Networks

system is again able to detect the fault at about 1500 ft (457 m). With the larger fault, thesystem no longer can explain away the change in measured log at that location as causedby a few noisy log values. It has been forced to impute the change to the occurrence ofa relatively rare fault. Note in (b) that the formation depth MAP configuration divergesnoticeably from the peaks of the posterior marginals. The marginals may offer a morerobust estimate of the posterior values, as, unlike the MAP configuration, they represent asum of configurations, weighted by their probabilities.

Persistently incorrect prior assessments of dip will influence the MAP outcomes. Whilethe relative distance between the formation and the well path remains correct, Figure 6demonstrates that the MAP configuration will better reflect the faulting when the prior dipis biased in the opposite direction of the fault throw.

DISCUSSION

Although I solved here only for posterior trajectory and structure depth, it is a simpleextension to include other variables, such as the faults Fi or the dips Di, in the MAPvariables of Φi of Equation 4, and to marginalize for them in Equation 6.

Bayesian networks are a tool for solving physical inverse problems. Physical processesare causal, and Bayesian networks model causality naturally (Pearl, 2009). It is oftenstraightforward to construct Bayesian networks for them. Whether we can practically solvefor the posteriors we want depends on the network’s topology. We will only be able tomanipulate networks having a regular pattern allowing us to order the multiplications andmarginalizations so as to limit the compute resources required.

We may extend Bayesian network models easily as we increase our understanding of thesystem under investigation. In contrast to inversion techniques that minimize an error, weneed never define a distance metric, which can be awkward to do when the variables rangeover different physical dimensions. Joint inversion across domains comes naturally. Forexample, in the geosteering problem, if an interpreted seismic horizon informed our priorestimates of geologic structure, we could extend the model to incorporate migration velocityas a random variable that influences Z, and calculate its posterior marginal. When addi-tional well log types are available, we can extend the network to incorporate the influenceof Y and Z on them, as they influence L and M . Random variables need not be numeric;if we know how categorical information, such as cuttings or core classifications, influencesthe other variables in the system, we can model them.

Least-squared error minimization techniques suffer from the constraint that they pre-sume the uncertainties in the model and measurements to be Gaussian (Tarantola andValette, 1982). In the geosteering problem, as I formulated it above, the prior fault CPT,F , is strongly bimodal: it has a peak at zero, and a smaller peak at the expected throw.And although for convenience I employed Gaussian priors for many variables, in practice,we may gather some prior distributions empirically. As one example, the gamma ray asmeasured by the LWD might differ from that collected in the vertical part of the hole;a histogram of differences between the two collected over the same interval could yield abetter prior. The Bayesian network approach enables us to apply the best priors we have.

The way I chose to solve the Bayesian network — exact inference by variable elimination— gives unequivocal results. Yet, as we evolve the model, adding more complexity to

Page 16: Geosteering by Exact Inference on a Bayesian Network(Preprint: to appear in Geophysics) Geosteering by Exact Inference on a Bayesian Network Hugh Winkler ABSTRACT I formulate geosteering

Winkler 16 Geosteering using Bayesian Networks

Lateral Distance (ft)Depth

c)

b)

a)

500500 10001000 15001500 20002000 25002500

10 ft

σ=5 gAPI

σ=1 gAPI

formation

well path

Figure 5: Three idealized cases demonstrating the interplay of log noise and geologic struc-ture. At left are idealized well logs increasing linearly with depth; at right are earth cross-sections. For all cases, each variable uses the same prior distribution at every location; priordip and inclination slope estimates are zero with σ=1%, the log is linearly increasing at 1.0gAPI/ft (3.3 gAPI/m) with σ = 1 gAPI, and faults occur about once per thousand feet.The true formation depth and well path are solid black lines; the MAP configurations arelight gray; the individual posterior marginals are superimposed as traces. a) A low-variance(σ = 1 gAPI) log prior, for both the pilot log and LWD, in a geological environment inwhich expected fault throw is 10 ft (3.0 m), gives good estimates for well path and formationdepth. b) Increasing the prior log σ to 5 gAPI causes the MAP formation depth to miss thestructure. c) An environment with expected fault throw of 20 ft (6.1 m) causes the MAPformation depth to track the faults again.

Page 17: Geosteering by Exact Inference on a Bayesian Network(Preprint: to appear in Geophysics) Geosteering by Exact Inference on a Bayesian Network Hugh Winkler ABSTRACT I formulate geosteering

Winkler 17 Geosteering using Bayesian Networks

ft

Lateral Distance (ft)Depth

+2%

–2%+2%

–2%σ=5 gAPI

b)

500500 10001000 15001500 20002000 25002500

prior dip = +2%

–2%+2%

–2%σ=1 gAPI

a)

well path

formation

10 ft

Figure 6: Similar to Figure 5, but comparing the influence of a range of prior dip distribu-tions on MAP configuration. a) Estimated formation depth and well path under five dippriors, with σ ranging from −2 to 2%. b) As in (a) but using a high-variance prior for thelogs.

the network will strain the bounds of what is practical to compute by this technique.Here, I used variable elimination to maximize and to marginalize; there is more recentwork on solving these networks by conditioning (Darwiche, 2009, Chapter 8): partitioningthe CPTs so that we can trade time for computer memory. These techniques will enablesolving more complex models. Markov chain Monte Carlo (MCMC) methods, for exampleGibbs sampling (Jensen, 2002, pp. 191-2), are a practical alternative to the exact inferenceapproach. It may turn out that we have to adopt an MCMC technique to solve the morecomplex models I anticipate building. They require less computer memory. They do requirecare in choosing an initial configuration.

The probabilistic approach I used here, whether we use exact inference or MCMC meth-ods to solve the Bayesian network, gives the true posterior distribution of the variables wecare about. There may be other inverse problems in geoscience susceptible to better solu-tions using Bayesian networks and the probabilistic formalism.

REFERENCES

Darwiche, A., 2009, Modeling and reasoning with bayesian networks: Cambridge UniversityPress.

Dechter, R., 1999, Bucket elimination: A unifying framework for reasoning: Artificial In-telligence, 113, 41–85.

Eidsvik, J., and K. Hokstad, 2006, Positioning drill-bit and look-ahead events using seismictraveltime data: Geophysics, 71, F79–F90.

Griffiths, R., 2009, Well placement fundamentals: Schlumberger.

Page 18: Geosteering by Exact Inference on a Bayesian Network(Preprint: to appear in Geophysics) Geosteering by Exact Inference on a Bayesian Network Hugh Winkler ABSTRACT I formulate geosteering

Winkler 18 Geosteering using Bayesian Networks

Jamieson, A., 2012, Introduction to wellbore positioning, v01.05.14 ed.: University of theHighlands and Islands.

Jensen, F. V., 2002, Bayesian networks and decision graphs (information science and statis-tics): Springer.

Kullawan, K., R. Bratvold, J. E. Bickel, et al., 2014, A decision analytic approach togeosteering operations: SPE Drilling & Completion, 29, 36–46.

Martinelli, G., J. Eidsvik, R. Hauge, and M. D. Forland, 2011, Bayesian networks forprospect analysis in the north sea: AAPG bulletin, 95, 1423–1442.

Oughton, R., D. Wooff, R. Hobbs, S. O’Connor, and R. Swarbrick, 2015, Quantifyinguncertainty in pore pressure estimation using bayesian networks, with application to useof an offset well: Presented at the Petroleum Geostatistics 2015.

Pearl, J., 1985, Bayesian networks: A model of self-activated memory for evidential reason-ing: Technical Report CSD-850017, UCLA, Los Angeles, CA, 90024. (Proceedings of the7th Conference of the Cognitive Science Society, University of California, Irvine, CA).

——–, 2009, Causality: Models, reasoning and inference: Cambridge University Press.Tarantola, A., and B. Valette, 1982, Inverse problems= quest for information: J. geophys,50, 150–170.

Williamson, H. S., et al., 1999, Accuracy prediction for directional mwd: Presented at theSPE Annual Technical Conference and Exhibition, Society of Petroleum Engineers.

APPENDIX A

UNIFORM SUM DISTRIBUTION

Some CPTs represent the probability distribution of the sum of two or three discrete vari-ables. If the variables are discretized by steps of 1, the uniform sum distribution gives theprobability distribution of their sum. For the sum of two discrete variables,

P (x) =

0, x < 0

x, 0 ≤ x < 1

2− x, 1 ≤ x < 2

0, x ≥ 2

(A-1)

For the sum of three discrete variables,

P (x) =

0, x < 012x

2, 0 ≤ x < 1

−x2 + 3x− 32 , 1 ≤ x < 2

12(x− 3)2, 2 ≤ x ≤ 3

0, x ≥ 3

(A-2)

Page 19: Geosteering by Exact Inference on a Bayesian Network(Preprint: to appear in Geophysics) Geosteering by Exact Inference on a Bayesian Network Hugh Winkler ABSTRACT I formulate geosteering

Winkler 19 Geosteering using Bayesian Networks

APPENDIX B

FACTOR ARITHMETIC

A factor Φ(X) is a table, or function, mapping an instantiation x = {x1, . . . , xN} of itsvariables X = {X1, . . . , XN} to a non-negative scalar Φ(x). The instantiation and its scalarform a row of the table. We employ three operations on factors.

Multiplication To multiply two factors, Φ1(X) and Φ2(Y), forming a new factor Φ3(Z =X ∪ Y): for each configuration z of Z, select compatible pairs of rows from thefactors, and for each pair, form a new row whose instantiation z is the union of theinstantiations of the two rows x and y, and whose scalar is their product:

Φ3(z) = Φ1(x)Φ2(y), (x ∼ y).

The compatibility operator, ∼, selects the row from each CPT, all of whose statesequal the states of the corresponding variable in the output configuration z.

Marginalization To marginalize, or sum out, a variable X from a factor Φ(X,Y), forminga new factor Φ(Y): collect all the rows having a common partial instantiation, y; addtogether their scalars, and form a new row whose instantiation is y, and whose scalaris their sum:

Φ(y) =∑x

Φ(x,y).

Repeat for all y.

Maximization To maximize a variable X from a factor Φ(X,Y), forming a new factorΦ(Y): collect all the rows having a common partial instantiation, y; find the largestscalar, and form a new row whose instantiation is y, and whose scalar is their maxi-mum:

Φ(y) = maxx

Φ(x,y).

With that row, also record the states of the elided variables (the variables at whichthe maximum occurred). Repeat for all y.

These three operations are commutative. Darwiche (2009, Chapter 6) describes algorithmsfor implementing these operations.

APPENDIX C

CONDITIONAL PROBABILITY TABLES

As a concrete example, Tables 1 through 8 present conditional probability tables (CPTs) foran ensemble of variables associated to one lateral position, position i. The lateral distanceback to the previous survey, at position i− 1, is 100 ft (30 m). The simplest of these CPTs,that is, the ones for variables A, F , and D, having no conditions, fit on a page, and I presentthem in their entirety. The remaining CPTs are large and I present a few representativerows and columns. For completeness, I present in Table 9 a snippet of gamma ray log usedin construction of the CPT for M .

Page 20: Geosteering by Exact Inference on a Bayesian Network(Preprint: to appear in Geophysics) Geosteering by Exact Inference on a Bayesian Network Hugh Winkler ABSTRACT I formulate geosteering

Winkler 20 Geosteering using Bayesian Networks

Ai=-3 % 0.01

-2 0.06

-1 0.24

0 0.38

1 0.24

2 0.06

3 0.01

Table 1: A fragment of an example CPT for Ai, the true inclination in percent, at lateral po-sition i. It represents our prior information about the true inclination, which is the plannedtrajectory at this position. For simplicity we model it here as a Gaussian distribution ofstandard deviation 1, centered at the intended inclination.

Ai (%) -1 0 1

Bi= -4 % 0.01

-3 0.06 0.01

-2 0.24 0.06 0.01

-1 0.38 0.24 0.06

0 0.24 0.38 0.24

1 0.06 0.24 0.38

2 0.01 0.06 0.24

3 0.01 0.06

4 0.01

Table 2: A fragment of an example CPT for Bi, the measured inclination in percent,at lateral position i. It depends on Ai, the true inclination. The uncertainty is due toinstrument noise; for simplicity we model it here as a Gaussian distribution of standarddeviation 1, centered at the true inclination.

Page 21: Geosteering by Exact Inference on a Bayesian Network(Preprint: to appear in Geophysics) Geosteering by Exact Inference on a Bayesian Network Hugh Winkler ABSTRACT I formulate geosteering

Winkler 21 Geosteering using Bayesian Networks

Di = -6 ft 0.002

-5 0.009

-4 0.028

-3 0.066

-2 0.121

-1 0.175

0 0.197

1 0.175

2 0.121

3 0.066

4 0.028

5 0.009

6 0.002

Table 3: A fragment of an example CPT for Di, the dip in percent, at lateral position i,applied over a 100 ft interval. It represents our prior information about the dip, based onour regional knowledge of the geology at this position. For simplicity we model it here as aGaussian distribution of standard deviation 2, centered about a most likely dip of zero.

Page 22: Geosteering by Exact Inference on a Bayesian Network(Preprint: to appear in Geophysics) Geosteering by Exact Inference on a Bayesian Network Hugh Winkler ABSTRACT I formulate geosteering

Winkler 22 Geosteering using Bayesian Networks

Fi= -4 (ft) 0.001

-3 0.001

-2 0.002

-1 0.003

0 0.600

1 0.006

2 0.009

3 0.012

4 0.016

5 0.020

6 0.023

7 0.027

8 0.030

9 0.032

10 0.032

11 0.032

12 0.030

13 0.027

14 0.023

15 0.020

16 0.016

17 0.012

18 0.009

19 0.006

20 0.004

21 0.003

22 0.002

23 0.001

24 0.001

Table 4: An example prior CPT for Fi, the probable fault throw over a 100 ft (30 m)lateral interval, at lateral position i. F is an independent variable. Here we model the faultprobability as the weighted mixture of a δ function and a Gaussian distribution, centeredat 10 ft (3 m), with a standard deviation of 5 ft (1.5 m). To achieve four faults per 1000 ft,observed over the 100 ft interval, we assign a weight of 60% to the δ function and 40% tothe Gaussian component.

Page 23: Geosteering by Exact Inference on a Bayesian Network(Preprint: to appear in Geophysics) Geosteering by Exact Inference on a Bayesian Network Hugh Winkler ABSTRACT I formulate geosteering

Winkler 23 Geosteering using Bayesian Networks

Mi (gAPI) 63 64 65

Li= 60 gAPI 0.01

61 0.06 0.01

62 0.24 0.06 0.01

63 0.38 0.24 0.06

64 0.24 0.38 0.24

65 0.06 0.24 0.38

66 0.01 0.06 0.24

67 0.01 0.06

68 0.01

Table 5: A fragment of an example CPT for Li, the measured log value at lateral positioni. It depends on Mi, the earth’s true background gamma ray value. The uncertainty is dueto instrument noise; for simplicity we model it here as a Gaussian distribution of standarddeviation 1, centered at the true background gamma ray.

Page 24: Geosteering by Exact Inference on a Bayesian Network(Preprint: to appear in Geophysics) Geosteering by Exact Inference on a Bayesian Network Hugh Winkler ABSTRACT I formulate geosteering

Winkler 24 Geosteering using Bayesian Networks

Yi(

ft)

1199

1200

1201

Zi(

ft)

997

998

999

1000

1001

1002

1003

997

998

999

1000

1001

1002

1003

997

998

999

1000

1001

1002

1003

∆Zi(

ft)

-3-2

-10

12

3-3

-2-1

01

23

-3-2

-10

12

3

Mi

=50

gA

PI

0.01

51

0.06

0.0

1

52

0.24

0.01

0.0

6

53

0.38

0.06

0.2

4

54

0.0

10.

240.

240.3

8

55

0.0

60.

010.

060.

380.

010.2

4

56

0.2

40.

010.

060.

010.

010.

240.

060.

010.0

6

57

0.3

80.

060.

010.

240.

060.

010.

060.

240.

010.

060.0

1

58

0.2

40.

240.0

10.

060.

380.

240.

010.

060.

010.

380.

060.

010.

24

59

0.0

60.

380.0

60.

01

0.24

0.24

0.38

0.06

0.01

0.24

0.24

0.24

0.01

0.06

0.38

60

0.0

10.

240.2

40.

06

0.38

0.06

0.24

0.24

0.01

0.06

0.38

0.06

0.38

0.06

0.01

0.24

0.24

61

0.06

0.3

80.

24

0.24

0.01

0.06

0.38

0.06

0.01

0.24

0.24

0.01

0.24

0.24

0.06

0.38

0.06

62

0.01

0.2

40.

38

0.06

0.01

0.24

0.24

0.06

0.38

0.06

0.06

0.38

0.24

0.24

0.01

63

0.0

60.

24

0.01

0.06

0.38

0.24

0.24

0.01

0.01

0.24

0.38

0.06

64

0.0

10.

06

0.01

0.24

0.38

0.06

0.06

0.24

0.01

65

0.01

0.06

0.24

0.01

0.01

0.06

66

0.01

0.06

0.01

67

0.01

Tab

le6:

Afr

agm

ent

ofa

CP

Tfo

ra

hyp

oth

etic

alM

i,th

etr

ue

bac

kgr

oun

dga

mm

ara

yva

lue

atla

tera

lp

osit

ioni.

We

show

only

asm

all

ran

gefo

rea

chva

riab

le.

Each

colu

mn

isth

eco

nd

itio

nal

pro

bab

ilit

yd

istr

ibu

tion

ofM

i,gi

ven

the

stat

esof

the

two

vari

able

sY

and

Zat

the

curr

ent

late

ral

pos

itio

n.

We

hav

ed

ecla

red

aG

auss

ian

dis

trib

uti

onfo

rth

elo

gm

easu

rem

ent

un

cert

ainty

,w

ith

ast

and

ard

dev

iati

onof

1gA

PI.

Th

eco

lum

nh

ead

er∆Zi

isn

ota

sep

arat

eco

nd

itio

nal

vari

able

;it

ind

icat

esth

ed

iffer

ence

bet

wee

nth

eco

nd

itio

nal

vari

ableZi

an

dan

arb

itra

ryfo

rmati

on

mark

erre

fere

nce

dep

thof

1000

m.M

id

epen

ds

onw

her

eth

ew

ellb

ore

inte

rcep

tsa

vert

ical

lysh

ifte

dvir

tual

vert

ical

wel

llo

g(T

ab

le9)

atth

isla

tera

lp

osit

ion

;th

atis

,it

dep

end

son

the

wel

lp

ath

TV

DYi

and

the

form

atio

nm

arke

rT

VDZi.

Th

ose

two

con

dit

ion

sd

eter

min

ea

rela

tive

dep

thon

the

pil

otlo

g,w

hic

hin

turn

det

erm

ines

aga

mm

ara

yva

lue

atth

atd

epth

.

Page 25: Geosteering by Exact Inference on a Bayesian Network(Preprint: to appear in Geophysics) Geosteering by Exact Inference on a Bayesian Network Hugh Winkler ABSTRACT I formulate geosteering

Winkler 25 Geosteering using Bayesian Networks

Yi−1 (ft) 1199 1199 1199 1200 1200 1200 1201 1201 1201

Ai (%) -1 0 1 -1 0 1 -1 0 1

Yi= 1197 m 0.125

1198 0.75 0.125 0.125

1199 0.125 0.75 0.125 0.75 0.125 0.125

1200 0.125 0.75 0.125 0.75 0.125 0.75 0.125

1201 0.125 0.125 0.75 0.125 0.75 0.125

1202 0.125 0.125 0.75

1203 0.125

Table 7: A fragment of a CPT for Yi, the well path TVD at lateral position i, where thedistance between lateral positions is 100 ft (30 m). We show only a small range for eachvariable. Each column is the conditional probability distribution of Yi, given the states ofthe two variables A and Y at the previous lateral position. Because Yi is the sum of Yi−1,and 100Ai−1, the uncertainty is due to discretization error, which is given by the uniformsum distribution. See Appendix A.

Page 26: Geosteering by Exact Inference on a Bayesian Network(Preprint: to appear in Geophysics) Geosteering by Exact Inference on a Bayesian Network Hugh Winkler ABSTRACT I formulate geosteering

Winkler 26 Geosteering using Bayesian Networks

Fi−

1(f

t)0

1

Zi−

1(f

t)99

910

0010

0199

910

0010

01

Di−

1(%

)-1

01

-10

1-1

01

-10

1-1

01

-10

1

Zi

=119

6ft

1197

0.16

7

1198

0.66

70.1

670.

167

0.16

7

1199

0.16

70.6

670.1

67

0.66

70.1

670.

167

0.66

70.

167

0.16

7

1200

0.1

670.6

67

0.16

70.6

670.1

670.

667

0.1

670.

167

0.66

70.1

670.

667

0.16

70.

167

1201

0.1

67

0.1

670.6

670.

167

0.6

670.1

670.

167

0.6

670.

167

0.66

70.1

670.

667

0.16

7

1202

0.1

670.1

670.6

670.1

670.

167

0.6

670.

167

0.66

70.1

67

1203

0.1

670.1

670.

167

0.6

67

1204

0.1

67

1205

Tab

le8:

Afr

agm

ent

of

aC

PT

forZi,

the

geol

ogic

feat

ure

TV

Dat

late

ral

pos

itio

ni,

wh

ere

the

dis

tan

ceb

etw

een

late

ral

pos

itio

ns

is10

0ft

.W

esh

owon

lya

smal

lra

nge

for

each

vari

able

.E

ach

colu

mn

isth

eco

nd

itio

nal

pro

bab

ilit

yd

istr

ibu

tion

ofZi,

give

nth

est

ates

ofth

eth

ree

vari

ab

les

F,

Z,

an

dD

atth

ep

revio

us

late

ral

pos

itio

n.

Bec

auseZi

isth

esu

mofFi−

1,Zi−

1,

and

100D

i−1,

the

un

cert

ainty

isd

ue

tod

iscr

etiz

atio

ner

ror,

wh

ich

isgiv

enby

the

un

ifor

msu

md

istr

ibu

tion

.S

eeA

pp

end

ixA

.

Page 27: Geosteering by Exact Inference on a Bayesian Network(Preprint: to appear in Geophysics) Geosteering by Exact Inference on a Bayesian Network Hugh Winkler ABSTRACT I formulate geosteering

Winkler 27 Geosteering using Bayesian Networks

Depth (ft) GR (gAPI)

1196 50

1197 55

1198 60

1199 62

1200 64

1201 63

1202 61

1203 59

1204 54

1205 49

Table 9: A hypothetical pilot gamma ray log, used as example data in constructing theCPT for M in Table 6.