Automatic partitioning for multirate methods

0 downloads 0 Views 1MB Size Report
Nov 22, 2006 - Numerical experiments. Conclusion. Inverter chain model. Equations. ˙u1 = Uop − u1 − Î¥f(uin, u1, 0). ˙uk = Uop − uk − Î¥f(uk−1, uk , 0) for k = 2 ...
Multirate transient analysis

Automatic partitioning

Numerical experiments

Automatic partitioning for multirate methods A. Verhoeven1

E.J.W. ter Maten1,2 R.M.M. Mattheij1 [email protected]

1 Eindhoven

University of Technology (CASA)

2 Philips

Semiconductors – NXP

CASA-day, November 22, 2006



/centre for analysis, scientific computing and applications

Conclusion

Multirate transient analysis

Automatic partitioning

Numerical experiments

Outline

1

Multirate transient analysis

2

Automatic partitioning

3

Numerical experiments

4

Conclusion



/centre for analysis, scientific computing and applications

Conclusion

Multirate transient analysis

Automatic partitioning

Numerical experiments

Outline

1

Multirate transient analysis

2

Automatic partitioning

3

Numerical experiments

4

Conclusion



/centre for analysis, scientific computing and applications

Conclusion

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

Transient analysis of electrical circuits. Transient analysis of x(t) ∈ Rd on [0, T ] of circuit model:  d dt [q(t, x)] + j(t, x) = 0 (1) x(0) = x0



/centre for analysis, scientific computing and applications

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

Transient analysis of electrical circuits. Transient analysis of x(t) ∈ Rd on [0, T ] of circuit model:  d dt [q(t, x)] + j(t, x) = 0 (1) x(0) = x0 The functions q, j are retrieved by techniques like Modified Nodal Analysis.



/centre for analysis, scientific computing and applications

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

Transient analysis of electrical circuits. Transient analysis of x(t) ∈ Rd on [0, T ] of circuit model:  d dt [q(t, x)] + j(t, x) = 0 (1) x(0) = x0 The functions q, j are retrieved by techniques like Modified Nodal Analysis. Usually implicit A-stable singlerate time-integration schemes are used, e.g. the Backward Difference Formula scheme. The stepsize h is restricted by the maximum local discretization error of all elements of x.



/centre for analysis, scientific computing and applications

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

Transient analysis of electrical circuits. Transient analysis of x(t) ∈ Rd on [0, T ] of circuit model:  d dt [q(t, x)] + j(t, x) = 0 (1) x(0) = x0 The functions q, j are retrieved by techniques like Modified Nodal Analysis. Usually implicit A-stable singlerate time-integration schemes are used, e.g. the Backward Difference Formula scheme. The stepsize h is restricted by the maximum local discretization error of all elements of x. This approach is expensive for circuits with latency and multirate behaviour, e.g. if there are small but active sub-circuits.



/centre for analysis, scientific computing and applications

Multirate transient analysis

Automatic partitioning

Numerical experiments

Example of latency.

Matrix circuit with M × N inverter models.



/centre for analysis, scientific computing and applications

Conclusion

Multirate transient analysis

Automatic partitioning

Numerical experiments

Example of latency.

Matrix circuit with M × N inverter models. The local error shows that this circuit has a large latent part.



/centre for analysis, scientific computing and applications

Conclusion

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

Multirate Time Integration Partitioning of circuit in latent (L) and active (A) part d [q (t, xA , xL )] + jA (t, xA , xL ) = 0, dt A d [q (t, xA , xL )] + jL (t, xA , xL ) = 0, dt L



xA ∈ RdA ,

(2)

xL ∈ RdL .

(3)

/centre for analysis, scientific computing and applications

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

Multirate Time Integration Partitioning of circuit in latent (L) and active (A) part d [q (t, xA , xL )] + jA (t, xA , xL ) = 0, dt A d [q (t, xA , xL )] + jL (t, xA , xL ) = 0, dt L

xA ∈ RdA ,

(2)

xL ∈ RdL .

(3)

Equations (2) and (3) are integrated by using different stepsizes h and H, where h  H.



/centre for analysis, scientific computing and applications

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

Multirate Time Integration Partitioning of circuit in latent (L) and active (A) part d [q (t, xA , xL )] + jA (t, xA , xL ) = 0, dt A d [q (t, xA , xL )] + jL (t, xA , xL ) = 0, dt L

xA ∈ RdA ,

(2)

xL ∈ RdL .

(3)

Equations (2) and (3) are integrated by using different stepsizes h and H, where h  H. The Slow-Fast version integrates (3) before (2).



/centre for analysis, scientific computing and applications

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

Multirate Time Integration Partitioning of circuit in latent (L) and active (A) part d [q (t, xA , xL )] + jA (t, xA , xL ) = 0, dt A d [q (t, xA , xL )] + jL (t, xA , xL ) = 0, dt L

xA ∈ RdA ,

(2)

xL ∈ RdL .

(3)

Equations (2) and (3) are integrated by using different stepsizes h and H, where h  H. The Slow-Fast version integrates (3) before (2). The integration of (large) latent part can be replaced by a compound step, which leads to the Compound-Fast version.



/centre for analysis, scientific computing and applications

Multirate transient analysis

Automatic partitioning

Numerical experiments

The Compound-Fast BDF method

The slow and fast equations are both discretized by the BDF scheme.



/centre for analysis, scientific computing and applications

Conclusion

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

The Compound-Fast BDF method

The slow and fast equations are both discretized by the BDF scheme. The solutions are approximated by piecewise polynomials on the coarse and refined grids. Typical form of the predictor (dashed) and corrector (solid) polynomials on the coarse and refined time-grids.



/centre for analysis, scientific computing and applications

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

The Compound-Fast BDF method

The slow and fast equations are both discretized by the BDF scheme. The solutions are approximated by piecewise polynomials on the coarse and refined grids. Lagrange interpolation of the latent interface (currents or voltages) during refinement.

Typical form of the predictor (dashed) and corrector (solid) polynomials on the coarse and refined time-grids.



/centre for analysis, scientific computing and applications

Multirate transient analysis

Automatic partitioning

Numerical experiments

Outline

1

Multirate transient analysis

2

Automatic partitioning

3

Numerical experiments

4

Conclusion



/centre for analysis, scientific computing and applications

Conclusion

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

Efficiency analysis of multirate Let WC , WR be the computational work per step for the compound phase and the refinement phase, satisfying WR WC = E  1. The workload ratio E is approximated by ˆ = E



dA d

α ,

where α ∈ (1, 3) and d = dA + dL .



/centre for analysis, scientific computing and applications

(4)

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

Efficiency analysis of multirate Let WC , WR be the computational work per step for the compound phase and the refinement phase, satisfying WR WC = E  1. The workload ratio E is approximated by ˆ = E



dA d

α (4)

,

where α ∈ (1, 3) and d = dA + dL . The multirate factor m = Hh  1 can be approximated by ˆn H ˆn, h ˆn depend on the estimated local error at tn . Here H ˆn h

ˆn and the integration order p. Thus m ˆ behaves like vector e  ˆ = m



ˆA k ke ˆL k ke



1 p+1

.

/centre for analysis, scientific computing and applications

(5)

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

The optimal partition The speed-up factor S = S(partition, dynamics) of a multirate method with stepsizes H, h with respect to a singlerate method using stepsize hs is equal to S=



Wsing h ≈ Wmult hs

1 m

1 . +E

/centre for analysis, scientific computing and applications

(6)

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

The optimal partition The speed-up factor S = S(partition, dynamics) of a multirate method with stepsizes H, h with respect to a singlerate method using stepsize hs is equal to S=

Wsing h ≈ Wmult hs

1 m

1 . +E

Although h can be smaller than hs , we assume that is independent of the partition.



(6) h hs

≈1

/centre for analysis, scientific computing and applications

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

The optimal partition The speed-up factor S = S(partition, dynamics) of a multirate method with stepsizes H, h with respect to a singlerate method using stepsize hs is equal to S=

Wsing h ≈ Wmult hs

1 m

1 . +E

(6)

Although h can be smaller than hs , we assume that is independent of the partition.

h hs

≈1

The partition should be chosen such that S is optimized. Thus the optimal partition satisfies: max S ≈ max

indA ,indL



indA ,indL 1 ˆ m

1 ˆ +E

.

/centre for analysis, scientific computing and applications

(7)

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

Partitioning techniques 1

ˆ the most active latent element and the most By means of e latent active element are selected.



/centre for analysis, scientific computing and applications

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

Partitioning techniques 1

ˆ the most active latent element and the most By means of e latent active element are selected.

2

Tolerance level rel < 1 for relative local error per element: ˆk. ˆi | > rel ke |e



/centre for analysis, scientific computing and applications

(8)

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

Partitioning techniques 1

ˆ the most active latent element and the most By means of e latent active element are selected.

2

Tolerance level rel < 1 for relative local error per element: ˆk. ˆi | > rel ke |e

3

Tolerance level abs >TOL for absolute local error per element: ˆi | > abs . |e



/centre for analysis, scientific computing and applications

(8)

(9)

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

Partitioning techniques 1

ˆ the most active latent element and the most By means of e latent active element are selected.

2

Tolerance level rel < 1 for relative local error per element: ˆk. ˆi | > rel ke |e

3

4

Tolerance level abs >TOL for absolute local error per element: ˆi | > abs . |e

(8)

(9)

From all needed stepsizes per element the largest gap is detected to seperate the system in a fast and a slow part.



/centre for analysis, scientific computing and applications

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

Dynamically changing partitions The old partition is kept for an acceptable speedup factor.



/centre for analysis, scientific computing and applications

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

Dynamically changing partitions The old partition is kept for an acceptable speedup factor. No change of the partition during the refinement. We only allow that: A The partition is updated just after the compound step by use of the computed error vector at the coarse grid;



/centre for analysis, scientific computing and applications

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

Dynamically changing partitions The old partition is kept for an acceptable speedup factor. No change of the partition during the refinement. We only allow that: A The partition is updated just after the compound step by use of the computed error vector at the coarse grid; B The partition is updated just after the refinement phase where also the active errors of the refined time-grid are used.



/centre for analysis, scientific computing and applications

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

Dynamically changing partitions The old partition is kept for an acceptable speedup factor. No change of the partition during the refinement. We only allow that: A The partition is updated just after the compound step by use of the computed error vector at the coarse grid; B The partition is updated just after the refinement phase where also the active errors of the refined time-grid are used. If this does not help: C Singlerate is started and the new error vector is used to repartition.



/centre for analysis, scientific computing and applications

Multirate transient analysis

Automatic partitioning

Numerical experiments

Outline

1

Multirate transient analysis

2

Automatic partitioning

3

Numerical experiments

4

Conclusion



/centre for analysis, scientific computing and applications

Conclusion

Multirate transient analysis

Automatic partitioning

Numerical experiments

Inverter chain model



/centre for analysis, scientific computing and applications

Conclusion

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

Inverter chain model  t −5    5 uin =  (17 − t)5/2   0

5 ≤ t ≤ 10 10 ≤ t ≤ 15 15 ≤ t ≤ 17 otherwise

Equations u˙ 1 = Uop − u1 − Υf (uin , u1 , 0) u˙ k = Uop − uk − Υf (uk −1 , uk , 0) for k = 2, . . . , n



/centre for analysis, scientific computing and applications

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

Inverter chain model  t −5    5 uin =  (17 − t)5/2   0

5 ≤ t ≤ 10 10 ≤ t ≤ 15 15 ≤ t ≤ 17 otherwise

Equations u˙ 1 = Uop − u1 − Υf (uin , u1 , 0) u˙ k = Uop − uk − Υf (uk −1 , uk , 0) for k = 2, . . . , n



/centre for analysis, scientific computing and applications

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

Numerical results

Method Singlerate 1 1 2 2 2

α

rel

2 3 2

10−1 10−2 10−3

nC 1340 82 94 166 97 94

nR 0 1651 1663 1953 2001 1992

kC 5440 1008 996 1313 1225 1637

kR 0 3415 3429 4034 4105 4093

av( ddA )(%) 0 16 15 9 16 22

time (s) 266 87 86 100 105 133

All multirate algorithms are at least two times faster than singlerate because of dynamical partition.



/centre for analysis, scientific computing and applications

S 3.1 3.1 2.7 2.5 2.0

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

Results for Matrix circuit (M = 5, N = 10) with fixed partition method

nC

nR

comp. time (s)

S

singlerate multirate

2937 111

3765

7330 668

11



max. error 5.8 · 10−2 1.8 · 10−1

/centre for analysis, scientific computing and applications

Multirate transient analysis

Automatic partitioning

Numerical experiments

Outline

1

Multirate transient analysis

2

Automatic partitioning

3

Numerical experiments

4

Conclusion



/centre for analysis, scientific computing and applications

Conclusion

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

Conclusion Normal transient simulation can be inefficient for circuits with large slow part. The multirate Compound-Fast BDF algorithm is more efficient for these applications, while the accuracy is preserved.



/centre for analysis, scientific computing and applications

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

Conclusion Normal transient simulation can be inefficient for circuits with large slow part. The multirate Compound-Fast BDF algorithm is more efficient for these applications, while the accuracy is preserved. The partitioning is essential for multirate and should be done automatically.



/centre for analysis, scientific computing and applications

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

Conclusion Normal transient simulation can be inefficient for circuits with large slow part. The multirate Compound-Fast BDF algorithm is more efficient for these applications, while the accuracy is preserved. The partitioning is essential for multirate and should be done automatically. A MATLAB implementation has been constructed with higher order BDF schemes at both grids; error control for H and h based on discretization and interpolation errors; dynamical partition.



/centre for analysis, scientific computing and applications

Multirate transient analysis

Automatic partitioning

Numerical experiments

Conclusion

Conclusion Normal transient simulation can be inefficient for circuits with large slow part. The multirate Compound-Fast BDF algorithm is more efficient for these applications, while the accuracy is preserved. The partitioning is essential for multirate and should be done automatically. A MATLAB implementation has been constructed with higher order BDF schemes at both grids; error control for H and h based on discretization and interpolation errors; dynamical partition.

Multirate has also been implemented in the circuit simulator Pstar.



/centre for analysis, scientific computing and applications

Multirate transient analysis

Automatic partitioning

Numerical experiments

Future plans

Implementation of dynamical partition in Pstar. A framework of a multirate method with a dynamically changing partition already has been developed.



/centre for analysis, scientific computing and applications

Conclusion

Multirate transient analysis

Automatic partitioning

Numerical experiments

Future plans

Implementation of dynamical partition in Pstar. A framework of a multirate method with a dynamically changing partition already has been developed. Performing numerical experiments (in Pstar) for relevant circuit models.



/centre for analysis, scientific computing and applications

Conclusion

Multirate transient analysis

Automatic partitioning

Numerical experiments

Future plans

Implementation of dynamical partition in Pstar. A framework of a multirate method with a dynamically changing partition already has been developed. Performing numerical experiments (in Pstar) for relevant circuit models. Writing PhD-thesis.



/centre for analysis, scientific computing and applications

Conclusion

Suggest Documents