Docsity

Model Predictive Control-Optimization Methods-Lecture Slides, Slides of Convex Optimization

Partial preview of the text

Download Model Predictive Control-Optimization Methods-Lecture Slides and more Slides Convex Optimization in PDF only on Docsity!

Model Predictive Control

linear convex optimal control

finite horizon approximation

model predictive control

fast MPC implementations

supply chain management

Prof. S. Boyd, EE364b, Stanford University

docsity.com

Linear time-invariant convex optimal control

minimize

J

∞ t

=

x

t

, u

t

subject to

u

t

∈ U

x

t

∈ X

t

x

t

Ax

t

Bu

t

t

x

z.

variables: state and input trajectories

x

, x

R

n

u

, u

R

m

problem data: –

dynamics and input matrices

A

R

n

×

n

B

R

n

×

m

convex stage cost function

R

n

×

R

m

R

convex state and input constraint sets

X

U

, with

∈ X

∈ U

initial state

z

∈ X

1

docsity.com

‘Solution’ via dynamic programming

(Bellman)

value function

V

z

is optimal value of control problem as a

function of initial state

z

can show

V

is convex

V

satisfies Bellman or dynamic programming equation

V

z

) = inf

z, w

V

Az

Bw

w

∈ U

, Az

Bw

∈ X }

optimal

u

given by

u

⋆

t

argmin

w

∈U

, Ax

(

t

)+

Bw

∈X

x

t

, w

V

Ax

t

Bw

3

docsity.com

intepretation: term

V

Ax

t

Bw

properly accounts for future costs

due to current action

w

optimal input has ‘state feedback form’

u

⋆

t

φ

x

t

4

docsity.com

Finite horizon approximation

use finite horizon

T

, impose terminal constraint

x

T

minimize

T

−

1

τ

=

x

t

, u

t

subject to

u

t

∈ U

x

t

∈ X

τ

,... , T

x

t

Ax

t

Bu

t

τ

,... , T

x

z,

x

T

apply the input sequence

u

,... , u

T

a finite dimensional convex problem

gives suboptimal input for original optimal control problem

6

docsity.com

Example

system with

n

states,

m

inputs;

A

B

chosen randomly

quadratic stage cost:

v, w

v

2

w

2

• X

v

v

∞

U

w

w

∞

initial point:

z

optimal cost is

V

z

7

docsity.com

Trajectories

0

10

20

30

40

50

−

−0.

0

1

0

10

20

30

40

50

−0.

0

T

= 10

x

1

)t( )t(u

t

0

10

20

30

40

50

−

−0.

0

1

0

10

20

30

40

50

−0.

0

T

=

∞

t

Prof. S. Boyd, EE364b, Stanford University

9

docsity.com

Model predictive control (MPC)

at each time

t

solve the (planning) problem

minimize

t

T

τ

=

t

x

τ

, u

τ

subject to

u

τ

∈ U

x

τ

∈ X

τ

t,... , t

T

x

τ

Ax

τ

Bu

τ

τ

t,... , t

T

x

t

T

with variables

x

t

,... , x

t

T

u

t

,... , u

t

T

and data

x

t

A

B

X

U

call solution

x

t

x

t

T

u

t

u

t

T

we interpret these as

plan of action

for next

T

steps

we take

u

t

u

t

this gives a complicated state feedback control

u

t

φ

mpc

x

t

10 docsity.com

MPC trajectories

0

10

20

30

40

50

−

−0.

0

1

0

10

20

30

40

50

−0.

0

MPC,

T

= 10

x

1

)t( u

1

)t(

t

0

10

20

30

40

50

−

−0.

0

1

0

10

20

30

40

50

−0.

0

T

=

∞

t

Prof. S. Boyd, EE364b, Stanford University

12 docsity.com

MPC

goes by many other names,

e.g.

, dynamic matrix control, receding

horizon control, dynamic linear programming, rolling horizon planning

widely used in (some) industries, typically for systems with slowdynamics (chemical process plants, supply chain)

MPC typically works very well in practice, even with short

T

under some conditions, can give performance guarantees for MPC

13 docsity.com

Explicit MPC

MPC with

quadratic,

X

and

U

polyhedral

can show

φ

mpc

is piecewise affine

φ

mpc

z

K

j

z

g

j

z

∈ R

j

R

1

R

N

is polyhedral partition of

X

(solution of

any

QP is PWA in righthand sides of constraints)

φ

mpc

i.e.

K

j

g

j

R

j

) can be computed explicitly, off-line

on-line controller simply evaluates

φ

mpc

x

t

(effort is dominated by determining which region

x

t

lies in)

15 docsity.com

can work well for (very) small

n

m

, and

T

number of regions

N

grows exponentially in

n

m

T

needs lots of storage

evaluating

φ

mpc

can be slow

simplification methods can be used to reduce the number of regions,while still getting good control

16 docsity.com

Fast MPC

can obtain further speedup by solving planning problem approximately –

fix barrier parameter; use warm-start

(sharply) limit the total number of Newton steps

results for simple C implementation

problem size

QP size

run time (ms)

n

m

T

vars

constr

fast mpc

SDPT

can run MPC at

kilohertz

rates

18 docsity.com

Supply chain management

n

nodes (warehouses/buffers)

m

unidirectional links between nodes, external world

x

i

t

is amount of commodity at node

i

, in period

t

u

j

t

is amount of commodity transported along link

j

incoming and outgoing node incidence matrices:

A

in(out) ij

link

j

enters (exits) node

i

otherwise

dynamics:

x

t

x

t

A

in

u

t

A

out

u

t

19 docsity.com