Numerical Integration
description
Transcript of Numerical Integration
![Page 1: Numerical Integration](https://reader036.fdocuments.us/reader036/viewer/2022081506/56812de6550346895d933fb7/html5/thumbnails/1.jpg)
Numerical Integration
CSE245 Lecture Notes
![Page 2: Numerical Integration](https://reader036.fdocuments.us/reader036/viewer/2022081506/56812de6550346895d933fb7/html5/thumbnails/2.jpg)
Content
Introduction Linear Multistep Formulae Local Error and The Order of
Integration Time Domain Solution of Linear
Networks
![Page 3: Numerical Integration](https://reader036.fdocuments.us/reader036/viewer/2022081506/56812de6550346895d933fb7/html5/thumbnails/3.jpg)
Introduction Transient analysis is to obtain the
transient response of the circuits. Equations for transient analysis are
usually differential equations. Numerical integration: calculate the
approximate solutions Xn. Linear multistep formulae are the
primary numerical integration method.
![Page 4: Numerical Integration](https://reader036.fdocuments.us/reader036/viewer/2022081506/56812de6550346895d933fb7/html5/thumbnails/4.jpg)
Linear Multistep Formulae Differential equations are
X = F(X) Assume values Xn-1, Xn-2, … , Xn-k and
derivatives Xn-1, Xn-2, … , Xn-k are known, the solution Xn and Xn can be approximated by a polynomial of these values: iXn-i + h iXn-i = 0
i=0
k
i=0
k
![Page 5: Numerical Integration](https://reader036.fdocuments.us/reader036/viewer/2022081506/56812de6550346895d933fb7/html5/thumbnails/5.jpg)
Linear Multistep Formulae
There are two distinct classes LMS: Explicit predictors
--- 0 = 0
--- Xn is the only unknown variable Implicit
--- 0 0
--- Xn, Xn are all unknown variables.
![Page 6: Numerical Integration](https://reader036.fdocuments.us/reader036/viewer/2022081506/56812de6550346895d933fb7/html5/thumbnails/6.jpg)
Linear Multistep Formulae
Three simplest LMS formulae: The forward Euler The backward Euler Trapezoidal
![Page 7: Numerical Integration](https://reader036.fdocuments.us/reader036/viewer/2022081506/56812de6550346895d933fb7/html5/thumbnails/7.jpg)
Linear Multistep Formulae The forward Euler
Xn – Xn-1 – h Xn-1 = 0
where 0 = 1, 1 = -1, 0 = 0, 1 = -1
tn-1 tn
Xn-1
Xn X(tn)
X(t)
t
![Page 8: Numerical Integration](https://reader036.fdocuments.us/reader036/viewer/2022081506/56812de6550346895d933fb7/html5/thumbnails/8.jpg)
Linear Multistep Formulae
The backward EulerXn – Xn-1 – h Xn = 0
where 0 = 1, 1 = -1, 0 = -1, 1 = 0 It is an implicit representation. We
may assume some initial value for Xn and iterate to approximate the solution Xn and Xn.
![Page 9: Numerical Integration](https://reader036.fdocuments.us/reader036/viewer/2022081506/56812de6550346895d933fb7/html5/thumbnails/9.jpg)
Linear Multistep Formulae
TrapezoidalXn – Xn-1 – h (Xn + Xn-1 )/2= 0
where 0 = 1, 1 = -1, 0 = -1/2, 1 = -1/2
It is also an implicit representation. Xn, Xn can be obtained through some iterative procedure.
![Page 10: Numerical Integration](https://reader036.fdocuments.us/reader036/viewer/2022081506/56812de6550346895d933fb7/html5/thumbnails/10.jpg)
Local Error
Two crucial concepts Local error --- the error introduced in
a single step of the integration routine.
Global error--- the overall error caused by repeated application of the integration formula.
![Page 11: Numerical Integration](https://reader036.fdocuments.us/reader036/viewer/2022081506/56812de6550346895d933fb7/html5/thumbnails/11.jpg)
Local Error
X(t)
t
Global error and local error
Converging flow
Diverging flow
![Page 12: Numerical Integration](https://reader036.fdocuments.us/reader036/viewer/2022081506/56812de6550346895d933fb7/html5/thumbnails/12.jpg)
Local Error
Two types of error in each step: Round-off error --- due to the finite-
precision (floating-point) arithmetic. Truncation error --- caused by
truncation of the infinite Taylor series, present even with infinite-precision arithmetic.
![Page 13: Numerical Integration](https://reader036.fdocuments.us/reader036/viewer/2022081506/56812de6550346895d933fb7/html5/thumbnails/13.jpg)
Local Error and Order of Integration
Local error Ek for LMS
Ek = X(tn) +
Ek can be expanded into Taylor series. If the coefficients of the first pth derivatives are zero, the order of integration is p.
iX(tn-i) + h iX(tn-i) i=1
k
i=0
k
![Page 14: Numerical Integration](https://reader036.fdocuments.us/reader036/viewer/2022081506/56812de6550346895d933fb7/html5/thumbnails/14.jpg)
Order of Integration Let X(t) = ((tn-t)/h)l and tn – tn-i = ih,
Ek =
For pth order integration, the first p+1 elements (l = 0, 1, … , p) will all be zeros:
l = 0
l = 1
…
l = p
i((tn-tn-i)/h)l + h (-l/h) i ((tn-tn-i)/h)l-1 i=0
k
i=0
k
i = 0i=0
k
(ii - i) = 0i=0
k
[(ii - pi)ip-1] = 0i=0
k
![Page 15: Numerical Integration](https://reader036.fdocuments.us/reader036/viewer/2022081506/56812de6550346895d933fb7/html5/thumbnails/15.jpg)
Order of Integration
The forward Euler0 = 1, 1 = -1, 0 = 0, 1 = -1 So l = 0 0 + 1 = 1 + (-1) = 0;
l = 1 00 + 11 - 0 - 1 = 10 + (-1)1 - 0 – (-1) = 0;
l = 2 (11 - 21)1 = ((-1)1 - 2(-1))1 = 1 0;
The forward Euler is 1th order.
![Page 16: Numerical Integration](https://reader036.fdocuments.us/reader036/viewer/2022081506/56812de6550346895d933fb7/html5/thumbnails/16.jpg)
Order of Integration
The backward Euler0 = 1, 1 = -1, 0 = -1, 1 = 0
So l = 0 0 + 1 = 1 + (-1) = 0;l = 1 00 + 11 - 0 - 1 = 10 + (-1)1 -
(-1) - 0 = 0;l = 2 (11 - 21)1 = ((-1)1 - 20)1 = -1
0;
The backward Euler is 1th order.
![Page 17: Numerical Integration](https://reader036.fdocuments.us/reader036/viewer/2022081506/56812de6550346895d933fb7/html5/thumbnails/17.jpg)
Order of Integration
Trapezoidal0 = 1, 1 = -1, 0 = -1/2, 1 = -1/2So l = 0 0 + 1 = 1 + (-1) = 0;
l = 1 00 + 11 - 0 - 1 = 10 + (-1)1 - (-1/2) – (-1/2) = 0;
l = 2 (11 - 21)1 = ((-1)1 - 2(-1/2))1 = 0;l = 3 (11 - 31)12 = ((-1)1 - 3(-1/2))1 = 1/2 0;
The trapezoidal method is 2th order
![Page 18: Numerical Integration](https://reader036.fdocuments.us/reader036/viewer/2022081506/56812de6550346895d933fb7/html5/thumbnails/18.jpg)
Order of Integration The algorithm for defining and :--- Choose p, the order of the numerical
integration method needed;--- Choose k, the number of previous values
needed;--- Write down the (p+1) equations of pth order
accuracy;--- Choose other (2k-p) constrains of the
coefficients and ;--- Combine and solve above (2k+1) equations;--- Get the result coefficients and .
![Page 19: Numerical Integration](https://reader036.fdocuments.us/reader036/viewer/2022081506/56812de6550346895d933fb7/html5/thumbnails/19.jpg)
Solution of Linear Networks
Combine the differential equations for linear networks and the numerical integration equations:
MX = -GX + Pu
iXn-i + h iXn-i = 0 i=0
k
i=0
k(1)
(2)
![Page 20: Numerical Integration](https://reader036.fdocuments.us/reader036/viewer/2022081506/56812de6550346895d933fb7/html5/thumbnails/20.jpg)
Solution of Linear Networks
(1) Xn + h0Xn +
Xn + h0Xn + b = 0
Xn = (-1/h0)( Xn + b)
(2)+(3) M[(-1/h0)( Xn + b)] = -GXn + Pu
(-1/h0) Xn = -GXn + Pu +
(M/h0)b
iXn-i + h iXn-i = 0 i=1
k
i=1
k
(3)
![Page 21: Numerical Integration](https://reader036.fdocuments.us/reader036/viewer/2022081506/56812de6550346895d933fb7/html5/thumbnails/21.jpg)
Solution of Linear Networks For capacitance
C vc = ic
C [(-1/h0)( vc + bc)] = ic
(-C/h0) vc – (C/h0) bc = ic
ic
vc
vc
ic
– (C/h0) bc (-C/h0)
![Page 22: Numerical Integration](https://reader036.fdocuments.us/reader036/viewer/2022081506/56812de6550346895d933fb7/html5/thumbnails/22.jpg)
Solution of Linear Networks For inductance
L il = vl
L [(-1/h0)( il + bl)] = vl
(-L/h0) il – (L/h0) bl = vl
il
vl
+-
il
– (L/h0) bl
(-L/h0)
vl
![Page 23: Numerical Integration](https://reader036.fdocuments.us/reader036/viewer/2022081506/56812de6550346895d933fb7/html5/thumbnails/23.jpg)
References CK. Cheng, John Lillis, Shen Lin and
Norman Chang“Interconnect Analysis and Synthesis”, Wiley and Sons, 2000
Jiri Vlach and Kishore Singhal“Computer Methods for Circuit Analysis and Design”, 1983