31
OPTIMAL CONTROL OF HYBRID SYSTEMS: DETERMINISTIC MODELS AND APPLICATIONS C. G. Cassandras Dept. of Manufacturing Engineering and Center for Information and Systems Engineering (CISE) Boston University [email protected] http://vita.bu.edu/cgc ACKNOWLEDGEMENTS: K. Gokbayrak, Y. Wardi, Y. Cho, D. Pepyne Christos G. Cassandras CODES Lab. - Boston University

OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

  • Upload
    others

  • View
    7

  • Download
    1

Embed Size (px)

Citation preview

Page 1: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

OPTIMAL CONTROL OFHYBRID SYSTEMS:

DETERMINISTIC MODELSAND APPLICATIONS

C. G. CassandrasDept. of Manufacturing EngineeringandCenter for Information and Systems Engineering (CISE)Boston [email protected]://vita.bu.edu/cgc

ACKNOWLEDGEMENTS: K. Gokbayrak, Y. Wardi, Y. Cho, D. Pepyne

Christos G. Cassandras CODES Lab. - Boston University

Page 2: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

OUTLINE

Optimal Control Problem Formulation

Hierarchical Decomposition

Problems with a single event process

Problems with asynchronous event processes

Complexity reduction: From exponential to linear

Single Stage Manufacturing System:Optimal Control Problem Solution

Interactive Software Demo

Christos G. Cassandras CODES Lab. - Boston University

Page 3: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

WHAT’S A HYBRID SYSTEM?

NEW “MODE”

x0

x1

),,( 1111 tuzgz =&

TIME

x1

x2

),,,( 11011 tuzxfx =

),,( 2222 tuzgz =&

),,,( 22122 tuzxfx =

Christos G. Cassandras CODES Lab. - Boston University

Page 4: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

Christos G. Cassandras CODES Lab. - Boston University

OPTIMAL CONTROL PROBLEMS

x1 x2

Physical State, z

Temporal State, xxN

zN

• Minimize: - deviations from N desired physical states (zi - qi)2

- deviations from target desired times (xi - τi)2

• Get to desired final physical state zN in minimum time xN, subject to N-1 switching events

q1

τ1

Page 5: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

OPTIMAL CONTROL PROBLEMS

dttutzLN

i

x

x iiii

i∑∫

= −1 1

))(),((minu

),,( tuzgz iiii =&

s.t.xi+1 = fi(xi,ui,t)

Physical state

Temporal state

Event-drivenDynamics

Time-drivenDynamics

Christos G. Cassandras CODES Lab. - Boston University

• Maximum principle extensions – Piccoli, 1998; Sussman, 1999• Dynamic Programming extensions – Hedlund and Rantzer, 1999; Xu and Antsaklis, 2000• Hierarchical decomposition - Gokbayrak and Cassandras, 2000; Xu and Antsaklis, 2000• Mixed Integer Programming – Bemporad and Morari, 2002

Page 6: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

OPTIMAL CONTROL PROBLEMS CONTINUED

∑ ∫=

+

N

iiiii

x

x i xdttutzLi

i1)())(),((min

1

ψu

),( 1−iii xxφCost under ui(t)over [xi-1,xi]

Cost of switching time xi

[ ]∑=

− +N

iiiiii xxx

11 )(),(min ψφ

u

Let: si = xi - xi-1 Time spent at ith operating mode

Assume: )(),( 1 iiiii sxx φφ =−Christos G. Cassandras CODES Lab. - Boston University

Page 7: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

HIERARCHICAL DECOMPOSITION

[ ]∑=

+N

iiiii xs

1)()(min ψφ

u

),,( tuzgz iiii =&s.t.

xi+1 = fi(xi,ui,t)

∫= i

i

s

iiiiiudttutzLs

0))(),(()(minφ ),,( tuzgz iiii =&

s.t.

[ ]∑=

+N

iiiii xs

1

* )()(min ψφs

xi+1 = fi(xi,si,t)

s.t.

LOWER LEVEL PROBLEMS:

HIGHER LEVEL PROBLEM:

FIXED si

Christos G. Cassandras CODES Lab. - Boston University

Page 8: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

x1 x2

xi-1 xi+1xi

si si+1

0iz

fiz

01+iz

fiz 1+

)(min),,( 0 ii

szzus

if

iii

φ

[ ]∑=

+N

iiii

fiii xszz

f1

0

,)(),,(min

0ψθ

s,zz xi+1 = fi(xi,ui,t)s.t.REALLY

CHALLENGINGPROBLEM!

)(min 11),,( 11

011

++++++

iiszzu

si

fiii

φ

Christos G. Cassandras CODES Lab. - Boston University

02+iz

),,(min),,(

),,(0

0*

iiiiuif

iii

if

iii

suzszz

szzu

i

φθ =

“ROUTINE”OPTIMAL CONTROL

PROBLEM!

“ROUTINE”OPTIMAL CONTROL

PROBLEM!

),(),max( 11 iiiiii uzsaxx += ++Typical example:

HIERARCHICAL DECOMPOSITION CONTINUED

REALLYCHALLENGING

PROBLEM!

Page 9: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

HYBRID CONTROLLER STRUCTURE

Hybrid controller steps:

),,( tg uzz =&

Lower-level Controller

u*(s*)

xi+1 = fi(xi,si,t), i = 1,…,N

Higher-level Controller

g, φ

f, ψ

s*

Event timing

• System identification

• Lower-level solution

• Higher-level solution

• Operation...

• Lower-level solution

s*φ*(s)

Physical processes[Gokbayrak and Cassandras, 2000;Xu and Antsaklis, 2000]

[Gokbayrak and Cassandras, 2000;Xu and Antsaklis, 2000]

Christos G. Cassandras CODES Lab. - Boston University

Page 10: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

TWO TYPES OF PROBLEMS: SYNCHRONOUS v. ASYNCHRONOUS

x0

0z

x2x1s1 s2

fdz

),,( 1111 tuzgz =& ),,( 2222 tuzgz =&fz1

xi+1 = xi + si(zi,ui)1. A single event process controls switching dynamics:

Christos G. Cassandras CODES Lab. - Boston University

x0

0z

x2x1s1 si+1

fdz

),,( 1111 tuzgz =& ),,( 2222 tuzgz =&fz1

02z

2. Multiple event processes controlswitching dynamics: ),(),max( 11 iiiiii uzsaxx += ++

EXTERNALEVENT PROCESS

Page 11: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

TYPE 1 PROBLEM: TWO-MODE LINEAR SYSTEM

x0

0z

x2x1si si+1

11 uz =&222 uzz +=α& f

dz

OBJECTIVE:

minJ 1z1, s1,u1 2z2, s2,u2 2x2

0

s1 12 r1u1

2tdt12 hz2

f zdf 2

0

s2 12 r2u2

2tdt

x22

Christos G. Cassandras CODES Lab. - Boston University

Page 12: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

LOWER LEVEL PROBLEMS

LQ PROBLEM 1:

∫= 1

1 0

2111111 )(

21),,(min

s

udttursuzφ s.t. 11 uz =&

STANDARD LQ SOLUTION:

1

011

11 )(s

zzutuf −==

( )2011

1

11

0111 2

1),,( zzsrzzs ff −=θ

Christos G. Cassandras CODES Lab. - Boston University

Page 13: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

LOWER LEVEL PROBLEMS CONTINUED

LQ PROBLEM 2:

∫+−= 2

2 0

222

222222 )(

21)(

21),,(min

sfd

f

udtturzzhsuzφ

s.t. 22 uzzi +=α&

STANDARD LQ SOLUTION:

( ) tss

sf

eee

ezztu ααα

αα −− −

−−=22

2022

22)(

( ) ( )2

22

220

222222

0222 2

1),,( sss

sff

dff e

eeezzrzzhzzs ααα

ααθ −−−

−+−=

Christos G. Cassandras CODES Lab. - Boston University

Page 14: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

HIGHER LEVEL PROBLEM

mins1,s2,z1

0,

z20,z1

f ,z2f

12

r1s1 z1

f z10

2 12 hz2

f zdf

2 z2

f z20es2

2r2

e2s21 x2

2

0, , , , 212121020

01 ≥+=== ssssxzzzz fs.t.

mins1,s2,z1

f ,z2f

12

r1s1 z1

f z0 2 1

2 hz2f zd

f 2

z2f z1

f es22r2

e2s21 s1 s22

Christos G. Cassandras CODES Lab. - Boston University

Page 15: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

HIGHER LEVEL PROBLEM CONTINUED

Optimality conditions yield four nonlinear algebraic equations:

hz2f zd

f 2 z2

f z1f es2 r2

e2s21r1s1z1

f z0 2 z2

f z1f es2 r2

es2es2

r1z1f z02 4s1

2s1 s2

s1 s2 2r2 z2

f z1f es2 z1

f es2

e2s21

2r2e2s2 z2f z1

f es22

e2s212

x0

00 =z

h = 10

β = 10

r1 = 2 r2 = 10α = 1

x2 = 1.64x1 = 0.467.92 =fz

10=fdz

Christos G. Cassandras CODES Lab. - Boston University

Page 16: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

TYPE 2 PROBLEM: MANUFACTURING SYSTEM

Physical State, z

Temporal State, x

xix3a1 a2 a3 ai+1

IDLING

x1 x2

),,( tuzgz iiii =&Decoupled

modes…

Christos G. Cassandras CODES Lab. - Boston University

External event process: ith mode cannot start before ai+1

{ } ),(,max 1 iiiiii uzsaxx += −

Page 17: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

HYBRID SYSTEM IN MANUFACTURING

Key questions facing manufacturing system integrators:

• How to integrate ‘process control’ with ‘operations control’ ?

• How to improve product QUALITY within reasonable TIME ?

PROCESS CONTROL• Physicists• Material Scientists• Chemical Engineers• ...

OPERATIONS CONTROL• Industrial Engineers, OR• Schedulers• Inventory Control• ...

Christos G. Cassandras CODES Lab. - Boston University

Page 18: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

HYBRID SYSTEM IN MANUFACTURING CONTINUED

Throughout a manuf. process, each part is characterized by

• A PHYSICAL state (e.g., size, temperature, strain)

• A TEMPORAL state (e.g., total time in system, total time to due-date)

OPERATIONOPERATION

NEW TEMPORAL

STATE

TEMPORALSTATE

PHYSICALSTATE

NEW PHYSICAL

STATE

Time-drivenDynamics

Event-drivenDynamics

Christos G. Cassandras CODES Lab. - Boston University

Page 19: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

HYBRID SYSTEM IN MANUFACTURING CONTINUED

EVENT-DRIVENCOMPONENT

TIME-DRIVENCOMPONENT

PartArrivals Part

Departures

ui ( )tuzgtz iii ,,)( =&

ai, zi(ai) xi, zi(xi)

{ } )(,max 1 iiiii usaxx += −

Christos G. Cassandras CODES Lab. - Boston University

Page 20: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

LOWER LEVEL PROBLEM

LQ PROBLEM:

iiiii zbuazz ς=+= )0( ,&

∫+−= i

i

s

idifiiiiiudttruzzhsuz

0

2212

21 )()(),,(minφ

Penalize final state deviation

Parameterized by switching times

s.t.

STANDARD LQ SOLUTION METHOD:

∫+−= is

idifiii dttruzzhs0

*212*

21* )()()(φ

Christos G. Cassandras CODES Lab. - Boston University

Page 21: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

HIGHER LEVEL PROBLEM

[ ]∑=

+N

iiiii xs

1

* )()(min ψφs

{ } )(,max 1 iiiii usaxx += −

Given arrival sequence (INPUT)

Processing time(CONTOLLABLE)

Cost of optimal process control over interval [0, si]

Cost related to event timing

2)()( :EXAMPLE iiii xx τψ −=

s.t.

Christos G. Cassandras CODES Lab. - Boston University

Page 22: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

HOW DO WE SOLVE THE HIGHER LEVEL PROBLEM?

[ ]∑=

+N

iiiii xs

1

* )()(min ψφs

{ } )(,max 1 iiiii usaxx += −

Causes nondifferentiabilities!Even if these are convex, problem is still NOT convex in s!

Even though problem is NONDIFFERENTIABLEand NONCONVEX,optimal solution shownto be unique. [Cassandras, Pepyne, Wardi, IEEE TAC 2001][Cassandras, Pepyne, Wardi, IEEE TAC 2001]

Christos G. Cassandras CODES Lab. - Boston University

s.t.

Page 23: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

SOLVING THE HIGHER LEVEL PROBLEM CONTINUED

⇒ search over 2N-1 possible Constrained Convex Optimization problems

a1 a4 a7 a9a2 a3 a5 a6 a8 JUST-IN-TIME

x1 x2 x3 x4 x5 x7x6 x8

BUT algorithms that only need N Constrained Convex Optimizationproblems have been developed ⇒ SCALEABILITY

Each “block” corresponds to aConstrained Convex Optimization problem

[Cho, Cassandras, Intl. J. Rob. and Nonlin.Control, 2001][Cho, Cassandras, Intl. J. Rob. and Nonlin.Control, 2001]

Christos G. Cassandras CODES Lab. - Boston University

Page 24: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

THE FORWARD ALGORITHM

Suppose we knew the BUSY PERIOD STRUCTURE of the optimal state trajectory…

k i n

nik

k+1

… …

… …

What can we say about this single BUSY PERIOD defined by jobs (k, n) ?

Christos G. Cassandras CODES Lab. - Boston University

Page 25: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

THE FORWARD ALGORITHM CONTINUED

k i n

nik

k+1

… …

… …

nkiuax

nkiaxi

kjjki

ii

,..., , .2

1,..., , .1 1

=+=

−=≥

∑=

+FACTS:

)]()([

)]()([),...,(,

∑∑

==

=

++=

+=

i

kjjkii

n

kii

iii

n

kiinknk

uuu

xuuuJ

ψθ

ψθThe optimal controls uk,…,un minimize:

Christos G. Cassandras CODES Lab. - Boston University

Page 26: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

THE FORWARD ALGORITHM CONTINUED

The optimal controls uk,…,un are the solution of the nonlinearoptimization problem:

k,...,n i, u

;k,...,n, iau u

uuJ

i

i

i

kjjk

nknkuu nk

=≥

−=≥+ +=∑

0

1

s.t. ),...,(min

1

,,...,

Qk,n

Christos G. Cassandras CODES Lab. - Boston University

Page 27: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

THE FORWARD ALGORITHM CONTINUED

OBVIOUS ALGORITHM:

• Scan over all Busy Period (BP) structures• For each structure, solve the nonlinear program Qk,n

• Check for consistency

QUESTION: How many BP structures are there?

ANSWER: 2N-1 TOO MANY!

Christos G. Cassandras CODES Lab. - Boston University

Page 28: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

THE FORWARD ALGORITHM CONTINUED

An important structural property:

THEOREM: Let k,…,i be contiguous jobs in a BP of the optimal trajectory with completion times xj, j = k,…,i. Then, the BP ends with job i if and only if xi < ai+1

FORWARD ALGORITHM:• Knowing that job k starts a BP, solve Qk,i

• … until a new BP is detected: xi < ai+1

Christos G. Cassandras CODES Lab. - Boston University

Page 29: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

THE FORWARD ALGORITHM CONTINUED

k i

i

i+1

CASE 1

k i

i

CASE 2

i+1

Christos G. Cassandras CODES Lab. - Boston University

Page 30: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

THE FORWARD ALGORITHM - PERFORMANCE

All BPs contain 1 job

All jobs in one BP

Christos G. Cassandras CODES Lab. - Boston University

Page 31: OPTIMAL CONTROL OF HYBRID SYSTEMSbdeschutter/disc_hs_summer_school_2… · Optimal Control Problem Formulation Hierarchical Decomposition Problems with a single event process Problems

http://vita.bu.edu/cgc/hybrid

Christos G. Cassandras CODES Lab. - Boston University