35
Automatic Control Laboratory, ETH Zürich Optimal Control of Hybrid Systems Mato Baotic, Francesco Borrelli, Alberto Bemporad, Manfred Morari www.control.ethz.ch

Optimal Control of Hybrid SystemsOptimal Control of Hybrid Systems (10.12.2003) – 10/34 • Fix a switching sequence of length N to obtain constrained linear time variant system

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Automatic Control Laboratory, ETH Zürich

Optimal Control of Hybrid Systems

Mato Baotic, Francesco Borrelli,

Alberto Bemporad, Manfred Morari

www.control.ethz.ch

(10.12.2003) – 2/34Optimal Control of Hybrid Systems

Overview

• Constrained Finite Time Optimal Control (CFTOC)

• Piecewise Affine (PWA) Systems

• Multiparametric Mixed Integer Programming

• Algorithm for CFTOC of PWA Systems

• Applications

(10.12.2003) – 3/34Optimal Control of Hybrid Systems

Receding Horizon Policy:

Constrained Finite TimeOptimal Control of Linear Systems

Algebraicmanipulation

Quadratic Program (QP)

• PerformanceIndex

• Constraints

(10.12.2003) – 4/34Optimal Control of Hybrid Systems

Receding Horizon Policy u = f(x)• Solve QP for each x

• Solve QP for all xvia multiparametric Quadratic Program (mp-QP)

(Bemporad, Morari, Dua, Pistikopoulos, Automatica 2002)

Piecewise affine state-feedback law

(10.12.2003) – 5/34Optimal Control of Hybrid Systems

• Solution U*(x) is continuous, piecewise affine- the feasible space X* is polyhedron- X* is partitioned into polyhedral critical regions- in each critical region U* is an affine function of x

• Value function J*(x) is convex, piecewise quadratic

Optimal Control of Linear Systems: Properties

(10.12.2003) – 6/34Optimal Control of Hybrid Systems

• polyhedral partition of state+input space X

• state and input constraints are included in X

Piecewise Affine (PWA) Systems

PWA systems are equivalent to other hybrid system classes

if

(Heemels, De Schutter, Bemporad, Automatica 2001)

(10.12.2003) – 7/34Optimal Control of Hybrid Systems

• PerformanceIndex

• Constraints

MultiparametricOptimization

Problem

Find feedback control law U=U(x)

Optimal Control of PWA Systems

(10.12.2003) – 8/34Optimal Control of Hybrid Systems

The solution of the mathematical program

• multiparametric LP (mp-LP) if

• multiparametric QP (mp-QP) if

• mp-Mixed Integer LP (mp-MILP) if

• mp-Mixed Integer QP (mp-MIQP) if

can be computed with

Multiparametric Programming

(10.12.2003) – 9/34Optimal Control of Hybrid Systems

The solution to the optimal control problem is a time varying PWA state feedback control law of the form

partition of the set of feasible states x(k).

(Sontag 1981, Mayne 2001, Borrelli 2002)

Optimal Control of PWA Systems: Properties

(10.12.2003) – 10/34Optimal Control of Hybrid Systems

• Fix a switching sequence of length N to obtainconstrained linear time variant system

• Solve finite time optimal control to obtainstate-space polyhedral partition and correspondingPWA input and PWQ value function

v={1,3,4,4}

Obtain optimal control law by comparing value functions on polyhedron of "multiple feasibility"

Characterization of the Solution

if

(10.12.2003) – 11/34Optimal Control of Hybrid Systems

v1={1,2,3,4}

v2={1,2,3,3}

Polyhedron of "multiple feasibility"

(10.12.2003) – 12/34Optimal Control of Hybrid Systems

Polyhedron of multiple feasibility:switch v1 and v2 both admissible

Polyhedron of "multiple feasibility"

v1={1,2,3,4}

v2={1,2,3,3}

(10.12.2003) – 13/34Optimal Control of Hybrid Systems

v1={1,2,3,4}

v2={1,2,3,3}

Polyhedron of "multiple feasibility"

(10.12.2003) – 14/34Optimal Control of Hybrid Systems

Polyhedron of "multiple feasibility"

v1={1,2,3,4}

v2={1,2,3,3}

(10.12.2003) – 15/34Optimal Control of Hybrid Systems

The proofs are constructive but based on the enumeration of all possible switching sequences of the hybrid system.

More efficient methods than enumeration are necessary

Computing Optimal Control Law

(10.12.2003) – 16/34Optimal Control of Hybrid Systems

Optimal Control of PWA Systems:Efficient Algorithm

Algorithm based on– Dynamic programming recursion– Multiparametric quadratic program solver (mp-QP)

– Basic polyhedral manipulation (intersection and union)

– Comparison of value functions over polyhedra

– Post processing

Result– Exact, globally optimal PWA feedback control law in a

form of a look-up table

(10.12.2003) – 17/34Optimal Control of Hybrid Systems

Dynamic Programming

where

and

Problem

(10.12.2003) – 18/34Optimal Control of Hybrid Systems

Dynamic Programming

for j=N-1,...,0, with boundary conditions

where Xj is the set of initial states for which problem is feasible

Equivalent problem

Cost to go

(10.12.2003) – 19/34Optimal Control of Hybrid Systems

Example

(10.12.2003) – 20/34Optimal Control of Hybrid Systems

Xf=X3

X2

X1 X0

PWA 1

Dynamic Programming - Illustration

(10.12.2003) – 21/34Optimal Control of Hybrid Systems

Post processing

After every step of the Dynamic Program number of regions to be kept for the following step is minimized by the:

• Removal of unnecessary regions (Intersect and Compare)

• Storage of regions in an ordered fashion

(10.12.2003) – 22/34Optimal Control of Hybrid Systems

Intersection of regions

P1

P2 P2,3 P3

v1={1,2,3,4}

v2={1,2,3,3}

(10.12.2003) – 23/34Optimal Control of Hybrid Systems

P1

P2P2,3

P3

Solution (in the ordered region sense):

* * *2 2,3 2 3* * *3 2,3 3 2

* *1 1*2 2*3 3

( ) if and ( ) ( )( ) if and ( ) ( )

( )= ( ) if ( ) if ( ) if

u x x P J x J xu x x P J x J x

u x u x x Pu x x Pu x x P

∈ ≤ ∈ ≤ ∈ ∈ ∈

Intersection of regions

{P2,3, P1, P2, P3}

(10.12.2003) – 24/34Optimal Control of Hybrid Systems

-2 -1.5 -1 -0.5 0 0.5 1 1.5 20

0.5

1

1.5

2

2.5

J1

J2J3

Union of regions• Intermediate stage simplification

31 1,3( ), for( ) J x xx PJ ≤ ∈

32 2,3( ), for( ) J x xx PJ ≤ ∈

1,3 2,3 3P P P∪ =

No need for P3

P1

P2,3P1,3

P2

x

J*(x)

(10.12.2003) – 25/34Optimal Control of Hybrid Systems

* * * *0 1 1( ) { , , , }NU x u u u −= K

Union of regions• Simplifying final solution

-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5-2.5

-2

-1.5

-1

-0.5

0

0.5

1

1.5

2

2.5CR1CR2CR3CR4CR5CR6CR7CR8CR9

-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5-2.5

-2

-1.5

-1

-0.5

0

0.5

1

1.5

2

2.5CR1CR2CR3CR4CR5CR6CR7

Regions where the first component of the solution is the samecan be joined (when their union is convex). (Bemporad, Fukuda, Torrisi,

Computational Geometry, 2001)

*0 ( )u u f x= =

(10.12.2003) – 26/34Optimal Control of Hybrid Systems

Application 1:Electronic Throttle

Main challenges• Friction (gearbox)• Limp-Home nonlinearity (return spring)• Constraints• Quantization (dual potentiometer + A/D)

(Baotic, Vasak, Morari, Peric, ACC 2003)

(10.12.2003) – 27/34Optimal Control of Hybrid Systems

Application 1:PWA Model of the Throttle

• State vector

• Friction: 5 affine parts

• Limp-Home: 3 affine parts

• Zero Order Hold

15 (discrete time) PWA dynamics

*[ , ]Tmx ω θ=

x (t + 1) = Aix (t) + Biu (t) + f i

y (t) = Cix (t) + gii = 1 , . . ., 15

if Hix (t) + Liu (t) ô Ki

(10.12.2003) – 28/34Optimal Control of Hybrid Systems

2, 1.5, 1.5P Q R= = =

( ) [ 3, 3], ( ) [ 300, 300]( ) [11, 90], ( ) [ 5, 5]

( ) [ 5, 5], ( ) [11, 90]

a mi k kk u k

u k r k

ωθ

∈ − ∈ −∈ ∈ −

∆ ∈ − ∈

minU ||P(y(N)à r(N))||22 +Pk=0

Nà1||Q(y(k)à r(k))||22 + ||R(∆u(k))||22Cost:

Constraints:

Weights:

System:5 , 5, ( ) ( ), ( ) ( ) ( 1)

extended state vector ( ) [ ( ), ( ), ( 1), ( )]s

Tm

T ms N y k k u k u k u k

x k k k u k r k

θω θ

= = = ∆ = − −

= −

Application 1: Throttle Results

(10.12.2003) – 29/34Optimal Control of Hybrid Systems

Application 1: Throttle Results

(10.12.2003) – 30/34Optimal Control of Hybrid Systems

Application 2:Adaptive Cruise Control

Radar

Cameras

Test VehicleTraffic Scene

Virtual TrafficScene

Sensors IR-Scanner

AutonomousDriving

(Möbus, Baotic, Morari, HSCC’03)

(10.12.2003) – 31/34Optimal Control of Hybrid Systems

Application 2:Adaptive Cruise Control

Objectives• track reference speed• respect minimum distance• do not overtake on the right side of a neighboring car• consider all objects on all lanes• consider cost over future horizon

(10.12.2003) – 32/34Optimal Control of Hybrid Systems

Application 2:Adaptive Cruise Control

• constrained acceleration/deceleration• constrained changes in acceleration/deceleration• x(k + 1) = Aix(k) + Biu(k) if Hix(k) + Liu(k) ·Ki i = 1, 2, 3

Optimal solution for #obj = 1 : ca. 500 polyhedra in R7

Problem1: Track reference speed, respect minimum distance

Problem2: Track reference speed, respect minimum distance, consider lane-changers

Optimal solution for #obj = 1 : ca. 2500 polyhedra in R9

(10.12.2003) – 33/34Optimal Control of Hybrid Systems

Conclusions

• Finite-time constrained optimal control problems based on quadratic performance index for discrete time PWA systems

• Efficient Algorithm– Dynamic Programming recursion– Intersection and Comparison of regions– Ordering of regions

• Receding Horizon control can be implemented by using a simple look-up table

(10.12.2003) – 34/34Optimal Control of Hybrid Systems

Outlook• Extension to linear performance index

where p=1 or p=∞. Key features:- Dynamic Programming + mp-LP solver- Polyhedral partition at each step (ordering is not needed,...)

• Infinite Time Optimal Control of PWA systems

(Baotic, Christophersen, Morari, ECC 2003)

(Baotic, Christophersen, Morari, CDC 2003)

(10.12.2003) – 35/34Optimal Control of Hybrid Systems

THE END