Presentation is loading. Please wait.

Presentation is loading. Please wait.

Large Timestep Issues Lecture 12 Alessandra Nardi Thanks to Prof. Sangiovanni, Prof. Newton, Prof. White, Deepak Ramaswamy, Michal Rewienski, and Karen.

Similar presentations


Presentation on theme: "Large Timestep Issues Lecture 12 Alessandra Nardi Thanks to Prof. Sangiovanni, Prof. Newton, Prof. White, Deepak Ramaswamy, Michal Rewienski, and Karen."— Presentation transcript:

1 Large Timestep Issues Lecture 12 Alessandra Nardi Thanks to Prof. Sangiovanni, Prof. Newton, Prof. White, Deepak Ramaswamy, Michal Rewienski, and Karen Veroy

2 Last lecture review Transient Analysis of dynamical circuits –i.e., circuits containing C and/or L Examples Solution of ODEs (IVP) –Forward Euler (FE), Backward Euler (BE) and Trapezoidal Rule (TR) –Multistep methods –Convergence Consistency

3 Outline Convergence for multistep methods –Stability Region of Absolute Stability Dahlquist’s Stability Barriers Stiff Stability (Large timestep issues) –Examples –Analysis of FE, BE –Gear’s Method –Variable step size More on Implicit Methods –Solution with NR Application of multistep to circuit equations

4 Multistep Equation: FE Discrete Equation: Forward-Euler Approximation: Multistep Coefficients: BE Discrete Equation:Trap Discrete Equation: Multistep Coefficients: Multistep Methods – Common Algorithms TR, BE, FE are one-step methods

5 1) Local Condition: One step errors are small (consistency) 2) Global Condition: The single step errors do not grow too quickly (stability) Typically verified using Taylor Series All one-step methods are stable in this sense. Multistep Methods – Convergence Analysis Two conditions for Convergence

6 We made the LTE so small, how come the Global error is so large? Multistep Method Difference Equation Why did the “best” 2-step explicit method fail to Converge? Global Error LTE Multistep Methods – Stability Difference Equation

7 Three important observations An Aside on Solving Difference Equations Consider a general kth order difference equation

8 Multistep Method Difference Equation Definition: A multistep method is stable if and only if Theorem: A multistep method is stable if and only if Less than one in magnitude or equal to one and distinct Multistep Methods – Stability Difference Equation

9 Given the Multistep Method Difference Equation If the roots of less than one in magnitude equal to one in magnitude but distinct are either Then from the aside on difference equations From which stability easily follows. Multistep Methods – Stability Stability Theorem Proof

10 1 Re Im Multistep Methods – Stability Stability Theorem Proof

11 Multistep Methods – Stability A more formal approach Def: A method is stable if all the solutions of the associated difference equation obtained from (1) setting q=0 remain bounded if l  The region of absolute stability of a method is the set of q such that all the solutions of (1) remain bounded if l  Note that a method is stable if its region of absolute stability contains the origin (q=0)

12 Multistep Methods – Stability A more formal approach Def: A method is A-stable if the region of absolute stability contains the entire left hand plane (in the space) Re(z) Im(z) 1 Re( ) Im( )

13 Each method is associated with two polynomials  and  : –  : associated with function past values –  : associated with derivative past values Stability: roots of  must stay in |z|  1 and be simple on |z|=1 Absolute stability: roots of (  q  must stay in |z|  1 and be simple on |z|=1 when Re(q)<0. Multistep Methods – Stability A more formal approach

14 First: For a stable, explicit k-step multistep method, the maximum number of exactness constraints that can be satisfied is less than or equal to k (note there are 2k coefficients). For implicit methods, the number of constraints that can be satisfied is either k+2 if k is even or k+1 if k is odd. Second: There are no A-stable methods of convergence order greater than 2, and the trapezoidal rule is the most accurate. Multistep Methods – Stability Dahlquist’s Stability Barriers TR very popular (SPICE)

15 1) Local Condition: One step errors are small (consistency) 2) Global Condition: One step errors grow slowly (stability) Exactness Constraints up to p 0 (p 0 must be > 0) Convergence Result: Multistep Methods – Convergence Analysis Conditions for convergence – Consistency & Stability

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

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

18 Summary Convergence for one-step methods –Consistency for FE –Stability for FE Convergence for multistep methods –Consistency (Exactness Constraints) Selecting coefficients –Stability Region of Absolute Stability Dahlquist’s Stability Barriers

19 Stiff Problems ( Large Timestep Issues) Example Interval of interest is [0,5] Uniform step size (for accuracy)   t  10 -6  5x10 6 steps !!!

20 Strategy (for previous example): Take 5 steps of size 10 -6 for accuracy during initial phase and then 5 steps of size 1. Stiff problem: 1.Natural time constants 2.Input time constants 3.Interval of interest If these are widely separated, then the problem is stiff Stiff Problems ( Large Timestep Issues) Example

21 C1C1 R2R2 R1R1 R3R3 C2C2 Application Problems Signal Transmission in an IC – 2x2 example Eigenvectors Eigenvalues

22 Forward-Euler Computed Solution The Forward-Euler is accurate for small timesteps, but goes unstable when the timestep is enlarged Stiff Problems ( Large Timestep Issues) FE on two time-constant circuit

23 Backward-Euler Computed Solution With Backward-Euler it is easy to use small timesteps for the fast dynamics and then switch to large timesteps for the slow decay Circuit Example Stiff Problems ( Large Timestep Issues) BE on two time-constant circuit

24 Scalar ODE: Forward-Euler: Backward-Euler: Trap Rule: Multistep Methods ( Large Timestep Issues) BE, FE, TR on the scalar ODE problem

25 ODE stability region Region of Absolute Stability Stiff Problems ( Large Timestep Issues) FE on two time-constant circuit ODE stability region Region of Absolute Stability

26 Region of Absolute Stability Stiff Problems ( Large Timestep Issues) BE on two time-constant circuit Region of Absolute Stability

27 Stiff Problems We showed that: –The analysis of stiff circuits requires the use of variable step sizes –Not all the linear multistep methods can be efficiently used to integrate stiff equations To be able to choose  t based only on accuracy considerations, the region of absolute stability should allow a large  t for large time constants, without being constrained by the small time constants Clearly A-stable methods satisfy this requirement

28 Backward Differentiation Formula - BDF (Gear Methods) Note that Gear’s first order method is BE It can be shown that: –Gear’s methods up to order 6 are stiffly stable and are well-suited for stiff ODEs –Gear’s methods of order higher than 6 are not stiffly stable Less stringent than A-stable

29 Gear’s Method region of absolute stability (outside the closed curve) k=1k=2

30 Gear’s Method region of absolute stability (outside the closed curve) k=3k=4

31 Variable step size When the step size is changed during the integration, the coefficients of the method need to be recomputed at each iteration Example: Gear’s method of order 2

32 Variable step size

33 More observations To minimize the computation time needed to integrate differential equations, the  t must be chosen as large as possible provided that the desired accuracy is achieved –Several approximation are available. SPICE2 uses Divided Differences At a certain time point, different integration methods would allow different step size –Advantageous to implement a strategy which allows a change of method as well as of  t

34 Summary on Stiff Stability FE: timestep is limited by stability and not by accuracy BE: A-stable, any timestep could be used TR: most accurate A-stable multistep method Gear: stiffly stable method (up to order 6) The analysis of stiff circuits requires the use of variable timestep

35 Forward-Euler Requires just function Evaluations Backward-Euler Nonlinear equation solution at each step Multistep Methods More on Implicit Methods

36 Rewrite the multistep Equation Solve with Newton Here j is the Newton iteration index Jacobian Multistep Implicit Methods Solution with Newton

37 Newton Iteration: Solution with Newton is very efficient Easy to generate a good initial guess using polynomial fitting Polynomial Predictor Converged Solution Jacobian become easy to factor for small timesteps Multistep Implicit Methods Solution with Newton

38 Application of linear multistep methods to circuit equations

39 Transient Analysis Flow Diagram Predict values of variables at t l Replace C and L with resistive elements via integration formula Replace nonlinear elements with G and indep. sources via NR Assemble linear circuit equations Solve linear circuit equations Did NR converge? Test solution accuracy Save solution if acceptable Select new  t and compute new integration formula coeff. Done? YES NO

40 Summary Transient Analysis of dynamical circuits Solution of ODEs (IVP) –FE, BE and TR –Multistep methods –Convergence Consistency Stability Stiff Stability (Large timestep issues) –Gear’s method Application of multistep to circuit equations Did not talk about: –Runge-Kutta –Predictor-Corrector Methods

41 Summary on circuit simulation Circuit Equation Formulation –STA, MNA DC Analysis of Nonlinear Circuits –Solution of Linear Equations (direct and iterative methods) –Solution of Nonlinear Equations (Newton’s method) Transient Analysis of Nonlinear Circuits –Solution of Ordinary Differential Equations- IVP (multistep methods)

42 Appendix to circuit simulation Preconditioners The convergence rate of iterative methods depends on spectral properties of the coefficient matrix. Hence one may attempt to transform the linear system into one that is equivalent, but that has more favorable spectral properties. A preconditioner is a matrix that effects such a transformation: Mx=b  A -1 Mx=A -1 b The choice of a preconditioner is largely application specific


Download ppt "Large Timestep Issues Lecture 12 Alessandra Nardi Thanks to Prof. Sangiovanni, Prof. Newton, Prof. White, Deepak Ramaswamy, Michal Rewienski, and Karen."

Similar presentations


Ads by Google