Slovak University of Technology in Bratislava Institute of Information Engineering, Automation, and Mathematics PROCEEDINGS of the 18 th International Conference on Process Control Hotel Titris, Tatranská Lomnica, Slovakia, June 14 17, 2011 ISBN 978-80-227-3517-9 http://www.kirp.chtf.stuba.sk/pc11 Editors: M. Fikar and M. Kvasnica Bonvin, D.: Real-Time Optimization in the Presence of Uncertainty, Editors: Fikar, M., Kvasnica, M., In Proceedings of the 18th International Conference on Process Control, Tatranská Lomnica, Slovakia, 1 31, 2011. Full paper online: http://www.kirp.chtf.stuba.sk/pc11/data/abstracts/103.html
Real-Time Optimization in the Presence of Uncertainty" Dominique Bonvin Laboratoire d Automatique EPFL, Lausanne Process Control 11 Tatranska Lomnica, High Tatras, June 2011 1
Optimization is a natural choice to: - design and conceive highly integrated systems - reduce production costs and improve product quality - meet safety and environmental regulations Mathematical models are ubiquitous in almost every aspect of science and engineering 2 2
Optimization of process operation Static optimization u RTO - dynamic processes at steady-state - run-to-run operation of batch processes Dynamic optimization u(t) DRTO - transient behavior of dynamic process 3 3
Outline Context of uncertainty o Plant-model mismatch o Disturbances Use measurements for process improvement Static real-time optimization Adaptation of model parameters Repeated identification & optimization Adaptation of optimization problem Modifier adaptation Adaptation of inputs NCO tracking Application examples 4 4
A Large Continuous Plant RAW MATERIALS PLANT at STEADY STATE PRODUCTS Determine Best Operating Conditions" 5 5
Real-Time Optimization of a Continuous Plant Long term week/month" Medium term day" Disturbances" Market Fluctuations, Demand, Price" Catalyst Decay, Changing Raw Material Quality" Measurements" Decision Levels" Planning & Scheduling" Real-Time Optimization" Production Rates Raw Material Allocation" Short term second/minute" Fluctuations in Pressure, Flowrates, Compositions" Measurements" Control" Optimal Operating Conditions - Set Points" Measurements" Manipulated Variables" Large-scale complex processes" Changing conditions" Real-time adaptation" 6 6
18th International Conference on Process Control A Discontinous Plant BATCH PLANT RECIPE 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" 7 7
Run-to-Run Optimization of a Batch Plant u(t) x p (t f ) Batch plant with" finite terminal time" min u[0,t f ]! := " ( x(t f ),# ) s. t.!x = F(x, u,#) x(0) = x 0 S(x, u,#) $ 0 ( ) $ 0 T x(t f ),# Input Parameterization u[0,t f ] = U(! )!! p Batch plant" viewed as a static map" G p u max " u min " 0" u(t)" min! s. t. G!,# u 1 " t 1 " t 2 " "(!,# ) ( ) $ 0 t f " NLP" 8 8
Static RTO Problem Plant" ( ) ( ) # 0 min u! p ( u) := " p u, y p s. t. G p ( u) := g p u, y p Model-based Optimization" F( u, y,! ) = 0 ( ) ( ) := g( u, y) # 0 min u!(u) := " u, y s. t. G u NLP"? u? u? (set points)" (set points)" 9 9
RTO Scenarios" No Measurement: Robust Optimization Optimization in the presence of Uncertainty Measurements: Adaptive Optimization input update:!u u *!arg min u "(u, y) parameter update:!" s.t. F(u, y,!) = 0 g(u, y) " 0 constraint update:!g What are the best" handles for correction?" Adaptation of Model Parameters Adaptation of Modifiers. Adaptation of Inputs. - repeated identification and optimization - two-step approach - bias update - constraint update - gradient correction - ISOPE - tracking active constraints - NCO tracking - extremum-seeking control - self-optimizing control 10 10
1. Adaptation of Model Parameters Repeated Identification and Optimization Parameter Estimation Problem" Optimization Problem" ( ) ( ) # 0! * id! k "arg min J! k u k+1 "arg min # u, y(u,$! k ) u J id k = $ % y p (u! k ) " y(u! T k,#)& ' Q $ % yp (u! k ) " y(u! k,#)& ' s.t. g u, y(u,! " k ) u L! u! u U Optimization"! u k +1 " u k!! k * Parameter" Estimation" y p (u k! ) Plant" at" steady state" Current Industrial Practice " for tracking the changing optimum in the presence of plant-model mismatch" T.E. Marlin, A.N. Hrymak. Real-Time Operations Optimization of Continuous Processes, AIChE Symposium Series - CPC-V, 93, 156-164, 1997 11 11
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"! Optimization" Parameter Estimation" u p! Plant" at " optimum"!j id ( ) = 0,!" y p(u # p ), y(u # p," ) ( ) > 0,! 2 J id y!" 2 p (u # p ), y(u # p," ) y p (u p! ) G i (u p!," ) = 0, i #A(u p! ) G i (u p!," ) < 0, i #A(u p! )! r "(u p #,$ ) = 0, SOSC" Par. Est." Opt."! Converged value"! r 2 "(u p #,$ ) > 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 12 12
Example of Inadequate Model Two-step approach F A, X A,in = 1 F B, X B,in = 1 T R V F = F A + F B X A, X B, X C, X E, X G, X P Williams-Otto Reactor - 4 th -order " model - 2 inputs - 2 adjustable par. Does not convergence to plant optimum 13 13
2. Modification of Optimization Problem Repeated Optimization using Nominal Model Modified Optimization Problem"! u k +1 "arg min u # m (u) := #(u) + $ # T k [u % u! k ] s.t. G m (u) := G(u) +! k + " G T k [u # u $ k ] % 0 Affine corrections of cost and constraint functions" u L! u! u U constraint value" G p (u) G m (u)! k G(u)! G T k [u " u # k ] Force the modified problem to satisfy the optimality conditions of the plant " u k! u P.D. Roberts and T.W. Williams, On an Algorithm for Combined System Optimization and Parameter Estimation, Automatica, 17(1), 199 209, 1981 14 14
2. Modification of Optimization Problem Repeated Optimization using Nominal Model Modified Optimization Problem"! u k +1 "arg min u # m (u) := #(u) + $ k # [u % u k! ] s.t. G m (u) := G(u) +! k + " k G [u # u k $ ] % 0 T T u L! u! u U KKT Elements:" Modifiers:" # C T = G 1,!,G ng,!g 1!u,!,!G n g!u,!" & % ( )" n K n K = n g + n u (n g + 1) $!u '! T = % " 1,!, " ng, # G 1,!, # G n g, # & $ T T T ' ( )"n K Modifier Update (without filter)"! k = C p (u k " ) # C(u k " ) Requires evaluation of KKT elements for plant" Modifier Update (with filter)"! k = (I " K)! k "1 + K $ C p (u # k ) " C(u # k )& % ' W. Gao and S. Engell, Iterative Set-point Optimization of Batch Chromatography, Comput. Chem. Eng., 29, 1401 1409, 2005 A. Marchetti, B. Chachuat and D. Bonvin, Modifier-Adaptation Methodology for Real-Time Optimization, I&EC Research, 48(13), 6022-6033 (2009) 15 15
Model Adequacy for Modifier 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 condition"! Modified Optimization" Modifier Update" u p! C p (u p! ) Plant" at" optimum"!j id ( ) = 0,!" y p(u # p ), y(u # p ) ( ) > 0! 2 J id y!" 2 p (u # p ), y(u # p ) G i (u! p ) = 0, i "A(u! p ) G i (u! p ) < 0, i "A(u! p )! = C p (u p " ) # C(u p " ) Converged value"! r "(u p # ) = 0,! r 2 "(u p #, $) > 0 16 16
Example Revisited Modifier adaptation F A, X A,in = 1 F B, X B,in = 1 T R V F = F A + F B X A, X B, X C, X E, X G, X P Williams-Otto Reactor - 4 th -order " model - 2 inputs - 2 adjustable par. Converges to plant optimum Alejandro Marchetti, PhD thesis, EPFL, Modifier-Adaptation Methodology for Real-Time Optimization, 2009 17 17
3. Adaptation of Inputs NCO tracking Self-optimizing control no need to repeat numerical optimization on-line Modeling" Numerical" Optimization" Nominal process model! Off-line" Active constraints" Reduced gradients" Model of solution! Self-optimizing" Controller" Disturbances" Real Plant" Evaluation of" KKT elements" On-line" B. Srinivasan and D. Bonvin, Real-Time Optimization of Batch Processes by Tracking the Necessary Conditions of Optimality, I&EC Research, 46(2), 492-504, 2007 18 18
Comparison of RTO Schemes" Model parameter Modifier adaptation adaptation Input adaptation (NCO tracking) Adjustable parameters!! u Measurements y p C p C p Number of parameters n! n g + n u (n g + 1) n u Number of measurements n y n g + n u (n g + 1) n g + n u (n g + 1) On-line tasks Feasibility Optimality Strengths Optimization (2x) Constraints predicted by model Gradients predicted by model Intuitive Estimation of KKT Optimization Constraints measured Gradients measured One-to-one correspondence Constraint adaptation Weaknesses Model adequacy Experimental gradients Estimation of KKT OK if active set known Gradients measured No optimization on-line Constraint tracking Knowledge of active set Experimental gradients Controller tuning 19 19
Outline Context of uncertainty Plant-model mismatch Use of measurements for process improvement Static real-time optimization (process at steady-state) Adaptation of model parameters Repeated identification & optimization Adaptation of optimization problem Modifier adaptation Adaptation of inputs NCO tracking Application examples 20 20
Comparison of 3 RTO Schemes Run-to-Run Optimization of Semi-Batch Reactor Industrial Reaction System Simulated Reality Model Manipulated Variables: Objective: Constraints: 21 21
Nominal Input Trajectory Optimal Solution Approximate Solution u" 22 22
Adaptation of Model Parameters k 1 and k 2 Measurement Noise: (10% constraint backoffs) Identification Objective: Exponential Filter for k 1, k 2 : Large optimality loss! 23 23
Adaptation of Modifiers ε G " Measurement Noise: (10% constraint backoffs) No Gradient Correction Exponential Filter for Modifiers: Recovers most of the optimality loss 24 24
Adaptation of Input Parameters t s and F s Measurement Noise: (10% constraint back-offs) No Gradient Correction Controller Design:! # " # t s k F s k $! & % & = # " # k'1 t s F s k'1 $ & % &! =! k!1 Recovers most of the optimality loss 25 25
Industrial Application of NCO Tracking Emulsion Copolymerization Process Industrial features" 1-ton reactor, risk of runaway" Initiator efficiency can vary considerably" Several recipes! different initial conditions! different initiator feeding policies! use of chain transfer agent! T (t) M w (t) X(t) F j, T j,in! # " # $ Modeling difficulties" Uncertainty" T j Objective: Minimize batch time by adjusting the reactor temperature" Temperature and heat removal constraints" Quality constraints at final time" 26 26
Industrial Practice 27 27
Optimal Temperature Profile Numerical Solution using a Tendency Model Piecewise Constant Optimal Temperature 2 T r,max" 5" Current practice: isothermal" 1.5 T r [ ]" ] 1 Piecewise constant 1" 2" 3" 4" Isothermal Numerical optimization" Piecewise-constant input" 5 decision variables (T 2 -T 5, t f )" Fixed relative switching times" 0.5 Active constraints" Interval 1: heat removal " Interval 5: T max" 0 0 0.2 0.4 0.6 0.8 1 time/t f [ ] Time t f 28 28
Model of the Solution -- Semi-adiabatic Profile" T max " T iso " T(t)" Heat removal limitation isothermal operation 1" T(t f ) = T max " Compromise * adiabatic 2" t s" t" t f" * Compromise between conversion and quality t s enforces T(t f ) = T max" Solution model Fixed part -- structure Free part -- t s run-to-run adjustment of t s 29 29
Industrial Results (1-ton reactor) Batch 0" Final time" Isothermal: 1.00 " 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 30 30
Conclusions How to use the measurements? o what are the best handles for correction? Repeated estimation and optimization has problems o model adequacy for optimization Practical observations o complexity depends on the number of inputs (not system order) o the solution is often determined by the constraints of the problem 31 31