Part 12 Hands-on examples of imprecise simulation in engineering - - PowerPoint PPT Presentation

part 12 hands on examples of imprecise simulation in
SMART_READER_LITE
LIVE PREVIEW

Part 12 Hands-on examples of imprecise simulation in engineering - - PowerPoint PPT Presentation

Friday 9:00-10:30 Part 12 Hands-on examples of imprecise simulation in engineering (continued) by Edoardo Patelli and Jonathan Sadeghi 342 Hands-on examples of imprecise simulation in engineering (continued) Outline Theory Metamodels


slide-1
SLIDE 1

Friday 9:00-10:30

Part 12 Hands-on examples of imprecise simulation in engineering (continued)

by Edoardo Patelli and Jonathan Sadeghi

342

slide-2
SLIDE 2

Hands-on examples of imprecise simulation in engineering (continued)

Outline

Theory Metamodels Interval Predictor Models Random Predictor Models Applications History Matching Simple Function IC Fault Model Example

343

slide-3
SLIDE 3

Hands-on examples of imprecise simulation in engineering (continued)

Outline

Theory Metamodels Interval Predictor Models Random Predictor Models Applications History Matching Simple Function IC Fault Model Example

344

slide-4
SLIDE 4

Metamodels

◮ If the full model is too computationally expensive to do many

simulations, or we have simulation results (or real data!) already available we can replace the full model with an approximation:

◮ Response Surfaces, Polyharmonic Spline, Neural Networks... ◮ Interval Predictor Models and Random Predictor Models. ◮ A good approximation should fit existing data well and

generalise well to new data

METAMODEL

E.g. Response Surface, Polyhar- monic Spline, Neural Network (< 1 second)

Design Variables Response Variables FULL MODEL

E.g. Finite Element Model (hours or days?)

Design Variables Response Variables

TRAINING

345

slide-5
SLIDE 5

Interval/Random Predictor Model

◮ IPMs and RPMs are new types of metamodel with favourable

properties for dealing with scarce/limited data.

◮ The variance in the data can be robustly estimated without

making unjustified assumptions (distribution of noise, for example).

◮ The reliability of the metamodel can be bounded (more on this

later). −5 5 −20 20 40 x y −5 5 −20 20 40 x y

346

slide-6
SLIDE 6

Hands-on examples of imprecise simulation in engineering (continued)

Outline

Theory Metamodels Interval Predictor Models Random Predictor Models Applications History Matching Simple Function IC Fault Model Example

347

slide-7
SLIDE 7

Interval Predictor Models - Mathematics

◮ An IPM is defined as a function returning an interval for each

vector x ∈ X

◮ i.e.

Iy(x, P) = {y = M(x, p), p ∈ P} (52)

◮ Crespo (2016) considers for example:

Iy(x, P) =

  • y = pTφ(x), p ∈ P
  • (53)

◮ p is a member of the hyper-rectangular uncertainty set:

P =

  • p : p ≤ p ≤ ¯

p

  • (54)

◮ IPM

Iy(x, P) = [y(x, ¯ p, p), ¯ y(x, ¯ p, p)] (55)

348

slide-8
SLIDE 8

How to train a type 1 IPM

y(x, ¯ p, p) = ¯ pT φ(x) − |φ(x)| 2

  • + pT

φ(x) + |φ(x)| 2

  • (56)

¯ y(x, ¯ p, p) = ¯ pT φ(x) + |φ(x)| 2

  • + pT

φ(x) − |φ(x)| 2

  • (57)

◮ Can use polynomial or radial basis ◮ To find a good model attempt to minimise (expected value of):

δy(x, ¯ p, p) = (¯ p − p)T|φ(x)| (58) with the constraints that all data points to be fitted lie within these bounds and that the upper bound is greater than the lower bound

◮ i.e. we solve a linear optimisation program ◮ These constraints give a type 1 IPM

349

slide-9
SLIDE 9

Outliers

◮ Two criterion are used to find outliers: ◮ We can find a CDF for the distance of each p from the centre

  • f the uncertainty set and then identify a fraction λp of points

which prevent the interval being further minimised

◮ We can find the fraction λe of points with the furthest squared

distances from the LS fit

◮ Points satisfying both criterion can be disregarded as outliers -

then we can retrain with the new subset of points

◮ The analyst must make a sensible choice of λp and λe

350

slide-10
SLIDE 10

Reliability

◮ For reliability parameter ǫ and confidence parameter β

satisfying k + d − 1 k k+d−1

  • i=0

N i

  • ǫi(1 − ǫ)N−i ≤ β,

(59)

◮ the confidence and reliability parameters of the IPM are

bounded by ProbPn[R ≥ 1 − ǫ] ≥ 1 − β. (60) 0 0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1

Confidence Lower Bound (1 − β) Reliability Lower Bound (1 − ǫ)

351

slide-11
SLIDE 11

Hands-on examples of imprecise simulation in engineering (continued)

Outline

Theory Metamodels Interval Predictor Models Random Predictor Models Applications History Matching Simple Function IC Fault Model Example

352

slide-12
SLIDE 12

Random Predictor Models

◮ A function returning a random variable for each vector x ∈ X

Crespo (2015) considers for example: Ry(x, P) =

  • y = pTφ(x), p : Fp(p), p ∈ P
  • (61)

◮ it can be shown that:

p ≤ µ ≤ ¯ p 0 ≤ ν ≤ (µ−p)⊙(¯ p−µ) −1 ≤ c ≤ 1 (62) C(ν, c) 0 (63)

◮ σ surface connects all outputs τ standard deviations from µ

Iσ(x, µ, −τ, ν) = [l(x, µ, −τ, ν, c), l(x, µ, τ, ν, c)] (64)

νy(x, ν, c) = φ(x)C(ν, c)φ(x) (65) µy(x, µ) = µTφ(x) (66)

353

slide-13
SLIDE 13

Type 1 RPM - Optimisation program

l(x, µ, τ, ν, c) = µTφ(x) + τ

  • νy(x, ν, c)

(67)

◮ µ is found by any means - least squares is commonly used. ◮

ˆ ν = argmin

ν≥0

  • E[νy(x, µ)] :

l(xi, µ, −σmax, ν, c) ≤ yi ≤ l(xi, µ, σmax, ν, c) for i = 1, ..., N

  • (68)

◮ σmax is chosen by analyst to decide number of standard

deviations from mean containing all data points.

◮ Reliability assessment from IPM applies to

Iσ = [l(xi, µ, −σmax, ν, c), l(xi, µ, σmax, ν, c)] also.

◮ Similar outlier removal algorithm possible (distance from

mean, normalised by variance).

◮ We can also use Type 2 RPMs (chance constrained

formulation where constraint violation is allowed).

354

slide-14
SLIDE 14

Implementation

◮ Implemented a class to construct IPMs/RPMs in generalized

uncertainty quantification software OpenCOSSAN

◮ Training, Reliability evaluation, Outlier removal are all

performed automatically in OOP framework, with choice of

  • ptimisers/basis type/additional constraints and more

−4−2 0 2 4 −4 −2 2 4 2 4 ·105

355

slide-15
SLIDE 15

Hands-on examples of imprecise simulation in engineering (continued)

Outline

Theory Metamodels Interval Predictor Models Random Predictor Models Applications History Matching Simple Function IC Fault Model Example

356

slide-16
SLIDE 16

Hands-on examples of imprecise simulation in engineering (continued)

Outline

Theory Metamodels Interval Predictor Models Random Predictor Models Applications History Matching Simple Function IC Fault Model Example

357

slide-17
SLIDE 17

What is History Matching?

◮ A type of model calibration ◮ If we have some real data and a model with some free

parameters which we wish to tune to reproduce the data

◮ Many methods ◮ Bayesian Inversion is popular ◮ See Tarantola, Inverse Problem Theory or Carter, J. N. "Using

Bayesian statistics to capture the effects of modelling errors in inverse problems."

◮ Usually use least squares objective function between data and

model output - and a clever optimisation algorithm!

358

slide-18
SLIDE 18

Hands-on examples of imprecise simulation in engineering (continued)

Outline

Theory Metamodels Interval Predictor Models Random Predictor Models Applications History Matching Simple Function IC Fault Model Example

359

slide-19
SLIDE 19

Simple Example

◮ As in Carter (2004), the following function will be taken as a

black box f (z) = (z2 + 0.1z)2 + η1, (69)

◮ Data provided is for z = 2 to z = 7 - challenge is to predict

z = 10

◮ The ’model’ we have to match is g(q, z) = zq

2 4 6 1,000 2,000 3,000 z f (z)

360

slide-20
SLIDE 20

◮ As you can see I fitted an IPM to the data. New objective

function for simulations: ∆(q) =

C(q)

  • i=0

D i

  • R∗i(1 − R∗)D−i,

(70)

◮ Then find feasible q:

2 4 6 0.2 0.4 0.6 0.8 1 q ∆(q)

361

slide-21
SLIDE 21

◮ Which enables us to make predictions...

9 9.5 10 10.5 11 0.5 1 1.5 ·104 z f (z)

362

slide-22
SLIDE 22

Hands-on examples of imprecise simulation in engineering (continued)

Outline

Theory Metamodels Interval Predictor Models Random Predictor Models Applications History Matching Simple Function IC Fault Model Example

363

slide-23
SLIDE 23

Imperial College Fault Model

◮ Model of a reservoir which has been producing oil for 36

months and has now started producing water (‘true’ data was produced using a hetrogenous model with added noise (3%)).

◮ The challenge is to predict future production using a finite

element model (homogenous)

◮ Good and low quality sand permeabilities and fault throw are

unknown - to be determined by matching history data with the true data.

◮ Database with ∼ 160000 simulation results available online

10 20 30 200 400 600 / Time / Water Production Rate /bpd True 10 20 30 200 400 600 / Time / Oil Production Rate /bpd True

364

slide-24
SLIDE 24

Simulations

10 20 30 40 200 400 600 800 1,000 Time Oil Production /bpd 10 20 30 40 500 1,000 1,500 Time Water Production Rate /bpd

365

slide-25
SLIDE 25

IC Fault

◮ Look for solutions with ∆(m) > 0.01

366

slide-26
SLIDE 26

Results

◮ Simulations close to minima of the objective function:

0 20 40 60 100 150 200 20

Fault Throw /ft Good Permeability Low Permeability

10 20 120 140 160 1 2

Fault Throw /ft Good Permeability Low Permeability

367

slide-27
SLIDE 27

Hands-on examples of imprecise simulation in engineering (continued)

Outline

Theory Metamodels Interval Predictor Models Random Predictor Models Applications History Matching Simple Function IC Fault Model Example

368

slide-28
SLIDE 28

An example for you to try

◮ Please refer to your handouts ◮ Your friend at the University requires help with some data

analysis.

◮ Use the programming language you prefer. I have provided

instructions on a numerical method. I have prepared a solution in Matlab, and hence have provided some Matlab hints.

◮ Please give an interval for the value of y at x = 1 with a

probability bound. −4 −2 2 4 10 20 30 x y

369

slide-29
SLIDE 29

Questions?

◮ Thank you. ◮ Jonathan Sadeghi ◮ J.C.Sadeghi@liverpool.ac.uk

370