Fundamentals of Economic Model Predictive Control - Semantic Scholar

Report 8 Downloads 53 Views
Fundamentals of Economic Model Predictive Control James B. Rawlings, David Angeli and Cuyler N. Bates Dept. of Chemical and Biological Engineering, Univ. of Wisconsin-Madison, WI, USA

Dept. of Electrical and Electronic Engineering, Imperial College London, UK

CDC Meeting Maui, HI December 10-14, 2012 Rawlings/Angeli/Bates

Economic MPC

1 / 94

Outline 1

Introduction to MPC and economics

2

Stability of standard (tracking) MPC

3

Unreachable setpoints and turnpikes

4

Economic MPC

5

Dissipativity

6

Average constraints

7

Periodic terminal constraint

8

Conclusions and open research issues

Rawlings/Angeli/Bates

Economic MPC

2 / 94

Optimizing economics: current industrial practice

Planning and Scheduling 1

Steady State Optimization

Model Update

Validation

Reconciliation

Two layer structure I

Steady-state layer F

F

RTO optimizes steady state model Optimal setpoints passed to dynamic layer

Controller

Plant

Rawlings/Angeli/Bates

Economic MPC

3 / 94

Optimizing economics: current industrial practice

Planning and Scheduling 1

Steady State Optimization

Model Update

Validation

Reconciliation

Two layer structure I

Steady-state layer F

F

I

Controller

Dynamic layer F

F

Plant

Rawlings/Angeli/Bates

RTO optimizes steady state model Optimal setpoints passed to dynamic layer

Economic MPC

Controller tracks the setpoints Linear MPC

3 / 94

Optimizing economics: current industrial practice

Planning and Scheduling 1

Steady State Optimization

Model Update

Validation

Reconciliation

2

Two layer structure Drawbacks

Controller

Plant

Rawlings/Angeli/Bates

Economic MPC

4 / 94

Optimizing economics: current industrial practice

Planning and Scheduling 1

Steady State Optimization

Model Update

Validation

Reconciliation

2

Two layer structure Drawbacks I I

I

Controller I

Inconsistent models Re-identify linear model as setpoint changes Time scale separation may not hold Economics unavailable in dynamic layer

Plant

Rawlings/Angeli/Bates

Economic MPC

4 / 94

Steady-state optimization problem definition

Stage cost: `(x, u) Optimization: (xs , us ) = arg min x,u

`(x, u)

subject to: x = f (x, u),

Rawlings/Angeli/Bates

Economic MPC

(x, u) ∈ Z

5 / 94

Tracking MPC

Setpoint Outputs Inputs

← Past

y u

k=0

Future →

One step of a closed-loop MPC trajectory

Rawlings/Angeli/Bates

Economic MPC

6 / 94

Tracking MPC problem definition Stage cost: `t (x, s) = |x(k) − xs |2Q + |u(k) − us |2R + |u(k) − u(k − 1)|2S

Rawlings/Angeli/Bates

Economic MPC

7 / 94

Tracking MPC problem definition Stage cost: `t (x, s) = |x(k) − xs |2Q + |u(k) − us |2R + |u(k) − u(k − 1)|2S Optimization: min VN (x, u) = u

N−1 X

`t (x(k), u(k))

k=0

 +  x = f (x, u) (x(k), u(k)) ∈ Z k ∈ I0:N−1 subject to  x(N) = xs x(0) = x Control law: u = κN (x) Admissible set: XN Rawlings/Angeli/Bates

Economic MPC

7 / 94

Why worry about stability for tracking MPC? Unexpected closed-loop behavior A finite horizon objective function may not give a stable controller!

Rawlings/Angeli/Bates

Economic MPC

8 / 94

Why worry about stability for tracking MPC? Unexpected closed-loop behavior A finite horizon objective function may not give a stable controller! How is this possible?

Rawlings/Angeli/Bates

Economic MPC

8 / 94

Why worry about stability for tracking MPC? Unexpected closed-loop behavior A finite horizon objective function may not give a stable controller! How is this possible?

x2

k 0

x1

Rawlings/Angeli/Bates

Economic MPC

8 / 94

Why worry about stability for tracking MPC? Unexpected closed-loop behavior A finite horizon objective function may not give a stable controller! How is this possible?

x2

k +1 k 0

x1

Rawlings/Angeli/Bates

Economic MPC

8 / 94

Why worry about stability for tracking MPC? Unexpected closed-loop behavior A finite horizon objective function may not give a stable controller! How is this possible?

x2

k +2 k +1 k 0

x1

Rawlings/Angeli/Bates

Economic MPC

8 / 94

Why worry about stability for tracking MPC? Unexpected closed-loop behavior A finite horizon objective function may not give a stable controller! How is this possible?

x2

closed-loop trajectory k +2 k +1 k 0

x1

Rawlings/Angeli/Bates

Economic MPC

8 / 94

Infinite horizon solution The infinite horizon ensures stability

Rawlings/Angeli/Bates

Economic MPC

9 / 94

Infinite horizon solution The infinite horizon ensures stability Open-loop predictions equal to closed-loop behavior

Rawlings/Angeli/Bates

Economic MPC

9 / 94

Infinite horizon solution The infinite horizon ensures stability Open-loop predictions equal to closed-loop behavior May be difficult to implement

x2

0 k

Φk x1 Rawlings/Angeli/Bates

Economic MPC

9 / 94

Infinite horizon solution The infinite horizon ensures stability Open-loop predictions equal to closed-loop behavior May be difficult to implement

x2

0

k +1 k

Vk+1 = Vk − L(xk , uk ) Φk x1 Rawlings/Angeli/Bates

Economic MPC

9 / 94

Infinite horizon solution The infinite horizon ensures stability Open-loop predictions equal to closed-loop behavior May be difficult to implement

x2 Vk+2 = Vk+1 − L(xk+1, uk+1) k +2 0

k +1 k

Vk+1 = Vk − L(xk , uk ) Φk x1 Rawlings/Angeli/Bates

Economic MPC

9 / 94

Terminal constraint solution Adding a terminal constraint ensures stability

Rawlings/Angeli/Bates

Economic MPC

10 / 94

Terminal constraint solution Adding a terminal constraint ensures stability May cause infeasibility

Rawlings/Angeli/Bates

Economic MPC

10 / 94

Terminal constraint solution Adding a terminal constraint ensures stability May cause infeasibility Open-loop predictions not equal to closed-loop behavior

x2

k 0

Φk x1 Rawlings/Angeli/Bates

Economic MPC

10 / 94

Terminal constraint solution Adding a terminal constraint ensures stability May cause infeasibility Open-loop predictions not equal to closed-loop behavior

x2

k +1 k 0 Vk+1 ≤ Vk − L(xk , uk ) Φk x1 Rawlings/Angeli/Bates

Economic MPC

10 / 94

Terminal constraint solution Adding a terminal constraint ensures stability May cause infeasibility Open-loop predictions not equal to closed-loop behavior

x2 Vk+2 ≤ Vk+1 − L(xk+1, uk+1) k +2 k +1 k 0 Vk+1 ≤ Vk − L(xk , uk ) Φk x1 Rawlings/Angeli/Bates

Economic MPC

10 / 94

Closed-loop stability of tracking MPC Assumption: Model, cost and admissible set 1

2

The model f (·) and stage cost `(·) are continuous. The admissible set XN contains xs in its interior. There exists a set Xf containing xs in its interior and K∞ -function γ(·) such that VN0 (x) ≤ γ(|x − xs |) for x ∈ Xf .

Rawlings/Angeli/Bates

Economic MPC

11 / 94

Closed-loop stability of tracking MPC Assumption: Model, cost and admissible set 1

2

The model f (·) and stage cost `(·) are continuous. The admissible set XN contains xs in its interior. There exists a set Xf containing xs in its interior and K∞ -function γ(·) such that VN0 (x) ≤ γ(|x − xs |) for x ∈ Xf .

Theorem: Stability of tracking MPC with terminal constraint The steady-state target (xs , us ) is an asymptotically stable equilibrium point of the closed-loop system x + = f (x, κN (x)) with region of attraction XN . Rawlings/Angeli/Bates

Economic MPC

11 / 94

Setpoints and unreachable setpoints

Rawlings/Angeli/Bates

Economic MPC

12 / 94

Setpoints and unreachable setpoints

Consider the steady state of a linear dynamic model with state x, controlled input u, and disturbance w x(k + 1) = Ax(k) + Bu(k) + Bd w (k)

Rawlings/Angeli/Bates

Economic MPC

12 / 94

Setpoints and unreachable setpoints

Consider the steady state of a linear dynamic model with state x, controlled input u, and disturbance w x(k + 1) = Ax(k) + Bu(k) + Bd w (k) xs = (I − A)−1 B us + (I − A)−1 Bd ws | {z } | {z } G

ds

xs = Gus + ds

Rawlings/Angeli/Bates

Economic MPC

12 / 94

Steady states—unconstrained system xs xs = Gus + ds ds1 = 1

ds2 = 0

ds3 = −1

G xsp

us1

us2

us3 us

For an unconstrained system with G 6= 0, any setpoint xsp with any disturbance ds has a corresponding us . Rawlings/Angeli/Bates

Economic MPC

13 / 94

Constraints and unreachable setpoints xs xs = Gus + ds ds1 = 1

0 ≤ us ≤ 1

ds2 = 0

ds3 = −1

G xsp

0

us1

1 us2 us3

us

For a constrained system, the setpoint xsp may be unreachable for a given disturbance ds . MPC is method of choice for this situation. Rawlings/Angeli/Bates

Economic MPC

14 / 94

Constraints and unreachable setpoints xs xs = Gus + ds 0 ≤ us ≤ 1 ds ≥ G

0 ≤ ds ≤ G

xsp

0

1 us ds ≤ 0

As the estimated disturbance changes with time, the setpoint may change between reachable and unreachable. Rawlings/Angeli/Bates

Economic MPC

15 / 94

What closed-loop behavior is desirable? Fast tracking

xsp x(0) Q  R (fast tracking) x∗

x

x(0)

k

Rawlings/Angeli/Bates

Economic MPC

16 / 94

What closed-loop behavior is desirable? Slow tracking

xsp x(0) Q  R (slow tracking) x∗

x

x(0)

k

Rawlings/Angeli/Bates

Economic MPC

17 / 94

What closed-loop behavior is desirable? Asymmetric tracking

xsp x(0) Q  R (fast tracking) x∗

x

x(0)

k

Rawlings/Angeli/Bates

Economic MPC

18 / 94

Creating a turnpike example

Standard linear quadratic problem x + = Ax + Bu `(x, u) = |Cx − ysp |2Q + |u − usp |2R

Rawlings/Angeli/Bates

Economic MPC

Q > 0, R > 0

19 / 94

Creating a turnpike example

Standard linear quadratic problem x + = Ax + Bu `(x, u) = |Cx − ysp |2Q + |u − usp |2R

Q > 0, R > 0

Choose an inconsistent setpoint A = 1/2

B = 1/4 ys = Gus usp = 0

Rawlings/Angeli/Bates

C =1

Q=1

R=1

G = 1/2 ysp = 2

Economic MPC

19 / 94

Inconsistent setpoint and optimal steady state (usp, xsp)

Optimal steady state

x

usp = 0 us = 0.8

xsp = 2 xs = 0.4

(us , xs ) G u

Rawlings/Angeli/Bates

Economic MPC

20 / 94

Optimal control problem

Cost function and dynamic model VN (x, u) =

N−1 X

`(x(k), u(k))

s.t. x + = Ax + Bu,

x(0) = x

k=0

Rawlings/Angeli/Bates

Economic MPC

21 / 94

Optimal control problem

Cost function and dynamic model VN (x, u) =

N−1 X

`(x(k), u(k))

s.t. x + = Ax + Bu,

x(0) = x

k=0

Optimal state and input trajectories min V (x, u) u

Rawlings/Angeli/Bates

u0 (x),

x0 (x)

Economic MPC

21 / 94

Optimal trajectory: xsp = 2, usp = 0 1 0.5

x

0

N =5

-0.5 -1 0

u

1

1 0.9 0.8 0.7 0.6 0.5 0.4

2

3

4

2 t

3

4

x0 = −1 x0 = 1

0 Rawlings/Angeli/Bates

1

Economic MPC

22 / 94

Optimal trajectory: xsp = 2, usp = 0 1 0.5

x

N = 30

0 -0.5 -1 0

u

1 0.9 0.8 0.7 0.6 0.5 0.4

5

10

15

20

25

30

10

15 t

20

25

30

x0 = −1 x0 = 1

0 Rawlings/Angeli/Bates

5

Economic MPC

22 / 94

Optimal trajectory: xsp = 2, usp = 0 1 0.5

x

N = 100

0 -0.5 -1 0

u

20

30

40

50

60

70

80

90 100

1 0.9 x0 = −1 0.8 0.7 x0 = 1 0.6 0.5 0.4 0 10 20

30

40

50 t

60

70

80

90 100

Rawlings/Angeli/Bates

10

Economic MPC

22 / 94

Introduction to Turnpike Literature

It is exactly like a turnpike paralleled by a network of minor roads.

Rawlings/Angeli/Bates

Economic MPC

23 / 94

Introduction to Turnpike Literature

It is exactly like a turnpike paralleled by a network of minor roads. There is a fastest route between any two points; and if the origin and destination are close together and far from the turnpike, the best route may not touch the turnpike.

Rawlings/Angeli/Bates

Economic MPC

23 / 94

Introduction to Turnpike Literature

It is exactly like a turnpike paralleled by a network of minor roads. There is a fastest route between any two points; and if the origin and destination are close together and far from the turnpike, the best route may not touch the turnpike. But if the origin and destination are far enough apart, it will always pay to get on the turnpike and cover distance at the best rate of travel, even if this means adding a little mileage at either end.

Rawlings/Angeli/Bates

Economic MPC

23 / 94

Introduction to Turnpike Literature

It is exactly like a turnpike paralleled by a network of minor roads. There is a fastest route between any two points; and if the origin and destination are close together and far from the turnpike, the best route may not touch the turnpike. But if the origin and destination are far enough apart, it will always pay to get on the turnpike and cover distance at the best rate of travel, even if this means adding a little mileage at either end. —Dorfman, Samuelson, and Solow (1958, p.331)

Rawlings/Angeli/Bates

Economic MPC

23 / 94

Unreachable case—challenges for analyzing closed-loop behavior Consider the MPC controller with the stage cost `(x, s) = |x(k) − xsp |2Q + |u(k) − usp |2R + |u(k) − u(k − 1)|2S Sequence of optimal costs is not monotone decreasing

Rawlings/Angeli/Bates

Economic MPC

24 / 94

Unreachable case—challenges for analyzing closed-loop behavior Consider the MPC controller with the stage cost `(x, s) = |x(k) − xsp |2Q + |u(k) − usp |2R + |u(k) − u(k − 1)|2S Sequence of optimal costs is not monotone decreasing Infinite horizon cost is unbounded for all input sequences

Rawlings/Angeli/Bates

Economic MPC

24 / 94

Unreachable case—challenges for analyzing closed-loop behavior Consider the MPC controller with the stage cost `(x, s) = |x(k) − xsp |2Q + |u(k) − usp |2R + |u(k) − u(k − 1)|2S Sequence of optimal costs is not monotone decreasing Infinite horizon cost is unbounded for all input sequences Optimal cost is not a Lyapunov function for the closed-loop system

Rawlings/Angeli/Bates

Economic MPC

24 / 94

Unreachable case—challenges for analyzing closed-loop behavior Consider the MPC controller with the stage cost `(x, s) = |x(k) − xsp |2Q + |u(k) − usp |2R + |u(k) − u(k − 1)|2S Sequence of optimal costs is not monotone decreasing Infinite horizon cost is unbounded for all input sequences Optimal cost is not a Lyapunov function for the closed-loop system Standard nominal MPC stability arguments do not apply

Rawlings/Angeli/Bates

Economic MPC

24 / 94

Unreachable case—challenges for analyzing closed-loop behavior Consider the MPC controller with the stage cost `(x, s) = |x(k) − xsp |2Q + |u(k) − usp |2R + |u(k) − u(k − 1)|2S Sequence of optimal costs is not monotone decreasing Infinite horizon cost is unbounded for all input sequences Optimal cost is not a Lyapunov function for the closed-loop system Standard nominal MPC stability arguments do not apply Simulations indicate the closed loop is stable

Rawlings/Angeli/Bates

Economic MPC

24 / 94

Unreachable case—challenges for analyzing closed-loop behavior Consider the MPC controller with the stage cost `(x, s) = |x(k) − xsp |2Q + |u(k) − usp |2R + |u(k) − u(k − 1)|2S Sequence of optimal costs is not monotone decreasing Infinite horizon cost is unbounded for all input sequences Optimal cost is not a Lyapunov function for the closed-loop system Standard nominal MPC stability arguments do not apply Simulations indicate the closed loop is stable How can we be sure?

Rawlings/Angeli/Bates

Economic MPC

24 / 94

Unreachable case—stability result (linear model)

Theorem: Asymptotic Stability of Terminal Constraint MPC The optimal steady state is the asymptotically stable solution of the closed-loop system under terminal constraint MPC. Its region of attraction is the feasible set. (Rawlings, Bonn´e, Jørgensen, Venkat, and Jørgensen, 2008)

Rawlings/Angeli/Bates

Economic MPC

25 / 94

Example 1. Single input–single output system

G (s) =

−0.2623 + 59.2s + 1

60s 2

Sample time T = 10 sec Input constraint, −1 ≤ u ≤ 1 Setpoint ysp = 0.25

Qy = 1, R = 0, S = 10−3 Horizon length N = 80 Periodic disturbance d = 2 with Gd = G and exact measurement

Rawlings/Angeli/Bates

Economic MPC

26 / 94

Disturbance estimation As the estimated disturbance changes with time, the setpoint changes between reachable and unreachable. xs

ds ≥ G

0 ≤ ds ≤ G

xsp

0

1 us 0 ≤ us ≤ 1 ds ≤ 0

Rawlings/Angeli/Bates

Economic MPC

27 / 94

Disturbance estimation As the estimated disturbance changes with time, the setpoint changes between reachable and unreachable. xs

xsp

ds ≥ G

0 ≤ ds ≤ G

xsp

0

xs (k)

1 us 0 ≤ us ≤ 1

0 k

ds ≤ 0

Rawlings/Angeli/Bates

ˆ d(k)

Economic MPC

27 / 94

0.3 0.2 0.1 y

0 -0.1 -0.2 -0.3 0

50

100 150 200 250 300 350 400 Time (sec)

setpoint target (ys )

y (sp-MPC) y (targ-MPC)

1 0.5 u

0 -0.5 -1 0

50

100 150 200 250 300 350 400 Time (sec)

target (us ) u(sp-MPC) Rawlings/Angeli/Bates

u(targ-MPC) Economic MPC

28 / 94

Summary of Example 1

Performance Measure

targ-MPC (×10−3 )

sp-MPC (×10−3 )

∆(index)%

Vu Vy V

1.7 × 10−2 6.98 7.00

2.2 × 10−6 3.27 3.27

99.99 53 53

Vu =

Vy =

T −1 1 X |u(k) − usp |2R + |u(k) − u(k − 1)|2S T

1 T

0 T −1 X

|y (k) − ysp |Q 2 y

0

V = Vu + Vy Rawlings/Angeli/Bates

Economic MPC

29 / 94

Example 2. Two input–two output system with noise

" G (s) =

1.5 (s+2)(s+1) 0.5 (s+0.5)(s+1)

0.75 (s+5)(s+2) 2 (s+2)(s+3)

#

Sample time T = 0.25 sec Input constraints −0.5 ≤ u1 , u2 ≤ 0.5 Setpoint ysp = [0.337 0.34]0 Qy = 5I , R = I , S = I Horizon length N = 80 Periodic disturbance d = ±[0.03 − 0.03]0 with Gd = G and measurement and state noise

Rawlings/Angeli/Bates

Economic MPC

30 / 94

0.338 0.337 0.336 0.335 y1 0.334 0.333 0.332

setpoint y1 (sp-MPC) y1 (targ-MPC)

0.331 0.33 0

5

10 15 Time (sec)

20

25

0.342 0.341 0.34 0.339 y2 0.338 0.337 setpoint y2 (sp-MPC) y2 (targ-MPC)

0.336 0.335 0 Rawlings/Angeli/Bates

5

10 15 Time (sec)

20

Economic MPC

25 31 / 94

0.5

u1 (targ-MPC) u1 (sp-MPC)

0.45

u1

0.5

u1 0.45 0

5

10 15 Time (sec)

20

25 -0.45 -0.465

u2

-0.48 u2 (targ-MPC) u2 (sp-MPC) -0.45 u2

-0.465 -0.48 0

Rawlings/Angeli/Bates

5

10 15 Time (sec)

20

Economic MPC

25 32 / 94

y1s 0.3 setpoint target (y1s ) db1

0.2 0.1 0

db1

-0.1 0

5

10 15 Time (sec)

20

25

y2s 0.3 setpoint target (y2s ) db2

0.2

0.1

db2

0 0

Rawlings/Angeli/Bates

5

10 15 Time (sec)

20

Economic MPC

25 33 / 94

Summary of Example 2

Performance Measure

targ-MPC (×10−4 )

sp-MPC (×10−4 )

∆(index)%

Vu Vy V

3.32 1.63 4.95

2.10 0.04 2.14

37 98 57

Rawlings/Angeli/Bates

Economic MPC

34 / 94

Economic MPC: motivating the idea

Profit

-4

Rawlings/Angeli/Bates

-2 0 Input (u)

2

4

Economic MPC

-4

-2

0

4 2 State (x)

35 / 94

Economic MPC: motivating the idea

Profit

-4

Rawlings/Angeli/Bates

-2 0 Input (u)

2

4

Economic MPC

-4

-2

0

4 2 State (x)

35 / 94

Economic MPC definition (with terminal constraint)

Economic stage cost: `(x, u)

Rawlings/Angeli/Bates

Economic MPC

36 / 94

Economic MPC definition (with terminal constraint)

Economic stage cost: `(x, u) Optimization: min VN,e (x, u) = u

N−1 X

`(x(k), u(k))

k=0

 +  x = f (x, u) x(0) = x (x(k), u(k)) ∈ Z k ∈ [0 : N − 1] subject to  x(N) = xs Control law: u = κN,e (x) Admissible set: XN,e

Rawlings/Angeli/Bates

Economic MPC

36 / 94

(1)

Example

x + = Ax + Bu     0.857 0.884 8.565 A= B= −0.0147 −0.0151 0.88418 Input constraint: −1 ≤ u ≤ 1 `(x, u) = α0 x + β 0 u  0 α = −3 −2 β = −2

Rawlings/Angeli/Bates

`t (x, u) = |x − xs |2Q + |u − us |2R Q = 2I2 R=2  0 xs = 60 0 us = 1

Economic MPC

37 / 94

10 8 6 x2

4 2 0 -2 60

Rawlings/Angeli/Bates

65 70 targ-MPC x1

75

Economic MPC

80

85

38 / 94

10 8 6 x2

4 2 0 -2 60

Rawlings/Angeli/Bates

65 70 targ-MPC x1

75

Economic MPC

80 85 eco-MPC

38 / 94

80

targ-MPC

State 1

75 70 65 60

State 2

55 10 8 6 4 2 0 -2

0

2

4

6

8

10

12

14

targ-MPC

0

2

4

6

8

10

12

14

1 Input

0.5 0 -0.5 -1 0

2

4

6

8

10

targ-MPC 12

14

Time

Rawlings/Angeli/Bates

Economic MPC

39 / 94

State 1

90 85 80 75 70 65 60 55

State 2

10 8 6 4 2 0 -2

targ-MPC eco-MPC

0

2

4

6

8

10

12

14

targ-MPC eco-MPC

0

2

4

6

8

0

2

4

6

8

10

12

14

1 Input

0.5 0 -0.5 -1 10

targ-MPC eco-MPC 12

14

Time

Rawlings/Angeli/Bates

Economic MPC

39 / 94

Closed-loop performance measures Profitability: I

Average asymptotic cost relative to steady state T 1 X `(x(k), u(k)) − `(xs , us ) T →∞ T

lim

k=0

I

Net cost relative to steady state ∞ X k=0

`(x(k), u(k)) − `(xs , us )

Stability: I

Asymptotic convergence to optimal steady state lim (x(k), u(k)) = (xs , us )

k→∞

Rawlings/Angeli/Bates

Economic MPC

40 / 94

How can profitability and stability be opposing goals? We consider a nonlinear constant volume isothermal CSTR I I

State: CA Input: CAf

The following reactions take place: r = kcA2

A→B Economic stage cost:

`(x, u) = −CB Input constraints over horizon of N: 0 ≤ u(k) ≤ 3

Rawlings/Angeli/Bates

N 1 X u(k) = 1 N k=0

Economic MPC

41 / 94

Optimal control solution

Optimal u and x 0.5

4

0.4 3 0.3

u

2

x 0.2

1 0.1

0

0 0

20

40

t

60

Rawlings/Angeli/Bates

80

100

Economic MPC

42 / 94

Optimal control solution

Production rate, RB = kcA2

Optimal u and x 4

0.5

0.3

0.4

0.25

cAs

3 0.2 0.3

u

2

cA2

x

0.15

0.2 0.1

hcA2 i

1 0.1 0.05 0

0 0

20

40

t

60

Rawlings/Angeli/Bates

80

100

2 cAs

0 0

Economic MPC

20

40

t

60

80

42 / 94

100

Average economic performance of EMPC

When considering economic optimization as the objective of control, average economic performance is the more natural performance measure. In tracking MPC, average closed-loop economic performance is guaranteed indirectly, via stability T 1 X `(x(k), u(k)) = `(xs , us ) lim (x(k), u(k)) = (xs , us ) ⇒ lim k→∞ T →∞ T k=0

Several methods are available for stabilizing tracking MPC including the addition of a terminal equality constraint, x(N) = xs , and a terminal penalty

Rawlings/Angeli/Bates

Economic MPC

43 / 94

What does a terminal constraint accomplish for EMPC?

Theorem: Average economic performance of EMPC The average asymptotic cost of the closed-loop system x + = f (x, κN,e (x)) satisfies

PT lim sup T →+∞

Rawlings/Angeli/Bates

k=0 `(x(k), u(k))

T +1

≤ `(xs , us )

Economic MPC

44 / 94

What this means . . . The nominal average asymptotic cost of closed-loop EMPC is not worse than the best steady state

Rawlings/Angeli/Bates

Economic MPC

45 / 94

What this means . . . The nominal average asymptotic cost of closed-loop EMPC is not worse than the best steady state What this theorem does not say: I

EMPC is stable under these conditions

Rawlings/Angeli/Bates

Economic MPC

45 / 94

What this means . . . The nominal average asymptotic cost of closed-loop EMPC is not worse than the best steady state What this theorem does not say: I I

EMPC is stable under these conditions A finite time average is not worse than the best steady state

Rawlings/Angeli/Bates

Economic MPC

45 / 94

What this means . . . The nominal average asymptotic cost of closed-loop EMPC is not worse than the best steady state What this theorem does not say: I I

EMPC is stable under these conditions A finite time average is not worse than the best steady state

What about net, rather than average, cost relative to steady state? ∞ X k=0

Rawlings/Angeli/Bates

`(x(k), u(k)) − `(xs , us )

Economic MPC

45 / 94

What this means . . . The nominal average asymptotic cost of closed-loop EMPC is not worse than the best steady state What this theorem does not say: I I

EMPC is stable under these conditions A finite time average is not worse than the best steady state

What about net, rather than average, cost relative to steady state? ∞ X k=0 I

`(x(k), u(k)) − `(xs , us )

Bounded above because VN0 (x) is bounded on XN .

Rawlings/Angeli/Bates

Economic MPC

45 / 94

What this means . . . The nominal average asymptotic cost of closed-loop EMPC is not worse than the best steady state What this theorem does not say: I I

EMPC is stable under these conditions A finite time average is not worse than the best steady state

What about net, rather than average, cost relative to steady state? ∞ X k=0 I I

`(x(k), u(k)) − `(xs , us )

Bounded above because VN0 (x) is bounded on XN . Not bounded below because the controller can outperform the best steady state on average

Rawlings/Angeli/Bates

Economic MPC

45 / 94

What this means . . . The nominal average asymptotic cost of closed-loop EMPC is not worse than the best steady state What this theorem does not say: I I

EMPC is stable under these conditions A finite time average is not worse than the best steady state

What about net, rather than average, cost relative to steady state? ∞ X k=0 I I

I

`(x(k), u(k)) − `(xs , us )

Bounded above because VN0 (x) is bounded on XN . Not bounded below because the controller can outperform the best steady state on average No proven relationship between closed-loop cost for tracking MPC vs. EMPC from a given initial state

Rawlings/Angeli/Bates

Economic MPC

45 / 94

Industrial simulation example F200

F4 , T3

Separator L2

Cooling water T200

T201 Condenser

Condensate F5

P100 LT Steam F100

T100

Evaporator

Condensate

LC

F3

F2

Feed F1 , X1 , T1

Product X2 , T2

Evaporator system (Newell and Lee, 1989, Ch. 2) Rawlings/Angeli/Bates

Economic MPC

46 / 94

Evaporator system Measurements: product composition X2 and operating pressure P2 Inputs: steam pressure P100 , cooling water flow rate F200 The economic stage cost is the operating cost for electricity, steam and cooling water (Wang and Cameron, 1994; Govatsmark and Skogestad, 2001). J = 1.009(F2 + F3 ) + 600F100 + 0.6F200

Rawlings/Angeli/Bates

Economic MPC

47 / 94

Evaporator system Measurements: product composition X2 and operating pressure P2 Inputs: steam pressure P100 , cooling water flow rate F200 The economic stage cost is the operating cost for electricity, steam and cooling water (Wang and Cameron, 1994; Govatsmark and Skogestad, 2001). J = 1.009(F2 + F3 ) + 600F100 + 0.6F200

We consider the process subject to disturbances in feed flow rate F1 , Feed composition C1 , Circulating flow rate F3 , feed temperature T1 and cooling water inlet temperature T200

Rawlings/Angeli/Bates

Economic MPC

47 / 94

Evaporator system Measurements: product composition X2 and operating pressure P2 Inputs: steam pressure P100 , cooling water flow rate F200 The economic stage cost is the operating cost for electricity, steam and cooling water (Wang and Cameron, 1994; Govatsmark and Skogestad, 2001). J = 1.009(F2 + F3 ) + 600F100 + 0.6F200

We consider the process subject to disturbances in feed flow rate F1 , Feed composition C1 , Circulating flow rate F3 , feed temperature T1 and cooling water inlet temperature T200 We consider both tracking MPC and EMPC with a terminal state constraint Rawlings/Angeli/Bates

Economic MPC

47 / 94

14000 12000 Cost ($/h)

Disturbance P2 (kPa)

0 -1 -2 -3 -4 -5 -6 -7 -8 -9

0

20

40 60 time (min)

80

0

20

40 60 time (min)

80

100

0

20

40 60 time (min)

80

100

80

100

220 Input F200 (kg/min)

Input P100 (kPa)

6000 2000

100

350 300 250 200 150 100

0

20

40 60 time (min)

80

200 180 160 140 120 100

100

70

50

60

Output P2 (kPa)

Output X2(%)

8000 4000

400

50 40 30 20

10000

0

20

Rawlings/Angeli/Bates

40 60 time (min)

80

100

eco-MPC track-MPC

45 40 35 30

0

20

Economic MPC

40 60 time (min)

48 / 94

12000

F1 T1

Cost ($/h)

Disturbance

50 45 40 35 30 25 20 15 10

T100 0 10 20 30 40 50 60 70 80 90 time (min)

6000 0 10 20 30 40 50 60 70 80 90 time (min)

400 Input F200 (kg/min)

Input P100 (kPa)

8000

4000

400 350 300 250 200 150 100

10000

360 320 280 240 200

0 10 20 30 40 50 60 70 80 90 time (min)

0 10 20 30 40 50 60 70 80 90 time (min)

36

Output P2 (kPa)

Output X2(%)

40

32 28 24 20

0 10 20 30 40 50 60 70 80 90 time (min)

Rawlings/Angeli/Bates

56

eco-MPC track-MPC

54 52 50 0 10 20 30 40 50 60 70 80 90 time (min)

Economic MPC

49 / 94

Evaporator system closed-loop economics

Performance comparison under economic and tracking MPC

Disturbance Measured Unmeasured

Rawlings/Angeli/Bates

Avg. operating cost ×10−6 ($/ hr) eco-MPC track-MPC ∆ (%) 5.89 5.80

5.97 6.15

Economic MPC

2.2 6.2

50 / 94

Asymptotic stability and EMPC

Steady operation often desired by practitioners I I

Equipment not designed for strongly unsteady operation Operator acceptance issue for unsteady operation

Rawlings/Angeli/Bates

Economic MPC

51 / 94

Asymptotic stability and EMPC

Steady operation often desired by practitioners I I

Equipment not designed for strongly unsteady operation Operator acceptance issue for unsteady operation

Stability analysis I

I

Check that stability is consistent with the process model and control objectives Or modify the control objectives (stage cost) given the process model

Rawlings/Angeli/Bates

Economic MPC

51 / 94

Stabilizing assumption for EMPC System: x + = f (x, u) Supply rate: s(x, u)

Storage: λ(x)

Dissipation

Assumption: Dissipativity The system x + = f (x, u) is dissipative with respect to the supply rate s : Z → R if there exists a function λ : X → R such that: λ(f (x, u)) − λ(x) ≤ s(x, u) for all (x, u) ∈ Z. If ρ : X → R≥0 positive definite exists such that: λ(f (x, u)) − λ(x) ≤ −ρ(x) + s(x, u) then the system is said to be strictly dissipative. Rawlings/Angeli/Bates

Economic MPC

52 / 94

Optimality of steady-state operation Optimal operation at steady-state The system x + = f (x, u) is optimally operated at steady-state if for all trajectories (x, u), such that (x(k), u(k)) ∈ Z for all k ∈ N it holds that PT −1 lim inf

T →+∞

Rawlings/Angeli/Bates

k=0

`(x(k), u(k)) ≥ `(xs , us ) T

Economic MPC

53 / 94

Optimality of steady-state operation Optimal operation at steady-state The system x + = f (x, u) is optimally operated at steady-state if for all trajectories (x, u), such that (x(k), u(k)) ∈ Z for all k ∈ N it holds that PT −1 lim inf

T →+∞

k=0

`(x(k), u(k)) ≥ `(xs , us ) T

Suboptimal operation off steady-state A system optimally operated at steady-state is suboptimally operated off steady-state if for all trajectories (x, u), such that (x(k), u(k)) ∈ Z it holds that either PT −1 k=0 `(x(k), u(k)) lim inf > `(xs , us ) T →+∞ T or lim inf |x(k) − xs | = 0. k→+∞

Rawlings/Angeli/Bates

Economic MPC

53 / 94

Dissipativity and Optimality

Dissipativity is closely related to optimal operation at steady-state 1 2

Dissipativity ⇒ Optimal operation at steady-state

Strict Dissipativity ⇒ Sub-optimal operation off steady-state

Rawlings/Angeli/Bates

Economic MPC

54 / 94

Dissipativity and Optimality

Dissipativity is closely related to optimal operation at steady-state 1 2 3

Dissipativity ⇒ Optimal operation at steady-state

Strict Dissipativity ⇒ Sub-optimal operation off steady-state

Gap between Dissipativity and Optimal steady state operation: ∀ x, all trajectories (x, u) such that (x(k), u(k)) ∈ Z and x(0) = x satisfy inf

T ≥1

T −1 X k=0

  `(x(k), u(k)) − `(xs , us ) > −∞

investigated by Mueller et al. (2013)

Rawlings/Angeli/Bates

Economic MPC

54 / 94

Dissipativity: an example

Consider the following system x + = αx + (1 − α)u,

α ∈ [0, 1)

With the following nonconvex stage cost `(x, u) = (x + u/3)(2u − x) + (x − u)4

1

Strong duality requires constant λ such that λ0 f (x, u) − λ0 x ≤ `(x, u). Rawlings/Angeli/Bates

Economic MPC

55 / 94

Dissipativity: an example

Consider the following system x + = αx + (1 − α)u,

α ∈ [0, 1)

With the following nonconvex stage cost `(x, u) = (x + u/3)(2u − x) + (x − u)4 This system and stage cost are dissipative for α ∈ [ 12 , 1], but are not strongly dual1 for any α. What does this tell us about the behavior of EMPC?

1

Strong duality requires constant λ such that λ0 f (x, u) − λ0 x ≤ `(x, u). Rawlings/Angeli/Bates

Economic MPC

55 / 94

0.2 0.15 0.1 State

0.05 0 -0.05 -0.1 -0.15 -0.2 0

2

4

6

α = 0.2

8

10 Time

12

α = 0.4

14

16

18

α = 0.6

0.3 0.2

Input

0.1 0 -0.1 -0.2 -0.3 0

2

α = 0.2 Rawlings/Angeli/Bates

4

6

8

10 Time

α = 0.4

12

14

16

18

α = 0.6 Economic MPC

56 / 94

0.05

α = .2 α = .4 α = .6

0.04

Stage Cost

0.03 0.02 0.01 0 -0.01 -0.02 -0.03 0

2

4

6

8

10 Time

12

14

16

18

EMPC controller with N = 10, terminal equality constraint Closed-loop EMPC is stable for α ≥ 1/2

Closed-loop EMPC is unstable for α < 1/2 and outperforms the best steady state on average Dissipativity is a tighter condition for EMPC stability than strong duality Rawlings/Angeli/Bates

Economic MPC

57 / 94

u

α u = x/2

(b) x

(a)

u = −3x

Qualitative picture of L0 : global minima (a),(b); α-dependent period-2 solution (black dots). Adapted from Angeli et al. (2012).

Rawlings/Angeli/Bates

Economic MPC

58 / 94

Stability theorem for EMPC

Theorem: Stability of EMPC If the system x + = f (x, κN,e (x)) is strictly dissipative with respect to the supply rate s(x, u) = `(x, u) − `(xs , us ) then xs is an asymptotically stable equilibrium point of the closed-loop system with region of attraction XN,e . Nominal average asymptotic performance not worse than steady operation is always implied by stability

Rawlings/Angeli/Bates

Economic MPC

59 / 94

Sketch of proof Lyapunov-based proof, with rotated stage cost: L(x, u) := `(x, u) − `(xs , us ) + λ(x) − λ(f (x, u))

Rawlings/Angeli/Bates

Economic MPC

60 / 94

Sketch of proof Lyapunov-based proof, with rotated stage cost: L(x, u) := `(x, u) − `(xs , us ) + λ(x) − λ(f (x, u)) Notice that N−1 X

L(x(k), u(k))

k=0

=

N−1 X k=0

`(x(k), u(k)) + λ(x(k)) − λ(x(k + 1)) − `(xs , us )

= λ(x(0)) − λ(x(N)) − N`(xs , us ) +

N−1 X

`(x(k), u(k))

k=0

Optimal control is unaffected by cost rotation. Rawlings/Angeli/Bates

Economic MPC

60 / 94

Sketch of proof (continued) Under dissipativity assumption rotated cost fulfills standard MPC conditions (positive semi-definite): L(x, u) ≥ 0 In addition, under strict dissipativity, the rotated cost is positive definite: L(x, u) ≥ ρ(x)

Rawlings/Angeli/Bates

Economic MPC

61 / 94

Sketch of proof (continued) Under dissipativity assumption rotated cost fulfills standard MPC conditions (positive semi-definite): L(x, u) ≥ 0 In addition, under strict dissipativity, the rotated cost is positive definite: L(x, u) ≥ ρ(x) Cost-to-go can be used as a candidate Lyapunov function V (x) := min u

N−1 X

L(x(k), u(k))

k=0

subject to initial, terminal and dynamic constraints. Rawlings/Angeli/Bates

Economic MPC

61 / 94

Sketch of proof (continued) Recursive feasibility: Feasibility of: x = (x(0), x(1), . . . , x(N − 1))

u = (u(0), u(1), . . . , u(N − 1))

implies feasibility of: x = (x(1), x(2), . . . , x(N − 1), xs ) u = (u(1), . . . , u(N − 1), us ).

Rawlings/Angeli/Bates

Economic MPC

62 / 94

Sketch of proof (continued) Recursive feasibility: Feasibility of: x = (x(0), x(1), . . . , x(N − 1))

u = (u(0), u(1), . . . , u(N − 1))

implies feasibility of: x = (x(1), x(2), . . . , x(N − 1), xs ) u = (u(1), . . . , u(N − 1), us ). Along closed-loop solutions: V (x + ) ≤ V (x) − ρ(x). Hence, ρ(x(k)) → 0 as k → +∞ and convergence to equilibrium follows by compactness of Z. Rawlings/Angeli/Bates

Economic MPC

62 / 94

Asymptotic averages As convergence to equilibrium is not always enforced, asymptotic averages of output variables need not equal their limit (which in fact may fail to exist) Possibility of asymptotic average constraints different from pointwise in time constraints (pointwise in time constraints are typically more stringent)

Rawlings/Angeli/Bates

Economic MPC

63 / 94

Asymptotic averages As convergence to equilibrium is not always enforced, asymptotic averages of output variables need not equal their limit (which in fact may fail to exist) Possibility of asymptotic average constraints different from pointwise in time constraints (pointwise in time constraints are typically more stringent) Definition of asymptotic average: Av [v ] = {w : ∃ {Tn }+∞ n=1 : Tn → +∞ as n → +∞ PTn −1 k=0 v (k) and lim =w } n→+∞ Tn Asymptotic average need not be a singleton: 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, . . . Notice that {1/3, 1/2} ⊂ Av[v ] ⊂ [1/3, 1/2]. Rawlings/Angeli/Bates

Economic MPC

63 / 94

Average constraints Goals: Modify economic MPC algorithm to guarantee: (x(k), u(k)) ∈ Z for all k ∈ N; Av[h(x, u)] ⊂ Y 3 h(xs , us ); Recursive feasibility

Rawlings/Angeli/Bates

Economic MPC

64 / 94

Average constraints Goals: Modify economic MPC algorithm to guarantee: (x(k), u(k)) ∈ Z for all k ∈ N; Av[h(x, u)] ⊂ Y 3 h(xs , us ); Recursive feasibility Remarks: 1

For technical reasons Y is assumed to be convex.

2

Average constraint does not imply limits on averages computed on finite time windows.

For the following: At each time t let variables z(k) and v (k) denote virtual (predicted) variables, and x(k), u(k) (k ≤ t) actual variables Rawlings/Angeli/Bates

Economic MPC

64 / 94

Economic MPC with average constraints A modified receding-horizon strategy: min v,z

N−1 X

`(z(k), v (k))

k=0

subject to: (z(k), v (k)) ∈ Z ∀ k ∈ {0, 1, . . . , N − 1}

z(k + 1) = f (z(k), v (k)) ∀ k ∈ {0, 1, . . . , N − 1} z(0) = x(t) N−1 X k=0

z(N) = xs

h(z(k), v (k)) ∈ Yt

where: Yt+1 = Yt ⊕ Y {h(x(t), u(t))}

Y0 = NY ⊕ Y00

with ⊕, denoting set addition and subtraction, and Y00 is an arbitrary convex compact set. Rawlings/Angeli/Bates

Economic MPC

65 / 94

Properties of the algorithm Time-varying state-feedback Recursive feasibility follows by standard argument: Feasibility of: x = (x(0), x(1), . . . , x(N − 1))

u = (u(0), u(1), . . . , u(N − 1))

implies feasibility of: x = (x(1), x(2), . . . , x(N − 1), xs ) u = (u(1), . . . , u(N − 1), us ).

Rawlings/Angeli/Bates

Economic MPC

66 / 94

Properties of the algorithm Time-varying state-feedback Recursive feasibility follows by standard argument: Feasibility of: x = (x(0), x(1), . . . , x(N − 1))

u = (u(0), u(1), . . . , u(N − 1))

implies feasibility of: x = (x(1), x(2), . . . , x(N − 1), xs ) u = (u(1), . . . , u(N − 1), us ). Additional constraint does not limit feasibility region (Y0 is arbitrarily large) Asymptotic average constraints are guaranteed Average performance not worse than best steady-state Possibility of replacing terminal constraint with terminal penalty function Rawlings/Angeli/Bates

Economic MPC

66 / 94

Working principle Show by induction: Yt = tY + Y0 {

t−1 X

h(x(k), u(k))}

k=0

Hence: N−1 X

h(z(k), v (k)) +

k=0

Rawlings/Angeli/Bates

t−1 X k=0

h(x(k), u(k)) ∈ tY ⊕ Y0

Economic MPC

67 / 94

Working principle Show by induction: Yt = tY + Y0 {

t−1 X

h(x(k), u(k))}

k=0

Hence: N−1 X

h(z(k), v (k)) +

k=0

t−1 X k=0

h(x(k), u(k)) ∈ tY ⊕ Y0

Taking tn → +∞ so that limit exists: Ptn −1 k=0 h(x(k), u(k)) = lim n→+∞ tn PN−1 Ptn −1 k=0 h(z(k), v (k)) + k=0 h(x(k), u(k)) = lim ∈Y n→+∞ tn Rawlings/Angeli/Bates

Economic MPC

67 / 94

Dissipativity for averagely constrained systems

Problem: Asymptotic convergence of averagely constrained MPC Sufficient conditions, possibility of relaxing dissipativity?

Dissipativity taking into account average constraints Consider the modified supply function: ¯ T [Ah(x, u) − b] sa (x, u) = `(x, u) − `(xs , us ) + λ provided: Y = {y : Ay ≤ b}

Rawlings/Angeli/Bates

Economic MPC

68 / 94

Dissipativity and Convergence for Averagely Constrained EMPC Optimal steady-state operation If a system is dissipative with respect to the supply rate sa (x, u) for some ¯ then every feasible solution fulfills: non-negative λ lim inf

T →+∞

Rawlings/Angeli/Bates

T −1 X k=0

`(x(k), u(k)) ≥ `(xs , us ) T

Economic MPC

69 / 94

Dissipativity and Convergence for Averagely Constrained EMPC Optimal steady-state operation If a system is dissipative with respect to the supply rate sa (x, u) for some ¯ then every feasible solution fulfills: non-negative λ lim inf

T →+∞

T −1 X k=0

`(x(k), u(k)) ≥ `(xs , us ) T

Convergence of Averagely Constrained EMPC If a system is strictly dissipative with respect to the supply rate sa (x, u) for ¯ then closed-loop solutions of Averagely Constrained some non-negative λ EMPC asymptotically approach the best steady-state.

Rawlings/Angeli/Bates

Economic MPC

69 / 94

Enforcing convergence in Economic MPC

By modifying the economic stage cost `(x, u) as: ˜ u) = `(x, u) + γ(|x − xs | + |u − us |) `(x, in order to recover dissipativity or strong duality

Rawlings/Angeli/Bates

Economic MPC

70 / 94

Enforcing convergence in Economic MPC

By modifying the economic stage cost `(x, u) as: ˜ u) = `(x, u) + γ(|x − xs | + |u − us |) `(x, in order to recover dissipativity or strong duality By adding an auxiliary average constraint, such as: Av[|x − xs |2 ] ⊂ {0} or: Av[|xi − xsi |2 ] ⊂ {0}

Rawlings/Angeli/Bates

i = 1 . . . n;

Economic MPC

70 / 94

Case study: a reactor with parallel reactions The reactions: R → P1

R → P2

The state-space model: x˙ 1 = 1 − 104 x12 e −1/x3 − 400x1 e −0.55/x3 − x1 x˙ 2 = 104 x12 e −1/x3 − x2 x˙ 3 = u − x3

x1 is concentration of R, x2 is concentration of P1 (the desired product), x3 is the temperature and u is the heat flux. P2 is the waste product (not modeled).

Rawlings/Angeli/Bates

Economic MPC

71 / 94

Case study: a reactor with parallel reactions The reactions: R → P1

R → P2

The state-space model: x˙ 1 = 1 − 104 x12 e −1/x3 − 400x1 e −0.55/x3 − x1 x˙ 2 = 104 x12 e −1/x3 − x2 x˙ 3 = u − x3

x1 is concentration of R, x2 is concentration of P1 (the desired product), x3 is the temperature and u is the heat flux. P2 is the waste product (not modeled). Goal: maximize x2 , viz.: `(x, u) = −x2 ; Known that best performance is not at steady state Rawlings/Angeli/Bates

Economic MPC

71 / 94

Closed-loop simulations

0.4 0.3 u 0.2 0.1 0

2

4

6

8

10

0.7 0.6 0.5 0.4 x1 0.3 0.2 0.1 00

0.2

IC 1 IC 2 IC 3

2

4

6

8

10

2

4

6

8

10

0.2 0.15

x2

x3 0.1 00

2

4

6

8

10

0.05 0

Closed-loop input and state profiles for economic MPC with a convex term and different initial states

Rawlings/Angeli/Bates

Economic MPC

72 / 94

Closed-loop simulations (2)

0.4 0.3 u 0.2 0.1 0

2

4

6

8

10

0.7 0.6 0.5 0.4 x1 0.3 0.2 0.1 00

0.2

IC 1 IC 2 IC 3

2

4

6

8

10

2

4

6

8

10

0.2 0.15

x2

x3 0.1 00

2

4

6

8

10

0.05 0

Closed-loop input and state profiles for economic MPC with a convergence constraint and different initial states

Rawlings/Angeli/Bates

Economic MPC

73 / 94

Outperforming best steady-state

Terminal constraint instrumental in: 1 2

guaranteeing recursive feasibility providing bound to asymptotic performance

Any feasible trajectory may be used as a terminal constraint

Idea: Replace best equilibrium by best feasible periodic solution of given period

Rawlings/Angeli/Bates

Economic MPC

74 / 94

Best feasible periodic solution Let xs , us be: xs = [xs (0), xs (1), . . . , xs (Q − 1)] us = [us (0), us (1), . . . , us (Q − 1)], and assume that they belong to: arg min x,u

Q−1 X

`(x(k), u(k))

k=0

subject to: x(k + 1) = f (x(k), u(k))

k ∈ {0, 1, . . . , Q − 2}

x(0) = f (x(Q − 1), u(Q − 1)) (x(k), u(k)) ∈ Z

k ∈ {0, 1, . . . , Q − 1}

We call xs , us an optimal Q-periodic solution. Rawlings/Angeli/Bates

Economic MPC

75 / 94

EMPC with periodic terminal constraint

Solve at each time t the following optimization problem: min v,z

N−1 X

`(z(k), v (k))

k=0

subject to: (z(k), v (k)) ∈ Z ∀ k ∈ {0, 1, . . . , N − 1} z(k + 1) = f (z(k), v (k)) ∀ k ∈ {0, 1, . . . , N − 1} z(0) = x(t)

Rawlings/Angeli/Bates

z(N) = xs (t mod Q)

Economic MPC

76 / 94

Features of the algorithm

Q periodic state feedback Recursive feasibility: feasibility at time t of: x = (x(0), x(1), . . . , x(N − 1))

u = (u(0), u(1), . . . , u(N − 1))

implies feasibility of: (x(1), . . . , x(N−1), xs (t mod Q))

(u(1), . . . , u(N−1), us (t mod Q))

at time t + 1. Possibility of incorporating average constraints

Rawlings/Angeli/Bates

Economic MPC

77 / 94

Average performance with periodic end constraint Let V be the cost to go: V (t, x) = min v,z

N−1 X

`(z(k), v (k))

k=0

subject to: (z(k), v (k)) ∈ Z ∀ k ∈ {0, 1, . . . , N − 1} z(k + 1) = f (z(k), v (k)) ∀ k ∈ {0, 1, . . . , N − 1} z(0) = x

Rawlings/Angeli/Bates

z(N) = xs (t mod Q)

Economic MPC

78 / 94

Average performance with periodic end constraint Let V be the cost to go: V (t, x) = min v,z

N−1 X

`(z(k), v (k))

k=0

subject to: (z(k), v (k)) ∈ Z ∀ k ∈ {0, 1, . . . , N − 1} z(k + 1) = f (z(k), v (k)) ∀ k ∈ {0, 1, . . . , N − 1} z(0) = x

z(N) = xs (t mod Q)

Along closed-loop solution: V (t + 1, x(t + 1)) ≤ V (t, x(t))

− `(x(t), u(t)) + `(xs (t mod Q), us (t mod Q))

Rawlings/Angeli/Bates

Economic MPC

78 / 94

Average performance with periodic end constraint

Taking sums between 0 and T − 1 and dividing by T yields: PT −1 lim sup T →+∞

k=0

`(x(k), u(k)) ≤ T

PQ−1 k=0

`(xs (k), us (k)) Q

Average performance at least as good as optimal Q-periodic solution

Rawlings/Angeli/Bates

Economic MPC

79 / 94

Average performance with periodic end constraint

Taking sums between 0 and T − 1 and dividing by T yields: PT −1 lim sup T →+∞

k=0

`(x(k), u(k)) ≤ T

PQ−1 k=0

`(xs (k), us (k)) Q

Average performance at least as good as optimal Q-periodic solution Q and N may be different from each other and unrelated The closed-loop system need not be asymptotically stable to the optimal Q periodic solution The optimal Q periodic solution need not be an equilibrium of the closed-loop system

Rawlings/Angeli/Bates

Economic MPC

79 / 94

Ammonia synthesis (Jain et al., 1985)

Open loop stable equilibria Open-loop periodic forcing improves average production rate 1 2

Improvement of 24% by using sinusoidal inputs u(t) = c + A sin(ωt) Improvement of 25% by using square-waves of different amplitudes, average and duty cycle

Rawlings/Angeli/Bates

Economic MPC

80 / 94

Simulation of EMPC with terminal steady-state constraint

Improvement of 30 % in Ammonia production rate

Rawlings/Angeli/Bates

Economic MPC

81 / 94

Best Q-periodic solutions

Discretization Ts = 0.1 Best Q-periodic solution for Q = 16 Average production rate: 50 % better than best square wave Rawlings/Angeli/Bates

Economic MPC

82 / 94

Closed-loop with Q periodic terminal constraint

Chaotic regime: 25 % better than periodic solution Overall ≈ 140 % improvement over best steady state Rawlings/Angeli/Bates

Economic MPC

83 / 94

Terminal penalty formulations Just as with tracking MPC, we can expand the feasible set XN by replacing the terminal equality constraint with a terminal set constraint and a terminal penalty Admissible set: XN,p ={x ∈ X | ∃ u such that the trajectory (x(k), u(k)) satisfies (x(k), u(k)) ∈ Z k ∈ I0:N−1 ,

x(N) ∈ Xf }

Objective function: VN,p (x, u) =

N−1 X

`(x(k), u(k)) + Vf (x(N))

k=0

Rawlings/Angeli/Bates

Economic MPC

84 / 94

Terminal penalty in EMPC

Assumption: Terminal penalty There exists a terminal region control law κf : Xf → U such that Vf (f (x, κf (x))) ≤ Vf (x) − `(x, κf (x)) + `(xs , us ) (x, κf (x)) ∈ ZN,p

∀x ∈ Xf

This assumption is identical in form to the tracking case, but `(x, u) has changed Vf (x) need not be positive definite with respect to xs

Rawlings/Angeli/Bates

Economic MPC

85 / 94

Terminal penalty in EMPC

Theorem: EMPC stability with terminal penalty If the system x + = f (x, κN,p (x)) is strictly dissipative with respect to the supply rate: s(x, u) = `(x, u) − `(xs , us ) then xs is an asymptotically stable equilibrium point of the closed-loop system with region of attraction XN .

Rawlings/Angeli/Bates

Economic MPC

86 / 94

Case study: nonlinear CSTR We consider a nonlinear constant volume isothermal CSTR I I

States: P0 , B, P1 , P2 Inputs: inflow concentrations of P0 , B

The following reactions take place: P0 + B −→ P1 P1 + B −→ P2

Rawlings/Angeli/Bates

Economic MPC

87 / 94

Case study: nonlinear CSTR We consider a nonlinear constant volume isothermal CSTR I I

States: P0 , B, P1 , P2 Inputs: inflow concentrations of P0 , B

The following reactions take place: P0 + B −→ P1 P1 + B −→ P2 Economic stage cost: `(x, u) = −CP1 The controller stage cost is modified according to: ˜ u) = `(x, u) + |x − xs |2 + |u − us |2 `(x, Q R Rawlings/Angeli/Bates

Economic MPC

87 / 94

Representative open-loop trajectories 2

6

1.5

4

x1 1

x2 2

0.5 00

5

10

15

1.5

00 0.8

1 x4 0.4

x3

5

10

15

5 10 Time (t)

15

Eco R =0 Str. dual track

0.5 00

5 10 Time (t)

15

00

Open-loop state profiles with different cost functions and arbitrary initial state.

Rawlings/Angeli/Bates

Economic MPC

88 / 94

Average and net profits

Case Unstable Stable

Economic Dissipative Strongly dual Tracking

avg profit

net profit

0.46 0.38 0.38 0.38

∞ 2.6 1.6 1.0

Average profit and net profit for open-loop system with different stage costs.

All stable schemes have about the same average profit (large N) Net profit decreases with increase in tracking term weight

Rawlings/Angeli/Bates

Economic MPC

89 / 94

Conclusions

The economic objective function of EMPC causes novel behavior I

EMPC may be unstable where MPC is stable

Rawlings/Angeli/Bates

Economic MPC

90 / 94

Conclusions

The economic objective function of EMPC causes novel behavior I I

EMPC may be unstable where MPC is stable Using a terminal penalty or terminal equality constraint guarantees asymptotic average profit not worse than best steady state

Rawlings/Angeli/Bates

Economic MPC

90 / 94

Conclusions

The economic objective function of EMPC causes novel behavior I I

I

EMPC may be unstable where MPC is stable Using a terminal penalty or terminal equality constraint guarantees asymptotic average profit not worse than best steady state Stability of EMPC requires dissipativity of process/stage cost

Rawlings/Angeli/Bates

Economic MPC

90 / 94

Conclusions

The economic objective function of EMPC causes novel behavior I I

I

EMPC may be unstable where MPC is stable Using a terminal penalty or terminal equality constraint guarantees asymptotic average profit not worse than best steady state Stability of EMPC requires dissipativity of process/stage cost

Many techniques from MPC can be applied to EMPC

Rawlings/Angeli/Bates

Economic MPC

90 / 94

Conclusions

The economic objective function of EMPC causes novel behavior I I

I

EMPC may be unstable where MPC is stable Using a terminal penalty or terminal equality constraint guarantees asymptotic average profit not worse than best steady state Stability of EMPC requires dissipativity of process/stage cost

Many techniques from MPC can be applied to EMPC I

Terminal penalty formulation

Rawlings/Angeli/Bates

Economic MPC

90 / 94

Conclusions

The economic objective function of EMPC causes novel behavior I I

I

EMPC may be unstable where MPC is stable Using a terminal penalty or terminal equality constraint guarantees asymptotic average profit not worse than best steady state Stability of EMPC requires dissipativity of process/stage cost

Many techniques from MPC can be applied to EMPC I I

Terminal penalty formulation Average constraints

Rawlings/Angeli/Bates

Economic MPC

90 / 94

Conclusions

The economic objective function of EMPC causes novel behavior I I

I

EMPC may be unstable where MPC is stable Using a terminal penalty or terminal equality constraint guarantees asymptotic average profit not worse than best steady state Stability of EMPC requires dissipativity of process/stage cost

Many techniques from MPC can be applied to EMPC I I I

Terminal penalty formulation Average constraints Periodic terminal constraints

Rawlings/Angeli/Bates

Economic MPC

90 / 94

Open research issues

Remove terminal constraints and costs by choosing sufficient N. See Gr¨ une (2012a,b) for recent results in this direction.

Rawlings/Angeli/Bates

Economic MPC

91 / 94

Open research issues

Remove terminal constraints and costs by choosing sufficient N. See Gr¨ une (2012a,b) for recent results in this direction. Generalized terminal state constraint. Terminate on the steady-state manifold and move the end location dynamically to the best steady state (Fagiano and Teel, 2012; Ferramosca et al., 2009)

Rawlings/Angeli/Bates

Economic MPC

91 / 94

Open research issues

Remove terminal constraints and costs by choosing sufficient N. See Gr¨ une (2012a,b) for recent results in this direction. Generalized terminal state constraint. Terminate on the steady-state manifold and move the end location dynamically to the best steady state (Fagiano and Teel, 2012; Ferramosca et al., 2009) Analyzing closed-loop performance

Rawlings/Angeli/Bates

Economic MPC

91 / 94

Open research issues

Remove terminal constraints and costs by choosing sufficient N. See Gr¨ une (2012a,b) for recent results in this direction. Generalized terminal state constraint. Terminate on the steady-state manifold and move the end location dynamically to the best steady state (Fagiano and Teel, 2012; Ferramosca et al., 2009) Analyzing closed-loop performance I

What can be proven about net closed-loop performance of tracking MPC relative to EMPC?

Rawlings/Angeli/Bates

Economic MPC

91 / 94

Open research issues

Remove terminal constraints and costs by choosing sufficient N. See Gr¨ une (2012a,b) for recent results in this direction. Generalized terminal state constraint. Terminate on the steady-state manifold and move the end location dynamically to the best steady state (Fagiano and Teel, 2012; Ferramosca et al., 2009) Analyzing closed-loop performance I

I

What can be proven about net closed-loop performance of tracking MPC relative to EMPC? What is observed about differences in net closed-loop performance in simulations?

Rawlings/Angeli/Bates

Economic MPC

91 / 94

Open research issues

Remove terminal constraints and costs by choosing sufficient N. See Gr¨ une (2012a,b) for recent results in this direction. Generalized terminal state constraint. Terminate on the steady-state manifold and move the end location dynamically to the best steady state (Fagiano and Teel, 2012; Ferramosca et al., 2009) Analyzing closed-loop performance I

I

I

What can be proven about net closed-loop performance of tracking MPC relative to EMPC? What is observed about differences in net closed-loop performance in simulations? What model, stage cost and disturbance characteristics cause large performance differences between MPC and EMPC?

Rawlings/Angeli/Bates

Economic MPC

91 / 94

Open research issues

Tuning EMPC and robustness I

For nondissipative process/stage costs, how should the stage cost be modified?

Rawlings/Angeli/Bates

Economic MPC

92 / 94

Open research issues

Tuning EMPC and robustness I

I

For nondissipative process/stage costs, how should the stage cost be modified? How robust is EMPC to model errors and disturbances?

Rawlings/Angeli/Bates

Economic MPC

92 / 94

Open research issues

Tuning EMPC and robustness I

I I

For nondissipative process/stage costs, how should the stage cost be modified? How robust is EMPC to model errors and disturbances? How can economic risk be incorporated into the controller?

Rawlings/Angeli/Bates

Economic MPC

92 / 94

Open research issues

Tuning EMPC and robustness I

I I

For nondissipative process/stage costs, how should the stage cost be modified? How robust is EMPC to model errors and disturbances? How can economic risk be incorporated into the controller?

Computational methods for implementing EMPC; strategies for adapting existing control hierarchies

Rawlings/Angeli/Bates

Economic MPC

92 / 94

Further reading I D. Angeli, R. Amrit, and J. B. Rawlings. On average performance and stability of economic model predictive control. IEEE Trans. Auto. Cont., 57(7):1615–1626, 2012. R. Dorfman, P. Samuelson, and R. Solow. Linear Programming and Economic Analysis. McGraw-Hill, New York, 1958. L. Fagiano and A. R. Teel. Model predictive control with generalized terminal state constraint. In IFAC Conference on Nonlinear Model Predictive Control 2012, pages 299–304, Noordwijkerhout, the Netherlands, August 2012. A. Ferramosca, D. Limon, I. Alvarado, T. Alamo, and E. Camacho. MPC for tracking of constrained nonlinear systems. In IEEE Conference on Decision and Control (CDC), pages 7978–7983, Shanghai, China, 2009. M. S. Govatsmark and S. Skogestad. Control structure selection for an evaporation process. Comput. Chem. Eng., 9:657–662, 2001. L. Gr¨ une. NMPC without terminal constraints. In IFAC Conference on Nonlinear Model Predictive Control 2012, pages 1–13, Noordwijkerhout, the Netherlands, August 2012a. L. Gr¨ une. Economic receding horizon control without terminal constraints. Automatica, 2012b. Accepted for publication. Rawlings/Angeli/Bates

Economic MPC

93 / 94

Further reading II

A. K. Jain, R. R. Hudgins, and P. L. Silveston. Effectiveness factor under cyclic operation of a reactor. Can. J. Chem., 63:166–169, February 1985. M. Mueller, D. Angeli, and F. Allg¨ ower. On convergence of averagely constrained economic MPC and necessity of dissipativity for optimal steady-state operation. In American Control Conference, 2013. R. B. Newell and P. L. Lee. Applied Process Control – A Case Study. Prentice Hall, Sydney, 1989. J. B. Rawlings, D. Bonn´e, J. B. Jørgensen, A. N. Venkat, and S. B. Jørgensen. Unreachable setpoints in model predictive control. IEEE Trans. Auto. Cont., 53(9): 2209–2215, October 2008. F. Wang and I. Cameron. Control studies on a model evaporation process–constrained state driving with conventional and higher relative degree systems. J. Proc. Cont., 4 (2):59–75, 1994.

Rawlings/Angeli/Bates

Economic MPC

94 / 94