First experiments of Automatic Differentiation on some ... EuroAd... · Tapenade on recent MONOPYRO...

Post on 19-Jul-2020

3 views 0 download

transcript

09/12/2010 1

ALESTRA Stéphane, SRITHAMMAVANH Vassili

EADS INNOVATION WORKS

First experiments of AutomaticDifferentiation on some inverse problemsin aerospace applications.

11th European Workshop on Automatic Differentiation

Cranfield (UK) 09/12/10

S.Alestra / V.Srithammavanh

2

EADS INNOVATION WORKS

• EADS : European Aeronautic Defence and Space company

Civil and military aircraft

Satellites and space rockets

Helicopters

Communication systems

• EADS IW : INNOVATION WORKS (Research Center)

EADS Technical innovation potential

Link between EADS Business Units and Academics laboratories

S.Alestra / V.Srithammavanh09/12/2010

EADS IW Applied Mathematics & Simulation Research Team

Historically, competencies in Inverse methods and Optimal Control

Then,develop progressively competencies in Optimization

I Identification of aerodynamic coefficients

E.Leibenguth, A.Charpe, V.Srithammavanh, S.Alestra

• Context : Trajectory control of Atmospheric re-entry probe

• Necessary to identify accurately the aerodynamic behaviour of theprobe

• Frame of the study

Trajectory measurements on ground with probe’s shot by acannon

Determine the aerodynamic coefficients

09/12/2010 3S.Alestra / V.Srithammavanh

State vector

Direct problem : to model the probe movement

• Aerodynamic forces

DRAG LIFT

• 2D Dynamics equation solved by RUNGE-KUTTA (RK4)

Dynamic pressure Reference area

• Aerodynamic moment

with

mqmLD CCCC ,,,

depending on

09/12/2010 4S.Alestra / V.Srithammavanh

Aerodynamic coefficients

Angle of attack

Velocity

Position

Anglular velocity

Inverse problem : coefficients identification

• Problem : reconstruct the aerodynamic coefficient from measurements of angle of attack and velocity

• Parameter: iimqmaNAii MCmCCCMp ,,,,,

• Constrained minimization

•TO COMPUTE Gradient

subject to :

tables

p

j

Dimension of parameters = around 1000=4*50*50

Use adjoint techniques

• Manual

• AD

09/12/2010 5S.Alestra / V.Srithammavanh

)(XFpX p

f : norm

Numerical resolution usingAutomatic Differentiation (AD)

and Optimization• Gradient computation

Adjoint / Gradients obtained manually by Optimal control

AD : allows to obtain automatically this adjoint of time from the Fortran 77 trajectory code

TAPENADE mode REVERSE

• OPTIMIZATION

Quasi Newton / GRG / SQP

)(,

insystemadjointbackwardobtainto0

)(,)(),,(Lagrangian

XFpp

j

X

XJ

X

XF

X

L

XFXXJXpL

p

p

p

09/12/2010 6S.Alestra / V.Srithammavanh

Storing all X(t) and use (t) to compute gradients

Adjoint equation

Direct equation

t=0 t=T

X (t)

(t)

t=0 t=T

X (t)

(t)

Checkpointing : Store intermediate snapshot ofX and regenerate X at the same time than

X0

X4X3

ADJOINT

0)(

T

X

XJ

X

XFp

0)0(

)(

XX

XFpX p

)(, XFpp

jp

GRADIENTS

GRADIENTSADJOINT

DIRECT

Gradients

Cost of Gradients computation

To analyze with INRIA Sophia

DIRECT

09/12/2010 7S.Alestra / V.Srithammavanh

Numerical results

• Angle of attack measurements / simulation • Identification of Aerodynamic moment

• Good results :

• Aerodynamic coefficients obtained consistent with trajectory physics

• BUT Necessity of efficient / powerful large scale optimizers (number parameters > 5000 )• Investigations with Edimburgh University, Cerfacs, …

mach

machalpha

alpha

Restitution in(t)

09/12/2010 8S.Alestra / V.Srithammavanh

Long time

Intermediate time

Industrial context :

Atmospheric re-entry missions

Design and sizing of the Thermal Protection System (TPS)

Heat fluxes identification : very important industrial interest

ARD Huygens probe (on Titan)

II Inverse method for non linear ablative thermicsS.Alestra, J.Collinet (EADS), F.Dubois (CNAM)

40 Th AIAA Thermophysics, Seattle (June 08)International Journal of Engineering Systems Modelling and Simulation (IJESMS) 2009

09/12/2010 9S.Alestra / V.Srithammavanh

Identify heat fluxes from temperature measurements ?

(t)p(t)= (t) ?

09/12/2010 10S.Alestra / V.Srithammavanh

THE INVERSE PROBLEM

Heat fluxes

Temperature sensor

Thermal Protection System

Ablation & Pyrolyses

Direct Problem

Temperatures

Ablation

etsx )(1

etsxtt

xsTxT

pWFdt

dW

f ,,,0

0)0,()0,(

,

0

s

TW

1,0 ,t

s

e

T1 T2 T3

(t)

X (t)

09/12/2010 p11

(function of time t and position X)

• Remark : use of reduced variables

• State vector

• Model

• « Monopyro » : one dimensional numerical tool (implement manual adjoint computation)

p :Heat FLUX

Direct Discrete scheme

K grid points, N time iterations in the numerical scheme

The equation is written at time (n+1) :

Assumption of MONOPYRO :Linearization at time n direct system, forward intime, stability

Nnw

wwpwdfpwft

ww nnnnnn

00

,,

0

11

sn

e

T1

T2

T3

θobs

nT1

nmT n

KT

nm

ns

Nnw

pwft

ww nnn

00

,

0

11

nnK

nnn sTTTw ,,,, 21

Cost Function

time domain unknown heat flux convection coefficient

Quadratic error or cost function j(p)

Measured temperature Computed temperature

we need the derivatives of J(p), with respect to p.

p is large scale input parameter = 2000 Need adjoint reverse mode

N

n

nm

nm

Wiables

N tTpwpwJpJ1

2

var

1 )(),...,()(

Nppp ,...,1

nmn

mT

09/12/2010 13S.Alestra / V.Srithammavanh

Adjoint System

Adjoint variable : dual multiplyer of

Lagrangian L + calculus of variations

Cancel the variations of L with respect to Direct system, forward in time

Cancel the variations of L with respect to w Adjoint system, backward in time

1

0

11

2/1

1

2

varint

2/12/1

var

11

,,,

,...,,,...,,,...,,,

N

n

nnnnnn

nN

n

nnm

iablesadjo

N

wiables

N

pparameter

N

wwpwdfpwft

wwtT

wwppLwpL

00

2,,

2/1

22/1122/112/12/1

nN

tTwwpwfdpwdft

N

nm

nm

nnnnnntnn

2/1nnw

Gradient computation (manually)

With this particular choice of , the gradient of the cost function is simplyobtained by :

Variations L function of p discrete gradients

Test using AD to compute automatically adjoint state with TAPENADE (INRIASophia Antipolis)

p

L

p

JJ

1

0

12/1 ,N

n

nnnnn wwwp

dfw

p

f

p

J

09/12/2010 15S.Alestra / V.Srithammavanh

Gradient : test with Automatic Differentiation Tapenade

),,,,,,,(1 ptwwwwfww knj

kni

nj

ni

ni

ni

ni

kni

knj

k jkn

i

knj

kni

nj

ni

kjn

ini

w

J

w

ptwwwwf

),,,,,,,(1

N

n

nm

nm

Wiables

N tTpwpwJJ1

2

var

1 )(),...,(

Direct problem instruction

Cost Function

Differentiation in reverse mode, with push, pop

Gradient computed by reverse mode

1

0

12/1 ,N

n

nnnnn wwwp

dfw

p

f

p

J

time

time

09/12/2010 p16

Heat flux identificationCarbon/Resin with ablation, pyrolysis

Results OK with pyrolysis and ablation – Good correlation beetwen ADand manual adjoint computation

Cost Function

09/12/2010 17S.Alestra / V.Srithammavanh

Convection restitution

ARD Heat flux identification

First use of the inverse method for ARD post-flight analysis

Good correlation between measurement and AD restitution

09/12/2010 18S.Alestra / V.Srithammavanh

Recent evolutions of MONOPYRO direct code (2009/2010)

• Add of Temperature, ablation, mass flow to state vector

• Multi layers

• Multi sensors

• Adapative grid in space & time

• At each time, non linear equation to solve F(U,p,t)=0

• Newton method with Fkinsol library

• Complexity of the Fortran code : common, interpolation tables switch, staticarray declaration, many imbricated routines

Tapenade tested for faisability study on this more complex and industrialproblem

09/12/2010 19S.Alestra / V.Srithammavanh

Tapenade on recent MONOPYRO direct code (2009/2010)

Tangent mode (linearization) is OK, but hard to obtain !

Complexity of the code, duplication of arrays with differentiation

CPU and memory constraints

First results are promising but costly (number of parameters)

Adjoint mode is under development

• Use reverse differentiation + mathematic adjoint algorithms

• Problem of storing and memory stack at backward sweep

TAPENADE has given good faisability results but still work to do !!

09/12/2010 20S.Alestra / V.Srithammavanh

• First promising applications of AD (TAPENADE) to 2 aerospace applications

• Collaboration with INRIA SOPHIA about TAPENADE

• Interest in AD Hessian calculation to improve optimization

• Interest to know best practices and methodological guidelines in AD

• Extension to Fortran 95 and C language and check

• Checkpointing use to optimize adjoint backward calculations and performances

• Future possible applications inside EADS : sensitivity analysis, shape optimization,…

Conclusion / Perspectives

09/12/2010 21S.Alestra / V.Srithammavanh

THANK YOU FOR YOUR ATTENTION !!!!