Real-Time Optimization - CEPACcepac.cheme.cmu.edu/pasi2011/library/biegler/LB_rto.pdf · Dynamic...

26
6/24/11 1 Real-Time Optimization Data Reconciliation & Parameter Identification •Estimation problem formulations •Steady state model •Maximum likelihood objective functions considered to get parameters (p) Min p Φ(x, y, p, w) s.t. c(x, u , p, w) = 0 x X, p P Plant DR-PE c(x, u , p) = 0 RTO c(x, u, p ) = 0 APC y p u w On line optimization •Steady state model for states (x) •Supply setpoints (u) to APC (control system) •Model mismatch, measured and unmeasured disturbances (w) Min u F(x, u, w) s.t. c(x, u, p , w) = 0 x X, u U 9 RTO Characteristics Plant DR-PE c(x, u , p) = 0 RTO c(x, u, p ) = 0 APC y p u w •Data reconciliation – identify gross errors and consistency in data •Periodic update of process model identification •Usually requires APC loops (MPC, DMC, etc.) •RTO/APC interactions: Assume decomposition of time scales •APC to handle disturbances and fast dynamics •RTO to handle static operations •Typical cycle: 1-2 hours, closed loop 10

Transcript of Real-Time Optimization - CEPACcepac.cheme.cmu.edu/pasi2011/library/biegler/LB_rto.pdf · Dynamic...

Page 1: Real-Time Optimization - CEPACcepac.cheme.cmu.edu/pasi2011/library/biegler/LB_rto.pdf · Dynamic Real-time Optimization ... Simulation environments (e.g., ACM, gPROMS) and first principle

6/24/11 

Real-Time Optimization

Data Reconciliation & Parameter Identification

• Estimation problem formulations • Steady state model • Maximum likelihood objective functions considered to get parameters (p)

Minp Φ(x, y, p, w)

s.t. c(x, u, p, w) = 0 x ∈ X, p ∈ P

Plant

DR-PE c(x, u, p) = 0

RTO c(x, u, p) = 0

APC

y

p

u

w

On line optimization • Steady state model for states (x) • Supply setpoints (u) to APC (control system) • Model mismatch, measured and unmeasured disturbances (w)

Minu F(x, u, w) s.t. c(x, u, p, w) = 0 x ∈ X, u ∈ U

9

RTO Characteristics

Plant

DR-PE c(x, u, p) = 0

RTO c(x, u, p) = 0

APC

y

p

u

w

• Data reconciliation – identify gross errors and consistency in data • Periodic update of process model identification • Usually requires APC loops (MPC, DMC, etc.) • RTO/APC interactions: Assume decomposition of time scales

• APC to handle disturbances and fast dynamics • RTO to handle static operations

• Typical cycle: 1-2 hours, closed loop 10

Page 2: Real-Time Optimization - CEPACcepac.cheme.cmu.edu/pasi2011/library/biegler/LB_rto.pdf · Dynamic Real-time Optimization ... Simulation environments (e.g., ACM, gPROMS) and first principle

6/24/11 

RTO Consistency (Marlin and coworkers)

•  How simple a model is simple?

•  Plant and RTO model must be feasible for measurements (y), parameters (p) and setpoints (u)

•  Plant and RTO model must recognize (close to) same optimum (u*) => satisfy same KKT conditions

•  Can RTO model be tuned parametrically to do this?

11

RTO Stability (Marlin and coworkers)

•  Stability of APC loop is different from RTO loop

•  Is the RTO loop stable to disturbances and input changes?

•  How do DR-PE and RTO interact? Can they cycle?

•  Interactions with APC and plant? •  Stability theory based on small

gain in loop < 1. •  Can always be guaranteed by

updating process sufficiently slowly.

Plant

DR-PE c(x, u, p) = 0

RTO c(x, u, p) = 0

APC

y

p

u

w

12

Page 3: Real-Time Optimization - CEPACcepac.cheme.cmu.edu/pasi2011/library/biegler/LB_rto.pdf · Dynamic Real-time Optimization ... Simulation environments (e.g., ACM, gPROMS) and first principle

6/24/11 

RTO Robustness (Marlin and coworkers)

•  What is sensitivity of the optimum to disturbances and model mismatch? => NLP sensitivity

•  Are we optimizing on the noise?

•  Has the process really changed?

•  Statistical test on objective function => change is within a confidence region satisfying a χ2 distribution

•  Implement new RTO solution only when the change is significant

•  Eliminate ping-ponging 13

6

REACT OR E FFL UENT FROM  LOW PRES SURE   S EPARATOR

PREFLASH

MAIN FRA

C.

RECYCLEOIL

REFORMERNAPHT HA

C3/C4  

SPLITTER

nC4

iC4

C3

M IXED LPG

FUE L GAS

LIGHT NAPHT HA

ABSO

RBER/

STRIPP

ER

DEBUTA

NIZER

DIB

• square parameter case to fit the model to operating data. • optimization to determine best operating conditions

Existing process, optimization on-line at regular intervals: 17 hydrocarbon components, 8 heat exchangers, absorber/stripper (30 trays), debutanizer (20 trays), C3/C4 splitter (20 trays) and deisobutanizer (33 trays).

Real-time Optimization with rSQP Sunoco Hydrocracker Fractionation Plant

(Bailey et al, 1993)

Page 4: Real-Time Optimization - CEPACcepac.cheme.cmu.edu/pasi2011/library/biegler/LB_rto.pdf · Dynamic Real-time Optimization ... Simulation environments (e.g., ACM, gPROMS) and first principle

6/24/11 

7

Model consists of 2836 equality constraints and only ten independent variables. It is also reasonably sparse and contains 24123 nonzero Jacobian elements.

P = ziCi

G

i!G

" + ziCi

E

i!E

" + ziCi

Pm

m=1

NP

" # U

Cases Considered:

1. Normal Base Case Operation

2. Simulate fouling by reducing the heat exchange coefficients for the debutanizer

3. Simulate fouling by reducing the heat exchange coefficients for splitter feed/bottoms exchangers

4. Increase price for propane

5. Increase base price for gasoline together with an increase in the octane credit

Optimization Case Study Characteristics

8

Page 5: Real-Time Optimization - CEPACcepac.cheme.cmu.edu/pasi2011/library/biegler/LB_rto.pdf · Dynamic Real-time Optimization ... Simulation environments (e.g., ACM, gPROMS) and first principle

6/24/11 

Real-time Optimization: Components

Plant

DR-PE c(x, u, p) = 0

RTO c(x, u, p) = 0

APC

y

p

u

w

• Data reconciliation – identify gross errors and inconsistency in data • Periodic update of process model identification • Usually requires APC loops (MPC, DMC, etc.) • RTO/APC interactions: Assume decomposition of time scales

• APC to handle disturbances and fast dynamics • RTO to handle static operations

• Typical cycle: 1-2 hours, closed loop • What if steady state and dynamic models are inconsistent?

10

Dynamic On-line Optimization?

Plant

DR-PE c(x, x’, u, p) = 0

D-RTO

c(x, x’, u, p) = 0

PC

y

p

u

d

m

Goal: Integrate On-line Optimization with Advanced Process Control +Consistent, first-principle dynamic models +Prediction and extrapolation – not fitting and interpolation +Links to Off-line Decision-making - Leads to increase in computational complexity - Requires time-critical calculations

Essential for: • Inherently Dynamic processes • Nonstandard operations • Optimal disturbance rejection

Page 6: Real-Time Optimization - CEPACcepac.cheme.cmu.edu/pasi2011/library/biegler/LB_rto.pdf · Dynamic Real-time Optimization ... Simulation environments (e.g., ACM, gPROMS) and first principle

6/24/11 

11

Dynamic Real-time Optimization Integrate On-line Optimization/Control with Off-line Planning •  Consistent, first-principle models •  Consistent, long-range, multi-stage planning •  Increase in computational complexity •  Time-critical calculations

Applications •  Batch processes •  Grade transitions •  Cyclic reactors (coking, regeneration…) •  Cyclic processes (PSA, SMB…)

Continuous processes are never in steady state: •  Feed changes •  Nonstandard operations •  Optimal disturbance rejections

Simulation environments (e.g., ACM, gPROMS) and first principle dynamic models are widely used for off-line studies

8

Some DRTO Case Studies •  Integrated grade transitions

–  MINLP of scheduling with dynamics (Flores & Grossmann, 2006, Prata et al., 2007)

–  Significant reduction in transition times •  Dynamic Predictive Scheduling

–  Processes and supply chains need to optimally respond to disturbances through dynamic models

–  Reduction in energy cost by factor of two •  Cyclic Process Optimization

–  Decoking scheduling –  SMB optimization –  PSA optimization –  Productivity increases by factor of 2-3

9

Page 7: Real-Time Optimization - CEPACcepac.cheme.cmu.edu/pasi2011/library/biegler/LB_rto.pdf · Dynamic Real-time Optimization ... Simulation environments (e.g., ACM, gPROMS) and first principle

6/24/11 

13

On-line Issues: Model Predictive Control (NMPC)

Process

NMPC Controller

d : disturbances z : differential states y : algebraic states

u : manipulated variables

ysp : set points

( )( )dpuyzG

dpuyzFz,,,,0,,,,

=

=′

NMPC Estimation and Control

!

minu

J(x(k)) = "(zl ,ul )+F(zN )l= 0

N

#

s.t.zl+1 = f (zl ,ul )

z0 = x(k)

Bounds

NMPC Subproblem

Why NMPC?   Track a profile – evolve from

linear dynamic models (MPC)   Severe nonlinear dynamics (e.g,

sign changes in gains)   Operate process over wide range

(e.g., startup and shutdown)

Model Updater

( )( )dpuyzG

dpuyzFz,,,,0,,,,

=

=′

14

MPC - Background Motivate: embed dynamic model in moving horizon framework to drive

process to desired state •  Generic MIMO controller •  Direct handling of input and output constraints •  Slow time-scales in chemical processes – consistent with dynamic

operating policies

Different types •  Linear Models: Step Response (DMC) and State-space •  Empirical Models: Neural Nets, Volterra Series •  Hybrid Models: linear with binary variables, multi-models •  First Principle Models – direct link to off-line planning NMPC Pros and Cons + Operate process over wide range (e.g., startup and shutdown) + Vehicle for Dynamic Real-time Optimization - Need Fast NLP Solver for Time-critical, on-line optimization - Computational Delay from On-line Optimization degrades performance

Page 8: Real-Time Optimization - CEPACcepac.cheme.cmu.edu/pasi2011/library/biegler/LB_rto.pdf · Dynamic Real-time Optimization ... Simulation environments (e.g., ACM, gPROMS) and first principle

6/24/11 

15

Tennessee Eastman Process

Unstable Reactor

11 Controls; Product, Purge streams

Model extended with energy balances

16

Tennessee Eastman Challenge Process

Method of Full Discretization of State and Control Variables

Large-scale Sparse block-diagonal NLP

DAE Model Number of differential equations 30

Number of algebraic variables 152

Number of algebraic equations 141

Difference (control variables) 11

NLP Optimization problem Number of variables of which are fixed

10920 0

Number of constraints 10260

Number of lower bounds 780

Number of upper bounds 540

Number of nonzeros in Jacobian 49230

Number of nonzeros in Hessian 14700

Page 9: Real-Time Optimization - CEPACcepac.cheme.cmu.edu/pasi2011/library/biegler/LB_rto.pdf · Dynamic Real-time Optimization ... Simulation environments (e.g., ACM, gPROMS) and first principle

6/24/11 

17

Setpoint change studies

Setpoint changes for the base case [Downs & Vogel]

Process variable Type

Magnitude

Production rate change Step

-15% Make a step change to the variable(s) used to set the process production rate so that the product flow leaving the stripper column base changes from 14,228 to 12,094 kg h-1

Reactor operating pressure change Step

-60 kPa Make a step change so that the reactor operating pressure changes from 2805 to 2745 kPa

Purge gas composition of component B change Step

+2% Make a step change so that the composition of component B in the gas purge changes from 13.82 to 15.82%

18

Case Study: Change Reactor pressure by 60 kPa

Control profiles

All profiles return to their base case values

Same production rate

Same product quality

Same control profile

Lower pressure – leads to larger gas phase (reactor) volume

Less compressor load

Page 10: Real-Time Optimization - CEPACcepac.cheme.cmu.edu/pasi2011/library/biegler/LB_rto.pdf · Dynamic Real-time Optimization ... Simulation environments (e.g., ACM, gPROMS) and first principle

6/24/11 

10 

19

TE Case Study – Results I

Shift in TE process

Same production rate

More volume for reaction

Same reactor temperature

Initially less cooling water flow (more evaporation)

20

Case Study- Results II

Shift in TE process

Shift in reactor effluent to more condensables

Increase cooling water flow

Increase stripper steam to ensure same purity

Less compressor work

Page 11: Real-Time Optimization - CEPACcepac.cheme.cmu.edu/pasi2011/library/biegler/LB_rto.pdf · Dynamic Real-time Optimization ... Simulation environments (e.g., ACM, gPROMS) and first principle

6/24/11 

11 

21

Case Study: Change Reactor Pressure by 60 kPa

Optimization with IPOPT

1000 Optimization Cycles

5-7 CPU seconds

11-14 Iterations

Optimization with SNOPT

Often failed due to poor conditioning

Could not be solved within sampling times

> 100 Iterations

22

What about Fast NMPC? Fast NMPC is not just NMPC with a fast solver

Computational delay – between receipt of process measurement and injection of control, determined by cost of dynamic optimization

Leads to loss of performance and stability (see Findeisen and Allgöwer, 2004; Santos et al., 2001)

As larger NLPs are considered for NMPC, can computational delay be overcome?

Page 12: Real-Time Optimization - CEPACcepac.cheme.cmu.edu/pasi2011/library/biegler/LB_rto.pdf · Dynamic Real-time Optimization ... Simulation environments (e.g., ACM, gPROMS) and first principle

6/24/11 

12 

23

NMPC – Can we avoid on-line optimization? Divide Dynamic Optimization Problem:

•  preparation, feedback response and transition stages •  solve complete NLP in background (‘between’ sampling times) as part of preparation and transition stages •  solve perturbed problem on-line •  > two orders of magnitude reduction in on-line computation

Based on NLP sensitivity of z0 for dynamic systems •  Extended to Collocation approach – Zavala et al. (2008, 2009) •  Similar approach for MH State and Parameter Estimation – Zavala et al.

(2008)

Stability Properties (Zavala et al., 2009) •  Nominal stability – no disturbances nor model mismatch

–  Lyapunov-based analysis for NMPC •  Robust stability – some degree of mismatch

–  Input to State Stability (ISS) from Magni et al. (2005) •  Extension to economic objective functions

24

NLP Sensitivity Parametric Programming

NLP Sensitivity Rely upon Existence and Differentiability of Path Main Idea: Obtain and find by Taylor Series Expansion

Optimality Conditions

Solution Triplet

Page 13: Real-Time Optimization - CEPACcepac.cheme.cmu.edu/pasi2011/library/biegler/LB_rto.pdf · Dynamic Real-time Optimization ... Simulation environments (e.g., ACM, gPROMS) and first principle

6/24/11 

13 

25

NLP Sensitivity

Optimality Conditions of

Obtaining

Already Factored at Solution

Sensitivity Calculation from Single Backsolve

Approximate Solution Retains Active Set

KKT Matrix IPOPT

Apply Implicit Function Theorem to around

26

Solve NLP(k) in background (between tk and tk+1) 

Advanced Step Nonlinear MPC (Zavala, B., 2008)

!

min J(x(k), u(k)) = F(xk+N |k ) + "(xl |k,vl |k )l= k+1

k+N#1

$

s.t. xk+1|k = f (x(k),u(k))

xl+1|k = f (xl |k,vl |k ), l = k +1,...k +N -1

xl |k % X, vl |k %U, xk+N |k % X f

Solve NLP in background (between steps, not on‐line)  Update using sensiHvity on‐line 

tk           tk+1       tk+2         

u(k) 

x(k) 

tk+N 

xk+1|k 

Page 14: Real-Time Optimization - CEPACcepac.cheme.cmu.edu/pasi2011/library/biegler/LB_rto.pdf · Dynamic Real-time Optimization ... Simulation environments (e.g., ACM, gPROMS) and first principle

6/24/11 

14 

27

Solve  NLP(k) in background (between tk and tk+1) SensiHvity to update problem on‐line to get (u(k+1)) 

!

Wk

Ak

"I

Ak

T0 0

Zk

0 Xk

#

$

% % %

&

'

( ( (

)x

)*

)z

#

$

% % %

&

'

( ( (

=

0

!

xk+1|k " x(k +1)

0

#

$

% % % % %

&

'

( ( ( ( (

Advanced Step Nonlinear MPC (Zavala, B., 2008) Solve NLP in background (between steps, not on‐line)  Update using sensiHvity on‐line 

x(k)  x(k+1) u(k+1) 

u(k) 

tk           tk+1       tk+2          tk+N 

xk+1|k 

28

Solve  NLP(k) in background (between tk and tk+1) SensiHvity to update problem on‐line to get (u(k+1)) Solve  NLP(k+1) in background (between tk+1 and tk+2) 

Advanced Step Nonlinear MPC (Zavala, B., 2008)

!

min J(x(k +1), u(k +1)) = F(xk+N +1|k+1) + "(xl |k+1,vl |k+1)l= k+2

k+N

#

s.t. xk+2|k+1 = f (x(k +1),u(k +1))

xl+1|k+1 = f (xl |k,vl |k ), l = k +2,...k +N

xl |k+1 $ X, vl |k+1 $U, xk+N +1|k+1 $ X f

Solve NLP in background (between steps, not on‐line)  Update using sensiHvity on‐line 

tk           tk+1       tk+2          tk+N 

x(k)  x(k+1) 

u(k+1) u(k) 

xk+2|k+1 

Page 15: Real-Time Optimization - CEPACcepac.cheme.cmu.edu/pasi2011/library/biegler/LB_rto.pdf · Dynamic Real-time Optimization ... Simulation environments (e.g., ACM, gPROMS) and first principle

6/24/11 

15 

29

Stability Properties of asNMPC

Robust Stability Theorem (Zavala, B., 2008) Assume that the NLP can be solved within one sampling time, and that robust stability assumptions hold for ideal NMPC (Magni, Scattolini, 2007). Then there exist bounds on the noise, w, and model mismatch, g, for which the cost function JN+1(x), obtained from the asNMPC strategy, is an input-to-state (ISS)-Lyapunov function and the resulting closed-loop system is ISS stable.

Nominal Stability Theorem (Zavala, B., 2008) Assume that the NLP can be solved within one sampling time, nominal stability assumptions hold for ideal NMPC (Mayne, 2000), and the nonlinear model is perfect without measurement noise. Then ideal NMPC controller performance and asNMPC controller performance are identical. Ideal NMPC stability asNMPC stability.

x(k+1) = f(x(k), u(k)) – plant and model identical

x(k+1) = f(x(k), u(k)) + g(x(k), u(k), w(k)) plant and model not identical

30

NMPC for High Purity Distillation

Air Separation Unit in IGCC-based Power Plants • Need for high purity O2 • Respond quickly to changes in process demand • Large, highly nonlinear dynamic separation (MESH) models

Methanol distillation (Diehl, Bock et al., 2005) • 40 trays, 210 DAEs, 19746 discretized equations

Argon Recovery Column • 50 trays, 260 DAEs, 21306 discretized equations

Double Column ASU Case Study • 80 trays, 1520 DAEs, 116,900 discretized equations

Page 16: Real-Time Optimization - CEPACcepac.cheme.cmu.edu/pasi2011/library/biegler/LB_rto.pdf · Dynamic Real-time Optimization ... Simulation environments (e.g., ACM, gPROMS) and first principle

6/24/11 

16 

31

NonlinearModelPredictiveControl:AirSep’nUnit(Huang,B.,2008)

Objective:forcetheproductionratestofollowtheset-points,whilemaintheirpurities.4manipulatedvariables.4outputvariables.

L P Column

HP Column

30

20

31

19

1

15

25

40

26

C rude oxygen

L iquid Nitrogen

U3 (L N)

Heat exchanger & compressor

Gas Nitrogen

C rude Gas Nitrogen

A ir Feed

U1 (EA )

U2 (MA )

Pure oxygen

Pure nitrogenY 1 (POX )

Y 2 (PNI)

Temperature at the 30th trayY 3 (T l30)

Temperature at the 15th trayY 4 (Th15)

Reboiler Condenser

U4 (GN)

Horizon:100minutesin20finiteelements.Samplingtime:5minutes.

32

• Mesh Equations for Distillation Column

Mass balance:

Component balance:

Energy balance:

Phase equilibrium:

Hydrodynamics :

Assumption: Vapor holdups are negligible. Ideal vapor phases. Well mixed entering streams. Constant pressure drop. Equilibrium stage model.

Summation:

Mi

Li Vi+1

Vi Li-1

Index 2 system.

dM idt = L i ¡ 1 + Vi + 1 ¡ L i ¡ Vi + F i

Reformulated index 1 system contains 320 ODEs, 1200 AEs.

Fi

Case Study: Basic Air Separation Unit

Page 17: Real-Time Optimization - CEPACcepac.cheme.cmu.edu/pasi2011/library/biegler/LB_rto.pdf · Dynamic Real-time Optimization ... Simulation environments (e.g., ACM, gPROMS) and first principle

6/24/11 

17 

33

ASUNonlinearMPC-Case1

OutputVariablesManipulatedVariablesThegreendot-dashedlinesaretheset-points,thebluedashedlinesarethelinearcontrollerprofilesandredsolidlinesareAS-NMPCprofile.

t=30-60min,productratesarerampeddownby30%.t=1000-1030min,theyarerampedback.AS-NMPCiscomparedtoMPCwithlinearinput-outputempiricalmodel.

Allthetuningparametersarefavoredtothelinearcontroller.

34

BluedashedlinesareidealNMPCprofileRedlinesareAS-NMPCprofile.Incontrast,linearizedcontrollerisunstable

Att=30-60min,productratesarerampeddownby40%.Att=1000-1030min,theyarerampedback.5%disturbanceisaddedtoMi.

N=20,K=3320ODEs,1200AEs.Variables:117,140Constraints:116,900400NLPssolvedBackground:200CPUs,6iters.Online:1CPUsComputationalFeedbackDelayReducedfrom2001second.

NMPCofAirSeparationUnit–Case2(Huang,B.,2009)

Page 18: Real-Time Optimization - CEPACcepac.cheme.cmu.edu/pasi2011/library/biegler/LB_rto.pdf · Dynamic Real-time Optimization ... Simulation environments (e.g., ACM, gPROMS) and first principle

6/24/11 

18 

35

Parameter/State Estimation

Process

NMPC Controller

d : disturbances z : differential states y : algebraic states

u : manipulated variables

ysp : set points

( )( )dpuyzG

dpuyzFz,,,,0,,,,

=

=′

NMPC Estimation and Control Moving Horizon Estimation?   Estimate a finite number of

states and model parameters (unmeasured disturbances, rate constants, transport parameters)

  Compensate for process drifts and slowly changing conditions

  Allow better controller performance

Model Updater

( )( )dpuyzG

dpuyzFz,,,,0,,,,

=

=′

Parameter Estimation Subproblem

36

Moving Horizon Estimation (MHE)

Large State Dimensionality

Degrees of Freedom

Solution Time Order of Minutes Highly Nonlinear, Ill-Conditioned?

Linear Systems, No inequalities Kalman Filter for State Estimation Nonlinear Systems: Extended Kalman Filters in Practice Moving Horizon Estimation:

+ directly captures nonlinear dynamics, statistical behavior - need to solve NLP on-line

Can MHE be improved?

Page 19: Real-Time Optimization - CEPACcepac.cheme.cmu.edu/pasi2011/library/biegler/LB_rto.pdf · Dynamic Real-time Optimization ... Simulation environments (e.g., ACM, gPROMS) and first principle

6/24/11 

19 

37

Advanced Step Moving Horizon Estimation (as-MHE)

Given yl, zl, set “fake measurement” Solve  MN in background (between tl and tl+1) 

!

zl +1= f (zl ,wl ), y l +1

" #(zl +1)

Obtain measurement at tl+1, use KKT sensiHvity on‐line to get zl+1 Solve  P(l+1) in background (between tl+1 and tl+2) 

38

Offset-free Formulation •  Apply MHE results as state and output corrections for NMPC problem • Modify with an advanced step approach as-MHE

Combining MHE & NMPC (Huang,Patwardhan,B.,2010)

Page 20: Real-Time Optimization - CEPACcepac.cheme.cmu.edu/pasi2011/library/biegler/LB_rto.pdf · Dynamic Real-time Optimization ... Simulation environments (e.g., ACM, gPROMS) and first principle

6/24/11 

20 

39

Combined MHE and NMPC for ASU (Huang,B.,2010)

AMPL/IPOPT (DuoCore 2.4 GHz) NMPC background (6 iter/200 CPUs) MHE background (15 iter/90 CPUs)

• N=5, K=3 • 29,285 constraints • 30,885 variables

Online NMPC+MHE ~ 2 CPUs

Change in model mismatch (hydraulic parameter) •  Setpoint •  MHE/NMPC with correction •  NMPC without correction

40

D-RTO with Economic Objectives Beyond NMPC Tracking

Plant

DR-PE c(x, u, p) = 0

RTO c(x, u, p) = 0

APC

y

p

u

w

Plant

DR-PE c(x, x’, u, p) = 0

D-RTO c(x, x’, u, p) = 0

PC

y

p

u

m

Benefits of combining RTO with NMPC? • Direct, dynamic production maximization • Remove artificial tracking objective • Remove artificial steady state problem

Page 21: Real-Time Optimization - CEPACcepac.cheme.cmu.edu/pasi2011/library/biegler/LB_rto.pdf · Dynamic Real-time Optimization ... Simulation environments (e.g., ACM, gPROMS) and first principle

6/24/11 

21 

41

Challenges with D-RTO Replace regulation objective with economic objective in NMPC?

Active ongoing activity: •  Bartusiak (2007) •  Chachuat et al. (2008) •  Dadhe and Engell (2008), Engell (2007, 2009) •  Diehl and Rawlings (2009), Rawlings and Amrit (2009) •  Kadam et al. (2008) •  Zavala, B. (2009) •  Swartz et al. (2010)

must be a K∞ function Sufficient Condition:

• Satisfy weak controllability condition

• Regularize economic objective so that NLP satisfies SSOC (and LICQ, SC)

Many Open Questions Still Remain

- need to assume an optimal steady state profit?

- how to consider periodic problems?

!

Min wl"(z

l,u

l){ } + F(z

N)

l

#

!

"(z,u)

42

Chain-Transfer Agent

LDPE

Flowrate Ethylene Inlet Temperatures

Low-Pressure Recycle

Hyper-Pressure Recycle

Ethylene Cold-Shots

Centralized Control Objectives: + Capture Complex Multivariable Interactions Between Zones

Control of Product Quality, Fouling Management + Perform Fast Grade Transitions (Highly Frequent)

Initiators Initiators Initiators Initiators

Centralized Model-Based Control

Recycle System and Flash Separation

Low-Density Polyethylene Process (Zavala, B., 2009)

Page 22: Real-Time Optimization - CEPACcepac.cheme.cmu.edu/pasi2011/library/biegler/LB_rto.pdf · Dynamic Real-time Optimization ... Simulation environments (e.g., ACM, gPROMS) and first principle

6/24/11 

22 

43

LDPE Kinetic Model

~ 35 Elementary Reactions ~100 Kinetic Parameters

  Complex Kinetic Mechanisms

44

Time (Days)

Heat Transfer Coefficient

Fouling

Defouling

Persistent Dynamic Disturbances – Strong Effect on Profitability

Cannot Remove Heat of Reaction - Drop Production to Avoid Runaway

Potential Economic Benefits + 1% Production 0.01 x (300,000 Ton/yr) x (1,500 $/Ton) = +4,500,000 $/yr

Case Study: Low-Density Polyethylene Process

Page 23: Real-Time Optimization - CEPACcepac.cheme.cmu.edu/pasi2011/library/biegler/LB_rto.pdf · Dynamic Real-time Optimization ... Simulation environments (e.g., ACM, gPROMS) and first principle

6/24/11 

23 

45

LDPE Process Model Cw Cw

1 2 NZ

Cw Cw

Cw

Cw

Ethylene

Initiator(s) Initiator(s)

LDPE

Reaction Cooling Reaction

Conservation Mass, Energy, Momentum Thermodynamic & Transport Properties

Boundary Conditions

•  Fouling must be estimated (using MHE) •  Reference tracking inadequate!

Initial Conditions

Output Mapping Measured Outputs

States Inputs Parameters

46

NMPC-MHE Scenario LDPE NMPC – Computational Performance - Full-Discretization + IPOPT (MA57) - NLP ~ 50,000 Constraints, 300 Degrees of Freedom (DOF)

Sampling Time = 2 min

- Scale-Up With Prediction Horizon and Effect of KKT Matrix Reordering

NLP with 350,000 Constraints and 1,000 DOF Solved in ~ 2-3 Minutes

Nested Dissection Minimum Degree

Original

Reordered

Page 24: Real-Time Optimization - CEPACcepac.cheme.cmu.edu/pasi2011/library/biegler/LB_rto.pdf · Dynamic Real-time Optimization ... Simulation environments (e.g., ACM, gPROMS) and first principle

6/24/11 

24 

47

3% More Production

NMPC Case Study – Economic Objective Maximize Production

Reference Profile

Economics-Oriented NMPC Moves Away from Suboptimal Reference Profile

Distributes Production Efficiently - More Production in Less Fouled Zones

Purely Economic Objective Leads to Ill-Posed Problems Need Regularization Term Due to Guarantee Stability

Minimize Transition Time

Core Temperature

Overall Production

Economics-Oriented Tracking

48

Dynamic optimization essential for many processes Batch processes Polymer processes (especially grade transitions) Periodic adsorption processes

Chemical Process Operations: RTO D-RTO Need for First-Principles Dynamic Models Extension to On-Line Economic Decision-Making NMPC and MHE Computational Strategies Full-Discretization + Fast Sensitivity Calculations Large Scale Models Basic ASU process with DAE model LDPE Process with NMPC and RTO Advantages over linear MPC Extension to Uncertainties – NMPC + MHE Formulations

Conclusions

Page 25: Real-Time Optimization - CEPACcepac.cheme.cmu.edu/pasi2011/library/biegler/LB_rto.pdf · Dynamic Real-time Optimization ... Simulation environments (e.g., ACM, gPROMS) and first principle

6/24/11 

25 

References F. Allgöwer and A. Zheng (eds.), Nonlinear Model Predictive Control, Birkhaeuser, Basel (2000) R. D. Bartusiak, “NLMPC: A platform for optimal control of feed- or product-flexible manufacturing,” in Nonlinear Model Predictive Control 05, Allgower, Findeisen, Biegler (eds.), Springer (2007) Biegler Homepage: http://dynopt.cheme.cmu.edu/papers.htm Biegler, L. T., Nonlinear Programming: Concepts, Algorithms and Applications to Chemical Engineering, SIAM (2010) Forbes, J. F. and Marlin, T. E.. Model Accuracy for Economic Optimizing Controllers: The Bias Update Case. Ind.Eng.Chem.Res. 33, 1919-1929. 1994 Forbes, J. F. and Marlin, T. E.. “Design Cost: A Systematic Approach to Technology Selection for Model-Based Real-Time Optimization Systems,” Computers Chem.Engng. 20[6/7], 717-734. 1996 M. Grötschel, S. Krumke, J. Rambau (eds.), Online Optimization of Large Systems, Springer, Berlin (2001) K. Naidoo, J. Guiver, P. Turner, M. Keenan, M. Harmse “Experiences with Nonlinear MPC in Polymer Manufacturing,” in Nonlinear Model Predictive Control 05, Allgower, Findeisen, Biegler (eds.), Springer, to appear Yip, W. S. and Marlin, T. E. “Multiple Data Sets for Model Updating in Real-Time Operations Optimization,” Computers Chem.Engng. 26[10], 1345-1362. 2002.

42

References – Some DRTO Case Studies Busch, J.; Oldenburg, J.; Santos, M.; Cruse, A.; Marquardt, W. Dynamic predictive scheduling of operational strategies for continuous processes using mixed-logic dynamic optimization, Comput. Chem. Eng., 2007, 31, 574-587. Flores-Tlacuahuac, A.; Grossmann, I.E. Simultaneous cyclic scheduling and control of a multiproduct CSTR, Ind. Eng. Chem. Res., 2006, 27, 6698-6712. Kadam, J.; Srinivasan, B., Bonvin, D., Marquardt, W. Optimal grade transition in industrial polymerization processes via NCO tracking. AIChE J., 2007, 53, 3, 627-639. Oldenburg, J.; Marquardt, W.; Heinz D.; Leineweber, D. B., Mixed-logic dynamic optimization applied to batch distillation process design, AIChE J. 2003, 48(11), 2900- 2917. E Perea, B E Ydstie and I E Grossmann, A model predictive control strategy for supply chain optimization, Comput. Chem. Eng., 2003, 27, 1201-1218. M. Liepelt, K Schittkowski, Optimal control of distributed systems with breakpoints, p. 271 in M. Grötschel, S. Krumke, J. Rambau (eds.), Online Optimization of Large Systems, Springer, Berlin (2001) V. M. Zavala, and L.T.Biegler, “Optimization-Based Strategies for the Operation of Low-Density Polyethylene Tubular Reactors: Nonlinear Model Predictive Control," Computers and Chemical Engineering, 33, pp. 1735-1746 (2009)

See also Biegler homepage 43

Page 26: Real-Time Optimization - CEPACcepac.cheme.cmu.edu/pasi2011/library/biegler/LB_rto.pdf · Dynamic Real-time Optimization ... Simulation environments (e.g., ACM, gPROMS) and first principle

6/24/11 

26 

51

For more details…

MOS-SIAM Series on Optimization • NLP Theory and Algorithms • Steady State Process Optimization • Dynamic Process Optimization

• Optimal Control • Sequential Approaches • Simultaneous Approaches

• Mathematical Programs with Complementarity Constraints

For more information: http://www.siam.org/catalog