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

Slides:



Advertisements
Similar presentations
Finite Difference Discretization of Hyperbolic Equations: Linear Problems Lectures 8, 9 and 10.
Advertisements

Numerical Integration
Modified Newton Methods Lecture 9 Alessandra Nardi Thanks to Prof. Jacob White, Jaime Peraire, Michal Rewienski, and Karen Veroy.
CSE245: Computer-Aided Circuit Simulation and Verification Lecture Note 5 Numerical Integration Prof. Chung-Kuan Cheng 1.
Ordinary Differential Equations
1cs542g-term Notes. 2 Solving Nonlinear Systems  Most thoroughly explored in the context of optimization  For systems arising in implicit time.
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.
CSE 245: Computer Aided Circuit Simulation and Verification Fall 2004, Nov Nonlinear Equation.
CSE245: Computer-Aided Circuit Simulation and Verification Lecture Note 5 Numerical Integration Spring 2010 Prof. Chung-Kuan Cheng 1.
1 EE 616 Computer Aided Analysis of Electronic Networks Lecture 5 Instructor: Dr. J. A. Starzyk, Professor School of EECS Ohio University Athens, OH,
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,
Efficient Simulation of Physical System Models Using Inlined Implicit Runge-Kutta Algorithms Vicha Treeaporn Department of Electrical & Computer Engineering.
1 EE 616 Computer Aided Analysis of Electronic Networks Lecture 5 Instructor: Dr. J. A. Starzyk, Professor School of EECS Ohio University Athens, OH,
Ordinary Differential Equations (ODEs) 1Daniel Baur / Numerical Methods for Chemical Engineers / Implicit ODE Solvers Daniel Baur ETH Zurich, Institut.
Ordinary Differential Equations Final Review Shurong Sun University of Jinan Semester 1,
Chapter 16 Integration of Ordinary Differential Equations.
Ordinary Differential Equations (ODEs)
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.
Ordinary Differential Equations (ODEs) 1Daniel Baur / Numerical Methods for Chemical Engineers / Explicit ODE Solvers Daniel Baur ETH Zurich, Institut.
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
Boyce/DiPrima 9th ed, Ch 8.4: Multistep Methods Elementary Differential Equations and Boundary Value Problems, 9th edition, by William E. Boyce and Richard.
Time integration methods for the Heat Equation Solution u for t= Tobias Köppl TUM.
Autumn 2008 EEE8013 Revision lecture 1 Ordinary Differential Equations.
Interpolation. Interpolation is important concept in numerical analysis. Quite often functions may not be available explicitly but only the values of.
Erin Catto Blizzard Entertainment Numerical Integration.
EE3561_Unit 8Al-Dhaifallah14351 EE 3561 : Computational Methods Unit 8 Solution of Ordinary Differential Equations Lesson 3: Midpoint and Heun’s Predictor.
ME451 Kinematics and Dynamics of Machine Systems
ME451 Kinematics and Dynamics of Machine Systems Numerical Solution of DAE IVP Newmark Method November 1, 2013 Radu Serban University of Wisconsin-Madison.
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
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.
CHAPTER 3 NUMERICAL METHODS
16.920J/SMA 5212 Numerical Methods for PDEs Lecture 5 Finite Differences: Parabolic Problems B. C. Khoo Thanks to Franklin Tan SMA-HPC ©2002 NUS.
Circuits Theory Examples Newton-Raphson Method. Formula for one-dimensional case: Series of successive solutions: If the iteration process is converged,
Direct Methods for Linear Systems Lecture 3 Alessandra Nardi Thanks to Prof. Jacob White, Suvranu De, Deepak Ramaswamy, Michal Rewienski, and Karen Veroy.
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)
Ch 2.1: Linear Equations; Method of Integrating Factors A linear first order ODE has the general form where f is linear in y. Examples include equations.
Chapter 5. Ordinary Differential Equation
Ch 8.2: Improvements on the Euler Method Consider the initial value problem y' = f (t, y), y(t 0 ) = y 0, with solution  (t). For many problems, Euler’s.
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.
Krylov-Subspace Methods - I Lecture 6 Alessandra Nardi Thanks to Prof. Jacob White, Deepak Ramaswamy, Michal Rewienski, and Karen Veroy.
Ordinary Differential Equations
Sec 21: Generalizations of the Euler Method Consider a differential equation n = 10 estimate x = 0.5 n = 10 estimate x =50 Initial Value Problem Euler.
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.
Krylov-Subspace Methods - II Lecture 7 Alessandra Nardi Thanks to Prof. Jacob White, Deepak Ramaswamy, Michal Rewienski, and Karen Veroy.
Solving Ordinary Differential Equations
Lecture 11 Alessandra Nardi
Ordinary Differential Equations
CSE 245: Computer Aided Circuit Simulation and Verification
ECE 576 – Power System Dynamics and Stability
CSE245: Computer-Aided Circuit Simulation and Verification
Class Notes 18: Numerical Methods (1/2)
CSE 245: Computer Aided Circuit Simulation and Verification
Finite Volume Method for Unsteady Flows
Chapter 26.
CSE245: Computer-Aided Circuit Simulation and Verification
EE 616 Computer Aided Analysis of Electronic Networks Lecture 12
Presentation transcript:

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 Solution of ODEs (IVP) –Forward Euler (FE), Backward Euler (BE) and Trapezoidal Rule (TR) –Multistep methods –Convergence Consistency

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

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

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

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

Three important observations An Aside on Solving Difference Equations Consider a general kth order difference 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 Multistep Methods – Stability Difference Equation

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

1 Re Im Multistep Methods – Stability Stability Theorem Proof

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)

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( )

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

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)

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

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

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

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

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

Strategy (for previous example): Take 5 steps of size 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

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

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

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

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

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

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

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

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

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

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

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

Variable step size

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

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

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

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

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

Application of linear multistep methods to circuit equations

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

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

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)

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