ee 616 computer aided analysis of electronic networks lecture 12

50
1 EE 616 Computer Aided Analysis of Electronic Networks Lecture 12 Instructor: Dr. J. A. Starzyk, Professor School of EECS Ohio University Athens, OH, 45701 Note: materials in this lecture are from the notes of EE219A UC-berkeley http://www- cad.eecs.berkeley.edu/~nardi/EE219A/con tents.html

Upload: laken

Post on 18-Jan-2016

33 views

Category:

Documents


2 download

DESCRIPTION

EE 616 Computer Aided Analysis of Electronic Networks Lecture 12. Instructor: Dr. J. A. Starzyk, Professor School of EECS Ohio University Athens, OH, 45701. Note: materials in this lecture are from the notes of EE219A UC-berkeley http://www- cad.eecs.berkeley.edu/~nardi/EE219A/contents.html. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

1

EE 616 Computer Aided Analysis of Electronic Networks

Lecture 12

Instructor: Dr. J. A. Starzyk, ProfessorSchool of EECSOhio UniversityAthens, OH, 45701

Note: materials in this lecture are from the notes of EE219A UC-berkeleyhttp://www- cad.eecs.berkeley.edu/~nardi/EE219A/contents.html

Page 2: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

2

Outline Transient Analysis of dynamical circuits

– i.e., circuits containing C and/or L Examples Solution of Ordinary Differential Equations (Initial Value

Problems – IVP)– Forward Euler (FE), Backward Euler (BE) and

Trapezoidal Rule (TR)– Multistep methods– Convergence

Methods for Ordinary Differential Equations

By Prof. Alessandra Nardi

Page 3: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

3

Ground Plane

Signal Wire

LogicGate

LogicGate

• Metal Wires carry signals from gate to gate.• How long is the signal delayed?

Wire and ground plane form a capacitor

Wire has resistance

Application Problems

Signal Transmission in an Integrated Circuit

Page 4: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

4

capacitor

resistor

• Model wire resistance with resistors.• Model wire-plane capacitance with capacitors.

Constructing the Model• Cut the wire into sections.

Application Problems

Signal Transmission in an IC – Circuit Model

Page 5: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

5

Nodal Equations Yields 2x2 System

C1

R2

R1 R3 C2

Constitutive Equations

cc

dvi C

dt

1R Ri v

R

Conservation Laws

1 1 20C R Ri i i

2 3 20C R Ri i i

1

1 2 21 1

2 22

2 3 2

1 1 1

0

0 1 1 1

dvR R RC vdt

C vdv

R R Rdt

1Ri

1Ci

2Ri

2Ci

3Ri

1v 2v

Application Problems

Signal Transmission in an IC – 2x2 example

Page 6: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

6eigenvectors

1

1 2 21 1

2 22

2 3 2

1 1 1

0

0 1 1 1

dvR R RC vdt

C vdv

R R Rdt

1 2 1 3 2Let 1, 10, 1C C R R R 1.1 1.0

1.0 1.1

A

dxx

dt

11 1 0.1 0 1 1

1 1 0 2.1 1 1A

Eigenvalues and Eigenvectors

Eigenvalues

Application Problems

Signal Transmission in an IC – 2x2 example

Page 7: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

1Change of variab (le ) ( ) ( ) (s ): Ey t x t y t E x t

1

1 2 1 2

10 0

0 0

0 0n n

n

A E E E E E

E

E

Eigendecomposition:

0

( )Substituting: ( ), (0)

dEy tAEy t Ey x

dt

11Multiply by ( ) : ( )dy t

E AE tdt

E y 0 0

10 0

0 0

( )n

y t

0Consider an ODE( )

( ), (0): dx t

Ax t x xdt

An Aside on Eigenanalysis

Page 8: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

8

( )Decoupling: ( ) ( ) (0)iti

i i i

dy ty t y t e y

dt

1 0 0

0 0

0 0

From last slide:( ) ( )

n

dy tdt

y t

DecoupledEquations!

1) Determine , E 1 0 0

3) Compute ( ) 0 0 (0)

0 0 n

t

t

e

y t y

e

102) Compute (0) y E x

4) ( ) ( ) x t Ey t

0Steps for solvi( )

( ), (0)ng dx t

Ax t x xdt

An Aside on Eigenanalysis

Page 9: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

9

1(0) 1v

2 (0) 0v

Notice two time scale behavior

• v1 and v2 come together quickly (fast eigenmode).• v1 and v2 decay to zero slowly (slow eigenmode).

Application Problems

Signal Transmission in an IC – 2x2 example

Page 10: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

10

Circuit Equation Formulation

For dynamical circuits the Sparse Tableau equations can be written compactly:

For sake of simplicity, we shall discuss first order ODEs in the form:

riablescircuit va of vector theis where

)0(

0),,)(

(

0

x

xx

txdt

tdxF

),()(

txfdt

tdx

Page 11: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

11

Ordinary Differential Equations

Initial Value Problems (IVP)

Typically analytic solutions are not available

solve it numerically

.condition initial given the intervalan in

)(

),()(

:(IVP) Problem Value Initial Solve

00

00

x,T][t

xtx

txfdt

tdx

Page 12: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

12

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:

0),,( tydt

dyF

We shall assume that has a unique solution 0),,( tydt

dyF

00 )(

)()(

xtx

tAxdt

tdx

Ordinary Differential Equations Assumptions and Simplifications

Page 13: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

13

First - Discretize Time

Second - Represent x(t) using values at ti

ˆ ( )llx x t

Approx. sol’n

Exact sol’n

Third - Approximate using the discrete ( )ldx t

dtˆ 'slx

1 1

1

ˆ ˆ ˆ ˆExample: ( )

l l l l

ll l

d x x x xx t or

dt t t

Lt T1t 2t 1Lt 0

t t t

1t 2t 3t Lt0

3x̂ 4x̂1x̂

2x̂

Finite Difference Methods

Basic Concepts

Page 14: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

14

lt 1lt t

x

1( ) ( )slope l lx t x t

t

slope ( )ldx t

dt

1( ) ( ) ( )l l lx t x t t A x t

1

1

( ) ( )( ) ( )

or

( ) ( ) ( )

l ll l

l l l

x t x tdx t A x t

dt t

x t x t t A x t

Finite Difference Methods

Forward Euler Approximation

Page 15: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

15

1t 2t t

x

(0)tAx

11 ˆ( ) (0) 0x t x x tAx

3t

2 1 12 ˆ ˆ ˆ( )x t x x tAx

1ˆtAx

1 1ˆ ˆ ˆ( ) L L LLx t x x tAx

Finite Difference Methods

Forward Euler Algorithm

Page 16: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

16

lt 1lt t

x 1slope ( )l

dx t

dt

1( ) ( )slope l lx t x t

t

1 1( ) ( ) ( )l l lx t x t t A x t

11 1

1 1

( ) ( )( ) ( )

or

( ) ( ) ( )

l ll l

l l l

x t x tdx t A x t

dt t

x t x t t A x t

Finite Difference Methods

Backward Euler Approximation

Page 17: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

17

1t 2t t

x

1ˆtAx

2ˆtAx

1 11 ˆ ˆ( ) (0)x t x x tAx

Solve with Gaussian Elimination

1ˆ[ ] (0)I tA x x

1 1ˆ ˆ( ) [ ]L LLx t x I tA x

2 1 12 ˆ ˆ( ) [ ]x t x I tA x

Finite Difference Methods

Backward Euler Algorithm

Page 18: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

18

1

1

1

1 1

1( ( ) ( ))

21

( ( ) ( ))2

( ) ( )

1( ) ( ) ( ( ) ( ))

2

l l

l l

l l

l l l l

d dx t x t

dt dt

Ax t Ax t

x t x t

t

x t x t tA x t x t

t

x

1( ) ( )slope l lx t x t

t

slope ( )ldx t

dt

1slope ( )l

dx t

dt

1 1

1 1( ( ) ( )) ( ( ) ( ))

2 2l l l lx t tAx t x t tAx t

Finite Difference Methods

Trapezoidal Rule Approximation

Page 19: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

19

1t 2t t

x1ˆ (0)

2 2

t tI A x I A x

Solve with Gaussian Elimination

1 11 ˆ ˆ( ) (0) (0)

2

tx t x x Ax Ax

12 1

2

11

ˆ ˆ( )2 2

ˆ ˆ( )2 2

L LL

t tx t x I A I A x

t tx t x I A I A x

Finite Difference Methods

Trapezoidal Rule Algorithm

Page 20: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

20

1

1( ) (( ) )) )( (l

l

t

l l t

dx t x t x t A dx t xA

dt

lt 1lt

1

( )l

l

t

tAx d

1( )ltAx t BE

( )ltAx t FE

( ) ( )2 l l

tAx t Ax t

Trap

Finite Difference Methods

Numerical Integration View

Page 21: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

21

Finite Difference Methods - Sources of Error

Page 22: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

22

Trap Rule, Forward-Euler, Backward-Euler Are all one-step methods

Forward-Euler is simplest No equation solution explicit method. Box 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

1 2 3ˆ ˆ ˆ ˆ is computed using only , not , , etc.l l l lx x x x

Finite Difference Methods

Summary of Basic Concepts

Page 23: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

23

( ) ( ( ), ( ))dx t f x t u t

dtNonlinear Differential Equation:

k-Step Multistep Approach: 0 0

ˆ ˆ ,k k

l j l jj j l j

j j

x t f x u t

Solution at discrete points

Time discretization

Multistep coefficients

2ˆ lx

lt1lt 2lt 3lt l kt

ˆ lx1ˆ lx

ˆ l kx

Multistep Methods

Basic Equations

Page 24: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

24

Multistep Equation:

1 1 1,l l l lx t x t t f x t u t

FE Discrete Equation: 1 11ˆ ˆ ˆ ,l l l

lx x t f x u t

0 1 0 11, 1, 1, 0, 1k

Forward-Euler Approximation:

Multistep Coefficients:

Multistep Coefficients:

BE Discrete Equation:

0 1 0 11, 1, 1, 1, 0k 1ˆ ˆ ˆ ,l l l

lx x t f x u t

Trap Discrete Equation: 1 11ˆ ˆ ˆ ˆ, ,

2l l l l

l l

tx x f x u t f x u t

0 1 0 1

1 11, 1, 1, ,

2 2k Multistep Coefficients:

0 0

ˆ ˆ ,k k

l j l jj j l j

j j

x t f x u t

Multistep Methods – Common Algorithms

TR, BE, FE are one-step methods

Page 25: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

25

Multistep Equation:

01) If 0 the multistep method is implicit 2) A step multistep method uses previous ' and 'k k x s f s

03) A normalization is needed, 1 is common 4) A -step method has 2 1 free coefficientsk k

How does one pick good coefficients?

Want the highest accuracy

0 0

ˆ ˆ ,k k

l j l jj j l j

j j

x t f x u t

Multistep Methods

Definition and Observations

Page 26: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

26

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

0,

ˆmax 0 as t 0lT

lt

x x l t

exactx

tˆ computed with

2lx

ˆ computed with tlx

Multistep Methods – Convergence Analysis

Convergence Definition

Page 27: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

27

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

0,

ˆmaxpl

Tl

t

x x l t C t

0for all less than a given t t

Forward- and Backward-Euler are order 1 convergent

Trapezoidal Rule is order 2 convergent

Multistep Methods – Convergence Analysis

Order-p Convergence

Page 28: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

28

Multistep Methods – Convergence Analysis

Two types of error

made.been haserror previous no assuming

,solution theof eexact valu theand ˆ value

computed ebetween th difference theis at method

n integratioan of (LTE)Error Truncation Local The

11

1

)x(tx

t

ll

l

exactly.known iscondition initial only the that assuming

,solution theof eexact valu theand ˆ value

computed ebetween th difference theis at method

n integratioan of (GTE)Error Truncation Global The

11

1

)x(tx

t

ll

l

Page 29: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

29

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 time steps t,

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 time steps.

Multistep Methods – Convergence Analysis

Two conditions for Convergence

Page 30: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

30

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

Page 31: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

31

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

1ˆ0 as t 0

x x t

t

One-step Methods – Convergence Analysis

Consistency definition

Page 32: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

32

One-step Methods – Convergence Analysis

Consistency for Forward Euler

Page 33: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

33

One-step Methods – Convergence Analysis

Convergence Analysis for Forward Euler

Forward-Euler definition

Expanding in t about yields

where is the "one-step" error bounded by

Page 34: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

34

One-step Methods – Convergence Analysis

Convergence Analysis for Forward Euler

Page 35: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

35

One-step Methods – Convergence Analysis

A helpful bound on difference equations

Page 36: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

36

One-step Methods – Convergence Analysis

A helpful bound on difference equations

Page 37: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

37

One-step Methods – Convergence Analysis

Back to Convergence Analysis for Forward Euler

Page 38: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

38

• 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.

One-step Methods – Convergence Analysis

Observations about Convergence Analysis for FE

Page 39: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

39

Summary

Transient Analysis of dynamical circuits– i.e., circuits containing C and/or L

Examples Solution of Ordinary Differential Equations

(Initial Value Problems – IVP)– Forward Euler (FE), Backward Euler (BE) and

Trapezoidal Rule (TR)– Multistep methods– Convergence

Page 40: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

40

Multistep Methods - Local Truncation Error

Page 41: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

41

Local Truncation Error (cont’d)

Page 42: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

42

Examples

Page 43: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

43

Examples (cont’d)

Page 44: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

44

Determination of Local Error

Page 45: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

45

Implicit Methods

Page 46: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

46

Convergence

Page 47: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

47

Convergence (cont’d)

Page 48: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

48

Convergence (cont’d)

Page 49: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

49

Other methods

Page 50: EE 616  Computer Aided Analysis of Electronic Networks Lecture 12

50

Summary