power grid simulation using matrix exponential method with
TRANSCRIPT
Power Grid Simulation using Matrix Exponential
Method with Rational Krylov Subspaces
Hao Zhuang, Shih-Hung Weng, and Chung-Kuan Cheng Department of Computer Science and Engineering
University of California, San Diego, CA, USA Contact: {zhuangh, ckcheng}@ucsd.edu
Outline โข Background of Power Grid Transient Circuit Simulation
โ Formulations โ Problems
โข Matrix Exponential Circuit Simulation (Mexp) โ Stiffness Problem
โข Rational Matrix Exponential (Rational Mexp) โ Rational Krylov Subspace โ Skip of Regularization โ Flexible Time Stepping
โข Experiments โ Adaptive Time Stepping Experiment โ Standard Mexp vs. Rational Mexp (RC Mesh) โ Rational Mexp vs. Trapezoidal Method (PDN Cases)
โข Conclusions
2
Power Grid Circuit Power Grid modeled in RLC circuit
โข Transient Power Grid formulation where โข is the capacitance/inductance matrix โข is the conductance matrix โข is the voltage/current vector, and is input
sources
3
๐๐ฑ ๐ก = โ๐๐ฑ(๐ก) + ๐๐ฎ(๐ก)
๐
๐
๐ฑ ๐๐ฎ(๐ก)
Power Grid Transient Circuit Simulation Transient simulation: Numerical integration
โข Low order approximation
โ Traditional methods: e.g. Backward Euler, Trapezoidal
โ Local truncation error limits the time step
โ Power grid simulation contest [TAUโ12]
โข Trapezoidal method with fixed time-step: only one LU factorization
โข Stiffness: smallest time step
โข High order approximation
โ Matrix exponential based circuit simulation 4
๐
โ+๐
2๐ฑ ๐ก + โ =
๐
โโ๐
2๐ ๐ก +
๐๐ฎ ๐ก + โ โ ๐๐ฎ(๐ก)
2
Outline โข Background of Power Grid Transient Circuit Simulation
โ Formulations โ Problems
โข Matrix Exponential Circuit Simulation (Mexp) โ Stiffness Problem
โข Rational Matrix Exponential (Rational Mexp) โ Rational Krylov Subspace โ Skip of Regularization โ Flexible Time Stepping
โข Experiments โ Adaptive Time Stepping Experiment โ Standard Mexp vs. Rational Mexp (RC Mesh) โ Rational Mexp vs. Trapezoidal Method (PDN Cases)
โข Conclusions
5
Matrix Exponential Method
โข Linear differential equation
โข Analytical solution
โข Case: input is piecewise linear (PWL)
6
๐๐ฑ ๐ก = โ๐๐ฑ(๐ก) + ๐๐ฎ(๐ก) ๐ฑ ๐ก = โ๐๐ฑ(๐ก) + ๐(๐ก)
๐ = โ๐โ๐๐, ๐ = โ๐โ๐๐๐ฎ(๐ญ)
๐ฑ ๐ก + โ = ๐๐โ๐ฑ(๐ก) + ๐๐(โโ๐)๐(๐ก + ๐) ๐๐โ
0
๐ฑ ๐ก + โ = ๐๐โ๐ฑ ๐ก + (๐๐โโ๐)๐โ๐๐(๐ก) + (๐๐โโ(๐โ + ๐))๐โ๐๐(๐ก + โ) โ ๐(๐ก)
โ
Matrix Exponential Computation
โข Transform into
โข The computation of matrix exponential is expensive (for simplicity, we use ๐ to represent ๐ , from now on)
Memory and time complexities of O(n3)
7
๐ฑ ๐ก + โ = ๐๐ ๐ ๐๐ โ ๐ฑ(๐ก)
๐2
๐ =๐ ๐๐ ๐
, ๐ =0 10 0
, ๐2 =๐1,๐ =
๐ ๐ก + โ โ ๐(๐ก)
โ๐(๐ก)
๐๐ = ๐ + ๐ +๐2
2+๐3
3!+ โฏ+
๐๐
๐!+ โฏ
Krylov Subspace Approximation
โข We derive matrix-vector product:
โข Krylov subspace
โ Standard Basis Generation
โ Orthogonalization (Arnoldi Process):
โ Matrix reduction: Hm,m has m=10~30 while size of A can be millions
โข Matrix exponential operator
โ time stepping, h, via scaling
โ Posteriori error estimate [Saad92]
8
๐๐๐ฏ
๐ฒ๐ ๐, ๐ฏ = ๐ฏ,๐๐ฏ, ๐๐๐ฏ,โฆ , ๐๐โ๐๐ฏ
๐๐ฏ = โ๐โ๐(๐๐ฏ)
๐๐ = ๐ฏ๐, ๐ฏ๐, โฏ , ๐ฏ๐
๐๐๐ = ๐๐๐๐,๐ + ๐๐+๐,๐๐ฏ๐+๐๐๐T ๐๐,๐ = ๐๐
T๐๐๐
๐๐โ๐ฏ โ ๐ฏ ๐๐๐ ๐๐๐,๐โ๐๐
1
ฮค
21, eeehmmErr h
mkrylovmH
Hv
Problems of Standard Krylov Subspace Approximations
Problem of Stiffness:
โข When the system is stiff, we need high order approximation so that the solution can converge,
โข Standard Krylov subspace tends to capture the eigenvalues of large magnitude
โข For transient analysis, the eigenvalues of small real magnitude are wanted to describe the dynamic behavior.
9
๐ = โ๐โ๐๐
๐ฑ ๐ก = ๐๐ฑ(๐ก) + ๐(๐ก)
๐๐ = ๐ + ๐ +๐2
2+
๐3
3!+โฏ+
๐๐
๐!.
Outline โข Background of Power Grid Transient Circuit Simulation
โ Formulations โ Problems
โข Matrix Exponential Circuit Simulation (Mexp) โ Stiffness Problem
โข Rational Matrix Exponential (Rational Mexp) โ Rational Krylov Subspace โ Skip of Regularization โ Flexible Time Stepping
โข Experiments โ Adaptive Time Stepping Experiment โ Standard Mexp vs. Rational Mexp (RC Mesh) โ Rational Mexp vs. Trapezoidal Method (PDN Cases)
โข Conclusions
10
Rational Krylov Subspace โข Spectral Transformation:
โ Shift-and-invert matrix A
โ Rational Krylov subspace captures slow-decay components
โ Use rational Krylov subspace for matrix exponential
11
100
Important eigenvalue: Component that decays slowly. Not so important eigenvalue: Component that decays fast.
๐ฒ๐ ๐, ๐ฏ ๐ฒ๐ (๐ โ ๐พ๐)โ๐, ๐ฏ
(๐ โ ๐พ๐)โ๐
Rational Krylov Subspace
Rational Krylov subspace
โข Arnoldi process to obtain Vm=[v1 v2 โฆ vm]
โข Matrix exponential
โ Time stepping by scaling
โ No need of new Krylov subspace computation.
โข Posterior error to terminate the process
โ Larger time step => smaller error
12
๐ฒ๐ (๐ โ ๐พ๐)โ๐, ๐ฏ = ๐ฏ, (๐ โ ๐พ๐)โ๐๐ฏ, (๐ โ ๐พ๐)โ๐ ๐ฏ,โฆ , (๐ โ ๐พ๐)โ๐+๐๐ฏ
๐๐T๐๐๐ โ
๐ โ ๐๐,๐โ๐
๐ธ
๐๐๐๐ฏ โ ๐ฏ ๐๐๐ ๐๐/๐ธ(๐โ๐๐,๐โ๐)๐๐
๐๐๐ ๐,๐ถ =๐ฏ ๐
๐ธโ๐+๐,๐ (๐ โ ๐พ๐)๐ฏ๐+๐๐๐
T๐๐,๐โ๐๐โ/๐พ (๐โ๐๐,๐
โ๐)๐๐
Skip of Regularization
1. No need of regularization for A= ๐ช โ๐๐ฎ using matrix pencil (๐ฎ , ๐ช )
2. LU decomposition at a fixed ๐พ
โข Require LU every time step?
13
๐ฏ๐+๐ = (๐ โ ๐พ๐)โ๐๐ฏ๐ = (๐ โ ๐พ๐ )โ๐๐ ๐ฏ๐
๐ณ๐ผ_๐ซ๐๐๐๐๐ ๐ โ ๐พ๐ = ๐ ๐
๐ =๐ ๐๐ ๐
, ๐ =โ๐ ๐
๐ ๐,๐ =
๐๐ฎ ๐ก + โ โ ๐๐ฎ(๐ก)
โ๐๐ฎ(๐ก)
Block LU and Updating Sub-matrix
โข The majority of matrix is the same,
โข Block LU can be utilized here and the former LU matrices are updated as
โข We avoid LU in each time step by reusing and Block LU and updating a small part of U
14
๐ณ๐ผ_๐ซ๐๐๐๐๐ ๐ + ๐พ๐ = ๐๐๐๐ ๐๐๐๐
๐ =๐๐๐๐ ๐๐ ๐
, ๐ =๐๐๐๐ โ๐พ๐๐๐๐
โ๐๐
๐ ๐๐, ๐๐ = ๐ โ ๐พ๐
๐ณ๐ผ_๐ซ๐๐๐๐๐ ๐ โ ๐พ๐ = ๐ ๐
Rational MEXP with Adaptive Step Control
15
๐ฏ ๐๐๐ ๐๐ถ(๐โ๐๐,๐โ๐)๐๐
โข large step size with less dimension
Rational Matrix Exponential
16
fix , sweep m and h 1
~
2eeeError
h
hmH
m
AVvv
โข large step size with less dimension
Rational Matrix Exponential
17
1
~
2eeeError
h
hmH
m
AVvv fix h, sweep m and
Outline โข Background of Power Grid Transient Circuit
Simulation โ Formulations โ Problems
โข Matrix Exponential Circuit Simulation (Mexp) โ Matrix Exponential Computation
โข Previous Standard Krylov Subspace and Stiffness Problems โข Rational Krylov Subspace (Rational Mexp)
โ Adaptive Time Stepping in Rational Mexp
โข Experiment โ Mexp vs. Rational Mexp (RC Mesh) โ Rational Mexp vs. Trapezoidal Method (PDN Cases)
โข Conclusions 18
Experiment
โข Linux workstation
โ Intel Core i7-920 2.67GHz CPU
โ 12GB memory.
โข Test Cases
โ Stiff RC mesh network (2500 Nodes)
โข Mexp vs. Rational Mexp
โ Power Distribution Network (45.7K~7.4M Nodes)
โข Rational Mexp vs. Trapezoidal (TR) with fixed time step (avoid LU during the simulation)
19
Experiment (I) โข RC mesh network with 2500 nodes. (Time span [0, 1ns] with a fixed step
size 10ps)
stiffness definition:
โข Comparisons between average (mavg) and peak dimensions (mpeak) of Krylov subspace using
โ Standard Basis:
โข mavg = 115 and mpeak=264
โ Rational Basis:
โข mavg = 3.11, and mpeak=10
โข Rational Basis-MEXP achieves 224X speedup for the whole simulation (vs. Standard Basis-MEXP).
20
๐น๐(๐๐๐๐)
๐น๐(๐๐๐๐)= ๐. ๐๐ ร ๐๐๐
Experiment (II) โข PDN Cases
โ On-chip and off-chip components
โ Low-, middle-, and high-frequency responses
โ The time span of whole simulation [0, 1ps]
21
Experiment (II)
22
โข Mixture of low, mid, and high frequency components.
โข 16X speedups over TR.
โข Difference of MEXP and HSPICE: 7.33ร10-4; TR and HSPICE: 7.47ร10-4
Experiment: CPU time
23
Conclusions
โข Rational Krylov Subspace solves the stiffness problem.
โ No need of regularization
โ Small dimensions of basis.
โ Flexible time steps.
โข Adaptive time stepping is efficient to explore the different frequency responses of power grid transient simulation (considering both on-chip and off-chip components)
โ 15X speedup over trapezoidal method.
24
Conclusions: Future Works
โข Setting of constant ๐พ
โ Theory and practice
โข Distributed computation
โ Parallel processing
โ Limitation of memory
โข Nonlinear dynamic system
25
Thanks and Q&A
26