Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSE245: Computer-Aided Circuit Simulation and Verification Lecture Note 5.1 Numerical Integration Prof. Chung-Kuan Cheng 1.

Similar presentations


Presentation on theme: "CSE245: Computer-Aided Circuit Simulation and Verification Lecture Note 5.1 Numerical Integration Prof. Chung-Kuan Cheng 1."— Presentation transcript:

1 CSE245: Computer-Aided Circuit Simulation and Verification Lecture Note 5.1 Numerical Integration Prof. Chung-Kuan Cheng 1

2 Numerical Integration: Outline Richardson extrapolation (Bulirsch-Stoer) Rosenbrock method (Runge Kutta) Predictor-corrector method Matrix exponential 2

3 Integration Methods 3

4 Bulirsch-Stoer Method Caveats: Nonsmooth function: RK Contain singular points: RK Very smooth and right-hand sides expensive to compute: Predictor-corrector 4

5 Bulirsch-Stoer Method Approach: Modified midpoint method Extrapolation Stepsize control 5

6 Bulirsch-Stoer Method: midpoint method Given dx/dt=f(t,x), H and n, set h=H/n z 0 =x(t) z 1 =z 0 +hf(t,z 0 ) z m+1 =z m-1 +2hf(t+mh,z m ) for m=1,2,.., n-1 x(t+H): x n =1/2[z n +z n-1 +hf(t+H,z n )] Error: x n -x(t+H)=∑ i=1 a i h 2i [1,2,3] Example Sequence: n=2,4,6,8,10,12,14,…(Deuflhard) 6

7 Bulirsch-Stoer Method: Extrapolation 7 T 00 T 10 T 11 T 20 T 21 T 22 ………… T k0 =x k T k,j+1 =T kj +(T kj -T k-1,j )/[(n k /n k-j ) 2 -1], j=0,1,…,k-1 Solution: T kk Error: |T kk -T k,k-1 | Err k : H 2k+1

8 Bulirsch-Stoer Method: Stepsize Control 8 Stepzie H k =HS 1 (S 2 /err k ) 1/(2k+1) Complexity A 0 =n 0 +1 A k+1 =A k +n k+1 Work per unit step W k =A k /H k Strategy minimize W k ([4].17.3.3) For y(x+H)≈y n +(y n -y n/2 )/3, we use 1.5 derivative evaluations per step h. For Runge-Kutta, it takes 4 evaluations.

9 ODE: dx/dt=f(x) Stepsize: h Process: x(t 0 +h)=x 0 +∑ i=1,s b i k i (1-rhf’)k i =hf(x 0 +∑ j=1,i-1 a ij k j )+hf’∑ j=1,i-1 r ij k j, i=1,…,s Runge-Kutta: r=r ij =0 for all ij. Rosenbrock Methods 9

10 For 4 th order RK method, we evaluate the derivatives four times: once at the initial points, twice at trial midpoints, and once at a trial endpoint. The final solution is calculated from the 4 derivatives. k 1 = hf(t n, x n ) k 2 =hf(t n +0.5h, x n +0.5k 1 ) k 3 = hf(t n +0.5h, x n +0.5k 2 ) k 4 = hf(t n +h, x n +k 3 ) x n+1 =x n +1/6k 1 +1/3k 2 +1/3k 3 +1/6k 4 +O(h 5 ) Rung-Kutta Method (4 th order) 10

11 Predictor-Corrector Methods: Admas-Bashforth 11 ODE: dx/dt=f(x) Predictor x n+1 =x n +h/12(23f n-1 -16f n-1 +5f n-2 )+O(h 4 ) Corrector x n+1 =x n +h/12(5f n+1 +8f n -f n-1 )+O(h 4 )

12 References 12 1.J.A. Gaunt, The deferred approach to the limit, II- interpenetrating lattices, Trans. Roy, Soc., Lond. 226, 350-361, 1927 2.R. De Vogelaere, On a paper of Gaunt concerned with the start of numerical solutions of differential equations, Z. Angew. Math. Phys, 151-156, 1957 3.W.B. Gragg, On extrapolation algorithms for ordinary initial value problems, J. of SIAM, 384-403, 1965 4.W.H. Press, S.A. Teukolsky, W.T. Vetterling, B.P. Flannery, Numerical recipes, 3 rd Edition, 2007


Download ppt "CSE245: Computer-Aided Circuit Simulation and Verification Lecture Note 5.1 Numerical Integration Prof. Chung-Kuan Cheng 1."

Similar presentations


Ads by Google