Adaptive rational Krylov subspaces for large-scale dynamical systems V. Simoncini Dipartimento di Matematica, Università di Bologna valeria@dm.unibo.it joint work with Vladimir Druskin, Schlumberger Doll Research 1
Given the continuous-time system Model Order Reduction Σ = A B C, A C n n Analyse the construction of a reduced system ˆΣ = à B C with à of size m n 2
Projection methods and Linear Dynamical Systems Time-invariant linear system: x (t) = Ax(t)+Bu(t), x(0) = x 0 y(t) = Cx(t) Approximation of the matrix Transfer function Solvers for the Lyapunov matrix equation Emphasis: A large dimensions, W(A) C 3
Projection methods: the general idea Given space K R n of size m and (orthonormal) basis V m, A A m = V mav m, B B m = V mb, C C m = CV m Solve with A m,b m,c m Choices of K in the literature: Standard Krylov subspace: K m (A,B) = span{b,ab,...,a m 1 B} Shift-Invert Krylov subspace: K m ((A σi) 1,B) = span{b,(a σi) 1 B,...,(A σi) (m 1) B}; often σ = 0 Extended Krylov subspace: EK m (A,B) = K m (A,B)+K m (A 1,A 1 B) Rational Krylov subspace: K m (A,B,s) = span{(a s 1 ) 1 B,(A s 2 ) 1 B,...,(A s m ) 1 B}; usually s = [s 1,...,s m ] a-priori 4
Projection methods: the general idea Given space K R n of size m and (orthonormal) basis V m, A A m = V mav m, B B m = V mb, C C m = CV m Solve with A m,b m,c m Choices of K in the literature: Standard Krylov subspace: K m (A,B) = span{b,ab,...,a m 1 B} Shift-Invert Krylov subspace: K m ((A σi) 1,B) = span{b,(a σi) 1 B,...,(A σi) (m 1) B}; often σ = 0 Extended Krylov subspace: EK m (A,B) = K m (A,B)+K m (A 1,A 1 B) Rational Krylov subspace: K m (A,B,s) = span{(a s 1 ) 1 B,(A s 2 ) 1 B,...,(A s m ) 1 B}; usually s = [s 1,...,s m ] a-priori 5
Projection methods: the general idea Given space K R n of size m and (orthonormal) basis V m, A A m = V mav m, B B m = V mb, C C m = CV m Solve with A m,b m,c m Choices of K in the literature: Standard Krylov subspace: K m (A,B) = span{b,ab,...,a m 1 B} Shift-Invert Krylov subspace: K m ((A σi) 1,B) = span{b,(a σi) 1 B,...,(A σi) (m 1) B}; often σ = 0 Extended Krylov subspace: EK m (A,B) = K m (A,B)+K m (A 1,A 1 B) Rational Krylov subspace: K m (A,B,s) = span{(a s 1 ) 1 B,(A s 2 ) 1 B,...,(A s m ) 1 B}; usually s = [s 1,...,s m ] a-priori 6
Projection methods: the general idea Given space K R n of size m and (orthonormal) basis V m, A A m = V mav m, B B m = V mb, C C m = CV m Solve with A m,b m,c m Choices of K in the literature: Standard Krylov subspace: K m (A,B) = span{b,ab,...,a m 1 B} Shift-Invert Krylov subspace: K m ((A σi) 1,B) = span{b,(a σi) 1 B,...,(A σi) (m 1) B}; often σ = 0 Extended Krylov subspace: EK m (A,B) = K m (A,B)+K m (A 1,A 1 B) Rational Krylov subspace: K m (A,B,s) = span{(a s 1 ) 1 B,(A s 2 ) 1 B,...,(A s m ) 1 B}; usually s = [s 1,...,s m ] a-priori 7
Projection methods: the general idea Given space K R n of size m and (orthonormal) basis V m, A A m = V mav m, B B m = V mb, C C m = CV m Solve with A m,b m,c m Choices of K in the literature: Standard Krylov subspace: K m (A,B) = span{b,ab,...,a m 1 B} Shift-Invert Krylov subspace: K m ((A σi) 1,B) = span{b,(a σi) 1 B,...,(A σi) (m 1) B}; often σ = 0 Extended Krylov subspace: EK m (A,B) = K m (A,B)+K m (A 1,A 1 B) Rational Krylov subspace: K m (A,B,s) = span{(a s 1 I) 1 B,(A s 2 I) 1 B,...,(A s m I) 1 B} usually s = [s 1,...,s m ] a-priori 8
Transfer function approximation h(ω) = c(a iωi) 1 b, ω [α,β] Given space K of size m and V s.t. K=range(V), h(ω) cv(v AV iωi) 1 (V b) Next: Classical benchmark experiment with Standard, Shift-invert and Extended Krylov 9
An example: CD Player, h(ω) = C i,: (A iωi) 1 B :,j 10 8 CDplayer, m=20, (1,1) 10 6 true Std Krylov 10 4 CDplayer, m=20, (1,2) 10 2 true Std Krylov 10 4 10 2 10 0 10 0 10 2 10 2 10 4 10 4 10 6 10 6 10 8 10 1 10 0 10 1 10 2 10 3 10 4 10 5 10 6 10 2 CDplayer, m=20, (2,1) 10 1 true Std Krylov 10 8 10 1 10 0 10 1 10 2 10 3 10 4 10 5 10 6 10 4 CDplayer, m=20, (2,2) 10 3 true Std Krylov 10 0 10 2 10 1 10 1 10 2 10 0 10 3 10 1 10 4 10 2 10 5 10 3 10 6 10 4 10 7 10 1 10 0 10 1 10 2 10 3 10 4 10 5 10 6 10 5 10 1 10 0 10 1 10 2 10 3 10 4 10 5 10 6 10
An example: CD Player, h(ω) = C i,: (A iωi) 1 B :,j 10 8 CDplayer, m=20, (1,1) 10 6 true Std Krylov 10 2 CDplayer, m=50, (1,2) 10 1 true Std Krylov 10 0 10 4 10 1 10 2 10 2 10 0 10 3 10 2 10 4 10 5 10 4 10 6 10 6 10 7 10 8 10 1 10 0 10 1 10 2 10 3 10 4 10 5 10 6 10 2 CDplayer, m=20, (2,1) 10 1 true Std Krylov 10 8 10 1 10 0 10 1 10 2 10 3 10 4 10 5 10 6 10 4 CDplayer, m=20, (2,2) 10 3 true Std Krylov 10 0 10 2 10 1 10 1 10 2 10 0 10 3 10 1 10 4 10 2 10 5 10 3 10 6 10 4 10 7 10 1 10 0 10 1 10 2 10 3 10 4 10 5 10 6 10 5 10 1 10 0 10 1 10 2 10 3 10 4 10 5 10 6 11
Rational Krylov Subspace Method. Choice of poles K m (A,B,s) = span{(a s 1 I) 1 B,(A s 2 I) 1 B,...,(A s m I) 1 B} cf. General discussion in Antoulas, 2005. Various attempts: Gallivan, Grimme, Van Dooren (1996, ad-hoc poles) Penzl (1999-2000, ADI shifts - preprocessing, Ritz values)... Sabino (2006 - tuning within preprocessing) IRKA Gugercin, Antoulas, Beattie (2008) 12
A new adaptive choice of poles for RKSM K m (A,b,s) = span{(a s 1 I) 1 b,(a s 2 I) 1 b,...,(a s m I) 1 b} s = [s 1,...,s m ] to be chosen sequentially The fundamental idea: Assume you wish to solve (A si)x = b with a Galerkin procedure in K m (A,b,s). Let V m be orth. basis. The residual satisfies: b (A si)x m = r m(a)b m r m (s), r z λ j m(z) = z s j with λ j = eigs(v mav m ). Moreover, r m (A)b = min θ 1,...,θ m j=1 m (A θ j I)(A s j I) 1 b j=1 13
A new adaptive choice of poles for RKSM. Cont d r m (z) = m j=1 z λ j z s j, λ j = eigs(v mav m ) For A symmetric: ( s m+1 := arg max s [ λ max, λ min ] ) 1 r m (s) [λ min,λ max ] spec(a) (Druskin, Lieberman, Zaslavski (SISC 2010)) For A nonsymmetric: ( ) 1 s m+1 := arg max s S m r m (s) where S m C + approximately encloses the eigenvalues of A 14
Example of S m. CD Player, m = 12 S m : encloses mirrored current Ritz values: -eigs(v mav m ) and initial estimates: s (0) 1 = 0.1, s (0) 2,3 = 900±i5 104 5 x 104 4 3 2 imaginary part 1 0 1 2 3 4 5 0 100 200 300 400 500 600 700 800 900 real part poles + -eigs(a) S m 15
Transfer function evaluation. EADY Data set 10 3 true arnoldi invert arnoldi rational krylov 10 2 10 0 10 2 h(ω) h(ω) h approx (ω) 10 4 10 6 10 2 10 8 10 10 arnoldi invert arnoldi rational krylov 10 1 10 0 10 1 frequency ω 10 12 10 1 10 0 10 1 frequency ω m = 20. A of size 598 (nonsym), s (0) 1 = A /condest(a), s (0) 2,3 arg(maxr(eigs(a))) 16
Transfer function evaluation. Flow Data set h(ω) h(ω) h approx (ω) 10 0 10 0 10 2 10 2 10 4 10 4 10 6 10 6 invert arnoldi rational krylov 10 8 10 10 true invert arnoldi rational krylov 10 8 10 10 10 12 10 1 10 0 10 1 10 2 10 3 10 4 10 12 10 1 10 0 10 1 10 2 10 3 10 4 m = 80. A,E of size 9669 (nonsym) s (0) 1 = A /(condest(a) E F ), s (0) 2 arg(max R(eigs(A))) (all real poles) 17
Comparison with optimal (a-priori) theoretical shifts. A sym Equidistributed nested sequence of real shifts (EDS) (from classical Zolotaryov sol n) asymptotically optimal rational space for ir Rate for the L error of h(ω): [ ( )] O exp π2 m(1+o(1)) 2log 4λ max λ min, for λ max λ min 1 Druskin, Knizhnerman, Zaslavsky (SISC 2009) 18
Comparison with optimal (a-priori) theoretical shifts. Cont d A R 900 900 : Diagonal matrix with log-uniformly distributed values in [ 1, 3.316410 9 ] h(ω) h m (ω) h(ω) h approx (ω) (m = 20) 10 8 10 6 10 5 arnoldi invert arnoldi rational krylov EDP poles max ω h(ω) h approx (ω) 10 4 10 2 10 0 10 2 arnoldi invert arnoldi rational krylov EDS poles h(ω) h approx (ω) 10 0 10 5 10 10 10 4 0 5 10 15 20 25 30 35 40 45 50 space dimension 10 15 10 10 10 5 10 0 10 5 10 10 frequency range 19
The Lyapunov matrix equation AX +XA +bb = 0 Approximation by projection: K of dim. m, V m orthonormal basis. X X m = V m YV m V mav m Y +YV ma V m +V mbb V m = 0 Connection to Rational functions: X = R x(ω)x(ω) dω with x(ω) = (A ωii) 1 b 20
X X m = V m YV m with Approximation by projection (V mav m )Y +Y(V mav m ) +(V mb)(v mb) = 0 Some technical issues: K m (A,b,s) = span{b,(a s 2 I) 1 b,..., m j=2 (A s ji) 1 b} (includes b) All real poles (all real arithmetic work) Cheap computation of V mav m at each iteration m (K m (A,b,s) K m+1 (A,b,s)) Cheap computation of the residual norm R m = AX m +X m A +bb Cheap factorized form of solution X m = Xˆm := Zˆm Z ˆm, ˆm m 21
Some numerical experiments Competitors: ADI problem: computation of parameters Extended Krylov Subspace method outperforms ADI in general EK m (A,b) = K m (A,b)+K m (A 1,A 1 b) Comparison measures: Efficiency (CPU time) Memory (space dimension) Rank of solution 22
The RAIL (symmetric) data set n Rational Extended Rational Extended space space space space direct direct iterative iterative 1357 CPU time (s) 0.84 0.36 0.96 1.60 dim. Approx. Space 21 64 21 68 Rank of Solution 21 47 21 45 20209 CPU time (s) 11.19 10.97 25.31 201.94 dim. Approx. Space 25 124 25 126 Rank of Solution 25 75 25 75 79841 CPU time (s) 51.54 73.03 189.48 2779.95 dim. Approx. Space 26 168 26 170 Rank of Solution 26 103 26 98 Inner solves: PCG with IC(10 2 ) 23
The RAIL (symmetric) data set n Rational Extended Rational Extended space space space space direct direct iterative iterative 1357 CPU time (s) 0.84 0.36 0.96 1.60 dim. Approx. Space 21 64 21 68 Rank of Solution 21 47 21 45 20209 CPU time (s) 11.19 10.97 25.31 201.94 dim. Approx. Space 25 124 25 126 Rank of Solution 25 75 25 75 79841 CPU time (s) 51.54 73.03 189.48 2779.95 dim. Approx. Space 26 168 26 170 Rank of Solution 26 103 26 98 Inner solves: PCG with IC(10 2 ) 24
More Tests: two nonsymmetric problems n Rational Extended Rational Extended space space space space direct direct iterative iterative 9669 CPU time (s) 3.16 3.06 3.01 9.95 dim. Approx. Space 16 36 16 36 Rank of Solution 16 24 16 24 20082 CPU time (s) 59.99 45.84 13.01 25.28 dim. Approx. Space 15 26 15 26 Rank of Solution 15 22 15 22 Convective thermal flow problems (FLOW, CHIP data sets) All real shifts used 25
Conclusions and outlook Adaptive procedure makes Rational Krylov subspace appealing Competitive in terms of both reduction space and CPU time Balanced Truncation? www.dm.unibo.it/~simoncin valeria@dm.unibo.it References: V. Simoncini, A new iterative method for solving large-scale Lyapunov matrix equations SIAM J. Scient. Computing, v.29, n.3 (2007), pp. 1268-1288 V. Simoncini, The Extended Krylov subspace for parameter dependent systems Applied Num. Math. v.60 n.5 (2010) 550-560. V. Druskin and V. Simoncini, Adaptive rational Krylov subspaces for large-scale dynamical systems pp.1-20, August 2010. (Under revision) 26