Anda di halaman 1dari 38

Real-Time Optimization

"

of Chemical Processes

Dominique Bonvin, Grgory Franois and Gene Bunin


Laboratoire dAutomatique
EPFL, Lausanne
SFGP, Lyon 2013

Real-Time Optimization of a Continuous Plant


Disturbances!
Long term
week/month!

Market Fluctuations,
Demand, Price!

Decision Levels!
Planning & Scheduling!
Production Rates
Raw Material Allocation!

Measurements!

Medium term
day!

Catalyst Decay, Changing


Raw Material Quality!

Real-Time Optimization!
Optimal Operating
Conditions - Set Points!

Measurements!

Short term
second/minute!

Fluctuations in
Pressure, Flowrates,
Compositions!

Control!
Measurements!

Manipulated
Variables!

Large-scale complex
processes!
Changing conditions!
Real-time adaptation!
2

Optimization of a Discontinous Plant


RECIPE

BATCH PLANT

PRODUCTS

Differences in Equipment and Scale


mass- and heat-transfer characteristics!
surface-to-volume ratios!
operational constraints!

LABORATORY

Sca

le-u
p"

Production Constraints
meet product specifications!
meet safety and environmental constraints!
adhere to equipment constraints!

PRODUCTION
Different conditions Run-to-run adaptation!
3

Outline
What is real-time optimization
o Goal: Optimal plant operation
o Tool: Model-based numerical optimization, experimental optimization
o Key feature: use of real-time measurements

Real-time optimization framework


o Three approaches
o Key issues: Which measurements? How to best exploit them?
o Simulated comparison

Experimental case studies


o Fuel-cell stack
o Batch polymerization
4

Static Optimization Problem


Optimize the steady-state performance of a (dynamic) process !
while satisfying a number of operating constraints!
Model-based Optimization!

Plant!

( )
( u ) := g ( u, y ) 0

min

p ( u ) := p u, y p

s. t.

Gp

F ( u, y, ) = 0
min
u

(u) := ( u, y )

s. t. G ( u ) := g ( u, y ) 0

NLP"

?
u ?
(set points)!

u?
(set points)!
5

Dynamic Optimization Problem


Optimize the dynamic performance of a (dynamic) process !
while satisfying a number of operating constraints!
Plant!

min := x p (t f )

u[0,t f ]

s. t.

Model-based Optimization!

min

u[0,t f ]

S(x p , u) 0

s. t.

T x p (t f ) 0

:= x(t f ),

x = F(x, u, ) x(0) = x 0
S(x, u, ) 0

T x(t f ), 0
?

u(t)

x p (t f )

u(t) ?

Predicted
States x(t)
6

Run-to-Run Optimization of a Batch Plant


x p (t f )

u(t)

:= x(t f ),

min

u[0,t f ]

s. t.

x = F(x, u, ) x(0) = x 0
S(x, u, ) 0

T x(t f ), 0

Batch plant with!


finite terminal time!

u(t)!
umax"

Input Parameterization

u 1!

u[0,t f ] = U( )
umin"
0"

Gp
Batch plant!
viewed as a static map!

t1!

t2!

t f"

min ( , )

s. t.

G ( , ) 0

NLP"

Outline
What is real-time optimization
o Goal: Optimal plant operation
o Tool: Model-based numerical optimization, experimental optimization
o Key feature: use of real-time measurements

Real-time optimization framework


o Three approaches
o Key issues: Which measurements? How to best exploit them?
o Simulated comparison

Experimental case studies


o Fuel-cell stack
o Batch polymerization
8

Example of Plant-Model Mismatch


Williams-Otto reactor
FA , X A,in = 1

FB , X B,in = 1

TR

3-reaction system
A+BC
B+CP+E
C+PG

2-reaction model
k1!

A + 2B P + E
k2!

A+B+P G

Objective: maximize operating profit


F = FA + FB
X A , X B , XC , X E , XG , X P

Model
- 4th-order model
- 2 inputs
- 2 adjustable parameters (k10, k20)

Three RTO Approaches


How to best exploit the measurements?"
Optimization in the presence
of Uncertainty

input update: u
u* arg min (u, y)
u

parameter update:

s.t. F(u, y,) = 0

No Measurement:
Robust Optimization

Measurements:
Adaptive Optimization

Adaptation of
Model Parameters

Adaptation of
Cost & Constraints

- two-step approach
(repeated identification
and optimization)

- bias update
- constraint update
- gradient correction
- modifier adaptation

g(u, y) 0

cost & constraint update: g,

Adaptation of
Inputs.
- tracking active constraints
- NCO tracking
- extremum-seeking control
- self-optimizing control
10

1. Adaptation of Model Parameters


Two-step approach

FA , X A,in = 1

FB , X B,in = 1

TR

F = FA + FB
X A , X B , XC , X E , XG , X P

Williams-Otto Reactor
- 4th-order! model
- 2 inputs
- 2 adjustable par.

Does not
converge to plant
optimum
11

Two-step approach

Parameter Estimation Problem!


k* arg min

J kid

Optimization Problem!
uk +1 arg min
u

J kid = yp (uk ) y(uk , ) Q yp (uk ) y(uk , )

s.t.

u, y(u, k )

g u, y(u, k ) 0

uL u uU

uk +1 uk
Optimization!

y(u , )
*
k

k*
Parameter!
Estimation!

*
k

y p (uk )

Plant!
at!
steady state!

Current Industrial Practice !


for tracking the changing optimum!
in the presence of disturbances!

T.E. Marlin, A.N. Hrymak. Real-Time Operations Optimization of Continuous Processes,


AIChE Symposium Series - CPC-V, 93, 156-164, 1997

12

Model Adequacy for Two-Step Approach


A process model is said to be adequate for use in an RTO scheme if it is
capable of producing a fixed point for that RTO scheme at the plant optimum
Model-adequacy conditions"

u
Optimization!

y(uk* , )

Parameter
Estimation!

converged value!

J id
yp (up ), y(up , ) = 0,

yp (u )

Plant!
at!
optimum!

2J id

y
(u
),
y(u
p
p
p , ) > 0,
2

Gi (up , ) = 0,

i A(up )

Gi (up , ) < 0,

i A(up )

SOSC!
Par.
Est.!

Opt.!

r (up , ) = 0,
r2 (up , ) > 0

J.F. Forbes, T.E. Marlin. Design Cost: A Systematic Approach to Technology Selection for Model-Based
Real-Time Optimization Systems. Comp. Chem. Eng., 20(6/7), 717-734, 1996

13

2. Adaptation of Cost & Constraints


Input-Affine Correction to the Model
Modified Optimization Problem!
uk +1 arg min
u

Affine corrections of
cost and constraint
functions!

m (u) := (u) + kT [u uk ]
s.t.

Gm (u) := G(u) + k + kG [u uk ] 0

constraint value!

uL u uU
Gm (u)
Gp (u)

k
G(u)

kGT[u uk ]
uk

Force the modified problem


to satisfy the optimality
conditions of the plant !

P.D. Roberts and T.W. Williams, On an Algorithm for Combined System Optimization
and Parameter Estimation, Automatica, 17(1), 199209, 1981

14

Input-Affine Correction to the Model


Modified Optimization Problem!
T

uk +1 arg min

m (u) := (u) + k [u uk ]

s.t.

Gm (u) := G(u) + k + kG [u uk ] 0

uL u uU
KKT Elements:!

Gng
G1
n
C = G1,,Gng ,
,,
,
K
u
u u

KKT Modifiers:!

T
T
G
= 1,, ng , G1 ,, ng , nK

Modifier Adaptation (with filter)!

Modifier Adaptation (without filter)!


k = Cp (uk ) C(uk )

nK = ng + nu (ng + 1)

Requires evaluation of
KKT elements of plant!

k = (I K) k 1 + K Cp (uk ) C(uk )

W. Gao and S. Engell, Iterative Set-point Optimization of Batch Chromatography, Comput. Chem. Eng., 29, 14011409, 2005
A. Marchetti, B. Chachuat and D. Bonvin, Modifier-Adaptation Methodology for Real-Time Optimization, I&EC Research,
48(13), 6022-6033 (2009)

15

Example Revisited
Modifier adaptation

FA , X A,in = 1

FB , X B,in = 1

TR

F = FA + FB
X A , X B , XC , X E , XG , X P

Williams-Otto Reactor
- 4th-order
! model
- 2 inputs
- 2 adjustable par.

Converges to plant
optimum

A. Marchetti, PhD thesis, EPFL, Modifier-Adaptation Methodology for Real-Time Optimization, 2009

16

Modeling for Optimization


Features of a good model
o Must be able to predict the optimality conditions of the plant:
active constraints and (reduced) gradients
o Focuses on the optimal solution
solution model rather than plant model

Need to be able to estimate the plant gradients


o From cost and constraint values at previous operating points
o Must be able to use the key measurements (active constraints and
gradients)

17

Run-to-Run Optimization
of Semi-Batch Reactor

Industrial Reaction System

Simulated
Reality

Manipulated Variables:

Objective:

Constraints:

Model

18

Nominal Optimal Input


Plant model
- 3 nonlinear balance equations
- 2 uncertain parameters k1 and k2
- Measurements to adjust k1 and k2

A solution model
- 3 arcs: Fmax, Fs and Fmin
- 3 adjustable parameters tm, ts and Fs
- Measurements to adjust tm, ts and Fs

Optimal Solution

Approximate Solution
u"
19

3. Adaptation of Inputs

NCO"
cB(tf)=0.025!
cD(tf)=0.15!

Available degrees of freedom"


Input parameters"
ts, Fs!

CV ?"

MV ?"
Optimizing"
Controller"

Inputs ?!

Measurements!

Real Plant"

Disturbances!

Feasibility OK!
Optimal performance OK!

B. Srinivasan and D. Bonvin, Real-Time Optimization of Batch Processes by Tracking the


Necessary Conditions of Optimality, I&EC Research, 46, 492-504 (2007).

Control problem!

Set points ?!

Solution model!

NCO tracking

20

Comparison of RTO Schemes


Run-to-Run Optimization of Semi-Batch Reactor

Industrial Reaction System

Simulated
Reality

Manipulated Variables:

Objective:

Constraints:

Model

21

Adaptation of Model Parameters k1 and k2

Measurement Noise:

(10% constraint backoffs)

Identification Objective:

Exponential Filter for k1, k2:

Large
optimality
loss!

22

Adaptation of Constraint Modifiers G "

Measurement Noise:

(10% constraint backoffs)

No Gradient Correction

Exponential Filter for Modifiers:

Recovers most
of the optimality loss

23

Adaptation of Input Parameters ts and Fs

Measurement Noise:

(10% constraint back-offs)

No Gradient Correction

Controller Design:

tk
s
k
Fs

t k1
s
= k1
Fs

= k1

Recovers most
of the optimality loss

24

Outline
What is real-time optimization
o Goal: Optimal plant operation
o Tool: Model-based numerical optimization, experimental optimization
o Key feature: use of real-time measurements

Real-time optimization framework


o Three approaches
o Key issues: Which measurements? How to best exploit them?
o Simulated comparison

Experimental case studies


o Fuel-cell stack
o Batch polymerization
25

Solid Oxide Fuel Cell Stack

Stack of 6 cells, active area of 50 cm2, metallic interconnector


Anodes : standard nickel/yttrium stabilized-zirconia (Ni-YSZ)
Electrolyte : dense YSZ.
Cathodes: screen-printed (La, Sr)(Co, Fe)O3
Operation temperatures between 650 and 850C.
G.A. Bunin, Z. Wuillemin, G. Franois, A. Nakajo, L. Tsikonis and D.
Bonvin, Experimental real-time optimization of a solid oxide fuel cell stack
via constraint adaptation, Energy, 39(1), 54-62 (2012).

26

RTO via Constraint Adaptation


"

Experimental features
Inputs: flowrates (H2, O2), current (or load)!
Outputs: power density, cell potential, electrical efficiency!
Time-scale separation!
slow temperature dynamics, treated as process drift ! !
static model (for the rest)!
Power demand changes without prior knowledge!
!
Inaccurate model in the operating region (power, cell)!

27

pelAc
Ucell I! (W)
Ncells

RTO via Constraint Adaptation

I (A)

Challenge: Implement optimal operation with changing power demand


28

RTO via Constraint Adaptation


Problem Formulation
At each RTO instant k, solve a static optimization problem, with a zerothorder modifier in the constraints, regardless of the fact that T has reached
steady state or not
u = n
H 2 ,k
1,k
uk = u2,k = nO2 ,k

u2,k = I k

max ( u k , )
uk

s.t.

pel
pel ( u k , ) + k1
= pelS

U cell
Ucell ( u k , ) + k1
0.75V

( u k ) 0.75
42

u2,k
= air ( u k ) 7
u1,k

u1,k 3.14 mL/(min cm 2 )


u3,k 30A

kpel

(1-K )
pel

pel
k-1

K pel pel,p,k pel ( u k , )

kUcell

(1-K )
U cell

U cell
k-1

K Ucell Ucell,p,k Ucell ( u k , )


29

Slow RTO (Wait for Steady State)


RTO very 30 min!
Unknown power changes every 90 min!

!
30

Fast RTO with Random Power Changes


Use steady-state model for predicting temperature !
RTO every 10 s, load changes every 5 min!

!
31

Emulsion Copolymerization Process

Industrial process!
1-ton reactor, risk of runaway!
Initiator efficiency can vary considerably!

T (t)

M w (t)
X(t)

F j, T j,in

Tj

Several recipes!
different initial conditions!
different initiator feeding policies!
use of chain transfer agent!

Modeling difficulties!
Uncertainty!

Objective: Minimize batch time by adjusting the reactor temperature!


Temperature and heat removal constraints!
Quality constraints at final time!
32

Industrial Practice

33

Optimal Temperature Profile


Numerical Solution using a Tendency Model

Piecewise Constant Optimal Temperature


2

TTr,max
max!

5!
Current practice: isothermal!
Piecewise constant

Numerical optimization!

1.5

TTr [[ ]!]
1

1!

2!

Piecewise-constant input!

3! 4!

5 decision variables (T2-T5, tf)!


Fixed relative switching times!

Isothermal

Active constraints!
Interval 1: heat removal !

0.5

Interval 5: Tmax!
0
0

0.2

0.4

time/t [ ]

0.6

0.8

Timef tf

34

Model of the Solution


Semi-adiabatic Profile!
T(t)!

T(tf) = Tmax!

Tmax!

Compromise*
adiabatic
Heat removal limitation
isothermal operation

*Compromise between
conversion and quality

2!

1!

ts enforces T(tf) = Tmax!

Tiso!

t!
ts!

tf!

run-to-run adjustment of ts
35

Industrial Results with NCO Tracking

1-ton reactor

Final time!
Isothermal: 1.00 !

Batch 0"

Batch 1:

0.78!

Batch 2:

0.72!

Batch 3:

0.65!

1.0"

Francois et al., Run-to-run Adaptation of a Semi-adiabatic Policy for the Optimization of an


Industrial Batch Polymerization Process, I&EC Research, 43(23), 7238-7242, 2004

36

Conclusions
Process optimization is difficult in practice
o Models are often inaccurate use real-time measurements
o Repeated estimation and optimization lacks model adequacy
o Which measurements? How to best exploit them?
NCO (active constraints and reduced gradients)

Two appoaches involving the NCO


o Input-affine corrections to cost and constraints
o NCO tracking (optimization via a multivariable control problem)
o Key challenge is estimation of plant gradient

37

NCO tracking
New Paradigm for RTO
Operator-friendly approach
o Start with best current operation (nominal model-based solution) and
push the process until constraints are reached
o Know what to manipulate solution model
o Determine how much to change from measurements

Important features
o
o
o
o
o
o

Two steps: offline (model-based), online (data-driven)


Can test robustness offline by using model perturbations
Approach converges to plant optimum, not model optimum
Complexity depends on the number of inputs (not system order)
Solution is partly determined by active constraints easy tracking
Price to pay: need to estimate experimental gradients
38

Anda mungkin juga menyukai