Model Predictive Control Online optimization versus explicit precomputed

  • Slides: 39
Download presentation
Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7. 6.

Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7. 6. 2005 1

Outline • Introduction • Brief history • Linear MPC – Theory, feasibility, stability, performance

Outline • Introduction • Brief history • Linear MPC – Theory, feasibility, stability, performance • • • 2 Derivation of explicit MPC Nonlinear and hybrid MPC Applications Future directions Conclusions

Introduction Control problem: Find stabilizing control strategy that – Minimize objective functional – Satisfies

Introduction Control problem: Find stabilizing control strategy that – Minimize objective functional – Satisfies constraints – is robust towards uncertainty 3

Solution strategies Closed loop optimal control Feedback: u=k(x) s. t. closed loop trajectories satisfying

Solution strategies Closed loop optimal control Feedback: u=k(x) s. t. closed loop trajectories satisfying optimality Advantages: • Feedback • Uncertainty • Disturbances • Unstable systems Drawbacks • Find k(x)? 4 Open loop optimal control Input trajectory: u=u(t, x 0) solving optimization problem Advantages: • Computationally feasible Drawbacks: • No feedback • Disturbances? • Unstable systems • Uncertainty

Possible solution 1 : MPC with online optimization • Solve optimization problem over finite

Possible solution 1 : MPC with online optimization • Solve optimization problem over finite horizon • Implement optimal input for 2[t, t+ ] • Re-optimize at next sample (feedback) • Optimal control inputs implicitly via optimalization 5

MPC with online optimization 6 (Allgöwer, 2004)

MPC with online optimization 6 (Allgöwer, 2004)

Solution strategies Close loop optimal control Feedback: u=k(x) s. t. closed loop trajectories satisfying

Solution strategies Close loop optimal control Feedback: u=k(x) s. t. closed loop trajectories satisfying optimality Advantages: • Feedback • Uncertainty • Disturbances • Unstable systems Drawbacks • Find k(x)? 7 Open loop optimal control Input trajectory: u=u(t, x 0) solving optimization problem Advantages: • Computationally feasible Drawbacks: • No feedback • Disturbances? • Unstable systems • Uncertainty

Possible solution 2: Explicit MPC (Bemporad et al. , 2002, Tøndel et al. ,

Possible solution 2: Explicit MPC (Bemporad et al. , 2002, Tøndel et al. , 2003) • Solve optimization problem offline for all x 2 X • For linear systems: multiparametric QP (mp-QP) with solution • Piecewise affine controller • Exactly identical to implicit solution (via online optimization) 8

Model Predictive Control (MPC) Brief history (Qin & Badgwell, 2003) • LQR (Kalman, 1964)

Model Predictive Control (MPC) Brief history (Qin & Badgwell, 2003) • LQR (Kalman, 1964) – Unconstrained infinite horizon • Constrained finite horizon – MPC (Richalet et al. , 1978, Cutler & Ramaker, 1979) – Driven by demands in industry – Defined MPC paradigm • Posed as quadration program (QP) (Cutler et al. 1983) – Constraints appear explicitly • Academic research (919 papers in 2002! (Allgöwer, 2004)) – Stability – Performance 9 • Explicit MPC (Bemporad et al. 2002, Tøndel et al. 2003)

Linear MPC – Problem formulation (Scokaert & Rawlings, 1998, Bemporad et al, 2002) •

Linear MPC – Problem formulation (Scokaert & Rawlings, 1998, Bemporad et al, 2002) • Linear time-invariant discrete model: • Objective: • Constraints: 10

Linear MPC – Unconstrained case • Problem: • Classical LQR solution (Kalman 1960) •

Linear MPC – Unconstrained case • Problem: • Classical LQR solution (Kalman 1960) • K calculated from algebraic Ricatti equation • Assymptotically stabilizing 11

Linear MPC – Infinite horizon (Constrained LQR) • Problem: • • 12 Infinite number

Linear MPC – Infinite horizon (Constrained LQR) • Problem: • • 12 Infinite number of decision variables Stability proved by Rawlings & Muske (1993) Computationally feasible (Scokeart & Rawlings, 1998) Computationally expensive

Linear MPC – Finite input horizon • Problem: • Achieved solution: • Stabilizing for

Linear MPC – Finite input horizon • Problem: • Achieved solution: • Stabilizing for K=0 and K=KLQ provided N large enough 13

Important aspects x(t) • Feasibility * x(t+ ) * – Slack on output constraints

Important aspects x(t) • Feasibility * x(t+ ) * – Slack on output constraints – Feasible region for unstable systems under input constraints • Closed loop stability – Contraction constraint – Terminal constraint (x(k+N)=0) – Stable for control horizon N ”large enough” • Performance – Implemented control trajectory may differ significantly from computed open-loop optimal – May lead to infeasibility – Solution: Long enough control horizon • On-line computational requirements 14

Derivation of explicit MPC (Bemporad et al. , 2002) • Rewrite constrained LQR problem:

Derivation of explicit MPC (Bemporad et al. , 2002) • Rewrite constrained LQR problem: • QP parameterized in initial state x(t) • Solution for all x(t) by multi-parametric quadratic program (mp-QP) • Solve mp-QP offline to find optimal solution U*t=U*(x(t)) • Optimal input given by 15

Derivation of explicit MPC (2) • With • From Karush-Kuhn-Tucker optimality conditions and assuming

Derivation of explicit MPC (2) • With • From Karush-Kuhn-Tucker optimality conditions and assuming linearly independent active constraints: • KKT conditions gives partitioning of feasible regions into polyhedra • Inherits properties of optimization problem 16

Partitioning of state space Offline computations Typical Algorithm: • Choose initial active set •

Partitioning of state space Offline computations Typical Algorithm: • Choose initial active set • Find control law for active set • Find critical region correspond to active set • Systematic exploration of remaining parameter space Bemproad et al. 2002 • (Build search tree/ reduce complexity) 17 Tøndel et al. 2003

Explicit MPC: Online computations • Determine critical region – Sequential search – Binary search

Explicit MPC: Online computations • Determine critical region – Sequential search – Binary search tree • Implement optimal control • Complexity of partition increses with # states/parameters Binary search tree Sequential search 18

Properties of explicit MPC • Dimensional explosion • max 5 -7 states/parameter with current

Properties of explicit MPC • Dimensional explosion • max 5 -7 states/parameter with current formulation • Disturbance rejection, reference tracking and soft/variable constraints can be included, but increases complexity • Greatly simplified code vs. online optimization – Safety-critical systems 19

Nonlinear MPC • Based on nonlinear process model and/or constraints to improve forcasting •

Nonlinear MPC • Based on nonlinear process model and/or constraints to improve forcasting • Requires solution of NLP, generally non-convex • Stability and performance issues more important • ”There are no analysis methods available that permit to analyze close loop stability based on knowledge of plant model, objective functional and horizon lengths” (Allgöwer et al. , 1999) • Approaches: – – – 20 Infinite horizon NMPC Zero state terminal equality constraint Dual mode NMPC Contractive NMPC Quasi-infinite horizon NMPC

Nonlinear explicit MPC • Exact solution cannot be represented as PWA control law •

Nonlinear explicit MPC • Exact solution cannot be represented as PWA control law • Approximative PWA solutions with user-specified tolerance can be found (Johansen, 2004) – Solution of NLP’s offline – k-d tree partitioning of state space – Joint convexity of obejctive functional and constraints assumed • Complexity similar to linear explicit MCP • Guaranteed stability under assumptions on tolerance • Larger potential than linear EMPC? 21

Hybrid MPC • Applications to broad class of systems including – Linear hybrid dynamical

Hybrid MPC • Applications to broad class of systems including – Linear hybrid dynamical systems – Piecewise linear systems (including approximations of nonlinear systems – Linear systems with constraints • Modeled as mixed logical dynamical systems (Bemporad & Morari, 1999) • MPC problem is MILP/MIQP • Difficult to solve online in available time • Explicit Hybrid MPC is PWA (Bemporad et al. 2002, Dua et al. 2002) – Identical to implicit solution found by online optimization 22

Application areas Online optimization Linear Nonlinear/Hybrid + Reconfigurable + Proven technology - Slow processes

Application areas Online optimization Linear Nonlinear/Hybrid + Reconfigurable + Proven technology - Slow processes - Not safety critical +Important nonlinearities/discret events + Reconfigureable -Slow processes - Not safety critical Refinery Explicit precomputed 23 Polymer reactor +Safety critical +Low-cost hardware +High sampling rate -Low order -Fixed configuration ESP for cars Compressor Anti-surge

Future directions • Linear MPC – Improved models / adaptive formulations – Multi-objective, prioritized

Future directions • Linear MPC – Improved models / adaptive formulations – Multi-objective, prioritized constraints etc. • Nonlinear/Hybrid MPC – Computational efficiency – Guaranteed stability/performance • Explicit MPC – Reduction of complexity vs degree of suboptimality – Reconfigurability • Exploit structure of problem 24

Concluding remarks • Online optimization MPC for – Slow systems – Large systems •

Concluding remarks • Online optimization MPC for – Slow systems – Large systems • Explicit precomputed MPC for – Small systems with high sampling rate – Safety critical – Dedicated hardware (controller on a chip) Acknowledgements Thanks to Tor Arne Johansen, Petter Tøndel and Olav Slupphaug for invaluable help with preparing this presentation 25

Selected References Allgöwer, F. (2004), Model Predictive Control: A Success Story Continues, APACT’ 04,

Selected References Allgöwer, F. (2004), Model Predictive Control: A Success Story Continues, APACT’ 04, Bath, April 26 -28, 2004 Allgöwer, F. , Badgwell, T. A. , Qin, S. J. , Rawlings, J. B. and Wright, S. J. , (1999). Nonlinear predictive control and moving horizon estimation—an introductory overview. In: Frank, P. M. , Editor, , 1999. Advances in control: highlights of ECC ’ 99, Springer, Berlin. Bemporad, A. , Morari, M. , Dua, V. and Pistikopoulos, E. N. (2002), The explicit linear quadratic regulator for constrained systems. Automatica 38 1, pp. 3– 20, 2002. Bemporad A, Borrelli F, Morari M, (2002). On the optimal control law for linear discrete time hybrid systems, Lecture notes in computer science 2289: 105 -119 2002 Bemporad A, Morari M, (1999), Control of systems integrating logic, dynamics and constraints, Automatica 35 (3): 407 -427 MAR 1999 Cutler, C. R. , & Ramaker, B. L. (1979). Dynamic matrix control—a computer control algorithm. AICHE national meeting, Houston, TX, April 1979. Cutler, C. , Morshedi, A. , & Haydel, J. (1983). An industrial perspective on advanced control. In AICHE annual meeting, Washington, DC, October 1983 Dua V, Bozinis NA, Pistikopoulos EN. (2002), A multiparametric approach for mixedinteger quadratic engineering problems, Computers & Chemical Engineering 26 (4 -5): 715 -733 MAY 15 2002 26

Selected References Kalman, R. (1964), When is a linear control system optimal? , Journal

Selected References Kalman, R. (1964), When is a linear control system optimal? , Journal of Basic Engineering – Transactions on ASME – Series D, 51 -60, Johansen, T. A. , Approximate Explicit Receding Horizon Control of Constrained Nonlinear Systems, Automatica, Vol. 40, pp. 293 -300, 2004 Qin, SJ. , Badgwell, TA. , A survey of industrial model predictive control technology, Control Engineering practice 11 (7): 733 -764, 2003 Rawlings, J. B. and Muske, K. R. , 1993. Stability of constrained receding horizon control. IEEE Transactions on Automatic Control 38 10, pp. 1512– 1516 Richalet, J. , Rault, A. , Testud, J. L. and Papon, J. , Model predictive heuristic control: Applications to industrial processes. Automatica 14, pp. 413– 428, 1978 Scokaert, P. O. M. and Rawlings, J. B. , Constrained linear quadratic regulation. IEEE Transactions on Automatic Control 43 8, pp. 1163– 1169, 1998 Tøndel, P. , Johansen, T. A. and Bemporad, A. (2003), An algorithm for multiparametric quadratic programming and explicit MPC solutions. Automatica 39, 2003 Tøndel, P. , Johansen, T. A. and Bemporad, A (2003). Evalution of piecewise affine control via binary search tree. Automatica 39, 2003 27

Ting som ikke er nevnt • Robusthet • Practical implementations 28

Ting som ikke er nevnt • Robusthet • Practical implementations 28

Thank you for your attention! 29

Thank you for your attention! 29

Functional spec. in modern MPC • Prevent violation of input and output constraints •

Functional spec. in modern MPC • Prevent violation of input and output constraints • Drive CV’s to steady state optimal values (or within bounds) • Drive MV’s to steady state optimal values (or within bounds) • Prevent excessive use of MVs • In case of signal or actuator failure, control as much of the plant as possible 30

Modern industrial MPC algorithm Overview • Read MV, CV, DV • Output feedback •

Modern industrial MPC algorithm Overview • Read MV, CV, DV • Output feedback • Determination of controlled subprocess • Removal of ill-condisioned plant • Local steady state optimization • Dynamical optimization • MV’s to process 31

Modern industrial MPC algorithm Output feedback • Process states and kalman filter seldom used

Modern industrial MPC algorithm Output feedback • Process states and kalman filter seldom used • Ad-hoc biasing scheemes with challenges regarding – – Extra measurements ? Linear combinations of states? Unmeasured disturbances models? Measurements noise? • Implications – Sluggish input disturbance rejection – Poor control of integrating and unstable systems 32

Modern industrial MPC algorithm Dynamic optimization Deviations Output Input from slack Input deviations output

Modern industrial MPC algorithm Dynamic optimization Deviations Output Input from slack Input deviations output variables moves trajectory Process model Output constraints Input constraints 33

Modern industrial MPC algorithm Dynamic optimization (2) • Solved as a sequence according to

Modern industrial MPC algorithm Dynamic optimization (2) • Solved as a sequence according to prioritized constraints and targets – – – 34 Hard constraint on MV rate of change (always) Hard constraint on MV magnitude Sequential high priority soft constraints on CV’s Set point control Sequencial low priority soft constraints on CV’s and MV’s

Limitations with modern MPC algorithms 35

Limitations with modern MPC algorithms 35

Pros/Cons 36

Pros/Cons 36

Road Ahead 37

Road Ahead 37

Plan • • • 38 Introduction – General control problem formulation – control hierachy

Plan • • • 38 Introduction – General control problem formulation – control hierachy – History – State of the art – Theory – History – – Theory State of the art MPC • • Goal Constraints-ARW or MPC Uncertainty Etc. • • Drivers (industry, academia) Development • • Theorethical status Fuctionality Industrial Practice Limitations Explicit MPC • Drivers • • Practical implementations? limitations Pros/cons Online opt. /xplicit Future – – – What drives the development? Explicit MPC in process industry? Which problems can this solve? Other industries? Probably skip! Can challenges with explicit MPC be resolved faster than growth in computing power needed for online opt Robustness of online opt

Optimal operation of constrained processes Control of exothermal reaction • Maximize throughput • Quality

Optimal operation of constrained processes Control of exothermal reaction • Maximize throughput • Quality requirements • Limited cooling capacity • Variable feed composition and temperature 39