Adjoint based gradient calculation - advantantages and challenges Bjarne Foss, Ruben Ringset The Norwegian University of Science & Technology – NTNU IO center Outline Motivation A simple example to illustrate the potential of adjoints Where are the hurdles? Conclusions
Motivation Model Norne field StatoilHydro Eni, Petoro Data
Motivation + now now time history Parameter estimation well schedule model simulator forecast for k=1 to N ...simulate(k) end + Optimize Let us take a look at some important workflows Uncertainty
Optimization requires a large number of gradient calculations Motivation Inlet separator Pipelines/tankers Market Reservoir Wells Pipelines Process Utilities Reservoir and well models (Eclipse) Network model (GAP, MaxPro, OLGA) Process model (HYSIS) Application Value chain optimization Optimization requires a large number of gradient calculations Efficient gradient computations are important
A simple example
A simple example
A simple example
The explicit Jacobian exists A simple example The explicit Jacobian exists
Adjoint gradient computation
Adjoint gradient computation Forward simulation
Adjoint gradient computation One forward simulation One reverse simulation
Forward method N forward simulations (nested loops)
The output constraint challenge – possible remedies Reducing the number of constraints Enforcing them on parts of a prediction horizon Lumping output constraints together One interesting application of this is found in the Standford GPRS reservoir simulator (Sarma et al, 2006)
The output constraint challenge The feasible cone for the lumped constraints will be at least as large as the true feasible cone given by the null space of the active constraints In GPRS they found a way to recover from such a situation by exploiting information about the structure of the model, in particular u->z
The output constraint challenge – possible remedies Reducing the number of constraints Enforcing them on parts of a prediction horizon Lumping output constraints together One interesting application of this is found in the Standford GPRS reservoir simulator (Sarma et al, 2006) Taking advantage of barrier or interior point optimization methods Removing output constraints without introducing slack variables Model constraints (i.e. equality constraints) can be removed by a single shooting method (in eg. MPC)
Adjoint based gradient calculation - advantantages and challenges Conclusions Adjoint based gradient calculation may give huge improvements in run-time Output constraints is a challenge
Once again - A very simple example Let Lagrangian function and assume that is the independent variable, i.e. Compute the gradient wrt Choose (”reverse simulation”)