MODEL REDUCTION BY A CROSS-GRAMIAN APPROACH FOR DATA-SPARSE SYSTEMS Ulrike Baur joint work with Peter Benner Mathematics in Industry and Technology Faculty of Mathematics Chemnitz University of Technology baur@mathematik.tu-chemnitz.de Computational Methods with Applications Harrachov, 19 25 August 2007 1/19 Ulrike Baur Cross-Gramian model reduction
Outline Balancing-related model reduction by a data-sparse cross-gramian approach Large-scale systems Model reduction - cross-gramian approach The sign function method H-matrix implementation Numerical results 2/19 Ulrike Baur Cross-Gramian model reduction
Large-scale dynamical systems d dt x(t) = Ax(t) + Bu(t), x(0) = x 0, y(t) = Cx(t), where x(t) R n,u(t) R m,y(t) R p. Assumptions on (A,B,C,D) R n n R n m R p n R p p : A asymptotically stable, i.e. λ(a) C large-scale, e.g. n = O(10 5 ), and n m,p controllable and observable We consider large-scale systems arising from control problems for instationary PDEs semi-discretized by FEM, FDM or BEM. 3/19 Ulrike Baur Cross-Gramian model reduction
Model reduction - main issues Find a reduced-order model of order r n d dt ˆx(t) = ˆx(t) + ˆBu(t), ˆx(0) = ˆx 0 ŷ(t) = Ĉˆx(t) + Du(t), t 0 (Â, ˆB,Ĉ,D) Rr r R r m R p r R p p  is asymptotically stable small error G Ĝ, y ŷ 2 G Ĝ u 2, where G(s) = C(sI n A) 1 B + D, Ĝ(s) = Ĉ(sI r Â) 1 ˆB + D. 4/19 Ulrike Baur Cross-Gramian model reduction
Model reduction - balanced truncation [Moore 81] Balanced truncation computes reduced order system  = W T AV, ˆB = W T B, Ĉ = CV where V, W R n r are computed from T which diagonalizes controllability Gramian P and observability Gramian Q: T PT T = T T QT 1 = diag(σ 1,,σ n ), σ 1 σ 2 σ n V, W can be computed by wk T(PQ)v k = σk 2, k = 1,...,r 1 λ(â) C 2 y ŷ 2 G Ĝ u 2 2 n k=r+1 σ k u 2 5/19 Ulrike Baur Cross-Gramian model reduction
System Gramians Controllability Gramian P and observability Gramian Q defined by P = e At BB T e AT t dt, Q = e AT t CC T e At dt. 0 0 Gramians equivalently given by solutions of Lyapunov equations AP + PA T + BB T = 0, A T Q + QA + C T C = 0 Thus, main computational task in balanced truncation: Compute solutions of large-scale matrix equations! 6/19 Ulrike Baur Cross-Gramian model reduction
Model reduction - cross-gramian approach Define the cross-gramian X for square systems (m = p) by AX + XA + BC = 0 and project the system onto the dominant invariant subspace of X corresponding to r largest eigenvalues. 7/19 Ulrike Baur Cross-Gramian model reduction
Model reduction - cross-gramian approach Define the cross-gramian X for square systems (m = p) by AX + XA + BC = 0 and project the system onto the dominant invariant subspace of X corresponding to r largest eigenvalues. If then system is SISO (p = m = 1) [Fernando/Nicholson 83] or symmetric MIMO [Laub/Silverman/Verma 83, Fernando/Nicholson 84]. X 2 = PQ and σ k = λ k (X). 7/19 Ulrike Baur Cross-Gramian model reduction
Model reduction - cross-gramian approach Define the cross-gramian X for square systems (m = p) by AX + XA + BC = 0 and project the system onto the dominant invariant subspace of X corresponding to r largest eigenvalues. If then system is SISO (p = m = 1) [Fernando/Nicholson 83] or symmetric MIMO [Laub/Silverman/Verma 83, Fernando/Nicholson 84]. X 2 = PQ and σ k = λ k (X). Model order reduction with cross-gramian: Aldhaheri 91, Antoulas/Sorensen 00 7/19 Ulrike Baur Cross-Gramian model reduction
Low rank solution of Sylvester equation Sylvester equation AX + XA + BC = 0 In many situations: rank(x,τ) = n τ n, e.g. n τ = O(log(1/τ)log(n)) [Grasedyck 04]. Compute low-rank factors of X: X YZ, Y R n nτ, Z R nτ n. 10 5 singular values machine precision 10 0 low-rank ADI [Benner 05] analogous to [Penzl 00, Li/White 02] implicitly restarted method [Antoulas/Sorensen 00] multigrid method [Grasedyck/Hackbusch 04] sign function method [Benner 04, B. 05] σ j 10 5 10 10 10 15 10 20 0 20 40 60 80 100 120 140 160 180 200 220 index j 8/19 Ulrike Baur Cross-Gramian model reduction
Sign function method in factored form Newton iteration for the solution X YZ of AX + XA + BC = 0: (1) A 0 = A A k+1 = 1 2 (A k + A 1 k ) I n (2) B 0 = B B k+1 = 1 [ Bk 2, A 1 k B ] k 2Y [ ] (3) C 0 = C C k+1 = 1 C k 2 C k A 1 2Z k Complexity: (1): O(n 3 ) hierarchical matrices Storage: (1) : A k R n n hierarchical matrices (2) + (3) : B k R n 2kp, C k R 2k m n row compression 9/19 Ulrike Baur Cross-Gramian model reduction
Sign function method - row compression In each Newton step compute: [ ] [ ] C R11 1 Compute RRQR k R 12 C k A 1 = U k 0 R 22 R 11 R s s, s = rank(c k+1,τ) 2 Compute RRLQ [ [ B k, A 1 k B ] L11 0 k U = πb L 21 L 22 L 11 R t t, t = rank(b k+1,τ) 3 Partition V : V 11 R t s 4 If (t < s) B j+1 1 2 π B [ L11 L 21 else B j+1 1 2 π B [ L11 L 21 π C ], C j+1 1 2 V 11 [R 11 R 12 ]π C ] V 11, C j+1 1 2 [R 11 R 12 ]π C 1 2 B k Y R n nτ 2 1 nτ C k Z R n 10/19 Ulrike Baur Cross-Gramian model reduction ] V
H-matrices [Hackbusch 98] H-matrices provide data-sparse representation for certain densely populated matrices (FEM 1, BEM,...). hierarchy of blocks, approximation by matrices of rank k(ǫ) approximation error: A A H 2 A 2 ǫ storage for A H R n n : O(n log 2 (n)k(ǫ)) formatted arithmetic with complexity: Ax : O(n log 2 (n)k(ǫ)) : O(n log 2 2 (n)k(ǫ)), Inv H : O(n log 2 2(n)k(ǫ) 2 ) 256 16 16 256 16 4 11 17 11 16 6 11 12 11 14 14 11 2 14 14 16 11 3 17 256 17 17 256 5 4 5 4 12 17 6 14 16 4 11 17 18 11 2 14 14 9 12 9 9 12 11 15 12 20 9 14 9 9 11 6 16 11 5 4 3 3 256 16 16 256 17 4 11 17 3 3 5 3 5 12 2 14 14 12 14 11 14 11 7 17 12 17 11 3 17 256 17 17 256 3 3 4 3 2 2 4 3 17 4 11 17 18 14 2 14 14 11 14 2 12 18 16 11 3 17 3 5 3 3 4 3 3 3 3 256 17 17 256 16 4 11 17 12 17 9 12 12 11 15 14 11 14 2 12 3 3 2 3 16 11 3 17 256 17 17 256 5 4 6 4 12 17 6 14 9 9 12 9 20 12 14 11 12 9 9 14 9 11 14 2 12 19 17 11 3 17 11 6 17 11 5 4 3 3 256 17 17 256 17 4 11 17 Blockwise SVD of A H, n = 4096, ǫ = 10 4. 12 14 2 12 12 14 11 14 11 7 17 12 17 11 3 17 256 17 17 256 11/19 Ulrike Baur Cross-Gramian model reduction
Data-sparse sign function method Newton iteration for the solution X YZ of AX + XA + BC = 0: (1) A 0 = A H A k+1 = 1 2 (A k Inv H (A k )) I n (2) B 0 = B B k+1 = 1 2 [B k, Inv H (A k )B k ] 2Y [ ] (3) C 0 = C C k+1 = 1 C k 2 2Z C k Inv H (A k ) Complexity: (1): O(n log 2 2 (n)k(ǫ)2 ) hierarchical matrices Storage: (1) : A k : O(n log 2 (n)k(ǫ)) hierarchical matrices (2) + (3) : B k R n nτ, C k R nτ n row compression 12/19 Ulrike Baur Cross-Gramian model reduction
Model order reduction with cross-gramian Compute basis of dominant invariant subspace of X YZ W T XV = T with λ(t) = {σ 1,,σ r } 1 Compute basis Ṽ of right invariant subspace of ZY Y Z Z Y QR fact. product QR basis of right dominant invariant subspace of YZ: V = Y Ṽ(:,1 : r) 13/19 Ulrike Baur Cross-Gramian model reduction
Model order reduction with cross-gramian Compute basis of dominant invariant subspace of X YZ W T XV = T with λ(t) = {σ 1,,σ r } 1 Compute basis Ṽ of right invariant subspace of ZY basis of right dominant invariant subspace of YZ: V = Y Ṽ(:,1 : r) 2 Compute basis W of left invariant subspace of ZY basis of left dominant invariant subspace of YZ: W T = W T (1 : r,:)z 3 Orthogonalize W and V : W T V = I r 13/19 Ulrike Baur Cross-Gramian model reduction
Model order reduction with cross-gramian Compute basis of dominant invariant subspace of X YZ W T XV = T with λ(t) = {σ 1,,σ r } 1 Compute basis Ṽ of right invariant subspace of ZY basis of right dominant invariant subspace of YZ: V = Y Ṽ(:,1 : r) 2 Compute basis W of left invariant subspace of ZY basis of left dominant invariant subspace of YZ: W T = W T (1 : r,:)z 3 Orthogonalize W and V : W T V = I r Reduced system of order r: Â = W T AV, ˆB = W T B, Ĉ = CV 13/19 Ulrike Baur Cross-Gramian model reduction
H-matrix - accuracy of reduced model Recall: balanced truncation error bound y ŷ 2 G Ĝ u 2 with G Ĝ 2 n k=r+1 σ k tol 14/19 Ulrike Baur Cross-Gramian model reduction
H-matrix - accuracy of reduced model Recall: balanced truncation error bound y ŷ 2 G Ĝ u 2 with G Ĝ 2 n k=r+1 σ k tol Theorem [B./Benner 06] For symmetric A, A H with eigenvalues λ n λ 1 < 0 and A A H 2 cǫ we have G Ĝ G G H + G H Ĝ c ǫ 1 λ 2 1 C 2 B 2 + 2 n k=r+1 σ k. 14/19 Ulrike Baur Cross-Gramian model reduction
Numerical results - 2d heat equation x t (t,ξ) a x(t,ξ) = b(ξ)u(t), ξ [0,1]2, t (0, ) y(t) = x(t,ξ) Ωo n = 16,384 diffusion: a = 1 HLib 1.3 [Börm/Grasedyck/Hackbusch] τ = ǫ = 10 4 rel. residual of X: 2.5 10 8 G(j ω) G r (j ω) 10 5 10 10 10 15 BT : r = 4 CG : r = 4 BT : δ CG : δ tol tol=10 4 r = 4 10 2 10 0 10 2 10 4 10 6 Frequency ω 15/19 Ulrike Baur Cross-Gramian model reduction
Numerical results - 2d heat equation x t (t,ξ) a(ξ) x(t,ξ) = b(ξ)u(t), ξ [0,1]2, t (0, ) varying diffusion a(ξ): 1 y 0 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 n = 16,384 τ = ǫ = 10 4 x 1 00 11 00 11 00 11 00 11 00 11 00 11 00 11 tol= 10 4 r = 3 a(ξ) = 1.0 a(ξ) = 10 4 a(ξ) = 10 G(j ω) G r (j ω) 10 5 10 10 10 15 BT : r = 3 CG : r = 3 BT : δ CG : δ tol 10 2 10 0 10 2 10 4 10 6 Frequency ω 16/19 Ulrike Baur Cross-Gramian model reduction
Numerical results - convection-diffusion equation x t (t,ξ) a x(t,ξ) c x(t,ξ) = b(ξ)u(t), ξ [0,1]2, t (0, ) n = 16,384 convection: c = (0,1) T diffusion: a = 10 4 τ = ǫ = 10 6 tol= 10 4 r = 9 10 5 10 10 10 15 BT : r = 9 CG : r = 9 BT : δ CG : δ tol 10 6 10 4 10 2 10 0 10 2 10 4 10 6 17/19 Ulrike Baur Cross-Gramian model reduction
Numerical results - MIMO example optimal cooling of steel profiles [Benner/Saak 05] nonsymmetric MIMO system with n = 5177 m = p = 6 τ = ǫ = 10 4, tol= 10 4 From in(1) to out(1) From in(2) to out(1) 10 5 10 5 G(j ω) G r (j ω) 10 10 10 15 BT : r = 18 CG : r = 14 BT : δ CG : δ tol G(j ω) G r (j ω) 10 10 10 15 BT : r = 18 CG : r = 14 BT : δ CG : δ tol 10 6 10 4 10 2 10 0 10 2 10 4 10 6 Frequency ω 10 6 10 4 10 2 10 0 10 2 10 4 10 6 Frequency ω 18/19 Ulrike Baur Cross-Gramian model reduction
Conclusions With H-matrix arithmetic we can solve large-scale Sylvester equations n # iter. n τ time[sec] rel. residual rel. error H full H full H full 1024 11 12 12 16 40 1.26e-07 1.62e-09 2.43e-05 4096 12 14 14 196 2434 5.79e-08 2.48e-10 3.81e-05 16,384 13 15-1776 - 2.55e-08 - - 65,536 14 16-13,176-1.46e-08 - - 262,144 15 17-116,225 - - - - H-matrix based sign function solver well suited for the solution of large-scale Sylvester equations arising from FEM/BEM discretizations of elliptic partial differential operators. With H-matrix based Sylvester solver we obtain efficient new implementation of model reduction method based on cross-gramian. 19/19 Ulrike Baur Cross-Gramian model reduction
Conclusions With H-matrix arithmetic we can solve large-scale Sylvester equations n # iter. n τ time[sec] rel. residual rel. error H full H full H full 1024 11 12 12 16 40 1.26e-07 1.62e-09 2.43e-05 4096 12 14 14 196 2434 5.79e-08 2.48e-10 3.81e-05 16,384 13 15-1776 - 2.55e-08 - - 65,536 14 16-13,176-1.46e-08 - - 262,144 15 17-116,225 - - - - H-matrix based sign function solver well suited for the solution of large-scale Sylvester equations arising from FEM/BEM discretizations of elliptic partial differential operators. With H-matrix based Sylvester solver we obtain efficient new implementation of model reduction method based on cross-gramian. Thank you for your attention! 19/19 Ulrike Baur Cross-Gramian model reduction