CSE%20245:%20Computer%20Aided%20Circuit%20Simulation%20and%20Verification - PowerPoint PPT Presentation

About This Presentation
Title:

CSE%20245:%20Computer%20Aided%20Circuit%20Simulation%20and%20Verification

Description:

CSE 245: Computer Aided Circuit Simulation and Verification Fall 2004, Nov Lecture 8: Numerical Integration – PowerPoint PPT presentation

Number of Views:120
Avg rating:3.0/5.0
Slides: 70
Provided by: Haik151
Learn more at: https://cseweb.ucsd.edu
Category:

less

Transcript and Presenter's Notes

Title: CSE%20245:%20Computer%20Aided%20Circuit%20Simulation%20and%20Verification


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

4
Ordinary Differential Equations
  • Typically analytic solutions are not available
  • ? solve it numerically

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
6
Finite Difference Methods
Basic Concepts
First - Discretize Time
Second - Represent x(t) using values at ti
Approx. soln
Exact soln
7
Forward Euler Approximation
8
Forward Euler Approximation
9
Backward Euler Approximation
10
Backward Euler Approximation
11
Trapezoidal Rule Approximation
12
Trapezoidal Rule Approximation
Solve with Gaussian Elimination
13
Numerical Integration View
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
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

20
Linear Multistep Method (LMS)
Basic Equations
Nonlinear Differential Equation
k-Step Multistep Approach
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
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
  • Dahlquists 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
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
27
Convergence Analysis (1)
28
Convergence Analysis (2)
  • 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.

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 gt 0)
2) Global Condition The single step errors do
not grow too quickly (stability)
All one-step methods are stable in this sense.
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
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
32
One-step Methods Convergence Analysis
Convergence Analysis for Forward Euler
Forward-Euler definition
33
One-step Methods Convergence Analysis
Convergence Analysis for Forward Euler
Define the "Global" error
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
35
One-step Methods Convergence Analysis
A helpful bound on difference equations
Mapping the global error equation to the lemma
36
One-step Methods Convergence Analysis
Back to Convergence Analysis for Forward Euler
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).

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
  • Dahlquists Stability Barriers

39
Linear Multistep Methods (LMS)
Definition and Observations
Multistep Equation
How does one pick good coefficients?
Want the highest accuracy
40
Linear Multistep Methods (LMS)
Simplified Problem for Analysis
Scalar ODE
Why such a simple Test Problem?
  • Nonlinear Analysis has many unrevealing
    subtleties
  • Scalar equivalent to vector for multistep methods.

multistep
discretization
Decoupled Equations
41
Linear Multistep Methods
Simplified Problem for Analysis
Scalar ODE
Scalar Multistep formula
Growing Solutions
Decaying Solutions
42
Multistep Methods Convergence Analysis
Global Error Equation
Multistep formula
Exact solution Almost satisfies Multistep Formula
Global Error
Subtracting yields difference equation for global
error
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.
44
Multistep Methods Making LTE small
Exactness Constraints
As any smooth v(t) has a locally accurate Taylor
series in t
Then
45
Multistep Methods Making LTE small
Exactness Constraints k2 Example
For k2, yields a 5x6 system of equations for
Coefficients
p0
p1
p2
p3
p4
46
Multistep Methods Making LTE small
Exactness Constraints k2 Example
Exactness Constraints for k2
47
Multistep Methods Making LTE small
Exactness Constraints k2 Example, generating
Methods
Solve for the 2-step method with lowest LTE
Solve for the 2-step explicit method with lowest
LTE
48
Multistep Methods Making LTE small
FE
LTE
Trap
Beste
Timestep
49
Multistep Methods Making LTE small
Max Error
FE
Wheres BESTE?
Trap
Timestep
50
Multistep Methods Making LTE small
Max Error
Beste
Trap
FE
Timestep
51
LMS Stability
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?
52
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
  • Dahlquists Stability Barriers

53
An Aside on Solving Difference Equations
Consider a general kth order difference equation
Which must have k initial conditions
As is clear when the equation is in update form
Most important difference equation result
54
An Aside on Solving Difference Equations
To understand how h is derived, first a simple
case
55
An Aside on Solving Difference Equations
Three important observations
56
LMS Convergence Analysis
Conditions for convergence Consistency
Stability
1) Local Condition One step errors are small
(consistency)
Exactness Constraints up to p0 (p0 must be gt 0)
2) Global Condition One step errors grow slowly
(stability)
Convergence Result
57
Multistep Methods Stability
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
58
Multistep Methods Stability
Stability 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.
59
Multistep Methods Stability
Stability Theorem Proof
Im
Re
1
-1
60
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 q0 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 (q0)

61
LMS A-Stable
Def A method is A-stable if the region of
absolute stability contains the entire left hand
plane (in the ? space)

Im(?)
Re(?)
-1
1
62
LMS Stability
  • 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 z1
  • Absolute stability roots of (a-bq) must stay in
    z?1 and be simple on z1 when Re(q)lt0.

63
LMS Stability
Dahlquists First Stability Barrier
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 k2 if k is even or k1 if k
is odd.
64
Stabilities
Froward Euler
65
FE region of absolute stability
Forward Euler
ODE stability region
Im(z)
Difference Eqn Stability region
Region of Absolute Stability
Re(z)
1
-1
66
Stabilities
Backward Euler
67
BE region of absolute stability
Backward Euler
Im(z)
Difference Eqn Stability region
Re(z)
1
-1
Region of Absolute Stability
68
Stabilities
Trapezoidal
69
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
  • Dahlquists Stability Barriers
Write a Comment
User Comments (0)
About PowerShow.com