intro inverse modelling - esa · references and definitions • a. tarantola, inverse problem...

23
FastOpt Intro Inverse Modelling Thomas Kaminski (http://FastOpt.com) Thanks to: Simon Blessing (FastOpt), Ralf Giering (FastOpt), Nadine Gobron (JRC), Wolfgang Knorr (QUEST), Thomas Lavergne (Met.No), Bernard Pinty (JRC), Peter Rayner (LSCE), Marko Scholze (QUEST), Michael Voßbeck (FastOpt) 4th Earth Observation Summer School, Frascati, August 2008

Upload: others

Post on 26-Jan-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Intro Inverse Modelling - ESA · References and Definitions • A. Tarantola, Inverse Problem Theory and Methods for Model Parameter Estimation, SIAM, (1987, 2004) • I. G. Enting,

FastOpt

Intro Inverse Modelling

Thomas Kaminski (http://FastOpt.com)

Thanks to:

Simon Blessing (FastOpt), Ralf Giering (FastOpt), Nadine Gobron (JRC),

Wolfgang Knorr (QUEST), Thomas Lavergne (Met.No), Bernard Pinty (JRC),

Peter Rayner (LSCE), Marko Scholze (QUEST), Michael Voßbeck (FastOpt)

4th Earth Observation Summer School, Frascati, August 2008

Page 2: Intro Inverse Modelling - ESA · References and Definitions • A. Tarantola, Inverse Problem Theory and Methods for Model Parameter Estimation, SIAM, (1987, 2004) • I. G. Enting,

FastOpt

Overview

BP1: Basic concepts: from remote sensing measurements to surface albedo estimates (1)

BP2: Basic concepts: from remote sensing measurements to surface albedo estimates (2)

TK1: Introduction to inverse modelling

TK2: Intro tangent and adjoint code construction

TK3: Demo: BRF inverse package and Carbon Cycle Data Assimilation System

BP3: Monitoring land surfaces: applications of inverse packages of both surface BRF and albedo models

Page 3: Intro Inverse Modelling - ESA · References and Definitions • A. Tarantola, Inverse Problem Theory and Methods for Model Parameter Estimation, SIAM, (1987, 2004) • I. G. Enting,

References and Definitions

• A. Tarantola, Inverse Problem Theory and Methods for Model

Parameter Estimation, SIAM, (1987, 2004)

• I. G. Enting, Inverse Problems in Atmospheric Constituent Transport,

C.U.P. (2002)

Page 4: Intro Inverse Modelling - ESA · References and Definitions • A. Tarantola, Inverse Problem Theory and Methods for Model Parameter Estimation, SIAM, (1987, 2004) • I. G. Enting,

Definitions

Name Symbol DescriptionParameters ~p Quantities not changed by model, i.e.

process parameters, boundary conditionsState variables ~v(t) Quantities altered by model from time step

to time stepControl variables ~x Quantities exposed to optimisation, a

combination of subsets of ~p and ~v(t = 0)Observables ~o Measurable quantitiesObservation operator H Transforms ~v to ~oModel M Predicts ~o given ~p and ~v(t = 0), includes HData ~d Measured values of ~o

Page 5: Intro Inverse Modelling - ESA · References and Definitions • A. Tarantola, Inverse Problem Theory and Methods for Model Parameter Estimation, SIAM, (1987, 2004) • I. G. Enting,

Statement of Problem

Given a model M, a set of measurements ~d of some observables ~o,

and prior information on some control variables ~x, produce an updated

description of ~x.

~x may include parts of ~p and ~v(t = 0)

~o = M(~x)

Page 6: Intro Inverse Modelling - ESA · References and Definitions • A. Tarantola, Inverse Problem Theory and Methods for Model Parameter Estimation, SIAM, (1987, 2004) • I. G. Enting,

Information and PDFs

• We seek true value but all input information is approximate

• Treat model, measurements and priors as PDFs describing distribution

of true value

• Data and prior error easy

• Model error is difference between actual and perfect simulation for a

given ~x

• Arises from errors in equations and errors in those parameters not

included in ~x

Page 7: Intro Inverse Modelling - ESA · References and Definitions • A. Tarantola, Inverse Problem Theory and Methods for Model Parameter Estimation, SIAM, (1987, 2004) • I. G. Enting,

Combining PDFs

• Operate in joint parameter anddata space

• Estimates are combination ofprior, measurement and model(black triangle)

• Estimate is multiplication ofPDFs

• Only involves forward models• Parameter estimate projection

of PDF onto X-axis

Page 8: Intro Inverse Modelling - ESA · References and Definitions • A. Tarantola, Inverse Problem Theory and Methods for Model Parameter Estimation, SIAM, (1987, 2004) • I. G. Enting,

Summary statistics from PDF

• Combination of PDFs

(upper) and posterior

PDF for parameters

(lower)

• Can calculate all

summary statistics

from posterior PDF

• Maximum Likelihood

Estimate (MLE)

maximum of PDF

Page 9: Intro Inverse Modelling - ESA · References and Definitions • A. Tarantola, Inverse Problem Theory and Methods for Model Parameter Estimation, SIAM, (1987, 2004) • I. G. Enting,

Tightening Model Constraint

• Note no viable solution• If we cannot treat model as soft

constraint we must inflate datauncertainty

• Model error hard to characterise

Page 10: Intro Inverse Modelling - ESA · References and Definitions • A. Tarantola, Inverse Problem Theory and Methods for Model Parameter Estimation, SIAM, (1987, 2004) • I. G. Enting,

Gaussian Case

G(x) =1√2πσ

e−(x−µ)2

2σ2

-2 -1 0 1 2 -2

-1

0

1

2

0

0.5

1

Data:

Pd ∝ e−(d−1)2

2·0.62

-2 -1 0 1 2 -2

-1

0

1

2

0

0.5

1

Parameters:

Px ∝ e−x2

2·0.62

-2 -1 0 1 2 -2

-1

0

1

2

0

0.5

1

Model:

PM ∝ e−(d−x)2

2·0.62

Page 11: Intro Inverse Modelling - ESA · References and Definitions • A. Tarantola, Inverse Problem Theory and Methods for Model Parameter Estimation, SIAM, (1987, 2004) • I. G. Enting,

Prior

-2 -1 0 1 2 -2

-1

0

1

2

0

0.5

1

Page 12: Intro Inverse Modelling - ESA · References and Definitions • A. Tarantola, Inverse Problem Theory and Methods for Model Parameter Estimation, SIAM, (1987, 2004) • I. G. Enting,

Data

-2 -1 0 1 2 -2

-1

0

1

2

0

0.5

1

Page 13: Intro Inverse Modelling - ESA · References and Definitions • A. Tarantola, Inverse Problem Theory and Methods for Model Parameter Estimation, SIAM, (1987, 2004) • I. G. Enting,

Prior plus Data

-2 -1 0 1 2 -2

-1

0

1

2

0

0.5

Page 14: Intro Inverse Modelling - ESA · References and Definitions • A. Tarantola, Inverse Problem Theory and Methods for Model Parameter Estimation, SIAM, (1987, 2004) • I. G. Enting,

Model

-2 -1 0 1 2 -2

-1

0

1

2

0

0.5

1

Page 15: Intro Inverse Modelling - ESA · References and Definitions • A. Tarantola, Inverse Problem Theory and Methods for Model Parameter Estimation, SIAM, (1987, 2004) • I. G. Enting,

Prior plus Data plus Model

-2 -1 0 1 2 -2

-1

0

1

2

0

0.5

Page 16: Intro Inverse Modelling - ESA · References and Definitions • A. Tarantola, Inverse Problem Theory and Methods for Model Parameter Estimation, SIAM, (1987, 2004) • I. G. Enting,

Prior plus Data plus Model

-2 -1 0 1 2-2

-1

0

1

2

Page 17: Intro Inverse Modelling - ESA · References and Definitions • A. Tarantola, Inverse Problem Theory and Methods for Model Parameter Estimation, SIAM, (1987, 2004) • I. G. Enting,

PDFs and cost functions

• MLE most common quantity

• Maximise PDF numerically

• Most common P (x) ∝ e−12J so maximising P ↔ minimising J

• J usually called the cost (or misfit or objective) function

• Exponentials convenient because multiplying exponentials ↔ adding

exponents

Page 18: Intro Inverse Modelling - ESA · References and Definitions • A. Tarantola, Inverse Problem Theory and Methods for Model Parameter Estimation, SIAM, (1987, 2004) • I. G. Enting,

Perfect and imperfect models

Imperfect Model

• Include observables (~o) in control variables

J =1

2

(~x− ~x0)

2

σ2x

+(~o− ~d)2

σ2obs

+(M(~x)− ~o)2

σ2M

!

• ~x0 prior estimate for ~x, σ standard

deviations.

• Allows explicit model error

• Different from weak constraint 4D-Var in

which model state added to control variables

Perfect Model

• Observables not included in control vector

J =1

2

(~x− ~x0)

2

σ2x

+(M(~x)− ~d)2

σ2d

!

• If model imperfect, carried model error in

σd:

σ2d=σ2

obs + σ2M

• This is the form usually used in data

assimilation

• For linear M there is a closed solution

• Otherwise minimised by iterative algorithm,

usually using gradients

• Can calculate posterior σx by rearranging

PDF

Page 19: Intro Inverse Modelling - ESA · References and Definitions • A. Tarantola, Inverse Problem Theory and Methods for Model Parameter Estimation, SIAM, (1987, 2004) • I. G. Enting,

Covariances

J =12

((~x− ~x0)2

σ2x

+(M(~x)− ~d)2

σ2d

)Takes the more general form

J =12

((~x− ~x0)TC(~x0)−1(~x− ~x0) + (M(~x)− ~d)TC(~d)−1(M(~x)− ~d)

)• Off-diagonal terms represent correlation in uncertainty

• Persistent instrumental error

• Model error usually correlated

• Errors in initial conditions from previous forecast

Page 20: Intro Inverse Modelling - ESA · References and Definitions • A. Tarantola, Inverse Problem Theory and Methods for Model Parameter Estimation, SIAM, (1987, 2004) • I. G. Enting,

Linear Gaussian case

J =12

((~x− ~x0)TC(~x0)−1(~x− ~x0) + (M~x− ~d)TC(~d)−1(M~x− ~d)

)~xopt = ~x0 + C(~x0)MT

(MC(~x0)MT + C(~d)

)−1

(~d−M~x0)

C(~x)−1 = C(~x0)−1 + MTC(~d)−1M

=d2J(xopt)

dx2

• C(~x) does not depend on values, only uncertainties and model

Page 21: Intro Inverse Modelling - ESA · References and Definitions • A. Tarantola, Inverse Problem Theory and Methods for Model Parameter Estimation, SIAM, (1987, 2004) • I. G. Enting,

FastOpt

How to solve it? 1. Minimisation

Efficient minimisation algorithms use J(x) and

the gradient of J(x) in an iterative procedure.

Typically the prior value is used as starting point of the iteration.

The gradient is helpful as it always points uphill.

The adjoint is used to provide the gradient efficiently.

Example: Newton algorithm for minimisation

Gradient: g(x) = dJ/dx(x)

Hessian: H(x) = dg/dx(x) = d2J/dx2(x)

At the minimum, xmin

: g(xmin

) = 0, hence:

g(x) = g(x) – g(xmin

) ~ H (x) (x-xmin

)

rearranging yields:

(xmin

- x) ~ - H-1(x) g(x)

Smart gradient algorithms use an approximation of H(x)

Figure: Tarantola (1987)

Figure: Fischer (1996)

Page 22: Intro Inverse Modelling - ESA · References and Definitions • A. Tarantola, Inverse Problem Theory and Methods for Model Parameter Estimation, SIAM, (1987, 2004) • I. G. Enting,

FastOpt

Hessian quantifies the curvature of the cost function

Use Hessian at minimum to approximate C(x)-1

Figure taken from Tarantola (1987) -->

How to solve it? 2. Error bars

Page 23: Intro Inverse Modelling - ESA · References and Definitions • A. Tarantola, Inverse Problem Theory and Methods for Model Parameter Estimation, SIAM, (1987, 2004) • I. G. Enting,

FastOpt

Exercise

Do algebra for simple case

• Gaussian

• 1 control variable

• 1 observation

• Model: identity