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

Slides:



Advertisements
Similar presentations
Courant and all that Consistency, Convergence Stability Numerical Dispersion Computational grids and numerical anisotropy The goal of this lecture is to.
Advertisements

Formal Computational Skills
Ordinary Differential Equations
Lecture 18 - Numerical Differentiation
1cs542g-term Notes  Notes for last part of Oct 11 and all of Oct 12 lecture online now  Another extra class this Friday 1-2pm.
CSE245: Computer-Aided Circuit Simulation and Verification Lecture Note 2: State Equations Prof. Chung-Kuan Cheng 1.
CSE245: Computer-Aided Circuit Simulation and Verification Lecture Note 5 Numerical Integration Spring 2010 Prof. Chung-Kuan Cheng 1.
Ch 5.2: Series Solutions Near an Ordinary Point, Part I
1 EE 616 Computer Aided Analysis of Electronic Networks Lecture 12 Instructor: Dr. J. A. Starzyk, Professor School of EECS Ohio University Athens, OH,
CSE245:Lec4 02/24/2003. Integration Method Problem formulation.
Numerical Integration CSE245 Lecture Notes. Content Introduction Linear Multistep Formulae Local Error and The Order of Integration Time Domain Solution.
Solutions for Nonlinear Equations
1 EE 616 Computer Aided Analysis of Electronic Networks Lecture 12 Instructor: Dr. J. A. Starzyk, Professor School of EECS Ohio University Athens, OH,
CSE245:Lecture12 Advisor: C.K. Cheng Date: 02/13/03.
UCSD CSE245 Notes -- Spring 2006 CSE245: Computer-Aided Circuit Simulation and Verification Lecture Notes Spring 2006 Prof. Chung-Kuan Cheng.
Ordinary Differential Equations (ODEs) 1Daniel Baur / Numerical Methods for Chemical Engineers / Implicit ODE Solvers Daniel Baur ETH Zurich, Institut.
CISE301_Topic8L31 SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM (Term 101) Section 04 Read , 26-2,
Numerical Solution of Ordinary Differential Equation
MATH 685/ CSI 700/ OR 682 Lecture Notes Lecture 10. Ordinary differential equations. Initial value problems.
1 Chapter 6 Numerical Methods for Ordinary Differential Equations.
Numerical Solutions to ODEs Nancy Griffeth January 14, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis.
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
CSE245: Computer-Aided Circuit Simulation and Verification Lecture Note 2: State Equations Prof. Chung-Kuan Cheng.
EE3561_Unit 8Al-Dhaifallah14351 EE 3561 : Computational Methods Unit 8 Solution of Ordinary Differential Equations Lesson 3: Midpoint and Heun’s Predictor.
Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Lecture 3 AB2,AB3, Stability, Accuracy Instructor: Tim Warburton.
1 EEE 431 Computational Methods in Electrodynamics Lecture 4 By Dr. Rasime Uyguroglu
Integration of 3-body encounter. Figure taken from
Scientific Computing Numerical Solution Of Ordinary Differential Equations - Euler’s Method.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. ~ Ordinary Differential Equations ~ Stiffness and Multistep.
7. Introduction to the numerical integration of PDE. As an example, we consider the following PDE with one variable; Finite difference method is one of.
+ Numerical Integration Techniques A Brief Introduction By Kai Zhao January, 2011.
Finite Difference Methods Definitions. Finite Difference Methods Approximate derivatives ** difference between exact derivative and its approximation.
Engineering Analysis – Computational Fluid Dynamics –
Scientific Computing Multi-Step and Predictor-Corrector Methods.
MECN 3500 Inter - Bayamon Lecture 9 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Large Timestep Issues Lecture 12 Alessandra Nardi Thanks to Prof. Sangiovanni, Prof. Newton, Prof. White, Deepak Ramaswamy, Michal Rewienski, and Karen.
© Imperial College London Numerical Solution of Differential Equations 3 rd year JMC group project ● Summer Term 2004 Supervisor: Prof. Jeff Cash Saeed.
Circuits Theory Examples Newton-Raphson Method. Formula for one-dimensional case: Series of successive solutions: If the iteration process is converged,
Numerical Analysis – Differential Equation
Introduction to the Runge-Kutta algorithm for approximating derivatives PHYS 361 Spring, 2011.
1 EE 616 Computer Aided Analysis of Electronic Networks Lecture 12 Instructor: Dr. J. A. Starzyk, Professor School of EECS Ohio University Athens, OH,
Announcements Read Chapters 11 and 12 (sections 12.1 to 12.3)
CSE245: Computer-Aided Circuit Simulation and Verification Lecture Note 2: State Equations Spring 2010 Prof. Chung-Kuan Cheng.
Chapter 5. Ordinary Differential Equation
Today’s class Ordinary Differential Equations Runge-Kutta Methods
Lecture 40 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
ECE 576 – Power System Dynamics and Stability Prof. Tom Overbye Dept. of Electrical and Computer Engineering University of Illinois at Urbana-Champaign.
Ordinary Differential Equations
1/14  5.2 Euler’s Method Compute the approximations of y(t) at a set of ( usually equally-spaced ) mesh points a = t 0 < t 1
Lecture 39 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
NUMERICAL DIFFERENTIATION or DIFFERENCE APPROXIMATION Used to evaluate derivatives of a function using the functional values at grid points. They are.
Solving Ordinary Differential Equations
Lecture 11 Alessandra Nardi
Numerical Methods for Partial Differential Equations
CSE245: Computer-Aided Circuit Simulation and Verification
Class Notes 18: Numerical Methods (1/2)
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM (Term 101) Section 04 Read , 26-2, 27-1 CISE301_Topic8L4&5.
CSE 245: Computer Aided Circuit Simulation and Verification
CSE245: Computer-Aided Circuit Simulation and Verification
Chapter 26.
Sec 21: Analysis of the Euler Method
CSE245: Computer-Aided Circuit Simulation and Verification
ECE 576 POWER SYSTEM DYNAMICS AND STABILITY
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM (Term 101) Section 04 Read , 26-2, 27-1 CISE301_Topic8L2.
ECE 576 POWER SYSTEM DYNAMICS AND STABILITY
Chapter 2 A Survey of Simple Methods and Tools
EE 616 Computer Aided Analysis of Electronic Networks Lecture 12
Presentation transcript:

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

Numerical Integration: Outline One-step Method for ODE (IVP) –Forward Euler –Backward Euler –Trapezoidal Rule –Equivalent Circuit Model Convergence Analysis Linear Multi-Step Method Time Step Control 2

Ordinary Difference Equations N equations, n x variables, n dx/dt. Typically analytic solutions are not available  solve it numerically 3

Numerical Integration Forward Euler Backward Euler Trapezoidal 4

Numerical Integration: State Equation Forward Euler Backward Euler 5

Numerical Integration: State Equation Trapezoidal 6

7 Equivalent Circuit Model-BE Capacitor + C

8 Equivalent Circuit Model-BE Inductor + L

9 Equivalent Circuit Model-TR Capacitor + C

10 Equivalent Circuit Model-TR Inductor + L

Trap Rule, Forward-Euler, Backward-Euler All are one-step methods x k+1 is computed using only x k, not x k-1, x k-2, x k-3... Forward-Euler is the simplest No equation solution explicit method. Backward-Euler is more expensive Equation solution each step implicit method most stable (FE/BE/TR) Trapezoidal Rule might be more accurate Equation solution each step implicit method More accurate but less stable, may cause oscillation Summary of Basic Concepts 11

12 Stabilities Froward Euler

Difference Eqn Stability region 1 Im(z) Re(z) Forward Euler ODE stability region Region of Absolute Stability FE region of absolute stability 13

14 Stabilities Backward Euler

Difference Eqn Stability region 1 Im(z) Re(z) Backward Euler Region of Absolute Stability BE region of absolute stability 15

16 Stabilities Trapezoidal

Convergence Consistency: A method of order p (p>1) is consistent if Stability: A method is stable if: Convergence: A method is convergent if: Consistency + Stability Convergence 17

A-Stable Dahlquist Theorem: –An A-Stable LMS (Linear Multi-Step) method cannot exceed 2nd order accuracy The most accurate A-Stable method (smallest truncation error) is trapezoidal method. 18

Convergence Analysis: Truncation Error Local Truncation Error (LTE): –At time point t k+1 assume x k is exact, the difference between the approximated solution x k+1 and exact solution x * k+1 is called local truncation error. –Indicates consistency –Used to estimate next time step size in SPICE Global Truncation Error (GTE): –At time point t k+1, assume only the initial condition x 0 at time t 0 is correct, the difference between the approximated solution x k+1 and the exact solution x * k+1 is called global truncation error. –Indicates stability 19

LTE Estimation: SPICE Taylor Expansion of x n+1 about the time point t n : x(t n+1 )=x(t n )+dx(t n )/dt∙h+d 2 x(t n )/dt 2 ∙h 2 /2!+d 3 x(t n )/dt 3 ∙h 3 /3!+… Taylor Expansion of x n about the time point t n+1 : x(t n )=x(t n+1 )-dx(t n+1 )/dt∙h+d 2 x(t n+1 )/dt 2 ∙h 2 /2!-d 3 x(t n+1 )/dt 3 ∙h 3 /3!+… Forward Euler –Exercise x(t n+1 )-x n+1 =x(t n+1 )-(x n +hdx n /dt) Backward Euler –Exercise x(t n+1 )-x n+1 =x(t n+1 )-(x n +hdx n+1 /dt) Trapezoidal –Exercise x(t n+1 )-x n+1 =x(t n+1 )-[x n +(dx n /dt+dx n+1 /dt)h/2] LTE 20

Formula for pth order method LTE 21 Formula E(x(t),h)=∑ i=0,k a i x(t n-i )+hb i dx(t n-i )/dt Let x(t)=[(t n -t)/h] p E(x(t),h)=∑ i=0,k a i [(t n -t n-i )/h] p -pb i [(t n -t n-i )/h] p-1 =∑ i=0,k a i i p -pb i i p-1 If the formula is a pth order method, we have Case p=0: ∑ i=0,k a i =0 Case p=1: ∑ i=0,k a i i-b i =0 …… Case p: ∑ i=0,k (a i i-pb i )i p-1 =0

Formula for pth order method: Example LTE 22 Forward Euler: We have a 0 =1, a 1 =-1, b 0 =0, b 1 =-1 Case p=0: ∑ i=0,k a i =0 Case p=1: ∑ i=0,k a i i-b i =0 Case p=2: ∑ i=0,k (a i i-2b i )i=-1+2=1 Backward Euler: We have a 0 =1, a 1 =-1, b 0 =-1, b 1 =0 Case p=0: ∑ i=0,k a i =0 Case p=1: ∑ i=0,k a i i-b i =0 Case p=2: ∑ i=0,k (a i i-2b i )i=-1+2=1 Trapezoidal Rule: We have a 0 =1, a 1 =-1, b 0 =-1/2, b 1 =-1/2 Case p=0: ∑ i=0,k a i =0 Case p=1: ∑ i=0,k a i i-b i =0 Case p=2: ∑ i=0,k (a i i-2b i )i=0 Case p=3: ∑ i=0,k (a i i-3b i )i 2 =-1+3/2=1/2

Formula for pth order method: Variables LTE 23 There are 2(k+1)-1 unknowns (a 0 =1), and p+1 equations. Thus, we need 2(k+1)-1 ≥ p+1 In other words, k ≥ p/2

Formula for pth order method: Local Truncation Error LTE 24 By Taylor’s expansion, we have x(t)=x(t n )+x’(t n )(t-t n )+…+1/(p+1)! x (p+1) (t n )(t-t n ) p+1 +… Thus, the error of pth order method is ∑ i=0,k {a i [(t n -t n-i )/h] p+1 -pb i [(t n -t n-i )/h] p }1/(p+1)! x (p+1) (t n )h p+1 +O(h p+2 ) Let us set E p+1 ={∑ i=0,k a i i p+1 -pb i i p }/p! Methoda0a0 a1a1 b0b0 b1b1 E p+1 FE10 E 2 =1/2 BE1 0E 2 =1/2 TR1-1/2 E 3 =1/12

Time Step Control: SPICE We have derived the local truncation error the unit is charge for capacitor and flux for inductor Similarly, we can derive the local truncation error in terms of (1) the unit is current for capacitor and voltage for inductor Suppose E D represents the absolute value of error that is allowed per time point. That is together with (1) we can calculate the time step as 25

Time Step Control: SPICE (cont ’ d) DD 3 (t n+1 ) is called 3rd divided difference, which is given by the recursive formula 26

Multiple Step Integration: Stability For a system x’=λx, let q= λh. The integration formula is ∑ i=0,k a i x n-i +hb i x’ n-i =0. We set (a 0 +qb 0 )z k + (a 1 +qb 1 )z k-1 …+(a k +qb k )=0 There are k roots, r i, of the polynomial eq. The generic solution is x n =c 1 r 1 n +c 2 r 2 n +…+c k r k n but for multiplicity root, we have x n =…+(c i0 +c i1 n+…+c im n m-1 )r i n +… If |r i |< 1 for all i, the system is stable Else for |r i |= 1 but not multiplicity root, the system remains stable 27

Multiple Step Integration: Stability For a system x’=λx, let q= λh. The integration formula is ∑ i=0,k a i x n-i +hb i x’ n-i =0. We set (a 0 +qb 0 )z k + (a 1 +qb 1 )z k-1 …+(a k +qb k )=0 Examples using FE, BE, TZ methods 28 Methoda0a0 a1a1 b0b0 b1b1 root FE10 1+q BE1 01/(1-q) TR1-1/2 (1+q/2)/(1-q/2)

Multiple Step Integration: Stability For a system x’=λx, let q= λh. The integration formula is ∑ i=0,k a i x n-i +hb i x n-i =0. A Stability: The system is stable for all Real(q)≤ 0. Dahlquist’s barrier: –An A-Stable LMS (Linear Multi-Step) method cannot exceed 2nd order accuracy 29