Model reduction of nonlinear circuit equations Tatjana Stykel Technische Universität Berlin Joint work with T. Reis and A. Steinbrecher BIRS Workshop, Banff, Canada, October 25-29, 2010
T. Stykel. Model reduction of nonlinear circuit equations p.1 Outline Differential-algebraic equations in circuit simulation Model order reduction problem PAssivity-preserving Balanced Truncation method for Electrical Circuits (PABTEC) Decoupling of linear and nonlinear parts Model reduction of linear equations Recoupling Numerical examples Conclusion
Modified Nodal Analysis (MNA) T. Stykel. Model reduction of nonlinear circuit equations p.2 R 6 f 1 C 4 L 5 2 3 1 d 2 e 3 A = [A R, A C, A L, A V, A I ] V 1 R 2 C 3 a b c 0 0 Kirchhoff s current law: Aj = 0, j = [ j T R, jt C, j T L, j T V, jt I Kirchhoff s voltage law: A T η = v, v = [ v T R, vt C, v T L, v T V, vt I Branch constitutive relations: resistors: j R = g(v R ), G(v R ) = g(v R ) v R capacitors: j C = dq(v C), C(v C ) = q(v C) dt v C inductors: v L = dφ(j L), L(j L ) = φ(j L) dt j L ] T ] T
MNA circuit equations T. Stykel. Model reduction of nonlinear circuit equations p.3 Consider a linear DAE system E(x) ẋ = A x + f(x) + B u y = B T x with A C(AT C C η)at C 0 0 0 A L A V E(x)= 0 L(j L ) 0, A= A T A 0 I L 0 0, B= 0 0, 0 0 0 A T V 0 0 0 I A R g(a T R η) [ f(x) = 0, u = 0 j I v V ] η, x = j L j V, y = [ ] v I, j V η node potentials, j L, j V, j I currents through inductors, voltage and current sources, v V, v I voltages at voltage and current sources, A R,A C,A L,A V,A I incidence matrices of resistors, capacitors, inductors, voltage and current sources
T. Stykel. Model reduction of nonlinear circuit equations p.4 Index Assumptions A V has full column rank (= no V-loops) [A C, A L, A R, A V ] has full row rank (= no I-cutsets) C, L, G are symmetric, positive definite Index characterization [ Estévez Schwarz/Tischendorf 00 ] Index = 0 no voltage sources and every node has a capacitive path to a reference node Index = 1 no CV-loops except for C-loops and no LI-cutsets Index = 2, otherwise
T. Stykel. Model reduction of nonlinear circuit equations p.5 Model reduction problem Given a large-scale system E(x) ẋ = A x + f(x) + B u y = C x with x R n and u, y R m, find a reduced-order system Ẽ( x) x = Ã x + f( x) + B u ỹ = C x with x R r, u, ỹ R m, r n. preservation of passivity and stability small approximation error ỹ y tol u for all u U need for computable error bounds numerically stable and efficient methods
T. Stykel. Model reduction of nonlinear circuit equations p.6 Model reduction techniques Linear circuit equations Krylov subspace methods ( moment matching ) SyPVL for RC, RL, LC circuits [ Freund et al. 96, 97 ] PRIMA, SPRIM for RLC circuits [ Odabasioglu et al. 96, 97; Freund 04, 05 ] Positive real interpolation [ Antoulas 05, Sorensen 05, Ionutiu et al. 08 ] Balancing-related model reduction methods LyaPABTEC for RC, RL circuits [ Reis/S. 10 ] PABTEC for RLC circuits [ Reis/S. 09 ] Nonlinear circuit equations Proper orthogonal decomposition (POD) [ Verhoeven 08 ] Trajectory piece-wise linear approach (TPWL) [ Rewieński 03 ] (Quadratic) bilinearization + balanced truncation [ Benner/Breiten 10 ]
T. Stykel. Model reduction of nonlinear circuit equations p.7 PABTEC Tool [Er,Ar,Br,Cr,... ] = PABTEC(Incidence matrices, element matrices,... ) nonlinear linear Decoupling of inear subcircuits [Erl,Arl,Brl,Crl,... ] = PABTECL(Incidence matrices, element matrices,... ) (no dynamics) no L or no C no L and no C Topology no CVI loops no LVI cutsets no R otherwise (unreducible) Lyapunov Riccati Lur e Preprocessing (Projectors) Preprocessing (Projectors) Preprocessing (Projectors) Solving Lyapunov equations (ADI, Krylov methods) Model reduction Solving Riccati equations (Newton s method) Model reduction Solving Lur e equations (Newton s method) Model reduction Postprocessing Postprocessing Postprocessing linear nonlinear Recoupling of subsystems
Decoupling T. Stykel. Model reduction of nonlinear circuit equations p.8 + u in u out Large linear RLC circuits arise in modelling transmission lines and pin packages modelling circuits elements by Maxwell s equations via partial element equivalent circuits (PEEC) Assume that C(A T C η) = A C = [ A Cl, A Cn ], AL = [ A Ll, A Ln ], AR = [ A R l, A R n ], [ C l 0 0 C n (A T C n η) ], L(j L ) = [ Ll 0 0 L n (j Ln ) ] [ ] Gl, g(a T R η) = A T R l η. g n (A T R n η)
Replacement of nonlinear elements T. Stykel. Model reduction of nonlinear circuit equations p.9 :-( LI-cutsets may arise :-) :-( LI- or I-cutsets may arise
Replacement of nonlinear elements T. Stykel. Model reduction of nonlinear circuit equations p.10 :- additional variables :-) :-( CV- or V-loops may arise
Replacement of nonlinear elements T. Stykel. Model reduction of nonlinear circuit equations p.11 :- additional variables :-) :- additional variables
Decoupled system T. Stykel. Model reduction of nonlinear circuit equations p.12 Linear RLC equations: E ẋ l = Ax l + B u l y l = B T x l with A C CA T C 0 0 A R GA T R A L A V E = 0 L 0, A= A T L 0 0 A C = [ A Cl 0 0 0 0 ] [, A L = A Ll 0 [ ] G A V A Cn l 0 0 A V =, G = 0 G 1 0, 0 0 0 0 G 2 A T V 0 0 ] [ ] [ A R, A R = l A R n,1 A R n,2, A I = 0 I I A I 0, B= 0 0 0 I A I A R n,2 A Ln 0 I 0 [ ] x T l = η T ηz T j T Ll jv T jt, Cn [ ] u T l = j T I jz T j T Ln u T V ut ; Cn Nonlinear equations: C n (v Cn ) d dt u C n = j Cn, L n (j Ln ) d dt j L n = A T L n η, j z = (G 1 + G 2 )G 1 1 g n(a T R n η) G 2 A T R n η, ],
T. Stykel. Model reduction of nonlinear circuit equations p.13 Balanced truncation System G = ( E, A, B, C ) is balanced if the controllability and observability Gramians X and Y satisfy X = Y = diag(σ 1,..., σ n ). Idea: balance the system, i.e., find an equivalence transformation ( Ê, Â, ˆB, Ĉ ) = (Wb ET b, W b AT b, W b B, CT b ) ( [ ] [ ] [ ] E = 11 E 12 A, 11 A 12 B, 1, [C 1, C 2 ] E 21 E 22 A 21 A 22 B 2 such that ˆX = Ŷ = diag(σ 1,..., σ n ) and truncate the states corresponding to small σ j G = (E 11, A 11, B 1, C 1 ). ) DAEs: G(s) = C(sE A) 1 B = G sp (s) + P(s) G(s) = G sp (s) + P(s)
T. Stykel. Model reduction of nonlinear circuit equations p.14 Projected Lur e equations If G=(E, A, B, C ) is passive, then there exist matrices X = X T 0, J c, K c and Y = Y T 0, J o, K o that satisfy the projected Lur e equations (A BC) XE T + EX(A BC) T + 2P l BB T P T l = 2K c K T c, X = P r XP T r, E XC T P l BM T 0 = K cj T c, I M 0 M T 0 = J cj T c, (A BC) T Y E + E T Y (A BC) + 2Pr T C T CP r = 2Ko T K o, B T Y E + M0 TCP r = Jo T K o, I M0 TM 0 = JT o J o, Y = P T l Y P l, where M 0 = I 2 lim s C(sE A + BC) 1 B, P r and P l are the spectral projectors onto the left and right deflating subspaces of the pencil λe A + BC corresponding to the finite eigenvalues. 0 X min X X max, 0 Y min Y Y max X min controllability Gramian, Y min observability Gramian
Passivity-preserving BT method T. Stykel. Model reduction of nonlinear circuit equations p.15 Given a passive system G = (E, A, B, C ). 1. Compute P r, P l, M 0. 2. Compute X min = RR T, Y min = LL T (= solve the Lur e equations). ] 3. Compute the SVD L T Π1 ER = [U 1, U 2 ][ [V 1, V 2 ] T. Π 2 4. Compute the reduced-order model [ ] [ I 0 2 W T AT 2 W T B C Ẽ =, Ã = 0 0 2 B CT 2I B C [ ] W B T B = B / [, C = CT C / 2 ] 2 ], with I M 0 = C B, W = LU 1 Π 1/2 1 and T = RV 1 Π 1/2 1.
Properties T. Stykel. Model reduction of nonlinear circuit equations p.16 G = (Ẽ, Ã, B, C ) is passive G = (Ẽ, Ã, B, C ) is reciprocal ( G(s) = Σ GT (s)σ ) Error bounds: G H := sup G(iω) 2 ω R If 2 I + G H (π lf +1 +... + π nf ) < 1, then G G H 2 I + G 2 H (π lf +1 +... + π nf ). If 2 I + G H (π lf +1 +... + π nf ) < 1, then G G H 2 I + G 2 H (π lf +1 +... + π nf ).
Application to circuit equations T. Stykel. Model reduction of nonlinear circuit equations p.17 A CAT C C 0 0 A GA T R R AIAT I A L A V E = 0 L 0, A BC = A T A I 0 L 0 0, B= 0 0 =C T 0 0 0 A T V 0 I 0 I Compute P r and P l using the canonical projectors technique [März 96] P r = H 5 (H 4 H 2 I) H 5 H 4 A L H 6 0 0 H 6 0 A T V (H 4H 2 I) A T V H 4A L H 6 0 with H 1 = Z T CRIV A L L 1 A T L Z CRIV, H 2 =..., H 3 = Z T C H 2Z C, H 4 = Z C H 1 3 ZT C, H 5 = Z CRIV H 1 1 ZT CRIV A L L 1 A T L I, H 6 = I L 1 A T L Z CRIV H 1 1 ZT CRIV A L, Z C and Z CRIV are basis matrices for ker A T C and ker[a C, A R, A I, A V ] T. P l = S P T r S T with S = diag(i nη, I nl, I nv )
Application to circuit equations T. Stykel. Model reduction of nonlinear circuit equations p.18 A CAT C C 0 0 A GA T R R AIAT I A L A V E = 0 L 0, A BC = A T A I 0 L 0 0, B= 0 0 =C T 0 0 0 A T V 0 I 0 I Compute P r and P l = S P T r S T with S = diag(i nr, I nl, I nv ). Compute M 0 = I 2 lim s C(sE A + BC) 1 B M 0 = [ I 2A T I ZH 1 0 ZT A I 2A T I ZH 1 0 ZT A V 2A T V ZH 1 0 ZT A I I + 2A T V ZH 1 0 ZT A V ] where H 0 = Z T (A R GA T R +A I AT I +A V AT V )Z, Z = Z CZ RIV C, Z RIV C is a basis matrix for ker [A R, A I, A V ] T Z C and [Z RIV C, Z RIV C ] is nonsingular.
Application to circuit equations T. Stykel. Model reduction of nonlinear circuit equations p.19 Compute M 0, P r, P l = S P T r S T with S = diag(i nr, I nl, I nv ). Compute X min =RR T, Y min =FF T (solve the projected Lur e equations) If D 0 = I M 0 M0 T is nonsingular, then the projected Lur e equations are equivalent to the projected Riccati equation (A BC)XE T + EX(A BC) T + 2P l BB T P T l + 2(EXC T P l BM T 0 )D 1 0 (EXCT P l BM T 0 ) = 0, X = P rxp T r compute a low-rank approximation X min R R T, R R n,k, k n, using the generalized low-rank Newton method [ Benner/St. 10 ] Y min = S X min S T S R R T S T = F F T D 0 is nonsingular, if the circuit contains neither CVI-loops except for C-loops nor LIV-cutsets except for L-cutsets
Application to circuit equations T. Stykel. Model reduction of nonlinear circuit equations p.20 Compute M 0, P r, P l = S P T r S T with S = diag(i nr, I nl, I nv ). Compute X min R R T, Y min = S X min S T S R R T S T = F F T. Compute the SVD of F T E R F T E R = R T SE R is symmetric compute the EVD R T SE R Λ1 = [U 1, U 2 ][ instead of the SVD Λ 2 ] [U 1, U 2 ] T W = S RU 1 Λ 1 1/2 and T = RU 1 Λ 1 1/2 sign(λ 1 ) with Λ 1 = diag( λ 1,..., λ lf ), sign(λ 1 ) = diag(sign(λ 1 ),..., sign(λ lf ))
T. Stykel. Model reduction of nonlinear circuit equations p.21 Application to circuit equations Compute M 0, P r, P l = S P T r S T with S = diag(i nr, I nl, I nv ). Compute X min R R T. Compute the EVD R T SE R = [U 1, U 2 ][ Λ1 Λ 2 ] [U 1, U 2 ] T and W = S RU 1 Λ 1 1/2, T = RU 1 Λ 1 1/2 sign(λ 1 ). Compute B and C such that C B = I M 0 (I M 0 )Σ with Σ = diag(i ni, I nv ) is symmetric compute the EVD (I M 0 )Σ = U 0 Λ 0 U T 0 B = sign(λ 0 ) Λ 0 1/2 U T 0 Σ and C = U 0 Λ 0 1/2
PABTECL algorithm T. Stykel. Model reduction of nonlinear circuit equations p.22 Compute M 0, P r, P l = S P T r S T with S = diag(i nr, I nl, I nv ). Compute X min R R T. Compute the EVD R T SE R = [U 1, U 2 ][ Λ1 Λ 2 ] [U 1, U 2 ] T and W = S RU 1 Λ 1 1/2, T = RU 1 Λ 1 1/2 sign(λ 1 ). Compute the EVD (I M 0 )Σ = U 0 Λ 0 U T 0 with Σ = diag(i ni, I nv ) and B = sign(λ 0 ) Λ 0 1/2 U T 0 Σ, C = U 0 Λ 0 1/2. Compute the reduced-order model [ ] I 0 Ẽ =, Ã = 1 [ 2 W T AT 2 W T BC 0 0 2 2 B CT 2I B C [ W B = T B B / [ ], C = CT, C 2 / ] 2. ],
Recoupling T. Stykel. Model reduction of nonlinear circuit equations p.23 Linear reduced-order model: Ẽ x [ l = Ã x l + B1, B 2, B 3, B 4, B ] 5 u l, C 1 A T I η C 2 A T R n η + G 1 1 g n(a T R n η) ỹ l = C 3 x l y l = A T L n η C 4 j V C 5 j Cn Nonlinear equations: C n (v Cn ) d dt u C n = j Cn, L n (j Ln ) d dt j L n = A T L n η, j z = (G 1 + G 2 )G 1 1 g n(a T R n η) G 2 A T R n η
Reduced-order nonlinear system T. Stykel. Model reduction of nonlinear circuit equations p.24 We obtain the reduced-order system Ẽ( x) x = Ã x + f( x) + B u ỹ = C x with Ẽ 0 0 0 Ã + B 2 (G 1 + G 2 ) C 2 B3 B5 B2 G 1 0 L Ẽ( x) = n ( j Ln ) 0 0 0 0 C n (ũ Cn ) 0, Ã= C 3 0 0 0 C 5 0 0 0, 0 0 0 0 G 1 C2 0 0 G 1 B 1 B4 0 x l 0 0 B= 0 0, 0 f( x) = 0, x = j Ln ũ Cn. 0 0 g n (ũ Cn ) Remark: If n Cn = 0 and n Ln = 0, then passivity is preserved and under some additional topological conditions we have the error bound ỹ y 2 c(π lf +... + π nf )( u 2 + ỹ 2 ). [ Heinkenschloss/Reis 09 ] ũ R n
Example: linear RLC circuit T. Stykel. Model reduction of nonlinear circuit equations p.25 n = 127 869, m = 1 85246 resistors 42623 inductors 42623 capacitors 10 0 10 5 10 10 Bounded real characteristic values X min R R T, R R n,84 Reduced model: r = 24 10 15 10 20 10 20 30 40 50 60 j 10 3 10 4 Frequency responses Full order PABTEC 10 0 10 5 Absolute error and error bound Error Error bound Magnitude 10 5 Magnitude 10 10 10 15 10 6 10 0 10 5 10 10 10 15 Frequency w 10 0 10 5 10 10 10 15 Frequency w
Example: nonlinear circuit T. Stykel. Model reduction of nonlinear circuit equations p.26 1 Input: voltage source 2000 linear capacitors 1990 linear resistors 991 linear inductors 10 nonlinear inductors 10 diodes 1 voltage source original reduced system system Dimension 4003 203 Simulation time 4557 67 u i V 0.8 0.6 0.4 0.2 0 0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 0.045 0.05 15 10 5 0 x 10 3 t Output: negative current of the voltage source 0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 0.045 0.05 x 10 5 t Error in the output orig. system red. system 4 Model reduction time 822 Error in the output 4.4e-05 i V 3 2 1 0 0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 0.045 0.05 t
T. Stykel. Model reduction of nonlinear circuit equations p.27 Conclusions and future work Model reduction of nonlinear circuit equations topology based partitioning balancing-related model reduction of linear subsystems with preservation of passivity and computable error bounds Exploiting the structure of MNA matrices E, A, B, C use graph algorithms for computing the basis matrices use modern numerical linear algebra algorithms for solving large-scale projected Riccati/Lyapunov equations MATLAB Toolbox PABTEC Preservation of passivity and error bounds for general circuits Numerical solution of large-scale Lur e equations