Transient Analysis: Computer Aided Engineering For Integrated Circuits
Transient Analysis: Computer Aided Engineering For Integrated Circuits
Transient Analysis: Computer Aided Engineering For Integrated Circuits
Transient analysis
Discuss time marching methods used in SPICE
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
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
4
The numerical solution, Vn , will tend to the same level iff
1− h < 1 h < 2 RC .
RC
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 = 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
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.
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.
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
n = 0,1, 2,
Note that
k
αi = 1
i =1
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
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
Exercise: Use B-E formula to get equivalent circuits for the capacitor and inductor.
18