+ All Categories
Home > Documents > Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for...

Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for...

Date post: 30-Mar-2018
Category:
Upload: dinhque
View: 216 times
Download: 1 times
Share this document with a friend
27
The following notes are complements for the book Inverse Problem Theory and Methods for Model Parameter Estimation Albert Tarantola Society of Industrial and Applied Mathematics (SIAM), 2004
Transcript
Page 1: Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for Model Parameter Estimation ... Discuss the generalization of the problem to the case

The following notes are complements for the book

Inverse Problem Theory and Methods for Model Parameter Estimation

Albert Tarantola

Society of Industrial and Applied Mathematics (SIAM), 2004

Page 2: Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for Model Parameter Estimation ... Discuss the generalization of the problem to the case

Chapter 7

Problems

7.1 Estimation of the Epicentral Coordinates of a Seis-mic Event

A seismic source was activated at time T = 0 in an unknown location at the surface of theEarth. The seismic waves produced by the explosion have been recorded at a network of sixseismic stations whose coordinates in a rectangular system are

(x1, y1) = (3 km , 15 km) ; (x2, y2) = (3 km , 16 km)

(x3, y3) = (4 km , 15 km) ; (x4, y4) = (4 km , 16 km)

(x5, y5) = (5 km , 15 km) ; (x6, y6) = (5 km , 16 km) .

(7.1)

The observed arrival times of the seismic waves at these stations are

t1obs = 3.12 s±σ ; t2

obs = 3.26 s±σt3obs = 2.98 s±σ ; t4

obs = 3.12 s±σt5obs = 2.84 s±σ ; t6

obs = 2.98 s±σ ,

(7.2)

where σ = 0.10 s , the symbol ±σ being a short notation indicating that experimentaluncertainties are independent and can be modeled using a Gaussian probability density witha standard deviation equal to σ .

Estimate the epicentral coordinates (X, Y) of the explosion, assuming a velocity of v =5 km/s for the seismic waves. Use the approximation of a flat Earth’s surface, and considerthat the coordinates in equation 7.1 are Cartesian.

Discuss the generalization of the problem to the case where the time of the explosion, thelocations of the seismic observatories, or the velocity of the seismic waves is not perfectlyknown, and to the case of a realistic Earth.

Solution:The model parameters are the coordinates of the epicenter of the explosion:

m = (X, Y) , (7.3)

273

Page 3: Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for Model Parameter Estimation ... Discuss the generalization of the problem to the case

274 CHAPTER 7. PROBLEMS

and the data parameters are the arrival times at the seismic network:

d = (t1, t2, t3, t4, t5, t6) , (7.4)

while the coordinates of the seismic stations and the velocity of seismic waves areassumed perfectly known (i.e., known with uncertainties which are negligible withrespect to the uncertainties in the observed arrival times).

For a given (X, Y) , the arrival times of the seismic wave at the seismic stationscan be computed using the (exact) equation

ti = gi(X, Y) =1v

√(xi − X)2 + (yi −Y)2 ; (i = 1, . . . , 6) , (7.5)

which solves the forward problem, d = g(m) .As we are not given any a priori information on the epicentral coordinates, we

take an uniform a priori probability density, i.e., because we are using Cartesiancoordinates,

ρM(X, Y) = const , (7.6)

this assigning equal a priori probabilities to equal volumes.As data uncertainties are Gaussian and independent, the probability density rep-

resenting the information we have on the true values of the arrival times is

ρD(t1, t2, t3, t4, t5, t6) = const. exp(− 1

2

6

∑i=1

(ti − tiobs)

2

σ2

). (7.7)

With the three pieces of information in equations 7.5–7.7, we can directly passto the resolution of the inverse problem. The posterior probability density in themodel space, combining the three pieces of information is (equation 1.93) σM(m) =kρM(m)ρD( g(m) ) , i.e., particularizing the notations to the present problem,

σM(X, Y) = kρM(X, Y)ρD( g(X, Y) ) , (7.8)

where k is a normalization constant. Explicitly, using equations 7.5–7.7,

σM(X, Y) = k′ exp

(− 1

2σ2

6

∑i=1

(tical(X, Y)− ti

obs)2

), (7.9)

where k′ is a new normalization constant, and where

tical(X, Y) =

1v

√(xi − X)2 + (yi −Y)2 . (7.10)

The probability density σM(X, Y) describes all the a posteriori information wehave on the epicentral coordinates. As we only have two parameters, the sim-plest (and more general) way of studying this information is to plot the values of

Page 4: Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for Model Parameter Estimation ... Discuss the generalization of the problem to the case

7.1. ESTIMATION OF THE EPICENTRAL COORDINATES OF A SEISMIC EVENT275

Figure 7.1: Probability density for the epicentral co-ordinates of the seismic event, obtained using as datathe arrival times of the seismic wave at six seismic sta-tions (points in the top of the figure). The gray scaleis linear, between zero and the maximum value of theprobability density. The crescent-shape of the regionof significant probability density cannot be describedusing a few numbers (mean values, variances, covari-ances. . . ) as commonly done.

0 5 10 15 200

5

10

15

σM(X, Y) directly in the region of the plane where it takes significant values. Fig-ure 7.1 shows the result obtained in this way.

We see that the zone of non-vanishing probability density is crescent-shaped.This can be interpreted as follows. The arrival times of the seismic wave at the seis-mic network (top left of the figure) is of the order of 3 s , and as we know that theexplosion took place at time T = 0 , and the velocity of the seismic wave is 5 km/s ,this gives the reliable information that the explosion took place at a distance of ap-proximately 15 km from the seismic network. But as the observational uncertainties(±0.1 s) in the arrival times are of the order of the travel times of the seismic wavebetween the stations, the azimuth of the epicenter is not well resolved. As the dis-tance is well determined but not the azimuth, it is natural to obtain a probabilitydensity with a crescent shape.

From the values shown in figure 7.1 it is possible to obtain any estimator of theepicentral coordinates one may wish, such as, for instance, the median, the mean, orthe maximum likelihood values. But the general solution of the inverse problem isthe probability density itself. Notice in particular that a computation of the covari-ance between X and Y will miss the circular aspect of the ‘correlation’.

If the time of the explosion was not known, or the coordinates of the seismicstations were not perfectly known, or if the velocity of the seismic waves was onlyknown approximately, the model vector would contain all these parameters:

m = (X, Y, T, x1, y1, . . . , x6, y6, v) . (7.11)

After properly introducing the a priori information on T (if any), on (xi, yi) , andon v , the posterior probability density σM(X, Y, T, x1, y1, . . . , x6, y6, v) should bedefined as before, from where the marginal probability density on the epicentralcoordinates (X, Y) could be obtained as

σX,Y(X, Y) =∫ ∞−∞dT

∫ ∞−∞dx1 · · ·

∫ ∞−∞dy6

∫ ∞0

dvσM(X, Y, T, x1, y1, . . . , x6, y6, v) ,

(7.12)

Page 5: Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for Model Parameter Estimation ... Discuss the generalization of the problem to the case

276 CHAPTER 7. PROBLEMS

and the posterior probability density on the time T of the explosion as

σT(T) =∫ ∞−∞dX

∫ ∞−∞dY

∫ ∞−∞dx1 · · ·

∫ ∞−∞dy6

∫ ∞0

dvσM(X, Y, T, x1, y1, . . . , x6, y6, v) .

(7.13)As computations rapidly become heavy, it may be necessary to make some sim-

plifying assumptions. The most drastic one is to neglect uncertainties on (xi, yi) andv , artificially increasing the nominal uncertainties in the observed arrival times, toapproximately compensate for the simplification.

A realistic Earth is three-dimensional and heterogeneous. It is generally simplerto use spherical coordinates (r,θ,ϕ) . Then the homogeneous probability density isno longer constant (see example 1.6).

Also, for a realistic three-dimensional Earth, errors made in computing the traveltimes of seismic may not be negligible compared to uncertainties in the observationof arrival times at the seismic stations. Instead of using equation 1.93 of the maintext as a starting point, we may use equation 1.89 instead

σM(m) = kρM(m)∫

DddρD(d)θ(d | m)

µD(d), (7.14)

where θ(d | m) , the conditional probability density for the arrival time given themodel parameters, allows to describe uncertainties in the computation of arrivaltimes. A a simple (simplistic?) example one could take

θ(d | r,θ,ϕ, T) = exp(− 1

2 ( d− g(r,θ,ϕ, T) )t C-1T ( d− g(r,θ,ϕ, T) )

), (7.15)

where CT is an ad-hoc covariance matrix approximately describing the errors madein estimating arrival times theoretically. For more details, the reader may refer toTarantola and Valette (1982a).

7.2 Measuring the Acceleration of Gravity

An ‘absolute gravimeter’ uses the free-fall of a mass in vacuo to measure the value of theacceleration g due to gravity. A mass sent upwards with some initial velocity v0 , and thepositions z1, z2 . . . of the mass are (very precisely) measured at different instants t1, t2 . . .In vacuo (orienting the z axis upwards),

z(t) = v0 t− 12 g t2 . (7.16)

The measured values of the zi and of the ti can be used to infer the values of v0 andof g . The measurements made during a free-fall experiment have provided the values (see

Page 6: Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for Model Parameter Estimation ... Discuss the generalization of the problem to the case

Estimation of an epicenter: direct plot of

the volumetric probability.

The probability density in the model space that represents our a priori information (none!)

rhoM@X_, Y_D := 1

The resolution of the forward problem ( d = g (m) ) .

x1 = 3; x2 = 3; x3 = 4; x4 = 4; x5 = 5; x6 = 5;

y1 = 15; y2 = 16; y3 = 15; y4 = 16; y5 = 15; y6 = 16;

v = 5;

t1cal@X_, Y_D :=

"############################################HX - x1L2 + HY - y1L2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

v;

t2cal@X_, Y_D :=

"############################################HX - x2L2 + HY - y2L2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

v;

t3cal@X_, Y_D :=

"############################################HX - x3L2 + HY - y3L2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

v;

t4cal@X_, Y_D :=

"############################################HX - x4L2 + HY - y4L2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

v;

t5cal@X_, Y_D :=

è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!HX - x5L2 + HY - y5L2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

v;

t6cal@X_, Y_D :=

"############################################HX - x6L2 + HY - y6L2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

v;

The probability density in the data space that represents the result of our measurements

t1obs = 3.12;

t2obs = 3.26;

t3obs = 2.98;

t4obs = 3.12;

t5obs = 2.84;

t6obs = 2.98;

s = 0.1;

Epicenter.nb 1

rhoD@t1_, t2_, t3_, t4_, t5_, t6_D :=

ExpA-1ÅÅÅÅ2

Ht1 - t1obsL2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

s2E ExpA-

1ÅÅÅÅ2

Ht2 - t2obsL2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

s2E ExpA-

1ÅÅÅÅ2

Ht3 - t3obsL2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

s2E

ExpA-1ÅÅÅÅ2

Ht4 - t4obsL2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

s2E ExpA-

1ÅÅÅÅ2

Ht5 - t5obsL2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

s2E ExpA-

1ÅÅÅÅ2

Ht6 - t6obsL2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

s2E

The expression of the posterior probability density (in the model space).

sigmaM@X_, Y_D := rhoM@X, YD

rhoD@t1cal@X, YD, t2cal@X, YD, t3cal@X, YD, t4cal@X, YD, t5cal@X, YD, t6cal@X, YDD

ContourPlot@-sigmaM@X, YD, 8X, 0, 20<,8Y, 0, 20<, PlotRange Ø All, PlotPoints Ø 100, Contours Ø 5D

0 5 10 15 20

0

5

10

15

20

Warning: the numerical integration of this kind of functions is not easy. It is unlikely that a mathematical software (like

Mathematica) will easily normalize this function and will easily calculate probabilities of domains.

What happens if we introduce a big error in one datum, but we keep assuming Gaussian distributions for the data uncertainties?

t1obs = 3.12;

t2obs = 3.26;

t3obs = 5;

t4obs = 3.12;

t5obs = 2.84;

t6obs = 2.98;

s = 0.1;

rhoD@t1_, t2_, t3_, t4_, t5_, t6_D :=

ExpA-1ÅÅÅÅ2

Ht1 - t1obsL2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

s2E ExpA-

1ÅÅÅÅ2

Ht2 - t2obsL2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

s2E ExpA-

1ÅÅÅÅ2

Ht3 - t3obsL2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

s2E

ExpA-1ÅÅÅÅ2

Ht4 - t4obsL2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

s2E ExpA-

1ÅÅÅÅ2

Ht5 - t5obsL2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

s2E ExpA-

1ÅÅÅÅ2

Ht6 - t6obsL2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

s2E

Epicenter.nb 2

Page 7: Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for Model Parameter Estimation ... Discuss the generalization of the problem to the case

sigmaM@X_, Y_D := rhoM@X, YD

rhoD@t1cal@X, YD, t2cal@X, YD, t3cal@X, YD, t4cal@X, YD, t5cal@X, YD, t6cal@X, YDD

ContourPlot@-sigmaM@X, YD, 8X, 0, 35<,8Y, 0, 35<, PlotRange Ø All, PlotPoints Ø 100, Contours Ø 5D

0 5 10 15 20 25 30 35

0

5

10

15

20

25

30

35

Note that the scale of the plot has been changed, as the probability distribution has been shifted.

What happens if we introduce a big error in one datum, but we use the Laplacian distribution instead of the Gaussian distribution?

t1obs = 3.12;

t2obs = 3.26;

t3obs = 5;

t4obs = 3.12;

t5obs = 2.84;

t6obs = 2.98;

s = 0.1;

rhoD@t1_, t2_, t3_, t4_, t5_, t6_D :=

ExpA-Abs@t1 - t1obsDÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

sE ExpA-

Abs@t2 - t2obsDÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

sE ExpA-

Abs@t3 - t3obsDÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

sE

ExpA-Abs@t4 - t4obsDÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

sE ExpA-

Abs@t5 - t5obsDÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

sE ExpA-

Abs@t6 - t6obsDÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

sE

sigmaM@X_, Y_D := rhoM@X, YD

rhoD@t1cal@X, YD, t2cal@X, YD, t3cal@X, YD, t4cal@X, YD, t5cal@X, YD, t6cal@X, YDD

Epicenter.nb 3

ContourPlot@-sigmaM@X, YD, 8X, 0, 20<,8Y, 0, 20<, PlotRange Ø All, PlotPoints Ø 100, Contours Ø 5D

0 5 10 15 20

0

5

10

15

20

Note that the probability density is very similar to that obtained with good data.

What happens if we use the a priori information that the epicenter belongs to a fault that is located along the line X =1 (plus or minus 1)?

X0 = 10;

sx = 1;

rhoM@X_, Y_D := ExpA-1ÅÅÅÅ2

HX - X0L2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

sx2E

t1obs = 3.12;

t2obs = 3.26;

t3obs = 2.98;

t4obs = 3.12;

t5obs = 2.84;

t6obs = 2.98;

s = 0.1;

rhoD@t1_, t2_, t3_, t4_, t5_, t6_D :=

ExpA-1ÅÅÅÅ2

Ht1 - t1obsL2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

s2E ExpA-

1ÅÅÅÅ2

Ht2 - t2obsL2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

s2E ExpA-

1ÅÅÅÅ2

Ht3 - t3obsL2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

s2E

ExpA-1ÅÅÅÅ2

Ht4 - t4obsL2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

s2E ExpA-

1ÅÅÅÅ2

Ht5 - t5obsL2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

s2E ExpA-

1ÅÅÅÅ2

Ht6 - t6obsL2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

s2E

sigmaM@X_, Y_D := rhoM@X, YD

rhoD@t1cal@X, YD, t2cal@X, YD, t3cal@X, YD, t4cal@X, YD, t5cal@X, YD, t6cal@X, YDD

Epicenter.nb 4

Page 8: Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for Model Parameter Estimation ... Discuss the generalization of the problem to the case

ContourPlot@-sigmaM@X, YD, 8X, 0, 20<,8Y, 0, 20<, PlotRange Ø All, PlotPoints Ø 100, Contours Ø 5D

0 5 10 15 20

0

5

10

15

20

ContourPlot@-sigmaM@X, YD, 8X, 8, 13<,8Y, 0, 5<, PlotRange Ø All, PlotPoints Ø 100, Contours Ø 5D

8 9 10 11 12 13

0

1

2

3

4

5

Epicenter.nb 5

Page 9: Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for Model Parameter Estimation ... Discuss the generalization of the problem to the case

2.4. MONTE CARLO SOLUTION TO INVERSE PROBLEMS 57

2.4 Monte Carlo Solution to Inverse Problems

As mentioned at the beginning of section 2.2 the a posteriori probability density inthe model manifold is expressed as

σM(m) = kρM(m) L(m) , (2.11)

where the probability density ρM(m) represents the a priori information on themodel parameters, and the likelihood function L(m) is a measure of the goodnessof the model m in fitting the data. Two possible expressions for L(m) are given inequations 2.2 and 2.3.

2.4.1 Sampling the Prior Probability Distribution

The ‘movie’ strategy proposed above requires that we start by generating samplesof the prior probability density ρM(m) . In typical inverse problems, the probabilitydensity ρM(m) is quite simple (the contrary happens with the posterior probabilitydensity σM(m) ). Therefore, the sampling of ρM(m) can be often done using simplemethods. We have seen two examples of this (example 1.32 in page 32 and exam-ple 2.1 in page 49). The sampling of the prior probability density usually involvesa sequential use of one-dimensional sampling methods, like those described above.Sometimes, a Gibbs sampler of even a Metropolis algorithm may be needed, butthose are usually simple to develop.

So let us assume that we are able to obtain samples of the prior probability densityρM(m) , and let us move to the difficult problem, that of obtaining samples of theposterior probability density σM(m) .

2.4.2 Sampling the Posterior Probability Distribution

The adaptation of the Metropolis algorithm (presented in section 2.3.5) to the prob-lem of sampling the posterior probability density (equation 2.11)

σM(m) = kρM(m) L(m) , (2.12)

is immediate. As just discussed, assume that we are able to obtain as many samplesof the prior probability density ρM(m) as we may wish. At a given step, the randomwalker is at point mi , and the application of the rules would lead to a transition topoint m j . Sometimes we reject this proposed transition by using the following rule:

• if L(m j) ≥ L(mi) , then accept the proposed transition to m j ,

• if L(m j) < L(mi) , then decide randomly to move to m j , or to stay at mi ,with the following probability of accepting the move to m j :

Pi→ j =L(m j)L(mi)

. (2.13)

Page 10: Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for Model Parameter Estimation ... Discuss the generalization of the problem to the case

58 CHAPTER 2. MONTE CARLO METHODS

Then, the random walker samples the a posteriori probability density σM(m) .

2.4.3 Designing the Random Walk

The goal is to obtain samples of the posterior probability density σM(m) that areindependent. One easy way to obtain independency of the posterior samples wouldbe to present to the Metropolis algorithm independent samples of the priori proba-bility density ρM(m) . Excepted for problems where the model manifold has a verysmall number of dimension, this will not work, because of the emptiness or large-dimensional spaces (mentioned in section 2.1). Therefore, the sampling of the priorprobability distribution has to be done jumping from point to point making ‘small’jumps. This kind of sampling is called a random walk, is a sort of Brownian motionthat is far from producing independent samples. Then, if the samples of the priordistribution presented to the Metropolis algorithm are not independent, the sam-ples of the posterior distribution produced by the Metropolis algorithm will not beindependent samples.

There is only one solution to this problem: instead of taking all the samples pro-duced by the Metropolis algorithm, after taking one sample, await until a sufficientnumbers of moves have been made, so that the algorithm has ‘forgotten’ that sam-ple. How many moves have we to wait, after one sample, in order to have someconfidence that the next sample we are going to consider is independent from theprevious one? No general rule can be given, as this will strongly depend on theparticular problem at hand.

The second important question is the following: only a small fraction of the in-finitely many random walks that would sample the prior distribution will allow theMetropolis algorithm to have a reasonable efficiency.

The basic rule is the following: among the many possible random walks than cansample the prior probability density ρM(m) select one that, when jumping from onesample of the prior to the next, the perturbation of the likelihood function L(m) isas small as possible (in order to increase the acceptance rate of the Metropolis rule).To be more precise, the type of the perturbations in the model space has to be suchthat large perturbations (in the model space) only produce small perturbations ofthe predicted data. When the type of perturbations in the model space satisfies thisrequirement, it remains to decide the size of the perturbations to be made. There isa compromise between our wish to move rapidly in the model space and the needthat the Metropolis algorithm has to find some of the proposed moves acceptable.So the size of the perturbations in the model space has to be such that the acceptancerate of the Metropolis criterion is, say, 30–50%. If the acceptance rate is larger, weare not moving fast enough in the model space; it it is much smaller, we are wastingmuch computer resources to test models that are not accepted. In this way, we strikea balance between extensive exploration of the model space (large steps but manyrejects) and careful sampling of located probability maxima (small steps, few rejects,

Page 11: Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for Model Parameter Estimation ... Discuss the generalization of the problem to the case

2.5. SIMULATED ANNEALING 59

but slow walk).These remarks show that considerable ingenuity is required in designing the

random walk that is to sample ρM(m) . For instance, in a problem involving amodel of mass density distribution, the data consisting in values of the gravity field,Mosegaard and Tarantola (1995) chose to make large perturbations of the mass den-sity distribution but keeping the total mass approximately constant.

The last point to be examined concerns the decision to stop the random walk,when the posterior probability density σM(m) , has been ‘sufficiently sampled’. Thereare two subproblems here, an easy one and a difficult one. The easy problem is thatto decide, when exploring a given maximum of the probability density, that thismaximum has conveniently been sampled. The literature contains some good rulesof thumb for that12. The difficult problem, of course, is about the possibility that wemay be completely missing some region of significant probability of σM(m) , an iso-lated maximum, for instance. This problem in inherent in all Monte Carlo methods,and is very acute in highly nonlinear inverse problems13. Unfortunately, nothingcan be said hare that would be applicable to any large class of inverse problems:each problem has its own ‘physics’, and the experience of the ‘implementer’ is, here,crucial. This issue must be discussed every time an inverse problem is solved usingMonte Carlo methods.

A final comment about the ‘cost’ of using the Metropolis algorithm for solvinginverse problems. Each step of the algorithm requires the evaluation of L(m) . Thisrequires the resolution of a forward problem (in the case where the likelihood func-tion is given by expression 2.3) of the evaluation of an integral (in the case wherethe likelihood function is given by expression 2.2). This may be very demanding incomputational resources.

2.5 Simulated Annealing

The simulated annealing technique is designed for obtaining the maximum likeli-hood point of any probability density, in particular, for the posterior probabilitydensity σM(m) . But at the core of the simulated annealing there is a Metropolisalgorithm, that is able to sample σM(m) . My point of view is that if we are able tosample the probability density σM(m) , we should not be interested in the maximumlikelihood point. As any ‘central estimator’ (like the mean or the median) the maxi-mum likelihood point is of very little interest when dealing with complex probabilitydistributions.

The simulated annealing thechique is described here for completeness of the the-ory, not because it is an important element of it.

12For instance, see Geweke (1992) or Raftery and Lewis (1992).13In the case where one has a relation d = g(m) this means that the function g( · ) is highly

nonlinear.

Page 12: Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for Model Parameter Estimation ... Discuss the generalization of the problem to the case

Again the estimation of an Epicenter, this

time using Monte Carlo methods.

A priori information

We use the a priori information that the epicenter belongs to a fault that is located along the line X =1 , plus or minus 1

(Gaussian distribution). The coordinate Y is assumed to strictly be between the point Ymin = 0 km and the point Ymax =

20 km (box-car distribution).

rhoM@X_, Y_D := ExpA-1ÅÅÅÅ2

HX - X0L2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

sx2E UnitStep@Y - YminD UnitStep@Ymax - YD

X0 = 10;

sx = 1;

Ymin = 0;

Ymax = 20;

Let us plot the prior volumetric probability:

DensityPlot@-rhoM@X, YD, 8X, 0, 20<, 8Y, 0, 20<,PlotRange Ø All, PlotPoints Ø 100, Mesh Ø FalseD

0 5 10 15 20

0

5

10

15

20

The resolution of the forward problem ( d = g (m) ) .

x1 = 3; x2 = 3; x3 = 4; x4 = 4; x5 = 5; x6 = 5;

y1 = 15; y2 = 16; y3 = 15; y4 = 16; y5 = 15; y6 = 16;

v = 5;

EpicenterMonteCarlo.nb 1

t1cal@X_, Y_D :=

"############################################HX - x1L2 + HY - y1L2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

v;

t2cal@X_, Y_D :=

"############################################HX - x2L2 + HY - y2L2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

v;

t3cal@X_, Y_D :=

"############################################HX - x3L2 + HY - y3L2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

v;

t4cal@X_, Y_D :=

"############################################HX - x4L2 + HY - y4L2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

v;

t5cal@X_, Y_D :=

è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!HX - x5L2 + HY - y5L2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

v;

t6cal@X_, Y_D :=

"############################################HX - x6L2 + HY - y6L2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

v;

Volumetric probability in the data space.

The probability density in the data space that represents the result of our measurements. To show the flexibility of the

Monte Carlo method (that the least-squares method shall not have), let us not take the Gaussian model for the all the

uncertainties, but mix the Laplacian model for data 1-4, and the Gaussian model for data 5-6.

rhoD@t1_, t2_, t3_, t4_, t5_, t6_D :=

ExpA-Abs@t1 - t1obsDÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

sE ExpA-

Abs@t2 - t2obsDÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

sE ExpA-

Abs@t3 - t3obsDÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

sE

ExpA-Abs@t4 - t4obsDÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

sE ExpA-

1ÅÅÅÅ2

Ht5 - t5obsL2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

s2E ExpA-

1ÅÅÅÅ2

Ht6 - t6obsL2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

s2E

In fact, as we are going to make many evaluations of rhoD, it is better to simplify the expression as

rhoD@t1_, t2_, t3_, t4_, t5_, t6_D :=

ExpA-ikjjjjAbs@t1 - t1obsDÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

s+Abs@t2 - t2obsDÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

s+Abs@t3 - t3obsDÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

s+

Abs@t4 - t4obsDÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

s+1ÅÅÅÅ2

Ht5 - t5obsL2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

s2+1ÅÅÅÅ2

Ht6 - t6obsL2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

s2

y{zzzzE

t1obs = 3.12;

t2obs = 3.26;

t3obs = 2.98;

t4obs = 3.12;

t5obs = 2.84;

t6obs = 2.98;

s = 0.1;

Posterior probability density (in the model space).

Likelihood function:

EpicenterMonteCarlo.nb 2

Page 13: Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for Model Parameter Estimation ... Discuss the generalization of the problem to the case

L@X_, Y_D :=

rhoD@t1cal@X, YD, t2cal@X, YD, t3cal@X, YD, t4cal@X, YD, t5cal@X, YD, t6cal@X, YDD

Posterior volumetric probability:

sigmaM@X_, Y_D := rhoM@X, YD L@X, YD

ContourPlot@-sigmaM@X, YD, 8X, 0, 20<,8Y, 0, 20<, PlotRange Ø All, PlotPoints Ø 100, Contours Ø 5D

0 5 10 15 20

0

5

10

15

20

Let us zoom and use a density plot (for better comparison with the Monte Carlo method):

DensityPlot@-sigmaM@X, YD, 8X, 8, 13<,8Y, 0, 5<, PlotRange Ø All, PlotPoints Ø 100, Mesh Ø FalseD

8 9 10 11 12 13

0

1

2

3

4

5

EpicenterMonteCarlo.nb 3

Sampling the prior distribution (ad-hoc method).

To sample the prior, we use an ad-hoc method. Note that InverseErf[Random[Real,{-1,1}]] produces a random variable,

with Gaussian distribution (zero mean, unit variance).

MetroPoints = 8<;SeedRandom@123DDo@8x = X0 + sx InverseErf@Random@Real, 8-1, 1<DD,y = Random@Real, 80, 20<D,AppendTo@MetroPoints, Point@8x, y<DD<, 81000<D

Show@Graphics@MetroPoints, Frame Ø TrueD,AspectRatio Ø Automatic, PlotRange Ø 88-0.4, 20.4<, 8-0.4, 20.4<<D

0 5 10 15 20

0

5

10

15

20

Sampling the posterior distribution (rejection method).

We shall first use the most stupid MonteCarlo method to sample the posterior distribution: the rejection method. By

construction, the likelihood function L takes values between 0 and 1. Therefore, we set the value

Lmax = 1;

MetroPoints = 8<;SeedRandom@123D

Do@8x = X0 + sx InverseErf@Random@Real, 8-1, 1<DD,y = Random@Real, 80, 20<D,likelihood = L@x, yD,proba = likelihood êLmax,alea = Random@Real, 80, 1<D,If@proba > alea, AppendTo@MetroPoints, Point@8x, y<DDD<, 8100000<D

EpicenterMonteCarlo.nb 4

Page 14: Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for Model Parameter Estimation ... Discuss the generalization of the problem to the case

Show@Graphics@MetroPoints, Frame Ø TrueD,AspectRatio Ø Automatic, PlotRange Ø 880, 20<, 80, 20<<D

2.5 5 7.5 10 12.5 15 17.5 20

2.5

5

7.5

10

12.5

15

17.5

20

Let us zoom:

Show@Graphics@MetroPoints, Frame Ø TrueD,AspectRatio Ø Automatic, PlotRange Ø 887.8, 13.2<, 8-0.2, 5.2<<D

8 9 10 11 12 13

0

1

2

3

4

5

Sampling the prior distribution but, this time, using the Metropolis algorithm.

MetroPoints = 8<;SeedRandom@123D

The step length has been chosen so we approximately have 50% chances of acceptance.

EpicenterMonteCarlo.nb 5

step = 1.5;

xcurrent = 0.;

ycurrent = 0.;

rhocurrent = rhoM@xcurrent, ycurrentD1.92875µ10

-22

Do@8xtest = xcurrent + Random@Real, 8-step, +step<D,ytest = ycurrent + Random@Real, 8-step, +step<D,rhotest = rhoM@xtest, ytestD,If@rhotest ¥ rhocurrent,

8xcurrent = xtest,

ycurrent = ytest,

rhocurrent = rhoM@xcurrent, ycurrentD,AppendTo@MetroPoints, Point@8xcurrent, ycurrent<DD

<,8proba = rhotestê rhocurrent,alea = Random@Real, 80, 1<D,If@alea § proba,

8xcurrent = xtest,

ycurrent = ytest,

rhocurrent = rhoM@xcurrent, ycurrentD,AppendTo@MetroPoints, Point@8xcurrent, ycurrent<DD

<D<D

<, 8100<D

Show@Graphics@MetroPoints, Frame Ø TrueD,AspectRatio Ø Automatic, PlotRange Ø 88-0.4, 20.4<, 8-0.4, 20.4<<D

0 5 10 15 20

0

5

10

15

20

This looks good. Observe the transitory regime.

Let us add 2000 iterations:

EpicenterMonteCarlo.nb 6

Page 15: Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for Model Parameter Estimation ... Discuss the generalization of the problem to the case

Do@8xtest = xcurrent + Random@Real, 8-step, +step<D,ytest = ycurrent + Random@Real, 8-step, +step<D,rhotest = rhoM@xtest, ytestD,If@rhotest ¥ rhocurrent,

8xcurrent = xtest,

ycurrent = ytest,

rhocurrent = rhoM@xcurrent, ycurrentD,AppendTo@MetroPoints, Point@8xcurrent, ycurrent<DD

<,8proba = rhotestê rhocurrent,alea = Random@Real, 80, 1<D,If@alea § proba,

8xcurrent = xtest,

ycurrent = ytest,

rhocurrent = rhoM@xcurrent, ycurrentD,AppendTo@MetroPoints, Point@8xcurrent, ycurrent<DD

<D<D

<, 82000<D

Show@Graphics@MetroPoints, Frame Ø TrueD,AspectRatio Ø Automatic, PlotRange Ø 88-0.4, 20.4<, 8-0.4, 20.4<<D

0 5 10 15 20

0

5

10

15

20

Sampling the posterior distribution (Metropolis algorithm).

MetroPoints = 8<;SeedRandom@123D

The step length has been chosen so we approximately have 50% chances of acceptance.

step = 1.5;

EpicenterMonteCarlo.nb 7

xcurrent = 0.;

ycurrent = 0.;

sigmacurrent = sigmaM@xcurrent, ycurrentD2.60763µ10-29

Do@8xtest = xcurrent + Random@Real, 8-step, +step<D,ytest = ycurrent + Random@Real, 8-step, +step<D,sigmatest = sigmaM@xtest, ytestD,If@sigmatest ¥ sigmacurrent,

8xcurrent = xtest,

ycurrent = ytest,

sigmacurrent = sigmaM@xcurrent, ycurrentD,AppendTo@MetroPoints, Point@8xcurrent, ycurrent<DD

<,8proba = sigmatestê sigmacurrent,alea = Random@Real, 80, 1<D,If@alea § proba,

8xcurrent = xtest,

ycurrent = ytest,

sigmacurrent = sigmaM@xcurrent, ycurrentD,AppendTo@MetroPoints, Point@8xcurrent, ycurrent<DD

<D<D

<, 82000<D

Show@Graphics@MetroPoints, Frame Ø TrueD,AspectRatio Ø Automatic, PlotRange Ø 88-0.4, 20.4<, 8-0.4, 20.4<<D

0 5 10 15 20

0

5

10

15

20

Let us zoom:

EpicenterMonteCarlo.nb 8

Page 16: Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for Model Parameter Estimation ... Discuss the generalization of the problem to the case

Show@Graphics@MetroPoints, Frame Ø TrueD,AspectRatio Ø Automatic, PlotRange Ø 887.8, 13.2<, 8-0.2, 5.2<<D

8 9 10 11 12 13

0

1

2

3

4

5

Cascading the likelihood into the prior.

ü The prior only.

MetroPoints = 8<;SeedRandom@123D

step = 1.5;

xcurrent = 0.;

ycurrent = 0.;

rhocurrent = rhoM@xcurrent, ycurrentDAppendTo@MetroPoints, Point@8xcurrent, ycurrent<DD;1.92875µ10-22

Here, I write the same Metropolis algorithm as above, but I structure the commands, in order to prepare for the more

complex, cascaded algorithm (see below).

append := AppendTo@MetroPoints, Point@8xcurrent, ycurrent<DD

perturbation := 8xtest = xcurrent + Random@Real, 8-step, +step<D,ytest = ycurrent + Random@Real, 8-step, +step<D

<

maker := 8xcurrent = xtest,

ycurrent = ytest,

rhocurrent = rhoM@xcurrent, ycurrentD,append

<

EpicenterMonteCarlo.nb 9

testr := 8proba = rhotestê rhocurrent,alea = Random@Real, 80, 1<D,If@alea § proba, 8maker<D

<

loopr := 8rhotest = rhoM@xtest, ytestD,If@rhotest ¥ rhocurrent, 8maker<, 8testr<D

<

Do@8perturbation, loopr<, 81000<D

Show@Graphics@MetroPoints, Frame Ø TrueD,AspectRatio Ø Automatic, PlotRange Ø 88-0.4, 20.4<, 8-0.4, 20.4<<D

0 5 10 15 20

0

5

10

15

20

ü The cascade

MetroPoints = 8<;SeedRandom@123D

xcurrent = 0.;

ycurrent = 0.;

rhocurrent = rhoM@xcurrent, ycurrentDLcurrent = L@xcurrent, ycurrentDAppendTo@MetroPoints, Point@8xcurrent, ycurrent<DD;1.92875µ10-22

1.35198µ10-7

append := AppendTo@MetroPoints, Point@8xcurrent, ycurrent<DD

perturbation := 8xtest = xcurrent + Random@Real, 8-step, +step<D,ytest = ycurrent + Random@Real, 8-step, +step<D

<

EpicenterMonteCarlo.nb 10

Page 17: Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for Model Parameter Estimation ... Discuss the generalization of the problem to the case

loopr := 8rhotest = rhoM@xtest, ytestD,If@rhotest ¥ rhocurrent, 8maker<, 8testr<D

<

testr := 8proba = rhotestê rhocurrent,alea = Random@Real, 80, 1<D,If@alea § proba, 8maker<D

<

maker := 8xcurrent = xtest,

ycurrent = ytest,

rhocurrent = rhoM@xcurrent, ycurrentD,loopL

<

loopL := 8Ltest = L@xtest, ytestD,If@Ltest ¥ Lcurrent, 8makeL<, 8testL<D

<

testL := 8proba = Ltest ê Lcurrent,alea = Random@Real, 80, 1<D,If@alea § proba, 8makeL<D

<

makeL := 8xcurrent = xtest,

ycurrent = ytest,

Lcurrent = L@xcurrent, ycurrentD,append

<

Do@8perturbation, loopr<, 810000<D

Show@Graphics@MetroPoints, Frame Ø TrueD,AspectRatio Ø Automatic, PlotRange Ø 88-0.4, 20.4<, 8-0.4, 20.4<<D

0 5 10 15 20

0

5

10

15

20

EpicenterMonteCarlo.nb 11

Let us zoom:

Show@Graphics@MetroPoints, Frame Ø TrueD,AspectRatio Ø Automatic, PlotRange Ø 887.8, 13.2<, 8-0.2, 5.2<<D

8 9 10 11 12 13

0

1

2

3

4

5

We did it!

EpicenterMonteCarlo.nb 12

Page 18: Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for Model Parameter Estimation ... Discuss the generalization of the problem to the case

3.2. THE LEAST-SQUARES PROBLEM 75

So far we have only been interested in the posterior probability density for modelparameters. It is easy to see that the posterior probability density in the data space,as defined in equation 1.85, is here a Gaussian,

σD(d) = const. exp(

- 12 (d− d̃)t C̃ -1

D (d− d̃))

, (3.43)

withd̃ = G m̃ and C̃D = G C̃M Gt . (3.44)

Quite often, the least-squares solution is justified using a statistical point of view.In this case, d and m are viewed as random variables with known covariance op-erators CD and CM , and unknown means dtrue and mtrue . Then, dobs and mpriorare interpreted as two particular realizations of the random variables d and m , andthe problem is to obtain an estimator of mtrue , which is, in some sense, optimum.The Gauss-Markoff theorem (see, for instance, Plackett, 1949, or Rao, 1973) showsthat, for linear problems, the least-squares estimator has minimum variance among allthe estimators which are linear functions of dobs and mprior , irrespectively of the par-ticular form of the probability density functions of the random variables d and m . Thisis not as good as it may seem: minimum variance may be a bad criterion when theprobability densities are far from Gaussian, as, for instance, when a small number oflarge, uncontrolled errors are present in a data set (see problem 7.7). As the generalapproach developed in chapter 1 justifies the least-squares criterion only when alluncertainties (modelisation uncertainties, observational uncertainties, uncertaintiesin the a priori model) are Gaussian, I urge the reader to limit the use of the techniquesdescribed in this chapter to the cases where this assumption is not too strongly vio-lated.

3.2.3 Nonlinear Problems

If the equation d = g(m) solving the forward problem is actually nonlinear, thereis no simplification in equations 3.31–3.32 giving the posterior probability density inthe model space:

σM(m) = const. exp(− S(m) ) (3.45)

with

2 S(m) = ‖ g(m)− dobs ‖2D + ‖ m−mprior ‖2

M

= (g(m)− dobs)t C -1D (g(m)− dobs) + (m−mprior)t C -1

M (m−mprior) .(3.46)

If g(m) is not a linear function of m , σM(m) is not Gaussian. The more nonlinearg(m) is, the more remote is σM(m) from a Gaussian function.

Page 19: Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for Model Parameter Estimation ... Discuss the generalization of the problem to the case

76 CHAPTER 3. THE LEAST-SQUARES CRITERION

The weakest case of nonlinearity arises when the function g(m) can be linearizedaround mprior (third of the sketches in figure 3.2):

g(m) ' g(mprior) + G (m−mprior) , (3.47)

where

Giα =

(∂gi

∂mα

)mprior

. (3.48)

The symbol ' in equation 3.47 means precisely that second-order terms can be ne-glected compared to observational and modelisation uncertainties (i.e., comparedwith standard deviations and correlations in CD ). Replacing 3.47 in equations 3.45–3.46, one sees that the a posteriori probability density is then approximately Gaus-sian, the center being given by

m̃ ' mprior +(Gt C -1

D G + C -1M)-1 Gt C -1

D(dobs − g(mprior)

)= mprior + CM Gt (G CM Gt + CD

)-1 (dobs − g(mprior))

,(3.49)

and the a posteriori covariance operator by

C̃M '(Gt C -1

D G + C -1M)-1 = CM − CM Gt (G CM Gt + CD

)-1 G CM . (3.50)

These are basically equations 3.37–3.38, so we see that solving a linearizable problemis in fact equivalent to solving a linear problem.

In the fourth of the sketches of figure 3.2 the case is suggested where the lin-earization 3.47 is no longer acceptable, but the function g(m) is still quasi-linearinside the region of the M × D space of significant posterior probability density.The right strategy for these problems is to use some iterative algorithm to obtain themaximum likelihood point of σM(m) , say mML , and then to use a linearization ofg(m) around mML to estimate the a posteriori covariance operator. As the homo-geneous probability density is here constant, the maximum likelihood point mML isjust the point that maximizes σM(m) (see discussion in section 1.6.4). As the pointmaximizing σM(m) is the point minimizing the sum of squares in equation 3.46, weface here the typical problem of ‘nonlinear least-squares’ minimization.

Using, for instance, a quasi-Newton method (see section 3.4 and appendix 6.22for details on optimization techniques), the iterative algorithm

mn+1 = mn −µn(Gt

n C -1D Gn + C -1

M)-1 (Gt

n C -1D(dn − dobs

)+ C -1

M (mn −mprior))

,(3.51)

where dn = g(mn) , (Gn)iα = (∂gi/∂mα)mn and µn . 1 (see footnote9), when

initialized at an arbitrary point m0 converges to a local optimal point. If there is one9As explained in sections 3.4.1 and 3.4.2, gradient-based methods need a parameter defining the

length of the ‘jump’ to be performed at each step. It it is taken too small, the algorithm converges tooslowly; if it is taken too large, the algorithm may diverge. In most situations, for the quasi-Newtonalgorithm, one may just take µn = 1 . In appendix 6.22 some suggestions are made for choosingadequate values for this parameter.

Page 20: Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for Model Parameter Estimation ... Discuss the generalization of the problem to the case

3.2. THE LEAST-SQUARES PROBLEM 77

one global optimum, then the algorithm converges to it. If not, the algorithm mustbe initiated at a point m0 close enough to the global optimum. In many practicalapplications the simple choice

m0 = mprior (3.52)

is convenient. The number of iterations required for a quasi-Newton algorithm toprovide a sufficiently good approximation of the maximum likelihood point are typ-ically between one and one dozen. Once the maximum likelihood point mML hasbeen conveniently approached, the a posteriori covariance operator can be estimatedas

C̃M '(Gt C -1

D G + C -1M)-1 = CM − CM Gt (G CM Gt + CD

)-1G CM ,(3.53)

where, this time, G are the partial derivatives taken at the convergence point, (Gn)iα =

(∂gi/∂mα)mML . The main computational difference between this ‘nonlinear’ solutionand the linearized solution mentioned above is that here, g(m) , the predicted datafor the current model, has to be computed at each iteration without using any lin-ear approximation. In usual problems it is more difficult to compute g(m) thang(m0) + G(m −m0) : nonlinear problems are in general more expensive to solvethan linearizable problems.

Nonlinearities may be stronger and stronger. Many inverse problems correspondto the case illustrated in the fifth sketch of figure 3.2: there may be some local maximaof the posterior probability density σM(m) . If the number of local optima is small,all of them can be visited, using the iterative algorithm just mentioned, and aroundeach local optimum, the (local) covariance matrix is to be estimated as above.

If the number of local optimal point is very large, then it is better to directlymake use of the Monte Carlo methods developed in chapter 2 (as, in that case, noadvantage is taken of the Gaussian hypothesis, we do better to drop it and use amore realistic uncertainty modelisation).

Finally, there are problems (suggested in the last sketch of figure 3.2) where non-linearities are so strong, that some of the assumption make here break, (see the com-ments made in section 1.2.8 about the definition of conditional probability density,and the notion of ‘vertical’ uncertainty bar in the theoretical relation d = g(m) ,represented in figure 1.4). In these circumstances, more general methods, directlybased on the notion of ‘conjunction of states of information’ (see section 1.5.1) arenecessary.

The quasi-Newton iterative algorithm of equation 3.51 is not the only possible.For instance, in section 3.4 we arrive at the ‘steepest descent algorithm’ (equation 3.89)

mn+1 = mn −µn(

CM Gtn C -1

D (dn − dobs) + (mn −mprior) ) , (3.54)

where, again, µn is an ad-hoc parameter defining the size of the jump to be per-formed. Contrary to quasi-Newton, this algorithm does not require the resolution

Page 21: Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for Model Parameter Estimation ... Discuss the generalization of the problem to the case

78 CHAPTER 3. THE LEAST-SQUARES CRITERION

of a linear system at each iteration10, but, of course, it requires more iterations toconverge. The philosophy behind the steepest descent and the Newton algorithmsis explained in section 3.4 (where the ‘variable metric methods’ are mentioned).

Concerning equation 3.54, one may note that the operator CM Gtn C -1

D is, in fact,the adjoint of Gn as defined in section 3.1.4,

G∗n = CM Gtn C -1

D , (3.55)

so the algorithm can be written mn+1 = mn−µn(

G∗n (dn− dobs) + (mn−mprior) ) .

3.3 Estimating Posterior Uncertainties

3.3.1 Posterior Covariance Operator

We have seen that if the relation m 7→ g(m) is nonlinear enough, the probabilitydensity σM(m) , as given by equations 3.31–3.32, may be far from a Gaussian. It hasalready been mentioned that if the probability is multimodal, but has a small numberof maxima, they can all be searched, and a covariance matrix adjusted around eachoptimum point. If the number of maxima is large, the more general Monte Carlotechniques of chapter 2 must be used.

Let us assume here that σM(m) is reasonably close to a Gaussian. In that case,we have seen that this ‘posterior’ covariance matrix can be approximated by any ofthe two expressions (equation 3.53)

C̃M '(Gt C -1

D G + C -1M)-1 = CM − CM Gt (G CM Gt + CD

)-1G CM , (3.56)

where G is the matrix of partial derivatives taken at the convergence point, (Gn)iα =

(∂gi/∂mα)mML .The most trivial use of the posterior covariance operator C̃M is to interpret the

square roots of the diagonal elements (variances) as ‘uncertainty bars’ on the poste-rior values of the model parameters.

A direct examination of the off-diagonal elements (covariances) of a covarianceoperator is not easy, and it is much better to introduce the correlations

ραβ =Cαβ√

Cαα√

Cββ(no sums involved) , (3.57)

which have the well known property

−1 ≤ ραβ ≤ +1 . (3.58)

10 It is well known in numerical analysis that, given the vector y and the matrix A the computationof x = A -1 y is not to be done by actually computing the inverse of the matrix A , but by rewriting theequation as A x = y , and using any of the many efficient methods existing to solve a linear system.)

Page 22: Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for Model Parameter Estimation ... Discuss the generalization of the problem to the case

The epicenter problem again, but this

time using least-squares.

The resolution of the forward problem ( d = g (m) ) .

t =

è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!HX - xL2 + HY - yL2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

v;

t1cal = t ê. 8x Ø x1, y Ø y1<;t2cal = t ê. 8x Ø x2, y Ø y2<;t3cal = t ê. 8x Ø x3, y Ø y3<;t4cal = t ê. 8x Ø x4, y Ø y4<;t5cal = t ê. 8x Ø x5, y Ø y5<;t6cal = t ê. 8x Ø x6, y Ø y6<;tcal = 8t1cal, t2cal, t3cal, t4cal, t5cal, t6cal<;MatrixForm@tcalDi

k

jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj

è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!HX-x1L2 +HY-y1L2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅv

è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!HX-x2L2 +HY-y2L2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

v

è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!HX-x3L2 +HY-y3L2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

v

è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!HX-x4L2 +HY-y4L2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

v

è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!HX-x5L2 +HY-y5L2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

v

è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!HX-x6L2 +HY-y6L2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅv

y

{

zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz

The vector of observed values and the covariance matrix describing experimental uncertainties .

tobs = 8t1obs, t2obs, t3obs, t4obs, t5obs, t6obs<;CD = s2 IdentityMatrix@6D;MatrixForm@CDDi

k

jjjjjjjjjjjjjjjjjjjjjjjjj

s2 0 0 0 0 0

0 s2 0 0 0 0

0 0 s2 0 0 0

0 0 0 s2 0 0

0 0 0 0 s2 0

0 0 0 0 0 s2

y

{

zzzzzzzzzzzzzzzzzzzzzzzzz

ICD = Inverse@CDD;

EpicenterGradient.nb 1

The misfit function (no a priori information yet) .

Warning: for some strange reason, the developers of Mathematica use the same symbol (a dot) to designate a product of

two matrices and the (elementary) scalar product of two vectors. The expression below should be written S2=-

Transpose[(tcal-tobs)].Inverse[CD].(tcal-tobs) , but Mathematica would misunderstand the expression.

S =1ÅÅÅÅ2

Htcal - [email protected] - tobsL

1ÅÅÅÅ2

i

kjjjjjjjI-t1obs +

è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!HX-x1L2 +HY-y1L2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

vM2

ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅs2

+I-t2obs +

è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!HX-x2L2 +HY-y2L2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

vM2

ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅs2

+I-t3obs +

è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!HX-x3L2 +HY-y3L2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

vM2

ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅs2

+

I-t4obs +è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!HX-x4L2+HY-y4L2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

vM2

ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅs2

+I-t5obs +

è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!HX-x5L2 +HY-y5L2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

vM2

ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅs2

+I-t6obs +

è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!HX-x6L2 +HY-y6L2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

vM2

ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅs2

y

{zzzzzzz

The data .

x1 = 3; x2 = 3; x3 = 4; x4 = 4; x5 = 5; x6 = 5;

y1 = 15; y2 = 16; y3 = 15; y4 = 16; y5 = 15; y6 = 16;

v = 5;

t1obs = 3.12;

t2obs = 3.26;

t3obs = 2.98;

t4obs = 3.12;

t5obs = 2.84;

t6obs = 2.98;

s = 0.1;

Now, S has only two variables, Y and Y :

Simplify@SD

5882.14 - 96. X + 12. X2 - 59.6"#################################################H-5 + XL2

+ H-16 + YL2 - 62.4"#################################################H-4 + XL2

+ H-16 + YL2-

65.2"#################################################H-3 + XL2 + H-16 + YL2 - 56.8

"#################################################H-5 + XL2 + H-15 + YL2 -

59.6"#################################################H-4 + XL2 + H-15 + YL2 - 62.4

"#################################################H-3 + XL2 + H-15 + YL2 - 372. Y + 12. Y2

Exp[-S] should be identical to the probability density we ploted when using the probabilistic formulation. Let us check

this by plotting Exp[-S]. In fact, I plot -Exp[-S] because I do not like the plotting conventions of Mathematica.

EpicenterGradient.nb 2

Page 23: Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for Model Parameter Estimation ... Discuss the generalization of the problem to the case

ContourPlot@-Exp@-SD, 8X, 0, 20<, 8Y, 0, 20<,PlotRange Ø All, PlotPoints Ø 100, Contours Ø 5D

0 5 10 15 20

0

5

10

15

20

This is the same graphics. Fine!

The a priori model and the covariance matrix describing uncertainties in the a priori model .

m = 8X, Y<;mprior = 8Xprior, Yprior<;CM =

ikjjj sx

2 0

0 sy2y{zzz;

ICM = Inverse@CMD;

The a priori information was that X = 10 (+/-1), and no a priori information on Y. I insert an arbitrary value for Yprior,

with very large a priori uncertainties.

Xprior = 10.

sx = 1.

Yprior = p2 - 10 + Sin@[email protected] = 100.

10.

1.

0.774614

100.

EpicenterGradient.nb 3

The complete misfit function (with a priori information) .

Warning: for some strange reason, the developers of Mathematica use the same symbol (a dot) to designate a product of

two matrices and the (elementary) scalar product of two vectors. The expression below should be written S2=-

Transpose[(tcal-tobs)].Inverse[CD].(tcal-tobs) , but Mathematica would misunderstand the expression.

S =1ÅÅÅÅ2

H Htcal - [email protected] - tobsL + Hm - [email protected] - mpriorL L;

Let us have a look at the expression. The function Chop[] is used here to tell Mathematica to drop terms that are zero

multiplied by something (this is stupid, I kow).

Chop@Simplify@SDD

5932.14 - 106. X + 12.5 X2 - 372. Y + 12.0001 Y2 - 59.6è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!281 - 10 X + X2 - 32 Y + Y2 -

62.4è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!272 - 8 X + X2 - 32 Y + Y2 - 65.2

è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!265 - 6 X + X2 - 32 Y + Y2 -

56.8è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!250 - 10 X + X2 - 30 Y + Y2 - 59.6

è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!241 - 8 X + X2 - 30 Y + Y2 - 62.4

è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!234 - 6 X + X2 - 30 Y + Y2

Let us plot again the volumetric probability:

ContourPlot@-Exp@-SD, 8X, 0, 20<, 8Y, 0, 20<,PlotRange Ø All, PlotPoints Ø 100, Contours Ø 5D

0 5 10 15 20

0

5

10

15

20

Fine! We again find our old result. Let us plot it with more detail:

EpicenterGradient.nb 4

Page 24: Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for Model Parameter Estimation ... Discuss the generalization of the problem to the case

ContourPlot@-Exp@-SD, 8X, 8, 13<, 8Y, 0, 5<,PlotRange Ø All, PlotPoints Ø 100, Contours Ø 5D

8 9 10 11 12 13

0

1

2

3

4

5

Let us now plot the misfit function itself:

ContourPlot@-S, 8X, 8, 13<, 8Y, 0, 5<, PlotRange Ø All, PlotPoints Ø 100, Contours Ø 100D

8 9 10 11 12 13

0

1

2

3

4

5

Ü ContourGraphics Ü

Observe how different is the misfit function from the volumetric probability. While the volumetric probability is a "bell",

the misfint function is a "deformed paraboloid". In this simple case with only two variables, the minimum could be

obtained with arbitrary precision just by zooming more and more the plot:

EpicenterGradient.nb 5

ContourPlot@-S, 8X, 10.33, 10.34<, 8Y, 1.65, 1.66<,PlotRange Ø All, PlotPoints Ø 100, Contours Ø 100D

10.33 10.332 10.334 10.336 10.338 10.34

1.65

1.652

1.654

1.656

1.658

1.66

We see that the minimum of the misfit function is attained at a point with aproximate coordinates (X,Y) = (10.336,1.656)

. We will see if our steepest descent algorithm is able to converge to that point.

The matrix of partial derivatives G^i_a = dg^i/dm^a .

G =

i

k

jjjjjjjjjjjjjjjjjjjjjjj

D@t, XD ê. 8x Ø x1, y Ø y1< D@t, YD ê. 8x Ø x1, y Ø y1<D@t, XD ê. 8x Ø x2, y Ø y2< D@t, YD ê. 8x Ø x2, y Ø y2<D@t, XD ê. 8x Ø x3, y Ø y3< D@t, YD ê. 8x Ø x3, y Ø y3<D@t, XD ê. 8x Ø x4, y Ø y4< D@t, YD ê. 8x Ø x4, y Ø y4<D@t, XD ê. 8x Ø x5, y Ø y5< D@t, YD ê. 8x Ø x5, y Ø y5<D@t, XD ê. 8x Ø x6, y Ø y6< D@t, YD ê. 8x Ø x6, y Ø y6<

y

{

zzzzzzzzzzzzzzzzzzzzzzz

;

MatrixForm@GDi

k

jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj

-3+XÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ5è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!H-3+XL2 +H-15+YL2

-15+YÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ5è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!H-3+XL2 +H-15+YL2

-3+XÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ5è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!H-3+XL2 +H-16+YL2

-16+YÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ5è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!H-3+XL2 +H-16+YL2

-4+XÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ5è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!H-4+XL2 +H-15+YL2

-15+YÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ5è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!H-4+XL2 +H-15+YL2

-4+XÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ5è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!H-4+XL2 +H-16+YL2

-16+YÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ5è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!H-4+XL2 +H-16+YL2

-5+XÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ5è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!H-5+XL2 +H-15+YL2

-15+YÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ5è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!H-5+XL2 +H-15+YL2

-5+XÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ5è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!H-5+XL2 +H-16+YL2

-16+YÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ5è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!H-5+XL2 +H-16+YL2

y

{

zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz

GT = Transpose@GD;

Programming the Quasi-Newton algorithm .

I the first version of the algorithm we don't care about algorithmic efficiency. We intialize the algorthm at the prior point.

EpicenterGradient.nb 6

Page 25: Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for Model Parameter Estimation ... Discuss the generalization of the problem to the case

mcurrent = mprior;

Do@8mnew = mcurrent -

H [email protected] + ICMDL.H GT.ICD.Htcal - tobsL + ICM.Hmcurrent - mpriorL L L ê.8X Ø mcurrent@@1DD, Y Ø mcurrent@@2DD<,

mcurrent = mnew,

Print@mcurrentD<,85<D

810.3204, 1.63451<

810.3353, 1.65599<

810.3357, 1.65622<

810.3357, 1.65623<

810.3357, 1.65623<

The previousalgorithm was not efficient because the matrix inversion were done analytically by Mathematica. I now

force numerical ealuations. We intialize the algorthm at the prior point.

mcurrent = mprior;

Do@8dataresiduals = Htcal - tobsL ê. 8X Ø mcurrent@@1DD, Y Ø mcurrent@@2DD<,modelresiduals = Hmcurrent - mpriorL ê. 8X Ø mcurrent@@1DD, Y Ø mcurrent@@2DD<,g = G ê. 8X Ø mcurrent@@1DD, Y Ø mcurrent@@2DD<,gt = GT ê. 8X Ø mcurrent@@1DD, Y Ø mcurrent@@2DD<,gradient = gt.ICD.dataresiduals + ICM.modelresiduals,

direction = [email protected] + ICMD.gradient,mnew = mcurrent - direction,

mcurrent = mnew,

Print@mcurrentD<,85<D

810.3204, 1.63451<

810.3353, 1.65599<

810.3357, 1.65622<

810.3357, 1.65623<

810.3357, 1.65623<

We now initialize the algorithm at an arbitary point (the origin of the Cartesian coordinates):

EpicenterGradient.nb 7

mcurrent = 80., 0.<;Do@8dataresiduals = Htcal - tobsL ê. 8X Ø mcurrent@@1DD, Y Ø mcurrent@@2DD<,modelresiduals = Hmcurrent - mpriorL ê. 8X Ø mcurrent@@1DD, Y Ø mcurrent@@2DD<,g = G ê. 8X Ø mcurrent@@1DD, Y Ø mcurrent@@2DD<,gt = GT ê. 8X Ø mcurrent@@1DD, Y Ø mcurrent@@2DD<,gradient = gt.ICD.dataresiduals + ICM.modelresiduals,

direction = [email protected] + ICMD.gradient,mnew = mcurrent - direction,

mcurrent = mnew,

Print@mcurrentD<,85<D

810.2781, -1.84685<

810.2856, 1.58157<

810.3343, 1.65529<

810.3357, 1.65622<

810.3357, 1.65623<

We converge at exactly the same point, as we should.

Let us now arbitrarily modify the Hessian matrix:

mcurrent = 80., 0.<;DoA9dataresiduals = Htcal - tobsL ê. 8X Ø mcurrent@@1DD, Y Ø mcurrent@@2DD<,modelresiduals = Hmcurrent - mpriorL ê. 8X Ø mcurrent@@1DD, Y Ø mcurrent@@2DD<,g = G ê. 8X Ø mcurrent@@1DD, Y Ø mcurrent@@2DD<,gt = GT ê. 8X Ø mcurrent@@1DD, Y Ø mcurrent@@2DD<,gradient = gt.ICD.dataresiduals + ICM.modelresiduals,

direction = InverseAgt.ICD.g + ICM + J 0.1 0.2

0.3 0.4NE.gradient,

mnew = mcurrent - direction,

mcurrent = mnew,

Print@mcurrentD=,810<E

810.2348, -1.93793<

89.41567, 1.21869<

810.0971, 1.51359<

810.2621, 1.6168<

810.3139, 1.64476<

810.3292, 1.65287<

810.3338, 1.65524<

810.3351, 1.65594<

810.3355, 1.65614<

810.3356, 1.6562<

The algorithm has converged to the same point.

EpicenterGradient.nb 8

Page 26: Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for Model Parameter Estimation ... Discuss the generalization of the problem to the case

We now evaluate the posterior covariance matrix:

Uncertainties .

CMpost = [email protected] + ICMD;MatrixForm@CMpostD

J 0.930878 0.423919

0.423919 0.243515N

sx =è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!CMpost@@1, 1DD

sy =è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!CMpost@@2, 2DD

r =CMpost@@1, 2DDÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

sx sy

0.96482

0.493473

0.890376

The standard deviation for X is 0.96, the standard deviation for Y is 0.49, and the uncertainties are correlated, with a

coefficient of correlation 0.89. Therefore, our estimate of the epicenter is X = 10.3 km (plus or minus 1. k), Y = 1.7 km

(plus or minus 0.5 km), the uncertainties being strongly (and positively) correlated.

Let us plot the Gaussian distribution that is tangent to the actual probability distribution, i.e., let us plot the Gaussian

probability density whose center is the point produced by the Newton algorithm and whose covariance matrix is the one

just evaluated.

Print@[email protected], 1.6562<

880.930878, 0.423919<, 80.423919, 0.243515<<

PosteriorProba =

SimplifyAExpA-1ÅÅÅÅ2

H8X, Y< - [email protected], Y< - mcurrentLEE

‰-149.586+38.6325 X-2.59193 X2 -60.4516 Y+9.02425 X Y-9.90812 Y2

EpicenterGradient.nb 9

ContourPlot@-PosteriorProba, 8X, 8, 13<,8Y, 0, 5<, PlotRange Ø All, PlotPoints Ø 100, Contours Ø 5D

8 9 10 11 12 13

0

1

2

3

4

5

This Gaussian is very close to the actual distribution ( Exp[-S] ) ploted above.

Now, the (simpler) preconditioned steepest descent algorithm .

We first have a look at the steepest descent direction:

mcurrent = 810.5, 5.<;H [email protected]@CDD.Htcal - tobsL + Hm - mpriorL L ê.8X Ø mcurrent@@1DD, Y Ø mcurrent@@2DD<

8-35.9225, 585604.<

Mmm... Not a very good direction (we could suspect that, because one of the a priori information was quite irrelevant). If

using this steepest descent direction, we will need to make very small jumps, and we shall have a very slow convergence.

Let us find, by trial and error, a reasonnable "preconditioning".

mcurrent = 810.5, 5.<;J 0.01 0

0 0.000005N.H [email protected]@CDD.Htcal - tobsL + Hm - mpriorL L ê.

8X Ø mcurrent@@1DD, Y Ø mcurrent@@2DD<8-0.359225, 2.92802<

Than seems reasonable. Let's go, without trying to optimize the Mathematica evaluations:

EpicenterGradient.nb 10

Page 27: Inverse Problem Theory and Methods for Model · PDF fileInverse Problem Theory and Methods for Model Parameter Estimation ... Discuss the generalization of the problem to the case

mcurrent = 810.5, 5.<;DoA9mnew = mcurrent -

J 0.01 0

0 0.000005N.H [email protected]@CDD.Htcal - tobsL + Hm - mpriorL L ê.

8X Ø mcurrent@@1DD, Y Ø mcurrent@@2DD<,mcurrent = mnew=,

8100<Emcurrent

810.5314, 1.74824<

That's a reasonable approximation... We better stop here, as the steepest descent algorithm (preconditioned or not) is

notoriously slow very close to the minimum.

EpicenterGradient.nb 11


Recommended