Real-Time Implementation of Nonlinear Predictive Control

Similar documents
Reduced Order Modeling of High Purity Distillation Columns for Nonlinear Model Predictive Control

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

CBE495 LECTURE IV MODEL PREDICTIVE CONTROL

Process Unit Control System Design

IMPROVED MULTI-MODEL PREDICTIVE CONTROL TO REJECT VERY LARGE DISTURBANCES ON A DISTILLATION COLUMN. Abdul Wahid 1*, Arshad Ahmad 2,3

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

Optimizing Economic Performance using Model Predictive Control

A Brief Perspective on Process Optimization

Representative Model Predictive Control

Hot-Starting NLP Solvers

MIMO Identification and Controller design for Distillation Column

MOST control systems are designed under the assumption

DESIGN AND CONTROL OF BUTYL ACRYLATE REACTIVE DISTILLATION COLUMN SYSTEM. I-Lung Chien and Kai-Luen Zeng

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

Optimal Implementation of On-Line Optimization

Constrained Output Feedback Control of a Multivariable Polymerization Reactor

In Situ Adaptive Tabulation for Real-Time Control

Evaluation of the Dynamics of a Distillation Column with Two Liquid Phases

Efficient Numerical Methods for Nonlinear MPC and Moving Horizon Estimation

Lecture 1: Basics Concepts

Wannabe-MPC for Large Systems Based on Multiple Iterative PI Controllers

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

Numerical Optimal Control Overview. Moritz Diehl

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

Model Predictive Controller of Boost Converter with RLE Load

MIN-MAX CONTROLLER OUTPUT CONFIGURATION TO IMPROVE MULTI-MODEL PREDICTIVE CONTROL WHEN DEALING WITH DISTURBANCE REJECTION

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

Open/Closed Loop Bifurcation Analysis and Dynamic Simulation for Identification and Model Based Control of Polymerization Reactors

Numerical Nonlinear Optimization with WORHP

Enhanced Single-Loop Control Strategies Chapter 16

Parameter Identification and Dynamic Matrix Control Design for a Nonlinear Pilot Distillation Column

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

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

Theoretical Models of Chemical Processes

EE C128 / ME C134 Feedback Control Systems

Closed-loop Formulation for Nonlinear Dynamic Real-time Optimization

A hybrid Marquardt-Simulated Annealing method for solving the groundwater inverse problem

Overview of Control System Design

Dynamic Operability for the Calculation of Transient Output Constraints for Non-Square Linear Model Predictive Controllers

Control of MIMO processes. 1. Introduction. Control of MIMO processes. Control of Multiple-Input, Multiple Output (MIMO) Processes

Short-cut distillation columns based on orthogonal polynomials of a discrete variable

3.1 Overview 3.2 Process and control-loop interactions

Outline Introduction: Problem Description Diculties Algebraic Structure: Algebraic Varieties Rank Decient Toeplitz Matrices Constructing Lower Rank St

Learning Model Predictive Control for Iterative Tasks: A Computationally Efficient Approach for Linear System

PREDICTIVE CONTROL OF NONLINEAR SYSTEMS. Received February 2008; accepted May 2008

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

Time scale separation and the link between open-loop and closed-loop dynamics

Design of Decentralised PI Controller using Model Reference Adaptive Control for Quadruple Tank Process

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

CHBE320 LECTURE XI CONTROLLER DESIGN AND PID CONTOLLER TUNING. Professor Dae Ryook Yang

Development and application of linear process model in estimation and control of reactive distillation

Real-Time Optimization (RTO)

Dynamic Effects of Diabatization in Distillation Columns

NONLINEAR MODEL PREDICTIVE CONTROL USING AUTOMATIC DIFFERENTIATION

Applied Computational Economics Workshop. Part 3: Nonlinear Equations

Mathematical Modeling of Chemical Processes. Aisha Osman Mohamed Ahmed Department of Chemical Engineering Faculty of Engineering, Red Sea University

Recovering from a Gradual Degradation in MPC Performance

A Trust-region-based Sequential Quadratic Programming Algorithm

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

A Continuous Formulation for Logical Decisions in Differential Algebraic Systems using Mathematical Programs of Complementarity Constraints

IMPROVED CONTROL STRATEGIES FOR DIVIDING-WALL COLUMNS

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

Outline. Scientific Computing: An Introductory Survey. Nonlinear Equations. Nonlinear Equations. Examples: Nonlinear Equations

A Trust-region Algorithm for the Optimization of PSA Processes using Reduced-order Modeling

Model predictive control of industrial processes. Vitali Vansovitš

Real-Time Optimization

Basic Concepts in Data Reconciliation. Chapter 6: Steady-State Data Reconciliation with Model Uncertainties

Adaptive Robust Control

Optimization of Batch Processes

Robust Process Control by Dynamic Stochastic Programming

Nonlinear System Identification using Support Vector Regression

Nonlinear Modeling, Estimation and Predictive Control in APMonitor

Multivariable model predictive control design of reactive distillation column for Dimethyl Ether production

Nonlinear Model Predictive Control Tools (NMPC Tools)

MS-E2133 Systems Analysis Laboratory II Assignment 2 Control of thermal power plant

A Holistic Approach to the Application of Model Predictive Control to Batch Reactors

An Inexact Sequential Quadratic Optimization Method for Nonlinear Optimization

HPMPC - A new software package with efficient solvers for Model Predictive Control

Constrained optimization. Unconstrained optimization. One-dimensional. Multi-dimensional. Newton with equality constraints. Active-set method.

1 Computing with constraints

Nonlinear Optimization for Optimal Control

Feedback Control of Linear SISO systems. Process Dynamics and Control

Block Condensing with qpdunes

AM 205: lecture 19. Last time: Conditions for optimality, Newton s method for optimization Today: survey of optimization methods

Integration of Scheduling and Control Operations

arxiv: v1 [cs.sy] 2 Oct 2018

Process Modelling, Identification, and Control

Effect of Two-Liquid Phases on the Dynamic and the Control of Trayed Distillation Columns

PROPORTIONAL-Integral-Derivative (PID) controllers

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 5. Nonlinear Equations

Scientific Computing: An Introductory Survey

Design of Multivariable Neural Controllers Using a Classical Approach

Implicitly and Explicitly Constrained Optimization Problems for Training of Recurrent Neural Networks

AM 205: lecture 19. Last time: Conditions for optimality Today: Newton s method for optimization, survey of optimization methods

A Definition for Plantwide Controllability. Process Flexibility

Model Predictive Control

Multi-Input Multi-output (MIMO) Processes CBE495 LECTURE III CONTROL OF MULTI INPUT MULTI OUTPUT PROCESSES. Professor Dae Ryook Yang

Numerical Methods I Solving Nonlinear Equations

Scientific Computing: An Introductory Survey

Scientific Computing: An Introductory Survey

Transcription:

Real-Time Implementation of Nonlinear Predictive Control Michael A. Henson Department of Chemical Engineering University of Massachusetts Amherst, MA WebCAST October 2, 2008 1

Outline Limitations of linear model predictive control Introduction to nonlinear model predictive control Real-time implementation issues Nonlinear control of an air separation column Final comments 2

1. Limitations of Linear Model Predictive Control 3

Linear Model Predictive Control (LMPC) Background Constrained multivariable control technology Requires availability of linear dynamic model Chemical process industry standard Real-time implementation Repeated on-line solution of optimization problem Receding horizon formulation Computationally efficient & robust quadratic program Commercial technology DMCplus (Aspen Technology) RMPCT (Honeywell) Many others 4

Dynamic Matrix Control (DMC) Ogunnaike & Ray, Process Dynamics, Modeling and Control, Oxford, 1994 5

Standard LMPC Formulation Min U S.t f, k Φ = Y U U Y k + 1 f, k min U min sp T sp [ Y Y ] W [ Y Y ] = min k + 1 S f = u U Y U k 1 f, k U k+ 1 f, k + D U U f, k Y max + + max e sp T sp [ U f, k U ] We [ U f, k U ] [ S U + S u + d ] p f, k U k+ 1 max p, k + U N T f, k k N + 1 Controlled variables (Y) Penalize deviations from target values (Y sp ) Hard lower & upper bound constraints W U U k f, k Manipulated variables (U) Manipulated to minimize objective function Penalize deviations for target values (U sp ) Hard constraints on absolute values & rate-of-changes Equality constraints Linear step response model identified from plant tests Tuning parameters Sampling time Prediction horizon Control horizon Weighting matrices 6

Triple Column Air Separation Plant 7

Air Separation Plant Control Current practice Empirical linear models & linear model predictive control Adequate for small, well defined operating regimes Production rate changes Motivated by electricity industry deregulation Exaggerated nonlinearities Plant startup & shutdown Operation over large operating regimes Strong nonlinearities Future needs More dynamic operating philosophy Nonlinear behavior more pronounced 8

Upper Column N 2 product N 2 waste Packed column modeled with equilibrium stages Multiple liquid distributors Feeds Reflux from lower column Liquid air Turbine air Withdrawals N 2 product N 2 waste O 2 product O 2 product

Aspen Simulation Model Column model RadFrac Dynamic component balances Steady-state energy balances Non-ideal vapor-liquid equilibrium NRTL for liquid phase Peng-Robinson for vapor phase Thermodynamic property data provided by Praxair PID controllers Reboiler level & overhead pressure Coupling to lower column Lower column effect on upper column described by empirical linear models identified from an Aspen model 10

LMPC Formulation for Upper Column Controller variables (2) Log transformed N 2 waste composition Log transformed O 2 product purity Manipulated variables (5) Feed flowrates of total air, liquid air & turbine air Liquid N 2 addition rate to top of column Gaseous O 2 production rate Constraints Linear step response model identified from step tests on Aspen model Manipulated variable bounds Composition bounds Tuning Sampling time = 1 min Prediction horizon = 4 hr Control horizon = 30 min Weighting matrices chosen by trial-and-error 11

15% Production Rate Changes

15% Production Rate Changes

30% Production Rate Changes y NW 1.2 1 Product purity Upper limit 50 100 150 200 250 300 350 400 450 Time (Min) y O2 1 0.999 Product purity Lower limit 0 100 200 300 400 Time (Min) F go2 1 0.75 50 100 150 200 250 300 350 400 Time (Min) F production rate go2 Setpoint chnage

30% Production Rate Changes F TOT 1 0.85 F LA 1 0.85 100 200 300 400 Time (Min) 100 200 300 400 Time (Min) 1.15 10 F TA 1 0.85 F LNADD 5 100 200 300 400 Time (Min) 0 100 200 300 400 Time (Min)

Summary Part 1 Linear model predictive control (LMPC) is the industry standard for controlling constrained multivariable processes LMPC performance depends strongly on the accuracy of the linear dynamic model LMPC can perform very poorly for highly nonlinear processes or moderately nonlinear processes that operate over wide regions An extension of LMPC based on nonlinear controller design models is needed for such processes 16

NMPC c ontroller NLP solver u Plant y Cost function + constraints Nonlinear dynamic model xˆ Nonlinear state estimator 2. Introduction to Nonlinear Model Predictive Control 17

Desirable MPC Features Multivariable compensation No pairing of input & output variables required Constraint handling capability Input & output constraints explicitly include in controller calculation Model flexibility A wide variety of linear dynamic models can be accommodated Receding horizon formulation Allows updating of model predictions with measurement feedback On-line implementation Simple & robust quadratic program Would like to retain these features in nonlinear extension 18

Nonlinear Model Predictive Control NMPC controller NLP solver u Plant y C ost function + constraints Nonlinear dynamic model xˆ Nonlinear state estimator Nonlinear model Better prediction accuracy than linear model Much more difficult to obtain Nonlinear program (NLP) Necessitated by nonlinear model More difficult to implement than LMPC Nonlinear state estimator Necessary to generate unmeasured state variable 19

Nonlinear Process Modeling First-principle models Requires understanding of process fundamentals Derived from conservation principles Parameters obtained from literature & estimation Most common approach for NMPC Profit NLC (Honeywell) Empirical models Artificial neural networks, NARMAX models, etc. Highly overparameterized & data intensive Poor extrapolation capabilities Suitability for NMPC being demonstrated Apollo (Aspen Technology) Development of accurate, computationally efficient nonlinear models remain a major obstacle to NMPC 20

NMPC Solution Techniques Sequential solution Iterate between NMPC optimization & model solution codes Inefficient & non-robust for large problems Simultaneous solution All discretized model variables posed as decision variables Produces large-scale NLP problems Routinely applied to low-dimensional process models Moderate size problems solvable with commercial codes Limited by problem size Multiple shooting Hybrid of the sequential & simultaneous methods Promising method under development 21

Model Discretization Fundamental model Nonlinear differential-algebraic equations (DAEs) Must be posed as algebraic constraints for NLP solution Requires discretization in time Many methods available Orthogonal collocation Highly accurate discretization method Model equations approximated at fixed collocation points Difficult to approximate sharp solutions Produces dense Jacobian matrix i -1 t t 0 1 t t 2 3 t 4 i th finite element i +1 Finite elements Convenient method for NMPC Divide prediction horizon into N finite elements Place n collocation points in each finite element Accurate & efficient 22

Simultaneous NMPC Formulation Basic elements Quadratic objective function Bounds on input & output variables Nonlinear algebraic equation constraints arising from model discretization Yield a nonlinear programming (NLP) problem NLP characteristics Many decision variables & constraints Computationally difficult Non-convex existence of local minima Sensitive to equation & variable scaling Convergence not guaranteed Min St. X f(x) g( X ) L h( X ) = 0 X 0 X U 23

Representative NMPC Products Profit NLC Developed jointly by Honeywell and PAS Inc. & marketed by Honeywell Based on fundamental nonlinear models State estimation strategy not described Most reported applications to polymer processes Basell, British Petroleum, Chevron Phillips, Dow Apollo Developed & marketed by Aspen Technology Based on empirical nonlinear models of gaintime constant-delay form State estimation performed with extended Kalman filter Designed for polymer processes Industrial applications underway Process Perfecter from Pavilon Technologies & Rockwell Automation 24

Summary Part 2 Nonlinear model predictive control (LMPC) is extension of LPMC based on nonlinear dynamic models & optimization NMPC offers the potential for improved performance when applied to highly nonlinear processes The most widely accepted NMPC approach is based on fundamental model discretization & simultaneous solution Commercial NMPC products are available & have been successfully applied to polymer processes A major challenge to successful NMPC application to other processes is real-time implementation 25

NMPC c ontroller NLP solver u Plant y Cost function + constraints Nonlinear dynamic model xˆ Nonlinear state estimator 3. Real-Time Implementation Issues 26

NMPC Problem Size Simultaneous solution approach Every state variable at every discretization point is treated as a decision variable Typically produces a large NLP problem Problem size determined by: Order of the original dynamic model Number of discretization points Prediction & control horizons On-line implementation Requires repeated solution of NLP problem at each sampling interval Real-time implementation can be non-trivial 27

Real-Time Implementation NMPC requires on-line solution of a large, non-convex NLP problem at each sampling interval Typical industrial sampling intervals ~1 minute Controller must reliably converge within the sampling interval Potential problems Controller converges to a poor local minimum Controller fails to converge within the sampling interval Controller diverges Real-time implementation techniques that mitigate these problems are essential Not a focus of typical academic studies Not openly reported by NMPC vendors & practitioners 28

Controller Design Model Simultaneous solution method Well suited for processes that can be described by nonlinear models of moderate order (<50 DAEs) Yield reasonably sized NMPC problems (~10,000 decision variables) Directly applicable to most polymer reactor models Distillation column models are problematic due to their high order Nonlinear model order reduction Reduce model order while retaining the essential dynamical behavior Few generally applicable methods are available Single perturbation analysis, proper orthogonal decomposition Typically method must be customized to specific process 29

Model Discretization Orthogonal collocation on finite elements Divide prediction horizon into N finite elements with each finite element corresponding to a sampling interval Place n collocation points in each finite element Typically use large N (~100) and small n (<5) Prediction horizon Chosen according to the steady-state response time Dynamics change slowly near end of prediction horizon where the inputs are held constant Finite elements of non-equal length Use regularly spaced elements over control horizon Use increasingly wider spaced elements after the control horizon Reduces number of discretization points Implementation problem dependent 30

NLP Solution Code Wide variety of NLP codes are available Successive quadratic programming (NPSOL) Generalized reduced gradient methods (CONOPT) Interior point methods (IPOPT) Problem dependence Particular codes work better for specific problems General guidelines available but successful implementation requires match of NLP problem and code Typically must be determined by trial-and-error experimentation & code tuning Facilitated by general purpose optimization modeling tools such as AMPL and GAMS Problem/code matching reduces the number of iterations and/or the time per iteration 31

Derivative Information First-order and second-order derivatives Required for discretized model & constraint equations with respect to the decision variables The Jacobian & Hessian matrices tend to be large & illconditioned Can be numerically calculated by finite difference Very time consuming & subject to numerical errors Analytical derivative calculation Derivative exactly calculated from analytical formulas Facilitated by automatic differentiation capabilities of optimization modeling languages (AMPL) Improves NLP code efficiency & robustness 32

Controller Initialization NLP solution An initial guess of the solution X 0 k is required at each sampling interval k Convergence properties depend strongly on X 0 k Need to generate a good X 0 k near the optimal solution Warm start strategy Use converged solution from previous iteration X k-1 to generate X 0 k Set X 0 k+j k = X k+j k-1 and X k+p k = X k+p-1 k-1 Reduces the number of NLP iterations Caveats Not guaranteed to produce fast convergence Not effective immediately following setpoint or disturbance change Min St. f(x) g( X ) 0 h( X ) = 0 X L X X U 33

Summary Part 3 The NMPC simultaneous solution method yields large & non-convex NLPs The NLP must be solved efficiently & robustly during each sampling interval Modifications of the basic NLP strategy are needed to facilitate real-time implementation Nonlinear model order reduction Customized model discretization strategies Matching of discretized model with NLP code Analytical derivative calculation Warm start strategies 34

4. Nonlinear Control of an Air Separation Column 35

Fundamental Model of Upper Column Assumptions Similar to those used for Aspen model development Also assume negligible vapor phase holdups & linear pressure drop across column Equations Dynamic mass & component balances Steady-state energy balances Non-ideal vapor-liquid equilibrium different from Aspen model Reboiler level & overhead pressure controllers Lower column effect on upper column described by empirical linear models Dimensionality 180 differential equations & 137 algebraic variables About 1900 intermediate variables for thermodynamic model 36

Standard NMPC Formulation Problem characteristics 2 output & 5 input variables 317 state variables & 1900 thermodynamic variables Discretization produces ~500,000 decision variables Very challenging NLP problem that pushes the state-of-the-art Application of simultaneous solution method have been limited to open-loop dynamic optimization Possible solutions Develop customized solution techniques that exploit problem structure Develop real-time implementation strategies 37

Real-Time Implementation Use compartmental model Jacobian & Hessian matrices become more sparse Significantly reduces the time for each NLP iteration Allow finite elements to have non-uniform lengths Optimize the NLP solver options Requires code expertise Significantly reduces the number of NLP iterations Use warm start strategy Calculate derivative information analytically Less important strategies Scale the variables & constraint equations Implement setpoint changes as ramps or exponentials 38

Compartmental Modeling Fundamental idea Divide column into several sections (compartments) Only describe the overall (slow) dynamics of each compartment with a differential equation Describe the individual stage (fast) dynamics with algebraic equations Compartmental model characteristics Provides perfect steady-state agreement with fundamental model Fewer differential equations but more algebraic equations Highly accurate if a sufficient number of compartments is used Advantages for NMPC Compartmentalization yields a more sparse model structure that can be exploited by NLP codes S. Khowinij et al., Separation and Purification Technology, 46, 95-109, 2005

Upper Column Compartmentalization Model ODEs AEs Fundamental 180 137 15 compartment 48 269 9 compartment 30 287 5 compartment 18 299 S. Bian et al., Computers & Chemical Engineering, 29, 2096-2109, 2005.

Comparison of Compartmental Models 41

NMPC Formulation for Upper Column Largely unchanged from LMPC formulation Sampling time = 2 min Prediction horizon = 4.3 hr Control horizon = 20 min Discretized dynamic model equations Compartmental model Nonlinear equality constraints NLP solution Interior point code IPOPT within AMPL Less success with popular solver CONOPT AMPL coupled to fundamental model in MATLAB 42

NMPC Formulation for Upper Column 43

Reducing Real-Time Computation Initial CPU time ~40 min/iteration I. Use finite elements with nonuniform lengths II. Use compartment model III. Optimize the NLP solver options IV. Analytically calculate the Jacobian & Hessian matrices V. Scale the variables & constraints VI. Use warm start strategy VII. Implement setpoint changes as ramps Final CPU time ~2 min/iteration 12780 decision variables & 12730 constraints Contribution of each strategy to reduction in worst case NMPC CPU time

15% Production Increase Y O2 Y NW F go2 1.5 1 0.5 0 50 100 150 200 250 300 350 400 1.005 1 Time (Min) Product purity Upper limit 0.995 0 50 100 150 200 250 300 350 400 1.2 1 Time (Min) Product purity Lower limit 0.8 0 50 100 150 200 250 300 350 400 Time (Min) F go2 Production rate Set point change

15% Production Increase F TOT 1.1 1.05 F LA 1.006 1.004 1.002 1 0 200 400 Time (min) 1 0 200 400 Time (min) F TA 1.1 1 0.9 0.8 0 200 400 Time (min) F LNADD 0.3 0.2 0.1 0 200 400 Time (min)

30% Production Decrease Y O2 Y NW 0.05 0.995 0 0 50 100 150 200 250 300 350 400 Time (Min) 1 300 Product purity Upper limit Product purity Lower limit 0 50 100 150 200 250 300 350 400 Time (Min) F go2 250 F Production rate go2 200 Set point change 150 0 50 100 150 200 250 300 350 400 Time (Min) 47

30% Production Decrease 1300 327 F TOT 1200 1100 F LA 326.5 326 325.5 1000 0 200 400 Time (min) 325 0 200 400 Time (min) F TA 90 85 80 75 70 F LNADD 8 6 4 2 0 200 400 Time (min) 0 200 400 Time (min) 48

NMPC CPU Times per Iteration 140 120 15% Production Increase 30% Production Decrease 140 120 100 100 CPU time (s) 80 60 CPU time (s) 80 60 40 40 20 20 0 0 50 100 150 200 Time Index (k) 0 0 50 100 150 200 Time Index (k) 49

Summary Part 4 Direct application of NMPC to the air separation column yielded a very large NLP problem not suitable for realtime implementation The combination of reduced-order modeling and several real-time implementation strategies reduced computation time by 2000% NMPC provided good performance for large production rate changes that proved problematic for LMPC NMPC development required considerable time and effort 50

Final Comments NMPC is a promising technology for nonlinear plants subject to large dynamic changes Availability of an accurate nonlinear model is paramount Real-time implementation strategies are often necessary for reducing computation Nonlinear receding horizon estimation is a promising approach for generating estimates of unmeasured state variables (not shown here) The time and effort required for NMPC development and maintenance must be justified 51