yet another talk about empirical gramians

39
Yet Another Talk About Empirical Gramians Christian Himpe ([email protected]) Mario Ohlberger ([email protected]) WWU Münster Institute for Computational and Applied Mathematics Reduced Basis Summer School 2014

Upload: gramian

Post on 19-Jun-2015

82 views

Category:

Science


3 download

DESCRIPTION

held at RB Summer School 2014

TRANSCRIPT

Page 1: Yet Another Talk About Empirical Gramians

Yet Another Talk About Empirical Gramians

Christian Himpe ([email protected])Mario Ohlberger ([email protected])

WWU MünsterInstitute for Computational and Applied Mathematics

Reduced Basis Summer School 2014

Page 2: Yet Another Talk About Empirical Gramians

Outline

(Mathematical) ModelGramian-Based Model ReductionEmpirical GramiansState ReductionParameter ReductionCombined Reduction

Page 3: Yet Another Talk About Empirical Gramians

Linear Control System

x(t) = Ax(t) + Bu(t)y(t) = Cx(t)x(0) = x0

Input / Control: u ∈ RM

State: x ∈ RN

Output: y ∈ RO

System Matrix: A ∈ RN×N

Input Matrix: B ∈ RN×M

Output Matrix: C ∈ RO×N

Page 4: Yet Another Talk About Empirical Gramians

Adjoint System

x∗(t) = AT x∗(t) + CTu∗(t)

y∗(t) = BT x∗(t)x∗(0) = x∗0

Input / Control: u∗ ∈ RM

State: x∗ ∈ RN

Output: y∗ ∈ RO

System Matrix: AT ∈ RN×N

Input Matrix: BT ∈ RM×N

Output Matrix: CT ∈ RN×O

Page 5: Yet Another Talk About Empirical Gramians

Model Reduction

Large-Scale Control System:

x = Ax + Buy = Cx

x(0) = x0

Have:dim(x)� 1dim(u)� dim(x)dim(y)� dim(x)

Reduced Order System:

˙x = Ax + Bu

y = C xx(0) = x0

Want:dim(x)� dim(x)‖y − y‖? � 1

Page 6: Yet Another Talk About Empirical Gramians

Controllability & Observability

Controllability:Quantifies how well a state is

driven by the input.

Controllability Operator:

C(u) :=∫ ∞

0eAtBu(t)dt

Observability:Quantifies how well a change instate is visible in the output.

Observability Operator:

O(x0) := CeAtx0

Page 7: Yet Another Talk About Empirical Gramians

Controllability Gramian & Observability Gramian

Controllability Gramian:

WC := CCT

=

∫ ∞0

eAtBBT eAT tdt

⇒ AWC + WCAT = −BBT

Observability Gramian:

WO := OTO

=

∫ ∞0

eAT tCTCeAtdt

⇒WOAT + AWO = −CTC

Controllability and observability are dual operators.The adjoints system controllability is the systems observability.

Page 8: Yet Another Talk About Empirical Gramians

Balanced Truncation [Moore’81]

Balance Controllability and Observability:

WOCholesky

= LOLTO

WCCholesky

= LCLTC

LCLTO

SVD= UDV T

Partition and Truncate:

σ1 > . . . > σN

→ U =

(U1U2

), V =

(V1V2

)T

Reduced Order Model:

A = V1AU1

B = V1B

C = CU1

x0 = V1x0

Page 9: Yet Another Talk About Empirical Gramians

Cross Gramian [Fernando & Nicholson’83]

Cross Gramian:

WX := CO

=

∫ ∞0

eAtBCeAtdt

⇒ AWX + WXA = −BC

System must be square: dim(u) = dim(y)If system is symmetric: CeAB = (CeAB)T ⇒W 2

X = WCWO

Page 10: Yet Another Talk About Empirical Gramians

Direct Truncation

Balance Controllability and Observability:

WXSVD= UDV T

Partition and Truncate:

σ1 > . . . > σN

→ U =

(U1U2

)Reduced Order Model:

A = UT1 AU1

B = UT1 B

C = CU1

x0 = UT1 x0

Page 11: Yet Another Talk About Empirical Gramians

Notes on the Cross Gramian

Advantages:Compute only 1 instead of 2 gramian matricesSignificantly less expensive balancingConveys additional information (System Gain, Cauchy Index)

Disadvantages:Only sqare systemsActually, only symmetric systemsWithout extra effort only one-sided projections

Page 12: Yet Another Talk About Empirical Gramians

Empirical Gramians [Lall’99]

System Gramians:

WC =

∫ ∞0

eAtB BT eAT tdt

WO =

∫ ∞0

eAT tCT CeAtdt

WX =

∫ ∞0

eAtB CeAtdt

Note:Integrands are just Impulse Responses!Can be computed empirically.Equal to classic gramians for linear systems.Extend to nonlinear systems.

Page 13: Yet Another Talk About Empirical Gramians

Empirical Gramians [Lall’99]

System Gramians:

WC =

∫ ∞0

(eAtB) (eAtB)Tdt

WO =

∫ ∞0

(eAT tCT ) (eAT tCT )Tdt

WX =

∫ ∞0

(eAtB) (eAT tCT )Tdt

Note:Integrands are just Impulse Responses!Can be computed empirically.Equal to classic gramians for linear systems.Extend to nonlinear systems.

Page 14: Yet Another Talk About Empirical Gramians

Empirical Gramians [Lall’99]

Empirical Gramians:

WC =

∫ ∞0

x(t)x(t)Tdt

WO =

∫ ∞0

x∗(t)x∗(t)Tdt

WX =

∫ ∞0

x(t)x∗(t)Tdt

Note:Integrands are just Impulse Responses!Can be computed empirically.Equal to classic gramians for linear systems.Extend to nonlinear systems.

Page 15: Yet Another Talk About Empirical Gramians

Averaged Gramians

Empirical Gramians:

WC =1J

J∑j

∫ ∞0

x(j)(t)x(j)(t)Tdt

WO =1J

J∑j

∫ ∞0

x∗(j)(t)x∗(j)(t)

Tdt

WX =1J

J∑j

∫ ∞0

x(j)(t)x∗(j)(t)

Tdt

Note:Controllability: varying impulse inputsObservability: varying initial statesEnsure ROM fits to operating region of systemEspecially for nonlinear systems

Page 16: Yet Another Talk About Empirical Gramians

Perturbation Sets

Impulse Input Perturbations: uhij(t) = chSiejδ(t)

Eu = {ei ∈ Rm; ‖ei‖ = 1; eiej 6=i = 0; i = 1, . . . ,m},Ru = {Si ∈ Rm×m; ST

i Si = 1; i = 1, . . . , s},Qu = {ci ∈ R; ci > 0; i = 1, . . . , q},

Initial State Perturbation: xkla0 = dkTl fa

Ex = {fi ∈ Rn; ‖fi‖ = 1; fi fj 6=i = 0; i = 1, . . . , n},Rx = {Ti ∈ Rn×n;TT

i Ti = 1; i = 1, . . . , t},Qx = {di ∈ R; di > 0; i = 1, . . . , r}.

Page 17: Yet Another Talk About Empirical Gramians

Empirical Controllability Gramian

Analytic Controllability Gramian

WC =

∫ ∞0

eAtBBT eAT tdt

Linear Empirical Controllability Gramian

W ′C =

∫ ∞0

x(t) xT (t)dt

Empirical Controllability Gramian

W ′′C =

1|Qu||Ru|

|Qu |∑h=1

|Ru |∑i=1

m∑j=1

1c2h

∫ ∞0

Ψhij (t)dt,

Ψhij (t) = (xhij (t)− x)(xhij (t)− x)T ∈ Rn×n

Discrete Empirical Controllability Gramian

W ′′′C =

1|Qu||Ru|

|Qu |∑h=1

|Ru |∑i=1

m∑j=1

∆tc2h

T∑t=0

Ψhijt ,

Ψhijt = (xhij

t − x)(xhijt − x)T ∈ Rn×n

Page 18: Yet Another Talk About Empirical Gramians

Test System

x(t) = Ax(t) + Bu(t)y(t) = Cx(t)x(0) = 0u(t) = δ(t)

A random but stable (Re(λi (A)) < 0, ∀i)B , C random

Page 19: Yet Another Talk About Empirical Gramians

POD vs WC

10 20 30 40 50 60 70 80 90

10−15

10−10

10−5

100

State Dimension

Re

lative

L2 O

utp

ut

Err

or

PODW

C

0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08

WcPOD

Offline Time [s]

Page 20: Yet Another Talk About Empirical Gramians

Empirical Observability Gramian

Analytic Observability Gramian

WO =

∫ ∞0

eAT tCTCeAtdt

Linear Empirical Observability Gramian

W ′O =

∫ ∞0

x∗(t) x∗(t)Tdt

Empirical Observability Gramian

W ′′O =

1|Qx ||Rx |

|Qx |∑k=1

|Rx |∑l=1

1d2

k

∫ ∞0

TlΨkl (t)TT

l dt,

Ψklab = (ykla(t)− y)T (yklb(t)− y) ∈ R

Discrete Empirical Observability Gramian

W ′′′O =

1|Qx ||Rx |

|Qx |∑k=1

|Rx |∑l=1

∆td2

k

T∑t=0

TlΨtklTTl ,

Ψklt,ab = (ykla

t − y)T (yklbt − y) ∈ R

Page 21: Yet Another Talk About Empirical Gramians

BT vs linear BT

10 20 30 40 50 60 70 80 90

10−15

10−10

10−5

100

State Dimension

Re

lative

L2 O

utp

ut

Err

or

W

C + W

O

WC

+ WC

*

0 0.5 1 1.5 2 2.5 3 3.5 4

Wc + Wc*Wc + Wo

Offline Time [s]

Page 22: Yet Another Talk About Empirical Gramians

Empirical Cross Gramian [Streif’06, H.’14]

Analytic Cross Gramian

WX =

∫ ∞0

eAtBCeAtdt

Linear Empirical Cross Gramian

W ′X =

∫ T

0x(t)x∗(t)Tdt

Empirical Cross Gramian

W ′′X =

1|Qu||Ru|m|Qx ||Rx |

|Qu |∑h=1

|Ru |∑i=1

m∑j=1

|Qx |∑k=1

|Rx |∑l=1

1chdk

∫ ∞0

TlΨhijkl (t)TT

l dt,

Ψhijklab (t) = f T

b TTk (xhij (t)− x)eT

i STh (ykla(t)− y) ∈ R

Discrete Empirical Cross Gramian

W ′′′X =

1|Qu||Ru|m|Qx ||Rx |

|Qu |∑h=1

|Ru |∑i=1

m∑j=1

|Qx |∑k=1

|Rx |∑l=1

∆tchdk

T∑t=0

TlΨhijklt TT

l ,

Ψhijklt,ab = f T

b TTk (xhij

t − x)eTi ST

h (yklat − y) ∈ R

Page 23: Yet Another Talk About Empirical Gramians

Cross Gramian vs Linear Cross Gramian

10 20 30 40 50 60 70 80 90

10−15

10−10

10−5

100

State Dimension

Re

lative

L2 O

utp

ut

Err

or

W

X

WY

0 0.5 1 1.5 2 2.5 3 3.5

WyWx

Offline Time [s]

Page 24: Yet Another Talk About Empirical Gramians

General Control Systems

x(t) = f (x(t), u(t))y(t) = g(x(t), u(t))x(0) = x0

Input / Control: u ∈ RM

State: x ∈ RN

Output: y ∈ RO

Vector Field: f : RN ×RM ×R→ RN

Output Functional: g : RN ×RM → RO

Page 25: Yet Another Talk About Empirical Gramians

Nonlinear Balancing

Balanced Truncation:

WOCholesky

= LOLTO

WCCholesky

= LCLTC

LCLTO

SVD= UDV T

σ1 > . . . > σN

→ U =

(U1U2

), V =

(V1V2

)T

f = V1f (U1x , u, θ)g = g(U1x , u, θ)x0 = V1x0

Direct Truncation:

WXSVD= UDV T

σ1 > . . . > σN

→ U =

(U1U2

)

f = UT1 f (U1x , u, θ)

g = g(U1x , u, θ)

x0 = UT1 x0

Page 26: Yet Another Talk About Empirical Gramians

Parametrized Control Systems

x(t) = f (x(t), u(t), θ)y(t) = g(x(t), u(t), θ)x(0) = x0

Input / Control: u ∈ RM

State: x ∈ RN

Output: y ∈ RO

Vector Field: f : RN ×RM ×R→ RN

Output Functional: g : RN ×RM → RO

Parameter: θ ∈ RP

Page 27: Yet Another Talk About Empirical Gramians

Parametric Model Order Reduction (pMOR)

That’s the “easy” part!Just average the empirical gramians over a discretizedparameter space:

WC =1J

J∑j

WC (θj)

WO =1J

J∑j

WO(θj)

WX =1J

J∑j

WX (θj)

Page 28: Yet Another Talk About Empirical Gramians

Parameter Identification & Parameter Reduction

Parameter Identification:

WθSVD= UDV T

Partition and Truncate:

σ1 > . . . > σN

→ U =

(U1U2

)Parameter Reduction:

θ = UT1 θ

θ ≈ U1θ

Page 29: Yet Another Talk About Empirical Gramians

Controllability-Based [Sun’06, H.’13]

Parameter Decomposed System:

x = f (x , u) +P∑

k=1

f (x , θk)

⇒WC = WC ,0 +P∑

k=1

WC ,k

Sensitivity Gramian:

WS ,ii = tr(WC ,i )

Page 30: Yet Another Talk About Empirical Gramians

Observability-Based [Geffen’08]

Parameter Augmented System:(xθ

)=

(f (x , u, θ)

0

)(xθ

)y =

(g(x , u, θ) 0

)(xθ

)(

x(0)θ(0)

)=

(x0θ0

)Augmented Observability Gramian:

WO =

(WO WMW T

M WP

)Identifiability Gramian:(Schur Complement of Augmented Observability Gramian)

WI := WP −WMW−1O W T

M ≈WP

Page 31: Yet Another Talk About Empirical Gramians

Cross-Gramian-Based [H.’14]

Parameter Augmented System:(xθ

)=

(f (x , u, θ)

0

)(xθ

)y =

(g(x , u, θ) 0

)(xθ

)(

x(0)θ(0)

)=

(x0θ0

)Joint Gramian (Augmented Cross Gramian):

WJ =

(WX WM0 0

)Cross-Identifiability Gramian:(Schur Complement of Symmetric Part of Joint Gramian)

WI := −12WM(WX + W T

X )−1W TM

Page 32: Yet Another Talk About Empirical Gramians

Notes on the Joint Gramian

Advantages:One gramian to rule them all!Can be assembled HPC friendly column-wiseComputes faster than augmented observability gramianLess memory intensive than identifiability gramianIt is just a cross gramian

Disadvantages:Only sqare systemsActually, only symmetric systems

Page 33: Yet Another Talk About Empirical Gramians

Test System

x(t) = A(θ)x(t) + Bu(t)y(t) = Cx(t)x(0) = 0u(t) = δ(t)

same as before,but with parametrized diagonal of A.

Page 34: Yet Another Talk About Empirical Gramians

WS vs WI vs WJ

10 20 30 40 50 60 70 80 90 10010

−6

10−5

10−4

10−3

10−2

10−1

100

Parameter Dimension

Re

lative

L2 O

utp

ut

Err

or

W

S

WI

WII

0 1 2 3 4 5 6 7 8 9

WiiWi

Ws

Offline Time [s]

Page 35: Yet Another Talk About Empirical Gramians

Combined State and Parameter Reduction

WS + WO

1 Compute WS

2 SVD(WS)3 Truncate θ4 (Extract WC )5 Compute WO

6 Balance WC ,WO

7 Truncate x

WC + WI

1 Compute WI

2 SVD(WI )3 Truncate θ4 (Extract WO)5 Compute WC

6 Balance WC ,WO

7 Truncate x

WJ

1 Compute WI

2 SVD(WI )3 Truncate θ4 (Extract WX )

5 SVD(WX )6 Truncate x

Page 36: Yet Another Talk About Empirical Gramians

WS+WO vs WC+WI vs WJ

30

60

90

30

60

90

10−4

10−3

10−2

10−1

100

Parameter DimensionState Dimension

Rela

tive L

2 O

utp

ut E

rror

30

60

90

30

60

90

10−4

10−3

10−2

10−1

100

Parameter DimensionState Dimension

Rela

tive L

2 O

utp

ut E

rror

30

60

90

30

60

90

10−4

10−3

10−2

10−1

100

Parameter DimensionState Dimension

Rela

tive L

2 O

utp

ut E

rror

0 1 2 3 4 5 6 7 8 9

Wj

Wc+Wi

Ws+Wo

Offline Time [s]

Page 37: Yet Another Talk About Empirical Gramians

Notes on the SVD

SVD is expensive!Sparse SVD is better than full

Matlab implementation: eigs(

A 00 AT

)←Yuck!

Try Lanczos procedure!Make sure to orthogonalize the “singular vectors”For example by post-processing with a QR-decomposition

Page 38: Yet Another Talk About Empirical Gramians

Outlook

Better L2 approximation through “Balanced Gains”?Nonsymmetric Cross-Gramian

The problem reduces to compute a cheap symmetrizerNonsquare Cross-Gramian

The problem reduces to computing a cheap adapter matrixExtreme-Scale SVD

Slicing works best with Cross GramianLanczos for slices

Page 39: Yet Another Talk About Empirical Gramians

tl;dl

(Combined) State & Parameter Reductionfor Linear & Nonlinear Systemsusing Empirical Gramians

http://gramian.de

Thanks!

Get the Companion Code: http://j.mp/rbss14