1 / 69

CSE 245: Computer Aided Circuit Simulation and Verification

CSE 245: Computer Aided Circuit Simulation and Verification. Fall 2004, Nov Lecture 8: Numerical Integration. Outline. One-step Method for ODE (IVP) Forward Euler Backward Euler Trapezoidal Rule Equivalent Circuit Model Linear MultiStep Method Convergence Analysis Consistence

riveria
Download Presentation

CSE 245: Computer Aided Circuit Simulation and Verification

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. CSE 245: Computer Aided Circuit Simulation and Verification Fall 2004, Nov Lecture 8: Numerical Integration

  2. Outline • One-step Method for ODE (IVP) • Forward Euler • Backward Euler • Trapezoidal Rule • Equivalent Circuit Model • Linear MultiStep Method • Convergence Analysis • Consistence • Stability • Time Step Control (next lecture) • Stability Region • Stiff System • Dynamic Time Step Control • Over-Relaxation Method & ADI

  3. Circuit Equation Formulation • For dynamical circuits the equations can be written compactly: • For sake of simplicity, we shall discuss first order ODEs in the form: courtesy Alessandra Nardi UCB

  4. Ordinary Differential Equations Typically analytic solutions are not available  solve it numerically courtesy Alessandra Nardi UCB

  5. Ordinary Differential Equations Assumptions and Simplifications • Not necessarily a solution exists and is unique for: • It turns out that, under rather mild conditions on the continuity and differentiability of F, it can be proven that there exists a unique solution. • Also, for sake of simplicity only consider linear case: We shall assume that has a unique solution courtesy Alessandra Nardi UCB

  6. Third - Approximate using the discrete Finite Difference Methods Basic Concepts First - Discretize Time Second - Represent x(t) using values at ti Approx. sol’n Exact sol’n courtesy Alessandra Nardi UCB

  7. Forward Euler Approximation courtesy Alessandra Nardi UCB

  8. Forward Euler Approximation courtesy Alessandra Nardi UCB

  9. Backward Euler Approximation courtesy Alessandra Nardi UCB

  10. Solve with Gaussian Elimination Backward Euler Approximation courtesy Alessandra Nardi UCB

  11. Trapezoidal Rule Approximation courtesy Alessandra Nardi UCB

  12. Trapezoidal Rule Approximation Solve with Gaussian Elimination courtesy Alessandra Nardi UCB

  13. Trap BE FE Numerical Integration View courtesy Alessandra Nardi UCB

  14. Equivalent Circuit Model-BE • Capacitor + + + C - - -

  15. Equivalent Circuit Model-BE • Inductor + + - + L - -

  16. Equivalent Circuit Model-TR • Capacitor + + + C - - -

  17. Equivalent Circuit Model-TR • Inductor + + - + L - -

  18. Summary of Basic Concepts Trap Rule, Forward-Euler, Backward-Euler Are all one-step methods Forward-Euler is simplest No equation solution explicit method. Boxcar approximation to integral Backward-Euler is more expensive Equation solution each step implicit method Trapezoidal Rule might be more accurate Equation solution each step implicit method Trapezoidal approximation to integral courtesy Alessandra Nardi UCB

  19. Outline • One-step Method for ODE (IVP) • Forward Euler • Backward Euler • Trapezoidal Rule • Linear MultiStep Method • Convergence Analysis • Consistence • Stability • Stiff System and Time Step Control (next lecture) • Stiff System • Dynamic Time Step Control courtesy Alessandra Nardi UCB

  20. Multistep coefficients Solution at discrete points Time discretization Linear Multistep Method (LMS) Basic Equations Nonlinear Differential Equation: k-Step Multistep Approach: courtesy Alessandra Nardi UCB

  21. LMS: Common Algorithm TR, BE, FE are one-step methods Multistep Equation: Forward-Euler Approximation: FE Discrete Equation: Multistep Coefficients: BE Discrete Equation: Multistep Coefficients: Trap Discrete Equation: Multistep Coefficients: courtesy Alessandra Nardi UCB

  22. Adams-Bashforth formula 0 =0 The first order Adams-Bashforth formula (forward Euler) The second order Adams-Bashforth formula

  23. Adams-Moulton formula 00 The first order Adams-Moulton formula (backward Euler) The second order Adams-Moulton formula (trapezoidal)

  24. Convergence Analysis • 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

  25. LMS: Convergence Analysis Definition: A finite-difference method for solving initial value problems on [0,T] is said to be convergent if given any A and any initial condition courtesy Alessandra Nardi UCB

  26. LMS: Convergence Analysis Order-p Convergence Definition: A multi-step method for solving initial value problems on [0,T] is said to be order p convergent if given any A and any initial condition Forward- and Backward-Euler are order 1 convergent Trapezoidal Rule is order 2 convergent courtesy Alessandra Nardi UCB

  27. Convergence Analysis (1) courtesy Alessandra Nardi UCB

  28. For convergence we need to look at max error over the whole time interval [0,T] We look at GTE Not enough to look at LTE, in fact: As I take smaller and smaller timesteps Dt, I would like my solution to approach exact solution better and better over the whole time interval, even though I have to add up LTE from more timesteps. Convergence Analysis (2) courtesy Alessandra Nardi UCB

  29. Convergence Analysis (3) 1) Local Condition: One step errors are small (consistency) Typically verified using Taylor Series Exactness Constraints up to p0 (p0 must be > 0) 2) Global Condition: The single step errors do not grow too quickly (stability) All one-step methods are stable in this sense. courtesy Alessandra Nardi UCB

  30. Consistency Definition: A one-step method for solving initial value problems on an interval [0,T] is said to be consistent if for any A and any initial condition courtesy Alessandra Nardi UCB

  31. One-step Methods – Convergence Analysis Consistency for Forward Euler Forward-Euler definition Expanding in t about zero yields Proves the theorem if derivatives of x are bounded courtesy Alessandra Nardi UCB

  32. One-step Methods – Convergence Analysis Convergence Analysis for Forward Euler Forward-Euler definition courtesy Alessandra Nardi UCB

  33. Subtracting the previous slide equations l Taking norms and using the bound on e One-step Methods – Convergence Analysis Convergence Analysis for Forward Euler Define the "Global" error courtesy Alessandra Nardi UCB

  34. One-step Methods – Convergence Analysis A helpful bound on difference equations A lemma bounding difference equation solutions l To prove, first write as a power series and sum u courtesy Alessandra Nardi UCB

  35. One-step Methods – Convergence Analysis A helpful bound on difference equations Mapping the global error equation to the lemma courtesy Alessandra Nardi UCB

  36. Applying the lemma and canceling terms One-step Methods – Convergence Analysis Back to Convergence Analysis for Forward Euler courtesy Alessandra Nardi UCB

  37. One-step Methods – Convergence Analysis Observations about Convergence Analysis for FE • Forward-Euler is order 1 convergent • The bound grows exponentially with time interval • C is related to the solution second derivative • The bound grows exponentially fast with norm(A). courtesy Alessandra Nardi UCB

  38. Convergence • 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 courtesy Alessandra Nardi UCB

  39. Linear Multistep Methods (LMS) Definition and Observations Multistep Equation: How does one pick good coefficients? Want the highest accuracy courtesy Alessandra Nardi UCB

  40. Linear Multistep Methods (LMS) Simplified Problem for Analysis • Nonlinear Analysis has many unrevealing subtleties • Scalar equivalent to vector for multistep methods. Scalar ODE: Why such a simple Test Problem? multistep discretization Decoupled Equations courtesy Alessandra Nardi UCB

  41. Osci l lations Linear Multistep Methods Simplified Problem for Analysis Scalar ODE: Scalar Multistep formula: Decaying Solutions Growing Solutions courtesy Alessandra Nardi UCB

  42. Local Truncation Error (LTE) Multistep Methods – Convergence Analysis Global Error Equation Multistep formula: Exact solution Almost satisfies Multistep Formula: Global Error: Subtracting yields difference equation for global error courtesy Alessandra Nardi UCB

  43. Multistep Methods – Making LTE small Exactness Constraints Multistep methods are designed so that they are exact for a polynomial of order p. These methods are said to be of order p. courtesy Alessandra Nardi UCB

  44. If if Multistep Methods – Making LTE small Exactness Constraints As any smooth v(t) has a locally accurate Taylor series in t: Then courtesy Alessandra Nardi UCB

  45. Multistep Methods – Making LTE small Exactness Constraints – k=2 Example For k=2, yields a 5x6 system of equations for Coefficients p=0 p=1 p=2 p=3 p=4 courtesy Alessandra Nardi UCB

  46. Multistep Methods – Making LTE small Exactness Constraints – k=2 Example Exactness Constraints for k=2 courtesy Alessandra Nardi UCB

  47. Multistep Methods – Making LTE small Exactness Constraints k=2 Example, generating Methods Solve for the 2-step method with lowest LTE Solve for the 2-step explicit method with lowest LTE courtesy Alessandra Nardi UCB

  48. 0 10 -5 10 Best Explicit Method has highest one-step accurate -10 10 -15 10 -4 -3 -2 -1 0 10 10 10 10 10 Multistep Methods – Making LTE small FE LTE Trap Beste Timestep courtesy Alessandra Nardi UCB

  49. Multistep Methods – Making LTE small Max Error FE Where’s BESTE? Trap Timestep courtesy Alessandra Nardi UCB

  50. worrysome 200 10 Best Explicit Method has lowest one-step error but global errror increases as timestep decreases 100 10 0 10 -100 10 -4 -3 -2 -1 0 10 10 10 10 10 Multistep Methods – Making LTE small Max Error Beste Trap FE Timestep courtesy Alessandra Nardi UCB

More Related