THE BAYESIAN FRAMEWORK AND ADJOINT METHOD
2.1 Bayesian framework
In this section, a brief introduction to the Bayesian framework for inverse problems will be given. A thorough description can be found in Tarantola (1987).
Suppose that the reservoir under study can be modelled as a random field in which the reservoir parameters, such as porosity and permeability, are all random variables.
The probability of occurrence of any particular configuration of flow properties can then be characterized using a probability density function (hereafter PDF) pM(m).
In our application, the random field is usually assumed to be Gaussian. Under this
assumption, the PDF of the reservoir model can be written as,
where m is the vector of model parameters, a is a constant, mprior is the best estimate for parameters based on prior information about the field, and CM is the model variable covariance matrix. The prior information contains general knowledge about the reservoir, such as expected porosity and permeability. The matrix CM is usually constructed through geostatistical tools. Its diagonal entries are variances of all model parameters.
Observed data gathered during exploration and production, such as production data from wells and seismic data from seismic surveys, can be written as,
dobs = dtrue+ , (2.2)
where is measurement noise. The addition of the noise term accounts for the fact that the recorded observations are corrupted by noise due to limitations of measure-ment tools. If the measuremeasure-ment noise is also assumed to be Gaussian with mean equal to zero, then the PDF of the observation noise can be written as Eq. 2.3,
p() = b exp
where b is a constant and CD is the measurement noise covariance matrix, which defines correlations among noise contained in observed data, diagonal for production data but non-diagonal for seismic data. The diagonal entries of CD are variances of the measurement noise. On the other hand, if the true model mtrue is given to a reservoir simulator, then some “true” observations can be computed, dtrue= g(mtrue).
Since the measurement noise is random, the observations given the true model mtrue are also random and can be described using the conditional PDF written in Eq. 2.4,
p(dobs | mtrue) = b exp
where g(mtrue) represents the forward simulation run.
According to the Bayes’ Theorem, the conditional PDF of the model parameters m given observations, dobs, can be written as,
p(m | dobs) = p(dobs | m)pM(m)
p(dobs) = p(dobs | m)pM(m)
R p(dobs | u)pM(u)du, (2.5) where p(dobs) is the PDF of the observation. Inserting Eq. 2.1 and Eq. 2.4 into Eq. 2.5, the conditional PDF can be written as Eq. 2.6,
p(m | dobs) =c exp
where c is a normalizing constant. The PDF in Eq. 2.6 is called the posterior PDF.
For our automatic history matching problem, we want to generate an estimate of m that has the maximum probability, i.e., the maximum a posteriori (MAP) estimate.
Obviously, such an estimate can be obtained by minimizing the arguments of the exponential term in Eq. 2.6, which gives the objective function,
O(m) = 1
2(m − mprior)T CM−1(m − mprior) + 1
2(g(m) − dobs)T CD−1(g(m) − dobs)
= Om(m) + Od(m) ,
(2.7) where Om(m) is the model mismatch term and Od(m) is the data mismatch term.
There are some important features of this objective function. First, it conditions to the observed data as well as the prior information. If only data mismatch term is used, for example, constraints from the prior are lost. Secondly, the model mismatch term provides normalization for the Hessian matrix. Its effect is two-fold, 1) it prevents the Hessian matrix from being numerically singular; 2) it damps extremely high or low values resulting from over-adjustments in data mismatch term. Third, both data and model parameters are well balanced by their variances contained in CM and CD. Also, the correlations among model parameters can be retained through non-diagonal part of CM.
From the perspective of reservoir management, values of permeability and poros-ity at some specific places of the reservoir model are not very meaningful, especially considering that the results of automatic history matching problem are non-unique.
The more important problem is to characterize uncertainties of future reservoir per-formance. To do that using Monte Carlo methods requires generation of a number of history-matched models. One general work flow to obtain a set of estimations that all honor both the prior and the observed data is:
• Develop a mathematical model of the posterior PDF of the reservoir model, for example, the one shown in Eq. 2.5 and Eq. 2.6.
• Sample the PDF to obtain a series of realizations;
• Feed the realizations into a reservoir simulator to predict their performance, such as oil production rates, water cuts at wells, etc.;
• Calculate statistical parameters summarizing the performance predictions, such as histogram, P10, P90, etc.;
• Provide uncertainty analysis based on statistical parameters.
To implement this work flow, the key factor is to find an efficient algorithm to sample the posterior PDF. In this work, the Randomized Maximum Likelihood (RML) method is used for sampling (Oliver, 1996; Kitanidis, 1995). This method includes the following 4 steps,
Step 1 Generate an unconditional realization of model variables, muc, and an unconditional realization of noise in the observed data, re-sulting in duc;
Step 2 Minimize the objection function in Eq. 2.8 to generate one con-ditional realization,
O(m) = 1
2(m − muc)T CM−1(m − muc)+1
2(g(m) − duc)T CD−1(g(m) − duc) , (2.8)
where, compared with Eq. 2.7, mprior and dobs are replaced with muc and duc;
Step 3 If the number of conditional realizations meets requirement, go to Step 4; otherwise, go to Step 1;
Step 4 Run reservoir simulator using the conditional realizations and conduct uncertainty analysis.
The unconditional realizations of model parameters and data can be generated a few different ways. One way to generate realizations from a Gaussian PDF with mean mprior and model covariance CM is
muc = mprior+ LZ , (2.9)
where Z is a random vector sampled from N (0, 1) and L is lower triangular part of the Cholesky decomposition of the model covariance matrix CM, which is
LLT = CM. (2.10)
Similarly, unconditional realization of data is,
duc= dobs+ LDZ , (2.11)
where Z is also a random vector sampled from N (0, 1) and LD is
LDLTD = CD. (2.12)
One major drawback of this method is that when model size becomes large, the Cholesky decomposition of the model covariance matrix is not computationally feasi-ble. Oliver (1995) gave a very efficient moving average method to generate uncondi-tional realizations for large scale models. Sequential Gaussian Simulation (SGS) (Deutsch and Journel, 1992) and Sequential Gaussian Co-Simulation (SGCS) are other two fre-quently used algorithms. The SGS can be used to generate realizations for one param-eter, for example, permeability, while the SGCS is often used to generate realizations for multiple parameters, which have correlations with each other.