1 / 42

Large Timestep Issues

Large Timestep Issues. Lecture 12 Alessandra Nardi. Thanks to Prof. Sangiovanni, Prof. Newton, Prof. White, Deepak Ramaswamy, Michal Rewienski, and Karen Veroy. Last lecture review. Transient Analysis of dynamical circuits i.e., circuits containing C and/or L Examples

early
Télécharger la présentation

Large Timestep Issues

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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. Forward-Euler Approximation: FE Discrete Equation: Multistep Coefficients: BE Discrete Equation: Multistep Coefficients: Trap Discrete Equation: Multistep Coefficients: Multistep Methods – Common AlgorithmsTR, BE, FE are one-step methods Multistep Equation:

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

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

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

  8. Multistep Methods – StabilityDifference Equation 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

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

  10. Multistep Methods – StabilityStability Theorem Proof Im Re -1 1

  11. Multistep Methods – StabilityA 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. Im(z) Re(z) -1 1 Multistep Methods – StabilityA more formal approach Def: A method is A-stable if the region of absolute stability contains the entire left hand plane (in the  space) Im() Re() -1

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

  14. Multistep Methods – StabilityDahlquist’s Stability Barriers • 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. TR very popular (SPICE)

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

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

  17. Multistep MethodsBE region of absolute stability Backward Euler Im(z) Difference Eqn Stability region Re(z) -1 1 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)  Dt  10-6  5x106 steps !!!

  20. Stiff Problems (Large Timestep Issues)Example 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: • Natural time constants • Input time constants • Interval of interest If these are widely separated, then the problem is stiff

  21. R2 R1 C1 R3 C2 Eigenvectors Eigenvalues Application ProblemsSignal Transmission in an IC – 2x2 example

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

  23. Stiff Problems (Large Timestep Issues)BE on two time-constant circuit Circuit Example 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

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

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

  26. Stiff Problems (Large Timestep Issues)BE on two time-constant circuit Region of Absolute Stability 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 Dt based only on accuracy considerations, the region of absolute stability should allow a large Dt 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=1 k=2

  30. Gear’s Method region of absolute stability(outside the closed curve) k=3 k=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 Dt 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 Dt

  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. Multistep MethodsMore on Implicit Methods Forward-Euler Backward-Euler Requires just function Evaluations Nonlinear equation solution at each step

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

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

  38. Application of linear multistep methods to circuit equations

  39. Transient Analysis Flow Diagram Predict values of variables at tl 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 NO Did NR converge? YES Test solution accuracy Save solution if acceptable Select new Dt and compute new integration formula coeff. NO Done?

  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-1Mx=A-1b • The choice of a preconditioner is largely application specific

More Related