Transient Analysis: Computer Aided Engineering For Integrated Circuits

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

ECE 570 Session 7 IC 752-E

Computer Aided Engineering for Integrated Circuits

Transient analysis
Discuss time marching methods used in SPICE

1. Time marching methods


2. Explicit and implicit integration methods
3. Implicit methods used in circuit analysis
4. Implementation of discretization in SPICE

Supplemental reading: Vladimirescu, The SPICE Book,


Chapters: 6, 9.4 - 9.5, 10.4

1
1. Time marching methods
Two classes:
explicit - inexpensive per step, limited stability, not for circuit analysis
implicit – more expensive per step, better stability, suitable for circuit
analysis.

Example of RC circuit

dV V −E dV 1 1
C =− =− V+ E
dt R dt RC RC

R = 10 Ω
RC = 10−11 sec
C = 1 pF

2
V ( t ) − exact (theoretical) solution
Notation:
Vn − approximate (numerical) solution at t = tn

We write the differential equation at time t = tn in the form


dV ( t )
= − 1 V ( tn ) + 1 E ( tn )
dt t =t RC RC
n
We can approximate the derivative using
dV ( t ) V ( tn+1 ) − V ( tn )
a) ≅ ; h = tn+1 − tn Forward Euler (F-E)
dt t =t h
n
formula or
dV ( t ) V ( tn ) − V ( tn−1 )
b) ≅ ; h = tn+1 − tn Backward Euler (B-E)
dt t =t h
n
formula.

3
Using F-E formula we obtain
V ( tn+1 ) − V ( tn ) 1 V t + 1 E t
≅− ( ) ( n)
h RC n RC
Computation of the solution on the basis of the above formula, from the initial
condition V ( to ) = Vo , can be described by the difference equation

Vn+1 = Vn − h Vn + h E ( tn )
RC RC
For a constant excitation, E ( t ) = A , and zero initial condition the solution to the
difference equation is
n
Vn = A 1 − 1 − h .
RC
The analytic solution is
− t
V (t ) = A 1 − e RC

and it approaches the level A as time increases.

4
The numerical solution, Vn , will tend to the same level iff

1− h < 1 h < 2 RC .
RC

2. Explicit and implicit integration methods

Discussed explicit F-E – method has stability problem


Step size is limited by stability. The explicit methods are not suitable for circuit
analysis, where we want to be able to compute with large steps when the
solution changes slowly (i.e. when the accuracy does not require small steps).
Backward-Euler (implicit method)
dV V ( tn+1 ) − V ( t n )
≅ this is the first order method.
dt tn+1 h
This method will be applied to the equation of RC circuit
dV ( t ) 1 1
=− V ( t n+1 ) + E ( tn+1 ) .
dt t RC RC
n+1

5
Considering the finite difference approximation we have V ( tn ) → Vn and
the difference equation:
Vn+1 − Vn 1 1
=− Vn+1 + E n +1
h RC RC
n = 0,1, 2,

Vn+1 = aVn + bEn+1


Assume:V0 = 0 , En = E0 = 5 [V ] = const than the solution is

Vn+1 = bE0 (1 + a + a 2 + + an )
where
h −1 h −1 h
a = (1 + ) , b = (1 +
)
RC RC RC
V(t)→5 and alsoVn →5 because a < 1 without any restriction on the
integration step.

6
V(t)
Ass.: V0 = 5 , En = 0
Numerical approximation yields 5
Vn+1 = aVn
The solution is: Vn = a nV0

a <1
t

STABILITY CONDITION
1
<1 THE METHOD IS ABSOLUTELY STABLE
h
1+
RC
V

The importance of
absolute stability

7
3. Implicit methods used in circuit analysis

B-E:
xn+1 = xn + hn+1 xn+1 1-rst order method

dx
xˆ n+1 =
dt t = t
n+1
T-R (default in SPICE)

hn+1
x n +1 = x n + ( x n + x n +1 ) 2-nd order method
2

THESE ARE ONE-STEP METHODS, ALSO CALLED SINGLE STEP


METHODS.

8
EXERCISE-1
Apply T-R method to the RC circuit and obtain difference equation for the
circuit.
Hint
dV 1 1
=− V+ E
dt RC RC
dV
=V
dt
For t = tn we have
1 1
V ( tn ) = − V (tn ) + E (tn )
RC RC
For t = t n+1 we have
1 1
V ( t n +1 ) = − V ( t n +1 ) + E ( t n +1 ) .
RC RC
The T-R formula is
hn+1
Vn+1 = Vn + (Vn + Vn+1 )
2

9
Linear Multistep Methods (LMM)
General formula for LMM
k k
xn + k = α i xn + k − i + hn+ k − i β i xn+ k − i
i =1 i =0
representing k-step methods.

When β 0 = 0 , the method is explicit and it is not suitable for circuit


simulation.
When β 0 ≠ 0 , the method is implicit and suitable for circuit simulation,
the method is suitable for solving stiff problems.

10
THE GEAR’S METHODS
k
xn + k = α i xn+ k − i + hn+ k β 0 xn+ k
i =1
IN SPICE
k = 2, 3, ,6
(for k = 1 we have α1 = 1 and β 0 = 1 , which results in B-E)

2 4 1
Example of 2-step method k=2 β0 = α1 = α2 = −
3 3 3
EXERCISE 2.
Derive difference formula for the RC circuit using Gear’s method
with k=2.
Check the method stability ( ζ < 1 ).

11
Hint:
Application of 2-step Gear method yields
2 4 1 2
xn+ 2 (1 + γ n+ 2 ) − xn+1 + xn = γ n+ 2 En+ 2
3 3 3 3
h
where γ n+ 2 = n+ 2 τ = RC
τ
Checking the stability.

The characteristic polynomial is


2 4 1
ζ 2 (1 + γ n+ 2 ) − ζ + = 0
3 3 3
A general solution to the homogeneous difference equation is
xn = C Aζ 1n + C Bζ 2n
Stability Condition is
ζ1 < 1
ζ2 <1
Verify that the difference is always stable regardless of hn .

12
An example of formula for 3-step Gear’s method
6 18 4 2
k=3 β0 = α1 = α2 = − α3 =
11 11 11 11

xn+ 3 = α 1 xn+ 2 + α 2 xn+1 + α 3 xn + hn+ 3 ⋅ β 0 xn+ 3

n = 0,1, 2,
Note that

k
αi = 1
i =1

which is an expression of the method consistency condition.

13
Exercise 3
Formulate B-E equation for the circuit below
+
R Ass. : QD-junction cap. only
V
Id QD QD = Q (V )

-
V
I d = I s (e ndVt
− 1)
Result:
V − Vn
Vn+1
1 1
C (Vn+1 ) n+1 = − I s (e Vt
− 1) − Vn+1 + E n+1
hn+1 R R
dQD
C (V ) = , Vt = ndVt
dV
n = 0,1, 2,
EXERCISE 3a.
Apply F-E and get the difference equations for the circuit in the Exercise 3.

14
4. Implementation of discretization in SPICE
(Example of T-R method)
The capacitor

C hn+1
Vn+1 = Vn + (Vn + Vn+1 ) T-R formula
i 2
+ -
V
The circuit relations
dV 1
i =C V= i
dt C
Using the following notation for the numerical approximation to the current
I n ≅ i (tn )
I n + 1 ≅ i ( t n +1 )
and the circuit relations we obtain
h
Vn+1 = Vn + n+1 ( I n + I n+1 ) .
2C

15
The explicit formula for the current is
2C 2C
I n +1 = Vn+1 − Vn − I n
hn+1 hn+1
g n +1 In
or using the notation for the coefficients
2C 2C
I n+1 = gn+1Vn+1 + I n where gn+1 = and I n = − I n − Vn .
hn+1 hn+1
The circuit interpretation yields the following equivalent circuit
for the capacitance

In

g n +1
Vn +1

16
The Inductor The circuit relations
L
I
dI
V=L
V dt
dI 1
= V
dt L
hn+1 dI
The T-R formula: I n+1 = I n + ( I n + I n+1 ) where I= .
2 dt

Using the circuit relations we obtain

hn+1 h
I n +1 = Vn+1 + I n + n+1 Vn
2L 2L
gn+1 In

17
The circuit interpretation of the formula yields the equivalent circuit

In

g n +1
Vn +1

Replacing the capacitors and inductors by their equivalent circuits we obtain


COMPANION NETWORK

Exercise: Use B-E formula to get equivalent circuits for the capacitor and inductor.

18

You might also like