Dynamic Real-Time Optimization: Linking Off-line Planning with On-line Optimization

Similar documents
Real-Time Optimization

A Brief Perspective on Process Optimization

ARTICLE IN PRESS. Computers and Chemical Engineering xxx (2008) xxx xxx. Contents lists available at ScienceDirect. Computers and Chemical Engineering

Real-Time Implementation of Nonlinear Predictive Control

Computational Strategies for the Optimal Operation of Large-Scale Chemical Processes

Optimizing Economic Performance using Model Predictive Control

Slovak University of Technology in Bratislava Institute of Information Engineering, Automation, and Mathematics PROCEEDINGS

Integration of Scheduling and Control Operations

Direct Methods. Moritz Diehl. Optimization in Engineering Center (OPTEC) and Electrical Engineering Department (ESAT) K.U.

Numerical Optimal Control Overview. Moritz Diehl

Real-Time Feasibility of Nonlinear Predictive Control for Semi-batch Reactors

Efficient Numerical Methods for Nonlinear MPC and Moving Horizon Estimation

Model-based On-Line Optimization Framework for Semi-batch Polymerization Reactors

Carnegie Mellon University

Academic Editor: Dominique Bonvin Received: 26 November 2016; Accepted: 13 February 2017; Published: 27 February 2017

Hot-Starting NLP Solvers

Closed-loop Formulation for Nonlinear Dynamic Real-time Optimization

Optimal dynamic operation of chemical processes: Assessment of the last 20 years and current research opportunities

Facing New Products Demand through Simultaneous Structural and Operational Decisions in the Design of the Control Recipe

Model Predictive Control

Dynamic Real-Time Optimization via Tracking of the Necessary Conditions of Optimality

FAULT-TOLERANT CONTROL OF CHEMICAL PROCESS SYSTEMS USING COMMUNICATION NETWORKS. Nael H. El-Farra, Adiwinata Gani & Panagiotis D.

Nonlinear Optimization for Optimal Control Part 2. Pieter Abbeel UC Berkeley EECS. From linear to nonlinear Model-predictive control (MPC) POMDPs

Cooperation-based optimization of industrial supply chains

arxiv: v1 [cs.sy] 2 Oct 2018

Optimization Algorithms for Integration of Design, Control, and Scheduling for Chemical Processes Subject to Disturbances and Uncertainty

CBE495 LECTURE IV MODEL PREDICTIVE CONTROL

Control System Design

Economic Model Predictive Control Historical Perspective and Recent Developments and Industrial Examples

Robust Process Control by Dynamic Stochastic Programming

Simultaneous mixed-integer dynamic optimization for integrated design and control

Implementation issues for real-time optimization of a crude unit heat exchanger network

NONLINEAR MODEL PREDICTIVE CONTROL USING AUTOMATIC DIFFERENTIATION

Adaptive Robust Control

A FORMULATION OF NONLINEAR MODEL PREDICTIVE CONTROL USING AUTOMATIC DIFFERENTIATION. Yi Cao,1. School of Engineering, Cranfield University, UK

Large-Scale Non-Linear Dynamic Optimization For Combining Applications of Optimal Scheduling and Control

Available online at ScienceDirect. IFAC PapersOnLine 50-1 (2017)

Survey of NLP Algorithms. L. T. Biegler Chemical Engineering Department Carnegie Mellon University Pittsburgh, PA

DESIGN OF AN ON-LINE TITRATOR FOR NONLINEAR ph CONTROL

Control-Oriented Approaches to Inventory Management in Semiconductor Manufacturing Supply Chains

UNIVERSITY OF CALIFORNIA. Los Angeles. Distributed Model Predictive Control of Nonlinear. and Two-Time-Scale Process Networks

An Inexact Sequential Quadratic Optimization Method for Nonlinear Optimization

Simultaneous Cyclic Scheduling and Control of Tubular Reactors: Parallel Production Lines

Mixed-Integer Nonlinear Decomposition Toolbox for Pyomo (MindtPy)

Optimization of Batch Processes

Distributed model predictive control of large-scale systems

ROBUST STABLE NONLINEAR CONTROL AND DESIGN OF A CSTR IN A LARGE OPERATING RANGE. Johannes Gerhard, Martin Mönnigmann, Wolfgang Marquardt

Model Predictive Control Design for Nonlinear Process Control Reactor Case Study: CSTR (Continuous Stirred Tank Reactor)

MIMO Identification and Controller design for Distillation Column

Identification in closed-loop, MISO identification, practical issues of identification

NonlinearControlofpHSystemforChangeOverTitrationCurve

A novel optimization framework for integrated design and control using a dynamic inversely controlled process model

3.1 Overview 3.2 Process and control-loop interactions

Nonlinear Model Predictive Control Tools (NMPC Tools)

A Definition for Plantwide Controllability. Process Flexibility

Software for Integer and Nonlinear Optimization

ChE 6303 Advanced Process Control

Combined Model Predictive Control and Scheduling with Dominant Time Constant Compensation

Optimal sensitivity based on IPOPT

COMPUTATIONAL DELAY IN NONLINEAR MODEL PREDICTIVE CONTROL. Rolf Findeisen Frank Allgöwer

On the Inherent Robustness of Suboptimal Model Predictive Control

A Two-Stage Algorithm for Multi-Scenario Dynamic Optimization Problem

Simultaneous Cyclic Scheduling and Control of a Multiproduct CSTR Reactor

DISCRETE MECHANICS AND OPTIMAL CONTROL

STABILITY CONDITIONS AND OBSERVER DESIGN FOR A CONTINUOUS CRYSTALLIZER

How to simulate in Simulink: DAE, DAE-EKF, MPC & MHE

Online monitoring of MPC disturbance models using closed-loop data

An Investigation into the Nonlinearity of Polyethylene Reactor Operation. Department of Chemical Engineering Queen s University

Efficient Handling of the Implicit Constraints Problem for the ASPEN MINLP Synthesizer

1 Computing with constraints

Module 6 : Solving Ordinary Differential Equations - Initial Value Problems (ODE-IVPs) Section 3 : Analytical Solutions of Linear ODE-IVPs

Click to edit Master title style

Design of Multivariable Neural Controllers Using a Classical Approach

On Perspective Functions, Vanishing Constraints, and Complementarity Programming

Improved Crude Oil Processing Using Second-Order Volterra Models and Nonlinear Model Predictive Control

Lecture 1: Basics Concepts

Online Support Vector Regression for Non-Linear Control

Nonlinear Programming Formulations for On-line Applications

5 Handling Constraints

VERTICAL INTEGRATION OF PRODUCTION SCHEDULING AND PROCESS CONTROL Progress, opportunities and challenges

Logic-Based Outer-Approximation Algorithm for Solving Discrete-Continuous Dynamic Optimization Problems

Robust Optimal Control for Nonlinear Dynamic Systems

Modeling and Control Overview

Introduction to. Process Control. Ahmet Palazoglu. Second Edition. Jose A. Romagnoli. CRC Press. Taylor & Francis Group. Taylor & Francis Group,

New Tools for Analysing Power System Dynamics

Control Systems I. Lecture 2: Modeling. Suggested Readings: Åström & Murray Ch. 2-3, Guzzella Ch Emilio Frazzoli

A Feedback Optimal Control Algorithm with Optimal Measurement Time Points

On-Line Parameter Estimation in a Continuous Polymerization Process

SCALE-UP OF BATCH PROCESSES VIA DECENTRALIZED CONTROL. A. Marchetti, M. Amrhein, B. Chachuat and D. Bonvin

Integrated Scheduling and Control in Discrete-time with Dynamic Parameters and Constraints

Journal of Process Control

Prashant Mhaskar, Nael H. El-Farra & Panagiotis D. Christofides. Department of Chemical Engineering University of California, Los Angeles

A New Penalty-SQP Method

Index. INDEX_p /15/02 3:08 PM Page 765

The dos and don ts of distillation column control

EE C128 / ME C134 Feedback Control Systems

Static Optimization based on. Output Feedback

Time-Optimal Automobile Test Drives with Gear Shifts

COMBINATIONS OF MEASUREMENTS AS CONTROLLED VARIABLES: APPLICATION TO A PETLYUK DISTILLATION COLUMN.

Theory and Applications of Constrained Optimal Control Proble

Transcription:

Dynamic Real-Time Optimization: Linking Off-line Planning with On-line Optimization L. T. Biegler and V. Zavala Chemical Engineering Department Carnegie Mellon University Pittsburgh, PA 15213 April 12, 2007 1

Overview Introduction Pyramid of operations Off-line vs On-line Tasks Steady state vs Dynamics Enablers and open questions On-line Issues Model predictive control Treatment of nonlinear model and uncertainty Benefits and successes Advanced Step Controller Basic concepts and properties Performance for examples Future Work 2

Decision Pyramid for Process Operations Goal: Bridge between planning, logistics (linear, discrete problems) and detailed process models (nonlinear, spatial, dynamic) Planning and Scheduling Many Discrete Decisions Few Nonlinearities Planning Feasibility Scheduling Site-wide Optimization Real-time Optimization Performance Model Predictive Control Regulatory Control 3

Decision Pyramid for Process Operations Real-time Optimization and Advanced Process Control Fewer discrete decisions Many nonlinearities Frequent, on-line time-critical solutions Higher level decisions must be feasible Performance communicated for higher level decisions Planning Feasibility Scheduling Site-wide Optimization Real-time Optimization Model Predictive Control Regulatory Control Performance MPC APC Off-line (open loop) On-line (closed loop) 4

Steady State RTO w APC Plant RTO c(x, u, p) = 0 On line optimization Nonlinear steady state model for states (x) Supply setpoints (u) to APC (control system) with Linear Dynamic Models 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 u p y DR-PE c(x, u, p) = 0 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 5

Steady-state On-line Optimization: Components w Plant APC u RTO c(x, u, p) = 0 p y DR-PE c(x, u, p) = 0 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? 6

Steady-state On-line Optimization: Properties (Marlin and coworkers) Consistency of models and Stability of steady-state RTO Sensitivity of the optimum to disturbances and model mismatch? => NLP sensitivity Steady state test? Has the process 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 Assumes accurate model Are we optimizing on the noise? Model mismatch? Dynamics? Can lead to ping-ponging 7

Why Dynamic RTO? 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

Dynamic Optimization Problem s.t. min ψ ( z(t), y(t), u(t), p, ) dz( t) = F dt G t f ( z ( t), y ( t), u( t), t, p) ( z( t), y( t), u( t), t, p) = 0 z o = z ( 0 ) z l z ( t ) z u y l y ( t ) y u u l u ( t ) u u p l p p u t, time z, differential variables y, algebraic variables t f, final time u, control variables p, time independent parameters 10

Dynamic Optimization Approaches Pontryagin(1962) DAE Optimization Problem Direct NLP solution Discretize controls Indirect/Variational - Inefficient for large, constrained problems Single Shooting Sullivan (1977) Efficient for constrained problems Discretize states and controls Simultaneous Approach +Small NLP - No instabilities Bock, Plitt (1984) Multiple Shooting +Handles instabilities -Larger NLPs +Embeds DAE Solvers/Sensitivity - Dense Sensitivity Blocks Collocation Large/Sparse NLP 11

Dynamic Optimization Engines Evolution of NLP Solvers: for dynamic optimization, control and estimation SQP rsqp Full-space Barrier E.g., E.g, SNOPT IPOPT NPSOL- and Simultaneous Multiple Sequential Shooting dynamic Dynamic - over optimization 100 over Optimization d.f.s1 but 000 over 000-10 over variables 5 100 variables and and constraints and constraints Object Oriented Codes tailored to structure, sparse linear algebra and computer architecture (e.g., IPOPT 3.2) 12

Hierarchy of Nonlinear Programming for Dynamic Optimization Formulations Computational Efficiency Simultaneous Full Space Formulation Multiple Shooting Adjoint Sensitivity Direct Sensitivities Single Shooting SQP rsqp Interior Point Black Box DFO 10 0 10 2 10 4 10 6 Variables/Constraints 13

Comparison of Computational Complexity (α [2, 3], β [1, 2], n w, n u - assume N m = O(N)) Single Shooting Multiple Shooting Simultaneous DAE Integration n wβ N n wβ N --- Sensitivity (n w N) (n u N) (n w N) (n u + n w ) N (n u + n w ) Exact Hessian (n w N) (n u N) 2 (n w N) (n u + n w ) 2 N (n u + n w ) NLP Decomposition --- n w3 N --- Step Determination (n u N) α (n u N) α ((n u + n w )N) β Backsolve --- --- ((n u + n w )N) O((n u N) α + N 2 n w n u + N 3 n w n u2 ) O((n u N) α + N n w 3 + N n w (n w +n u ) 2 ) O((n u + n w )N) β 14

On-line Issues: Model Predictive Control (NMPC) d : disturbances NMPC Estimation and Control u : manipulated variables y sp : set points Planning Scheduling Process Site-wide Optimization Real-time Optimization Model Predictive Control Regulatory Control NMPC Controller z = F( z, y, u, p, d ) 0 = G( z, y, u, p, d ) z : differential states y : algebraic states Model Updater z = F( z, y, u, p, d ) 0 = G( z, y, u, p, d ) min u s. t. NMPC Subproblem J ( x( k )) = zl + 1 = f ( z z0 = x( k ) Bounds 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) l N ϕ ( z l = 0, u l )) l, u l ) + E ( z N ) 15

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 Stability properties Nominal remain bounded and eventually achieve desired state without noise and with perfect model Robust remain stable with model mismatch and noise 16

On-line Issues: Stability is Forever Discrete Lyapunov stability proof Nominal case no noise: perfect model General formulation with local asymptotic controller for t Robust case keep (J k-1 J k ) sufficiently positive in presence of noise/mismatch { } 0 ) ( 0, ) ( 1)) ( 1), ( ( ) ( 1)) ( 1), ( ( ) ( ), ( ) ( 1)) ( 1), ( ( 1 1 1 0 1 1 = + = = k u k x k u k x J J J k u k x z E v z z E k u k x J J k k k k N k N k N k N k k k ϕ ϕ ϕ ϕ 17 Bounds k x z u z f z t s z E u z J l l l N l N l l k ) ( )), (.. ) ( ), ( min 0 1 0 = = + = + = ϕ u

NMPC for Tennessee Eastman Process (Jockenhövel, Wächter, B., 2003) Unstable Reactor 11 Controls; Product, Purge streams 171 DAEs: Model extended with energy balances After discretization 10920 variables 660 degrees of freedom 18

NMPC Results Tennessee Eastman Problem Optimization with IPOPT Warm start with μ = 10-4 350 Optimizations 5-7 CPU seconds 11-14 Iterations Optimization with SNOPT Uses approximate (dense) reduced Hessian updates Could not be solved within sampling times > 100 Iterations 19

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? 20

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 z 0 for dynamic systems Extended to Collocation approach Zavala et al. (2006) Three computational variants developed Similar approach for MH State and Parameter Estimation Zavala et al. (2007) Stability Properties for Advanced Step Controller Nominal stability can be shown from standard Lyapunov analysis Robust stability apply results for input to state stability (ISS) from Magni et al. (2005) 21

Nonlinear Model Predictive Control Parametric Problem 22

NLP Sensitivity Parametric Programming Solution Triplet Optimality Conditions NLP Sensitivity Rely upon Existence and Differentiability of Path Main Idea: Obtain and find by Taylor Series Expansion 23

NLP Sensitivity Obtaining Optimality Conditions of Apply Implicit Function Theorem to around KKT Matrix IPOPT Already Factored at Solution Sensitivity Calculation from Single Backsolve Approximate Solution Retains Active Set 24

NMPC: Direct Sensitivity Variant Assume: Optimal Solution Optimal Solution Approximate by Perturbing NLP Sensitivity Approximate Solution Retains Active Set of Nominal Problem This is fast but active set is inconsistent because it does not shift 25

Nonlinear Model Predictive Control Equivalence to Previously Solved Problem Solutions to both problems are equivalent in nominal case (ideal models, no disturbances) 26

Advanced Step NMPC Combine delay concept with sensitivity to solve NLP in background (between steps) not on-line Solve P(z l ) in background Sensitivity to updated problem to get (z 0, u 0 ) Solve P(z l+1 ) in background with new (z 0, u 0 ) 27

CSTR NMPC Example (Hicks and Ray) Maintain unstable setpoint Close to bound constraint Final time constraint for stability (N is short) Study effects of: Computational Delay Advanced Step NMPC Measurement Noise Model Mismatch 28

CSTR NMPC Example Nominal Case NMPC applied with N = 10, τ = 0.5 sampling time Unstable steady state Steady state u close to upper bound Computational delay = 0.5, leads to instabilities Advanced Step Controller identical to ideal NMPC controller 29

CSTR NMPC Example Model Mismatch Ideal Adv. Step NMPC ----Direct Variant Advanced Step NMPC not as robust as ideal - suboptimal selection of u(k) Better than Direct Variant due to better active set preservation 30

CSTR Example: Mismatch + Noise Ideal Adv. Step NMPC ----Direct Variant 31

Industrial Case Study Grade Transition Control Process Model: 289 ODEs, 100 AEs Simultaneous Collocation-Based Approach 27,135 constraints, 9630 LB & UB Off-line Solution with IPOPT Feedback Every 6 min 32

Nonlinear Model Predictive Control Optimal Feedback Policy (On-line Computation 351 CPU s) Ideal NMPC controller - computational delay not considered Time delays as disturbances in NMPC 33

Nonlinear Model Predictive Control Optimal Policy vs. NLP Sensitivity -Shifted (On-line Computation 1.04 CPU s) Very Fast Close-to-Optimal Feedback Large-Scale Rigorous Models 34

Future Work: Multi-Stage Dynamic Optimization DAE Model Stage Transitions Bounds Path Constraints Boundary Conditions 35

Multi-stage Optimization Determine Off-line policy Tracking problem for NMPC Nominal policy or incorporate uncertainty in conservative way (no recourse due to policy tracking) Determine On-line policy Solve consistent economic objective through on-line DRTO (NMPC that incorporates multi-stage with long horizons) Exploit uncertainty through recourse on trajectory optimization Retain stability and robustness Incorporate feedforward measurements Requires state and parameter estimation from plant Use nonlinear model Adopt Moving Horizon Estimation Formulation 36

Moving Horizon Estimation d : disturbances Process z : differential states y : algebraic states u : manipulated variables y sp : set points NMPC Controller z = F ( z, y, u, p, d ) 0 = G( z, y, u, p, d ) Model Updater z = F ( z, y, u, p, d ) 0 = G( z, y, u, p, d ) 37

Real-Time Moving Horizon Estimation On-Line Calculation 38

Industrial Case Study Single Measurement + Gaussian Noise Composition of Recycle Gas 27,121 Constraints, 9330 Bounds 294 Degrees of Freedom 39

Real-Time Moving Horizon Estimation On-Line Calculation Correct Inertia at Solution System Observable 40

Summary RTO and MPC widely used for refineries, ethylene and, more recently, chemical plants Inconsistency in models Can lead to operating problems Off-line dynamic optimization is widely used Polymer processes (especially grade transitions) Batch processes Periodic processes NMPC provides link for off-line and on-line optimization Stability and robustness properties Advanced step controller leads to very fast calculations Analogous stability and robustness properties On-line cost is negligible Multi-stage planning and on-line switches Leads to exploitation of uncertainty (on-line recourse) Avoids conservative performance Update model with MHE Evolve from regulatory NMPC to Large-scale DRTO 41

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, to appear Biegler Homepage: http://dynopt.cheme.cmu.edu/papers.htm 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 Grossmann Homepage: http://egon.cheme.cmu.edu/papers.html 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) See also Biegler homepage 43