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

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

Embed Size (px)

Citation preview

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

1

Model Predictive Control: On-line optimization versus explicitprecomputed controller

Espen Storkaas

Trondheim, 7.6. 2005

Page 2: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

2

Outline

• Introduction• Brief history• Linear MPC

– Theory, feasibility, stability, performance

• Derivation of explicit MPC• Nonlinear and hybrid MPC• Applications• Future directions• Conclusions

Page 3: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

3

Introduction

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

– Satisfies constraints

– is robust towards uncertainty

Page 4: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

4

Solution strategies

Closed loop optimal controlFeedback: u=k(x)

s.t. closed loop trajectories satisfying optimality

Advantages:• Feedback• Uncertainty• Disturbances• Unstable systemsDrawbacks• Find k(x)?

Open loop optimal controlInput trajectory: u=u(t,x0)

solving optimization problem

Advantages: • Computationally feasibleDrawbacks:• No feedback• Disturbances?• Unstable systems• Uncertainty

Page 5: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

5

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

t

Setpoint

x(t)

Control horizon

Prediction horizon

U={ut|t, …,ut+N|t}

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

6

MPC with online optimization

(Allgöwer, 2004)

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

7

Solution strategies

Close loop optimal controlFeedback: u=k(x)

s.t. closed loop trajectories satisfying optimality

Advantages:• Feedback• Uncertainty• Disturbances• Unstable systemsDrawbacks• Find k(x)?

Open loop optimal controlInput trajectory: u=u(t,x0)

solving optimization problem

Advantages: • Computationally feasibleDrawbacks:• No feedback• Disturbances?• Unstable systems• Uncertainty

Page 8: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

8

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

• Solve optimization problem offline for all x2X• For linear systems: multiparametric QP (mp-QP) with

solution

• Piecewise affine controller• Exactly identical to implicit solution (via online

optimization)

Page 9: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

9

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

• Explicit MPC (Bemporad et al. 2002, Tøndel et al. 2003)

Page 10: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

10

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

• Linear time-invariant discrete model:

• Objective:

• Constraints:

Page 11: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

11

Linear MPC – Unconstrained case

• Problem:

• Classical LQR solution (Kalman 1960)

• K calculated from algebraic Ricatti equation• Assymptotically stabilizing

Page 12: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

12

Linear MPC – Infinite horizon (Constrained LQR)

• Problem:

• Infinite number of decision variables • Stability proved by Rawlings & Muske (1993)• Computationally feasible (Scokeart & Rawlings, 1998)• Computationally expensive

Page 13: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

13

Linear MPC – Finite input horizon

• Problem:

• Achieved solution:

• Stabilizing for K=0 and K=KLQ provided N large enough

Page 14: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

14

Important aspects

• Feasibility– 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

x(t) * x(t+)

*

Page 15: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

15

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

Page 16: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

16

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

Page 17: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

17

Partitioning of state spaceOffline computations

Bemproad et al. 2002

Tøndel et al. 2003

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

• (Build search tree/reduce complexity)

Page 18: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

18

Explicit MPC:Online computations

Computational requirements

Online CPU

Online m

em

ory

Binary search tree

Sequential search

• Determine critical region– Sequential search– Binary search tree

• Implement optimal control• Complexity of partition

increses with # states/parameters

Page 19: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

19

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

0 2 4 6 8

Parameters

Mem

ory

req

uri

rem

en

ts

Page 20: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

20

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:– Infinite horizon NMPC– Zero state terminal equality constraint – Dual mode NMPC– Contractive NMPC– Quasi-infinite horizon NMPC

Page 21: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

21

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?

Page 22: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

22

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

Page 23: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

23

Application areas

Linear Nonlinear/Hybrid

Online optimization

+ Reconfigurable+ Proven technology- Slow processes- Not safety critical

Refinery

+Important nonlinearities/discret events+ Reconfigureable -Slow processes- Not safety critical

Polymer reactor

Explicit precomputed

+Safety critical+Low-cost hardware+High sampling rate-Low order-Fixed configuration

ESP for cars

+Safety critical+Low-cost hardware+High sampling rate-Low order-Fixed configuration

Compressor Anti-surge

Page 24: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

24

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

Page 25: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

25

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

Page 26: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

26

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 mixed-integer quadratic engineering problems, Computers & Chemical Engineering 26 (4-5): 715-733 MAY 15 2002

Page 27: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

27

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 multi-parametric 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

Page 28: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

28

Ting som ikke er nevnt

• Robusthet• Practical implementations

Page 29: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

29

Thank you for your attention!

Page 30: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

30

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 as possible

Page 31: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

31

Modern industrial MPC algorithmOverview

• Read MV, CV, DV• Output feedback• Determination of controlled sub-

process• Removal of ill-condisioned plant• Local steady state optimization• Dynamical optimization• MV’s to process

Page 32: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

32

Modern industrial MPC algorithmOutput 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

Page 33: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

33

Modern industrial MPC algorithmDynamic optimization

Deviations from output trajectory

Process model

Output constraints

Input constraints

Output slack variablesInput deviationsInput moves

Page 34: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

34

Modern industrial MPC algorithmDynamic optimization (2)

• Solved as a sequence according to prioritized constraints and targets– 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

Page 35: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

35

Limitations with modern MPC algorithms

Page 36: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

36

Pros/Cons

Page 37: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

37

Road Ahead

Page 38: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

38

Plan

• Introduction – General control problem formulation

• Goal• Constraints-ARW or MPC• Uncertainty• Etc.

– control hierachy• MPC

– History• Drivers (industry, academia)• Development

– State of the art• Theorethical status• Fuctionality• Industrial Practice• Limitations

– Theory• Explicit MPC

– History• Drivers

– Theory– State of the art

• 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

Page 39: 1 Model Predictive Control: On-line optimization versus explicit precomputed controller Espen Storkaas Trondheim, 7.6. 2005

39

Optimal operation of constrained processes

Control of exothermal reaction

• Maximize throughput

• Quality requirements

• Limited cooling capacity

• Variable feed composition and temperature

E-1

V-1

P-1

P-2

CA,F , QF, TF

E-2

P-3

CA, CB, Q

V-2

P-6

CWL