parameter optimization using inverse modeling

25
5/15/2015 1 PARAMETER OPTIMIZATION USING INVERSE MODELING Contact: [email protected] K s (cm/h) θ r (%) OF (%) OUTLINE Direct vs inverse problems Ex.1: Darcy’s experiment Analytical solutions Ex.2: Multi-step outflow experiment Inverse modeling scheme for parameter optimization Objective function Optimization algorithms Ex.3: Orchard soil water status monitoring Uncertainty Analysis Overview

Upload: others

Post on 25-Mar-2022

16 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: PARAMETER OPTIMIZATION USING INVERSE MODELING

5/15/2015

1

PARAMETER OPTIMIZATION USING INVERSE MODELING

Contact: [email protected]

Ks (cm/h) θr (%)

OF

(%

)

OUTLINE

• Direct vs inverse problems

Ex.1: Darcy’s experiment

Analytical solutions

Ex.2: Multi-step outflow experiment

• Inverse modeling scheme for parameter optimization

Objective function

Optimization algorithms

Ex.3: Orchard soil water status monitoring

• Uncertainty Analysis

• Overview

Page 2: PARAMETER OPTIMIZATION USING INVERSE MODELING

5/15/2015

2

EXAMPLE OF DIRECT PROBLEM

Model: Q =

System properties: Ks, A and L are known

Response: Q(t) is unknown

L

Ks A ΔP

Initial cond.: θ(t=0,x) = θs

Boundary cond.: ΔP(t>0) = ΔPobs(t)

Image: www.groundwateruk.org

Typical application:

Direction and speed of pollutant plume propagation

?

INVERSE PROBLEM ANALOGY

Response is known BUT system properties are unknown

Page 3: PARAMETER OPTIMIZATION USING INVERSE MODELING

5/15/2015

3

INVERSE PROBLEM DEFINITION

Solving an inverse problem is the process of calculating from a set of observations the causal factors that produced them. It is called an inverse problem because it starts with the results and then calculates the causes. This is in contrast to the corresponding direct problem, whose solution involves finding effects based on the complete description of their causes.

“Inverse modeling is a formal approach for estimating the variables driving the evolution of a system by taking measurements of the observable manifestations of that system, and using our physical understanding to relate these observations to the driving variables.” (Lectures on inverse modeling, D. J. Jacob, 2007).

INVERSE PROBLEM EXAMPLE 1

Forward model: Q =

System property: Ks is unknown

System response: Q(t) is known

L

Ks A ΔP

Initial cond.: θ(t=0,x) = θs

Boundary cond.: ΔP(t>0) = ΔPobs(t)

Typical application:

Characterization of system properties and/or system state

?

System properties: A, L are known

But straightforward Ks calculation thanks to the available analytical relation “Q(Ks)” in saturated conditions

Page 4: PARAMETER OPTIMIZATION USING INVERSE MODELING

5/15/2015

4

x = Δ P (cm)

Y =

QL/A

ΔP

(m

l/s)

ANALYTICAL SOLUTIONS

Darcy model assumes that ŷ = Ks (i.e. a constant) is the estimator of y = QL/AΔP

Let’s minimize the sum of squared errors between the model ŷ and observations y:

i

2i

i

2i )K(y)y(ySSE sˆ

i

i 0)K(y2K

SSEs

s

For that we need to nullify dSSE/dKs :

Which yields : ys K

Single parameter solution:

x

y

The linear model assumes that ŷ = a x + b is the estimator of y

Sum of squared errors:

ANALYTICAL SOLUTIONS

i

2ii b) x a(ySSE

0b)ax(y2b

SSE

i

ii

Nullification of and :

022

i

)( iiii bxaxyxa

SSE

Yield :

xayb

i

i

i

ii

xx

yxyx

a22

a

SSE

b

SSE

Generalization for 2 parameters:

Page 5: PARAMETER OPTIMIZATION USING INVERSE MODELING

5/15/2015

5

Se (h)= ( )m

Unsaturated soil hydraulic properties estimation

1+(αh)n

1

θ(Se) = θr + Se (θs – θr)

K(Se) = Ks Seλ (1-(1- Se

1/m )m)

2

Soil relative saturation index Se:

Soil water retention curve (WRC):

Soil hydraulic conductivity curve (HCC):

INVERSE PROBLEM EXAMPLE 2

3 . 5

c m

air inlet

quick disconnect fitting

porous ceramic cups

water outlet

port for flushing bubbles

quick disconnect fittings

1-psi differential pressure transducer

15-psi gauge pressure transducers

porous nylon membrane

1-psi gauge pressure transducer

MULTI-STEP OUTFLOW SETUP

Real-time outflow measurement

Connection to free air

Multi-step air injection

Water table

Water can flow out BUT air stays in

Pressure builds up inside the cell when injecting air

Page 6: PARAMETER OPTIMIZATION USING INVERSE MODELING

5/15/2015

6

SYSTEM RESPONSE TO AIR PRESSURE

The plateaus “equilibrium positions”

tell us about the soil water retention curve

The concavity tells us about the soil hydraulic conductivity curve

Point measurement

Integrative measurement

INVERSE PROBLEM EXAMPLE 2

Model: Jw(t,z) = K(h(t,z))

System properties: WRCparms & HCCparms are unknown

System response: Jw(t,z=0) is known

Δz

Δ(h(t,z)+z)

Initial cond.: h(t=0,z) = z

Boundary cond.: h(t>0,z=0) & h(t>0, z=L)

h(t,z=L)

h(z=0)=0

Jw(t,z=0)

Δθ(t,z) = Δz

ΔJw(t,z) Δt

The multi-step outflow experiment

θ = f1(h,WRCparms)

K = f2(h,HCCparms)

???

No analytical relation available for “Jw(t,z=0,WRCparms,HCCparms)”

Need a full inverse modeling scheme to find WRCparms & HCCparms

??? h(t,z=L/2)

Page 7: PARAMETER OPTIMIZATION USING INVERSE MODELING

5/15/2015

7

INVERSE MODELING SCHEME FOR PARAMETER OPTIMIZATION

(MSO)

(Outflow & matric potential)

OBJECTIVE FUNCTION

Definition: the objective function (OF) quantifies the quality of the fitness between measured and simulated observed system responses for any set of parameters.

- Example 1, weighted-average difference:

OF(parms) = Σobs (Simobs(parms) - Measobs) wobs

- Example 2, root weighted-average square difference:

OF(parms) = sqrt(Σobs (Simobs (parms) - Measobs)2 wobs )

Individual weights « wobs » can be attributed to each observation in space and time.

Page 8: PARAMETER OPTIMIZATION USING INVERSE MODELING

5/15/2015

8

OBJECTIVE FUNCTION

Definition: the objective function (OF) quantifies the quality of the fitness between measured and simulated observed system responses for any set of parameters.

OF(parms) = Σobs (Simobs(parms) - Measobs) wobs

Errors for outflow & matric head ≈ 0.01 cm & 10 cm resp. Adjust wobs to the type of observation !

0

0.2

0.4

0.6

0.8

1

0 20 40 60

Time [hours]

Cu

mu

lative

Ou

tflo

w [cm

]

Measured

Fitted

M4+

-600

-500

-400

-300

-200

-100

0

0 20 40 60

Time [hours]

Ma

tric

He

ad

[cm

]

Tensiometer 1

Fitted 1

Tensiometer 2

Fitted 2

The ensemble of all possible combinations of values for all the model parameters constitutes the “parametric space”.

OBJECTIVE FUNCTION

If the model has 2 parameters, the parametric space is a plan. Each point in this plan is a “parameter set” X.

Displaying the objective function value for all parameter sets in the parametric space is a way to visualize the OF “topography” (only possible for 2 parameters at a time).

Ks (cm/h) θr (%)

OF

(%

)

The type of topography determines what type of optimization algorithm is more likely to find the optimal parameter set.

Page 9: PARAMETER OPTIMIZATION USING INVERSE MODELING

5/15/2015

9

OBJECTIVE FUNCTION

In a 3-dimensional parametric space, the third dimension cannot be used to display the OF topography.

θs (-)

Ks

(cm

/h)

n (-)

OF (%) Color-code needed to display OF values on 2-D slices of the parametric space.

Discretization of each slice is 50 x 50 => 7500 Hydrus runs necessary to evaluate the OF at each point and get this image (not quite efficient to search for the minimum).

Warning: Incomplete view of the OF topography.

If more parameters need to be optimized, this process becomes less and less efficient.

INVERSE MODELING SCHEME FOR PARAMETER OPTIMIZATION

(MSO)

(Outflow & matric potential)

Page 10: PARAMETER OPTIMIZATION USING INVERSE MODELING

5/15/2015

10

OPTIMIZATION ALGORITHMS

Definition: the optimization algorithm selects parameter values Xi+1 based on prior information on the objective function score (…,OF(Xi-1),OF(Xi)) of previous simulations. The way this information is used differs among optimizers:

- Gradient descent method:

Xi+1 = Xi – p ∇OF(Xi)

Ks

OF

OF(Xi)

Xi

∇OF(Xi)

Xi+1

where Xi is a vector containing the parameter set of the ith iteration and p is a property of the optimizer.

Type: “Sliding search algorithm” (see also Levenberg-Marquadt)

Single-parametric space

OPTIMIZATION ALGORITHMS

Ks

OF

Xi

where Xi is a vector containing the parameter set of the ith iteration and p is a property of the optimizer.

Type: “Sliding search algorithm” (see also Levenberg-Marquadt)

Single-parametric space

∇OF(Xi) OF(Xi)

Definition: the optimization algorithm selects parameter values Xi+1 based on prior information on the objective function score (…,OF(Xi-1),OF(Xi)) of previous simulations. The way this information is used differs among optimizers:

- Gradient descent method:

Xi+1 = Xi – p ∇OF(Xi)

Page 11: PARAMETER OPTIMIZATION USING INVERSE MODELING

5/15/2015

11

OPTIMIZATION ALGORITHMS

- Simplex Search Method (local):

Construct simplex using best N + 1 points (N = number of parameters)

Xtest = Xm + p (Xm - Xw)

where Xw is the worst parameter set in the simplex and Xm is the mean of the best N parameter sets

Ks

n

Tested p values in an iteration:

pr = reflection

pe = expansion

pc+= positive contraction

pc- = negative contraction

Xw is replaced by the best Xtest and a new simplex is formed.

Type: ”Jumping search algorithm”

Xm

Xw

Bi-parametric space

Ks

n

OPTIMIZATION ALGORITHMS

Page 12: PARAMETER OPTIMIZATION USING INVERSE MODELING

5/15/2015

12

PROBLEMS WITH LOCAL SEARCH METHODS … O

F

OPTIMIZATION ALGORITHMS

(1) Generate sample: Sample M parameter sets {X1, …, XM} and compute the OF of each of these points;

(2) Rank points: Sort the M points in order of decreasing fitness;

(3) Partition into complexes: Partition the M points into complexes, each containing one of the best ranked points and at least N+1 points on total (N = number of parameters);

(4) Evolve each complex: Evolve each complex using the Simplex Search Method;

(5) Shuffle complexes: Sort the points in order of decreasing fitness (i.e. increasing OF value);

(6) Check convergence: If convergence criteria are satisfied, stop; otherwise return to step 3;

Uses multiple simplex searches & complex shuffling

OPTIMIZATION ALGORITHMS

- The Shuffled Complex Evolution Method (global):

Page 13: PARAMETER OPTIMIZATION USING INVERSE MODELING

5/15/2015

13

Initial population (1->3) Complex evolution (4)

Complex Shuffling (5->3) Complex Evolution (4)

Ks

n

Ks

n

Ks

n

Ks

n

OPTIMIZATION ALGORITHMS

- The Shuffled Complex Evolution Method (global):

Evaluate OF

Sort points based on OF

Partition them into red and blue complexes

Iteration 1

Iteration 2

Convergence?

No: go to next iteration

Yes: end optimization

See also “Genetic Algorithm”, “DREAM”, …

INVERSE MODELING SCHEME FOR PARAMETER OPTIMIZATION

(MSO)

(Outflow & matric potential)

When to stop the loop?

Page 14: PARAMETER OPTIMIZATION USING INVERSE MODELING

5/15/2015

14

OPTIMIZATION ALGORITHMS

When do we want to stop the parameter optimization loop ?

“Convergence criteria”:

- When a parameter set attaining a threshold OF value is found Example: OF(X)=0 -> no difference between Simobs and Measobs

- When the best OF value has not significantly changed for long Example: less than 1% improvement for more than 50 iterations

- When too much time elapsed Example: optimization loop has been running for 2 days

- When too many iterations were ran Example: optimization loop has been running for 105 iterations

- Any combination of the previous criteria…

INVERSE PROBLEM EXAMPLE 3

Model: Jw(t,z) = K(h(t,z))

System properties: WRCparms & HCCparms unknown for 2 soil types

Feddes water stress parms P2 & P3 unknown

System response: θobs(t*,z*) & hobs(t*,z*) ”*” for discrete obs.

Δz

Δ(h(t,z)+z)

Initial cond.: h(θobs(t=0,z*)) & hobs(t=0,z*)

Boundary cond.: Jw(t>0,z=0) = Irrig(t) & ∇h(t>0, z=L) = 0 & ETobs(t)

Δθ(t,z) = Δz

ΔJw(t,z) Δt

Orchard soil water status monitoring

θ = f1(h,WRCparms)

K = f2(h,HCCparms)

z=0

z=L

S(t,z) = ET(t) α(h,P2,P3) β(z)

Page 15: PARAMETER OPTIMIZATION USING INVERSE MODELING

5/15/2015

15

INVERSE PROBLEM EXAMPLE 3

Multi-objective optimization of 9 parameters (θs1,a1,n1,Ks1, a2,n2,Ks2,P2,P3) using the Genetic Algorithm (global)

Long-term trend

Short-term dynamics

INVERSE PROBLEM EXAMPLE 3

Using the soil water content change “dSWC” to focus on the amplitude and travel time of the infiltration front signal

Page 16: PARAMETER OPTIMIZATION USING INVERSE MODELING

5/15/2015

16

Probability distribution to be maximized

140 160 180 200 220 240 260 2800

100

200

300

400

500

Time [days]

Str

eamflow

[m

3/s

]

UNCERTAINTY ANALYSIS

Optimization identifies the mode… (most probable parameter set)

Xopt

p (Xopt)

Yes

95%

Probability distribution to be maximized

Need estimates of uncertainty …

Xopt

p (Xopt)

140 160 180 200 220 240 260 2800

100

200

300

400

500

Time [days]

Str

eamflow

[m

3/s

]

UNCERTAINTY ANALYSIS

No

Page 17: PARAMETER OPTIMIZATION USING INVERSE MODELING

5/15/2015

17

Probability distribution to be maximized w.r.t

.)|(t

p

t

Current guess

Markov Chain Monte Carlo (MCMC) method

UNCERTAINTY ANALYSIS

.)|(t

p

Proposal distribution )|(t

Z

Possible samples from )|(t

Z

UNCERTAINTY ANALYSIS

MCMC proposal distribution z(.|.)

Page 18: PARAMETER OPTIMIZATION USING INVERSE MODELING

5/15/2015

18

Always accept

MCMC – Acceptance of New Points Having Higher Probability than the Old Point is 100%

.)|(t

p

t

New guess

.)|1

(t

p

1t

.)|(t

p

.)|1

(t

p

> 1

UNCERTAINTY ANALYSIS

MCMC acceptance rule:

Accept if > R ~ Uniform (0,1)

MCMC –Acceptance of New Points Having Lower Probability than the Old Point is Probabilistic

If the ratio is small, then probability of acceptance is small

.)|(t

p

.)|1

(t

p

1t

t

.)|(t

p

.)|1

(t

p

< 1

MCMC acceptance rule:

UNCERTAINTY ANALYSIS

Page 19: PARAMETER OPTIMIZATION USING INVERSE MODELING

5/15/2015

19

Warning: Performance of a MCMC Sampler depends strongly on the choice of the Proposal Distribution

.)|(t

p

.)|1

(t

p

1t

t

UNCERTAINTY ANALYSIS

LOCAL SEARCH ALGORITHMS:

Start from a single randomly chosen point in the parameter space, and seek iterative improvement from this point

Examples: Gradient Descent, Levenberg-Marquardt, Simplex Search and Line Search

GLOBAL SEARCH ALGORITHMS:

Typically implement a number of different parameter combinations simultaneously (called a population) and use evolutionary principles of survival of the fittest to iteratively improve this population

Examples: Genetic algorithms, Differential Evolution, Particle Swarm Optimization and Evolutionary Strategies (Covariance Matrix Adaptation)

OVERVIEW

Page 20: PARAMETER OPTIMIZATION USING INVERSE MODELING

5/15/2015

20

1 – Multiple regions of attraction 2 – UNCOUNTABLE local optima 3 – Discontinuous derivatives 4 – Long and curved ridges 5 – Poor sensitivity

Derivative-free method

Global search of space

Choice of the optimization algorithm:

OVERVIEW

Well-posed inverse problems:

Test for global and local minima

Test for unique solutions

Independently measure parameters that are not sensitive to solution

Do not estimate highly correlated parameters

Include independently-measured information to objective function

Minimize number of optimized parameters

Minimize measurement errors

Estimate model error

Compare uncertainties of optimized parameters

OVERVIEW

Page 21: PARAMETER OPTIMIZATION USING INVERSE MODELING

5/15/2015

21

Other applications of inverse modeling:

Other soil hydraulic properties techniques, such as evaporation method, suction infiltrometer method and instantaneous profile method;

Estimation of solute and heat transport properties;

Estimation of root water and nutrient uptake parameters;

Effective field soil properties, and in multi-layered systems;

. . . . . . . . . . . . . . . . . . . .

OVERVIEW

LIMITATIONS:

Inverse problems are not necessarily well-posed;

Selection of weighting factors;

Parameter estimates are valid for experimental range only;

Method requires a lot of experience

Non-uniqueness

Instability

OVERVIEW

Page 22: PARAMETER OPTIMIZATION USING INVERSE MODELING

5/15/2015

22

BENEFITS:

Mandates marriage of experimentation with numerical modeling;

Method is consistent, I.e. estimated hydraulic functions are used in model predictions;

Uses transient measurements, as in real world;

Relatively fast method, and lends itself for automation

OVERVIEW

Page 23: PARAMETER OPTIMIZATION USING INVERSE MODELING

5/15/2015

23

WHY NEED FOR MEASUREMENT OF SOIL HYDRAULIC PARAMETERS ?

As input to water flow and contaminant transport models;

To characterize soil physical characteristics, including their spatial and temporal variability;

To correlate with other, more easily to measure soil physical properties, e.g. texture.

1.E-06

1.E-05

1.E-04

1.E-03

1.E-02

1.E-01

1.E+00

1.E+01

0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4

Water Content

Hyd

rau

lic C

on

du

cti

vit

y [

cm

/ho

ur]

0-250, inverse

0-250, K-3

0-250, K-23

0-250, K-32

(a)

Lincoln sand (Wildenschild et al., 2001)

Multi-step outflow method to indirectly estimate soil water retention and unsaturated hydraulic conductivity

functions

Page 24: PARAMETER OPTIMIZATION USING INVERSE MODELING

5/15/2015

24

0 .0 0 2 0 .0 0 6 0 .0 1 0 0 .0 1 4 0 .0 1 8

A lp h a [1 /c m ]

0 .0 0

0 .5 0

1 .0 0

1 .5 0

2 .0 0

Sa

tura

ted

Hy

dra

uli

c C

on

du

cti

vit

y [

cm

/d[

0 .0 0 2 0 .0 0 6 0 .0 1 0 0 .0 1 4 0 .0 1 8

A lp h a [1 /c m ]

1 .4 0

1 .6 0

1 .8 0

2 .0 0

2 .2 0

n [

-]

0 .0 0 2 0 .0 0 6 0 .0 1 0 0 .0 1 4 0 .0 1 8

A lp h a [1 /c m ]

0 .0 0

0 .0 2

0 .0 4

0 .0 6

0 .0 8

Re

sid

ua

l W

ate

r C

on

ten

t [-

]

1 .4 0 1 .6 0 1 .8 0 2 .0 0 2 .2 0

n [- ]

0 .0 0

0 .5 0

1 .0 0

1 .5 0

2 .0 0

Sa

tura

ted

Hy

dru

ali

c C

on

du

cti

vit

y [

cm

/d]

0 .5 0 1 .0 0 1 .5 0 2 .0 0

S a tu ra te d H y d ra u lic C o n d u c tiv ity [c m /d ]

0 .0 0

0 .0 2

0 .0 4

0 .0 6

0 .0 8

Re

sid

ua

l W

ate

r C

on

ten

t [-

]

1 .4 0 1 .6 0 1 .8 0 2 .0 0 2 .2 0

n [- ]

0 .0 0

0 .0 2

0 .0 4

0 .0 6

0 .0 8

Re

sid

ua

l W

ate

r C

on

ten

t [-

]

RESPONSE SURFACE ANALYSIS:

Can also be used to investigate parameter sensitivity and parameter correlation

ITERATIVE METHODS FOR PARAMETER ESTIMATION

MANUAL PARAMETER ESTIMATION (HAND CALIBRATION)

Advantage: Simple to implement

Disadvantage: subjective, time-consuming and requires considerable experience

COMPUTERIZED ALGORITHMS (AUTOMATIC CALIBRATION)

Advantage: Objective and more efficient

Disadvantage: Complicated and typically requires programming experience and familiarity with technical jargon and cluster computers

Page 25: PARAMETER OPTIMIZATION USING INVERSE MODELING

5/15/2015

25

Global search methods can handle complex response surfaces with multimodal optima and are therefore capable of handling a relatively large number of parameters

SOME PRELIMINARY CONCLUSIONS …