introduction to model predictive control mpc
play

Introduction to Model Predictive Control (MPC) Oscar Mauricio - PowerPoint PPT Presentation

Introduction to Model Predictive Control (MPC) Oscar Mauricio Agudelo Maozca Bart De Moor Course : Computergestuurde regeltechniek ESAT - KU Leuven May 11th, 2017 Basic Concepts Control method for handling input and state constraints


  1. MPC optimization problem – Implementation Details      I B Ax ( ) k N times n   x      A I B  0                    N n N n n n N n b A x x u x x   e e           0 A I B N times   n x n x = number of states , n u = number of inputs, N = prediction horizon Remarks:  The problem is convex if Q and R are positive semi-definite  The hessian matrix H , and the matrices A e and A i are sparse.  Number of optimization variables: N ( n x + n u ). This number can be reduced to N·n u (Condensed form of the MPC) through elimination of the states x ( k ) but at the cost of sparsity !!! Matlab function for solving the LCQP optimization problem x_tilde = quadprog (H, f, Ai, bi , Ae, be) Introduction to Model Predictive Control Course: Computergestuurde regeltechniek 14

  2. MPC with terminal cost Large Prediction Horizon N What happens? We have a winner !!! Short Prediction Horizon N What happens? We have an accident !!! N should be large enough in order to keep the process under control Introduction to Model Predictive Control Course: Computergestuurde regeltechniek 15

  3. MPC with terminal cost   N 1 N 1              T           T min x ( k i ) x ( k i ) Q x ( k i ) x ( k i ) u ( k i ) u ( k i ) R u ( k i ) u ( k i ) ref ref ref ref x , u   N N i 1 i 0         T    x ( k N ) x ( k N ) S x ( k N ) x ( k N ) ref ref subject to         x ( k 1 i ) Ax ( k i ) Bu ( k i ), i 0,1, , N 1,     u ( k i ) u , i 0,1, , N 1, max    x x ( k i ) , i 1,2, , N , max x k 2 ( ) Main goal of the terminal cost: k  x ( 1) k  To include the terms for which i ≥ N in the cost x ( 2) function (To extend the prediction horizon to infinity) x ( ) k  x ( k N ) What do we gain? Effect of the stabilizing control law u ( k ) = - Kx ( k ) “Stability” k   x ( ) x k 1 ( ) k  x ref ( ) 0 steady-state Introduction to Model Predictive Control Course: Computergestuurde regeltechniek 16

  4. MPC with terminal cost How to calculate S ? By solving the discrete-time Riccati equation,       T T T 1 T A SA S ( A SB B SB )( R ) ( B SA ) Q 0      1 where u ( k ) = -Kx ( k ) is the stabilizing control law.   T T K B SB R B SA . How to carry out this calculation in Matlab? [K,S] = dlqr (A, B, Q, R ) Implementation details of the MPC with terminal constraint The only change in the LCQP is the hessian matrix N - 1 times   Q       Q                  N n n N n n H x u x u 2 S     R         R N times Introduction to Model Predictive Control Course: Computergestuurde regeltechniek 17

  5. H0K03a : Advanced Process Control Model-based Predictive Control 1 : Introduction Bert Pluymers Prof. Bart De Moor Katholieke Universiteit Leuven, Belgium Faculty of Engineering Sciences Department of Electrical Engineering (ESAT) Research Group SCD-SISTA H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  6. Overview • Overview • Motivating Example • MPC Paradigm • History • Mathematical Formulation • MPC 1 : Introduction • MPC Basics • MPC 2 : Dynamic Optimization • MPC 3 : Stability • MPC 4 : Robustness • Industry Speaker : Christiaan Moons (IPCOS) (november 3 rd ) S ignal processing I dentification S ystem T heory 1 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  7. Overview • Overview • Motivating Example • MPC Paradigm • History • Mathematical Formulation Lesson 1 : Introduction • MPC Basics • Motivating example • MPC Paradigm • History • Mathematical Formulation • MPC Basics S ignal processing I dentification S ystem T heory 2 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  8. Motivating Example • Overview • Motivating Example • MPC Paradigm • History • Mathematical Formulation Consider a linear discrete-time state-space model • MPC Basics called a ‘ double integrator ’. We want to design a state feedback controller that stabilizes the system (i.e. steers it to x=[0; 0]) starting from x=[1; 0], without violating the imposed input constraints S ignal processing I dentification S ystem T heory 3 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  9. Motivating Example • Overview • Motivating Example • MPC Paradigm • History • Mathematical Formulation Furthermore, we want the controller to lead to a • MPC Basics minimal control ‘cost’ defined as with state and input weighting matrices A straightforward candidate is the LQR controller, which has the form S ignal processing I dentification S ystem T heory 4 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  10. Motivating Example • Overview • Motivating Example • MPC Paradigm • History LQR controller • Mathematical Formulation • MPC Basics 1 0.5 x k,1 0 -0.5 0 50 100 150 200 250 300 k 10 0 u k -10 -20 -30 0 50 100 150 200 250 300 S ignal processing k I dentification S ystem T heory 5 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  11. Motivating Example • Overview • Motivating Example • MPC Paradigm • History LQR controller with clipped inputs • Mathematical Formulation 1 • MPC Basics 0.5 x k,1 0 -0.5 -1 0 50 100 150 200 250 300 k 0.15 0.1 0.05 u k 0 -0.05 -0.1 0 50 100 150 200 250 300 S ignal processing k I dentification S ystem T heory 6 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  12. Motivating Example • Overview • Motivating Example • MPC Paradigm • History LQR controller with R=100 • Mathematical Formulation 1 • MPC Basics 0.5 x k,1 0 -0.5 0 50 100 150 200 250 300 k 0.1 0.05 u k 0 -0.05 -0.1 0 50 100 150 200 250 300 S ignal processing I dentification k S ystem T heory 7 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  13. Motivating Example • Overview • Motivating Example • MPC Paradigm • History • Mathematical Formulation waste gas • MPC Basics F T Cracking P Furnace Feed H condenser EDC L EDC / VC / HCl superheater evaporato T r P F Fuel gas Systematic way to deal with this issue… ? S ignal processing I dentification S ystem T heory 8 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  14. MPC Paradigm • Overview • Motivating Example • MPC Paradigm • History • Mathematical Formulation • MPC Basics Process industry in ’70s : how to control a process ??? S ignal processing I dentification and… easy to understand (i.e. teach) and implement ! S ystem T heory 9 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  15. MPC Paradigm • Overview • Motivating Example • MPC Paradigm → Modelbased Predictive Control (MPC) • History • Mathematical Formulation • MPC Basics • Predictive : use model to optimize future input sequence S ignal processing • Feedback : incoming measurements used to compensate for I dentification inaccuracies in predictions and unmeasured disturbances S ystem T heory 10 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  16. MPC Paradigm • Overview • Motivating Example • MPC Paradigm MPC has earned its place in the control hierarchy… • History • Mathematical Formulation • MPC Basics • Econ. Opt. : optimize profits using market and plant information (~day) • MPC : steer process to desired trajectory (~minute) • PID : control flows, temp., press., … towards MPC setpoints (~second) S ignal processing I dentification S ystem T heory 11 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  17. History • Overview • Motivating Example • MPC Paradigm • History • Mathematical Formulation Before 1960’s : • MPC Basics • only input/output models, i.e. transfer functions, FIR models • Controllers : • heuristic (e.g. on/off controllers) • PID, lead/lag compensators, … • mostly SISO • MIMO case : input/output pairing, then SISO control S ignal processing I dentification S ystem T heory 12 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  18. History • Overview • Motivating Example • MPC Paradigm • History • Mathematical Formulation Early 1960’s : Rudolf Kalman • MPC Basics • Introduction of the State Space model : • notion of states as ‘internal memory’ of the system • states not always directly measurable : ‘Kalman’ Filter ! • afterwards LQR (as the dual of Kalman filtering) • LQG : LQR + Kalman filter • But LQG no real succes in industry : • constraints not taken into account • only for linear models • only quadratic cost objectives S ignal processing I dentification • no model uncertainties S ystem T heory 13 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  19. History • Overview • Motivating Example • MPC Paradigm • History • Mathematical Formulation During 1960’s : ‘Receding Horizon’ concept • MPC Basics • Propoi, A. I. (1963). “ Use of linear programming methods for synthesizing sampled-data automatic systems ”. Automatic Remote Control, 24(7), 837 – 844 . • Lee, E. B., & Markus, L. (1967). “ Foundations of optimal control theory ” . New York: Wiley. : “… One technique for obtaining a feedback controller synthesis from knowledge of open-loop controllers is to measure the current control process state and then compute very rapidly for the open- loop control function. The first portion of this function is then used during a short time interval, after which a new measurement of the function is computed for this new measurement. The procedure is then repeated. …” S ignal processing I dentification S ystem T heory 14 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  20. History • Overview • Motivating Example • MPC Paradigm • History • Mathematical Formulation During 1960’s : ‘Receding Horizon’ concept • MPC Basics S ignal processing I dentification S ystem T heory 15 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  21. History • Overview • Motivating Example • MPC Paradigm • History • Mathematical Formulation 1970’s : 1 st generation MPC • MPC Basics • Extension of the LQR / LQG framework through combination with the ‘receding horizon’ concept • IDCOM (Richalet et al., 1976) : • IR models • quadratic objective • input / output constraints • heuristic solution strategy • DMC (Shell, 1973) : • SR models • quadratic objective • no constraints S ignal processing • solved as least-squares problem I dentification S ystem T heory 16 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  22. History • Overview • Motivating Example • MPC Paradigm • History • Mathematical Formulation Early 1980’s : 2 nd generation MPC • MPC Basics • Improve the rather ad-hoc constraint handling of the 1 st generation MPC algorithms • QDMC (Shell, 1983) : • SR models • quadratic objective • linear constraints • solved as a quadratic program (QP) Late 1980’s : 3 rd generation MPC • IDCOM-M (Setpoint, 1988), SMOC (Shell, late 80’s), … • Constraint prioritizing • Monitoring / Removal of ill-conditioning S ignal processing I dentification • fault-tolerance w.r.t. lost signals S ystem T heory 17 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  23. History • Overview • Motivating Example • MPC Paradigm • History • Mathematical Formulation Mid 1990’s : 4 th generation MPC • MPC Basics • DMC-Plus (Honeywell Hi- Spec, ‘95), RMPCT (Aspen Tech, ‘96) • Graphical user interfaces • Explicit control objective hierarchy • Estimation of model uncertainty Currently (in industry) still … • … no guarantees for stability • … often approximate optimization methods • … not all support state -space models S ignal processing • … no explicit use of model uncertainty in controller design I dentification S ystem T heory 18 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  24. MPC Formulation • Overview • Motivating Example • MPC Paradigm • History • Mathematical Form. Basic ingredients : • MPC Basics • prediction model to predict plant response to future input sequence • (finite,) sliding window (receding horizon control) • parameterization of future input sequence into finite number of parameters • discrete-time : inputs at discrete time steps • continuous-time : weighted sum of basis functions • optimization of future input sequence • reference trajectory • constraints S ignal processing I dentification S ystem T heory 19 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  25. MPC Formulation • Overview • Motivating Example • MPC Paradigm • History • Mathematical Form. • MPC Basics S ignal processing I dentification S ystem T heory 20 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  26. MPC Formulation • Overview • Motivating Example • MPC Paradigm • History • Mathematical Form. Assumptions / simplifications : • MPC Basics • no plant-model mismatch : • no disturbance inputs • all states are measured (or estimation errors are negligible) • no sensor noise . . . seem trivial issues but form essential difficulties in applications . . . S ignal processing I dentification S ystem T heory 21 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  27. Theoretical Formulation (cfr. CACSD) • Overview • Motivating Example • MPC Paradigm • History • Mathematical Form. • MPC Basics • future window of length ∞ • impossible to solve, because . . . • infinite number of optimization variables • infinite number of inequality constraints S ignal processing I dentification • infinite number of equality constraints S ystem T heory 22 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  28. Formulation 1 • Overview • Motivating Example • MPC Paradigm • History • Mathematical Form. • MPC Basics • still future window of length ∞ , BUT • quadratic cost function • no input or state constraints • linear model S ignal processing • Optimal solution has the form u k = -Kx k I dentification • Find K by solving Ricatti equation → LQR controller S ystem T heory 23 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  29. Formulation 1 : LQR • Overview • Motivating Example • MPC Paradigm • History • Mathematical Form. PRO • MPC Basics • explicit, linear solution • low online computational complexity CON • constraints not taken into account • linear model assumption • only quadratic cost functions • no predictive capacity S ignal processing I dentification S ystem T heory 24 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  30. Formulation 2 • Overview • Motivating Example • MPC Paradigm • History • Mathematical Form. • MPC Basics • changes : • keep all constraints etc. • reduce horizon to length N • solution obtainable through dynamic optimization S ignal processing • only u 0 is applied, in order to obtain feedback at each k about x k I dentification S ystem T heory 25 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  31. Formulation 2 : Classic MPC • Overview • Motivating Example • MPC Paradigm • History • Mathematical Form. PRO • MPC Basics • takes constraints into account • proactive behaviour • wide range of (convex) cost functions possible • also for nonlinear models (but convex ?) CON • high online computational complexity • no explicit solution • feasibility ? • stability ? • robustness ? S ignal processing I dentification • In what follows, we will concentrate on this formulation. S ystem T heory 26 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  32. Formulation 3 • Overview • Motivating Example • MPC Paradigm • History • Mathematical Form. • MPC Basics • linear form of feedback law is enforced • problem can be recast as a convex (LMI-based) optimization problem S ignal processing I dentification more on this later . . . S ystem T heory 27 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  33. Summary • Overview • Motivating Example Formulation 1 • MPC Paradigm • History • infinite horizon • Mathematical Form. • no constraints • MPC Basics • explicit solution • → LQR Formulation 2 • finite horizon • constraints • no explicit solution • → Classic MPC Formulation 3 • infinite horizon • constraints • explicit solution enforced S ignal processing I dentification • → has elements of LQR ánd MPC S ystem T heory 28 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  34. Open vs. closed loop control • Overview • Motivating Example • MPC Paradigm • History • Mathematical Form. • MPC Basics • Open loop : no state/output feedback : feedforward control • Closed loop : state/output feedback : e.g. LQR MPC is a mix of both : • internally optimizing an open loop finite horizon control problem • but at each k there is state feedback to compensate unmodelled dynamics and disturbance inputs → closed loop control paradigm. • has implications on e.g stability analysis • Is of essential importance in Robust MPC, more on this later… S ignal processing I dentification S ystem T heory 29 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  35. Standard MPC Algorithm • Overview • Motivating Example • MPC Paradigm 1. Assume current time = 0 • History • Mathematical Form. 2. Measure or estimate x 0 and solve for u N and x N : • MPC Basics 3. Apply u o 0 and go to step 1 Remarks : • : Terminal state cost and constraint • : some kind of norm function S ignal processing I dentification • Sliding Window S ystem T heory 30 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  36. MPC design choices • Overview • Motivating Example • MPC Paradigm • History • Mathematical Form. • MPC Basics 1.prediction model 2. cost function • norm • horizon N • terminal state cost 3. constraints • typical input/state constraints • terminal constraint S ignal processing I dentification S ystem T heory 31 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  37. Prediction Model • Overview • Motivating Example • MPC Paradigm • Input/Output or State-Space ? • History • Mathematical Form. • I/O restricted to stable, linear plants • MPC Basics • Hence SS-models • Type of model determines class of MPC algorithm • Linear model : Linear MPC • Non-linear model : Non-linear MPC (or NMPC) • Linear model with uncertainties : Robust MPC • BUT : MPC is always a non-linear feedback law due to the constraints • Type of model determines class of involved optimization problem • Linear models lead to most efficiently solvable opt.-problems S ignal processing • Choose simplest model that fits the real plant ‘sufficiently well’ I dentification S ystem T heory 32 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  38. Cost Function • Overview • Motivating Example • MPC Paradigm • History • Mathematical Form. General Cost Function: • MPC Basics Design Functions and Parameters: 1. 2. Horizon N 3. F (x) 4. Reference Trajectory S ignal processing I dentification S ystem T heory 33 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  39. Cost Function • Overview • Motivating Example • MPC Paradigm • History • Mathematical Form. • MPC Basics S ignal processing I dentification S ystem T heory 34 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  40. Cost Function • Overview • Motivating Example • MPC Paradigm • History • Mathematical Form. • MPC Basics S ignal processing I dentification S ystem T heory 35 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  41. Cost Function • Overview • Motivating Example • MPC Paradigm • History • Mathematical Form. • MPC Basics S ignal processing I dentification S ystem T heory 36 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  42. Constraints • Overview • Motivating Example • MPC Paradigm • History • Mathematical Form. • MPC Basics S ignal processing I dentification S ystem T heory 37 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  43. Constraints • Overview • Motivating Example • MPC Paradigm • History • Mathematical Form. • MPC Basics S ignal processing I dentification S ystem T heory 38 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  44. Constraints • Overview • Motivating Example • MPC Paradigm • History • Mathematical Form. • MPC Basics S ignal processing I dentification S ystem T heory 39 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  45. Constraints • Overview • Motivating Example • MPC Paradigm • History • Mathematical Form. • MPC Basics S ignal processing I dentification S ystem T heory 40 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  46. Terminal State Constraints • Overview • Motivating Example • MPC Paradigm • History • Mathematical Form. • MPC Basics S ignal processing I dentification S ystem T heory 41 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  47. Reference Insertion • Overview • Motivating Example • MPC Paradigm • History • Mathematical Form. • MPC Basics S ignal processing I dentification S ystem T heory 42 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  48. Reference Insertion • Overview • Motivating Example • MPC Paradigm • History • Mathematical Form. • MPC Basics S ignal processing I dentification S ystem T heory 43 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  49. Reference Insertion • Overview • Motivating Example • MPC Paradigm • History • Mathematical Form. • MPC Basics S ignal processing I dentification S ystem T heory 44 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  50. Reference Insertion • Overview • Motivating Example • MPC Paradigm • History • Mathematical Form. • MPC Basics S ignal processing I dentification S ystem T heory 45 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  51. Exercise Sessions • Overview • Motivating Example • MPC Paradigm • History • Mathematical Form. • Ex. 1 : Optimization oriented • MPC Basics • Ex. 2 : MPC oriented • Ex. 3 : real-life MPC/optimization problem Evaluation • (brief !) report (groups of 2) • oral examination → insight ! S ignal processing I dentification S ystem T heory 46 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  52. • Overview • Motivating Example • MPC Paradigm • History • Mathematical Form. • MPC Basics S ignal processing I dentification S ystem T heory 47 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 1 : Introduction bert.pluymers@esat.kuleuven.be

  53. H0K03a : Advanced Process Control Model-based Predictive Control 2 : Dynamic Optimization Bert Pluymers Prof. Bart De Moor Katholieke Universiteit Leuven, Belgium Faculty of Engineering Sciences Department of Electrical Engineering (ESAT) Research Group SCD-SISTA H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  54. Overview • Overview • Optimization Basics • Convex Optimization • Dynamic Optimization • Optimization Algorithms Lesson 2 : Dynamic Optimization • Optimization basics • Convex Optimization • Dynamic Optimization • Optimization Algorithms S ignal processing I dentification S ystem T heory 1 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  55. Notation • Overview • Optimization Basics • Convex Optimization General form : • Dynamic Optimization • Optimization Algorithms Legend : • : vector of optimization variables • : objective function / cost function • : equality constraints • : inequality constraints • : solution to optimization problem S ignal processing I dentification • : optimal function value S ystem T heory 2 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  56. Gradient & Hessian • Overview • Optimization Basics • Convex Optimization Gradient : • Dynamic Optimization • Optimization Algorithms (points in direction of steepest ascent) Hessian : (gives information about local curvature of ) S ignal processing I dentification S ystem T heory 3 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  57. Gradient & Hessian • Overview • Optimization Basics • Convex Optimization Example : • Dynamic Optimization • Optimization Algorithms Gradients for different Eigenvectors of hessian at the origin ( ) S ignal processing I dentification S ystem T heory 4 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  58. Unconstrained Optimality Conditions • Overview • Optimization Basics • Convex Optimization Necessary condition for optimality of • Dynamic Optimization • Optimization Algorithms Sufficient conditions for minimum positive definite Classification of optima : positive definite minimum indefinite saddle point S ignal processing I dentification negative definite maximum S ystem T heory 5 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  59. Lagrange Multipliers • Overview • Optimization Basics • Convex Optimization • Dynamic Optimization Introduction of Lagrange multipliers leads to Lagrangian : • Optimization Algorithms with Lagrange multipliers of the ineq. constraints Lagrange multipliers of the eq. constriants Constrained optimum can be found as S ignal processing I dentification Minimization over but Maximization over !!!! S ystem T heory 6 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  60. Lagrange Multipliers • Overview • Optimization Basics • Convex Optimization • Dynamic Optimization Constrained optimum can be found as • Optimization Algorithms First-order optimality conditions in Gradient of Gradient of Gradient of eq. ineq. S ignal processing I dentification Interpretation ??? S ystem T heory 7 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  61. Lagrange Multipliers • Overview • Optimization Basics • Convex Optimization • Dynamic Optimization • Optimization Algorithms S ignal processing I dentification S ystem T heory 8 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  62. Lagrange Multipliers • Overview • Optimization Basics • Convex Optimization • Dynamic Optimization • Optimization Algorithms S ignal processing I dentification S ystem T heory 9 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  63. Lagrange Multipliers • Overview • Optimization Basics • Convex Optimization • Dynamic Optimization • Optimization Algorithms S ignal processing I dentification S ystem T heory 10 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  64. Lagrange Duality • Overview • Optimization Basics • Convex Optimization • Dynamic Optimization • Optimization Algorithms S ignal processing I dentification S ystem T heory 11 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  65. Karush-Kuhn-Tucker Conditions • Overview • Optimization Basics • Convex Optimization • Dynamic Optimization From previous considerations we can now state • Optimization Algorithms necessary conditions for constrained optimality : These are called the KKT conditions . S ignal processing I dentification S ystem T heory 12 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  66. Optimization Tree • Overview • Optimization Basics • Convex Optimization Optimization • Dynamic Optimization • Optimization Algorithms discrete continuous unconstrained constrained non-convex convex optimization optimization S ignal processing I dentification NLP QP SOCP SDP LP S ystem T heory 13 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  67. Convex Optimization • Overview • Optimization Basics • Convex Optimization An optimization problem of the form • Dynamic Optimization • Optimization Algorithms is convex iff for any two feasible points : • is feasible • This is satisfied iff • `the cost function is a convex function • the equality constraints or linear or absent S ignal processing I dentification • the inequality constraints define a convex region S ystem T heory 14 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  68. Convex Optimization • Overview • Optimization Basics • Convex Optimization • Dynamic Optimization Importance of convexity : • Optimization Algorithms • no local minima, one global optimum • under certain conditions, primal and dual have same solution • efficient solvers exist • polynomial worst-case execution time • guaranteed precision S ignal processing I dentification S ystem T heory 15 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  69. From LP to SDP • Overview generality • Optimization Basics • Convex Optimization • Dynamic Optimization • Optimization Algorithms SDP Semi-Definite Programming SOCP Second Order Cone Progr. QP Quadratic Programming LP Linear Programming computational efficiency S ignal processing I dentification S ystem T heory 16 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  70. Linear Programming (LP) • Overview • Optimization Basics • Convex Optimization General form : • Dynamic Optimization • Optimization Algorithms Remarks : • always convex • optimal solution always at a corner of ineq. constraints S ignal processing I dentification • typically used in finance / economics / management S ystem T heory 17 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  71. Linear Programming (LP) • Overview • Optimization Basics • Convex Optimization Eliminating equality constraints : • Dynamic Optimization • Optimization Algorithms Reparametrize optimization vector : Leading to S ignal processing I dentification S ystem T heory 18 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  72. Quadratic Programming (QP) • Overview • Optimization Basics • Convex Optimization General form : • Dynamic Optimization • Optimization Algorithms Remarks : • convex iff • LP is a special case of QP (imagine ) • Used in all domains of engineering S ignal processing I dentification S ystem T heory 19 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  73. Second-Order Cone Programming (SOCP) • Overview • Optimization Basics • Convex Optimization General form : • Dynamic Optimization • Optimization Algorithms SOC constraint Remarks : • Always convex • Second-Order, Ice-Cream, Lorentz cone : • S ignal processing I dentification • Engineering applications with sum-of-squares, S ystem T heory robust LP, robust QP 20 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  74. Second-Order Cone Programming (SOCP) • Overview • Optimization Basics • Convex Optimization QP as special case of SOCP : • Dynamic Optimization • Optimization Algorithms Rewrite this as which is equivalent to By introducing an additional variable we get the SOCP S ignal processing I dentification S ystem T heory 21 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  75. Semi-Definite Programming (SDP) • Overview • Optimization Basics • Convex Optimization General form : • Dynamic Optimization • Optimization Algorithms with Remarks : • means that should be positive semi-definite • means that should be pos. semi-def. • always convex : • ineq. constraints called LMI’s : L inear M atrix I neq. • LMI’s arise in many applications of S ignal processing I dentification Systems & Control Theory S ystem T heory 22 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  76. Semi-Definite Programming (SDP) • Overview • Optimization Basics • Convex Optimization convexity : • Dynamic Optimization • Optimization Algorithms Easily verified : hence and therefore S ignal processing I dentification which means that LMI’s are convex constraints . S ystem T heory 23 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  77. Semi-Definite Programming (SDP) • Overview • Optimization Basics • Convex Optimization Schur Complement : • Dynamic Optimization • Optimization Algorithms is equivalent with More general : Remarks : • Originally developed in a statistical framework • Today widely used in S&C in order to reformulate S ignal processing I dentification problems involving eigenvalues as an LMI. S ystem T heory 24 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  78. Semi-Definite Programming (SDP) • Overview • Optimization Basics • Convex Optimization SOCP as special case of SDP : • Dynamic Optimization • Optimization Algorithms is equivalent with (by using Schur complement) : ( exercise : apply Schur complement to LMI and reconstruct SOC constraint ) S ignal processing I dentification S ystem T heory 25 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  79. Convexity = SDP ? • Overview • Optimization Basics • Convex Optimization Formulated as SDP Convex optimization • Dynamic Optimization • Optimization Algorithms Convex optimization formulatable as SDP Example : S ignal processing I dentification S ystem T heory 26 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  80. Convexity ≠ SDP ! • Overview • Optimization Basics • Convex Optimization • Dynamic Optimization convex optimization • Optimization Algorithms convexity difficult to exploit (computationally) SDP SOCP QP structure easily exploitable LP (many toolboxes available) → significant efficiency gains ! S ignal processing I dentification S ystem T heory 27 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  81. MPC Paradigm • Overview • Optimization Basics • Convex Optimization • Dynamic Optimization • At every discrete time instant , given information about • Optimization Algorithms the current system state , calculate an ‘optimal’ input sequence over a finite time horizon : N N • Apply the first input to the real system S ignal processing I dentification • Repeat at the next time instant , using new state S ystem T heory measurements / estimates. 28 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  82. Dynamic Programming • Overview • Optimization Basics • Convex Optimization • Dynamic Optimization • Optimization Algorithms • Finding the optimal input sequence is done by means of Dynamic Programming • Definition * : “DP is a class of solution methods for solving sequential decision problems with a compositional cost structure” • Invented by Richard Bellman (1920-1984) in 1953 S ignal processing I dentification S ystem T heory 29 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  83. Dynamic Programming • Overview • Optimization Basics • Convex Optimization • Dynamic Optimization Example 1 : The darts problem * : • Optimization Algorithms “Obtain a score of 301 as fast as possible while beginning and ending in a double.” http://plus.maths.org/issue3/dynamic/ • Decision : next area towards which to throw the dart S ignal processing • Cost : time I dentification S ystem T heory 30 * D. Kohler, Journal of the Operational Research Society , 1982. A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  84. Dynamic Programming • Overview • Optimization Basics • Convex Optimization • Dynamic Optimization Example 2 : DNA sequence allignment : • Optimization Algorithms G A A T T C A G T T A (sequence #1) G G A T C G A (sequence #2) • Decisions : which nucleotides to match • Cost : e.g. based on substitution / insertion prob. • Algorithms : Baum/Welch, Waterman/Smith, … S ignal processing I dentification S ystem T heory 31 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  85. Dynamic Programming in MPC • Overview • Optimization Basics “ Series of sequential decisions ” : • Convex Optimization • Dynamic Optimization measured • Optimization Algorithms Optimization variables Typical optimization problem : S ignal processing I dentification → standard QP formulation ? S ystem T heory 32 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  86. Linear MPC as standard QP • Overview • Optimization Basics Optimization vector : • Convex Optimization • Dynamic Optimization • Optimization Algorithms Cost function : For convexity hence . S ignal processing I dentification S ystem T heory 33 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

  87. Linear MPC as standard QP • Overview • Optimization Basics • Convex Optimization • Dynamic Optimization Equality constraints • Optimization Algorithms with Sparsity : many entries in equal to 0 S ignal processing I dentification S ystem T heory 34 A utomation H0k03a : Advanced Process Control – Model-based Predictive Control 2 : Dynamic Optimization bert.pluymers@esat.kuleuven.be

Recommend


More recommend